Make the compile output window use the text editor font

This makes the output use a fixed width font by default.
Also the application output is also synced to the text edit font

Task-number: QTCREATORBUG-7378

Change-Id: Ia036b505017cac0b1254b1b183b798feaee130f9
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-05-07 16:32:06 +02:00
parent 9d86ad7990
commit 5795300ead

View File

@@ -43,6 +43,8 @@
#include <find/basetextfind.h>
#include <aggregation/aggregate.h>
#include <extensionsystem/pluginmanager.h>
#include <texteditor/texteditorsettings.h>
#include <texteditor/fontsettings.h>
#include <QKeyEvent>
#include <QIcon>
@@ -66,9 +68,13 @@ namespace Internal {
class CompileOutputTextEdit : public Core::OutputWindow
{
Q_OBJECT
public:
CompileOutputTextEdit(const Core::Context &context) : Core::OutputWindow(context)
{
fontSettingsChanged();
connect(TextEditor::TextEditorSettings::instance(), SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
this, SLOT(fontSettingsChanged()));
}
void addTask(const Task &task, int blocknumber)
@@ -80,6 +86,11 @@ public:
{
m_taskids.clear();
}
private slots:
void fontSettingsChanged()
{
setFont(TextEditor::TextEditorSettings::instance()->fontSettings().font());
}
protected:
void mouseDoubleClickEvent(QMouseEvent *ev)
@@ -260,3 +271,5 @@ void CompileOutputWindow::showPositionOf(const Task &task)
newCursor.movePosition(QTextCursor::EndOfBlock, QTextCursor::KeepAnchor);
m_outputWindow->setTextCursor(newCursor);
}
#include "compileoutputwindow.moc"