Store the const iterator returned, not the address, so it can be checked against constEnd().
Call windowInfo instead of appData, because it is not as expensive. appData is being deleted, calculated and stored when changing tabs in konsole or saving files in kate.
{F5695179}
{F5695178}
Cache the calls to windowUrlFromMetadata, because it can be called quite often, for example with the vivaldi browser started, and it usually calls KServiceTypeTrader::defaultOffers that also involves I/O.
CCBUG: 342056
CCBUG: 358231