X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Futil.h;h=36ef8139694005a1574dd2a933146d9c22463866;hp=528f60d905280d6118c8a57325e185660c92562c;hb=e561e02a8d2f1f009559d17c7b1c66cb6f4e2a5a;hpb=fd7c2c4a41b5bb9cffcfe7a8f86a28ab7f38ac27 diff --git a/src/common/util.h b/src/common/util.h index 528f60d9..36ef8139 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -18,10 +18,11 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _UTIL_H_ -#define _UTIL_H_ +#ifndef UTIL_H +#define UTIL_H -#include +#include +#include #include #include #include @@ -34,21 +35,23 @@ QString hostFromMask(QString mask); bool isChannelName(QString str); +QString secondsToString(int timeInSeconds); + //! 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. * \param input The input string containing encoded data - * \param encoding The text codec we use if the input is not utf8 + * \param codec The text codec we use if the input is not utf8 * \return The decoded string. */ QString decodeString(const QByteArray &input, QTextCodec *codec = 0); -// NOTE: We have static copies of these in SignalProxy... -//void writeDataToDevice(QIODevice *, const QVariant &); -//bool readDataFromDevice(QIODevice *, quint32 &, QVariant &); - uint editingDistance(const QString &s1, const QString &s2); QByteArray methodName(const QMetaMethod &method); +QDir quasselDir(); + +void loadTranslation(const QLocale &locale); + #endif