forked from qt-creator/qt-creator
QmlDesigner: Adapt to C++ 17 [[maybe_unused]]
It has the advantage to to move the attribute to the declaration instead of using a workaround. Change-Id: I08b712f146a0625d0367657c31d6c1e5f7caec41 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -103,9 +103,8 @@ instanceInformationsChanged(const QMultiHash<ModelNode, InformationName> &inform
|
|||||||
handleMaybeDone();
|
handleMaybeDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetExporterView::instancesPreviewImageChanged(const QVector<ModelNode> &nodeList)
|
void AssetExporterView::instancesPreviewImageChanged([[maybe_unused]] const QVector<ModelNode> &nodeList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(nodeList);
|
|
||||||
emit previewChanged();
|
emit previewChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,9 +56,8 @@ bool QmlDesigner::ItemNodeDumper::isExportable() const
|
|||||||
return lineage().contains("QtQuick.Item");
|
return lineage().contains("QtQuick.Item");
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject QmlDesigner::ItemNodeDumper::json(QmlDesigner::Component &component) const
|
QJsonObject QmlDesigner::ItemNodeDumper::json([[maybe_unused]] QmlDesigner::Component &component) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(component);
|
|
||||||
const QmlObjectNode &qmlObjectNode = objectNode();
|
const QmlObjectNode &qmlObjectNode = objectNode();
|
||||||
QJsonObject jsonObject;
|
QJsonObject jsonObject;
|
||||||
|
|
||||||
|
@@ -71,9 +71,8 @@ bool TextNodeDumper::isExportable() const
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject TextNodeDumper::json(Component &component) const
|
QJsonObject TextNodeDumper::json([[maybe_unused]] Component &component) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(component);
|
|
||||||
QJsonObject jsonObject = ItemNodeDumper::json(component);
|
QJsonObject jsonObject = ItemNodeDumper::json(component);
|
||||||
|
|
||||||
QJsonObject textDetails;
|
QJsonObject textDetails;
|
||||||
|
@@ -107,9 +107,10 @@ void AnnotationListModel::fillModel()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex AnnotationListModel::index(int row, int column, const QModelIndex &parent) const
|
QModelIndex AnnotationListModel::index(int row,
|
||||||
|
int column,
|
||||||
|
[[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return createIndex(row, column);
|
return createIndex(row, column);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,9 +83,8 @@ QCompleter *CommentDelegate::completer() const
|
|||||||
|
|
||||||
void CommentDelegate::updateEditorGeometry(QWidget *editor,
|
void CommentDelegate::updateEditorGeometry(QWidget *editor,
|
||||||
const QStyleOptionViewItem &option,
|
const QStyleOptionViewItem &option,
|
||||||
const QModelIndex &index) const
|
[[maybe_unused]] const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
editor->setGeometry(option.rect);
|
editor->setGeometry(option.rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,12 +101,9 @@ CommentTitleDelegate::CommentTitleDelegate(QObject *parent)
|
|||||||
CommentTitleDelegate::~CommentTitleDelegate() {}
|
CommentTitleDelegate::~CommentTitleDelegate() {}
|
||||||
|
|
||||||
QWidget *CommentTitleDelegate::createEditor(QWidget *parent,
|
QWidget *CommentTitleDelegate::createEditor(QWidget *parent,
|
||||||
const QStyleOptionViewItem &option,
|
[[maybe_unused]] const QStyleOptionViewItem &option,
|
||||||
const QModelIndex &index) const
|
[[maybe_unused]] const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(index)
|
|
||||||
|
|
||||||
auto *editor = new QComboBox(parent);
|
auto *editor = new QComboBox(parent);
|
||||||
editor->setEditable(true);
|
editor->setEditable(true);
|
||||||
editor->setCompleter(completer());
|
editor->setCompleter(completer());
|
||||||
|
@@ -70,10 +70,8 @@ bool AssetsLibraryDirsModel::setData(const QModelIndex &index, const QVariant &v
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AssetsLibraryDirsModel::rowCount(const QModelIndex &parent) const
|
int AssetsLibraryDirsModel::rowCount([[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
|
|
||||||
return m_dirs.size();
|
return m_dirs.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -57,10 +57,8 @@ QVariant AssetsLibraryFilesModel::data(const QModelIndex &index, int role) const
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
int AssetsLibraryFilesModel::rowCount(const QModelIndex &parent) const
|
int AssetsLibraryFilesModel::rowCount([[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
|
|
||||||
return m_files.size();
|
return m_files.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -283,10 +283,8 @@ QVariant AssetsLibraryModel::data(const QModelIndex &index, int role) const
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
int AssetsLibraryModel::rowCount(const QModelIndex &parent) const
|
int AssetsLibraryModel::rowCount([[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -139,8 +139,9 @@ AssetsLibraryWidget::AssetsLibraryWidget(AsynchronousImageCache &asynchronousFon
|
|||||||
|
|
||||||
// If project directory contents change, or one of the asset files is modified, we must
|
// If project directory contents change, or one of the asset files is modified, we must
|
||||||
// reconstruct the model to update the icons
|
// reconstruct the model to update the icons
|
||||||
connect(m_fileSystemWatcher, &Utils::FileSystemWatcher::directoryChanged, [this](const QString & changedDirPath) {
|
connect(m_fileSystemWatcher,
|
||||||
Q_UNUSED(changedDirPath)
|
&Utils::FileSystemWatcher::directoryChanged,
|
||||||
|
[this]([[maybe_unused]] const QString &changedDirPath) {
|
||||||
m_assetCompressionTimer.start();
|
m_assetCompressionTimer.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -229,10 +229,8 @@ void ActionEditorDialog::setAllConnections(const QList<ConnectionOption> &connec
|
|||||||
m_lock = false;
|
m_lock = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActionEditorDialog::updateComboBoxes(int index, ComboBox type)
|
void ActionEditorDialog::updateComboBoxes([[maybe_unused]] int index, ComboBox type)
|
||||||
{
|
{
|
||||||
Q_UNUSED(index)
|
|
||||||
|
|
||||||
const int currentType = m_comboBoxType->currentIndex();
|
const int currentType = m_comboBoxType->currentIndex();
|
||||||
const int currentStack = m_stackedLayout->currentIndex();
|
const int currentStack = m_stackedLayout->currentIndex();
|
||||||
bool typeChanged = false;
|
bool typeChanged = false;
|
||||||
|
@@ -99,9 +99,8 @@ bool BindingEditorWidget::event(QEvent *event)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TextEditor::AssistInterface *BindingEditorWidget::createAssistInterface(
|
TextEditor::AssistInterface *BindingEditorWidget::createAssistInterface(
|
||||||
TextEditor::AssistKind assistKind, TextEditor::AssistReason assistReason) const
|
[[maybe_unused]] TextEditor::AssistKind assistKind, TextEditor::AssistReason assistReason) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(assistKind)
|
|
||||||
return new QmlJSEditor::QmlJSCompletionAssistInterface(
|
return new QmlJSEditor::QmlJSCompletionAssistInterface(
|
||||||
textCursor(), Utils::FilePath(),
|
textCursor(), Utils::FilePath(),
|
||||||
assistReason, qmljsdocument->semanticInfo());
|
assistReason, qmljsdocument->semanticInfo());
|
||||||
|
@@ -53,39 +53,34 @@ bool ConnectionVisitor::visit(QmlJS::AST::NumericLiteral *ast)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionVisitor::visit(QmlJS::AST::TrueLiteral *ast)
|
bool ConnectionVisitor::visit([[maybe_unused]] QmlJS::AST::TrueLiteral *ast)
|
||||||
{
|
{
|
||||||
Q_UNUSED(ast)
|
|
||||||
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_TrueLiteral, QString("true")));
|
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_TrueLiteral, QString("true")));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionVisitor::visit(QmlJS::AST::FalseLiteral *ast)
|
bool ConnectionVisitor::visit([[maybe_unused]] QmlJS::AST::FalseLiteral *ast)
|
||||||
{
|
{
|
||||||
Q_UNUSED(ast)
|
|
||||||
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_FalseLiteral, QString("false")));
|
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_FalseLiteral, QString("false")));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionVisitor::visit(QmlJS::AST::BinaryExpression *ast)
|
bool ConnectionVisitor::visit([[maybe_unused]] QmlJS::AST::BinaryExpression *ast)
|
||||||
{
|
{
|
||||||
Q_UNUSED(ast)
|
|
||||||
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_BinaryExpression,
|
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_BinaryExpression,
|
||||||
QString()));
|
QString()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionVisitor::visit(QmlJS::AST::CallExpression *ast)
|
bool ConnectionVisitor::visit([[maybe_unused]] QmlJS::AST::CallExpression *ast)
|
||||||
{
|
{
|
||||||
Q_UNUSED(ast)
|
|
||||||
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_CallExpression,
|
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_CallExpression,
|
||||||
QString()));
|
QString()));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConnectionVisitor::visit(QmlJS::AST::ArgumentList *ast)
|
bool ConnectionVisitor::visit([[maybe_unused]] QmlJS::AST::ArgumentList *ast)
|
||||||
{
|
{
|
||||||
Q_UNUSED(ast)
|
|
||||||
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_ArgumentList,
|
m_expression.append(qMakePair(QmlJS::AST::Node::Kind::Kind_ArgumentList,
|
||||||
QString()));
|
QString()));
|
||||||
return true;
|
return true;
|
||||||
|
@@ -77,12 +77,10 @@ void SignalListDelegate::paint(QPainter *painter,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SignalListDelegate::editorEvent(QEvent *event,
|
bool SignalListDelegate::editorEvent(QEvent *event,
|
||||||
QAbstractItemModel *model,
|
[[maybe_unused]] QAbstractItemModel *model,
|
||||||
const QStyleOptionViewItem &option,
|
const QStyleOptionViewItem &option,
|
||||||
const QModelIndex &index)
|
const QModelIndex &index)
|
||||||
{
|
{
|
||||||
Q_UNUSED(model)
|
|
||||||
|
|
||||||
if (index.column() == SignalListModel::ButtonColumn
|
if (index.column() == SignalListModel::ButtonColumn
|
||||||
&& event->type() == QEvent::MouseButtonRelease) {
|
&& event->type() == QEvent::MouseButtonRelease) {
|
||||||
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
|
QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event);
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
DefaultAction(const QString &description);
|
DefaultAction(const QString &description);
|
||||||
|
|
||||||
// virtual function instead of slot
|
// virtual function instead of slot
|
||||||
virtual void actionTriggered(bool enable) { Q_UNUSED(enable) }
|
virtual void actionTriggered([[maybe_unused]] bool enable) {}
|
||||||
void setSelectionContext(const SelectionContext &selectionContext);
|
void setSelectionContext(const SelectionContext &selectionContext);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -48,10 +48,10 @@ static Utils::FilePath iconPath()
|
|||||||
"qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/");
|
"qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/images/");
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
|
QPixmap QmlDesignerIconProvider::requestPixmap(const QString &id,
|
||||||
|
QSize *size,
|
||||||
|
[[maybe_unused]] const QSize &requestedSize)
|
||||||
{
|
{
|
||||||
Q_UNUSED(requestedSize)
|
|
||||||
|
|
||||||
QPixmap result = getPixmap(id);
|
QPixmap result = getPixmap(id);
|
||||||
|
|
||||||
if (size)
|
if (size)
|
||||||
|
@@ -125,11 +125,10 @@ QString Theme::replaceCssColors(const QString &input)
|
|||||||
|
|
||||||
void Theme::setupTheme(QQmlEngine *engine)
|
void Theme::setupTheme(QQmlEngine *engine)
|
||||||
{
|
{
|
||||||
static const int typeIndex = qmlRegisterSingletonType<Theme>(
|
[[maybe_unused]] static const int typeIndex = qmlRegisterSingletonType<Theme>(
|
||||||
"QtQuickDesignerTheme", 1, 0, "Theme", [](QQmlEngine *, QJSEngine *) {
|
"QtQuickDesignerTheme", 1, 0, "Theme", [](QQmlEngine *, QJSEngine *) {
|
||||||
return new Theme(Utils::creatorTheme(), nullptr);
|
return new Theme(Utils::creatorTheme(), nullptr);
|
||||||
});
|
});
|
||||||
Q_UNUSED(typeIndex)
|
|
||||||
|
|
||||||
engine->addImageProvider(QLatin1String("icons"), new QmlDesignerIconProvider());
|
engine->addImageProvider(QLatin1String("icons"), new QmlDesignerIconProvider());
|
||||||
}
|
}
|
||||||
|
@@ -99,9 +99,8 @@ void BindingModel::bindingRemoved(const BindingProperty &bindingProperty)
|
|||||||
m_handleDataChanged = true;
|
m_handleDataChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BindingModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
void BindingModel::selectionChanged([[maybe_unused]] const QList<ModelNode> &selectedNodes)
|
||||||
{
|
{
|
||||||
Q_UNUSED(selectedNodes)
|
|
||||||
m_handleDataChanged = false;
|
m_handleDataChanged = false;
|
||||||
resetModel();
|
resetModel();
|
||||||
m_handleDataChanged = true;
|
m_handleDataChanged = true;
|
||||||
|
@@ -176,12 +176,10 @@ void ConnectionView::selectedNodesChanged(const QList<ModelNode> & selectedNodeL
|
|||||||
emit connectionViewWidget()->setEnabledAddButton(selectedNodeList.count() == 1);
|
emit connectionViewWidget()->setEnabledAddButton(selectedNodeList.count() == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConnectionView::auxiliaryDataChanged(const ModelNode &node,
|
void ConnectionView::auxiliaryDataChanged([[maybe_unused]] const ModelNode &node,
|
||||||
const PropertyName &name,
|
const PropertyName &name,
|
||||||
const QVariant &data)
|
const QVariant &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(node)
|
|
||||||
|
|
||||||
// Check if the auxiliary data is actually the locked property or if it is unlocked
|
// Check if the auxiliary data is actually the locked property or if it is unlocked
|
||||||
if (name != QmlDesigner::lockedProperty || !data.toBool())
|
if (name != QmlDesigner::lockedProperty || !data.toBool())
|
||||||
return;
|
return;
|
||||||
|
@@ -281,9 +281,8 @@ void DynamicPropertiesModel::bindingRemoved(const BindingProperty &bindingProper
|
|||||||
m_handleDataChanged = true;
|
m_handleDataChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynamicPropertiesModel::selectionChanged(const QList<ModelNode> &selectedNodes)
|
void DynamicPropertiesModel::selectionChanged([[maybe_unused]] const QList<ModelNode> &selectedNodes)
|
||||||
{
|
{
|
||||||
Q_UNUSED(selectedNodes)
|
|
||||||
m_handleDataChanged = false;
|
m_handleDataChanged = false;
|
||||||
resetModel();
|
resetModel();
|
||||||
m_handleDataChanged = true;
|
m_handleDataChanged = true;
|
||||||
|
@@ -40,13 +40,12 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
CurveEditorView::CurveEditorView(QObject *parent)
|
CurveEditorView::CurveEditorView([[maybe_unused]] QObject *parent)
|
||||||
: AbstractView(parent)
|
: AbstractView(parent)
|
||||||
, m_block(false)
|
, m_block(false)
|
||||||
, m_model(new CurveEditorModel())
|
, m_model(new CurveEditorModel())
|
||||||
, m_editor(new CurveEditor(m_model))
|
, m_editor(new CurveEditor(m_model))
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent);
|
|
||||||
connect(m_model, &CurveEditorModel::commitCurrentFrame, this, &CurveEditorView::commitCurrentFrame);
|
connect(m_model, &CurveEditorModel::commitCurrentFrame, this, &CurveEditorView::commitCurrentFrame);
|
||||||
connect(m_model, &CurveEditorModel::commitStartFrame, this, &CurveEditorView::commitStartFrame);
|
connect(m_model, &CurveEditorModel::commitStartFrame, this, &CurveEditorView::commitStartFrame);
|
||||||
connect(m_model, &CurveEditorModel::commitEndFrame, this, &CurveEditorView::commitEndFrame);
|
connect(m_model, &CurveEditorModel::commitEndFrame, this, &CurveEditorView::commitEndFrame);
|
||||||
@@ -92,13 +91,10 @@ bool dirtyfiesView(const ModelNode &node)
|
|||||||
|| QmlTimelineKeyframeGroup::isValidQmlTimelineKeyframeGroup(node);
|
|| QmlTimelineKeyframeGroup::isValidQmlTimelineKeyframeGroup(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::nodeRemoved(const ModelNode &removedNode,
|
void CurveEditorView::nodeRemoved([[maybe_unused]] const ModelNode &removedNode,
|
||||||
const NodeAbstractProperty &parentProperty,
|
const NodeAbstractProperty &parentProperty,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(removedNode);
|
|
||||||
Q_UNUSED(propertyChange);
|
|
||||||
|
|
||||||
if (!parentProperty.isValid())
|
if (!parentProperty.isValid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -110,16 +106,11 @@ void CurveEditorView::nodeRemoved(const ModelNode &removedNode,
|
|||||||
m_model->reset({});
|
m_model->reset({});
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::nodeReparented(const ModelNode &node,
|
void CurveEditorView::nodeReparented([[maybe_unused]] const ModelNode &node,
|
||||||
const NodeAbstractProperty &newPropertyParent,
|
[[maybe_unused]] const NodeAbstractProperty &newPropertyParent,
|
||||||
const NodeAbstractProperty &oldPropertyParent,
|
[[maybe_unused]] const NodeAbstractProperty &oldPropertyParent,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(node);
|
|
||||||
Q_UNUSED(newPropertyParent);
|
|
||||||
Q_UNUSED(oldPropertyParent);
|
|
||||||
Q_UNUSED(propertyChange);
|
|
||||||
|
|
||||||
ModelNode parent = newPropertyParent.parentModelNode();
|
ModelNode parent = newPropertyParent.parentModelNode();
|
||||||
if (newPropertyParent.isValid() && dirtyfiesView(parent))
|
if (newPropertyParent.isValid() && dirtyfiesView(parent))
|
||||||
updateKeyframes();
|
updateKeyframes();
|
||||||
@@ -144,10 +135,9 @@ void CurveEditorView::auxiliaryDataChanged(const ModelNode &node,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::instancePropertyChanged(const QList<QPair<ModelNode, PropertyName>> &propertyList)
|
void CurveEditorView::instancePropertyChanged(
|
||||||
|
[[maybe_unused]] const QList<QPair<ModelNode, PropertyName>> &propertyList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyList);
|
|
||||||
|
|
||||||
if (auto timeline = activeTimeline(); timeline.isValid()) {
|
if (auto timeline = activeTimeline(); timeline.isValid()) {
|
||||||
|
|
||||||
auto timelineNode = timeline.modelNode();
|
auto timelineNode = timeline.modelNode();
|
||||||
@@ -168,12 +158,9 @@ void CurveEditorView::instancePropertyChanged(const QList<QPair<ModelNode, Prope
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
void CurveEditorView::variantPropertiesChanged([[maybe_unused]] const QList<VariantProperty> &propertyList,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyList);
|
|
||||||
Q_UNUSED(propertyChange);
|
|
||||||
|
|
||||||
for (const auto &property : propertyList) {
|
for (const auto &property : propertyList) {
|
||||||
if ((property.name() == "frame" || property.name() == "value")
|
if ((property.name() == "frame" || property.name() == "value")
|
||||||
&& property.parentModelNode().type() == "QtQuick.Timeline.Keyframe"
|
&& property.parentModelNode().type() == "QtQuick.Timeline.Keyframe"
|
||||||
@@ -186,12 +173,9 @@ void CurveEditorView::variantPropertiesChanged(const QList<VariantProperty> &pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::bindingPropertiesChanged(const QList<BindingProperty> &propertyList,
|
void CurveEditorView::bindingPropertiesChanged([[maybe_unused]] const QList<BindingProperty> &propertyList,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyList);
|
|
||||||
Q_UNUSED(propertyChange);
|
|
||||||
|
|
||||||
for (const auto &property : propertyList) {
|
for (const auto &property : propertyList) {
|
||||||
if (property.name() == "easing.bezierCurve") {
|
if (property.name() == "easing.bezierCurve") {
|
||||||
updateKeyframes();
|
updateKeyframes();
|
||||||
@@ -199,10 +183,8 @@ void CurveEditorView::bindingPropertiesChanged(const QList<BindingProperty> &pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurveEditorView::propertiesRemoved(const QList<AbstractProperty> &propertyList)
|
void CurveEditorView::propertiesRemoved([[maybe_unused]] const QList<AbstractProperty> &propertyList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyList);
|
|
||||||
|
|
||||||
for (const auto &property : propertyList) {
|
for (const auto &property : propertyList) {
|
||||||
if (property.name() == "keyframes" && property.parentModelNode().isValid()) {
|
if (property.name() == "keyframes" && property.parentModelNode().isValid()) {
|
||||||
ModelNode parent = property.parentModelNode();
|
ModelNode parent = property.parentModelNode();
|
||||||
|
@@ -257,7 +257,7 @@ void GraphicsScene::removeCurveItem(unsigned int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
Q_UNUSED(m_curves.removeOne(tmp));
|
m_curves.removeOne(tmp);
|
||||||
delete tmp;
|
delete tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -119,14 +119,13 @@ void HandleItem::underMouseCallback()
|
|||||||
gscene->handleUnderMouse(this);
|
gscene->handleUnderMouse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void HandleItem::paint(QPainter *painter,
|
||||||
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
if (locked())
|
if (locked())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
QColor handleColor(selected() ? m_style.selectionColor : m_style.color);
|
QColor handleColor(selected() ? m_style.selectionColor : m_style.color);
|
||||||
|
|
||||||
if (activated())
|
if (activated())
|
||||||
|
@@ -66,11 +66,10 @@ QRectF KeyframeItem::boundingRect() const
|
|||||||
return QRectF(topLeft, -topLeft);
|
return QRectF(topLeft, -topLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeyframeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void KeyframeItem::paint(QPainter *painter,
|
||||||
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
QColor mainColor = selected() ? m_style.selectionColor : m_style.color;
|
QColor mainColor = selected() ? m_style.selectionColor : m_style.color;
|
||||||
QColor borderColor = isUnified() ? m_style.unifiedColor : m_style.splitColor;
|
QColor borderColor = isUnified() ? m_style.unifiedColor : m_style.splitColor;
|
||||||
|
|
||||||
|
@@ -147,9 +147,8 @@ void Playhead::mouseMoveOutOfBounds(GraphicsView *view)
|
|||||||
m_timer.start();
|
m_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Playhead::mouseRelease(GraphicsView *view)
|
void Playhead::mouseRelease([[maybe_unused]] GraphicsView *view)
|
||||||
{
|
{
|
||||||
Q_UNUSED(view);
|
|
||||||
m_moving = false;
|
m_moving = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -121,10 +121,9 @@ void SelectionModel::selectPaths(const std::vector<TreeItem::Path> &selection)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SelectionModel::changeSelection(const QItemSelection &selected, const QItemSelection &deselected)
|
void SelectionModel::changeSelection([[maybe_unused]] const QItemSelection &selected,
|
||||||
|
[[maybe_unused]] const QItemSelection &deselected)
|
||||||
{
|
{
|
||||||
Q_UNUSED(selected)
|
|
||||||
Q_UNUSED(deselected)
|
|
||||||
emit curvesSelected();
|
emit curvesSelected();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,10 +123,8 @@ void Selector::mouseMove(QMouseEvent *event,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Selector::mouseRelease(QMouseEvent *event, GraphicsScene *scene)
|
void Selector::mouseRelease([[maybe_unused]] QMouseEvent *event, GraphicsScene *scene)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
applyPreSelection(scene);
|
applyPreSelection(scene);
|
||||||
|
|
||||||
m_shortcut = Shortcut();
|
m_shortcut = Shortcut();
|
||||||
|
@@ -182,9 +182,8 @@ int TreeModel::rowCount(const QModelIndex &parent) const
|
|||||||
return parentItem->rowCount();
|
return parentItem->rowCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
int TreeModel::columnCount(const QModelIndex &parent) const
|
int TreeModel::columnCount([[maybe_unused]] const QModelIndex &parent) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(parent)
|
|
||||||
return m_root->columnCount();
|
return m_root->columnCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -263,12 +263,13 @@ void TreeItem::setPinned(bool pinned)
|
|||||||
m_pinned = pinned;
|
m_pinned = pinned;
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeTreeItem::NodeTreeItem(const QString &name, const QIcon &icon, const std::vector<QString> &parentIds)
|
NodeTreeItem::NodeTreeItem(const QString &name,
|
||||||
|
[[maybe_unused]] const QIcon &icon,
|
||||||
|
const std::vector<QString> &parentIds)
|
||||||
: TreeItem(name)
|
: TreeItem(name)
|
||||||
, m_icon(icon)
|
, m_icon(icon)
|
||||||
, m_parentIds(parentIds)
|
, m_parentIds(parentIds)
|
||||||
{
|
{
|
||||||
Q_UNUSED(icon)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeTreeItem *NodeTreeItem::asNodeItem()
|
NodeTreeItem *NodeTreeItem::asNodeItem()
|
||||||
|
@@ -522,9 +522,8 @@ void DebugView::currentStateChanged(const ModelNode &/*node*/)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugView::nodeOrderChanged(const NodeListProperty &listProperty)
|
void DebugView::nodeOrderChanged([[maybe_unused]] const NodeListProperty &listProperty)
|
||||||
{
|
{
|
||||||
Q_UNUSED(listProperty)
|
|
||||||
if (isDebugViewEnabled()) {
|
if (isDebugViewEnabled()) {
|
||||||
QTextStream message;
|
QTextStream message;
|
||||||
QString string;
|
QString string;
|
||||||
|
@@ -93,9 +93,8 @@ QByteArray Edit3DAction::category() const
|
|||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Edit3DAction::isVisible(const SelectionContext &selectionContext) const
|
bool Edit3DAction::isVisible([[maybe_unused]] const SelectionContext &selectionContext) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(selectionContext)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -142,10 +142,8 @@ void Edit3DCanvas::keyReleaseEvent(QKeyEvent *e)
|
|||||||
QWidget::keyReleaseEvent(e);
|
QWidget::keyReleaseEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit3DCanvas::paintEvent(QPaintEvent *e)
|
void Edit3DCanvas::paintEvent([[maybe_unused]] QPaintEvent *e)
|
||||||
{
|
{
|
||||||
Q_UNUSED(e)
|
|
||||||
|
|
||||||
QWidget::paintEvent(e);
|
QWidget::paintEvent(e);
|
||||||
|
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
@@ -85,10 +85,9 @@ Edit3DWidget *Edit3DView::edit3DWidget() const
|
|||||||
return m_edit3DWidget.data();
|
return m_edit3DWidget.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit3DView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> &lastSelectedNodeList)
|
void Edit3DView::selectedNodesChanged([[maybe_unused]] const QList<ModelNode> &selectedNodeList,
|
||||||
|
[[maybe_unused]] const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(selectedNodeList)
|
|
||||||
Q_UNUSED(lastSelectedNodeList)
|
|
||||||
SelectionContext selectionContext(this);
|
SelectionContext selectionContext(this);
|
||||||
selectionContext.setUpdateMode(SelectionContext::UpdateMode::Fast);
|
selectionContext.setUpdateMode(SelectionContext::UpdateMode::Fast);
|
||||||
if (m_alignCamerasAction)
|
if (m_alignCamerasAction)
|
||||||
@@ -219,22 +218,17 @@ void Edit3DView::modelAboutToBeDetached(Model *model)
|
|||||||
AbstractView::modelAboutToBeDetached(model);
|
AbstractView::modelAboutToBeDetached(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit3DView::importsChanged(const QList<Import> &addedImports,
|
void Edit3DView::importsChanged([[maybe_unused]] const QList<Import> &addedImports,
|
||||||
const QList<Import> &removedImports)
|
[[maybe_unused]] const QList<Import> &removedImports)
|
||||||
{
|
{
|
||||||
Q_UNUSED(addedImports)
|
|
||||||
Q_UNUSED(removedImports)
|
|
||||||
|
|
||||||
checkImports();
|
checkImports();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit3DView::customNotification(const AbstractView *view, const QString &identifier,
|
void Edit3DView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QString &identifier,
|
||||||
|
[[maybe_unused]] const QList<ModelNode> &nodeList,
|
||||||
|
[[maybe_unused]] const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(view)
|
|
||||||
Q_UNUSED(nodeList)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
|
|
||||||
if (identifier == "asset_import_update")
|
if (identifier == "asset_import_update")
|
||||||
resetPuppet();
|
resetPuppet();
|
||||||
}
|
}
|
||||||
|
@@ -221,9 +221,8 @@ void Edit3DWidget::showBackgroundColorMenu(bool show, const QPoint &pos)
|
|||||||
m_backgroundColorMenu->close();
|
m_backgroundColorMenu->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Edit3DWidget::linkActivated(const QString &link)
|
void Edit3DWidget::linkActivated([[maybe_unused]] const QString &link)
|
||||||
{
|
{
|
||||||
Q_UNUSED(link)
|
|
||||||
if (m_view)
|
if (m_view)
|
||||||
m_view->addQuick3DImport();
|
m_view->addQuick3DImport();
|
||||||
}
|
}
|
||||||
|
@@ -145,9 +145,8 @@ void EventListDialog::initialize(EventList &events)
|
|||||||
m_table->setColumnHidden(EventListModel::connectColumn, true);
|
m_table->setColumnHidden(EventListModel::connectColumn, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventListDialog::closeEvent(QCloseEvent *event)
|
void EventListDialog::closeEvent([[maybe_unused]] QCloseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
|
||||||
if (auto *view = EventList::nodeListView())
|
if (auto *view = EventList::nodeListView())
|
||||||
view->reset();
|
view->reset();
|
||||||
}
|
}
|
||||||
|
@@ -130,7 +130,7 @@ bool NodeListView::removeEventIds(int nodeId, const QStringList &eventIds)
|
|||||||
if (auto node = compatibleModelNode(nodeId); node.isValid()) {
|
if (auto node = compatibleModelNode(nodeId); node.isValid()) {
|
||||||
QStringList events = eventIdsFromVariant(node.variantProperty("eventIds").value());
|
QStringList events = eventIdsFromVariant(node.variantProperty("eventIds").value());
|
||||||
for (auto &&remove : eventIds)
|
for (auto &&remove : eventIds)
|
||||||
Q_UNUSED(events.removeOne(remove));
|
events.removeOne(remove);
|
||||||
|
|
||||||
return setEventIds(node, events);
|
return setEventIds(node, events);
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@ bool setEventIdsInModelNode(AbstractView *view, const ModelNode &node, const QSt
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QStringList copy(events);
|
QStringList copy(events);
|
||||||
Q_UNUSED(copy.removeDuplicates());
|
copy.removeDuplicates();
|
||||||
QString value = events.join(", ");
|
QString value = events.join(", ");
|
||||||
return view->executeInTransaction("NodeListView::setEventIds", [=]() {
|
return view->executeInTransaction("NodeListView::setEventIds", [=]() {
|
||||||
node.variantProperty("eventIds").setValue(value);
|
node.variantProperty("eventIds").setValue(value);
|
||||||
|
@@ -2075,10 +2075,10 @@ void FormEditorFlowDecisionItem::updateGeometry()
|
|||||||
setTransform(QTransform::fromTranslate(pos.x(), pos.y()));
|
setTransform(QTransform::fromTranslate(pos.x(), pos.y()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void FormEditorFlowDecisionItem::paint(QPainter *painter,
|
||||||
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
if (!painter->isActive())
|
if (!painter->isActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2215,9 +2215,8 @@ void FormEditorFlowDecisionItem::paint(QPainter *painter, const QStyleOptionGrap
|
|||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FormEditorFlowDecisionItem::flowHitTest(const QPointF &point) const
|
bool FormEditorFlowDecisionItem::flowHitTest([[maybe_unused]] const QPointF &point) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(point)
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2244,12 +2243,9 @@ QPointF FormEditor3dPreview::instancePosition() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FormEditor3dPreview::paint(QPainter *painter,
|
void FormEditor3dPreview::paint(QPainter *painter,
|
||||||
const QStyleOptionGraphicsItem *option,
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget)
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
if (!painter->isActive())
|
if (!painter->isActive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -350,9 +350,9 @@ void FormEditorView::nodeReparented(const ModelNode &node, const NodeAbstractPro
|
|||||||
addOrRemoveFormEditorItem(node);
|
addOrRemoveFormEditorItem(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::nodeSourceChanged(const ModelNode &node, const QString &newNodeSource)
|
void FormEditorView::nodeSourceChanged(const ModelNode &node,
|
||||||
|
[[maybe_unused]] const QString &newNodeSource)
|
||||||
{
|
{
|
||||||
Q_UNUSED(newNodeSource)
|
|
||||||
addOrRemoveFormEditorItem(node);
|
addOrRemoveFormEditorItem(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -416,10 +416,10 @@ void FormEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeLi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
void FormEditorView::variantPropertiesChanged(
|
||||||
AbstractView::PropertyChangeFlags propertyChange)
|
const QList<VariantProperty> &propertyList,
|
||||||
|
[[maybe_unused]] AbstractView::PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
for (const VariantProperty &property : propertyList) {
|
for (const VariantProperty &property : propertyList) {
|
||||||
QmlVisualNode node(property.parentModelNode());
|
QmlVisualNode node(property.parentModelNode());
|
||||||
if (node.isFlowTransition() || node.isFlowDecision()) {
|
if (node.isFlowTransition() || node.isFlowDecision()) {
|
||||||
@@ -431,10 +431,10 @@ void FormEditorView::variantPropertiesChanged(const QList<VariantProperty> &prop
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormEditorView::bindingPropertiesChanged(const QList<BindingProperty> &propertyList,
|
void FormEditorView::bindingPropertiesChanged(
|
||||||
AbstractView::PropertyChangeFlags propertyChange)
|
const QList<BindingProperty> &propertyList,
|
||||||
|
[[maybe_unused]] AbstractView::PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
for (const BindingProperty &property : propertyList) {
|
for (const BindingProperty &property : propertyList) {
|
||||||
QmlVisualNode node(property.parentModelNode());
|
QmlVisualNode node(property.parentModelNode());
|
||||||
if (node.isFlowTransition()) {
|
if (node.isFlowTransition()) {
|
||||||
|
@@ -55,9 +55,8 @@ SeekerSlider::SeekerSlider(QWidget *parentWidget)
|
|||||||
setProperty("panelwidget_singlerow", true);
|
setProperty("panelwidget_singlerow", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SeekerSlider::paintEvent(QPaintEvent *event)
|
void SeekerSlider::paintEvent([[maybe_unused]] QPaintEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
{
|
{
|
||||||
QStyleOptionToolBar option;
|
QStyleOptionToolBar option;
|
||||||
|
@@ -138,10 +138,9 @@ void ItemLibraryAssetImporter::addInfo(const QString &infoMsg, const QString &sr
|
|||||||
emit infoReported(infoMsg, srcPath);
|
emit infoReported(infoMsg, srcPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibraryAssetImporter::importProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
void ItemLibraryAssetImporter::importProcessFinished([[maybe_unused]] int exitCode,
|
||||||
|
QProcess::ExitStatus exitStatus)
|
||||||
{
|
{
|
||||||
Q_UNUSED(exitCode)
|
|
||||||
|
|
||||||
m_puppetProcess.reset();
|
m_puppetProcess.reset();
|
||||||
|
|
||||||
if (m_parseData.contains(m_currentImportId)) {
|
if (m_parseData.contains(m_currentImportId)) {
|
||||||
@@ -184,11 +183,9 @@ void ItemLibraryAssetImporter::importProcessFinished(int exitCode, QProcess::Exi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibraryAssetImporter::iconProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
void ItemLibraryAssetImporter::iconProcessFinished([[maybe_unused]] int exitCode,
|
||||||
|
[[maybe_unused]] QProcess::ExitStatus exitStatus)
|
||||||
{
|
{
|
||||||
Q_UNUSED(exitCode)
|
|
||||||
Q_UNUSED(exitStatus)
|
|
||||||
|
|
||||||
m_puppetProcess.reset();
|
m_puppetProcess.reset();
|
||||||
|
|
||||||
int finishedCount = m_parseData.size() - m_puppetQueue.size();
|
int finishedCount = m_parseData.size() - m_puppetQueue.size();
|
||||||
|
@@ -142,10 +142,8 @@ void MaterialBrowserView::modelAboutToBeDetached(Model *model)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void MaterialBrowserView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList)
|
[[maybe_unused]] const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(lastSelectedNodeList)
|
|
||||||
|
|
||||||
ModelNode selectedModel;
|
ModelNode selectedModel;
|
||||||
|
|
||||||
for (const ModelNode &node : selectedNodeList) {
|
for (const ModelNode &node : selectedNodeList) {
|
||||||
@@ -185,10 +183,8 @@ void MaterialBrowserView::modelNodePreviewPixmapChanged(const ModelNode &node, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty> &propertyList,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
|
|
||||||
for (const VariantProperty &property : propertyList) {
|
for (const VariantProperty &property : propertyList) {
|
||||||
ModelNode node(property.parentModelNode());
|
ModelNode node(property.parentModelNode());
|
||||||
|
|
||||||
@@ -200,10 +196,8 @@ void MaterialBrowserView::variantPropertiesChanged(const QList<VariantProperty>
|
|||||||
void MaterialBrowserView::nodeReparented(const ModelNode &node,
|
void MaterialBrowserView::nodeReparented(const ModelNode &node,
|
||||||
const NodeAbstractProperty &newPropertyParent,
|
const NodeAbstractProperty &newPropertyParent,
|
||||||
const NodeAbstractProperty &oldPropertyParent,
|
const NodeAbstractProperty &oldPropertyParent,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
|
|
||||||
if (!isMaterial(node))
|
if (!isMaterial(node))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -241,24 +235,19 @@ void MaterialBrowserView::nodeAboutToBeRemoved(const ModelNode &removedNode)
|
|||||||
m_widget->materialBrowserModel()->removeMaterial(removedNode);
|
m_widget->materialBrowserModel()->removeMaterial(removedNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::nodeRemoved(const ModelNode &removedNode,
|
void MaterialBrowserView::nodeRemoved([[maybe_unused]] const ModelNode &removedNode,
|
||||||
const NodeAbstractProperty &parentProperty,
|
const NodeAbstractProperty &parentProperty,
|
||||||
PropertyChangeFlags propertyChange)
|
[[maybe_unused]] PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(removedNode)
|
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
|
|
||||||
if (parentProperty.parentModelNode().id() != Constants::MATERIAL_LIB_ID)
|
if (parentProperty.parentModelNode().id() != Constants::MATERIAL_LIB_ID)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_widget->materialBrowserModel()->updateSelectedMaterial();
|
m_widget->materialBrowserModel()->updateSelectedMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
|
void MaterialBrowserView::importsChanged([[maybe_unused]] const QList<Import> &addedImports,
|
||||||
|
[[maybe_unused]] const QList<Import> &removedImports)
|
||||||
{
|
{
|
||||||
Q_UNUSED(addedImports)
|
|
||||||
Q_UNUSED(removedImports)
|
|
||||||
|
|
||||||
bool hasQuick3DImport = model()->hasImport("QtQuick3D");
|
bool hasQuick3DImport = model()->hasImport("QtQuick3D");
|
||||||
|
|
||||||
if (hasQuick3DImport == m_hasQuick3DImport)
|
if (hasQuick3DImport == m_hasQuick3DImport)
|
||||||
@@ -270,11 +259,11 @@ void MaterialBrowserView::importsChanged(const QList<Import> &addedImports, cons
|
|||||||
refreshModel(false);
|
refreshModel(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialBrowserView::customNotification(const AbstractView *view, const QString &identifier,
|
void MaterialBrowserView::customNotification(const AbstractView *view,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QString &identifier,
|
||||||
|
const QList<ModelNode> &nodeList,
|
||||||
|
[[maybe_unused]] const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(data)
|
|
||||||
|
|
||||||
if (view == this)
|
if (view == this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -78,10 +78,10 @@ public:
|
|||||||
m_pixmaps.insert(node.internalId(), pixmap);
|
m_pixmaps.insert(node.internalId(), pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override
|
QPixmap requestPixmap(const QString &id,
|
||||||
|
QSize *size,
|
||||||
|
[[maybe_unused]] const QSize &requestedSize) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(requestedSize)
|
|
||||||
|
|
||||||
static QPixmap defaultPreview = QPixmap::fromImage(QImage(":/materialeditor/images/defaultmaterialpreview.png"));
|
static QPixmap defaultPreview = QPixmap::fromImage(QImage(":/materialeditor/images/defaultmaterialpreview.png"));
|
||||||
|
|
||||||
QPixmap pixmap{150, 150};
|
QPixmap pixmap{150, 150};
|
||||||
|
@@ -73,10 +73,10 @@ public:
|
|||||||
m_previewPixmap = pixmap;
|
m_previewPixmap = pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override
|
QPixmap requestPixmap(const QString &id,
|
||||||
|
QSize *size,
|
||||||
|
[[maybe_unused]] const QSize &requestedSize) override
|
||||||
{
|
{
|
||||||
Q_UNUSED(requestedSize)
|
|
||||||
|
|
||||||
static QPixmap defaultPreview = QPixmap::fromImage(QImage(":/materialeditor/images/defaultmaterialpreview.png"));
|
static QPixmap defaultPreview = QPixmap::fromImage(QImage(":/materialeditor/images/defaultmaterialpreview.png"));
|
||||||
|
|
||||||
QPixmap pixmap{150, 150};
|
QPixmap pixmap{150, 150};
|
||||||
|
@@ -656,10 +656,8 @@ WidgetInfo MaterialEditorView::widgetInfo()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
void MaterialEditorView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList,
|
||||||
const QList<ModelNode> &lastSelectedNodeList)
|
[[maybe_unused]] const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(lastSelectedNodeList)
|
|
||||||
|
|
||||||
m_selectedModels.clear();
|
m_selectedModels.clear();
|
||||||
|
|
||||||
for (const ModelNode &node : selectedNodeList) {
|
for (const ModelNode &node : selectedNodeList) {
|
||||||
@@ -717,11 +715,9 @@ void MaterialEditorView::modelNodePreviewPixmapChanged(const ModelNode &node, co
|
|||||||
m_qmlBackEnd->updateMaterialPreview(pixmap);
|
m_qmlBackEnd->updateMaterialPreview(pixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const QList<Import> &removedImports)
|
void MaterialEditorView::importsChanged([[maybe_unused]] const QList<Import> &addedImports,
|
||||||
|
[[maybe_unused]] const QList<Import> &removedImports)
|
||||||
{
|
{
|
||||||
Q_UNUSED(addedImports)
|
|
||||||
Q_UNUSED(removedImports)
|
|
||||||
|
|
||||||
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
||||||
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
|
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
|
||||||
|
|
||||||
@@ -779,11 +775,11 @@ void MaterialEditorView::duplicateMaterial(const ModelNode &material)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaterialEditorView::customNotification(const AbstractView *view, const QString &identifier,
|
void MaterialEditorView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QString &identifier,
|
||||||
|
const QList<ModelNode> &nodeList,
|
||||||
|
const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(view)
|
|
||||||
|
|
||||||
if (identifier == "selected_material_changed") {
|
if (identifier == "selected_material_changed") {
|
||||||
m_selectedMaterial = nodeList.first();
|
m_selectedMaterial = nodeList.first();
|
||||||
QTimer::singleShot(0, this, &MaterialEditorView::resetView);
|
QTimer::singleShot(0, this, &MaterialEditorView::resetView);
|
||||||
|
@@ -132,10 +132,10 @@ ChooseFromPropertyListDialog::ChooseFromPropertyListDialog(const QStringList &pr
|
|||||||
m_selectedProperty = item->isSelected() ? item->data(Qt::DisplayRole).toByteArray() : QByteArray();
|
m_selectedProperty = item->isSelected() ? item->data(Qt::DisplayRole).toByteArray() : QByteArray();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(m_ui->listProps, &QListWidget::itemDoubleClicked, this, [this](QListWidgetItem *item) {
|
connect(m_ui->listProps,
|
||||||
Q_UNUSED(item)
|
&QListWidget::itemDoubleClicked,
|
||||||
QDialog::accept();
|
this,
|
||||||
});
|
[this]([[maybe_unused]] QListWidgetItem *item) { QDialog::accept(); });
|
||||||
|
|
||||||
fillList(propNames);
|
fillList(propNames);
|
||||||
}
|
}
|
||||||
|
@@ -282,9 +282,10 @@ void NameItemDelegate::setEditorData(QWidget *editor, const QModelIndex &index)
|
|||||||
lineEdit->setText(value);
|
lineEdit->setText(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void NameItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
|
void NameItemDelegate::setModelData(QWidget *editor,
|
||||||
|
[[maybe_unused]] QAbstractItemModel *model,
|
||||||
|
const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(model)
|
|
||||||
auto lineEdit = static_cast<QLineEdit*>(editor);
|
auto lineEdit = static_cast<QLineEdit*>(editor);
|
||||||
setId(index, lineEdit->text());
|
setId(index, lineEdit->text());
|
||||||
lineEdit->clearFocus();
|
lineEdit->clearFocus();
|
||||||
|
@@ -293,13 +293,11 @@ void NavigatorView::dragEnded()
|
|||||||
m_widget->update();
|
m_widget->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void NavigatorView::customNotification(const AbstractView *view, const QString &identifier,
|
void NavigatorView::customNotification([[maybe_unused]] const AbstractView *view,
|
||||||
const QList<ModelNode> &nodeList, const QList<QVariant> &data)
|
const QString &identifier,
|
||||||
|
[[maybe_unused]] const QList<ModelNode> &nodeList,
|
||||||
|
[[maybe_unused]] const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(view)
|
|
||||||
Q_UNUSED(nodeList)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
|
|
||||||
if (identifier == "asset_import_update")
|
if (identifier == "asset_import_update")
|
||||||
m_currentModelInterface->notifyIconsChanged();
|
m_currentModelInterface->notifyIconsChanged();
|
||||||
}
|
}
|
||||||
@@ -405,11 +403,9 @@ void NavigatorView::nodeTypeChanged(const ModelNode &modelNode, const TypeName &
|
|||||||
}
|
}
|
||||||
|
|
||||||
void NavigatorView::auxiliaryDataChanged(const ModelNode &modelNode,
|
void NavigatorView::auxiliaryDataChanged(const ModelNode &modelNode,
|
||||||
const PropertyName &name,
|
[[maybe_unused]] const PropertyName &name,
|
||||||
const QVariant &data)
|
[[maybe_unused]] const QVariant &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(name)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
|
|
||||||
m_currentModelInterface->notifyDataChanged(modelNode);
|
m_currentModelInterface->notifyDataChanged(modelNode);
|
||||||
}
|
}
|
||||||
|
@@ -206,11 +206,10 @@ const QStringList &ColorPaletteBackend::currentPaletteColors() const
|
|||||||
|
|
||||||
void ColorPaletteBackend::registerDeclarativeType()
|
void ColorPaletteBackend::registerDeclarativeType()
|
||||||
{
|
{
|
||||||
static const int typeIndex = qmlRegisterSingletonType<ColorPaletteBackend>(
|
[[maybe_unused]] static const int typeIndex = qmlRegisterSingletonType<ColorPaletteBackend>(
|
||||||
"QtQuickDesignerColorPalette", 1, 0, "ColorPaletteBackend", [](QQmlEngine *, QJSEngine *) {
|
"QtQuickDesignerColorPalette", 1, 0, "ColorPaletteBackend", [](QQmlEngine *, QJSEngine *) {
|
||||||
return new ColorPaletteBackend();
|
return new ColorPaletteBackend();
|
||||||
});
|
});
|
||||||
Q_UNUSED(typeIndex)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorPaletteBackend::showDialog(QColor color)
|
void ColorPaletteBackend::showDialog(QColor color)
|
||||||
|
@@ -544,10 +544,10 @@ void StatesEditorView::nodeOrderChanged(const NodeListProperty &listProperty)
|
|||||||
resetModel();
|
resetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatesEditorView::bindingPropertiesChanged(const QList<BindingProperty> &propertyList, AbstractView::PropertyChangeFlags propertyChange)
|
void StatesEditorView::bindingPropertiesChanged(
|
||||||
|
const QList<BindingProperty> &propertyList,
|
||||||
|
[[maybe_unused]] AbstractView::PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
|
|
||||||
for (const BindingProperty &property : propertyList) {
|
for (const BindingProperty &property : propertyList) {
|
||||||
if (property.name() == "when" && QmlModelState::isValidQmlModelState(property.parentModelNode()))
|
if (property.name() == "when" && QmlModelState::isValidQmlModelState(property.parentModelNode()))
|
||||||
resetModel();
|
resetModel();
|
||||||
|
@@ -88,11 +88,7 @@ public:
|
|||||||
|
|
||||||
virtual void invalidateScrollbar() = 0;
|
virtual void invalidateScrollbar() = 0;
|
||||||
|
|
||||||
virtual qreal snap(qreal frame, bool snapToPlayhead = true)
|
virtual qreal snap(qreal frame, [[maybe_unused]] bool snapToPlayhead = true) { return frame; }
|
||||||
{
|
|
||||||
Q_UNUSED(snapToPlayhead);
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
QGraphicsView *graphicsView() const;
|
QGraphicsView *graphicsView() const;
|
||||||
QGraphicsView *rulerView() const;
|
QGraphicsView *rulerView() const;
|
||||||
|
@@ -65,11 +65,9 @@ TimelineMoveTool::TimelineMoveTool(AbstractScrollGraphicsScene *scene, TimelineT
|
|||||||
: TimelineAbstractTool(scene, delegate)
|
: TimelineAbstractTool(scene, delegate)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void TimelineMoveTool::mousePressEvent(TimelineMovableAbstractItem *item,
|
void TimelineMoveTool::mousePressEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
|
|
||||||
if (currentItem() && currentItem()->isLocked())
|
if (currentItem() && currentItem()->isLocked())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -95,11 +93,9 @@ void TimelineMoveTool::mousePressEvent(TimelineMovableAbstractItem *item,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineMoveTool::mouseMoveEvent(TimelineMovableAbstractItem *item,
|
void TimelineMoveTool::mouseMoveEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
|
|
||||||
if (!currentItem())
|
if (!currentItem())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -151,11 +147,9 @@ void TimelineMoveTool::mouseMoveEvent(TimelineMovableAbstractItem *item,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineMoveTool::mouseReleaseEvent(TimelineMovableAbstractItem *item,
|
void TimelineMoveTool::mouseReleaseEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
|
|
||||||
if (auto *current = currentItem()) {
|
if (auto *current = currentItem()) {
|
||||||
if (current->asTimelineFrameHandle()) {
|
if (current->asTimelineFrameHandle()) {
|
||||||
double mousePos = event->scenePos().x();
|
double mousePos = event->scenePos().x();
|
||||||
@@ -197,21 +191,13 @@ void TimelineMoveTool::mouseReleaseEvent(TimelineMovableAbstractItem *item,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineMoveTool::mouseDoubleClickEvent(TimelineMovableAbstractItem *item,
|
void TimelineMoveTool::mouseDoubleClickEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
[[maybe_unused]] QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
Q_UNUSED(event)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineMoveTool::keyPressEvent(QKeyEvent *keyEvent)
|
void TimelineMoveTool::keyPressEvent([[maybe_unused]] QKeyEvent *keyEvent) {}
|
||||||
{
|
|
||||||
Q_UNUSED(keyEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
void TimelineMoveTool::keyReleaseEvent(QKeyEvent *keyEvent)
|
void TimelineMoveTool::keyReleaseEvent([[maybe_unused]] QKeyEvent *keyEvent) {}
|
||||||
{
|
|
||||||
Q_UNUSED(keyEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace QmlDesigner
|
} // namespace QmlDesigner
|
||||||
|
@@ -1002,11 +1002,10 @@ void TimelineBarItem::scrollOffsetChanged()
|
|||||||
sectionItem()->invalidateBar();
|
sectionItem()->invalidateBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineBarItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
|
void TimelineBarItem::paint(QPainter *painter,
|
||||||
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
QColor brushColorSelected = Theme::getColor(Theme::QmlDesigner_HighlightColor);
|
QColor brushColorSelected = Theme::getColor(Theme::QmlDesigner_HighlightColor);
|
||||||
QColor brushColor = Theme::getColor(Theme::QmlDesigner_HighlightColor).darker(120);
|
QColor brushColor = Theme::getColor(Theme::QmlDesigner_HighlightColor).darker(120);
|
||||||
const QColor indicatorColor = Theme::getColor(Theme::PanelTextColorLight);
|
const QColor indicatorColor = Theme::getColor(Theme::PanelTextColorLight);
|
||||||
|
@@ -67,21 +67,16 @@ SelectionMode TimelineSelectionTool::selectionMode(QGraphicsSceneMouseEvent *eve
|
|||||||
return SelectionMode::New;
|
return SelectionMode::New;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineSelectionTool::mousePressEvent(TimelineMovableAbstractItem *item,
|
void TimelineSelectionTool::mousePressEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
[[maybe_unused]] QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
if (event->buttons() == Qt::LeftButton && selectionMode(event) == SelectionMode::New)
|
if (event->buttons() == Qt::LeftButton && selectionMode(event) == SelectionMode::New)
|
||||||
deselect();
|
deselect();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineSelectionTool::mouseMoveEvent(TimelineMovableAbstractItem *item,
|
void TimelineSelectionTool::mouseMoveEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
|
|
||||||
if (event->buttons() == Qt::LeftButton) {
|
if (event->buttons() == Qt::LeftButton) {
|
||||||
auto endPoint = event->scenePos();
|
auto endPoint = event->scenePos();
|
||||||
|
|
||||||
@@ -103,36 +98,26 @@ void TimelineSelectionTool::mouseMoveEvent(TimelineMovableAbstractItem *item,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineSelectionTool::mouseReleaseEvent(TimelineMovableAbstractItem *item,
|
void TimelineSelectionTool::mouseReleaseEvent([[maybe_unused]] TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(item)
|
|
||||||
|
|
||||||
commitSelection(selectionMode(event));
|
commitSelection(selectionMode(event));
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineSelectionTool::mouseDoubleClickEvent(TimelineMovableAbstractItem *item,
|
void TimelineSelectionTool::mouseDoubleClickEvent(TimelineMovableAbstractItem *item,
|
||||||
QGraphicsSceneMouseEvent *event)
|
[[maybe_unused]] QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
if (item)
|
if (item)
|
||||||
item->itemDoubleClicked();
|
item->itemDoubleClicked();
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineSelectionTool::keyPressEvent(QKeyEvent *keyEvent)
|
void TimelineSelectionTool::keyPressEvent([[maybe_unused]] QKeyEvent *keyEvent) {}
|
||||||
{
|
|
||||||
Q_UNUSED(keyEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
void TimelineSelectionTool::keyReleaseEvent(QKeyEvent *keyEvent)
|
void TimelineSelectionTool::keyReleaseEvent([[maybe_unused]] QKeyEvent *keyEvent) {}
|
||||||
{
|
|
||||||
Q_UNUSED(keyEvent)
|
|
||||||
}
|
|
||||||
|
|
||||||
void TimelineSelectionTool::deselect()
|
void TimelineSelectionTool::deselect()
|
||||||
{
|
{
|
||||||
|
@@ -496,10 +496,8 @@ void TimelineToolBar::setupCurrentFrameValidator()
|
|||||||
m_lastFrame->text().toInt());
|
m_lastFrame->text().toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineToolBar::resizeEvent(QResizeEvent *event)
|
void TimelineToolBar::resizeEvent([[maybe_unused]] QResizeEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
int width = 0;
|
int width = 0;
|
||||||
QWidget *spacer = nullptr;
|
QWidget *spacer = nullptr;
|
||||||
for (auto *object : qAsConst(m_grp)) {
|
for (auto *object : qAsConst(m_grp)) {
|
||||||
|
@@ -222,9 +222,8 @@ void TimelineView::variantPropertiesChanged(const QList<VariantProperty> &proper
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TimelineView::bindingPropertiesChanged(const QList<BindingProperty> &propertyList,
|
void TimelineView::bindingPropertiesChanged(const QList<BindingProperty> &propertyList,
|
||||||
AbstractView::PropertyChangeFlags propertyChange)
|
[[maybe_unused]] AbstractView::PropertyChangeFlags propertyChange)
|
||||||
{
|
{
|
||||||
Q_UNUSED(propertyChange)
|
|
||||||
for (const auto &property : propertyList) {
|
for (const auto &property : propertyList) {
|
||||||
if (property.name() == "easing.bezierCurve") {
|
if (property.name() == "easing.bezierCurve") {
|
||||||
updateAnimationCurveEditor();
|
updateAnimationCurveEditor();
|
||||||
@@ -465,11 +464,9 @@ void TimelineView::setTimelineRecording(bool value)
|
|||||||
|
|
||||||
void TimelineView::customNotification(const AbstractView * /*view*/,
|
void TimelineView::customNotification(const AbstractView * /*view*/,
|
||||||
const QString &identifier,
|
const QString &identifier,
|
||||||
const QList<ModelNode> &nodeList,
|
[[maybe_unused]] const QList<ModelNode> &nodeList,
|
||||||
const QList<QVariant> &data)
|
[[maybe_unused]] const QList<QVariant> &data)
|
||||||
{
|
{
|
||||||
Q_UNUSED(nodeList)
|
|
||||||
Q_UNUSED(data)
|
|
||||||
if (identifier == QStringLiteral("reset QmlPuppet")) {
|
if (identifier == QStringLiteral("reset QmlPuppet")) {
|
||||||
QmlTimeline timeline = widget()->graphicsScene()->currentTimeline();
|
QmlTimeline timeline = widget()->graphicsScene()->currentTimeline();
|
||||||
if (timeline.isValid())
|
if (timeline.isValid())
|
||||||
|
@@ -296,8 +296,8 @@ TimelineWidget::TimelineWidget(TimelineView *view)
|
|||||||
};
|
};
|
||||||
connect(graphicsScene()->layoutRuler(), &TimelineRulerSectionItem::playbackLoopValuesChanged, updatePlaybackLoopValues);
|
connect(graphicsScene()->layoutRuler(), &TimelineRulerSectionItem::playbackLoopValuesChanged, updatePlaybackLoopValues);
|
||||||
|
|
||||||
auto setPlaybackState = [this](QAbstractAnimation::State newState, QAbstractAnimation::State oldState) {
|
auto setPlaybackState = [this](QAbstractAnimation::State newState,
|
||||||
Q_UNUSED(oldState)
|
[[maybe_unused]] QAbstractAnimation::State oldState) {
|
||||||
m_toolbar->setPlayState(newState == QAbstractAnimation::State::Running);
|
m_toolbar->setPlayState(newState == QAbstractAnimation::State::Running);
|
||||||
};
|
};
|
||||||
connect(m_playbackAnimation, &QVariantAnimation::stateChanged, setPlaybackState);
|
connect(m_playbackAnimation, &QVariantAnimation::stateChanged, setPlaybackState);
|
||||||
@@ -616,10 +616,8 @@ void TimelineWidget::setFocus()
|
|||||||
m_graphicsView->setFocus();
|
m_graphicsView->setFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineWidget::showEvent(QShowEvent *event)
|
void TimelineWidget::showEvent([[maybe_unused]] QShowEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
int zoom = m_toolbar->scaleFactor();
|
int zoom = m_toolbar->scaleFactor();
|
||||||
|
|
||||||
m_timelineView->setEnabled(true);
|
m_timelineView->setEnabled(true);
|
||||||
|
@@ -626,12 +626,9 @@ void TransitionEditorBarItem::scrollOffsetChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void TransitionEditorBarItem::paint(QPainter *painter,
|
void TransitionEditorBarItem::paint(QPainter *painter,
|
||||||
const QStyleOptionGraphicsItem *option,
|
[[maybe_unused]] const QStyleOptionGraphicsItem *option,
|
||||||
QWidget *widget)
|
[[maybe_unused]] QWidget *widget)
|
||||||
{
|
{
|
||||||
Q_UNUSED(option)
|
|
||||||
Q_UNUSED(widget)
|
|
||||||
|
|
||||||
QColor brushColor = Theme::getColor(Theme::QmlDesigner_HighlightColor);
|
QColor brushColor = Theme::getColor(Theme::QmlDesigner_HighlightColor);
|
||||||
QColor brushColorSection = Theme::getColor(Theme::QmlDesigner_HighlightColor).darker(120);
|
QColor brushColorSection = Theme::getColor(Theme::QmlDesigner_HighlightColor).darker(120);
|
||||||
QColor penColor = Theme::getColor(Theme::QmlDesigner_HighlightColor).lighter(140);
|
QColor penColor = Theme::getColor(Theme::QmlDesigner_HighlightColor).lighter(140);
|
||||||
|
@@ -312,10 +312,8 @@ void TransitionEditorToolBar::addSpacing(int width)
|
|||||||
addWidget(widget);
|
addWidget(widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransitionEditorToolBar::resizeEvent(QResizeEvent *event)
|
void TransitionEditorToolBar::resizeEvent([[maybe_unused]] QResizeEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
int width = 0;
|
int width = 0;
|
||||||
QWidget *spacer = nullptr;
|
QWidget *spacer = nullptr;
|
||||||
for (auto *object : qAsConst(m_grp)) {
|
for (auto *object : qAsConst(m_grp)) {
|
||||||
|
@@ -415,10 +415,8 @@ void TransitionEditorWidget::setupScrollbar(int min, int max, int current)
|
|||||||
m_scrollbar->blockSignals(b);
|
m_scrollbar->blockSignals(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransitionEditorWidget::showEvent(QShowEvent *event)
|
void TransitionEditorWidget::showEvent([[maybe_unused]] QShowEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event)
|
|
||||||
|
|
||||||
m_transitionEditorView->setEnabled(true);
|
m_transitionEditorView->setEnabled(true);
|
||||||
|
|
||||||
if (m_transitionEditorView->model())
|
if (m_transitionEditorView->model())
|
||||||
|
@@ -175,9 +175,8 @@ QString Exception::description() const
|
|||||||
/*!
|
/*!
|
||||||
Shows message in a message box.
|
Shows message in a message box.
|
||||||
*/
|
*/
|
||||||
void Exception::showException(const QString &title) const
|
void Exception::showException([[maybe_unused]] const QString &title) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(title)
|
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
QString composedTitle = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error")
|
QString composedTitle = title.isEmpty() ? QCoreApplication::translate("QmlDesigner", "Error")
|
||||||
: title;
|
: title;
|
||||||
|
@@ -38,9 +38,8 @@ namespace QmlDesigner {
|
|||||||
void BaseConnectionManager::setUp(NodeInstanceServerInterface *nodeInstanceServer,
|
void BaseConnectionManager::setUp(NodeInstanceServerInterface *nodeInstanceServer,
|
||||||
const QString &,
|
const QString &,
|
||||||
ProjectExplorer::Target *,
|
ProjectExplorer::Target *,
|
||||||
AbstractView *view)
|
[[maybe_unused]] AbstractView *view)
|
||||||
{
|
{
|
||||||
Q_UNUSED(view)
|
|
||||||
m_nodeInstanceServer = nodeInstanceServer;
|
m_nodeInstanceServer = nodeInstanceServer;
|
||||||
m_isActive = true;
|
m_isActive = true;
|
||||||
}
|
}
|
||||||
|
@@ -449,7 +449,7 @@ QString PuppetCreator::defaultPuppetFallbackDirectory()
|
|||||||
return Core::ICore::libexecPath().toString();
|
return Core::ICore::libexecPath().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString PuppetCreator::qmlPuppetFallbackDirectory(const DesignerSettings &settings)
|
QString PuppetCreator::qmlPuppetFallbackDirectory([[maybe_unused]] const DesignerSettings &settings)
|
||||||
{
|
{
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
QString puppetFallbackDirectory = settings.value(
|
QString puppetFallbackDirectory = settings.value(
|
||||||
@@ -458,7 +458,6 @@ QString PuppetCreator::qmlPuppetFallbackDirectory(const DesignerSettings &settin
|
|||||||
return defaultPuppetFallbackDirectory();
|
return defaultPuppetFallbackDirectory();
|
||||||
return puppetFallbackDirectory;
|
return puppetFallbackDirectory;
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(settings)
|
|
||||||
return QString();
|
return QString();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -87,9 +87,9 @@ void MetaInfoReader::setQualifcation(const TypeName &qualification)
|
|||||||
m_qualication = qualification;
|
m_qualication = qualification;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfoReader::elementStart(const QString &name, const QmlJS::SourceLocation &nameLocation)
|
void MetaInfoReader::elementStart(const QString &name,
|
||||||
|
[[maybe_unused]] const QmlJS::SourceLocation &nameLocation)
|
||||||
{
|
{
|
||||||
Q_UNUSED(nameLocation)
|
|
||||||
switch (parserState()) {
|
switch (parserState()) {
|
||||||
case ParsingDocument: setParserState(readDocument(name)); break;
|
case ParsingDocument: setParserState(readDocument(name)); break;
|
||||||
case ParsingMetaInfo: setParserState(readMetaInfoRootElement(name)); break;
|
case ParsingMetaInfo: setParserState(readMetaInfoRootElement(name)); break;
|
||||||
@@ -130,12 +130,10 @@ void MetaInfoReader::elementEnd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MetaInfoReader::propertyDefinition(const QString &name,
|
void MetaInfoReader::propertyDefinition(const QString &name,
|
||||||
const QmlJS::SourceLocation &nameLocation,
|
[[maybe_unused]] const QmlJS::SourceLocation &nameLocation,
|
||||||
const QVariant &value,
|
const QVariant &value,
|
||||||
const QmlJS::SourceLocation &valueLocation)
|
[[maybe_unused]] const QmlJS::SourceLocation &valueLocation)
|
||||||
{
|
{
|
||||||
Q_UNUSED(nameLocation)
|
|
||||||
Q_UNUSED(valueLocation)
|
|
||||||
switch (parserState()) {
|
switch (parserState()) {
|
||||||
case ParsingType: readTypeProperty(name, value); break;
|
case ParsingType: readTypeProperty(name, value); break;
|
||||||
case ParsingImports: readImportsProperty(name, value); break;
|
case ParsingImports: readImportsProperty(name, value); break;
|
||||||
|
@@ -80,9 +80,8 @@ InternalNode::Pointer InternalNodeProperty::node() const
|
|||||||
return m_node;
|
return m_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InternalNodeProperty::remove(const InternalNode::Pointer &node)
|
void InternalNodeProperty::remove([[maybe_unused]] const InternalNode::Pointer &node)
|
||||||
{
|
{
|
||||||
Q_UNUSED(node)
|
|
||||||
Q_ASSERT(m_node == node);
|
Q_ASSERT(m_node == node);
|
||||||
m_node.clear();
|
m_node.clear();
|
||||||
|
|
||||||
|
@@ -348,7 +348,7 @@ bool QmlItemNode::modelIsResizable() const
|
|||||||
&& !modelIsInLayout();
|
&& !modelIsInLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isMcuRotationAllowed(QString itemName, bool hasChildren)
|
static bool isMcuRotationAllowed([[maybe_unused]] QString itemName, [[maybe_unused]] bool hasChildren)
|
||||||
{
|
{
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
const QString propName = "rotation";
|
const QString propName = "rotation";
|
||||||
@@ -370,9 +370,6 @@ static bool isMcuRotationAllowed(QString itemName, bool hasChildren)
|
|||||||
if (manager.bannedProperties().contains(propName))
|
if (manager.bannedProperties().contains(propName))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
Q_UNUSED(itemName)
|
|
||||||
Q_UNUSED(hasChildren)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@@ -635,7 +635,7 @@ QVariant QmlObjectNode::instanceValue(const ModelNode &modelNode, const Property
|
|||||||
return modelNode.view()->nodeInstanceView()->instanceForModelNode(modelNode).property(name);
|
return modelNode.view()->nodeInstanceView()->instanceForModelNode(modelNode).property(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QmlObjectNode::generateTranslatableText(const QString &text)
|
QString QmlObjectNode::generateTranslatableText([[maybe_unused]] const QString &text)
|
||||||
{
|
{
|
||||||
#ifndef QMLDESIGNER_TEST
|
#ifndef QMLDESIGNER_TEST
|
||||||
|
|
||||||
@@ -653,7 +653,6 @@ QString QmlObjectNode::generateTranslatableText(const QString &text)
|
|||||||
}
|
}
|
||||||
return QString(QStringLiteral("qsTr(\"%1\")")).arg(text);
|
return QString(QStringLiteral("qsTr(\"%1\")")).arg(text);
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(text)
|
|
||||||
return QString();
|
return QString();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -824,9 +823,8 @@ QmlObjectNode *QmlObjectNode::getQmlObjectNodeOfCorrectType(const ModelNode &mod
|
|||||||
return new QmlObjectNode(modelNode);
|
return new QmlObjectNode(modelNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QmlObjectNode::isBlocked(const PropertyName &propName) const
|
bool QmlObjectNode::isBlocked([[maybe_unused]] const PropertyName &propName) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(propName)
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -249,11 +249,8 @@ void RewriteActionCompressor::compressPropertyActions(QList<RewriteAction *> &ac
|
|||||||
|
|
||||||
if (RemovePropertyRewriteAction *removeAction = action->asRemovePropertyRewriteAction()) {
|
if (RemovePropertyRewriteAction *removeAction = action->asRemovePropertyRewriteAction()) {
|
||||||
const AbstractProperty property = removeAction->property();
|
const AbstractProperty property = removeAction->property();
|
||||||
if (AddPropertyRewriteAction *addAction = addedProperties.value(property, 0)) {
|
if (AddPropertyRewriteAction *addAction = addedProperties.value(property, 0); !addAction)
|
||||||
Q_UNUSED(addAction)
|
|
||||||
} else {
|
|
||||||
removedProperties.insert(property, action);
|
removedProperties.insert(property, action);
|
||||||
}
|
|
||||||
} else if (ChangePropertyRewriteAction *changeAction = action->asChangePropertyRewriteAction()) {
|
} else if (ChangePropertyRewriteAction *changeAction = action->asChangePropertyRewriteAction()) {
|
||||||
const AbstractProperty property = changeAction->property();
|
const AbstractProperty property = changeAction->property();
|
||||||
|
|
||||||
|
@@ -1744,68 +1744,58 @@ QStringList TextToModelMerger::syncGroupedProperties(ModelNode &modelNode,
|
|||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::modelMissesImport(const QmlDesigner::Import &import)
|
void ModelValidator::modelMissesImport([[maybe_unused]] const QmlDesigner::Import &import)
|
||||||
{
|
{
|
||||||
Q_UNUSED(import)
|
|
||||||
Q_ASSERT(m_merger->view()->model()->imports().contains(import));
|
Q_ASSERT(m_merger->view()->model()->imports().contains(import));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::importAbsentInQMl(const QmlDesigner::Import &import)
|
void ModelValidator::importAbsentInQMl([[maybe_unused]] const QmlDesigner::Import &import)
|
||||||
{
|
{
|
||||||
Q_UNUSED(import)
|
|
||||||
Q_ASSERT(! m_merger->view()->model()->imports().contains(import));
|
Q_ASSERT(! m_merger->view()->model()->imports().contains(import));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::bindingExpressionsDiffer(BindingProperty &modelProperty,
|
void ModelValidator::bindingExpressionsDiffer([[maybe_unused]] BindingProperty &modelProperty,
|
||||||
const QString &javascript,
|
[[maybe_unused]] const QString &javascript,
|
||||||
const TypeName &astType)
|
[[maybe_unused]] const TypeName &astType)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_UNUSED(javascript)
|
|
||||||
Q_UNUSED(astType)
|
|
||||||
Q_ASSERT(compareJavaScriptExpression(modelProperty.expression(), javascript));
|
Q_ASSERT(compareJavaScriptExpression(modelProperty.expression(), javascript));
|
||||||
Q_ASSERT(modelProperty.dynamicTypeName() == astType);
|
Q_ASSERT(modelProperty.dynamicTypeName() == astType);
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::shouldBeBindingProperty(AbstractProperty &modelProperty,
|
void ModelValidator::shouldBeBindingProperty([[maybe_unused]] AbstractProperty &modelProperty,
|
||||||
const QString &/*javascript*/,
|
const QString & /*javascript*/,
|
||||||
const TypeName &/*astType*/)
|
const TypeName & /*astType*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_ASSERT(modelProperty.isBindingProperty());
|
Q_ASSERT(modelProperty.isBindingProperty());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::signalHandlerSourceDiffer(SignalHandlerProperty &modelProperty, const QString &javascript)
|
void ModelValidator::signalHandlerSourceDiffer([[maybe_unused]] SignalHandlerProperty &modelProperty,
|
||||||
|
[[maybe_unused]] const QString &javascript)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_UNUSED(javascript)
|
|
||||||
QTC_ASSERT(compareJavaScriptExpression(modelProperty.source(), javascript), return);
|
QTC_ASSERT(compareJavaScriptExpression(modelProperty.source(), javascript), return);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::shouldBeSignalHandlerProperty(AbstractProperty &modelProperty, const QString & /*javascript*/)
|
void ModelValidator::shouldBeSignalHandlerProperty([[maybe_unused]] AbstractProperty &modelProperty,
|
||||||
|
const QString & /*javascript*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_ASSERT(modelProperty.isSignalHandlerProperty());
|
Q_ASSERT(modelProperty.isSignalHandlerProperty());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::shouldBeNodeListProperty(AbstractProperty &modelProperty,
|
void ModelValidator::shouldBeNodeListProperty([[maybe_unused]] AbstractProperty &modelProperty,
|
||||||
const QList<AST::UiObjectMember *> /*arrayMembers*/,
|
const QList<AST::UiObjectMember *> /*arrayMembers*/,
|
||||||
ReadingContext * /*context*/)
|
ReadingContext * /*context*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_ASSERT(modelProperty.isNodeListProperty());
|
Q_ASSERT(modelProperty.isNodeListProperty());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::variantValuesDiffer(VariantProperty &modelProperty, const QVariant &qmlVariantValue, const TypeName &dynamicTypeName)
|
void ModelValidator::variantValuesDiffer([[maybe_unused]] VariantProperty &modelProperty,
|
||||||
|
[[maybe_unused]] const QVariant &qmlVariantValue,
|
||||||
|
[[maybe_unused]] const TypeName &dynamicTypeName)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
Q_UNUSED(qmlVariantValue)
|
|
||||||
Q_UNUSED(dynamicTypeName)
|
|
||||||
|
|
||||||
QTC_ASSERT(modelProperty.isDynamic() == !dynamicTypeName.isEmpty(), return);
|
QTC_ASSERT(modelProperty.isDynamic() == !dynamicTypeName.isEmpty(), return);
|
||||||
if (modelProperty.isDynamic()) {
|
if (modelProperty.isDynamic()) {
|
||||||
QTC_ASSERT(modelProperty.dynamicTypeName() == dynamicTypeName, return);
|
QTC_ASSERT(modelProperty.dynamicTypeName() == dynamicTypeName, return);
|
||||||
@@ -1817,32 +1807,28 @@ void ModelValidator::variantValuesDiffer(VariantProperty &modelProperty, const Q
|
|||||||
QTC_ASSERT(0, return);
|
QTC_ASSERT(0, return);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::shouldBeVariantProperty(AbstractProperty &modelProperty, const QVariant &/*qmlVariantValue*/, const TypeName &/*dynamicTypeName*/)
|
void ModelValidator::shouldBeVariantProperty([[maybe_unused]] AbstractProperty &modelProperty,
|
||||||
|
const QVariant & /*qmlVariantValue*/,
|
||||||
|
const TypeName & /*dynamicTypeName*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
|
|
||||||
Q_ASSERT(modelProperty.isVariantProperty());
|
Q_ASSERT(modelProperty.isVariantProperty());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::shouldBeNodeProperty(AbstractProperty &modelProperty,
|
void ModelValidator::shouldBeNodeProperty([[maybe_unused]] AbstractProperty &modelProperty,
|
||||||
const TypeName &/*typeName*/,
|
const TypeName & /*typeName*/,
|
||||||
int /*majorVersion*/,
|
int /*majorVersion*/,
|
||||||
int /*minorVersion*/,
|
int /*minorVersion*/,
|
||||||
AST::UiObjectMember * /*astNode*/,
|
AST::UiObjectMember * /*astNode*/,
|
||||||
const TypeName & /*dynamicPropertyType */,
|
const TypeName & /*dynamicPropertyType */,
|
||||||
ReadingContext * /*context*/)
|
ReadingContext * /*context*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
|
|
||||||
Q_ASSERT(modelProperty.isNodeProperty());
|
Q_ASSERT(modelProperty.isNodeProperty());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::modelNodeAbsentFromQml(ModelNode &modelNode)
|
void ModelValidator::modelNodeAbsentFromQml([[maybe_unused]] ModelNode &modelNode)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelNode)
|
|
||||||
|
|
||||||
Q_ASSERT(!modelNode.isValid());
|
Q_ASSERT(!modelNode.isValid());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
@@ -1856,18 +1842,13 @@ ModelNode ModelValidator::listPropertyMissingModelNode(NodeListProperty &/*model
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::typeDiffers(bool /*isRootNode*/,
|
void ModelValidator::typeDiffers(bool /*isRootNode*/,
|
||||||
ModelNode &modelNode,
|
[[maybe_unused]] ModelNode &modelNode,
|
||||||
const TypeName &typeName,
|
[[maybe_unused]] const TypeName &typeName,
|
||||||
int majorVersion,
|
[[maybe_unused]] int majorVersion,
|
||||||
int minorVersion,
|
[[maybe_unused]] int minorVersion,
|
||||||
QmlJS::AST::UiObjectMember * /*astNode*/,
|
QmlJS::AST::UiObjectMember * /*astNode*/,
|
||||||
ReadingContext * /*context*/)
|
ReadingContext * /*context*/)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelNode)
|
|
||||||
Q_UNUSED(typeName)
|
|
||||||
Q_UNUSED(minorVersion)
|
|
||||||
Q_UNUSED(majorVersion)
|
|
||||||
|
|
||||||
QTC_ASSERT(modelNode.type() == typeName, return);
|
QTC_ASSERT(modelNode.type() == typeName, return);
|
||||||
|
|
||||||
if (modelNode.majorVersion() != majorVersion) {
|
if (modelNode.majorVersion() != majorVersion) {
|
||||||
@@ -1885,19 +1866,15 @@ void ModelValidator::typeDiffers(bool /*isRootNode*/,
|
|||||||
QTC_ASSERT(0, return);
|
QTC_ASSERT(0, return);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::propertyAbsentFromQml(AbstractProperty &modelProperty)
|
void ModelValidator::propertyAbsentFromQml([[maybe_unused]] AbstractProperty &modelProperty)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelProperty)
|
|
||||||
|
|
||||||
Q_ASSERT(!modelProperty.isValid());
|
Q_ASSERT(!modelProperty.isValid());
|
||||||
Q_ASSERT(0);
|
Q_ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelValidator::idsDiffer(ModelNode &modelNode, const QString &qmlId)
|
void ModelValidator::idsDiffer([[maybe_unused]] ModelNode &modelNode,
|
||||||
|
[[maybe_unused]] const QString &qmlId)
|
||||||
{
|
{
|
||||||
Q_UNUSED(modelNode)
|
|
||||||
Q_UNUSED(qmlId)
|
|
||||||
|
|
||||||
QTC_ASSERT(modelNode.id() == qmlId, return);
|
QTC_ASSERT(modelNode.id() == qmlId, return);
|
||||||
QTC_ASSERT(0, return);
|
QTC_ASSERT(0, return);
|
||||||
}
|
}
|
||||||
|
@@ -2057,11 +2057,9 @@ private:
|
|||||||
table.initialize(database);
|
table.initialize(database);
|
||||||
}
|
}
|
||||||
|
|
||||||
void createTypesAndePropertyDeclarationsTables(Database &database,
|
void createTypesAndePropertyDeclarationsTables(
|
||||||
const Sqlite::Column &foreignModuleIdColumn)
|
Database &database, [[maybe_unused]] const Sqlite::Column &foreignModuleIdColumn)
|
||||||
{
|
{
|
||||||
Q_UNUSED(foreignModuleIdColumn)
|
|
||||||
|
|
||||||
Sqlite::Table typesTable;
|
Sqlite::Table typesTable;
|
||||||
typesTable.setUseIfNotExists(true);
|
typesTable.setUseIfNotExists(true);
|
||||||
typesTable.setName("types");
|
typesTable.setName("types");
|
||||||
|
@@ -107,8 +107,8 @@ void RewriterTransaction::commit()
|
|||||||
|
|
||||||
if (m_activeIdentifier) {
|
if (m_activeIdentifier) {
|
||||||
qDebug() << "Commit RewriterTransaction:" << m_identifier << m_identifierNumber;
|
qDebug() << "Commit RewriterTransaction:" << m_identifier << m_identifierNumber;
|
||||||
bool success = m_identifierList.removeOne(m_identifier + QByteArrayLiteral("-") + QByteArray::number(m_identifierNumber));
|
[[maybe_unused]] bool success = m_identifierList.removeOne(
|
||||||
Q_UNUSED(success)
|
m_identifier + QByteArrayLiteral("-") + QByteArray::number(m_identifierNumber));
|
||||||
Q_ASSERT(success);
|
Q_ASSERT(success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -427,9 +427,10 @@ void DesignModeWidget::setup()
|
|||||||
workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace());
|
workspaceComboBox->setCurrentText(m_dockManager->activeWorkspace());
|
||||||
});
|
});
|
||||||
connect(m_dockManager, &ADS::DockManager::workspaceLoaded, workspaceComboBox, &QComboBox::setCurrentText);
|
connect(m_dockManager, &ADS::DockManager::workspaceLoaded, workspaceComboBox, &QComboBox::setCurrentText);
|
||||||
connect(workspaceComboBox, QOverload<int>::of(&QComboBox::activated),
|
connect(workspaceComboBox,
|
||||||
m_dockManager, [this, workspaceComboBox] (int index) {
|
QOverload<int>::of(&QComboBox::activated),
|
||||||
Q_UNUSED(index)
|
m_dockManager,
|
||||||
|
[this, workspaceComboBox]([[maybe_unused]] int index) {
|
||||||
m_dockManager->openWorkspace(workspaceComboBox->currentText());
|
m_dockManager->openWorkspace(workspaceComboBox->currentText());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -51,9 +51,8 @@ void RichTextEditorDialog::setFormEditorItem(FormEditorItem* formEditorItem)
|
|||||||
m_formEditorItem = formEditorItem;
|
m_formEditorItem = formEditorItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextEditorDialog::onTextChanged(QString text)
|
void RichTextEditorDialog::onTextChanged([[maybe_unused]] QString text)
|
||||||
{
|
{
|
||||||
Q_UNUSED(text);
|
|
||||||
// TODO: try adding following and make it react faster
|
// TODO: try adding following and make it react faster
|
||||||
// setTextToFormEditorItem(text);
|
// setTextToFormEditorItem(text);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user