Finaly got rid of the synchronizers, making Quassel quite a bit more lightweight...
[quassel.git] / src / common / util.cpp
index 2fdeead..5cbfc86 100644 (file)
@@ -22,6 +22,8 @@
 #include <QDebug>
 #include <QTextCodec>
 
+class QMetaMethod;
+
 QString nickFromMask(QString mask) {
   return mask.section('!', 0, 0);
 }
@@ -133,3 +135,8 @@ uint editingDistance(const QString &s1, const QString &s2) {
   }
   return matrix[n-1][m-1];
 }
+
+QByteArray methodName(const QMetaMethod &method) {
+  QByteArray sig(method.signature());
+  return sig.left(sig.indexOf("("));
+}