ported branch commits 2666-2668, 2670-2672, 2679, 2682-2683 into trunk

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2702 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-04-10 14:56:34 +00:00
parent 063a366d12
commit c6c8e63e91
12 changed files with 153 additions and 233 deletions

View file

@ -145,22 +145,22 @@ RSettingsWin::loadSettings()
void
RSettingsWin::saveChanges()
{
bool saveOk;
QString errmsg;
/* Call each config page's save() method to save its data */
int i, count = stackedWidget->count();
for (i = 0; i < count; i++) {
ConfigPage *page = (ConfigPage *) stackedWidget->widget(i);
saveOk = page->save(errmsg);
for (i = 0; i < count; i++)
{
ConfigPage *page = dynamic_cast<ConfigPage *>(stackedWidget->widget(i));
if (!saveOk) {
if(!page->save(errmsg))
{
/* Display the offending page */
stackedWidget->setCurrentWidget(page);
/* Show the user what went wrong */
QMessageBox::warning(this,
tr("Error Saving Configuration"), errmsg,
tr("Error Saving Configuration on page ")+QString::number(i), errmsg,
QMessageBox::Ok, QMessageBox::NoButton);
/* Don't process the rest of the pages */
@ -173,3 +173,4 @@ RSettingsWin::saveChanges()
QDialog::close();
}