Skip to content

Commit

Permalink
sip generation issue fix #7752 for android
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernasocchi authored and dakcarto committed Sep 9, 2013
1 parent 5f61dd1 commit 17f565a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/CMakeLists.txt
Expand Up @@ -48,6 +48,10 @@ INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR} # qgsconfig.h, qgsversion.h
)

IF(NOT ANDROID)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} ANDROID)
ENDIF(NOT ANDROID)

IF(NOT WITH_TOUCH)
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} HAVE_TOUCH)
ENDIF(NOT WITH_TOUCH)
Expand Down
6 changes: 6 additions & 0 deletions python/core/qgsapplication.sip
@@ -1,3 +1,4 @@
%Feature ANDROID

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


%If(ANDROID)
bool x11EventFilter ( XEvent * event );
%End

signals:
// void preNotify( QObject * receiver, QEvent * event, bool * done );
};
12 changes: 12 additions & 0 deletions src/core/qgsapplication.h
Expand Up @@ -26,6 +26,11 @@
* Extends QApplication to provide access to QGIS specific resources such
* as theme paths, database paths etc.
*/

#ifdef ANDROID
typedef void XEvent;
#endif

class CORE_EXPORT QgsApplication: public QApplication
{
Q_OBJECT
Expand Down Expand Up @@ -274,6 +279,13 @@ class CORE_EXPORT QgsApplication: public QApplication
* @note added in 2.0 */
static void applyGdalSkippedDrivers();

#ifdef ANDROID
//dummy method to workaround sip generation issue issue
bool x11EventFilter ( XEvent * event ){
return 0;
}
#endif

signals:
//! @note not available in python bindings
void preNotify( QObject * receiver, QEvent * event, bool * done );
Expand Down

0 comments on commit 17f565a

Please sign in to comment.