Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
ConfigVar Class Reference

contains all the information for a single config variable in a .qdocconf file. More...

#include <config.h>

+ Collaboration diagram for ConfigVar:

Classes

struct  ConfigValue
 

Public Member Functions

QString asString (const QString defaultString=QString()) const
 Returns this configuration variable as a string.
 
QStringList asStringList () const
 Returns this config variable as a string list.
 
QSet< QStringasStringSet () const
 Returns this config variable as a string set.
 
bool asBool () const
 Returns this config variable as a boolean.
 
int asInt () const
 Returns this configuration variable as an integer; iterates through the string list, interpreting each string in the list as an integer and adding it to a total sum.
 
const Locationlocation () const
 
 ConfigVar ()=default
 
 ConfigVar (QString name, const QStringList &values, const QString &dir, const Location &loc=Location(), const QList< ExpandVar > &expandVars=QList< ExpandVar >())
 

Friends

class Config
 

Detailed Description

contains all the information for a single config variable in a .qdocconf file.

Definition at line 41 of file config.h.

Constructor & Destructor Documentation

◆ ConfigVar() [1/2]

ConfigVar::ConfigVar ( )
default

◆ ConfigVar() [2/2]

ConfigVar::ConfigVar ( QString name,
const QStringList & values,
const QString & dir,
const Location & loc = Location(),
const QList< ExpandVar > & expandVars = QList<ExpandVar>() )
inline

Definition at line 57 of file config.h.

Member Function Documentation

◆ asBool()

bool ConfigVar::asBool ( ) const
nodiscard

Returns this config variable as a boolean.

Definition at line 264 of file config.cpp.

Referenced by loadIndexFiles(), logStartEndMessage(), and processQdocconfFile().

+ Here is the caller graph for this function:

◆ asInt()

int ConfigVar::asInt ( ) const
nodiscard

Returns this configuration variable as an integer; iterates through the string list, interpreting each string in the list as an integer and adding it to a total sum.

Returns 0 if this variable is defined as empty, and -1 if it's is not defined.

Definition at line 277 of file config.cpp.

◆ asString()

QString ConfigVar::asString ( const QString defaultString = QString()) const
nodiscard

Returns this configuration variable as a string.

If the variable is not defined, returns defaultString.

Note
By default, defaultString is a null string. This allows determining whether a configuration variable is undefined (returns a null string) or defined as empty (returns a non-null, empty string).

Definition at line 227 of file config.cpp.

◆ asStringList()

QStringList ConfigVar::asStringList ( ) const
nodiscard

Returns this config variable as a string list.

Definition at line 244 of file config.cpp.

◆ asStringSet()

QSet< QString > ConfigVar::asStringSet ( ) const
nodiscard

Returns this config variable as a string set.

Definition at line 255 of file config.cpp.

◆ location()

const Location & ConfigVar::location ( ) const
inlinenodiscard

Definition at line 54 of file config.h.

Friends And Related Symbol Documentation

◆ Config

friend class Config
friend

Definition at line 75 of file config.h.


The documentation for this class was generated from the following files: