[Qt-creator] Deprecation warnings

Christian Kandeler Christian.Kandeler at qt.io
Fri Nov 8 14:31:33 CET 2019


Hi,

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?


Christian


More information about the Qt-creator mailing list