[Development] Timeout for QFuture::waitForFinished()

Lorenz Haas lykurg at gmail.com
Tue Jul 10 22:07:37 CEST 2018


Hi André,

you are right. My statement was not precise enough: Adding a parameter
to the existing function would be BiC, adding an overload "void
QFutureWatcher::waitForFinished(int timeout);" is BC but would be SiC
because it makes function pointers ambiguous - at least I think so.
About the latter I am also not sure, if that would be a problem since
I am not familiar with the exact promises Qt makes about SC.

BR
Lorenz

2018-07-10 21:46 GMT+02:00 André Hartmann <aha_1980 at gmx.de>:
> Hi Lorenz,
>
> I can only reply to the second half of your request.
>
>> Follow-up question if a timeout could be added: AFAIK adding an new
>> parameter to waitForFinished() or adding an overload is BiC.
>
>
> That's only true if you *change* the existing method. Adding a new
> overload while keeping the existing method *is possible*. So if you have:
>
>   void QFutureWatcher::waitForFinished();
>
> you can add in Qt 5:
>
>   void QFutureWatcher::waitForFinished(int timeout);
>
> and merge both in Qt 6:
>
>   void QFutureWatcher::waitForFinished(int timeout = 30000); // or -1
>
> Regards,
> André



More information about the Development mailing list