[Qt-creator] Deprecation warnings
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Fri Nov 8 14:50:24 CET 2019
Il 08/11/19 14:31, Christian Kandeler ha scritto:
> with recent Qt versions, we are getting these annoying warnings when building Qt Creator:
>
> src/libs/utils/tooltip/tips.cpp: In function ‘int Utils::Internal::screenNumber(const QPoint&, QWidget*)’:
> src/libs/utils/tooltip/tips.cpp:304:51: warning: ‘bool QDesktopWidget::isVirtualDesktop() const’ is deprecated: Use QScreen::virtualSiblings() of primary screen [-Wdeprecated-declarations]
> src/libs/utils/tooltip/tips.cpp:305:57: warning: ‘int QDesktopWidget::screenNumber(const QPoint&) const’ is deprecated: Use QGuiApplication::screenAt() [-Wdeprecated-declarations]
> src/libs/utils/tooltip/tips.cpp: In function ‘QRect Utils::Internal::screenGeometry(const QPoint&, QWidget*)’:
> src/libs/utils/tooltip/tips.cpp:313:79: warning: ‘const QRect QDesktopWidget::availableGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
> src/libs/utils/tooltip/tips.cpp:314:72: warning: ‘const QRect QDesktopWidget::screenGeometry(int) const’ is deprecated: Use QGuiApplication::screens() [-Wdeprecated-declarations]
>
> I have no clue what this code does, nor do I see a way to even semi-mechanically switch to the suggested replacements.
> Does anyone know how to get the desired behavior without using deprecated API?
The wrong deprecation APIs (the unversioned ones) have been used in
qtbase when deprecating these methods. Please open a bug against Qt 5.14
(?) to mark them with the versioned markers.
HTH,
--
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20191108/f505adde/attachment.bin>
More information about the Qt-creator
mailing list