abstractdeclarative.cpp: Fix deprecation warnings

Use QHash::contains() instead of checking for presence via value(),
fixing:

abstractdeclarative.cpp:681:48: warning: 'QList<ValueType> QHash<K, V>::values(const Key&) const [with Key = QQuickWindow*; T = bool]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations]
abstractdeclarative.cpp:694:45: warning: 'QList<ValueType> QHash<K, V>::values(const Key&) const [with Key = QQuickWindow*; T = bool]' is deprecated: Use QMultiHash for hashes storing multiple values with the same key. [-Wdeprecated-declarations]

Change-Id: Ic858949514a647f62e74bff6ece346851dce413b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Friedemann Kleint 2020-01-02 09:39:07 +01:00
parent 620eeaaa5b
commit a315402ab2
1 changed files with 2 additions and 2 deletions

View File

@ -678,7 +678,7 @@ void AbstractDeclarative::checkWindowList(QQuickWindow *window)
}
if (oldWindow && !windowList.contains(oldWindow)
&& windowClearList.values(oldWindow).size() != 0) {
&& windowClearList.contains(oldWindow)) {
// Return window clear value
oldWindow->setClearBeforeRendering(windowClearList.value(oldWindow));
windowClearList.remove(oldWindow);
@ -691,7 +691,7 @@ void AbstractDeclarative::checkWindowList(QQuickWindow *window)
if ((m_renderMode == RenderDirectToBackground
|| m_renderMode == RenderDirectToBackground_NoClear)
&& windowClearList.values(window).size() == 0) {
&& !windowClearList.contains(window)) {
// Save old clear value
windowClearList[window] = window->clearBeforeRendering();
// Disable clearing of the window as we render underneath