QmlObserver: Fix 'Apply Changes on Save' on Mac

Use the generic FileInProjectFinder instead of some homebrewn
matching algorithm (which didn't handle the case that on  Mac OS X,
files are copied to the app bundle).

Reviewed-by: Christiaan Janssen
Task-number: QTCREATORBUG-3188
This commit is contained in:
Kai Koehne
2011-04-08 11:54:17 +02:00
parent 26b28804a7
commit 986c9560e9
3 changed files with 4 additions and 38 deletions

View File

@@ -310,13 +310,6 @@ void InspectorUi::connected(ClientProxy *clientProxy)
}
m_debugProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject();
if (m_debugProject->activeTarget()
&& m_debugProject->activeTarget()->activeBuildConfiguration())
{
ProjectExplorer::BuildConfiguration *bc
= m_debugProject->activeTarget()->activeBuildConfiguration();
m_debugProjectBuildDir = bc->buildDirectory();
}
connect(m_debugProject, SIGNAL(destroyed()), SLOT(currentDebugProjectRemoved()));
m_projectFinder.setProjectDirectory(m_debugProject->projectDirectory());
@@ -787,23 +780,9 @@ InspectorUi *InspectorUi::instance()
return m_instance;
}
ProjectExplorer::Project *InspectorUi::debugProject() const
QString InspectorUi::findFileInProject(const QString &originalPath) const
{
return m_debugProject;
}
bool InspectorUi::isShadowBuildProject() const
{
// for .qmlproject based stuff, build dir is empty
if (!debugProject() || debugProjectBuildDirectory().isEmpty())
return false;
return (debugProject()->projectDirectory() != debugProjectBuildDirectory());
}
QString InspectorUi::debugProjectBuildDirectory() const
{
return m_debugProjectBuildDir;
return m_projectFinder.findFile(originalPath);
}
void InspectorUi::setApplyChangesToQmlObserver(bool applyChanges)