FixSuggestion Class

class QQmlSA ::FixSuggestion

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

頭: #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())

Creates a FixSuggestion object.

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

創建副本為 other .

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

Move-constructs a FixSuggestion instance.

[noexcept] FixSuggestion:: ~FixSuggestion ()

Destorys the FixSuggestion 實例。

QString FixSuggestion:: fileName () const

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

另請參閱 setFileName ().

QString FixSuggestion:: fixDescription () const

Returns the description of the fix.

QString FixSuggestion:: hint () const

Returns the hint for this fix suggestion.

另請參閱 setHint ().

bool FixSuggestion:: isAutoApplicable () const

Returns whether this suggested fix can be applied automatically.

QQmlSA::SourceLocation FixSuggestion:: location () const

Returns the location where the fix would be applied.

QString FixSuggestion:: replacement () const

Returns the fix that will replace the problematic source code.

void FixSuggestion:: setAutoApplicable ( bool autoApplicable = true)

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

另請參閱 isAutoApplicable ().

void FixSuggestion:: setFileName (const QString & fileName )

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

另請參閱 fileName ().

void FixSuggestion:: setHint (const QString & hint )

設置 hint as the hint for this fix suggestion.

另請參閱 hint ().

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

移動賦值 other 到此 FixSuggestion 實例。

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

賦值 other 到此 FixSuggestion 實例。

相關非成員

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

返迴 true if lhs and rhs are not equal, and false 否則。

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

返迴 true if lhs and rhs are equal, and false 否則。