QML: brought context menu in sync with C++ editor.

This commit is contained in:
Erik Verbruggen
2010-09-16 12:57:07 +02:00
parent f4a812fdcb
commit 0c98d830b8
5 changed files with 85 additions and 13 deletions

View File

@@ -36,6 +36,7 @@
#include <qmljs/qmljsscanner.h>
#include <qmljs/qmljsinterpreter.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/quickfix.h>
#include <QtCore/QWaitCondition>
#include <QtCore/QModelIndex>
@@ -275,6 +276,8 @@ private slots:
void onCursorPositionChanged();
void onRefactorMarkerClicked(const TextEditor::Internal::RefactorMarker &marker);
void performQuickFix(int index);
protected:
void contextMenuEvent(QContextMenuEvent *e);
bool event(QEvent *e);
@@ -323,6 +326,8 @@ private:
SemanticHighlighter *m_semanticHighlighter;
SemanticInfo m_semanticInfo;
QList<TextEditor::QuickFixOperation::Ptr> m_quickFixes;
QmlJS::IContextPane *m_contextPane;
int m_oldCursorPosition;
bool m_updateSelectedElements;