Refactor device tree setup a bit.

- reorder value retrieval (display names etc) to cut down the number of
  necessary accesses. While this is not critical it cuts down the noise
  generated in the trace noticably.
- match the old target by its internal name instead of the display name.
- remove two access functions in SystemInfo that are not really needed anymore.
  Accessing the values via platformValue() is much more logical and in line with
  the rest of the value accesses.
- try to scroll to the selected item in the device list after setup and
  detection.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24988 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Riebeling 2010-03-01 22:45:17 +00:00
parent f67e3559c6
commit 8c8703038b
3 changed files with 20 additions and 36 deletions

View file

@ -156,18 +156,6 @@ QStringList SystemInfo::languages()
}
QString SystemInfo::name(QString platform)
{
ensureSystemInfoExists();
return systemInfos->value(platform + "/name").toString();
}
QString SystemInfo::brand(QString platform)
{
ensureSystemInfoExists();
return systemInfos->value(platform + "/brand").toString();
}
QMap<int, QString> SystemInfo::usbIdMap(enum MapType type)
{
ensureSystemInfoExists();

View file

@ -77,10 +77,6 @@ class SystemInfo : public QObject
QString variant="");
//! returns a list of all languages
static QStringList languages(void);
//! maps a platform to its name
static QString name(QString platform);
//! maps a platform to its brand
static QString brand(QString platform);
//! returns a map of usb-ids and their targets
static QMap<int, QString> usbIdMap(enum MapType);
//! get a value from system settings