error: ignoring return value of function declared with 'nodiscard' attributes
-
wrote on 19 Aug 2021, 20:14 last edited by
-
I'm getting this error while I'm trying to translate my app :
error: ignoring return value of function declared with 'nodiscard' attributes !and the translation doesn't work, can anybody please help ?
wrote on 19 Aug 2021, 20:44 last edited by@Firas-Alaammar
That may be a warning only in the editor's code model, not when you actually compile?Anyway, if you want to get rid of it
QTranslator::load()
returns abool
, my guess is if you assign/test it (which really you ought do here anyway) that would get rid of this warning? -
wrote on 6 Nov 2023, 07:10 last edited by
I can see that you are using the use case from this https://www.youtube.com/watch?v=In5QH_ZrDJE youtube link which works fine. But i see the same warning and even there is no output in the application for language switch which i am still confused about.
-
I can see that you are using the use case from this https://www.youtube.com/watch?v=In5QH_ZrDJE youtube link which works fine. But i see the same warning and even there is no output in the application for language switch which i am still confused about.
@sumit-chatterjee @JonB Explained what needs to be changed to get rid of this error - did you do that?