Almost all global settings wrapped in protective object to guarantee type safety and protect against tag spelling errors (I have found and corrected a lot of those!).

Joystick settings and burner configuration is not yet within the global object.
This commit is contained in:
Kjell Kernen
2014-02-17 23:47:40 +01:00
parent 2633b61433
commit c23a096a73
18 changed files with 204 additions and 1156 deletions
+3 -4
View File
@@ -1,6 +1,6 @@
#include "splashlibrary.h"
#include "ui_splashlibrary.h"
#include "appdata.h"
#include <QtGui>
#include "helpers.h"
//#include "splashlabel.h"
@@ -61,9 +61,8 @@ void splashLibrary::setupPage(int page) {
}
void splashLibrary::getFileList() {
QSettings settings;
imageList.clear();
if (settings.value("embedded_splashes", 0).toInt() == 0) {
if (glob.embedded_splashes() == 0) {
QDir myRes(":/images/library");
QStringList tmp = myRes.entryList();
for (int i = 0; i < tmp.size(); i++) {
@@ -71,7 +70,7 @@ void splashLibrary::getFileList() {
imageList.append(":/images/library/" + fileInfo.fileName());
}
}
QString libraryPath = settings.value("libraryPath", "").toString();
QString libraryPath = glob.libraryPath();
if (!libraryPath.isEmpty()) {
if (QDir(libraryPath).exists()) {
QStringList supportedImageFormats;