Skip to content

Commit 17f565a

Browse files
mbernasocchidakcarto
authored andcommitted
sip generation issue fix #7752 for android
1 parent 5f61dd1 commit 17f565a

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

python/CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ INCLUDE_DIRECTORIES(
4848
${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
4949
)
5050

51+
IF(NOT ANDROID)
52+
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ANDROID)
53+
ENDIF(NOT ANDROID)
54+
5155
IF(NOT WITH_TOUCH)
5256
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_TOUCH)
5357
ENDIF(NOT WITH_TOUCH)

python/core/qgsapplication.sip

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
%Feature ANDROID
12

23
class QgsApplication : QApplication
34
{
@@ -294,6 +295,11 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
294295
* @note added in 2.0 */
295296
static void applyGdalSkippedDrivers();
296297

298+
299+
%If(ANDROID)
300+
bool x11EventFilter ( XEvent * event );
301+
%End
302+
297303
signals:
298304
// void preNotify( QObject * receiver, QEvent * event, bool * done );
299305
};

src/core/qgsapplication.h

+12
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
* Extends QApplication to provide access to QGIS specific resources such
2727
* as theme paths, database paths etc.
2828
*/
29+
30+
#ifdef ANDROID
31+
typedef void XEvent;
32+
#endif
33+
2934
class CORE_EXPORT QgsApplication: public QApplication
3035
{
3136
Q_OBJECT
@@ -274,6 +279,13 @@ class CORE_EXPORT QgsApplication: public QApplication
274279
* @note added in 2.0 */
275280
static void applyGdalSkippedDrivers();
276281

282+
#ifdef ANDROID
283+
//dummy method to workaround sip generation issue issue
284+
bool x11EventFilter ( XEvent * event ){
285+
return 0;
286+
}
287+
#endif
288+
277289
signals:
278290
//! @note not available in python bindings
279291
void preNotify( QObject * receiver, QEvent * event, bool * done );

0 commit comments

Comments
 (0)