controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp
--- a/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp Thu Sep 02 17:11:27 2010 +0800
+++ b/controlpanelui/src/cpplugins/profileactivatorplugin/src/cpprofileactivatorentryitem.cpp Thu Sep 30 16:15:53 2010 +0800
@@ -36,7 +36,8 @@
int currentId = mProfileModel->activeProfileId();
QString currentName = mProfileModel->profileName(currentId);
this->setDescription(currentName);
- connect(mProfileMonitor, SIGNAL(profileActivated(int)), this, SLOT(onProfileChanged(int)));
+ connect(mProfileMonitor, SIGNAL(profileActivated(int)), this, SLOT(onProfileActivated(int)));
+ connect(mProfileMonitor, SIGNAL(profileNameModified()), this, SLOT(onProfileNameChanged()));
}
CpProfileActivatorEntryItem::~CpProfileActivatorEntryItem()
@@ -55,29 +56,17 @@
}
-void CpProfileActivatorEntryItem::onProfileChanged(int activeProfileId)
-{
- QString profileName = mProfileModel->profileName(activeProfileId);
- this->setDescription(profileName);
-}
-/*void CpPersonalizationEntryItemData::handleOk(const QVariant &result)
+void CpProfileActivatorEntryItem::onProfileActivated(int profileId)
{
- if (!result.canConvert<QString>())
- {
- setDescription( "Corrupt result" );
- }
- else
- {
- setDescription( result.value<QString>() );
- }
+ QString profileName = mProfileModel->profileName(profileId);
+ this->setDescription(profileName);
}
-void CpPersonalizationEntryItemData::handleError(int errorCode, const QString& errorMessage)
+
+void CpProfileActivatorEntryItem::onProfileNameChanged()
{
- //
- Q_UNUSED(errorCode);
- Q_UNUSED(errorMessage);
- setDescription("Error");
-}*/
+ QString profileName = mProfileModel->profileName(mProfileModel->activeProfileId());
+ this->setDescription(profileName);
+}
CpBaseSettingView *CpProfileActivatorEntryItem::createSettingView() const
{