Compare commits
6 Commits
3b4e476f50
...
25b8f81cca
Author | SHA1 | Date | |
---|---|---|---|
|
25b8f81cca | ||
|
e756dbbffd | ||
|
7dfe643382 | ||
|
08ea430bf9 | ||
|
b736bd1807 | ||
|
4502f08c4b |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -28,3 +28,4 @@ qgis_1.5.0.tar.gz
|
|||
/qgis-2.18.0.tar.bz2
|
||||
/qgis-2.18.1.tar.bz2
|
||||
/qgis-2.18.2.tar.bz2
|
||||
/qgis-2.18.4.tar.bz2
|
||||
|
|
|
@ -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 )
|
|
@ -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))
|
|
@ -1,24 +0,0 @@
|
|||
diff -up qgis-2.16.2/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp.qreal qgis-2.16.2/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp
|
||||
--- qgis-2.16.2/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp.qreal 2016-08-26 05:58:37.000000000 -0600
|
||||
+++ qgis-2.16.2/src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp 2016-09-26 14:27:41.330518186 -0600
|
||||
@@ -414,15 +414,15 @@ void QgsVectorGradientColorRampV2Dialog:
|
||||
QColor newColor = mStopEditor->selectedStop().color;
|
||||
|
||||
if ( mCurrentPlotColorComponent == 0 )
|
||||
- newColor = QColor::fromHslF( qBound( 0.0, point.y(), 1.0 ), newColor.hslSaturationF(), newColor.lightnessF(), newColor.alphaF() );
|
||||
+ newColor = QColor::fromHslF( qBound( qreal( 0.0 ), point.y(), qreal( 1.0 ) ), newColor.hslSaturationF(), newColor.lightnessF(), newColor.alphaF() );
|
||||
else if ( mCurrentPlotColorComponent == 1 )
|
||||
- newColor = QColor::fromHslF( newColor.hslHueF(), newColor.hslSaturationF(), qBound( 0.0, point.y(), 1.0 ), newColor.alphaF() );
|
||||
+ newColor = QColor::fromHslF( newColor.hslHueF(), newColor.hslSaturationF(), qBound( qreal( 0.0 ), point.y(), qreal( 1.0 ) ), newColor.alphaF() );
|
||||
else if ( mCurrentPlotColorComponent == 2 )
|
||||
- newColor = QColor::fromHslF( newColor.hslHueF(), qBound( 0.0, point.y(), 1.0 ), newColor.lightnessF(), newColor.alphaF() );
|
||||
+ newColor = QColor::fromHslF( newColor.hslHueF(), qBound( qreal( 0.0 ), point.y(), qreal( 1.0 ) ), newColor.lightnessF(), newColor.alphaF() );
|
||||
else if ( mCurrentPlotColorComponent == 3 )
|
||||
- newColor = QColor::fromHslF( newColor.hslHueF(), newColor.hslSaturationF(), newColor.lightnessF(), qBound( 0.0, point.y(), 1.0 ) );
|
||||
+ newColor = QColor::fromHslF( newColor.hslHueF(), newColor.hslSaturationF(), newColor.lightnessF(), qBound( qreal( 0.0 ), point.y(), qreal( 1.0 ) ) );
|
||||
|
||||
- mStopEditor->setSelectedStopDetails( newColor, qBound( 0.0, point.x(), 1.0 ) );
|
||||
+ mStopEditor->setSelectedStopDetails( newColor, qBound( qreal( 0.0 ), point.x(), qreal( 1.0 ) ) );
|
||||
}
|
||||
|
||||
bool byX( QPointF p1, QPointF p2 )
|
25
qgis.spec
25
qgis.spec
|
@ -15,7 +15,7 @@
|
|||
#TODO: Run test suite (see debian/rules)
|
||||
|
||||
Name: qgis
|
||||
Version: 2.18.2
|
||||
Version: 2.18.4
|
||||
Release: 2%{?dist}
|
||||
Summary: A user friendly Open Source Geographic Information System
|
||||
Group: Applications/Engineering
|
||||
|
@ -37,8 +37,15 @@ Source4: %{name}-server-README.fedora
|
|||
Source5: %{name}-mime.xml
|
||||
# Fix builds on 64-bit machines
|
||||
# https://hub.qgis.org/issues/15602
|
||||
# https://github.com/qgis/QGIS/commit/718581ffb12b723f9a3c0ae01b7ec2d8aed9d4bb.patch
|
||||
Patch0: %{name}-lib64.patch
|
||||
|
||||
# Fix some SIP related FTBFS issues
|
||||
# upstream fix: qgsfiledownloader.sip:33:0: src/gui/qgsfiledownloader.h:94:5: error: overriding non-deleted function 'virtual QgsFileDownloader::~QgsFileDownloader()'
|
||||
# workaround (?): RuntimeError: qgis._core cannot import type 'QList<QVariant>' from PyQt4.QtCore
|
||||
# workaround (?): RuntimeError: qgis._core cannot import type 'QList<QPolygonF>' from PyQt4.QtCore
|
||||
Patch1: qgis_sip-ftbfs.patch
|
||||
|
||||
# Some plug-ins need Pyspatialite (bundled)
|
||||
# The license is not totally clear, see:
|
||||
# http://code.google.com/p/pyspatialite/issues/detail?id=3
|
||||
|
@ -183,6 +190,7 @@ Please refer to %{name}-server-README.fedora for details!
|
|||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .lib64
|
||||
%patch1 -p1 -b .sip
|
||||
|
||||
# Remove executable permissions from source code files
|
||||
find . \( -name "*.cpp" -o -name "*.h" \) -type f -perm /111 -execdir chmod -x {} \+
|
||||
|
@ -405,6 +413,21 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 01 2017 Sandro Mani <manisandro@gmail.com> - 2.18.4-2
|
||||
- Add patch to fix FTBFS
|
||||
|
||||
* Fri Feb 24 2017 Volker Froehlich <volker27@gmx.at> - 2.18.4-1
|
||||
- New upstream release
|
||||
|
||||
* Mon Feb 20 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.18.2-5
|
||||
- rebuild (qscintilla)
|
||||
|
||||
* Tue Feb 14 2017 Volker Froehlich <volker27@gmx.at> - 2.18.2-4
|
||||
- Apply build patch for SIP 4.19 (#16071)
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Sun Jan 01 2017 Rex Dieter <rdieter@math.unl.edu> - 2.18.2-2
|
||||
- rebuild (sip), disable PyQwt support (f26+, for now)
|
||||
|
||||
|
|
202
qgis_sip-ftbfs.patch
Normal file
202
qgis_sip-ftbfs.patch
Normal file
|
@ -0,0 +1,202 @@
|
|||
diff --git a/python/core/conversions.sip b/python/core/conversions.sip
|
||||
index f07d3ab1db..948821e91e 100644
|
||||
--- a/python/core/conversions.sip
|
||||
+++ b/python/core/conversions.sip
|
||||
@@ -2041,3 +2041,178 @@ register_from_qvariant_convertor = (void (*)(FromQVariantConvertorFn))sipImportS
|
||||
register_from_qvariant_convertor(null_from_qvariant_convertor);
|
||||
%End
|
||||
%End
|
||||
+
|
||||
+// QList<QVariant> is implemented as a Python list.
|
||||
+%MappedType QList<QVariant> /TypeHintIn="Sequence[QVariant]", TypeHintOut="List[QVariant]", TypeHintValue="[]"/
|
||||
+{
|
||||
+%TypeHeaderCode
|
||||
+#include <qlist.h>
|
||||
+%End
|
||||
+
|
||||
+%ConvertFromTypeCode
|
||||
+ // Create the list.
|
||||
+ PyObject *l;
|
||||
+
|
||||
+ if ((l = PyList_New(sipCpp->size())) == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ // Set the list elements.
|
||||
+ for (int i = 0; i < sipCpp->size(); ++i)
|
||||
+ {
|
||||
+ QVariant *t = new QVariant(sipCpp->at(i));
|
||||
+ PyObject *tobj;
|
||||
+
|
||||
+ if ((tobj = sipConvertFromNewType(t, sipType_QVariant, sipTransferObj)) == NULL)
|
||||
+ {
|
||||
+ Py_DECREF(l);
|
||||
+ delete t;
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ PyList_SET_ITEM(l, i, tobj);
|
||||
+ }
|
||||
+
|
||||
+ return l;
|
||||
+%End
|
||||
+
|
||||
+%ConvertToTypeCode
|
||||
+ SIP_SSIZE_T len;
|
||||
+
|
||||
+ // Check the type if that is all that is required.
|
||||
+ if (sipIsErr == NULL)
|
||||
+ {
|
||||
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||
+ bool ok = (itm && sipCanConvertToType(itm, sipType_QVariant, SIP_NOT_NONE));
|
||||
+
|
||||
+ Py_XDECREF(itm);
|
||||
+
|
||||
+ if (!ok)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ QList<QVariant> *ql = new QList<QVariant>;
|
||||
+ len = PySequence_Size(sipPy);
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||
+ int state;
|
||||
+ QVariant *t = reinterpret_cast<QVariant *>(sipConvertToType(itm, sipType_QVariant, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
|
||||
+
|
||||
+ Py_DECREF(itm);
|
||||
+
|
||||
+ if (*sipIsErr)
|
||||
+ {
|
||||
+ sipReleaseType(t, sipType_QVariant, state);
|
||||
+
|
||||
+ delete ql;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ql->append(*t);
|
||||
+
|
||||
+ sipReleaseType(t, sipType_QVariant, state);
|
||||
+ }
|
||||
+
|
||||
+ *sipCppPtr = ql;
|
||||
+
|
||||
+ return sipGetState(sipTransferObj);
|
||||
+%End
|
||||
+};
|
||||
+
|
||||
+
|
||||
+// QList<QPolygonF> is implemented as a Python list.
|
||||
+%MappedType QList<QPolygonF> /TypeHintIn="Sequence[QPolygonF]", TypeHintOut="List[QPolygonF]", TypeHintValue="[]"/
|
||||
+{
|
||||
+%TypeHeaderCode
|
||||
+#include <qlist.h>
|
||||
+%End
|
||||
+
|
||||
+%ConvertFromTypeCode
|
||||
+ // Create the list.
|
||||
+ PyObject *l;
|
||||
+
|
||||
+ if ((l = PyList_New(sipCpp->size())) == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ // Set the list elements.
|
||||
+ for (int i = 0; i < sipCpp->size(); ++i)
|
||||
+ {
|
||||
+ QPolygonF *t = new QPolygonF(sipCpp->at(i));
|
||||
+ PyObject *tobj;
|
||||
+
|
||||
+ if ((tobj = sipConvertFromNewType(t, sipType_QPolygonF, sipTransferObj)) == NULL)
|
||||
+ {
|
||||
+ Py_DECREF(l);
|
||||
+ delete t;
|
||||
+
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ PyList_SET_ITEM(l, i, tobj);
|
||||
+ }
|
||||
+
|
||||
+ return l;
|
||||
+%End
|
||||
+
|
||||
+%ConvertToTypeCode
|
||||
+ SIP_SSIZE_T len;
|
||||
+
|
||||
+ // Check the type if that is all that is required.
|
||||
+ if (sipIsErr == NULL)
|
||||
+ {
|
||||
+ if (!PySequence_Check(sipPy) || (len = PySequence_Size(sipPy)) < 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||
+ bool ok = (itm && sipCanConvertToType(itm, sipType_QPolygonF, SIP_NOT_NONE));
|
||||
+
|
||||
+ Py_XDECREF(itm);
|
||||
+
|
||||
+ if (!ok)
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ QList<QPolygonF> *ql = new QList<QPolygonF>;
|
||||
+ len = PySequence_Size(sipPy);
|
||||
+
|
||||
+ for (SIP_SSIZE_T i = 0; i < len; ++i)
|
||||
+ {
|
||||
+ PyObject *itm = PySequence_ITEM(sipPy, i);
|
||||
+ int state;
|
||||
+ QPolygonF *t = reinterpret_cast<QPolygonF *>(sipConvertToType(itm, sipType_QPolygonF, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
|
||||
+
|
||||
+ Py_DECREF(itm);
|
||||
+
|
||||
+ if (*sipIsErr)
|
||||
+ {
|
||||
+ sipReleaseType(t, sipType_QPolygonF, state);
|
||||
+
|
||||
+ delete ql;
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ ql->append(*t);
|
||||
+
|
||||
+ sipReleaseType(t, sipType_QPolygonF, state);
|
||||
+ }
|
||||
+
|
||||
+ *sipCppPtr = ql;
|
||||
+
|
||||
+ return sipGetState(sipTransferObj);
|
||||
+%End
|
||||
+};
|
||||
diff --git a/src/gui/qgsfiledownloader.h b/src/gui/qgsfiledownloader.h
|
||||
index c9276f7caf..841e4b6ee1 100644
|
||||
--- a/src/gui/qgsfiledownloader.h
|
||||
+++ b/src/gui/qgsfiledownloader.h
|
||||
@@ -90,8 +90,10 @@ class GUI_EXPORT QgsFileDownloader : public QObject
|
||||
void onSslErrors( QNetworkReply *reply, const QList<QSslError> &errors );
|
||||
#endif
|
||||
|
||||
- private:
|
||||
+ protected:
|
||||
~QgsFileDownloader();
|
||||
+
|
||||
+ private:
|
||||
/**
|
||||
* Abort current request and show an error if the instance has GUI
|
||||
* notifications enabled.
|
||||
--
|
||||
2.12.0
|
||||
|
2
sources
2
sources
|
@ -1 +1 @@
|
|||
SHA512 (qgis-2.18.2.tar.bz2) = b78bc4f109015f943fa019f0c03208496626d8eae1887eddf975f5fdf81f455db47428b8051a3d02ae46e0482bd7c955871b7d5ead5a70205f6525f085dcbf7f
|
||||
SHA512 (qgis-2.18.4.tar.bz2) = 3938fbc1f87990a08411ba8f793d7900f10eaea1824a5a9d2217ca0dea1a8b0849ec91c41be50dc65f590713391bb613429bf48f9ea0ffaaba876dde35b98fc7
|
||||
|
|
Reference in New Issue
Block a user