--- a/src/configuration.cc Mon Jun 02 14:34:23 2014 +0300 +++ b/src/configuration.cc Tue Jun 03 20:28:10 2014 +0300 @@ -42,7 +42,7 @@ ConfigEntry* g_configPointers[MAX_CONFIG]; static int g_cfgPointerCursor = 0; -static QMap<String, ConfigEntry*> g_configsByName; +static QMap<QString, ConfigEntry*> g_configsByName; static QList<ConfigEntry*> g_configs; // @@ -50,11 +50,11 @@ // static QSettings* getSettingsObject() { - String path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION; + QString path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION; return new QSettings (path, QSettings::IniFormat); } -ConfigEntry::ConfigEntry (String name) : +ConfigEntry::ConfigEntry (QString name) : m_name (name) {} // @@ -113,7 +113,7 @@ // // Where is the configuration file located at? // -String Config::filepath (String file) +QString Config::filepath (QString file) { return Config::dirpath() + DIRSLASH + file; } @@ -121,7 +121,7 @@ // // Directory of the configuration file. // -String Config::dirpath() +QString Config::dirpath() { QSettings* cfg = getSettingsObject(); return dirname (cfg->fileName()); @@ -142,7 +142,7 @@ } template<typename T> -T* getConfigByName (String name, ConfigEntry::Type type) +T* getConfigByName (QString name, ConfigEntry::Type type) { auto it = g_configsByName.find (name); @@ -163,7 +163,7 @@ #undef IMPLEMENT_CONFIG #define IMPLEMENT_CONFIG(NAME) \ - NAME##ConfigEntry* NAME##ConfigEntry::getByName (String name) \ + NAME##ConfigEntry* NAME##ConfigEntry::getByName (QString name) \ { \ return getConfigByName<NAME##ConfigEntry> (name, E##NAME##Type); \ }