diff options
| author | hjk <[email protected]> | 2024-02-07 16:13:22 +0100 |
|---|---|---|
| committer | hjk <[email protected]> | 2024-02-09 16:00:56 +0000 |
| commit | 0b44cc5589a0fb94271131bfa2cddfc61b58bced (patch) | |
| tree | fa0df0613a69af8e6ac4c40053efb1d2e215c0a9 /src/plugins/fossil/fossilplugin.cpp | |
| parent | 5a643b1c0a33daf8bac64e3c7688af8b80956dd4 (diff) | |
Vcs: Hide topic cache in new IVersionControl pimpl
Potentially more stable api long-term. Also simplifies the
user side code a bit.
Change-Id: I6913e27e2a5dc14907e72f252081cdbed34842a3
Reviewed-by: Orgad Shaneh <[email protected]>
Reviewed-by: <[email protected]>
Diffstat (limited to 'src/plugins/fossil/fossilplugin.cpp')
| -rw-r--r-- | src/plugins/fossil/fossilplugin.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/src/plugins/fossil/fossilplugin.cpp b/src/plugins/fossil/fossilplugin.cpp index b09ffda013b..25fcdfa923a 100644 --- a/src/plugins/fossil/fossilplugin.cpp +++ b/src/plugins/fossil/fossilplugin.cpp @@ -61,23 +61,6 @@ using namespace std::placeholders; namespace Fossil::Internal { -class FossilTopicCache final : public IVersionControl::TopicCache -{ -public: - FossilTopicCache() = default; - -protected: - FilePath trackFile(const FilePath &repository) final - { - return repository.pathAppended(Constants::FOSSILREPO); - } - - QString refreshTopic(const FilePath &repository) final - { - return fossilClient().synchronousTopic(repository); - } -}; - class FossilPluginPrivate final : public VersionControlBase { public: @@ -222,7 +205,13 @@ FossilPluginPrivate::FossilPluginPrivate() { Context context(Constants::FOSSIL_CONTEXT); - setTopicCache(new FossilTopicCache); + setTopicFileTracker([](const FilePath &repository) { + return repository.pathAppended(Constants::FOSSILREPO); + }); + setTopicRefresher([](const FilePath &repository) { + return fossilClient().synchronousTopic(repository); + }); + connect(&fossilClient(), &VcsBaseClient::changed, this, &FossilPluginPrivate::changed); m_commandLocator = new CommandLocator("Fossil", "fossil", "fossil", this); |
