#BR127: user can now set the style of the application in the config menu (behaviour...
[quassel.git] / src / common / util.cpp
index 25ff475..aeccf67 100644 (file)
@@ -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;
+}