From 5eec43a44fd7b15c975464b606ae4a894b8c9e0e Mon Sep 17 00:00:00 2001 From: Swen Kooij Date: Sat, 16 Jan 2016 23:21:42 +0200 Subject: qdbuscpp2xml: Fixed wrong filename being reported in messages This caused the filename in messages to be one of the other arguments that were specified instead of the actual filename. Caused by the fact that mutations are possibly made to `args` in `parseCmdLine` and thus the amount of items in `args` does not always match the amount of items in `argv`. Change-Id: Ief3716dde39dfdc949a5192e7f83d93cf90130f0 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp') diff --git a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp index 2825e0b7a3..59791d1524 100644 --- a/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp +++ b/src/tools/qdbuscpp2xml/qdbuscpp2xml.cpp @@ -420,7 +420,7 @@ int main(int argc, char **argv) pp.macros["Q_MOC_RUN"]; pp.macros["__cplusplus"]; - const QByteArray filename = QFile::decodeName(argv[i]).toLatin1(); + const QByteArray filename = arg.toLocal8Bit(); moc.filename = filename; moc.currentFilenames.push(filename); -- cgit v1.2.3