[Development] Conditional Deprecation Warnings

Keith Gardner kreios4004 at gmail.com
Wed Oct 16 16:06:29 CEST 2013


The Q_DECL_DEPRECATED_CONDITIONAL turned out to be more limited than I was
anticipating.  I think using Q_DECL_DEPRECATED_X surrounded by ifdefs would
be more explicit and accurate.


On Wed, Oct 16, 2013 at 8:36 AM, Olivier Goffart <olivier at woboq.com> wrote:

> On Saturday 12 October 2013 18:33:00 Keith Gardner wrote:
> > > > I had an idea about making conditional deprecation warnings for
> > > > functions
> > > > in Qt based on the destination platform.
> > >
> > > That might be useful, actually.
> > >
> > > But not for this case. Trying to call nativeArguments() on a
> non-Windows
> > > platform already signals the problem with a full error. It's
> impossible to
> > > ignore this.
> >
> > Here are my changes:
> >
> > Added Q_DECL_DEPRECATED_X(text)
> > https://codereview.qt-project.org/#change,68028
>
> Maybe there should also be a QT_DEPRECATED_X to go with QT_DEPRECATED
> and we should use QT_DEPRECATED_X ourselfs.
>
> > Added Q_DECL_DEPRECATED_CONDITIONAL(conditional, text)
> > https://codereview.qt-project.org/#change,68040
>
> Is there really an advantage of using this, which cannot work with complex
> expression  vs.
>
> #ifdef Q_OS_WIN
> Q_DECL_DEPRECATED_X("Not avaialble on windows")
> #endif
> void myFunction();
>
> --
> Olivier
>
> Woboq - Qt services and support - http://woboq.com - http://code.woboq.org
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20131016/4df97ab1/attachment.html>


More information about the Development mailing list