Bazaar: set global Bazaar user ID when changed

This ID is automatically set when the user settings have been changed
and applied from the "Options" dialog. This calls 'bzr whoami' under
the hood

Merge-request: 275
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
cerf
2011-03-15 15:47:45 +01:00
committed by Tobias Hunger
parent d23d7cbc12
commit f93226fbf3
7 changed files with 28 additions and 1 deletions

View File

@@ -205,7 +205,10 @@ const BazaarSettings &BazaarPlugin::settings() const
void BazaarPlugin::setSettings(const BazaarSettings &settings)
{
if (settings != m_bazaarSettings) {
m_bazaarSettings = settings;
const bool userIdChanged = !m_bazaarSettings.sameUserId(settings);
m_bazaarSettings = settings;
if (userIdChanged)
client()->synchronousSetUserId();
}
}