[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeextragear-2/konversation/konversation
From: Peter Simonsson <psn () linux ! se>
Date: 2005-01-10 15:45:32
Message-ID: 20050110154532.9E64A1C00A () office ! kde ! org
[Download RAW message or body]
CVS commit by psn:
Don't remember half completions as last completion
M +4 -3 channel.cpp 1.279
M +0 -2 channel.h 1.105
M +6 -0 ircinput.cpp 1.60
M +3 -0 ircinput.h 1.18
--- kdeextragear-2/konversation/konversation/channel.cpp #1.278:1.279
@@ -604,8 +604,8 @@ void Channel::completeNick()
// If the cursor is at beginning of line, insert last completion
- if(pos == 0 && !m_lastCompletion.isEmpty())
+ if(pos == 0 && !channelInput->lastCompletion().isEmpty())
{
QString addStart(KonversationApplication::preferences.getNickCompleteSuffixStart());
- newLine = m_lastCompletion + addStart;
+ newLine = channelInput->lastCompletion() + addStart;
// New cursor position is behind nickname
pos = newLine.length();
@@ -685,9 +685,9 @@ void Channel::completeNick()
// remove pattern from line
newLine.remove(pos,pattern.length());
- m_lastCompletion = foundNick;
// did we find the nick in the middle of the line?
if(pos && complete)
{
+ channelInput->setLastCompletion(foundNick);
QString addMiddle(KonversationApplication::preferences.getNickCompleteSuffixMiddle());
newLine.insert(pos,foundNick+addMiddle);
@@ -697,4 +697,5 @@ void Channel::completeNick()
else if(complete)
{
+ channelInput->setLastCompletion(foundNick);
QString addStart(KonversationApplication::preferences.getNickCompleteSuffixStart());
newLine.insert(pos,foundNick+addStart);
--- kdeextragear-2/konversation/konversation/channel.h #1.104:1.105
@@ -286,6 +286,4 @@ class Channel : public ChatWindow
QStringList m_modeList;
ChannelNickPtr m_ownChannelNick;
-
- QString m_lastCompletion;
};
#endif
--- kdeextragear-2/konversation/konversation/ircinput.cpp #1.59:1.60
@@ -485,4 +485,5 @@ void IRCInput::insertCompletion(const QS
else
{
+ setLastCompletion(nick);
QString addStart(KonversationApplication::preferences.getNickCompleteSuffixStart());
line.insert(pos, nick + addStart);
@@ -494,4 +495,9 @@ void IRCInput::insertCompletion(const QS
}
+void IRCInput::setLastCompletion(const QString& completion)
+{
+ m_lastCompletion = completion;
+}
+
// Accessor methods
--- kdeextragear-2/konversation/konversation/ircinput.h #1.17:1.18
@@ -39,4 +39,5 @@ class IRCInput : public KTextEdit
void setOldCursorPosition(int pos);
int getOldCursorPosition();
+ QString lastCompletion() const { return m_lastCompletion; }
virtual QSize sizeHint() const;
@@ -57,4 +58,5 @@ class IRCInput : public KTextEdit
void showCompletionList(const QStringList& nicks);
void setText(const QString& text);
+ void setLastCompletion(const QString& completion);
protected slots:
@@ -73,4 +75,5 @@ class IRCInput : public KTextEdit
char completionMode;
KCompletionBox* completionBox;
+ QString m_lastCompletion;
bool useSelection;
};
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic