diff --git a/README.md b/README.md index 08aea07..de64e07 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Currently Zeal requires Qt 5.0. To compile it, run `qmake` and `make` in the `ze After compiling it you need to download docsets and put them in `$HOME/.local/share/zeal/docsets/` -- after creating the directory first. Currently there are docsets available from Qt 5 and Python 2.7.3, generated using scripts from `gendoctests` directory, but for convenience can be downloaded from Dropbox: - * [Qt5.tar.bz2](https://www.dropbox.com/s/o8uy2iz0wivs04j/Qt5.tar.bz2) (55M) + * [Qt5.tar.bz2](https://www.dropbox.com/s/qnpjfphph2z1yqw/Qt5.tar.bz2) (55M) * [python-2.7.3-docs-html.tar.bz2](https://www.dropbox.com/s/2xehy4d2umwg574/python-2.7.3-docs-html.tar.bz2) (4.3M) Do `tar -jxvf file.tar.bz2` in docsets directory to enable given docset. diff --git a/gendocsets/qt5/crawl.py b/gendocsets/qt5/crawl.py index fe55d7e..5e257ba 100644 --- a/gendocsets/qt5/crawl.py +++ b/gendocsets/qt5/crawl.py @@ -16,6 +16,7 @@ for tbl in tree.xpath('//table[@class="generic"]'): a = tr.find('td').find('a') c.execute('INSERT INTO things(type, name, path) values("module", ?, ?)', (a.text, a.attrib['href'].replace('../', ''))) + def parseClass(class_id, path): tree = parse(path) basepath = path.split('/')[0] @@ -31,5 +32,16 @@ for cls in tree.xpath('//dd'): c.execute('INSERT INTO things(type, name, path) values("class", ?, ?)', (a.text, url)) parseClass(c.lastrowid, url) + +# global functions: +tree = parse('qtdoc/functions.html') +for fun in tree.xpath('//li'): + if fun.find('a') is None: continue + if fun.find('a').text == 'global': + url = fun.find('a').attrib['href'].replace('../', '') + c.execute('INSERT INTO things(type, name, path) values("function", ?, ?)', + (fun.text.strip(': '), url)) + + conn.commit() conn.close() diff --git a/zeal/zealsearchedit.cpp b/zeal/zealsearchedit.cpp index a1f9632..d3b4d04 100644 --- a/zeal/zealsearchedit.cpp +++ b/zeal/zealsearchedit.cpp @@ -19,7 +19,8 @@ bool ZealSearchEdit::eventFilter(QObject *obj, QEvent *ev) if(obj == this && ev->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast(ev); if(keyEvent->key() == Qt::Key_Down || keyEvent->key() == Qt::Key_Up || - keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return) { + keyEvent->key() == Qt::Key_Enter || keyEvent->key() == Qt::Key_Return || + keyEvent->key() == Qt::Key_PageUp || keyEvent->key() == Qt::Key_PageDown) { QCoreApplication::instance()->sendEvent(treeView, keyEvent); return true; }