1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
3 |
|
---|
4 | This program is free software; you can redistribute it and/or modify
|
---|
5 | it under the terms of the GNU General Public License as published by
|
---|
6 | the Free Software Foundation; either version 2 of the License, or
|
---|
7 | (at your option) any later version.
|
---|
8 |
|
---|
9 | This program is distributed in the hope that it will be useful,
|
---|
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | GNU General Public License for more details.
|
---|
13 |
|
---|
14 | You should have received a copy of the GNU General Public License
|
---|
15 | along with this program; if not, write to the Free Software
|
---|
16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | #include "updatecheckerdata.h"
|
---|
20 | #include "version.h"
|
---|
21 | #include <QSettings>
|
---|
22 |
|
---|
23 | void UpdateCheckerData::save(QSettings * set) {
|
---|
24 | set->beginGroup("update_checker");
|
---|
25 | set->setValue("checked_date", last_checked);
|
---|
26 | set->setValue("enabled", enabled);
|
---|
27 | set->setValue("days_to_check", days_to_check);
|
---|
28 | set->setValue("last_known_version", last_known_version);
|
---|
29 | set->endGroup();
|
---|
30 | }
|
---|
31 |
|
---|
32 | void UpdateCheckerData::load(QSettings * set) {
|
---|
33 | set->beginGroup("update_checker");
|
---|
34 | last_checked = set->value("checked_date", 0).toDate();
|
---|
35 | enabled = set->value("enabled", true).toBool();
|
---|
36 | days_to_check = set->value("days_to_check", 7).toInt();
|
---|
37 | last_known_version = set->value("last_known_version", Version::with_revision()).toString();
|
---|
38 | set->endGroup();
|
---|
39 | }
|
---|
40 |
|
---|