Merge remote-tracking branch 'origin/4.6'
Change-Id: I724da8f761275865e735e7dce10c3b2b2d99fe94
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 37 KiB |
8
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -2565,7 +2565,7 @@ bool Parser::parseMemberSpecification(DeclarationAST *&node, ClassSpecifierAST *
|
||||
case T_STATIC_ASSERT:
|
||||
if (_languageFeatures.cxx11Enabled)
|
||||
CACHE_AND_RETURN(cacheKey, parseStaticAssertDeclaration(node));
|
||||
// fall-through
|
||||
Q_FALLTHROUGH();
|
||||
|
||||
default:
|
||||
CACHE_AND_RETURN(cacheKey, parseSimpleDeclaration(node, declaringClass));
|
||||
@@ -3830,7 +3830,7 @@ bool Parser::parseBlockDeclaration(DeclarationAST *&node)
|
||||
case T_STATIC_ASSERT:
|
||||
if (_languageFeatures.cxx11Enabled)
|
||||
return parseStaticAssertDeclaration(node);
|
||||
// fall-through
|
||||
Q_FALLTHROUGH();
|
||||
|
||||
default:
|
||||
return parseSimpleDeclaration(node);
|
||||
@@ -3914,7 +3914,7 @@ bool Parser::lookAtStorageClassSpecifier() const
|
||||
case T_CONSTEXPR:
|
||||
if (_languageFeatures.cxx11Enabled)
|
||||
return true;
|
||||
// fall-through
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -4514,7 +4514,7 @@ bool Parser::parsePrimaryExpression(ExpressionAST *&node)
|
||||
case T_NULLPTR:
|
||||
if (_languageFeatures.cxx11Enabled)
|
||||
return parsePointerLiteral(node);
|
||||
// fall-through
|
||||
Q_FALLTHROUGH();
|
||||
|
||||
case T_CHAR_LITERAL: // ### FIXME don't use NumericLiteral for chars
|
||||
case T_WIDE_CHAR_LITERAL:
|
||||
|
||||
@@ -45,8 +45,7 @@ ClangCodeModelConnectionClient::ClangCodeModelConnectionClient(
|
||||
: ConnectionClient(Utils::TemporaryDirectory::masterDirectoryPath()
|
||||
+ QStringLiteral("/ClangBackEnd-")
|
||||
+ currentProcessId()),
|
||||
m_serverProxy(client, nullptr),
|
||||
m_client(client)
|
||||
m_serverProxy(client, nullptr)
|
||||
{
|
||||
m_processCreator.setTemporaryDirectoryPattern("clangbackend-XXXXXX");
|
||||
m_processCreator.setArguments({connectionName()});
|
||||
|
||||
@@ -45,7 +45,6 @@ protected:
|
||||
|
||||
private:
|
||||
ClangCodeModelServerProxy m_serverProxy;
|
||||
ClangCodeModelClientInterface *m_client;
|
||||
};
|
||||
|
||||
} // namespace ClangBackEnd
|
||||
|
||||
@@ -764,13 +764,13 @@ void DiagramController::removeObjects(MObject *modelObject)
|
||||
DElement *diagramElement = findDelegate(modelObject, diagram);
|
||||
if (diagramElement)
|
||||
removeElement(diagramElement, diagram);
|
||||
foreach (const Handle<MRelation> &relation, modelObject->relations()) {
|
||||
for (const Handle<MRelation> &relation : modelObject->relations()) {
|
||||
DElement *diagramElement = findDelegate(relation.target(), diagram);
|
||||
if (diagramElement)
|
||||
removeElement(diagramElement, diagram);
|
||||
}
|
||||
}
|
||||
foreach (const Handle<MObject> &object, modelObject->children()) {
|
||||
for (const Handle<MObject> &object : modelObject->children()) {
|
||||
if (object.hasTarget())
|
||||
removeObjects(object.target());
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ void MChildrenVisitor::visitMElement(MElement *element)
|
||||
|
||||
void MChildrenVisitor::visitMObject(MObject *object)
|
||||
{
|
||||
foreach (const Handle<MObject> &handle, object->children()) {
|
||||
for (const Handle<MObject> &handle : object->children()) {
|
||||
MObject *child = handle.target();
|
||||
if (child)
|
||||
child->accept(this);
|
||||
|
||||
@@ -159,7 +159,7 @@ void MCloneDeepVisitor::visitMObject(const MObject *object)
|
||||
visitMElement(object);
|
||||
auto cloned = dynamic_cast<MObject *>(m_cloned);
|
||||
QMT_ASSERT(cloned, return);
|
||||
foreach (const Handle<MObject> &handle, object->children()) {
|
||||
for (const Handle<MObject> &handle : object->children()) {
|
||||
if (handle.hasTarget()) {
|
||||
MCloneDeepVisitor visitor;
|
||||
handle.target()->accept(&visitor);
|
||||
@@ -170,7 +170,7 @@ void MCloneDeepVisitor::visitMObject(const MObject *object)
|
||||
cloned->addChild(handle.uid());
|
||||
}
|
||||
}
|
||||
foreach (const Handle<MRelation> &handle, object->relations()) {
|
||||
for (const Handle<MRelation> &handle : object->relations()) {
|
||||
if (handle.hasTarget()) {
|
||||
MCloneDeepVisitor visitor;
|
||||
handle.target()->accept(&visitor);
|
||||
|
||||
@@ -1060,9 +1060,9 @@ void ModelController::renewElementKey(MElement *element, QHash<Uid, Uid> *renewe
|
||||
}
|
||||
auto object = dynamic_cast<MObject *>(element);
|
||||
if (object) {
|
||||
foreach (const Handle<MObject> &child, object->children())
|
||||
for (const Handle<MObject> &child : object->children())
|
||||
renewElementKey(child.target(), renewedKeys);
|
||||
foreach (const Handle<MRelation> &relation, object->relations())
|
||||
for (const Handle<MRelation> &relation : object->relations())
|
||||
renewElementKey(relation.target(), renewedKeys);
|
||||
}
|
||||
}
|
||||
@@ -1071,9 +1071,9 @@ void ModelController::renewElementKey(MElement *element, QHash<Uid, Uid> *renewe
|
||||
void ModelController::updateRelationKeys(MElement *element, const QHash<Uid, Uid> &renewedKeys)
|
||||
{
|
||||
if (auto object = dynamic_cast<MObject *>(element)) {
|
||||
foreach (const Handle<MRelation> &handle, object->relations())
|
||||
for (const Handle<MRelation> &handle : object->relations())
|
||||
updateRelationEndKeys(handle.target(), renewedKeys);
|
||||
foreach (const Handle<MObject> &child, object->children())
|
||||
for (const Handle<MObject> &child : object->children())
|
||||
updateRelationKeys(child.target(), renewedKeys);
|
||||
} else if (auto relation = dynamic_cast<MRelation *>(element)) {
|
||||
updateRelationEndKeys(relation, renewedKeys);
|
||||
@@ -1097,9 +1097,9 @@ void ModelController::mapObject(MObject *object)
|
||||
if (object) {
|
||||
QMT_CHECK(!m_objectsMap.contains(object->uid()));
|
||||
m_objectsMap.insert(object->uid(), object);
|
||||
foreach (const Handle<MObject> &child, object->children())
|
||||
for (const Handle<MObject> &child : object->children())
|
||||
mapObject(child.target());
|
||||
foreach (const Handle<MRelation> &relation, object->relations())
|
||||
for (const Handle<MRelation> &relation : object->relations())
|
||||
mapRelation(relation.target());
|
||||
}
|
||||
}
|
||||
@@ -1108,9 +1108,9 @@ void ModelController::unmapObject(MObject *object)
|
||||
{
|
||||
if (object) {
|
||||
QMT_CHECK(m_objectsMap.contains(object->uid()));
|
||||
foreach (const Handle<MRelation> &relation, object->relations())
|
||||
for (const Handle<MRelation> &relation : object->relations())
|
||||
unmapRelation(relation.target());
|
||||
foreach (const Handle<MObject> &child, object->children())
|
||||
for (const Handle<MObject> &child : object->children())
|
||||
unmapObject(child.target());
|
||||
m_objectsMap.remove(object->uid());
|
||||
}
|
||||
@@ -1209,7 +1209,7 @@ void ModelController::verifyModelIntegrity(const MObject *object, QHash<Uid, con
|
||||
QMT_ASSERT(object, return);
|
||||
QMT_ASSERT(!objectsMap->contains(object->uid()), return);
|
||||
objectsMap->insert(object->uid(), object);
|
||||
foreach (const Handle<MRelation> &handle, object->relations()) {
|
||||
for (const Handle<MRelation> &handle : object->relations()) {
|
||||
MRelation *relation = handle.target();
|
||||
if (relation) {
|
||||
QMT_ASSERT(!relationsMap->contains(relation->uid()), return);
|
||||
@@ -1222,7 +1222,7 @@ void ModelController::verifyModelIntegrity(const MObject *object, QHash<Uid, con
|
||||
objectRelationsMap->insert(relation->endBUid(), relation);
|
||||
}
|
||||
}
|
||||
foreach (const Handle<MObject> &handle, object->children()) {
|
||||
for (const Handle<MObject> &handle : object->children()) {
|
||||
MObject *childObject = handle.target();
|
||||
if (childObject)
|
||||
verifyModelIntegrity(childObject, objectsMap, relationsMap, objectRelationsMap);
|
||||
|
||||
@@ -755,14 +755,14 @@ void TreeModel::createChildren(const MObject *parentObject, ModelItem *parentIte
|
||||
m_objectToItemMap.insert(parentObject, parentItem);
|
||||
QMT_CHECK(!m_itemToObjectMap.contains(parentItem));
|
||||
m_itemToObjectMap.insert(parentItem, parentObject);
|
||||
foreach (const Handle<MObject> &object, parentObject->children()) {
|
||||
for (const Handle<MObject> &object : parentObject->children()) {
|
||||
if (object.hasTarget()) {
|
||||
ModelItem *item = createItem(object.target());
|
||||
parentItem->appendRow(item);
|
||||
createChildren(object.target(), item);
|
||||
}
|
||||
}
|
||||
foreach (const Handle<MRelation> &handle, parentObject->relations()) {
|
||||
for (const Handle<MRelation> &handle : parentObject->relations()) {
|
||||
if (handle.hasTarget()) {
|
||||
MRelation *relation = handle.target();
|
||||
ModelItem *item = createItem(relation);
|
||||
@@ -780,7 +780,7 @@ void TreeModel::removeObjectFromItemMap(const MObject *object)
|
||||
QMT_CHECK(m_itemToObjectMap.contains(item));
|
||||
m_itemToObjectMap.remove(item);
|
||||
m_objectToItemMap.remove(object);
|
||||
foreach (const Handle<MObject> &child, object->children()) {
|
||||
for (const Handle<MObject> &child : object->children()) {
|
||||
if (child.hasTarget())
|
||||
removeObjectFromItemMap(child.target());
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ MPackage *DiagramSceneController::findSuitableParentPackage(DElement *topmostDia
|
||||
MDiagram *DiagramSceneController::findDiagramBySearchId(MPackage *package, const QString &diagramName)
|
||||
{
|
||||
QString diagramSearchId = NameController::calcElementNameSearchId(diagramName);
|
||||
foreach (const Handle<MObject> &handle, package->children()) {
|
||||
for (const Handle<MObject> &handle : package->children()) {
|
||||
if (handle.hasTarget()) {
|
||||
if (auto diagram = dynamic_cast<MDiagram *>(handle.target())) {
|
||||
if (NameController::calcElementNameSearchId(diagram->name()) == diagramSearchId)
|
||||
@@ -745,7 +745,7 @@ DObject *DiagramSceneController::addObject(MObject *modelObject, const QPointF &
|
||||
if (dobject) {
|
||||
MObject *mobject = m_modelController->findObject(dobject->modelUid());
|
||||
if (mobject) {
|
||||
foreach (const Handle<MRelation> &handle, mobject->relations()) {
|
||||
for (const Handle<MRelation> &handle : mobject->relations()) {
|
||||
if (handle.hasTarget()
|
||||
&& ((handle.target()->endAUid() == modelObject->uid()
|
||||
&& handle.target()->endBUid() == mobject->uid())
|
||||
@@ -754,7 +754,7 @@ DObject *DiagramSceneController::addObject(MObject *modelObject, const QPointF &
|
||||
addRelation(handle.target(), QList<QPointF>(), diagram);
|
||||
}
|
||||
}
|
||||
foreach (const Handle<MRelation> &handle, modelObject->relations()) {
|
||||
for (const Handle<MRelation> &handle : modelObject->relations()) {
|
||||
if (handle.hasTarget()
|
||||
&& ((handle.target()->endAUid() == modelObject->uid()
|
||||
&& handle.target()->endBUid() == mobject->uid())
|
||||
@@ -769,7 +769,7 @@ DObject *DiagramSceneController::addObject(MObject *modelObject, const QPointF &
|
||||
}
|
||||
|
||||
// add all self relations
|
||||
foreach (const Handle<MRelation> &handle, modelObject->relations()) {
|
||||
for (const Handle<MRelation> &handle : modelObject->relations()) {
|
||||
if (handle.hasTarget ()
|
||||
&& handle.target()->endAUid() == modelObject->uid()
|
||||
&& handle.target()->endBUid() == modelObject->uid()) {
|
||||
|
||||
@@ -40,7 +40,7 @@ FindDiagramVisitor::~FindDiagramVisitor()
|
||||
|
||||
void FindDiagramVisitor::visitMObject(const MObject *object)
|
||||
{
|
||||
foreach (const Handle<MObject> &child, object->children()) {
|
||||
for (const Handle<MObject> &child : object->children()) {
|
||||
if (child.hasTarget()) {
|
||||
if (auto diagram = dynamic_cast<MDiagram *>(child.target())) {
|
||||
m_diagram = diagram;
|
||||
|
||||
@@ -40,7 +40,7 @@ FindRootDiagramVisitor::~FindRootDiagramVisitor()
|
||||
void FindRootDiagramVisitor::visitMObject(MObject *object)
|
||||
{
|
||||
// first search flat
|
||||
foreach(const Handle<MObject> &child, object->children()) {
|
||||
for (const Handle<MObject> &child : object->children()) {
|
||||
if (child.hasTarget()) {
|
||||
auto diagram = dynamic_cast<MDiagram *>(child.target());
|
||||
if (diagram) {
|
||||
@@ -50,7 +50,7 @@ void FindRootDiagramVisitor::visitMObject(MObject *object)
|
||||
}
|
||||
}
|
||||
// then search in children
|
||||
foreach(const Handle<MObject> &child, object->children()) {
|
||||
for (const Handle<MObject> &child : object->children()) {
|
||||
if (child.hasTarget()) {
|
||||
child.target()->accept(this);
|
||||
if (m_diagram)
|
||||
|
||||
|
Before Width: | Height: | Size: 270 B After Width: | Height: | Size: 270 B |
@@ -32,6 +32,8 @@
|
||||
#include <QtCore/qvarlengtharray.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok);
|
||||
QT_END_NAMESPACE
|
||||
@@ -759,7 +761,7 @@ again:
|
||||
u = QLatin1Char('\0');
|
||||
break;
|
||||
}
|
||||
// fall through
|
||||
Q_FALLTHROUGH();
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include <QTextBlock>
|
||||
#include <QTextDocument>
|
||||
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
static Q_LOGGING_CATEGORY(formatterLog, "qtc.qmljs.formatter")
|
||||
|
||||
namespace QmlJS {
|
||||
@@ -278,7 +280,7 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block)
|
||||
enter(expression_continuation);
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case ternary_op_after_colon:
|
||||
case expression:
|
||||
if (tryInsideExpression())
|
||||
@@ -1142,7 +1144,7 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd
|
||||
*savedIndentDepth = parentState.savedIndentDepth;
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case substatement_open:
|
||||
// special case for "foo: {" and "property int foo: {"
|
||||
if (parentState.type == binding_assignment)
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "qmljsvalueowner.h"
|
||||
#include "parser/qmljsast_p.h"
|
||||
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
using namespace QmlJS;
|
||||
|
||||
/*!
|
||||
@@ -444,7 +446,7 @@ bool Evaluate::visit(AST::BinaryExpression *ast)
|
||||
//case QSOperator::And: // ### enable once implemented below
|
||||
//case QSOperator::Or:
|
||||
lhs = value(ast->left);
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case QSOperator::Assign:
|
||||
rhs = value(ast->right);
|
||||
break;
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <cplusplus/cppmodelmanagerbase.h>
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -1391,7 +1392,7 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
|
||||
break;
|
||||
case ViewerContext::AddAllPathsAndDefaultSelectors:
|
||||
res.selectors.append(defaultVCtx.selectors);
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case ViewerContext::AddAllPaths:
|
||||
{
|
||||
foreach (const QString &path, defaultVCtx.paths)
|
||||
@@ -1400,10 +1401,10 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
|
||||
case Dialect::AnyLanguage:
|
||||
case Dialect::Qml:
|
||||
res.maybeAddPath(info.qtQmlPath);
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case Dialect::QmlQtQuick1:
|
||||
res.maybeAddPath(info.qtImportsPath);
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case Dialect::QmlQtQuick2:
|
||||
case Dialect::QmlQtQuick2Ui:
|
||||
{
|
||||
@@ -1439,7 +1440,7 @@ ViewerContext ModelManagerInterface::completeVContext(const ViewerContext &vCtx,
|
||||
}
|
||||
case ViewerContext::AddDefaultPathsAndSelectors:
|
||||
res.selectors.append(defaultVCtx.selectors);
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case ViewerContext::AddDefaultPaths:
|
||||
foreach (const QString &path, defaultVCtx.paths)
|
||||
res.maybeAddPath(path);
|
||||
|
||||
@@ -277,6 +277,8 @@ bool GTestTreeItem::modify(const TestParseResult *result)
|
||||
|
||||
TestTreeItem *GTestTreeItem::createParentGroupNode() const
|
||||
{
|
||||
if (type() != TestCase)
|
||||
return nullptr;
|
||||
const QFileInfo fileInfo(filePath());
|
||||
const QFileInfo base(fileInfo.absolutePath());
|
||||
return new GTestTreeItem(base.baseName(), fileInfo.absolutePath(), TestTreeItem::GroupNode);
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/mapreduce.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QDirIterator>
|
||||
@@ -276,7 +277,7 @@ bool TestCodeParser::postponed(const QStringList &fileList)
|
||||
m_reparseTimer.start();
|
||||
return true;
|
||||
}
|
||||
// intentional fall-through
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
m_postponedFiles.insert(fileList.first());
|
||||
m_reparseTimer.stop();
|
||||
|
||||
@@ -70,11 +70,9 @@ static QString backendProcessPath()
|
||||
namespace ClangCodeModel {
|
||||
namespace Internal {
|
||||
|
||||
class DummyBackendSender : public BackendSender
|
||||
class DummyBackendSender : public ClangBackEnd::ClangCodeModelServerInterface
|
||||
{
|
||||
public:
|
||||
DummyBackendSender() : BackendSender(nullptr) {}
|
||||
|
||||
void end() override {}
|
||||
void registerTranslationUnitsForEditor(const RegisterTranslationUnitForEditorMessage &) override {}
|
||||
void updateTranslationUnitsForEditor(const UpdateTranslationUnitsForEditorMessage &) override {}
|
||||
@@ -87,10 +85,10 @@ public:
|
||||
void requestDocumentAnnotations(const RequestDocumentAnnotationsMessage &) override {}
|
||||
void requestReferences(const RequestReferencesMessage &) override {}
|
||||
void requestFollowSymbol(const RequestFollowSymbolMessage &) override {}
|
||||
void requestToolTip(const RequestToolTipMessage &) override {}
|
||||
void updateVisibleTranslationUnits(const UpdateVisibleTranslationUnitsMessage &) override {}
|
||||
};
|
||||
|
||||
|
||||
BackendCommunicator::BackendCommunicator()
|
||||
: m_connection(&m_receiver)
|
||||
, m_sender(new DummyBackendSender())
|
||||
@@ -521,20 +519,6 @@ void BackendCommunicator::initializeBackendWithCurrentData()
|
||||
registerCurrentCodeModelUiHeaders();
|
||||
restoreCppEditorDocuments();
|
||||
updateTranslationUnitVisiblity();
|
||||
|
||||
emit backendReinitialized();
|
||||
}
|
||||
|
||||
BackendSender *BackendCommunicator::setBackendSender(BackendSender *sender)
|
||||
{
|
||||
BackendSender *previousSender = m_sender.take();
|
||||
m_sender.reset(sender);
|
||||
return previousSender;
|
||||
}
|
||||
|
||||
void BackendCommunicator::killBackendProcess()
|
||||
{
|
||||
m_connection.processForTestOnly()->kill();
|
||||
}
|
||||
|
||||
void BackendCommunicator::registerTranslationUnitsForEditor(const FileContainers &fileContainers)
|
||||
|
||||
@@ -113,13 +113,6 @@ public:
|
||||
|
||||
bool isNotWaitingForCompletion() const;
|
||||
|
||||
public: // for tests
|
||||
BackendSender *setBackendSender(BackendSender *sender);
|
||||
void killBackendProcess();
|
||||
|
||||
signals: // for tests
|
||||
void backendReinitialized();
|
||||
|
||||
private:
|
||||
void initializeBackend();
|
||||
void initializeBackendWithCurrentData();
|
||||
@@ -147,7 +140,7 @@ private:
|
||||
BackendReceiver m_receiver;
|
||||
ClangBackEnd::ClangCodeModelConnectionClient m_connection;
|
||||
QTimer m_backendStartTimeOut;
|
||||
QScopedPointer<BackendSender> m_sender;
|
||||
QScopedPointer<ClangBackEnd::ClangCodeModelServerInterface> m_sender;
|
||||
int m_connectedCount = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -141,10 +141,5 @@ void BackendSender::updateVisibleTranslationUnits(const UpdateVisibleTranslation
|
||||
m_connection->serverProxy().updateVisibleTranslationUnits(message);
|
||||
}
|
||||
|
||||
bool BackendSender::isConnected() const
|
||||
{
|
||||
return m_connection && m_connection->isConnected();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ClangCodeModel
|
||||
|
||||
@@ -52,9 +52,6 @@ public:
|
||||
void requestFollowSymbol(const ClangBackEnd::RequestFollowSymbolMessage &message) override;
|
||||
void updateVisibleTranslationUnits(const ClangBackEnd::UpdateVisibleTranslationUnitsMessage &message) override;
|
||||
|
||||
private:
|
||||
bool isConnected() const;
|
||||
|
||||
private:
|
||||
ClangBackEnd::ClangCodeModelConnectionClient *m_connection = nullptr;
|
||||
};
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <utils/textutils.h>
|
||||
#include <utils/mimetypes/mimedatabase.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QDirIterator>
|
||||
#include <QTextDocument>
|
||||
@@ -242,7 +243,7 @@ IAssistProposal *ClangCompletionAssistProcessor::startCompletionHelper()
|
||||
case ClangCompletionContextAnalyzer::CompleteSlot:
|
||||
modifiedFileContent = modifyInput(m_interface->textDocument(),
|
||||
analyzer.positionEndOfExpression());
|
||||
// Fall through!
|
||||
Q_FALLTHROUGH();
|
||||
case ClangCompletionContextAnalyzer::PassThroughToLibClang: {
|
||||
m_addSnippets = m_completionOperator == T_EOF_SYMBOL;
|
||||
m_sentRequestType = NormalCompletion;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
namespace ClangStaticAnalyzer {
|
||||
namespace Internal {
|
||||
@@ -100,22 +101,26 @@ QList<Diagnostic> LogFileReader::read(const QString &filePath, QString *errorMes
|
||||
if (errorMessage) {
|
||||
*errorMessage = tr("Could not read file \"%1\": UnexpectedElementError.")
|
||||
.arg(filePath);
|
||||
} // fall-through
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
case QXmlStreamReader::CustomError:
|
||||
if (errorMessage) {
|
||||
*errorMessage = tr("Could not read file \"%1\": CustomError.")
|
||||
.arg(filePath);
|
||||
} // fall-through
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
case QXmlStreamReader::NotWellFormedError:
|
||||
if (errorMessage) {
|
||||
*errorMessage = tr("Could not read file \"%1\": NotWellFormedError.")
|
||||
.arg(filePath);
|
||||
} // fall-through
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
case QXmlStreamReader::PrematureEndOfDocumentError:
|
||||
if (errorMessage) {
|
||||
*errorMessage = tr("Could not read file \"%1\": PrematureEndOfDocumentError.")
|
||||
.arg(filePath);
|
||||
} // fall-through
|
||||
}
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return emptyList;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <cplusplus/Lexer.h>
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMetaEnum>
|
||||
@@ -848,7 +849,7 @@ bool CodeFormatter::tryDeclaration()
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case T_CHAR:
|
||||
case T_CHAR16_T:
|
||||
case T_CHAR32_T:
|
||||
@@ -1231,7 +1232,7 @@ void QtStyleCodeFormatter::onEnter(int newState, int *indentDepth, int *savedInd
|
||||
case assign_open:
|
||||
if (parentState.type == assign_open_or_initializer)
|
||||
break;
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case assign_open_or_initializer:
|
||||
if (!lastToken && m_styleSettings.alignAssignments)
|
||||
*paddingDepth = nextTokenPosition-*indentDepth;
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "cpptoolssettings.h"
|
||||
#include "cppcodestylepreferences.h"
|
||||
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QChar>
|
||||
#include <QTextDocument>
|
||||
#include <QTextBlock>
|
||||
@@ -79,7 +81,7 @@ static bool isElectricInLine(const QChar ch, const QString &text)
|
||||
return true;
|
||||
}
|
||||
|
||||
// fall-through
|
||||
Q_FALLTHROUGH();
|
||||
// lines that start with : might have a constructor initializer list
|
||||
case '<':
|
||||
case '>': {
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "demanglerexceptions.h"
|
||||
|
||||
#include "../../../libs/utils/qtcfallthrough.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
@@ -1293,25 +1295,29 @@ void ExprPrimaryNode::parse()
|
||||
switch (typeNode->type()) {
|
||||
case BuiltinTypeNode::UnsignedShortType:
|
||||
case BuiltinTypeNode::UnsignedIntType:
|
||||
m_suffix = "U"; // Fall-through.
|
||||
m_suffix = "U";
|
||||
Q_FALLTHROUGH();
|
||||
case BuiltinTypeNode::SignedShortType:
|
||||
case BuiltinTypeNode::SignedIntType:
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode);
|
||||
break;
|
||||
case BuiltinTypeNode::UnsignedLongType:
|
||||
m_suffix = "U"; // Fall-through.
|
||||
m_suffix = "U";
|
||||
Q_FALLTHROUGH();
|
||||
case BuiltinTypeNode::SignedLongType:
|
||||
m_suffix = "L";
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode);
|
||||
break;
|
||||
case BuiltinTypeNode::UnsignedLongLongType:
|
||||
m_suffix = "U"; // Fall-through.
|
||||
m_suffix = "U";
|
||||
Q_FALLTHROUGH();
|
||||
case BuiltinTypeNode::SignedLongLongType:
|
||||
m_suffix = "LL";
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(NumberNode);
|
||||
break;
|
||||
case BuiltinTypeNode::FloatType:
|
||||
m_suffix = "f"; // Fall-through.
|
||||
m_suffix = "f";
|
||||
Q_FALLTHROUGH();
|
||||
case BuiltinTypeNode::DoubleType:
|
||||
PARSE_RULE_AND_ADD_RESULT_AS_CHILD(FloatValueNode);
|
||||
break;
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
@@ -5662,7 +5663,7 @@ bool FakeVimHandler::Private::handleExMapCommand(const ExCommand &cmd0) // :map
|
||||
foreach (char c, modes)
|
||||
MappingsIterator(&g.mappings, c, key).remove();
|
||||
break;
|
||||
case Map: // fall through
|
||||
case Map: Q_FALLTHROUGH();
|
||||
case Noremap: {
|
||||
Inputs inputs(rhs, type == Noremap, silent);
|
||||
foreach (char c, modes)
|
||||
|
||||
@@ -287,6 +287,7 @@ void LocalHelpManager::setupGuiHelpEngine()
|
||||
if (m_needsCollectionFile) {
|
||||
m_needsCollectionFile = false;
|
||||
helpEngine().setCollectionFile(Core::HelpManager::collectionFilePath());
|
||||
m_guiNeedsSetup = true;
|
||||
}
|
||||
|
||||
if (m_guiNeedsSetup) {
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "abi.h"
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QtEndian>
|
||||
@@ -50,6 +51,27 @@ namespace ProjectExplorer {
|
||||
// Helpers
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
static Abi::Architecture architectureFromQt()
|
||||
{
|
||||
const QString arch = QSysInfo::buildCpuArchitecture();
|
||||
if (arch.startsWith("arm"))
|
||||
return Abi::ArmArchitecture;
|
||||
if (arch.startsWith("x86") || arch == "i386")
|
||||
return Abi::X86Architecture;
|
||||
if (arch == "ia64")
|
||||
return Abi::ItaniumArchitecture;
|
||||
if (arch.startsWith("mips"))
|
||||
return Abi::MipsArchitecture;
|
||||
if (arch.startsWith("power"))
|
||||
return Abi::PowerPCArchitecture;
|
||||
if (arch.startsWith("sh")) // Not in Qt documentation!
|
||||
return Abi::ShArchitecture;
|
||||
if (arch.startsWith("avr")) // Not in Qt documentation!
|
||||
return Abi::AvrArchitecture;
|
||||
|
||||
return Abi::UnknownArchitecture;
|
||||
}
|
||||
|
||||
static quint8 getUint8(const QByteArray &data, int pos)
|
||||
{
|
||||
return static_cast<quint8>(data.at(pos));
|
||||
@@ -681,7 +703,8 @@ QString Abi::toString(const Architecture &a)
|
||||
return QLatin1String("itanium");
|
||||
case ShArchitecture:
|
||||
return QLatin1String("sh");
|
||||
case UnknownArchitecture: // fall through!
|
||||
case UnknownArchitecture:
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return QLatin1String("unknown");
|
||||
}
|
||||
@@ -706,7 +729,8 @@ QString Abi::toString(const OS &o)
|
||||
return QLatin1String("qnx");
|
||||
case BareMetalOS:
|
||||
return QLatin1String("baremetal");
|
||||
case UnknownOS: // fall through!
|
||||
case UnknownOS:
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return QLatin1String("unknown");
|
||||
};
|
||||
@@ -754,7 +778,8 @@ QString Abi::toString(const OSFlavor &of)
|
||||
case GenericQnxFlavor:
|
||||
case GenericBareMetalFlavor:
|
||||
return QLatin1String("generic");
|
||||
case UnknownFlavor: // fall through!
|
||||
case UnknownFlavor:
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return QLatin1String("unknown");
|
||||
}
|
||||
@@ -771,7 +796,8 @@ QString Abi::toString(const BinaryFormat &bf)
|
||||
return QLatin1String("mach_o");
|
||||
case RuntimeQmlFormat:
|
||||
return QLatin1String("qml_rt");
|
||||
case UnknownFormat: // fall through!
|
||||
case UnknownFormat:
|
||||
Q_FALLTHROUGH();
|
||||
default:
|
||||
return QLatin1String("unknown");
|
||||
}
|
||||
@@ -835,7 +861,7 @@ Abi::OSFlavor Abi::flavorForMsvcVersion(int version)
|
||||
|
||||
Abi Abi::hostAbi()
|
||||
{
|
||||
Architecture arch = QTC_CPU; // define set by qmake
|
||||
Architecture arch = architectureFromQt();
|
||||
OS os = UnknownOS;
|
||||
OSFlavor subos = UnknownFlavor;
|
||||
BinaryFormat format = UnknownFormat;
|
||||
|
||||
@@ -96,7 +96,8 @@ public:
|
||||
|
||||
Utils::FileName targetFilePath(const QString &targetName) {
|
||||
return Utils::findOrDefault(list, [&targetName](const BuildTargetInfo &ti) {
|
||||
return ti.targetName == targetName;
|
||||
return ti.targetName == targetName
|
||||
|| ti.projectFilePath.toString() == targetName;
|
||||
}).targetFilePath;
|
||||
}
|
||||
|
||||
|
||||
@@ -332,11 +332,4 @@ journald {
|
||||
|
||||
RESOURCES += projectexplorer.qrc
|
||||
|
||||
# Some way to override the architecture used in Abi:
|
||||
!isEmpty($$(QTC_CPU)) {
|
||||
DEFINES += QTC_CPU=$$(QTC_CPU)
|
||||
} else {
|
||||
DEFINES += QTC_CPU=X86Architecture
|
||||
}
|
||||
|
||||
DEFINES += PROJECTEXPLORER_LIBRARY
|
||||
|
||||
@@ -15,8 +15,6 @@ Project {
|
||||
Depends { name: "TextEditor" }
|
||||
Depends { name: "app_version_header" }
|
||||
|
||||
cpp.defines: base.concat("QTC_CPU=X86Architecture")
|
||||
|
||||
Group {
|
||||
name: "General"
|
||||
files: [
|
||||
|
||||
@@ -385,9 +385,9 @@ public:
|
||||
if (m_activeSwitchToRect.contains(pos))
|
||||
sessionModel->switchToSession(sessionName);
|
||||
else if (m_activeActionRects[0].contains(pos))
|
||||
sessionModel->cloneSession(sessionName);
|
||||
sessionModel->cloneSession(ICore::mainWindow(), sessionName);
|
||||
else if (m_activeActionRects[1].contains(pos))
|
||||
sessionModel->renameSession(sessionName);
|
||||
sessionModel->renameSession(ICore::mainWindow(), sessionName);
|
||||
else if (m_activeActionRects[2].contains(pos))
|
||||
sessionModel->deleteSession(sessionName);
|
||||
return true;
|
||||
|
||||
@@ -59,7 +59,7 @@ class SessionNameInputDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SessionNameInputDialog(QWidget *parent = nullptr);
|
||||
explicit SessionNameInputDialog(QWidget *parent);
|
||||
|
||||
void setActionText(const QString &actionText, const QString &openActionText);
|
||||
void setValue(const QString &value);
|
||||
|
||||
@@ -186,9 +186,9 @@ void SessionModel::resetSessions()
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void SessionModel::newSession()
|
||||
void SessionModel::newSession(QWidget *parent)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("New Session Name"));
|
||||
sessionInputDialog.setActionText(tr("&Create"), tr("Create and &Open"));
|
||||
|
||||
@@ -197,9 +197,9 @@ void SessionModel::newSession()
|
||||
});
|
||||
}
|
||||
|
||||
void SessionModel::cloneSession(const QString &session)
|
||||
void SessionModel::cloneSession(QWidget *parent, const QString &session)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("New Session Name"));
|
||||
sessionInputDialog.setActionText(tr("&Clone"), tr("Clone and &Open"));
|
||||
sessionInputDialog.setValue(session + " (2)");
|
||||
@@ -218,9 +218,9 @@ void SessionModel::deleteSession(const QString &session)
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void SessionModel::renameSession(const QString &session)
|
||||
void SessionModel::renameSession(QWidget *parent, const QString &session)
|
||||
{
|
||||
SessionNameInputDialog sessionInputDialog;
|
||||
SessionNameInputDialog sessionInputDialog(parent);
|
||||
sessionInputDialog.setWindowTitle(tr("Rename Session"));
|
||||
sessionInputDialog.setActionText(tr("&Rename"), tr("Rename and &Open"));
|
||||
sessionInputDialog.setValue(session);
|
||||
|
||||
@@ -70,10 +70,10 @@ signals:
|
||||
|
||||
public slots:
|
||||
void resetSessions();
|
||||
void newSession();
|
||||
void cloneSession(const QString &session);
|
||||
void newSession(QWidget *parent);
|
||||
void cloneSession(QWidget *parent, const QString &session);
|
||||
void deleteSession(const QString &session);
|
||||
void renameSession(const QString &session);
|
||||
void renameSession(QWidget *parent, const QString &session);
|
||||
void switchToSession(const QString &session);
|
||||
|
||||
private:
|
||||
|
||||
@@ -89,7 +89,7 @@ SessionView::SessionView(QWidget *parent)
|
||||
|
||||
void SessionView::createNewSession()
|
||||
{
|
||||
m_sessionModel.newSession();
|
||||
m_sessionModel.newSession(this);
|
||||
}
|
||||
|
||||
void SessionView::deleteCurrentSession()
|
||||
@@ -99,12 +99,12 @@ void SessionView::deleteCurrentSession()
|
||||
|
||||
void SessionView::cloneCurrentSession()
|
||||
{
|
||||
m_sessionModel.cloneSession(currentSession());
|
||||
m_sessionModel.cloneSession(this, currentSession());
|
||||
}
|
||||
|
||||
void SessionView::renameCurrentSession()
|
||||
{
|
||||
m_sessionModel.renameSession(currentSession());
|
||||
m_sessionModel.renameSession(this, currentSession());
|
||||
}
|
||||
|
||||
void SessionView::switchToCurrentSession()
|
||||
|
||||
@@ -74,63 +74,49 @@ static QString extractToolchainPrefix(QString *compilerName)
|
||||
return prefix;
|
||||
}
|
||||
|
||||
static QStringList targetOSList(const ProjectExplorer::Abi &abi, const ProjectExplorer::Kit *k)
|
||||
static QString targetPlatform(const ProjectExplorer::Abi &abi, const ProjectExplorer::Kit *k)
|
||||
{
|
||||
const Core::Id device = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(k);
|
||||
QStringList os;
|
||||
switch (abi.os()) {
|
||||
case ProjectExplorer::Abi::WindowsOS:
|
||||
if (device == WINRT_DEVICE_TYPE_LOCAL ||
|
||||
device == WINRT_DEVICE_TYPE_PHONE ||
|
||||
device == WINRT_DEVICE_TYPE_EMULATOR) {
|
||||
os << QLatin1String("winrt");
|
||||
} else if (abi.osFlavor() == ProjectExplorer::Abi::WindowsCEFlavor) {
|
||||
os << QLatin1String("windowsce");
|
||||
}
|
||||
os << QLatin1String("windows");
|
||||
break;
|
||||
return QLatin1String("windows");
|
||||
case ProjectExplorer::Abi::DarwinOS:
|
||||
if (device == DESKTOP_DEVICE_TYPE)
|
||||
os << QLatin1String("macos") << QLatin1String("osx");
|
||||
else if (device == IOS_DEVICE_TYPE)
|
||||
os << QLatin1String("ios");
|
||||
else if (device == IOS_SIMULATOR_TYPE)
|
||||
os << QLatin1String("ios-simulator") << QLatin1String("ios");
|
||||
os << QLatin1String("darwin") << QLatin1String("bsd") << QLatin1String("unix");
|
||||
break;
|
||||
return QLatin1String("macos");
|
||||
if (device == IOS_DEVICE_TYPE)
|
||||
return QLatin1String("ios");
|
||||
if (device == IOS_SIMULATOR_TYPE)
|
||||
return QLatin1String("ios-simulator");
|
||||
return QLatin1String("darwin");
|
||||
case ProjectExplorer::Abi::LinuxOS:
|
||||
if (abi.osFlavor() == ProjectExplorer::Abi::AndroidLinuxFlavor)
|
||||
os << QLatin1String("android");
|
||||
os << QLatin1String("linux") << QLatin1String("unix");
|
||||
break;
|
||||
return QLatin1String("android");
|
||||
return QLatin1String("linux");
|
||||
case ProjectExplorer::Abi::BsdOS:
|
||||
switch (abi.osFlavor()) {
|
||||
case ProjectExplorer::Abi::FreeBsdFlavor:
|
||||
os << QLatin1String("freebsd");
|
||||
break;
|
||||
return QLatin1String("freebsd");
|
||||
case ProjectExplorer::Abi::NetBsdFlavor:
|
||||
os << QLatin1String("netbsd");
|
||||
break;
|
||||
return QLatin1String("netbsd");
|
||||
case ProjectExplorer::Abi::OpenBsdFlavor:
|
||||
os << QLatin1String("openbsd");
|
||||
break;
|
||||
return QLatin1String("openbsd");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
os << QLatin1String("bsd") << QLatin1String("unix");
|
||||
break;
|
||||
return QLatin1String("bsd");
|
||||
case ProjectExplorer::Abi::QnxOS:
|
||||
os << QLatin1String("qnx") << QLatin1String("unix");
|
||||
break;
|
||||
return QLatin1String("qnx");
|
||||
case ProjectExplorer::Abi::UnixOS:
|
||||
if (abi.osFlavor() == ProjectExplorer::Abi::SolarisUnixFlavor)
|
||||
os << QLatin1String("solaris");
|
||||
os << QLatin1String("unix");
|
||||
break;
|
||||
default:
|
||||
return QLatin1String("solaris");
|
||||
return QLatin1String("unix");
|
||||
case ProjectExplorer::Abi::VxWorks:
|
||||
return QLatin1String("vxworks");
|
||||
case ProjectExplorer::Abi::BareMetalOS:
|
||||
case ProjectExplorer::Abi::UnknownOS:
|
||||
break;
|
||||
}
|
||||
return os;
|
||||
return QString();
|
||||
}
|
||||
|
||||
static QStringList toolchainList(const ProjectExplorer::ToolChain *tc)
|
||||
@@ -258,7 +244,7 @@ QVariantMap DefaultPropertyProvider::autoGeneratedProperties(const ProjectExplor
|
||||
ProjectExplorer::Abi::abiFromTargetTriplet(mainTc->originalTargetTriple())) {
|
||||
data.insert(QLatin1String(QBS_ARCHITECTURE), architecture(mainTc->targetAbi()));
|
||||
}
|
||||
data.insert(QLatin1String(QBS_TARGETOS), targetOSList(targetAbi, k));
|
||||
data.insert(QLatin1String(QBS_TARGETPLATFORM), targetPlatform(targetAbi, k));
|
||||
|
||||
QStringList toolchain = toolchainList(mainTc);
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ const char QBS_GROUP_ICON[] = ":/qbsprojectmanager/images/groups.png";
|
||||
const char QBS_PRODUCT_OVERLAY_ICON[] = ":/qbsprojectmanager/images/productgear.png";
|
||||
|
||||
// Toolchain related settings:
|
||||
const char QBS_TARGETOS[] = "qbs.targetOS";
|
||||
const char QBS_TARGETPLATFORM[] = "qbs.targetPlatform";
|
||||
const char QBS_SYSROOT[] = "qbs.sysroot";
|
||||
const char QBS_ARCHITECTURES[] = "qbs.architectures";
|
||||
const char QBS_ARCHITECTURE[] = "qbs.architecture";
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <timeline/timelineformattime.h>
|
||||
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QKeyEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QMetaEnum>
|
||||
@@ -84,7 +86,7 @@ QVariantMap InputEventsModel::details(int index) const
|
||||
switch (event.type) {
|
||||
case InputKeyPress:
|
||||
type = tr("Key Press");
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case InputKeyRelease:
|
||||
if (type.isEmpty())
|
||||
type = tr("Key Release");
|
||||
@@ -98,11 +100,11 @@ QVariantMap InputEventsModel::details(int index) const
|
||||
break;
|
||||
case InputMouseDoubleClick:
|
||||
type = tr("Double Click");
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case InputMousePress:
|
||||
if (type.isEmpty())
|
||||
type = tr("Mouse Press");
|
||||
// fallthrough
|
||||
Q_FALLTHROUGH();
|
||||
case InputMouseRelease:
|
||||
if (type.isEmpty())
|
||||
type = tr("Mouse Release");
|
||||
|
||||
@@ -25,13 +25,6 @@
|
||||
\" <comment>Linguist compiled translations</comment>\",
|
||||
\" <glob pattern=\'*.qm\'/>\",
|
||||
\" </mime-type>\",
|
||||
\" <mime-type type=\'application/x-linguist\'>\",
|
||||
\" <comment>Linguist source translations</comment>\",
|
||||
\" <magic>\",
|
||||
\" <match value=\'<TS\' type=\'string\' offset=\'0:256\'/>\",
|
||||
\" </magic>\",
|
||||
\" <glob pattern=\'*.ts\' weight=\'70\'/>\",
|
||||
\" </mime-type>\",
|
||||
\" <mime-type type=\'application/scxml+xml\'>\",
|
||||
\" <comment>SCXML State Chart</comment>\",
|
||||
\" <sub-class-of type=\'application/xml\'/>\",
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "serializer.h"
|
||||
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
|
||||
#include <QAction>
|
||||
#include <QPointF>
|
||||
@@ -112,7 +113,7 @@ QVector<TagType> allowedChildTypes(TagType tagType)
|
||||
case State:
|
||||
childTags << Initial;
|
||||
childTags << Final;
|
||||
// FALL THROUGH
|
||||
Q_FALLTHROUGH();
|
||||
case Parallel:
|
||||
childTags << OnEntry;
|
||||
childTags << OnExit;
|
||||
@@ -135,7 +136,7 @@ QVector<TagType> allowedChildTypes(TagType tagType)
|
||||
case If:
|
||||
childTags << ElseIf;
|
||||
childTags << Else;
|
||||
// FALL THROUGH
|
||||
Q_FALLTHROUGH();
|
||||
case Transition:
|
||||
case OnEntry:
|
||||
case OnExit:
|
||||
@@ -169,7 +170,7 @@ QVector<TagType> allowedChildTypes(TagType tagType)
|
||||
break;
|
||||
case Invoke:
|
||||
childTags << Finalize;
|
||||
// FALL THROUGH
|
||||
Q_FALLTHROUGH();
|
||||
case Donedata:
|
||||
case Send:
|
||||
childTags << Param;
|
||||
@@ -211,7 +212,7 @@ QVector<TagType> childTypes(TagType tagType)
|
||||
case If:
|
||||
childTags << ElseIf;
|
||||
childTags << Else;
|
||||
// FALL THROUGH
|
||||
Q_FALLTHROUGH();
|
||||
case Transition:
|
||||
case OnEntry:
|
||||
case OnExit:
|
||||
@@ -245,7 +246,7 @@ QVector<TagType> childTypes(TagType tagType)
|
||||
break;
|
||||
case Invoke:
|
||||
childTags << Finalize;
|
||||
// FALL THROUGH
|
||||
Q_FALLTHROUGH();
|
||||
case Donedata:
|
||||
case Send:
|
||||
childTags << Param;
|
||||
|
||||
@@ -88,6 +88,10 @@ void ValgrindToolRunner::start()
|
||||
|
||||
connect(&m_runner, &ValgrindRunner::processOutputReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessOutput);
|
||||
connect(&m_runner, &ValgrindRunner::valgrindExecuted,
|
||||
this, [this](const QString &commandLine) {
|
||||
appendMessage(commandLine, NormalMessageFormat);
|
||||
});
|
||||
connect(&m_runner, &ValgrindRunner::processErrorReceived,
|
||||
this, &ValgrindToolRunner::receiveProcessError);
|
||||
connect(&m_runner, &ValgrindRunner::finished,
|
||||
|
||||
@@ -114,6 +114,8 @@ void ValgrindRunner::Private::run()
|
||||
valgrind.device = m_device;
|
||||
valgrind.commandLineArguments = QtcProcess::joinArgs(fullArgs, m_device->osType());
|
||||
Utils::QtcProcess::addArgs(&valgrind.commandLineArguments, m_debuggee.commandLineArguments);
|
||||
emit q->valgrindExecuted(QtcProcess::quoteArg(valgrind.executable) + ' '
|
||||
+ valgrind.commandLineArguments);
|
||||
|
||||
if (m_device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE)
|
||||
m_valgrindProcess.start(valgrind);
|
||||
|
||||
@@ -64,6 +64,7 @@ signals:
|
||||
void logMessageReceived(const QByteArray &);
|
||||
void processOutputReceived(const QString &, Utils::OutputFormat);
|
||||
void processErrorReceived(const QString &, QProcess::ProcessError);
|
||||
void valgrindExecuted(const QString &);
|
||||
void valgrindStarted(qint64 pid);
|
||||
void finished();
|
||||
void extraProcessFinished();
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <utils/qtcfallthrough.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -169,7 +170,7 @@ void WinRtRunnerHelper::startWinRtRunner(const RunConf &conf)
|
||||
QtcProcess::addArg(&runnerArgs, QStringLiteral("--debugger-arguments"));
|
||||
QtcProcess::addArg(&runnerArgs, m_debuggerArguments);
|
||||
}
|
||||
// fall through
|
||||
Q_FALLTHROUGH();
|
||||
case Start:
|
||||
QtcProcess::addArgs(&runnerArgs, QStringLiteral("--start --stop --install --wait 0"));
|
||||
connectProcess = true;
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
|
||||
#include "json.h"
|
||||
|
||||
|
||||
//#define PARSER_DEBUG
|
||||
#ifdef PARSER_DEBUG
|
||||
static int indent = 0;
|
||||
|
||||