diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-09-28 16:04:13 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-09-28 17:43:33 +0300 |
commit | 87259f9afefdcda18856eb008e2d13803577f9d0 (patch) | |
tree | 41c8f5827816b1fbc5d955d0429b0185f9c631e5 /vcl | |
parent | 0e0393b06a0546335664884069d2e5388832b0f1 (diff) |
WaE: setAccessoryView is deprecated in 10.5 and later
Don't know how to fix it properly (i.e. use the corresponding
non-deprecated API instead), so just using the pragma to ignore that
warning for now...
Unfortunately gcc 4.2.1 doesn't seem to implement the 'GCC diagnostic
push/pop' pragmas, so we just have to ignore the warning for the
method in question and the rest of the file. But luckily it is the
last method;)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/aqua/source/gdi/aquaprintaccessoryview.mm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index abe314f27f8f..1afad67fd1f3 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -1104,6 +1104,19 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO rCurY = aFieldRect.origin.y - 5; } +// In 10.5 and later: +// 'setAccessoryView:' is deprecated + +#if defined __GNUC__ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) +#if GCC_VERSION >= 40201 +// #pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif +#endif + @implementation AquaPrintAccessoryView +(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState; { @@ -1381,7 +1394,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO // set the accessory view [pOp setAccessoryView: [pAccessoryView autorelease]]; - + // set the current selecte tab item if( pState->nLastPage >= 0 && pState->nLastPage < [pTabView numberOfTabViewItems] ) [pTabView selectTabViewItemAtIndex: pState->nLastPage]; @@ -1389,6 +1402,10 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO return pCtrlTarget; } +#if defined __GNUC__ && GCC_VERSION >= 40201 +// #pragma GCC diagnostic pop +#endif + @end /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |