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