Parsing of definitions metadata for mime type registering is now in a separate thread (QtConcurrent). Also some clean up.

This commit is contained in:
Leandro Melo
2010-05-11 14:53:24 +02:00
parent 67917cd9a1
commit e5401e941c
26 changed files with 90 additions and 11894 deletions

View File

@@ -47,8 +47,6 @@
#include <QtCore/QSharedPointer>
#include <QtCore/QFileInfo>
#include <QDebug>
using namespace GenericEditor;
using namespace Internal;
@@ -97,7 +95,7 @@ void Editor::configure()
try {
const QString &definitionId =
GenericEditorPlugin::instance()->definitionIdByMimeType(mimeType);
QSharedPointer<HighlightDefinition> definition =
const QSharedPointer<HighlightDefinition> &definition =
GenericEditorPlugin::instance()->definition(definitionId);
Highlighter *highlighter = new Highlighter(definition->initialContext());
@@ -112,9 +110,10 @@ void Editor::configure()
//@todo: It's possible to specify an indenter style in the definition file. However, this
// is not really being used because Kate recommends to configure indentation through
// another editor feature. Maybe we should provide something similar in Creator?
// For now the normal indenter is used.
// another feature. Maybe we should provide something similar in Creator? For now the
// normal indenter is used.
m_indenter.reset(new TextEditor::NormalIndenter);
} catch (const HighlighterException &) {
// No highlighter will be set.
}