- enhancement: switch capslock won't cancel code completion
- enhancement: double click on item in code completion list will use it to complete
This commit is contained in:
parent
a211992256
commit
33f838ef6a
2
NEWS.md
2
NEWS.md
|
@ -15,6 +15,8 @@ Red Panda C++ Version 1.0.1
|
|||
- fix: the problem & problem set panel can't be correctly , if problem set is enabled
|
||||
- fix: disable code completion doesn't correctly disable project parser
|
||||
- enhancement: slightly reduce memory usage for code parser
|
||||
- enhancement: switch capslock won't cancel code completion
|
||||
- enhancement: double click on item in code completion list will use it to complete
|
||||
|
||||
Red Panda C++ Version 1.0.0
|
||||
- fix: calculation for code snippets's tab stop positions is not correct
|
||||
|
|
|
@ -33,6 +33,7 @@ void CodeCompletionListView::keyPressEvent(QKeyEvent *event)
|
|||
|| event->key() == Qt::Key_PageUp
|
||||
|| event->key() == Qt::Key_Home
|
||||
|| event->key() == Qt::Key_End
|
||||
|| event->key() == Qt::Key_CapsLock
|
||||
) {
|
||||
QListView::keyPressEvent(event);
|
||||
return;
|
||||
|
@ -50,6 +51,13 @@ void CodeCompletionListView::focusInEvent(QFocusEvent *)
|
|||
}
|
||||
}
|
||||
|
||||
void CodeCompletionListView::mouseDoubleClickEvent(QMouseEvent *event)
|
||||
{
|
||||
QKeyEvent keyEvent(QKeyEvent::Type::KeyPress,Qt::Key_Tab,Qt::KeyboardModifier::NoModifier,
|
||||
"\t");
|
||||
keyPressEvent(&keyEvent);
|
||||
}
|
||||
|
||||
const KeyPressedCallback &CodeCompletionListView::keypressedCallback() const
|
||||
{
|
||||
return mKeypressedCallback;
|
||||
|
|
|
@ -44,6 +44,10 @@ private:
|
|||
// QWidget interface
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent *event) override;
|
||||
|
||||
// QWidget interface
|
||||
protected:
|
||||
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue