KVIrc  4.9.2
DeveloperAPIs
Functions
KviMiscUtils Namespace Reference

A namespace for helper functions. More...

Functions

int compareVersions (const QString &szVersion1, const QString &szVersion2)
 Compares two x.y.z... version strings The function behaves like strcmp: it returns 0 when the versions are equal, -1 if the szVersion1 is greater and 1 if szVersion2 is greater. More...
 
bool isValidVersionString (const QString &szVersion)
 Checks if the argument string is a valid x.y.z... version string. More...
 

Detailed Description

A namespace for helper functions.

This namespace contains single function stuff that doesn't really fit anywhere else

Function Documentation

KVILIB_API int KviMiscUtils::compareVersions ( const QString &  szVersion1,
const QString &  szVersion2 
)

Compares two x.y.z... version strings The function behaves like strcmp: it returns 0 when the versions are equal, -1 if the szVersion1 is greater and 1 if szVersion2 is greater.

Parameters
szVersion1The first version to check
szVersion2The second version to check
Returns
int

Referenced by addon_kvs_cmd_register(), addon_kvs_fnc_exists(), KviStatusBarUpdateIndicator::binaryDataReceived(), AddonFunctions::installAddonPackage(), ThemeFunctions::installThemePackage(), and KviThemeInfo::load().

KVILIB_API bool KviMiscUtils::isValidVersionString ( const QString &  szVersion)

Checks if the argument string is a valid x.y.z... version string.

Parameters
szVersionThe version to check
Returns
bool

References i.

Referenced by addon_kvs_cmd_register().