[arch-commits] Commit in qt/trunk (2 files)

2011-05-04 Thread Andrea Scarpino
Date: Wednesday, May 4, 2011 @ 09:21:18
  Author: andrea
Revision: 122539

upgpkg: qt 4.7.3-1
upstream release

Modified:
  qt/trunk/PKGBUILD
Deleted:
  qt/trunk/blacklist-fraudulent-comodo-certificates.patch

+
 PKGBUILD   |   12 +--
 blacklist-fraudulent-comodo-certificates.patch |   89 ---
 2 files changed, 5 insertions(+), 96 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-05-04 12:51:28 UTC (rev 122538)
+++ PKGBUILD2011-05-04 13:21:18 UTC (rev 122539)
@@ -4,8 +4,8 @@
 
 pkgbase=qt
 pkgname=('qt' 'qt-private-headers')
-pkgver=4.7.2
-pkgrel=6
+pkgver=4.7.3
+pkgrel=1
 arch=('i686' 'x86_64')
 url='http://qt.nokia.com/'
 license=('GPL3' 'LGPL')
@@ -17,14 +17,12 @@
 _pkgfqn=qt-everywhere-opensource-src-${pkgver}
 source=(ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz;
 'assistant.desktop' 'designer.desktop' 'linguist.desktop'
-'qtconfig.desktop'
-'blacklist-fraudulent-comodo-certificates.patch')
-md5sums=('66b992f5c21145df08c99d21847f4fdb'
+'qtconfig.desktop')
+md5sums=('49b96eefb1224cc529af6fe5608654fe'
  'fc211414130ab2764132e7370f8e5caa'
  '85179f5e0437514f8639957e1d8baf62'
  'f11852b97583610f3dbb669ebc3e21bc'
- '6b771c8a81dd90b45e8a79afa0e5bbfd'
- 'af1259401447f4de59f1d4c2cbedafed')
+ '6b771c8a81dd90b45e8a79afa0e5bbfd')
 
 build() {
unset QMAKESPEC

Deleted: blacklist-fraudulent-comodo-certificates.patch
===
--- blacklist-fraudulent-comodo-certificates.patch  2011-05-04 12:51:28 UTC 
(rev 122538)
+++ blacklist-fraudulent-comodo-certificates.patch  2011-05-04 13:21:18 UTC 
(rev 122539)
@@ -1,89 +0,0 @@
-diff --git a/src/network/ssl/qsslcertificate.cpp 
b/src/network/ssl/qsslcertificate.cpp
-index 618ac79..a5cdf01 100644
 a/src/network/ssl/qsslcertificate.cpp
-+++ b/src/network/ssl/qsslcertificate.cpp
-@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
- Returns true if this certificate is valid; otherwise returns
- false.
- 
--Note: Currently, this function only checks that the current
-+Note: Currently, this function checks that the current
- data-time is within the date-time range during which the
--certificate is considered valid. No other checks are
--currently performed.
-+certificate is considered valid, and checks that the
-+certificate is not in a blacklist of fraudulent certificates.
- 
- \sa isNull()
- */
- bool QSslCertificate::isValid() const
- {
- const QDateTime currentTime = QDateTime::currentDateTime();
--return currentTime = d-notValidBefore  currentTime = 
d-notValidAfter;
-+return currentTime = d-notValidBefore 
-+currentTime = d-notValidAfter 
-+! QSslCertificatePrivate::isBlacklisted(*this);
- }
- 
- /*!
-@@ -798,6 +800,30 @@ QListQSslCertificate 
QSslCertificatePrivate::certificatesFromDer(const QByteAr
- return certificates;
- }
- 
-+// These certificates are known to be fraudulent and were created during the 
comodo
-+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
-+static const char *certificate_blacklist[] = {
-+04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e,
-+f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06,
-+d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3,
-+39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29,
-+3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71,
-+e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47,
-+92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43,
-+b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0,
-+d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0,
-+0
-+};
-+
-+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate certificate)
-+{
-+for (int a = 0; certificate_blacklist[a] != 0; a++) {
-+if (certificate.serialNumber() == certificate_blacklist[a])
-+return true;
-+}
-+return false;
-+}
-+
- #ifndef QT_NO_DEBUG_STREAM
- QDebug operator(QDebug debug, const QSslCertificate certificate)
- {
-diff --git a/src/network/ssl/qsslcertificate_p.h 
b/src/network/ssl/qsslcertificate_p.h
-index cdceb0f..1ce33d3 100644
 a/src/network/ssl/qsslcertificate_p.h
-+++ b/src/network/ssl/qsslcertificate_p.h
-@@ -96,6 +96,7 @@ public:
- static QSslCertificate QSslCertificate_from_X509(X509 *x509);
- static QListQSslCertificate certificatesFromPem(const QByteArray pem, 
int count = -1);
- static QListQSslCertificate certificatesFromDer(const QByteArray der, 
int count = -1);
-+static bool isBlacklisted(const QSslCertificate certificate);
- 
- friend class QSslSocketBackendPrivate;
- 
-diff --git a/src/network/ssl/qsslsocket_openssl.cpp 
b/src/network/ssl/qsslsocket_openssl.cpp
-index 0866534..2427193 100644
 

[arch-commits] Commit in qt/trunk (2 files)

2011-03-29 Thread Andrea Scarpino
Date: Tuesday, March 29, 2011 @ 14:21:55
  Author: andrea
Revision: 117207

Security fix, see 
http://labs.qt.nokia.com/2011/03/29/security-advisory-fraudulent-certificates/

Added:
  qt/trunk/blacklist-fraudulent-comodo-certificates.patch
Modified:
  qt/trunk/PKGBUILD

+
 PKGBUILD   |8 +-
 blacklist-fraudulent-comodo-certificates.patch |   89 +++
 2 files changed, 94 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2011-03-29 16:44:46 UTC (rev 117206)
+++ PKGBUILD2011-03-29 18:21:55 UTC (rev 117207)
@@ -5,7 +5,7 @@
 pkgbase=qt
 pkgname=('qt' 'qt-private-headers')
 pkgver=4.7.2
-pkgrel=5
+pkgrel=6
 arch=('i686' 'x86_64')
 url='http://qt.nokia.com/'
 license=('GPL3' 'LGPL')
@@ -17,12 +17,14 @@
 _pkgfqn=qt-everywhere-opensource-src-${pkgver}
 source=(ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz;
 'assistant.desktop' 'designer.desktop' 'linguist.desktop'
-'qtconfig.desktop')
+'qtconfig.desktop'
+'blacklist-fraudulent-comodo-certificates.patch')
 md5sums=('66b992f5c21145df08c99d21847f4fdb'
  'fc211414130ab2764132e7370f8e5caa'
  '85179f5e0437514f8639957e1d8baf62'
  'f11852b97583610f3dbb669ebc3e21bc'
- '6b771c8a81dd90b45e8a79afa0e5bbfd')
+ '6b771c8a81dd90b45e8a79afa0e5bbfd'
+ 'af1259401447f4de59f1d4c2cbedafed')
 
 build() {
unset QMAKESPEC

Added: blacklist-fraudulent-comodo-certificates.patch
===
--- blacklist-fraudulent-comodo-certificates.patch  
(rev 0)
+++ blacklist-fraudulent-comodo-certificates.patch  2011-03-29 18:21:55 UTC 
(rev 117207)
@@ -0,0 +1,89 @@
+diff --git a/src/network/ssl/qsslcertificate.cpp 
b/src/network/ssl/qsslcertificate.cpp
+index 618ac79..a5cdf01 100644
+--- a/src/network/ssl/qsslcertificate.cpp
 b/src/network/ssl/qsslcertificate.cpp
+@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
+ Returns true if this certificate is valid; otherwise returns
+ false.
+ 
+-Note: Currently, this function only checks that the current
++Note: Currently, this function checks that the current
+ data-time is within the date-time range during which the
+-certificate is considered valid. No other checks are
+-currently performed.
++certificate is considered valid, and checks that the
++certificate is not in a blacklist of fraudulent certificates.
+ 
+ \sa isNull()
+ */
+ bool QSslCertificate::isValid() const
+ {
+ const QDateTime currentTime = QDateTime::currentDateTime();
+-return currentTime = d-notValidBefore  currentTime = 
d-notValidAfter;
++return currentTime = d-notValidBefore 
++currentTime = d-notValidAfter 
++! QSslCertificatePrivate::isBlacklisted(*this);
+ }
+ 
+ /*!
+@@ -798,6 +800,30 @@ QListQSslCertificate 
QSslCertificatePrivate::certificatesFromDer(const QByteAr
+ return certificates;
+ }
+ 
++// These certificates are known to be fraudulent and were created during the 
comodo
++// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
++static const char *certificate_blacklist[] = {
++04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e,
++f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06,
++d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3,
++39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29,
++3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71,
++e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47,
++92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43,
++b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0,
++d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0,
++0
++};
++
++bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate certificate)
++{
++for (int a = 0; certificate_blacklist[a] != 0; a++) {
++if (certificate.serialNumber() == certificate_blacklist[a])
++return true;
++}
++return false;
++}
++
+ #ifndef QT_NO_DEBUG_STREAM
+ QDebug operator(QDebug debug, const QSslCertificate certificate)
+ {
+diff --git a/src/network/ssl/qsslcertificate_p.h 
b/src/network/ssl/qsslcertificate_p.h
+index cdceb0f..1ce33d3 100644
+--- a/src/network/ssl/qsslcertificate_p.h
 b/src/network/ssl/qsslcertificate_p.h
+@@ -96,6 +96,7 @@ public:
+ static QSslCertificate QSslCertificate_from_X509(X509 *x509);
+ static QListQSslCertificate certificatesFromPem(const QByteArray pem, 
int count = -1);
+ static QListQSslCertificate certificatesFromDer(const QByteArray der, 
int count = -1);
++static bool isBlacklisted(const QSslCertificate certificate);
+ 
+ friend class QSslSocketBackendPrivate;
+ 
+diff --git a/src/network/ssl/qsslsocket_openssl.cpp 
b/src/network/ssl/qsslsocket_openssl.cpp
+index 0866534..2427193 100644
+--- 

[arch-commits] Commit in qt/trunk (2 files)

2010-09-27 Thread Andrea Scarpino
Date: Monday, September 27, 2010 @ 08:21:11
  Author: andrea
Revision: 91561

upgpkg: qt 4.7.0-2
fix patch

Modified:
  qt/trunk/PKGBUILD
  qt/trunk/fix-scroll-when-last-item-is-removed.patch

+
 PKGBUILD   |2 -
 fix-scroll-when-last-item-is-removed.patch |   39 ---
 2 files changed, 1 insertion(+), 40 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2010-09-27 12:18:48 UTC (rev 91560)
+++ PKGBUILD2010-09-27 12:21:11 UTC (rev 91561)
@@ -24,7 +24,7 @@
  'd457f0a0ad68a3861c3cadefe3b42ded'
  '668331d9798a0e2b94381efb7be4c513'
  'c29f2993d6a0f73d756d2fa36e130e1c'
- '072a9b008878e171a86fb90cdf8ce52d')
+ 'ef20c34afc5be5ed62f2935be66d9402')
 
 build() {
unset QMAKESPEC

Modified: fix-scroll-when-last-item-is-removed.patch
===
--- fix-scroll-when-last-item-is-removed.patch  2010-09-27 12:18:48 UTC (rev 
91560)
+++ fix-scroll-when-last-item-is-removed.patch  2010-09-27 12:21:11 UTC (rev 
91561)
@@ -33,45 +33,6 @@
  int itemsInViewport = 0;
  if (uniformRowHeights) {
  if (defaultItemHeight = 0)
-diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp 
b/tests/auto/qtreeview/tst_qtreeview.cpp
-index 7e2e800..c7b53e9 100644
 a/tests/auto/qtreeview/tst_qtreeview.cpp
-+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
-@@ -240,6 +240,7 @@ private slots:
- void taskQTBUG_6450_selectAllWith1stColumnHidden();
- void taskQTBUG_9216_setSizeAndUniformRowHeightsWrongRepaint();
- void taskQTBUG_11466_keyboardNavigationRegression();
-+void taskQTBUG_13567_removeLastItemRegression();
- };
- 
- class QtTestModel: public QAbstractItemModel
-@@ -3910,5 +3911,26 @@ void 
tst_QTreeView::taskQTBUG_11466_keyboardNavigationRegression()
- QTRY_COMPARE(treeView.currentIndex(), 
treeView.selectionModel()-selection().indexes().first());
- }
- 
-+void tst_QTreeView::taskQTBUG_13567_removeLastItemRegression()
-+{
-+QtTestModel model(200, 1);
-+
-+QTreeView view;
-+view.setSelectionMode(QAbstractItemView::ExtendedSelection);
-+view.setModel(model);
-+view.show();
-+QTest::qWaitForWindowShown(view);
-+
-+view.scrollToBottom();
-+QTest::qWait(10);
-+CHECK_VISIBLE(199, 0);
-+
-+view.setCurrentIndex(model.index(199, 0));
-+model.removeLastRow();
-+QTest::qWait(10);
-+QCOMPARE(view.currentIndex(), model.index(198, 0));
-+CHECK_VISIBLE(198, 0);
-+}
-+
- QTEST_MAIN(tst_QTreeView)
- #include tst_qtreeview.moc
 -- 
 1.6.1
 



[arch-commits] Commit in qt/trunk (2 files)

2010-09-26 Thread Andrea Scarpino
Date: Sunday, September 26, 2010 @ 07:20:42
  Author: andrea
Revision: 91295

fix qt regression: QTreeView scrolls to top if current item is removed

Added:
  qt/trunk/fix-scroll-when-last-item-is-removed.patch
Modified:
  qt/trunk/PKGBUILD

+
 PKGBUILD   |   11 ++-
 fix-scroll-when-last-item-is-removed.patch |   77 +++
 2 files changed, 85 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2010-09-26 10:34:58 UTC (rev 91294)
+++ PKGBUILD2010-09-26 11:20:42 UTC (rev 91295)
@@ -4,7 +4,7 @@
 
 pkgname=qt
 pkgver=4.7.0
-pkgrel=1
+pkgrel=2
 pkgdesc='A cross-platform application and UI framework'
 arch=('i686' 'x86_64')
 url='http://qt.nokia.com/'
@@ -17,12 +17,14 @@
 options=('!libtool')
 _pkgfqn=qt-everywhere-opensource-src-${pkgver}
 source=(ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz;
-'assistant.desktop' 'designer.desktop' 'linguist.desktop' 
'qtconfig.desktop')
+'assistant.desktop' 'designer.desktop' 'linguist.desktop' 
'qtconfig.desktop'
+   'fix-scroll-when-last-item-is-removed.patch')
 md5sums=('3a2f25b9b115037277f4fb759194a7a5'
  'a445c6917086d80f1cfc1e40cb6b0132'
  'd457f0a0ad68a3861c3cadefe3b42ded'
  '668331d9798a0e2b94381efb7be4c513'
- 'c29f2993d6a0f73d756d2fa36e130e1c')
+ 'c29f2993d6a0f73d756d2fa36e130e1c'
+ '072a9b008878e171a86fb90cdf8ce52d')
 
 build() {
unset QMAKESPEC
@@ -32,6 +34,9 @@
 
cd $srcdir/$_pkgfqn
 
+   # Already fixed in 4.7.1
+   patch -Np1 -i ${srcdir}/fix-scroll-when-last-item-is-removed.patch
+
sed -i s|-O2|$CXXFLAGS| mkspecs/common/g++.conf
sed -i /^QMAKE_RPATH/s| -Wl,-rpath,||g mkspecs/common/g++.conf
sed -i /^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g mkspecs/common/g++.conf

Added: fix-scroll-when-last-item-is-removed.patch
===
--- fix-scroll-when-last-item-is-removed.patch  (rev 0)
+++ fix-scroll-when-last-item-is-removed.patch  2010-09-26 11:20:42 UTC (rev 
91295)
@@ -0,0 +1,77 @@
+From 6da6b7099d4e0b49329793e4b90703ec3d868048 Mon Sep 17 00:00:00 2001
+From: Frank Reininghaus frank7...@googlemail.com
+Date: Wed, 22 Sep 2010 10:19:59 +0200
+Subject: [PATCH] QTreeView: do not scroll to top if last item is removed
+
+When the last item is the current item and is removed,
+QTreeViewPrivate::updateScrollBars() is called after QTreeViewPrivate's
+viewItems member is cleared. This commit makes sure that viewItems is
+restored by calling QTreeView::doItemsLayout() in this case, preventing
+that the scroll bar range is set to zero temporarily and the view is
+scrolled to the top unexpectedly (this was a regression in 4.7.0:
+QTBUG-13567).
+
+Merge-request: 2481
+Reviewed-by: Olivier Goffart olivier.goff...@nokia.com
+---
+ src/gui/itemviews/qtreeview.cpp|4 
+ tests/auto/qtreeview/tst_qtreeview.cpp |   22 ++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+
+diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
+index b797776..40b51fe 100644
+--- a/src/gui/itemviews/qtreeview.cpp
 b/src/gui/itemviews/qtreeview.cpp
+@@ -3435,6 +3435,10 @@ void QTreeViewPrivate::updateScrollBars()
+ if (!viewportSize.isValid())
+ viewportSize = QSize(0, 0);
+ 
++if (viewItems.isEmpty()) {
++q-doItemsLayout();
++}
++
+ int itemsInViewport = 0;
+ if (uniformRowHeights) {
+ if (defaultItemHeight = 0)
+diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp 
b/tests/auto/qtreeview/tst_qtreeview.cpp
+index 7e2e800..c7b53e9 100644
+--- a/tests/auto/qtreeview/tst_qtreeview.cpp
 b/tests/auto/qtreeview/tst_qtreeview.cpp
+@@ -240,6 +240,7 @@ private slots:
+ void taskQTBUG_6450_selectAllWith1stColumnHidden();
+ void taskQTBUG_9216_setSizeAndUniformRowHeightsWrongRepaint();
+ void taskQTBUG_11466_keyboardNavigationRegression();
++void taskQTBUG_13567_removeLastItemRegression();
+ };
+ 
+ class QtTestModel: public QAbstractItemModel
+@@ -3910,5 +3911,26 @@ void 
tst_QTreeView::taskQTBUG_11466_keyboardNavigationRegression()
+ QTRY_COMPARE(treeView.currentIndex(), 
treeView.selectionModel()-selection().indexes().first());
+ }
+ 
++void tst_QTreeView::taskQTBUG_13567_removeLastItemRegression()
++{
++QtTestModel model(200, 1);
++
++QTreeView view;
++view.setSelectionMode(QAbstractItemView::ExtendedSelection);
++view.setModel(model);
++view.show();
++QTest::qWaitForWindowShown(view);
++
++view.scrollToBottom();
++QTest::qWait(10);
++CHECK_VISIBLE(199, 0);
++
++view.setCurrentIndex(model.index(199, 0));
++model.removeLastRow();
++QTest::qWait(10);
++QCOMPARE(view.currentIndex(), model.index(198, 0));
++CHECK_VISIBLE(198, 0);
++}
++
+