projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow the TabCompleter to complete channel names as well.
[quassel.git]
/
src
/
uisupport
/
tabcompleter.h
diff --git
a/src/uisupport/tabcompleter.h
b/src/uisupport/tabcompleter.h
index
d249943
..
bb5c0b3
100644
(file)
--- a/
src/uisupport/tabcompleter.h
+++ b/
src/uisupport/tabcompleter.h
@@
-43,10
+43,16
@@
public:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
+ enum Type {
+ UserTab = 0x01,
+ ChannelTab = 0x02
+ };
+
struct CompletionKey {
struct CompletionKey {
- inline CompletionKey(const QString &n
) { nick = n
; }
+ inline CompletionKey(const QString &n
, const Type t) { contents = n; type = t
; }
bool operator<(const CompletionKey &other) const;
bool operator<(const CompletionKey &other) const;
- QString nick;
+ Type type;
+ QString contents;
};
QPointer<MultiLineEdit> _lineEdit;
};
QPointer<MultiLineEdit> _lineEdit;
@@
-55,10
+61,12
@@
private:
static const Network *_currentNetwork;
static BufferId _currentBufferId;
static const Network *_currentNetwork;
static BufferId _currentBufferId;
+ static QString _currentBufferName;
QMap<CompletionKey, QString> _completionMap;
// QStringList completionTemplates;
QMap<CompletionKey, QString> _completionMap;
// QStringList completionTemplates;
+ Type _completionType;
QMap<CompletionKey, QString>::Iterator _nextCompletion;
int _lastCompletionLength;
QMap<CompletionKey, QString>::Iterator _nextCompletion;
int _lastCompletionLength;