diff options
37 files changed, 544 insertions, 92 deletions
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index ec3b5d8..124bc0f 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -88,7 +88,7 @@ UnixMakefileGenerator::init() if(project->isEmpty("QMAKE_LIBTOOL")) project->values("QMAKE_LIBTOOL").append("libtool --silent"); if(project->isEmpty("QMAKE_SYMBOLIC_LINK")) - project->values("QMAKE_SYMBOLIC_LINK").append("ln -sf"); + project->values("QMAKE_SYMBOLIC_LINK").append("ln -f -s"); /* this should probably not be here, but I'm using it to wrap the .t files */ if(project->first("TEMPLATE") == "app") diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h index a9e4378..820f424 100644 --- a/src/corelib/kernel/qmath.h +++ b/src/corelib/kernel/qmath.h @@ -76,6 +76,16 @@ inline int qFloor(qreal v) return int(floor(v)); } +inline qreal qFabs(qreal v) +{ +#ifdef QT_USE_MATH_H_FLOATS + if(sizeof(qreal) == sizeof(float)) + return fabsf(float(v)); + else +#endif + return fabs(v); +} + inline qreal qSin(qreal v) { #ifdef QT_USE_MATH_H_FLOATS @@ -96,6 +106,16 @@ inline qreal qCos(qreal v) return cos(v); } +inline qreal qTan(qreal v) +{ +#ifdef QT_USE_MATH_H_FLOATS + if (sizeof(qreal) == sizeof(float)) + return tanf(float(v)); + else +#endif + return tan(v); +} + inline qreal qAcos(qreal v) { #ifdef QT_USE_MATH_H_FLOATS @@ -106,6 +126,36 @@ inline qreal qAcos(qreal v) return acos(v); } +inline qreal qAsin(qreal v) +{ +#ifdef QT_USE_MATH_H_FLOATS + if (sizeof(qreal) == sizeof(float)) + return asinf(float(v)); + else +#endif + return asin(v); +} + +inline qreal qAtan(qreal v) +{ +#ifdef QT_USE_MATH_H_FLOATS + if(sizeof(qreal) == sizeof(float)) + return atanf(float(v)); + else +#endif + return atan(v); +} + +inline qreal qAtan2(qreal x, qreal y) +{ +#ifdef QT_USE_MATH_H_FLOATS + if(sizeof(qreal) == sizeof(float)) + return atan2f(float(x), float(y)); + else +#endif + return atan2(x, y); +} + inline qreal qSqrt(qreal v) { #ifdef QT_USE_MATH_H_FLOATS @@ -126,6 +176,13 @@ inline qreal qLn(qreal v) return log(v); } +inline qreal qExp(qreal v) +{ + // only one signature + // exists, exp(double) + return exp(v); +} + inline qreal qPow(qreal x, qreal y) { #ifdef QT_USE_MATH_H_FLOATS diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp index f5024bb..98b15e9 100644 --- a/src/gui/dialogs/qprogressdialog.cpp +++ b/src/gui/dialogs/qprogressdialog.cpp @@ -424,10 +424,6 @@ void QProgressDialog::setCancelButton(QPushButton *cancelButton) { Q_D(QProgressDialog); delete d->cancel; -#ifdef QT_SOFTKEYS_ENABLED - delete d->cancelAction; - d->cancelAction = 0; -#endif d->cancel = cancelButton; if (cancelButton) { if (cancelButton->parentWidget() == this) { diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index cf28dc4..6ee4bfc 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -429,7 +429,10 @@ QString QEglContext::extensions() bool QEglContext::hasExtension(const char* extensionName) { - return extensions().contains(QLatin1String(extensionName)); + QList<QByteArray> extensions = + QByteArray(reinterpret_cast<const char *> + (eglQueryString(QEglContext::defaultDisplay(0), EGL_EXTENSIONS))).split(' '); + return extensions.contains(extensionName); } QEglContext *QEglContext::currentContext(QEgl::API api) diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 686096c..6718a28 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -158,7 +158,7 @@ QGraphicsAnchor::~QGraphicsAnchor() \property QGraphicsAnchor::sizePolicy \brief the size policy for the QGraphicsAnchor. - By setting the size policy on an anchor you can configure how the item can resize itself + By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, @@ -247,7 +247,7 @@ QGraphicsAnchorLayout::~QGraphicsAnchorLayout() /*! Creates an anchor between the edge \a firstEdge of item \a firstItem and the edge \a secondEdge - of item \a secondItem. The magnitude of the anchor is picked up from the style. Anchors + of item \a secondItem. The spacing of the anchor is picked up from the style. Anchors between a layout edge and an item edge will have a size of 0. If there is already an anchor between the edges, the the new anchor will replace the old one. diff --git a/src/gui/image/qimagepixmapcleanuphooks.cpp b/src/gui/image/qimagepixmapcleanuphooks.cpp index 650075b..e411cd1 100644 --- a/src/gui/image/qimagepixmapcleanuphooks.cpp +++ b/src/gui/image/qimagepixmapcleanuphooks.cpp @@ -93,11 +93,11 @@ void QImagePixmapCleanupHooks::removeImageHook(_qt_image_cleanup_hook_64 hook) imageHooks.removeAll(hook); } - void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks.count(); ++i) - qt_image_and_pixmap_cleanup_hooks()->pixmapModificationHooks[i](pm); + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) + h->pixmapModificationHooks[i](pm); if (qt_pixmap_cleanup_hook_64) qt_pixmap_cleanup_hook_64(pm->cacheKey()); @@ -105,7 +105,8 @@ void QImagePixmapCleanupHooks::executePixmapModificationHooks(QPixmap* pm) void QImagePixmapCleanupHooks::executePixmapDestructionHooks(QPixmap* pm) { - for (int i = 0; i < qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks.count(); ++i) + QImagePixmapCleanupHooks *h = qt_image_and_pixmap_cleanup_hooks(); + for (int i = 0; i < h->pixmapModificationHooks.count(); ++i) qt_image_and_pixmap_cleanup_hooks()->pixmapDestructionHooks[i](pm); if (qt_pixmap_cleanup_hook_64) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index acfeff8..de6e6cb 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -1625,7 +1625,7 @@ void QAbstractItemView::mousePressEvent(QMouseEvent *event) QPoint offset = d->offset(); if ((command & QItemSelectionModel::Current) == 0) d->pressedPosition = pos + offset; - else if (!indexAt(d->pressedPosition).isValid()) + else if (!indexAt(d->pressedPosition - offset).isValid()) d->pressedPosition = visualRect(currentIndex()).center() + offset; if (edit(index, NoEditTriggers, event)) @@ -2195,7 +2195,7 @@ void QAbstractItemView::keyPressEvent(QKeyEvent *event) // note that we don't check if the new current index is enabled because moveCursor() makes sure it is if (command & QItemSelectionModel::Current) { d->selectionModel->setCurrentIndex(newCurrent, QItemSelectionModel::NoUpdate); - if (!indexAt(d->pressedPosition).isValid()) + if (!indexAt(d->pressedPosition - d->offset()).isValid()) d->pressedPosition = visualRect(oldCurrent).center() + d->offset(); QRect rect(d->pressedPosition - d->offset(), visualRect(newCurrent).center()); setSelection(rect, command); diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 775d773..1acc9b3 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -190,7 +190,7 @@ bool QSoftKeyManager::event(QEvent *e) } QWidget *parent = source->parentWidget(); - if (parent && softKeys.isEmpty()) + if (parent && softKeys.isEmpty() && !source->isWindow()) source = parent; else break; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 443c9c5..30f8c9e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -284,7 +284,7 @@ bool QPainterPrivate::attachPainterPrivate(QPainter *q, QPaintDevice *pdev) // Update matrix. if (q->d_ptr->state->WxF) { - q->d_ptr->state->redirectionMatrix *= q->d_ptr->state->worldMatrix; + q->d_ptr->state->redirectionMatrix = q->d_ptr->state->matrix; q->d_ptr->state->redirectionMatrix.translate(-offset.x(), -offset.y()); q->d_ptr->state->worldMatrix = QTransform(); q->d_ptr->state->WxF = false; diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp index 54f2964..50be342 100644 --- a/src/gui/styles/qwindowsxpstyle.cpp +++ b/src/gui/styles/qwindowsxpstyle.cpp @@ -623,8 +623,7 @@ void QWindowsXPStylePrivate::drawBackground(XPThemeData &themeData) painter->save(); - QMatrix m = painter->matrix(); - bool complexXForm = m.m11() != 1.0 || m.m22() != 1.0 || m.m12() != 0.0 || m.m21() != 0.0; + bool complexXForm = painter->deviceTransform().type() > QTransform::TxTranslate; bool translucentToplevel = false; QPaintDevice *pdev = painter->device(); diff --git a/src/gui/widgets/qlineedit_p.cpp b/src/gui/widgets/qlineedit_p.cpp index d03c003..4437fef 100644 --- a/src/gui/widgets/qlineedit_p.cpp +++ b/src/gui/widgets/qlineedit_p.cpp @@ -103,12 +103,12 @@ void QLineEditPrivate::_q_handleWindowActivate() void QLineEditPrivate::_q_textEdited(const QString &text) { Q_Q(QLineEdit); + emit q->textEdited(text); #ifndef QT_NO_COMPLETER - if (control->completer() && - control->completer()->completionMode() != QCompleter::InlineCompletion) + if (control->completer() + && control->completer()->completionMode() != QCompleter::InlineCompletion) control->complete(-1); // update the popup on cut/paste/del #endif - emit q->textEdited(text); } void QLineEditPrivate::_q_cursorPositionChanged(int from, int to) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 5ada125..94b8aa5 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1495,6 +1495,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) version_flags_cached = false; version_flags = QGLFormat::OpenGL_Version_None; current_fbo = 0; + default_fbo = 0; active_engine = 0; } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 8e472e5..ab72c9c 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -328,6 +328,7 @@ public: GLint max_texture_size; GLuint current_fbo; + GLuint default_fbo; QPaintEngine *active_engine; static inline QGLContextGroup *contextGroup(const QGLContext *ctx) { return ctx->d_ptr->group; } diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index d79283e..d0297c9 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -899,8 +899,8 @@ bool QGLFramebufferObject::release() #endif if (current) { - current->d_ptr->current_fbo = 0; - glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0); + current->d_ptr->current_fbo = current->d_ptr->default_fbo; + glBindFramebuffer(GL_FRAMEBUFFER_EXT, current->d_ptr->default_fbo); } return true; diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp index 2867de5..bcd90a5 100644 --- a/src/opengl/qglpaintdevice.cpp +++ b/src/opengl/qglpaintdevice.cpp @@ -89,6 +89,12 @@ void QGLPaintDevice::beginPaint() ctx->d_ptr->current_fbo = m_thisFBO; glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_thisFBO); } + + // Set the default fbo for the context to m_thisFBO so that + // if some raw GL code between beginNativePainting() and + // endNativePainting() calls QGLFramebufferObject::release(), + // painting will revert to the window surface's fbo. + ctx->d_ptr->default_fbo = m_thisFBO; } void QGLPaintDevice::ensureActiveTarget() @@ -101,6 +107,8 @@ void QGLPaintDevice::ensureActiveTarget() ctx->d_ptr->current_fbo = m_thisFBO; glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_thisFBO); } + + ctx->d_ptr->default_fbo = m_thisFBO; } void QGLPaintDevice::endPaint() @@ -111,6 +119,8 @@ void QGLPaintDevice::endPaint() ctx->d_ptr->current_fbo = m_previousFBO; glBindFramebuffer(GL_FRAMEBUFFER_EXT, m_previousFBO); } + + ctx->d_ptr->default_fbo = 0; } QGLFormat QGLPaintDevice::format() const diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp index 17f2c92..f130087 100644 --- a/src/sql/drivers/oci/qsql_oci.cpp +++ b/src/sql/drivers/oci/qsql_oci.cpp @@ -2200,26 +2200,34 @@ bool QOCIDriver::rollbackTransaction() QStringList QOCIDriver::tables(QSql::TableType type) const { QStringList tl; + QStringList sysUsers = QStringList() << QLatin1String("MDSYS") + << QLatin1String("LBACSYS") + << QLatin1String("SYS") + << QLatin1String("SYSTEM") + << QLatin1String("WKSYS") + << QLatin1String("CTXSYS") + << QLatin1String("WMSYS"); + + QString user = d->user; + if ( isIdentifierEscaped(user, QSqlDriver::TableName)) + user = stripDelimiters(user, QSqlDriver::TableName); + else + user = user.toUpper(); + + if(sysUsers.contains(user)) + sysUsers.removeAll(user);; + if (!isOpen()) return tl; QSqlQuery t(createResult()); t.setForwardOnly(true); if (type & QSql::Tables) { - t.exec(QLatin1String("select owner, table_name from all_tables " - "where owner != 'MDSYS' " - "and owner != 'LBACSYS' " - "and owner != 'SYS' " - "and owner != 'SYSTEM' " - "and owner != 'WKSYS'" - "and owner != 'CTXSYS'" - "and owner != 'WMSYS'")); - - QString user = d->user; - if ( isIdentifierEscaped(user, QSqlDriver::TableName)) - user = stripDelimiters(user, QSqlDriver::TableName); - else - user = user.toUpper(); + QString query = QLatin1String("select owner, table_name from all_tables where "); + QStringList whereList; + foreach(const QString &sysUserName, sysUsers) + whereList << QLatin1String("owner != '") + sysUserName + QLatin1String("' "); + t.exec(query + whereList.join(QLatin1String(" and "))); while (t.next()) { if (t.value(0).toString().toUpper() != user.toUpper()) @@ -2229,30 +2237,21 @@ QStringList QOCIDriver::tables(QSql::TableType type) const } // list all table synonyms as well - t.exec(QLatin1String("select owner, synonym_name from all_synonyms " - "where owner != 'MDSYS' " - "and owner != 'LBACSYS' " - "and owner != 'SYS' " - "and owner != 'SYSTEM' " - "and owner != 'WKSYS'" - "and owner != 'CTXSYS'" - "and owner != 'WMSYS'")); + query = QLatin1String("select owner, synonym_name from all_synonyms where "); + t.exec(query + whereList.join(QLatin1String(" and "))); while (t.next()) { if (t.value(0).toString() != d->user) - tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); else tl.append(t.value(1).toString()); } } if (type & QSql::Views) { - t.exec(QLatin1String("select owner, view_name from all_views " - "where owner != 'MDSYS' " - "and owner != 'LBACSYS' " - "and owner != 'SYS' " - "and owner != 'SYSTEM' " - "and owner != 'WKSYS'" - "and owner != 'CTXSYS'" - "and owner != 'WMSYS'")); + QString query = QLatin1String("select owner, view_name from all_views where "); + QStringList whereList; + foreach(const QString &sysUserName, sysUsers) + whereList << QLatin1String("owner != '") + sysUserName + QLatin1String("' "); + t.exec(query + whereList.join(QLatin1String(" and "))); while (t.next()) { if (t.value(0).toString().toUpper() != d->user.toUpper()) tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); @@ -2265,6 +2264,28 @@ QStringList QOCIDriver::tables(QSql::TableType type) const while (t.next()) { tl.append(t.value(0).toString()); } + QString query = QLatin1String("select owner, table_name from all_tables where "); + QStringList whereList; + foreach(const QString &sysUserName, sysUsers) + whereList << QLatin1String("owner = '") + sysUserName + QLatin1String("' "); + t.exec(query + whereList.join(QLatin1String(" or "))); + + while (t.next()) { + if (t.value(0).toString().toUpper() != user.toUpper()) + tl.append(t.value(0).toString() + QLatin1Char('.') + t.value(1).toString()); + else + tl.append(t.value(1).toString()); + } + + // list all table synonyms as well + query = QLatin1String("select owner, synonym_name from all_synonyms where "); + t.exec(query + whereList.join(QLatin1String(" or "))); + while (t.next()) { + if (t.value(0).toString() != d->user) + tl.append(t.value(0).toString() + QLatin1String(".") + t.value(1).toString()); + else + tl.append(t.value(1).toString()); + } } return tl; } diff --git a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp index db840f4..6479829 100644 --- a/tests/auto/qabstractitemview/tst_qabstractitemview.cpp +++ b/tests/auto/qabstractitemview/tst_qabstractitemview.cpp @@ -46,6 +46,7 @@ #include <qstandarditemmodel.h> #include <qapplication.h> #include <qlistview.h> +#include <qlistwidget.h> #include <qtableview.h> #include <qtreeview.h> #include <qtreewidget.h> @@ -224,6 +225,7 @@ private slots: void shiftArrowSelectionAfterScrolling(); void shiftSelectionAfterRubberbandSelection(); void ctrlRubberbandSelection(); + void QTBUG6407_extendedSelection(); }; class MyAbstractItemDelegate : public QAbstractItemDelegate @@ -1433,5 +1435,45 @@ void tst_QAbstractItemView::ctrlRubberbandSelection() QVERIFY(selected.contains(index2)); } +void tst_QAbstractItemView::QTBUG6407_extendedSelection() +{ + QListWidget view; + view.setSelectionMode(QAbstractItemView::ExtendedSelection); + for(int i = 0; i < 50; ++i) + view.addItem(QString::number(i)); + + view.resize(200,200); + + view.show(); + QApplication::setActiveWindow(&view); + QTest::qWaitForWindowShown(&view); + QTRY_COMPARE(static_cast<QWidget *>(&view), QApplication::activeWindow()); + + view.verticalScrollBar()->setValue(view.verticalScrollBar()->maximum()); + QTest::qWait(20); + + QModelIndex index49 = view.model()->index(49,0); + QPoint p = view.visualRect(index49).center(); + QVERIFY(view.viewport()->rect().contains(p)); + QTest::mouseClick(view.viewport(), Qt::LeftButton, 0, p); + QCOMPARE(view.currentIndex(), index49); + QCOMPARE(view.selectedItems().count(), 1); + + QModelIndex index47 = view.model()->index(47,0); + p = view.visualRect(index47).center(); + QVERIFY(view.viewport()->rect().contains(p)); + QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::ShiftModifier, p); + QCOMPARE(view.currentIndex(), index47); + QCOMPARE(view.selectedItems().count(), 3); //49, 48, 47; + + QModelIndex index44 = view.model()->index(44,0); + p = view.visualRect(index44).center(); + QVERIFY(view.viewport()->rect().contains(p)); + QTest::mouseClick(view.viewport(), Qt::LeftButton, Qt::ShiftModifier, p); + QCOMPARE(view.currentIndex(), index44); + QCOMPARE(view.selectedItems().count(), 6); //49 .. 44; + +} + QTEST_MAIN(tst_QAbstractItemView) #include "tst_qabstractitemview.moc" diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp index 157c39d..7f03153 100644 --- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp +++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp @@ -1065,17 +1065,20 @@ void tst_QDoubleSpinBox::taskQTBUG_5008_textFromValueAndValidate() //we use the French delimiters here QString textFromValue (double value) const - { + { return locale().toString(value); } } spinbox; spinbox.show(); spinbox.activateWindow(); spinbox.setFocus(); + QApplication::setActiveWindow(&spinbox); QTest::qWaitForWindowShown(&spinbox); - QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value())); + QTRY_VERIFY(spinbox.hasFocus()); + QTRY_COMPARE(static_cast<QWidget *>(&spinbox), QApplication::activeWindow()); + QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value())); spinbox.lineEdit()->setCursorPosition(2); //just after the first thousand separator - QTest::keyClick(0, Qt::Key_0); // let's insert a 0 + QTest::keyClick(0, Qt::Key_0); // let's insert a 0 QCOMPARE(spinbox.value(), 10000.); spinbox.clearFocus(); //make sure the value is correctly formatted QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value())); diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp index a8017ff..38abc3d 100644 --- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp +++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp @@ -4211,6 +4211,42 @@ void tst_QGraphicsScene::siblingIndexAlwaysValid() //If there are in the list that's bad, we crash... QVERIFY(!QGraphicsScenePrivate::get(&scene)->topLevelItems.contains(static_cast<QGraphicsItem *>(child))); + //Other case + QGraphicsScene scene2; + // works with bsp tree index + scene2.setItemIndexMethod(QGraphicsScene::NoIndex); + + QGraphicsView view2(&scene2); + + // first add the blue rect + QGraphicsRectItem* const item1 = new QGraphicsRectItem(QRect( 10, 10, 10, 10 )); + item1->setPen(QColor(Qt::blue)); + item1->setBrush(Qt::blue); + scene2.addItem(item1); + + // then add the red rect + QGraphicsRectItem* const item2 = new QGraphicsRectItem(5, 5, 10, 10); + item2->setPen(QColor(Qt::red)); + item2->setBrush(Qt::red); + scene2.addItem(item2); + + // now the blue one is visible on top of the red one -> swap them (important for the bug) + item1->setZValue(1.0); + item2->setZValue(0.0); + + view2.show(); + + // handle events as a real life app would do + QApplication::processEvents(); + + // now delete the red rect + delete item2; + + // handle events as a real life app would do + QApplication::processEvents(); + + //We should not crash + } void tst_QGraphicsScene::taskQTBUG_5904_crashWithDeviceCoordinateCache() diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 4f4761c..fa2b9bd 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -3362,6 +3362,7 @@ void tst_QLineEdit::task174640_editingFinished() QApplication::setActiveWindow(&mw); mw.activateWindow(); QTest::qWaitForWindowShown(&mw); + QTRY_COMPARE(&mw, QApplication::activeWindow()); QSignalSpy editingFinishedSpy(le1, SIGNAL(editingFinished())); diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 24a553f..98001c8 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -1787,8 +1787,10 @@ void tst_QListView::task262152_setModelColumnNavigate() view.setModelColumn(1); view.show(); + QApplication::setActiveWindow(&view); QTest::qWaitForWindowShown(&view); - QTest::qWait(120); + QTest::qWait(30); + QTRY_COMPARE(static_cast<QWidget *>(&view), QApplication::activeWindow()); QTest::keyClick(&view, Qt::Key_Down); QTest::qWait(30); QTRY_COMPARE(view.currentIndex(), model.index(1,1)); diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp index 8b71349..67d1972 100644 --- a/tests/auto/qpainter/tst_qpainter.cpp +++ b/tests/auto/qpainter/tst_qpainter.cpp @@ -41,7 +41,7 @@ #include <QtTest/QtTest> - +#include "../../shared/util.h" #include <qpainter.h> #include <qapplication.h> @@ -67,6 +67,11 @@ #include <qqueue.h> +#include <qgraphicsview.h> +#include <qgraphicsscene.h> +#include <qgraphicsproxywidget.h> +#include <qlayout.h> + #if defined(Q_OS_SYMBIAN) # define SRCDIR "." #endif @@ -244,6 +249,8 @@ private slots: void setPenColorOnImage(); void setPenColorOnPixmap(); + void QTBUG5939_attachPainterPrivate(); + private: void fillData(); void setPenColor(QPainter& p); @@ -4404,6 +4411,55 @@ void tst_QPainter::setPenColorOnPixmap() setPenColor(p); } +class TestProxy : public QGraphicsProxyWidget +{ +public: + TestProxy() : QGraphicsProxyWidget() {} + void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) + { + QGraphicsProxyWidget::paint(painter, option, widget); + deviceTransform = painter->deviceTransform(); + } + QTransform deviceTransform; +}; + +class TestWidget : public QWidget +{ +Q_OBJECT +public: + TestWidget() : QWidget(), painted(false) {} + void paintEvent(QPaintEvent *) + { + QPainter p(this); + deviceTransform = p.deviceTransform(); + worldTransform = p.worldTransform(); + painted = true; + } + QTransform deviceTransform; + QTransform worldTransform; + bool painted; +}; + +void tst_QPainter::QTBUG5939_attachPainterPrivate() +{ + QWidget *w = new QWidget(); + QGraphicsScene *scene = new QGraphicsScene(); + QGraphicsView *view = new QGraphicsView(scene, w); + view->move(50 ,50); + TestProxy *proxy = new TestProxy(); + TestWidget *widget = new TestWidget(); + proxy->setWidget(widget); + scene->addItem(proxy); + proxy->rotate(45); + w->resize(scene->sceneRect().size().toSize()); + + w->show(); + QTRY_VERIFY(widget->painted); + + QVERIFY(widget->worldTransform.isIdentity()); + QCOMPARE(widget->deviceTransform, proxy->deviceTransform); +} + QTEST_MAIN(tst_QPainter) #include "tst_qpainter.moc" diff --git a/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp b/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp index 35f05d1..518cdbf 100644 --- a/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp +++ b/tests/auto/qsharedmemory/qsystemlock/tst_qsystemlock.cpp @@ -202,9 +202,9 @@ void tst_QSystemLock::processes() QStringList scripts; for (int i = 0; i < readOnly; ++i) - scripts.append(QFileInfo(SRCDIR "lackey/scripts/ systemlock_read.js").absoluteFilePath() ); + scripts.append(QFileInfo(SRCDIR "/../lackey/scripts/systemlock_read.js").absoluteFilePath() ); for (int i = 0; i < readWrite; ++i) - scripts.append(QFileInfo(SRCDIR "lackey/scripts/systemlock_readwrite.js").absoluteFilePath()); + scripts.append(QFileInfo(SRCDIR "/../lackey/scripts/systemlock_readwrite.js").absoluteFilePath()); QList<QProcess*> consumers; unsigned int failedProcesses = 0; @@ -213,8 +213,8 @@ void tst_QSystemLock::processes() QStringList arguments = QStringList() << scripts.at(i); QProcess *p = new QProcess; p->setProcessChannelMode(QProcess::ForwardedChannels); - - p->start(QFileInfo(SRCDIR "lackey/lackey").absoluteFilePath(), arguments); + + p->start("../lackey/lackey", arguments); // test, if the process could be started. if (p->waitForStarted(2000)) diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp index 87e0533..f923739 100644 --- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp +++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp @@ -73,6 +73,7 @@ private slots: void updateSoftKeysCompressed(); void handleCommand(); void checkSoftkeyEnableStates(); + void noMergingOverWindowBoundary(); private: // utils inline void simulateSymbianCommand(int command) @@ -235,5 +236,66 @@ void tst_QSoftKeyManager::checkSoftkeyEnableStates() QCOMPARE(spy1.count(), 5); } +/* + This tests that the softkeys are not merged over window boundaries. I.e. dialogs + don't get softkeys of base widget by default - QTBUG-6163. +*/ +void tst_QSoftKeyManager::noMergingOverWindowBoundary() +{ + // Create base window against which the dialog softkeys will ve verified + QWidget base; + + QAction* baseLeft = new QAction(tr("BaseLeft"), &base); + baseLeft->setSoftKeyRole(QAction::PositiveSoftKey); + base.addAction(baseLeft); + + QAction* baseRight = new QAction(tr("BaseRight"), &base); + baseRight->setSoftKeyRole(QAction::NegativeSoftKey); + base.addAction(baseRight); + + base.showMaximized(); + QApplication::processEvents(); + + QSignalSpy baseLeftSpy(baseLeft, SIGNAL(triggered())); + QSignalSpy baseRightSpy(baseRight, SIGNAL(triggered())); + + //Verify that both base softkeys emit triggered signals + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 1); + QCOMPARE(baseRightSpy.count(), 1); + baseLeftSpy.clear(); + baseRightSpy.clear(); + + // Verify that no softkey merging when using dialog without parent + QDialog dlg; + dlg.show(); + + QApplication::processEvents(); + + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 0); + QCOMPARE(baseRightSpy.count(), 0); + + // Ensure base view has focus again + dlg.hide(); + base.showMaximized(); + + // Verify that no softkey merging when using dialog with parent + QDialog dlg2(&base); + dlg2.show(); + + QApplication::processEvents(); + + simulateSymbianCommand(s60CommandStart); + simulateSymbianCommand(s60CommandStart + 1); + + QCOMPARE(baseLeftSpy.count(), 0); + QCOMPARE(baseRightSpy.count(), 0); +} + QTEST_MAIN(tst_QSoftKeyManager) #include "tst_qsoftkeymanager.moc" diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp index cd65135..e5e63a0 100644 --- a/tests/auto/qspinbox/tst_qspinbox.cpp +++ b/tests/auto/qspinbox/tst_qspinbox.cpp @@ -1025,7 +1025,7 @@ void tst_QSpinBox::taskQTBUG_5008_textFromValueAndValidate() //we use the French delimiters here QString textFromValue (int value) const - { + { return locale().toString(value); } @@ -1033,7 +1033,10 @@ void tst_QSpinBox::taskQTBUG_5008_textFromValueAndValidate() spinbox.show(); spinbox.activateWindow(); spinbox.setFocus(); + QApplication::setActiveWindow(&spinbox); QTest::qWaitForWindowShown(&spinbox); + QTRY_VERIFY(spinbox.hasFocus()); + QTRY_COMPARE(static_cast<QWidget *>(&spinbox), QApplication::activeWindow()); QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value())); spinbox.lineEdit()->setCursorPosition(2); //just after the first thousand separator QTest::keyClick(0, Qt::Key_0); // let's insert a 0 diff --git a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp index fe7c3ea..f840ca6 100644 --- a/tests/auto/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/qsqldatabase/tst_qsqldatabase.cpp @@ -86,6 +86,8 @@ private slots: void open(); void tables_data() { generic_data(); } void tables(); + void oci_tables_data() { generic_data("QOCI"); } + void oci_tables(); void transaction_data() { generic_data(); } void transaction(); void eventNotification_data() { generic_data(); } @@ -380,6 +382,7 @@ void tst_QSqlDatabase::dropTestTables(QSqlDatabase db) if (db.driverName().startsWith("QOCI")) { q.exec("drop user "+qTableName("CREATOR")+" cascade"); q.exec("drop user "+qTableName("APPUSER")+" cascade"); + q.exec("DROP TABLE system."+qTableName("mypassword")); } } @@ -2481,5 +2484,18 @@ void tst_QSqlDatabase::mysql_savepointtest() QVERIFY_SQL(q, exec("savepoint foo")); } +void tst_QSqlDatabase::oci_tables() +{ + QFETCH(QString, dbName); + QSqlDatabase db = QSqlDatabase::database(dbName); + CHECK_DATABASE(db); + QSqlQuery q(db); + QString systemTableName("system."+qTableName("mypassword")); + QVERIFY_SQL(q, exec("CREATE TABLE "+systemTableName+"(name VARCHAR(20))")); + QVERIFY(!db.tables().contains(systemTableName.toUpper())); + qDebug() << db.tables(QSql::SystemTables); + QVERIFY(db.tables(QSql::SystemTables).contains(systemTableName.toUpper())); +} + QTEST_MAIN(tst_QSqlDatabase) #include "tst_qsqldatabase.moc" diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp index 0fc3606..1a4e46e 100644 --- a/tools/qdoc3/config.cpp +++ b/tools/qdoc3/config.cpp @@ -399,6 +399,13 @@ QStringList Config::getAllFiles(const QString &filesVar, } /*! + \a fileName is the path of the file to find. + + \a files and \a dirs are the lists where we must find the + components of \a fileName. + + \a location is used for obtaining the file and line numbers + for report qdoc errors. */ QString Config::findFile(const Location& location, const QStringList& files, @@ -527,6 +534,11 @@ QString Config::findFile(const Location& location, } /*! + Copies the \a sourceFilePath to the file name constructed by + concatenating \a targetDirPath and \a userFriendlySourceFilePath. + \a location is for identifying the file and line number where + a qdoc error occurred. The constructed output file name is + returned. */ QString Config::copyFile(const Location& location, const QString& sourceFilePath, diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h index 725129a..33e5739 100644 --- a/tools/qdoc3/config.h +++ b/tools/qdoc3/config.h @@ -161,6 +161,7 @@ class Config #define CONFIG_VERSIONSYM "versionsym" #define CONFIG_FILEEXTENSIONS "fileextensions" +#define CONFIG_IMAGEEXTENSIONS "imageextensions" #ifdef QDOC_QML #define CONFIG_QMLONLY "qmlonly" diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index ce71e51..41a2456 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -197,8 +197,14 @@ CppCodeParser::CppCodeParser() */ CppCodeParser::~CppCodeParser() { + // nothing. } +/*! + The constructor initializes a map of special node types + for identifying important nodes. And it initializes + some filters for identifying certain kinds of files. + */ void CppCodeParser::initializeParser(const Config &config) { CodeParser::initializeParser(config); @@ -220,24 +226,46 @@ void CppCodeParser::initializeParser(const Config &config) exampleNameFilter = exampleFilePatterns.join(" "); else exampleNameFilter = "*.cpp *.h *.js *.xq *.svg *.xml *.ui"; + + QStringList exampleImagePatterns = config.getStringList( + CONFIG_EXAMPLES + Config::dot + CONFIG_IMAGEEXTENSIONS); + + if (!exampleImagePatterns.isEmpty()) + exampleImageFilter = exampleImagePatterns.join(" "); + else + exampleImageFilter = "*.png"; } +/*! + Clear the map of common node types and call + the same function in the base class. + */ void CppCodeParser::terminateParser() { nodeTypeMap.clear(); CodeParser::terminateParser(); } +/*! + Returns "Cpp". + */ QString CppCodeParser::language() { return "Cpp"; } +/*! + Returns a list of extensions for header files. + */ QString CppCodeParser::headerFileNameFilter() { return "*.ch *.h *.h++ *.hh *.hpp *.hxx"; } +/*! + Returns a list of extensions for source files, i.e. not + header files. + */ QString CppCodeParser::sourceFileNameFilter() { return "*.c++ *.cc *.cpp *.cxx"; @@ -299,6 +327,12 @@ void CppCodeParser::parseSourceFile(const Location& location, fclose(in); } +/*! + This is called after all the header files have been parsed. + I think the most important thing it does is resolve class + inheritance links in the tree. But it also initializes a + bunch of stuff. + */ void CppCodeParser::doneParsingHeaderFiles(Tree *tree) { tree->resolveInheritance(); @@ -345,6 +379,12 @@ void CppCodeParser::doneParsingHeaderFiles(Tree *tree) mutableAssociativeIteratorClasses.clear(); } +/*! + This is called after all the source files (i.e., not the + header files) have been parsed. It traverses the tree to + resolve property links, normalize overload signatures, and + do other housekeeping of the tree. + */ void CppCodeParser::doneParsingSourceFiles(Tree *tree) { tree->root()->makeUndocumentedChildrenInternal(); @@ -353,6 +393,13 @@ void CppCodeParser::doneParsingSourceFiles(Tree *tree) tree->resolveProperties(); } +/*! + This function searches the \a tree to find a FunctionNode + for a function with the signature \a synopsis. If the + \a relative node is provided, the search begins there. If + \a fuzzy is true, base classes are searched. The function + node is returned, if found. + */ const FunctionNode *CppCodeParser::findFunctionNode(const QString& synopsis, Tree *tree, Node *relative, @@ -2212,6 +2259,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) exampleDirs, proFileName, userFriendlyFilePath); + if (fullPath.isEmpty()) { QString tmp = proFileName; proFileName = examplePath + "/" + "qbuild.pro"; @@ -2231,8 +2279,18 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) int sizeOfBoringPartOfName = fullPath.size() - proFileName.size(); fullPath.truncate(fullPath.lastIndexOf('/')); - QStringList exampleFiles = Config::getFilesHere(fullPath, - exampleNameFilter); + QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter); + QString imagesPath = fullPath + "/images"; + QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter); + +#if 0 + qDebug() << "examplePath:" << examplePath; + qDebug() << " exampleFiles" << exampleFiles; + qDebug() << "imagesPath:" << imagesPath; + qDebug() << "fullPath:" << fullPath; + qDebug() << " imageFiles" << imageFiles; +#endif + if (!exampleFiles.isEmpty()) { // move main.cpp and to the end, if it exists QString mainCpp; @@ -2259,6 +2317,11 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) (void) new FakeNode(fake, exampleFile.mid(sizeOfBoringPartOfName), Node::File); + foreach (const QString &imageFile, imageFiles) { + FakeNode* newFake = new FakeNode(fake, + imageFile.mid(sizeOfBoringPartOfName), + Node::Image); + } } QT_END_NAMESPACE diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h index e2e9d55..fff5bd9 100644 --- a/tools/qdoc3/cppcodeparser.h +++ b/tools/qdoc3/cppcodeparser.h @@ -185,6 +185,7 @@ class CppCodeParser : public CodeParser static QStringList exampleFiles; static QStringList exampleDirs; QString exampleNameFilter; + QString exampleImageFilter; }; QT_END_NAMESPACE diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp index f7569ce..9389268 100644 --- a/tools/qdoc3/generator.cpp +++ b/tools/qdoc3/generator.cpp @@ -138,14 +138,15 @@ void Generator::initialize(const Config &config) while (g != generators.end()) { if (outputFormats.contains((*g)->format())) { (*g)->initializeGenerator(config); - QStringList extraImages = config.getStringList(CONFIG_EXTRAIMAGES + - Config::dot + - (*g)->format()); + QStringList extraImages = + config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); QStringList::ConstIterator e = extraImages.begin(); while (e != extraImages.end()) { QString userFriendlyFilePath; QString filePath = Config::findFile(config.lastLocation(), - imageFiles, imageDirs, *e, + imageFiles, + imageDirs, + *e, imgFileExts[(*g)->format()], userFriendlyFilePath); if (!filePath.isEmpty()) @@ -529,33 +530,80 @@ void Generator::generateInheritedBy(const ClassNode *classe, } } -void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) +void Generator::generateFileList(const FakeNode* fake, + CodeMarker* marker, + Node::SubType subtype, + const QString& tag) { - if (fake->childNodes().isEmpty()) - return; - + int count = 0; + Text text; OpenedList openedList(OpenedList::Bullet); - Text text; - text << Atom::ParaLeft << "Files:" << Atom::ParaRight + text << Atom::ParaLeft << tag << Atom::ParaRight << Atom(Atom::ListLeft, openedList.styleString()); - foreach (const Node *child, fake->childNodes()) { - QString exampleFile = child->name(); - openedList.next(); - text << Atom(Atom::ListItemNumber, openedList.numberString()) - << Atom(Atom::ListItemLeft, openedList.styleString()) - << Atom::ParaLeft - << Atom(Atom::Link, exampleFile) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << exampleFile - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom::ParaRight - << Atom(Atom::ListItemRight, openedList.styleString()); + + foreach (const Node* child, fake->childNodes()) { + if (child->subType() == subtype) { + ++count; + QString file = child->name(); + + if (file == "network/qftp/images/dir.png") + qDebug() << "FILE:" << file; + + openedList.next(); + text << Atom(Atom::ListItemNumber, openedList.numberString()) + << Atom(Atom::ListItemLeft, openedList.styleString()) + << Atom::ParaLeft + << Atom(Atom::Link, file) + << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) + << file + << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) + << Atom::ParaRight + << Atom(Atom::ListItemRight, openedList.styleString()); + } } text << Atom(Atom::ListRight, openedList.styleString()); - generateText(text, fake, marker); + if (count > 0) + generateText(text, fake, marker); } +void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker) +{ + if (fake->childNodes().isEmpty()) + return; + generateFileList(fake, marker, Node::File, QString("Files:")); + generateFileList(fake, marker, Node::Image, QString("Images:")); +} + +#if 0 + QList<Generator *>::ConstIterator g = generators.begin(); + while (g != generators.end()) { + if (outputFormats.contains((*g)->format())) { + (*g)->initializeGenerator(config); + QStringList extraImages = + config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format()); + QStringList::ConstIterator e = extraImages.begin(); + while (e != extraImages.end()) { + QString userFriendlyFilePath; + QString filePath = Config::findFile(config.lastLocation(), + imageFiles, + imageDirs, + *e, + imgFileExts[(*g)->format()], + userFriendlyFilePath); + if (!filePath.isEmpty()) + Config::copyFile(config.lastLocation(), + filePath, + userFriendlyFilePath, + (*g)->outputDir() + + "/images"); + ++e; + } + } + ++g; + } +#endif + void Generator::generateModuleWarning(const ClassNode *classe, CodeMarker *marker) { diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index 0258534..7667789 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -119,6 +119,10 @@ class Generator CodeMarker *marker, bool generate, int& numGeneratedAtoms); + void generateFileList(const FakeNode* fake, + CodeMarker* marker, + Node::SubType subtype, + const QString& tag); void generateExampleFiles(const FakeNode *fake, CodeMarker *marker); void generateModuleWarning(const ClassNode *classe, CodeMarker *marker); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 373002c..b855823 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -767,6 +767,9 @@ FakeNode::FakeNode(InnerNode *parent, const QString& name, SubType subtype) } /*! + Returns the fake node's full title, which is usually + just title(), but for some SubType values is different + from title() */ QString FakeNode::fullTitle() const { @@ -776,6 +779,12 @@ QString FakeNode::fullTitle() const else return title(); } + else if (sub == Image) { + if (title().isEmpty()) + return name().mid(name().lastIndexOf('/') + 1) + " Image File"; + else + return title(); + } else if (sub == HeaderFile) { if (title().isEmpty()) return name(); @@ -788,13 +797,14 @@ QString FakeNode::fullTitle() const } /*! + Returns the subtitle. */ QString FakeNode::subTitle() const { if (!stle.isEmpty()) return stle; - if (sub == File) { + if ((sub == File) || (sub == Image)) { if (title().isEmpty() && name().contains("/")) return name(); } diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index dbdc174..223f528 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -89,6 +89,7 @@ class Node Example, HeaderFile, File, + Image, Group, Module, Page, diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index 0251462..ef4d04f 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -97,6 +97,7 @@ excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \ sources.fileextensions = "*.cpp *.qdoc *.mm" examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" exampledirs = $QT_SOURCE_TREE/doc/src \ $QT_SOURCE_TREE/examples \ diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index a1c6b6b..a066021 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -100,6 +100,7 @@ excludedirs = $QTDIR/src/3rdparty/clucene \ sources.fileextensions = "*.cpp *.qdoc *.mm" examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp" +examples.imageextensions = "*.png" exampledirs = $QTDIR/doc/src \ $QTDIR/examples \ diff --git a/tools/xmlpatterns/main.cpp b/tools/xmlpatterns/main.cpp index a930b70..604523b 100644 --- a/tools/xmlpatterns/main.cpp +++ b/tools/xmlpatterns/main.cpp @@ -80,14 +80,14 @@ QT_USE_NAMESPACE Represents the name and value found in "-param name=value". */ typedef QPair<QString, QString> Parameter; -Q_DECLARE_METATYPE(Parameter); +Q_DECLARE_METATYPE(Parameter) /*! \internal \since 4.4 For the -output switch. */ -Q_DECLARE_METATYPE(QIODevice *); +Q_DECLARE_METATYPE(QIODevice *) /*! \class PatternistApplicationParser |