forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.12'
Conflicts: src/plugins/cmakeprojectmanager/cmakekitinformation.cpp Change-Id: I90ef0063ed24e23bcb3d73fff086f50324faa1e2
This commit is contained in:
@@ -229,7 +229,11 @@ function(set_public_includes target includes)
|
||||
if (NOT IS_ABSOLUTE ${inc_dir})
|
||||
set(inc_dir "${CMAKE_CURRENT_SOURCE_DIR}/${inc_dir}")
|
||||
endif()
|
||||
target_include_directories(${target} PUBLIC $<BUILD_INTERFACE:${inc_dir}>)
|
||||
file(RELATIVE_PATH include_dir_relative_path ${PROJECT_SOURCE_DIR} ${inc_dir})
|
||||
target_include_directories(${target} PUBLIC
|
||||
$<BUILD_INTERFACE:${inc_dir}>
|
||||
$<INSTALL_INTERFACE:include/${include_dir_relative_path}>
|
||||
)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
|
@@ -8,8 +8,6 @@ headerdirs =
|
||||
sourcedirs = ../src \
|
||||
../examples/doc \
|
||||
../../qtcreator/src
|
||||
# The image folders also need to added by packaging scripts, so inform your
|
||||
# local release team about any changes you make.
|
||||
imagedirs = ../images \
|
||||
../examples/doc/images \
|
||||
../../qtcreator/images \
|
||||
@@ -23,6 +21,7 @@ imagedirs = ../images \
|
||||
../../../src/plugins/help/images \
|
||||
../../../src/plugins/projectexplorer/images \
|
||||
../../../src/plugins/qmldesigner/components/componentcore/images \
|
||||
../../../src/plugins/qmldesigner/components/edit3d/images \
|
||||
../../../src/plugins/qmldesigner/components/formeditor \
|
||||
../../../src/plugins/qmldesigner/components/navigator \
|
||||
../../../src/plugins/qmldesigner/components/timelineeditor/images \
|
||||
|
@@ -67,23 +67,7 @@ source_include_patterns = [
|
||||
r"^doc/.*$", # include everything under doc/
|
||||
r"^.*\.pri$", # .pri files in all directories that are looked into
|
||||
r"^.*\.h$", # .h files in all directories that are looked into
|
||||
r"^.*\.hpp$", # .hpp files in all directories that are looked into
|
||||
# qtdesignstudio docs are build against dev package, so we need to include some image directories
|
||||
r"^share/qtcreator/qml/qmlpuppet/mockfiles/images/.*$",
|
||||
r"^share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/.*$",
|
||||
r"^src/libs/qmleditorwidgets/images/.*$",
|
||||
r"^src/libs/utils/images/.*$",
|
||||
r"^src/plugins/debugger/images/.*$",
|
||||
r"^src/plugins/diffeditor/images/.*$",
|
||||
r"^src/plugins/help/images/.*$",
|
||||
r"^src/plugins/projectexplorer/images/.*$",
|
||||
r"^src/plugins/qmldesigner/components/componentcore/images/.*$",
|
||||
r"^src/plugins/qmldesigner/components/timelineeditor/images/.*$",
|
||||
r"^src/plugins/qmldesigner/qmlpreviewplugin/images/.*$",
|
||||
r"^src/plugins/texteditor/images/.*$",
|
||||
# also some single files
|
||||
r"^src/plugins/qmldesigner/components/formeditor/.*\.png$",
|
||||
r"^src/plugins/qmldesigner/components/navigator/.*\.png$"
|
||||
r"^.*\.hpp$" # .hpp files in all directories that are looked into
|
||||
]
|
||||
|
||||
build_include_patterns = [
|
||||
|
@@ -51,6 +51,8 @@ Rectangle {
|
||||
property real __actionIndicatorWidth: StudioTheme.Values.squareComponentWidth
|
||||
property real __actionIndicatorHeight: StudioTheme.Values.height
|
||||
|
||||
property string typeFilter: "QtQuick3D.Material"
|
||||
|
||||
color: "transparent"
|
||||
border.color: StudioTheme.Values.themeControlOutline
|
||||
border.width: StudioTheme.Values.border
|
||||
@@ -69,7 +71,7 @@ Rectangle {
|
||||
validator: RegExpValidator { regExp: /(^[a-z_]\w*|^[A-Z]\w*\.{1}([a-z_]\w*\.?)+)/ }
|
||||
|
||||
actionIndicatorVisible: false
|
||||
typeFilter: "QtQuick3D.Material"
|
||||
typeFilter: editableListView.typeFilter
|
||||
editText: modelData
|
||||
initialModelData: modelData
|
||||
|
||||
|
@@ -73,8 +73,12 @@ bool ComponentVersion::isValid() const
|
||||
|
||||
QString ComponentVersion::toString() const
|
||||
{
|
||||
return QString::fromLatin1("%1.%2").arg(QString::number(_major),
|
||||
QString::number(_minor));
|
||||
QByteArray temp;
|
||||
QByteArray result;
|
||||
result += temp.setNum(_major);
|
||||
result += '.';
|
||||
result += temp.setNum(_minor);
|
||||
return QString::fromLatin1(result);
|
||||
}
|
||||
|
||||
void ComponentVersion::addToHash(QCryptographicHash &hash) const
|
||||
|
@@ -7,6 +7,7 @@ add_qtc_library(QmlJS
|
||||
parser/qmljsast.cpp parser/qmljsast_p.h
|
||||
parser/qmljsastfwd_p.h
|
||||
parser/qmljsastvisitor.cpp parser/qmljsastvisitor_p.h
|
||||
parser/qmljsdiagnosticmessage_p.h
|
||||
parser/qmljsengine_p.cpp parser/qmljsengine_p.h
|
||||
parser/qmljsglobal_p.h
|
||||
parser/qmljsgrammar.cpp parser/qmljsgrammar_p.h
|
||||
|
@@ -872,6 +872,7 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
{
|
||||
QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode);
|
||||
bool multilineStringLiteral = false;
|
||||
bool escaped = false;
|
||||
|
||||
const QChar *startCode = _codePtr - 1;
|
||||
// in case we just parsed a \r, we need to reset this flag to get things working
|
||||
@@ -880,6 +881,12 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
|
||||
if (_engine) {
|
||||
while (_codePtr <= _endPtr) {
|
||||
if (escaped) { // former char started an escape sequence
|
||||
escaped = false;
|
||||
_char = *_codePtr++;
|
||||
++_currentColumnNumber;
|
||||
continue;
|
||||
}
|
||||
if (isLineTerminator()) {
|
||||
if ((quote == QLatin1Char('`') || qmlMode()))
|
||||
break;
|
||||
@@ -887,7 +894,10 @@ int Lexer::scanString(ScanStringMode mode)
|
||||
_errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal");
|
||||
return T_ERROR;
|
||||
} else if (_char == QLatin1Char('\\')) {
|
||||
break;
|
||||
if (mode != DoubleQuote && mode != SingleQuote)
|
||||
break;
|
||||
else // otherwise we need to handle an escape sequence
|
||||
escaped = true;
|
||||
} else if (_char == '$' && quote == QLatin1Char('`')) {
|
||||
break;
|
||||
} else if (_char == quote) {
|
||||
|
@@ -395,6 +395,8 @@ const Value *CppComponentValue::valueForCppName(const QString &typeName) const
|
||||
return valueOwner()->realValue();
|
||||
} else if (typeName == QLatin1String("QFont")) {
|
||||
return valueOwner()->qmlFontObject();
|
||||
} else if (typeName == QLatin1String("QPalette")) {
|
||||
return valueOwner()->qmlPaletteObject();
|
||||
} else if (typeName == QLatin1String("QPoint")
|
||||
|| typeName == QLatin1String("QPointF")
|
||||
|| typeName == QLatin1String("QVector2D")) {
|
||||
|
@@ -95,6 +95,7 @@ public:
|
||||
ObjectValue *_mathObject;
|
||||
ObjectValue *_qtObject;
|
||||
ObjectValue *_qmlFontObject;
|
||||
ObjectValue *_qmlPaletteObject;
|
||||
ObjectValue *_qmlPointObject;
|
||||
ObjectValue *_qmlSizeObject;
|
||||
ObjectValue *_qmlRectObject;
|
||||
@@ -496,6 +497,28 @@ SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind)
|
||||
_qmlFontObject->setMember(QLatin1String("kerning"), booleanValue());
|
||||
_qmlFontObject->setMember(QLatin1String("preferShaping"), booleanValue());
|
||||
|
||||
_qmlPaletteObject = newObject(/* prototype = */ nullptr);
|
||||
_qmlPaletteObject->setClassName(QLatin1String("palette"));
|
||||
_qmlPaletteObject->setMember(QLatin1String("alternateBase"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("base"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("brightText"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("button"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("buttonText"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("dark"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("highlight"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("highlightedText"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("light"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("link"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("linkVisited"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("mid"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("midlight"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("shadow"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("text"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("toolTipBase"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("toolTipText"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("window"), colorValue());
|
||||
_qmlPaletteObject->setMember(QLatin1String("windowText"), colorValue());
|
||||
|
||||
_qmlPointObject = newObject(/*prototype =*/ nullptr);
|
||||
_qmlPointObject->setClassName(QLatin1String("Point"));
|
||||
_qmlPointObject->setMember(QLatin1String("x"), numberValue());
|
||||
@@ -896,6 +919,11 @@ const ObjectValue *ValueOwner::qmlFontObject()
|
||||
return _shared->_qmlFontObject;
|
||||
}
|
||||
|
||||
const ObjectValue *ValueOwner::qmlPaletteObject()
|
||||
{
|
||||
return _shared->_qmlPaletteObject;
|
||||
}
|
||||
|
||||
const ObjectValue *ValueOwner::qmlPointObject()
|
||||
{
|
||||
return _shared->_qmlPointObject;
|
||||
|
@@ -82,6 +82,7 @@ public:
|
||||
|
||||
// QML objects
|
||||
const ObjectValue *qmlFontObject();
|
||||
const ObjectValue *qmlPaletteObject();
|
||||
const ObjectValue *qmlPointObject();
|
||||
const ObjectValue *qmlSizeObject();
|
||||
const ObjectValue *qmlRectObject();
|
||||
|
@@ -698,6 +698,7 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection,
|
||||
connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted);
|
||||
connect(m_runWorker, &ClangToolRunWorker::runnerFinished,
|
||||
this, &ClangTool::updateForCurrentState);
|
||||
connect(m_runControl, &RunControl::destroyed, [this](){ m_runWorker = nullptr; });
|
||||
|
||||
// More init and UI update
|
||||
m_diagnosticFilterModel->setProject(project);
|
||||
@@ -1038,6 +1039,8 @@ void ClangTool::onRunControlStopped()
|
||||
void ClangTool::update()
|
||||
{
|
||||
updateForInitialState();
|
||||
if (!m_runWorker)
|
||||
return;
|
||||
updateForCurrentState();
|
||||
}
|
||||
|
||||
|
@@ -33,8 +33,11 @@
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/variablechooser.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/projectexplorersettings.h>
|
||||
#include <projectexplorer/task.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
@@ -657,6 +660,21 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const
|
||||
return g.matches("NMake Makefiles")
|
||||
|| g.matches("NMake Makefiles JOM");
|
||||
});
|
||||
if (ProjectExplorerPlugin::projectExplorerSettings().useJom) {
|
||||
it = std::find_if(known.constBegin(),
|
||||
known.constEnd(),
|
||||
[](const CMakeTool::Generator &g) {
|
||||
return g.matches("NMake Makefiles JOM");
|
||||
});
|
||||
}
|
||||
|
||||
if (it == known.constEnd()) {
|
||||
it = std::find_if(known.constBegin(),
|
||||
known.constEnd(),
|
||||
[](const CMakeTool::Generator &g) {
|
||||
return g.matches("NMake Makefiles");
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Unix-oid OSes:
|
||||
@@ -784,6 +802,16 @@ KitAspectWidget *CMakeGeneratorKitAspect::createConfigWidget(Kit *k) const
|
||||
return new CMakeGeneratorKitAspectWidget(k, this);
|
||||
}
|
||||
|
||||
void CMakeGeneratorKitAspect::addToEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
{
|
||||
GeneratorInfo info = generatorInfo(k);
|
||||
if (info.generator == "NMake Makefiles JOM") {
|
||||
if (env.searchInPath("jom.exe").exists())
|
||||
return;
|
||||
env.appendOrSetPath(QCoreApplication::applicationDirPath());
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// CMakeConfigurationKitAspect:
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -83,6 +83,7 @@ public:
|
||||
void upgrade(ProjectExplorer::Kit *k) final;
|
||||
ItemList toUserOutput(const ProjectExplorer::Kit *k) const final;
|
||||
ProjectExplorer::KitAspectWidget *createConfigWidget(ProjectExplorer::Kit *k) const final;
|
||||
void addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const final;
|
||||
|
||||
private:
|
||||
QVariant defaultValue(const ProjectExplorer::Kit *k) const;
|
||||
|
@@ -502,8 +502,13 @@ void QmakeBuildSystem::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
|
||||
|
||||
void QmakeBuildSystem::incrementPendingEvaluateFutures()
|
||||
{
|
||||
if (m_pendingEvaluateFuturesCount == 0)
|
||||
m_guard = guardParsingRun();
|
||||
if (m_pendingEvaluateFuturesCount == 0) {
|
||||
// The guard actually might already guard the project if this
|
||||
// here is the re-start of a previously aborted parse due to e.g.
|
||||
// changing build directories while parsing.
|
||||
if (!m_guard.guardsProject())
|
||||
m_guard = guardParsingRun();
|
||||
}
|
||||
++m_pendingEvaluateFuturesCount;
|
||||
m_asyncUpdateFutureInterface.setProgressRange(m_asyncUpdateFutureInterface.progressMinimum(),
|
||||
m_asyncUpdateFutureInterface.progressMaximum() + 1);
|
||||
|
@@ -144,6 +144,7 @@ extend_qtc_plugin(QmlDesigner
|
||||
|
||||
extend_qtc_plugin(QmlDesigner
|
||||
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/interfaces
|
||||
PUBLIC_INCLUDES ../../../share/qtcreator/qml/qmlpuppet/interfaces
|
||||
SOURCES
|
||||
nodeinstanceserverinterface.cpp
|
||||
commondefines.h
|
||||
@@ -202,6 +203,7 @@ extend_qtc_plugin(QmlDesigner
|
||||
|
||||
extend_qtc_plugin(QmlDesigner
|
||||
SOURCES_PREFIX components/formeditor
|
||||
PUBLIC_INCLUDES components/formeditor
|
||||
SOURCES
|
||||
abstractcustomtool.cpp abstractcustomtool.h
|
||||
abstractformeditortool.cpp abstractformeditortool.h
|
||||
@@ -257,6 +259,7 @@ extend_qtc_plugin(QmlDesigner
|
||||
|
||||
extend_qtc_plugin(QmlDesigner
|
||||
SOURCES_PREFIX components/integration
|
||||
PUBLIC_INCLUDES components/integration
|
||||
SOURCES
|
||||
componentaction.cpp componentaction.h
|
||||
componentview.cpp componentview.h
|
||||
@@ -470,6 +473,7 @@ extend_qtc_plugin(QmlDesigner
|
||||
|
||||
extend_qtc_plugin(QmlDesigner
|
||||
SOURCES_PREFIX designercore
|
||||
PUBLIC_INCLUDES designercore
|
||||
SOURCES
|
||||
metainfo/itemlibraryinfo.cpp
|
||||
metainfo/metainfo.cpp
|
||||
|
@@ -238,11 +238,6 @@ QMimeData *ItemLibraryModel::getMimeData(const ItemLibraryEntry &itemLibraryEntr
|
||||
return mimeData;
|
||||
}
|
||||
|
||||
QList<ItemLibrarySection *> ItemLibraryModel::sections() const
|
||||
{
|
||||
return m_sections;
|
||||
}
|
||||
|
||||
void ItemLibraryModel::clearSections()
|
||||
{
|
||||
qDeleteAll(m_sections);
|
||||
|
@@ -58,17 +58,8 @@ public:
|
||||
|
||||
QMimeData *getMimeData(const ItemLibraryEntry &itemLibraryEntry);
|
||||
|
||||
QList<ItemLibrarySection*> sections() const;
|
||||
|
||||
void clearSections();
|
||||
|
||||
static void registerQmlTypes();
|
||||
|
||||
int visibleSectionCount() const;
|
||||
QList<ItemLibrarySection*> visibleSections() const;
|
||||
|
||||
ItemLibrarySection *sectionByName(const QString §ionName);
|
||||
|
||||
void setSearchText(const QString &searchText);
|
||||
|
||||
void setExpanded(bool, const QString §ion);
|
||||
@@ -80,13 +71,15 @@ signals:
|
||||
void searchTextChanged();
|
||||
|
||||
private: // functions
|
||||
ItemLibrarySection *sectionByName(const QString §ionName);
|
||||
void updateVisibility(bool *changed);
|
||||
void addRoleNames();
|
||||
void sortSections();
|
||||
void clearSections();
|
||||
|
||||
|
||||
private: // variables
|
||||
QList<ItemLibrarySection*> m_sections;
|
||||
QList<QPointer<ItemLibrarySection>> m_sections;
|
||||
QHash<int, QByteArray> m_roleNames;
|
||||
|
||||
QString m_searchText;
|
||||
|
@@ -101,13 +101,15 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
||||
m_itemViewQuickWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports");
|
||||
m_itemLibraryModel = new ItemLibraryModel(this);
|
||||
|
||||
QQmlContext *rootContext = m_itemViewQuickWidget->rootContext();
|
||||
rootContext->setContextProperty(QStringLiteral("itemLibraryModel"), m_itemLibraryModel.data());
|
||||
rootContext->setContextProperty(QStringLiteral("itemLibraryIconWidth"), m_itemIconSize.width());
|
||||
rootContext->setContextProperty(QStringLiteral("itemLibraryIconHeight"), m_itemIconSize.height());
|
||||
rootContext->setContextProperty(QStringLiteral("rootView"), this);
|
||||
|
||||
m_itemViewQuickWidget->rootContext()->setContextProperty(QStringLiteral("highlightColor"), Utils::StyleHelper::notTooBrightHighlightColor());
|
||||
m_itemViewQuickWidget->rootContext()->setContextProperties(
|
||||
QVector<QQmlContext::PropertyPair>{
|
||||
{"itemLibraryModel", QVariant::fromValue(m_itemLibraryModel.data())},
|
||||
{"itemLibraryIconWidth", m_itemIconSize.width()},
|
||||
{"itemLibraryIconHeight", m_itemIconSize.height()},
|
||||
{"rootView", QVariant::fromValue(this)},
|
||||
{"highlightColor", Utils::StyleHelper::notTooBrightHighlightColor()}
|
||||
}
|
||||
);
|
||||
|
||||
/* create Resources view and its model */
|
||||
m_resourcesFileSystemModel = new CustomFileSystemModel(this);
|
||||
|
@@ -379,9 +379,12 @@ void PropertyEditorQmlBackend::setup(const QmlObjectNode &qmlObjectNode, const Q
|
||||
|
||||
// anchors
|
||||
m_backendAnchorBinding.setup(qmlObjectNode.modelNode());
|
||||
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding);
|
||||
|
||||
context()->setContextProperty(QLatin1String("transaction"), m_propertyEditorTransaction.data());
|
||||
context()->setContextProperties(
|
||||
QVector<QQmlContext::PropertyPair>{
|
||||
{{"anchorBackend"}, QVariant::fromValue(&m_backendAnchorBinding)},
|
||||
{{"transaction"}, QVariant::fromValue(m_propertyEditorTransaction.data())}
|
||||
}
|
||||
);
|
||||
|
||||
qCInfo(propertyEditorBenchmark) << "anchors:" << time.elapsed();
|
||||
|
||||
@@ -457,9 +460,13 @@ void PropertyEditorQmlBackend::initialSetup(const TypeName &typeName, const QUrl
|
||||
QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
|
||||
m_backendValuesPropertyMap.insert(QLatin1String("id"), QVariant::fromValue(valueObject));
|
||||
|
||||
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding);
|
||||
context()->setContextProperty(QLatin1String("modelNodeBackend"), &m_backendModelNode);
|
||||
context()->setContextProperty(QLatin1String("transaction"), m_propertyEditorTransaction.data());
|
||||
context()->setContextProperties(
|
||||
QVector<QQmlContext::PropertyPair>{
|
||||
{{"anchorBackend"}, QVariant::fromValue(&m_backendAnchorBinding)},
|
||||
{{"modelNodeBackend"}, QVariant::fromValue(&m_backendModelNode)},
|
||||
{{"transaction"}, QVariant::fromValue(m_propertyEditorTransaction.data())}
|
||||
}
|
||||
);
|
||||
|
||||
contextObject()->setSpecificsUrl(qmlSpecificsFile);
|
||||
|
||||
|
@@ -102,9 +102,12 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
|
||||
setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
|
||||
rootContext()->setContextProperty(QStringLiteral("statesEditorModel"), statesEditorModel);
|
||||
|
||||
rootContext()->setContextProperty(QLatin1String("canAddNewStates"), true);
|
||||
rootContext()->setContextProperties(
|
||||
QVector<QQmlContext::PropertyPair>{
|
||||
{{"statesEditorModel"}, QVariant::fromValue(statesEditorModel)},
|
||||
{{"canAddNewStates"}, true}
|
||||
}
|
||||
);
|
||||
|
||||
Theme::setupTheme(engine());
|
||||
|
||||
|
@@ -650,7 +650,7 @@ PropertyName NodeMetaInfoPrivate::defaultPropertyName() const
|
||||
|
||||
static inline TypeName stringIdentifier( const TypeName &type, int maj, int min)
|
||||
{
|
||||
return type + QString::number(maj).toLatin1() + '_' + QString::number(min).toLatin1();
|
||||
return type + QByteArray::number(maj) + '_' + QByteArray::number(min);
|
||||
}
|
||||
|
||||
NodeMetaInfoPrivate::Pointer NodeMetaInfoPrivate::create(Model *model, const TypeName &type, int major, int minor)
|
||||
|
@@ -381,11 +381,19 @@ void QmlObjectNode::destroy()
|
||||
timeline.destroyKeyframesForTarget(subNode);
|
||||
}
|
||||
|
||||
if (QmlFlowActionAreaNode::isValidQmlFlowActionAreaNode(modelNode()))
|
||||
QmlFlowActionAreaNode(modelNode()).destroyTarget();
|
||||
bool wasFlowEditorTarget = false;
|
||||
if (QmlFlowTargetNode::isFlowEditorTarget(modelNode())) {
|
||||
QmlFlowTargetNode(modelNode()).destroyTargets();
|
||||
wasFlowEditorTarget = true;
|
||||
}
|
||||
|
||||
removeStateOperationsForChildren(modelNode());
|
||||
QmlFlowViewNode root(view()->rootModelNode());
|
||||
|
||||
modelNode().destroy();
|
||||
|
||||
if (wasFlowEditorTarget && root.isValid())
|
||||
root.removeDanglingTransitions();
|
||||
}
|
||||
|
||||
void QmlObjectNode::ensureAliasExport()
|
||||
|
@@ -84,6 +84,7 @@ void DesignerSettings::fromSettings(QSettings *settings)
|
||||
);
|
||||
restoreValue(settings, DesignerSettingsKey::SIMPLE_COLOR_PALETTE_CONTENT, QStringList());
|
||||
restoreValue(settings, DesignerSettingsKey::ALWAYS_DESIGN_MODE, true);
|
||||
restoreValue(settings, DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER, true);
|
||||
|
||||
settings->endGroup();
|
||||
settings->endGroup();
|
||||
|
@@ -791,7 +791,7 @@ void QmlJSEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||
const QString relative = QString::fromLatin1("%1/%2").arg(
|
||||
semanticInfo.document->path(),
|
||||
text);
|
||||
if (semanticInfo.snapshot.document(relative)) {
|
||||
if (QFileInfo::exists(relative)) {
|
||||
link.targetFileName = relative;
|
||||
processLinkCallback(link);
|
||||
return;
|
||||
|
@@ -107,6 +107,7 @@
|
||||
#include <QPropertyAnimation>
|
||||
#include <QDrag>
|
||||
#include <QSequentialAnimationGroup>
|
||||
#include <QScreen>
|
||||
#include <QScrollBar>
|
||||
#include <QShortcut>
|
||||
#include <QStyle>
|
||||
@@ -1199,7 +1200,11 @@ void TextEditorWidgetPrivate::print(QPrinter *printer)
|
||||
QAbstractTextDocumentLayout *layout = doc->documentLayout();
|
||||
layout->setPaintDevice(p.device());
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
|
||||
int dpiy = p.device()->logicalDpiY();
|
||||
#else
|
||||
int dpiy = qRound(QGuiApplication::primaryScreen()->logicalDotsPerInchY());
|
||||
#endif
|
||||
int margin = int((2/2.54)*dpiy); // 2 cm margins
|
||||
|
||||
QTextFrameFormat fmt = doc->rootFrame()->frameFormat();
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user