Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
util.h File Reference
#include <QDir>
#include <QVariant>
#include <QString>
#include <QMetaMethod>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

QString nickFromMask (QString mask)
QString userFromMask (QString mask)
QString hostFromMask (QString mask)
bool isChannelName (QString str)
QString stripFormatCodes (QString)
 Strip mIRC format codes.
QString stripAcceleratorMarkers (const QString &)
 Remove accelerator markers (&) from the string.
QString secondsToString (int timeInSeconds)
QString decodeString (const QByteArray &input, QTextCodec *codec=0)
 Take a string and decode it using the specified text codec, recognizing utf8.
uint editingDistance (const QString &s1, const QString &s2)
template<typename T >
QVariantList toVariantList (const QList< T > &list)
template<typename T >
QList< T > fromVariantList (const QVariantList &variants)
QByteArray prettyDigest (const QByteArray &digest)

Function Documentation

QString userFromMask ( QString  mask)
QString hostFromMask ( QString  mask)
QString stripFormatCodes ( QString  )

Strip mIRC format codes.

Definition at line 64 of file util.cpp.

Referenced by ChannelBufferItem::toolTip().

QString stripAcceleratorMarkers ( const QString &  )

Remove accelerator markers (&) from the string.

Definition at line 77 of file util.cpp.

Referenced by ShortcutsModel::data().

QString secondsToString ( int  timeInSeconds)
QString decodeString ( const QByteArray &  input,
QTextCodec *  codec = 0 
)

Take a string and decode it using the specified text codec, recognizing utf8.

This function takes a string and first checks if it is encoded in utf8, in which case it is decoded appropriately. Otherwise, the specified text codec is used to transform the string.

Parameters
inputThe input string containing encoded data
codecThe text codec we use if the input is not utf8
Returns
The decoded string.

Definition at line 95 of file util.cpp.

References utf8DetectionBlacklist.

uint editingDistance ( const QString &  s1,
const QString &  s2 
)

Definition at line 130 of file util.cpp.

QVariantList toVariantList ( const QList< T > &  list)

Definition at line 55 of file util.h.

Referenced by Network::initServerList(), operator<<(), and Network::setNetworkInfo().

QList<T> fromVariantList ( const QVariantList &  variants)

Definition at line 66 of file util.h.

QByteArray prettyDigest ( const QByteArray &  digest)

Definition at line 187 of file util.cpp.

References prettyDigest().

Referenced by prettyDigest(), and SslInfoDlg::setCurrentCert().