forked from qt-creator/qt-creator
QmlPreview: add stopAllPreviews()
Change-Id: I092361063d7f51602c2044e00feb8d8c5bccf4de Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -237,6 +237,12 @@ QmlPreviewRunControlList QmlPreviewPlugin::runningPreviews() const
|
||||
return d->m_runningPreviews;
|
||||
}
|
||||
|
||||
void QmlPreviewPlugin::stopAllPreviews()
|
||||
{
|
||||
for (auto &runningPreview : d->m_runningPreviews)
|
||||
runningPreview->initiateStop();
|
||||
}
|
||||
|
||||
QmlPreviewFileLoader QmlPreviewPlugin::fileLoader() const
|
||||
{
|
||||
return d->m_settings.fileLoader;
|
||||
|
@@ -54,6 +54,7 @@ public:
|
||||
QString previewedFile() const;
|
||||
void setPreviewedFile(const QString &previewedFile);
|
||||
QmlPreviewRunControlList runningPreviews() const;
|
||||
void stopAllPreviews();
|
||||
|
||||
void setFileLoader(QmlPreviewFileLoader fileLoader);
|
||||
QmlPreviewFileLoader fileLoader() const;
|
||||
|
Reference in New Issue
Block a user