From 3df2bfd8717fa4fc5eb3066fe2957210efedd4bf Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 14 Oct 2009 09:15:23 +0200 Subject: Build the embedded demos on X11 so they can be used by Maemo --- demos/demos.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12 From 47a2215b0e6fb3e588b2dd4824b9a9951fcae413 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 14 Oct 2009 09:22:22 +0200 Subject: Fix the install targets on the new embedded demos --- demos/embedded/anomaly/anomaly.pro | 5 +++++ demos/embedded/desktopservices/desktopservices.pro | 18 ++++++++++++++---- demos/embedded/digiflip/digiflip.pro | 4 ++++ demos/embedded/flickable/flickable.pro | 5 +++++ demos/embedded/flightinfo/flightinfo.pro | 5 +++++ demos/embedded/lightmaps/lightmaps.pro | 5 +++++ demos/embedded/raycasting/raycasting.pro | 5 +++++ demos/embedded/weatherinfo/weatherinfo.pro | 5 +++++ 8 files changed, 48 insertions(+), 4 deletions(-) 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 -- cgit v0.12 From a98075a4f5795b3f84cd6bb028f80e84f5e6d00b Mon Sep 17 00:00:00 2001 From: Liang QI Date: Wed, 14 Oct 2009 10:01:04 +0200 Subject: Fix the autotest for S60, skip tst_QPainter::drawClippedEllipse(). RevBy: Janne Anttila --- tests/auto/qpainter/tst_qpainter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12 From efba0372add3a080acafc30663b28e72ef72e435 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 14 Oct 2009 10:27:01 +0200 Subject: qdoc: Made the \sincelist command produce better html. --- doc/src/qt4-intro.qdoc | 5 +- tools/qdoc3/htmlgenerator.cpp | 157 ++++++++++++++++++++++++++---------------- tools/qdoc3/htmlgenerator.h | 9 +-- 3 files changed, 105 insertions(+), 66 deletions(-) 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/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
sections; QList
::ConstIterator s; for (int i=0; itype()) { case Node::Namespace: @@ -741,35 +741,63 @@ int HtmlGenerator::generateAtom(const Atom *atom, } ++n; } + + /* + First generate the table of contents. + */ + out() << "
    \n"; + s = sections.constBegin(); + while (s != sections.constEnd()) { + if (!(*s).members.isEmpty()) { + + out() << "
  • " + << "" + << (*s).name + << "
  • \n"; + } + ++s; + } + out() << "
\n"; + int idx = 0; s = sections.constBegin(); while (s != sections.constEnd()) { if (!(*s).members.isEmpty()) { out() << "\n"; out() << "

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

\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() << "

New functions in " << protect(nmmap.key()) << ":

\n"; + pmap = parentmaps.begin(); + while (pmap != parentmaps.end()) { + NodeList nlist = pmap->values(); + out() << "

Class "; + + out() << ""; + QStringList pieces = fullName(pmap.key(), 0, marker).split("::"); + out() << protect(pieces.last()); + out() << "" << ":

\n"; + generateSection(nlist, 0, marker, CodeMarker::Summary); out() << "
"; - ++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(*c); + if ((*child)->type() == Node::Function) { + FunctionNode *func = static_cast(*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(*c)); + if ((*child)->isInnerNode()) { + findAllSince(static_cast(*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 NodeMultiMap; -typedef QMap NodeMultiMapMap; +typedef QMap NewSinceMaps; +typedef QMap ParentMaps; typedef QMap NodeMap; -typedef QMap NodeMapMap; +typedef QMap NewClassMaps; class HelpProjectWriter; @@ -311,9 +312,9 @@ class HtmlGenerator : public PageGenerator #endif QMap funcIndex; QMap legaleseTexts; - NodeMultiMapMap nodeMultiMapMap; + NewSinceMaps newSinceMaps; static QString sinceTitles[]; - NodeMapMap nodeMapMap; + NewClassMaps newClassMaps; }; #define HTMLGENERATOR_ADDRESS "address" -- cgit v0.12 From 2fc228b4d2fbe6ca44389e9e065272030775c87b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 14 Oct 2009 11:28:47 +0200 Subject: Cocoa: qfiledialog will not exit cleanly The native filedialog will not exit if it is told to hide. To remedy this, we just add an extra interrupt call so to inform the event dispatcher that it needs to return the the event loop to check if it has been told to quit Rev-By: olivier --- src/gui/dialogs/qfiledialog_mac.mm | 3 +++ 1 file changed, 3 insertions(+) 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 #include #include +#include #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); } -- cgit v0.12