QQmlSA::FixSuggestion Class

class QQmlSA::FixSuggestion

代表对源代码中问题的建议修复。更多

标题: #include <FixSuggestion>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
状态: 技术预览技术预览

公共函数

FixSuggestion(const QString &fixDescription, const QQmlSA::SourceLocation &location, const QString &replacement = QString())
FixSuggestion(const QQmlSA::FixSuggestion &other)
FixSuggestion(QQmlSA::FixSuggestion &&other)
~FixSuggestion()
QString fileName() const
QString fixDescription() const
QString hint() const
bool isAutoApplicable() const
QQmlSA::SourceLocation location() const
QString replacement() const
void setAutoApplicable(bool autoApplicable = true)
void setFileName(const QString &fileName)
void setHint(const QString &hint)
QQmlSA::FixSuggestion &operator=(QQmlSA::FixSuggestion &&other)
QQmlSA::FixSuggestion &operator=(const QQmlSA::FixSuggestion &other)
bool operator!=(const QQmlSA::FixSuggestion &lhs, const QQmlSA::FixSuggestion &rhs)
bool operator==(const QQmlSA::FixSuggestion &lhs, const QQmlSA::FixSuggestion &rhs)

详细说明

成员函数文档

FixSuggestion::FixSuggestion(const QString &fixDescription, const QQmlSA::SourceLocation &location, const QString &replacement = QString())

创建一个 FixSuggestion 对象。

FixSuggestion::FixSuggestion(const QQmlSA::FixSuggestion &other)

创建other 的副本。

[noexcept] FixSuggestion::FixSuggestion(QQmlSA::FixSuggestion &&other)

移动-构建一个 FixSuggestion 实例。

[noexcept] FixSuggestion::~FixSuggestion()

销毁FixSuggestion 实例。

QString FixSuggestion::fileName() const

返回适用此修复建议的文件名称。

另请参见 setFileName()。

QString FixSuggestion::fixDescription() const

返回修复的描述。

QString FixSuggestion::hint() const

返回此修复建议的提示。

另请参阅 setHint().

bool FixSuggestion::isAutoApplicable() const

返回是否可以自动应用此建议的修正。

QQmlSA::SourceLocation FixSuggestion::location() const

返回应用修复的位置。

QString FixSuggestion::replacement() const

返回替换有问题源代码的修正。

void FixSuggestion::setAutoApplicable(bool autoApplicable = true)

设置autoApplicable ,以确定是否可以自动应用此建议修复。

另请参阅 isAutoApplicable().

void FixSuggestion::setFileName(const QString &fileName)

fileName 设置为适用此修复建议的文件名。

另请参阅 fileName().

void FixSuggestion::setHint(const QString &hint)

hint 设置为该修复建议的提示。

另请参阅 hint().

[noexcept] QQmlSA::FixSuggestion &FixSuggestion::operator=(QQmlSA::FixSuggestion &&other)

Move-assignsother 到此FixSuggestion 实例。

QQmlSA::FixSuggestion &FixSuggestion::operator=(const QQmlSA::FixSuggestion &other)

FixSuggestion 实例指定other

相关非会员

bool operator!=(const QQmlSA::FixSuggestion &lhs, const QQmlSA::FixSuggestion &rhs)

如果lhsrhs 不相等,则返回true ,否则返回false

bool operator==(const QQmlSA::FixSuggestion &lhs, const QQmlSA::FixSuggestion &rhs)

如果lhsrhs 相等,则返回true ,否则返回false

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.