Properly initialize _messageFilter in all cases, fixes #482
[quassel.git] / src / uisupport / networkmodelactionprovider.h
index 7f01d2f..10cdebc 100644 (file)
@@ -1,5 +1,5 @@
 /***************************************************************************
- *   Copyright (C) 2005-08 by the Quassel Project                          *
+ *   Copyright (C) 2005-09 by the Quassel Project                          *
  *   devel@quassel-irc.org                                                 *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
@@ -55,6 +55,7 @@ public:
     HideNick = 0x0400,
     HideMode = 0x0500,
     HideDayChange = 0x0600,
+    HideUseDefaults = 0xe00,
     HideApplyToAll = 0xf00,
 
     // General actions
@@ -137,6 +138,8 @@ private:
   void handleGeneralAction(ActionType, QAction *);
   void handleExternalAction(ActionType, QAction *);
 
+  void addActions(QMenu *, const QList<QModelIndex> &indexList, MessageFilter *filter, QObject *receiver, const char *slot, bool allowBufferHide);
+
   bool checkRequirements(const QModelIndex &index, ItemActiveStates requiredActiveState = QFlags<ItemActiveState>(ActiveState | InactiveState));
   Action * addAction(ActionType, QMenu *, bool condition = true);
   Action * addAction(Action * , QMenu *, bool condition = true);
@@ -145,7 +148,7 @@ private:
 
   void addHideEventsMenu(QMenu *, BufferId bufferId);
   void addHideEventsMenu(QMenu *, MessageFilter *msgFilter);
-  void addHideEventsMenu(QMenu *, int filter);
+  void addHideEventsMenu(QMenu *, int filter = -1);
 
   void addNetworkItemActions(QMenu *, const QModelIndex &);
   void addBufferItemActions(QMenu *, const QModelIndex &, bool isCustomBufferView = false);
@@ -154,6 +157,7 @@ private:
   QString nickName(const QModelIndex &index) const;
   BufferId findQueryBuffer(const QModelIndex &index, const QString &predefinedNick = QString()) const;
   BufferId findQueryBuffer(NetworkId, const QString &nickName) const;
+  void removeBuffers(const QModelIndexList &indexList);
 
   NetworkModel *_model;