Completely rework currentNode/currentProject handling

Centralize the handling inside a new class ProjectTree.
React to moving focus and remove most special handling.

This properly fixes the linked task.

Task-number: QTCREATORBUG-13357
Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Daniel Teske
2014-11-19 17:58:33 +01:00
parent 042ef1aec0
commit 4943510b60
43 changed files with 744 additions and 470 deletions

View File

@@ -772,10 +772,6 @@ void QmakePriFileNode::update(const Internal::PriFileEvalResult &result)
}
contents.updateSubFolders(this);
if (!m_setCurrentNodeDelayed.isEmpty()) {
ProjectExplorer::ProjectExplorerPlugin::setCurrentFile(m_project, m_setCurrentNodeDelayed);
m_setCurrentNodeDelayed.clear();
}
}
void QmakePriFileNode::watchFolders(const QSet<QString> &folders)
@@ -1107,8 +1103,6 @@ bool QmakePriFileNode::renameFile(const QString &filePath, const QString &newFil
if (newFilePath.isEmpty())
return false;
m_setCurrentNodeDelayed = newFilePath;
bool changeProFileOptional = deploysFolder(QFileInfo(filePath).absolutePath());
const Core::MimeType mt = Core::MimeDatabase::findByFile(newFilePath);
QStringList dummy;