diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-03 15:01:35 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-09-09 11:12:59 +0200 |
commit | 8daefcfd8e1bf41ae4d06c7a79a526b81a78dc58 (patch) | |
tree | a0f681b980d852b0b4c08109c0e13cfec6224969 /tests/manual | |
parent | d4022e03ccaeb92e41075f276e4011bd49627165 (diff) |
Remove usages of deprecated APIs
- Replaced the following deprecated APIs:
QWebEngineProfile::setRequestInterceptor -> QWebEngineProfile::setUrlRequestInterceptor
QWebEngineSettings::globalSettings -> WebEngineSettings::defaultSettings
QLayout::setMargin -> QLayout::setContentsMargins
QWheelEvent::{x, y} -> QWheelEvent::position
QWheelEvent::{globalX, globalY} -> QWheelEvent::globalPosition
QSysInfo::windowsVersion -> QOperatingSystemVersion::current
Qt::InputMethodQuery::ImMicroFocus -> Qt::InputMethodQuery::ImCursorRectangle
QDesktopWidget::screenGeometry -> QGuiApplication::primaryScreen::geometry
QTime -> QElapsedTimer
- Fixed the tests to compile when deprecated APIs are disabled.
- Replaced the doc references to deprecated APIs with the new ones.
Made the docs for deprecated APIs compile conditionally, based on
deprecation version.
Task-number: QTBUG-76491
Change-Id: I5c6b7c628957deb9163f0bd2b6bc31bde1c7daec
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/widgets/webgl/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/widgets/webgl/main.cpp b/tests/manual/widgets/webgl/main.cpp index 364eda8b9..c18a15bac 100644 --- a/tests/manual/widgets/webgl/main.cpp +++ b/tests/manual/widgets/webgl/main.cpp @@ -30,9 +30,9 @@ #include <QtCore/QLoggingCategory> #include <QtCore/QOperatingSystemVersion> #include <QtGui/QOpenGLContext> +#include <QtGui/QScreen> #include <QtGui/QSurfaceFormat> #include <QtWidgets/QApplication> -#include <QtWidgets/QDesktopWidget> #include <QtWidgets/QGroupBox> #include <QtWidgets/QHBoxLayout> #include <QtWidgets/QMainWindow> @@ -104,7 +104,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) QSize MainWindow::sizeHint() const { - const QRect desktopRect = QApplication::desktop()->screenGeometry(); + const QRect desktopRect = QGuiApplication::primaryScreen()->geometry(); const QSize size = desktopRect.size() * qreal(0.9); return size; } @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) MainWindow w; // Move middle-ish. - const QRect desktopRect = QApplication::desktop()->screenGeometry(); + const QRect desktopRect = QGuiApplication::primaryScreen()->geometry(); const QSize pos = desktopRect.size() * qreal(0.1); w.move(pos.width(), pos.height()); |