forked from qt-creator/qt-creator
Line length for QML/JS editing automatic formatting
Adding parameters to functions in the QML/JS formatter Adding widget and setting to the QML/JS editing settings Fixes: QTCREATORBUG-23411 Change-Id: Ib9d3ac3b22443e81cd636fbc276c6544dab1511b Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "qmljstoolsconstants.h"
|
||||
#include "qmljsindenter.h"
|
||||
|
||||
#include <texteditor/simplecodestylepreferences.h>
|
||||
#include <qmljscodestylepreferences.h>
|
||||
|
||||
#include <qmljseditor/qmljseditorconstants.h>
|
||||
|
||||
@@ -68,16 +68,19 @@ QString QmlJSCodeStylePreferencesFactory::displayName()
|
||||
|
||||
TextEditor::ICodeStylePreferences *QmlJSCodeStylePreferencesFactory::createCodeStyle() const
|
||||
{
|
||||
return new TextEditor::SimpleCodeStylePreferences();
|
||||
return new QmlJSCodeStylePreferences();
|
||||
}
|
||||
|
||||
TextEditor::CodeStyleEditorWidget *QmlJSCodeStylePreferencesFactory::createEditor(
|
||||
TextEditor::ICodeStylePreferences *preferences,
|
||||
QWidget *parent) const
|
||||
{
|
||||
auto qmlJSPreferences = qobject_cast<QmlJSCodeStylePreferences *>(preferences);
|
||||
if (!qmlJSPreferences)
|
||||
return nullptr;
|
||||
auto widget = new Internal::QmlJSCodeStylePreferencesWidget(parent);
|
||||
widget->layout()->setContentsMargins(0, 0, 0, 0);
|
||||
widget->setPreferences(preferences);
|
||||
widget->setPreferences(qmlJSPreferences);
|
||||
return widget;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user