diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-16 10:34:53 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-16 16:24:21 +0200 |
commit | 38b9c4f327d2860c5d6e6d2cdbd671173a0d75c8 (patch) | |
tree | 6e97e9af55c6f9bee6c7f413a4da009f002ebc14 /src | |
parent | c430fc856964b8d07cd5bebe874095c7e3a0fc54 (diff) |
Fix additional warnings from usage of deprecated APIs
Replace more QLibaryInfo::location with QLibraryInfo::path
Replace old event accessors APIs, including relevant comments.
Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlapplicationengine.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgcontextplugin.cpp | 2 | ||||
-rw-r--r-- | src/quickwidgets/qquickwidget.cpp | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp index acd19a6f73..9a3460b063 100644 --- a/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp +++ b/src/plugins/qmltooling/qmldbg_preview/qqmlpreviewfileloader.cpp @@ -59,10 +59,10 @@ QQmlPreviewFileLoader::QQmlPreviewFileLoader(QQmlPreviewServiceImpl *service) : m_blacklist.blacklist("/etc"); for (int loc = QLibraryInfo::PrefixPath; loc < QLibraryInfo::TestsPath; ++loc) { - m_blacklist.blacklist(QLibraryInfo::location( + m_blacklist.blacklist(QLibraryInfo::path( static_cast<QLibraryInfo::LibraryLocation>(loc))); } - m_blacklist.blacklist(QLibraryInfo::location(QLibraryInfo::SettingsPath)); + m_blacklist.blacklist(QLibraryInfo::path(QLibraryInfo::SettingsPath)); static const QStandardPaths::StandardLocation blackListLocations[] = { QStandardPaths::DataLocation, @@ -81,7 +81,7 @@ QQmlPreviewFileLoader::QQmlPreviewFileLoader(QQmlPreviewServiceImpl *service) : m_blacklist.blacklist(location); } - m_blacklist.whitelist(QLibraryInfo::location(QLibraryInfo::TestsPath)); + m_blacklist.whitelist(QLibraryInfo::path(QLibraryInfo::TestsPath)); connect(this, &QQmlPreviewFileLoader::request, service, &QQmlPreviewServiceImpl::forwardRequest, Qt::DirectConnection); diff --git a/src/qml/qml/qqmlapplicationengine.cpp b/src/qml/qml/qqmlapplicationengine.cpp index f7b8750d76..d866301f84 100644 --- a/src/qml/qml/qqmlapplicationengine.cpp +++ b/src/qml/qml/qqmlapplicationengine.cpp @@ -76,7 +76,7 @@ void QQmlApplicationEnginePrivate::init() q->connect(q, SIGNAL(uiLanguageChanged()), q_func(), SLOT(_q_loadTranslations())); #if QT_CONFIG(translation) QTranslator* qtTranslator = new QTranslator(q); - if (qtTranslator->load(QLocale(), QLatin1String("qt"), QLatin1String("_"), QLibraryInfo::location(QLibraryInfo::TranslationsPath), QLatin1String(".qm"))) + if (qtTranslator->load(QLocale(), QLatin1String("qt"), QLatin1String("_"), QLibraryInfo::path(QLibraryInfo::TranslationsPath), QLatin1String(".qm"))) QCoreApplication::installTranslator(qtTranslator); else delete qtTranslator; diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp index 025716c2a7..2956c8c438 100644 --- a/src/quick/scenegraph/qsgcontextplugin.cpp +++ b/src/quick/scenegraph/qsgcontextplugin.cpp @@ -176,7 +176,7 @@ QSGAdaptationBackendData *contextFactory() qWarning("Could not create scene graph context for backend '%s'" " - check that plugins are installed correctly in %s", qPrintable(requestedBackend), - qPrintable(QLibraryInfo::location(QLibraryInfo::PluginsPath))); + qPrintable(QLibraryInfo::path(QLibraryInfo::PluginsPath))); } } #endif // library diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp index bb9157d0e7..ca8bdac801 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -1365,9 +1365,9 @@ void QQuickWidget::mouseMoveEvent(QMouseEvent *e) Q_QUICK_INPUT_PROFILE(QQuickProfiler::Mouse, QQuickProfiler::InputMouseMove, e->position().x(), e->position().y()); - // Put localPos into the event's localPos and windowPos, and screenPos into the - // event's screenPos. This way the windowPos in e is ignored and is replaced by - // localPos. This is necessary because QQuickWindow thinks of itself as a + // Put position into the event's position and scenePosition, and globalPosition into the + // event's globalPosition. This way the scenePosition in e is ignored and is replaced by + // position. This is necessary because QQuickWindow thinks of itself as a // top-level window always. QMouseEvent mappedEvent(e->type(), e->position(), e->position(), e->globalPosition(), e->button(), e->buttons(), e->modifiers(), e->source()); |