|
| void | qgsFree (void *ptr) |
| | Frees the memory space pointed to by ptr.
|
| void * | qgsMalloc (size_t size) |
| | Allocates size bytes and returns a pointer to the allocated memory.
|
| double | qgsPermissiveToDouble (QString string, bool &ok) |
| | Converts a string to a double in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators.
|
| int | qgsPermissiveToInt (QString string, bool &ok) |
| | Converts a string to an integer in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators.
|
| qlonglong | qgsPermissiveToLongLong (QString string, bool &ok) |
| | Converts a string to an qlonglong in a permissive way, e.g., allowing for incorrect numbers of digits between thousand separators.
|
| int | qgsVariantCompare (const QVariant &lhs, const QVariant &rhs, bool strictTypeCheck) |
| | Compares two QVariant values.
|
| bool | qgsVariantEqual (const QVariant &lhs, const QVariant &rhs) |
| | Compares two QVariant values and returns whether they are equal, two NULL values are always treated as equal and 0 is not treated as equal with NULL.
|
| bool | qgsVariantGreaterThan (const QVariant &lhs, const QVariant &rhs) |
| | Compares two QVariant values and returns whether the first is greater than the second.
|
| bool | qgsVariantLessThan (const QVariant &lhs, const QVariant &rhs) |
| | Compares two QVariant values and returns whether the first is less than the second.
|
| QString | qgsVsiPrefix (const QString &path) |
| | Returns a the vsi prefix which corresponds to a file path, or an empty string if the path is not associated with a vsi prefix.
|
| uint | qHash (const QVariant &variant) |
| | Hash for QVariant.
|
| int qgsVariantCompare |
( |
const QVariant & | lhs, |
|
|
const QVariant & | rhs, |
|
|
bool | strictTypeCheck = false ) |
Compares two QVariant values.
- Returns
- < 0 if lhs < rhs, > 0 if lhs > rhs, or 0 if lhs == rhs
Useful for sorting lists of variants, correctly handling sorting of the various QVariant data types (such as strings, numeric values, dates and times)
Invalid < NULL < Values
Since QGIS 4.0 the strictTypeCheck argument can be used to specify that variants of different types should be compared using their userType ID only, and not attempt to check the actual variant value.
- See also
- qgsVariantLessThan()
-
qgsVariantGreaterThan()
- Since
- QGIS 3.44
Definition at line 131 of file qgis.cpp.