mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-09 09:35:32 -04:00
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:
parent
29e44ddafa
commit
5726c1ec18
4 changed files with 38 additions and 36 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue