Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QQmlSA::FixSuggestion Class Reference

\inmodule QtQmlCompiler More...

#include <qqmlsa.h>

+ Collaboration diagram for QQmlSA::FixSuggestion:

Public Member Functions

 FixSuggestion (const QString &fixDescription, const QQmlSA::SourceLocation &location, const QString &replacement=QString())
 
 FixSuggestion (const FixSuggestion &)
 
 FixSuggestion (FixSuggestion &&) noexcept
 
FixSuggestionoperator= (const FixSuggestion &)
 
FixSuggestionoperator= (FixSuggestion &&) noexcept
 
 ~FixSuggestion ()
 
QString fixDescription () const
 Returns the description of the fix.
 
QQmlSA::SourceLocation location () const
 Returns the location where the fix would be applied.
 
QString replacement () const
 Returns the fix that will replace the problematic source code.
 
void setFileName (const QString &)
 Sets fileName as the name of the file where this fix suggestion applies.
 
QString fileName () const
 Returns the name of the file where this fix suggestion applies.
 
void setHint (const QString &)
 Sets hint as the hint for this fix suggestion.
 
QString hint () const
 Returns the hint for this fix suggestion.
 
void setAutoApplicable (bool autoApplicable=true)
 Sets uses autoApplicable to set whtether this suggested fix can be applied automatically.
 
bool isAutoApplicable () const
 Returns whether this suggested fix can be applied automatically.
 

Friends

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

Detailed Description

\inmodule QtQmlCompiler

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

Definition at line 391 of file qqmlsa.h.

Constructor & Destructor Documentation

◆ FixSuggestion() [1/3]

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

Definition at line 1561 of file qqmlsa.cpp.

◆ FixSuggestion() [2/3]

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

Definition at line 1567 of file qqmlsa.cpp.

◆ FixSuggestion() [3/3]

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

Definition at line 1572 of file qqmlsa.cpp.

References other().

+ Here is the call graph for this function:

◆ ~FixSuggestion()

QQmlSA::FixSuggestion::~FixSuggestion ( )
default

Member Function Documentation

◆ fileName()

QString QQmlSA::FixSuggestion::fileName ( ) const

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

Definition at line 1633 of file qqmlsa.cpp.

References QQmlJSFixSuggestion::filename(), and QQmlSA::FixSuggestionPrivate::fixSuggestion().

Referenced by setFileName().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fixDescription()

QString QQmlSA::FixSuggestion::fixDescription ( ) const

Returns the description of the fix.

Definition at line 1600 of file qqmlsa.cpp.

References QQmlJSFixSuggestion::fixDescription(), and QQmlSA::FixSuggestionPrivate::fixSuggestion().

+ Here is the call graph for this function:

◆ hint()

QString QQmlSA::FixSuggestion::hint ( ) const

Returns the hint for this fix suggestion.

Definition at line 1649 of file qqmlsa.cpp.

References QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::hint().

Referenced by setHint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAutoApplicable()

bool QQmlSA::FixSuggestion::isAutoApplicable ( ) const

Returns whether this suggested fix can be applied automatically.

Definition at line 1665 of file qqmlsa.cpp.

References QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::isAutoApplicable().

+ Here is the call graph for this function:

◆ location()

QQmlSA::SourceLocation QQmlSA::FixSuggestion::location ( ) const

Returns the location where the fix would be applied.

Definition at line 1608 of file qqmlsa.cpp.

References QQmlSA::SourceLocationPrivate::createQQmlSASourceLocation(), QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::location().

+ Here is the call graph for this function:

◆ operator=() [1/2]

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

Definition at line 1577 of file qqmlsa.cpp.

References other().

+ Here is the call graph for this function:

◆ operator=() [2/2]

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

Definition at line 1586 of file qqmlsa.cpp.

References other().

+ Here is the call graph for this function:

◆ replacement()

QString QQmlSA::FixSuggestion::replacement ( ) const

Returns the fix that will replace the problematic source code.

Definition at line 1617 of file qqmlsa.cpp.

References QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::replacement().

+ Here is the call graph for this function:

◆ setAutoApplicable()

void QQmlSA::FixSuggestion::setAutoApplicable ( bool  autoApplicable = true)

Sets uses autoApplicable to set whtether this suggested fix can be applied automatically.

Definition at line 1657 of file qqmlsa.cpp.

References QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::setAutoApplicable().

+ Here is the call graph for this function:

◆ setFileName()

void QQmlSA::FixSuggestion::setFileName ( const QString fileName)

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

Definition at line 1625 of file qqmlsa.cpp.

References fileName(), QQmlSA::FixSuggestionPrivate::fixSuggestion(), and QQmlJSFixSuggestion::setFilename().

+ Here is the call graph for this function:

◆ setHint()

void QQmlSA::FixSuggestion::setHint ( const QString hint)

Sets hint as the hint for this fix suggestion.

Definition at line 1641 of file qqmlsa.cpp.

References QQmlSA::FixSuggestionPrivate::fixSuggestion(), hint(), and QQmlJSFixSuggestion::setHint().

Referenced by AttachedPropertyReuse::onRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const FixSuggestion lhs,
const FixSuggestion rhs 
)
friend

Definition at line 422 of file qqmlsa.h.

◆ operator==

bool operator== ( const FixSuggestion lhs,
const FixSuggestion rhs 
)
friend

Definition at line 417 of file qqmlsa.h.


The documentation for this class was generated from the following files: