From ad05af534dc61b0c07b2c676d8f1ff040d9fbf7b Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Wed, 30 Jan 2013 14:02:28 +0100 Subject: Fixed QT_NO_ACCESSIBILITY build. Change-Id: I14229753fc2e3b54da8a285ae9d27201b73e24be Reviewed-by: Friedemann Kleint --- src/gui/accessible/qaccessible.h | 2 ++ src/gui/kernel/qguiapplication.cpp | 2 ++ src/widgets/styles/qstylehelper.cpp | 12 ++---------- src/widgets/styles/qstylehelper_p.h | 2 ++ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index d316ec4f10..5988e6c346 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -39,6 +39,7 @@ ** ****************************************************************************/ +#ifndef QT_NO_ACCESSIBILITY #ifndef QACCESSIBLE_H #define QACCESSIBLE_H @@ -681,3 +682,4 @@ QT_END_NAMESPACE QT_END_HEADER #endif // QACCESSIBLE_H +#endif //!QT_NO_ACCESSIBILITY diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 02ae51bfc2..c155ecfe0c 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -60,7 +60,9 @@ #include #include #include +#ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" +#endif #include #include #include "qsessionmanager.h" diff --git a/src/widgets/styles/qstylehelper.cpp b/src/widgets/styles/qstylehelper.cpp index 6d8a3ce0c3..75c74e4a88 100644 --- a/src/widgets/styles/qstylehelper.cpp +++ b/src/widgets/styles/qstylehelper.cpp @@ -86,17 +86,13 @@ qreal dpiScaled(qreal value) #endif } +#ifndef QT_NO_ACCESSIBILITY bool isInstanceOf(QObject *obj, QAccessible::Role role) { bool match = false; -#ifndef QT_NO_ACCESSIBILITY QAccessibleInterface *iface = QAccessible::queryAccessibleInterface(obj); match = iface && iface->role() == role; delete iface; -#else - Q_UNUSED(obj) - Q_UNUSED(role) -#endif // QT_NO_ACCESSIBILITY return match; } @@ -104,19 +100,15 @@ bool isInstanceOf(QObject *obj, QAccessible::Role role) bool hasAncestor(QObject *obj, QAccessible::Role role) { bool found = false; -#ifndef QT_NO_ACCESSIBILITY QObject *parent = obj ? obj->parent() : 0; while (parent && !found) { if (isInstanceOf(parent, role)) found = true; parent = parent->parent(); } -#else - Q_UNUSED(obj) - Q_UNUSED(role) -#endif // QT_NO_ACCESSIBILITY return found; } +#endif // QT_NO_ACCESSIBILITY #ifndef QT_NO_DIAL diff --git a/src/widgets/styles/qstylehelper_p.h b/src/widgets/styles/qstylehelper_p.h index 41f823def7..01772e765c 100644 --- a/src/widgets/styles/qstylehelper_p.h +++ b/src/widgets/styles/qstylehelper_p.h @@ -82,8 +82,10 @@ namespace QStyleHelper void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect, int left = 0, int top = 0, int right = 0, int bottom = 0); +#ifndef QT_NO_ACCESSIBILITY bool isInstanceOf(QObject *obj, QAccessible::Role role); bool hasAncestor(QObject *obj, QAccessible::Role role); +#endif } -- cgit v1.2.3 From d1fe252d6a5c62b702620fc7f0b4b6b05fcfe5e6 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Tue, 12 Feb 2013 18:25:58 +0100 Subject: QSystemTrayIcon: fix the activation signal QObject::connect: No such slot QSystemTrayIcon ::emitActivated(QPlatformSystemTrayIcon::ActivationReason) Change-Id: I64dda8fb863de10d8b1d1cda1b8e6a513238b245 Reviewed-by: Christoph Schleifenbaum Reviewed-by: Friedemann Kleint --- src/widgets/util/qsystemtrayicon_qpa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/util/qsystemtrayicon_qpa.cpp b/src/widgets/util/qsystemtrayicon_qpa.cpp index 11d82b2332..113f0b68b2 100644 --- a/src/widgets/util/qsystemtrayicon_qpa.cpp +++ b/src/widgets/util/qsystemtrayicon_qpa.cpp @@ -68,7 +68,7 @@ void QSystemTrayIconPrivate::install_sys() if (qpa_sys) { qpa_sys->init(); QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)), - q_func(), SLOT(emitActivated(QPlatformSystemTrayIcon::ActivationReason))); + q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason))); QObject::connect(qpa_sys, SIGNAL(messageClicked()), q_func(), SIGNAL(messageClicked())); updateMenu_sys(); -- cgit v1.2.3 From cd84491aad703f7b983a3d61277a27998e53396a Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 12 Feb 2013 09:40:02 +0100 Subject: qdoc: inherited members do not show up for QML components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was a regression bug owing to a big qdoc cleanup for Qt5. But the way QML inheritance had been handled was not a good design, so it has been changed here. When a .qml file is parsed by qdoc, the base type of the QML component is detected, and its name is stored in qdoc's tree node for the component. After qdoc has parsed all the QML files, it traverses the tree, and for each QML component that has a base type name but no base type node pointer yet, it searches the tree for the base type node and stores the pointer to the node in the node for the components. Then when the output generator generates the doc page for the component, it has access to all the inherited members in the base type. Task-number: QTBUG-29569 Change-Id: Ib4958d05f55fa48a572f8ca51ffd57712f29bbc7 Reviewed-by: J-P Nurmi Reviewed-by: Topi Reiniö Reviewed-by: Martin Smith --- src/tools/qdoc/cppcodemarker.cpp | 10 +++++----- src/tools/qdoc/cppcodeparser.cpp | 9 ++++----- src/tools/qdoc/ditaxmlgenerator.cpp | 2 +- src/tools/qdoc/htmlgenerator.cpp | 2 +- src/tools/qdoc/node.cpp | 2 +- src/tools/qdoc/node.h | 12 +++++++----- src/tools/qdoc/qdocdatabase.cpp | 30 ++++++++++++++++++++++++++++++ src/tools/qdoc/qdocdatabase.h | 1 + src/tools/qdoc/qmlvisitor.cpp | 15 ++++++--------- src/tools/qdoc/tree.cpp | 4 +++- 10 files changed, 59 insertions(+), 28 deletions(-) diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index 0bebe0d670..c85c5c64ef 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -1165,8 +1165,8 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno } ++c; } - if (qcn->qmlBase() != 0) { - qcn = static_cast(qcn->qmlBase()); + if (qcn->qmlBaseNode() != 0) { + qcn = static_cast(qcn->qmlBaseNode()); if (!qcn->isAbstract()) qcn = 0; } @@ -1241,8 +1241,8 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno } ++c; } - if (qcn->qmlBase() != 0) { - qcn = static_cast(qcn->qmlBase()); + if (qcn->qmlBaseNode() != 0) { + qcn = static_cast(qcn->qmlBaseNode()); if (!qcn->isAbstract()) qcn = 0; } @@ -1287,7 +1287,7 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, Syno } ++c; } - const DocNode* dn = current->qmlBase(); + const DocNode* dn = current->qmlBaseNode(); if (dn) { if (dn->subType() == Node::QmlClass) current = static_cast(dn); diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 0af5a841eb..68edb1336a 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -951,11 +951,10 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc, else if (command == COMMAND_QMLINHERITS) { if (node->name() == arg) doc.location().warning(tr("%1 tries to inherit itself").arg(arg)); - else { - setLink(node, Node::InheritsLink, arg); - if (node->subType() == Node::QmlClass) { - QmlClassNode::addInheritedBy(arg,node); - } + else if (node->subType() == Node::QmlClass) { + QmlClassNode *qmlClass = static_cast(node); + qmlClass->setQmlBaseName(arg); + QmlClassNode::addInheritedBy(arg,node); } } else if (command == COMMAND_QMLINSTANTIATES) { diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index 43d3a8071d..22694dd0d3 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -4198,7 +4198,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker* { if (!qcn) return; - const DocNode* base = qcn->qmlBase(); + const DocNode* base = qcn->qmlBaseNode(); if (base) { writeStartTag(DT_qmlInherits); //writeStartTag(DT_qmlTypeDef); diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 8052558dc6..8718161703 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -3869,7 +3869,7 @@ void HtmlGenerator::generateQmlInherits(const QmlClassNode* qcn, CodeMarker* mar { if (!qcn) return; - const DocNode* base = qcn->qmlBase(); + const DocNode* base = qcn->qmlBaseNode(); if (base) { Text text; text << Atom::ParaLeft << "Inherits "; diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index 0fb9ccc97f..5fbdb487db 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -2097,7 +2097,7 @@ QmlClassNode::QmlClassNode(InnerNode *parent, const QString& name) abstract_(false), cnodeRequired_(false), cnode_(0), - base_(0) + baseNode_(0) { int i = 0; if (name.startsWith("QML:")) { diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h index 11c08fb659..ecb3c5771e 100644 --- a/src/tools/qdoc/node.h +++ b/src/tools/qdoc/node.h @@ -131,8 +131,7 @@ public: NextLink, PreviousLink, ContentsLink, - IndexLink, - InheritsLink /*, + IndexLink /*, GlossaryLink, CopyrightLink, ChapterLink, @@ -546,8 +545,10 @@ public: virtual void setAbstract(bool b) { abstract_ = b; } const ImportList& importList() const { return importList_; } void setImportList(const ImportList& il) { importList_ = il; } - const DocNode* qmlBase() const { return base_; } - void setQmlBase(DocNode* b) { base_ = b; } + const QString& qmlBaseName() const { return baseName_; } + void setQmlBaseName(const QString& name) { baseName_ = name; } + const DocNode* qmlBaseNode() const { return baseNode_; } + void setQmlBaseNode(DocNode* b) { baseNode_ = b; } void requireCppClass() { cnodeRequired_ = true; } bool cppClassRequired() const { return cnodeRequired_; } static void addInheritedBy(const QString& base, Node* sub); @@ -562,7 +563,8 @@ private: bool abstract_; bool cnodeRequired_; ClassNode* cnode_; - DocNode* base_; + QString baseName_; + DocNode* baseNode_; ImportList importList_; }; diff --git a/src/tools/qdoc/qdocdatabase.cpp b/src/tools/qdoc/qdocdatabase.cpp index 982df5bbc3..4208d529c8 100644 --- a/src/tools/qdoc/qdocdatabase.cpp +++ b/src/tools/qdoc/qdocdatabase.cpp @@ -623,6 +623,7 @@ const NodeMultiMap& QDocDatabase::getSinceMap(const QString& key) const to generating documentation. */ void QDocDatabase::resolveIssues() { + resolveQmlInheritance(treeRoot()); resolveTargets(treeRoot()); tree_->resolveCppToQmlLinks(); } @@ -821,6 +822,35 @@ QString QDocDatabase::findTarget(const QString& target, const Node* node) const return QString(); } +/*! + For each QML Type node in the tree beginning at \a root, + if it has a QML base type name but its QML base type node + pointer is 0, use the QML base type name to look up the + base type node. If the node is found in the tree, set the + node's QML base type node pointer. + */ +void QDocDatabase::resolveQmlInheritance(InnerNode* root) +{ + // Dop we need recursion? + foreach (Node* child, root->childNodes()) { + if (child->type() == Node::Document && child->subType() == Node::QmlClass) { + QmlClassNode* qcn = static_cast(child); + if ((qcn->qmlBaseNode() == 0) && !qcn->qmlBaseName().isEmpty()) { + QmlClassNode* bqcn = findQmlType(QString(), qcn->qmlBaseName()); + if (bqcn) { + qcn->setQmlBaseNode(bqcn); + } +#if 0 + else { + qDebug() << "Unable to resolve QML base type:" << qcn->qmlBaseName() + << "for QML type:" << qcn->name(); + } +#endif + } + } + } +} + /*! */ void QDocDatabase::resolveTargets(InnerNode* root) diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h index 857fd301bb..9c6810941d 100644 --- a/src/tools/qdoc/qdocdatabase.h +++ b/src/tools/qdoc/qdocdatabase.h @@ -140,6 +140,7 @@ class QDocDatabase Tree* tree() { return tree_; } NamespaceNode* treeRoot() { return tree_->root(); } void resolveInheritance() { tree_->resolveInheritance(); } + void resolveQmlInheritance(InnerNode* root); void resolveIssues(); void fixInheritance() { tree_->fixInheritance(); } void resolveProperties() { tree_->resolveProperties(); } diff --git a/src/tools/qdoc/qmlvisitor.cpp b/src/tools/qdoc/qmlvisitor.cpp index 9dc15d56f1..15af03d9ba 100644 --- a/src/tools/qdoc/qmlvisitor.cpp +++ b/src/tools/qdoc/qmlvisitor.cpp @@ -106,7 +106,7 @@ QmlDocVisitor::~QmlDocVisitor() } /*! - Returns the location of thre nearest comment above the \a offset. + Returns the location of the nearest comment above the \a offset. */ QQmlJS::AST::SourceLocation QmlDocVisitor::precedingComment(quint32 offset) const { @@ -322,11 +322,10 @@ void QmlDocVisitor::applyMetacommands(QQmlJS::AST::SourceLocation, else if (command == COMMAND_QMLINHERITS) { if (node->name() == args[0].first) doc.location().warning(tr("%1 tries to inherit itself").arg(args[0].first)); - else { - CodeParser::setLink(node, Node::InheritsLink, args[0].first); - if (node->subType() == Node::QmlClass) { - QmlClassNode::addInheritedBy(args[0].first,node); - } + else if (node->subType() == Node::QmlClass) { + QmlClassNode *qmlClass = static_cast(node); + qmlClass->setQmlBaseName(args[0].first); + QmlClassNode::addInheritedBy(args[0].first,node); } } else if (command == COMMAND_QMLDEFAULT) { @@ -389,11 +388,9 @@ bool QmlDocVisitor::visit(QQmlJS::AST::UiObjectDefinition *definition) QmlClassNode *component = new QmlClassNode(current, name); component->setTitle(name); component->setImportList(importList); - if (applyDocumentation(definition->firstSourceLocation(), component)) { QmlClassNode::addInheritedBy(type, component); - if (!component->links().contains(Node::InheritsLink)) - component->setLink(Node::InheritsLink, type, type); + component->setQmlBaseName(type); } current = component; } diff --git a/src/tools/qdoc/tree.cpp b/src/tools/qdoc/tree.cpp index ea1d2a92e2..1efab11a92 100644 --- a/src/tools/qdoc/tree.cpp +++ b/src/tools/qdoc/tree.cpp @@ -399,10 +399,12 @@ void Tree::addPropertyFunction(PropertyNode* property, /*! This function resolves inheritance and reimplementation settings - for each class node found in the namspace beginning ar \a rootNode. + for each C++ class node found in the namspace beginning at \a rootNode. If it finds another namespace node in the child list of \a rootNode, it calls itself recursively. For each child of \a rootNode that is a class node, it calls the other resolveInheritance() function. + + This function does not resolve QML inheritance. */ void Tree::resolveInheritance(NamespaceNode* rootNode) { -- cgit v1.2.3 From 93b155a8508d5a47e8cd8628940f93fc6335c24c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 12 Feb 2013 10:04:06 +0100 Subject: fix check for Windows CE platform We don't have to do fuzzy mkspec name searches anymore. The WinCE mkspecs add "wince" to QMAKE_PLATFORM which ends up in CONFIG. Change-Id: I6c0576b5504beb416e95eeae0dec579b16b84746 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msvc_nmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 5a077874d4..263988cd30 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -79,7 +79,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) #endif if (!project->isHostBuild()) { const ProValueMap &variables = project->variables(); - if (variables["QMAKESPEC"].first().contains("wince", Qt::CaseInsensitive)) { + if (project->isActiveConfig("wince")) { CeSdkHandler sdkhandler; sdkhandler.parse(); const QString sdkName = variables["CE_SDK"].join(' ') -- cgit v1.2.3 From 7f95a57844b58ffb0b5d219c23910da0530cc7cd Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:03:35 +0100 Subject: produce shorter/nicer source paths Change-Id: Ia71410fdc6ee30192239e9c9efa716cfa811c13e Reviewed-by: Joerg Bornemann --- src/angle/src/config.pri | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 4e52358205..fd9fe4cfff 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -3,7 +3,7 @@ ANGLE_DIR = $$(ANGLE_DIR) isEmpty(ANGLE_DIR) { - ANGLE_DIR = $$PWD/../../3rdparty/angle + ANGLE_DIR = $$absolute_path(../../3rdparty/angle) } else { !build_pass:message("Using external ANGLE from $$ANGLE_DIR") } @@ -13,7 +13,7 @@ isEmpty(ANGLE_DIR) { } win32 { - GNUTOOLS_DIR=$$PWD/../../../../gnuwin32/bin + GNUTOOLS_DIR = $$absolute_path(../../../../gnuwin32/bin) exists($$GNUTOOLS_DIR/gperf.exe) { # Escape closing parens when expanding the variable, otherwise cmd confuses itself. GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)" -- cgit v1.2.3 From 707f0a20b40ff68acb9b7ac6ec329860839ce429 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:06:06 +0100 Subject: remove abuse of eval() Change-Id: I8fdba2998f9e4d03c37235c377b5db0aadc27608 Reviewed-by: Joerg Bornemann --- src/angle/src/config.pri | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index fd9fe4cfff..42764f921f 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -24,8 +24,8 @@ defineReplace(addGnuPath) { unset(gnuPath) gnuPath = $$1 !isEmpty(gnuPath):!isEmpty(GNUTOOLS) { - eval(gnuPath = $${GNUTOOLS} && $$gnuPath) - silent: eval(gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$val_escape($$gnuPath)) + gnuPath = $${GNUTOOLS} && $$gnuPath + silent: gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$gnuPath } return($$gnuPath) } -- cgit v1.2.3 From e3554d72745d9c439b1792c20be09871506afeef Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:11:20 +0100 Subject: remove useless unset()s there is mightily little point in unsetting variables right before unconditionally assigning to them. Change-Id: I24c1814ce38bf9aab4496679b1a670f3cd55c536 Reviewed-by: Joerg Bornemann --- mkspecs/features/exclusive_builds.prf | 8 -------- mkspecs/features/qt_functions.prf | 1 - src/angle/src/config.pri | 1 - 3 files changed, 10 deletions(-) diff --git a/mkspecs/features/exclusive_builds.prf b/mkspecs/features/exclusive_builds.prf index 8898c96a43..0e0da05c70 100644 --- a/mkspecs/features/exclusive_builds.prf +++ b/mkspecs/features/exclusive_builds.prf @@ -1,9 +1,6 @@ # fixExclusiveOutputDirs(1config, 2config) # Change all output paths that references 2config to have the string 1config in them defineTest(fixExclusiveOutputDirs) { - unset(firstBuild) - unset(secondBuild) - unset(appendFirstBuild) firstBuild = $$1 secondBuild = $$2 count(ARGS, 2, greaterThan):isEqual($$list($$lower($$3)), false):appendFirstBuild = false @@ -29,11 +26,6 @@ defineTest(fixExclusiveOutputDirs) { # addExclusiveBuilds(1config, 1name, 2config, 2name) # Adds two BUILDS which are exclusive to each other. defineTest(addExclusiveBuilds) { - unset(firstBuild) - unset(firstBuildName) - unset(secondBuild) - unset(secondBuildName) - firstBuild = $$1 firstBuildName = $$2 secondBuild = $$3 diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index aaf7a4710e..b6e3454f0e 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -9,7 +9,6 @@ defineReplace(qtPlatformTargetSuffix) { } defineReplace(qtLibraryTarget) { - unset(LIBRARY_NAME) LIBRARY_NAME = $$1 mac:!static:contains(QT_CONFIG, qt_framework) { QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 42764f921f..63792b9899 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -21,7 +21,6 @@ win32 { } defineReplace(addGnuPath) { - unset(gnuPath) gnuPath = $$1 !isEmpty(gnuPath):!isEmpty(GNUTOOLS) { gnuPath = $${GNUTOOLS} && $$gnuPath -- cgit v1.2.3 From 8204e3f04534328e554c092758717aa4e0cc073e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:05:00 +0100 Subject: fix angle build under msys use library function which deals with shell specifics to set up PATH Task-number: QTBUG-29427 Change-Id: Ic2bed4d7f0eb072bcce6a9f99be02d3cd08a7c98 Reviewed-by: Joerg Bornemann --- src/angle/src/config.pri | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 63792b9899..f8b877d056 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -13,17 +13,17 @@ isEmpty(ANGLE_DIR) { } win32 { - GNUTOOLS_DIR = $$absolute_path(../../../../gnuwin32/bin) - exists($$GNUTOOLS_DIR/gperf.exe) { - # Escape closing parens when expanding the variable, otherwise cmd confuses itself. - GNUTOOLS = "(set PATH=$$replace(GNUTOOLS_DIR, [/\\\\], $${QMAKE_DIR_SEP});%PATH:)=^)%)" + gnutools.value = $$absolute_path(../../../../gnuwin32/bin) + exists($$gnutools.value/gperf.exe) { + gnutools.name = PATH + gnutools.CONFIG = prepend } } defineReplace(addGnuPath) { gnuPath = $$1 - !isEmpty(gnuPath):!isEmpty(GNUTOOLS) { - gnuPath = $${GNUTOOLS} && $$gnuPath + !isEmpty(gnuPath):!isEmpty(gnutools.name) { + qtAddToolEnv(gnuPath, gnutools) silent: gnuPath = @echo generating sources from ${QMAKE_FILE_IN} && $$gnuPath } return($$gnuPath) -- cgit v1.2.3 From d061cfde880339c973fb26c3e6ce18ee74049606 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 8 Feb 2013 20:39:23 +0100 Subject: fix platform conditional for using our gnuwin tools it's pointless to test the target platform - it's always windows. but it may make sense to test the host platform (not sure whether it's possible to x-build angle). Change-Id: I57847c930d6108a24a1005aa44f94ba0b4f9dfec Reviewed-by: Joerg Bornemann --- src/angle/src/config.pri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index f8b877d056..73fbc2e13b 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -12,7 +12,7 @@ isEmpty(ANGLE_DIR) { error("$$ANGLE_DIR does not contain ANGLE") } -win32 { +equals(QMAKE_HOST.os, Windows) { gnutools.value = $$absolute_path(../../../../gnuwin32/bin) exists($$gnutools.value/gperf.exe) { gnutools.name = PATH -- cgit v1.2.3 From 44f6dcf054cc8755b29060d366d57a016d6b85cc Mon Sep 17 00:00:00 2001 From: Christoph Schleifenbaum Date: Thu, 7 Feb 2013 13:07:31 +0100 Subject: Mac: Fix transient scroll bar appearance. Transient scroll bars should never be used outside of scroll areas, since they would be unusable. Task-Number: QTBUG-29389 Change-Id: Ie52d2093a4ab66085300a19ca9a1b32f13a29e79 Reviewed-by: J-P Nurmi --- src/widgets/styles/qmacstyle_mac.mm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 4bdd0a9bcb..bb9230804c 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -2707,15 +2707,15 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w ret = false; break; case SH_ScrollBar_Transient: - if (!qobject_cast(w)) { - ret = false; - break; - } - ret = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7; + if ((qobject_cast(w) && w->parent() && + qobject_cast(w->parent()->parent())) || + (opt && QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ScrollBar))) { + ret = QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7; #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) - ret &= [NSScroller preferredScrollerStyle] == NSScrollerStyleOverlay; + if (ret) + ret = [NSScroller preferredScrollerStyle] == NSScrollerStyleOverlay; #endif + } break; default: ret = QCommonStyle::styleHint(sh, opt, w, hret); -- cgit v1.2.3 From 0fb979fe23209a0588b9128bb4190d1a3d8c3c29 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 12 Feb 2013 20:49:37 +0100 Subject: Remove QPointerBase bic check. QPointerBase is not public or exported and it is to be removed in Qt 5.1. Change-Id: I060c6b2ebcde8dedde85dc21404fc393150d452c Reviewed-by: Thiago Macieira Reviewed-by: Olivier Goffart --- tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt | 5 ----- tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt | 5 ----- tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt | 5 ----- 22 files changed, 110 deletions(-) diff --git a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt index 1e50448b10..945b757898 100644 --- a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-amd64.txt @@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f4f93c4fa90) 0 QObject (0x7f4f93e37f60) 0 primary-for QObjectCleanupHandler (0x7f4f93c4fa90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f4f93c62060) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt index b18f1c933c..dcf2570753 100644 --- a/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtConcurrent.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45852d0) 0 QObject (0xb4452038) 0 primary-for QObjectCleanupHandler (0xb45852d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4452578) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt index 7308f3c082..bb689d46ea 100644 --- a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f392077aa90) 0 QObject (0x7f3920962f60) 0 primary-for QObjectCleanupHandler (0x7f392077aa90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f392078d060) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt index 469e52f1fb..00f8ca14c1 100644 --- a/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtCore.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45942d0) 0 QObject (0xb4461038) 0 primary-for QObjectCleanupHandler (0xb45942d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4461578) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt index 8bca40b218..275271594b 100644 --- a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fbaa1e96a90) 0 QObject (0x7fbaa1ea7000) 0 primary-for QObjectCleanupHandler (0x7fbaa1e96a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7fbaa1ea70c0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt index 8e9b2acdc5..8c509033ad 100644 --- a/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtDBus.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb452e2d0) 0 QObject (0xb43fc038) 0 primary-for QObjectCleanupHandler (0xb452e2d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb43fc578) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt index 1b57180796..875b25ffc5 100644 --- a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f7180f27a90) 0 QObject (0x7f7180e6d480) 0 primary-for QObjectCleanupHandler (0x7f7180f27a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f7180e6d540) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt index 0b344d7411..cb310963bd 100644 --- a/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtGui.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42044ec) 0 QObject (0xb41bb348) 0 primary-for QObjectCleanupHandler (0xb42044ec) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb41bb888) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt index 540ce9196b..4bfa81650a 100644 --- a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fb654a90a90) 0 QObject (0x7fb654c78f60) 0 primary-for QObjectCleanupHandler (0x7fb654a90a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7fb654aa3060) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt index db3eab60c1..313f83968c 100644 --- a/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtNetwork.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb434b2d0) 0 QObject (0xb4418070) 0 primary-for QObjectCleanupHandler (0xb434b2d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb44185b0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt index 2d7d1aa224..0f51bab46e 100644 --- a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f04b9c1da90) 0 QObject (0x7f04b9b0e900) 0 primary-for QObjectCleanupHandler (0x7f04b9c1da90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f04b9b0e9c0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt index 71154e9150..78509e24cc 100644 --- a/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtOpenGL.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb4463c30) 0 QObject (0xb4070508) 0 primary-for QObjectCleanupHandler (0xb4463c30) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4070a48) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt index 902bffaa02..bcdbbaf895 100644 --- a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-amd64.txt @@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f0bd6b6ba90) 0 QObject (0x7f0bd6aac4e0) 0 primary-for QObjectCleanupHandler (0x7f0bd6b6ba90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f0bd6aac5a0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt index 4aba60c3b6..19cbef7918 100644 --- a/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtPrintSupport.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb426f5dc) 0 QObject (0xb4063508) 0 primary-for QObjectCleanupHandler (0xb426f5dc) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4063a48) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt index 859f5621bc..6b1b8b3e72 100644 --- a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f5e7bb99a90) 0 QObject (0x7f5e7bd82f60) 0 primary-for QObjectCleanupHandler (0x7f5e7bb99a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f5e7bbad060) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt index ca049cfb11..f3e4d84ee1 100644 --- a/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtSql.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb45532d0) 0 QObject (0xb4422038) 0 primary-for QObjectCleanupHandler (0xb45532d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4422578) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt index 6c78fab45b..cda6ea5ec6 100644 --- a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7fdcea1e6a90) 0 QObject (0x7fdcea1e2120) 0 primary-for QObjectCleanupHandler (0x7fdcea1e6a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7fdcea1e21e0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt index aa7b491552..6583d33b0f 100644 --- a/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtTest.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb44aa348) 0 QObject (0xb441f0a8) 0 primary-for QObjectCleanupHandler (0xb44aa348) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb441f5e8) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt index 30e5f7a2d7..25e4d7d84e 100644 --- a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-amd64.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0x7f8720705a90) 0 QObject (0x7f87206474e0) 0 primary-for QObjectCleanupHandler (0x7f8720705a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f87206475a0) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt index 5768949810..64234d8c58 100644 --- a/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtWidgets.5.0.0.linux-gcc-ia32.txt @@ -2407,11 +2407,6 @@ QObjectCleanupHandler (0xb42315dc) 0 QObject (0xb4025508) 0 primary-for QObjectCleanupHandler (0xb42315dc) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb4025a48) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt index 10e33c0c0e..3658e535b9 100644 --- a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt +++ b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-amd64.txt @@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0x7f6638185a90) 0 QObject (0x7f663836ef60) 0 primary-for QObjectCleanupHandler (0x7f6638185a90) -Class QPointerBase - size=16 align=8 - base size=16 base align=8 -QPointerBase (0x7f663819a060) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 diff --git a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt index 62f4df364a..5d75609cf5 100644 --- a/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt +++ b/tests/auto/bic/data/QtXml.5.0.0.linux-gcc-ia32.txt @@ -2412,11 +2412,6 @@ QObjectCleanupHandler (0xb457e2d0) 0 QObject (0xb444d038) 0 primary-for QObjectCleanupHandler (0xb457e2d0) -Class QPointerBase - size=8 align=4 - base size=8 base align=4 -QPointerBase (0xb444d578) 0 - Class QSharedMemory::QPrivateSignal size=1 align=1 base size=0 base align=1 -- cgit v1.2.3 From b5119f9d4ebc5da542cce68244788b6f5c696beb Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 13 Feb 2013 14:51:10 +0100 Subject: Move TR_EXCLUDE to qdoc.pro. It does not have any effect in a SUBDIRS-type .pro-file. Fixes 42a6d405e464944bd48a5ebdd6ed9f0b7feb3b1d . Change-Id: If2eafacecfd69b916861bf4b0afddb62628d720f Reviewed-by: Oswald Buddenhagen --- src/tools/qdoc/qdoc.pro | 2 ++ src/tools/tools.pro | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro index 9729a758f0..9df79ec718 100644 --- a/src/tools/qdoc/qdoc.pro +++ b/src/tools/qdoc/qdoc.pro @@ -91,3 +91,5 @@ qtPrepareTool(QHELPGENERATOR, qhelpgenerator) QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf load(qt_tool) + +TR_EXCLUDE += $$PWD/* diff --git a/src/tools/tools.pro b/src/tools/tools.pro index c3a9ea228e..fa9ed54c50 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -41,5 +41,3 @@ SUBDIRS = $$TOOLS_SUBDIRS bootstrap_prepare_docs.depends += $${src_tools_qdoc.target}-make_first bootstrap_prepare_docs.target = $${src_tools_bootstrap.target}-prepare_docs QMAKE_EXTRA_TARGETS += bootstrap_prepare_docs - -TR_EXCLUDE += $$PWD/* -- cgit v1.2.3 From fa167d2afad4c2ff8b7e9412091ffc7e1ffb3458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Mon, 4 Feb 2013 15:53:10 +0100 Subject: Check for GLX_ARB_create_context_profile before specifying a profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idc4982c039f8a6a304d9ce5ce6736d518fb0ef00 Reviewed-by: Samuel Rødal --- src/plugins/platforms/xcb/qglxintegration.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index 23bec15b48..b7f0b14c70 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -285,6 +285,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); QList glxExt = QByteArray(glXQueryExtensionsString(DISPLAY_FROM_XCB(m_screen), m_screen->screenNumber())).split(' '); + bool supportsProfiles = glxExt.contains("GLX_ARB_create_context_profile"); // Use glXCreateContextAttribsARB if is available if (glxExt.contains("GLX_ARB_create_context") && glXCreateContextAttribsARB != 0) { @@ -304,7 +305,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat << GLX_CONTEXT_MINOR_VERSION_ARB << minorVersion; // If asking for OpenGL 3.2 or newer we should also specify a profile - if (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1)) { + if (supportsProfiles && (m_format.majorVersion() > 3 || (m_format.majorVersion() == 3 && m_format.minorVersion() > 1))) { if (m_format.profile() == QSurfaceFormat::CoreProfile) contextAttributes << GLX_CONTEXT_PROFILE_MASK_ARB << GLX_CONTEXT_CORE_PROFILE_BIT_ARB; else -- cgit v1.2.3 From 15177905ff12d9b7bbb81fd34e355c494415edc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 6 Feb 2013 16:47:40 +0100 Subject: Fix the GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I83dc92085c81b8b0c71502ea71878b5e85cbbacc Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 2 +- src/plugins/platforms/xcb/qglxintegration.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 0ef9f931c2..544f5e2c8c 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -704,7 +704,7 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current() // v3 onwards GLint value = 0; glGetIntegerv(GL_CONTEXT_FLAGS, &value); - if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) + if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) result.options |= QSurfaceFormat::DeprecatedFunctions; if (value & WGL_CONTEXT_DEBUG_BIT_ARB) result.options |= QSurfaceFormat::DebugContext; diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index b7f0b14c70..d4998432d9 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -179,7 +179,7 @@ static void updateFormatFromContext(QSurfaceFormat &format) // a debug context GLint value = 0; glGetIntegerv(GL_CONTEXT_FLAGS, &value); - if (value & ~GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) + if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) format.setOption(QSurfaceFormat::DeprecatedFunctions); if (value & GLX_CONTEXT_DEBUG_BIT_ARB) format.setOption(QSurfaceFormat::DebugContext); -- cgit v1.2.3 From 566d28316dd73bfe4a8ea34839989ee9df7e3895 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 13 Feb 2013 12:37:04 +0100 Subject: remove automatic splitting from $$() expansions $$(FOO) would automatically split the contents of the environment variable at whitespace (and interpret quoting inside it). the way to prevent the splitting (but not the quote interpretation) would be using "$$(FOO)". this behavior is entirely unexpected and thus an incredibly effective source of quoting problems - according to a grep over the whole qt sources, there isn't a single case where things were done right. in qt creator, well over half the cases are wrong. also, the "feature" seems entirely pointless: nobody uses spaces as separators in environment variables. consequently, simply remove it, even in a patch release. i'm postulating that nobody will complain. Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6 Reviewed-by: Joerg Bornemann --- dist/changes-5.0.2 | 6 ++++++ qmake/library/qmakeevaluator.cpp | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dist/changes-5.0.2 b/dist/changes-5.0.2 index b97e71ae03..5e170a35be 100644 --- a/dist/changes-5.0.2 +++ b/dist/changes-5.0.2 @@ -107,6 +107,12 @@ Qt for Windows CE * Tools * **************************************************************************** +qmake +----- + + - $$(VAR) style environment variable expansions will not split on + whitespace any more. Use $$split() if necessary. + **************************************************************************** * Plugins * diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp index ac08acee99..8b6a0f8598 100644 --- a/qmake/library/qmakeevaluator.cpp +++ b/qmake/library/qmakeevaluator.cpp @@ -453,9 +453,9 @@ void QMakeEvaluator::evaluateExpression( break; } case TokEnvVar: { const ProString &var = getStr(tokPtr); - const ProStringList &val = split_value_list(m_option->getEnv(var.toQString(m_tmp1))); - debugMsg(2, "env var %s => %s", dbgStr(var), dbgStrList(val)); - addStrList(val, tok, ret, pending, joined); + const ProString &val = ProString(m_option->getEnv(var.toQString(m_tmp1))); + debugMsg(2, "env var %s => %s", dbgStr(var), dbgStr(val)); + addStr(val, ret, pending, joined); break; } case TokFuncName: { const ProKey &func = getHashStr(tokPtr); -- cgit v1.2.3 From 2ed081a88bce69a40dacf4c32fa0b3565da97f16 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 25 Jan 2013 17:02:44 +0100 Subject: fix & simplify quoting $$quote() doesn't do what you think, unless you did RTFM. and it's usually just as unnecessary as double quotes, depending on context. Change-Id: Iaeadaa75b0650aad383a6e6031b822c04b537fb1 Reviewed-by: Joerg Bornemann --- src/angle/src/common/common.pri | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/angle/src/common/common.pri b/src/angle/src/common/common.pri index 8806c03c95..c7d2a2d5ae 100644 --- a/src/angle/src/common/common.pri +++ b/src/angle/src/common/common.pri @@ -15,17 +15,17 @@ win32-msvc2012 { error("Cannot determine DirectX SDK location. Please set DXSDK_DIR environment variable.") } - DXINC_DIR = $$quote($${DX_DIR}Include) + DXINC_DIR = $${DX_DIR}Include contains(QT_ARCH, x86_64) { - DXLIB_DIR = $$quote($${DX_DIR}Lib\\x64) + DXLIB_DIR = $${DX_DIR}Lib\\x64 } else { - DXLIB_DIR = $$quote($${DX_DIR}Lib\\x86) + DXLIB_DIR = $${DX_DIR}Lib\\x86 } equals(QMAKE_TARGET.arch, x86_64) { - FXC = "\"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\"" + FXC = \"$${DX_DIR}Utilities\\bin\\x64\\fxc.exe\" } else { - FXC = "\"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\"" + FXC = \"$${DX_DIR}Utilities\\bin\\x86\\fxc.exe\" } msvc { @@ -36,7 +36,7 @@ win32-msvc2012 { # Similarly we want the MinGW linker to use the import libraries shipped with the compiler # instead of those from the SDK which cause a crash on startup. - LIBS += -L$$DXLIB_DIR + LIBS += -L\"$$DXLIB_DIR\" } } -- cgit v1.2.3 From 69701cb8c4645b4e336abfb609b1756070b8e179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 6 Feb 2013 16:53:12 +0100 Subject: Fix the GL_CONTEXT_PROFILE_MASK check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A bit mask can have more than one bit set, so we can't use a switch statement here. Also use the correct enums, and make sure that the profile is set to QSurfaceFormat::NoProfile when the OpenGL version is less than 3.2. Change-Id: I6d2c4e35d4fb3d87fd47c9724cb415f8619a7b95 Reviewed-by: Sean Harmer Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 13 +++---------- src/plugins/platforms/xcb/qglxintegration.cpp | 14 +++++--------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 544f5e2c8c..3cf2113f63 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -696,8 +696,8 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current() result.version = (version.mid(0, majorDot).toInt() << 8) + version.mid(majorDot + 1, minorDot - majorDot - 1).toInt(); } + result.profile = QSurfaceFormat::NoProfile; if (result.version < 0x0300) { - result.profile = QSurfaceFormat::NoProfile; result.options |= QSurfaceFormat::DeprecatedFunctions; return result; } @@ -713,17 +713,10 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current() // v3.2 onwards: Profiles value = 0; glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value); - switch (value) { - case WGL_CONTEXT_CORE_PROFILE_BIT_ARB: + if (value & GL_CONTEXT_CORE_PROFILE_BIT) result.profile = QSurfaceFormat::CoreProfile; - break; - case WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: + else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) result.profile = QSurfaceFormat::CompatibilityProfile; - break; - default: - result.profile = QSurfaceFormat::NoProfile; - break; - } return result; } diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index d4998432d9..015c51572f 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -168,6 +168,8 @@ static void updateFormatFromContext(QSurfaceFormat &format) format.setMinorVersion(minor); } + format.setProfile(QSurfaceFormat::NoProfile); + const int version = (major << 8) + minor; if (version < 0x0300) { format.setProfile(QSurfaceFormat::NoProfile); @@ -189,17 +191,11 @@ static void updateFormatFromContext(QSurfaceFormat &format) // Version 3.2 and newer have a profile value = 0; glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &value); - switch (value) { - case GLX_CONTEXT_CORE_PROFILE_BIT_ARB: + + if (value & GL_CONTEXT_CORE_PROFILE_BIT) format.setProfile(QSurfaceFormat::CoreProfile); - break; - case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: + else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) format.setProfile(QSurfaceFormat::CompatibilityProfile); - break; - default: - format.setProfile(QSurfaceFormat::NoProfile); - break; - } } /*! -- cgit v1.2.3 From e432d538833c87a15bf56ad4ec266f4d69aae90f Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Tue, 12 Feb 2013 14:01:43 +0100 Subject: Only compile SSL tests when openssl is available. Change-Id: I79fc705f30fb84e86bd7d674d90fbbe2d1a124ba Reviewed-by: Richard J. Moore --- tests/auto/network/ssl/ssl.pro | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/auto/network/ssl/ssl.pro b/tests/auto/network/ssl/ssl.pro index 294caeba5a..06f4a05241 100644 --- a/tests/auto/network/ssl/ssl.pro +++ b/tests/auto/network/ssl/ssl.pro @@ -4,11 +4,11 @@ SUBDIRS=\ qsslcipher \ qsslerror \ qsslkey \ - qsslsocket \ - qsslsocket_onDemandCertificates_member \ - qsslsocket_onDemandCertificates_static \ -!contains(QT_CONFIG, private_tests): SUBDIRS -= \ - qsslsocket \ - qsslsocket_onDemandCertificates_member \ - qsslsocket_onDemandCertificates_static \ +contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked): + contains(QT_CONFIG, private_tests) { + SUBDIRS += \ + qsslsocket \ + qsslsocket_onDemandCertificates_member \ + qsslsocket_onDemandCertificates_static \ + } -- cgit v1.2.3 From 7ac58d1ff0815566ba1de09519299b5119e5ee91 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 11 Feb 2013 13:59:34 +0100 Subject: Make cmake packages installed to /usr non-relocatable. This is for dealing with fallout from the UsrMove: http://fedoraproject.org/wiki/Features/UsrMove http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5327 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5868/focus=5907 Change-Id: I6380e3bad17a016a8252b615ce962e3008a5d809 Reviewed-by: Brad King Reviewed-by: Stephen Kelly --- mkspecs/features/create_cmake.prf | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index a06f268769..43dca4cd70 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -36,14 +36,24 @@ CMAKE_MODULE_DEPS = $$cmakeModuleList($$sort_depends(QT.$${MODULE}.depends, QT.) CMAKE_PARTIAL_MODULE_DEPS = $$replace(CMAKE_MODULE_DEPS, ";", ";Qt5::") !isEmpty(CMAKE_PARTIAL_MODULE_DEPS):CMAKE_QT5_MODULE_DEPS = "Qt5::$${CMAKE_PARTIAL_MODULE_DEPS}" +# Several distros (ArchLinux, Fedora) have in the past installed libraries +# in /lib(64)?, but are now moving to install libraries in /usr/lib(64)?/. +# The /lib paths are made symlinks to the /usr/lib paths. If someone searching +# for a Qt 5 package finds it in /lib/cmake/Qt5Core, although it has been +# installed in /usr/lib/cmake/Qt5Core, relative paths to the includes and +# executables will not work. So, we treat installations to /usr as non-relocatable +# packages with absolute paths. +CMAKE_INSTALL_LIBS_DIR = $$[QT_INSTALL_LIBS] +contains(CMAKE_INSTALL_LIBS_DIR, ^(/usr)?/lib(64)?.*): CMAKE_FORCE_ABSOLUTE_PATHS = True + CMAKE_INCLUDE_DIR = $$cmakeRelativePath($$[QT_INSTALL_HEADERS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_INCLUDE_DIR, "^\\.\\./.*") { CMAKE_INCLUDE_DIR = $$[QT_INSTALL_HEADERS]/ CMAKE_INCLUDE_DIR_IS_ABSOLUTE = True } CMAKE_LIB_DIR = $$cmakeRelativePath($$[QT_INSTALL_LIBS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_LIB_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_LIB_DIR,"^\\.\\./.*") { CMAKE_LIB_DIR = $$[QT_INSTALL_LIBS]/ CMAKE_LIB_DIR_IS_ABSOLUTE = True } else { @@ -54,13 +64,13 @@ contains(CMAKE_LIB_DIR, "^\\.\\./.*") { } CMAKE_BIN_DIR = $$cmakeRelativePath($$[QT_HOST_BINS], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_BIN_DIR, "^\\.\\./.*") { +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_BIN_DIR, "^\\.\\./.*") { CMAKE_BIN_DIR = $$[QT_HOST_BINS]/ CMAKE_BIN_DIR_IS_ABSOLUTE = True } CMAKE_ARCHDATA_DIR = $$cmakeRelativePath($$[QT_INSTALL_ARCHDATA], $$[QT_INSTALL_PREFIX]) -contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs +!isEmpty(CMAKE_FORCE_ABSOLUTE_PATHS)|contains(CMAKE_ARCHDATA_DIR, "^\\.\\./.*") { # For the mkspecs CMAKE_ARCHDATA_DIR = $$[QT_INSTALL_ARCHDATA]/ CMAKE_ARCHDATA_DIR_IS_ABSOLUTE = True } -- cgit v1.2.3 From ff86f6ba4c730941e13e45c670828bb07d92c380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 12 Feb 2013 15:20:27 +0100 Subject: Fixed QOpenGLFramebufferObject docs to mention QOpenGLPaintDevice. Task-number: QTBUG-29496 Change-Id: Id9ec5e2a070992f53bba58468e2472513d52cb8b Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 34 +++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 8e92ab5d58..2a9caac030 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -686,24 +686,23 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen \ingroup painting-3D The QOpenGLFramebufferObject class encapsulates an OpenGL framebuffer - object, defined by the \c{GL_EXT_framebuffer_object} extension. In - addition it provides a rendering surface that can be painted on - with a QPainter, rendered to using native OpenGL calls, or both. This - surface can be bound and used as a regular texture in your own OpenGL - drawing code. By default, the QOpenGLFramebufferObject class - generates a 2D OpenGL texture (using the \c{GL_TEXTURE_2D} target), - which is used as the internal rendering target. + object, defined by the \c{GL_EXT_framebuffer_object} extension. It provides + a rendering surface that can be painted on with a QPainter with the help of + QOpenGLPaintDevice, or rendered to using native OpenGL calls. This surface + can be bound and used as a regular texture in your own OpenGL drawing code. + By default, the QOpenGLFramebufferObject class generates a 2D OpenGL + texture (using the \c{GL_TEXTURE_2D} target), which is used as the internal + rendering target. \b{It is important to have a current OpenGL context when creating a QOpenGLFramebufferObject, otherwise initialization will fail.} - When using a QPainter to paint to a QOpenGLFramebufferObject you should take - care that the QOpenGLFramebufferObject is created with the CombinedDepthStencil - attachment for QPainter to be able to render correctly. - Note that you need to create a QOpenGLFramebufferObject with more than one - sample per pixel for primitives to be antialiased when drawing using a - QPainter. To create a multisample framebuffer object you should use one of - the constructors that take a QOpenGLFramebufferObject parameter, and set the + Create the QOpenGLFrameBufferObject instance with the CombinedDepthStencil + attachment if you want QPainter to render correctly. Note that you need to + create a QOpenGLFramebufferObject with more than one sample per pixel for + primitives to be antialiased when drawing using a QPainter. To create a + multisample framebuffer object you should use one of the constructors that + take a QOpenGLFramebufferObject parameter, and set the QOpenGLFramebufferObject::samples() property to a non-zero value. For multisample framebuffer objects a color render buffer is created, @@ -716,11 +715,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen as a texture, you first need to copy from it to a regular framebuffer object using QOpenGLContext::blitFramebuffer(). - \section1 Threading - - As of Qt 4.8, it's possible to draw into a QOpenGLFramebufferObject - using a QPainter in a separate thread. Note that OpenGL 2.0 or - OpenGL ES 2.0 is required for this to work. + It is possible to draw into a QOpenGLFramebufferObject using QPainter and + QOpenGLPaintDevice in a separate thread. */ -- cgit v1.2.3 From 17e8286fef874630cb2703bd20885c6005bf674a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Feb 2013 08:35:23 +0100 Subject: Fixed mouse double click events not bubbling up to parent widgets. The bug was caused by changes b371f3f943703840d0dfbe30505018bcca06e260 and 3bb902495291c50a2f06e8e03a62a647db3e5cd4, which removed the event forwarding that QWidget::mouseDoubleClickEvent() used to do without making sure to call ignore() on the event like QWidget::mousePressEvent() does. Task-number: QTBUG-29680 Change-Id: I98af8052ad3dd1dea15d07a710aa9212ef5e4a68 Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidget.cpp | 2 +- tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 26 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3b9e889a9c..7209d8c9ad 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -8413,7 +8413,7 @@ void QWidget::mouseReleaseEvent(QMouseEvent *event) void QWidget::mouseDoubleClickEvent(QMouseEvent *event) { - Q_UNUSED(event); + event->ignore(); } #ifndef QT_NO_WHEELEVENT diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index ab1500ee32..c1927c9d1f 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -411,6 +411,7 @@ private slots: void destroyedSignal(); void keyboardModifiers(); + void mouseDoubleClickBubbling_QTBUG29680(); private: bool ensureScreenSize(int width, int height); @@ -10047,5 +10048,30 @@ void tst_QWidget::keyboardModifiers() QCOMPARE(int(w->m_appModifiers), int(Qt::ControlModifier)); } +class DClickWidget : public QWidget +{ +public: + DClickWidget() : triggered(false) {} + void mouseDoubleClickEvent(QMouseEvent *) + { + triggered = true; + } + bool triggered; +}; + +void tst_QWidget::mouseDoubleClickBubbling_QTBUG29680() +{ + DClickWidget parent; + QWidget child(&parent); + parent.resize(200, 200); + child.resize(200, 200); + parent.show(); + QVERIFY(QTest::qWaitForWindowExposed(&parent)); + + QTest::mouseDClick(&child, Qt::LeftButton); + + QTRY_VERIFY(parent.triggered); +} + QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" -- cgit v1.2.3 From 733430636d1a1e0fb49cf0665994f8ec064c8613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Feb 2013 09:02:24 +0100 Subject: Fixed crashes when using QImage in combination with QCoreApplication. As long as fonts weren't used we supported using QImage in combination with QCoreApplication in 4.x, and there's no reason we can't continue doing so. Task-number: QTBUG-29643 Change-Id: I2cf351d3c93f1c175bbf624e45024d39ab913111 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta Reviewed-by: Konstantin Ritt --- src/gui/image/qimage.cpp | 5 ++++- src/gui/text/qfont.cpp | 2 +- tests/auto/gui/image/qimage/tst_qimage.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 975ef54d6b..481cb37c8c 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -4944,7 +4944,10 @@ QPaintEngine *QImage::paintEngine() const if (!d->paintEngine) { QPaintDevice *paintDevice = const_cast(this); - QPaintEngine *paintEngine = QGuiApplicationPrivate::platformIntegration()->createImagePaintEngine(paintDevice); + QPaintEngine *paintEngine = 0; + QPlatformIntegration *platformIntegration = QGuiApplicationPrivate::platformIntegration(); + if (platformIntegration) + paintEngine = platformIntegration->createImagePaintEngine(paintDevice); d->paintEngine = paintEngine ? paintEngine : new QRasterPaintEngine(paintDevice); } diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 72a24a4698..2961cb9493 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -672,7 +672,7 @@ void QFontPrivate::detachButKeepEngineData(QFont *font) \sa QGuiApplication::setFont(), QGuiApplication::font() */ QFont::QFont() - : d(QGuiApplication::font().d.data()), resolve_mask(0) + : d(QGuiApplicationPrivate::instance() ? QGuiApplication::font().d.data() : new QFontPrivate()), resolve_mask(0) { } diff --git a/tests/auto/gui/image/qimage/tst_qimage.cpp b/tests/auto/gui/image/qimage/tst_qimage.cpp index b668f57909..2cd5216c59 100644 --- a/tests/auto/gui/image/qimage/tst_qimage.cpp +++ b/tests/auto/gui/image/qimage/tst_qimage.cpp @@ -2115,5 +2115,5 @@ void tst_QImage::cleanupFunctions() } -QTEST_MAIN(tst_QImage) +QTEST_GUILESS_MAIN(tst_QImage) #include "tst_qimage.moc" -- cgit v1.2.3 From 02a1243dda82a99d8a7ce031245038f9564a6bc0 Mon Sep 17 00:00:00 2001 From: Josh Faust Date: Wed, 6 Feb 2013 15:49:02 -0800 Subject: Fix globalPos() in scrollwheel events on OSX. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The window position was getting passed as both the window and global positions. QTBUG-29543 Change-Id: I24746675e5ba45adbd054742877bd2fe783d6608 Reviewed-by: Richard Moe Gustavsen Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview.mm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index da3e6277c6..1d59592e7d 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -645,9 +645,8 @@ static QTouchDevice *touchDevice = 0; } #endif - - NSPoint windowPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil]; - QPoint qt_windowPoint(windowPoint.x, windowPoint.y); + QPoint qt_windowPoint, qt_screenPoint; + [self convertFromEvent:theEvent toWindowPoint:&qt_windowPoint andScreenPoint:&qt_screenPoint]; NSTimeInterval timestamp = [theEvent timestamp]; ulong qt_timestamp = timestamp * 1000; @@ -665,7 +664,7 @@ static QTouchDevice *touchDevice = 0; currentWheelModifiers = [self convertKeyModifiers:[theEvent modifierFlags]]; } - QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta, currentWheelModifiers); + QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers); if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled) { currentWheelModifiers = Qt::NoModifier; @@ -673,7 +672,7 @@ static QTouchDevice *touchDevice = 0; } else #endif { - QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_windowPoint, pixelDelta, angleDelta, + QWindowSystemInterface::handleWheelEvent(m_window, qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, [self convertKeyModifiers:[theEvent modifierFlags]]); } } -- cgit v1.2.3 From 783ad64b90ce03b4d719b534553430f147dd5010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 14 Feb 2013 09:57:56 +0100 Subject: Fixed error in QGLFramebufferObject and QOpenGLFramebufferObject docs. It's the format class that lets you control the number of samples. Change-Id: Id01f107a15787f33b65429d3c882854f2dc8784e Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglframebufferobject.cpp | 4 ++-- src/opengl/qglframebufferobject.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 2a9caac030..8d6b05d0b4 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -702,8 +702,8 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen create a QOpenGLFramebufferObject with more than one sample per pixel for primitives to be antialiased when drawing using a QPainter. To create a multisample framebuffer object you should use one of the constructors that - take a QOpenGLFramebufferObject parameter, and set the - QOpenGLFramebufferObject::samples() property to a non-zero value. + take a QOpenGLFramebufferObjectFormat parameter, and set the + QOpenGLFramebufferObjectFormat::samples() property to a non-zero value. For multisample framebuffer objects a color render buffer is created, otherwise a texture with the specified texture target is created. diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 9a3e2a80ac..42d1280bb2 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -751,8 +751,8 @@ void QGLFramebufferObjectPrivate::init(QGLFramebufferObject *q, const QSize &sz, Note that you need to create a QGLFramebufferObject with more than one sample per pixel for primitives to be antialiased when drawing using a QPainter. To create a multisample framebuffer object you should use one of - the constructors that take a QGLFramebufferObject parameter, and set the - QGLFramebufferObject::samples() property to a non-zero value. + the constructors that take a QGLFramebufferObjectFormat parameter, and set + the QGLFramebufferObjectFormat::samples() property to a non-zero value. When painting to a QGLFramebufferObject using QPainter, the state of the current GL context will be altered by the paint engine to reflect -- cgit v1.2.3 From e2b9dab539b9cb55763c28bf343269d18fe8e385 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 11 Feb 2013 10:34:39 +0100 Subject: move qFieldSerial() to static QSqlResultPrivate::fieldSerial() Change-Id: Ic2db719437a11019262cf299929115ffa11d3d34 Reviewed-by: Israel Lins Albuquerque Reviewed-by: Konstantin Ritt Reviewed-by: Mark Brand --- src/sql/kernel/qsqlresult.cpp | 10 ++++------ src/sql/kernel/qsqlresult_p.h | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index b3e7ad5b38..b73c80f192 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -55,15 +55,13 @@ QT_BEGIN_NAMESPACE -static QString qFieldSerial(int); - QString QSqlResultPrivate::holderAt(int index) const { - return holders.size() > index ? holders.at(index).holderName : qFieldSerial(index); + return holders.size() > index ? holders.at(index).holderName : fieldSerial(index); } // return a unique id for bound names -static QString qFieldSerial(int i) +QString QSqlResultPrivate::fieldSerial(int i) { ushort arr[] = { ':', 'f', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ushort *ptr = &arr[1]; @@ -95,7 +93,7 @@ QString QSqlResultPrivate::positionalToNamedBinding() for (int i = 0; i < n; ++i) { QChar ch = sql.at(i); if (ch == QLatin1Char('?') && !inQuote) { - result += qFieldSerial(count++); + result += fieldSerial(count++); } else { if (ch == QLatin1Char('\'')) inQuote = !inQuote; @@ -617,7 +615,7 @@ bool QSqlResult::exec() void QSqlResult::bindValue(int index, const QVariant& val, QSql::ParamType paramType) { d->binds = PositionalBinding; - d->indexes[qFieldSerial(index)].append(index); + d->indexes[QSqlResultPrivate::fieldSerial(index)].append(index); if (d->values.count() <= index) d->values.resize(index + 1); d->values[index] = val; diff --git a/src/sql/kernel/qsqlresult_p.h b/src/sql/kernel/qsqlresult_p.h index 65f9be7a05..95148853df 100644 --- a/src/sql/kernel/qsqlresult_p.h +++ b/src/sql/kernel/qsqlresult_p.h @@ -106,6 +106,7 @@ public: clearIndex();; } + static QString fieldSerial(int); QString positionalToNamedBinding(); QString namedToPositionalBinding(); QString holderAt(int index) const; -- cgit v1.2.3 From b8073b841404f0f5b9a6f87faba375c6eb45f3d0 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 11 Feb 2013 10:23:43 +0100 Subject: QSqlResultPrivate: parameterize input query for parsing Change-Id: If57f4fcea2e00a1910df5a5bd2b556289f4ffb21 Reviewed-by: Israel Lins Albuquerque Reviewed-by: Konstantin Ritt Reviewed-by: Mark Brand --- src/sql/kernel/qsqlresult.cpp | 26 +++++++++++++------------- src/sql/kernel/qsqlresult_p.h | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index b73c80f192..6ae9c2b314 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -81,9 +81,9 @@ static bool qIsAlnum(QChar ch) return u - 'a' < 26 || u - 'A' < 26 || u - '0' < 10 || u == '_'; } -QString QSqlResultPrivate::positionalToNamedBinding() +QString QSqlResultPrivate::positionalToNamedBinding(const QString &query) { - int n = sql.size(); + int n = query.size(); QString result; result.reserve(n * 5 / 4); @@ -91,7 +91,7 @@ QString QSqlResultPrivate::positionalToNamedBinding() int count = 0; for (int i = 0; i < n; ++i) { - QChar ch = sql.at(i); + QChar ch = query.at(i); if (ch == QLatin1Char('?') && !inQuote) { result += fieldSerial(count++); } else { @@ -104,9 +104,9 @@ QString QSqlResultPrivate::positionalToNamedBinding() return result; } -QString QSqlResultPrivate::namedToPositionalBinding() +QString QSqlResultPrivate::namedToPositionalBinding(const QString &query) { - int n = sql.size(); + int n = query.size(); QString result; result.reserve(n); @@ -115,14 +115,14 @@ QString QSqlResultPrivate::namedToPositionalBinding() int i = 0; while (i < n) { - QChar ch = sql.at(i); + QChar ch = query.at(i); if (ch == QLatin1Char(':') && !inQuote - && (i == 0 || sql.at(i - 1) != QLatin1Char(':')) - && (i + 1 < n && qIsAlnum(sql.at(i + 1)))) { + && (i == 0 || query.at(i - 1) != QLatin1Char(':')) + && (i + 1 < n && qIsAlnum(query.at(i + 1)))) { int pos = i + 2; - while (pos < n && qIsAlnum(sql.at(pos))) + while (pos < n && qIsAlnum(query.at(pos))) ++pos; - QString holder(sql.mid(i, pos - i)); + QString holder(query.mid(i, pos - i)); indexes[holder].append(count++); holders.append(QHolder(holder, i)); result += QLatin1Char('?'); @@ -529,10 +529,10 @@ bool QSqlResult::savePrepare(const QString& query) return prepare(query); // parse the query to memorize parameter location - d->executedQuery = d->namedToPositionalBinding(); + d->executedQuery = d->namedToPositionalBinding(query); if (driver()->hasFeature(QSqlDriver::NamedPlaceholders)) - d->executedQuery = d->positionalToNamedBinding(); + d->executedQuery = QSqlResultPrivate::positionalToNamedBinding(query); return prepare(d->executedQuery); } @@ -549,7 +549,7 @@ bool QSqlResult::prepare(const QString& query) d->sql = query; if (d->holders.isEmpty()) { // parse the query to memorize parameter location - d->namedToPositionalBinding(); + d->namedToPositionalBinding(query); } return true; // fake prepares should always succeed } diff --git a/src/sql/kernel/qsqlresult_p.h b/src/sql/kernel/qsqlresult_p.h index 95148853df..e70e2e32e9 100644 --- a/src/sql/kernel/qsqlresult_p.h +++ b/src/sql/kernel/qsqlresult_p.h @@ -107,8 +107,8 @@ public: } static QString fieldSerial(int); - QString positionalToNamedBinding(); - QString namedToPositionalBinding(); + static QString positionalToNamedBinding(const QString &query); + QString namedToPositionalBinding(const QString &query); QString holderAt(int index) const; QSqlResult *q; -- cgit v1.2.3 From 67a71731c75856ede684b40c30e75b2630abd853 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Mon, 11 Feb 2013 10:38:17 +0100 Subject: QSqlResultPrivate: parameterize fieldSerial function for parsing Change-Id: Ibaffadec9bf9e6e0d5609b7327b369d560e8e2ce Reviewed-by: Israel Lins Albuquerque Reviewed-by: Konstantin Ritt Reviewed-by: Mark Brand --- src/sql/kernel/qsqlresult.cpp | 4 ++-- src/sql/kernel/qsqlresult_p.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 6ae9c2b314..2ebfba0788 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -81,7 +81,7 @@ static bool qIsAlnum(QChar ch) return u - 'a' < 26 || u - 'A' < 26 || u - '0' < 10 || u == '_'; } -QString QSqlResultPrivate::positionalToNamedBinding(const QString &query) +QString QSqlResultPrivate::positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx)) { int n = query.size(); @@ -93,7 +93,7 @@ QString QSqlResultPrivate::positionalToNamedBinding(const QString &query) for (int i = 0; i < n; ++i) { QChar ch = query.at(i); if (ch == QLatin1Char('?') && !inQuote) { - result += fieldSerial(count++); + result += fieldSerialFunc(count++); } else { if (ch == QLatin1Char('\'')) inQuote = !inQuote; diff --git a/src/sql/kernel/qsqlresult_p.h b/src/sql/kernel/qsqlresult_p.h index e70e2e32e9..246b914ec7 100644 --- a/src/sql/kernel/qsqlresult_p.h +++ b/src/sql/kernel/qsqlresult_p.h @@ -106,8 +106,13 @@ public: clearIndex();; } + // positionalToNamedBinding uses fieldSerial() by default, which converts to Oracle-style names, + // because this style is used in the API. A driver can reuse positionalToNamedBinding() + // internally for its own naming style by supplying its own fieldSerialFunc. We cannot make + // fieldSerial() virtual because it would allow a driver to impose its naming style on + // executedQuery when set by QSqlResult::savePrepare(). static QString fieldSerial(int); - static QString positionalToNamedBinding(const QString &query); + static QString positionalToNamedBinding(const QString &query, QString (fieldSerialFunc)(int idx) = fieldSerial); QString namedToPositionalBinding(const QString &query); QString holderAt(int index) const; -- cgit v1.2.3 From 2fc5edffa4f4dfadad17b88253be59ea6961109b Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Sun, 10 Feb 2013 23:53:31 +0100 Subject: qpsql: reuse QSqlResultPrivate::positionalToNamedBinding reuse QSqlResultPrivate::positionalToNamedBinding for psql Change-Id: I48713c3f94eb880cafff5fddbeadaa0746a405a9 Reviewed-by: Israel Lins Albuquerque Reviewed-by: Konstantin Ritt Reviewed-by: Mark Brand --- src/sql/drivers/psql/qsql_psql.cpp | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 1d96e9f93b..0eadceb1d1 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -53,6 +53,7 @@ #include #include #include +#include #include #include @@ -183,6 +184,7 @@ class QPSQLResultPrivate { public: QPSQLResultPrivate(QPSQLResult *qq): q(qq), driver(0), result(0), currentSize(-1), preparedQueriesEnabled(false) {} + static QString fieldSerial(int i) { return QLatin1Char('$') + QString::number(i + 1); } QPSQLResult *q; const QPSQLDriverPrivate *driver; @@ -515,29 +517,6 @@ void QPSQLResult::virtual_hook(int id, void *data) QSqlResult::virtual_hook(id, data); } -static QString qReplacePlaceholderMarkers(const QString &query) -{ - const int originalLength = query.length(); - bool inQuote = false; - int markerIdx = 0; - QString result; - result.reserve(originalLength + 23); - for (int i = 0; i < originalLength; ++i) { - const QChar ch = query.at(i); - if (ch == QLatin1Char('?') && !inQuote) { - result += QLatin1Char('$'); - result += QString::number(++markerIdx); - } else { - if (ch == QLatin1Char('\'')) - inQuote = !inQuote; - result += ch; - } - } - - result.squeeze(); - return result; -} - static QString qCreateParamString(const QVector boundValues, const QSqlDriver *driver) { if (boundValues.isEmpty()) @@ -581,7 +560,7 @@ bool QPSQLResult::prepare(const QString &query) qDeallocatePreparedStmt(d); const QString stmtId = qMakePreparedStmtId(); - const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(qReplacePlaceholderMarkers(query)); + const QString stmt = QString::fromLatin1("PREPARE %1 AS ").arg(stmtId).append(QSqlResultPrivate::positionalToNamedBinding(query, QPSQLResultPrivate::fieldSerial)); PGresult *result = d->driver->exec(stmt); -- cgit v1.2.3 From dbbb4d1654ab9deec6a940d3c7304808bd425422 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Wed, 13 Feb 2013 13:31:05 +0100 Subject: Don't generate documentation for classes which are not available The Mac specific classes in QtWidgets are currently excluded and aren't available for use in Qt 5.0.x. In Qt 5.1 they will be available via QtMacExtras, when the widgets.pri is changed then this can be removed. Change-Id: I04fbb5204cbd5658efaf24171c5f8dac10fbfd35 Reviewed-by: Jerome Pasion --- src/widgets/doc/qtwidgets.qdocconf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/widgets/doc/qtwidgets.qdocconf b/src/widgets/doc/qtwidgets.qdocconf index e960ebfeba..a989ef9363 100644 --- a/src/widgets/doc/qtwidgets.qdocconf +++ b/src/widgets/doc/qtwidgets.qdocconf @@ -34,6 +34,15 @@ headerdirs += .. sourcedirs += .. \ ../../../examples/widgets/doc/src +excludefiles += ../widgets/qmacnativewidget_mac.h \ + ../widgets/qmaccocoaviewcontainer_mac.h \ + ../widgets/qcocoatoolbardelegate_mac_p.h \ + ../widgets/qcocoamenu_mac_p.h \ + ../widgets/qmaccocoaviewcontainer_mac.mm \ + ../widgets/qcocoatoolbardelegate_mac.mm \ + ../widgets/qmainwindowlayout_mac.mm \ + ../widgets/qmacnativewidget_mac.mm + exampledirs += ../../../examples/widgets \ ../../../doc/src/snippets \ ../ \ -- cgit v1.2.3 From 37e4e33c501da8c4acd2376b3341d4f79c9d87ce Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 14 Feb 2013 15:32:19 +0100 Subject: fix MSVC build for non-standard command line interpreters In our incremental linking command block we relied on del never returning a non-zero exit code. Other command line interpreters than cmd.exe, e.g. TCC, behave differently. We now check for existence before trying to delete the manifest file. Task-number: QTBUG-29698 Change-Id: I94d125998da6f2c0377104f7e83cdd9e8b838329 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msvc_nmake.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 263988cd30..8b40d4e935 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -414,7 +414,8 @@ void NmakeMakefileGenerator::writeBuildRulesPart(QTextStream &t) << cQuoted(unescapeFilePath(manifest)) << ">" << manifest_rc; if (generateManifest) { - t << "\n\tif not exist $(DESTDIR_TARGET) del " << manifest << ">NUL 2>&1"; + t << "\n\tif not exist $(DESTDIR_TARGET) if exist " << manifest + << " del " << manifest; t << "\n\tif exist " << manifest << " copy /Y " << manifest << ' ' << manifest_bak; const QString extraInlineFileContent = "\n!IF EXIST(" + manifest_res + ")\n" + manifest_res + "\n!ENDIF"; t << "\n\t"; -- cgit v1.2.3 From c2bdca2d545bc583860fd2776f8fc30de1222938 Mon Sep 17 00:00:00 2001 From: El Mehdi Fekari Date: Wed, 13 Feb 2013 17:58:25 +0100 Subject: QLocale: add autotest for tamil's AM/PM text Change-Id: I67e572f16fcabd5833549286be20172e7f2a2337 Reviewed-by: Konstantin Ritt Reviewed-by: Lars Knoll --- tests/auto/corelib/tools/qlocale/tst_qlocale.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp index f28ddec199..d58d207546 100644 --- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp @@ -1657,6 +1657,10 @@ void tst_QLocale::ampm() QLocale id("id_ID"); QCOMPARE(id.amText(), QLatin1String("AM")); QCOMPARE(id.pmText(), QLatin1String("PM")); + + QLocale ta("ta_LK"); + QCOMPARE(ta.amText(), QLatin1String("AM")); + QCOMPARE(ta.pmText(), QLatin1String("PM")); } void tst_QLocale::dateFormat() -- cgit v1.2.3 From 3f471c069d608282db2b0e0fa5e8f0547778cddb Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 13 Feb 2013 15:29:52 +0100 Subject: Place libexec binaries into lib folder on Windows Change the default libexec directory to 'lib' on Windows for default configurations. This makes sure that e.g. qtwebprocess can actually find & load the right Qt libs. A separate libexec directory was introduced to avoid conflicts between a system-wide Qt in PATH and a custom Qt installation. However, since there are no system wide Qt installations on Windows this isn't an issue, but getting the executables to find its Qt libraries is. Alternatively we could have also placed it in the 'bin' directory. However, putting it in the 'lib' folder carries the notion that, unlike the binaries in the bin, the libexec executables might have to be deployed with a target application. The exception is when a separate archdata prefix is specified, and $$archdata/lib won't contain Qt libraries. In this case we use libexec like on the other platforms too. ChangeLog: [Qt for Windows] Fixed launching of QtWebProcess.exe by changing default libexec directory to 'lib'. Task-number: QTBUG-29661 Change-Id: Icbb15fb98474d6fef8ac9310f2e2b482d3282f79 Reviewed-by: Oswald Buddenhagen Reviewed-by: Jocelyn Turcotte Reviewed-by: Joerg Bornemann --- configure | 10 ++++++++-- tools/configure/configureapp.cpp | 10 +++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 273e8b01f9..0d30c97504 100755 --- a/configure +++ b/configure @@ -2816,8 +2816,14 @@ if [ -z "$QT_INSTALL_BINS" ]; then #default fi QT_INSTALL_BINS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_BINS"` +if [ "$XPLATFORM_MINGW" = "yes" ]; then + QT_INSTALL_LIBEXECS_DIRNAME="lib" +else + QT_INSTALL_LIBEXECS_DIRNAME="libexec" +fi + if [ -z "$QT_INSTALL_LIBEXECS" ]; then #default - QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/libexec" #fallback + QT_INSTALL_LIBEXECS="$QT_INSTALL_ARCHDATA/$$QT_INSTALL_LIBEXECS_DIRNAME" #fallback fi QT_INSTALL_LIBEXECS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_LIBEXECS"` @@ -3039,7 +3045,7 @@ Installation options: -plugindir ...... Plugins will be installed to (default ARCHDATADIR/plugins) -libexecdir ..... Program executables will be installed to - (default ARCHDATADIR/libexec) + (default ARCHDATADIR/$QT_INSTALL_LIBEXECS_DIRNAME) -importdir ...... Imports for QML1 will be installed to (default ARCHDATADIR/imports) -qmldir ......... Imports for QML2 will be installed to diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 240859aa14..5fe1e029fb 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1602,7 +1602,7 @@ bool Configure::displayHelp() desc( "-libdir ", "Libraries will be installed to \n(default PREFIX/lib)"); desc( "-headerdir ", "Headers will be installed to \n(default PREFIX/include)"); desc( "-archdatadir ", "Architecture-dependent data used by Qt will be installed to \n(default PREFIX)"); - desc( "-libexecdir ", "Program executables will be installed to \n(default ARCHDATADIR/libexec)"); + desc( "-libexecdir ", "Program executables will be installed to \n(default ARCHDATADIR/lib)"); desc( "-plugindir ", "Plugins will be installed to \n(default ARCHDATADIR/plugins)"); desc( "-importdir ", "Imports for QML1 will be installed to \n(default ARCHDATADIR/imports)"); desc( "-qmldir ", "Imports for QML2 will be installed to \n(default ARCHDATADIR/qml)"); @@ -3561,8 +3561,12 @@ void Configure::generateQConfigCpp() dictionary["QT_INSTALL_LIBS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/lib"; if (!dictionary["QT_INSTALL_ARCHDATA"].size()) dictionary["QT_INSTALL_ARCHDATA"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"]; - if (!dictionary["QT_INSTALL_LIBEXECS"].size()) - dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec"; + if (!dictionary["QT_INSTALL_LIBEXECS"].size()) { + if (dictionary["QT_INSTALL_ARCHDATA"] == dictionary["QT_INSTALL_PREFIX"]) + dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/lib"; + else + dictionary["QT_INSTALL_LIBEXECS"] = qipempty ? "" : dictionary["QT_INSTALL_ARCHDATA"] + "/libexec"; + } if (!dictionary["QT_INSTALL_BINS"].size()) dictionary["QT_INSTALL_BINS"] = qipempty ? "" : dictionary["QT_INSTALL_PREFIX"] + "/bin"; if (!dictionary["QT_INSTALL_PLUGINS"].size()) -- cgit v1.2.3 From c8e34ed678145f2e5709d39007e27e186d1bc1f9 Mon Sep 17 00:00:00 2001 From: Karim Pinter Date: Fri, 15 Feb 2013 12:30:05 +0200 Subject: Fix DB2 driver X64 Linux Build On X64 Linux DB2 driver build give an error on BIGINT conversion to QVariant, casting it to qint64 solved the problem. Task-number: QTBUG-20172 Change-Id: I7ef31cbe643c90b40b86cf3d7c4d3b711eabf2f5 Reviewed-by: Mark Brand --- src/sql/drivers/db2/qsql_db2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/drivers/db2/qsql_db2.cpp b/src/sql/drivers/db2/qsql_db2.cpp index 537f77a8a3..9406861d4c 100644 --- a/src/sql/drivers/db2/qsql_db2.cpp +++ b/src/sql/drivers/db2/qsql_db2.cpp @@ -1030,7 +1030,7 @@ QVariant QDB2Result::data(int field) v = new QVariant(qGetIntData(d->hStmt, field, isNull)); break; case QSql::LowPrecisionInt64: - v = new QVariant(qGetBigIntData(d->hStmt, field, isNull)); + v = new QVariant((qint64) qGetBigIntData(d->hStmt, field, isNull)); break; case QSql::LowPrecisionDouble: v = new QVariant(qGetDoubleData(d->hStmt, field, isNull)); -- cgit v1.2.3 From 776c488b6f6a88eb8dacafa992bf61f0167df6a3 Mon Sep 17 00:00:00 2001 From: Israel Lins Date: Thu, 7 Feb 2013 16:18:05 -0300 Subject: QSqlResult: fix parsing of bound SQL statements Parsing for bound SQL parameters now handles identifier quoting using double quotes (") and square brackets ([]). The following has only 1 bound value but previously 2 were detected: SELECT 1 AS "A?b[?']]]de?ghi", ? Task-number: QTBUG-27159 Change-Id: Icfd02187e1126ff3b5ed11df8d4e599f574e61bf Reviewed-by: Mark Brand --- src/sql/kernel/qsqlresult.cpp | 75 ++++++++++++++++------ tests/auto/sql/kernel/qsqlresult/testsqldriver.h | 5 ++ .../auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp | 34 ++++++++++ 3 files changed, 93 insertions(+), 21 deletions(-) diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index 2ebfba0788..ea972abf50 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -87,17 +87,33 @@ QString QSqlResultPrivate::positionalToNamedBinding(const QString &query, QStrin QString result; result.reserve(n * 5 / 4); - bool inQuote = false; + QChar closingQuote; int count = 0; for (int i = 0; i < n; ++i) { QChar ch = query.at(i); - if (ch == QLatin1Char('?') && !inQuote) { - result += fieldSerialFunc(count++); - } else { - if (ch == QLatin1Char('\'')) - inQuote = !inQuote; + if (!closingQuote.isNull()) { + if (ch == closingQuote) { + if (closingQuote == QLatin1Char(']') + && i + 1 < n && query.at(i + 1) == closingQuote) { + // consume the extra character. don't close. + ++i; + result += ch; + } else { + closingQuote = QChar(); + } + } result += ch; + } else { + if (ch == QLatin1Char('?')) { + result += fieldSerialFunc(count++); + } else { + if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`')) + closingQuote = ch; + else if (ch == QLatin1Char('[')) + closingQuote = QLatin1Char(']'); + result += ch; + } } } result.squeeze(); @@ -110,28 +126,45 @@ QString QSqlResultPrivate::namedToPositionalBinding(const QString &query) QString result; result.reserve(n); - bool inQuote = false; + QChar closingQuote; int count = 0; int i = 0; while (i < n) { QChar ch = query.at(i); - if (ch == QLatin1Char(':') && !inQuote - && (i == 0 || query.at(i - 1) != QLatin1Char(':')) - && (i + 1 < n && qIsAlnum(query.at(i + 1)))) { - int pos = i + 2; - while (pos < n && qIsAlnum(query.at(pos))) - ++pos; - QString holder(query.mid(i, pos - i)); - indexes[holder].append(count++); - holders.append(QHolder(holder, i)); - result += QLatin1Char('?'); - i = pos; - } else { - if (ch == QLatin1Char('\'')) - inQuote = !inQuote; + if (!closingQuote.isNull()) { + if (ch == closingQuote) { + if (closingQuote == QLatin1Char(']') + && i + 1 < n && query.at(i + 1) == closingQuote) { + // consume the extra character. don't close. + ++i; + result += ch; + } else { + closingQuote = QChar(); + } + } result += ch; ++i; + } else { + if (ch == QLatin1Char(':') + && (i == 0 || query.at(i - 1) != QLatin1Char(':')) + && (i + 1 < n && qIsAlnum(query.at(i + 1)))) { + int pos = i + 2; + while (pos < n && qIsAlnum(query.at(pos))) + ++pos; + QString holder(query.mid(i, pos - i)); + indexes[holder].append(count++); + holders.append(QHolder(holder, i)); + result += QLatin1Char('?'); + i = pos; + } else { + if (ch == QLatin1Char('\'') || ch == QLatin1Char('"') || ch == QLatin1Char('`')) + closingQuote = ch; + else if (ch == QLatin1Char('[')) + closingQuote = QLatin1Char(']'); + result += ch; + ++i; + } } } result.squeeze(); diff --git a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h index 720b819839..7040ddf360 100644 --- a/tests/auto/sql/kernel/qsqlresult/testsqldriver.h +++ b/tests/auto/sql/kernel/qsqlresult/testsqldriver.h @@ -58,6 +58,11 @@ public: return QSqlResult::savePrepare(sqlquery); } + QVector boundValues() const + { + return QSqlResult::boundValues(); + } + protected: QVariant data(int /* index */) { return QVariant(); } bool isNull(int /* index */) { return false; } diff --git a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp index 7e901d4b2c..ba6b4d1fbf 100644 --- a/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp +++ b/tests/auto/sql/kernel/qsqlresult/tst_qsqlresult.cpp @@ -53,6 +53,7 @@ public: private slots: void positionalToNamedBinding(); + void parseOfBoundValues(); }; @@ -66,6 +67,39 @@ void tst_QSqlResult::positionalToNamedBinding() TestSqlDriverResult result(&testDriver); QString query("INSERT INTO MYTABLE (ID, NAME, BIRTH) VALUES(?, ?, ?)"); QVERIFY(result.savePrepare(query)); + QCOMPARE(result.boundValues().count(), 3); +} + +void tst_QSqlResult::parseOfBoundValues() +{ + TestSqlDriver testDriver; + TestSqlDriverResult result(&testDriver); + QVERIFY(result.savePrepare("SELECT :1 AS \":2\"")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT :1 AS ':2'")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT :1 AS [:2]")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT :1 AS [:2]]]]]")); + QCOMPARE(result.boundValues().count(), 1); + + QVERIFY(result.savePrepare("SELECT ? AS \"?\"")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT ? AS '?'")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT ? AS [?]")); + QCOMPARE(result.boundValues().count(), 1); + + QVERIFY(result.savePrepare("SELECT ? AS \"'?\"")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT ? AS '?\"'")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT ? AS '?''?'")); + QCOMPARE(result.boundValues().count(), 1); + QVERIFY(result.savePrepare("SELECT ? AS [\"?']")); + QCOMPARE(result.boundValues().count(), 1); } QTEST_MAIN( tst_QSqlResult ) -- cgit v1.2.3 From 57953e0fea25a7b6ed5292401150869f708c7fd5 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 15 Feb 2013 15:06:16 +0100 Subject: Doc: Added margin to the QML API description. -added a margin to "qmldoc" div class. Change-Id: I7297aff4de5d41a7e4de14a09c0a70acb8006bb9 Reviewed-by: Jens Bache-Wiig --- doc/global/template/style/offline.css | 7 +++---- doc/global/template/style/online.css | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/global/template/style/offline.css b/doc/global/template/style/offline.css index 8b8a7d9ae1..40257730ff 100644 --- a/doc/global/template/style/offline.css +++ b/doc/global/template/style/offline.css @@ -290,14 +290,10 @@ box-shadow: 0px 0px 0px #fff; background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; -font-size: 12px; -line-height: 1.2; margin-bottom: 25px; margin-left: 15px; font-size: 12px; line-height: 1.2; -margin-bottom: 25px; -margin-left: 15px; } @@ -451,6 +447,9 @@ padding: 3px 5px 3px 10px; text-align: right; } +.qmldoc { +margin-left: 15px; +} /* ----------- Content table diff --git a/doc/global/template/style/online.css b/doc/global/template/style/online.css index f933bac5eb..9dff745358 100644 --- a/doc/global/template/style/online.css +++ b/doc/global/template/style/online.css @@ -563,6 +563,10 @@ padding: 3px 5px 3px 10px; text-align: right; } +.qmldoc { +margin-left: 15px; +} + /* ----------- Content table -- cgit v1.2.3 From 284958c2221cabc9b5cbc9cacb2fc848204c9369 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 14 Feb 2013 10:39:37 +0100 Subject: Doc: Support for meta-content in manifest XML files This change makes qdoc support additional attributes and tags written to example/demo manifest files. The goal is to enable highlighting of selected items, as well as having additional content to make searching for specific categories work better in Qt Creator welcome screen. This meta-content is stored in manifest-meta.qdocconf, which is loaded globally for all modules. Tag handling is also changed to use a QSet to eliminate possible duplicate tags. Task-number: QTBUG-29354 Change-Id: I2c4b2dff6229172efbecc2bfc1c269017edc4d56 Reviewed-by: Martin Smith Reviewed-by: Jerome Pasion --- doc/global/manifest-meta.qdocconf | 33 +++++++++++++++++++ doc/global/qt-module-defaults.qdocconf | 1 + src/tools/qdoc/config.h | 1 + src/tools/qdoc/htmlgenerator.cpp | 60 +++++++++++++++++++++++++++++++--- src/tools/qdoc/htmlgenerator.h | 9 +++++ 5 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 doc/global/manifest-meta.qdocconf diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf new file mode 100644 index 0000000000..3bfc3e12d4 --- /dev/null +++ b/doc/global/manifest-meta.qdocconf @@ -0,0 +1,33 @@ +# Additional meta information (attributes for matched entries, as well as tags) +# to be added to manifest.xml files. +# +# manifestmeta.filters = ,,... +# +# manifestmeta..names = /,/,.. +# manifestmeta..attributes = ,,.. +# manifestmeta..tags = ,,.. +# +# .names specify all the module/name combinations to apply the +# attributes/tags to. You can use simple wildcard matching by appending +# '*' at the end of name. +# +# Note: You cannot use operators (+, =, -) in the names. +# +# Examples: add a 'isHighlighted' attribute for two 'Analog Clock' examples, +# add a 'database' tag for QtSql all examples, a 'webkit' tag for QtWebKit +# examples, and a 'qt5' tag for all examples +# +# manifestmeta.filters = highlighted sql webkit global +# +# manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \ +# "QtWidgets/Analog Clock Example" +# manifestmeta.highlighted.attributes = isHighlighted:true +# +# manifestmeta.sql.names = "QtSql/*" +# manifestmeta.sql.tags = database +# +# manifestmeta.webkit.names = "QtWebKitExamples/*" +# manifestmeta.webkit.tags = webkit +# +# manifestmeta.global.names = * +# manifestmeta.global.tags = qt5 diff --git a/doc/global/qt-module-defaults.qdocconf b/doc/global/qt-module-defaults.qdocconf index 15b3724355..0365d5a6cd 100644 --- a/doc/global/qt-module-defaults.qdocconf +++ b/doc/global/qt-module-defaults.qdocconf @@ -3,6 +3,7 @@ include(qt-cpp-ignore.qdocconf) include(qt-defines.qdocconf) include(qt-html-templates-offline.qdocconf) include(compat.qdocconf) +include(manifest-meta.qdocconf) dita.metadata.default.author = Qt Project dita.metadata.default.permissions = all diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h index 2c655cdf23..521f1c12b8 100644 --- a/src/tools/qdoc/config.h +++ b/src/tools/qdoc/config.h @@ -188,6 +188,7 @@ private: #define CONFIG_INDEXES "indexes" #define CONFIG_LANGUAGE "language" #define CONFIG_MACRO "macro" +#define CONFIG_MANIFESTMETA "manifestmeta" #define CONFIG_NATURALLANGUAGE "naturallanguage" #define CONFIG_NOLINKERRORS "nolinkerrors" #define CONFIG_OBSOLETELINKS "obsoletelinks" diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 8718161703..2666f10eb4 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -223,6 +223,7 @@ void HtmlGenerator::initializeGenerator(const Config &config) QString prefix = CONFIG_QHP + Config::dot + project + Config::dot; manifestDir = "qthelp://" + config.getString(prefix + "namespace"); manifestDir += QLatin1Char('/') + config.getString(prefix + "virtualFolder") + QLatin1Char('/'); + readManifestMetaContent(config); examplesPath = config.getString(CONFIG_EXAMPLESINSTALLPATH); if (!examplesPath.isEmpty()) examplesPath += QLatin1Char('/'); @@ -3991,10 +3992,11 @@ void HtmlGenerator::generateManifestFiles() generateManifestFile("examples", "example"); generateManifestFile("demos", "demo"); ExampleNode::exampleNodeMap.clear(); + manifestMetaContent.clear(); } /*! - This function is called by generaqteManiferstFile(), once + This function is called by generateManifestFiles(), once for each manifest file to be generated. \a manifest is the type of manifest file. */ @@ -4086,6 +4088,36 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) } if (!en->imageFileName().isEmpty()) writer.writeAttribute("imageUrl", manifestDir + en->imageFileName()); + + QString fullName = project + QLatin1Char('/') + en->title(); + QSet tags; + for (int idx=0; idx < manifestMetaContent.size(); ++idx) { + foreach (const QString &name, manifestMetaContent[idx].names) { + bool match = false; + int wildcard = name.indexOf(QChar('*')); + switch (wildcard) { + case -1: // no wildcard, exact match + match = (fullName == name); + break; + case 0: // '*' matches all + match = true; + break; + default: // match with wildcard at the end + match = fullName.startsWith(name.left(wildcard)); + } + if (match) { + tags += manifestMetaContent[idx].tags; + foreach (const QString &attr, manifestMetaContent[idx].attributes) { + QStringList attrList = attr.split(QLatin1Char(':'), QString::SkipEmptyParts); + if (attrList.count() == 1) + attrList.append(QStringLiteral("true")); + if (attrList.count() == 2) + writer.writeAttribute(attrList[0], attrList[1]); + } + } + } + } + writer.writeStartElement("description"); Text brief = en->doc().briefText(); if (!brief.isEmpty()) @@ -4093,12 +4125,11 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) else writer.writeCDATA(QString("No description available")); writer.writeEndElement(); // description - QStringList tags = en->title().toLower().split(QLatin1Char(' ')); + tags += QSet::fromList(en->title().toLower().split(QLatin1Char(' '))); if (!tags.isEmpty()) { writer.writeStartElement("tags"); bool wrote_one = false; - for (int n=0; n0 && wrote_one) + if (wrote_one) writer.writeCharacters(","); writer.writeCharacters(tag); wrote_one = true; @@ -4162,6 +4193,25 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) file.close(); } +/*! + Reads metacontent - additional attributes and tags to apply + when generating manifest files, read from config. Takes the + configuration class \a config as a parameter. + */ +void HtmlGenerator::readManifestMetaContent(const Config &config) +{ + QStringList names = config.getStringList(CONFIG_MANIFESTMETA + Config::dot + QStringLiteral("filters")); + + foreach (const QString &manifest, names) { + ManifestMetaFilter filter; + QString prefix = CONFIG_MANIFESTMETA + Config::dot + manifest + Config::dot; + filter.names = config.getStringSet(prefix + QStringLiteral("names")); + filter.attributes = config.getStringSet(prefix + QStringLiteral("attributes")); + filter.tags = config.getStringSet(prefix + QStringLiteral("tags")); + manifestMetaContent.append(filter); + } +} + /*! Find global entities that have documentation but no \e{relates} comand. Report these as errors if they diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index 65d874f619..f2efab78a1 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -108,6 +108,7 @@ protected: virtual QString linkForNode(const Node *node, const Node *relative); void generateManifestFile(QString manifest, QString element); + void readManifestMetaContent(const Config &config); private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; @@ -118,6 +119,13 @@ private: EndMark }; + struct ManifestMetaFilter + { + QSet names; + QSet attributes; + QSet tags; + }; + const QPair anchorForNode(const Node *node); void generateBreadCrumbs(const QString& title, const Node *node, @@ -242,6 +250,7 @@ private: bool obsoleteLinks; QStack xmlWriterStack; static int id; + QList manifestMetaContent; public: static bool debugging_on; static QString divNavTop; -- cgit v1.2.3 From 34c240289a8682b60d5a61670e1d330d630e1f93 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 14 Feb 2013 16:58:52 +0100 Subject: Track last visited directory for native file dialogs as well. Task-number: QTBUG-28855 Change-Id: Ia7af8540d2a453dfeabd700f44c282c48a239834 Reviewed-by: Oliver Wolff Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/qfiledialog.cpp | 7 +++++++ src/widgets/dialogs/qfiledialog.h | 1 + src/widgets/dialogs/qfiledialog_p.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 4023981353..240e9979d8 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -536,6 +536,7 @@ void QFileDialogPrivate::initHelper(QPlatformDialogHelper *h) QObject::connect(h, SIGNAL(filesSelected(QStringList)), d, SIGNAL(filesSelected(QStringList))); QObject::connect(h, SIGNAL(currentChanged(QString)), d, SIGNAL(currentChanged(QString))); QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SIGNAL(directoryEntered(QString))); + QObject::connect(h, SIGNAL(directoryEntered(QString)), d, SLOT(_q_nativeEnterDirectory(QString))); QObject::connect(h, SIGNAL(filterSelected(QString)), d, SIGNAL(filterSelected(QString))); static_cast(h)->setOptions(options); } @@ -3112,6 +3113,12 @@ void QFileDialogPrivate::_q_fileRenamed(const QString &path, const QString oldNa } } +void QFileDialogPrivate::_q_nativeEnterDirectory(const QString &directory) +{ + if (!directory.isEmpty()) // Windows native dialogs occasionally emit signals with empty strings. + *lastVisitedDir() = directory; +} + /*! \internal diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h index 84bb0fa98c..18aaa781fd 100644 --- a/src/widgets/dialogs/qfiledialog.h +++ b/src/widgets/dialogs/qfiledialog.h @@ -242,6 +242,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_updateOkButton()) Q_PRIVATE_SLOT(d_func(), void _q_currentChanged(const QModelIndex &index)) Q_PRIVATE_SLOT(d_func(), void _q_enterDirectory(const QModelIndex &index)) + Q_PRIVATE_SLOT(d_func(), void _q_nativeEnterDirectory(const QString&)) Q_PRIVATE_SLOT(d_func(), void _q_goToDirectory(const QString &path)) Q_PRIVATE_SLOT(d_func(), void _q_useNameFilter(int index)) Q_PRIVATE_SLOT(d_func(), void _q_selectionChanged()) diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h index 304eada093..ffaa2bc6f8 100644 --- a/src/widgets/dialogs/qfiledialog_p.h +++ b/src/widgets/dialogs/qfiledialog_p.h @@ -204,6 +204,7 @@ public: void _q_updateOkButton(); void _q_currentChanged(const QModelIndex &index); void _q_enterDirectory(const QModelIndex &index); + void _q_nativeEnterDirectory(const QString &directory); void _q_goToDirectory(const QString &); void _q_useNameFilter(int index); void _q_selectionChanged(); -- cgit v1.2.3 From cb1b451cd14967fb0eecab797763a6fec579677b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 6 Feb 2013 16:54:49 +0100 Subject: Fix the GL_CONTEXT_FLAG_DEBUG_BIT check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the correct enum. GL_CONTEXT_FLAG_DEBUG_BIT does not have the same value as GLX/WGL_CONTEXT_DEBUG_BIT_ARB. Change-Id: I7d90da54ca1ff526c8b00669b486a68424fc8dfb Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 6 +++++- src/plugins/platforms/xcb/qglxintegration.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 3cf2113f63..081b42ce65 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -136,6 +136,10 @@ #define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001 #endif +#ifndef GL_CONTEXT_FLAG_DEBUG_BIT +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#endif + QT_BEGIN_NAMESPACE template inline bool testFlag(MaskType mask, FlagType flag) @@ -706,7 +710,7 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current() glGetIntegerv(GL_CONTEXT_FLAGS, &value); if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) result.options |= QSurfaceFormat::DeprecatedFunctions; - if (value & WGL_CONTEXT_DEBUG_BIT_ARB) + if (value & GL_CONTEXT_FLAG_DEBUG_BIT) result.options |= QSurfaceFormat::DebugContext; if (result.version < 0x0302) return result; diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp index 015c51572f..11c74edc45 100644 --- a/src/plugins/platforms/xcb/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/qglxintegration.cpp @@ -74,6 +74,10 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC #define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126 #endif +#ifndef GL_CONTEXT_FLAG_DEBUG_BIT +#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 +#endif + static Window createDummyWindow(QXcbScreen *screen, XVisualInfo *visualInfo) { Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(screen), screen->root(), visualInfo->visual, AllocNone); @@ -183,7 +187,7 @@ static void updateFormatFromContext(QSurfaceFormat &format) glGetIntegerv(GL_CONTEXT_FLAGS, &value); if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) format.setOption(QSurfaceFormat::DeprecatedFunctions); - if (value & GLX_CONTEXT_DEBUG_BIT_ARB) + if (value & GL_CONTEXT_FLAG_DEBUG_BIT) format.setOption(QSurfaceFormat::DebugContext); if (version < 0x0302) return; -- cgit v1.2.3 From abb8beb06490123f1a4a2053d728ae2891726a88 Mon Sep 17 00:00:00 2001 From: Marcel Krems Date: Thu, 7 Feb 2013 04:07:29 +0100 Subject: Doc: Fixed typo "pragraphs" -> "paragraphs" Change-Id: I47e88dbedd3afee4bd53550ef1ce643829aecedb Reviewed-by: Jerome Pasion --- src/gui/text/qtextcursor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp index 182b9ac7fd..39fca795c9 100644 --- a/src/gui/text/qtextcursor.cpp +++ b/src/gui/text/qtextcursor.cpp @@ -1283,7 +1283,7 @@ bool QTextCursor::movePosition(MoveOperation op, MoveMode mode, int n) Returns true if the cursor does visual navigation; otherwise returns false. - Visual navigation means skipping over hidden text pragraphs. The + Visual navigation means skipping over hidden text paragraphs. The default is false. \sa setVisualNavigation(), movePosition() @@ -1298,7 +1298,7 @@ bool QTextCursor::visualNavigation() const Sets visual navigation to \a b. - Visual navigation means skipping over hidden text pragraphs. The + Visual navigation means skipping over hidden text paragraphs. The default is false. \sa visualNavigation(), movePosition() -- cgit v1.2.3 From eaa18f306341818165c2ee4fc22750da04d5e45e Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Wed, 13 Feb 2013 11:59:38 +0100 Subject: SSL docs: Be more explicit about the threats of ignoring SSL errors ... because almost everybody gets it wrong almost every time. Change-Id: I54938ef094323ba8de02186b585b11b9579f3ca4 Reviewed-by: Richard J. Moore --- src/network/access/qnetworkreply.cpp | 9 +++++++-- src/network/ssl/qsslsocket.cpp | 10 +++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp index 669725b016..fd3b7760cb 100644 --- a/src/network/access/qnetworkreply.cpp +++ b/src/network/access/qnetworkreply.cpp @@ -680,8 +680,13 @@ void QNetworkReply::ignoreSslErrorsImplementation(const QList &) connection will be ignored, including certificate validation errors. - Note that calling this function without restraint may pose a - security risk for your application. Use it with care. + \warning Be sure to always let the user inspect the errors + reported by the sslErrors() signal, and only call this method + upon confirmation from the user that proceeding is ok. + If there are unexpected errors, the reply should be aborted. + Calling this method without inspecting the actual errors will + most likely pose a security risk for your application. Use it + with great care! This function can be called from the slot connected to the sslErrors() signal, which indicates which errors were diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp index cfc3c19bba..f0c3f40a28 100644 --- a/src/network/ssl/qsslsocket.cpp +++ b/src/network/ssl/qsslsocket.cpp @@ -1714,9 +1714,13 @@ void QSslSocket::startServerEncryption() will not emit the sslErrors() signal, and it is unnecessary to call this function. - Ignoring errors that occur during an SSL handshake should be done - with caution. A fundamental characteristic of secure connections - is that they should be established with an error free handshake. + \warning Be sure to always let the user inspect the errors + reported by the sslErrors() signal, and only call this method + upon confirmation from the user that proceeding is ok. + If there are unexpected errors, the connection should be aborted. + Calling this method without inspecting the actual errors will + most likely pose a security risk for your application. Use it + with great care! \sa sslErrors() */ -- cgit v1.2.3 From f0221d359499f675115da1f47dd3669a4383653d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20E=2E=20Narv=C3=A1ez?= Date: Sun, 3 Feb 2013 23:07:07 -0500 Subject: Fix call to QMetaObject::metaCall from updateProperty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Create an array of arguments in the same way QMetaObject::write does Task-number: QTBUG-29082 Change-Id: I4ea5ab5dcd6b55cf0a127b855b5aac27a9d4a305 Reviewed-by: Davide Pesavento Reviewed-by: Jędrzej Nowacki Reviewed-by: Olivier Goffart --- src/corelib/animation/qpropertyanimation.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp index dcf779a5f1..9869d7e500 100644 --- a/src/corelib/animation/qpropertyanimation.cpp +++ b/src/corelib/animation/qpropertyanimation.cpp @@ -136,8 +136,11 @@ void QPropertyAnimationPrivate::updateProperty(const QVariant &newValue) if (newValue.userType() == propertyType) { //no conversion is needed, we directly call the QMetaObject::metacall - void *data = const_cast(newValue.constData()); - QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, &data); + //check QMetaProperty::write for an explanation of these + int status = -1; + int flags = 0; + void *argv[] = { const_cast(newValue.constData()), const_cast(&newValue), &status, &flags }; + QMetaObject::metacall(targetValue, QMetaObject::WriteProperty, propertyIndex, argv); } else { targetValue->setProperty(propertyName.constData(), newValue); } -- cgit v1.2.3 From 615d120e5a3ccbda82dfa6eeaa445c613adc7ca2 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Fri, 15 Feb 2013 18:10:42 +0100 Subject: Fix crash in somewhat faulty QGraphicsProxyWidget unit test. The crash is deep inside QGraphicsSceneIndex, which calls boundingRect() on the item that is being destroyed. The vtable is busted, resulting in a pure virtual function call. There's a more proper fix for this lying around somewhere but in this particular case we can get the test to not crash by guarding based on whether the item has a cursor set. This also happens to speed up QGraphicsItem destruction a bit so I figured it's a win-win situation to fix it. This case will still crash if the item actually had a cursor set but that makes the case even more narrow. Generally speaking, creating objects partially on the stack and partially on the heap, mixing parent/child relationships and then deleting one of the heap objects is quite sketchy and I doubt it happens much outside of this unit test. Change-Id: I25393d2cafb1256269ab6681519bd554cc380bfd Reviewed-by: Friedemann Kleint --- src/widgets/graphicsview/qgraphicsitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 87f5f17531..86fd3ce04a 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -2147,6 +2147,8 @@ bool QGraphicsItem::hasCursor() const */ void QGraphicsItem::unsetCursor() { + if (!d_ptr->hasCursor) + return; d_ptr->unsetExtra(QGraphicsItemPrivate::ExtraCursor); d_ptr->hasCursor = 0; if (d_ptr->scene) { -- cgit v1.2.3 From 843de37bca944110fdf3aab161d680e3845d2dd2 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Fri, 15 Feb 2013 18:04:07 +0100 Subject: Remove QGraphicsProxyWidget crash in QWidget::hasFocus(). A QGraphicsProxyWidget embeds a focusable widget (e.g., QComboBox). When deleting QGraphicsProxyWidget, the QWidget will be deleted. The QWidget clears focus, and QWidget::hasFocus() is nice enough to check if its embedder QGraphicsProxyWidget has focus - because if it does, it wants to clear focus from that item too. QGraphicsItem's destructor already calls clearFocus() however, so this call is unnecessary; we can simply stop clearing the QWidget's focus in its destructor if the widget is embedded. QWidget::hasFocus checks QGraphicsItem::hasFocus (on the proxy widget that is being deleted), which checks its d_ptr, which is gone. It's generally unfavorable for an object deleting a child to have the child go back and poke at the parent object, which is in many ways what's happening here. Task-number: QTBUG-29684 Change-Id: I1e52bf28f47b2824752de28dff2d0de13733ee48 Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 7209d8c9ad..5ec713140e 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -1391,6 +1391,14 @@ QWidget::~QWidget() QT_TRY { +#ifndef QT_NO_GRAPHICSVIEW + const QWidget* w = this; + while (w->d_func()->extra && w->d_func()->extra->focus_proxy) + w = w->d_func()->extra->focus_proxy; + QWidget *window = w->window(); + QWExtra *e = window ? window->d_func()->extra : 0; + if (!e || !e->proxyWidget) +#endif clearFocus(); } QT_CATCH(...) { // swallow this problem because we are in a destructor -- cgit v1.2.3