Prefer iconPath to QImage instances in GeoDataIconStyle

Review Request #124579 - Created Aug. 1, 2015 and submitted

Information
Dennis Nienhüser
marble
master
Reviewers
marble

Prefers passing a file path to instantiate GeoDataIconStyle instead of passing a QImage directly. This leads to slightly faster startup times (the icons of the static default styles are now lazy-loaded) and allows querying the iconPath in more cases. The latter is beneficial for QML images. Icon paths are also exported in MarblePlacemarkModel.

Icons still show up nicely on the map and in the search list view. Startup is slightly faster (e.g. GeoDataFeaturePrivate::initializeDefaultStyles() is reduced from 15 ms to 5 ms on my laptop. It is called three times during startup. Not sure why it is called more than once, possibly due to different libraries using it, i.e. marblewidget and some plugins).

Torsten Rahn
Dennis Nienhüser
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit aca7cc243c284b5f75b0a048dd32b57b1fb8c538 by Dennis Nienhüser to branch master.
Loading...