forked from qt-creator/qt-creator
Fix warnings
Change-Id: I49dc38853df77bcc4d72c64132700c6059fbd5d7 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -1560,8 +1560,8 @@ private:
|
||||
insertSignalDeclarationStatement.write(&typeId, value.name, signature);
|
||||
};
|
||||
|
||||
auto update = [&](const Storage::SignalDeclarationView &view,
|
||||
const Storage::SignalDeclaration &value) {
|
||||
auto update = [&]([[maybe_unused]] const Storage::SignalDeclarationView &view,
|
||||
[[maybe_unused]] const Storage::SignalDeclaration &value) {
|
||||
return Sqlite::UpdateChange::No;
|
||||
};
|
||||
|
||||
|
@@ -289,7 +289,8 @@ void ProjectStorageUpdater::updateQmldirs(const QStringList &qmlDirs,
|
||||
}
|
||||
}
|
||||
|
||||
void ProjectStorageUpdater::pathsWithIdsChanged(const std::vector<IdPaths> &idPaths) {}
|
||||
void ProjectStorageUpdater::pathsWithIdsChanged([[maybe_unused]] const std::vector<IdPaths> &idPaths)
|
||||
{}
|
||||
|
||||
void ProjectStorageUpdater::parseTypeInfos(const QStringList &typeInfos,
|
||||
const QList<QmlDirParser::Import> &qmldirDependencies,
|
||||
|
@@ -44,13 +44,13 @@ class ItemLibraryInfo
|
||||
{
|
||||
public:
|
||||
QList<ItemLibraryEntry> entries() const { return {}; }
|
||||
QList<ItemLibraryEntry> entriesForType(const QByteArray &typeName,
|
||||
int majorVersion,
|
||||
int minorVersion) const
|
||||
QList<ItemLibraryEntry> entriesForType([[maybe_unused]] const QByteArray &typeName,
|
||||
[[maybe_unused]] int majorVersion,
|
||||
[[maybe_unused]] int minorVersion) const
|
||||
{
|
||||
return {};
|
||||
}
|
||||
ItemLibraryEntry entry(const QString &name) const { return {}; }
|
||||
ItemLibraryEntry entry([[maybe_unused]] const QString &name) const { return {}; }
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -39,11 +39,11 @@ class ModelNode;
|
||||
class AbstractProperty;
|
||||
class ItemLibraryInfo;
|
||||
|
||||
inline bool operator==(const MetaInfo &first, const MetaInfo &second)
|
||||
inline bool operator==([[maybe_unused]] const MetaInfo &first, [[maybe_unused]] const MetaInfo &second)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
inline bool operator!=(const MetaInfo &first, const MetaInfo &second)
|
||||
inline bool operator!=([[maybe_unused]] const MetaInfo &first, [[maybe_unused]] const MetaInfo &second)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
static MetaInfo global() { return {}; }
|
||||
static void clearGlobal() {}
|
||||
|
||||
static void setPluginPaths(const QStringList &paths) {}
|
||||
static void setPluginPaths([[maybe_unused]] const QStringList &paths) {}
|
||||
};
|
||||
|
||||
} //namespace QmlDesigner
|
||||
|
@@ -39,57 +39,67 @@ class NodeInstanceView : public AbstractView
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
NodeInstanceView(QObject *parent) {}
|
||||
NodeInstanceView([[maybe_unused]] QObject *parent) {}
|
||||
~NodeInstanceView() override {}
|
||||
|
||||
void modelAttached(Model *model) override {}
|
||||
void modelAboutToBeDetached(Model *model) override {}
|
||||
void nodeCreated(const ModelNode &createdNode) override {}
|
||||
void nodeRemoved(const ModelNode &removedNode,
|
||||
const NodeAbstractProperty &parentProperty,
|
||||
PropertyChangeFlags propertyChange) override
|
||||
void modelAttached([[maybe_unused]] Model *model) override {}
|
||||
void modelAboutToBeDetached([[maybe_unused]] Model *model) override {}
|
||||
void nodeCreated([[maybe_unused]] const ModelNode &createdNode) override {}
|
||||
void nodeRemoved([[maybe_unused]] const ModelNode &removedNode,
|
||||
[[maybe_unused]] const NodeAbstractProperty &parentProperty,
|
||||
[[maybe_unused]] PropertyChangeFlags propertyChange) override
|
||||
{}
|
||||
void propertiesAboutToBeRemoved(const QList<AbstractProperty> &propertyList) override {}
|
||||
void propertiesRemoved(const QList<AbstractProperty> &propertyList) override {}
|
||||
void variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
||||
PropertyChangeFlags propertyChange) override
|
||||
void propertiesAboutToBeRemoved([[maybe_unused]] const QList<AbstractProperty> &propertyList) override
|
||||
{}
|
||||
void bindingPropertiesChanged(const QList<BindingProperty> &propertyList,
|
||||
PropertyChangeFlags propertyChange) override
|
||||
void propertiesRemoved([[maybe_unused]] const QList<AbstractProperty> &propertyList) override {}
|
||||
void variantPropertiesChanged([[maybe_unused]] const QList<VariantProperty> &propertyList,
|
||||
[[maybe_unused]] PropertyChangeFlags propertyChange) override
|
||||
{}
|
||||
void signalHandlerPropertiesChanged(const QVector<SignalHandlerProperty> &propertyList,
|
||||
PropertyChangeFlags propertyChange) override
|
||||
void bindingPropertiesChanged([[maybe_unused]] const QList<BindingProperty> &propertyList,
|
||||
[[maybe_unused]] PropertyChangeFlags propertyChange) override
|
||||
{}
|
||||
void nodeReparented(const ModelNode &node,
|
||||
const NodeAbstractProperty &newPropertyParent,
|
||||
const NodeAbstractProperty &oldPropertyParent,
|
||||
AbstractView::PropertyChangeFlags propertyChange) override
|
||||
void signalHandlerPropertiesChanged([[maybe_unused]] const QVector<SignalHandlerProperty> &propertyList,
|
||||
[[maybe_unused]] PropertyChangeFlags propertyChange) override
|
||||
{}
|
||||
void nodeIdChanged(const ModelNode &node, const QString &newId, const QString &oldId) override
|
||||
void nodeReparented([[maybe_unused]] const ModelNode &node,
|
||||
[[maybe_unused]] const NodeAbstractProperty &newPropertyParent,
|
||||
[[maybe_unused]] const NodeAbstractProperty &oldPropertyParent,
|
||||
[[maybe_unused]] AbstractView::PropertyChangeFlags propertyChange) override
|
||||
{}
|
||||
void nodeOrderChanged(const NodeListProperty &listProperty) override {}
|
||||
void rootNodeTypeChanged(const QString &type, int majorVersion, int minorVersion) override {}
|
||||
void nodeTypeChanged(const ModelNode &node,
|
||||
const TypeName &type,
|
||||
int majorVersion,
|
||||
int minorVersion) override
|
||||
void nodeIdChanged([[maybe_unused]] const ModelNode &node,
|
||||
[[maybe_unused]] const QString &newId,
|
||||
[[maybe_unused]] const QString &oldId) override
|
||||
{}
|
||||
void customNotification(const AbstractView *view,
|
||||
const QString &identifier,
|
||||
const QList<ModelNode> &nodeList,
|
||||
const QList<QVariant> &data) override
|
||||
void nodeOrderChanged([[maybe_unused]] const NodeListProperty &listProperty) override {}
|
||||
void rootNodeTypeChanged([[maybe_unused]] const QString &type,
|
||||
[[maybe_unused]] int majorVersion,
|
||||
[[maybe_unused]] int minorVersion) override
|
||||
{}
|
||||
void nodeTypeChanged([[maybe_unused]] const ModelNode &node,
|
||||
[[maybe_unused]] const TypeName &type,
|
||||
[[maybe_unused]] int majorVersion,
|
||||
[[maybe_unused]] int minorVersion) override
|
||||
{}
|
||||
void customNotification([[maybe_unused]] const AbstractView *view,
|
||||
[[maybe_unused]] const QString &identifier,
|
||||
[[maybe_unused]] const QList<ModelNode> &nodeList,
|
||||
[[maybe_unused]] const QList<QVariant> &data) override
|
||||
{}
|
||||
|
||||
void rewriterBeginTransaction() override {}
|
||||
void rewriterEndTransaction() override {}
|
||||
|
||||
void importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports) override
|
||||
void importsChanged([[maybe_unused]] const QList<Import> &addedImports,
|
||||
[[maybe_unused]] const QList<Import> &removedImports) override
|
||||
{}
|
||||
|
||||
void requestModelNodePreviewImage(const ModelNode &node) {}
|
||||
void requestModelNodePreviewImage([[maybe_unused]] const ModelNode &node) {}
|
||||
|
||||
void sendToken(const QString &token, int number, const QVector<ModelNode> &nodeVector) {}
|
||||
void setTarget(ProjectExplorer::Target *newTarget) {}
|
||||
void sendToken([[maybe_unused]] const QString &token,
|
||||
[[maybe_unused]] int number,
|
||||
[[maybe_unused]] const QVector<ModelNode> &nodeVector)
|
||||
{}
|
||||
void setTarget([[maybe_unused]] ProjectExplorer::Target *newTarget) {}
|
||||
void setCrashCallback(std::function<void()>) {}
|
||||
};
|
||||
|
||||
|
@@ -40,11 +40,17 @@ public:
|
||||
ModelNode modelNode() { return {}; }
|
||||
const ModelNode modelNode() const { return {}; }
|
||||
bool hasModelNode() const { return {}; }
|
||||
static bool isValidQmlModelNodeFacade(const ModelNode &modelNode) { return {}; }
|
||||
static bool isValidQmlModelNodeFacade([[maybe_unused]] const ModelNode &modelNode)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
virtual bool isValid() const { return {}; }
|
||||
|
||||
AbstractView *view() const { return {}; }
|
||||
static NodeInstanceView *nodeInstanceView(const ModelNode &modelNode) { return {}; }
|
||||
static NodeInstanceView *nodeInstanceView([[maybe_unused]] const ModelNode &modelNode)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
NodeInstanceView *nodeInstanceView() const { return {}; }
|
||||
bool isRootNode() const { return {}; }
|
||||
|
||||
|
@@ -36,7 +36,7 @@ class QMLDESIGNERCORE_EXPORT QmlObjectNode : public QmlModelNodeFacade
|
||||
{
|
||||
public:
|
||||
QmlObjectNode() {}
|
||||
QmlObjectNode(const ModelNode &modelNode){};
|
||||
QmlObjectNode([[maybe_unused]] const ModelNode &modelNode){};
|
||||
};
|
||||
|
||||
} // namespace QmlDesigner
|
||||
|
@@ -38,7 +38,7 @@ public:
|
||||
|
||||
bool isValid() const override { return {}; }
|
||||
|
||||
void toogleRecording(bool b) const {}
|
||||
void toogleRecording(bool) const {}
|
||||
|
||||
void resetGroupRecording() const {}
|
||||
};
|
||||
|
@@ -108,7 +108,9 @@ public:
|
||||
void reactivateTextMofifierChangeSignals() {}
|
||||
void deactivateTextMofifierChangeSignals() {}
|
||||
|
||||
void auxiliaryDataChanged(const ModelNode &node, const PropertyName &name, const QVariant &data) override
|
||||
void auxiliaryDataChanged([[maybe_unused]] const ModelNode &node,
|
||||
[[maybe_unused]] const PropertyName &name,
|
||||
[[maybe_unused]] const QVariant &data) override
|
||||
{}
|
||||
|
||||
Internal::ModelNodePositionStorage *positionStorage() const { return nullptr; }
|
||||
|
@@ -410,7 +410,7 @@ TEST_F(AsynchronousImageCache, RequestImageWithAuxiliaryDataRequestImageFromGene
|
||||
mockCaptureCallback.AsStdFunction(),
|
||||
mockAbortCallback.AsStdFunction(),
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
notification.wait();
|
||||
}
|
||||
|
||||
@@ -438,7 +438,7 @@ TEST_F(AsynchronousImageCache, RequestSmallImageWithAuxiliaryDataRequestImageFro
|
||||
mockCaptureCallback.AsStdFunction(),
|
||||
mockAbortCallback.AsStdFunction(),
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
notification.wait();
|
||||
}
|
||||
|
||||
|
@@ -586,6 +586,10 @@ const char *importKindToText(ImportKind kind)
|
||||
return "Import";
|
||||
case ImportKind::ModuleDependency:
|
||||
return "ModuleDependency";
|
||||
case ImportKind::ModuleExportedImport:
|
||||
return "ModuleExportedImport";
|
||||
case ImportKind::ModuleExportedModuleDependency:
|
||||
return "ModuleExportedModuleDependency";
|
||||
}
|
||||
|
||||
return "";
|
||||
|
@@ -347,7 +347,7 @@ TEST_F(ImageCacheGenerator, CallsCollectorWithAuxiliaryData)
|
||||
{},
|
||||
imageCallbackMock.AsStdFunction(),
|
||||
{},
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
notification.wait();
|
||||
}
|
||||
|
||||
|
@@ -281,8 +281,6 @@ protected:
|
||||
|
||||
TEST_F(ProjectStorageUpdater, GetContentForQmlDirPathsIfFileStatusIsDifferent)
|
||||
{
|
||||
SourceId qmlDir1PathSourceId = sourcePathCache.sourceId("/path/one/qmldir");
|
||||
SourceId qmlDir2PathSourceId = sourcePathCache.sourceId("/path/two/qmldir");
|
||||
SourceId qmlDir3PathSourceId = sourcePathCache.sourceId("/path/three/qmldir");
|
||||
QStringList qmlDirs = {"/path/one/qmldir", "/path/two/qmldir", "/path/three/qmldir"};
|
||||
ON_CALL(fileSystemMock, fileStatus(_)).WillByDefault([](auto sourceId) {
|
||||
|
@@ -46,11 +46,6 @@ public:
|
||||
long long value = 0;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, KeyValueView keyValueView)
|
||||
{
|
||||
return out << "(" << keyValueView.key << ", " << keyValueView.value << ")";
|
||||
}
|
||||
|
||||
class KeyValue
|
||||
{
|
||||
public:
|
||||
@@ -74,11 +69,6 @@ public:
|
||||
long long value = 0;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, KeyValue keyValue)
|
||||
{
|
||||
return out << "(" << keyValue.key << ", " << keyValue.value << ")";
|
||||
}
|
||||
|
||||
using KeyValues = std::vector<KeyValue>;
|
||||
|
||||
MATCHER_P2(IsKeyValue,
|
||||
|
@@ -198,7 +198,7 @@ TEST_F(SynchronousImageCache, GetIconWithOutdatedTimeStampStored)
|
||||
|
||||
auto icon = cache.icon("/path/to/Component.qml",
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
}
|
||||
|
||||
TEST_F(SynchronousImageCache, IconCallsCollectorWithAuxiliaryData)
|
||||
@@ -219,7 +219,7 @@ TEST_F(SynchronousImageCache, IconCallsCollectorWithAuxiliaryData)
|
||||
|
||||
auto icon = cache.icon("/path/to/Component.qml",
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
}
|
||||
|
||||
TEST_F(SynchronousImageCache, ImageCallsCollectorWithAuxiliaryData)
|
||||
@@ -240,7 +240,7 @@ TEST_F(SynchronousImageCache, ImageCallsCollectorWithAuxiliaryData)
|
||||
|
||||
auto icon = cache.image("/path/to/Component.qml",
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
}
|
||||
|
||||
TEST_F(SynchronousImageCache, SmallImageCallsCollectorWithAuxiliaryData)
|
||||
@@ -261,7 +261,7 @@ TEST_F(SynchronousImageCache, SmallImageCallsCollectorWithAuxiliaryData)
|
||||
|
||||
auto icon = cache.smallImage("/path/to/Component.qml",
|
||||
"extraId1",
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color"});
|
||||
FontCollectorSizesAuxiliaryData{sizes, "color", "text"});
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user