on xenial help sign in
Do not use the same filepath parameter for all the card creator createQmlObject calls

Seems that something deep down in Qt is deciding that if the filepath is the same the qmlcomponent has to be the same and we get weird errors like the fallback of one category showing up at the fallback of other

commit65de3d7f428867bf73b25d10acc98d3d3e792c82 authorAlbert Astals Cid <albert.astals@canonical.com> dateThu 21 Jan 2016, 18:56 (11 years ago) parente2e7e7d
2 files changed+3−3
plugins/Dash/CardCreator.js+2−2 plugins/Dash/CardCreatorCache.qml+1−1
plugins/Dash/CardCreator.js+2−2
@@ -801,7 +801,7 @@ function cardString(template, components) {
801801 return code;
802802}
803803
804−function createCardComponent(parent, template, components) {
804+function createCardComponent(parent, template, components, identifier) {
805805 var imports = 'import QtQuick 2.4; \n\
806806 import Ubuntu.Components 1.3; \n\
807807 import Ubuntu.Settings.Components 0.1; \n\
@@ -811,7 +811,7 @@ function createCardComponent(parent, template, components) {
811811 var code = imports + 'Component {\n' + card + '}\n';
812812
813813 try {
814− return Qt.createQmlObject(code, parent, "createCardComponent");
814+ return Qt.createQmlObject(code, parent, identifier);
815815 } catch (e) {
816816 console.error("ERROR: Invalid component created.");
817817 console.error("Template:");
plugins/Dash/CardCreatorCache.qml+1−1
@@ -32,7 +32,7 @@ QtObject {
3232 var allString = tString + cString;
3333 var component = cache[allString];
3434 if (component === undefined) {
35− component = CardCreator.createCardComponent(root, template, components);
35+ component = CardCreator.createCardComponent(root, template, components, allString);
3636 cache[allString] = component;
3737 }
3838 return component;