Hi Christian,

I’m aware of these warnings. Recently I tried to replace the deprecated calls 
in os_unix.cpp. But that’s not easy.
1. The replacements have to be available at least with 10.7 or we have to 
de-support old systems.
2. The replacements have to be provide the same functionality as the deprecated 
functions.

The change d568846e0331adc9a879c68b00c7dff901692dc7 eliminated two deprecated 
function warnings.
The change b5c2859a92b2e29c88156a82abc0b314265f761d reverts this because the 
new functions are available for 10.10 and newer only.

Stephan

> Am 08.07.2017 um 19:57 schrieb Christian Ridderström <c...@lyx.org>:
> 
> Hi,
> 
> While compiling on macOS Sierra, 10.12,5, I noticed warnings about deprecated 
> calls from an Objective C file. Below is a log excerpt, there are probably 
> more warnings.
> 
> What's the policy is here... should I e.g. create a Trac issue?
> 
> It's not obvious to me that we at this time would want to switch to whatever 
> is replacing the deprecated API.
> 
> Cheers,
> /Christian
> 
> 
> cd /Users/chrid/repos/lyx/m0/build-master2/src/support &&
> 
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
>  
>   -DBOOST_USER_CONFIG="<config.h>" 
>  -I/Users/chrid/repos/lyx/m0/build-master2 -I/Users/chrid/repos/lyx/m0/src 
>  -I/Users/chrid/repos/lyx/m0/3rdparty/boost 
> -I/Users/chrid/repos/lyx/m0/src/support 
>  -I/Users/chrid/repos/lyx/m0/build-master2/src/support 
> -I/usr/local/Cellar/qt/4.8.7_2/include 
>  -I/usr/local/Cellar/qt/4.8.7_2/lib/QtCore.framework/Headers 
>  -I/usr/local/Cellar/qt/4.8.7_2/mkspecs/default 
> -I/usr/local/Cellar/qt/4.8.7_2/include/QtCore 
>  -I/usr/local/Cellar/qt/4.8.7_2/include/QtGui 
> -I/usr/local/Cellar/qt/4.8.7_2/include/QtDesigner 
>  -I/usr/local/Cellar/qt/4.8.7_2/include/QtNetwork 
> -I/usr/local/Cellar/qt/4.8.7_2/include/QtOpenGL 
>  -I/usr/local/Cellar/qt/4.8.7_2/include/QtSql 
> -I/usr/local/Cellar/qt/4.8.7_2/include/QtXml 
>  -I/usr/local/Cellar/qt/4.8.7_2/include/QtSvg 
> -I/usr/local/Cellar/qt/4.8.7_2/include/QtUiTools 
>  -I/usr/local/Cellar/qt/4.8.7_2/include/QtTest  
>  -g   -F/usr/local/Cellar/qt/4.8.7_2/lib  
>  -std=c99 
>  -o CMakeFiles/support.dir/linkback/LinkBackServer.m.o   
>  -c
>  /Users/chrid/repos/lyx/m0/src/support/linkback/LinkBackServer.m
> 
> /Users/chrid/repos/lyx/m0/src/support/linkback/LinkBackServer.m:175:11: 
> warning: 'NSRunCriticalAlertPanel' is deprecated: first deprecated in macOS 
> 10.10 - Use NSAlert instead
>       [-Wdeprecated-declarations]
>         result = NSRunCriticalAlertPanel(title, @"%@", ok, urlstr, nil, msg) ;
>                  ^
> /System/Library/Frameworks/AppKit.framework/Headers/NSPanel.h:42:25: note: 
> 'NSRunCriticalAlertPanel' has been explicitly marked deprecated here
> APPKIT_EXTERN NSInteger NSRunCriticalAlertPanel(NSString *title, NSString 
> *msgFormat, NSString *defaultButton, NSString *alternateButton, NSString 
> *otherButton, ...) NS_FORMAT_FUNCTION(2...
>                         ^
> /Users/chrid/repos/lyx/m0/src/support/linkback/LinkBackServer.m:176:6: 
> warning: 'NSAlertAlternateReturn' is deprecated: first deprecated in macOS 
> 10.10 - Use NSAlertFirstButtonReturn, etc
>       instead [-Wdeprecated-declarations]
>         if (NSAlertAlternateReturn == result) {
>             ^
> /System/Library/Frameworks/AppKit.framework/Headers/NSPanel.h:72:5: note: 
> 'NSAlertAlternateReturn' has been explicitly marked deprecated here
>     NSAlertAlternateReturn NS_ENUM_DEPRECATED_MAC(10_0, 10_10, "Use 
> NSAlertFirstButtonReturn, etc instead") = 0,
>     ^
> 2 warnings generated.
> 

Reply via email to