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