Skip to content

Commit e04b93c

Browse files
committed
core/desktopentry: correct property group usage
1 parent 92f15a6 commit e04b93c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/core/desktopentry.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,7 @@ ParsedDesktopEntryData DesktopEntry::parseText(const QString& id, const QString&
193193
}
194194

195195
void DesktopEntry::updateState(const ParsedDesktopEntryData& newState) {
196-
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
197-
QScopedPropertyUpdateGroup group;
198-
#endif
196+
Qt::beginPropertyUpdateGroup();
199197
this->bName = newState.name;
200198
this->bGenericName = newState.genericName;
201199
this->bStartupClass = newState.startupClass;
@@ -208,6 +206,7 @@ void DesktopEntry::updateState(const ParsedDesktopEntryData& newState) {
208206
this->bRunInTerminal = newState.terminal;
209207
this->bCategories = newState.categories;
210208
this->bKeywords = newState.keywords;
209+
Qt::endPropertyUpdateGroup();
211210

212211
this->state = newState;
213212
this->updateActions(newState.actions);
@@ -229,13 +228,13 @@ void DesktopEntry::updateActions(const QHash<QString, DesktopActionData>& newAct
229228
this->mActions.insert(key, act);
230229
}
231230

232-
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
233-
QScopedPropertyUpdateGroup group;
234-
#endif
231+
Qt::beginPropertyUpdateGroup();
235232
act->bName = d.name;
236233
act->bIcon = d.icon;
237234
act->bExecString = d.execString;
238235
act->bCommand = d.command;
236+
Qt::endPropertyUpdateGroup();
237+
239238
act->mEntries = d.entries;
240239
}
241240

0 commit comments

Comments
 (0)