|
|
|
@ -843,9 +843,9 @@ void LocateProtocol::helpRequest()
|
|
|
|
|
/////////////////////////////////////////////////////////////////////
|
|
|
|
|
// SEARCH STRUCTURES
|
|
|
|
|
|
|
|
|
|
LocateDirectory::LocateDirectory(LocateDirectory *tqparent, const TQString& path)
|
|
|
|
|
LocateDirectory::LocateDirectory(LocateDirectory *parent, const TQString& path)
|
|
|
|
|
{
|
|
|
|
|
m_parent = tqparent;
|
|
|
|
|
m_parent = parent;
|
|
|
|
|
m_path = path;
|
|
|
|
|
m_childs.setAutoDelete(true);
|
|
|
|
|
m_itemsCount = 0;
|
|
|
|
@ -929,20 +929,20 @@ void LocateDirectory::prepareListing(const LocateProtocol* protocol, int skip)
|
|
|
|
|
m_fullCount = countMatchingItems(protocol, newSkip);
|
|
|
|
|
|
|
|
|
|
// Collapse if directory part matches.
|
|
|
|
|
LocateDirectory* tqparent = m_parent;
|
|
|
|
|
if (tqparent == NULL) {
|
|
|
|
|
tqparent = this;
|
|
|
|
|
LocateDirectory* parent = m_parent;
|
|
|
|
|
if (parent == NULL) {
|
|
|
|
|
parent = this;
|
|
|
|
|
}
|
|
|
|
|
if (n > skip && protocol->getRegExp().isMatching(m_path.mid(skip))) {
|
|
|
|
|
// Directory part matches.
|
|
|
|
|
m_childs.clear();
|
|
|
|
|
m_items.clear();
|
|
|
|
|
m_itemsCount = 0;
|
|
|
|
|
tqparent->m_items += LocateItem(m_path, m_fullCount);
|
|
|
|
|
++tqparent->m_itemsCount;
|
|
|
|
|
parent->m_items += LocateItem(m_path, m_fullCount);
|
|
|
|
|
++parent->m_itemsCount;
|
|
|
|
|
if (m_fullCount != 0) {
|
|
|
|
|
tqparent->m_items += LocateItem(m_path, 0);
|
|
|
|
|
++tqparent->m_itemsCount;
|
|
|
|
|
parent->m_items += LocateItem(m_path, 0);
|
|
|
|
|
++parent->m_itemsCount;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -958,7 +958,7 @@ void LocateDirectory::prepareListing(const LocateProtocol* protocol, int skip)
|
|
|
|
|
++m_itemsCount;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// Propagate items to tqparent.
|
|
|
|
|
// Propagate items to parent.
|
|
|
|
|
// (only root LocateDirectory runs listItems)
|
|
|
|
|
if (m_parent != NULL) {
|
|
|
|
|
m_parent->m_items += m_items;
|
|
|
|
|