author | waspe <waspe> | 2003-11-03 18:35:45 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-11-03 18:35:45 (UTC) |
commit | c0fe2d62abe68de74de6b8bf91635c1cdaf5d239 (patch) (unidiff) | |
tree | 396acfe28669ac49037fef03d39f8c0e1d038562 | |
parent | 3a7d9b9ed8f9cf9c7e3d02f9239f327b2b652b0c (diff) | |
download | opie-c0fe2d62abe68de74de6b8bf91635c1cdaf5d239.zip opie-c0fe2d62abe68de74de6b8bf91635c1cdaf5d239.tar.gz opie-c0fe2d62abe68de74de6b8bf91635c1cdaf5d239.tar.bz2 |
reolved merge conflict
-rw-r--r-- | core/pim/osearch/doclnksearch.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/pim/osearch/doclnksearch.cpp b/core/pim/osearch/doclnksearch.cpp index 3428798..ef0e482 100644 --- a/core/pim/osearch/doclnksearch.cpp +++ b/core/pim/osearch/doclnksearch.cpp | |||
@@ -43,49 +43,51 @@ DocLnkSearch::~DocLnkSearch() | |||
43 | Config cfg( "osearch", Config::User ); | 43 | Config cfg( "osearch", Config::User ); |
44 | cfg.setGroup( "doclnk_settings" ); | 44 | cfg.setGroup( "doclnk_settings" ); |
45 | cfg.writeEntry( "search_content", actionSearchInFiles->isOn() ); | 45 | cfg.writeEntry( "search_content", actionSearchInFiles->isOn() ); |
46 | } | 46 | } |
47 | 47 | ||
48 | void DocLnkSearch::load() | 48 | void DocLnkSearch::load() |
49 | { | 49 | { |
50 | _apps = new DocLnkSet(QPEApplication::documentDir()); | 50 | _apps = new DocLnkSet(QPEApplication::documentDir()); |
51 | } | 51 | } |
52 | 52 | ||
53 | bool DocLnkSearch::searchFile( AppLnk *app ) | 53 | bool DocLnkSearch::searchFile( AppLnk *app ) |
54 | { | 54 | { |
55 | if (!actionSearchInFiles->isOn()) return false; | 55 | if (!actionSearchInFiles->isOn()) return false; |
56 | DocLnk *doc = (DocLnk*)app; | 56 | DocLnk *doc = (DocLnk*)app; |
57 | bool found = false; | 57 | bool found = false; |
58 | if ( doc->type().contains( "text" ) ){ | 58 | if ( doc->type().contains( "text" ) ){ |
59 | #ifdef NEW_OWAIT | 59 | #ifdef NEW_OWAIT |
60 | QString ouput = QObject::tr("searching %1").arg(doc->file()); | 60 | QString ouput = QObject::tr("searching %1").arg(doc->file()); |
61 | OWait( output ); | 61 | OWait( output ); |
62 | #endif | 62 | #endif |
63 | QFile f(doc->file()); | 63 | QFile f(doc->file()); |
64 | if ( f.open(IO_ReadOnly) ) { | 64 | if ( f.open(IO_ReadOnly) ) { |
65 | QTextStream t( &f ); | 65 | QTextStream t( &f ); |
66 | while ( !t.eof() ) | 66 | while ( !t.eof() ) |
67 | if (_search.match( t.readLine()) != -1) { | 67 | if (_search.match( t.readLine()) != -1) { |
68 | found = true; | 68 | found = true; |
69 | break; | 69 | break; |
70 | } | 70 | } |
71 | } | 71 | } |
72 | f.close(); | 72 | f.close(); |
73 | } | 73 | } |
74 | return found; | 74 | return found; |
75 | } | 75 | } |
76 | 76 | ||
77 | void DocLnkSearch::insertItem( void *rec ) | 77 | void DocLnkSearch::insertItem( void *rec ) |
78 | { | 78 | { |
79 | (void)new DocLnkItem( this, (DocLnk*)rec ); | 79 | (void)new DocLnkItem( this, (DocLnk*)rec ); |
80 | _resultCount++; | 80 | _resultCount++; |
81 | } | 81 | } |
82 | 82 | ||
83 | 83 | ||
84 | QPopupMenu* DocLnkSearch::popupMenu() | 84 | QPopupMenu* DocLnkSearch::popupMenu() |
85 | { | 85 | { |
86 | if (!_popupMenu){ | 86 | if (!_popupMenu){ |
87 | _popupMenu = new QPopupMenu( 0 ); | 87 | _popupMenu = new QPopupMenu( 0 ); |
88 | actionSearchInFiles->addTo( _popupMenu ); | 88 | actionSearchInFiles->addTo( _popupMenu ); |
89 | } | 89 | } |
90 | return _popupMenu; | 90 | return _popupMenu; |
91 | (void) new DocLnkItem( this, (DocLnk*)rec ); | ||
92 | _resultCount++; | ||
91 | } | 93 | } |