summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-02-14 16:20:28 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-02-15 07:18:55 +0000
commit0b30a6e6aad513500811faa78ce80af6df46c82a (patch)
tree3f673f793f6ff5cfc53c58bbb0efb4210f177e91 /src
parent27432d40f2500b11780398f6c7d67719050dae6c (diff)
QElfParser: Fix plural form in error message
Amends change dcec1420ea9d7e90bbd7f37be15d8e61eaf35d23. Change-Id: I54c7db012d87a55c310141debac19118e7cb284a Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/qelfparser_p.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp
index 2c3a5f1d02..0a219d1251 100644
--- a/src/corelib/plugin/qelfparser_p.cpp
+++ b/src/corelib/plugin/qelfparser_p.cpp
@@ -142,10 +142,12 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library
data += sizeof(qelfhalf_t); // e_shtrndx
if ((quint32)(e_shnum * e_shentsize) > fdlen) {
- if (lib)
- lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)")
- .arg(library, QLibrary::tr("announced %1 section(s), each %2 byte(s), exceed file size")
- .arg(e_shnum).arg(e_shentsize));
+ if (lib) {
+ const QString message =
+ QLibrary::tr("announced %n section(s), each %1 byte(s), exceed file size",
+ nullptr, int(e_shnum)).arg(e_shentsize);
+ lib->errorString = QLibrary::tr("'%1' is an invalid ELF object (%2)").arg(library, message);
+ }
return Corrupt;
}