diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-02-18 18:51:46 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-20 11:28:04 +0100 |
commit | fec37f0e9a9e4c18fd20f7b39919f08c7cb2139e (patch) | |
tree | 8c80d55b8223cc2dd92fcc1e639cdf0b178269d2 /src/tools/moc/main.cpp | |
parent | cbe21c59a05ceb357c1a6bd2a84480dab0e79ea0 (diff) |
moc: Get rid of implicit conversions to const char *
moc mostly operates on QByteArrays. When an actual const char * is
needed, it should be explicit.
Change-Id: I0b3e262830128306688f4512a4b59ce8966c2579
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/tools/moc/main.cpp')
-rw-r--r-- | src/tools/moc/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 512d0212b7..772df1feec 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE /tmp/abc, xyz/klm -> /tmp/abc */ -static QByteArray combinePath(const char *infile, const char *outfile) +static QByteArray combinePath(const QByteArray &infile, const QByteArray &outfile) { QFileInfo inFileInfo(QDir::current(), QFile::decodeName(infile)); QFileInfo outFileInfo(QDir::current(), QFile::decodeName(outfile)); @@ -379,7 +379,7 @@ int runMoc(int _argc, char **_argv) in = fopen(filename.data(), "rb"); if (!in) { #endif - fprintf(stderr, "moc: %s: No such file\n", (const char*)filename); + fprintf(stderr, "moc: %s: No such file\n", filename.constData()); return 1; } moc.filename = filename; @@ -406,7 +406,7 @@ int runMoc(int _argc, char **_argv) if (!out) #endif { - fprintf(stderr, "moc: Cannot create %s\n", (const char*)output); + fprintf(stderr, "moc: Cannot create %s\n", output.constData()); return 1; } } else { // use stdout |