Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-26772

Re-evaluate nokia icon code for jsondb plugin




      The JsonDb Plugin was originally intended to have tight coupling with the Nokia Plugin. It was expected that both nokia icon images and mappings from category id to icons would be available on device/machine. These are no longer available, therefore the nokia icon handling code could be removed.

      When a place from the Nokia plugin is saved, we would automatically save the category id information as a place attribute. The idea behind this was that for the first official release of the plugin, due to time constraints official Nokia categories would not be supported, only custom user defined categories could be added. By saving the place's category id information as an attribute, we could later introduce the Nokia categories and the places would have the relevant nokia category id information available.
      The category id information however was also used as a means to serve the correct Nokia icon when dealing with places. The category id was used to look up a mapping file which maps the category id to the corresponding icon. The icons would also be available locally on the device/machine. In this way the local file path could be returned as the icon url.

      It is also possible to explicitly assign it a Nokia icon without needing to have the nokia category id information. This would be used in cases such as creating a completely new place.
      The Nokia plugin would expose an icon url similar to below
      The “icons/categories/01.icon” portion is what would actually be saved into the nokiaIcon field. There was an assumption that the device would have all the icons available on the local file system so that when an icon was retrieved, all that was needed was to combine the nokiaIcon field with the correct location.
      If an Nokia icon was explicitly assigned as above it would override the automated lookup of the icon via category id.

      The local icon images and mapping files are no longer available for use since those are internal Nokia assets. The JsonDb Plugin no longer has tight coupling with the Nokia plugin, the above code is no longer relevant.

      It may also be interesting to note that “Favorite” badges could be obtaine by adding“_01” to the icon, ie
      01.icon to 01_01.icon. This would refer to the icon variant that a star in the corner indicating that the place was a favorite. Also a theme could be added by appending an appropriate string to the end eg
      01.icon to 01.icon_wp7 to get the Windows Phone 7 theme. The parameter sets of places.icons.favorite_badges, places.icons.theme, places.local_data_path(undocumented parameter containing the icon mapping and image files) and places.icons.custom (indicates whether to use nokia icons or custom icons) should probably be removed.


        Issue Links



              ablasche Alex Blasche
              abcd abcd (closed Nokia identity) (Inactive)
              0 Vote for this issue
              2 Start watching this issue