forked from qt-creator/qt-creator
QmlProfiler: relay context menu from trace view to parent widget
As QQuickView is a window with its own event handling, disconnected from the main window, we need to relay relevant events manually. Task-number: QTCREATORBUG-11535 Change-Id: If316225ecc01ddc4255c209d7df70a9cee812596 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -75,6 +75,7 @@ public:
|
||||
bool hasValidSelection() const;
|
||||
qint64 selectionStart() const;
|
||||
qint64 selectionEnd() const;
|
||||
void showContextMenu(QPoint position);
|
||||
|
||||
public slots:
|
||||
void clearDisplay();
|
||||
@@ -95,6 +96,7 @@ private slots:
|
||||
|
||||
protected:
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
private slots:
|
||||
void profilerStateChanged();
|
||||
@@ -117,7 +119,6 @@ signals:
|
||||
void resized();
|
||||
|
||||
private:
|
||||
void contextMenuEvent(QContextMenuEvent *);
|
||||
QWidget *createToolbar();
|
||||
|
||||
void setRecording(bool recording);
|
||||
@@ -128,6 +129,14 @@ private:
|
||||
QmlProfilerTraceViewPrivate *d;
|
||||
};
|
||||
|
||||
class QmlProfilerQuickView : public QQuickView {
|
||||
public:
|
||||
QmlProfilerQuickView(QmlProfilerTraceView *parent) : parent(parent) {}
|
||||
protected:
|
||||
QmlProfilerTraceView *parent;
|
||||
bool event(QEvent *ev);
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace QmlProfiler
|
||||
|
||||
|
||||
Reference in New Issue
Block a user