[frameworks/syntax-highlighting] src/lib: don't do a reload on language change
Christoph Cullmann <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 626676176d4201f1b8d756e534820c2e3177cb24 by Christoph Cullmann.
Committed on 02/08/2026 at 08:40.
Pushed by cullmann into branch 'master'.
don't do a reload on language change
we just swap the translations & update the order, not disturb the applications
with reload signals that might trigger highligting invalidation and Co.
we did by accident even trigger a full reload instead of emit reloaded()...
BUG: 523233
M +3 -4 src/lib/repository.cpp
https://invent.kde.org/frameworks/syntax-highlighting/-/commit/626676176d4201f1b8d756e534820c2e3177cb24
diff --git a/src/lib/repository.cpp b/src/lib/repository.cpp
index 6d2c127c6..1612b35a5 100644
--- a/src/lib/repository.cpp
+++ b/src/lib/repository.cpp
@@ -442,15 +442,14 @@ QList<QString> Repository::customSearchPaths() const
bool Repository::eventFilter(QObject *receiver, QEvent *ev)
{
if ((ev->type() == QEvent::LanguageChange) && (receiver == QCoreApplication::instance())) {
- // definition references remain valid, but sort order by translated name will change
- // so better be on the safe side here
- Q_EMIT aboutToReload();
+ // we just swap the translations & update the order, not disturb the applications
+ // with reload signals that might trigger highligting invalidation and Co.
for (const auto &it : d->m_defs) {
auto def = DefinitionData::get(it.second);
def->translatedName.clear();
def->translatedSection.clear();
}
- Q_EMIT reload();
+ d->computeAlternativeDefLists();
}
return QObject::eventFilter(receiver, ev);
}