Replace a few \returns by Returns

Change-Id: I09c633e610421f5cc8257b15de60ffa98d890ee0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
hjk
2023-03-24 12:07:30 +01:00
parent 623a7fa358
commit 884a1d6f94
10 changed files with 31 additions and 38 deletions

View File

@@ -66,10 +66,10 @@ public:
/// Returns this Symbol's source location. /// Returns this Symbol's source location.
int sourceLocation() const { return _sourceLocation; } int sourceLocation() const { return _sourceLocation; }
/// \returns this Symbol's line number. The line number is 1-based. /// Returns this Symbol's line number. The line number is 1-based.
int line() const { return _line; } int line() const { return _line; }
/// \returns this Symbol's column number. The column number is 1-based. /// Returns this Symbol's column number. The column number is 1-based.
int column() const { return _column; } int column() const { return _column; }
/// Returns this Symbol's file name. /// Returns this Symbol's file name.

View File

@@ -115,8 +115,9 @@ SourceLocation QmlJS::fullLocationForQualifiedId(AST::UiQualifiedId *qualifiedId
} }
/*! /*!
\returns the value of the 'id:' binding in \a object Returns the value of the 'id:' binding in \a object.
\param idBinding optional out parameter to get the UiScriptBinding for the id binding
\a idBinding is optional out parameter to get the UiScriptBinding for the id binding.
*/ */
QString QmlJS::idOfObject(Node *object, UiScriptBinding **idBinding) QString QmlJS::idOfObject(Node *object, UiScriptBinding **idBinding)
{ {

View File

@@ -28,15 +28,15 @@ public:
~MultiTextCursor(); ~MultiTextCursor();
/// replace all cursors with \param cursors and the last one will be the new main cursors /// Replaces all cursors with \param cursors and the last one will be the new main cursors.
void setCursors(const QList<QTextCursor> &cursors); void setCursors(const QList<QTextCursor> &cursors);
const QList<QTextCursor> cursors() const; const QList<QTextCursor> cursors() const;
/// \returns whether this multi cursor contains any cursor /// Returns whether this multi cursor contains any cursor.
bool isNull() const; bool isNull() const;
/// \returns whether this multi cursor contains more than one cursor /// Returns whether this multi cursor contains more than one cursor.
bool hasMultipleCursors() const; bool hasMultipleCursors() const;
/// \returns the number of cursors handled by this cursor /// Returns the number of cursors handled by this cursor.
int cursorCount() const; int cursorCount() const;
/// the \param cursor that is appended by added by \brief addCursor /// the \param cursor that is appended by added by \brief addCursor
@@ -46,9 +46,9 @@ public:
/// convenience function that removes the old main cursor and appends /// convenience function that removes the old main cursor and appends
/// \param cursor as the new main cursor /// \param cursor as the new main cursor
void replaceMainCursor(const QTextCursor &cursor); void replaceMainCursor(const QTextCursor &cursor);
/// \returns the main cursor /// Returns the main cursor.
QTextCursor mainCursor() const; QTextCursor mainCursor() const;
/// \returns the main cursor and removes it from this multi cursor /// Returns the main cursor and removes it from this multi cursor.
QTextCursor takeMainCursor(); QTextCursor takeMainCursor();
void beginEditBlock(); void beginEditBlock();
@@ -62,10 +62,10 @@ public:
/// with the move \param mode /// with the move \param mode
void movePosition(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode, int n = 1); void movePosition(QTextCursor::MoveOperation operation, QTextCursor::MoveMode mode, int n = 1);
/// \returns whether any cursor has a selection /// Returns whether any cursor has a selection.
bool hasSelection() const; bool hasSelection() const;
/// \returns the selected text of all cursors that have a selection separated by /// Returns the selected text of all cursors that have a selection separated by
/// a newline character /// a newline character.
QString selectedText() const; QString selectedText() const;
/// removes the selected text of all cursors that have a selection from the document /// removes the selected text of all cursors that have a selection from the document
void removeSelectedText(); void removeSelectedText();

View File

@@ -488,7 +488,7 @@ FileStatus::Status ClearCasePluginPrivate::getFileStatus(const QString &fileName
/// "cleartool pwv" returns the values for "set view" and "working directory view", also for /// "cleartool pwv" returns the values for "set view" and "working directory view", also for
/// snapshot views. /// snapshot views.
/// ///
/// \returns The ClearCase topLevel/VOB directory for this directory /// Returns the ClearCase topLevel/VOB directory for this directory.
QString ClearCasePluginPrivate::ccManagesDirectory(const FilePath &directory) const QString ClearCasePluginPrivate::ccManagesDirectory(const FilePath &directory) const
{ {
const CommandResult result = runCleartoolProc(directory, {"pwv"}); const CommandResult result = runCleartoolProc(directory, {"pwv"});

View File

@@ -1000,7 +1000,7 @@ Document::Ptr CppModelManager::document(const FilePath &filePath) const
/// Replace the document in the snapshot. /// Replace the document in the snapshot.
/// ///
/// \returns true if successful, false if the new document is out-dated. /// Returns true if successful, false if the new document is out-dated.
bool CppModelManager::replaceDocument(Document::Ptr newDoc) bool CppModelManager::replaceDocument(Document::Ptr newDoc)
{ {
QMutexLocker locker(&d->m_snapshotMutex); QMutexLocker locker(&d->m_snapshotMutex);

View File

@@ -20,7 +20,7 @@ public:
const Utils::FilePath &generatedFile); const Utils::FilePath &generatedFile);
~GeneratedCodeModelSupport() override; ~GeneratedCodeModelSupport() override;
/// \returns the contents encoded in UTF-8. /// Returns the contents encoded in UTF-8.
QByteArray contents() const override; QByteArray contents() const override;
Utils::FilePath filePath() const override; // The generated file Utils::FilePath filePath() const override; // The generated file
Utils::FilePath sourceFilePath() const override; Utils::FilePath sourceFilePath() const override;

View File

@@ -23,27 +23,21 @@ public:
InsertionLocation(const Utils::FilePath &filePath, const QString &prefix, InsertionLocation(const Utils::FilePath &filePath, const QString &prefix,
const QString &suffix, int line, int column); const QString &suffix, int line, int column);
const Utils::FilePath &filePath() const const Utils::FilePath &filePath() const { return m_filePath; }
{ return m_filePath; }
/// \returns The prefix to insert before any other text. /// Returns the prefix to insert before any other text.
QString prefix() const QString prefix() const { return m_prefix; }
{ return m_prefix; }
/// \returns The suffix to insert after the other inserted text. /// Returns the suffix to insert after the other inserted text.
QString suffix() const QString suffix() const { return m_suffix; }
{ return m_suffix; }
/// \returns The line where to insert. The line number is 1-based. /// Returns the line where to insert. The line number is 1-based.
int line() const int line() const { return m_line; }
{ return m_line; }
/// \returns The column where to insert. The column number is 1-based. /// Returns the column where to insert. The column number is 1-based.
int column() const int column() const { return m_column; }
{ return m_column; }
bool isValid() const bool isValid() const { return !m_filePath.isEmpty() && m_line > 0 && m_column > 0; }
{ return !m_filePath.isEmpty() && m_line > 0 && m_column > 0; }
private: private:
Utils::FilePath m_filePath; Utils::FilePath m_filePath;

View File

@@ -44,7 +44,7 @@ protected:
const QmlJSTools::SemanticInfo &semanticInfo() const; const QmlJSTools::SemanticInfo &semanticInfo() const;
/// \returns The name of the file for for which this operation is invoked. /// Returns The name of the file for for which this operation is invoked.
Utils::FilePath fileName() const; Utils::FilePath fileName() const;
private: private:

View File

@@ -24,7 +24,7 @@ public:
QmlJS::Document::Ptr qmljsDocument() const; QmlJS::Document::Ptr qmljsDocument() const;
/*! /*!
\returns the offset in the document for the start position of the given Returns the offset in the document for the start position of the given
source location. source location.
*/ */
unsigned startOf(const QmlJS::SourceLocation &loc) const; unsigned startOf(const QmlJS::SourceLocation &loc) const;

View File

@@ -35,8 +35,7 @@ public:
virtual ~QuickFixOperation(); virtual ~QuickFixOperation();
/*! /*!
\returns The priority for this quick-fix. See the QuickFixCollector for more Returns The priority for this quick-fix. See the QuickFixCollector for more information.
information.
*/ */
virtual int priority() const; virtual int priority() const;
@@ -44,8 +43,7 @@ public:
void setPriority(int priority); void setPriority(int priority);
/*! /*!
\returns The description for this quick-fix. This description is shown to the Returns The description for this quick-fix. This description is shown to the user.
user.
*/ */
virtual QString description() const; virtual QString description() const;