Use std::exchange in Qt::endPropertyUpdateGroup()

Easier to read, saying in one line that for which the old code needed
three.

Task-number: QTBUG-110710
Change-Id: Ie2a1d11aefe0bdf5f4db0694832fce669de564fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
bb10
Marc Mutz 2023-02-05 18:53:31 +01:00
parent d257a56c93
commit e8322a4cc0
1 changed files with 1 additions and 3 deletions

View File

@ -233,9 +233,7 @@ void Qt::endPropertyUpdateGroup()
while (data) {
for (qsizetype i = 0; i < data->used; ++i)
data->notify(i);
auto *next = data->next;
delete data;
data = next;
delete std::exchange(data, data->next);
}
}