equal
deleted
inserted
replaced
37 */ |
37 */ |
38 CpThemeChanger::CpThemeChanger(QObject* p) : |
38 CpThemeChanger::CpThemeChanger(QObject* p) : |
39 QObject(p), |
39 QObject(p), |
40 mCurrentTheme(0) |
40 mCurrentTheme(0) |
41 { |
41 { |
42 connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(changeFinished())); |
42 if(hbInstance->theme()) { |
|
43 connect(hbInstance->theme(),SIGNAL(changeFinished()), this, SLOT(changeFinished())); |
|
44 } |
43 |
45 |
44 setCurrentTheme(); |
46 setCurrentTheme(); |
45 } |
47 } |
46 |
48 |
47 /*! |
49 /*! |
71 |
73 |
72 } |
74 } |
73 |
75 |
74 if(mCurrentTheme && mCurrentTheme->name() == themeName) { |
76 if(mCurrentTheme && mCurrentTheme->name() == themeName) { |
75 return; |
77 return; |
76 } |
78 } else { |
77 else { |
|
78 //buildThemeInfo creates new theme info. |
79 //buildThemeInfo creates new theme info. |
79 CpThemeInfo* tmpTheme = CpThemeUtil::buildThemeInfo(HbThemeServices::themePath(), themeName); |
80 CpThemeInfo* tmpTheme = CpThemeUtil::buildThemeInfo(HbThemeServices::themePath(), themeName); |
80 |
81 |
81 //delete old value. set the new value. |
82 //delete old value. set the new value. |
82 if(tmpTheme) { |
83 if(tmpTheme) { |
122 * Slot to handle notification from theme server that theme change |
123 * Slot to handle notification from theme server that theme change |
123 * is done. Notify the owner. |
124 * is done. Notify the owner. |
124 */ |
125 */ |
125 void CpThemeChanger::changeFinished() |
126 void CpThemeChanger::changeFinished() |
126 { |
127 { |
127 |
|
128 setCurrentTheme(); |
128 setCurrentTheme(); |
129 |
|
130 emit themeChangeFinished(); |
129 emit themeChangeFinished(); |
131 } |
130 } |
132 |
131 |
133 // End of file |
132 // End of file |
134 |
133 |