forked from qt-creator/qt-creator
QmlJsEditor: Start aspectification of settings
Rename qmljseditingsettingspage.* to qmljseditorsettings.*, re-arrange some includes, use settings() for the singleton access etc. Change-Id: Iff36a99baf0afd238a935386e9111818be5d7987 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "qmljsautocompleter.h"
|
||||
#include "qmljscompletionassist.h"
|
||||
#include "qmljseditingsettingspage.h"
|
||||
#include "qmljseditorsettings.h"
|
||||
#include "qmljseditorconstants.h"
|
||||
#include "qmljseditordocument.h"
|
||||
#include "qmljseditorplugin.h"
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include <qmljstools/qmljsindenter.h>
|
||||
#include <qmljstools/qmljstoolsconstants.h>
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
@@ -88,6 +89,7 @@ const char QT_QUICK_TOOLBAR_MARKER_ID[] = "QtQuickToolbarMarkerId";
|
||||
using namespace Core;
|
||||
using namespace QmlJS;
|
||||
using namespace QmlJS::AST;
|
||||
using namespace QmlJSEditor::Internal;
|
||||
using namespace QmlJSTools;
|
||||
using namespace TextEditor;
|
||||
using namespace Utils;
|
||||
@@ -97,8 +99,7 @@ namespace QmlJSEditor {
|
||||
static LanguageClient::Client *getQmllsClient(const Utils::FilePath &fileName)
|
||||
{
|
||||
// the value in disableBuiltinCodemodel is only valid when useQmlls is enabled
|
||||
if (QmlJsEditingSettings::get().useQmlls()
|
||||
&& !QmlJsEditingSettings::get().disableBuiltinCodemodel())
|
||||
if (settings().useQmlls() && !settings().disableBuiltinCodemodel())
|
||||
return nullptr;
|
||||
|
||||
auto client = LanguageClient::LanguageClientManager::clientForFilePath(fileName);
|
||||
@@ -163,7 +164,7 @@ void QmlJSEditorWidget::restoreState(const QByteArray &state)
|
||||
using namespace Utils::Constants;
|
||||
QStringList qmlTypes = {QML_MIMETYPE, QBS_MIMETYPE, QMLTYPES_MIMETYPE, QMLUI_MIMETYPE};
|
||||
|
||||
if (QmlJsEditingSettings::get().foldAuxData() && qmlTypes.contains(textDocument()->mimeType())) {
|
||||
if (settings().foldAuxData() && qmlTypes.contains(textDocument()->mimeType())) {
|
||||
int version = 0;
|
||||
QDataStream stream(state);
|
||||
stream >> version;
|
||||
|
||||
Reference in New Issue
Block a user