Save the online id to show it in the backup manager.

This commit is contained in:
codestation
2013-08-29 12:51:42 -04:30
parent e44c3bca28
commit 49f795f1f5
3 changed files with 5 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ void BackupManagerForm::setupForm()
ui->tableWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
ui->tableWidget->horizontalHeader()->hide();
// the the account name when vitamtp returns this value
ui->accountBox->addItem(QSettings().value("lastAccountId", tr("Default account")).toString());
ui->accountBox->addItem(QSettings().value("lastOnlineId", tr("Default account")).toString());
}
void BackupManagerForm::removeEntry(BackupItem *item)

View File

@@ -21,7 +21,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Account ID / Username</string>
<string>Online ID / Username</string>
</property>
</widget>
</item>

View File

@@ -564,9 +564,10 @@ void CmaEvent::vitaEventGetSettingInfo(vita_event_t *event, int eventId)
qDebug("Current account id: %s", settingsinfo->current_account.accountId);
if(QSettings().value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
QSettings settings;
if(settings.value("lastAccountId").toString() != settingsinfo->current_account.accountId) {
db->setUUID(settingsinfo->current_account.accountId);
settings.setValue("lastOnlineId", settingsinfo->current_account.userName);
// set the database to be updated ASAP
emit refreshDatabase();
}