Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp File Reference

(785a5e6eb4745dc3219cc33dc5ea2e671a40b5f3)

#include <depfile_shared.h>
#include "preprocessor.h"
#include "moc.h"
#include "outputrevision.h"
#include "collectjson.h"
#include <qfile.h>
#include <qfileinfo.h>
#include <qdir.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <qcoreapplication.h>
#include <qcommandlineoption.h>
#include <qcommandlineparser.h>
#include <memory>
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Typedefs

using File = decltype(openFileForWriting({}))
 

Functions

static QByteArray combinePath (const QString &infile, const QString &outfile)
 
void error (const char *msg="Invalid argument")
 
static auto openFileForWriting (const QString &name)
 
static bool hasNext (const Symbols &symbols, int i)
 
static const Symbolnext (const Symbols &symbols, int &i)
 
QByteArray composePreprocessorOutput (const Symbols &symbols)
 
static QStringList argumentsFromCommandLineAndFile (const QStringList &arguments, bool &hasOptionFiles)
 
int runMoc (int argc, char **argv)
 
QT_END_NAMESPACE int main (int _argc, char **_argv)
 [0]
 

Typedef Documentation

◆ File

using File = decltype(openFileForWriting({}))

Definition at line 76 of file main.cpp.

Function Documentation

◆ argumentsFromCommandLineAndFile()

static QStringList argumentsFromCommandLineAndFile ( const QStringList & arguments,
bool & hasOptionFiles )
static

Definition at line 138 of file main.cpp.

References argument, arguments, error, QString::fromLocal8Bit(), QString::isEmpty(), line, QIODeviceBase::ReadOnly, QList< T >::size(), and QIODeviceBase::Text.

Referenced by runMoc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ combinePath()

static QByteArray combinePath ( const QString & infile,
const QString & outfile )
static

Definition at line 40 of file main.cpp.

References QDir::current(), QFile::encodeName(), and QByteArray::length().

Referenced by runMoc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ composePreprocessorOutput()

QByteArray composePreprocessorOutput ( const Symbols & symbols)

Definition at line 85 of file main.cpp.

References hasNext(), i, Symbol::lexem(), Symbol::lineNum, QByteArray::mid(), next, output, PP_NEWLINE, PP_NOTOKEN, PP_STRING_LITERAL, PP_WHITESPACE, and Symbol::token.

Referenced by runMoc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error()

void error ( const char * msg = "Invalid argument")

Definition at line 56 of file main.cpp.

◆ hasNext()

static bool hasNext ( const Symbols & symbols,
int i )
inlinestatic

Definition at line 78 of file main.cpp.

References i, and QList< T >::size().

Referenced by composePreprocessorOutput(), and QPdfLinkModelPrivate::update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

QT_END_NAMESPACE int main ( int _argc,
char ** _argv )

[0]

[0]

[0]

[6]

[0]

[0]

[1]

[1]

[2]

[2]

[3]

[3]

[0]

[0]

[1]

[1]

[0]

[0]

[0]

[0]

Definition at line 650 of file main.cpp.

References runMoc().

+ Here is the call graph for this function:

◆ next()

static const Symbol & next ( const Symbols & symbols,
int & i )
inlinestatic

Definition at line 81 of file main.cpp.

References QList< T >::at(), and i.

+ Here is the call graph for this function:

◆ openFileForWriting()

static auto openFileForWriting ( const QString & name)
static

Definition at line 62 of file main.cpp.

References QFile::encodeName(), file, and R.

Referenced by runMoc().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ runMoc()

int runMoc ( int argc,
char ** argv )

Definition at line 170 of file main.cpp.

References QCommandLineParser::addHelpOption(), QCommandLineParser::addOption(), QCommandLineParser::addPositionalArgument(), QCommandLineParser::addVersionOption(), app, arg, QCoreApplication::arguments(), arguments, argumentsFromCommandLineAndFile(), QString::at(), collectJson(), combinePath(), composePreprocessorOutput(), QByteArray::constData(), QFile::decodeName(), QFile::encodeName(), error, escapeAndEncodeDependencyPath(), escapeDependencyPath(), files, QString::fromLatin1(), includeList, QByteArray::isEmpty(), QString::isEmpty(), QList< T >::isEmpty(), Macro::isFunction, QCommandLineParser::isSet(), QString::lastIndexOf(), QString::left(), QDir::listSeparator(), QString::mid(), moc(), mocOutputRevision, openFileForWriting(), out, output, QCommandLineParser::ParseAsLongOptions, QCommandLineParser::positionalArguments(), PP_IDENTIFIER, QCommandLineParser::process(), Q_UNLIKELY, QByteArrayLiteral, qgetenv(), qPrintable, QStringLiteral, QIODeviceBase::ReadOnly, QDir::separator(), QCommandLineParser::setApplicationDescription(), QCoreApplication::setApplicationVersion(), QCommandLineParser::setSingleDashWordOptionMode(), QCommandLineOption::ShortOptionStyle, QCommandLineParser::showHelp(), QString::size(), split(), Macro::symbols, Preprocessor::tokenize(), Preprocessor::TokenizeDefine, QString::toLocal8Bit(), QCommandLineParser::value(), and QCommandLineParser::values().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: