diff --git a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp index 0a8c1242e57..c757f06802e 100644 --- a/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp +++ b/src/libs/qmleditorwidgets/contextpanewidgetrectangle.cpp @@ -33,13 +33,19 @@ ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent) return result; }; + const auto colorButton = [] { + auto result = new ColorButton; + result->setCheckable(true); + result->setShowArrow(false); + return result; + }; + m_gradientLabel = new QLabel(Tr::tr("Gradient")); m_gradientLabel->setAlignment(Qt::AlignBottom); m_gradientLine = new GradientLine; m_gradientLine->setMinimumWidth(240); - m_colorColorButton = new ColorButton; - m_colorColorButton->setShowArrow(false); + m_colorColorButton = colorButton(); m_colorSolid = toolButton("icon_color_solid"); m_colorGradient = toolButton("icon_color_gradient"); m_colorNone = toolButton("icon_color_none"); @@ -48,8 +54,7 @@ ContextPaneWidgetRectangle::ContextPaneWidgetRectangle(QWidget *parent) colorButtons->addButton(m_colorGradient); colorButtons->addButton(m_colorNone); - m_borderColorButton = new ColorButton; - m_borderColorButton->setShowArrow(false); + m_borderColorButton = colorButton(); m_borderSolid = toolButton("icon_color_solid"); m_borderNone = toolButton("icon_color_none"); auto borderButtons = new QButtonGroup(this); diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp index 029182a053d..3a7a7e6c534 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp @@ -372,6 +372,7 @@ static QMakeAndCMakePrefixPath qtInfoFromCMakeCache(const CMakeConfig &config, FilePath cmakeExecutable = config.filePathValueOf(QByteArray("CMAKE_COMMAND")); FilePath cmakeMakeProgram = config.filePathValueOf(QByteArray("CMAKE_MAKE_PROGRAM")); FilePath hostPath = config.filePathValueOf(QByteArray("QT_HOST_PATH")); + const QString findRootPath = config.stringValueOf("CMAKE_FIND_ROOT_PATH"); QStringList args; args.push_back("-S"); @@ -392,13 +393,16 @@ static QMakeAndCMakePrefixPath qtInfoFromCMakeCache(const CMakeConfig &config, if (!cmakeMakeProgram.isEmpty()) { args.push_back(QStringLiteral("-DCMAKE_MAKE_PROGRAM=%1").arg(cmakeMakeProgram.toString())); } - if (toolchainFile.isEmpty()) { - args.push_back(QStringLiteral("-DCMAKE_PREFIX_PATH=%1").arg(prefixPath)); - } else { - if (!prefixPath.isEmpty()) - args.push_back(QStringLiteral("-DCMAKE_FIND_ROOT_PATH=%1").arg(prefixPath)); + + if (!toolchainFile.isEmpty()) { args.push_back(QStringLiteral("-DCMAKE_TOOLCHAIN_FILE=%1").arg(toolchainFile.toString())); } + if (!prefixPath.isEmpty()) { + args.push_back(QStringLiteral("-DCMAKE_PREFIX_PATH=%1").arg(prefixPath)); + } + if (!findRootPath.isEmpty()) { + args.push_back(QStringLiteral("-DCMAKE_FIND_ROOT_PATH=%1").arg(findRootPath)); + } if (!hostPath.isEmpty()) { args.push_back(QStringLiteral("-DQT_HOST_PATH=%1").arg(hostPath.toString())); } diff --git a/src/plugins/cmakeprojectmanager/presetsmacros.cpp b/src/plugins/cmakeprojectmanager/presetsmacros.cpp index c96b0eed7aa..220d6d6575d 100644 --- a/src/plugins/cmakeprojectmanager/presetsmacros.cpp +++ b/src/plugins/cmakeprojectmanager/presetsmacros.cpp @@ -63,6 +63,7 @@ static void expandAllButEnv(const PresetsDetails::BuildPreset &preset, value.replace("${sourceDirName}", sourceDirectory.fileName()); value.replace("${presetName}", preset.name); + value.replace("${hostSystemName}", getHostSystemName(sourceDirectory.osType())); value.replace("${pathListSep}", Utils::OsSpecificAspects::pathListSeparator(sourceDirectory.osType())); } diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index fce8d083856..430b7252cdf 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -186,26 +186,26 @@ void CodeAssistantPrivate::requestProposal(AssistReason reason, IAssistProcessor *processor = provider->createProcessor(assistInterface.get()); processor->setAsyncCompletionAvailableHandler([this, reason, processor]( IAssistProposal *newProposal) { + if (processor == m_processor) { + invalidateCurrentRequestData(); + if (processor->needsRestart() && m_receivedContentWhileWaiting) { + delete newProposal; + m_receivedContentWhileWaiting = false; + requestProposal(reason, m_assistKind, m_requestProvider); + } else { + displayProposal(newProposal, reason); + if (processor->running()) + m_processor = processor; + else + emit q->finished(); + } + } if (!processor->running()) { // do not delete this processor directly since this function is called from within the processor QMetaObject::invokeMethod(QCoreApplication::instance(), [processor] { delete processor; }, Qt::QueuedConnection); } - if (processor != m_processor) - return; - invalidateCurrentRequestData(); - if (processor->needsRestart() && m_receivedContentWhileWaiting) { - delete newProposal; - m_receivedContentWhileWaiting = false; - requestProposal(reason, m_assistKind, m_requestProvider); - } else { - displayProposal(newProposal, reason); - if (processor->running()) - m_processor = processor; - else - emit q->finished(); - } }); if (IAssistProposal *newProposal = processor->start(std::move(assistInterface)))