-
- public slots:
- void updateNickList(QStringList);
- void updateChannelList(QStringList);
-
- private:
- bool enabled;
- QString startOfLineSuffix;
- QLineEdit *lineEdit;
- QStringList completionTemplates;
- QStringList channelList;
-
- QStringList nickList;
- QStringList completionList;
- QStringList::Iterator nextCompletion;
- int lastCompletionLength;
-
+
+ bool eventFilter(QObject* obj, QEvent* event) override;
+
+public slots:
+ void onTabCompletionKey();
+
+private:
+ struct CompletionKey
+ {
+ inline CompletionKey(const QString& n) { contents = n; }
+ bool operator<(const CompletionKey& other) const;
+ QString contents;
+ };
+
+ QPointer<MultiLineEdit> _lineEdit;
+ bool _enabled;
+ QString _nickSuffix;
+
+ static const Network* _currentNetwork;
+ static BufferId _currentBufferId;
+ static QString _currentBufferName;
+ static Type _completionType;
+
+ QMap<CompletionKey, QString> _completionMap;
+ // QStringList completionTemplates;
+
+ QMap<CompletionKey, QString>::Iterator _nextCompletion;
+ int _lastCompletionLength;
+