|
@@ -31,6 +31,17 @@
|
|
|
#include <QFocusEvent>
|
|
|
#include <QKeyEvent>
|
|
|
|
|
|
+bool ErrorList::event(QEvent *e)
|
|
|
+{
|
|
|
+ if (e->type()==QEvent::AccelOverride) {
|
|
|
+ QKeyEvent *ke=static_cast<QKeyEvent*>(e);
|
|
|
+ if ((ke->key()==Qt::Key_Insert || ke->key()==Qt::Key_C)
|
|
|
+ && ke->state()==Qt::ControlModifier)
|
|
|
+ ke->accept();
|
|
|
+ }
|
|
|
+ return QWidget::event(e);
|
|
|
+}
|
|
|
+
|
|
|
void ErrorList::keyPressEvent(QKeyEvent *e)
|
|
|
{
|
|
|
if ((e->key()==Qt::Key_Insert || e->key()==Qt::Key_C)
|
|
@@ -48,18 +59,6 @@ void ErrorList::keyPressEvent(QKeyEvent *e)
|
|
|
} else QWidget::keyPressEvent(e);
|
|
|
}
|
|
|
|
|
|
-void ErrorList::focusInEvent(QFocusEvent *e)
|
|
|
-{
|
|
|
- QWidget::focusInEvent(e);
|
|
|
- grabKeyboard();
|
|
|
-}
|
|
|
-
|
|
|
-void ErrorList::focusOutEvent(QFocusEvent *e)
|
|
|
-{
|
|
|
- releaseKeyboard();
|
|
|
- QWidget::focusOutEvent(e);
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* Constructs a ErrorList as a child of 'parent', with the
|
|
|
* name 'name' and widget flags set to 'f'.
|