This Qt bug was fixed in 4.7

This commit is contained in:
David Sansome 2010-03-25 12:57:11 +00:00
parent a1baa06dbf
commit c1e2cbe800
1 changed files with 3 additions and 0 deletions

View File

@ -46,11 +46,14 @@
#endif
void LoadTranslation(const QString& prefix, const QString& path) {
#if QT_VERSION < 0x040700
// QTranslator::load will try to open and read "clementine" if it exists,
// without checking if it's a file first.
// This was fixed in Qt 4.7
QFileInfo maybe_clementine_directory(path + "/clementine");
if (maybe_clementine_directory.exists() && !maybe_clementine_directory.isFile())
return;
#endif
QTranslator* t = new QTranslator;
if (t->load(prefix + "_" + QLocale::system().name(), path))