QmlDesigner: use current file to start preview

- Maybe we need a check if it is a qml file.

Task-number: QDS-1299
Change-Id: I2b54514f311fb78d3508e588783c0d04c7a7bc0b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tim Jenssen
2019-12-10 16:25:41 +01:00
parent 266c808117
commit fb171ebc5b
4 changed files with 37 additions and 5 deletions

View File

@@ -46,6 +46,7 @@ class QmlBuildSystem;
class QMLPROJECTMANAGER_EXPORT QmlMainFileAspect : public ProjectExplorer::ProjectConfigurationAspect
{
Q_OBJECT
public:
explicit QmlMainFileAspect(ProjectExplorer::Target *target);
~QmlMainFileAspect() override;
@@ -67,6 +68,7 @@ public:
void setScriptSource(MainScriptSource source, const QString &settingsPath = QString());
QString mainScript() const;
QString currentFile() const;
void changeCurrentFile(Core::IEditor *editor = nullptr);
bool isQmlFilePresent();
QmlBuildSystem *qmlBuildSystem() const;