Sorry this was a stupid user error on my part. I cloned your repo but was
still on the master branch. Once I switched to the qt5 branch it worked.
I've attached a patch that fixes a few compiler errors because gcc 4.4
requires that the the template type be specified in the construction of the
base class. I believe that the change shouldn't change anything on a
compiler that the code already built with.
The other issue that I ran into with the build process is that it didn't
set the value for QT_LRELEASE_EXECUTABLE even though /usr/bin/lrelease-qt5
was on the system. Once I set it using
"-DQT_LRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5" it built just fine, but if
possible, it would be nice if this value was auto-detected and set like the
rest of the values. I don't know the first thing about cmake, so
unfortunately I'm no help in trying to fix this or I'd look into it and try
to make a patch for that as well.
Also, it appears that there's not PyQt5 in the EPEL repository, so
unfortunately I can't test that at this time.
Thanks for all the help and the work to get QGIS working with Qt5,
Dave
On Thu, Sep 4, 2014 at 8:06 AM, Matthias Kuhn <[email protected]> wrote:
> Hi Dave,
>
> Are you sure you have checked out the correct branch from my private
> repository (link in my first response)?
> There is no support for this in master yet.
>
> The definition of the cmake variable can be seen here[1]
>
> Best
> Matthias
>
> https://github.com/m-kuhn/QGIS/blob/final-2_4_0-qt5/CMakeLists.txt#L222
>
>
> On Thu 04 Sep 2014 04:56:12 PM CEST, Dave Johansen wrote:
>
>> I tried doing "-DENABLE_QT5=TRUE" and "-DENABLE_QT5:BOOL=TRUE" and it
>> still doesn't work. In CMakeCache.txt, it says "//No help, variable
>> specified on the command line.". Any recommendations on what else to try?
>> Thanks,
>> Dave
>>
>>
>> On Thu, Sep 4, 2014 at 12:46 AM, Matthias Kuhn <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi Dave,
>>
>> IIRC you only have to set the cmake option ENABLE_QT5=TRUE
>>
>> Matthias
>>
>> On 09/02/2014 10:07 PM, Dave Johansen wrote:
>>
>>> I'd be glad to give it a try and help resolve any issues. What do
>>> I need to do to build it? I tried running cmake and it is still
>>> looking for Qt4, so how do I tell it to build with Qt5?
>>> Thanks,
>>> Dave
>>>
>>>
>>> On Tue, Sep 2, 2014 at 11:41 AM, Matthias Kuhn
>>> <[email protected] <mailto:[email protected]>> wrote:
>>>
>>> Hi Dave,
>>>
>>> I have ported large portions of the code to Qt5 (for
>>> Android). It has
>>> not been widely tested but runs quite stable here on Fedora
>>> (so not far
>>> from RHEL). However, due to missing pyqt packages I could not
>>> test
>>> python support (arriving in Fedora 21). If you want to give
>>> it a try,
>>> you can find the code here [1]
>>>
>>> Good luck and let me know how it goes.
>>>
>>> Matthias
>>>
>>> [1] https://github.com/m-kuhn/QGIS/tree/final-2_4_0-qt5
>>>
>>> On Die 02 Sep 2014 20:38:28 CEST, Dave Johansen wrote:
>>> >
>>> http://gis.stackexchange.com/questions/62548/can-i-use-
>>> qgis-with-qt5
>>> > The above link indicates that QGIS 2.x can't be built with
>>> Qt 5.x and
>>> > I was curious how much work would be involved in resolving
>>> that.
>>> >
>>> > I ask because I'm using RHEL 6 which comes with Qt 4.6 and
>>> so I can't
>>> > build QGIS 2.x with that because it requires 4.7. Qt 5.x is
>>> available
>>> > in the EPEL so I was wondering what would be involved in
>>> making it so
>>> > I could use that. If it's not too big of an effort, then I
>>> could
>>> > potentially help with the work but I wanted to find out
>>> what it would
>>> > involve before I dove into anything.
>>> >
>>> > Thanks,
>>> > Dave
>>> >
>>> >
>>> > _______________________________________________
>>> > Qgis-developer mailing list
>>> > [email protected]
>>> <mailto:[email protected]>
>>> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>>
>>>
>>>
>>
>>
diff --git a/src/core/qgsvectorlayerfeatureiterator.cpp b/src/core/qgsvectorlayerfeatureiterator.cpp
index 776500a..a2fdcd0 100644
--- a/src/core/qgsvectorlayerfeatureiterator.cpp
+++ b/src/core/qgsvectorlayerfeatureiterator.cpp
@@ -84,7 +84,7 @@ QgsFeatureIterator QgsVectorLayerFeatureSource::getFeatures( const QgsFeatureReq
QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator( QgsVectorLayerFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsVectorLayerFeatureSource>( source, ownSource, request )
, mEditGeometrySimplifier( 0 )
{
diff --git a/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp b/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
index 6b525c7..4fee62b 100644
--- a/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
+++ b/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
@@ -26,7 +26,7 @@
#include <QTextStream>
QgsDelimitedTextFeatureIterator::QgsDelimitedTextFeatureIterator( QgsDelimitedTextFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsDelimitedTextFeatureSource>( source, ownSource, request )
{
// Determine mode to use based on request...
diff --git a/src/providers/gpx/qgsgpxfeatureiterator.cpp b/src/providers/gpx/qgsgpxfeatureiterator.cpp
index 9d46380..ebeca74 100644
--- a/src/providers/gpx/qgsgpxfeatureiterator.cpp
+++ b/src/providers/gpx/qgsgpxfeatureiterator.cpp
@@ -26,7 +26,7 @@
QgsGPXFeatureIterator::QgsGPXFeatureIterator( QgsGPXFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsGPXFeatureSource>( source, ownSource, request )
{
rewind();
}
diff --git a/src/providers/memory/qgsmemoryfeatureiterator.cpp b/src/providers/memory/qgsmemoryfeatureiterator.cpp
index 7a4cd87..db28c0d 100644
--- a/src/providers/memory/qgsmemoryfeatureiterator.cpp
+++ b/src/providers/memory/qgsmemoryfeatureiterator.cpp
@@ -23,7 +23,7 @@
QgsMemoryFeatureIterator::QgsMemoryFeatureIterator( QgsMemoryFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsMemoryFeatureSource>( source, ownSource, request )
, mSelectRectGeom( 0 )
{
diff --git a/src/providers/mssql/qgsmssqlfeatureiterator.cpp b/src/providers/mssql/qgsmssqlfeatureiterator.cpp
index 56aeb31..b7478a0 100644
--- a/src/providers/mssql/qgsmssqlfeatureiterator.cpp
+++ b/src/providers/mssql/qgsmssqlfeatureiterator.cpp
@@ -25,7 +25,7 @@
QgsMssqlFeatureIterator::QgsMssqlFeatureIterator( QgsMssqlFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsMssqlFeatureSource>( source, ownSource, request )
{
mClosed = false;
mQuery = NULL;
diff --git a/src/providers/ogr/qgsogrfeatureiterator.cpp b/src/providers/ogr/qgsogrfeatureiterator.cpp
index 8d0c8b3..e7f1808 100644
--- a/src/providers/ogr/qgsogrfeatureiterator.cpp
+++ b/src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -34,7 +34,7 @@
QgsOgrFeatureIterator::QgsOgrFeatureIterator( QgsOgrFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsOgrFeatureSource>( source, ownSource, request )
, ogrDataSource( 0 )
, ogrLayer( 0 )
, mSubsetStringSet( false )
diff --git a/src/providers/postgres/qgspostgresconnpool.h b/src/providers/postgres/qgspostgresconnpool.h
index 45f47e4..7282dca 100644
--- a/src/providers/postgres/qgspostgresconnpool.h
+++ b/src/providers/postgres/qgspostgresconnpool.h
@@ -42,7 +42,7 @@ class QgsPostgresConnPoolGroup : public QObject, public QgsConnectionPoolGroup<Q
Q_OBJECT
public:
- QgsPostgresConnPoolGroup( QString name ) : QgsConnectionPoolGroup( name ) { initTimer( this ); }
+ QgsPostgresConnPoolGroup( QString name ) : QgsConnectionPoolGroup<QgsPostgresConn*>( name ) { initTimer( this ); }
protected slots:
void handleConnectionExpired() { onConnectionExpired(); }
diff --git a/src/providers/postgres/qgspostgresfeatureiterator.cpp b/src/providers/postgres/qgspostgresfeatureiterator.cpp
index dcf04af..207f9fb 100644
--- a/src/providers/postgres/qgspostgresfeatureiterator.cpp
+++ b/src/providers/postgres/qgspostgresfeatureiterator.cpp
@@ -27,7 +27,7 @@ const int QgsPostgresFeatureIterator::sFeatureQueueSize = 2000;
QgsPostgresFeatureIterator::QgsPostgresFeatureIterator( QgsPostgresFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsPostgresFeatureSource>( source, ownSource, request )
, mFeatureQueueSize( sFeatureQueueSize )
{
mConn = QgsPostgresConnPool::instance()->acquireConnection( mSource->mConnInfo );
diff --git a/src/providers/spatialite/qgsspatialiteconnpool.h b/src/providers/spatialite/qgsspatialiteconnpool.h
index ca6bba6..7110c12 100644
--- a/src/providers/spatialite/qgsspatialiteconnpool.h
+++ b/src/providers/spatialite/qgsspatialiteconnpool.h
@@ -41,7 +41,7 @@ class QgsSpatiaLiteConnPoolGroup : public QObject, public QgsConnectionPoolGroup
Q_OBJECT
public:
- QgsSpatiaLiteConnPoolGroup( QString name ) : QgsConnectionPoolGroup( name ) { initTimer( this ); }
+ QgsSpatiaLiteConnPoolGroup( QString name ) : QgsConnectionPoolGroup<QgsSqliteHandle*>( name ) { initTimer( this ); }
protected slots:
void handleConnectionExpired() { onConnectionExpired(); }
diff --git a/src/providers/spatialite/qgsspatialitefeatureiterator.cpp b/src/providers/spatialite/qgsspatialitefeatureiterator.cpp
index 9184b7a..a14d6b4 100644
--- a/src/providers/spatialite/qgsspatialitefeatureiterator.cpp
+++ b/src/providers/spatialite/qgsspatialitefeatureiterator.cpp
@@ -24,7 +24,7 @@
QgsSpatiaLiteFeatureIterator::QgsSpatiaLiteFeatureIterator( QgsSpatiaLiteFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsSpatiaLiteFeatureSource>( source, ownSource, request )
, sqliteStatement( NULL )
{
diff --git a/src/providers/wfs/qgswfsfeatureiterator.cpp b/src/providers/wfs/qgswfsfeatureiterator.cpp
index a0189ae..0797eb6 100644
--- a/src/providers/wfs/qgswfsfeatureiterator.cpp
+++ b/src/providers/wfs/qgswfsfeatureiterator.cpp
@@ -19,7 +19,7 @@
#include "qgsgeometry.h"
QgsWFSFeatureIterator::QgsWFSFeatureIterator( QgsWFSFeatureSource* source, bool ownSource, const QgsFeatureRequest& request )
- : QgsAbstractFeatureIteratorFromSource( source, ownSource, request )
+ : QgsAbstractFeatureIteratorFromSource<QgsWFSFeatureSource>( source, ownSource, request )
{
switch ( request.filterType() )
{
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer