forked from qt-creator/qt-creator
TextEditors: Move font settings to document
Change-Id: I325764cbaa9684fa2758b0ea6c6ea58de142cb73 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -997,10 +997,11 @@ void QmlJSTextEditorWidget::setSelectedElements()
|
||||
emit selectedElementsChanged(offsets, wordAtCursor);
|
||||
}
|
||||
|
||||
void QmlJSTextEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
|
||||
void QmlJSTextEditorWidget::applyFontSettings()
|
||||
{
|
||||
TextEditor::BaseTextEditorWidget::setFontSettings(fs);
|
||||
TextEditor::BaseTextEditorWidget::applyFontSettings();
|
||||
|
||||
const TextEditor::FontSettings &fs = baseTextDocument()->fontSettings();
|
||||
m_occurrencesFormat = fs.toTextCharFormat(TextEditor::C_OCCURRENCES);
|
||||
m_occurrencesUnusedFormat = fs.toTextCharFormat(TextEditor::C_OCCURRENCES_UNUSED);
|
||||
m_occurrencesUnusedFormat.setUnderlineStyle(QTextCharFormat::WaveUnderline);
|
||||
|
||||
@@ -135,7 +135,6 @@ public slots:
|
||||
void findUsages();
|
||||
void renameUsages();
|
||||
void showContextPane();
|
||||
virtual void setFontSettings(const TextEditor::FontSettings &);
|
||||
|
||||
signals:
|
||||
void outlineModelIndexChanged(const QModelIndex &index);
|
||||
@@ -168,6 +167,7 @@ protected:
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
void resizeEvent(QResizeEvent *event);
|
||||
void scrollContentsBy(int dx, int dy);
|
||||
void applyFontSettings();
|
||||
TextEditor::BaseTextEditor *createEditor();
|
||||
void createToolBar(QmlJSEditor *editable);
|
||||
TextEditor::BaseTextEditorWidget::Link findLinkAt(const QTextCursor &cursor,
|
||||
|
||||
Reference in New Issue
Block a user