Reduce usage of qApp in favor of static function calls

Q*Application classes have unusually many static functions. In many
cases in our code, these functions are unnecessarily called as instance
functions, using the qApp helper.

This patch replaces many occurencies of qApp with the according
Q*Application classname.

Change-Id: I6099a419fa7bf969891269c37ed7a9e817ef5124
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Alessandro Portale
2017-04-24 17:01:10 +02:00
parent 07884645af
commit 3624a663d8
57 changed files with 114 additions and 115 deletions

View File

@@ -1692,7 +1692,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
void printUsage()
{
const QByteArray executable = QFileInfo(qApp->arguments().first()).fileName().toLatin1();
const QByteArray executable = QFileInfo(QCoreApplication::arguments().first()).fileName().toLatin1();
std::cout << "Usage: " << executable.constData() << "\n"
<< " " << executable.constData() << " <frontend-dir> <dumpers-file>"
<< "\n\n"