Merge remote-tracking branch 'origin/4.5'

Change-Id: Iab6befd5e713289877aa0a47b9ce6bddfb5e2593
This commit is contained in:
Eike Ziller
2017-11-16 08:49:06 +01:00
38 changed files with 200 additions and 58 deletions
@@ -25,7 +25,7 @@ Project {
files: "%{CppFileName}"
Group { // Properties for the produced executable
fileTagsFilter: product.type
fileTagsFilter: "application"
qbs.install: true
}
}
@@ -8,7 +8,7 @@ Project {
files: "%{CFileName}"
Group { // Properties for the produced executable
fileTagsFilter: product.type
fileTagsFilter: "application"
qbs.install: true
}
}
@@ -8,7 +8,7 @@ Project {
files: "%{CppFileName}"
Group { // Properties for the produced executable
fileTagsFilter: product.type
fileTagsFilter: "application"
qbs.install: true
}
}
@@ -31,7 +31,7 @@ Project {
]
Group { // Properties for the produced executable
fileTagsFilter: product.type
fileTagsFilter: "application"
qbs.install: true
}
}
@@ -80,16 +80,25 @@
"type": "ComboBox",
"data":
{
"index": 0,
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickWindowVersion': '2.10',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
},
{
@@ -80,16 +80,25 @@
"type": "ComboBox",
"data":
{
"index": 0,
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickWindowVersion': '2.10',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickWindowVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
},
{
@@ -31,7 +31,7 @@ Project {
]
Group { // Properties for the produced executable
fileTagsFilter: product.type
fileTagsFilter: "application"
qbs.install: true
}
}
@@ -83,16 +83,25 @@
"visible": false,
"data":
{
"index": 0,
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
}
]
@@ -82,16 +82,25 @@
"type": "ComboBox",
"data":
{
"index": 0,
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
},
{
@@ -82,16 +82,25 @@
"type": "ComboBox",
"data":
{
"index": 0,
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickControlsVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickControlsVersion': '2.2',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
},
{
@@ -40,15 +40,25 @@
"type": "ComboBox",
"data":
{
"index": 1,
"items":
[
{
"trKey": "Qt 5.10",
"value":
"{
'QtQuickVersion': '2.10',
'QtQuickWindowVersion': '2.10',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.3'
}"
},
{
"trKey": "Qt 5.9",
"value":
"{
'QtQuickVersion': '2.9',
'QtQuickWindowVersion': '2.3',
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.2'
}"
},
{

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 119 B

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

Before

Width:  |  Height:  |  Size: 157 B

After

Width:  |  Height:  |  Size: 157 B

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

+4
View File
@@ -180,5 +180,9 @@
<file>images/project@2x.png</file>
<file>images/home.png</file>
<file>images/home@2x.png</file>
<file>images/select.png</file>
<file>images/select@2x.png</file>
<file>images/app-on-top.png</file>
<file>images/app-on-top@2x.png</file>
</qresource>
</RCC>
@@ -243,6 +243,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
connect(project, &ProjectExplorer::Project::parsingStarted, this, [this]() {
updateButtonState();
m_configView->setEnabled(false);
m_showProgressTimer.start();
});
@@ -257,6 +258,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
this, [this, buildDirChooser, stretcher]() {
m_configModel->setConfiguration(m_buildConfiguration->configurationFromCMake());
m_configView->expandAll();
m_configView->setEnabled(true);
stretcher->stretch();
updateButtonState();
buildDirChooser->triggerChanged(); // refresh valid state...
-4
View File
@@ -38,10 +38,6 @@
<file>images/mode_debug_mask.png</file>
<file>images/mode_debug_mask@2x.png</file>
<file>images/pin.xpm</file>
<file>images/qml/select.png</file>
<file>images/qml/select@2x.png</file>
<file>images/qml/app-on-top.png</file>
<file>images/qml/app-on-top@2x.png</file>
<file>images/debugger_restart_small.png</file>
<file>images/debugger_restart_small@2x.png</file>
<file>images/recordfill.png</file>
+4 -4
View File
@@ -82,13 +82,13 @@ const Icon REVERSE_MODE({
{":/debugger/images/debugger_reversemode_background.png", Theme::IconsCodeModelOverlayForegroundColor},
{":/debugger/images/debugger_reversemode.png", Theme::IconsInfoColor}}, Icon::Tint);
const Icon APP_ON_TOP({
{":/debugger/images/qml/app-on-top.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
{":/utils/images/app-on-top.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon APP_ON_TOP_TOOLBAR({
{":/debugger/images/qml/app-on-top.png", Theme::IconsBaseColor}});
{":/utils/images/app-on-top.png", Theme::IconsBaseColor}});
const Icon SELECT({
{":/debugger/images/qml/select.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
{":/utils/images/select.png", Theme::PanelTextColorMid}}, Icon::MenuTintedStyle);
const Icon SELECT_TOOLBAR({
{":/debugger/images/qml/select.png", Theme::IconsBaseColor}});
{":/utils/images/select.png", Theme::IconsBaseColor}});
const Icon EMPTY(
":/debugger/images/debugger_empty_14.png");
const Icon RECORD_ON({
@@ -1079,9 +1079,6 @@ void GdbServerRunner::start()
gdbserver.commandLineArguments = QtcProcess::joinArgs(args, OsTypeLinux);
SimpleTargetRunner::setRunnable(gdbserver);
appendMessage(tr("Starting gdbserver..."), NormalMessageFormat);
SimpleTargetRunner::start();
}
+25 -6
View File
@@ -93,6 +93,30 @@ static bool runSimCtlCommand(QStringList args, QByteArray *output)
return runCommand("xcrun", args, output);
}
static bool launchSimulator(const QString &simUdid) {
QTC_ASSERT(!simUdid.isEmpty(), return false);
const QString simulatorAppPath = IosConfigurations::developerPath()
.appendPath("Applications/Simulator.app/Contents/MacOS/Simulator").toString();
if (IosConfigurations::xcodeVersion() >= QVersionNumber(9)) {
// For XCode 9 boot the second device instead of launching simulator app twice.
QByteArray psOutput;
if (runCommand("ps", {"-A", "-o", "comm"}, &psOutput)) {
QByteArray simulatorCommand = simulatorAppPath.toLatin1();
for (const QByteArray &comm : psOutput.split('\n')) {
if (comm == simulatorCommand)
return runSimCtlCommand(QStringList({"boot", simUdid}), nullptr);
}
} else {
qCDebug(simulatorLog) << "Can not start Simulator device."
<< "Error probing Simulator.app instance";
return false;
}
}
return QProcess::startDetached(simulatorAppPath, {"--args", "-CurrentDeviceUDID", simUdid});
}
static QList<DeviceTypeInfo> getAvailableDeviceTypes()
{
QList<DeviceTypeInfo> deviceTypes;
@@ -421,12 +445,7 @@ void SimulatorControlPrivate::startSimulator(QFutureInterface<SimulatorControl::
}
if (simInfo.isShutdown()) {
const QString cmd = IosConfigurations::developerPath()
.appendPath("/Applications/Simulator.app/Contents/MacOS/Simulator")
.toString();
const QStringList args({"--args", "-CurrentDeviceUDID", simUdid});
if (QProcess::startDetached(cmd, args)) {
if (launchSimulator(simUdid)) {
if (fi.isCanceled())
return;
// At this point the sim device exists, available and was not running.
@@ -321,7 +321,7 @@ void AppOutputPane::updateCloseActions()
bool AppOutputPane::aboutToClose() const
{
return Utils::allOf(m_runControlTabs, [](const RunControlTab &rt) {
return !rt.runControl->isRunning() || rt.runControl->promptToStop();
return !rt.runControl || !rt.runControl->isRunning() || rt.runControl->promptToStop();
});
}
@@ -507,9 +507,9 @@ void AppOutputPane::setBehaviorOnOutput(RunControl *rc, AppOutputPane::BehaviorO
void AppOutputPane::reRunRunControl()
{
const int index = currentIndex();
QTC_ASSERT(index != -1 && !m_runControlTabs.at(index).runControl->isRunning(), return);
RunControlTab &tab = m_runControlTabs[index];
const RunControlTab &tab = m_runControlTabs.at(index);
QTC_ASSERT(tab.runControl, return);
QTC_ASSERT(index != -1 && !tab.runControl->isRunning(), return);
handleOldOutput(tab.window);
tab.window->scrollToBottom();
@@ -521,7 +521,7 @@ void AppOutputPane::attachToRunControl()
const int index = currentIndex();
QTC_ASSERT(index != -1, return);
RunControl *rc = m_runControlTabs.at(index).runControl;
QTC_ASSERT(rc->isRunning(), return);
QTC_ASSERT(rc && rc->isRunning(), return);
ExtensionSystem::Invoker<void>(debuggerPlugin(), "attachExternalApplication", rc);
}
@@ -551,9 +551,10 @@ void AppOutputPane::closeTabs(CloseTabMode mode)
QList<RunControl *> AppOutputPane::allRunControls() const
{
return Utils::transform<QList>(m_runControlTabs,[](const RunControlTab &tab) {
const QList<RunControl *> list = Utils::transform<QList>(m_runControlTabs,[](const RunControlTab &tab) {
return tab.runControl.data();
});
return Utils::filtered(list, [](RunControl *rc) { return rc; });
}
void AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode)
@@ -568,7 +569,7 @@ void AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode)
// Prompt user to stop
if (closeTabMode == CloseTabWithPrompt) {
QWidget *tabWidget = m_tabWidget->widget(tabIndex);
if (runControl->isRunning() && !runControl->promptToStop())
if (runControl && runControl->isRunning() && !runControl->promptToStop())
return;
// The event loop has run, thus the ordering might have changed, a tab might
// have been closed, so do some strange things...
@@ -64,6 +64,7 @@ DeviceUsedPortsGatherer::~DeviceUsedPortsGatherer()
void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
{
d->usedPorts.clear();
d->device = device;
QTC_ASSERT(d->device, emit error("No device given"); return);
@@ -88,7 +89,6 @@ void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
void DeviceUsedPortsGatherer::stop()
{
d->usedPorts.clear();
d->remoteStdout.clear();
d->remoteStderr.clear();
if (d->process)
@@ -1224,7 +1224,7 @@ Project *RunControl::project() const
bool RunControl::canReUseOutputPane(const RunControl *other) const
{
if (other->isRunning())
if (!other || other->isRunning())
return false;
return d->runnable.canReUseOutputPane(other->d->runnable);
@@ -33,7 +33,7 @@ AbstractAction::AbstractAction(const QString &description)
: m_defaultAction(new DefaultAction(description))
{
const Utils::Icon prevIcon({
{QLatin1String(":/debugger/images/qml/select.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle);
{QLatin1String(":/utils/images/select.png"), Utils::Theme::QmlDesigner_FormEditorForegroundColor}}, Utils::Icon::MenuTintedStyle);
action()->setIcon(prevIcon.icon());
}
@@ -327,11 +327,11 @@ void NavigatorView::leftButtonClicked()
if (!node.isRootNode() && !node.parentProperty().parentModelNode().isRootNode()) {
if (QmlItemNode::isValidQmlItemNode(node)) {
QPointF scenePos = QmlItemNode(node).instanceScenePosition();
node.parentProperty().parentProperty().reparentHere(node);
reparentAndCatch(node.parentProperty().parentProperty(), node);
if (!scenePos.isNull())
setScenePos(node, scenePos);
} else {
node.parentProperty().parentProperty().reparentHere(node);
reparentAndCatch(node.parentProperty().parentProperty(), node);
}
}
}
@@ -357,12 +357,12 @@ void NavigatorView::rightButtonClicked()
&& QmlItemNode::isValidQmlItemNode(newParent)
&& !newParent.metaInfo().defaultPropertyIsComponent()) {
QPointF scenePos = QmlItemNode(node).instanceScenePosition();
newParent.nodeAbstractProperty(newParent.metaInfo().defaultPropertyName()).reparentHere(node);
reparentAndCatch(newParent.nodeAbstractProperty(newParent.metaInfo().defaultPropertyName()), node);
if (!scenePos.isNull())
setScenePos(node, scenePos);
} else {
if (newParent.metaInfo().isValid() && !newParent.metaInfo().defaultPropertyIsComponent())
newParent.nodeAbstractProperty(newParent.metaInfo().defaultPropertyName()).reparentHere(node);
reparentAndCatch(newParent.nodeAbstractProperty(newParent.metaInfo().defaultPropertyName()), node);
}
}
}
@@ -493,4 +493,13 @@ void NavigatorView::expandRecursively(const QModelIndex &index)
}
}
void NavigatorView::reparentAndCatch(NodeAbstractProperty property, const ModelNode &modelNode)
{
try {
property.reparentHere(modelNode);
} catch (Exception &exception) {
exception.showException();
}
}
} // namespace QmlDesigner
@@ -106,6 +106,7 @@ protected: //functions
NavigatorTreeModel *treeModel();
bool blockSelectionChangedSignal(bool block);
void expandRecursively(const QModelIndex &index);
void reparentAndCatch(NodeAbstractProperty property, const ModelNode &modelNode);
private:
bool m_blockSelectionChangedSignal;
@@ -389,6 +389,19 @@ void StatesEditorView::bindingPropertiesChanged(const QList<BindingProperty> &pr
}
}
void StatesEditorView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
AbstractView::PropertyChangeFlags /*propertyChange*/)
{
m_block = true;
for (const VariantProperty &property : propertyList) {
if (property.name() == "name" && QmlModelState::isValidQmlModelState(property.parentModelNode()))
resetModel();
}
m_block = false;
}
void StatesEditorView::currentStateChanged(const ModelNode &node)
{
QmlModelState newQmlModelState(node);
@@ -69,6 +69,7 @@ public:
AbstractView::PropertyChangeFlags propertyChange) override;
void nodeOrderChanged(const NodeListProperty &listProperty, const ModelNode &movedNode, int oldIndex) override;
void bindingPropertiesChanged(const QList<BindingProperty>& propertyList, PropertyChangeFlags propertyChange) override;
void variantPropertiesChanged(const QList<VariantProperty>& propertyList, PropertyChangeFlags propertyChange) override;
// AbstractView
@@ -193,7 +193,12 @@ bool TextEditorWidget::eventFilter( QObject *, QEvent *event)
return true;
}
QKeySequence keySqeuence(keyEvent->key() | keyEvent->modifiers());
static const Qt::KeyboardModifiers relevantModifiers = Qt::ShiftModifier
| Qt::ControlModifier
| Qt::AltModifier
| Qt::MetaModifier;
QKeySequence keySqeuence(keyEvent->key() | (keyEvent->modifiers() & relevantModifiers));
for (QKeySequence overrideSequence : overrideSequences)
if (keySqeuence.matches(overrideSequence)) {
keyEvent->accept();
@@ -65,6 +65,9 @@ public:
static bool isValidKeyframe(const ModelNode &node);
static QmlTimelineFrames keyframesForKeyframe(const ModelNode &node);
void moveAllFrames(qreal offset);
void scaleAllFrames(qreal factor);
};
} //QmlDesigner
@@ -57,6 +57,9 @@ public:
qreal minActualFrame(const ModelNode &target) const;
qreal maxActualFrame(const ModelNode &target) const;
void moveAllFrames(const ModelNode &target, qreal offset);
void scaleAllFrames(const ModelNode &target, qreal factor);
QList<ModelNode> allTargets() const;
QList<QmlTimelineFrames> framesForTarget(const ModelNode &target) const;
void destroyFramesForTarget(const ModelNode &target);
@@ -1118,14 +1118,15 @@ bool ModelNode::isComponent() const
if (metaInfo().isView() && hasNodeProperty("delegate")) {
const ModelNode delegateNode = nodeProperty("delegate").modelNode();
if (delegateNode.hasMetaInfo()) {
const NodeMetaInfo delegateMetaInfo = delegateNode.metaInfo();
if (delegateMetaInfo.isValid() && delegateMetaInfo.isFileComponent())
if (delegateNode.isValid()) {
if (delegateNode.hasMetaInfo()) {
const NodeMetaInfo delegateMetaInfo = delegateNode.metaInfo();
if (delegateMetaInfo.isValid() && delegateMetaInfo.isFileComponent())
return true;
}
if (delegateNode.nodeSourceType() == ModelNode::NodeWithComponentSource)
return true;
}
if (delegateNode.nodeSourceType() == ModelNode::NodeWithComponentSource)
return true;
}
if (metaInfo().isSubclassOf("QtQuick.Loader")) {
@@ -182,4 +182,23 @@ QmlTimelineFrames QmlTimelineFrames::keyframesForKeyframe(const ModelNode &node)
return QmlTimelineFrames();
}
void QmlTimelineFrames::moveAllFrames(qreal offset)
{
for (const ModelNode &childNode : modelNode().defaultNodeListProperty().toModelNodeList()) {
auto property = childNode.variantProperty("frame");
if (property.isValid())
property.setValue(property.value().toReal() + offset);
}
}
void QmlTimelineFrames::scaleAllFrames(qreal factor)
{
for (const ModelNode &childNode : modelNode().defaultNodeListProperty().toModelNodeList()) {
auto property = childNode.variantProperty("frame");
if (property.isValid())
property.setValue(property.value().toReal() * factor);
}
}
} // QmlDesigner
@@ -156,6 +156,19 @@ qreal QmlTimelineMutator::maxActualFrame(const ModelNode &target) const
return max;
}
void QmlTimelineMutator::moveAllFrames(const ModelNode &target, qreal offset)
{
for (QmlTimelineFrames &frames : framesForTarget(target))
frames.moveAllFrames(offset);
}
void QmlTimelineMutator::scaleAllFrames(const ModelNode &target, qreal factor)
{
for (QmlTimelineFrames &frames : framesForTarget(target))
frames.scaleAllFrames(factor);
}
QList<ModelNode> QmlTimelineMutator::allTargets() const
{
QList<ModelNode> result;
+1 -1
View File
@@ -131,7 +131,7 @@ QTextCursor TextDocumentPrivate::indentOrUnindent(const QTextCursor &textCursor,
bool modified = true;
QTextBlock startBlock = m_document.findBlock(start);
QTextBlock endBlock = m_document.findBlock(blockSelection ? end : end - 1).next();
QTextBlock endBlock = m_document.findBlock(blockSelection ? end : qMax(end - 1, 0)).next();
const bool cursorAtBlockStart = (textCursor.position() == startBlock.position());
const bool anchorAtBlockStart = (textCursor.anchor() == startBlock.position());
const bool oneLinePartial = (startBlock.next() == endBlock)
+2 -2
View File
@@ -4166,7 +4166,7 @@
</g>
<g
style="display:inline"
id="src/plugins/debugger/images/qml/app-on-top"
id="src/libs/utils/images/app-on-top"
transform="translate(16,0)">
<rect
style="display:inline;fill:#ffffff;fill-opacity:1"
@@ -4202,7 +4202,7 @@
</g>
<g
style="display:inline"
id="src/plugins/debugger/images/qml/select"
id="src/libs/utils/images/select"
transform="translate(32,0)"
clip-path="url(#clipPath6003)">
<rect

Before

Width:  |  Height:  |  Size: 316 KiB

After

Width:  |  Height:  |  Size: 316 KiB

+1 -1
View File
@@ -57,7 +57,7 @@ HEADERS += \
settings.h \
$$UTILS/fileutils.h \
$$UTILS/hostosinfo.h \
$$UTILS/persistentsettings.cpp \
$$UTILS/persistentsettings.h \
$$UTILS/qtcassert.h \
$$UTILS/savefile.h \