forked from qt-creator/qt-creator
QmlDesigner: Add DesignDocument::projectFolder()
Change-Id: I00aaac58af0f6ce7a6e6504406745a6416663993 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -279,6 +279,15 @@ bool DesignDocument::isQtForMCUsProject() const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Utils::FilePath DesignDocument::projectFolder() const
|
||||||
|
{
|
||||||
|
ProjectExplorer::Project *currentProject = ProjectExplorer::SessionManager::projectForFile(fileName());
|
||||||
|
|
||||||
|
if (currentProject)
|
||||||
|
return currentProject->projectDirectory();
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
void DesignDocument::changeToInFileComponentModel(ComponentTextModifier *textModifer)
|
void DesignDocument::changeToInFileComponentModel(ComponentTextModifier *textModifer)
|
||||||
{
|
{
|
||||||
m_inFileComponentTextModifier.reset(textModifer);
|
m_inFileComponentTextModifier.reset(textModifer);
|
||||||
|
@@ -100,6 +100,8 @@ public:
|
|||||||
|
|
||||||
bool isQtForMCUsProject() const;
|
bool isQtForMCUsProject() const;
|
||||||
|
|
||||||
|
Utils::FilePath projectFolder() const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void displayNameChanged(const QString &newFileName);
|
void displayNameChanged(const QString &newFileName);
|
||||||
void dirtyStateChanged(bool newState);
|
void dirtyStateChanged(bool newState);
|
||||||
|
Reference in New Issue
Block a user