summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp2
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstalls5l.cpp2
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp2
-rw-r--r--rbutil/rbutilqt/base/serverinfo.cpp4
-rw-r--r--rbutil/rbutilqt/base/serverinfo.h2
-rw-r--r--rbutil/rbutilqt/base/systeminfo.cpp72
-rw-r--r--rbutil/rbutilqt/base/systeminfo.h24
-rw-r--r--rbutil/rbutilqt/base/talkgenerator.cpp2
-rw-r--r--rbutil/rbutilqt/base/utils.cpp6
9 files changed, 56 insertions, 60 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 7c69b3a59b..8c800607c3 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -108,7 +108,7 @@ void Autodetection::detectUsb()
LOG_WARNING() << "[USB] detected problem with player" << d.device;
}
QString idstring = QString("%1").arg(attached.at(i), 8, 16, QChar('0'));
- if(!SystemInfo::platformValue(SystemInfo::CurName, idstring).toString().isEmpty()) {
+ if(!SystemInfo::platformValue(SystemInfo::Name, idstring).toString().isEmpty()) {
struct Detected d;
d.status = PlayerIncompatible;
d.device = idstring;
diff --git a/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp b/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
index bd7ed6492d..013abb2f5e 100644
--- a/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstalls5l.cpp
@@ -409,7 +409,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallS5l::installed(void)
+ "/.rockbox/rbutil.log";
QSettings s(logfile, QSettings::IniFormat, this);
QString section = SystemInfo::platformValue(
- SystemInfo::CurBootloaderName).toString().section('/', -1);
+ SystemInfo::BootloaderName).toString().section('/', -1);
rbblInstalled = s.contains("Bootloader/" + section);
if (rbblInstalled) {
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp
index 4167a8659c..512341b84c 100644
--- a/rbutil/rbutilqt/base/rbsettings.cpp
+++ b/rbutil/rbutilqt/base/rbsettings.cpp
@@ -194,7 +194,7 @@ QString RbSettings::constructSettingPath(QString path, QString substitute)
}
else {
path.replace(":tts:", userSettings->value("tts").toString());
- path.replace(":encoder:", SystemInfo::platformValue(SystemInfo::CurEncoder, platform).toString());
+ path.replace(":encoder:", SystemInfo::platformValue(SystemInfo::Encoder, platform).toString());
}
path.replace(":platform:", platform);
}
diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp
index 505689847d..5a0719f375 100644
--- a/rbutil/rbutilqt/base/serverinfo.cpp
+++ b/rbutil/rbutilqt/base/serverinfo.cpp
@@ -136,9 +136,9 @@ void ServerInfo::readBuildInfo(QString file)
QString manualZipUrl = manualBaseUrl;
QString buildservermodel = SystemInfo::platformValue(
- SystemInfo::CurBuildserverModel, platforms.at(i)).toString();
+ SystemInfo::BuildserverModel, platforms.at(i)).toString();
QString modelman = SystemInfo::platformValue(
- SystemInfo::CurManual, platforms.at(i)).toString();
+ SystemInfo::Manual, platforms.at(i)).toString();
QString manualBaseName = "rockbox-";
if(modelman.isEmpty()) manualBaseName += buildservermodel;
diff --git a/rbutil/rbutilqt/base/serverinfo.h b/rbutil/rbutilqt/base/serverinfo.h
index b12a437c34..7588521b09 100644
--- a/rbutil/rbutilqt/base/serverinfo.h
+++ b/rbutil/rbutilqt/base/serverinfo.h
@@ -49,8 +49,6 @@ class ServerInfo : public QObject
static QVariant platformValue(enum ServerInfos setting, QString platform = "");
private:
- //! set a server info value
- static void setValue(enum ServerInfos setting, QVariant value);
//! set a value for a server info for a named platform.
static void setPlatformValue(enum ServerInfos setting, QString platform, QVariant value);
//! you shouldnt call this, its a fully static class
diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp
index c9e29a8325..d14c3f5436 100644
--- a/rbutil/rbutilqt/base/systeminfo.cpp
+++ b/rbutil/rbutilqt/base/systeminfo.cpp
@@ -26,29 +26,28 @@
const static struct {
SystemInfo::SystemInfos info;
const char* name;
- const char* def;
} SystemInfosList[] = {
- { SystemInfo::ManualUrl, "manual_url", "" },
- { SystemInfo::BleedingUrl, "bleeding_url", "" },
- { SystemInfo::BootloaderUrl, "bootloader_url", "" },
- { SystemInfo::BootloaderInfoUrl, "bootloader_info_url", "" },
- { SystemInfo::ReleaseFontUrl, "release_font_url", "" },
- { SystemInfo::DailyFontUrl, "daily_font_url", "" },
- { SystemInfo::DailyVoiceUrl, "daily_voice_url", "" },
- { SystemInfo::ReleaseVoiceUrl, "release_voice_url", "" },
- { SystemInfo::DoomUrl, "doom_url", "" },
- { SystemInfo::Duke3DUrl, "duke3d_url", "" },
- { SystemInfo::PuzzFontsUrl, "puzzfonts_url", "" },
- { SystemInfo::QuakeUrl, "quake_url", "" },
- { SystemInfo::Wolf3DUrl, "wolf3d_url", "" },
- { SystemInfo::XWorldUrl, "xworld_url", "" },
- { SystemInfo::ReleaseUrl, "release_url", "" },
- { SystemInfo::DailyUrl, "daily_url", "" },
- { SystemInfo::BuildInfoUrl, "build_info_url", "" },
- { SystemInfo::GenlangUrl, "genlang_url", "" },
- { SystemInfo::ThemesUrl, "themes_url", "" },
- { SystemInfo::ThemesInfoUrl, "themes_info_url", "" },
- { SystemInfo::RbutilUrl, "rbutil_url", "" },
+ { SystemInfo::ManualUrl, "manual_url" },
+ { SystemInfo::BleedingUrl, "bleeding_url" },
+ { SystemInfo::BootloaderUrl, "bootloader_url" },
+ { SystemInfo::BootloaderInfoUrl, "bootloader_info_url" },
+ { SystemInfo::ReleaseFontUrl, "release_font_url" },
+ { SystemInfo::DailyFontUrl, "daily_font_url" },
+ { SystemInfo::DailyVoiceUrl, "daily_voice_url" },
+ { SystemInfo::ReleaseVoiceUrl, "release_voice_url" },
+ { SystemInfo::DoomUrl, "doom_url" },
+ { SystemInfo::Duke3DUrl, "duke3d_url" },
+ { SystemInfo::PuzzFontsUrl, "puzzfonts_url" },
+ { SystemInfo::QuakeUrl, "quake_url" },
+ { SystemInfo::Wolf3DUrl, "wolf3d_url" },
+ { SystemInfo::XWorldUrl, "xworld_url" },
+ { SystemInfo::ReleaseUrl, "release_url" },
+ { SystemInfo::DailyUrl, "daily_url" },
+ { SystemInfo::BuildInfoUrl, "build_info_url" },
+ { SystemInfo::GenlangUrl, "genlang_url" },
+ { SystemInfo::ThemesUrl, "themes_url" },
+ { SystemInfo::ThemesInfoUrl, "themes_info_url" },
+ { SystemInfo::RbutilUrl, "rbutil_url" },
};
const static struct {
@@ -56,18 +55,18 @@ const static struct {
const char* name;
const char* def;
} PlatformInfosList[] = {
- { SystemInfo::CurPlatformName, ":platform:/name", "" },
- { SystemInfo::CurManual, ":platform:/manualname","rockbox-:platform:" },
- { SystemInfo::CurBootloaderMethod, ":platform:/bootloadermethod", "none" },
- { SystemInfo::CurBootloaderName, ":platform:/bootloadername", "" },
- { SystemInfo::CurBootloaderFile, ":platform:/bootloaderfile", "" },
- { SystemInfo::CurBootloaderFilter, ":platform:/bootloaderfilter", "" },
- { SystemInfo::CurEncoder, ":platform:/encoder", "" },
- { SystemInfo::CurBrand, ":platform:/brand", "" },
- { SystemInfo::CurName, ":platform:/name", "" },
- { SystemInfo::CurBuildserverModel, ":platform:/buildserver_modelname", "" },
- { SystemInfo::CurConfigureModel, ":platform:/configure_modelname", "" },
- { SystemInfo::CurPlayerPicture, ":platform:/playerpic", "" },
+ { SystemInfo::PlatformName, ":platform:/name", "" },
+ { SystemInfo::Manual, ":platform:/manualname","rockbox-:platform:" },
+ { SystemInfo::BootloaderMethod, ":platform:/bootloadermethod", "none" },
+ { SystemInfo::BootloaderName, ":platform:/bootloadername", "" },
+ { SystemInfo::BootloaderFile, ":platform:/bootloaderfile", "" },
+ { SystemInfo::BootloaderFilter, ":platform:/bootloaderfilter", "" },
+ { SystemInfo::Encoder, ":platform:/encoder", "" },
+ { SystemInfo::Brand, ":platform:/brand", "" },
+ { SystemInfo::Name, ":platform:/name", "" },
+ { SystemInfo::BuildserverModel, ":platform:/buildserver_modelname", "" },
+ { SystemInfo::ConfigureModel, ":platform:/configure_modelname", "" },
+ { SystemInfo::PlayerPicture, ":platform:/playerpic", "" },
};
//! pointer to setting object to NULL
@@ -93,9 +92,8 @@ QVariant SystemInfo::value(enum SystemInfos info)
while(SystemInfosList[i].info != info)
i++;
QString s = SystemInfosList[i].name;
- QString d = SystemInfosList[i].def;
- LOG_INFO() << "GET:" << s << systemInfos->value(s, d).toString();
- return systemInfos->value(s, d);
+ LOG_INFO() << "GET:" << s << systemInfos->value(s).toString();
+ return systemInfos->value(s);
}
QVariant SystemInfo::platformValue(enum PlatformInfo info, QString platform)
diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h
index b5380f1af5..52b50ec4d7 100644
--- a/rbutil/rbutilqt/base/systeminfo.h
+++ b/rbutil/rbutilqt/base/systeminfo.h
@@ -60,18 +60,18 @@ class SystemInfo : public QObject
};
enum PlatformInfo {
- CurPlatformName,
- CurManual,
- CurBootloaderMethod,
- CurBootloaderName,
- CurBootloaderFile,
- CurBootloaderFilter,
- CurEncoder,
- CurBrand,
- CurName,
- CurBuildserverModel,
- CurConfigureModel,
- CurPlayerPicture,
+ PlatformName,
+ Manual,
+ BootloaderMethod,
+ BootloaderName,
+ BootloaderFile,
+ BootloaderFilter,
+ Encoder,
+ Brand,
+ Name,
+ BuildserverModel,
+ ConfigureModel,
+ PlayerPicture,
};
enum PlatformType {
diff --git a/rbutil/rbutilqt/base/talkgenerator.cpp b/rbutil/rbutilqt/base/talkgenerator.cpp
index ee57686037..951bf0e804 100644
--- a/rbutil/rbutilqt/base/talkgenerator.cpp
+++ b/rbutil/rbutilqt/base/talkgenerator.cpp
@@ -57,7 +57,7 @@ TalkGenerator::Status TalkGenerator::process(QList<TalkEntry>* list,int wavtrimt
// Encoder
emit logItem(tr("Starting Encoder Engine"),LOGINFO);
m_enc = EncoderBase::getEncoder(
- this, SystemInfo::platformValue(SystemInfo::CurEncoder).toString());
+ this, SystemInfo::platformValue(SystemInfo::Encoder).toString());
if(!m_enc->start())
{
emit logItem(tr("Init of Encoder engine failed"),LOGERROR);
diff --git a/rbutil/rbutilqt/base/utils.cpp b/rbutil/rbutilqt/base/utils.cpp
index a3a3e98fcc..60b55068e1 100644
--- a/rbutil/rbutilqt/base/utils.cpp
+++ b/rbutil/rbutilqt/base/utils.cpp
@@ -381,12 +381,12 @@ QString Utils::checkEnvironment(bool permission)
RockboxInfo rbinfo(RbSettings::value(RbSettings::Mountpoint).toString());
QString installed = rbinfo.target();
if(!installed.isEmpty() && installed !=
- SystemInfo::platformValue(SystemInfo::CurConfigureModel).toString())
+ SystemInfo::platformValue(SystemInfo::ConfigureModel).toString())
{
text += tr("<li>Target mismatch detected.<br/>"
"Installed target: %1<br/>Selected target: %2.</li>")
- .arg(SystemInfo::platformValue(SystemInfo::CurPlatformName, installed).toString(),
- SystemInfo::platformValue(SystemInfo::CurPlatformName).toString());
+ .arg(SystemInfo::platformValue(SystemInfo::PlatformName, installed).toString(),
+ SystemInfo::platformValue(SystemInfo::PlatformName).toString());
}
if(!text.isEmpty())