diff options
author | David Sansome <david@hoover.localdomain> | 2010-03-24 09:11:10 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-03-24 10:27:09 (GMT) |
commit | 67ff95079522d79e45d64d579856c5c1cd3a69d9 (patch) | |
tree | fd17e9c49825570226bf3746448e4f36bd6f4bb0 | |
parent | 58db7e9e0713dad6da02cefa461101f0ac79cab8 (diff) | |
download | Qt-67ff95079522d79e45d64d579856c5c1cd3a69d9.zip Qt-67ff95079522d79e45d64d579856c5c1cd3a69d9.tar.gz Qt-67ff95079522d79e45d64d579856c5c1cd3a69d9.tar.bz2 |
Add a check to make sure QTranslator doesn't load a directory.
Merge-request: 531
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
-rw-r--r-- | src/corelib/kernel/qtranslator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp index 7d1e1d3..ca54c6c 100644 --- a/src/corelib/kernel/qtranslator.cpp +++ b/src/corelib/kernel/qtranslator.cpp @@ -412,12 +412,12 @@ bool QTranslator::load(const QString & filename, const QString & directory, realname = prefix + fname + (suffix.isNull() ? QString::fromLatin1(".qm") : suffix); fi.setFile(realname); - if (fi.isReadable()) + if (fi.isReadable() && fi.isFile()) break; realname = prefix + fname; fi.setFile(realname); - if (fi.isReadable()) + if (fi.isReadable() && fi.isFile()) break; int rightmost = 0; |