forked from qt-creator/qt-creator
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user