mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-04 23:25:32 -04:00
reworked settings
now there is only one global object for loading and saving settings RshareSettings *Settings; the class RSettings can be used too, but it is not prefered, because the default settings has no affect git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e68e6b54ef
commit
6baf56285b
39 changed files with 336 additions and 390 deletions
|
@ -122,11 +122,9 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
|||
/* Invoke the Qt Designer generated QObject setup routine */
|
||||
ui.setupUi(this);
|
||||
|
||||
RshareSettings settings;
|
||||
|
||||
if (settings.value(QString::fromUtf8("FirstRun"), true).toBool())
|
||||
if (Settings->value(QString::fromUtf8("FirstRun"), true).toBool())
|
||||
{
|
||||
settings.setValue(QString::fromUtf8("FirstRun"), false);
|
||||
Settings->setValue(QString::fromUtf8("FirstRun"), false);
|
||||
QuickStartWizard *qstartWizard = new QuickStartWizard(this);
|
||||
qstartWizard->exec();
|
||||
}
|
||||
|
@ -573,9 +571,7 @@ void MainWindow::createActions()
|
|||
*/
|
||||
void MainWindow::doQuit()
|
||||
{
|
||||
RshareSettings settings;
|
||||
|
||||
if(!settings.value(QString::fromUtf8("doQuit"), false).toBool())
|
||||
if(!Settings->value(QString::fromUtf8("doQuit"), false).toBool())
|
||||
{
|
||||
QString queryWrn;
|
||||
queryWrn.clear();
|
||||
|
@ -603,9 +599,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||
{
|
||||
static bool firstTime = true;
|
||||
|
||||
RshareSettings settings;
|
||||
|
||||
if(!settings.value(QString::fromUtf8("ClosetoTray"), false).toBool())
|
||||
if(!Settings->value(QString::fromUtf8("ClosetoTray"), false).toBool())
|
||||
{
|
||||
if (trayIcon->isVisible()) {
|
||||
if (firstTime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue