StelSkyCultureMgr.cpp   StelSkyCultureMgr.cpp 
skipping to change at line 37 skipping to change at line 37
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QVariant> #include <QVariant>
#include <QDebug> #include <QDebug>
#include <QMap> #include <QMap>
#include <QMapIterator> #include <QMapIterator>
#include <QDir> #include <QDir>
StelSkyCultureMgr::StelSkyCultureMgr() StelSkyCultureMgr::StelSkyCultureMgr()
{ {
QSet<QString> cultureDirNames; QSet<QString> cultureDirNames = StelFileMgr::listContents("skycultur
es",StelFileMgr::Directory);
try
{
cultureDirNames = StelFileMgr::listContents("skycultures",St
elFileMgr::Directory);
}
catch (std::runtime_error& e)
{
qWarning() << "ERROR while trying list sky cultures:" << e.w
hat();
}
foreach (const QString& dir, cultureDirNames) foreach (const QString& dir, cultureDirNames)
{ {
try QString pdFile = StelFileMgr::findFile("skycultures/" + dir
{ + "/info.ini");
QSettings pd(StelFileMgr::findFile("skycultures/" + if (pdFile.isEmpty())
dir + "/info.ini"), StelIniFormat);
dirToNameEnglish[dir].englishName = pd.value("info/n
ame").toString();
dirToNameEnglish[dir].author = pd.value("info/author
").toString();
}
catch (std::runtime_error& e)
{ {
qWarning() << "WARNING: unable to successfully read info.ini file from skyculture dir" << QDir::toNativeSeparators(dir); qWarning() << "WARNING: unable to successfully read info.ini file from skyculture dir" << QDir::toNativeSeparators(dir);
return;
} }
QSettings pd(pdFile, StelIniFormat);
dirToNameEnglish[dir].englishName = pd.value("info/name").to
String();
dirToNameEnglish[dir].author = pd.value("info/author").toStr
ing();
} }
} }
StelSkyCultureMgr::~StelSkyCultureMgr() StelSkyCultureMgr::~StelSkyCultureMgr()
{ {
} }
//! Init itself from a config file. //! Init itself from a config file.
void StelSkyCultureMgr::init() void StelSkyCultureMgr::init()
{ {
 End of changes. 4 change blocks. 
22 lines changed or deleted 11 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/