forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/4.5'"
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
{ "key": "CMakeFile", "value": "%{ProjectDirectory}/CMakeLists.txt" },
|
||||
{ "key": "MainCppFileName", "value": "%{JS: 'main.' + Util.preferredSuffix('text/x-c++src')}" },
|
||||
{ "key": "QtQuickVersion", "value": "%{JS: %{QtVersion}.QtQuickVersion}" },
|
||||
{ "key": "QtQuick3DVersion", "value": "%{JS: %{QtVersion}.QtQuick3DVersion}" },
|
||||
{ "key": "QtQuickWindowVersion", "value": "%{JS: %{QtVersion}.QtQuickWindowVersion}" },
|
||||
{ "key": "QtQuickVirtualKeyboardImport", "value": "%{JS: %{QtVersion}.QtQuickVirtualKeyboardImport}" },
|
||||
{ "key": "QtQuickFeature", "value": "QtSupport.Wizards.FeatureQtQuick.%{QtQuickVersion}" },
|
||||
@@ -89,7 +88,6 @@
|
||||
"value":
|
||||
"{
|
||||
'QtQuickVersion': '2.9',
|
||||
'QtQuick3DVersion': '1.1',
|
||||
'QtQuickWindowVersion': '2.2',
|
||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
||||
}"
|
||||
@@ -99,7 +97,6 @@
|
||||
"value":
|
||||
"{
|
||||
'QtQuickVersion': '2.8',
|
||||
'QtQuick3DVersion': '1.1',
|
||||
'QtQuickWindowVersion': '2.2',
|
||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
||||
}"
|
||||
@@ -109,7 +106,6 @@
|
||||
"value":
|
||||
"{
|
||||
'QtQuickVersion': '2.7',
|
||||
'QtQuick3DVersion': '1.1',
|
||||
'QtQuickWindowVersion': '2.2',
|
||||
'QtQuickVirtualKeyboardImport': 'QtQuick.VirtualKeyboard 2.1'
|
||||
}"
|
||||
|
||||
@@ -73,19 +73,23 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor(
|
||||
QList<Core::LocatorFilterEntry> betterEntries;
|
||||
QList<Core::LocatorFilterEntry> bestEntries;
|
||||
const Qt::CaseSensitivity caseSensitivityForPrefix = caseSensitivity(entry);
|
||||
bool hasColonColon = entry.contains(QLatin1String("::"));
|
||||
const IndexItem::ItemType wanted = matchTypes();
|
||||
|
||||
const QRegularExpression regexp = createRegExp(entry);
|
||||
if (!regexp.isValid())
|
||||
return goodEntries;
|
||||
const bool hasColonColon = entry.contains("::");
|
||||
const QRegularExpression shortRegexp =
|
||||
hasColonColon ? createRegExp(entry.mid(entry.lastIndexOf("::") + 2)) : regexp;
|
||||
|
||||
m_data->filterAllFiles([&](const IndexItem::Ptr &info) -> IndexItem::VisitorResult {
|
||||
if (future.isCanceled())
|
||||
return IndexItem::Break;
|
||||
const IndexItem::ItemType type = info->type();
|
||||
if (type & wanted) {
|
||||
QString matchString = hasColonColon ? info->scopedSymbolName() : info->symbolName();
|
||||
const QString symbolName = info->symbolName();
|
||||
QString matchString = hasColonColon ? info->scopedSymbolName() : symbolName;
|
||||
int matchOffset = hasColonColon ? matchString.size() - symbolName.size() : 0;
|
||||
if (type == IndexItem::Function)
|
||||
matchString += info->symbolType();
|
||||
QRegularExpressionMatch match = regexp.match(matchString);
|
||||
@@ -94,9 +98,15 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor(
|
||||
|
||||
// Highlight the matched characters, therefore it may be necessary
|
||||
// to update the match if the displayName is different from matchString
|
||||
if (matchString != filterEntry.displayName)
|
||||
match = regexp.match(filterEntry.displayName);
|
||||
if (matchString.midRef(matchOffset) != filterEntry.displayName) {
|
||||
match = shortRegexp.match(filterEntry.displayName);
|
||||
matchOffset = 0;
|
||||
}
|
||||
filterEntry.highlightInfo = highlightInfo(match);
|
||||
if (matchOffset > 0) {
|
||||
for (int &start : filterEntry.highlightInfo.starts)
|
||||
start -= matchOffset;
|
||||
}
|
||||
|
||||
if (matchString.startsWith(entry, caseSensitivityForPrefix))
|
||||
bestEntries.append(filterEntry);
|
||||
|
||||
@@ -231,6 +231,25 @@ void CppToolsPlugin::test_cpplocatorfilters_CppLocatorFilter_data()
|
||||
<< ResultData(_("myFunction(bool, int)"), _("MyNamespace (file1.cpp)"))
|
||||
);
|
||||
|
||||
QTest::newRow("CppFunctionsFilter-WithClassPrefix")
|
||||
<< testFile
|
||||
<< cppFunctionsFilter
|
||||
<< _("MyClass::func")
|
||||
<< (QList<ResultData>()
|
||||
<< ResultData(_("functionDefinedInClass(bool, int)"), _("MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedOutSideClass(char)"), _("MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedInClass(bool, int)"),
|
||||
_("MyNamespace::MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedInClass(bool, int)"),
|
||||
_("<anonymous namespace>::MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedOutSideClass(char)"),
|
||||
_("MyNamespace::MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedOutSideClass(char)"),
|
||||
_("<anonymous namespace>::MyClass (file1.cpp)"))
|
||||
<< ResultData(_("functionDefinedOutSideClassAndNamespace(float)"),
|
||||
_("MyNamespace::MyClass (file1.cpp)"))
|
||||
);
|
||||
|
||||
QTest::newRow("CppClassesFilter")
|
||||
<< testFile
|
||||
<< cppClassesFilter
|
||||
|
||||
@@ -881,7 +881,10 @@ void CdbEngine::doInterruptInferior(SpecialStopMode sm)
|
||||
|
||||
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed(); return;);
|
||||
if (DebuggerRunTool *rt = runTool()) {
|
||||
if (IDevice::ConstPtr device = rt->device())
|
||||
IDevice::ConstPtr device = rt->device();
|
||||
if (!device)
|
||||
device = runParameters().inferior.device;
|
||||
if (device)
|
||||
m_signalOperation = device->signalOperation();
|
||||
}
|
||||
m_specialStopMode = sm;
|
||||
|
||||
@@ -2087,6 +2087,7 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
|
||||
debugger->setAttachPid(ProcessHandle(process.pid));
|
||||
debugger->setRunControlName(tr("Process %1").arg(process.pid));
|
||||
debugger->setInferiorExecutable(process.exe);
|
||||
debugger->setInferiorDevice(device);
|
||||
debugger->setStartMode(AttachExternal);
|
||||
debugger->setCloseMode(DetachAtClose);
|
||||
debugger->setContinueAfterAttach(contAfterAttach);
|
||||
|
||||
@@ -437,6 +437,11 @@ void DebuggerRunTool::setInferiorEnvironment(const Utils::Environment &env)
|
||||
m_runParameters.inferior.environment = env;
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setInferiorDevice(IDevice::ConstPtr device)
|
||||
{
|
||||
m_runParameters.inferior.device = device;
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setRunControlName(const QString &name)
|
||||
{
|
||||
m_runParameters.displayName = name;
|
||||
|
||||
@@ -84,6 +84,7 @@ public:
|
||||
void setInferior(const ProjectExplorer::Runnable &runnable);
|
||||
void setInferiorExecutable(const QString &executable);
|
||||
void setInferiorEnvironment(const Utils::Environment &env); // Used by GammaRay plugin
|
||||
void setInferiorDevice(ProjectExplorer::IDevice::ConstPtr device); // Used by cdbengine
|
||||
void setRunControlName(const QString &name);
|
||||
void setStartMessage(const QString &msg);
|
||||
void appendInferiorCommandLineArgument(const QString &arg);
|
||||
|
||||
@@ -406,6 +406,7 @@ void IosQmlProfilerSupport::start()
|
||||
QTcpServer server;
|
||||
QTC_ASSERT(server.listen(QHostAddress::LocalHost)
|
||||
|| server.listen(QHostAddress::LocalHostIPv6), return);
|
||||
serverUrl.setScheme(urlTcpScheme());
|
||||
serverUrl.setHost(server.serverAddress().toString());
|
||||
|
||||
Port qmlPort = m_runner->qmlServerPort();
|
||||
|
||||
@@ -317,10 +317,11 @@ void TargetSetupPage::setProjectImporter(ProjectImporter *importer)
|
||||
if (importer == m_importer)
|
||||
return;
|
||||
|
||||
reset(); // Reset before changing the importer!
|
||||
|
||||
m_importer = importer;
|
||||
m_importWidget->setVisible(m_importer);
|
||||
|
||||
reset();
|
||||
setupWidgets();
|
||||
}
|
||||
|
||||
@@ -358,12 +359,12 @@ void TargetSetupPage::handleKitAddition(Kit *k)
|
||||
|
||||
void TargetSetupPage::handleKitRemoval(Kit *k)
|
||||
{
|
||||
if (m_importer)
|
||||
m_importer->cleanupKit(k);
|
||||
|
||||
if (isUpdating())
|
||||
return;
|
||||
|
||||
if (m_importer)
|
||||
m_importer->cleanupKit(k);
|
||||
|
||||
removeWidget(k);
|
||||
updateVisibility();
|
||||
}
|
||||
|
||||
@@ -291,9 +291,15 @@ void FormEditorView::nodeIdChanged(const ModelNode& node, const QString &/*newId
|
||||
|
||||
if (itemNode.isValid() && node.nodeSourceType() == ModelNode::NodeWithoutSource) {
|
||||
FormEditorItem *item = m_scene->itemForQmlItemNode(itemNode);
|
||||
if (item)
|
||||
if (item) {
|
||||
if (node.isSelected()) {
|
||||
m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeList(selectedModelNodes())));
|
||||
m_scene->update();
|
||||
}
|
||||
item->update();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FormEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||
|
||||
@@ -511,16 +511,12 @@ QWidget *DesignModeWidget::createCenterWidget()
|
||||
|
||||
QWidget *DesignModeWidget::createCrumbleBarFrame()
|
||||
{
|
||||
QFrame *frame = new QFrame(this);
|
||||
frame->setStyleSheet("background-color: #4e4e4e;");
|
||||
frame->setFrameShape(QFrame::NoFrame);
|
||||
auto *frame = new Utils::StyledBar(this);
|
||||
frame->setSingleRow(false);
|
||||
QHBoxLayout *layout = new QHBoxLayout(frame);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(0);
|
||||
frame->setLayout(layout);
|
||||
layout->addWidget(m_crumbleBar->crumblePath());
|
||||
frame->setProperty("panelwidget", true);
|
||||
frame->setProperty("panelwidget_singlerow", false);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
||||
@@ -486,10 +486,17 @@ QSet<Id> BaseQtVersion::availableFeatures() const
|
||||
return features;
|
||||
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_PREFIX, 2, 9));
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_CONTROLS_2_PREFIX, 2, 2));
|
||||
|
||||
if (qtVersion().matches(5, 9))
|
||||
return features;
|
||||
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_PREFIX, 2, 10));
|
||||
features.unite(versionedIds(Constants::FEATURE_QT_QUICK_CONTROLS_2_PREFIX, 2, 3));
|
||||
|
||||
if (qtVersion().matches(5, 10))
|
||||
return features;
|
||||
|
||||
return features;
|
||||
}
|
||||
|
||||
|
||||
Submodule src/shared/qbs updated: 4d4cb193e4...2e4d332924
Reference in New Issue
Block a user