Diffstat (limited to 'noncore/graphics/opie-eye/impl/doc/doc_lister.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/impl/doc/doc_lister.cpp | 11 |
1 files changed, 7 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 | |||
@@ -38,6 +38,7 @@ Doc_DirLister::Doc_DirLister() | |||
38 | 38 | ||
39 | m_namemap.clear(); | 39 | m_namemap.clear(); |
40 | m_filemap.clear(); | 40 | m_filemap.clear(); |
41 | m_docreads = false; | ||
41 | } | 42 | } |
42 | 43 | ||
43 | QString Doc_DirLister::defaultPath()const { | 44 | QString Doc_DirLister::defaultPath()const { |
@@ -56,11 +57,13 @@ bool Doc_DirLister::matchCat(const AppLnk* app) | |||
56 | QString Doc_DirLister::setStartPath(const QString&) { | 57 | QString Doc_DirLister::setStartPath(const QString&) { |
57 | static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png"); | 58 | static const QString Mtype_str("image/jpeg;image/gif;image/bmp;image/png"); |
58 | if (m_namemap.isEmpty()) { | 59 | if (m_namemap.isEmpty()) { |
59 | DocLnkSet ds; | 60 | if (!m_docreads) { |
60 | Global::findDocuments(&ds,Mtype_str); | 61 | Global::findDocuments(&m_ds,Mtype_str); |
61 | QListIterator<DocLnk> dit(ds.children()); | 62 | m_docreads = true; |
63 | } | ||
64 | QListIterator<DocLnk> dit(m_ds.children()); | ||
62 | for( ; dit.current(); ++dit) { | 65 | for( ; dit.current(); ++dit) { |
63 | if (! (*dit)->isValid()) continue; | 66 | // if (! (*dit)->isValid()) continue; |
64 | if (!matchCat((*dit))) continue; | 67 | if (!matchCat((*dit))) continue; |
65 | m_namemap[(*dit)->name()]=(*dit)->file(); | 68 | m_namemap[(*dit)->name()]=(*dit)->file(); |
66 | m_filemap[(*dit)->file()]=(*dit)->name(); | 69 | m_filemap[(*dit)->file()]=(*dit)->name(); |