From e015effb475af12d4c6627b9c3d1f9be215f6b2b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 6 Dec 2013 12:03:12 -0800 Subject: Don't change working directory when looking for tranlations And only replace 'bin' if there is a bin in the path... Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index e57ececd4..2585c578f 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -1766,6 +1766,7 @@ LanguageModel::LanguageModel(QObject* parent): QAbstractListModel(parent) { QSettings s; QDir d; + QString cwd = d.currentPath(); d.setCurrent( getSubsurfaceDataPath("translations") ); QStringList result = d.entryList(); Q_FOREACH(const QString& s, result){ @@ -1774,6 +1775,7 @@ LanguageModel::LanguageModel(QObject* parent): QAbstractListModel(parent) } languages.push_back( (s == "subsurface_source.qm") ? "English" : s); } + d.setCurrent(cwd); } QVariant LanguageModel::data(const QModelIndex& index, int role) const -- cgit v1.2.3-70-g09d2