~ubuntu-branches/ubuntu/utopic/kdevplatform/utopic-proposed

« back to all changes in this revision

Viewing changes to shell/settings/editstyledialog.cpp

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark
  • Date: 2014-08-30 03:52:11 UTC
  • mfrom: (0.3.26)
  • Revision ID: package-import@ubuntu.com-20140830035211-wndqlc843eu2v8nk
Tags: 1.7.0-0ubuntu1
* New upstream release
* Add XS-Testsuite: autopkgtest

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
        m_document = editor->createDocument(this);
73
73
        m_document->setReadWrite(false);
74
 
        QString mode = m_sourceFormatter->highlightModeForMime(m_mimeType);
75
 
        m_document->setHighlightingMode(mode);
 
74
        m_document->setHighlightingMode(m_style.modeForMimetype(m_mimeType));
76
75
 
77
76
        m_view = qobject_cast<KTextEditor::View*>(
78
77
                    m_document->createView(m_ui.textEditor));
88
87
                iface->setConfigValue("icon-bar", false);
89
88
        }
90
89
 
91
 
        if (m_sourceFormatter)
92
 
                updatePreviewText(m_sourceFormatter->previewText(m_mimeType));
 
90
        if (m_sourceFormatter) {
 
91
                QString text = m_sourceFormatter->previewText(m_style, m_mimeType);
 
92
                updatePreviewText(text);
 
93
        }
93
94
}
94
95
 
95
96
void EditStyleDialog::updatePreviewText(const QString &text)