summaryrefslogtreecommitdiff
authoralwin <alwin>2004-11-11 00:52:25 (UTC)
committer alwin <alwin>2004-11-11 00:52:25 (UTC)
commit75c24d504700b1810c94c970e40de953bc3a4779 (patch) (side-by-side diff)
treec55dc293a72e4f9079c8f8f1cf987f1363a751d1
parent79060b829e9231cddc0acfe2dd2b7da3f13dfbc4 (diff)
downloadopie-75c24d504700b1810c94c970e40de953bc3a4779.zip
opie-75c24d504700b1810c94c970e40de953bc3a4779.tar.gz
opie-75c24d504700b1810c94c970e40de953bc3a4779.tar.bz2
speed up cat selection
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.cpp11
-rw-r--r--noncore/graphics/opie-eye/impl/doc/doc_lister.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
index d60149f..e43baed 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.cpp
@@ -40,2 +40,3 @@ Doc_DirLister::Doc_DirLister()
m_filemap.clear();
+ m_docreads = false;
}
@@ -58,7 +59,9 @@ QString Doc_DirLister::setStartPath(const QString&) {
if (m_namemap.isEmpty()) {
- DocLnkSet ds;
- Global::findDocuments(&ds,Mtype_str);
- QListIterator<DocLnk> dit(ds.children());
+ if (!m_docreads) {
+ Global::findDocuments(&m_ds,Mtype_str);
+ m_docreads = true;
+ }
+ QListIterator<DocLnk> dit(m_ds.children());
for( ; dit.current(); ++dit) {
- if (! (*dit)->isValid()) continue;
+// if (! (*dit)->isValid()) continue;
if (!matchCat((*dit))) continue;
diff --git a/noncore/graphics/opie-eye/impl/doc/doc_lister.h b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
index e148ac0..403241c 100644
--- a/noncore/graphics/opie-eye/impl/doc/doc_lister.h
+++ b/noncore/graphics/opie-eye/impl/doc/doc_lister.h
@@ -9,2 +9,4 @@
+#include <qpe/applnk.h>
+
#include <qstring.h>
@@ -40,2 +42,4 @@ private:
bool matchCat(const AppLnk* app);
+ bool m_docreads;
+ DocLnkSet m_ds;