equal
deleted
inserted
replaced
91 |
91 |
92 |
92 |
93 /*! |
93 /*! |
94 Change a theme. Returns true on success, false otherwise. |
94 Change a theme. Returns true on success, false otherwise. |
95 */ |
95 */ |
96 bool CpThemeChanger::changeTheme(const QString& newTheme) |
96 bool CpThemeChanger::changeTheme(const CpThemeInfo& newTheme) |
97 { |
97 { |
98 bool result = false; |
98 bool result = false; |
99 // Skip doing this if the request is for the current theme |
99 // Skip doing this if the request is for the current theme |
100 if (newTheme.isEmpty() || newTheme == mCurrentTheme->name()) { |
100 if (newTheme.name().isEmpty() || (mCurrentTheme && newTheme.name() == mCurrentTheme->name())) { |
101 return result; |
101 return result; |
102 } |
102 } |
103 |
103 |
104 QString themePath = CpThemeUtil::themePath(newTheme); |
104 QString themePath = newTheme.itemData(); |
105 |
105 |
106 if(!themePath.isEmpty()) { |
106 if(!themePath.isEmpty()) { |
107 HbThemeServices::setTheme(themePath); |
107 HbThemeServices::setTheme(themePath); |
108 result = true; |
108 result = true; |
109 } |
109 } |