From 44bf0486fcde32f9ec007e8ed2904114b0ad15fd Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Fri, 23 Sep 2011 12:34:34 +0300 Subject: Doc updates to Qt 4.8 platform notes documentation. --- doc/src/platforms/platform-notes.qdoc | 43 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 477f125..2cdfc37 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -685,9 +685,7 @@ \ingroup platform-specific \brief Information about the state of support for the Symbian platform. - As with any port, the maturity for Qt for Symbian has not yet reached the - same level as other established Qt ports. This page documents the current - notes for the Symbian port. + This page documents the current notes for the Symbian port. \section1 Source Compatibility @@ -698,18 +696,34 @@ \section1 Binary Compatibility - As with every supported platform, we will strive to maintain - application behavior and binary compatibility throughout the lifetime of - the Qt 4.x series. However, due to the fact that Symbian support is newly - added in 4.6.0, there is a slight possibility that minor corrections to the - application binary interface (ABI) might be required in 4.6.1, in order to - ensure compatibility going forward. Any such change will be clearly - documented in the release notes for 4.6.1. + As with every supported platform, Qt strives to maintain application + behavior and binary compatibility throughout the lifetime of the Qt 4.x + major version and on the Symbian devices that support Qt. Symbian support in + Qt SDK and Ovi Store were introduced with Qt 4.6. Each Qt release contains + bug fixes that might change the API behavior and thereby affect application + compatibility. + + In addition, Symbian devices have different input methods, such as different + keyboard styles or touch input, screen sizes, memory, and CPU and GPU + capabilities. Therefore, you must test applications on specific target + devices to ensure compatibility. In order to build applications that are + supported also on earlier devices, select the target in Qt SDK carefully. + Generally, an earlier target (such as S60 5th Edition) is supported on a + larger number of devices than a later target (such as Symbian Belle). \section1 Supported Devices - See the list of supported devices at - http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian#Supported_Devices + \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian#Supported_Devices}{Nokia Smart Installer for Symbian} + documentation lists supported devices. + + + ###how to formulate this: + Qt 4.6 for Symbian is supported for S60 3rd Edition feature pack 1 devices + and onward via Smart Installer. Qt 4.7.3 is supported in S60 5th Edition + devices and onward. Symbian^3 devices have Qt 4.6 support pre-installed. + Symbian Anna has Qt 4.7.3 pre-installed and Symbian Belle has Qt 4.7.4 in + device firmware (ROM). + \section1 Supported Functionality @@ -736,9 +750,7 @@ \row \o QtSql \o The only driver supported is SQLite. \row \o QtMultimedia - \o Although the module itself is supported, no backend for Symbian - is currently available. However, there is a backend available - for Phonon. + \o For support details see \l {Multimedia and Phonon Support} section. \endtable \section1 Compiler Notes @@ -796,6 +808,7 @@ For more information see the documentation of the individual Qt classes. If a class does not mention Symbian capabilities, it requires none. + \target Multimedia and Phonon Support \section1 Multimedia and Phonon Support Qt provides a high-level API for multimedia functionality with -- cgit v0.12 From caf77de1ea1c15ae4dbeb8ea1182ec6226db210d Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Fri, 23 Sep 2011 15:45:01 +0300 Subject: Doc updates to platform notes of Qt 4.8 doc. --- doc/src/platforms/platform-notes.qdoc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 2cdfc37..3134ae0 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -716,13 +716,19 @@ \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian#Supported_Devices}{Nokia Smart Installer for Symbian} documentation lists supported devices. + Qt versions are supported by Symbian devices as follows: + \list + \o Qt 4.6 is supported by S60 3rd Edition feature pack 1 and newer devices + through \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Smart Installer}. + \o Qt 4.7.3 is supported by S60 5th Edition and newer devices. + \endlist - ###how to formulate this: - Qt 4.6 for Symbian is supported for S60 3rd Edition feature pack 1 devices - and onward via Smart Installer. Qt 4.7.3 is supported in S60 5th Edition - devices and onward. Symbian^3 devices have Qt 4.6 support pre-installed. - Symbian Anna has Qt 4.7.3 pre-installed and Symbian Belle has Qt 4.7.4 in - device firmware (ROM). + Symbian devices have a pre-installed Qt support as follows: + \list + \o Symbian^3: Qt 4.6 in C: drive. + \o Symbian Anna: Qt 4.7.3 in C: drive. + \o Symbian Belle: Qt 4.7.4 in device firmware (ROM). + \endlist \section1 Supported Functionality -- cgit v0.12 From e05734987594f0e54f58a2ab3037cdf4956e9036 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 26 Sep 2011 12:18:46 +0200 Subject: Fix possible crash in QFontEngineFT Avoid crash if set pointer is null. Task-number: QTBUG-21647 Reviewed-by: Jiang Jiang --- src/gui/text/qfontengine_ft.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index e20aa25..d00a048 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -801,7 +801,7 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags, if (set && set->outline_drawing) load_flags = FT_LOAD_NO_BITMAP; - if (default_hint_style == HintNone || (flags & HB_ShaperFlag_UseDesignMetrics) || set->outline_drawing) + if (default_hint_style == HintNone || (flags & HB_ShaperFlag_UseDesignMetrics) || (set && set->outline_drawing)) load_flags |= FT_LOAD_NO_HINTING; else load_flags |= load_target; -- cgit v0.12 From e5d7c375d45044cdee261c238e7ab6bd5ab7a0ac Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Tue, 27 Sep 2011 09:38:54 +0300 Subject: Doc updates to platform notes document. --- doc/src/platforms/platform-notes.qdoc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 3134ae0..60acb12 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -749,15 +749,30 @@ \endtable The following technologies have limited support: + \table \header \o Technology \o Note \row \o QtSql - \o The only driver supported is SQLite. + \o The supported drivers are SQLite and QSYMSQL. \row \o QtMultimedia \o For support details see \l {Multimedia and Phonon Support} section. \endtable + + It is not recommended to use the following Qt widgets: + \list + \o QFileDialog with the \c DontUseNativeDialog option + \o QColorDialog with the \c DontUseNativeDialog option + \o QFontDialog + \o QWizard + \o QCalendarWidget + \o QDateTimeEdit + \o QMdiArea + \o QMdiSubWindow + \o QDockWidget + \o QPrintPreviewWidget + \endlist \section1 Compiler Notes @@ -827,7 +842,7 @@ In this release the support is experimental. Video playback may show artifacts when the video is moved or resized (for instance during - orientation flips). This problem is present on Symbian^1 and earlier + orientation flips). This problem is present on S60 5th Edition and earlier versions, and on Symbian^3 systems. The audio and video formats that Phonon supports depends on what support -- cgit v0.12 From 99c2bdc8c3346e7b84d2d71ec4dca8fe0ed6688e Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Tue, 27 Sep 2011 15:11:36 +0300 Subject: Doc updates to Qt for Symbian installation instructions and platform notes. --- doc/src/getting-started/installation.qdoc | 58 ++++++++++++++++++++++--------- doc/src/platforms/platform-notes.qdoc | 5 ++- 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 36d63f5..2936d60 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -510,7 +510,10 @@ in the \l{Qt for the Symbian platform Requirements} document. \section1 Step 1: Install Qt - Run \c{qt-symbian-opensource-%VERSION%.exe} and follow the instructions. + Download the \c {Qt libraries 4.x for Windows} package (for \c minGW or \c {VS 2008}) + from the \l {http://qt.nokia.com/downloads#qt-lib}{downloads} page. + + Run the downloaded package and follow the instructions. \note Qt must be installed on the same drive as the Symbian SDK you are using, and the install path must not contain any spaces. @@ -652,23 +655,39 @@ Binary Package} document. Congratulations, Qt is now ready to use. \section1 Step 7: Installing Qt Libraries on the Device + + To run a Qt application on a device, it must have Qt libraries installed. + + Symbian devices have a pre-installed Qt as follows: + \list + \o Symbian Anna devices have the pre-installed Qt, Qt Mobility, and Qt Webkit. + \o Symbian Belle and later devices have the pre-installed Qt on the device firmware. + \endlist + + \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian} + {Nokia Smart Installer for Symbian} deploys the required Qt libraries to supported S60 + and Symbian devices if the libraries are not pre-installed. + + Nokia Developer site's \l {http://www.developer.nokia.com/Devices/Device_specifications/?filter1=qt} + {Device specifications} provide information on which devices have a + pre-installed Qt and the used Qt version. + + To create your own Qt installation package, do as follows: + + \snippet doc/src/snippets/code/doc_src_installation.qdoc 29 + + The Qt libraries are built with "All -Tcb" capability, so they can support + all types of applications. If you don't have a suitable certificate, you can + patch the binaries in either of the following ways: + + \list + \o If you have no certificate, build a self-signed Qt: + \snippet doc/src/snippets/code/doc_src_installation.qdoc 34 - To run the demo on a real device, you first have to install - the Qt libraries on the device: - -\snippet doc/src/snippets/code/doc_src_installation.qdoc 29 - - The Qt libraries are built with "All -Tcb" capability, so that - they can support all types of application. - If you don't have a suitable certificate, it is possible to patch - the binaries as follows: - - If you have no certificate, build a self signed Qt: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 34 - - If you have a symbian-signed developer certificate, specify the + \o If you have a symbian-signed developer certificate, specify the capabilities you can sign for, for example: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \endlist \section1 Running Qt demos @@ -1315,7 +1334,12 @@ We hope you will enjoy using Qt. \brief Setting up the Symbian platform environment for Qt. \previouspage General Qt Requirements - Qt for the Symbian platform requires the following software installed on your development PC: + \l {http://qt.nokia.com/downloads}{Qt SDK} provides all the necessary tools + and libraries for developing Qt applications. However, if you want to build + Qt itself for Symbian, follow the instructions below. + + Qt for the Symbian platform requires the following software installed on + your development PC: \list \o \l{http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/}{Carbide.c++ v2.3.0 or higher recommended}. \list diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 60acb12..e1e8c44 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -725,7 +725,6 @@ Symbian devices have a pre-installed Qt support as follows: \list - \o Symbian^3: Qt 4.6 in C: drive. \o Symbian Anna: Qt 4.7.3 in C: drive. \o Symbian Belle: Qt 4.7.4 in device firmware (ROM). \endlist @@ -856,7 +855,7 @@ \section1 Hardware Accelerated Rendering - The default graphics system on Symbian^3 is OpenVG, which uses OpenVG + The default graphics system on Symbian Anna is OpenVG, which uses OpenVG hardware to accelerate \l QPainter functions. There are a few exceptions, where Qt will use software rendering fallback. @@ -873,7 +872,7 @@ \section1 QtOpenGL Support in Symbian - Qt 4.7 introduces the \l {QtOpenGL} module to Symbian^3. QtOpenGL is + Qt 4.7 introduces the \l {QtOpenGL} module. QtOpenGL is supported on devices which support OpenGL ES 2.0. Symbian platforms prior to Symbian^3 are not supported. -- cgit v0.12 From d783756ab2ac83238b2bd202517be10a475b0b66 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 29 Sep 2011 11:11:24 +0200 Subject: Update the changelog for qdoc in 4.8 Reviewed-By: Trust Me --- dist/changes-4.8.0 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 9b118d5..4ca1f27 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -366,6 +366,10 @@ Qt for Windows CE - syncqt * Fix to allow $QTDIR to contain any valid pathname characters. +- qdoc3 + * Add support for documenting QML using module identifiers. + * Change the format of qdocconf files. + **************************************************************************** * Plugins * **************************************************************************** -- cgit v0.12 From d63910575949106f84dacf04abaa14fc866aa66b Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 3 Dec 2010 11:34:09 +0100 Subject: Set missing flags in the option when rendering QTreeView drag pixmap QAbstractItemViewPrivate::renderToPixmap was not setting all the flags that the normal QTreeView painting sets: option.showDecorationSelected, option.viewItemPosition (so the drag pixmap looked wrong on Windows 7, with rects around each cell), and then the unittest also discovered that State_Children/State_Sibling wasn't set either. Task-number: QTBUG-15834 Merge-request: 2517 Reviewed-by: Gabriel --- src/gui/itemviews/qabstractitemview.cpp | 1 + src/gui/itemviews/qabstractitemview_p.h | 2 + src/gui/itemviews/qtreeview.cpp | 113 +++++++++++++++++++++----------- src/gui/itemviews/qtreeview_p.h | 5 ++ tests/auto/qtreeview/tst_qtreeview.cpp | 11 +++- 5 files changed, 92 insertions(+), 40 deletions(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index ded4d63..1676c46 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -4238,6 +4238,7 @@ QPixmap QAbstractItemViewPrivate::renderToPixmap(const QModelIndexList &indexes, for (int j = 0; j < paintPairs.count(); ++j) { option.rect = paintPairs.at(j).first.translated(-r->topLeft()); const QModelIndex ¤t = paintPairs.at(j).second; + adjustViewOptionsForIndex(&option, current); delegateForIndex(current)->paint(&painter, option, current); } return pixmap; diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h index 04babde..b742529 100644 --- a/src/gui/itemviews/qabstractitemview_p.h +++ b/src/gui/itemviews/qabstractitemview_p.h @@ -193,6 +193,8 @@ public: #endif virtual QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const; + // reimplemented in subclasses + virtual void adjustViewOptionsForIndex(QStyleOptionViewItemV4*, const QModelIndex&) const {} inline void releaseEditor(QWidget *editor) const { if (editor) { diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 9228ac8..868cd92 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -1378,6 +1378,23 @@ QItemViewPaintPairs QTreeViewPrivate::draggablePaintPairs(const QModelIndexList return ret; } +void QTreeViewPrivate::adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option, const QModelIndex ¤t) const +{ + const int row = current.row(); + option->state = option->state | (viewItems.at(row).expanded ? QStyle::State_Open : QStyle::State_None) + | (viewItems.at(row).hasChildren ? QStyle::State_Children : QStyle::State_None) + | (viewItems.at(row).hasMoreSiblings ? QStyle::State_Sibling : QStyle::State_None); + + option->showDecorationSelected = (selectionBehavior & QTreeView::SelectRows) + || option->showDecorationSelected; + + QVector logicalIndices; + QVector viewItemPosList; // vector of left/middle/end for each logicalIndex + calcLogicalIndices(&logicalIndices, &viewItemPosList); + int logicalIndex = header->logicalIndex(current.column()); + option->viewItemPosition = viewItemPosList.at(logicalIndex); +} + /*! \since 4.2 @@ -1463,6 +1480,59 @@ static inline bool ancestorOf(QObject *widget, QObject *other) return false; } +void QTreeViewPrivate::calcLogicalIndices(QVector *logicalIndices, QVector *itemPositions) const +{ + const int left = (spanning ? header->visualIndex(0) : leftAndRight.first); + const int right = (spanning ? header->visualIndex(0) : leftAndRight.second); + const int columnCount = header->count(); + /* 'left' and 'right' are the left-most and right-most visible visual indices. + Compute the first visible logical indices before and after the left and right. + We will use these values to determine the QStyleOptionViewItemV4::viewItemPosition. */ + int logicalIndexBeforeLeft = -1, logicalIndexAfterRight = -1; + for (int visualIndex = left - 1; visualIndex >= 0; --visualIndex) { + int logicalIndex = header->logicalIndex(visualIndex); + if (!header->isSectionHidden(logicalIndex)) { + logicalIndexBeforeLeft = logicalIndex; + break; + } + } + + for (int visualIndex = left; visualIndex < columnCount; ++visualIndex) { + int logicalIndex = header->logicalIndex(visualIndex); + if (!header->isSectionHidden(logicalIndex)) { + if (visualIndex > right) { + logicalIndexAfterRight = logicalIndex; + break; + } + logicalIndices->append(logicalIndex); + } + } + + itemPositions->resize(logicalIndices->count()); + for (int currentLogicalSection = 0; currentLogicalSection < logicalIndices->count(); ++currentLogicalSection) { + const int headerSection = logicalIndices->at(currentLogicalSection); + // determine the viewItemPosition depending on the position of column 0 + int nextLogicalSection = currentLogicalSection + 1 >= logicalIndices->count() + ? logicalIndexAfterRight + : logicalIndices->at(currentLogicalSection + 1); + int prevLogicalSection = currentLogicalSection - 1 < 0 + ? logicalIndexBeforeLeft + : logicalIndices->at(currentLogicalSection - 1); + QStyleOptionViewItemV4::ViewItemPosition pos; + if (columnCount == 1 || (nextLogicalSection == 0 && prevLogicalSection == -1) + || (headerSection == 0 && nextLogicalSection == -1) || spanning) + pos = QStyleOptionViewItemV4::OnlyOne; + else if (headerSection == 0 || (nextLogicalSection != 0 && prevLogicalSection == -1)) + pos = QStyleOptionViewItemV4::Beginning; + else if (nextLogicalSection == 0 || nextLogicalSection == -1) + pos = QStyleOptionViewItemV4::End; + else + pos = QStyleOptionViewItemV4::Middle; + (*itemPositions)[currentLogicalSection] = pos; + } +} + + /*! Draws the row in the tree view that contains the model item \a index, using the \a painter given. The \a option control how the item is @@ -1531,33 +1601,13 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option, int width, height = option.rect.height(); int position; QModelIndex modelIndex; - int columnCount = header->count(); const bool hoverRow = selectionBehavior() == QAbstractItemView::SelectRows && index.parent() == hover.parent() && index.row() == hover.row(); - /* 'left' and 'right' are the left-most and right-most visible visual indices. - Compute the first visible logical indices before and after the left and right. - We will use these values to determine the QStyleOptionViewItemV4::viewItemPosition. */ - int logicalIndexBeforeLeft = -1, logicalIndexAfterRight = -1; - for (int visualIndex = left - 1; visualIndex >= 0; --visualIndex) { - int logicalIndex = header->logicalIndex(visualIndex); - if (!header->isSectionHidden(logicalIndex)) { - logicalIndexBeforeLeft = logicalIndex; - break; - } - } - QVector logicalIndices; // vector of currently visibly logical indices - for (int visualIndex = left; visualIndex < columnCount; ++visualIndex) { - int logicalIndex = header->logicalIndex(visualIndex); - if (!header->isSectionHidden(logicalIndex)) { - if (visualIndex > right) { - logicalIndexAfterRight = logicalIndex; - break; - } - logicalIndices.append(logicalIndex); - } - } + QVector logicalIndices; + QVector viewItemPosList; // vector of left/middle/end for each logicalIndex + d->calcLogicalIndices(&logicalIndices, &viewItemPosList); for (int currentLogicalSection = 0; currentLogicalSection < logicalIndices.count(); ++currentLogicalSection) { int headerSection = logicalIndices.at(currentLogicalSection); @@ -1579,22 +1629,7 @@ void QTreeView::drawRow(QPainter *painter, const QStyleOptionViewItem &option, continue; opt.state = state; - // determine the viewItemPosition depending on the position of column 0 - int nextLogicalSection = currentLogicalSection + 1 >= logicalIndices.count() - ? logicalIndexAfterRight - : logicalIndices.at(currentLogicalSection + 1); - int prevLogicalSection = currentLogicalSection - 1 < 0 - ? logicalIndexBeforeLeft - : logicalIndices.at(currentLogicalSection - 1); - if (columnCount == 1 || (nextLogicalSection == 0 && prevLogicalSection == -1) - || (headerSection == 0 && nextLogicalSection == -1) || spanning) - opt.viewItemPosition = QStyleOptionViewItemV4::OnlyOne; - else if (headerSection == 0 || (nextLogicalSection != 0 && prevLogicalSection == -1)) - opt.viewItemPosition = QStyleOptionViewItemV4::Beginning; - else if (nextLogicalSection == 0 || nextLogicalSection == -1) - opt.viewItemPosition = QStyleOptionViewItemV4::End; - else - opt.viewItemPosition = QStyleOptionViewItemV4::Middle; + opt.viewItemPosition = viewItemPosList.at(currentLogicalSection); // fake activeness when row editor has focus if (indexWidgetHasFocus) diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h index a9dc452..ef8f11c 100644 --- a/src/gui/itemviews/qtreeview_p.h +++ b/src/gui/itemviews/qtreeview_p.h @@ -97,6 +97,7 @@ public: void initialize(); QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const; + void adjustViewOptionsForIndex(QStyleOptionViewItemV4 *option, const QModelIndex ¤t) const; #ifndef QT_NO_ANIMATION struct AnimatedOperation : public QVariantAnimation @@ -167,6 +168,10 @@ public: void paintAlternatingRowColors(QPainter *painter, QStyleOptionViewItemV4 *option, int y, int bottom) const; + // logicalIndices: vector of currently visibly logical indices + // itemPositions: vector of view item positions (beginning/middle/end/onlyone) + void calcLogicalIndices(QVector *logicalIndices, QVector *itemPositions) const; + QHeaderView *header; int indent; diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index facb982..c37a4ea 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -45,6 +45,7 @@ #include #include +#include #include "../../shared/util.h" //TESTED_CLASS= @@ -112,6 +113,8 @@ struct PublicView : public QTreeView inline QStyleOptionViewItem viewOptions() const { return QTreeView::viewOptions(); } inline int sizeHintForColumn(int column) const { return QTreeView::sizeHintForColumn(column); } + inline void startDrag(Qt::DropActions supportedActions) { QTreeView::startDrag(supportedActions); } + QAbstractItemViewPrivate* aiv_priv() { return static_cast(d_ptr.data()); } }; class tst_QTreeView : public QObject @@ -2947,7 +2950,7 @@ void tst_QTreeView::styleOptionViewItem() bool allCollapsed; }; - QTreeView view; + PublicView view; QStandardItemModel model; view.setModel(&model); MyDelegate delegate; @@ -3006,6 +3009,12 @@ void tst_QTreeView::styleOptionViewItem() QApplication::processEvents(); QTRY_VERIFY(delegate.count >= 4); + // test that the rendering of drag pixmap sets the correct options too (QTBUG-15834) + delegate.count = 0; + QItemSelection sel(model.index(0,0), model.index(0,3)); + QRect rect; + view.aiv_priv()->renderToPixmap(sel.indexes(), &rect); + QTRY_VERIFY(delegate.count >= 4); //test dynamic models { -- cgit v0.12 From 0455cf2f9c4d82d1badcc568a6c6f4401111c62b Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 29 Sep 2011 11:56:31 +0200 Subject: Update translation sources. Reviewed-By: Geir Vattekar --- src/3rdparty/phonon/mmf/environmentalreverb.cpp | 4 ++-- src/3rdparty/phonon/phonon/volumeslider.cpp | 6 +++--- .../webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp | 2 +- src/gui/kernel/qsoftkeymanager.cpp | 2 +- src/xmlpatterns/parser/qquerytransformparser.cpp | 2 +- src/xmlpatterns/schema/qxsdschemaresolver.cpp | 2 +- src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/3rdparty/phonon/mmf/environmentalreverb.cpp b/src/3rdparty/phonon/mmf/environmentalreverb.cpp index d4f5223..cdce6eb 100644 --- a/src/3rdparty/phonon/mmf/environmentalreverb.cpp +++ b/src/3rdparty/phonon/mmf/environmentalreverb.cpp @@ -164,7 +164,7 @@ bool EnvironmentalReverb::getParameters(CMdaAudioOutputStream *stream, parameters.append(createParameter( Diffusion, tr("Diffusion (%)"), effect->Diffusion(), 0, 100)); - //: ReflectionsDelay: Amount of delay between the arrival the direct + //: ReflectionsDelay: Amount of delay between the arrival of the direct //: path from the source and the arrival of the first reflection. parameters.append(createParameter( ReflectionsDelay, tr("Reflections delay (ms)"), @@ -185,7 +185,7 @@ bool EnvironmentalReverb::getParameters(CMdaAudioOutputStream *stream, 0, effect->ReverbDelayMax())); effect->ReverbLevelRange(min, max); - //: ReverbLevel Amplitude of reverberations. This value is + //: ReverbLevel: Amplitude of reverberations. This value is //: corrected by the RoomLevel to give the final reverberation //: amplitude. parameters.append(createParameter( diff --git a/src/3rdparty/phonon/phonon/volumeslider.cpp b/src/3rdparty/phonon/phonon/volumeslider.cpp index 00970c1..5b38bae 100644 --- a/src/3rdparty/phonon/phonon/volumeslider.cpp +++ b/src/3rdparty/phonon/phonon/volumeslider.cpp @@ -42,7 +42,7 @@ VolumeSlider::VolumeSlider(QWidget *parent) setToolTip(tr("Volume: %1%").arg(100)); #endif #ifndef QT_NO_WHATSTHIS - setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%").arg(100)); + setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%. The rightmost is %1%").arg(100)); #endif connect(&d->slider, SIGNAL(valueChanged(int)), SLOT(_k_sliderChanged(int))); @@ -60,7 +60,7 @@ VolumeSlider::VolumeSlider(AudioOutput *output, QWidget *parent) setToolTip(tr("Volume: %1%").arg(100)); #endif #ifndef QT_NO_WHATSTHIS - setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%").arg(100)); + setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%. The rightmost is %1%").arg(100)); #endif connect(&d->slider, SIGNAL(valueChanged(int)), SLOT(_k_sliderChanged(int))); @@ -114,7 +114,7 @@ void VolumeSlider::setMaximumVolume(qreal volume) int max = static_cast(volume * 100); k_ptr->slider.setMaximum(max); #ifndef QT_NO_WHATSTHIS - setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%") + setWhatsThis(tr("Use this slider to adjust the volume. The leftmost position is 0%. The rightmost is %1%") .arg(max)); #endif } diff --git a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 5e0a2e6..fc9bd04 100644 --- a/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/Source/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -918,7 +918,7 @@ void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const c WebCore::ResourceError FrameLoaderClientQt::cancelledError(const WebCore::ResourceRequest& request) { ResourceError error = ResourceError("QtNetwork", QNetworkReply::OperationCanceledError, request.url().prettyURL(), - QCoreApplication::translate("QWebFrame", "Request cancelled", 0, QCoreApplication::UnicodeUTF8)); + QCoreApplication::translate("QWebFrame", "Request canceled", 0, QCoreApplication::UnicodeUTF8)); error.setIsCancellation(true); return error; } diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 9caa37e..cd3450e 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -61,7 +61,7 @@ QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey) QString softKeyText; switch (standardKey) { case OkSoftKey: - softKeyText = QSoftKeyManager::tr("Ok"); + softKeyText = QSoftKeyManager::tr("OK"); break; case SelectSoftKey: softKeyText = QSoftKeyManager::tr("Select"); diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp index c9801c8..2528746 100644 --- a/src/xmlpatterns/parser/qquerytransformparser.cpp +++ b/src/xmlpatterns/parser/qquerytransformparser.cpp @@ -4561,7 +4561,7 @@ yyreduce: { parseInfo->staticContext->error(QtXmlPatterns::tr("The namespace for a user defined function " "cannot be empty (try the predefined " - "prefix %1 which exists for cases " + "prefix %1, which exists for cases " "like this)") .arg(formatKeyword("local")), ReportContext::XQST0060, fromYYLTYPE((yyloc), parseInfo)); diff --git a/src/xmlpatterns/schema/qxsdschemaresolver.cpp b/src/xmlpatterns/schema/qxsdschemaresolver.cpp index 29c9f5a..2549f5f 100644 --- a/src/xmlpatterns/schema/qxsdschemaresolver.cpp +++ b/src/xmlpatterns/schema/qxsdschemaresolver.cpp @@ -854,7 +854,7 @@ void XsdSchemaResolver::resolveComplexContentComplexTypes(const XsdComplexType:: group->setCompositor(XsdModelGroup::SequenceCompositor); if (effectiveContent && effectiveContent->term()->isModelGroup() && XsdModelGroup::Ptr(effectiveContent->term())->compositor() == XsdModelGroup::AllCompositor) { - m_context->error(QtXmlPatterns::tr("Content model of complex type %1 contains %2 element so it cannot be derived by extension from a non-empty type.") + m_context->error(QtXmlPatterns::tr("Content model of complex type %1 contains %2 element, so it cannot be derived by extension from a non-empty type.") .arg(formatType(m_namePool, complexType)).arg(formatKeyword("all")), XsdSchemaContext::XSDError, sourceLocation(complexType)); return; } diff --git a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp index 80c95c1..22d5d22 100644 --- a/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp +++ b/src/xmlpatterns/schema/qxsdvalidatinginstancereader.cpp @@ -699,7 +699,7 @@ bool XsdValidatingInstanceReader::validateElementComplexType(const XsdElement::P if (complexType->contentType()->variety() == XsdComplexType::ContentType::Mixed) { if (declaration->valueConstraint() && declaration->valueConstraint()->variety() == XsdElement::ValueConstraint::Fixed) { if (hasChildElement()) { - error(QtXmlPatterns::tr("Element %1 cannot contain other elements, as it has a fixed content.").arg(formatKeyword(declaration->displayName(m_namePool)))); + error(QtXmlPatterns::tr("Element %1 cannot contain other elements, as it has fixed content.").arg(formatKeyword(declaration->displayName(m_namePool)))); return false; } -- cgit v0.12 From b5062aeeb4ad321424246ecb8bf7a0ffb9ac9990 Mon Sep 17 00:00:00 2001 From: Jens Georg Date: Wed, 28 Sep 2011 16:36:32 +0200 Subject: Update changes-4.8.0 --- dist/changes-4.8.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 4ca1f27..39c0adf 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -82,6 +82,7 @@ that the changes lead to a leaner API and the change applies to all platforms. - QProcessEnvironment: major optimizations, especially on Unix - Add branch prediction macros Q_LIKELY and Q_UNLIKELY - QSettings: don't assume XDG_CONFIG_HOME is latin1-encoded + - QDateTime: Fix generation of ISO8601 strings to include proper timezone information [QTBUG-18290] QtGui ----- -- cgit v0.12 From 7d9ac9659568f77d3acf70f304fa152d3ecadcb1 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 29 Sep 2011 14:36:33 +0200 Subject: don't assume the PATH envvar is latin1-encoded use Unicode getenv() version instead Merge-request: 1344 Reviewed-by: Jan-Arve Saether --- src/corelib/plugin/qsystemlibrary.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index bb9c82a..c983f38 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -115,7 +115,7 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect searchOrder << qSystemDirectory(); if (!onlySystemDirectory) { - const QString PATH(QLatin1String(qgetenv("PATH").constData())); + const QString PATH = QString::fromWCharArray((const wchar_t *)_wgetenv(L"PATH")); searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts); } QString fileName = QString::fromWCharArray(libraryName); -- cgit v0.12 From 569228bb5d7759025f06b1963f3d4a1fc4e05694 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Thu, 29 Sep 2011 14:36:44 +0200 Subject: nano-opts, styling fixes Merge-request: 1344 Reviewed-by: Jan-Arve Saether --- src/corelib/plugin/qsystemlibrary.cpp | 13 ++++++------- src/corelib/plugin/qsystemlibrary_p.h | 9 +++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index c983f38..7296c5b 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qsystemlibrary_p.h" + #include #include #include @@ -91,7 +92,7 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect extern QString qAppFileName(); #endif -static QString qSystemDirectory() +static inline QString qSystemDirectory() { QVarLengthArray fullPath; @@ -118,24 +119,22 @@ HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirect const QString PATH = QString::fromWCharArray((const wchar_t *)_wgetenv(L"PATH")); searchOrder << PATH.split(QLatin1Char(';'), QString::SkipEmptyParts); } - QString fileName = QString::fromWCharArray(libraryName); - fileName.append(QLatin1String(".dll")); + const QString fileName = QString::fromWCharArray(libraryName) + QLatin1String(".dll"); // Start looking in the order specified for (int i = 0; i < searchOrder.count(); ++i) { QString fullPathAttempt = searchOrder.at(i); - if (!fullPathAttempt.endsWith(QLatin1Char('\\'))) { + if (!fullPathAttempt.endsWith(QLatin1Char('\\'))) fullPathAttempt.append(QLatin1Char('\\')); - } fullPathAttempt.append(fileName); HINSTANCE inst = ::LoadLibrary((const wchar_t *)fullPathAttempt.utf16()); if (inst != 0) return inst; } - return 0; + return 0; } -#endif //Q_OS_WINCE +#endif // !Q_OS_WINCE QT_END_NAMESPACE diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h index f20d0b6..88ab82c 100644 --- a/src/corelib/plugin/qsystemlibrary_p.h +++ b/src/corelib/plugin/qsystemlibrary_p.h @@ -85,9 +85,9 @@ public: if (!m_handle) return 0; #ifdef Q_OS_WINCE - return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16()); + return (void*)GetProcAddress(m_handle, (const wchar_t*)QString::fromLatin1(symbol).utf16()); #else - return (void*)GetProcAddress(m_handle, symbol); + return (void*)GetProcAddress(m_handle, symbol); #endif } @@ -97,6 +97,7 @@ public: } static Q_CORE_EXPORT HINSTANCE load(const wchar_t *lpFileName, bool onlySystemDirectory = true); + private: HINSTANCE m_handle; QString m_libraryName; @@ -105,6 +106,6 @@ private: QT_END_NAMESPACE -#endif //Q_OS_WIN +#endif // Q_OS_WIN -#endif //QSYSTEMLIBRARY_P_H +#endif // QSYSTEMLIBRARY_P_H -- cgit v0.12 From f3f65928525465e20f40e89d0855a1f32de6d8a4 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Thu, 29 Sep 2011 14:54:15 +0200 Subject: Fix bug in QGraphicsItem::isVisibleTo(). Task-number: QTBUG-21612 Reviewed-by: James Perrett Reviewed-by: Magne Pettersen Zachrisen Merge-request: 1396 Reviewed-by: Jan-Arve Saether --- src/gui/graphicsview/qgraphicsitem.cpp | 20 ++--- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 108 +++++++++++++++++++++++++ 2 files changed, 119 insertions(+), 9 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 9092593..f7ae045 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -2237,7 +2237,8 @@ bool QGraphicsItem::isVisible() const returned. \a parent can be 0, in which case this function will return whether the item is visible to the scene or not. - An item may not be visible to its ancestors even if isVisible() is true. If + An item may not be visible to its ancestors even if isVisible() is true. It + may also be visible to its ancestors even if isVisible() is false. If any ancestor is hidden, the item itself will be implicitly hidden, in which case this function will return false. @@ -2245,15 +2246,16 @@ bool QGraphicsItem::isVisible() const */ bool QGraphicsItem::isVisibleTo(const QGraphicsItem *parent) const { - if (!d_ptr->visible) + const QGraphicsItem *p = this; + if (d_ptr->explicitlyHidden) return false; - if (parent == this) - return true; - if (parentItem() && parentItem()->isVisibleTo(parent)) - return true; - if (!parent && !parentItem()) - return true; - return false; + do { + if (p == parent) + return true; + if (p->d_ptr->explicitlyHidden) + return false; + } while ((p = p->d_ptr->parent)); + return parent == 0; } /*! diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 9b834d5..b6a402e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -306,6 +306,7 @@ private slots: void inputMethodHints(); void toolTip(); void visible(); + void isVisibleTo(); void explicitlyVisible(); void enabled(); void explicitlyEnabled(); @@ -1138,6 +1139,113 @@ void tst_QGraphicsItem::visible() QVERIFY(!item->hasFocus()); } +void tst_QGraphicsItem::isVisibleTo() +{ + QGraphicsScene scene; + QGraphicsItem *parent = scene.addRect(QRectF(0, 0, 100, 100)); + QGraphicsItem *child = scene.addRect(QRectF(25, 25, 50, 50)); + QGraphicsItem *grandChild = scene.addRect(QRectF(50, 50, 50, 50)); + QGraphicsItem *stranger = scene.addRect(100, 100, 100, 100); + + child->setParentItem(parent); + grandChild->setParentItem(child); + + QVERIFY(grandChild->isVisible()); + QVERIFY(grandChild->isVisibleTo(grandChild)); + QVERIFY(grandChild->isVisibleTo(child)); + QVERIFY(grandChild->isVisibleTo(parent)); + QVERIFY(grandChild->isVisibleTo(0)); + QVERIFY(child->isVisible()); + QVERIFY(child->isVisibleTo(child)); + QVERIFY(child->isVisibleTo(parent)); + QVERIFY(child->isVisibleTo(0)); + QVERIFY(parent->isVisible()); + QVERIFY(parent->isVisibleTo(parent)); + QVERIFY(parent->isVisibleTo(0)); + QVERIFY(!parent->isVisibleTo(child)); + QVERIFY(!child->isVisibleTo(grandChild)); + QVERIFY(!grandChild->isVisibleTo(stranger)); + QVERIFY(!child->isVisibleTo(stranger)); + QVERIFY(!parent->isVisibleTo(stranger)); + QVERIFY(!stranger->isVisibleTo(grandChild)); + QVERIFY(!stranger->isVisibleTo(child)); + QVERIFY(!stranger->isVisibleTo(parent)); + + // Case 1: only parent is explicitly hidden + parent->hide(); + + QVERIFY(!grandChild->isVisible()); + QVERIFY(grandChild->isVisibleTo(grandChild)); + QVERIFY(grandChild->isVisibleTo(child)); + QVERIFY(grandChild->isVisibleTo(parent)); + QVERIFY(!grandChild->isVisibleTo(0)); + QVERIFY(!child->isVisible()); + QVERIFY(child->isVisibleTo(child)); + QVERIFY(child->isVisibleTo(parent)); + QVERIFY(!child->isVisibleTo(0)); + QVERIFY(!parent->isVisible()); + QVERIFY(!parent->isVisibleTo(parent)); + QVERIFY(!parent->isVisibleTo(0)); + QVERIFY(!parent->isVisibleTo(child)); + QVERIFY(!child->isVisibleTo(grandChild)); + QVERIFY(!grandChild->isVisibleTo(stranger)); + QVERIFY(!child->isVisibleTo(stranger)); + QVERIFY(!parent->isVisibleTo(stranger)); + QVERIFY(!stranger->isVisibleTo(grandChild)); + QVERIFY(!stranger->isVisibleTo(child)); + QVERIFY(!stranger->isVisibleTo(parent)); + + // Case 2: only child is hidden + parent->show(); + child->hide(); + + QVERIFY(!grandChild->isVisible()); + QVERIFY(grandChild->isVisibleTo(grandChild)); + QVERIFY(grandChild->isVisibleTo(child)); + QVERIFY(!grandChild->isVisibleTo(parent)); + QVERIFY(!grandChild->isVisibleTo(0)); + QVERIFY(!child->isVisible()); + QVERIFY(!child->isVisibleTo(child)); + QVERIFY(!child->isVisibleTo(parent)); + QVERIFY(!child->isVisibleTo(0)); + QVERIFY(parent->isVisible()); + QVERIFY(parent->isVisibleTo(parent)); + QVERIFY(parent->isVisibleTo(0)); + QVERIFY(!parent->isVisibleTo(child)); + QVERIFY(!child->isVisibleTo(grandChild)); + QVERIFY(!grandChild->isVisibleTo(stranger)); + QVERIFY(!child->isVisibleTo(stranger)); + QVERIFY(!parent->isVisibleTo(stranger)); + QVERIFY(!stranger->isVisibleTo(grandChild)); + QVERIFY(!stranger->isVisibleTo(child)); + QVERIFY(!stranger->isVisibleTo(parent)); + + // Case 3: only grand child is hidden + child->show(); + grandChild->hide(); + + QVERIFY(!grandChild->isVisible()); + QVERIFY(!grandChild->isVisibleTo(grandChild)); + QVERIFY(!grandChild->isVisibleTo(child)); + QVERIFY(!grandChild->isVisibleTo(parent)); + QVERIFY(!grandChild->isVisibleTo(0)); + QVERIFY(child->isVisible()); + QVERIFY(child->isVisibleTo(child)); + QVERIFY(child->isVisibleTo(parent)); + QVERIFY(child->isVisibleTo(0)); + QVERIFY(parent->isVisible()); + QVERIFY(parent->isVisibleTo(parent)); + QVERIFY(parent->isVisibleTo(0)); + QVERIFY(!parent->isVisibleTo(child)); + QVERIFY(!child->isVisibleTo(grandChild)); + QVERIFY(!grandChild->isVisibleTo(stranger)); + QVERIFY(!child->isVisibleTo(stranger)); + QVERIFY(!parent->isVisibleTo(stranger)); + QVERIFY(!stranger->isVisibleTo(grandChild)); + QVERIFY(!stranger->isVisibleTo(child)); + QVERIFY(!stranger->isVisibleTo(parent)); +} + void tst_QGraphicsItem::explicitlyVisible() { QGraphicsScene scene; -- cgit v0.12 From 1a5b3356e5c07d4be19662fac1653ae98cddbbaa Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Fri, 30 Sep 2011 09:56:46 +0200 Subject: Add another part of the source code to the snippet. Fixes: QTBUG-21765 --- examples/dialogs/extension/finddialog.cpp | 2 ++ src/gui/widgets/qdialogbuttonbox.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/examples/dialogs/extension/finddialog.cpp b/examples/dialogs/extension/finddialog.cpp index 2ce0391..2457a5b 100644 --- a/examples/dialogs/extension/finddialog.cpp +++ b/examples/dialogs/extension/finddialog.cpp @@ -104,9 +104,11 @@ FindDialog::FindDialog(QWidget *parent) connect(backSoftKeyAction, SIGNAL(triggered()), qApp, SLOT(quit())); addAction(backSoftKeyAction); #else +//! [6] buttonBox = new QDialogButtonBox(Qt::Vertical); buttonBox->addButton(findButton, QDialogButtonBox::ActionRole); buttonBox->addButton(moreButton, QDialogButtonBox::ActionRole); +//! [6] connect(moreButton, SIGNAL(toggled(bool)), extension, SLOT(setVisible(bool))); #endif diff --git a/src/gui/widgets/qdialogbuttonbox.cpp b/src/gui/widgets/qdialogbuttonbox.cpp index 6c29141..e6842b3 100644 --- a/src/gui/widgets/qdialogbuttonbox.cpp +++ b/src/gui/widgets/qdialogbuttonbox.cpp @@ -94,6 +94,7 @@ QT_BEGIN_NAMESPACE specifying their role. \snippet examples/dialogs/extension/finddialog.cpp 1 + \snippet examples/dialogs/extension/finddialog.cpp 6 Alternatively, QDialogButtonBox provides several standard buttons (e.g. OK, Cancel, Save) that you can use. They exist as flags so you can OR them together in the constructor. -- cgit v0.12 From 3c6f31d6b7ec382e18cfaabf5b9d6e7e56304029 Mon Sep 17 00:00:00 2001 From: Magne Zachrisen Date: Fri, 30 Sep 2011 14:30:18 +0200 Subject: Added text about -random and -seed options in QTest to changelog --- dist/changes-4.8.0 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 39c0adf..a8b4a3a 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -183,6 +183,11 @@ QtDBus - QDBusConnection: Add methods disconnectFromPeer and connectToPeer - Make the DBus timeout configurable in QDBusAbstractInterface. +QtTest +------ + - Added -random and -seed options to tests, making the test cases within + a test execute in arbitrary order. + **************************************************************************** * Database Drivers * **************************************************************************** -- cgit v0.12