mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -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
|
@ -96,8 +96,7 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, QString dir)
|
|||
|
||||
/* Check if we're supposed to reset our config before proceeding. */
|
||||
if (_args.contains(ARG_RESET)) {
|
||||
RshareSettings settings;
|
||||
settings.reset();
|
||||
Settings->reset();
|
||||
}
|
||||
|
||||
/* Handle the -loglevel and -logfile options. */
|
||||
|
@ -314,8 +313,7 @@ Rshare::setLanguage(QString languageCode)
|
|||
{
|
||||
/* If the language code is empty, use the previously-saved setting */
|
||||
if (languageCode.isEmpty()) {
|
||||
RshareSettings settings;
|
||||
languageCode = settings.getLanguageCode();
|
||||
languageCode = Settings->getLanguageCode();
|
||||
}
|
||||
/* Translate into the desired langauge */
|
||||
if (LanguageSupport::translate(languageCode)) {
|
||||
|
@ -334,8 +332,7 @@ Rshare::setStyle(QString styleKey)
|
|||
{
|
||||
/* If no style was specified, use the previously-saved setting */
|
||||
if (styleKey.isEmpty()) {
|
||||
RshareSettings settings;
|
||||
styleKey = settings.getInterfaceStyle();
|
||||
styleKey = Settings->getInterfaceStyle();
|
||||
}
|
||||
/* Apply the specified GUI style */
|
||||
if (QApplication::setStyle(styleKey)) {
|
||||
|
@ -350,8 +347,7 @@ Rshare::setSheet(QString sheet)
|
|||
{
|
||||
/* If no stylesheet was specified, use the previously-saved setting */
|
||||
if (sheet.isEmpty()) {
|
||||
RshareSettings settings;
|
||||
sheet = settings.getSheetName();
|
||||
sheet = Settings->getSheetName();
|
||||
}
|
||||
/* Apply the specified GUI stylesheet */
|
||||
_stylesheet = sheet;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue