The QLatin1Constant class holds a Latin 1 string constant More...
#include <QLatin1Constant>
const char * | latin1 () const |
bool | operator!= ( const QLatin1Constant & other ) const |
bool | operator== ( const QLatin1Constant & other ) const |
Q_DECLARE_LATIN1_CONSTANT | |
Q_DEFINE_LATIN1_CONSTANT |
The QLatin1Constant class holds a Latin 1 string constant
Returns the value of this literal as a C style string (null terminated).
Returns false if this QLatin1Constant is the same as other (either same object or same string literal), and true otherwise.
Returns true if this QLatin1Constant is the same as other (either same object or same string literal), and false otherwise.
This macro, along with the related Q_DEFINE_LATIN1_CONSTANT macro, allows you to describe a "Latin 1 string constant".
The resulting constant can be passed to functions accepting a QLatin1String, a QString, or a QVariant.
The first parameter is the name of the variable to declare. The second parameter is the value of the constant, as a string literal.
For example:
// in a header file Q_DECLARE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT");
The declaration should be paired with a matching Q_DEFINE_LATIN1_CONSTANT with the same arguments to actually define the constant.
See also Q_DEFINE_LATIN1_CONSTANT.
This macro, along with the related Q_DECLARE_LATIN1_CONSTANT macro, allows you to describe a "Latin 1 string constant".
The resulting constant can be passed to functions accepting a QLatin1String, a QString, or a QVariant.
The first parameter is the name of the variable to define. The second parameter is the value of the constant, as a string literal.
For example:
// in a header file Q_DECLARE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT"); // in source file Q_DEFINE_LATIN1_CONSTANT(MyConstant, "MYCONSTANT");
You can use this macro without the matching DECLARE macro if you are using the constant only in a single compilation unit.
See also Q_DECLARE_LATIN1_CONSTANT.