src/configuration.cc

changeset 851
dbed6938238c
parent 848
68410477c8bb
child 855
e16f1587ef44
equal deleted inserted replaced
850:a3d72b0e916d 851:dbed6938238c
143 { 143 {
144 QString path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION; 144 QString path = qApp->applicationDirPath() + "/" UNIXNAME EXTENSION;
145 return new QSettings (path, QSettings::IniFormat); 145 return new QSettings (path, QSettings::IniFormat);
146 } 146 }
147 147
148 //
149 // Accessor to entry list
150 //
151 QList<AbstractConfigEntry*> const& Config::AllConfigEntries()
152 {
153 return ConfigurationEntries;
154 }
155
156 AbstractConfigEntry* Config::FindByName (QString const& name)
157 {
158 auto it = EntriesByName.find (name);
159 return (it != EntriesByName.end()) ? *it : null;
160 }
161
148 template<typename T> 162 template<typename T>
149 static T* GetConfigByName (QString name, AbstractConfigEntry::Type type) 163 static T* GetConfigByName (QString name, AbstractConfigEntry::Type type)
150 { 164 {
151 auto it = EntriesByName.find (name); 165 auto it = EntriesByName.find (name);
152 166

mercurial