Merge "Merge remote-tracking branch 'origin/4.12' into qds-1.50" into qds-1.50

This commit is contained in:
The Qt Project
2020-04-24 11:34:38 +00:00
35 changed files with 4908 additions and 4813 deletions

View File

@@ -229,7 +229,11 @@ function(set_public_includes target includes)
if (NOT IS_ABSOLUTE ${inc_dir}) if (NOT IS_ABSOLUTE ${inc_dir})
set(inc_dir "${CMAKE_CURRENT_SOURCE_DIR}/${inc_dir}") set(inc_dir "${CMAKE_CURRENT_SOURCE_DIR}/${inc_dir}")
endif() 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() endforeach()
endfunction() endfunction()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -64,7 +64,7 @@
The \uicontrol {Qt Quick Application} wizards for a particular platform add The \uicontrol {Qt Quick Application} wizards for a particular platform add
the import statements automatically. You can remove import statements in 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 \uicontrol {Assets} displays the images and other files that you copy
to the project folder (to the same subfolder as the QML files). 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 \li Add states to apply sets of changes to the properties of one or
several components in the \uicontrol States view (6). For more several components in the \uicontrol States view (6). For more
information, see \l{Adding States}. information, see \l{Adding States}.
\li Animate component properties in the \uicontrol Timeline view (7).
For more information, see \l{Creating Animations}.
\endlist \endlist
\section1 Using Basic QML Types \section1 Using Basic QML Types

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Creator documentation. ** This file is part of the Qt Creator documentation.
@@ -52,17 +52,9 @@
{here}. {here}.
\if defined(qtcreator) \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} 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 information about adding the module to an older Qt version, see
\l{Adding Qt Quick Timeline Module to Qt Installations}. \l{Adding Qt Quick Timeline Module to Qt Installations}.
\endif \endif
@@ -77,9 +69,7 @@
\list 1 \list 1
\li In the \uicontrol Navigator, select the item to animate. \li In the \uicontrol Navigator, select the item to animate.
\li Select the \uicontrol Timeline tab to open the \uicontrol Timeline \li In the \uicontrol Timeline view, select the \inlineimage plus.png
view.
\li Select the \inlineimage plus.png
(\uicontrol {Add Timeline (A)}) button, or press \key {A} to (\uicontrol {Add Timeline (A)}) button, or press \key {A} to
specify settings for the timeline and running the animation specify settings for the timeline and running the animation
in the \uicontrol {Timeline Settings} dialog. in the \uicontrol {Timeline Settings} dialog.
@@ -144,7 +134,7 @@
\section1 Managing Keyframes \section1 Managing Keyframes
To animate components in the \uicontrol Timeline view, move to a frame 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 automatically adds keyframes between two keyframes, and sets their values
evenly to create an appearance of movement or transformation. evenly to create an appearance of movement or transformation.
@@ -160,7 +150,8 @@
\li Select the \uicontrol {To Start (Home)}, \uicontrol {Previous (,)}, \li Select the \uicontrol {To Start (Home)}, \uicontrol {Previous (,)},
or \uicontrol {Next (.)} buttons (3), or use the keyboard shortcuts or \uicontrol {Next (.)} buttons (3), or use the keyboard shortcuts
to move to the first, previous, or next frame on the timeline. 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 \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 a property name on the timeline (5) to move to the previous or next
keyframe for that property. keyframe for that property.
@@ -231,13 +222,11 @@
You can view the animation on the canvas by moving the playhead along the You can view the animation on the canvas by moving the playhead along the
timeline. timeline.
\if defined(qtdesignstudio)
To preview the animation, select the \uicontrol {Play (Space)} To preview the animation, select the \uicontrol {Play (Space)}
button or press \key Space. To preview the whole UI, select the button or press \key Space. To preview the whole UI, select the
\inlineimage live_preview.png \inlineimage live_preview.png
(\uicontrol {Show Live Preview}) button on the canvas toolbar (\uicontrol {Show Live Preview}) button on the canvas toolbar
or press \key {Alt+P}. or press \key {Alt+P}.
\endif
\section1 Editing Easing Curves \section1 Editing Easing Curves
@@ -247,7 +236,7 @@
timeline are \e linear, which means that they move from the beginning to 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} 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 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. animation.
\section2 Attaching Easing Curves to Keyframes \section2 Attaching Easing Curves to Keyframes
@@ -306,23 +295,24 @@
\section1 Editing Animation Curves \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 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 modify the curve. You can modify the appearance of the curve in the style
editor. editor.
You can also edit easing curves that you added with the easing curve 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: To edit animation curves:
\list 1 \list 1
\li In the \uicontrol Timeline view, insert at least one keyframe. \li In the \uicontrol Timeline view, insert at least one keyframe.
\li Select \inlineimage curveGraphIcon.png \li Select \inlineimage curveGraphIcon.png
(\uicontrol {Curve Editor (C)} on the toolbar or press \key C (\uicontrol {Animation Curve Editor}) on the toolbar or press \key C
to open the curve editor. to open the animation curve editor.
\li Right-click in the curve editor, and select \li Right-click in the animation curve editor, and select
\uicontrol {Insert Keyframe} to add a keyframe. \uicontrol {Insert Keyframe} to add a keyframe.
\li Select keyframes to display the easing curves attached to them. \li Select keyframes to display the easing curves attached to them.
To select multiple keyframes, press and hold \key Ctrl. To select multiple keyframes, press and hold \key Ctrl.

View File

@@ -8,8 +8,6 @@ headerdirs =
sourcedirs = ../src \ sourcedirs = ../src \
../examples/doc \ ../examples/doc \
../../qtcreator/src ../../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 \ imagedirs = ../images \
../examples/doc/images \ ../examples/doc/images \
../../qtcreator/images \ ../../qtcreator/images \
@@ -23,6 +21,7 @@ imagedirs = ../images \
../../../src/plugins/help/images \ ../../../src/plugins/help/images \
../../../src/plugins/projectexplorer/images \ ../../../src/plugins/projectexplorer/images \
../../../src/plugins/qmldesigner/components/componentcore/images \ ../../../src/plugins/qmldesigner/components/componentcore/images \
../../../src/plugins/qmldesigner/components/edit3d/images \
../../../src/plugins/qmldesigner/components/formeditor \ ../../../src/plugins/qmldesigner/components/formeditor \
../../../src/plugins/qmldesigner/components/navigator \ ../../../src/plugins/qmldesigner/components/navigator \
../../../src/plugins/qmldesigner/components/timelineeditor/images \ ../../../src/plugins/qmldesigner/components/timelineeditor/images \

View File

@@ -67,23 +67,7 @@ source_include_patterns = [
r"^doc/.*$", # include everything under doc/ r"^doc/.*$", # include everything under doc/
r"^.*\.pri$", # .pri files in all directories that are looked into r"^.*\.pri$", # .pri files in all directories that are looked into
r"^.*\.h$", # .h 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 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$"
] ]
build_include_patterns = [ build_include_patterns = [

View File

@@ -800,7 +800,10 @@ def qdump__std____1__shared_ptr(d, value):
def qdump__std__unique_ptr(d, value): def qdump__std__unique_ptr(d, value):
p = d.extractPointer(value) if value.type.size() == d.ptrSize():
p = d.extractPointer(value)
else:
_, p = value.split("pp"); # For custom deleters.
if p == 0: if p == 0:
d.putValue("(null)") d.putValue("(null)")
d.putNumChild(0) d.putNumChild(0)

View File

@@ -51,6 +51,8 @@ Rectangle {
property real __actionIndicatorWidth: StudioTheme.Values.squareComponentWidth property real __actionIndicatorWidth: StudioTheme.Values.squareComponentWidth
property real __actionIndicatorHeight: StudioTheme.Values.height property real __actionIndicatorHeight: StudioTheme.Values.height
property string typeFilter: "QtQuick3D.Material"
color: "transparent" color: "transparent"
border.color: StudioTheme.Values.themeControlOutline border.color: StudioTheme.Values.themeControlOutline
border.width: StudioTheme.Values.border border.width: StudioTheme.Values.border
@@ -69,7 +71,7 @@ Rectangle {
validator: RegExpValidator { regExp: /(^[a-z_]\w*|^[A-Z]\w*\.{1}([a-z_]\w*\.?)+)/ } validator: RegExpValidator { regExp: /(^[a-z_]\w*|^[A-Z]\w*\.{1}([a-z_]\w*\.?)+)/ }
actionIndicatorVisible: false actionIndicatorVisible: false
typeFilter: "QtQuick3D.Material" typeFilter: editableListView.typeFilter
editText: modelData editText: modelData
initialModelData: modelData initialModelData: modelData

View File

@@ -73,8 +73,12 @@ bool ComponentVersion::isValid() const
QString ComponentVersion::toString() const QString ComponentVersion::toString() const
{ {
return QString::fromLatin1("%1.%2").arg(QString::number(_major), QByteArray temp;
QString::number(_minor)); QByteArray result;
result += temp.setNum(_major);
result += '.';
result += temp.setNum(_minor);
return QString::fromLatin1(result);
} }
void ComponentVersion::addToHash(QCryptographicHash &hash) const void ComponentVersion::addToHash(QCryptographicHash &hash) const

View File

@@ -7,6 +7,7 @@ add_qtc_library(QmlJS
parser/qmljsast.cpp parser/qmljsast_p.h parser/qmljsast.cpp parser/qmljsast_p.h
parser/qmljsastfwd_p.h parser/qmljsastfwd_p.h
parser/qmljsastvisitor.cpp parser/qmljsastvisitor_p.h parser/qmljsastvisitor.cpp parser/qmljsastvisitor_p.h
parser/qmljsdiagnosticmessage_p.h
parser/qmljsengine_p.cpp parser/qmljsengine_p.h parser/qmljsengine_p.cpp parser/qmljsengine_p.h
parser/qmljsglobal_p.h parser/qmljsglobal_p.h
parser/qmljsgrammar.cpp parser/qmljsgrammar_p.h parser/qmljsgrammar.cpp parser/qmljsgrammar_p.h

View File

@@ -872,6 +872,7 @@ int Lexer::scanString(ScanStringMode mode)
{ {
QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode); QChar quote = (mode == TemplateContinuation) ? QChar(TemplateHead) : QChar(mode);
bool multilineStringLiteral = false; bool multilineStringLiteral = false;
bool escaped = false;
const QChar *startCode = _codePtr - 1; const QChar *startCode = _codePtr - 1;
// in case we just parsed a \r, we need to reset this flag to get things working // 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) { if (_engine) {
while (_codePtr <= _endPtr) { while (_codePtr <= _endPtr) {
if (escaped) { // former char started an escape sequence
escaped = false;
_char = *_codePtr++;
++_currentColumnNumber;
continue;
}
if (isLineTerminator()) { if (isLineTerminator()) {
if ((quote == QLatin1Char('`') || qmlMode())) if ((quote == QLatin1Char('`') || qmlMode()))
break; break;
@@ -887,7 +894,10 @@ int Lexer::scanString(ScanStringMode mode)
_errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal"); _errorMessage = QCoreApplication::translate("QmlParser", "Stray newline in string literal");
return T_ERROR; return T_ERROR;
} else if (_char == QLatin1Char('\\')) { } 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('`')) { } else if (_char == '$' && quote == QLatin1Char('`')) {
break; break;
} else if (_char == quote) { } else if (_char == quote) {

View File

@@ -395,6 +395,8 @@ const Value *CppComponentValue::valueForCppName(const QString &typeName) const
return valueOwner()->realValue(); return valueOwner()->realValue();
} else if (typeName == QLatin1String("QFont")) { } else if (typeName == QLatin1String("QFont")) {
return valueOwner()->qmlFontObject(); return valueOwner()->qmlFontObject();
} else if (typeName == QLatin1String("QPalette")) {
return valueOwner()->qmlPaletteObject();
} else if (typeName == QLatin1String("QPoint") } else if (typeName == QLatin1String("QPoint")
|| typeName == QLatin1String("QPointF") || typeName == QLatin1String("QPointF")
|| typeName == QLatin1String("QVector2D")) { || typeName == QLatin1String("QVector2D")) {

View File

@@ -95,6 +95,7 @@ public:
ObjectValue *_mathObject; ObjectValue *_mathObject;
ObjectValue *_qtObject; ObjectValue *_qtObject;
ObjectValue *_qmlFontObject; ObjectValue *_qmlFontObject;
ObjectValue *_qmlPaletteObject;
ObjectValue *_qmlPointObject; ObjectValue *_qmlPointObject;
ObjectValue *_qmlSizeObject; ObjectValue *_qmlSizeObject;
ObjectValue *_qmlRectObject; ObjectValue *_qmlRectObject;
@@ -496,6 +497,28 @@ SharedValueOwner::SharedValueOwner(SharedValueOwnerKind kind)
_qmlFontObject->setMember(QLatin1String("kerning"), booleanValue()); _qmlFontObject->setMember(QLatin1String("kerning"), booleanValue());
_qmlFontObject->setMember(QLatin1String("preferShaping"), 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 = newObject(/*prototype =*/ nullptr);
_qmlPointObject->setClassName(QLatin1String("Point")); _qmlPointObject->setClassName(QLatin1String("Point"));
_qmlPointObject->setMember(QLatin1String("x"), numberValue()); _qmlPointObject->setMember(QLatin1String("x"), numberValue());
@@ -896,6 +919,11 @@ const ObjectValue *ValueOwner::qmlFontObject()
return _shared->_qmlFontObject; return _shared->_qmlFontObject;
} }
const ObjectValue *ValueOwner::qmlPaletteObject()
{
return _shared->_qmlPaletteObject;
}
const ObjectValue *ValueOwner::qmlPointObject() const ObjectValue *ValueOwner::qmlPointObject()
{ {
return _shared->_qmlPointObject; return _shared->_qmlPointObject;

View File

@@ -82,6 +82,7 @@ public:
// QML objects // QML objects
const ObjectValue *qmlFontObject(); const ObjectValue *qmlFontObject();
const ObjectValue *qmlPaletteObject();
const ObjectValue *qmlPointObject(); const ObjectValue *qmlPointObject();
const ObjectValue *qmlSizeObject(); const ObjectValue *qmlSizeObject();
const ObjectValue *qmlRectObject(); const ObjectValue *qmlRectObject();

View File

@@ -160,7 +160,7 @@ static const CommandDescription commandDescriptions[] = {
{"assign","Assigns a value to a variable in current symbol group.", {"assign","Assigns a value to a variable in current symbol group.",
"[-t token] [-h] <iname=value>\n" "[-t token] [-h] <iname=value>\n"
"-h Data are hex-encoded, binary data\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]"}, {"threads","Lists threads in GDBMI format.","[-t token]"},
{"registers","Lists registers in GDBMI format","[-t token]"}, {"registers","Lists registers in GDBMI format","[-t token]"},
@@ -819,57 +819,77 @@ extern "C" HRESULT CALLBACK assign(CIDebugClient *client, PCSTR argsIn)
ExtensionCommandContext exc(client); ExtensionCommandContext exc(client);
std::string errorMessage; std::string errorMessage;
bool success = false;
bool encoded = false; bool encoded = false;
bool evaluateExpression = false;
int token = 0; int token = 0;
do { StringList tokens = commandTokens<StringList>(argsIn, &token);
StringList tokens = commandTokens<StringList>(argsIn, &token); while (!tokens.empty()) {
if (tokens.empty()) {
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]);
break;
}
if (tokens.front() == "-h") { if (tokens.front() == "-h") {
encoded = true; encoded = true;
tokens.pop_front(); tokens.pop_front();
continue;
} }
if (tokens.empty()) { if (tokens.front() == "-e") {
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]); evaluateExpression = true;
break; tokens.pop_front();
continue;
} }
break;
};
// Parse 'assign locals.x=5' // 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
if (equalsPos == std::string::npos) { : tokens.front().find('=');
errorMessage = singleLineUsage(commandDescriptions[CmdAssign]); if (equalsPos == std::string::npos) {
break; errorMessage = singleLineUsage(commandDescriptions[CmdAssign]);
} } else {
const std::string iname = tokens.front().substr(0, equalsPos); std::string iname = tokens.front().substr(0, equalsPos);
const std::string value = tokens.front().substr(equalsPos + 1, tokens.front().size() - equalsPos - 1); const std::string value = tokens.front().substr(equalsPos + 1,
// get the symbolgroup tokens.front().size() - equalsPos - 1);
int currentFrame = ExtensionContext::instance().symbolGroupFrame(); SymbolGroup *symGroup = nullptr;
if (currentFrame < 0) { if (evaluateExpression) {
CIDebugControl *control = ExtensionCommandContext::instance()->control(); WatchesSymbolGroup *watchesSymGroup
DEBUG_STACK_FRAME frame; = ExtensionContext::instance().watchesSymbolGroup(exc.symbols(), &errorMessage);
if (FAILED(control->GetStackTrace(0, 0, 0, &frame, 1, NULL))) { std::string tempAssignIname = "watch.tmpassign";
errorMessage = "No current frame."; if (watchesSymGroup) {
break; if (watchesSymGroup->addWatch(exc.symbols(),
tempAssignIname,
stringFromHex(iname),
&errorMessage)) {
iname = tempAssignIname;
symGroup = watchesSymGroup;
}
}
} 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)))
errorMessage = "No current frame.";
else
currentFrame = frame.FrameNumber;
}
if (currentFrame >= 0) {
symGroup = ExtensionContext::instance().symbolGroup(exc.symbols(),
exc.threadId(),
currentFrame,
&errorMessage);
} }
currentFrame = frame.FrameNumber;
} }
SymbolGroup *symGroup = ExtensionContext::instance().symbolGroup(exc.symbols(), exc.threadId(), currentFrame, &errorMessage); if (symGroup
if (!symGroup) && symGroup->assign(iname,
break; encoded ? stringFromHex(value) : value,
success = symGroup->assign(iname, encoded ? stringFromHex(value) : value, SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()),
SymbolGroupValueContext(exc.dataSpaces(), exc.symbols()), &errorMessage)) {
&errorMessage); ExtensionContext::instance().report('R', token, 0, "assign", "Ok");
} while (false); return S_OK;
}
}
if (success) ExtensionContext::instance().report('N', token, 0, "assign", errorMessage.c_str());
ExtensionContext::instance().report('R', token, 0, "assign", "Ok");
else
ExtensionContext::instance().report('N', token, 0, "assign", errorMessage.c_str());
return S_OK; return S_OK;
} }

View File

@@ -698,6 +698,7 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection,
connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted); connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted);
connect(m_runWorker, &ClangToolRunWorker::runnerFinished, connect(m_runWorker, &ClangToolRunWorker::runnerFinished,
this, &ClangTool::updateForCurrentState); this, &ClangTool::updateForCurrentState);
connect(m_runControl, &RunControl::destroyed, [this](){ m_runWorker = nullptr; });
// More init and UI update // More init and UI update
m_diagnosticFilterModel->setProject(project); m_diagnosticFilterModel->setProject(project);
@@ -1038,6 +1039,8 @@ void ClangTool::onRunControlStopped()
void ClangTool::update() void ClangTool::update()
{ {
updateForInitialState(); updateForInitialState();
if (!m_runWorker)
return;
updateForCurrentState(); updateForCurrentState();
} }

View File

@@ -33,10 +33,12 @@
#include <app/app_version.h> #include <app/app_version.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/variablechooser.h> #include <coreplugin/variablechooser.h>
#include <projectexplorer/task.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/kitinformation.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/baseqtversion.h>
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
@@ -643,6 +645,21 @@ QVariant CMakeGeneratorKitAspect::defaultValue(const Kit *k) const
return g.matches("NMake Makefiles", extraGenerator) return g.matches("NMake Makefiles", extraGenerator)
|| g.matches("NMake Makefiles JOM", 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 { } else {
// Unix-oid OSes: // Unix-oid OSes:
@@ -770,6 +787,16 @@ KitAspectWidget *CMakeGeneratorKitAspect::createConfigWidget(Kit *k) const
return new CMakeGeneratorKitAspectWidget(k, this); 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: // CMakeConfigurationKitAspect:
// -------------------------------------------------------------------- // --------------------------------------------------------------------

View File

@@ -83,6 +83,7 @@ public:
void upgrade(ProjectExplorer::Kit *k) final; void upgrade(ProjectExplorer::Kit *k) final;
ItemList toUserOutput(const ProjectExplorer::Kit *k) const final; ItemList toUserOutput(const ProjectExplorer::Kit *k) const final;
ProjectExplorer::KitAspectWidget *createConfigWidget(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: private:
QVariant defaultValue(const ProjectExplorer::Kit *k) const; QVariant defaultValue(const ProjectExplorer::Kit *k) const;

View File

@@ -170,7 +170,7 @@ static FilePath jsonObjectFilename(const QJsonObject &object)
const QString workingDir = QDir::fromNativeSeparators(object["directory"].toString()); const QString workingDir = QDir::fromNativeSeparators(object["directory"].toString());
FilePath fileName = FilePath::fromString(QDir::fromNativeSeparators(object["file"].toString())); FilePath fileName = FilePath::fromString(QDir::fromNativeSeparators(object["file"].toString()));
if (fileName.toFileInfo().isRelative()) if (fileName.toFileInfo().isRelative())
fileName = FilePath::fromString(workingDir + "/" + fileName.toString()).canonicalPath(); fileName = FilePath::fromString(QDir::cleanPath(workingDir + "/" + fileName.toString()));
return fileName; return fileName;
} }

View File

@@ -929,8 +929,15 @@ void CdbEngine::assignValueInDebugger(WatchItem *w, const QString &expr, const Q
qWarning("Internal error: assignValueInDebugger: Invalid state or no stack frame."); qWarning("Internal error: assignValueInDebugger: Invalid state or no stack frame.");
return; return;
} }
runCommand({m_extensionCommandPrefix + "assign -h " + w->iname + '=' + toHex(value.toString()), if (m_pythonVersion > 0x030000 && w->isWatcher()) {
NoFlags}); 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 // Update all locals in case we change a union or something pointed to
// that affects other variables, too. // that affects other variables, too.
updateLocals(); updateLocals();

View File

@@ -500,8 +500,13 @@ void QmakeBuildSystem::startAsyncTimer(QmakeProFile::AsyncUpdateDelay delay)
void QmakeBuildSystem::incrementPendingEvaluateFutures() void QmakeBuildSystem::incrementPendingEvaluateFutures()
{ {
if (m_pendingEvaluateFuturesCount == 0) if (m_pendingEvaluateFuturesCount == 0) {
m_guard = guardParsingRun(); // 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_pendingEvaluateFuturesCount;
m_asyncUpdateFutureInterface.setProgressRange(m_asyncUpdateFutureInterface.progressMinimum(), m_asyncUpdateFutureInterface.setProgressRange(m_asyncUpdateFutureInterface.progressMinimum(),
m_asyncUpdateFutureInterface.progressMaximum() + 1); m_asyncUpdateFutureInterface.progressMaximum() + 1);

View File

@@ -144,6 +144,7 @@ extend_qtc_plugin(QmlDesigner
extend_qtc_plugin(QmlDesigner extend_qtc_plugin(QmlDesigner
SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/interfaces SOURCES_PREFIX ../../../share/qtcreator/qml/qmlpuppet/interfaces
PUBLIC_INCLUDES ../../../share/qtcreator/qml/qmlpuppet/interfaces
SOURCES SOURCES
nodeinstanceserverinterface.cpp nodeinstanceserverinterface.cpp
commondefines.h commondefines.h
@@ -202,6 +203,7 @@ extend_qtc_plugin(QmlDesigner
extend_qtc_plugin(QmlDesigner extend_qtc_plugin(QmlDesigner
SOURCES_PREFIX components/formeditor SOURCES_PREFIX components/formeditor
PUBLIC_INCLUDES components/formeditor
SOURCES SOURCES
abstractcustomtool.cpp abstractcustomtool.h abstractcustomtool.cpp abstractcustomtool.h
abstractformeditortool.cpp abstractformeditortool.h abstractformeditortool.cpp abstractformeditortool.h
@@ -258,6 +260,7 @@ extend_qtc_plugin(QmlDesigner
extend_qtc_plugin(QmlDesigner extend_qtc_plugin(QmlDesigner
SOURCES_PREFIX components/integration SOURCES_PREFIX components/integration
PUBLIC_INCLUDES components/integration
SOURCES SOURCES
componentaction.cpp componentaction.h componentaction.cpp componentaction.h
componentview.cpp componentview.h componentview.cpp componentview.h
@@ -471,6 +474,7 @@ extend_qtc_plugin(QmlDesigner
extend_qtc_plugin(QmlDesigner extend_qtc_plugin(QmlDesigner
SOURCES_PREFIX designercore SOURCES_PREFIX designercore
PUBLIC_INCLUDES designercore
SOURCES SOURCES
metainfo/itemlibraryinfo.cpp metainfo/itemlibraryinfo.cpp
metainfo/metainfo.cpp metainfo/metainfo.cpp

View File

@@ -238,11 +238,6 @@ QMimeData *ItemLibraryModel::getMimeData(const ItemLibraryEntry &itemLibraryEntr
return mimeData; return mimeData;
} }
QList<ItemLibrarySection *> ItemLibraryModel::sections() const
{
return m_sections;
}
void ItemLibraryModel::clearSections() void ItemLibraryModel::clearSections()
{ {
qDeleteAll(m_sections); qDeleteAll(m_sections);

View File

@@ -58,17 +58,8 @@ public:
QMimeData *getMimeData(const ItemLibraryEntry &itemLibraryEntry); QMimeData *getMimeData(const ItemLibraryEntry &itemLibraryEntry);
QList<ItemLibrarySection*> sections() const;
void clearSections();
static void registerQmlTypes(); static void registerQmlTypes();
int visibleSectionCount() const;
QList<ItemLibrarySection*> visibleSections() const;
ItemLibrarySection *sectionByName(const QString &sectionName);
void setSearchText(const QString &searchText); void setSearchText(const QString &searchText);
void setExpanded(bool, const QString &section); void setExpanded(bool, const QString &section);
@@ -80,13 +71,15 @@ signals:
void searchTextChanged(); void searchTextChanged();
private: // functions private: // functions
ItemLibrarySection *sectionByName(const QString &sectionName);
void updateVisibility(bool *changed); void updateVisibility(bool *changed);
void addRoleNames(); void addRoleNames();
void sortSections(); void sortSections();
void clearSections();
private: // variables private: // variables
QList<ItemLibrarySection*> m_sections; QList<QPointer<ItemLibrarySection>> m_sections;
QHash<int, QByteArray> m_roleNames; QHash<int, QByteArray> m_roleNames;
QString m_searchText; QString m_searchText;

View File

@@ -101,13 +101,15 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
m_itemViewQuickWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports"); m_itemViewQuickWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports");
m_itemLibraryModel = new ItemLibraryModel(this); m_itemLibraryModel = new ItemLibraryModel(this);
QQmlContext *rootContext = m_itemViewQuickWidget->rootContext(); m_itemViewQuickWidget->rootContext()->setContextProperties(
rootContext->setContextProperty(QStringLiteral("itemLibraryModel"), m_itemLibraryModel.data()); QVector<QQmlContext::PropertyPair>{
rootContext->setContextProperty(QStringLiteral("itemLibraryIconWidth"), m_itemIconSize.width()); {"itemLibraryModel", QVariant::fromValue(m_itemLibraryModel.data())},
rootContext->setContextProperty(QStringLiteral("itemLibraryIconHeight"), m_itemIconSize.height()); {"itemLibraryIconWidth", m_itemIconSize.width()},
rootContext->setContextProperty(QStringLiteral("rootView"), this); {"itemLibraryIconHeight", m_itemIconSize.height()},
{"rootView", QVariant::fromValue(this)},
m_itemViewQuickWidget->rootContext()->setContextProperty(QStringLiteral("highlightColor"), Utils::StyleHelper::notTooBrightHighlightColor()); {"highlightColor", Utils::StyleHelper::notTooBrightHighlightColor()}
}
);
/* create Resources view and its model */ /* create Resources view and its model */
m_resourcesFileSystemModel = new CustomFileSystemModel(this); m_resourcesFileSystemModel = new CustomFileSystemModel(this);

View File

@@ -379,9 +379,12 @@ void PropertyEditorQmlBackend::setup(const QmlObjectNode &qmlObjectNode, const Q
// anchors // anchors
m_backendAnchorBinding.setup(qmlObjectNode.modelNode()); m_backendAnchorBinding.setup(qmlObjectNode.modelNode());
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding); context()->setContextProperties(
QVector<QQmlContext::PropertyPair>{
context()->setContextProperty(QLatin1String("transaction"), m_propertyEditorTransaction.data()); {{"anchorBackend"}, QVariant::fromValue(&m_backendAnchorBinding)},
{{"transaction"}, QVariant::fromValue(m_propertyEditorTransaction.data())}
}
);
qCInfo(propertyEditorBenchmark) << "anchors:" << time.elapsed(); 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); QObject::connect(valueObject, &PropertyEditorValue::valueChanged, &backendValuesPropertyMap(), &DesignerPropertyMap::valueChanged);
m_backendValuesPropertyMap.insert(QLatin1String("id"), QVariant::fromValue(valueObject)); m_backendValuesPropertyMap.insert(QLatin1String("id"), QVariant::fromValue(valueObject));
context()->setContextProperty(QLatin1String("anchorBackend"), &m_backendAnchorBinding); context()->setContextProperties(
context()->setContextProperty(QLatin1String("modelNodeBackend"), &m_backendModelNode); QVector<QQmlContext::PropertyPair>{
context()->setContextProperty(QLatin1String("transaction"), m_propertyEditorTransaction.data()); {{"anchorBackend"}, QVariant::fromValue(&m_backendAnchorBinding)},
{{"modelNodeBackend"}, QVariant::fromValue(&m_backendModelNode)},
{{"transaction"}, QVariant::fromValue(m_propertyEditorTransaction.data())}
}
);
contextObject()->setSpecificsUrl(qmlSpecificsFile); contextObject()->setSpecificsUrl(qmlSpecificsFile);

View File

@@ -102,9 +102,12 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
setResizeMode(QQuickWidget::SizeRootObjectToView); setResizeMode(QQuickWidget::SizeRootObjectToView);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
rootContext()->setContextProperty(QStringLiteral("statesEditorModel"), statesEditorModel); rootContext()->setContextProperties(
QVector<QQmlContext::PropertyPair>{
rootContext()->setContextProperty(QLatin1String("canAddNewStates"), true); {{"statesEditorModel"}, QVariant::fromValue(statesEditorModel)},
{{"canAddNewStates"}, true}
}
);
Theme::setupTheme(engine()); Theme::setupTheme(engine());

View File

@@ -650,7 +650,7 @@ PropertyName NodeMetaInfoPrivate::defaultPropertyName() const
static inline TypeName stringIdentifier( const TypeName &type, int maj, int min) 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) NodeMetaInfoPrivate::Pointer NodeMetaInfoPrivate::create(Model *model, const TypeName &type, int major, int minor)

View File

@@ -381,11 +381,21 @@ void QmlObjectNode::destroy()
timeline.destroyKeyframesForTarget(subNode); timeline.destroyKeyframesForTarget(subNode);
} }
if (QmlFlowActionAreaNode::isValidQmlFlowActionAreaNode(modelNode())) bool wasFlowEditorTarget = false;
QmlFlowActionAreaNode(modelNode()).destroyTarget(); if (QmlFlowTargetNode::isFlowEditorTarget(modelNode())) {
QmlFlowTargetNode(modelNode()).destroyTargets();
wasFlowEditorTarget = true;
}
removeStateOperationsForChildren(modelNode()); removeStateOperationsForChildren(modelNode());
BindingProperty::deleteAllReferencesTo(modelNode());
QmlFlowViewNode root(view()->rootModelNode());
modelNode().destroy(); modelNode().destroy();
if (wasFlowEditorTarget && root.isValid())
root.removeDanglingTransitions();
} }
void QmlObjectNode::ensureAliasExport() void QmlObjectNode::ensureAliasExport()

View File

@@ -84,6 +84,7 @@ void DesignerSettings::fromSettings(QSettings *settings)
); );
restoreValue(settings, DesignerSettingsKey::SIMPLE_COLOR_PALETTE_CONTENT, QStringList()); restoreValue(settings, DesignerSettingsKey::SIMPLE_COLOR_PALETTE_CONTENT, QStringList());
restoreValue(settings, DesignerSettingsKey::ALWAYS_DESIGN_MODE, true); restoreValue(settings, DesignerSettingsKey::ALWAYS_DESIGN_MODE, true);
restoreValue(settings, DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER, true);
settings->endGroup(); settings->endGroup();
settings->endGroup(); settings->endGroup();

View File

@@ -791,7 +791,7 @@ void QmlJSEditorWidget::findLinkAt(const QTextCursor &cursor,
const QString relative = QString::fromLatin1("%1/%2").arg( const QString relative = QString::fromLatin1("%1/%2").arg(
semanticInfo.document->path(), semanticInfo.document->path(),
text); text);
if (semanticInfo.snapshot.document(relative)) { if (QFileInfo::exists(relative)) {
link.targetFileName = relative; link.targetFileName = relative;
processLinkCallback(link); processLinkCallback(link);
return; return;

View File

@@ -2034,6 +2034,9 @@ FilePaths BaseQtVersionPrivate::qtCorePaths()
else if (file.endsWith(".dll") else if (file.endsWith(".dll")
|| file.endsWith(QString::fromLatin1(".so.") + versionString) || file.endsWith(QString::fromLatin1(".so.") + versionString)
|| file.endsWith(".so") || file.endsWith(".so")
#if defined(Q_OS_OPENBSD)
|| file.contains(QRegularExpression("\\.so\\.[0-9]+\\.[0-9]+$")) // QTCREATORBUG-23818
#endif
|| file.endsWith(QLatin1Char('.') + versionString + ".dylib")) || file.endsWith(QLatin1Char('.') + versionString + ".dylib"))
dynamicLibs.append(FilePath::fromFileInfo(info)); dynamicLibs.append(FilePath::fromFileInfo(info));
} }

View File

@@ -107,6 +107,7 @@
#include <QPropertyAnimation> #include <QPropertyAnimation>
#include <QDrag> #include <QDrag>
#include <QSequentialAnimationGroup> #include <QSequentialAnimationGroup>
#include <QScreen>
#include <QScrollBar> #include <QScrollBar>
#include <QShortcut> #include <QShortcut>
#include <QStyle> #include <QStyle>
@@ -1199,7 +1200,11 @@ void TextEditorWidgetPrivate::print(QPrinter *printer)
QAbstractTextDocumentLayout *layout = doc->documentLayout(); QAbstractTextDocumentLayout *layout = doc->documentLayout();
layout->setPaintDevice(p.device()); layout->setPaintDevice(p.device());
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
int dpiy = p.device()->logicalDpiY(); int dpiy = p.device()->logicalDpiY();
#else
int dpiy = qRound(QGuiApplication::primaryScreen()->logicalDotsPerInchY());
#endif
int margin = int((2/2.54)*dpiy); // 2 cm margins int margin = int((2/2.54)*dpiy); // 2 cm margins
QTextFrameFormat fmt = doc->rootFrame()->frameFormat(); QTextFrameFormat fmt = doc->rootFrame()->frameFormat();

View File

@@ -4706,14 +4706,19 @@ void tst_Dumpers::dumper_data()
QTest::newRow("StdUniquePtr") QTest::newRow("StdUniquePtr")
<< Data("#include <memory>\n" << 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> p0;\n\n"
"std::unique_ptr<int> p1(new int(32));\n\n" "std::unique_ptr<int> p1(new int(32));\n\n"
"std::unique_ptr<Foo> p2(new Foo);\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() + CoreProfile()
+ Cxx11Profile() + Cxx11Profile()
@@ -4722,7 +4727,8 @@ void tst_Dumpers::dumper_data()
+ Check("p0", "(null)", "std::unique_ptr<int, std::default_delete<int> >") + Check("p0", "(null)", "std::unique_ptr<int, std::default_delete<int> >")
+ Check("p1", "32", "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("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") QTest::newRow("StdOnce")