[Development] QT_DEPRECATED_SINCE and retroactive deprecation
Denis Shienkov
denis.shienkov at gmail.com
Sun Jul 12 09:28:31 CEST 2015
> unless I misunderstood what you're asking for (adding
QT_DEPRECATED_SINCE around a function's definition if it already was
added around its declaration?)
Yes, I mean about:
== foo.h ==
class Foo
{
public:
class Foo();
#if QT_DEPRECATED_SINCE(5,2) // since 5.2
QT_DEPRECATED void bar();
#endif
#if QT_DEPRECATED_SINCE(5,5) // since 5.5
QT_DEPRECATED void baz();
#endif
};
So, can I add missed QT_DEPRECATED_SINCE (5.2 and 5.5) to the sources
for the future 5.5.1 branch?
== foo.cpp ==
#if QT_DEPRECATED_SINCE(5,2) // since 5.2, was missed before
void Foo::bar()
{
}
#endif
#if QT_DEPRECATED_SINCE(5,5) // since 5.5, was missed before
void Foo::baz()
{
}
#endif
11.07.2015 18:55, Marc Mutz пишет:
> On Saturday 11 July 2015 16:24:34 Denis Shienkov wrote:
>> Hi all.
>>
>> Is it possible to add this "QT_DEPRECATED_SINCE" macro to the *cpp file
>> if it was missed in there, but in the *h file it is exists?
>>
>> For example, in some header file it is declared QT_DEPRECATED_SINCE(5,x)
>> for the some foo() method..
>> So, can I add missed QT_DEPRECATED_SINCE(5,x) and to source file too? Or
>> I need to wait up to Qt 5.6?
>>
>> Is it belongs to "retroactive" deprecation or not (when in headers there
>> are declared, but in sources there are missed)?
> It's a compilation fix, of course, not a "retroactive" deprecation. So it
> should go to the maximum of {still open branches, branch where the function's
> deprecation was introduced in the header}, unless I misunderstood what you're
> asking for (adding QT_DEPRECATED_SINCE around a function's definition if it
> already was added around its declaration?).
>
More information about the Development
mailing list