aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/help/index.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2008-09-26 11:52:12 +0000
committerGravatar Fabio Bas2008-09-26 11:52:12 +0000
commit2299e240fd82e6d9724aff7dc6e0a4f43602c7d4 (patch)
tree75fd798dae366309a6f5ad81110ae589584ec813 /src/modules/help/index.cpp
parentWin VS projects cleanup. (diff)
downloadKVIrc-2299e240fd82e6d9724aff7dc6e0a4f43602c7d4.tar.gz
KVIrc-2299e240fd82e6d9724aff7dc6e0a4f43602c7d4.tar.bz2
KVIrc-2299e240fd82e6d9724aff7dc6e0a4f43602c7d4.zip
finished help module; still a small problem on window focus after search indexing
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2576 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/help/index.cpp')
-rw-r--r--src/modules/help/index.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/modules/help/index.cpp b/src/modules/help/index.cpp
index a9a028876..d65639e3f 100644
--- a/src/modules/help/index.cpp
+++ b/src/modules/help/index.cpp
@@ -29,6 +29,7 @@
#include "kvi_file.h"
#include "kvi_qstring.h"
#include "kvi_pointerhashtable.h"
+#include "kvi_locale.h"
#include <ctype.h>
@@ -36,6 +37,7 @@
#include <QStringList>
#include <QApplication>
#include <QTextStream>
+#include <QProgressDialog>
int kvi_compare(const Term * p1,const Term * p2)
{
@@ -96,17 +98,18 @@ int Index::makeIndex()
if ( docList.isEmpty() ) return 1;
dict.clear();
QStringList::Iterator it = docList.begin();
- int steps = docList.count() / 100;
- if ( !steps ) steps++;
- int prog = 0;
+
+// QProgressDialog* pProgressDialog = new QProgressDialog( __tr2qs("Indexing help files"), __tr2qs("Cancel"), 0, docList.count() );
+// pProgressDialog->setWindowTitle(__tr2qs("KVIrc"));
+// pProgressDialog->setMinimumDuration(500);
+// pProgressDialog->setWindowModality(Qt::WindowModal);
for ( int i = 0; it != docList.end(); ++it, ++i ) {
- if ( lastWindowClosed ) return -1;
+// if (lastWindowClosed ||pProgressDialog->wasCanceled())
+// break;
parseDocument( *it, i );
- if ( i%steps == 0 ) {
- prog++;
- emit indexingProgress( prog );
- }
+// pProgressDialog->setValue(i);
}
+// delete pProgressDialog;
return 0;
}