diff --git a/src/plugins/coreplugin/locator/basefilefilter.cpp b/src/plugins/coreplugin/locator/basefilefilter.cpp index 0bcf12e3f95..ade74bbb920 100644 --- a/src/plugins/coreplugin/locator/basefilefilter.cpp +++ b/src/plugins/coreplugin/locator/basefilefilter.cpp @@ -64,8 +64,30 @@ public: } // Internal +/*! + \class Core::BaseFileFilter + \inmodule QtCreator + + \brief The BaseFileFilter class is a base class for locator filter classes. +*/ + +/*! + \class Core::BaseFileFilter::Iterator + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::BaseFileFilter::ListIterator + \inmodule QtCreator + \internal +*/ + BaseFileFilter::Iterator::~Iterator() = default; +/*! + \internal +*/ BaseFileFilter::BaseFileFilter() : d(new Internal::BaseFileFilterPrivate) { @@ -73,11 +95,17 @@ BaseFileFilter::BaseFileFilter() setFileIterator(new ListIterator({})); } +/*! + \internal +*/ BaseFileFilter::~BaseFileFilter() { delete d; } +/*! + \reimp +*/ void BaseFileFilter::prepareSearch(const QString &entry) { Q_UNUSED(entry) @@ -104,6 +132,9 @@ ILocatorFilter::MatchLevel BaseFileFilter::matchLevelFor(const QRegularExpressio return MatchLevel::Normal; } +/*! + \reimp +*/ QList BaseFileFilter::matchesFor(QFutureInterface &future, const QString &origEntry) { QList entries[int(MatchLevel::Count)]; @@ -184,6 +215,9 @@ QList BaseFileFilter::matchesFor(QFutureInterface()); } +/*! + \reimp +*/ void BaseFileFilter::accept(LocatorFilterEntry selection, QString *newText, int *selectionStart, int *selectionLength) const { @@ -206,6 +240,9 @@ void BaseFileFilter::setFileIterator(BaseFileFilter::Iterator *iterator) d->m_data.iterator.reset(iterator); } +/*! + Returns the file iterator. +*/ QSharedPointer BaseFileFilter::fileIterator() { return d->m_data.iterator; diff --git a/src/plugins/coreplugin/locator/commandlocator.cpp b/src/plugins/coreplugin/locator/commandlocator.cpp index 7546d0f9b06..5053bd92909 100644 --- a/src/plugins/coreplugin/locator/commandlocator.cpp +++ b/src/plugins/coreplugin/locator/commandlocator.cpp @@ -40,6 +40,12 @@ struct CommandLocatorPrivate QList commands; }; +/*! + \class Core::CommandLocator + \inmodule QtCreator + \internal +*/ + CommandLocator::CommandLocator(Id id, const QString &displayName, const QString &shortCutString, diff --git a/src/plugins/coreplugin/locator/directoryfilter.cpp b/src/plugins/coreplugin/locator/directoryfilter.cpp index c6212571f64..718039c5ce5 100644 --- a/src/plugins/coreplugin/locator/directoryfilter.cpp +++ b/src/plugins/coreplugin/locator/directoryfilter.cpp @@ -37,6 +37,12 @@ namespace Core { +/*! + \class Core::DirectoryFilter + \inmodule QtCreator + \internal +*/ + DirectoryFilter::DirectoryFilter(Id id) : m_filters({"*.h", "*.cpp", "*.ui", "*.qrc"}), m_exclusionFilters({"*/.git/*", "*/.cvs/*", "*/.svn/*"}) diff --git a/src/plugins/coreplugin/locator/ilocatorfilter.cpp b/src/plugins/coreplugin/locator/ilocatorfilter.cpp index df49721d3f7..1d1b8213f8d 100644 --- a/src/plugins/coreplugin/locator/ilocatorfilter.cpp +++ b/src/plugins/coreplugin/locator/ilocatorfilter.cpp @@ -41,13 +41,25 @@ using namespace Core; /*! \class Core::ILocatorFilter - \inmodule Qt Creator + \inmodule QtCreator \brief The ILocatorFilter class adds a locator filter. The filter is added to \uicontrol Tools > \uicontrol Locate. */ +/*! + \class Core::LocatorFilterEntry + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::LocatorFilterEntry::HighlightInfo + \inmodule QtCreator + \internal +*/ + static QList g_locatorFilters; /*! @@ -64,6 +76,9 @@ ILocatorFilter::~ILocatorFilter() g_locatorFilters.removeOne(this); } +/*! + Returns the list of all locator filters. +*/ const QList ILocatorFilter::allLocatorFilters() { return g_locatorFilters; @@ -207,11 +222,19 @@ Qt::CaseSensitivity ILocatorFilter::caseSensitivity(const QString &str) return str == str.toLower() ? Qt::CaseInsensitive : Qt::CaseSensitive; } +/*! + Creates the search term \a text as a regular expression with case + sensitivity set to \a caseSensitivity. +*/ QRegularExpression ILocatorFilter::createRegExp(const QString &text, Qt::CaseSensitivity caseSensitivity) { return FuzzyMatcher::createRegExp(text, caseSensitivity); } +/*! + Returns information for highlighting the results of matching the regular + expression, specified by \a match, for the data of the type \a dataType. +*/ LocatorFilterEntry::HighlightInfo ILocatorFilter::highlightInfo( const QRegularExpressionMatch &match, LocatorFilterEntry::HighlightInfo::DataType dataType) { @@ -288,7 +311,9 @@ bool ILocatorFilter::isIncludedByDefault() const } /*! - Sets whether using the shortcut string is required to use this filter. + Sets whether using the shortcut string is required to use this filter + to \a includedByDefault. + Call from the constructor of subclasses to change the default. \sa isIncludedByDefault() @@ -312,8 +337,8 @@ bool ILocatorFilter::isHidden() const } /*! - Hides the filter in the \uicontrol {Locator filters} filter, - menus, and locator settings. Call in the constructor of subclasses. + Sets the filter in the \uicontrol {Locator filters} filter, menus, and + locator settings to \a hidden. Call in the constructor of subclasses. */ void ILocatorFilter::setHidden(bool hidden) { @@ -344,6 +369,9 @@ Id ILocatorFilter::id() const return m_id; } +/*! + Returns the filter's action ID. +*/ Id ILocatorFilter::actionId() const { return m_id.withPrefix("Locator."); @@ -373,7 +401,7 @@ ILocatorFilter::Priority ILocatorFilter::priority() const } /*! - Sets whether the filter is currently available. + Sets whether the filter is currently available to \a enabled. \sa isEnabled() */ @@ -383,7 +411,7 @@ void ILocatorFilter::setEnabled(bool enabled) } /*! - Sets the filter's unique ID. + Sets the filter's unique \a id. Subclasses must set the ID in their constructor. \sa id() @@ -394,7 +422,7 @@ void ILocatorFilter::setId(Id id) } /*! - Sets the priority of results of this filter in the result list. + Sets the \a priority of results of this filter in the result list. \sa priority() */ @@ -404,7 +432,7 @@ void ILocatorFilter::setPriority(Priority priority) } /*! - Sets the translated display name of this filter. + Sets the translated display name of this filter to \a displayString. Subclasses must set the display name in their constructor. @@ -416,7 +444,7 @@ void ILocatorFilter::setDisplayName(const QString &displayString) } /*! - Sets whether the filter provides a configuration dialog. + Sets whether the filter provides a configuration dialog to \a configurable. Most filters should at least provide the default dialog. \sa isConfigurable() @@ -475,3 +503,19 @@ void ILocatorFilter::setConfigurable(bool configurable) The results for this filter are placed below the results for filters that have other priorities. */ + +/*! + \enum ILocatorFilter::MatchLevel + + This enum value holds the level for ordering the results based on how well + they match the search criteria. + + \value Best + The result is the best match for the regular expression. + \value Better + \value Good + \value Normal + \value Count + The result has the highest number of matches for the regular + expression. +*/ diff --git a/src/plugins/coreplugin/locator/locatorfiltertest.cpp b/src/plugins/coreplugin/locator/locatorfiltertest.cpp index b859c317506..03362eda39e 100644 --- a/src/plugins/coreplugin/locator/locatorfiltertest.cpp +++ b/src/plugins/coreplugin/locator/locatorfiltertest.cpp @@ -37,6 +37,23 @@ using namespace Core; using namespace Core::Tests; +/*! + \class Core::Tests::BasicLocatorFilterTest + \inmodule QtCreator + \internal +*/ + +/*! + \class Core::Tests::TestDataDir + \inmodule QtCreator + \internal +*/ + +/*! + \namespace Core::Tests + \inmodule QtCreator + \internal +*/ BasicLocatorFilterTest::BasicLocatorFilterTest(ILocatorFilter *filter) : m_filter(filter) { } @@ -54,6 +71,11 @@ QList BasicLocatorFilterTest::matchesFor(const QString &sear return locatorSearch.results(); } +/*! + \class Core::Tests::ResultData + \inmodule QtCreator + \internal +*/ ResultData::ResultData() = default; ResultData::ResultData(const QString &textColumn1, const QString &textColumn2, diff --git a/src/plugins/coreplugin/locator/locatormanager.cpp b/src/plugins/coreplugin/locator/locatormanager.cpp index 0ff25b02cdf..6506f3b74b8 100644 --- a/src/plugins/coreplugin/locator/locatormanager.cpp +++ b/src/plugins/coreplugin/locator/locatormanager.cpp @@ -40,6 +40,12 @@ using namespace Core::Internal; namespace Core { +/*! + \class Core::LocatorManager + \inmodule QtCreator + \internal +*/ + LocatorManager::LocatorManager() { } diff --git a/src/plugins/coreplugin/locator/urllocatorfilter.cpp b/src/plugins/coreplugin/locator/urllocatorfilter.cpp index 153a1503fff..c567e810d76 100644 --- a/src/plugins/coreplugin/locator/urllocatorfilter.cpp +++ b/src/plugins/coreplugin/locator/urllocatorfilter.cpp @@ -119,6 +119,12 @@ void UrlFilterOptions::updateActionButtons() // -- UrlLocatorFilter +/*! + \class Core::UrlLocatorFilter + \inmodule QtCreator + \internal +*/ + UrlLocatorFilter::UrlLocatorFilter(Id id) : UrlLocatorFilter(tr("URL Template"), id) {}