[qgis] 01/02: Apply patch to fix qreal issue for arm*
Ross Gammon
ross-guest at moszumanska.debian.org
Tue Sep 9 04:05:58 UTC 2014
This is an automated email from the git hooks/post-receive script.
ross-guest pushed a commit to branch master
in repository qgis.
commit f57a26dcb3300b8626350a0c13d83031c5ca565f
Author: Ross Gammon <rossgammon at mail.dk>
Date: Mon Sep 8 20:05:05 2014 +0200
Apply patch to fix qreal issue for arm*
Closes: #760535
Thanks: Peter Green
---
debian/patches/arm_qreal.patch | 130 +++++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 131 insertions(+)
diff --git a/debian/patches/arm_qreal.patch b/debian/patches/arm_qreal.patch
new file mode 100644
index 0000000..3338bce
--- /dev/null
+++ b/debian/patches/arm_qreal.patch
@@ -0,0 +1,130 @@
+From: Ross Gammon <rossgammon at mail.dk>
+Date: Fri, 5 Sep 2014 20:45:46 +0200
+Description: Fix qreal VS double issues.
+ This patch tries to fix qreal VS double issues for ARM
+ .
+ There are two seperate issues, the first is trivial just a typecast on
+ a const.
+ .
+ The second is however less-trivial. sip doesn't seem to like the type
+ QVector<double> on platforms where qreal is float.
+ .
+ Upstream do not believe changing the type to qreal will have knock-on
+ impacts on the native code and recommend applying the patch. It will
+ hopefully be merged upstream soon.
+
+Forwarded: http://hub.qgis.org/issues/11148
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760535
+Author: Peter Michael Green <plugwash at debian.org>
+---
+ python/core/composer/qgsatlascomposition.sip | 4 ++--
+ src/app/composer/qgscomposer.cpp | 2 +-
+ src/core/composer/qgsatlascomposition.cpp | 4 ++--
+ src/core/composer/qgsatlascomposition.h | 6 +++---
+ src/gui/qgscomposerview.cpp | 2 +-
+ 5 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip
+index 3871116..f573eea 100644
+--- a/python/core/composer/qgsatlascomposition.sip
++++ b/python/core/composer/qgsatlascomposition.sip
+@@ -155,7 +155,7 @@ public:
+ * @see setPredefinedScales
+ * @see QgsComposerMap::atlasScalingMode
+ */
+- const QVector<double>& predefinedScales() const;
++ const QVector<qreal>& predefinedScales() const;
+
+ /**Sets the list of predefined scales for the atlas. This is used
+ * for maps which are set to the predefined atlas scaling mode.
+@@ -163,7 +163,7 @@ public:
+ * @see predefinedScales
+ * @see QgsComposerMap::atlasScalingMode
+ */
+- void setPredefinedScales( const QVector<double>& scales );
++ void setPredefinedScales( const QVector<qreal>& scales );
+
+ /** Begins the rendering. Returns true if successful, false if no matching atlas
+ features found.*/
+diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp
+index 841e7e8..e1fc447 100644
+--- a/src/app/composer/qgscomposer.cpp
++++ b/src/app/composer/qgscomposer.cpp
+@@ -3629,7 +3629,7 @@ void QgsComposer::loadAtlasPredefinedScalesFromProject()
+ return;
+ }
+ QgsAtlasComposition& atlasMap = mComposition->atlasComposition();
+- QVector<double> pScales;
++ QVector<qreal> pScales;
+ // first look at project's scales
+ QStringList scales( QgsProject::instance()->readListEntry( "Scales", "/ScalesList" ) );
+ bool hasProjectScales( QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" ) );
+diff --git a/src/core/composer/qgsatlascomposition.cpp b/src/core/composer/qgsatlascomposition.cpp
+index 1153f30..94a8769 100644
+--- a/src/core/composer/qgsatlascomposition.cpp
++++ b/src/core/composer/qgsatlascomposition.cpp
+@@ -506,7 +506,7 @@ void QgsAtlasComposition::prepareMap( QgsComposerMap* map )
+ // choose one of the predefined scales
+ double newWidth = mOrigExtent.width();
+ double newHeight = mOrigExtent.height();
+- const QVector<double>& scales = mPredefinedScales;
++ const QVector<qreal>& scales = mPredefinedScales;
+ for ( int i = 0; i < scales.size(); i++ )
+ {
+ double ratio = scales[i] / originalScale;
+@@ -768,7 +768,7 @@ bool QgsAtlasComposition::evalFeatureFilename()
+ return true;
+ }
+
+-void QgsAtlasComposition::setPredefinedScales( const QVector<double>& scales )
++void QgsAtlasComposition::setPredefinedScales( const QVector<qreal>& scales )
+ {
+ mPredefinedScales = scales;
+ // make sure the list is sorted
+diff --git a/src/core/composer/qgsatlascomposition.h b/src/core/composer/qgsatlascomposition.h
+index 0e20f61..64aeb36 100644
+--- a/src/core/composer/qgsatlascomposition.h
++++ b/src/core/composer/qgsatlascomposition.h
+@@ -183,7 +183,7 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
+ * @see setPredefinedScales
+ * @see QgsComposerMap::atlasScalingMode
+ */
+- const QVector<double>& predefinedScales() const { return mPredefinedScales; }
++ const QVector<qreal>& predefinedScales() const { return mPredefinedScales; }
+
+ /**Sets the list of predefined scales for the atlas. This is used
+ * for maps which are set to the predefined atlas scaling mode.
+@@ -191,7 +191,7 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
+ * @see predefinedScales
+ * @see QgsComposerMap::atlasScalingMode
+ */
+- void setPredefinedScales( const QVector<double>& scales );
++ void setPredefinedScales( const QVector<qreal>& scales );
+
+ /** Begins the rendering. Returns true if successful, false if no matching atlas
+ features found.*/
+@@ -336,7 +336,7 @@ class CORE_EXPORT QgsAtlasComposition : public QObject
+ void computeExtent( QgsComposerMap *map );
+
+ //list of predefined scales
+- QVector<double> mPredefinedScales;
++ QVector<qreal> mPredefinedScales;
+ };
+
+ #endif
+diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp
+index 39c3142..89b07f1 100644
+--- a/src/gui/qgscomposerview.cpp
++++ b/src/gui/qgscomposerview.cpp
+@@ -865,7 +865,7 @@ void QgsComposerView::mouseReleaseEvent( QMouseEvent* e )
+ else
+ {
+ QgsComposerAttributeTable* newTable = new QgsComposerAttributeTable( composition() );
+- newTable->setSceneRect( QRectF( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(), 15.0 ) ) );
++ newTable->setSceneRect( QRectF( mRubberBandItem->transform().dx(), mRubberBandItem->transform().dy(), mRubberBandItem->rect().width(), qMax( mRubberBandItem->rect().height(), (qreal)15.0 ) ) );
+ QList<const QgsComposerMap*> mapItemList = composition()->composerMapItems();
+ if ( mapItemList.size() > 0 )
+ {
+--
+1.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index e6c6f72..0d6db93 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+arm_qreal.patch
allows-to-typo.patch
python-env.patch
disable-doxygen.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git
More information about the Pkg-grass-devel
mailing list