ProjectExplorer Nodes: Replace dynamic_cast with as* functions

The OS X linker makes using dynamic_casts across shared object
boundaries fail, so do all casting in the projectexplorer library
and provide functions to do it.

Task-number: QTCREATORBUG-13864
Change-Id: I0e13c0986f8342d83c3b838ffdd2dd7b8312b13c
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-02-18 13:10:40 +01:00
parent d1e0324b22
commit 2ffd0e2d0d
10 changed files with 97 additions and 35 deletions

View File

@@ -563,7 +563,7 @@ Project *SessionManager::projectForNode(Node *node)
if (!node)
return 0;
FolderNode *rootProjectNode = dynamic_cast<FolderNode*>(node);
FolderNode *rootProjectNode = node->asFolderNode();
if (!rootProjectNode)
rootProjectNode = node->parentFolderNode();