forked from qt-creator/qt-creator
Allow plugins to register additional example sets
Change-Id: Icfa2a8093a5cffd86dc029fd1b06117f599203ab Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -25,10 +25,11 @@
|
||||
|
||||
#include "qtversionmanager.h"
|
||||
|
||||
#include "qtkitinformation.h"
|
||||
#include "qtversionfactory.h"
|
||||
#include "baseqtversion.h"
|
||||
#include "exampleslistmodel.h"
|
||||
#include "qtkitinformation.h"
|
||||
#include "qtsupportconstants.h"
|
||||
#include "qtversionfactory.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
@@ -77,6 +78,7 @@ static QtVersionManager *m_instance = nullptr;
|
||||
static FileSystemWatcher *m_configFileWatcher = nullptr;
|
||||
static QTimer *m_fileWatcherTimer = nullptr;
|
||||
static PersistentSettingsWriter *m_writer = nullptr;
|
||||
static QVector<ExampleSetModel::ExtraExampleSet> m_pluginRegisteredExampleSets;
|
||||
|
||||
static Q_LOGGING_CATEGORY(log, "qtc.qt.versions", QtWarningMsg);
|
||||
|
||||
@@ -100,6 +102,11 @@ static bool restoreQtVersions();
|
||||
static void findSystemQt();
|
||||
static void saveQtVersions();
|
||||
|
||||
QVector<ExampleSetModel::ExtraExampleSet> ExampleSetModel::pluginRegisteredExampleSets()
|
||||
{
|
||||
return m_pluginRegisteredExampleSets;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// QtVersionManager
|
||||
// --------------------------------------------------------------------------
|
||||
@@ -471,6 +478,13 @@ void QtVersionManager::removeVersion(BaseQtVersion *version)
|
||||
delete version;
|
||||
}
|
||||
|
||||
void QtVersionManager::registerExampleSet(const QString &displayName,
|
||||
const QString &manifestPath,
|
||||
const QString &examplesPath)
|
||||
{
|
||||
m_pluginRegisteredExampleSets.append({displayName, manifestPath, examplesPath});
|
||||
}
|
||||
|
||||
using Path = QString;
|
||||
using FileName = QString;
|
||||
static QList<std::pair<Path, FileName>> documentationFiles(BaseQtVersion *v)
|
||||
|
||||
Reference in New Issue
Block a user