aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/documentwarningwidget.h
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@theqtcompany.com>2016-04-29 22:15:30 +0200
committerTim Jenssen <tim.jenssen@theqtcompany.com>2016-05-10 13:04:04 +0000
commitcacdcf7160ddfdb74a0cd5a6fa1c395b430e2cf5 (patch)
treed7db28dc4553bafaf84c5acff8c03429de527728 /src/plugins/qmldesigner/documentwarningwidget.h
parent62e3c0dbf4bbe59e477556d32cc6fb6a1a8e868d (diff)
QmlDesigner: improve warning widget code
- the "move" code needs to be inside the warning widget, this also fixes the problem of wrong position at startup - the patch removes knowledge about the DesignModeWidget and uses a signal Change-Id: I9a861ab955d16e85d7af36f1b56ddb82578b8da4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmldesigner/documentwarningwidget.h')
-rw-r--r--src/plugins/qmldesigner/documentwarningwidget.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/documentwarningwidget.h b/src/plugins/qmldesigner/documentwarningwidget.h
index d4fcf4ce6e..bd0d0d3549 100644
--- a/src/plugins/qmldesigner/documentwarningwidget.h
+++ b/src/plugins/qmldesigner/documentwarningwidget.h
@@ -36,22 +36,25 @@ QT_END_NAMESPACE
namespace QmlDesigner {
namespace Internal {
-class DesignModeWidget;
-
class DocumentWarningWidget : public Utils::FakeToolTip
{
Q_OBJECT
public:
- explicit DocumentWarningWidget(DesignModeWidget *parent = 0);
+ explicit DocumentWarningWidget(QWidget *parent);
void setError(const RewriterError &error);
-
+signals:
+ void gotoCodeClicked(const QString filePath, int codeLine, int codeColumn);
+protected:
+ bool eventFilter(QObject *object, QEvent *event) override;
+ void showEvent(QShowEvent *event) override;
private:
+ void moveToParentCenter();
+
QLabel *m_errorMessage;
QLabel *m_goToError;
RewriterError m_error;
- DesignModeWidget *m_designModeWidget;
};
} // namespace Internal