Update gitignore, remove old patches

This commit is contained in:
Daniele Viganò 2016-07-17 15:35:46 +02:00
parent 339777385f
commit 5f6628f6e8
3 changed files with 1 additions and 56 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ qgis_1.5.0.tar.gz
/qgis-2.14.0.tar.bz2 /qgis-2.14.0.tar.bz2
/qgis-2.14.1.tar.bz2 /qgis-2.14.1.tar.bz2
/qgis-2.14.3.tar.bz2 /qgis-2.14.3.tar.bz2
/qgis-2.16.0.tar.bz2

View File

@ -1,13 +0,0 @@
diff --git a/src/app/qgswelcomepageitemsmodel.cpp b/src/app/qgswelcomepageitemsmodel.cpp
index 4a42a6d..5a4b975 100644
--- a/src/app/qgswelcomepageitemsmodel.cpp
+++ b/src/app/qgswelcomepageitemsmodel.cpp
@@ -114,7 +114,7 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
doc.setTextWidth( width - ( !icon.isNull() ? icon.width() + 35 : 35 ) );
- return QSize( width, qMax( doc.size().height() + 10, ( double )icon.height() ) + 20 );
+ return QSize( width, qMax( ( double ) doc.size().height() + 10, ( double )icon.height() ) + 20 );
}
QgsWelcomePageItemsModel::QgsWelcomePageItemsModel( QObject* parent )

View File

@ -1,43 +0,0 @@
From 30449e577f0cd432bd8c60787743fba54c1e51b9 Mon Sep 17 00:00:00 2001
From: Nyall Dawson <nyall.dawson@gmail.com>
Date: Thu, 3 Mar 2016 10:34:32 +1100
Subject: [PATCH] Fix fetching subset of attributes with mssql (fix #14402),
add test
---
src/providers/mssql/qgsmssqlfeatureiterator.cpp | 2 +-
tests/src/python/providertestbase.py | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/providers/mssql/qgsmssqlfeatureiterator.cpp b/src/providers/mssql/qgsmssqlfeatureiterator.cpp
index 53214d4..560d344 100644
--- a/src/providers/mssql/qgsmssqlfeatureiterator.cpp
+++ b/src/providers/mssql/qgsmssqlfeatureiterator.cpp
@@ -284,7 +284,7 @@ bool QgsMssqlFeatureIterator::fetchFeature( QgsFeature& feature )
for ( int i = 0; i < mAttributesToFetch.count(); i++ )
{
QVariant v = mQuery->value( i );
- const QgsField &fld = mSource->mFields.at( i );
+ const QgsField &fld = mSource->mFields.at( mAttributesToFetch.at( i ) );
if ( v.type() != fld.type() )
v = QgsVectorDataProvider::convertValue( fld.type(), v.toString() );
feature.setAttribute( mAttributesToFetch.at( i ), v );
diff --git a/tests/src/python/providertestbase.py b/tests/src/python/providertestbase.py
index 7b8707e..26e6d86 100644
--- a/tests/src/python/providertestbase.py
+++ b/tests/src/python/providertestbase.py
@@ -384,3 +384,14 @@ def testClosedIterators(self):
# Test rewinding closed iterator
self.assertFalse(f_it.rewind(), 'Rewinding closed iterator successful, should not be allowed')
+
+ def testGetFeaturesSubsetAttributes(self):
+ """ Test that expected results are returned when using subsets of attributes """
+
+ tests = {'pk': set([1, 2, 3, 4, 5]),
+ 'cnt': set([-200, 300, 100, 200, 400]),
+ 'name': set(['Pear', 'Orange', 'Apple', 'Honey', NULL]),
+ 'name2': set(['NuLl', 'PEaR', 'oranGe', 'Apple', 'Honey'])}
+ for field, expected in tests.iteritems():
+ result = set([f[field] for f in self.provider.getFeatures(QgsFeatureRequest().setSubsetOfAttributes([field], self.provider.fields()))])
+ self.assertEqual(result, expected, 'Expected {}, got {}'.format(expected, result))