diff transform/TransformFactory.h @ 1865:7b6e18380e8f startup-timing

Make it possible to check whether the transforms have been populated yet
author Chris Cannam
date Wed, 03 Jun 2020 13:57:50 +0100
parents 6f626cfdba51
children
line wrap: on
line diff
--- a/transform/TransformFactory.h	Wed Jun 03 13:57:37 2020 +0100
+++ b/transform/TransformFactory.h	Wed Jun 03 13:57:50 2020 +0100
@@ -78,6 +78,13 @@
     typedef std::map<TransformId, TextMatcher::Match> SearchResults;
     SearchResults search(QString keyword);
     SearchResults search(QStringList keywords);
+
+    /**
+     * Return true if the transforms have been populated, i.e. a call
+     * to something like haveTransform() will return without having to
+     * do the work of scanning plugins
+     */
+    bool havePopulated();
     
     /**
      * Return true if the given transform is known.
@@ -191,6 +198,10 @@
     QString getStartupFailureReport() const {
         return m_errorString;
     }
+
+signals:
+    void transformsPopulated();
+    void uninstalledTransformsPopulated();
     
 protected:
     typedef std::map<TransformId, TransformDescription> TransformDescriptionMap;