From 991b6bc973238a6fd73c4c71e7c642b8cc455df3 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 4 Sep 2009 11:06:08 +0200 Subject: Fix a regression with QListView::setRowHidden() when a root index is set When setRowHidden() was called after a root index was set then it would not actually hide the row, if a root index is not set then it worked fine. Task-number: 260879 Reviewed-by: Jan-Arve --- src/gui/itemviews/qlistview.cpp | 8 ++++---- tests/auto/qlistview/tst_qlistview.cpp | 12 ++++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 35b44b4..1212194 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -549,16 +549,16 @@ void QListView::setRowHidden(int row, bool hide) const bool hidden = d->isHidden(row); if (d->viewMode == ListMode) { if (hide && !hidden) - d->hiddenRows.append(d->model->index(row, 0)); + d->hiddenRows.append(d->model->index(row, 0, rootIndex())); else if (!hide && hidden) - d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0))); + d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0, rootIndex()))); d->doDelayedItemsLayout(); } else { if (hide && !hidden) { d->dynamicListView->removeItem(row); - d->hiddenRows.append(d->model->index(row, 0)); + d->hiddenRows.append(d->model->index(row, 0, rootIndex())); } else if (!hide && hidden) { - d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0))); + d->hiddenRows.remove(d->hiddenRows.indexOf(d->model->index(row, 0, rootIndex()))); d->dynamicListView->insertItem(row); } if (d->resizeMode == Adjust) diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index b52bef0..27c6a05 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -417,6 +417,18 @@ void tst_QListView::hideRows() view.setRowHidden(0, false); QVERIFY(!view.isRowHidden(0)); + QStandardItemModel sim(0); + QStandardItem *root = new QStandardItem("Root row"); + for (int i=0;i<5;i++) + root->appendRow(new QStandardItem(QString("Row %1").arg(i))); + sim.appendRow(root); + view.setModel(&sim); + view.setRootIndex(root->index()); + QVERIFY(!view.isRowHidden(0)); + view.setRowHidden(0, true); + QVERIFY(view.isRowHidden(0)); + view.setRowHidden(0, false); + QVERIFY(!view.isRowHidden(0)); } -- cgit v0.12 From a42610cc9c9cb9f8de52b519fad190746063335f Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Mon, 3 Aug 2009 15:46:04 +0200 Subject: Wizard background images incorrect in Snow Leopard. We need to clear the QPixmap before the image is drawn using the CGContextDrawImage(). Reviewed-by: Norwegian Rock Cat --- src/gui/image/qpixmap_mac.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp index 3a9676d..35d5d4b 100644 --- a/src/gui/image/qpixmap_mac.cpp +++ b/src/gui/image/qpixmap_mac.cpp @@ -1321,6 +1321,7 @@ QPixmap QPixmap::fromMacCGImageRef(CGImageRef image) const size_t w = CGImageGetWidth(image), h = CGImageGetHeight(image); QPixmap ret(w, h); + ret.fill(Qt::transparent); CGRect rect = CGRectMake(0, 0, w, h); CGContextRef ctx = qt_mac_cg_context(&ret); qt_mac_drawCGImage(ctx, &rect, image); -- cgit v0.12 From 4d3a876a87bec473b73b7ded74393b50b52f2e2a Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Fri, 4 Sep 2009 14:22:17 +0200 Subject: Fix pixel snow on the combo box popup on Snow Leopard. On 10.5 and below the pixmap data bytes happened to be initialized by malloc, on 10.6 this is no longer the case. Revby: Gunnar Sletta Similar to 28f94e1ef94f. --- src/gui/styles/qmacstyle_mac.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm index 194c244..4cd8332 100644 --- a/src/gui/styles/qmacstyle_mac.mm +++ b/src/gui/styles/qmacstyle_mac.mm @@ -2147,6 +2147,7 @@ void QMacStyle::polish(QWidget* w) w->setWindowOpacity(QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5 ? 0.985 : 0.94); if (!w->testAttribute(Qt::WA_SetPalette)) { QPixmap px(64, 64); + px.fill(Qt::white); HIThemeMenuDrawInfo mtinfo; mtinfo.version = qt_mac_hitheme_version; mtinfo.menuType = kThemeMenuTypePopUp; -- cgit v0.12 From d35fe5bb21008ab30c76ebd2fe688ea3e35c084e Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Sat, 5 Sep 2009 11:17:32 +1000 Subject: Remove license header, which cannot be parsed by Sun assembler. Commit 2e0d78836becf24c7f27c982316cf1b4492f27aa fixed this for i386 but omitted the fix for x86_64. --- src/corelib/arch/x86_64/qatomic_sun.s | 40 ----------------------------------- 1 file changed, 40 deletions(-) diff --git a/src/corelib/arch/x86_64/qatomic_sun.s b/src/corelib/arch/x86_64/qatomic_sun.s index 4517fe4..37969e6 100644 --- a/src/corelib/arch/x86_64/qatomic_sun.s +++ b/src/corelib/arch/x86_64/qatomic_sun.s @@ -1,43 +1,3 @@ -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! -!! Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -!! Contact: Nokia Corporation (qt-info@nokia.com) -!! -!! This file is part of the QtGui module of the Qt Toolkit. -!! -!! $QT_BEGIN_LICENSE:LGPL$ -!! No Commercial Usage -!! This file contains pre-release code and may not be distributed. -!! You may use this file in accordance with the terms and conditions -!! contained in the Technology Preview License Agreement accompanying -!! this package. -!! -!! GNU Lesser General Public License Usage -!! Alternatively, this file may be used under the terms of the GNU Lesser -!! General Public License version 2.1 as published by the Free Software -!! Foundation and appearing in the file LICENSE.LGPL included in the -!! packaging of this file. Please review the following information to -!! ensure the GNU Lesser General Public License version 2.1 requirements -!! will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -!! -!! In addition, as a special exception, Nokia gives you certain -!! additional rights. These rights are described in the Nokia Qt LGPL -!! Exception version 1.1, included in the file LGPL_EXCEPTION.txt in this -!! package. -!! -!! If you have questions regarding the use of this file, please contact -!! Nokia at qt-info@nokia.com. -!! -!! -!! -!! -!! -!! -!! -!! -!! $QT_END_LICENSE$ -!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .code64 .globl q_atomic_increment -- cgit v0.12 From 91443717927ee648a0c1c4185aae171ccdf87e2b Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Mon, 7 Sep 2009 10:37:42 +1000 Subject: Fixed compile on Solaris. The `test' builtin in Solaris' /bin/sh does not understand `-e', use `-f' instead. Fixes: configure: test: argument expected Note, using the `-nokia-developer' configure option hides this breakage. Reviewed-by: Rhys Weatherley --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index af8c209..2e2b474 100755 --- a/configure +++ b/configure @@ -3742,7 +3742,7 @@ elif [ "$Edition" = "OpenSource" ]; then while true; do echo "You are licensed to use this software under the terms of" echo "the Lesser GNU General Public License (LGPL) versions 2.1." - if [ -e "$relpath/LICENSE.GPL3" ]; then + if [ -f "$relpath/LICENSE.GPL3" ]; then echo "You are also licensed to use this software under the terms of" echo "the GNU General Public License (GPL) versions 3." affix="either" @@ -3754,7 +3754,7 @@ elif [ "$Edition" = "OpenSource" ]; then echo "You have already accepted the terms of the $LicenseType license." acceptance=yes else - if [ -e "$relpath/LICENSE.GPL3" ]; then + if [ -f "$relpath/LICENSE.GPL3" ]; then echo "Type '3' to view the GNU General Public License version 3." fi echo "Type 'L' to view the Lesser GNU General Public License version 2.1." -- cgit v0.12 From 74fd14a305ce7402890de1919c3a27ac4d1cbf38 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 8 Sep 2009 09:28:41 +0200 Subject: Doc: keypad navigation is supported on Windows CE Reviewed-by: thartman --- src/gui/kernel/qapplication.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index 327f5ce..bc8ed96 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -4687,7 +4687,11 @@ void QApplicationPrivate::emitLastWindowClosed() If \a enable is true, Qt::Key_Up and Qt::Key_Down are used to change focus. - This feature is available in Qt for Embedded Linux only. + This feature is available in Qt for Embedded Linux and Windows CE only. + + \note On Windows CE this feature is disabled by default for touch device + mkspecs. To enable keypad navigation, build Qt with + QT_KEYPAD_NAVIGATION defined. \sa keypadNavigationEnabled() */ @@ -4700,7 +4704,11 @@ void QApplication::setKeypadNavigationEnabled(bool enable) Returns true if Qt is set to use keypad navigation; otherwise returns false. The default is false. - This feature is available in Qt for Embedded Linux only. + This feature is available in Qt for Embedded Linux and Windows CE only. + + \note On Windows CE this feature is disabled by default for touch device + mkspecs. To enable keypad navigation, build Qt with + QT_KEYPAD_NAVIGATION defined. \sa setKeypadNavigationEnabled() */ -- cgit v0.12 From 42fd1e924e8e075327d337824ea3d128b2b1932a Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Tue, 8 Sep 2009 10:47:44 +0200 Subject: Tests: Do not execute network tests at all if DNS setup is broken. Reviewed-by: Jesper --- tests/auto/network-settings.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 4804744..e114dd6 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -73,3 +73,17 @@ public: #endif }; + +class QtNetworkSettingsInitializerCode { +public: + QtNetworkSettingsInitializerCode() { + QHostInfo testServerResult = QHostInfo::fromName(QtNetworkSettings::serverName()); + if (testServerResult.error() != QHostInfo::NoError) { + qWarning() << "Could not lookup" << QtNetworkSettings::serverName(); + qWarning() << "Please configure the test environment!"; + qWarning() << "See /etc/hosts or network-settings.h"; + qFatal("Exiting"); + } + } +}; +QtNetworkSettingsInitializerCode qtNetworkSettingsInitializer; -- cgit v0.12