hluk / CopyQ

Clipboard manager with advanced features
GNU General Public License v3.0
8.84k stars 452 forks source link

Build fails with Qt 5.6 on Mac OS X 10.11 #541

Closed whitelynx closed 8 years ago

whitelynx commented 8 years ago

The build fails with the following error:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 -Wall -W -fPIC -DBUILD_QXT_GUI -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_MACEXTRAS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_NETWORK_LIB -DQT_SCRIPT_LIB -DQT_CORE_LIB -I. -I. -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtSvg.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtWidgets.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtMacExtras.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtGui.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtXml.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtNetwork.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtScript.framework/Headers -I/usr/local/Cellar/qt5/5.6.1-1/lib/QtCore.framework/Headers -I. -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 -I. -I/usr/local/Cellar/qt5/5.6.1-1/mkspecs/macx-clang -F/usr/local/Cellar/qt5/5.6.1-1/lib -o macplatformwindow.o platform/mac/macplatformwindow.mm
platform/mac/macplatformwindow.mm:53:9: error: no matching function for call to 'CGEventSetFlags'
        CGEventSetFlags(VDown,kCGEventFlagMaskCommand|0x000008);
        ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:175:16: note: 
      candidate function not viable: no known conversion from 'unsigned long long' to 'CGEventFlags' for 2nd argument
CG_EXTERN void CGEventSetFlags(CGEventRef __nullable event, CGEventFlags flags)
               ^
platform/mac/macplatformwindow.mm:54:9: error: no matching function for call to 'CGEventSetFlags'
        CGEventSetFlags(VUp,kCGEventFlagMaskCommand|0x000008);
        ^~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEvent.h:175:16: note: 
      candidate function not viable: no known conversion from 'unsigned long long' to 'CGEventFlags' for 2nd argument
CG_EXTERN void CGEventSetFlags(CGEventRef __nullable event, CGEventFlags flags)
               ^
platform/mac/macplatformwindow.mm:126:9: warning: 'NSCountWindows' is deprecated: first deprecated in OS X 10.6 - Use
      +[Window windowNumbersWithOptions:] instead [-Wdeprecated-declarations]
        NSCountWindows(&windowCount);
        ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:229:20: note: 
      'NSCountWindows' has been explicitly marked deprecated here
APPKIT_EXTERN void NSCountWindows(NSInteger *count) NS_DEPRECATED_MAC(10_0, 10_6, "Use +[Window windowNumbersWithOpt...
                   ^
platform/mac/macplatformwindow.mm:129:13: warning: 'NSWindowList' is deprecated: first deprecated in OS X 10.6 - Use
      +[Window windowNumbersWithOptions:] instead [-Wdeprecated-declarations]
            NSWindowList(windowCount, windows);
            ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSGraphics.h:230:20: note: 
      'NSWindowList' has been explicitly marked deprecated here
APPKIT_EXTERN void NSWindowList(NSInteger size, NSInteger list[]) NS_DEPRECATED_MAC(10_0, 10_6, "Use +[Window window...
                   ^
2 warnings and 2 errors generated.
make[1]: *** [macplatformwindow.o] Error 1
make: *** [sub-src] Error 2
whitelynx commented 8 years ago

Adding an explicit cast to CGEventFlags fixes it; I'll submit a PR later.