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
ProString Class Reference

#include <proitems.h>

Inheritance diagram for ProString:
Collaboration diagram for ProString:

Public Member Functions

 ProString ()
 ProString (const ProString &other)
ProString & operator= (const ProString &)=default
template<typename A, typename B>
ProString & operator= (const QStringBuilder< A, B > &str)
 ProString (const QString &str)
PROITEM_EXPLICIT ProString (QStringView str)
PROITEM_EXPLICIT ProString (const char *str)
template<typename A, typename B>
 ProString (const QStringBuilder< A, B > &str)
 ProString (const QString &str, int offset, int length)
void setValue (const QString &str)
void clear ()
ProString & setSource (const ProString &other)
ProString & setSource (int id)
int sourceFile () const
ProString & prepend (const ProString &other)
ProString & append (const ProString &other, bool *pending=nullptr)
ProString & append (const QString &other)
template<typename A, typename B>
ProString & append (const QStringBuilder< A, B > &other)
ProString & append (const QLatin1String other)
ProString & append (const char *other)
ProString & append (QChar other)
ProString & append (const ProStringList &other, bool *pending=nullptr, bool skipEmpty1st=false)
ProString & operator+= (const ProString &other)
ProString & operator+= (const QString &other)
template<typename A, typename B>
ProString & operator+= (const QStringBuilder< A, B > &other)
ProString & operator+= (const QLatin1String other)
ProString & operator+= (const char *other)
ProString & operator+= (QChar other)
void chop (int n)
void chopFront (int n)
bool operator== (const ProString &other) const
bool operator== (const QString &other) const
bool operator== (QStringView other) const
bool operator== (QLatin1String other) const
bool operator== (const char *other) const
bool operator!= (const ProString &other) const
bool operator!= (const QString &other) const
bool operator!= (QLatin1String other) const
bool operator!= (const char *other) const
bool operator< (const ProString &other) const
bool isNull () const
bool isEmpty () const
int length () const
int size () const
QChar at (int i) const
const QChar * constData () const
ProString mid (int off, int len=-1) const
ProString left (int len) const
ProString right (int len) const
ProString trimmed () const
int compare (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int compare (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int compare (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool startsWith (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool startsWith (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool startsWith (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool startsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
template<typename A, typename B>
bool startsWith (const QStringBuilder< A, B > &str)
bool endsWith (const ProString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool endsWith (const QString &sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool endsWith (const char *sub, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
template<typename A, typename B>
bool endsWith (const QStringBuilder< A, B > &str)
bool endsWith (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int indexOf (const QString &s, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int indexOf (const char *s, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int indexOf (QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int lastIndexOf (const QString &s, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int lastIndexOf (const char *s, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
int lastIndexOf (QChar c, int from=-1, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool contains (const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool contains (const char *s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
bool contains (QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
qlonglong toLongLong (bool *ok=nullptr, int base=10) const
int toInt (bool *ok=nullptr, int base=10) const
short toShort (bool *ok=nullptr, int base=10) const
size_t hash () const
ALWAYS_INLINE QStringView toQStringView () const
ALWAYS_INLINE ProKey & toKey ()
ALWAYS_INLINE const ProKey & toKey () const
QString toQString () const
QString & toQString (QString &tmp) const
QByteArray toLatin1 () const

Static Public Member Functions

static size_t hash (const QChar *p, int n)

Friends

class ProKey
size_t qHash (const ProString &str, size_t seed=0)
QString operator+ (const ProString &one, const ProString &two)

Detailed Description

Definition at line 43 of file proitems.h.

Constructor & Destructor Documentation

◆ ProString() [1/7]

ProString::ProString ( )

Definition at line 27 of file proitems.cpp.

References ProString().

Referenced by ProKey::ProKey(), ProString(), addStrList(), QMakeEvaluator::evaluateBuiltinExpand(), QMakeEvaluator::evaluateExpression(), and QMakeEvaluator::first().

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

◆ ProString() [2/7]

ProString::ProString ( const ProString & other)

Definition at line 32 of file proitems.cpp.

References ProString().

Referenced by ProString().

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

◆ ProString() [3/7]

ProString::ProString ( const QString & str)

Definition at line 48 of file proitems.cpp.

References ProString().

Referenced by ProString(), append(), QMakeEvaluator::evaluateFile(), and ProStringRwUser::extract().

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

◆ ProString() [4/7]

ProString::ProString ( QStringView str)

Definition at line 53 of file proitems.cpp.

References ProString().

Referenced by ProString().

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

◆ ProString() [5/7]

ProString::ProString ( const char * str)

Definition at line 64 of file proitems.cpp.

References ProString().

Referenced by ProString(), QMakeEvaluator::evaluateBuiltinExpand(), and QMakeEvaluator::setTemplate().

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

◆ ProString() [6/7]

template<typename A, typename B>
ProString::ProString ( const QStringBuilder< A, B > & str)
inline

Definition at line 55 of file proitems.h.

◆ ProString() [7/7]

ProString::ProString ( const QString & str,
int offset,
int length )

Definition at line 80 of file proitems.cpp.

References ProString().

Referenced by ProString(), and ProFile::getStr().

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

Member Function Documentation

◆ append() [1/7]

ProString & ProString::append ( const char * other)
inline

Definition at line 71 of file proitems.h.

Referenced by operator+=().

Here is the caller graph for this function:

◆ append() [2/7]

ProString & ProString::append ( const ProString & other,
bool * pending = nullptr )

Definition at line 189 of file proitems.cpp.

Referenced by append(), and operator+=().

Here is the caller graph for this function:

◆ append() [3/7]

ProString & ProString::append ( const ProStringList & other,
bool * pending = nullptr,
bool skipEmpty1st = false )

Definition at line 214 of file proitems.cpp.

◆ append() [4/7]

ProString & ProString::append ( const QLatin1String other)

Definition at line 156 of file proitems.cpp.

◆ append() [5/7]

ProString & ProString::append ( const QString & other)
inline

Definition at line 67 of file proitems.h.

References ProString(), and append().

Referenced by append(), operator+=(), and operator+=().

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

◆ append() [6/7]

template<typename A, typename B>
ProString & ProString::append ( const QStringBuilder< A, B > & other)
inline

Definition at line 69 of file proitems.h.

References append().

Here is the call graph for this function:

◆ append() [7/7]

ProString & ProString::append ( QChar other)

Definition at line 173 of file proitems.cpp.

◆ at()

QChar ProString::at ( int i) const
inline

Definition at line 99 of file proitems.h.

◆ chop()

void ProString::chop ( int n)
inline

Definition at line 82 of file proitems.h.

◆ chopFront()

void ProString::chopFront ( int n)
inline

Definition at line 83 of file proitems.h.

◆ clear()

void ProString::clear ( )
inline

Definition at line 60 of file proitems.h.

◆ compare() [1/3]

int ProString::compare ( const char * sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 107 of file proitems.h.

◆ compare() [2/3]

int ProString::compare ( const ProString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 105 of file proitems.h.

◆ compare() [3/3]

int ProString::compare ( const QString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 106 of file proitems.h.

◆ constData()

const QChar * ProString::constData ( ) const
inline

Definition at line 100 of file proitems.h.

◆ contains() [1/3]

bool ProString::contains ( const char * s,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 127 of file proitems.h.

◆ contains() [2/3]

bool ProString::contains ( const QString & s,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 126 of file proitems.h.

◆ contains() [3/3]

bool ProString::contains ( QChar c,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 128 of file proitems.h.

◆ endsWith() [1/5]

bool ProString::endsWith ( const char * sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 116 of file proitems.h.

◆ endsWith() [2/5]

bool ProString::endsWith ( const ProString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 114 of file proitems.h.

◆ endsWith() [3/5]

bool ProString::endsWith ( const QString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 115 of file proitems.h.

◆ endsWith() [4/5]

template<typename A, typename B>
bool ProString::endsWith ( const QStringBuilder< A, B > & str)
inline

Definition at line 118 of file proitems.h.

◆ endsWith() [5/5]

bool ProString::endsWith ( QChar c,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 119 of file proitems.h.

◆ hash() [1/2]

size_t ProString::hash ( ) const
inline

Definition at line 133 of file proitems.h.

◆ hash() [2/2]

QT_BEGIN_NAMESPACE size_t ProString::hash ( const QChar * p,
int n )
static

Definition at line 15 of file proitems.cpp.

◆ indexOf() [1/3]

int ProString::indexOf ( const char * s,
int from = 0,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 121 of file proitems.h.

◆ indexOf() [2/3]

int ProString::indexOf ( const QString & s,
int from = 0,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 120 of file proitems.h.

◆ indexOf() [3/3]

int ProString::indexOf ( QChar c,
int from = 0,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 122 of file proitems.h.

◆ isEmpty()

bool ProString::isEmpty ( ) const
inline

Definition at line 96 of file proitems.h.

Referenced by QMakeEvaluator::evaluateBuiltinExpand(), QMakeEvaluator::loadSpecInternal(), QMakeEvaluator::quoteValue(), and QMakeEvaluator::visitProLoop().

Here is the caller graph for this function:

◆ isNull()

bool ProString::isNull ( ) const
inline

Definition at line 95 of file proitems.h.

◆ lastIndexOf() [1/3]

int ProString::lastIndexOf ( const char * s,
int from = -1,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 124 of file proitems.h.

◆ lastIndexOf() [2/3]

int ProString::lastIndexOf ( const QString & s,
int from = -1,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 123 of file proitems.h.

◆ lastIndexOf() [3/3]

int ProString::lastIndexOf ( QChar c,
int from = -1,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 125 of file proitems.h.

◆ left()

ProString ProString::left ( int len) const
inline

Definition at line 102 of file proitems.h.

References mid().

Referenced by QMakeEvaluator::getMemberArgs().

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

◆ length()

int ProString::length ( ) const
inline

Definition at line 97 of file proitems.h.

Referenced by QConcatenable< ProString >::size().

Here is the caller graph for this function:

◆ mid()

ProString ProString::mid ( int off,
int len = -1 ) const

Definition at line 268 of file proitems.cpp.

Referenced by QMakeEvaluator::getMemberArgs(), left(), and right().

Here is the caller graph for this function:

◆ operator!=() [1/4]

bool ProString::operator!= ( const char * other) const
inline

Definition at line 93 of file proitems.h.

References operator==().

Here is the call graph for this function:

◆ operator!=() [2/4]

bool ProString::operator!= ( const ProString & other) const
inline

Definition at line 90 of file proitems.h.

References operator==().

Here is the call graph for this function:

◆ operator!=() [3/4]

bool ProString::operator!= ( const QString & other) const
inline

Definition at line 91 of file proitems.h.

References operator==().

Here is the call graph for this function:

◆ operator!=() [4/4]

bool ProString::operator!= ( QLatin1String other) const
inline

Definition at line 92 of file proitems.h.

◆ operator+=() [1/6]

ProString & ProString::operator+= ( const char * other)
inline

Definition at line 79 of file proitems.h.

References append().

Here is the call graph for this function:

◆ operator+=() [2/6]

ProString & ProString::operator+= ( const ProString & other)
inline

Definition at line 74 of file proitems.h.

References append().

Here is the call graph for this function:

◆ operator+=() [3/6]

ProString & ProString::operator+= ( const QLatin1String other)
inline

Definition at line 78 of file proitems.h.

◆ operator+=() [4/6]

ProString & ProString::operator+= ( const QString & other)
inline

Definition at line 75 of file proitems.h.

References append().

Here is the call graph for this function:

◆ operator+=() [5/6]

template<typename A, typename B>
ProString & ProString::operator+= ( const QStringBuilder< A, B > & other)
inline

Definition at line 77 of file proitems.h.

References append().

Here is the call graph for this function:

◆ operator+=() [6/6]

ProString & ProString::operator+= ( QChar other)
inline

Definition at line 80 of file proitems.h.

◆ operator<()

bool ProString::operator< ( const ProString & other) const
inline

Definition at line 94 of file proitems.h.

◆ operator=() [1/2]

ProString & ProString::operator= ( const ProString & )
default

Referenced by prepend().

Here is the caller graph for this function:

◆ operator=() [2/2]

template<typename A, typename B>
ProString & ProString::operator= ( const QStringBuilder< A, B > & str)
inline

Definition at line 49 of file proitems.h.

◆ operator==() [1/5]

bool ProString::operator== ( const char * other) const
inline

Definition at line 89 of file proitems.h.

Referenced by operator!=().

Here is the caller graph for this function:

◆ operator==() [2/5]

bool ProString::operator== ( const ProString & other) const
inline

Definition at line 85 of file proitems.h.

Referenced by operator!=().

Here is the caller graph for this function:

◆ operator==() [3/5]

bool ProString::operator== ( const QString & other) const
inline

Definition at line 86 of file proitems.h.

Referenced by QMakeEvaluator::evaluateBuiltinConditional(), and operator!=().

Here is the caller graph for this function:

◆ operator==() [4/5]

bool ProString::operator== ( QLatin1String other) const
inline

Definition at line 88 of file proitems.h.

◆ operator==() [5/5]

bool ProString::operator== ( QStringView other) const
inline

Definition at line 87 of file proitems.h.

◆ prepend()

ProString & ProString::prepend ( const ProString & other)

Definition at line 139 of file proitems.cpp.

References operator=().

Here is the call graph for this function:

◆ right()

ProString ProString::right ( int len) const
inline

Definition at line 103 of file proitems.h.

References mid(), and size().

Here is the call graph for this function:

◆ setSource() [1/2]

ProString & ProString::setSource ( const ProString & other)
inline

Definition at line 61 of file proitems.h.

Referenced by ProStringRwUser::extract().

Here is the caller graph for this function:

◆ setSource() [2/2]

ProString & ProString::setSource ( int id)
inline

Definition at line 62 of file proitems.h.

Referenced by QMakeEvaluator::evaluateBuiltinExpand(), ProFile::getStr(), and QMakeEvaluator::split_value_list().

Here is the caller graph for this function:

◆ setValue()

void ProString::setValue ( const QString & str)

Definition at line 85 of file proitems.cpp.

◆ size()

int ProString::size ( ) const
inline

Definition at line 98 of file proitems.h.

Referenced by QConcatenable< ProString >::appendTo(), QMakeEvaluator::evaluateBuiltinExpand(), isFunctParam(), ProStringList_join(), QMakeEvaluator::quoteValue(), and right().

Here is the caller graph for this function:

◆ sourceFile()

int ProString::sourceFile ( ) const
inline

Definition at line 63 of file proitems.h.

◆ startsWith() [1/5]

bool ProString::startsWith ( const char * sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 110 of file proitems.h.

◆ startsWith() [2/5]

bool ProString::startsWith ( const ProString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 108 of file proitems.h.

◆ startsWith() [3/5]

bool ProString::startsWith ( const QString & sub,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 109 of file proitems.h.

◆ startsWith() [4/5]

template<typename A, typename B>
bool ProString::startsWith ( const QStringBuilder< A, B > & str)
inline

Definition at line 113 of file proitems.h.

◆ startsWith() [5/5]

bool ProString::startsWith ( QChar c,
Qt::CaseSensitivity cs = Qt::CaseSensitive ) const
inline

Definition at line 111 of file proitems.h.

◆ toInt()

int ProString::toInt ( bool * ok = nullptr,
int base = 10 ) const
inline

Definition at line 130 of file proitems.h.

Referenced by QMakeEvaluator::evaluateBuiltinConditional(), QMakeEvaluator::getMemberArgs(), and isTrue().

Here is the caller graph for this function:

◆ toKey() [1/2]

ALWAYS_INLINE ProKey & ProString::toKey ( )
inline

Definition at line 138 of file proitems.h.

Referenced by QMakeEvaluator::visitProLoop().

Here is the caller graph for this function:

◆ toKey() [2/2]

ALWAYS_INLINE const ProKey & ProString::toKey ( ) const
inline

Definition at line 139 of file proitems.h.

Referenced by QMakeEvaluator::map().

Here is the caller graph for this function:

◆ toLatin1()

QByteArray ProString::toLatin1 ( ) const
inline

Definition at line 144 of file proitems.h.

◆ toLongLong()

qlonglong ProString::toLongLong ( bool * ok = nullptr,
int base = 10 ) const
inline

Definition at line 129 of file proitems.h.

◆ toQString() [1/2]

QString ProString::toQString ( ) const

Definition at line 128 of file proitems.cpp.

Referenced by QMakeEvaluator::loadSpec(), operator+, operator<<(), ProFileEvaluator::propertyValue(), and QMakeEvaluator::updateFeaturePaths().

Here is the caller graph for this function:

◆ toQString() [2/2]

QString & ProString::toQString ( QString & tmp) const

Definition at line 133 of file proitems.cpp.

Referenced by ProStringRoUser::ProStringRoUser(), and ProStringRoUser::set().

Here is the caller graph for this function:

◆ toQStringView()

ALWAYS_INLINE QStringView ProString::toQStringView ( ) const
inline

Definition at line 136 of file proitems.h.

◆ toShort()

short ProString::toShort ( bool * ok = nullptr,
int base = 10 ) const
inline

Definition at line 131 of file proitems.h.

◆ trimmed()

ProString ProString::trimmed ( ) const

Definition at line 280 of file proitems.cpp.

◆ operator+

QString operator+ ( const ProString & one,
const ProString & two )
friend

Definition at line 251 of file proitems.cpp.

References toQString().

◆ ProKey

friend class ProKey
friend

Definition at line 166 of file proitems.h.

◆ qHash

size_t qHash ( const ProString & str,
size_t seed = 0 )
friend

Definition at line 95 of file proitems.cpp.


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