forked from qt-creator/qt-creator
GenericProjectManager: Fix crash updating deployment data
Fixes: QTCREATORBUG-23501 Change-Id: Ia36fe567edf26c293a8db2446d1ee2344b96433e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -546,10 +546,12 @@ void GenericProject::updateDeploymentData()
|
|||||||
hasDeploymentData = QFileInfo::exists(deploymentFilePath.toString());
|
hasDeploymentData = QFileInfo::exists(deploymentFilePath.toString());
|
||||||
}
|
}
|
||||||
if (hasDeploymentData) {
|
if (hasDeploymentData) {
|
||||||
|
if (activeTarget()) {
|
||||||
DeploymentData deploymentData;
|
DeploymentData deploymentData;
|
||||||
deploymentData.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
deploymentData.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
||||||
projectDirectory().toString());
|
projectDirectory().toString());
|
||||||
activeTarget()->setDeploymentData(deploymentData);
|
activeTarget()->setDeploymentData(deploymentData);
|
||||||
|
}
|
||||||
if (m_deployFileWatcher->files() != QStringList(deploymentFilePath.toString())) {
|
if (m_deployFileWatcher->files() != QStringList(deploymentFilePath.toString())) {
|
||||||
m_deployFileWatcher->removeFiles(m_deployFileWatcher->files());
|
m_deployFileWatcher->removeFiles(m_deployFileWatcher->files());
|
||||||
m_deployFileWatcher->addFile(deploymentFilePath.toString(),
|
m_deployFileWatcher->addFile(deploymentFilePath.toString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user