mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
fix iterating QHash
This commit is contained in:
parent
726f22043f
commit
b148994aa9
@ -304,11 +304,13 @@ QString FirstLaunchView::getHeroesInstallDir()
|
|||||||
{ "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\New World Computing\\Heroes of Might and Magic III\\1.0", "AppPath" }, // some localized H3 on x64 system
|
{ "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\New World Computing\\Heroes of Might and Magic III\\1.0", "AppPath" }, // some localized H3 on x64 system
|
||||||
};
|
};
|
||||||
|
|
||||||
for(auto & regKey : regKeys)
|
QHash<QString, QString>::const_iterator i = regKeys.constBegin();
|
||||||
|
while (i != regKeys.constEnd())
|
||||||
{
|
{
|
||||||
QString path = QSettings(regKey, QSettings::NativeFormat).value(regKeys[regKey]).toString();
|
QString path = QSettings(i.key(), QSettings::NativeFormat).value(i.value()).toString();
|
||||||
if(!path.isEmpty())
|
if(!path.isEmpty())
|
||||||
return path;
|
return path;
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return QString{};
|
return QString{};
|
||||||
|
Loading…
Reference in New Issue
Block a user