mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-18 11:29:31 -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
|
@ -364,15 +364,13 @@ TBoard::TBoard(QWidget *parent) {
|
|||
score = 0;
|
||||
level = 0;
|
||||
|
||||
RshareSettings settings;
|
||||
maxScore = settings.value("/about/maxsc").toInt();
|
||||
maxScore = Settings->value("/about/maxsc").toInt();
|
||||
}
|
||||
TBoard::~TBoard() {
|
||||
RshareSettings settings;
|
||||
int oldMax = settings.value("/about/maxsc").toInt();
|
||||
int oldMax = Settings->value("/about/maxsc").toInt();
|
||||
int newMax = qMax(maxScore, score);
|
||||
if (oldMax < newMax) {
|
||||
settings.setValue("/about/maxsc", newMax);
|
||||
Settings->setValue("/about/maxsc", newMax);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue