mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
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:
parent
063a366d12
commit
c6c8e63e91
12 changed files with 153 additions and 233 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue