forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.12' into qds-1.50
Change-Id: If491fa41c07b9159d1755ef0580b4af6f6ca7d65
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()
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 13 KiB |
@@ -64,7 +64,7 @@
|
||||
|
||||
The \uicontrol {Qt Quick Application} wizards for a particular platform add
|
||||
the import statements automatically. You can remove import statements in
|
||||
\uicontrol {QML Imports}
|
||||
\uicontrol {QML Imports}.
|
||||
|
||||
\uicontrol {Assets} displays the images and other files that you copy
|
||||
to the project folder (to the same subfolder as the QML files).
|
||||
@@ -85,6 +85,8 @@
|
||||
\li Add states to apply sets of changes to the properties of one or
|
||||
several components in the \uicontrol States view (6). For more
|
||||
information, see \l{Adding States}.
|
||||
\li Animate component properties in the \uicontrol Timeline view (7).
|
||||
For more information, see \l{Creating Animations}.
|
||||
\endlist
|
||||
|
||||
\section1 Using Basic QML Types
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the Qt Creator documentation.
|
||||
@@ -52,16 +52,8 @@
|
||||
{here}.
|
||||
|
||||
\if defined(qtcreator)
|
||||
\section1 Enabling the Timeline Editor
|
||||
|
||||
The \uicontrol Timeline view is not visible in \QC by default. To enable
|
||||
it, select \uicontrol Tools > \uicontrol Options > \uicontrol {Qt Quick} >
|
||||
\uicontrol {Qt Quick Designer} > \uicontrol {Enable Timeline editor}.
|
||||
Select \uicontrol {Restart Now} to restart \QC with the \uicontrol Timeline
|
||||
view visible.
|
||||
|
||||
To be able to create timelines, you also need the \l {Qt Quick Timeline}
|
||||
module, which is delivered with Qt 5.14, and later. For more
|
||||
add-on module, which you can install with Qt 5.14, and later. For more
|
||||
information about adding the module to an older Qt version, see
|
||||
\l{Adding Qt Quick Timeline Module to Qt Installations}.
|
||||
\endif
|
||||
@@ -77,9 +69,7 @@
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol Navigator, select the item to animate.
|
||||
\li Select the \uicontrol Timeline tab to open the \uicontrol Timeline
|
||||
view.
|
||||
\li Select the \inlineimage plus.png
|
||||
\li In the \uicontrol Timeline view, select the \inlineimage plus.png
|
||||
(\uicontrol {Add Timeline (A)}) button, or press \key {A} to
|
||||
specify settings for the timeline and running the animation
|
||||
in the \uicontrol {Timeline Settings} dialog.
|
||||
@@ -144,7 +134,7 @@
|
||||
\section1 Managing Keyframes
|
||||
|
||||
To animate components in the \uicontrol Timeline view, move to a frame
|
||||
on the timeline and specify changes in the values of a property. \QDS
|
||||
on the timeline and specify changes in the values of a property. \QC
|
||||
automatically adds keyframes between two keyframes, and sets their values
|
||||
evenly to create an appearance of movement or transformation.
|
||||
|
||||
@@ -160,7 +150,8 @@
|
||||
\li Select the \uicontrol {To Start (Home)}, \uicontrol {Previous (,)},
|
||||
or \uicontrol {Next (.)} buttons (3), or use the keyboard shortcuts
|
||||
to move to the first, previous, or next frame on the timeline.
|
||||
\li Enter the number of a frame in the field (4) to move to that frame.
|
||||
\li Enter the number of a frame in the current keyframe field (4) to
|
||||
move to that frame.
|
||||
\li Select the \uicontrol Previous and \uicontrol Next buttons next to
|
||||
a property name on the timeline (5) to move to the previous or next
|
||||
keyframe for that property.
|
||||
@@ -231,13 +222,11 @@
|
||||
You can view the animation on the canvas by moving the playhead along the
|
||||
timeline.
|
||||
|
||||
\if defined(qtdesignstudio)
|
||||
To preview the animation, select the \uicontrol {Play (Space)}
|
||||
button or press \key Space. To preview the whole UI, select the
|
||||
\inlineimage live_preview.png
|
||||
(\uicontrol {Show Live Preview}) button on the canvas toolbar
|
||||
or press \key {Alt+P}.
|
||||
\endif
|
||||
|
||||
\section1 Editing Easing Curves
|
||||
|
||||
@@ -247,7 +236,7 @@
|
||||
timeline are \e linear, which means that they move from the beginning to
|
||||
the end at a constant speed. You can use the \uicontrol {Easing Curve Editor}
|
||||
to edit the easing curve between two keyframes. You can also use the more
|
||||
advanced \uicontrol {Curve Editor (C)} to edit the curves for the whole
|
||||
advanced \uicontrol {Animation Curve Editor} to edit the curves for the whole
|
||||
animation.
|
||||
|
||||
\section2 Attaching Easing Curves to Keyframes
|
||||
@@ -306,23 +295,24 @@
|
||||
|
||||
\section1 Editing Animation Curves
|
||||
|
||||
In the curve editor, you can view and modify the whole animation curve. You
|
||||
In the animation curve editor, you can view and modify the whole animation
|
||||
curve. You
|
||||
can insert keyframes to the curve and drag them and the point handlers to
|
||||
modify the curve. You can modify the appearance of the curve in the style
|
||||
editor.
|
||||
|
||||
You can also edit easing curves that you added with the easing curve editor.
|
||||
|
||||
\image studio-curve-editor.png "Curve Editor"
|
||||
\image studio-curve-editor.png "Animation Curve Editor"
|
||||
|
||||
To edit animation curves:
|
||||
|
||||
\list 1
|
||||
\li In the \uicontrol Timeline view, insert at least one keyframe.
|
||||
\li Select \inlineimage curveGraphIcon.png
|
||||
(\uicontrol {Curve Editor (C)} on the toolbar or press \key C
|
||||
to open the curve editor.
|
||||
\li Right-click in the curve editor, and select
|
||||
(\uicontrol {Animation Curve Editor}) on the toolbar or press \key C
|
||||
to open the animation curve editor.
|
||||
\li Right-click in the animation curve editor, and select
|
||||
\uicontrol {Insert Keyframe} to add a keyframe.
|
||||
\li Select keyframes to display the easing curves attached to them.
|
||||
To select multiple keyframes, press and hold \key Ctrl.
|
||||
|
@@ -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 = [
|
||||
|
@@ -800,7 +800,10 @@ def qdump__std____1__shared_ptr(d, value):
|
||||
|
||||
|
||||
def qdump__std__unique_ptr(d, value):
|
||||
if value.type.size() == d.ptrSize():
|
||||
p = d.extractPointer(value)
|
||||
else:
|
||||
_, p = value.split("pp"); # For custom deleters.
|
||||
if p == 0:
|
||||
d.putValue("(null)")
|
||||
d.putNumChild(0)
|
||||
|
@@ -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('\\')) {
|
||||
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();
|
||||
|
@@ -160,7 +160,7 @@ static const CommandDescription commandDescriptions[] = {
|
||||
{"assign","Assigns a value to a variable in current symbol group.",
|
||||
"[-t token] [-h] <iname=value>\n"
|
||||
"-h Data are hex-encoded, binary data\n"
|
||||
"-u Data are hex-encoded, UTF16 data"
|
||||
"-e iname is an hex-encoded expression to be evaluated "
|
||||
},
|
||||
{"threads","Lists threads in GDBMI format.","[-t token]"},
|
||||
{"registers","Lists registers in GDBMI format","[-t token]"},
|
||||
@@ -819,56 +819,76 @@ extern "C" HRESULT CALLBACK assign(CIDebugClient *client, PCSTR argsIn)
|
||||
ExtensionCommandContext exc(client);
|
||||
|
||||
std::string errorMessage;
|
||||
bool success = false;
|
||||
bool encoded = false;
|
||||
bool evaluateExpression = false;
|
||||
int token = 0;
|
||||
do {
|
||||
StringList tokens = commandTokens<StringList>(argsIn, &token);
|
||||
if (tokens.empty()) {
|
||||
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]);
|
||||
break;
|
||||
}
|
||||
|
||||
while (!tokens.empty()) {
|
||||
if (tokens.front() == "-h") {
|
||||
encoded = true;
|
||||
tokens.pop_front();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tokens.empty()) {
|
||||
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]);
|
||||
break;
|
||||
if (tokens.front() == "-e") {
|
||||
evaluateExpression = true;
|
||||
tokens.pop_front();
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
};
|
||||
|
||||
// Parse 'assign locals.x=5'
|
||||
const std::string::size_type equalsPos = tokens.front().find('=');
|
||||
const std::string::size_type equalsPos = tokens.empty() ? std::string::npos
|
||||
: tokens.front().find('=');
|
||||
if (equalsPos == std::string::npos) {
|
||||
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]);
|
||||
break;
|
||||
} else {
|
||||
std::string iname = tokens.front().substr(0, equalsPos);
|
||||
const std::string value = tokens.front().substr(equalsPos + 1,
|
||||
tokens.front().size() - equalsPos - 1);
|
||||
SymbolGroup *symGroup = nullptr;
|
||||
if (evaluateExpression) {
|
||||
WatchesSymbolGroup *watchesSymGroup
|
||||
= ExtensionContext::instance().watchesSymbolGroup(exc.symbols(), &errorMessage);
|
||||
std::string tempAssignIname = "watch.tmpassign";
|
||||
if (watchesSymGroup) {
|
||||
if (watchesSymGroup->addWatch(exc.symbols(),
|
||||
tempAssignIname,
|
||||
stringFromHex(iname),
|
||||
&errorMessage)) {
|
||||
iname = tempAssignIname;
|
||||
symGroup = watchesSymGroup;
|
||||
}
|
||||
const std::string iname = tokens.front().substr(0, equalsPos);
|
||||
const std::string value = tokens.front().substr(equalsPos + 1, tokens.front().size() - equalsPos - 1);
|
||||
}
|
||||
} else {
|
||||
// get the symbolgroup
|
||||
int currentFrame = ExtensionContext::instance().symbolGroupFrame();
|
||||
if (currentFrame < 0) {
|
||||
CIDebugControl *control = ExtensionCommandContext::instance()->control();
|
||||
DEBUG_STACK_FRAME frame;
|
||||
if (FAILED(control->GetStackTrace(0, 0, 0, &frame, 1, NULL))) {
|
||||
if (FAILED(control->GetStackTrace(0, 0, 0, &frame, 1, NULL)))
|
||||
errorMessage = "No current frame.";
|
||||
break;
|
||||
}
|
||||
else
|
||||
currentFrame = frame.FrameNumber;
|
||||
}
|
||||
SymbolGroup *symGroup = ExtensionContext::instance().symbolGroup(exc.symbols(), exc.threadId(), currentFrame, &errorMessage);
|
||||
if (!symGroup)
|
||||
break;
|
||||
success = symGroup->assign(iname, encoded ? stringFromHex(value) : value,
|
||||
SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()),
|
||||
if (currentFrame >= 0) {
|
||||
symGroup = ExtensionContext::instance().symbolGroup(exc.symbols(),
|
||||
exc.threadId(),
|
||||
currentFrame,
|
||||
&errorMessage);
|
||||
} while (false);
|
||||
|
||||
if (success)
|
||||
}
|
||||
}
|
||||
if (symGroup
|
||||
&& symGroup->assign(iname,
|
||||
encoded ? stringFromHex(value) : value,
|
||||
SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()),
|
||||
&errorMessage)) {
|
||||
ExtensionContext::instance().report('R', token, 0, "assign", "Ok");
|
||||
else
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
ExtensionContext::instance().report('N', token, 0, "assign", errorMessage.c_str());
|
||||
return S_OK;
|
||||
}
|
||||
|
@@ -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,10 +33,12 @@
|
||||
#include <app/app_version.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/variablechooser.h>
|
||||
#include <projectexplorer/task.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
#include <projectexplorer/kit.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>
|
||||
@@ -643,6 +645,21 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const
|
||||
return g.matches("NMake Makefiles", extraGenerator)
|
||||
|| g.matches("NMake Makefiles JOM", extraGenerator);
|
||||
});
|
||||
if (ProjectExplorerPlugin::projectExplorerSettings().useJom) {
|
||||
it = std::find_if(known.constBegin(),
|
||||
known.constEnd(),
|
||||
[extraGenerator](const CMakeTool::Generator &g) {
|
||||
return g.matches("NMake Makefiles JOM", extraGenerator);
|
||||
});
|
||||
}
|
||||
|
||||
if (it == known.constEnd()) {
|
||||
it = std::find_if(known.constBegin(),
|
||||
known.constEnd(),
|
||||
[extraGenerator](const CMakeTool::Generator &g) {
|
||||
return g.matches("NMake Makefiles", extraGenerator);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Unix-oid OSes:
|
||||
@@ -770,6 +787,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;
|
||||
|
@@ -170,7 +170,7 @@ static FilePath jsonObjectFilename(const QJsonObject &object)
|
||||
const QString workingDir = QDir::fromNativeSeparators(object["directory"].toString());
|
||||
FilePath fileName = FilePath::fromString(QDir::fromNativeSeparators(object["file"].toString()));
|
||||
if (fileName.toFileInfo().isRelative())
|
||||
fileName = FilePath::fromString(workingDir + "/" + fileName.toString()).canonicalPath();
|
||||
fileName = FilePath::fromString(QDir::cleanPath(workingDir + "/" + fileName.toString()));
|
||||
return fileName;
|
||||
}
|
||||
|
||||
|
@@ -929,8 +929,15 @@ void CdbEngine::assignValueInDebugger(WatchItem *w, const QString &expr, const Q
|
||||
qWarning("Internal error: assignValueInDebugger: Invalid state or no stack frame.");
|
||||
return;
|
||||
}
|
||||
if (m_pythonVersion > 0x030000 && w->isWatcher()) {
|
||||
runCommand({m_extensionCommandPrefix + "assign -h -e " + toHex(w->expression()) + '='
|
||||
+ toHex(value.toString()),
|
||||
NoFlags});
|
||||
} else {
|
||||
runCommand({m_extensionCommandPrefix + "assign -h " + w->iname + '=' + toHex(value.toString()),
|
||||
NoFlags});
|
||||
}
|
||||
|
||||
// Update all locals in case we change a union or something pointed to
|
||||
// that affects other variables, too.
|
||||
updateLocals();
|
||||
|
@@ -500,8 +500,13 @@ void QmakeBuildSystem::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
|
||||
|
||||
void QmakeBuildSystem::incrementPendingEvaluateFutures()
|
||||
{
|
||||
if (m_pendingEvaluateFuturesCount == 0)
|
||||
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,21 @@ 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());
|
||||
BindingProperty::deleteAllReferencesTo(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;
|
||||
|
@@ -2034,6 +2034,9 @@ FilePaths BaseQtVersionPrivate::qtCorePaths()
|
||||
else if (file.endsWith(".dll")
|
||||
|| file.endsWith(QString::fromLatin1(".so.") + versionString)
|
||||
|| file.endsWith(".so")
|
||||
#if defined(Q_OS_OPENBSD)
|
||||
|| file.contains(QRegularExpression("\\.so\\.[0-9]+\\.[0-9]+$")) // QTCREATORBUG-23818
|
||||
#endif
|
||||
|| file.endsWith(QLatin1Char('.') + versionString + ".dylib"))
|
||||
dynamicLibs.append(FilePath::fromFileInfo(info));
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -4706,14 +4706,19 @@ void tst_Dumpers::dumper_data()
|
||||
|
||||
QTest::newRow("StdUniquePtr")
|
||||
<< Data("#include <memory>\n"
|
||||
"#include <string>\n" + fooData,
|
||||
"#include <string>\n" + fooData +
|
||||
|
||||
"static Foo *alloc_foo() { return new Foo; }\n"
|
||||
"static void free_foo(Foo *f) { delete f; }\n",
|
||||
|
||||
"std::unique_ptr<int> p0;\n\n"
|
||||
"std::unique_ptr<int> p1(new int(32));\n\n"
|
||||
"std::unique_ptr<Foo> p2(new Foo);\n\n"
|
||||
"std::unique_ptr<std::string> p3(new std::string(\"ABC\"));",
|
||||
"std::unique_ptr<std::string> p3(new std::string(\"ABC\"));\n"
|
||||
|
||||
"&p0, &p1, &p2, &p3")
|
||||
"std::unique_ptr<Foo, void(*)(Foo*)> p4{alloc_foo(), free_foo};",
|
||||
|
||||
"&p0, &p1, &p2, &p3, &p4")
|
||||
|
||||
+ CoreProfile()
|
||||
+ Cxx11Profile()
|
||||
@@ -4722,7 +4727,8 @@ void tst_Dumpers::dumper_data()
|
||||
+ Check("p0", "(null)", "std::unique_ptr<int, std::default_delete<int> >")
|
||||
+ Check("p1", "32", "std::unique_ptr<int, std::default_delete<int> >")
|
||||
+ Check("p2", Pointer(), "std::unique_ptr<Foo, std::default_delete<Foo> >")
|
||||
+ Check("p3", "\"ABC\"", "std::unique_ptr<std::string, std::default_delete<std::string> >");
|
||||
+ Check("p3", "\"ABC\"", "std::unique_ptr<std::string, std::default_delete<std::string> >")
|
||||
+ Check("p4.b", "2", "int");
|
||||
|
||||
|
||||
QTest::newRow("StdOnce")
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user