From 884a1d6f944b1334fb1350f426944993eaaf72af Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 24 Mar 2023 12:07:30 +0100 Subject: [PATCH] Replace a few \returns by Returns Change-Id: I09c633e610421f5cc8257b15de60ffa98d890ee0 Reviewed-by: Leena Miettinen --- src/libs/3rdparty/cplusplus/Symbol.h | 4 +-- src/libs/qmljs/qmljsutils.cpp | 5 ++-- src/libs/utils/multitextcursor.h | 18 ++++++------- src/plugins/clearcase/clearcaseplugin.cpp | 2 +- src/plugins/cppeditor/cppmodelmanager.cpp | 2 +- .../cppeditor/generatedcodemodelsupport.h | 2 +- src/plugins/cppeditor/insertionpointlocator.h | 26 +++++++------------ src/plugins/qmljseditor/qmljsquickfix.h | 2 +- .../qmljstools/qmljsrefactoringchanges.h | 2 +- src/plugins/texteditor/quickfix.h | 6 ++--- 10 files changed, 31 insertions(+), 38 deletions(-) diff --git a/src/libs/3rdparty/cplusplus/Symbol.h b/src/libs/3rdparty/cplusplus/Symbol.h index 497226dcc1a..dc07ced907d 100644 --- a/src/libs/3rdparty/cplusplus/Symbol.h +++ b/src/libs/3rdparty/cplusplus/Symbol.h @@ -66,10 +66,10 @@ public: /// Returns this Symbol's source location. 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; } - /// \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; } /// Returns this Symbol's file name. diff --git a/src/libs/qmljs/qmljsutils.cpp b/src/libs/qmljs/qmljsutils.cpp index 1609e49c68c..e33a6b3e809 100644 --- a/src/libs/qmljs/qmljsutils.cpp +++ b/src/libs/qmljs/qmljsutils.cpp @@ -115,8 +115,9 @@ SourceLocation QmlJS::fullLocationForQualifiedId(AST::UiQualifiedId *qualifiedId } /*! - \returns the value of the 'id:' binding in \a object - \param idBinding optional out parameter to get the UiScriptBinding for the id binding + Returns the value of the 'id:' binding in \a object. + + \a idBinding is optional out parameter to get the UiScriptBinding for the id binding. */ QString QmlJS::idOfObject(Node *object, UiScriptBinding **idBinding) { diff --git a/src/libs/utils/multitextcursor.h b/src/libs/utils/multitextcursor.h index edb4f5f1fd6..b2565f931ff 100644 --- a/src/libs/utils/multitextcursor.h +++ b/src/libs/utils/multitextcursor.h @@ -28,15 +28,15 @@ public: ~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 &cursors); const QList cursors() const; - /// \returns whether this multi cursor contains any cursor + /// Returns whether this multi cursor contains any cursor. 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; - /// \returns the number of cursors handled by this cursor + /// Returns the number of cursors handled by this cursor. int cursorCount() const; /// 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 /// \param cursor as the new main cursor void replaceMainCursor(const QTextCursor &cursor); - /// \returns the main cursor + /// Returns the main cursor. 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(); void beginEditBlock(); @@ -62,10 +62,10 @@ public: /// with the move \param mode 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; - /// \returns the selected text of all cursors that have a selection separated by - /// a newline character + /// Returns the selected text of all cursors that have a selection separated by + /// a newline character. QString selectedText() const; /// removes the selected text of all cursors that have a selection from the document void removeSelectedText(); diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index f60db85ac05..4c810544b3f 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -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 /// 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 { const CommandResult result = runCleartoolProc(directory, {"pwv"}); diff --git a/src/plugins/cppeditor/cppmodelmanager.cpp b/src/plugins/cppeditor/cppmodelmanager.cpp index 27984cce88f..4f482e6c6d1 100644 --- a/src/plugins/cppeditor/cppmodelmanager.cpp +++ b/src/plugins/cppeditor/cppmodelmanager.cpp @@ -1000,7 +1000,7 @@ Document::Ptr CppModelManager::document(const FilePath &filePath) const /// 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) { QMutexLocker locker(&d->m_snapshotMutex); diff --git a/src/plugins/cppeditor/generatedcodemodelsupport.h b/src/plugins/cppeditor/generatedcodemodelsupport.h index cd7591a3b00..d37177d9910 100644 --- a/src/plugins/cppeditor/generatedcodemodelsupport.h +++ b/src/plugins/cppeditor/generatedcodemodelsupport.h @@ -20,7 +20,7 @@ public: const Utils::FilePath &generatedFile); ~GeneratedCodeModelSupport() override; - /// \returns the contents encoded in UTF-8. + /// Returns the contents encoded in UTF-8. QByteArray contents() const override; Utils::FilePath filePath() const override; // The generated file Utils::FilePath sourceFilePath() const override; diff --git a/src/plugins/cppeditor/insertionpointlocator.h b/src/plugins/cppeditor/insertionpointlocator.h index c4091d5f9dc..d6fd5d735cc 100644 --- a/src/plugins/cppeditor/insertionpointlocator.h +++ b/src/plugins/cppeditor/insertionpointlocator.h @@ -23,27 +23,21 @@ public: InsertionLocation(const Utils::FilePath &filePath, const QString &prefix, const QString &suffix, int line, int column); - const Utils::FilePath &filePath() const - { return m_filePath; } + const Utils::FilePath &filePath() const { return m_filePath; } - /// \returns The prefix to insert before any other text. - QString prefix() const - { return m_prefix; } + /// Returns the prefix to insert before any other text. + QString prefix() const { return m_prefix; } - /// \returns The suffix to insert after the other inserted text. - QString suffix() const - { return m_suffix; } + /// Returns the suffix to insert after the other inserted text. + QString suffix() const { return m_suffix; } - /// \returns The line where to insert. The line number is 1-based. - int line() const - { return m_line; } + /// Returns the line where to insert. The line number is 1-based. + int line() const { return m_line; } - /// \returns The column where to insert. The column number is 1-based. - int column() const - { return m_column; } + /// Returns the column where to insert. The column number is 1-based. + int column() const { return m_column; } - bool isValid() const - { return !m_filePath.isEmpty() && m_line > 0 && m_column > 0; } + bool isValid() const { return !m_filePath.isEmpty() && m_line > 0 && m_column > 0; } private: Utils::FilePath m_filePath; diff --git a/src/plugins/qmljseditor/qmljsquickfix.h b/src/plugins/qmljseditor/qmljsquickfix.h index 643334a94c7..b050ba4d1f1 100644 --- a/src/plugins/qmljseditor/qmljsquickfix.h +++ b/src/plugins/qmljseditor/qmljsquickfix.h @@ -44,7 +44,7 @@ protected: 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; private: diff --git a/src/plugins/qmljstools/qmljsrefactoringchanges.h b/src/plugins/qmljstools/qmljsrefactoringchanges.h index d16564832b6..33545e2bfc5 100644 --- a/src/plugins/qmljstools/qmljsrefactoringchanges.h +++ b/src/plugins/qmljstools/qmljsrefactoringchanges.h @@ -24,7 +24,7 @@ public: 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. */ unsigned startOf(const QmlJS::SourceLocation &loc) const; diff --git a/src/plugins/texteditor/quickfix.h b/src/plugins/texteditor/quickfix.h index 6469bd7d8bc..e456230ac20 100644 --- a/src/plugins/texteditor/quickfix.h +++ b/src/plugins/texteditor/quickfix.h @@ -35,8 +35,7 @@ public: virtual ~QuickFixOperation(); /*! - \returns The priority for this quick-fix. See the QuickFixCollector for more - information. + Returns The priority for this quick-fix. See the QuickFixCollector for more information. */ virtual int priority() const; @@ -44,8 +43,7 @@ public: void setPriority(int priority); /*! - \returns The description for this quick-fix. This description is shown to the - user. + Returns The description for this quick-fix. This description is shown to the user. */ virtual QString description() const;