X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Futil.cpp;h=aeccf678fc7381bb03c739a34ee56fc0e1d541cb;hp=25ff475b00ded9d329ac919440098e8c3d047c40;hb=52cba0963e0714f4d58296a20d02164b57f9f4ba;hpb=e008cd12ef319c4b5f9fe5a8cc1524829551771d diff --git a/src/common/util.cpp b/src/common/util.cpp index 25ff475b..aeccf678 100644 --- a/src/common/util.cpp +++ b/src/common/util.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-07 by the Quassel IRC Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -138,3 +138,18 @@ QByteArray methodName(const QMetaMethod &method) { QByteArray sig(method.signature()); return sig.left(sig.indexOf("(")); } + +QDir quasselDir() { + // kinda ugly, but I currently see no other way to do that +#ifdef Q_OS_WIN32 + QString quasselDir = QDir::homePath() + qgetenv("APPDATA") + "/quassel/"; +#else + QString quasselDir = QDir::homePath() + "/.quassel/"; +#endif + + QDir qDir(quasselDir); + if(!qDir.exists(quasselDir)) + qDir.mkpath(quasselDir); + + return qDir; +}