summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Teske <daniel.teske@nokia.com>2012-05-07 16:32:06 +0200
committerDaniel Teske <daniel.teske@nokia.com>2012-05-08 12:07:45 +0200
commit5795300eadfb9ff3103cefdfa9f7439765001995 (patch)
treee6a25525be7383e5fbaa62e732259555ec67cc3e
parent9d86ad7990559823ddf4421f26154c5091d916be (diff)
downloadqt-creator-5795300eadfb9ff3103cefdfa9f7439765001995.tar.gz
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>
-rw-r--r--src/plugins/projectexplorer/compileoutputwindow.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/projectexplorer/compileoutputwindow.cpp b/src/plugins/projectexplorer/compileoutputwindow.cpp
index 28f8bf07da..8c8d58f3a4 100644
--- a/src/plugins/projectexplorer/compileoutputwindow.cpp
+++ b/src/plugins/projectexplorer/compileoutputwindow.cpp
@@ -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"