Skip to content

Commit

Permalink
minor qtmoc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
therecipe committed Jun 13, 2016
1 parent bfffe85 commit a6a0643
Show file tree
Hide file tree
Showing 16 changed files with 68 additions and 48 deletions.
6 changes: 3 additions & 3 deletions core/cgo_android_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -mthumb -Wall -Wno-psabi -W -D_REENTRANT -fPIC
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_WIDGETS_LIB
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/android_armv7/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/include -isystem /opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include -isystem /opt/android-ndk/platforms/android-9/arch-arm/usr/include -I/usr/local/Qt5.6.0/5.6/android_armv7/mkspecs/android-g++
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/android_armv7/include/QtCore -I/usr/local/Qt5.6.0/5.6/android_armv7/include/QtWidgets
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/android_armv7/include/QtCore -I/usr/local/Qt5.6.0/5.6/android_armv7/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/android_armv7/include/QtGui
#cgo LDFLAGS: --sysroot=/opt/android-ndk/platforms/android-9/arch-arm/ -Wl,-rpath=/usr/local/Qt5.6.0/5.6/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--allow-multiple-definition -Wl,--allow-shlib-undefined
#cgo LDFLAGS: -L/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android-ndk/platforms/android-9/arch-arm//usr/lib -L/usr/local/Qt5.6.0/5.6/android_armv7/lib -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Core -lQt5Widgets -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
#cgo LDFLAGS: -L/opt/android-ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android-ndk/platforms/android-9/arch-arm//usr/lib -L/usr/local/Qt5.6.0/5.6/android_armv7/lib -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Core -lQt5Widgets -lQt5Gui -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_darwin_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -fpascal-strings -fmessage-length=0 -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion -fexceptions -fasm-blocks -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -mios-simulator-version-min=7.0 -arch i386 -fobjc-nonfragile-abi -fobjc-legacy-dispatch -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wall -W -fPIC
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang/ios -I/usr/local/Qt5.6.0/5.6/ios/include -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtGui -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo LDFLAGS: -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -mios-simulator-version-min=7.0 -arch i386
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios_iphonesimulator -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype_iphonesimulator -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds_iphonesimulator -lqicns_iphonesimulator -lqico_iphonesimulator -lqtga_iphonesimulator -lqtiff_iphonesimulator -lqwbmp_iphonesimulator -lqwebp_iphonesimulator -lqtharfbuzzng_iphonesimulator -lz -lqtpcre_iphonesimulator -lm -lQt5Widgets_iphonesimulator -lQt5Core_iphonesimulator -lQt5Gui_iphonesimulator -lQt5PlatformSupport_iphonesimulator
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios_iphonesimulator -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype_iphonesimulator -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds_iphonesimulator -lqicns_iphonesimulator -lqico_iphonesimulator -lqtga_iphonesimulator -lqtiff_iphonesimulator -lqwbmp_iphonesimulator -lqwebp_iphonesimulator -lqtharfbuzzng_iphonesimulator -lz -lqtpcre_iphonesimulator -lm -lQt5Gui_iphonesimulator -lQt5Widgets_iphonesimulator -lQt5Core_iphonesimulator -lQt5PlatformSupport_iphonesimulator
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_darwin_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package core

/*
#cgo CPPFLAGS: -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.8 -Wall -W -fPIC
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_WIDGETS_LIB
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/clang_64/mkspecs/macx-clang -F/usr/local/Qt5.6.0/5.6/clang_64/lib
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/clang_64/lib/QtCore.framework/Headers -I/usr/local/Qt5.6.0/5.6/clang_64/lib/QtWidgets.framework/Headers
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/clang_64/lib/QtCore.framework/Headers -I/usr/local/Qt5.6.0/5.6/clang_64/lib/QtWidgets.framework/Headers -I/usr/local/Qt5.6.0/5.6/clang_64/lib/QtGui.framework/Headers
#cgo CPPFLAGS: -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AGL.framework/Headers
#cgo LDFLAGS: -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.8 -Wl,-rpath,/usr/local/Qt5.6.0/5.6/clang_64/lib
#cgo LDFLAGS: -F/usr/local/Qt5.6.0/5.6/clang_64/lib -framework QtCore -framework QtWidgets -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
#cgo LDFLAGS: -F/usr/local/Qt5.6.0/5.6/clang_64/lib -framework QtCore -framework QtWidgets -framework QtGui -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_darwin_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -fpascal-strings -fmessage-length=0 -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion -fexceptions -fasm-blocks -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -miphoneos-version-min=7.0 -arch armv7 -fobjc-nonfragile-abi -fobjc-legacy-dispatch -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wall -W -fPIC
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang/ios -I/usr/local/Qt5.6.0/5.6/ios/include -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtGui -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo LDFLAGS: -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -miphoneos-version-min=7.0 -arch armv7
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds -lqicns -lqico -lqtga -lqtiff -lqwbmp -lqwebp -lqtharfbuzzng -lz -lqtpcre -lm -lQt5Widgets -lQt5Core -lQt5Gui -lQt5PlatformSupport
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds -lqicns -lqico -lqtga -lqtiff -lqwbmp -lqwebp -lqtharfbuzzng -lz -lqtpcre -lm -lQt5Gui -lQt5Widgets -lQt5Core -lQt5PlatformSupport
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_darwin_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -fpascal-strings -fmessage-length=0 -Wno-trigraphs -Wreturn-type -Wparentheses -Wswitch -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-shorten-64-to-32 -Wno-sign-conversion -fexceptions -fasm-blocks -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wno-unused-function -Wno-unused-label -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wpointer-sign -Wno-newline-eof -Wdeprecated-declarations -Winvalid-offsetof -Wno-conversion -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -miphoneos-version-min=7.0 -arch arm64 -fobjc-nonfragile-abi -fobjc-legacy-dispatch -Wno-deprecated-implementations -Wprotocol -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wall -W -fPIC
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DDARWIN_NO_CARBON -DQT_NO_PRINTER -DQT_NO_PRINTDIALOG -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang/ios -I/usr/local/Qt5.6.0/5.6/ios/include -I/usr/local/Qt5.6.0/5.6/ios/mkspecs/macx-ios-clang
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/ios/include/QtGui -I/usr/local/Qt5.6.0/5.6/ios/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/ios/include/QtCore
#cgo LDFLAGS: -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -miphoneos-version-min=7.0 -arch arm64
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds -lqicns -lqico -lqtga -lqtiff -lqwbmp -lqwebp -lqtharfbuzzng -lz -lqtpcre -lm -lQt5Widgets -lQt5Core -lQt5Gui -lQt5PlatformSupport
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/ios/plugins/platforms -lqios -framework Foundation -framework UIKit -framework QuartzCore -framework AssetsLibrary -L/usr/local/Qt5.6.0/5.6/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -lqtfreetype -framework Security -framework SystemConfiguration -framework CoreBluetooth -L/usr/local/Qt5.6.0/5.6/ios/plugins/imageformats -lqdds -lqicns -lqico -lqtga -lqtiff -lqwbmp -lqwebp -lqtharfbuzzng -lz -lqtpcre -lm -lQt5Gui -lQt5Widgets -lQt5Core -lQt5PlatformSupport
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_linux_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -m32 -msse -msse2 -march=i686 -mfpmath=sse -mtune=generic -fno-omit-frame-pointer -fasynchronous-unwind-tables -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIE
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-i486/usr/share/qt5/mkspecs/linux-g++ -I/srv/mer/targets/SailfishOS-i486/usr/include -I/srv/mer/targets/SailfishOS-i486/usr/include/sailfishapp -I/srv/mer/targets/SailfishOS-i486/usr/include/mdeclarativecache5 -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5/QtWidgets -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5/QtCore
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5/QtGui -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5/QtWidgets -I/srv/mer/targets/SailfishOS-i486/usr/include/qt5/QtCore
#cgo LDFLAGS: -Wl,-O1 -Wl,-rpath-link,/srv/mer/targets/SailfishOS-i486/usr/lib -Wl,-rpath-link,/srv/mer/targets/SailfishOS-i486/lib
#cgo LDFLAGS: -rdynamic -L/srv/mer/targets/SailfishOS-i486/usr/lib -L/srv/mer/targets/SailfishOS-i486/lib -lsailfishapp -lmdeclarativecache5 -lQt5Core -lGLESv2 -lpthread
#cgo LDFLAGS: -rdynamic -L/srv/mer/targets/SailfishOS-i486/usr/lib -L/srv/mer/targets/SailfishOS-i486/lib -lsailfishapp -lmdeclarativecache5 -lQt5Gui -lQt5Core -lGLESv2 -lpthread
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_linux_amd64.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -O2 -Wall -W -D_REENTRANT
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/gcc_64/include -I/usr/local/Qt5.6.0/5.6/gcc_64/mkspecs/linux-g++
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/gcc_64/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/gcc_64/include/QtCore
#cgo CPPFLAGS: -I/usr/local/Qt5.6.0/5.6/gcc_64/include/QtGui -I/usr/local/Qt5.6.0/5.6/gcc_64/include/QtWidgets -I/usr/local/Qt5.6.0/5.6/gcc_64/include/QtCore
#cgo LDFLAGS: -Wl,-O1 -Wl,-rpath,/usr/local/Qt5.6.0/5.6/gcc_64 -Wl,-rpath,/usr/local/Qt5.6.0/5.6/gcc_64/lib
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/gcc_64/lib -L/usr/lib64 -lQt5Widgets -lQt5Core -lpthread
#cgo LDFLAGS: -L/usr/local/Qt5.6.0/5.6/gcc_64/lib -L/usr/lib64 -lQt5Gui -lQt5Widgets -lQt5Core -lpthread
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_linux_arm.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fmessage-length=0 -march=armv7-a -mfloat-abi=hard -mfpu=neon -mthumb -Wno-psabi -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIE
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-armv7hl/usr/share/qt5/mkspecs/linux-g++ -I/srv/mer/targets/SailfishOS-armv7hl/usr/include -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/sailfishapp -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/mdeclarativecache5 -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5/QtWidgets -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5/QtCore
#cgo CPPFLAGS: -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5/QtGui -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5/QtWidgets -I/srv/mer/targets/SailfishOS-armv7hl/usr/include/qt5/QtCore
#cgo LDFLAGS: -Wl,-O1 -Wl,-rpath-link,/srv/mer/targets/SailfishOS-armv7hl/usr/lib -Wl,-rpath-link,/srv/mer/targets/SailfishOS-armv7hl/lib
#cgo LDFLAGS: -rdynamic -L/srv/mer/targets/SailfishOS-armv7hl/usr/lib -L/srv/mer/targets/SailfishOS-armv7hl/lib -lsailfishapp -lmdeclarativecache5 -lQt5Core -lGLESv2 -lpthread
#cgo LDFLAGS: -rdynamic -L/srv/mer/targets/SailfishOS-armv7hl/usr/lib -L/srv/mer/targets/SailfishOS-armv7hl/lib -lsailfishapp -lmdeclarativecache5 -lQt5Gui -lQt5Core -lGLESv2 -lpthread
*/
import "C"
6 changes: 3 additions & 3 deletions core/cgo_windows_386.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package core

/*
#cgo CPPFLAGS: -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra
#cgo CPPFLAGS: -DUNICODE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -DUNICODE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_CORE_LIB
#cgo CPPFLAGS: -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include -IC:/Qt/Qt5.6.0/5.6/mingw49_32/mkspecs/win32-g++
#cgo CPPFLAGS: -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include/QtWidgets -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include/QtCore
#cgo CPPFLAGS: -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include/QtGui -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include/QtWidgets -IC:/Qt/Qt5.6.0/5.6/mingw49_32/include/QtCore
#cgo LDFLAGS: -Wl,-s -Wl,-subsystem,windows -mthreads -Wl,--allow-multiple-definition
#cgo LDFLAGS: -LC:/Qt/Qt5.6.0/5.6/mingw49_32/lib -lQt5Widgets -lQt5Core -lmingw32 -lqtmain -lshell32
#cgo LDFLAGS: -LC:/Qt/Qt5.6.0/5.6/mingw49_32/lib -lQt5Gui -lQt5Widgets -lQt5Core -lmingw32 -lqtmain -lshell32
*/
import "C"
3 changes: 2 additions & 1 deletion core/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#include <QHistoryState>
#include <QIODevice>
#include <QIdentityProxyModel>
#include <QImage>
#include <QItemSelection>
#include <QItemSelectionModel>
#include <QItemSelectionRange>
Expand Down Expand Up @@ -11609,7 +11610,7 @@ char* QMimeData_Html(void* ptr)

void* QMimeData_ImageData(void* ptr)
{
return new QVariant(static_cast<QMimeData*>(ptr)->imageData());
return new QImage(qvariant_cast<QImage>(static_cast<QMimeData*>(ptr)->imageData()));
}

void QMimeData_RemoveFormat(void* ptr, char* mimeType)
Expand Down
4 changes: 2 additions & 2 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -39784,11 +39784,11 @@ func (ptr *QMimeData) Html() string {
return ""
}

func (ptr *QMimeData) ImageData() *QVariant {
func (ptr *QMimeData) ImageData() unsafe.Pointer {
defer qt.Recovering("QMimeData::imageData")

if ptr.Pointer() != nil {
return NewQVariantFromPointer(C.QMimeData_ImageData(ptr.Pointer()))
return unsafe.Pointer(C.QMimeData_ImageData(ptr.Pointer()))
}
return nil
}
Expand Down
4 changes: 4 additions & 0 deletions internal/binding/converter/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ func cppOutput(name, value string, f *parser.Function) string {

case "bool", "int", "long", "void", "", "T", "JavaVM", "jclass", "jobject":
{
if f.Fullname == "QMimeData::imageData" {
return fmt.Sprintf("new QImage(qvariant_cast<QImage>(%v))", name)
}

if value == "void" {
if strings.Contains(vOld, "*") {
if strings.Contains(vOld, "const") {
Expand Down
4 changes: 4 additions & 0 deletions internal/binding/parser/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ func (f *Function) fix() {
f.Parameters = f.Parameters[:len(f.Parameters)-1]
}

if f.Fullname == "QMimeData::imageData" {
f.Output = "void*"
}

if f.Virtual == IMPURE || f.Virtual == PURE || f.Meta == SIGNAL || f.Meta == SLOT {
f.Static = false
}
Expand Down
Loading

0 comments on commit a6a0643

Please sign in to comment.