Show pro file's subdirectory structure in project tree in non-simple mode.

Also adding category folders for the different file types
(source files, header files, resource files, form files, other files).
This commit is contained in:
con
2009-08-17 17:59:57 +02:00
parent f888f5df2d
commit 7ebea974d6
46 changed files with 329 additions and 49 deletions

View File

@@ -153,7 +153,11 @@ FolderNode::FolderNode(const QString &folderPath)
: Node(FolderNodeType, folderPath),
m_folderName(folderPath)
{
m_icon = QApplication::style()->standardIcon(QStyle::SP_DirIcon);
static QIcon dirIcon;
if (dirIcon.isNull()) {
dirIcon = QApplication::style()->standardIcon(QStyle::SP_DirIcon);
}
m_icon = dirIcon;
}
FolderNode::~FolderNode()
@@ -549,8 +553,13 @@ void ProjectNode::watcherDestroyed(QObject *watcher)
/*!
Sort pointers to FileNodes
*/
bool ProjectNode::sortNodesByPath(Node *f1, Node *f2) {
return f1->path() < f2->path();
bool ProjectNode::sortNodesByPath(Node *n1, Node *n2) {
return n1->path() < n2->path();
}
bool ProjectNode::sortFolderNodesByName(FolderNode *f1, FolderNode *f2)
{
return f1->name() < f2->name();
}
/*!