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
qcommandlineparser.cpp File Reference

(52a5a89ea482b986560f7c50737a8634ebbcf152)

#include "qcommandlineparser.h"
#include <qcoreapplication.h>
#include <private/qcoreapplication_p.h>
#include <qhash.h>
#include <qvarlengtharray.h>
#include <qlist.h>
#include <qdebug.h>
#include <stdio.h>
#include <stdlib.h>
+ Include dependency graph for qcommandlineparser.cpp:

Go to the source code of this file.

Classes

class  QCommandLineParserPrivate
 
struct  QCommandLineParserPrivate::PositionalArgumentDefinition
 Documentation for positional arguments. More...
 

Typedefs

typedef QHash< QString, qsizetypeNameHash_t
 

Enumerations

enum  MessageType { UsageMessage , ErrorMessage }
 

Functions

void Q_CORE_EXPORT qt_call_post_routines ()
 
 Q_DECLARE_TYPEINFO (QCommandLineParserPrivate::PositionalArgumentDefinition, Q_RELOCATABLE_TYPE)
 
static void showParserMessage (const QString &message, MessageType type)
 
static QString wrapText (const QString &names, int optionNameMaxWidth, const QString &description)
 

Typedef Documentation

◆ NameHash_t

Definition at line 25 of file qcommandlineparser.cpp.

Enumeration Type Documentation

◆ MessageType

Enumerator
UsageMessage 
ErrorMessage 

Definition at line 517 of file qcommandlineparser.cpp.

Function Documentation

◆ Q_DECLARE_TYPEINFO()

◆ qt_call_post_routines()

void Q_CORE_EXPORT qt_call_post_routines ( )
extern

Definition at line 320 of file qcoreapplication.cpp.

Referenced by QCommandLineParserPrivate::showHelp().

+ Here is the caller graph for this function:

◆ showParserMessage()

static void showParserMessage ( const QString & message,
MessageType type )
static

Definition at line 534 of file qcommandlineparser.cpp.

References QCoreApplication::applicationName, QCoreApplication::instance(), QString::isEmpty(), qPrintable, title, UsageMessage, and QString::utf16().

Referenced by QCommandLineParser::process(), QCommandLineParserPrivate::showHelp(), and QCommandLineParser::showVersion().

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

◆ wrapText()

static QString wrapText ( const QString & names,
int optionNameMaxWidth,
const QString & description )
static

Definition at line 1040 of file qcommandlineparser.cpp.

References QString::at(), i, QString::leftJustified(), QString::mid(), QString::size(), and text.

Referenced by QItemDelegate::drawDisplay(), QCommandLineParserPrivate::helpText(), and QItemDelegatePrivate::textLayoutBounds().

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