Fixed crash when closing the settings dialog.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5605 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-25 23:51:13 +00:00
parent 29e44ddafa
commit 5726c1ec18
4 changed files with 38 additions and 36 deletions

View file

@ -22,6 +22,7 @@
#include <QMessageBox>
#include <retroshare/rsplugin.h>
#include <rshare.h>
#include "GeneralPage.h"
#include "DirectoriesPage.h"
#include "ServerPage.h"
@ -37,6 +38,7 @@
#include "MessagePage.h"
#include "ForumPage.h"
#include "PluginsPage.h"
#include "rsharesettings.h"
#define IMAGE_GENERAL ":/images/kcmsystem24.png"
@ -57,6 +59,7 @@ RSettingsWin::RSettingsWin(QWidget * parent, Qt::WFlags flags)
connect(listWidget, SIGNAL(currentRowChanged(int)), this, SLOT(setNewPage(int)));
connect(applyButton, SIGNAL(clicked( bool )), this, SLOT( saveChanges()) );
connect(this, SIGNAL(finished(int)), this, SLOT(dialogFinished(int)));
}
RSettingsWin::~RSettingsWin()
@ -65,6 +68,14 @@ RSettingsWin::~RSettingsWin()
_instance = NULL;
}
void RSettingsWin::dialogFinished(int result)
{
if (result == Rejected) {
/* reaload style sheet */
Rshare::loadStyleSheet(::Settings->getSheetName());
}
}
/*static*/ void RSettingsWin::showYourself(QWidget *parent, PageType page /* = LastPage*/)
{
if(_instance == NULL) {