From d2ece155750b64c7dedbced029ee4b82ce7f662d Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Fri, 21 Aug 2009 11:19:02 +0200 Subject: Fix typo in anchor layout documentation. Reviewed-by:TrustMe --- src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index c137de3..9a34ad5 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -1652,7 +1652,7 @@ QList QGraphicsAnchorLayoutPrivate::constraintsFromSizeHin } /*! - \Internal + \internal */ QList< QList > QGraphicsAnchorLayoutPrivate::getGraphParts(Orientation orientation) -- cgit v0.12 From 2f877cfd438aebcc7da533c37a3825f65b5393ef Mon Sep 17 00:00:00 2001 From: Alexis Menard Date: Fri, 21 Aug 2009 11:23:04 +0200 Subject: Another typo. Reviewed-by:TrustMe --- dist/changes-4.6.0 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/changes-4.6.0 b/dist/changes-4.6.0 index bf18b14..8c2c2c8 100644 --- a/dist/changes-4.6.0 +++ b/dist/changes-4.6.0 @@ -35,7 +35,7 @@ information about a particular change. of (non-unicode) Windows 9x/ME support. - QRegion is no longer a GDI object by default. This means it is no - longer subjuect to gui-thread only nor does it potentially impact + longer subject to gui-thread only nor does it potentially impact the 10.000 GDI object limit per process. By explicitly calling .handle() a GDI object will be created and memory managed by QRegion. The native handle is for reading out only. Any GDI calls -- cgit v0.12 From eaa0ad5325c8f3af5f1de8ccd6a81d9599e07e51 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Fri, 21 Aug 2009 11:02:19 +0200 Subject: JSC::Debugger fix. Events exceptionThrow and functionExit modification JSC::Debugger::exceptionThrow event was moved _before_ stacks unwinding so there is possibility to check stack state before it's deletion. Missing functionExit event was added in Interpreter::unwind() Reviewed-by: Kent Hansen --- .../JavaScriptCore/interpreter/Interpreter.cpp | 36 ++++++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp index c78466e..3af4a29 100644 --- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp @@ -471,9 +471,12 @@ NEVER_INLINE bool Interpreter::unwindCallFrame(CallFrame*& callFrame, JSValue ex if (Debugger* debugger = callFrame->dynamicGlobalObject()->debugger()) { DebuggerCallFrame debuggerCallFrame(callFrame, exceptionValue); - if (callFrame->callee()) + if (callFrame->callee()) { debugger->returnEvent(debuggerCallFrame, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->lastLine()); - else +#ifdef QT_BUILD_SCRIPT_LIB + debugger->functionExit(exceptionValue, codeBlock->ownerNode()->sourceID()); +#endif + } else debugger->didExecuteProgram(debuggerCallFrame, codeBlock->ownerNode()->sourceID(), codeBlock->ownerNode()->lastLine()); } @@ -575,19 +578,32 @@ NEVER_INLINE HandlerInfo* Interpreter::throwException(CallFrame*& callFrame, JSV // Calculate an exception handler vPC, unwinding call frames as necessary. HandlerInfo* handler = 0; - while (!(handler = codeBlock->handlerForBytecodeOffset(bytecodeOffset))) { - if (!unwindCallFrame(callFrame, exceptionValue, bytecodeOffset, codeBlock)) { + #ifdef QT_BUILD_SCRIPT_LIB - if (debugger) - debugger->exceptionThrow(DebuggerCallFrame(callFrame, exceptionValue), codeBlock->ownerNode()->sourceID(),false); -#endif - return 0; + //try to find handler + bool hasHandler = true; + CallFrame *callFrameTemp = callFrame; + unsigned bytecodeOffsetTemp = bytecodeOffset; + CodeBlock *codeBlockTemp = codeBlock; + while (!(handler = codeBlockTemp->handlerForBytecodeOffset(bytecodeOffsetTemp))) { + callFrameTemp = callFrameTemp->callerFrame(); + if (callFrameTemp->hasHostCallFrameFlag()) { + hasHandler = false; + break; + } else { + codeBlockTemp = callFrameTemp->codeBlock(); + bytecodeOffsetTemp = bytecodeOffsetForPC(callFrameTemp, codeBlockTemp, callFrameTemp->returnPC()); } } -#ifdef QT_BUILD_SCRIPT_LIB if (debugger) - debugger->exceptionThrow(DebuggerCallFrame(callFrame, exceptionValue), codeBlock->ownerNode()->sourceID(),true); + debugger->exceptionThrow(DebuggerCallFrame(callFrame, exceptionValue), codeBlock->ownerNode()->sourceID(), hasHandler); #endif + + while (!(handler = codeBlock->handlerForBytecodeOffset(bytecodeOffset))) { + if (!unwindCallFrame(callFrame, exceptionValue, bytecodeOffset, codeBlock)) { + return 0; + } + } // Now unwind the scope chain within the exception handler's call frame. ScopeChainNode* scopeChain = callFrame->scopeChain(); -- cgit v0.12 From a02c095c9f80c487d4f3a8cb1f529579bcd4d255 Mon Sep 17 00:00:00 2001 From: Jedrzej Nowacki Date: Fri, 21 Aug 2009 11:13:47 +0200 Subject: Autotest QEXPECTED_FAIL removed Reviewed-by: Kent Hansen --- tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp index 932803a..886c70b 100644 --- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp +++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp @@ -1844,7 +1844,6 @@ void tst_QScriptEngineAgent::eventOrder_functions() QCOMPARE(spy->at(37).type, ScriptEngineEvent::ContextPop); // exception QCOMPARE(spy->at(38).type, ScriptEngineEvent::ExceptionThrow); - QEXPECT_FAIL("","New backend propably gives bad script id for exceptions", Abort); QCOMPARE(spy->at(38).scriptId, spy->at(21).scriptId); QVERIFY(!spy->at(38).hasExceptionHandler); // bar() exit @@ -1921,7 +1920,6 @@ void tst_QScriptEngineAgent::eventOrder_signalsHandling() emit testSignal(123); - QEXPECT_FAIL("","Signals events problem", Abort); QCOMPARE(spy->count(), 14); // new context QCOMPARE(spy->at(4).type, ScriptEngineEvent::ContextPush); @@ -2048,7 +2046,7 @@ void tst_QScriptEngineAgent::syntaxError() spy->clear(); eng.evaluate("{"); - //QCOMPARE(spy->count(), 9); + QCOMPARE(spy->count(), 9); QCOMPARE(spy->at(i).type, ScriptEngineEvent::ScriptLoad); QVERIFY(spy->at(i).scriptId != -1); -- cgit v0.12 From 5836896c52ca5385d5aa4d629025a88c26d3b2f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 21 Aug 2009 11:42:41 +0200 Subject: Doc fixes. --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index fed0e5a..d3b1995 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -130,7 +130,8 @@ QGraphicsAnchorLayout::~QGraphicsAnchorLayout() * * The spacing can also be set manually by using setAnchorSpacing() method. * - * \sa removeAnchor, addCornerAnchors, addLeftAndRightAnchors, addTopAndBottomAnchors, addAllAnchors + * \sa removeAnchor(), addCornerAnchors(), addLeftAndRightAnchors(), addTopAndBottomAnchors(), + * addAllAnchors() */ void QGraphicsAnchorLayout::addAnchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) -- cgit v0.12 From 34b7a176a2bb531723991c6afc5f02ed0b981291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 21 Aug 2009 11:47:47 +0200 Subject: Doc fixes to anchor layout. --- src/gui/graphicsview/qgraphicsanchorlayout.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index d3b1995..3c2ea37 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -252,7 +252,7 @@ qreal QGraphicsAnchorLayout::anchorSpacing(const QGraphicsLayoutItem *firstItem, \a secondItem and \a secondEdge to be the default spacing. Depending on the anchor type, the default spacing is either 0 or a value returned from the style. - \sa setAnchorSpacing, anchorSpacing, addAnchor + \sa setAnchorSpacing(), anchorSpacing(), addAnchor() */ void QGraphicsAnchorLayout::unsetAnchorSpacing(const QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, const QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge) @@ -298,7 +298,7 @@ void QGraphicsAnchorLayout::removeAnchor(QGraphicsLayoutItem *firstItem, Qt::Anc /*! Sets the default horizontal spacing for the anchor layout to \a spacing. - \sa horizontalSpacing, setVerticalSpacing, setSpacing + \sa horizontalSpacing(), setVerticalSpacing(), setSpacing() */ void QGraphicsAnchorLayout::setHorizontalSpacing(qreal spacing) { @@ -310,7 +310,7 @@ void QGraphicsAnchorLayout::setHorizontalSpacing(qreal spacing) /*! Sets the default vertical spacing for the anchor layout to \a spacing. - \sa verticalSpacing, setHorizontalSpacing, setSpacing + \sa verticalSpacing(), setHorizontalSpacing(), setSpacing() */ void QGraphicsAnchorLayout::setVerticalSpacing(qreal spacing) { @@ -324,7 +324,7 @@ void QGraphicsAnchorLayout::setVerticalSpacing(qreal spacing) If an item is anchored with no spacing associated with the anchor, it will use the default spacing. - \sa setHorizontalSpacing, setVerticalSpacing + \sa setHorizontalSpacing(), setVerticalSpacing() */ void QGraphicsAnchorLayout::setSpacing(qreal spacing) { @@ -336,7 +336,7 @@ void QGraphicsAnchorLayout::setSpacing(qreal spacing) /*! Returns the default horizontal spacing for the anchor layout. - \sa verticalSpacing, setHorizontalSpacing + \sa verticalSpacing(), setHorizontalSpacing() */ qreal QGraphicsAnchorLayout::horizontalSpacing() const { @@ -347,7 +347,7 @@ qreal QGraphicsAnchorLayout::horizontalSpacing() const /*! Returns the default vertical spacing for the anchor layout. - \sa horizontalSpacing, setVerticalSpacing + \sa horizontalSpacing(), setVerticalSpacing() */ qreal QGraphicsAnchorLayout::verticalSpacing() const { -- cgit v0.12 From 078f3ec042251af6bb9d9c194f29782c9e7b08a5 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Aug 2009 11:00:54 +0200 Subject: Fix linking to uninstalled libraries after LIBS_PRIVATE. On ELF systems, the static linker isn't allowed to find a linked library's dependencies using the -L flag. That means if you're linking lib or app X against a library A, and library A links against library B, then -L$QTDIR/lib won't apply to B. Before LIBS_PRIVATE, we had -lB, so it did apply. Now we need to find another solution. The solution is one of: a) install the libraries before linking anything against them b) set LD_LIBRARY_PATH c) set -rpath or -rpath-link Reviewed-by: TrustMe --- configure | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/configure b/configure index 91a361a..8ad5823 100755 --- a/configure +++ b/configure @@ -47,6 +47,11 @@ QMAKE_VARS_FILE=.qmake.vars # utility functions #------------------------------------------------------------------------------- +shellEscape() +{ + echo "$@" | sed 's/ /\ /g' +} + # Adds a new qmake variable to the cache # Usage: QMakeVar mode varname contents # where mode is one of: set, add, del @@ -89,6 +94,29 @@ getQMakeConf() { print }' "$tmpSPEC/qmake.conf" } +# relies on $TEST_COMPILER being set correctly +compilerSupportsFlag() +{ + cat >conftest.cpp <> "$CACHEFILE.tmp" +elif linkerSupportsFlag -rpath "$outpath/lib"; then + echo "QMAKE_LFLAGS += -Wl,-rpath,\$\$QT_BUILD_TREE/lib" >> "$CACHEFILE.tmp" +fi + if [ -n "$QT_CFLAGS_PSQL" ]; then echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL" >> "$CACHEFILE.tmp" fi -- cgit v0.12 From fc82b170f107d335aea6d468df6e4f5bc5db7cf5 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 20 Aug 2009 13:35:54 +0200 Subject: Reset clip structure when we use Qt::ReplaceClip or Qt::NoClip Reviewed-by: Samuel --- src/gui/painting/qpainter.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index ab35ead..c4da0a6 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2561,6 +2561,8 @@ void QPainter::setClipRect(const QRectF &rect, Qt::ClipOperation op) QVectorPath vp(pts, 4, 0, QVectorPath::RectangleHint); d->state->clipEnabled = true; d->extended->clip(vp, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2607,6 +2609,8 @@ void QPainter::setClipRect(const QRect &rect, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(rect, op); + if (op == Qt::ReplaceClip || op == Qt::NoClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(rect, op, d->state->matrix); d->state->clipOperation = op; return; @@ -2660,6 +2664,8 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(r, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(r, op, d->state->matrix); d->state->clipOperation = op; return; @@ -3064,6 +3070,8 @@ void QPainter::setClipPath(const QPainterPath &path, Qt::ClipOperation op) if (d->extended) { d->state->clipEnabled = true; d->extended->clip(path, op); + if (op == Qt::NoClip || op == Qt::ReplaceClip) + d->state->clipInfo.clear(); d->state->clipInfo << QPainterClipInfo(path, op, d->state->matrix); d->state->clipOperation = op; return; -- cgit v0.12 From d2bdb1f0e12a289c0be7ef720b12d1f4b5287a02 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Fri, 21 Aug 2009 11:16:46 +0200 Subject: move qdoc3 binary to bin, so we can use it for Qt Creator without hacks. Most Linux distributions already move qdoc3 to that place for exactly this reason anyway. Reviewed-by: Marius Storm-Olsen --- .gitignore | 1 + .hgignore | 1 + doc/doc.pri | 4 ++-- tools/qdoc3/qdoc3.pro | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f088c69..57a1b84 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ bin/lconvert* bin/moc* bin/pixeltool* bin/qmake* +bin/qdoc3* bin/qt3to4* bin/qtdemo* bin/rcc* diff --git a/.hgignore b/.hgignore index eb6ff05..ba5a1b0 100755 --- a/.hgignore +++ b/.hgignore @@ -41,6 +41,7 @@ bin/lupdate* bin/moc* bin/pixeltool* bin/qmake* +bin/qdoc3* bin/qt3to4* bin/qtdemo* bin/rcc* diff --git a/doc/doc.pri b/doc/doc.pri index 13d481f..66953e6 100644 --- a/doc/doc.pri +++ b/doc/doc.pri @@ -14,9 +14,9 @@ win32:!win32-g++ { } $$unixstyle { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/tools/qdoc3/qdoc3 $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QT_BUILD_TREE/bin/qdoc3 $$DOCS_GENERATION_DEFINES } else { - QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/tools/qdoc3/qdoc3.exe $$DOCS_GENERATION_DEFINES + QDOC = cd $$QT_SOURCE_TREE/tools/qdoc3/test && set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QT_BUILD_TREE/bin/qdoc3.exe $$DOCS_GENERATION_DEFINES QDOC = $$replace(QDOC, "/", "\\") } macx { diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro index 49a16e6..21b3bb9 100644 --- a/tools/qdoc3/qdoc3.pro +++ b/tools/qdoc3/qdoc3.pro @@ -7,6 +7,7 @@ DEFINES += QT_NO_CAST_TO_ASCII QT = core xml CONFIG += console CONFIG -= debug_and_release_target +DESTDIR = $$QT_BUILD_TREE/bin #CONFIG += debug build_all:!build_pass { CONFIG -= build_all -- cgit v0.12 From 161b86b962f3bfb3e9663eaf3e00bd6849f03211 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 21 Aug 2009 12:34:44 +0200 Subject: rename QEventTransition::eventObject to eventSource eventObject was a horrible name. The documentation already used the term "event source", so let's call it that. Agreed with Eskil. --- src/corelib/statemachine/qeventtransition.cpp | 6 +++--- src/corelib/statemachine/qeventtransition.h | 6 +++--- tests/auto/qstatemachine/tst_qstatemachine.cpp | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/corelib/statemachine/qeventtransition.cpp b/src/corelib/statemachine/qeventtransition.cpp index e2d1f69..89dabde 100644 --- a/src/corelib/statemachine/qeventtransition.cpp +++ b/src/corelib/statemachine/qeventtransition.cpp @@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE */ /*! - \property QEventTransition::eventObject + \property QEventTransition::eventSource \brief the event source that this event transition is associated with */ @@ -205,7 +205,7 @@ void QEventTransition::setEventType(QEvent::Type type) /*! Returns the event source associated with this event transition. */ -QObject *QEventTransition::eventObject() const +QObject *QEventTransition::eventSource() const { Q_D(const QEventTransition); return d->object; @@ -215,7 +215,7 @@ QObject *QEventTransition::eventObject() const Sets the event source associated with this event transition to be the given \a object. */ -void QEventTransition::setEventObject(QObject *object) +void QEventTransition::setEventSource(QObject *object) { Q_D(QEventTransition); if (d->object == object) diff --git a/src/corelib/statemachine/qeventtransition.h b/src/corelib/statemachine/qeventtransition.h index 6cf6a96..941bfa5 100644 --- a/src/corelib/statemachine/qeventtransition.h +++ b/src/corelib/statemachine/qeventtransition.h @@ -57,15 +57,15 @@ class QEventTransitionPrivate; class Q_CORE_EXPORT QEventTransition : public QAbstractTransition { Q_OBJECT - Q_PROPERTY(QObject* eventObject READ eventObject WRITE setEventObject) + Q_PROPERTY(QObject* eventSource READ eventSource WRITE setEventSource) Q_PROPERTY(QEvent::Type eventType READ eventType WRITE setEventType) public: QEventTransition(QState *sourceState = 0); QEventTransition(QObject *object, QEvent::Type type, QState *sourceState = 0); ~QEventTransition(); - QObject *eventObject() const; - void setEventObject(QObject *object); + QObject *eventSource() const; + void setEventSource(QObject *object); QEvent::Type eventType() const; void setEventType(QEvent::Type type); diff --git a/tests/auto/qstatemachine/tst_qstatemachine.cpp b/tests/auto/qstatemachine/tst_qstatemachine.cpp index 9fd6b5d..56b5f02 100644 --- a/tests/auto/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/qstatemachine/tst_qstatemachine.cpp @@ -2066,7 +2066,7 @@ void tst_QStateMachine::eventTransitions() QPushButton button2; machine.start(); QCoreApplication::processEvents(); - trans->setEventObject(&button2); + trans->setEventSource(&button2); QTest::mousePress(&button2, Qt::LeftButton); QTRY_COMPARE(finishedSpy.count(), 4); } @@ -2078,16 +2078,16 @@ void tst_QStateMachine::eventTransitions() QEventTransition *trans; if (x == 0) { trans = new QEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::MouseButtonPress); trans->setTargetState(s1); } else if (x == 1) { trans = new QEventTransition(&button, QEvent::MouseButtonPress); trans->setTargetState(s1); } - QCOMPARE(trans->eventObject(), (QObject*)&button); + QCOMPARE(trans->eventSource(), (QObject*)&button); QCOMPARE(trans->eventType(), QEvent::MouseButtonPress); QCOMPARE(trans->targetState(), (QAbstractState*)s1); s0->addTransition(trans); @@ -2108,10 +2108,10 @@ void tst_QStateMachine::eventTransitions() QFinalState *s1 = new QFinalState(&machine); QMouseEventTransition *trans = new QMouseEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); QCOMPARE(trans->button(), Qt::NoButton); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::MouseButtonPress); trans->setButton(Qt::LeftButton); trans->setTargetState(s1); @@ -2155,10 +2155,10 @@ void tst_QStateMachine::eventTransitions() QFinalState *s1 = new QFinalState(&machine); QKeyEventTransition *trans = new QKeyEventTransition(); - QCOMPARE(trans->eventObject(), (QObject*)0); + QCOMPARE(trans->eventSource(), (QObject*)0); QCOMPARE(trans->eventType(), QEvent::None); QCOMPARE(trans->key(), 0); - trans->setEventObject(&button); + trans->setEventSource(&button); trans->setEventType(QEvent::KeyPress); trans->setKey(Qt::Key_A); trans->setTargetState(s1); -- cgit v0.12 From c2688467c1b9b3543627a7fbb2382a95580b2f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 21 Aug 2009 12:34:46 +0200 Subject: Removed PBO texture upload from QGLContextPrivate::bindTexture(). The PBO code path causes a crash on certain AMD graphics cards, plus seems to perform worse than the straight forward glTexImage2D code path on several configurations. Task-number: 257353 Reviewed-by: Gunnar Sletta --- src/opengl/qgl.cpp | 44 ++++---------------------------------------- src/opengl/qgl_p.h | 1 - 2 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index e031fb5..af807dd 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1302,7 +1302,6 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) #if defined(QT_OPENGL_ES) eglContext = 0; #endif - pbo = 0; fbo = 0; crWin = false; initDone = false; @@ -1646,12 +1645,6 @@ QGLContext::~QGLContext() void QGLContextPrivate::cleanup() { - Q_Q(QGLContext); - if (pbo) { - QGLContext *ctx = q; - glDeleteBuffers(1, &pbo); - pbo = 0; - } } typedef QHash QGLDDSCache; @@ -1915,14 +1908,6 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G QGLContext *ctx = q; - bool use_pbo = false; - if (QGLExtensions::glExtensions & QGLExtensions::PixelBufferObject) { - - use_pbo = qt_resolve_buffer_extensions(ctx); - if (use_pbo && pbo == 0) - glGenBuffers(1, &pbo); - } - // the GL_BGRA format is only present in GL version >= 1.2 GLenum texture_format = (QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_2) ? GL_BGRA : GL_RGBA; @@ -1957,20 +1942,10 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G glTexParameterf(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE); #endif glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); - - // Mipmap generation causes huge slowdown with PBO's for some reason - use_pbo = false; } else { glTexParameterf(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); } - uchar *ptr = 0; - if (use_pbo) { - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, pbo); - glBufferData(GL_PIXEL_UNPACK_BUFFER_ARB, img.width() * img.height() * 4, 0, GL_STREAM_DRAW_ARB); - ptr = reinterpret_cast(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_WRITE_ONLY_ARB)); - } - QImage::Format target_format = img.format(); // Note: the clean param is only true when a texture is bound // from the QOpenGLPaintEngine - in that case we have to force @@ -1980,21 +1955,10 @@ QGLTexture* QGLContextPrivate::bindTexture(const QImage &image, GLenum target, G if (img.format() != target_format) img = img.convertToFormat(target_format); - if (ptr) { - QImage buffer(ptr, img.width(), img.height(), target_format); - convertToGLFormatHelper(buffer, img, texture_format); - glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB); - glTexImage2D(target, 0, format, img.width(), img.height(), 0, texture_format, - GL_UNSIGNED_BYTE, 0); - } else { - QImage tx(scale ? QSize(tx_w, tx_h) : img.size(), target_format); - convertToGLFormatHelper(tx, img, texture_format); - glTexImage2D(target, 0, format, tx.width(), tx.height(), 0, texture_format, - GL_UNSIGNED_BYTE, tx.bits()); - } - - if (use_pbo) - glBindBuffer(GL_PIXEL_UNPACK_BUFFER_ARB, 0); + QImage tx(scale ? QSize(tx_w, tx_h) : img.size(), target_format); + convertToGLFormatHelper(tx, img, texture_format); + glTexImage2D(target, 0, format, tx.width(), tx.height(), 0, texture_format, + GL_UNSIGNED_BYTE, tx.bits()); // this assumes the size of a texture is always smaller than the max cache size int cost = img.width()*img.height()*4/1024; diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 92aea6c..ab040ed 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -252,7 +252,6 @@ public: #endif QGLFormat glFormat; QGLFormat reqFormat; - GLuint pbo; GLuint fbo; uint valid : 1; -- cgit v0.12 From fb2296e84379b03176a52527ec956cd9b34dc058 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 5 Aug 2009 20:12:03 +0200 Subject: Fix QGLWidget::showFullScreen() on X11/EGL It seems the winId can change during a WindowStateChange event too. Reviewed-By: Trustme --- src/opengl/qgl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index af807dd..d3c0bf1 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -3373,12 +3373,15 @@ bool QGLWidget::event(QEvent *e) setContext(new QGLContext(d->glcx->requestedFormat(), this)); // ### recreating the overlay isn't supported atm } + } + #if defined(QT_OPENGL_ES) - // The window may have been re-created during re-parent - if so, the EGL + if ((e->type() == QEvent::ParentChange) || (e->type() == QEvent::WindowStateChange)) { + // The window may have been re-created during re-parent or state change - if so, the EGL // surface will need to be re-created. d->recreateEglSurface(false); -#endif } +#endif #elif defined(Q_WS_WIN) if (e->type() == QEvent::ParentChange) { QGLContext *newContext = new QGLContext(d->glcx->requestedFormat(), this); -- cgit v0.12 From 07b0bf308e65786c3d72de55b30590c3e8e3133c Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 6 Aug 2009 15:26:21 +0200 Subject: Add a static QEglProperties::dumpAllConfigs() This is private API Reviewed-By: Trustme --- src/gui/egl/qeglproperties.cpp | 14 ++++++++++++++ src/gui/egl/qeglproperties_p.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 22b55fe..7b582c4 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -257,6 +257,20 @@ static void addTag(QString& str, const QString& tag) str += tag; } +void QEglProperties::dumpAllConfigs() +{ + EGLint count = 0; + eglGetConfigs(QEglContext::defaultDisplay(0), 0, 0, &count); + if (count < 1) + return; + + EGLConfig *configs = new EGLConfig [count]; + eglGetConfigs(QEglContext::defaultDisplay(0), configs, count, &count); + for (EGLint index = 0; index < count; ++index) + qWarning() << QEglProperties(configs[index]).toString(); + delete [] configs; +} + // Convert a property list to a string suitable for debug output. QString QEglProperties::toString() const { diff --git a/src/gui/egl/qeglproperties_p.h b/src/gui/egl/qeglproperties_p.h index 4ef3814..383a873 100644 --- a/src/gui/egl/qeglproperties_p.h +++ b/src/gui/egl/qeglproperties_p.h @@ -130,6 +130,8 @@ public: QString toString() const; + static void dumpAllConfigs(); + private: QVarLengthArray props; }; -- cgit v0.12 From bb49724be3439311c539a7f5bb0014c5fd83f375 Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Thu, 6 Aug 2009 15:28:48 +0200 Subject: Make QEglContext::extensions() static This is private API Reviewed-By: Trustme --- src/gui/egl/qegl.cpp | 2 +- src/gui/egl/qegl_p.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 9d0ead1..f0df0c9 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -402,7 +402,7 @@ void QEglContext::dumpAllConfigs() QString QEglContext::extensions() { - const char* exts = eglQueryString(dpy, EGL_EXTENSIONS); + const char* exts = eglQueryString(QEglContext::defaultDisplay(0), EGL_EXTENSIONS); return QString(QLatin1String(exts)); } diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index b29937b..9412887 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -122,8 +122,8 @@ public: void dumpAllConfigs(); - QString extensions(); - bool hasExtension(const char* extensionName); + static QString extensions(); + static bool hasExtension(const char* extensionName); private: QEgl::API apiType; -- cgit v0.12 From 500ee5b8888eed68f3d237c498c56ef0ebb9795e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 21 Aug 2009 13:07:45 +0200 Subject: qdoc: Redesigned the Class and Function Documentation page. --- doc/src/classes.qdoc | 123 +++++++++++++---------- doc/src/classes/exportedfunctions.qdoc | 6 +- doc/src/index.qdoc | 2 +- doc/src/legal/commercialeditions.qdoc | 12 ++- doc/src/modules.qdoc | 52 +++++----- doc/src/platforms/winsystem.qdoc | 4 +- src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc | 2 +- src/corelib/global/qendian.qdoc | 2 +- src/corelib/global/qglobal.cpp | 10 +- src/corelib/tools/qalgorithms.qdoc | 4 +- tools/qdoc3/htmlgenerator.cpp | 7 +- tools/qdoc3/node.h | 2 + 12 files changed, 129 insertions(+), 97 deletions(-) diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc index 864445f..24acce1 100644 --- a/doc/src/classes.qdoc +++ b/doc/src/classes.qdoc @@ -41,58 +41,85 @@ /*! \group classlists - \title Class and Function Indexes - \brief Collections of classes and functions grouped together into lists. + \title Class and Function Documentation + \brief Lists and Indexes of classes, functions, and types. - The following documents contain collections of classes, grouped by - subject area or related to particular functionality, or comprehensive - lists of classes and functions. + Links to indexes and lists for finding class and function + reference documentation. + + \section2 Class Lists + + \annotatedlist classlists + + \section2 Function Lists + + \annotatedlist funclists - \generatelist{related} */ /*! - \group groups - \title Grouped Classes + \page classes.html + \title All Qt Classes (main index) \ingroup classlists - This page provides a way of navigating Qt's classes by grouping - related classes together. Some classes may appear in more than one group. + \brief If you know the name of the class you want, find it here. - \generatelist{related} + This is a list of all Qt classes. For a list of the classes + provided for compatibility with Qt3, see \l{Qt3 Support + Classes}. For classes that have been deprecated, see the + \l{Obsolete Classes} list. + + \generatelist classes + \sa {Qt3 Support Classes}, {All Qt Modules}, {Obsolete Classes} */ /*! - \page classes.html - \title Qt's Classes + \page annotated.html + \title Annotated Class List \ingroup classlists - This is a list of all Qt classes. For a list of the classes provided - for compatibility with Qt3, see \l{Qt 3 compatibility classes}. For - classes that have been deprecated, see the \l{Obsolete Classes} list. + \brief If you don't know the name of the class you want, but you + know what the class should do, you might try looking here. - \generatelist classes + Qt classes with brief descriptions: - \sa {Qt 3 Compatibility Classes}, {Qt's Modules}, {Obsolete Classes} + \generatelist annotatedclasses */ /*! - \page namespaces.html - \title Qt's Namespaces + \group groups + \title Groups Of Related Classes \ingroup classlists - This is a list of the main namespaces in Qt. For a list of classes in - Qt, see \l{Qt's Classes}. + \brief If you know what kind of class you want (GUI, painting, + I.O, etc), look here. - \generatelist{namespaces} + This is a list of functional groups of Qt classes. A class can + appear in more than one functional group. + + \generatelist{related} + +*/ + +/*! + \page hierarchy.html + + \title Inheritance Hierarchy + \ingroup classlists + + \brief The C++ class inheritance hierarchy for all classes in the + Qt API. + + \generatelist classhierarchy */ /*! \page obsoleteclasses.html \title Obsolete Classes \ingroup classlists - + + \brief These classes are obsolete and should not be used in new code. This is a list of Qt classes that are obsolete (deprecated). These classes are provided to keep old source code working but they are @@ -101,52 +128,46 @@ \generatelist obsoleteclasses - \sa {Qt's Classes}, {Qt's Modules} */ /*! - \page annotated.html - \title Annotated Class Index + \page compatclasses.html + \title Qt3 Support Classes \ingroup classlists - Qt's classes with brief descriptions: + \brief These classes ease the porting of code from Qt 3 to Qt 4. - \generatelist annotatedclasses -*/ - -/*! - \page functions.html - \title Member Function Index - \ingroup classlists + These are the classes that Qt provides for compatibility with Qt + 3. Most of these are provided by the Qt3Support module. - Here is the list of all the documented member functions in the Qt - API with links to the class documentation for each function. + \generatelist compatclasses - \generatelist functionindex */ /*! - \page hierarchy.html + \page functions.html + \title All Functions (main index) + \ingroup funclists - \title Class Inheritance Hierarchy - \ingroup classlists + \brief All documented Qt functions listed alphabetically with a + link to where each one is declared. - This list shows the C++ class inheritance relations between the - classes in the Qt API. + This is the list of all documented member functions and global + functions in the Qt API. Each function has a link to the class or + header file where it is declared and documented. - \generatelist classhierarchy + \generatelist functionindex */ + /*! - \page compatclasses.html - \title Qt 3 Compatibility Classes + \page namespaces.html + \title All Qt Namespaces \ingroup classlists - This is a list of the classes that Qt provides for compatibility - with Qt 3. The vast majority of these are provided by the - Qt3Support module. + \brief A Qt namespace contains enum types, functions, and sometimes classes. - \generatelist compatclasses + This is a list of the main namespaces in Qt. - \sa {Qt's Classes}, {Qt's Modules} + \generatelist{namespaces} */ diff --git a/doc/src/classes/exportedfunctions.qdoc b/doc/src/classes/exportedfunctions.qdoc index c51ace4..a0e3904 100644 --- a/doc/src/classes/exportedfunctions.qdoc +++ b/doc/src/classes/exportedfunctions.qdoc @@ -41,8 +41,10 @@ /*! \page exportedfunctions.html - \title Special-Purpose Global Functions Exported by Qt - \ingroup classlists + \title Platform-Specific Functions + \ingroup funclists + + \brief Exported functions for fine tuning Qt applications. Qt provides a few low-level global functions for fine-tuning applications. Most of these perform very specific tasks and are diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index b0695b8..4d92157 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -81,7 +81,7 @@ diff --git a/doc/src/legal/commercialeditions.qdoc b/doc/src/legal/commercialeditions.qdoc index 761a53b..93dc194 100644 --- a/doc/src/legal/commercialeditions.qdoc +++ b/doc/src/legal/commercialeditions.qdoc @@ -91,8 +91,8 @@ following pages: \list - \o \l{Qt GUI Framework Edition Classes} - \o \l{Qt Full Framework Edition Classes} + \o \l{Qt GUI Framework Edition} + \o \l{Qt Full Framework Edition} \endlist Please see the \l{Supported Platforms}{list of supported @@ -119,16 +119,20 @@ /*! \page full-framework-edition-classes.html - \title Qt Full Framework Edition Classes + \title Qt Full Framework Edition \ingroup classlists + \brief The list of Qt classes included in the Full Framework Edition. + \generatelist{classesbyedition Desktop} */ /*! \page gui-framework-edition-classes.html - \title Qt GUI Framework Edition Classes + \title Qt GUI Framework Edition \ingroup classlists + \brief The list of Qt classes included in the GUI Framework Edition. + \generatelist{classesbyedition DesktopLight} */ diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc index 2fc6eaf..786122e 100644 --- a/doc/src/modules.qdoc +++ b/doc/src/modules.qdoc @@ -41,14 +41,14 @@ /*! \group modules - \title Qt's Modules + \title All Qt Modules \startpage index.html Qt Reference Documentation \nextpage QtCore \ingroup classlists - Qt 4 consists of several modules, each of which lives in a - separate library. + \brief Qt 4 comprises several modules. Each module is a separate + library. \table 80% \header \o {2,1} \bold{Modules for general software development} @@ -89,14 +89,14 @@ or other build tools such as CMake, you also need to link against the \c qtmain library. - \sa {Qt's Classes} + \sa {Class and Function Documentation} */ /*! \module QtCore \title QtCore Module - \contentspage Qt's Modules - \previouspage Qt's Modules + \contentspage All Qt Modules + \previouspage All Qt Modules \nextpage QtGui \ingroup modules @@ -116,7 +116,7 @@ /*! \module QtGui \title QtGui Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtCore \nextpage QtNetwork \ingroup modules @@ -135,7 +135,7 @@ /*! \module QtMultimedia \title QtMultimedia Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtCore \nextpage QtNetwork \ingroup modules @@ -159,7 +159,7 @@ /*! \module QtNetwork \title QtNetwork Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtMultimedia \nextpage QtOpenGL \ingroup modules @@ -184,7 +184,7 @@ /*! \module QtOpenGL \title QtOpenGL Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtNetwork \nextpage QtOpenVG \ingroup modules @@ -236,7 +236,7 @@ \module QtOpenVG \title QtOpenVG Module \since 4.6 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtOpenGL \nextpage QtScript \ingroup modules @@ -291,7 +291,7 @@ \module QtScript \title QtScript Module \since 4.3 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtOpenVG \nextpage QtScriptTools \ingroup modules @@ -321,7 +321,7 @@ \module QtScriptTools \title QtScriptTools Module \since 4.5 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtScript \nextpage QtSql \ingroup modules @@ -350,7 +350,7 @@ /*! \module QtSql \title QtSql Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtScript \nextpage QtSvg \ingroup modules @@ -373,7 +373,7 @@ \module QtSvg \title QtSvg Module \since 4.1 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtSql \nextpage QtWebKit \ingroup modules @@ -428,7 +428,7 @@ /*! \module QtXml \title QtXml Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtSvg \nextpage QtXmlPatterns \ingroup modules @@ -458,7 +458,7 @@ \module QtXmlPatterns \title QtXmlPatterns Module \since 4.4 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtXml \nextpage Phonon Module \ingroup modules @@ -533,7 +533,7 @@ \page phonon-module.html \module Phonon \title Phonon Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtXmlPatterns \nextpage Qt3Support \ingroup modules @@ -604,7 +604,7 @@ /*! \module Qt3Support \title Qt3Support Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage Phonon Module \nextpage QtDesigner \ingroup modules @@ -645,7 +645,7 @@ /*! \module QtDesigner \title QtDesigner Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage Qt3Support \nextpage QtUiTools \ingroup modules @@ -676,7 +676,7 @@ \module QtUiTools \title QtUiTools Module \since 4.1 - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtDesigner \nextpage QtHelp \ingroup modules @@ -716,7 +716,7 @@ /*! \module QtHelp \title QtHelp Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtUiTools \nextpage QtTest \ingroup modules @@ -779,7 +779,7 @@ /*! \module QtTest \title QtTest Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtHelp \nextpage QAxContainer \ingroup modules @@ -809,7 +809,7 @@ /*! \module QAxContainer \title QAxContainer Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtTest \nextpage QAxServer \ingroup modules @@ -859,7 +859,7 @@ /*! \module QAxServer \title QAxServer Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QAxContainer \nextpage QtDBus module \ingroup modules @@ -909,7 +909,7 @@ /*! \module QtDBus \title QtDBus module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QAxServer \ingroup modules diff --git a/doc/src/platforms/winsystem.qdoc b/doc/src/platforms/winsystem.qdoc index 5afa1f7..c20973b 100644 --- a/doc/src/platforms/winsystem.qdoc +++ b/doc/src/platforms/winsystem.qdoc @@ -51,8 +51,8 @@ appropriate \c{#ifdef} directives (see below). Qt provides a few low-level global functions for fine-tuning - applications on specific platforms. See \l{Special-Purpose Global - Functions Exported by Qt} for details. + applications on specific platforms. See \l{Platform-Specific + Functions} for details. \tableofcontents diff --git a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc index 144feb5..e3c904b 100644 --- a/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc +++ b/src/3rdparty/webkit/WebKit/qt/docs/qtwebkit.qdoc @@ -1,7 +1,7 @@ /*! \module QtWebKit \title QtWebKit Module - \contentspage Qt's Modules + \contentspage All Qt Modules \previouspage QtSvg \nextpage QtXml \ingroup modules diff --git a/src/corelib/global/qendian.qdoc b/src/corelib/global/qendian.qdoc index e0ef662..949f7b8 100644 --- a/src/corelib/global/qendian.qdoc +++ b/src/corelib/global/qendian.qdoc @@ -42,7 +42,7 @@ /*! \headerfile \title Endian Conversion Functions - \ingroup classlists + \ingroup funclists \brief The header provides functions to convert between little and big endian representations of numbers. */ diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 81a5ae5..5fe2b2f 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -401,13 +401,13 @@ QT_BEGIN_NAMESPACE /*! \headerfile \title Global Qt Declarations - \ingroup classlists + \ingroup funclists - \brief The header provides basic declarations and - is included by all other Qt headers. + \brief The header file includes the fundamental global + declarations. It is included by most other Qt header files. - The declarations include \l {types}, \l functions and - \l macros. + The global declarations include \l{types}, \l{functions} and + \l{macros}. The type definitions are partly convenience definitions for basic types (some of which guarantee certain bit-sizes on all platforms diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index f7b7798..771c544 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -42,9 +42,9 @@ /*! \headerfile \title Generic Algorithms - \ingroup classlists + \ingroup funclists - \brief The header provides generic template-based algorithms. + \brief The header includes the generic, template-based algorithms. Qt provides a number of global template functions in \c that work on containers and perform well-know diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 84e330f..3d62d7c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -539,12 +539,15 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::AnnotatedList: { + //qDebug() << "ANNOTATED LIS:"; QList values = tre->groups().values(atom->string()); QMap nodeMap; for (int i = 0; i < values.size(); ++i) { const Node* n = values.at(i); - if ((n->status() != Node::Internal) && (n->access() != Node::Private)) - nodeMap.insert(n->name(),n); + if ((n->status() != Node::Internal) && (n->access() != Node::Private)) { + nodeMap.insert(n->nameForLists(),n); + //qDebug() << " " << n->nameForLists(); + } } generateAnnotatedList(relative, marker, nodeMap); } diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 0cddf51..e956fed 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -157,6 +157,7 @@ class Node QMap > links() const { return linkMap; } QString moduleName() const; QString url() const; + virtual QString nameForLists() const { return nam; } Access access() const { return acc; } const Location& location() const { return loc; } @@ -337,6 +338,7 @@ class FakeNode : public InnerNode QString fullTitle() const; QString subTitle() const; const NodeList &groupMembers() const { return gr; } + virtual QString nameForLists() const { return title(); } private: SubType sub; -- cgit v0.12 From 44cec68758cc0e5a31cddc7aaccc9c0cbcfbab4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Fri, 21 Aug 2009 12:28:02 +0200 Subject: Add documentation for Qt::AnchorPoint --- src/corelib/global/qnamespace.qdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index d1c16e5..669fc53 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2422,6 +2422,24 @@ */ /*! + \enum Qt::AnchorPoint + + Specifies a side of a layout item that can be anchored. This is used by + QGraphicsAnchorLayout. + + \value AnchorLeft The left side of a layout item. + \value AnchorHorizontalCenter A "virtual" side that is centered between the left and the + right side of a layout item. + \value AnchorRight The right side of a layout item. + \value AnchorTop The top side of a layout item. + \value AnchorVerticalCenter A "virtual" side that is centered between the top and the + bottom side of a layout item. + \value AnchorBottom The bottom side of a layout item. + + \sa QGraphicsAnchorLayout +*/ + +/*! \enum Qt::InputMethodHint \value ImhNone No hints. -- cgit v0.12 From 4aa4111864df9e8a7917b021d6e31214e8c7a0bd Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 21 Aug 2009 13:29:13 +0200 Subject: qdoc: Moved javascripts for search box from header to footer. This is meant to speed up loading the landing page. But does it work? --- tools/qdoc3/test/qt-html-templates.qdocconf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index f31e657..f9e3c35 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -22,12 +22,6 @@ HTML.postheader = "" \ "" \ "" \ - \ - "" \ - "" \ - "" \ - \ - ""\ "\n" \ "
" @@ -36,4 +30,10 @@ HTML.footer = "


\n" \ "Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)\n" \ "Trademarks\n" \ "
Qt \\version
\n" \ + \ + "" \ + "" \ + "" \ + \ + ""\ "
" -- cgit v0.12 From f5f89d34fa98600a95c4b1b8b62bd794ab8c8e3b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 20 Aug 2009 18:25:32 +0200 Subject: Optimize contrcuction of variant of type pointer. Constructing a variant of a pointer type was previously quite slow: QVariant had no information it was a pointer. It had to create a QVariant::PrivateShared, ask the QMetaType for a constructor (slow as it involve locking mutextes) and allocate a pointer. By detecting a pointer in qVariantFromValue, we can store the pointer value dirrectly in the Variant union. We then avoid 2 allocations, and the expensive locking in QMetaType::construct Reviewed-by: Thierry --- src/corelib/kernel/qvariant.cpp | 32 +++++++++++++++++++++++++------- src/corelib/kernel/qvariant.h | 5 +++-- tests/auto/qvariant/tst_qvariant.cpp | 1 + 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index 533ccd7..a91fb75 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -456,15 +456,17 @@ static bool compare(const QVariant::Private *a, const QVariant::Private *b) if (!QMetaType::isRegistered(a->type)) qFatal("QVariant::compare: type %d unknown to QVariant.", a->type); + const void *a_ptr = a->is_shared ? a->data.shared->ptr : &(a->data.ptr); + const void *b_ptr = b->is_shared ? b->data.shared->ptr : &(b->data.ptr); + /* The reason we cannot place this test in a case branch above for the types * QMetaType::VoidStar, QMetaType::QObjectStar and so forth, is that it wouldn't include * user defined pointer types. */ const char *const typeName = QMetaType::typeName(a->type); if (typeName[qstrlen(typeName) - 1] == '*') - return *static_cast(a->data.shared->ptr) == - *static_cast(b->data.shared->ptr); + return *static_cast(a_ptr) == *static_cast(b_ptr); - return a->data.shared->ptr == b->data.shared->ptr; + return a_ptr == b_ptr; } /*! @@ -1371,7 +1373,7 @@ void QVariant::create(int type, const void *copy) QVariant::~QVariant() { - if (d.type > Char && d.type != QMetaType::Float && d.type != QMetaType::QObjectStar && (!d.is_shared || !d.data.shared->ref.deref())) + if ((d.is_shared && !d.data.shared->ref.deref()) || (!d.is_shared && d.type > Char && d.type < UserType)) handler->clear(&d); } @@ -1387,7 +1389,7 @@ QVariant::QVariant(const QVariant &p) { if (d.is_shared) { d.data.shared->ref.ref(); - } else if (p.d.type > Char && p.d.type != QMetaType::Float && p.d.type != QMetaType::QObjectStar) { + } else if (p.d.type > Char && p.d.type < QVariant::UserType) { handler->construct(&d, p.constData()); d.is_null = p.d.is_null; } @@ -1627,6 +1629,22 @@ QVariant::QVariant(Type type) { create(type, 0); } QVariant::QVariant(int typeOrUserType, const void *copy) { create(typeOrUserType, copy); d.is_null = false; } + +/*! \internal + flags is true if it is a pointer type + */ +QVariant::QVariant(int typeOrUserType, const void *copy, uint flags) +{ + if (flags) { //type is a pointer type + d.type = typeOrUserType; + d.data.ptr = *reinterpret_cast(copy); + d.is_null = false; + } else { + create(typeOrUserType, copy); + d.is_null = false; + } +} + QVariant::QVariant(int val) { d.is_null = false; d.type = Int; d.data.i = val; } QVariant::QVariant(uint val) @@ -1743,7 +1761,7 @@ QVariant& QVariant::operator=(const QVariant &variant) if (variant.d.is_shared) { variant.d.data.shared->ref.ref(); d = variant.d; - } else if (variant.d.type > Char && variant.d.type != QMetaType::Float && variant.d.type != QMetaType::QObjectStar) { + } else if (variant.d.type > Char && variant.d.type < UserType) { d.type = variant.d.type; handler->construct(&d, variant.constData()); d.is_null = variant.d.is_null; @@ -1797,7 +1815,7 @@ const char *QVariant::typeName() const */ void QVariant::clear() { - if (!d.is_shared || !d.data.shared->ref.deref()) + if ((d.is_shared && !d.data.shared->ref.deref()) || (!d.is_shared && d.type < UserType && d.type > Char)) handler->clear(&d); d.type = Invalid; d.is_null = true; diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index d6a704e..97af54b 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -174,6 +174,7 @@ class Q_CORE_EXPORT QVariant ~QVariant(); QVariant(Type type); QVariant(int typeOrUserType, const void *copy); + QVariant(int typeOrUserType, const void *copy, uint flags); QVariant(const QVariant &other); #ifndef QT_NO_DATASTREAM @@ -445,7 +446,7 @@ inline bool qvariant_cast_helper(const QVariant &v, QVariant::Type tp, void *ptr template inline QVariant qVariantFromValue(const T &t) { - return QVariant(qMetaTypeId(reinterpret_cast(0)), &t); + return QVariant(qMetaTypeId(reinterpret_cast(0)), &t, QTypeInfo::isPointer); } template <> @@ -464,7 +465,7 @@ inline void qVariantSetValue(QVariant &v, const T &t) old->~T(); new (old) T(t); //call the copy constructor } else { - v = QVariant(type, &t); + v = QVariant(type, &t, QTypeInfo::isPointer); } } diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 709cba9..1722ad3 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -2747,6 +2747,7 @@ void tst_QVariant::dataStar() const v2 = qVariantFromValue(p1); QVERIFY(v1 == v2); + delete p1; } void tst_QVariant::canConvertQStringList() const -- cgit v0.12 From d1ced31e867f7e2bbd56daf46c7bf3cc924c8546 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 21 Aug 2009 12:48:35 +0200 Subject: Fix memory leak When the variant is invalid the shared is not destroyed. We even can avoid the creation of the PrivateShared if we know the variant is invalid Reviewed-by: Thierry --- src/corelib/kernel/qvariant.cpp | 9 ++++++--- tests/auto/qvariant/tst_qvariant.cpp | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index a91fb75..9adfa57 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -174,10 +174,13 @@ static void construct(QVariant::Private *x, const void *copy) case QVariant::UserType: break; default: - x->is_shared = true; - x->data.shared = new QVariant::PrivateShared(QMetaType::construct(x->type, copy)); - if (!x->data.shared->ptr) + void *ptr = QMetaType::construct(x->type, copy); + if (!ptr) { x->type = QVariant::Invalid; + } else { + x->is_shared = true; + x->data.shared = new QVariant::PrivateShared(ptr); + } break; } x->is_null = !copy; diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp index 1722ad3..5ed0dcd 100644 --- a/tests/auto/qvariant/tst_qvariant.cpp +++ b/tests/auto/qvariant/tst_qvariant.cpp @@ -2622,7 +2622,7 @@ void tst_QVariant::qvariant_cast_QObject_data() { QTest::addColumn("data"); QTest::addColumn("success"); - QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject) << true; + QTest::newRow("from QObject") << QVariant(QMetaType::QObjectStar, new QObject(this)) << true; QTest::newRow("from String") << QVariant(QLatin1String("1, 2, 3")) << false; QTest::newRow("from int") << QVariant((int) 123) << false; } -- cgit v0.12 From 508b447075fb852e61ddf88c92c9099dad292747 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Fri, 21 Aug 2009 13:35:29 +0200 Subject: get rid of qmake warnings when parsing script.pro (JavaScriptCore.pri) --- src/script/script.pro | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/script/script.pro b/src/script/script.pro index 9d4813e..03dc341 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -37,6 +37,15 @@ wince* { LIBS += -lmmtimer } +# avoid warnings when parsing JavaScriptCore.pri +# (we don't care about generating files, we already have them generated) +defineTest(addExtraCompiler) { + return(true) +} +defineTest(addExtraCompilerWithHeader) { + return(true) +} + include($$WEBKITDIR/JavaScriptCore/JavaScriptCore.pri) INCLUDEPATH += $$WEBKITDIR/JavaScriptCore -- cgit v0.12