On this page

QQmlSA::FixSuggestion Class

class QQmlSA::FixSuggestion

Represents a suggested fix for an issue in the source code. More...

Header: #include <qqmlsa.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS QmlCompiler)
target_link_libraries(mytarget PRIVATE Qt6::QmlCompiler)
Status: Technology preview

This class is in technology preview and is subject to change.

Public Functions

FixSuggestion(const QString &description, const QQmlSA::SourceLocation &location, const QList<QQmlSA::DocumentEdit> &documentEdits = {})
FixSuggestion(const QString &description, const QQmlSA::SourceLocation &location, const QQmlSA::DocumentEdit &documentEdit)
FixSuggestion(const QQmlSA::FixSuggestion &other)
FixSuggestion(QQmlSA::FixSuggestion &&other)
~FixSuggestion()
void addDocumentEdit(const QQmlSA::DocumentEdit &edit)
QString description() const
QList<QQmlSA::DocumentEdit> documentEdits() const
QString fileName() const
bool isAutoApplicable() const
QQmlSA::SourceLocation location() const
void setAutoApplicable(bool autoApplicable = true)
void setFileName(const QString &fileName)
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)

Detailed Description

Member Function Documentation

FixSuggestion::FixSuggestion(const QString &description, const QQmlSA::SourceLocation &location, const QList<QQmlSA::DocumentEdit> &documentEdits = {})

Creates a FixSuggestion object.

FixSuggestion::FixSuggestion(const QString &description, const QQmlSA::SourceLocation &location, const QQmlSA::DocumentEdit &documentEdit)

Creates a FixSuggestion object.

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

Creates a copy of other.

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

Move-constructs a FixSuggestion instance.

[noexcept] FixSuggestion::~FixSuggestion()

Destroys the FixSuggestion instance.

void FixSuggestion::addDocumentEdit(const QQmlSA::DocumentEdit &edit)

Adds a document edit to the list of edits for this fix.

QString FixSuggestion::description() const

Returns the description of the fix.

QList<QQmlSA::DocumentEdit> FixSuggestion::documentEdits() const

Returns the list of document edits that applying this fix would make.

QString FixSuggestion::fileName() const

Returns the name of the file where this fix suggestion applies.

See also setFileName().

bool FixSuggestion::isAutoApplicable() const

Returns whether this suggested fix can be applied automatically.

QQmlSA::SourceLocation FixSuggestion::location() const

Returns the location of the fix.

void FixSuggestion::setAutoApplicable(bool autoApplicable = true)

Sets autoApplicable to determine whether this suggested fix can be applied automatically.

See also isAutoApplicable().

void FixSuggestion::setFileName(const QString &fileName)

Sets fileName as the name of the file where this fix suggestion applies.

See also fileName().

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

Move-assigns other to this FixSuggestion instance.

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

Assigns other to this FixSuggestion instance.

Related Non-Members

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

Returns true if lhs and rhs are not equal, and false otherwise.

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

Returns true if lhs and rhs are equal, and false otherwise.

© 2026 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.