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 <QFocusEvent>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QVBoxLayout>
|
#include <QLoggingCategory>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
|
Q_LOGGING_CATEGORY(openEditorsLog, "qtc.core.openeditorswindow", QtWarningMsg);
|
||||||
|
|
||||||
namespace Core::Internal {
|
namespace Core::Internal {
|
||||||
|
|
||||||
class OpenEditorsItem : public TreeItem
|
class OpenEditorsItem : public TreeItem
|
||||||
@@ -196,6 +199,7 @@ bool OpenEditorsWindow::eventFilter(QObject *obj, QEvent *e)
|
|||||||
|
|
||||||
} else if (e->type() == QEvent::KeyRelease) {
|
} else if (e->type() == QEvent::KeyRelease) {
|
||||||
auto ke = static_cast<QKeyEvent*>(e);
|
auto ke = static_cast<QKeyEvent*>(e);
|
||||||
|
qCDebug(openEditorsLog()) << ke;
|
||||||
if (ke->modifiers() == 0
|
if (ke->modifiers() == 0
|
||||||
/*HACK this is to overcome some event inconsistencies between platforms*/
|
/*HACK this is to overcome some event inconsistencies between platforms*/
|
||||||
|| (ke->modifiers() == Qt::AltModifier
|
|| (ke->modifiers() == Qt::AltModifier
|
||||||
|
Reference in New Issue
Block a user