forked from qt-creator/qt-creator
Add some key event logging for OpenEditorsWindow
On some platforms/configurations the popup for switching documents does not close when releasing the modifier key. Add some debug output to try to find out what happens. Task-number: QTCREATORBUG-27378 Task-number: QTCREATORBUG-31228 Change-Id: Ia882ce6be1bd235601f9c869b79fb8c15ab72a3a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -20,11 +20,14 @@
|
||||
|
||||
#include <QFocusEvent>
|
||||
#include <QHeaderView>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLoggingCategory>
|
||||
#include <QScrollBar>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
using namespace Utils;
|
||||
|
||||
Q_LOGGING_CATEGORY(openEditorsLog, "qtc.core.openeditorswindow", QtWarningMsg);
|
||||
|
||||
namespace Core::Internal {
|
||||
|
||||
class OpenEditorsItem : public TreeItem
|
||||
@@ -196,9 +199,10 @@ bool OpenEditorsWindow::eventFilter(QObject *obj, QEvent *e)
|
||||
|
||||
} else if (e->type() == QEvent::KeyRelease) {
|
||||
auto ke = static_cast<QKeyEvent*>(e);
|
||||
qCDebug(openEditorsLog()) << ke;
|
||||
if (ke->modifiers() == 0
|
||||
/*HACK this is to overcome some event inconsistencies between platforms*/
|
||||
|| (ke->modifiers() == Qt::AltModifier
|
||||
/*HACK this is to overcome some event inconsistencies between platforms*/
|
||||
|| (ke->modifiers() == Qt::AltModifier
|
||||
&& (ke->key() == Qt::Key_Alt || ke->key() == -1))) {
|
||||
selectAndHide();
|
||||
}
|
||||
|
Reference in New Issue
Block a user