summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/messageoutputwindow.h
diff options
context:
space:
mode:
authorcon <qtc-committer@nokia.com>2011-03-31 15:47:27 +0200
committercon <qtc-committer@nokia.com>2011-03-31 17:06:27 +0200
commiteb03bd1a9303307038a9edb34a829f2db5701e62 (patch)
treeb244770f56a7163d5c7ba907b42d508135624f78 /src/plugins/coreplugin/messageoutputwindow.h
parentc8e03e5e90431e2de05410aef459b8373b5f4bca (diff)
downloadqt-creator-eb03bd1a9303307038a9edb34a829f2db5701e62.tar.gz
General messages should stay at bottom when messages are posted
Fix is copying code from project explorer OutputWindow, which should be shared instead. Task-number: QTCREATORBUG-3839 Reviewed-by: Robert Loehning
Diffstat (limited to 'src/plugins/coreplugin/messageoutputwindow.h')
-rw-r--r--src/plugins/coreplugin/messageoutputwindow.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/plugins/coreplugin/messageoutputwindow.h b/src/plugins/coreplugin/messageoutputwindow.h
index 3e4f18a8e5..befdc7e74d 100644
--- a/src/plugins/coreplugin/messageoutputwindow.h
+++ b/src/plugins/coreplugin/messageoutputwindow.h
@@ -36,13 +36,28 @@
#include <coreplugin/ioutputpane.h>
-QT_BEGIN_NAMESPACE
-class QTextEdit;
-QT_END_NAMESPACE
+#include <QtGui/QShowEvent>
+#include <QtGui/QResizeEvent>
+#include <QtGui/QTextEdit>
namespace Core {
namespace Internal {
+class TextView : public QTextEdit
+{
+ Q_OBJECT
+
+public:
+ TextView(QWidget *parent = 0) : QTextEdit(parent) {}
+
+ void showEvent(QShowEvent *);
+ void scrollToBottom();
+ bool isScrollbarAtBottom() const;
+
+protected:
+ void resizeEvent(QResizeEvent *e);
+};
+
class MessageOutputWindow : public Core::IOutputPane
{
Q_OBJECT
@@ -71,7 +86,7 @@ public:
bool canNavigate();
private:
- QTextEdit *m_widget;
+ TextView *m_widget;
};
} // namespace Internal