From 7a55a984d8d0da6a6cf6fdc440d4cccf7fb42c3d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Fri, 29 Nov 2019 13:08:17 +0100 Subject: [PATCH] Workaround warning in QHash::unite MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The warning pragmas don't work in gcc due to the fact this is a template. I've been told that unite() will disappear but meanwhile i think it's better if we simply don't give a warning that people can't protect themselves against Change-Id: I358e629be86e0e675ef3e49a7fbc4f7f65ae97f6 Reviewed-by: Thiago Macieira Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Christian Ehrlicher --- src/corelib/tools/qhash.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 9108be4dc6f..42f8dbd155b 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -616,10 +616,7 @@ Q_INLINE_TEMPLATE QHash &QHash::unite(const QHash &other) QHash copy(other); const_iterator it = copy.constEnd(); while (it != copy.constBegin()) { - QT_WARNING_PUSH - QT_WARNING_DISABLE_DEPRECATED - --it; - QT_WARNING_POP + it.i = QHashData::previousNode(it.i); insertMulti(it.key(), it.value()); } #else