diff --git a/doc/qtcreatordev/src/external-resources.qdoc b/doc/qtcreatordev/src/external-resources.qdoc new file mode 100644 index 00000000000..e902d363e88 --- /dev/null +++ b/doc/qtcreatordev/src/external-resources.qdoc @@ -0,0 +1,12 @@ +// Copyright (C) 2025 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only + + +/*! + \externalpage https://doc.qt.io/qtcreator/creator-how-to-add-wizards.html + \title Add wizards +*/ +/*! + \externalpage https://doc.qt.io/qtcreator/creator-project-wizards.html + \title Custom Wizards +*/ diff --git a/src/plugins/coreplugin/basefilewizardfactory.cpp b/src/plugins/coreplugin/basefilewizardfactory.cpp index 9a18a96afd9..56b47b65ede 100644 --- a/src/plugins/coreplugin/basefilewizardfactory.cpp +++ b/src/plugins/coreplugin/basefilewizardfactory.cpp @@ -89,8 +89,7 @@ Wizard *BaseFileWizardFactory::runWizardImpl(const FilePath &path, Id platform, postGenerateFiles(), which is called after generating the files. \note Instead of using this class, we recommend that you create JSON-based - wizards, as instructed in \l{https://doc.qt.io/qtcreator/creator-project-wizards.html} - {Adding New Custom Wizards}. + wizards, as instructed in \l{Add wizards} and \l {Custom wizards}. \sa Core::GeneratedFile, Core::WizardDialogParameters, Core::BaseFileWizard */ @@ -117,11 +116,10 @@ Wizard *BaseFileWizardFactory::runWizardImpl(const FilePath &path, Id platform, /*! Physically writes \a files. - If the files cannot be written, returns \c false and sets \a errorMessage - to the message that is displayed to users. + If the files cannot be written, returns \c Utils::ResultError. Re-implement (calling the base implementation) to create files with - GeneratedFile::CustomGeneratorAttribute set. + \c GeneratedFile::CustomGeneratorAttribute set. */ Result<> BaseFileWizardFactory::writeFiles(const GeneratedFiles &files) const @@ -141,9 +139,7 @@ Result<> BaseFileWizardFactory::writeFiles(const GeneratedFiles &files) const specified by \a l are actually created. The default implementation opens editors with the newly generated files - that have GeneratedFile::OpenEditorAttribute set. - - Returns \a errorMessage if errors occur. + that have \c GeneratedFile::OpenEditorAttribute set. */ Result<> BaseFileWizardFactory::postGenerateFiles(const QWizard *, const GeneratedFiles &l) const @@ -153,11 +149,10 @@ Result<> BaseFileWizardFactory::postGenerateFiles(const QWizard *, const Generat /*! Opens the editors for the files \a l if their - GeneratedFile::OpenEditorAttribute attribute + \c GeneratedFile::OpenEditorAttribute attribute is set accordingly. - If the editorrs cannot be opened, returns \c false and dand sets - \a errorMessage to the message that is displayed to users. + If the editors cannot be opened, returns \c Utils::ResultError. */ Result<> BaseFileWizardFactory::postGenerateOpenEditors(const GeneratedFiles &l) diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp index 5ea3b11e06b..2811ab80002 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp @@ -293,10 +293,7 @@ IEditor *IEditorFactory::createEditor() const /*! Opens the file at \a filePath in an external editor. - Returns \c true on success or \c false on failure with the error in - \a errorMessage. - - \sa setEditorStarter() + Returns \c Utils::ResultOk on success or \c Utils::ResultError on failure. */ Result<> IEditorFactory::startEditor(const FilePath &filePath) { @@ -322,6 +319,8 @@ void IEditorFactory::setEditorCreator(const std::function &creator) } /*! + \fn void Core::IEditorFactory::setEditorStarter(const std::function(const Utils::FilePath &)> &starter) + Sets the function that is used to open a file for a given \c FilePath to \a starter. diff --git a/src/plugins/coreplugin/find/basetextfind.cpp b/src/plugins/coreplugin/find/basetextfind.cpp index 0820d9bbc2d..251db41e983 100644 --- a/src/plugins/coreplugin/find/basetextfind.cpp +++ b/src/plugins/coreplugin/find/basetextfind.cpp @@ -54,14 +54,14 @@ BaseTextFindPrivate::BaseTextFindPrivate() */ /*! - \fn void Core::BaseTextFind::findScopeChanged(const Utils::MultiTextCursor &cursor) + \internal This signal is emitted when the search scope changes to \a cursor. */ /*! - \fn void Core::BaseTextFind::highlightAllRequested(const QString &txt, Utils::FindFlags findFlags) + \internal This signal is emitted when the search results for \a txt using the given \a findFlags should be highlighted in the editor widget. diff --git a/src/plugins/coreplugin/idocument.cpp b/src/plugins/coreplugin/idocument.cpp index 3d05ab25a7c..6545dcdd590 100644 --- a/src/plugins/coreplugin/idocument.cpp +++ b/src/plugins/coreplugin/idocument.cpp @@ -288,13 +288,10 @@ Id IDocument::id() const If the editor is opened from a regular file, \a filePath and \a filePath are the same. - Use \a errorString to return an error message if this document cannot - handle the file contents. - Returns whether the file was opened and read successfully. The default implementation does nothing and returns - CannotHandle. + \c CannotHandle. \sa EditorManager::openEditor() \sa shouldAutoSave() diff --git a/src/plugins/coreplugin/textdocument.cpp b/src/plugins/coreplugin/textdocument.cpp index 12a657a92a2..e1ad90b1c58 100644 --- a/src/plugins/coreplugin/textdocument.cpp +++ b/src/plugins/coreplugin/textdocument.cpp @@ -67,9 +67,6 @@ QByteArray BaseTextDocument::decodingErrorSample() const Writes out the contents (\a data) of the text file \a filePath. Uses the format obtained from the last read() of the file. - If an error occurs while writing the file, \a errorMessage is set to the - error details. - Returns whether the operation was successful. */ @@ -82,9 +79,6 @@ Result<> BaseTextDocument::write(const FilePath &filePath, const QString &data) Writes out the contents (\a data) of the text file \a filePath. Uses the custom format \a format. - If an error occurs while writing the file, \a errorMessage is set to the - error details. - Returns whether the operation was successful. */ @@ -123,9 +117,6 @@ bool BaseTextDocument::isUtf8Codec(const QByteArray &name) Autodetects file format and reads the text file specified by \a filePath into a list of strings specified by \a plainTextList. - If an error occurs while writing the file, \a errorString is set to the - error details. - Returns whether the operation was successful. */ @@ -144,9 +135,6 @@ BaseTextDocument::ReadResult BaseTextDocument::read(const FilePath &filePath, Autodetects file format and reads the text file specified by \a filePath into \a plainText. - If an error occurs while writing the file, \a errorString is set to the - error details. - Returns whether the operation was successful. */