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
This commit is contained in:
con
2011-03-31 15:47:27 +02:00
parent c8e03e5e90
commit eb03bd1a93
2 changed files with 55 additions and 6 deletions

View File

@@ -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