Skip to content

Commit 3c4f46d

Browse files
committed
Remove more code disabled under Qt5
Add todo note for QgsHttpTransaction and disable under docs and sip bindings
1 parent 0666fdb commit 3c4f46d

13 files changed

+35
-55
lines changed

CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ FIND_PACKAGE(Qt5Test REQUIRED)
265265
FIND_PACKAGE(Qt5UiTools REQUIRED)
266266
FIND_PACKAGE(Qt5Script REQUIRED)
267267
FIND_PACKAGE(Qt5Sql REQUIRED)
268-
SET(QT5_BUILD TRUE)
269268
INCLUDE("cmake/modules/ECMQt4To5Porting.cmake")
270269
MESSAGE(STATUS "Found Qt version: ${Qt5Core_VERSION_STRING}")
271270

python/core/composer/qgscomposerscalebar.sip

+2-6
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,9 @@ class QgsComposerScaleBar: QgsComposerItem
245245

246246
/** Returns the x - positions of the segment borders (in item coordinates) and the width
247247
* of the segment
248-
* @note python bindings not available on android
248+
* @note not available in Python bindings
249249
*/
250-
%If (!ARM)
251-
%If (!QT5_SUPPORT)
252-
void segmentPositions( QList<QPair<double, double> >& posWidthList ) const;
253-
%End
254-
%End
250+
// void segmentPositions( QList<QPair<double, double> >& posWidthList ) const;
255251

256252
/** Sets box size suitable to content*/
257253
void adjustBoxSize();

python/core/core.sip

+4-9
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,12 @@
22
version=0,
33
keyword_arguments="Optional")
44

5-
%Feature QT5_SUPPORT
6-
75
%Import QtXml/QtXmlmod.sip
86
%Import QtNetwork/QtNetworkmod.sip
97
%Import QtSql/QtSqlmod.sip
108

11-
%If (QT5_SUPPORT)
12-
%Import QtPrintSupport/QtPrintSupportmod.sip
13-
%Import QtWidgets/QtWidgetsmod.sip
14-
%End
9+
%Import QtPrintSupport/QtPrintSupportmod.sip
10+
%Import QtWidgets/QtWidgetsmod.sip
1511

1612
%Include conversions.sip
1713
%Include qgsexception.sip
@@ -69,9 +65,8 @@
6965
%Include qgsmaptopixelgeometrysimplifier.sip
7066
%Include qgstransaction.sip
7167
%Include qgstransactiongroup.sip
72-
%If(!QT5_SUPPORT)
73-
%Include qgshttptransaction.sip
74-
%End
68+
// TODO - update for Qt5
69+
// %Include qgshttptransaction.sip
7570
%Include qgsdartmeasurement.sip
7671
%Include qgsexpressionfieldbuffer.sip
7772
%Include qgsfontutils.sip

python/core/geometry/qgsgeometry.sip

-6
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ class QgsGeometry
323323
* not disjoint with existing polygons of the feature
324324
*/
325325
// TODO QGIS 3.0 returns an enum instead of a magic constant
326-
%If (!QT5_SUPPORT)
327-
int addPart( const QList<QgsPoint> &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry );
328-
%End
329326
int addPart( const QList<QgsPoint> &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry )/PyName=addPoints/;
330327

331328
/** Adds a new part to a the geometry.
@@ -335,9 +332,6 @@ class QgsGeometry
335332
* not disjoint with existing polygons of the feature
336333
*/
337334
// TODO QGIS 3.0 returns an enum instead of a magic constant
338-
%If (!QT5_SUPPORT)
339-
int addPart( const QList<QgsPointV2> &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry );
340-
%End
341335
int addPart( const QList<QgsPointV2> &points, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::UnknownGeometry )/PyName=addPointsV2/;
342336

343337
/** Adds a new part to this geometry.

python/core/qgsmaplayermodel.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ class QgsMapLayerModel : QAbstractItemModel
6262
int rowCount( const QModelIndex &parent ) const;
6363
int columnCount( const QModelIndex &parent ) const;
6464
QVariant data( const QModelIndex &index, int role ) const;
65-
%If (QT5_SUPPORT)
65+
6666
/**
6767
* Returns strings for all roles supported by this model.
6868
*
6969
* @note Available only with Qt5 (python and c++)
7070
*/
7171
QHash<int, QByteArray> roleNames() const;
72-
%End
72+
7373
bool setData( const QModelIndex &index, const QVariant &value, int role );
7474
Qt::ItemFlags flags( const QModelIndex &index ) const;
7575
};

python/core/qgsproviderregistry.sip

+5-7
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,13 @@ class QgsProviderRegistry
5353
QWidget *selectWidget( const QString & providerKey,
5454
QWidget * parent = 0, const Qt::WindowFlags& fl = 0 );
5555

56-
%If (!QT5_SUPPORT)
5756
/** Get pointer to provider function
58-
* @param providerKey identificator of the provider
59-
* @param functionName name of function
60-
* @return pointer to function or NULL on error
57+
@param providerKey identificator of the provider
58+
@param functionName name of function
59+
@return pointer to function or NULL on error
6160
*/
62-
void *function( const QString & providerKey,
63-
const QString & functionName );
64-
%End
61+
QFunctionPointer function( const QString & providerKey,
62+
const QString & functionName );
6563

6664
QLibrary *providerLibrary( const QString & providerKey ) const;
6765

python/gui/gui.sip

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@
1111
%Import QtXml/QtXmlmod.sip
1212

1313
%If (HAVE_QSCI_SIP)
14-
%If (!QT5_SUPPORT)
15-
%Import Qsci/qscimod4.sip
16-
%End
17-
%If (QT5_SUPPORT)
18-
%Import Qsci/qscimod5.sip
19-
%End
14+
%Import Qsci/qscimod5.sip
2015
%End
2116

2217
%Include qgsblendmodecombobox.sip

src/core/CMakeLists.txt

+8-10
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,10 @@ IF(ENABLE_MODELTEST)
394394
)
395395
ENDIF(ENABLE_MODELTEST)
396396

397-
IF (NOT QT5_BUILD)
398-
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
399-
qgshttptransaction.cpp
400-
)
401-
ENDIF (NOT QT5_BUILD)
397+
# TODO - update for Qt5
398+
#SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
399+
# qgshttptransaction.cpp
400+
#)
402401

403402
IF (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
404403
# spatialindex headers produce warnings
@@ -560,11 +559,10 @@ IF (NOT WITH_QTWEBKIT)
560559
)
561560
ENDIF(NOT WITH_QTWEBKIT)
562561

563-
IF (NOT QT5_BUILD)
564-
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
565-
qgshttptransaction.h
566-
)
567-
ENDIF (NOT QT5_BUILD)
562+
# TODO - update for Qt5
563+
#SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}
564+
# qgshttptransaction.h
565+
#)
568566

569567
IF (WITH_INTERNAL_QEXTSERIALPORT)
570568
SET(QGIS_CORE_MOC_HDRS ${QGIS_CORE_MOC_HDRS}

src/core/composer/qgscomposerscalebar.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class CORE_EXPORT QgsComposerScaleBar: public QgsComposerItem
268268

269269
/** Returns the x - positions of the segment borders (in item coordinates) and the width
270270
* of the segment
271-
* @note python bindings not available on android
271+
* @note not available in Python bindings
272272
*/
273273
void segmentPositions( QList<QPair<double, double> >& posWidthList ) const;
274274

src/core/qgshttptransaction.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* *
1818
***************************************************************************/
1919

20+
///@cond PRIVATE
2021

2122
#include <fstream>
2223

@@ -29,6 +30,7 @@
2930
#include <QSettings>
3031
#include <QTimer>
3132

33+
3234
static int HTTP_PORT_DEFAULT = 80;
3335

3436
//XXX Set the connection name when creating the provider instance
@@ -568,4 +570,6 @@ void QgsHttpTransaction::abort()
568570
}
569571
}
570572

573+
/// @endcond
574+
571575
// ENDS

src/core/qgshttptransaction.h

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727

2828
class QTimer;
2929

30+
// needs porting to Qt5 - until then don't include in api docs
31+
///@cond PRIVATE
32+
3033
/** \ingroup core
3134
* HTTP request/response manager that is redirect-aware.
3235
* This class extends the Qt QHttp concept by being able to recognise
@@ -214,6 +217,8 @@ class CORE_EXPORT QgsHttpTransaction : public QObject
214217
int mNetworkTimeoutMsec;
215218
};
216219

220+
///@endcond
221+
217222
#endif
218223

219224
// ENDS

src/customwidgets/CMakeLists.txt

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@ ADD_DEFINITIONS(-DQT_PLUGIN)
22
ADD_DEFINITIONS(-DQT_NO_DEBUG)
33
ADD_DEFINITIONS(-DQT_SHARED)
44

5-
IF (QT5_BUILD)
6-
FIND_PACKAGE(Qt5UiPlugin REQUIRED)
7-
FIND_PACKAGE(Qt5Designer REQUIRED)
8-
ENDIF (QT5_BUILD)
5+
FIND_PACKAGE(Qt5UiPlugin REQUIRED)
6+
FIND_PACKAGE(Qt5Designer REQUIRED)
97

108
SET(QT_USE_QTDESIGNER ON)
119

src/providers/wms/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
IF (QT5_BUILD)
2-
FIND_PACKAGE(Qt5XmlPatterns REQUIRED)
3-
ENDIF()
1+
FIND_PACKAGE(Qt5XmlPatterns REQUIRED)
42

53

64
SET (WMS_SRCS

0 commit comments

Comments
 (0)