diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-10-14 10:01:09 (GMT) |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2009-10-14 10:01:09 (GMT) |
commit | 6a8f901d6545a3c68bc398150b641694b68ddf0a (patch) | |
tree | 07841339fb9f83970f62733a2adb346f0aad36ca | |
parent | edcc782002c8b93e60dabfc0859c209a4eeedf10 (diff) | |
parent | 2fc228b4d2fbe6ca44389e9e065272030775c87b (diff) | |
download | Qt-6a8f901d6545a3c68bc398150b641694b68ddf0a.zip Qt-6a8f901d6545a3c68bc398150b641694b68ddf0a.tar.gz Qt-6a8f901d6545a3c68bc398150b641694b68ddf0a.tar.bz2 |
Merge branch '4.6' of git@scm.dev.troll.no:qt/qt into 4.6
-rw-r--r-- | demos/demos.pro | 2 | ||||
-rw-r--r-- | demos/embedded/anomaly/anomaly.pro | 5 | ||||
-rw-r--r-- | demos/embedded/desktopservices/desktopservices.pro | 18 | ||||
-rw-r--r-- | demos/embedded/digiflip/digiflip.pro | 4 | ||||
-rw-r--r-- | demos/embedded/flickable/flickable.pro | 5 | ||||
-rw-r--r-- | demos/embedded/flightinfo/flightinfo.pro | 5 | ||||
-rw-r--r-- | demos/embedded/lightmaps/lightmaps.pro | 5 | ||||
-rw-r--r-- | demos/embedded/raycasting/raycasting.pro | 5 | ||||
-rw-r--r-- | demos/embedded/weatherinfo/weatherinfo.pro | 5 | ||||
-rw-r--r-- | doc/src/qt4-intro.qdoc | 5 | ||||
-rw-r--r-- | src/gui/dialogs/qfiledialog_mac.mm | 3 | ||||
-rw-r--r-- | tests/auto/qpainter/tst_qpainter.cpp | 2 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.cpp | 157 | ||||
-rw-r--r-- | tools/qdoc3/htmlgenerator.h | 9 |
14 files changed, 158 insertions, 72 deletions
diff --git a/demos/demos.pro b/demos/demos.pro index 4a9d451..5e400ea 100644 --- a/demos/demos.pro +++ b/demos/demos.pro @@ -26,7 +26,7 @@ SUBDIRS += demos_boxes } mac*: SUBDIRS += demos_macmainwindow -wince*|symbian|embedded: SUBDIRS += embedded +wince*|symbian|embedded|x11: SUBDIRS += embedded !contains(QT_EDITION, Console):!cross_compile:!embedded:!wince*:SUBDIRS += demos_arthurplugin diff --git a/demos/embedded/anomaly/anomaly.pro b/demos/embedded/anomaly/anomaly.pro index 8f2825b..2871ba7 100644 --- a/demos/embedded/anomaly/anomaly.pro +++ b/demos/embedded/anomaly/anomaly.pro @@ -29,3 +29,8 @@ symbian { TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/anomaly +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro src/images +sources.path = $$[QT_INSTALL_DEMOS]/embedded/anomaly +INSTALLS += target sources diff --git a/demos/embedded/desktopservices/desktopservices.pro b/demos/embedded/desktopservices/desktopservices.pro index c160029c..bff7c46 100644 --- a/demos/embedded/desktopservices/desktopservices.pro +++ b/demos/embedded/desktopservices/desktopservices.pro @@ -8,15 +8,25 @@ SOURCES += desktopwidget.cpp contenttab.cpp linktab.cpp main.cpp RESOURCES += desktopservices.qrc music.sources = data/*.mp3 data/*.wav -music.path = /data/sounds/ - image.sources = data/*.png -image.path = /data/images/ -DEPLOYMENT += music image +target.path = $$[QT_INSTALL_DEMOS]/embedded/desktopservices +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/desktopservices symbian { TARGET.UID3 = 0xA000C611 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) ICON = ./resources/heart.svg + music.path = /data/sounds/ + image.path = /data/images/ + DEPLOYMENT += music image +} + +wince*{ + music.path = "\My Documents\My Music" + image.path = "\My Documents\My Pictures" + DEPLOYMENT += music image } + +INSTALLS += target sources diff --git a/demos/embedded/digiflip/digiflip.pro b/demos/embedded/digiflip/digiflip.pro index 72cdc0f..4af9973 100644 --- a/demos/embedded/digiflip/digiflip.pro +++ b/demos/embedded/digiflip/digiflip.pro @@ -5,3 +5,7 @@ symbian { include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) } +target.path = $$[QT_INSTALL_DEMOS]/embedded/digiflip +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/digiflip +INSTALLS += target sources diff --git a/demos/embedded/flickable/flickable.pro b/demos/embedded/flickable/flickable.pro index 731dcbe..1052330 100644 --- a/demos/embedded/flickable/flickable.pro +++ b/demos/embedded/flickable/flickable.pro @@ -5,3 +5,8 @@ symbian { TARGET.UID3 = 0xA000CF73 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/flickable +sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/flickable +INSTALLS += target sources diff --git a/demos/embedded/flightinfo/flightinfo.pro b/demos/embedded/flightinfo/flightinfo.pro index 0a51287..8e5535c 100644 --- a/demos/embedded/flightinfo/flightinfo.pro +++ b/demos/embedded/flightinfo/flightinfo.pro @@ -12,3 +12,8 @@ symbian { LIBS += -lesock -lconnmon -linsock TARGET.CAPABILITY = NetworkServices } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/flightinfo +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/flightinfo +INSTALLS += target sources diff --git a/demos/embedded/lightmaps/lightmaps.pro b/demos/embedded/lightmaps/lightmaps.pro index cc78efa..c9bfa0a 100644 --- a/demos/embedded/lightmaps/lightmaps.pro +++ b/demos/embedded/lightmaps/lightmaps.pro @@ -10,3 +10,8 @@ symbian { TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/lightmaps +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/lightmaps +INSTALLS += target sources diff --git a/demos/embedded/raycasting/raycasting.pro b/demos/embedded/raycasting/raycasting.pro index 8dd8a24..82d0812 100644 --- a/demos/embedded/raycasting/raycasting.pro +++ b/demos/embedded/raycasting/raycasting.pro @@ -6,3 +6,8 @@ symbian { TARGET.UID3 = 0xA000CF76 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/raycasting +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/raycasting +INSTALLS += target sources diff --git a/demos/embedded/weatherinfo/weatherinfo.pro b/demos/embedded/weatherinfo/weatherinfo.pro index 54c3857..57f1684 100644 --- a/demos/embedded/weatherinfo/weatherinfo.pro +++ b/demos/embedded/weatherinfo/weatherinfo.pro @@ -11,3 +11,8 @@ symbian { LIBS += -lesock -lconnmon -linsock TARGET.CAPABILITY = NetworkServices } + +target.path = $$[QT_INSTALL_DEMOS]/embedded/weatherinfo +sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro +sources.path = $$[QT_INSTALL_DEMOS]/embedded/weatherinfo +INSTALLS += target sources diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc index e37d327..cecff0e 100644 --- a/doc/src/qt4-intro.qdoc +++ b/doc/src/qt4-intro.qdoc @@ -664,9 +664,10 @@ See the \l{QtMultimedia Module} documentation for more information. - \section1 Classes, functions, etc new in 4.6 + \section1 New Classes, Functions, Macros, etc - Links to classes, functions, and other items that are new in 4.6. + Links to new classes, functions, macros, and other items + introduced in Qt 4.6. \sincelist 4.6 diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm index 3a4ecce..8e4c461 100644 --- a/src/gui/dialogs/qfiledialog_mac.mm +++ b/src/gui/dialogs/qfiledialog_mac.mm @@ -62,6 +62,7 @@ #include <qvarlengtharray.h> #include <qdesktopwidget.h> #include <stdlib.h> +#include <qabstracteventdispatcher.h> #include "ui_qfiledialog.h" QT_BEGIN_NAMESPACE @@ -245,6 +246,8 @@ QT_USE_NAMESPACE mReturnCode = [mSavePanel runModalForDirectory:mCurrentDir file:selectable ? filename : @"untitled"]; + + QAbstractEventDispatcher::instance()->interrupt(); return (mReturnCode == NSOKButton); } diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 9515d87..e4f267d 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -1554,7 +1554,7 @@ void tst_QPainter::drawClippedEllipse_data() void tst_QPainter::drawClippedEllipse() { QFETCH(QRect, rect); -#if defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN) if (sizeof(qreal) != sizeof(double)) QSKIP("Test only works for qreal==double", SkipAll); #endif diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 033c62c..c02dc2e 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -672,18 +672,18 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::SinceList: { - NodeMultiMapMap::const_iterator v; - v = nodeMultiMapMap.find(atom->string()); - NodeMapMap::const_iterator nc; - nc = nodeMapMap.find(atom->string()); - if ((v != nodeMultiMapMap.constEnd()) && !v.value().isEmpty()) { + NewSinceMaps::const_iterator nsmap; + nsmap = newSinceMaps.find(atom->string()); + NewClassMaps::const_iterator ncmap; + ncmap = newClassMaps.find(atom->string()); + if ((nsmap != newSinceMaps.constEnd()) && !nsmap.value().isEmpty()) { QList<Section> sections; QList<Section>::ConstIterator s; for (int i=0; i<LastSinceType; ++i) sections.append(Section(sinceTitle(i),QString(),QString())); - NodeMultiMap::const_iterator n = v.value().constBegin(); - while (n != v.value().constEnd()) { + NodeMultiMap::const_iterator n = nsmap.value().constBegin(); + while (n != nsmap.value().constEnd()) { const Node* node = n.value(); switch (node->type()) { case Node::Namespace: @@ -741,35 +741,63 @@ int HtmlGenerator::generateAtom(const Atom *atom, } ++n; } + + /* + First generate the table of contents. + */ + out() << "<ul>\n"; + s = sections.constBegin(); + while (s != sections.constEnd()) { + if (!(*s).members.isEmpty()) { + + out() << "<li>" + << "<a href=\"#" + << Doc::canonicalTitle((*s).name) + << "\">" + << (*s).name + << "</a></li>\n"; + } + ++s; + } + out() << "</ul>\n"; + int idx = 0; s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { out() << "<a name=\"" - << registerRef((*s).name.toLower()) + << Doc::canonicalTitle((*s).name) << "\"></a>\n"; out() << "<h3>" << protect((*s).name) << "</h3>\n"; if (idx == Class) - generateCompactList(0, marker, nc.value(), QString("Q")); + generateCompactList(0, marker, ncmap.value(), QString("Q")); else if (idx == MemberFunction) { - NodeMultiMapMap nodemultimapmap; - NodeMultiMapMap::iterator nmmap; + ParentMaps parentmaps; + ParentMaps::iterator pmap; NodeList::const_iterator i = s->members.constBegin(); while (i != s->members.constEnd()) { Node* p = (*i)->parent(); - nmmap = nodemultimapmap.find(p->name()); - if (nmmap == nodemultimapmap.end()) - nmmap = nodemultimapmap.insert(p->name(),NodeMultiMap()); - nmmap->insert((*i)->name(),(*i)); + pmap = parentmaps.find(p); + if (pmap == parentmaps.end()) + pmap = parentmaps.insert(p,NodeMultiMap()); + pmap->insert((*i)->name(),(*i)); ++i; } - nmmap = nodemultimapmap.begin(); - while (nmmap != nodemultimapmap.end()) { - NodeList nlist = nmmap->values(); - out() << "<p>New functions in " << protect(nmmap.key()) << ":</p>\n"; + pmap = parentmaps.begin(); + while (pmap != parentmaps.end()) { + NodeList nlist = pmap->values(); + out() << "<p>Class "; + + out() << "<a href=\"" + << linkForNode(pmap.key(), 0) + << "\">"; + QStringList pieces = fullName(pmap.key(), 0, marker).split("::"); + out() << protect(pieces.last()); + out() << "</a>" << ":</p>\n"; + generateSection(nlist, 0, marker, CodeMarker::Summary); out() << "<br />"; - ++nmmap; + ++pmap; } } else @@ -1124,7 +1152,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, } if (node) - generateTableOfContents(node, marker, sectioningUnit, numColumns, + generateTableOfContents(node, + marker, + sectioningUnit, + numColumns, relative); } break; @@ -2112,7 +2143,8 @@ void HtmlGenerator::generateCompactList(const Node *relative, /* If commonPrefix is not empty, then the caller knows what - the common prefix is, so just use that. + the common prefix is and has passed it in, so just use that + one. */ int commonPrefixLen = commonPrefix.length(); if (commonPrefixLen == 0) { @@ -2120,10 +2152,15 @@ void HtmlGenerator::generateCompactList(const Node *relative, QString last; /* - First, find out the common prefix of all non-namespaced - classes. For Qt, the prefix is Q. It can easily be derived - from the first and last classes in alphabetical order - (QAccel and QXtWidget in Qt 2.1). + The caller didn't pass in a common prefix, so get the common + prefix by looking at the class names of the first and last + classes in the class map. Discard any namespace names and + just use the bare class names. For Qt, the prefix is "Q". + + Note that the algorithm used here to derive the common prefix + from the first and last classes in alphabetical order (QAccel + and QXtWidget in Qt 2.1), fails if either class name does not + begin with Q. */ NodeMap::const_iterator iter = classMap.begin(); @@ -2164,8 +2201,7 @@ void HtmlGenerator::generateCompactList(const Node *relative, Divide the data into 37 paragraphs: 0, ..., 9, A, ..., Z, underscore (_). QAccel will fall in paragraph 10 (A) and QXtWidget in paragraph 33 (X). This is the only place where we - assume that NumParagraphs is 37. Each paragraph is a - NodeMap. + assume that NumParagraphs is 37. Each paragraph is a NodeMap. */ NodeMap paragraph[NumParagraphs+1]; QString paragraphName[NumParagraphs+1]; @@ -3644,53 +3680,54 @@ void HtmlGenerator::findAllClasses(const InnerNode *node) } /*! - For generating the "Since x.y" page. + For generating the "New Classes... in 4.6" section on the + What's New in 4.6" page. */ void HtmlGenerator::findAllSince(const InnerNode *node) { - NodeList::const_iterator c = node->childNodes().constBegin(); - while (c != node->childNodes().constEnd()) { - QString sinceVersion = (*c)->since(); - if (((*c)->access() != Node::Private) && !sinceVersion.isEmpty()) { - NodeMultiMapMap::iterator vmap = nodeMultiMapMap.find(sinceVersion); - if (vmap == nodeMultiMapMap.end()) - vmap = nodeMultiMapMap.insert(sinceVersion,NodeMultiMap()); - NodeMapMap::iterator ncmap = nodeMapMap.find(sinceVersion); - if (ncmap == nodeMapMap.end()) - ncmap = nodeMapMap.insert(sinceVersion,NodeMap()); + NodeList::const_iterator child = node->childNodes().constBegin(); + while (child != node->childNodes().constEnd()) { + QString sinceVersion = (*child)->since(); + if (((*child)->access() != Node::Private) && !sinceVersion.isEmpty()) { + NewSinceMaps::iterator nsmap = newSinceMaps.find(sinceVersion); + if (nsmap == newSinceMaps.end()) + nsmap = newSinceMaps.insert(sinceVersion,NodeMultiMap()); + NewClassMaps::iterator ncmap = newClassMaps.find(sinceVersion); + if (ncmap == newClassMaps.end()) + ncmap = newClassMaps.insert(sinceVersion,NodeMap()); - if ((*c)->type() == Node::Function) { - FunctionNode *func = static_cast<FunctionNode *>(*c); + if ((*child)->type() == Node::Function) { + FunctionNode *func = static_cast<FunctionNode *>(*child); if ((func->status() > Node::Obsolete) && (func->metaness() != FunctionNode::Ctor) && (func->metaness() != FunctionNode::Dtor)) { - vmap.value().insert(func->name(),(*c)); + nsmap.value().insert(func->name(),(*child)); } } - else if ((*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; - vmap.value().insert(className,(*c)); - ncmap.value().insert(className,(*c)); + else if ((*child)->url().isEmpty()) { + if ((*child)->type() == Node::Class && !(*child)->doc().isEmpty()) { + QString className = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + className = (*child)->parent()->name()+"::"+className; + nsmap.value().insert(className,(*child)); + ncmap.value().insert(className,(*child)); } } else { - QString name = (*c)->name(); - if ((*c)->parent() && - (*c)->parent()->type() == Node::Namespace && - !(*c)->parent()->name().isEmpty()) - name = (*c)->parent()->name()+"::"+name; - vmap.value().insert(name,(*c)); + QString name = (*child)->name(); + if ((*child)->parent() && + (*child)->parent()->type() == Node::Namespace && + !(*child)->parent()->name().isEmpty()) + name = (*child)->parent()->name()+"::"+name; + nsmap.value().insert(name,(*child)); } - if ((*c)->isInnerNode()) { - findAllSince(static_cast<InnerNode *>(*c)); + if ((*child)->isInnerNode()) { + findAllSince(static_cast<InnerNode *>(*child)); } } - ++c; + ++child; } } diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index fabfed1..40117df 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -68,9 +68,10 @@ struct NavigationBar #endif typedef QMultiMap<QString, Node*> NodeMultiMap; -typedef QMap<QString, NodeMultiMap> NodeMultiMapMap; +typedef QMap<QString, NodeMultiMap> NewSinceMaps; +typedef QMap<Node*, NodeMultiMap> ParentMaps; typedef QMap<QString, const Node*> NodeMap; -typedef QMap<QString, NodeMap> NodeMapMap; +typedef QMap<QString, NodeMap> NewClassMaps; class HelpProjectWriter; @@ -311,9 +312,9 @@ class HtmlGenerator : public PageGenerator #endif QMap<QString, NodeMap > funcIndex; QMap<Text, const Node *> legaleseTexts; - NodeMultiMapMap nodeMultiMapMap; + NewSinceMaps newSinceMaps; static QString sinceTitles[]; - NodeMapMap nodeMapMap; + NewClassMaps newClassMaps; }; #define HTMLGENERATOR_ADDRESS "address" |