sip generation issue fix #7752 for android

This commit is contained in:
Marco Bernasocchi 2013-05-03 00:21:49 +02:00 committed by Larry Shaffer
parent 5f61dd12fe
commit 17f565a857
3 changed files with 22 additions and 0 deletions

View File

@ -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)

View File

@ -1,3 +1,4 @@
%Feature ANDROID
class QgsApplication : QApplication
{
@ -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 );
};

View File

@ -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
@ -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 );