summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/syncqt3
-rw-r--r--dist/changes-4.7.0122
-rw-r--r--doc/src/deployment/deployment.qdoc11
-rw-r--r--doc/src/getting-started/demos.qdoc2
-rw-r--r--doc/src/index.qdoc2
-rw-r--r--doc/src/modules.qdoc154
-rw-r--r--examples/assistant/README38
-rw-r--r--examples/assistant/assistant.pro10
-rw-r--r--examples/assistant/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/assistant/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/assistant/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/assistant/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/browse.pngbin21553 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.pngbin9589 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/filedialog.pngbin12318 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/handbook.pngbin1060 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/mainwindow.pngbin12769 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/open.pngbin11697 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/wildcard.pngbin11266 -> 0 bytes
-rw-r--r--examples/assistant/simpletextviewer/documentation/index.html41
-rw-r--r--examples/assistant/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/assistant/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/assistant/simpletextviewer/documentation/simpletextviewer.adp40
-rw-r--r--examples/assistant/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp221
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp154
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h91
-rw-r--r--examples/assistant/simpletextviewer/simpletextviewer.pro18
-rw-r--r--examples/examples.pro6
-rw-r--r--examples/webkit/fancybrowser/main.cpp7
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp28
-rw-r--r--examples/webkit/fancybrowser/mainwindow.h5
-rw-r--r--mkspecs/features/assistant.prf9
-rw-r--r--qmake/generators/unix/unixmake.cpp1
-rw-r--r--qmake/option.cpp36
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/io/qdatastream.cpp231
-rw-r--r--src/corelib/io/qdatastream.h7
-rw-r--r--src/corelib/tools/qstring.cpp3
-rw-r--r--src/gui/kernel/qapplication.cpp8
-rw-r--r--src/gui/styles/qcommonstyle.cpp8
-rw-r--r--src/plugins/qpluginbase.pri2
-rw-r--r--src/qbase.pri2
-rw-r--r--tests/arthur/lance/widgets.h7
-rw-r--r--tests/auto/networkdata/README1
-rw-r--r--tests/auto/qeasingcurve/tst_qeasingcurve.cpp139
-rw-r--r--tests/auto/selftests/expected_cmptest.txt2
-rw-r--r--tests/auto/selftests/expected_crashes_3.txt2
-rw-r--r--tests/auto/selftests/expected_longstring.txt2
-rw-r--r--tests/auto/selftests/expected_maxwarnings.txt2
-rw-r--r--tests/auto/selftests/expected_skip.txt2
-rw-r--r--tests/auto/symbols/tst_symbols.cpp1
-rw-r--r--tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp2
-rw-r--r--tools/assistant/assistant.pro4
-rw-r--r--tools/assistant/compat/Info_mac.plist18
-rw-r--r--tools/assistant/compat/assistant.icnsbin162568 -> 0 bytes
-rw-r--r--tools/assistant/compat/assistant.icobin355574 -> 0 bytes
-rw-r--r--tools/assistant/compat/assistant.pro84
-rw-r--r--tools/assistant/compat/assistant.qrc37
-rw-r--r--tools/assistant/compat/assistant.rc1
-rw-r--r--tools/assistant/compat/compat.pro84
-rw-r--r--tools/assistant/compat/config.cpp438
-rw-r--r--tools/assistant/compat/config.h165
-rw-r--r--tools/assistant/compat/docuparser.cpp433
-rw-r--r--tools/assistant/compat/docuparser.h166
-rw-r--r--tools/assistant/compat/fontsettingsdialog.cpp137
-rw-r--r--tools/assistant/compat/helpdialog.cpp1331
-rw-r--r--tools/assistant/compat/helpdialog.h184
-rw-r--r--tools/assistant/compat/helpdialog.ui404
-rw-r--r--tools/assistant/compat/helpwindow.cpp247
-rw-r--r--tools/assistant/compat/helpwindow.h100
-rw-r--r--tools/assistant/compat/images/assistant-128.pngbin6448 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/assistant.pngbin2034 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/close.pngbin406 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/designer.pngbin1282 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/linguist.pngbin1382 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/addtab.pngbin469 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/book.pngbin1477 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/closetab.pngbin516 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/editcopy.pngbin1468 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/find.pngbin1836 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/home.pngbin1807 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/next.pngbin1310 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/prev.pngbin1080 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/print.pngbin2087 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/synctoc.pngbin1838 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/whatsthis.pngbin1586 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/zoomin.pngbin1696 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/mac/zoomout.pngbin1662 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/qt.pngbin1422 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/addtab.pngbin314 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/book.pngbin1109 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/closetab.pngbin375 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/editcopy.pngbin1325 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/find.pngbin1944 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/home.pngbin1414 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/next.pngbin1038 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/previous.pngbin898 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/print.pngbin1456 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/synctoc.pngbin1235 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/whatsthis.pngbin1040 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/zoomin.pngbin1208 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/win/zoomout.pngbin1226 -> 0 bytes
-rw-r--r--tools/assistant/compat/images/wrap.pngbin500 -> 0 bytes
-rw-r--r--tools/assistant/compat/index.cpp581
-rw-r--r--tools/assistant/compat/index.h133
-rw-r--r--tools/assistant/compat/lib/lib.pro78
-rw-r--r--tools/assistant/compat/lib/qassistantclient.cpp446
-rw-r--r--tools/assistant/compat/lib/qassistantclient.h100
-rw-r--r--tools/assistant/compat/main.cpp465
-rw-r--r--tools/assistant/compat/mainwindow.cpp885
-rw-r--r--tools/assistant/compat/mainwindow.h137
-rw-r--r--tools/assistant/compat/mainwindow.ui457
-rw-r--r--tools/assistant/compat/profile.cpp196
-rw-r--r--tools/assistant/compat/profile.h95
-rw-r--r--tools/assistant/compat/tabbedbrowser.cpp530
-rw-r--r--tools/assistant/compat/tabbedbrowser.h122
-rw-r--r--tools/assistant/compat/tabbedbrowser.ui233
-rw-r--r--tools/assistant/compat/topicchooser.cpp101
-rw-r--r--tools/assistant/compat/topicchooser.h77
-rw-r--r--tools/assistant/compat/topicchooser.ui162
-rw-r--r--tools/assistant/lib/lib.pro5
-rw-r--r--tools/assistant/lib/qclucenefieldnames.cpp (renamed from tools/assistant/compat/lib/qassistantclient_global.h)32
-rw-r--r--tools/assistant/lib/qclucenefieldnames_p.h (renamed from examples/assistant/simpletextviewer/main.cpp)33
-rw-r--r--tools/assistant/lib/qhelp_global.cpp14
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler.cpp4
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp5
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp419
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene_p.h45
-rw-r--r--tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp20
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp39
-rw-r--r--tools/assistant/tools/assistant/assistant.pro6
-rw-r--r--tools/assistant/tools/assistant/assistant.qchbin364544 -> 364544 bytes
-rw-r--r--tools/assistant/tools/assistant/assistant_images.qrc1
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp37
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.h2
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp13
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdocconf2
-rw-r--r--tools/assistant/tools/assistant/images/bookmark.pngbin0 -> 1266 bytes
-rw-r--r--tools/assistant/tools/assistant/main.cpp4
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp57
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h5
-rw-r--r--tools/assistant/tools/assistant/xbelsupport.cpp234
-rw-r--r--tools/assistant/tools/assistant/xbelsupport.h (renamed from tools/assistant/compat/fontsettingsdialog.h)56
-rw-r--r--tools/assistant/tools/qcollectiongenerator/main.cpp20
-rw-r--r--tools/assistant/translations/translations_adp.pro41
-rw-r--r--tools/porting/src/q3porting.xml4
-rw-r--r--tools/qdoc3/cppcodemarker.cpp4
-rw-r--r--tools/qdoc3/test/assistant.qdocconf6
-rw-r--r--tools/qdoc3/test/designer.qdocconf6
-rw-r--r--tools/qdoc3/test/linguist.qdocconf6
-rw-r--r--tools/qdoc3/test/qmake.qdocconf6
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf18
-rw-r--r--tools/qdoc3/test/qt.qdocconf16
-rw-r--r--translations/assistant_adp_de.ts973
-rw-r--r--translations/assistant_adp_ja.ts1047
-rw-r--r--translations/assistant_adp_pl.ts974
-rw-r--r--translations/assistant_adp_ru.ts977
-rw-r--r--translations/assistant_adp_zh_CN.ts999
-rw-r--r--translations/assistant_adp_zh_TW.ts1000
-rw-r--r--translations/translations.pri9
162 files changed, 1205 insertions, 16332 deletions
diff --git a/bin/syncqt b/bin/syncqt
index a14a82d..8bb4bb9 100755
--- a/bin/syncqt
+++ b/bin/syncqt
@@ -37,7 +37,6 @@ my %modules = ( # path to module name map
"Qt3Support" => "$basedir/src/qt3support",
"ActiveQt" => "$basedir/src/activeqt/container;$basedir/src/activeqt/control;$basedir/src/activeqt/shared",
"QtTest" => "$basedir/src/testlib",
- "QtAssistant" => "$basedir/tools/assistant/compat/lib",
"QtHelp" => "$basedir/tools/assistant/lib",
"QtDesigner" => "$basedir/tools/designer/src/lib",
"QtUiTools" => "$basedir/tools/designer/src/uitools",
@@ -654,7 +653,7 @@ my @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" );
my @ignore_for_include_check = ( "qatomic.h" );
my @ignore_for_qt_begin_header_check = ( "qiconset.h", "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qt_windows.h" );
my @ignore_for_qt_begin_namespace_check = ( "qconfig.h", "qconfig-dist.h", "qconfig-large.h", "qconfig-medium.h", "qconfig-minimal.h", "qconfig-small.h", "qfeatures.h", "qatomic_arch.h", "qatomic_windowsce.h", "qt_windows.h", "qatomic_macosx.h" );
-my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtAssistant}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
+my @ignore_for_qt_module_check = ( "$modules{QtCore}/arch", "$modules{QtCore}/global", "$modules{QtSql}/drivers", "$modules{QtTest}", "$modules{QtDesigner}", "$modules{QtUiTools}", "$modules{QtDBus}", "$modules{phonon}" );
foreach (@modules_to_sync) {
#iteration info
diff --git a/dist/changes-4.7.0 b/dist/changes-4.7.0
new file mode 100644
index 0000000..92f5244
--- /dev/null
+++ b/dist/changes-4.7.0
@@ -0,0 +1,122 @@
+Qt 4.7 introduces many new features and improvements as well as bugfixes
+over the 4.6.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+ http://doc.trolltech.com/4.7
+
+The Qt version 4.7 series is binary compatible with the 4.6.x series.
+Applications compiled for 4.6 will continue to run with 4.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Task Tracker:
+
+ http://www.qtsoftware.com/developer/task-tracker
+
+Each of these identifiers can be entered in the task tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* General *
+****************************************************************************
+
+General Improvements
+--------------------
+
+- Documentation and Examples
+
+Third party components
+----------------------
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+
+****************************************************************************
+* Database Drivers *
+****************************************************************************
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Linux/X11
+----------------
+
+
+Qt for Windows
+--------------
+
+
+Qt for Mac OS X
+---------------
+
+
+Qt for Embedded Linux
+---------------------
+
+
+Qt for Windows CE
+-----------------
+
+
+****************************************************************************
+* Compiler Specific Changes *
+****************************************************************************
+
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+- Build System
+
+- Assistant
+
+
+- Designer
+
+
+- Linguist
+ - Linguist GUI
+
+ - lupdate
+
+ - lrelease
+
+
+- rcc
+
+
+- moc
+
+
+- uic
+
+
+- uic3
+
+
+- qmake
+
+
+- configure
+
+
+- qtconfig
+
+
+- qt3to4
+
+
+****************************************************************************
+* Plugins *
+****************************************************************************
+
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index b5b1b9c..e0366bf 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -87,29 +87,30 @@
\header
\o {4,1} Qt's Libraries
\row
- \o \l {QtAssistant}
\o \l {QAxContainer}
\o \l {QAxServer}
\o \l {QtCore}
- \row
\o \l {QtDBus}
+ \row
\o \l {QtDesigner}
\o \l {QtGui}
\o \l {QtHelp}
- \row
\o \l {QtNetwork}
+ \row
\o \l {QtOpenGL}
\o \l {QtScript}
\o \l {QtScriptTools}
- \row
\o \l {QtSql}
+ \row
\o \l {QtSvg}
\o \l {QtWebKit}
\o \l {QtXml}
- \row
\o \l {QtXmlPatterns}
+ \row
\o \l {Phonon Module}{Phonon}
\o \l {Qt3Support}
+ \o \l {}
+ \o \l {}
\endtable
Since Qt is not a system library, it has to be redistributed along
diff --git a/doc/src/getting-started/demos.qdoc b/doc/src/getting-started/demos.qdoc
index 8f2829a..4527c2b 100644
--- a/doc/src/getting-started/demos.qdoc
+++ b/doc/src/getting-started/demos.qdoc
@@ -46,7 +46,7 @@
\previouspage Qt Examples
\contentspage How to Learn Qt
- \nextpage What's New in Qt 4.6
+ \nextpage What's New in Qt 4.7
This is the list of demonstrations in Qt's \c demos directory.
These are larger and more complicated programs than the
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index f376af2..5a1010e 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -60,7 +60,7 @@
<ul>
<li><a href="installation.html">Installation</a> and <a href="how-to-learn-qt.html">First Steps with Qt</a></li>
<li><a href="tutorials.html">Tutorials</a> and <a href="examples.html">Examples</a></li>
- <li><a href="demos.html">Demonstrations</a> and <a href="qt4-6-intro.html"><b>New in Qt 4.6</b></a></li>
+ <li><a href="demos.html">Demonstrations</a> and <a href="qt4-7-intro.html"><b>New in Qt 4.7</b></a></li>
</ul>
</td>
<td valign="top">
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 3abcf7c..457d8da 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -289,33 +289,33 @@
*/
/*!
- \module QtScript
- \title QtScript Module
- \since 4.3
- \contentspage All Qt Modules
- \previouspage QtOpenVG
- \nextpage QtScriptTools
- \ingroup modules
+ \module QtScript
+ \title QtScript Module
+ \since 4.3
+ \contentspage All Qt Modules
+ \previouspage QtOpenVG
+ \nextpage QtScriptTools
+ \ingroup modules
- \brief The QtScript module provides classes for making Qt applications scriptable.
+ \brief The QtScript module provides classes for making Qt applications scriptable.
- The QtScript module only provides core scripting facilities; the
- QtScriptTools module provides additional Qt Script-related
- components that application developers may find useful.
+ The QtScript module only provides core scripting facilities; the
+ QtScriptTools module provides additional Qt Script-related
+ components that application developers may find useful.
- \tableofcontents
+ \tableofcontents
- To include the definitions of the module's classes, use the
- following directive:
+ To include the definitions of the module's classes, use the
+ following directive:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
- To link against the module, add this line to your \l qmake \c .pro file:
+ To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
- The QtScript module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
+ The QtScript module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
*/
/*!
@@ -374,59 +374,59 @@
*/
/*!
- \module QtSvg
- \title QtSvg Module
- \since 4.1
- \contentspage All Qt Modules
- \previouspage QtSql
- \nextpage QtWebKit
- \ingroup modules
-
- \brief The QtSvg module provides classes for displaying the contents of SVG
- files.
-
- To include the definitions of the module's classes, use the
- following directive:
-
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
-
- To link against the module, add this line to your \l qmake \c
- .pro file:
-
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
-
- The QtSvg module is part of the \l{Qt Full Framework Edition} and the
- \l{Open Source Versions of Qt}.
-
- \section1 License Information
-
- Some code for arc handling in this module is derived from code with
- the following license:
-
- \legalese
- Copyright 2002 USC/Information Sciences Institute
-
- Permission to use, copy, modify, distribute, and sell this software
- and its documentation for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in all copies
- and that both that copyright notice and this permission notice
- appear in supporting documentation, and that the name of
- Information Sciences Institute not be used in advertising or
- publicity pertaining to distribution of the software without
- specific, written prior permission. Information Sciences Institute
- makes no representations about the suitability of this software for
- any purpose. It is provided "as is" without express or implied
- warranty.
-
- INFORMATION SCIENCES INSTITUTE DISCLAIMS ALL WARRANTIES WITH REGARD
- TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
- MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL INFORMATION SCIENCES
- INSTITUTE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
- OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
- \endlegalese
+ \module QtSvg
+ \title QtSvg Module
+ \since 4.1
+ \contentspage All Qt Modules
+ \previouspage QtSql
+ \nextpage QtWebKit
+ \ingroup modules
+
+ \brief The QtSvg module provides classes for displaying the contents of SVG
+ files.
+
+ To include the definitions of the module's classes, use the
+ following directive:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
+
+ To link against the module, add this line to your \l qmake \c
+ .pro file:
+
+ \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
+
+ The QtSvg module is part of the \l{Qt Full Framework Edition} and the
+ \l{Open Source Versions of Qt}.
+
+ \section1 License Information
+
+ Some code for arc handling in this module is derived from code with
+ the following license:
+
+ \legalese
+ Copyright 2002 USC/Information Sciences Institute
+
+ Permission to use, copy, modify, distribute, and sell this software
+ and its documentation for any purpose is hereby granted without
+ fee, provided that the above copyright notice appear in all copies
+ and that both that copyright notice and this permission notice
+ appear in supporting documentation, and that the name of
+ Information Sciences Institute not be used in advertising or
+ publicity pertaining to distribution of the software without
+ specific, written prior permission. Information Sciences Institute
+ makes no representations about the suitability of this software for
+ any purpose. It is provided "as is" without express or implied
+ warranty.
+
+ INFORMATION SCIENCES INSTITUTE DISCLAIMS ALL WARRANTIES WITH REGARD
+ TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL INFORMATION SCIENCES
+ INSTITUTE BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA
+ OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+ \endlegalese
*/
/*!
@@ -1004,13 +1004,3 @@
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
\endlegalese
*/
-
-/*!
- \page qtassistant.html
- \title QtAssistant
-
- This module is no longer needed. Use the QtHelp module to integrate documentation
- into your application.
-
- \sa {QtHelp}
-*/
diff --git a/examples/assistant/README b/examples/assistant/README
deleted file mode 100644
index 85f5a43..0000000
--- a/examples/assistant/README
+++ /dev/null
@@ -1,38 +0,0 @@
-Support for interactive help is provided by the Qt Assistant application.
-Developers can take advantages of the facilities it offers to display
-specially-prepared documentation to users of their applications.
-
-
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory.
-
-Documentation for these examples can be found via the Tutorial and Examples
-link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
deleted file mode 100644
index ff1f947..0000000
--- a/examples/assistant/assistant.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-TEMPLATE = subdirs
-SUBDIRS = simpletextviewer
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
deleted file mode 100644
index eeab35f..0000000
--- a/examples/assistant/simpletextviewer/documentation/about.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The Simple Text Viewer enables the user to select and view existing
-files.
-
-HTML files is displayed using rich text, while other files are
-presented as plain text. The application provides a file dialog
-allowing the user to search for files using wildcard matching. The
-search is performed within in the specified directory, and the user is
-given an option to browse the existing file system to find the
-relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
deleted file mode 100644
index 987abf3..0000000
--- a/examples/assistant/simpletextviewer/documentation/browse.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Browse</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Browse</h2></center></p>
-
- <p>
- The file dialog let you browse the current file system to
- specify the directory in which the file you want to open
- resides.
- Note that only the specified directory will be searched, any
- subdirectories will simply be ignored.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/browse.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/filedialog.html b/examples/assistant/simpletextviewer/documentation/filedialog.html
deleted file mode 100644
index afa65ed..0000000
--- a/examples/assistant/simpletextviewer/documentation/filedialog.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>File Dialog</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>File Dialog</h2></center></p>
-
- <p>
- In the file dialog you can name a particular file name, or
- search for files using wildcard matching, i.e. specify a
- file name containing wildcards. In addition you must specify
- the directory in which the file you search for resides.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/filedialog.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- By default the dialog will search for all files (*) in the
- current directory (the directory the application is run from).
- </p>
-
- <p>
- When editing the file name and directory parameters, an
- overview of the matching files are displayed in the
- dialog. The overview is updated whenever the parameters
- change.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/findfile.html b/examples/assistant/simpletextviewer/documentation/findfile.html
deleted file mode 100644
index 32e0147..0000000
--- a/examples/assistant/simpletextviewer/documentation/findfile.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Find File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Find File</h2></center></p>
-
- <p>
- To open and view a file in the Simple Text Viewer, select the
- 'Open...' option in the 'File' menu. The application will then
- provide you with a file dialog that you can use to search for
- any existing file.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/fadedfilemenu.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
- </p>
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
deleted file mode 100644
index 86db6b1..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/browse.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
deleted file mode 100644
index fde0e43..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
deleted file mode 100644
index 883a33a..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/filedialog.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
deleted file mode 100644
index 3bd2b92..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/handbook.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
deleted file mode 100644
index c28d5e9..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
deleted file mode 100644
index 1e5bba3..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/open.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
deleted file mode 100644
index 6e83a56..0000000
--- a/examples/assistant/simpletextviewer/documentation/images/wildcard.png
+++ /dev/null
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
deleted file mode 100644
index 5a7b1d5..0000000
--- a/examples/assistant/simpletextviewer/documentation/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- HTML files is displayed using rich text, while
- other files are presented as plain text. The application
- provides a file dialog allowing the user to search for files
- using wildcard matching. The search is performed within in the
- specified directory, and the user is given an option to browse
- the existing file system to find the relevant directory.
- </p>
-
- <ul>
- <li><a href="findfile.html">Find File</a></li>
- <ul>
- <li><a href="filedialog.html">File Dialog</a></li>
- <li><a href="wildcardmatching.html">WildCard Matching</a></li>
- <li><a href="browse.html">Browse</a></li>
- </ul>
- <li><a href="openfile.html">Open File</a></li>
- </ul>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/documentation/intro.html b/examples/assistant/simpletextviewer/documentation/intro.html
deleted file mode 100644
index 2e2aa40..0000000
--- a/examples/assistant/simpletextviewer/documentation/intro.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Manual</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Simple Text Viewer</h2></center></p>
-
- <p>
- The Simple Text Viewer enables the user to select and view
- existing files.
- </p>
-
- <p><center>
- <img src="images/mainwindow.png" />
- </center></p>
-
- <p>
- The application provides its own custom documentation that is
- available through the <b>Help</b> menu in the main window's menubar
- and through the <b>Help</b> button in the application's find file
- dialog.
- </p>
-
- </body>
-</html>
-
diff --git a/examples/assistant/simpletextviewer/documentation/openfile.html b/examples/assistant/simpletextviewer/documentation/openfile.html
deleted file mode 100644
index e172de9..0000000
--- a/examples/assistant/simpletextviewer/documentation/openfile.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Open File</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Open File</h2></center></p>
-
- <p>
- Once the file you want to view appears in the dialog's
- display, you can open it in two different ways.
- </p>
-
- <p>
- By pressing the 'Open' button the currently selected file will
- be opened. By default, the first file in the list of matching
- files is selected. Another way of opening a file is to simply
- double click the displayed file name.
- </p>
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/open.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- See also: <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
diff --git a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
deleted file mode 100644
index 660df4f..0000000
--- a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE DCF>
-
-<assistantconfig version="3.2.0">
-
-<profile>
- <property name="name">simpletextviewer</property>
- <property name="title">Simple Text Viewer</property>
- <property name="applicationicon">images/handbook.png</property>
- <property name="startpage">index.html</property>
- <property name="aboutmenutext">About Simple Text Viewer</property>
- <property name="abouturl">about.txt</property>
- <property name="assistantdocs">.</property>
-</profile>
-
-<DCF ref="index.html" icon="images/handbook.png" title="Simple Text Viewer">
- <section ref="./findfile.html" title="Find File">
- <keyword ref="./index.html">Display</keyword>
- <keyword ref="./index.html">Rich text</keyword>
- <keyword ref="./index.html">Plain text</keyword>
- <keyword ref="./findfile.html">Find</keyword>
- <keyword ref="./findfile.html">File menu</keyword>
- <keyword ref="./filedialog.html">File name</keyword>
- <keyword ref="./filedialog.html">File dialog</keyword>
- <keyword ref="./wildcardmatching.html">File globbing</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard matching</keyword>
- <keyword ref="./wildcardmatching.html">Wildcard syntax</keyword>
- <keyword ref="./browse.html">Browse</keyword>
- <keyword ref="./browse.html">Directory</keyword>
- <keyword ref="./openfile.html">Open</keyword>
- <keyword ref="./openfile.html">Select</keyword>
-
- <section ref="./filedialog.html" title="File Dialog" />
- <section ref="./wildcardmatching.html" title="Wildcard Matching" />
- <section ref="./browse.html" title="Browse" />
- </section>
- <section ref="./openfile.html" title="Open File" />
-</DCF>
-
-</assistantconfig>
-
diff --git a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
deleted file mode 100644
index eb1839a..0000000
--- a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <title>Wildcard Matching</title>
- </head>
- <body style="font-size:12pt;font-family:helvetica">
-
- <p><center><h2>Wildcard Matching</h2></center></p>
-
- <p>
- Most command shells such as bash or cmd.exe support "file
- globbing", the ability to identify a group of files by using
- wildcards.
-
- <br />
- <br />
- <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
- <tr valign="top" bgcolor="#f0f0f0">
- <td><center><img src="images/wildcard.png" /></center></td>
- </tr>
- </table>
-
- <br />
- <br />
- <p>
- Wildcard matching provides four features:
- </p>
-
- <ul>
- <li>Any character represents itself apart from those
- mentioned below. Thus 'c' matches the character 'c'.
- </li>
- <li>The '?' character matches any single character.</li>
- <li>The '*' matches zero or more of any characters.</li>
- <li>Sets of characters can be represented in square brackets.
- Within the character class, like outside, backslash
- has no special meaning.
- </li>
- </ul>
-
- <p>
- For example we could identify HTML files with
- <code>*.html</code>. This will match zero or more characters
- followed by a dot followed by 'h', 't', 'm' and 'l'.
- </p>
-
- <br />
- <br />
- <p>
- See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
- <a href="findfile.html">Find File</a>
- </p>
- </body>
-</html>
-
-
-
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
deleted file mode 100644
index 1435ca6..0000000
--- a/examples/assistant/simpletextviewer/findfiledialog.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "findfiledialog.h"
-
-//! [0]
-FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent)
- : QDialog(parent)
-{
- currentAssistantClient = assistant;
- currentEditor = editor;
-//! [0]
-
- createButtons();
- createComboBoxes();
- createFilesTree();
- createLabels();
- createLayout();
-
- directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
- fileNameComboBox->addItem("*");
- findFiles();
-
- setWindowTitle(tr("Find File"));
-//! [1]
-}
-//! [1]
-
-void FindFileDialog::browse()
-{
- QString currentDirectory = directoryComboBox->currentText();
- QString newDirectory = QFileDialog::getExistingDirectory(this,
- tr("Select Directory"), currentDirectory);
- if (!newDirectory.isEmpty()) {
- directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
- directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
- update();
- }
-}
-
-//! [2]
-void FindFileDialog::help()
-{
- currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
-}
-//! [2]
-
-void FindFileDialog::openFile(QTreeWidgetItem *item)
-{
- if (!item) {
- item = foundFilesTree->currentItem();
- if (!item)
- return;
- }
-
- QString fileName = item->text(0);
- QString path = directoryComboBox->currentText() + QDir::separator();
-
- QFile file(path + fileName);
- if (file.open(QIODevice::ReadOnly)) {
- QString data(file.readAll());
-
- if (fileName.endsWith(".html"))
- currentEditor->setHtml(data);
- else
- currentEditor->setPlainText(data);
- }
- close();
-}
-
-void FindFileDialog::update()
-{
- findFiles();
- buttonBox->button(QDialogButtonBox::Open)->setEnabled(
- foundFilesTree->topLevelItemCount() > 0);
-}
-
-void FindFileDialog::findFiles()
-{
- QRegExp filePattern(fileNameComboBox->currentText() + "*");
- filePattern.setPatternSyntax(QRegExp::Wildcard);
-
- QDir directory(directoryComboBox->currentText());
-
- QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
- QStringList matchingFiles;
-
- foreach (QString file, allFiles) {
- if (filePattern.exactMatch(file))
- matchingFiles << file;
- }
- showFiles(matchingFiles);
-}
-
-void FindFileDialog::showFiles(const QStringList &files)
-{
- foundFilesTree->clear();
-
- for (int i = 0; i < files.count(); ++i) {
- QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
- item->setText(0, files[i]);
- }
-
- if (files.count() > 0)
- foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
-}
-
-void FindFileDialog::createButtons()
-{
- browseButton = new QToolButton;
- browseButton->setText(tr("..."));
- connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
-
- buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
- | QDialogButtonBox::Cancel
- | QDialogButtonBox::Help);
- connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
- connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
- connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
-}
-
-void FindFileDialog::createComboBoxes()
-{
- directoryComboBox = new QComboBox;
- fileNameComboBox = new QComboBox;
-
- fileNameComboBox->setEditable(true);
- fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- directoryComboBox->setMinimumContentsLength(30);
- directoryComboBox->setSizeAdjustPolicy(
- QComboBox::AdjustToMinimumContentsLength);
- directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Preferred);
-
- connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)),
- this, SLOT(update()));
- connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)),
- this, SLOT(update()));
-}
-
-void FindFileDialog::createFilesTree()
-{
- foundFilesTree = new QTreeWidget;
- foundFilesTree->setColumnCount(1);
- foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
- foundFilesTree->setRootIsDecorated(false);
- foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
-
- connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
- this, SLOT(openFile(QTreeWidgetItem *)));
-}
-
-void FindFileDialog::createLabels()
-{
- directoryLabel = new QLabel(tr("Search in:"));
- fileNameLabel = new QLabel(tr("File name (including wildcards):"));
-}
-
-void FindFileDialog::createLayout()
-{
- QHBoxLayout *fileLayout = new QHBoxLayout;
- fileLayout->addWidget(fileNameLabel);
- fileLayout->addWidget(fileNameComboBox);
-
- QHBoxLayout *directoryLayout = new QHBoxLayout;
- directoryLayout->addWidget(directoryLabel);
- directoryLayout->addWidget(directoryComboBox);
- directoryLayout->addWidget(browseButton);
-
- QVBoxLayout *mainLayout = new QVBoxLayout;
- mainLayout->addLayout(fileLayout);
- mainLayout->addLayout(directoryLayout);
- mainLayout->addWidget(foundFilesTree);
- mainLayout->addStretch();
- mainLayout->addWidget(buttonBox);
- setLayout(mainLayout);
-}
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
deleted file mode 100644
index 1f429af..0000000
--- a/examples/assistant/simpletextviewer/findfiledialog.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef FINDFILEDIALOG_H
-#define FINDFILEDIALOG_H
-
-#include <QAssistantClient>
-#include <QDialog>
-
-QT_BEGIN_NAMESPACE
-class QComboBox;
-class QDialogButtonBox;
-class QLabel;
-class QTextEdit;
-class QToolButton;
-class QTreeWidget;
-class QTreeWidgetItem;
-QT_END_NAMESPACE
-
-//! [0]
-class FindFileDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
- QWidget *parent = 0);
-
-private slots:
- void browse();
- void help();
- void openFile(QTreeWidgetItem *item = 0);
- void update();
-
-private:
- void findFiles();
- void showFiles(const QStringList &files);
-
- void createButtons();
- void createComboBoxes();
- void createFilesTree();
- void createLabels();
- void createLayout();
-
- QAssistantClient *currentAssistantClient;
- QTextEdit *currentEditor;
- QTreeWidget *foundFilesTree;
-
- QComboBox *directoryComboBox;
- QComboBox *fileNameComboBox;
-
- QLabel *directoryLabel;
- QLabel *fileNameLabel;
-
- QDialogButtonBox *buttonBox;
-
- QToolButton *browseButton;
-};
-//! [0]
-
-#endif
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
deleted file mode 100644
index 99849bb..0000000
--- a/examples/assistant/simpletextviewer/mainwindow.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtGui>
-
-#include "mainwindow.h"
-#include "findfiledialog.h"
-
-//! [0]
-MainWindow::MainWindow()
-{
- textViewer = new QTextEdit;
- textViewer->setReadOnly(true);
- QFile file("documentation/intro.html");
- if (file.open(QIODevice::ReadOnly))
- textViewer->setHtml(file.readAll());
-
- setCentralWidget(textViewer);
-
- createActions();
- createMenus();
-
- initializeAssistant();
-
- setWindowTitle(tr("Simple Text Viewer"));
- resize(750, 400);
-}
-//! [0]
-
-//! [1]
-void MainWindow::closeEvent(QCloseEvent *)
-{
- if (assistantClient)
- assistantClient->closeAssistant();
-}
-//! [1]
-
-void MainWindow::about()
-{
- QMessageBox::about(this, tr("About Simple Text Viewer"),
- tr("This example demonstrates how to use\n" \
- "Qt Assistant as help system for your\n" \
- "own application."));
-}
-
-//! [2]
-void MainWindow::assistant()
-{
- assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
- QDir::separator() +
- "assistant/simpletextviewer/documentation/index.html");
-}
-//! [2]
-
-//! [3]
-void MainWindow::open()
-{
- FindFileDialog dialog(textViewer, assistantClient);
- dialog.exec();
-}
-//! [3]
-
-void MainWindow::createActions()
-{
- assistantAct = new QAction(tr("Help Contents"), this);
- assistantAct->setShortcuts(QKeySequence::HelpContents);
- connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
-
- openAct = new QAction(tr("&Open..."), this);
- openAct->setShortcuts(QKeySequence::Open);
- connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
-
- clearAct = new QAction(tr("&Clear"), this);
- clearAct->setShortcut(tr("Ctrl+C"));
- connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
-
- exitAct = new QAction(tr("E&xit"), this);
- exitAct->setShortcuts(QKeySequence::Quit);
- connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
-
- aboutAct = new QAction(tr("&About"), this);
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
-
- aboutQtAct = new QAction(tr("About &Qt"), this);
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
-}
-
-void MainWindow::createMenus()
-{
- fileMenu = new QMenu(tr("&File"), this);
- fileMenu->addAction(openAct);
- fileMenu->addAction(clearAct);
- fileMenu->addSeparator();
- fileMenu->addAction(exitAct);
-
- helpMenu = new QMenu(tr("&Help"), this);
- helpMenu->addAction(assistantAct);
- helpMenu->addSeparator();
- helpMenu->addAction(aboutAct);
- helpMenu->addAction(aboutQtAct);
-
-
- menuBar()->addMenu(fileMenu);
- menuBar()->addMenu(helpMenu);
-}
-
-//! [4]
-void MainWindow::initializeAssistant()
-{
- assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
-
- QStringList arguments;
- arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
- assistantClient->setArguments(arguments);
-}
-//! [4]
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
deleted file mode 100644
index 98f9a67..0000000
--- a/examples/assistant/simpletextviewer/mainwindow.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include <QAssistantClient>
-#include <QMainWindow>
-#include <QTextEdit>
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-
-public:
- MainWindow();
-
-private slots:
- void about();
-//! [0]
- void assistant();
-//! [0]
- void open();
-
-protected:
-//! [1]
- void closeEvent(QCloseEvent *event);
-//! [1]
-
-private:
- void createActions();
- void createMenus();
-//! [2]
- void initializeAssistant();
-//! [2]
-
-//! [3]
- QAssistantClient *assistantClient;
-//! [3]
- QTextEdit *textViewer;
-
- QMenu *fileMenu;
- QMenu *helpMenu;
-
- QAction *assistantAct;
- QAction *clearAct;
- QAction *openAct;
- QAction *exitAct;
- QAction *aboutAct;
- QAction *aboutQtAct;
-};
-
-#endif
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
deleted file mode 100644
index 2c0eada..0000000
--- a/examples/assistant/simpletextviewer/simpletextviewer.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-CONFIG += assistant
-
-QT += network
-
-HEADERS = mainwindow.h \
- findfiledialog.h
-SOURCES = main.cpp \
- mainwindow.cpp \
- findfiledialog.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
-INSTALLS += target sources
-
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
-
diff --git a/examples/examples.pro b/examples/examples.pro
index d11e36b..3678cc0 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -48,10 +48,10 @@ contains(QT_CONFIG, phonon):!static: SUBDIRS += phonon
contains(QT_CONFIG, webkit): SUBDIRS += webkit
embedded:SUBDIRS += qws
!wince*:!symbian: {
- !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
- contains(QT_BUILD_PARTS, tools):SUBDIRS += assistant qtestlib help
+ !contains(QT_EDITION, Console):contains(QT_BUILD_PARTS, tools):SUBDIRS += designer
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib help
} else {
- contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
+ contains(QT_BUILD_PARTS, tools):SUBDIRS += qtestlib
}
contains(QT_CONFIG, opengl): SUBDIRS += opengl
contains(QT_CONFIG, openvg): SUBDIRS += openvg
diff --git a/examples/webkit/fancybrowser/main.cpp b/examples/webkit/fancybrowser/main.cpp
index 7f3c983..2245788 100644
--- a/examples/webkit/fancybrowser/main.cpp
+++ b/examples/webkit/fancybrowser/main.cpp
@@ -45,7 +45,12 @@
int main(int argc, char * argv[])
{
QApplication app(argc, argv);
- MainWindow *browser = new MainWindow;
+ QUrl url;
+ if (argc > 1)
+ url = QUrl(argv[1]);
+ else
+ url = QUrl("http://www.google.com/ncr");
+ MainWindow *browser = new MainWindow(url);
browser->show();
return app.exec();
}
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index 11fac91..234afba 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -45,7 +45,7 @@
//! [1]
-MainWindow::MainWindow()
+MainWindow::MainWindow(const QUrl& url)
{
progress = 0;
@@ -60,7 +60,7 @@ MainWindow::MainWindow()
//! [2]
view = new QWebView(this);
- view->load(QUrl("http://www.google.com/ncr"));
+ view->load(url);
connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation()));
connect(view, SIGNAL(titleChanged(const QString&)), SLOT(adjustTitle()));
connect(view, SIGNAL(loadProgress(int)), SLOT(setProgress(int)));
@@ -78,6 +78,11 @@ MainWindow::MainWindow()
toolBar->addWidget(locationEdit);
//! [2]
+ QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
+ QAction* viewSourceAction = new QAction("Page Source", this);
+ connect(viewSourceAction, SIGNAL(triggered()), SLOT(viewSource()));
+ viewMenu->addAction(viewSourceAction);
+
//! [3]
QMenu *effectMenu = menuBar()->addMenu(tr("&Effect"));
effectMenu->addAction("Highlight all links", this, SLOT(highlightAllLinks()));
@@ -100,6 +105,23 @@ MainWindow::MainWindow()
}
//! [3]
+void MainWindow::viewSource()
+{
+ QNetworkAccessManager* accessManager = view->page()->networkAccessManager();
+ QNetworkRequest request(view->url());
+ QNetworkReply* reply = accessManager->get(request);
+ connect(reply, SIGNAL(finished()), this, SLOT(slotSourceDownloaded()));
+}
+
+void MainWindow::slotSourceDownloaded()
+{
+ QNetworkReply* reply = qobject_cast<QNetworkReply*>(const_cast<QObject*>(sender()));
+ QTextEdit* textEdit = new QTextEdit(NULL);
+ textEdit->setAttribute(Qt::WA_DeleteOnClose);
+ textEdit->show();
+ textEdit->setPlainText(reply->readAll());
+}
+
//! [4]
void MainWindow::adjustLocation()
{
@@ -136,6 +158,8 @@ void MainWindow::finishLoading(bool)
progress = 100;
adjustTitle();
view->page()->mainFrame()->evaluateJavaScript(jQuery);
+ // Enable this to see the dump of the internal render tree
+ //qDebug() << view->page()->mainFrame()->renderTreeDump();
}
//! [6]
diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h
index 33fd8f5..be95614 100644
--- a/examples/webkit/fancybrowser/mainwindow.h
+++ b/examples/webkit/fancybrowser/mainwindow.h
@@ -52,7 +52,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow();
+ MainWindow(const QUrl& url);
protected slots:
@@ -62,6 +62,9 @@ protected slots:
void setProgress(int p);
void finishLoading(bool);
+ void viewSource();
+ void slotSourceDownloaded();
+
void highlightAllLinks();
void rotateImages(bool toggle);
void removeGifImages();
diff --git a/mkspecs/features/assistant.prf b/mkspecs/features/assistant.prf
deleted file mode 100644
index 25e5d4d..0000000
--- a/mkspecs/features/assistant.prf
+++ /dev/null
@@ -1,9 +0,0 @@
-
-INCLUDEPATH = $$QMAKE_INCDIR_QT/QtAssistant $$INCLUDEPATH
-
-mac:!static:contains(QT_CONFIG, qt_framework) {
- qtAddLibrary(QtAssistant)
-} else {
- qtAddLibrary(QtAssistantClient)
-}
-QT += network
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index faa6415..ec3b5d8 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -544,7 +544,6 @@ UnixMakefileGenerator::processPrlFiles()
{
QList<QMakeLocalFileName> libdirs, frameworkdirs;
frameworkdirs.append(QMakeLocalFileName("/System/Library/Frameworks"));
- frameworkdirs.append(QMakeLocalFileName("/Library/Frameworks"));
const QString lflags[] = { "QMAKE_LIBDIR_FLAGS", "QMAKE_FRAMEWORKPATH_FLAGS", "QMAKE_LFLAGS", "QMAKE_LIBS", QString() };
for(int i = 0; !lflags[i].isNull(); i++) {
QStringList &l = project->values(lflags[i]);
diff --git a/qmake/option.cpp b/qmake/option.cpp
index c503b08..e851e79 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -136,6 +136,20 @@ static Option::QMAKE_MODE default_mode(QString progname)
return Option::QMAKE_GENERATE_MAKEFILE;
}
+static QString detectProjectFile(const QString &path)
+{
+ QString ret;
+ QDir dir(path);
+ if(dir.exists(dir.dirName() + Option::pro_ext)) {
+ ret = dir.filePath(dir.dirName()) + Option::pro_ext;
+ } else { //last try..
+ QStringList profiles = dir.entryList(QStringList("*" + Option::pro_ext));
+ if(profiles.count() == 1)
+ ret = dir.filePath(profiles.at(0));
+ }
+ return ret;
+}
+
QString project_builtin_regx();
bool usage(const char *a0)
{
@@ -322,12 +336,18 @@ Option::parseCommandLine(int argc, char **argv, int skip)
if(!fi.makeAbsolute()) //strange
arg = fi.filePath();
if(Option::qmake_mode == Option::QMAKE_GENERATE_MAKEFILE ||
- Option::qmake_mode == Option::QMAKE_GENERATE_PRL)
+ Option::qmake_mode == Option::QMAKE_GENERATE_PRL) {
+ if(fi.isDir()) {
+ QString proj = detectProjectFile(arg);
+ if (!proj.isNull())
+ arg = proj;
+ }
Option::mkfile::project_files.append(arg);
- else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT)
+ } else if(Option::qmake_mode == Option::QMAKE_GENERATE_PROJECT) {
Option::projfile::project_dirs.append(arg);
- else
+ } else {
handled = false;
+ }
}
if(!handled) {
return Option::QMAKE_CMDLINE_SHOW_USAGE | Option::QMAKE_CMDLINE_ERROR;
@@ -494,15 +514,9 @@ Option::init(int argc, char **argv)
//try REALLY hard to do it for them, lazy..
if(Option::mkfile::project_files.isEmpty()) {
- QString pwd = qmake_getpwd(),
- proj = pwd + "/" + pwd.right(pwd.length() - (pwd.lastIndexOf('/') + 1)) + Option::pro_ext;
- if(QFile::exists(proj)) {
+ QString proj = detectProjectFile(qmake_getpwd());
+ if(!proj.isNull())
Option::mkfile::project_files.append(proj);
- } else { //last try..
- QStringList profiles = QDir(pwd).entryList(QStringList("*" + Option::pro_ext));
- if(profiles.count() == 1)
- Option::mkfile::project_files.append(pwd + "/" + profiles[0]);
- }
#ifndef QT_BUILD_QMAKE_LIBRARY
if(Option::mkfile::project_files.isEmpty()) {
usage(argv[0]);
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index d113e02..b58c9dd 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -44,11 +44,11 @@
#include <stddef.h>
-#define QT_VERSION_STR "4.6.0"
+#define QT_VERSION_STR "4.7.0"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
-#define QT_VERSION 0x040600
+#define QT_VERSION 0x040700
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
diff --git a/src/corelib/io/qdatastream.cpp b/src/corelib/io/qdatastream.cpp
index 19e86a6..308e847 100644
--- a/src/corelib/io/qdatastream.cpp
+++ b/src/corelib/io/qdatastream.cpp
@@ -48,6 +48,7 @@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
+#include "qendian.h"
QT_BEGIN_NAMESPACE
@@ -670,24 +671,12 @@ QDataStream &QDataStream::operator>>(qint16 &i)
{
i = 0;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&i, 2) != 2) {
- i = 0;
- setStatus(ReadPastEnd);
- }
+ if (dev->read((char *)&i, 2) != 2) {
+ i = 0;
+ setStatus(ReadPastEnd);
} else {
- union {
- qint16 val1;
- char val2[2];
- } x;
- char *p = x.val2;
- char b[2];
- if (dev->read(b, 2) == 2) {
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
- } else {
- setStatus(ReadPastEnd);
+ if (!noswap) {
+ i = qbswap(i);
}
}
return *this;
@@ -713,26 +702,12 @@ QDataStream &QDataStream::operator>>(qint32 &i)
{
i = 0;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&i, 4) != 4) {
- i = 0;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- qint32 val1;
- char val2[4];
- } x;
- char *p = x.val2;
- char b[4];
- if (dev->read(b, 4) == 4) {
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
- } else {
- setStatus(ReadPastEnd);
+ if (dev->read((char *)&i, 4) != 4) {
+ i = 0;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ i = qbswap(i);
}
}
return *this;
@@ -761,31 +736,14 @@ QDataStream &QDataStream::operator>>(qint64 &i)
quint32 i1, i2;
*this >> i2 >> i1;
i = ((quint64)i1 << 32) + i2;
- } else if (noswap) { // no conversion needed
+ } else {
if (dev->read((char *)&i, 8) != 8) {
i = qint64(0);
setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- qint64 val1;
- char val2[8];
- } x;
-
- char *p = x.val2;
- char b[8];
- if (dev->read(b, 8) == 8) {
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
- i = x.val1;
} else {
- setStatus(ReadPastEnd);
+ if (!noswap) {
+ i = qbswap(i);
+ }
}
}
return *this;
@@ -825,27 +783,17 @@ QDataStream &QDataStream::operator>>(float &f)
f = 0.0f;
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- if (dev->read((char *)&f, 4) != 4) {
- f = 0.0f;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- float val1;
- char val2[4];
- } x;
-
- char *p = x.val2;
- char b[4];
- if (dev->read(b, 4) == 4) {
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
+ if (dev->read((char *)&f, 4) != 4) {
+ f = 0.0f;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ union {
+ float val1;
+ quint32 val2;
+ } x;
+ x.val2 = qbswap(*reinterpret_cast<quint32 *>(&f));
f = x.val1;
- } else {
- setStatus(ReadPastEnd);
}
}
return *this;
@@ -878,30 +826,17 @@ QDataStream &QDataStream::operator>>(double &f)
f = 0.0;
CHECK_STREAM_PRECOND(*this)
#ifndef Q_DOUBLE_FORMAT
- if (noswap) {
- if (dev->read((char *)&f, 8) != 8) {
- f = 0.0;
- setStatus(ReadPastEnd);
- }
- } else { // swap bytes
- union {
- double val1;
- char val2[8];
- } x;
- char *p = x.val2;
- char b[8];
- if (dev->read(b, 8) == 8) {
- *p++ = b[7];
- *p++ = b[6];
- *p++ = b[5];
- *p++ = b[4];
- *p++ = b[3];
- *p++ = b[2];
- *p++ = b[1];
- *p = b[0];
+ if (dev->read((char *)&f, 8) != 8) {
+ f = 0.0;
+ setStatus(ReadPastEnd);
+ } else {
+ if (!noswap) {
+ union {
+ double val1;
+ quint64 val2;
+ } x;
+ x.val2 = qbswap(*reinterpret_cast<quint64 *>(&f));
f = x.val1;
- } else {
- setStatus(ReadPastEnd);
}
}
#else
@@ -1073,20 +1008,10 @@ QDataStream &QDataStream::operator<<(qint8 i)
QDataStream &QDataStream::operator<<(qint16 i)
{
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- dev->write((char *)&i, sizeof(qint16));
- } else { // swap bytes
- union {
- qint16 val1;
- char val2[2];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[2];
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 2);
+ if (!noswap) {
+ i = qbswap(i);
}
+ dev->write((char *)&i, sizeof(qint16));
return *this;
}
@@ -1100,22 +1025,10 @@ QDataStream &QDataStream::operator<<(qint16 i)
QDataStream &QDataStream::operator<<(qint32 i)
{
CHECK_STREAM_PRECOND(*this)
- if (noswap) {
- dev->write((char *)&i, sizeof(qint32));
- } else { // swap bytes
- union {
- qint32 val1;
- char val2[4];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 4);
+ if (!noswap) {
+ i = qbswap(i);
}
+ dev->write((char *)&i, sizeof(qint32));
return *this;
}
@@ -1141,25 +1054,11 @@ QDataStream &QDataStream::operator<<(qint64 i)
quint32 i1 = i & 0xffffffff;
quint32 i2 = i >> 32;
*this << i2 << i1;
- } else if (noswap) { // no conversion needed
+ } else {
+ if (!noswap) {
+ i = qbswap(i);
+ }
dev->write((char *)&i, sizeof(qint64));
- } else { // swap bytes
- union {
- qint64 val1;
- char val2[8];
- } x;
- x.val1 = i;
- char *p = x.val2;
- char b[8];
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 8);
}
return *this;
}
@@ -1203,22 +1102,16 @@ QDataStream &QDataStream::operator<<(float f)
CHECK_STREAM_PRECOND(*this)
float g = f; // fixes float-on-stack problem
- if (noswap) { // no conversion needed
- dev->write((char *)&g, sizeof(float));
- } else { // swap bytes
+ if (!noswap) {
union {
float val1;
- char val2[4];
+ quint32 val2;
} x;
- x.val1 = f;
- char *p = x.val2;
- char b[4];
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 4);
+ x.val1 = g;
+ x.val2 = qbswap(x.val2);
+ g = x.val1;
}
+ dev->write((char *)&g, sizeof(float));
return *this;
}
@@ -1242,26 +1135,16 @@ QDataStream &QDataStream::operator<<(double f)
CHECK_STREAM_PRECOND(*this)
#ifndef Q_DOUBLE_FORMAT
- if (noswap) {
- dev->write((char *)&f, sizeof(double));
- } else {
+ if (!noswap) {
union {
double val1;
- char val2[8];
+ quint64 val2;
} x;
x.val1 = f;
- char *p = x.val2;
- char b[8];
- b[7] = *p++;
- b[6] = *p++;
- b[5] = *p++;
- b[4] = *p++;
- b[3] = *p++;
- b[2] = *p++;
- b[1] = *p++;
- b[0] = *p;
- dev->write(b, 8);
+ x.val2 = qbswap(x.val2);
+ f = x.val1;
}
+ dev->write((char *)&f, sizeof(double));
#else
union {
double val1;
diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h
index f61a59c..f8e0608 100644
--- a/src/corelib/io/qdatastream.h
+++ b/src/corelib/io/qdatastream.h
@@ -84,10 +84,11 @@ public:
Qt_4_3 = 9,
Qt_4_4 = 10,
Qt_4_5 = 11,
- Qt_4_6 = 12
-#if QT_VERSION >= 0x040700
-#error Add the datastream version for this Qt version
+ Qt_4_6 = 12,
Qt_4_7 = Qt_4_6
+#if QT_VERSION >= 0x040800
+#error Add the datastream version for this Qt version
+ Qt_4_8 = Qt_4_7
#endif
};
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index f7321ef..4434fe7 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -55,6 +55,7 @@
#include "qtools_p.h"
#include "qhash.h"
#include "qdebug.h"
+#include "qendian.h"
#ifdef Q_OS_MAC
#include <private/qcore_mac_p.h>
@@ -7306,7 +7307,7 @@ QDataStream &operator>>(QDataStream &in, QString &str)
!= (QSysInfo::ByteOrder == QSysInfo::BigEndian)) {
ushort *data = reinterpret_cast<ushort *>(str.data());
while (len--) {
- *data = (*data >> 8) | (*data << 8);
+ *data = qbswap(*data);
++data;
}
}
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 987aa26..7d950b60 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -922,6 +922,14 @@ void QApplicationPrivate::initialize()
// Set up which span functions should be used in raster engine...
qInitDrawhelperAsm();
+#ifdef QT_MAC_USE_COCOA
+ // Use the raster graphics system by default on Cocoa, override with
+ // -graphicssystem native
+ if (graphics_system_name.isEmpty()) {
+ graphics_system_name = QLatin1String("raster");
+ }
+#endif
+
#if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
// initialize the graphics system - on X11 this is initialized inside
// qt_init() in qapplication_x11.cpp because of several reasons.
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 4c9541b..fab3998 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -5664,10 +5664,16 @@ QIcon QCommonStyle::standardIconImplementation(StandardPixmap standardIcon, cons
OSType iconType = 0;
switch (standardIcon) {
case QStyle::SP_MessageBoxQuestion:
+ iconType = kQuestionMarkIcon;
+ break;
case QStyle::SP_MessageBoxInformation:
+ iconType = kAlertNoteIcon;
+ break;
case QStyle::SP_MessageBoxWarning:
+ iconType = kAlertCautionIcon;
+ break;
case QStyle::SP_MessageBoxCritical:
- iconType = kGenericApplicationIcon;
+ iconType = kAlertStopIcon;
break;
case SP_DesktopIcon:
iconType = kDesktopIcon;
diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri
index a3abc98..3dd3d2e 100644
--- a/src/plugins/qpluginbase.pri
+++ b/src/plugins/qpluginbase.pri
@@ -1,6 +1,6 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.0
+ VERSION=4.7.0
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/src/qbase.pri b/src/qbase.pri
index 4639ca1..6fd27c8 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat
isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.0
+ VERSION=4.7.0
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/tests/arthur/lance/widgets.h b/tests/arthur/lance/widgets.h
index ea1482f..7c17bc5 100644
--- a/tests/arthur/lance/widgets.h
+++ b/tests/arthur/lance/widgets.h
@@ -236,7 +236,12 @@ public:
}
if (m_render_view.isNull()) {
- m_render_view = T::window()->windowSurface()->grabWidget(this);
+
+ if (T::window()->windowSurface())
+ m_render_view = T::window()->windowSurface()->grabWidget(this);
+ else
+ m_render_view = QPixmap::grabWidget(this);
+
m_render_view.save("renderView.png");
}
}
diff --git a/tests/auto/networkdata/README b/tests/auto/networkdata/README
new file mode 100644
index 0000000..e8748cc
--- /dev/null
+++ b/tests/auto/networkdata/README
@@ -0,0 +1 @@
+This directory contains network test data
diff --git a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
index 8cf686e..6acc241 100644
--- a/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
+++ b/tests/auto/qeasingcurve/tst_qeasingcurve.cpp
@@ -193,186 +193,208 @@ void tst_QEasingCurve::valueForProgress_data()
// integer values and avoid fp inaccuracies
QTest::newRow("Linear") << int(QEasingCurve::Linear)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1 << 0.2 << 0.3 << 0.4 << 0.5 << 0.6 << 0.7 << 0.8 << 0.9 << 1);
+ << (RealList() << 0.0000 << 0.1000 << 0.2000 << 0.3000 << 0.4000 << 0.5000 << 0.6000 << 0.7000 << 0.8000 << 0.9000 << 1.0000);
QTest::newRow("InQuad") << int(QEasingCurve::InQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01 << 0.04 << 0.09 << 0.16 << 0.25 << 0.36 << 0.49 << 0.64 << 0.81 << 1);
+ << (RealList() << 0.0000 << 0.0100 << 0.0400 << 0.0900 << 0.1600 << 0.2500 << 0.3600 << 0.4900 << 0.6400 << 0.8100 << 1.0000);
QTest::newRow("OutQuad") << int(QEasingCurve::OutQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.19 << 0.36 << 0.51 << 0.64 << 0.75 << 0.84 << 0.91 << 0.96 << 0.99 << 1);
+ << (RealList() << 0.0000 << 0.1900 << 0.3600 << 0.5100 << 0.6400 << 0.7500 << 0.8400 << 0.9100 << 0.9600 << 0.9900 << 1.0000);
QTest::newRow("InOutQuad") << int(QEasingCurve::InOutQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02 << 0.08 << 0.18 << 0.32 << 0.5 << 0.68 << 0.82 << 0.92 << 0.98 << 1);
+ << (RealList() << 0.0000 << 0.0200 << 0.0800 << 0.1800 << 0.3200 << 0.5000 << 0.6800 << 0.8200 << 0.9200 << 0.9800 << 1.0000);
QTest::newRow("OutInQuad") << int(QEasingCurve::OutInQuad)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.18 << 0.32 << 0.42 << 0.48 << 0.5 << 0.52 << 0.58 << 0.68 << 0.82 << 1);
+ << (RealList() << 0.0000 << 0.1800 << 0.3200 << 0.4200 << 0.4800 << 0.5000 << 0.5200 << 0.5800 << 0.6800 << 0.8200 << 1.0000);
QTest::newRow("InCubic") << int(QEasingCurve::InCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001 << 0.008 << 0.027 << 0.064 << 0.125 << 0.216 << 0.343 << 0.512 << 0.729 << 1);
+ << (RealList() << 0.0000 << 0.0010 << 0.0080 << 0.0270 << 0.0640 << 0.1250 << 0.2160 << 0.3430 << 0.5120 << 0.7290 << 1.0000);
QTest::newRow("OutCubic") << int(QEasingCurve::OutCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.271 << 0.488 << 0.657 << 0.784 << 0.875 << 0.936 << 0.973 << 0.992 << 0.999 << 1);
+ << (RealList() << 0.0000 << 0.2710 << 0.4880 << 0.6570 << 0.7840 << 0.8750 << 0.9360 << 0.9730 << 0.9920 << 0.9990 << 1.0000);
QTest::newRow("InOutCubic") << int(QEasingCurve::InOutCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.004 << 0.032 << 0.108 << 0.256 << 0.5 << 0.744 << 0.892 << 0.968 << 0.996 << 1);
+ << (RealList() << 0.0000 << 0.0040 << 0.0320 << 0.1080 << 0.2560 << 0.5000 << 0.7440 << 0.8920 << 0.9680 << 0.9960 << 1.0000);
QTest::newRow("OutInCubic") << int(QEasingCurve::OutInCubic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.244 << 0.392 << 0.468 << 0.496 << 0.5 << 0.504 << 0.532 << 0.608 << 0.756 << 1);
+ << (RealList() << 0.0000 << 0.2440 << 0.3920 << 0.4680 << 0.4960 << 0.5000 << 0.5040 << 0.5320 << 0.6080 << 0.7560 << 1.0000);
QTest::newRow("InQuart") << int(QEasingCurve::InQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0001 << 0.0016 << 0.0081 << 0.0256 << 0.0625 << 0.1296 << 0.2401 << 0.4096 << 0.6561 << 1);
+ << (RealList() << 0.0000 << 0.0001 << 0.0016 << 0.0081 << 0.0256 << 0.0625 << 0.1296 << 0.2401 << 0.4096 << 0.6561 << 1.0000);
QTest::newRow("OutQuart") << int(QEasingCurve::OutQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3439 << 0.5904 << 0.7599 << 0.8704 << 0.9375 << 0.9744 << 0.9919 << 0.9984 << 0.9999 << 1);
+ << (RealList() << 0.0000 << 0.3439 << 0.5904 << 0.7599 << 0.8704 << 0.9375 << 0.9744 << 0.9919 << 0.9984 << 0.9999 << 1.0000);
QTest::newRow("InOutQuart") << int(QEasingCurve::InOutQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0008 << 0.0128 << 0.0648 << 0.2048 << 0.5 << 0.7952 << 0.9352 << 0.9872 << 0.9992 << 1);
+ << (RealList() << 0.0000 << 0.0008 << 0.0128 << 0.0648 << 0.2048 << 0.5000 << 0.7952 << 0.9352 << 0.9872 << 0.9992 << 1.0000);
QTest::newRow("OutInQuart") << int(QEasingCurve::OutInQuart)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.2952 << 0.4352 << 0.4872 << 0.4992 << 0.5 << 0.5008 << 0.5128 << 0.5648 << 0.7048 << 1);
+ << (RealList() << 0.0000 << 0.2952 << 0.4352 << 0.4872 << 0.4992 << 0.5000 << 0.5008 << 0.5128 << 0.5648 << 0.7048 << 1.0000);
QTest::newRow("InQuint") << int(QEasingCurve::InQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 1e-05 << 0.00032 << 0.00243 << 0.01024 << 0.03125 << 0.07776 << 0.1681 << 0.3277 << 0.5905 << 1);
+ << (RealList() << 0.0000 << 0.0000 << 0.0003 << 0.0024 << 0.0102 << 0.0313 << 0.0778 << 0.1681 << 0.3277 << 0.5905 << 1.0000);
QTest::newRow("OutQuint") << int(QEasingCurve::OutQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4095 << 0.6723 << 0.8319 << 0.9222 << 0.9688 << 0.9898 << 0.9976 << 0.9997 << 1 << 1);
+ << (RealList() << 0.0000 << 0.4095 << 0.6723 << 0.8319 << 0.9222 << 0.9688 << 0.9898 << 0.9976 << 0.9997 << 1.0000 << 1.0000);
QTest::newRow("InOutQuint") << int(QEasingCurve::InOutQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.00016 << 0.00512 << 0.03888 << 0.1638 << 0.5 << 0.8362 << 0.9611 << 0.9949 << 0.9998 << 1);
+ << (RealList() << 0.0000 << 0.0002 << 0.0051 << 0.0389 << 0.1638 << 0.5000 << 0.8362 << 0.9611 << 0.9949 << 0.9998 << 1.0000);
QTest::newRow("OutInQuint") << int(QEasingCurve::OutInQuint)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3362 << 0.4611 << 0.4949 << 0.4998 << 0.5 << 0.5002 << 0.5051 << 0.5389 << 0.6638 << 1);
+ << (RealList() << 0.0000 << 0.3362 << 0.4611 << 0.4949 << 0.4998 << 0.5000 << 0.5002 << 0.5051 << 0.5389 << 0.6638 << 1.0000);
QTest::newRow("InSine") << int(QEasingCurve::InSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01231 << 0.04894 << 0.109 << 0.191 << 0.2929 << 0.4122 << 0.546 << 0.691 << 0.8436 << 1);
+ << (RealList() << 0.0000 << 0.0123 << 0.0489 << 0.1090 << 0.1910 << 0.2929 << 0.4122 << 0.5460 << 0.6910 << 0.8436 << 1.0000);
QTest::newRow("OutSine") << int(QEasingCurve::OutSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1564 << 0.309 << 0.454 << 0.5878 << 0.7071 << 0.809 << 0.891 << 0.9511 << 0.9877 << 1);
+ << (RealList() << 0.0000 << 0.1564 << 0.3090 << 0.4540 << 0.5878 << 0.7071 << 0.8090 << 0.8910 << 0.9511 << 0.9877 << 1.0000);
QTest::newRow("InOutSine") << int(QEasingCurve::InOutSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02447 << 0.09549 << 0.2061 << 0.3455 << 0.5 << 0.6545 << 0.7939 << 0.9045 << 0.9755 << 1);
+ << (RealList() << 0.0000 << 0.0245 << 0.0955 << 0.2061 << 0.3455 << 0.5000 << 0.6545 << 0.7939 << 0.9045 << 0.9755 << 1.0000);
QTest::newRow("OutInSine") << int(QEasingCurve::OutInSine)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1545 << 0.2939 << 0.4045 << 0.4755 << 0.5 << 0.5245 << 0.5955 << 0.7061 << 0.8455 << 1);
+ << (RealList() << 0.0000 << 0.1545 << 0.2939 << 0.4045 << 0.4755 << 0.5000 << 0.5245 << 0.5955 << 0.7061 << 0.8455 << 1.0000);
QTest::newRow("InExpo") << int(QEasingCurve::InExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0009531 << 0.002906 << 0.006812 << 0.01462 << 0.03025 << 0.0615 << 0.124 << 0.249 << 0.499 << 1);
+ << (RealList() << 0.0000 << 0.0010 << 0.0029 << 0.0068 << 0.0146 << 0.0303 << 0.0615 << 0.1240 << 0.2490 << 0.4990 << 1.0000);
QTest::newRow("OutExpo") << int(QEasingCurve::OutExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.5005 << 0.7507 << 0.8759 << 0.9384 << 0.9697 << 0.9854 << 0.9932 << 0.9971 << 0.999 << 1);
+ << (RealList() << 0.0000 << 0.5005 << 0.7507 << 0.8759 << 0.9384 << 0.9697 << 0.9854 << 0.9932 << 0.9971 << 0.9990 << 1.0000);
QTest::newRow("InOutExpo") << int(QEasingCurve::InOutExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001453 << 0.007312 << 0.03075 << 0.1245 << 0.5002 << 0.8754 << 0.9692 << 0.9927 << 0.9985 << 1);
+ << (RealList() << 0.0000 << 0.0015 << 0.0073 << 0.0308 << 0.1245 << 0.5003 << 0.8754 << 0.9692 << 0.9927 << 0.9985 << 1.0000);
QTest::newRow("OutInExpo") << int(QEasingCurve::OutInExpo)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3754 << 0.4692 << 0.4927 << 0.4985 << 0.5 << 0.5015 << 0.5073 << 0.5308 << 0.6245 << 1);
+ << (RealList() << 0.0000 << 0.3754 << 0.4692 << 0.4927 << 0.4985 << 0.5000 << 0.5015 << 0.5073 << 0.5308 << 0.6245 << 1.0000);
QTest::newRow("InCirc") << int(QEasingCurve::InCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.005013 << 0.0202 << 0.04606 << 0.08348 << 0.134 << 0.2 << 0.2859 << 0.4 << 0.5641 << 1);
+ << (RealList() << 0.0000 << 0.0050 << 0.0202 << 0.0461 << 0.0835 << 0.1340 << 0.2000 << 0.2859 << 0.4000 << 0.5641 << 1.0000);
QTest::newRow("OutCirc") << int(QEasingCurve::OutCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4359 << 0.6 << 0.7141 << 0.8 << 0.866 << 0.9165 << 0.9539 << 0.9798 << 0.995 << 1);
+ << (RealList() << 0.0000 << 0.4359 << 0.6000 << 0.7141 << 0.8000 << 0.8660 << 0.9165 << 0.9539 << 0.9798 << 0.9950 << 1.0000);
QTest::newRow("InOutCirc") << int(QEasingCurve::InOutCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.0101 << 0.04174 << 0.1 << 0.2 << 0.5 << 0.8 << 0.9 << 0.9583 << 0.9899 << 1);
+ << (RealList() << 0.0000 << 0.0101 << 0.0417 << 0.1000 << 0.2000 << 0.5000 << 0.8000 << 0.9000 << 0.9583 << 0.9899 << 1.0000);
QTest::newRow("OutInCirc") << int(QEasingCurve::OutInCirc)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3 << 0.4 << 0.4583 << 0.4899 << 0.5 << 0.5101 << 0.5417 << 0.6 << 0.7 << 1);
+ << (RealList() << 0.0000 << 0.3000 << 0.4000 << 0.4583 << 0.4899 << 0.5000 << 0.5101 << 0.5417 << 0.6000 << 0.7000 << 1.0000);
QTest::newRow("InElastic") << int(QEasingCurve::InElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.001953 << -0.001953 << -0.003906 << 0.01562 << -0.01562 << -0.03125 << 0.125 << -0.125 << -0.25 << 1);
+ << (RealList() << 0.0000 << 0.0020 << -0.0020 << -0.0039 << 0.0156 << -0.0156 << -0.0313 << 0.1250 << -0.1250 << -0.2500 << 1.0000);
QTest::newRow("OutElastic") << int(QEasingCurve::OutElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 1.25 << 1.125 << 0.875 << 1.031 << 1.016 << 0.9844 << 1.004 << 1.002 << 0.998 << 1);
+ << (RealList() << 0.0000 << 1.2500 << 1.1250 << 0.8750 << 1.0313 << 1.0156 << 0.9844 << 1.0039 << 1.0020 << 0.9980 << 1.0000);
QTest::newRow("InOutElastic") << int(QEasingCurve::InOutElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.0009766 << 0.007812 << -0.01563 << -0.0625 << 0.5 << 1.062 << 1.016 << 0.9922 << 1.001 << 1);
+ << (RealList() << 0.0000 << -0.0010 << 0.0078 << -0.0156 << -0.0625 << 0.5000 << 1.0625 << 1.0156 << 0.9922 << 1.0010 << 1.0000);
QTest::newRow("OutInElastic") << int(QEasingCurve::OutInElastic)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.375 << 0.5625 << 0.4922 << 0.498 << 0.5 << 0.4961 << 0.5078 << 0.5313 << 0.25 << 1);
+ << (RealList() << 0.0000 << 0.3750 << 0.5625 << 0.4922 << 0.4980 << 0.5000 << 0.4961 << 0.5078 << 0.5313 << 0.2500 << 1.0000);
QTest::newRow("InBack") << int(QEasingCurve::InBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.01431 << -0.04645 << -0.0802 << -0.09935 << -0.0877 << -0.02903 << 0.09287 << 0.2942 << 0.5912 << 1);
+ << (RealList() << 0.0000 << -0.0143 << -0.0465 << -0.0802 << -0.0994 << -0.0877 << -0.0290 << 0.0929 << 0.2942 << 0.5912 << 1.0000);
QTest::newRow("OutBack") << int(QEasingCurve::OutBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.4088 << 0.7058 << 0.9071 << 1.029 << 1.088 << 1.099 << 1.08 << 1.046 << 1.014 << 1);
+ << (RealList() << 0.0000 << 0.4088 << 0.7058 << 0.9071 << 1.0290 << 1.0877 << 1.0994 << 1.0802 << 1.0465 << 1.0143 << 1.0000);
QTest::newRow("InOutBack") << int(QEasingCurve::InOutBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << -0.03752 << -0.09256 << -0.07883 << 0.08993 << 0.5 << 0.9101 << 1.079 << 1.093 << 1.038 << 1);
+ << (RealList() << 0.0000 << -0.0375 << -0.0926 << -0.0788 << 0.0899 << 0.5000 << 0.9101 << 1.0788 << 1.0926 << 1.0375 << 1.0000);
QTest::newRow("OutInBack") << int(QEasingCurve::OutInBack)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.3529 << 0.5145 << 0.5497 << 0.5232 << 0.5 << 0.4768 << 0.4503 << 0.4855 << 0.6471 << 1);
+ << (RealList() << 0.0000 << 0.3529 << 0.5145 << 0.5497 << 0.5232 << 0.5000 << 0.4768 << 0.4503 << 0.4855 << 0.6471 << 1.0000);
QTest::newRow("InBounce") << int(QEasingCurve::InBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.01188 << 0.06 << 0.06937 << 0.2275 << 0.2344 << 0.09 << 0.3194 << 0.6975 << 0.9244 << 1);
+ << (RealList() << 0.0000 << 0.0119 << 0.0600 << 0.0694 << 0.2275 << 0.2344 << 0.0900 << 0.3194 << 0.6975 << 0.9244 << 1.0000);
QTest::newRow("OutBounce") << int(QEasingCurve::OutBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.07563 << 0.3025 << 0.6806 << 0.91 << 0.7656 << 0.7725 << 0.9306 << 0.94 << 0.9881 << 1);
+ << (RealList() << 0.0000 << 0.0756 << 0.3025 << 0.6806 << 0.9100 << 0.7656 << 0.7725 << 0.9306 << 0.9400 << 0.9881 << 1.0000);
QTest::newRow("InOutBounce") << int(QEasingCurve::InOutBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.03 << 0.1138 << 0.045 << 0.3488 << 0.5 << 0.6512 << 0.955 << 0.8862 << 0.97 << 1);
+ << (RealList() << 0.0000 << 0.0300 << 0.1138 << 0.0450 << 0.3488 << 0.5000 << 0.6512 << 0.9550 << 0.8863 << 0.9700 << 1.0000);
QTest::newRow("OutInBounce") << int(QEasingCurve::OutInBounce)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1513 << 0.41 << 0.2725 << 0.44 << 0.5 << 0.56 << 0.7275 << 0.59 << 0.8488 << 1);
+ << (RealList() << 0.0000 << 0.1513 << 0.4100 << 0.2725 << 0.4400 << 0.5000 << 0.5600 << 0.7275 << 0.5900 << 0.8488 << 1.0000);
QTest::newRow("InCurve") << int(QEasingCurve::InCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.02447 << 0.1059 << 0.2343 << 0.3727 << 0.5 << 0.6055 << 0.7 << 0.8 << 0.9 << 1);
+ << (RealList() << 0.0000 << 0.0245 << 0.1059 << 0.2343 << 0.3727 << 0.5000 << 0.6055 << 0.7000 << 0.8000 << 0.9000 << 1.0000);
QTest::newRow("OutCurve") << int(QEasingCurve::OutCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.1 << 0.2 << 0.3 << 0.3945 << 0.5 << 0.6273 << 0.7657 << 0.8941 << 0.9755 << 1);
+ << (RealList() << 0.0000 << 0.1000 << 0.2000 << 0.3000 << 0.3945 << 0.5000 << 0.6273 << 0.7657 << 0.8941 << 0.9755 << 1.0000);
QTest::newRow("SineCurve") << int(QEasingCurve::SineCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0 << 0.09549 << 0.3455 << 0.6545 << 0.9045 << 1 << 0.9045 << 0.6545 << 0.3455 << 0.09549 << 0);
+ << (RealList() << 0.0000 << 0.0955 << 0.3455 << 0.6545 << 0.9045 << 1.0000 << 0.9045 << 0.6545 << 0.3455 << 0.0955 << 0.0000);
QTest::newRow("CosineCurve") << int(QEasingCurve::CosineCurve)
<< (IntList() << 0 << 10 << 20 << 30 << 40 << 50 << 60 << 70 << 80 << 90 << 100)
- << (RealList() << 0.5 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5 << 0.2061 << 0.02447 << 0.02447 << 0.2061 << 0.5);
+ << (RealList() << 0.5000 << 0.7939 << 0.9755 << 0.9755 << 0.7939 << 0.5000 << 0.2061 << 0.0245 << 0.0245 << 0.2061 << 0.5000);
}
+/*
+ "fixedpoint" number that is scaled up by 10000.
+ This is to work around two bugs (precision and rounding error) in QString::setNum().
+ It does not trim off trailing zeros. This is good, just to emphasize the precision.
+*/
+QString fixedToString(int value)
+{
+ QString str;
+ if (value < 0) {
+ str+= QLatin1Char('-');
+ value = -value;
+ }
+
+ QString digitArg(QLatin1String("%1."));
+ for (int i = 10000; i >= 1; i/=10) {
+ int digit = value/i;
+ value -= digit*i;
+ str.append(digitArg.arg(digit));
+ digitArg = QLatin1String("%1");
+ }
+ return str;
+}
void tst_QEasingCurve::valueForProgress()
{
@@ -390,7 +412,7 @@ void tst_QEasingCurve::valueForProgress()
for (int t = 0; t <= 100; t+= 10) {
qreal ease = curve.valueForProgress(t/qreal(100));
strInputs += QString::fromAscii(" << %1").arg(t);
- strOutputs += " << " + QString().setNum(ease, 'g', 4);
+ strOutputs += " << " + fixedToString(qRound(ease*10000));
}
QString str = QString::fromAscii(" QTest::newRow(\"%1\") << int(QEasingCurve::%2)\n"
" << (IntList() %3)\n"
@@ -409,26 +431,13 @@ void tst_QEasingCurve::valueForProgress()
QFETCH(RealList, expected);
QEasingCurve curve((QEasingCurve::Type)type);
+ // in theory the baseline should't have an error of more than 0.00005 due to how its rounded,
+ // but due to FP imprecision, we have to adjust the error a bit more.
+ const qreal errorBound = 0.00006;
for (int i = 0; i < at.count(); ++i) {
- qreal ease = curve.valueForProgress(at.at(i)/qreal(100));
- // converting ease to 4 precision qreal to match the generated samples
- qreal easeConv = qreal(QString().setNum(ease, 'g', 4).toDouble());
- qreal ex = expected.at(i);
-
- // the least significant digit it is still subject to rounding errors
- qreal error = easeConv - ex;
- qreal errorbound = 0.00001;
-#if defined( Q_OS_WINCE ) || defined( Q_OS_SYMBIAN )
- // exception values for WINCE(this test should be rewritten, as it only freezes the status quo of QEasingCurve
- // The failing (2) values are explicitly excepted here:
- // The source values for the comparison table should remain untruncated double and the
- // error bound checking function dynamic. Also the source values should come from a "trusted" source and not
- // from QEasingCurve itself.
- if ((type == int(QEasingCurve::InOutBounce) && (i == 8 || i == 6) ) || (type == int(QEasingCurve::OutExpo) && i == 2))
- errorbound = 0.0002;
-#endif
- // accept the potential rounding error in the least significant digit
- QVERIFY(error <= errorbound );
+ const qreal ex = expected.at(i);
+ const qreal error = qAbs(ex - curve.valueForProgress(at.at(i)/qreal(100)));
+ QVERIFY(error <= errorBound);
}
#endif
}
diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt
index f70eba5..e9f94c9 100644
--- a/tests/auto/selftests/expected_cmptest.txt
+++ b/tests/auto/selftests/expected_cmptest.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Cmptest *********
-Config: Using QTest library 4.6.0, Qt 4.6.0
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Cmptest::initTestCase()
PASS : tst_Cmptest::compare_boolfuncs()
PASS : tst_Cmptest::compare_pointerfuncs()
diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt
index 55cd0b4..3aced25 100644
--- a/tests/auto/selftests/expected_crashes_3.txt
+++ b/tests/auto/selftests/expected_crashes_3.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Crashes *********
-Config: Using QTest library 4.6.0, Qt 4.6.0
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Crashes::initTestCase()
QFATAL : tst_Crashes::crash() Received signal 11
FAIL! : tst_Crashes::crash() Received a fatal error.
diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt
index 4abdb23..a6ad5d0 100644
--- a/tests/auto/selftests/expected_longstring.txt
+++ b/tests/auto/selftests/expected_longstring.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_LongString *********
-Config: Using QTest library 4.6.0, Qt 4.6.0
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_LongString::initTestCase()
FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.
diff --git a/tests/auto/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt
index 8dae5f7..908bd5d 100644
--- a/tests/auto/selftests/expected_maxwarnings.txt
+++ b/tests/auto/selftests/expected_maxwarnings.txt
@@ -1,5 +1,5 @@
********* Start testing of MaxWarnings *********
-Config: Using QTest library 4.6.0, Qt 4.6.0
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : MaxWarnings::initTestCase()
QWARN : MaxWarnings::warn() 0
QWARN : MaxWarnings::warn() 1
diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt
index 88c0426..4345a6c 100644
--- a/tests/auto/selftests/expected_skip.txt
+++ b/tests/auto/selftests/expected_skip.txt
@@ -1,5 +1,5 @@
********* Start testing of tst_Skip *********
-Config: Using QTest library 4.6.0, Qt 4.6.0
+Config: Using QTest library 4.7.0, Qt 4.7.0
PASS : tst_Skip::initTestCase()
SKIP : tst_Skip::test() skipping all
Loc: [/home/rmcgover/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)]
diff --git a/tests/auto/symbols/tst_symbols.cpp b/tests/auto/symbols/tst_symbols.cpp
index 6103ede..87bd63b 100644
--- a/tests/auto/symbols/tst_symbols.cpp
+++ b/tests/auto/symbols/tst_symbols.cpp
@@ -100,7 +100,6 @@ void tst_Symbols::globalObjects()
#ifndef Q_OS_LINUX
QSKIP("Linux-specific test", SkipAll);
#endif
- QSKIP("Test disabled, we're not fixing these issues in this Qt version", SkipAll);
// these are regexps for global objects that are allowed in Qt
QStringList whitelist = QStringList()
diff --git a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp b/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
index 81064d7..ef54fba 100644
--- a/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
+++ b/tests/benchmarks/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the documentation of the Qt Toolkit.
+** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
diff --git a/tools/assistant/assistant.pro b/tools/assistant/assistant.pro
index 08d0d4b..97196b2 100644
--- a/tools/assistant/assistant.pro
+++ b/tools/assistant/assistant.pro
@@ -3,6 +3,4 @@ CONFIG += ordered
SUBDIRS += lib/fulltextsearch \
lib \
- tools \
- compat \
- compat/lib \ \ No newline at end of file
+ tools
diff --git a/tools/assistant/compat/Info_mac.plist b/tools/assistant/compat/Info_mac.plist
deleted file mode 100644
index b1e6336..0000000
--- a/tools/assistant/compat/Info_mac.plist
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
-<dict>
- <key>CFBundleIconFile</key>
- <string>@ICON@</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <string>Created by Qt/QMake</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleIdentifier</key>
- <string>com.trolltech.assistant-compat</string>
- <key>CFBundleExecutable</key>
- <string>@EXECUTABLE@</string>
-</dict>
-</plist>
diff --git a/tools/assistant/compat/assistant.icns b/tools/assistant/compat/assistant.icns
deleted file mode 100644
index 6291dd3..0000000
--- a/tools/assistant/compat/assistant.icns
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/assistant.ico b/tools/assistant/compat/assistant.ico
deleted file mode 100644
index 9e1b83f..0000000
--- a/tools/assistant/compat/assistant.ico
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/assistant.pro b/tools/assistant/compat/assistant.pro
deleted file mode 100644
index e865d6b..0000000
--- a/tools/assistant/compat/assistant.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- !wince*:LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
- QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/assistant.qrc b/tools/assistant/compat/assistant.qrc
deleted file mode 100644
index dae1f48..0000000
--- a/tools/assistant/compat/assistant.qrc
+++ /dev/null
@@ -1,37 +0,0 @@
-<RCC>
- <qresource prefix="/trolltech/assistant" >
- <file>images/assistant-128.png</file>
- <file>images/assistant.png</file>
- <file>images/close.png</file>
- <file>images/designer.png</file>
- <file>images/linguist.png</file>
- <file>images/mac/addtab.png</file>
- <file>images/mac/book.png</file>
- <file>images/mac/closetab.png</file>
- <file>images/mac/editcopy.png</file>
- <file>images/mac/find.png</file>
- <file>images/mac/home.png</file>
- <file>images/mac/next.png</file>
- <file>images/mac/prev.png</file>
- <file>images/mac/print.png</file>
- <file>images/mac/synctoc.png</file>
- <file>images/mac/whatsthis.png</file>
- <file>images/mac/zoomin.png</file>
- <file>images/mac/zoomout.png</file>
- <file>images/qt.png</file>
- <file>images/win/addtab.png</file>
- <file>images/win/book.png</file>
- <file>images/win/closetab.png</file>
- <file>images/win/editcopy.png</file>
- <file>images/win/find.png</file>
- <file>images/win/home.png</file>
- <file>images/win/next.png</file>
- <file>images/win/previous.png</file>
- <file>images/win/print.png</file>
- <file>images/win/synctoc.png</file>
- <file>images/win/whatsthis.png</file>
- <file>images/win/zoomin.png</file>
- <file>images/win/zoomout.png</file>
- <file>images/wrap.png</file>
- </qresource>
-</RCC>
diff --git a/tools/assistant/compat/assistant.rc b/tools/assistant/compat/assistant.rc
deleted file mode 100644
index b4786ce..0000000
--- a/tools/assistant/compat/assistant.rc
+++ /dev/null
@@ -1 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "assistant.ico"
diff --git a/tools/assistant/compat/compat.pro b/tools/assistant/compat/compat.pro
deleted file mode 100644
index 1086f4c..0000000
--- a/tools/assistant/compat/compat.pro
+++ /dev/null
@@ -1,84 +0,0 @@
-include($$QT_SOURCE_TREE/tools/shared/fontpanel/fontpanel.pri)
-
-TEMPLATE = app
-LANGUAGE = C++
-TARGET = assistant_adp
-
-CONFIG += qt warn_on
-
-unix:contains(QT_CONFIG, dbus):QT += dbus
-
-build_all:!build_pass {
- CONFIG -= build_all
- CONFIG += release
-}
-QT += xml network
-
-PROJECTNAME = Assistant
-DESTDIR = ../../../bin
-
-FORMS += helpdialog.ui \
- mainwindow.ui \
- tabbedbrowser.ui \
- topicchooser.ui
-
-SOURCES += main.cpp \
- helpwindow.cpp \
- topicchooser.cpp \
- docuparser.cpp \
- index.cpp \
- profile.cpp \
- config.cpp \
- helpdialog.cpp \
- mainwindow.cpp \
- tabbedbrowser.cpp \
- fontsettingsdialog.cpp
-
-HEADERS += helpwindow.h \
- topicchooser.h \
- docuparser.h \
- index.h \
- profile.h \
- helpdialog.h \
- mainwindow.h \
- tabbedbrowser.h \
- config.h \
- fontsettingsdialog.h
-
-RESOURCES += assistant.qrc
-
-contains(QT_PRODUCT, OpenSource.*):DEFINES *= QT_OPENSOURCE
-DEFINES += QT_KEYWORDS
-#DEFINES += QT_PALMTOPCENTER_DOCS
-
-win32 {
- LIBS += -lshell32
- RC_FILE = assistant.rc
-}
-
-mac {
- ICON = assistant.icns
- TARGET = Assistant_adp
-# QMAKE_INFO_PLIST = Info_mac.plist
-}
-
-target.path=$$[QT_INSTALL_BINS]
-INSTALLS += target
-
-TRANSLATIONS = assistant_de.ts
-
-unix:!contains(QT_CONFIG, zlib):LIBS += -lz
-
-contains(CONFIG, static): {
- win32 {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.lib) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- } else {
- exists($$[QT_INSTALL_PLUGINS]/imageformats/qjpeg.a) {
- QTPLUGIN += qjpeg
- DEFINES += USE_STATIC_JPEG_PLUGIN
- }
- }
-}
diff --git a/tools/assistant/compat/config.cpp b/tools/assistant/compat/config.cpp
deleted file mode 100644
index d01ae6a..0000000
--- a/tools/assistant/compat/config.cpp
+++ /dev/null
@@ -1,438 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "config.h"
-#include "profile.h"
-#include "docuparser.h"
-
-#include <QApplication>
-#include <QDesktopWidget>
-#include <QLibraryInfo>
-#include <QFont>
-#include <QFontInfo>
-#include <QDir>
-#include <QFile>
-#include <QFileInfo>
-#include <QSettings>
-#include <QList>
-
-QT_BEGIN_NAMESPACE
-
-static Config *static_configuration = 0;
-
-inline QString getVersionString()
-{
- return QString::number( (QT_VERSION >> 16) & 0xff )
- + QLatin1String(".") + QString::number( (QT_VERSION >> 8) & 0xff );
-}
-
-Config::Config()
- : profil( 0 ), hideSidebar( false ), rebuildDocs(true)
-{
- if( !static_configuration ) {
- static_configuration = this;
- } else {
- qWarning( "Multiple configurations not allowed!" );
- }
-}
-
-Config *Config::loadConfig(const QString &profileFileName)
-{
- Config *config = new Config();
-
- if (profileFileName.isEmpty()) { // no profile
- if (!config->defaultProfileExists()) {
- config->profil = Profile::createDefaultProfile();
- config->saveProfile(config->profil);
- } else {
- config->profil = new Profile();
- }
- config->loadDefaultProfile();
- config->load();
- return config;
- }
-
- QFile file(profileFileName);
- if (!file.exists()) {
- qWarning( "File does not exist: %s", qPrintable(profileFileName) );
- return 0;
- }
- DocuParser *parser = DocuParser::createParser( profileFileName );
- if (!parser) {
- qWarning( "Failed to create parser for file: %s", qPrintable(profileFileName) );
- return 0;
- }
- if (parser->parserVersion() < DocuParser::Qt320) {
- qWarning( "File does not contain profile information" );
- return 0;
- }
- DocuParser320 *profileParser = static_cast<DocuParser320*>(parser);
- parser->parse(&file);
- config->profil = profileParser->profile();
- if (!config->profil) {
- qWarning( "Config::loadConfig(), no profile in: %s", qPrintable(profileFileName) );
- return 0;
- }
- config->profil->setProfileType(Profile::UserProfile);
- config->profil->setDocuParser(profileParser);
- config->load();
- return config;
-}
-
-Config *Config::configuration()
-{
- Q_ASSERT( static_configuration );
- return static_configuration;
-}
-
-void Config::load()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- bool isDefaultProfile = profil->props[QLatin1String("name")] == QLatin1String("default");
- const QString pKey = isDefaultProfile ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- home = profil->props[QLatin1String("startpage")];;
- if (home.isEmpty() && isDefaultProfile)
- home = QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html/index.html");
- src = settings.value( profkey + QLatin1String("Source") ).toStringList();
- sideBar = settings.value( key + QLatin1String("SideBarPage") ).toInt();
- if (qApp->type() != QApplication::Tty)
- winGeometry = settings.value(key + QLatin1String("windowGeometry")).toByteArray();
-
- mainWinState = settings.value(key + QLatin1String("MainWindowState")).toByteArray();
- pointFntSize = settings.value(key + QLatin1String("FontSize"), qApp->font().pointSizeF()).toDouble();
- rebuildDocs = settings.value( key + QLatin1String("RebuildDocDB"), true ).toBool();
-
- profileNames = settings.value( key + QLatin1String("Profile") ).toStringList();
-
- m_fontSettings.windowFont = qVariantValue<QFont>(settings.value(key + QLatin1String("windowfont"), qApp->font()));
- m_fontSettings.browserFont = qVariantValue<QFont>(settings.value(key + QLatin1String("browserfont"), qApp->font()));
- m_fontSettings.useWindowFont = settings.value(key + QLatin1String("usewindowfont"), false).toBool();
- m_fontSettings.useBrowserFont = settings.value(key + QLatin1String("usebrowserfont"), false).toBool();
- m_fontSettings.windowWritingSystem = static_cast<QFontDatabase::WritingSystem>(
- settings.value(key + QLatin1String("windowwritingsystem"), QFontDatabase::Latin).toInt());
- m_fontSettings.browserWritingSystem = static_cast<QFontDatabase::WritingSystem>(
- settings.value(key + QLatin1String("browserwritingsystem"), QFontDatabase::Latin).toInt());
-
- m_fontSettings.browserFont.setPointSizeF(pointFntSize);
-}
-
-void Config::save()
-{
- saveSettings();
- saveProfile( profil );
-}
-
-void Config::saveSettings()
-{
- const QString key = getVersionString() + QLatin1String("/");
-
- const QString pKey = (profil->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profkey = pKey + QLatin1String("/Profile/") + profil->props[QLatin1String("name")] + QLatin1String("/");
-
- QSettings settings;
-
- settings.setValue( profkey + QLatin1String("Source"), src );
- settings.setValue( key + QLatin1String("SideBarPage"), sideBarPage() );
- if (qApp->type() != QApplication::Tty)
- settings.setValue(key + QLatin1String("windowGeometry"), winGeometry);
-
- settings.setValue( key + QLatin1String("MainWindowState"), mainWinState );
- settings.setValue( key + QLatin1String("FontSize"), pointFntSize);
- settings.setValue( key + QLatin1String("RebuildDocDB"), rebuildDocs );
-
- settings.setValue(key + QLatin1String("windowfont"), m_fontSettings.windowFont);
- settings.setValue(key + QLatin1String("browserfont"), m_fontSettings.browserFont);
- settings.setValue(key + QLatin1String("usewindowfont"), m_fontSettings.useWindowFont);
- settings.setValue(key + QLatin1String("usebrowserfont"), m_fontSettings.useBrowserFont);
- settings.setValue(key + QLatin1String("windowwritingsystem"), m_fontSettings.windowWritingSystem);
- settings.setValue(key + QLatin1String("browserwritingsystem"), m_fontSettings.browserWritingSystem);
-}
-
-#ifdef ASSISTANT_DEBUG
-static void dumpmap( const QMap<QString,QString> &m, const QString &header )
-{
- qDebug( header );
- QMap<QString,QString>::ConstIterator it = m.begin();
- while (it != m.end()) {
- qDebug( " " + it.key() + ":\t\t" + *it );
- ++it;
- }
-}
-#endif
-
-bool Config::defaultProfileExists()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (settings.contains(profKey + QLatin1String("DocFiles"))
- && settings.contains(profKey + QLatin1String("Titles"))
- && settings.contains(profKey + QLatin1String("ImageDirs"))) {
- QStringList dcfs = settings.value(profKey + QLatin1String("DocFiles") ).toStringList();
- foreach (QString file, dcfs) {
- if (file == Profile::storableFilePath(file))
- return true;
- }
- }
- return false;
-}
-
-void Config::loadDefaultProfile()
-{
- QSettings settings;
- const QString profKey = QLatin1String(QT_VERSION_STR) + QLatin1String("/Profile/default/");
-
- if (!defaultProfileExists())
- return;
-
- // Override the defaults with settings in registry.
- profil->icons.clear();
- profil->indexPages.clear();
- profil->imageDirs.clear();
- profil->docs.clear();
- profil->dcfTitles.clear();
-
- QStringList titles = settings.value( profKey + QLatin1String("Titles") ).toStringList();
- QStringList iconLst = settings.value( profKey + QLatin1String("DocIcons") ).toStringList();
- QStringList indexLst = settings.value( profKey + QLatin1String("IndexPages") ).toStringList();
- QStringList imgDirLst = settings.value( profKey + QLatin1String("ImageDirs") ).toStringList();
- QStringList dcfs = settings.value( profKey + QLatin1String("DocFiles") ).toStringList();
- profil->props[QLatin1String("name")] = QLatin1String("default");
-
- QString filePath;
- QStringList::ConstIterator it = titles.constBegin();
- QStringList::ConstIterator iconIt = iconLst.constBegin();
- QStringList::ConstIterator indexIt = indexLst.constBegin();
- QStringList::ConstIterator imageIt = imgDirLst.constBegin();
- QStringList::ConstIterator dcfIt = dcfs.constBegin();
- while((it != titles.constEnd())
- && (iconIt != iconLst.constEnd())
- && (indexIt != indexLst.constEnd())
- && (imageIt != imgDirLst.constEnd())
- && (dcfIt != dcfs.constEnd())) {
- profil->addDCFIcon( *it, *iconIt );
- profil->addDCFIndexPage(*it, Profile::loadableFilePath(*indexIt));
- profil->addDCFImageDir( *it, *imageIt );
- profil->addDCFTitle(Profile::loadableFilePath(*dcfIt), *it);
- ++it, ++iconIt, ++indexIt, ++imageIt, ++dcfIt;
- }
-#if ASSISTANT_DEBUG
- dumpmap( profil->icons, QLatin1String("Icons") );
- dumpmap( profil->indexPages, QLatin1String("IndexPages") );
- dumpmap( profil->imageDirs, QLatin1String("ImageDirs") );
- dumpmap( profil->dcfTitles, QLatin1String("dcfTitles") );
- qDebug( "Docfiles: \n " + profil->docs.join( "\n " ) );
-#endif
-}
-
-void Config::saveProfile( Profile *profile )
-{
- if (profil->profileType() == Profile::UserProfile)
- return;
-
- const QString key = (profile->props[QLatin1String("name")] == QLatin1String("default"))
- ? QString::fromLatin1(QT_VERSION_STR)
- : getVersionString();
-
- const QString profKey = key + QLatin1String("/Profile/") + profile->props[QLatin1String("name")] + QLatin1String("/");
-
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QStringList indexes, icons, imgDirs, dcfs;
- QStringList titles = profile->dcfTitles.keys();
- QStringList::ConstIterator it = titles.constBegin();
- QString filePath;
- for ( ; it != titles.constEnd(); ++it ) {
-
- indexes << Profile::storableFilePath(profile->indexPages[*it]);
- icons << profile->icons[*it];
- imgDirs << profile->imageDirs[*it];
- dcfs << Profile::storableFilePath(profile->dcfTitles[*it]);
- }
-
- QSettings settings;
- settings.setValue( profKey + QLatin1String("Titles"), titles );
- settings.setValue( profKey + QLatin1String("DocFiles"), dcfs );
- settings.setValue( profKey + QLatin1String("IndexPages"), indexes );
- settings.setValue( profKey + QLatin1String("DocIcons"), icons );
- settings.setValue( profKey + QLatin1String("ImageDirs"), imgDirs );
-
-#if ASSISTANT_DEBUG
- qDebug() << "Titles:\n - " << ((QStringList*)&titles)->join("\n - ");
- qDebug() << "Docfiles:\n - " << dcfs.join("\n - " );
- qDebug() << "IndexPages:\n - " << indexes.join("\n - ");
- qDebug() << "DocIcons:\n - " << icons.join("\n - " );
- qDebug() << "ImageDirs:\n - " << imgDirs.join("\n - " );
-#endif
-}
-
-QStringList Config::mimePaths()
-{
- static QStringList lst;
-
- if( lst.count() > 0 )
- return lst;
-
- for (QMap<QString,QString>::ConstIterator it = profil->dcfTitles.constBegin();
- it != profil->dcfTitles.constEnd(); ++it ) {
-
- // Mime source for .dcf file path
- QFileInfo info( *it );
- QString dcfPath = info.absolutePath();
- if (!lst.contains(dcfPath))
- lst << dcfPath;
-
- // Image dir for .dcf
- QString imgDir = QDir::toNativeSeparators( dcfPath + QDir::separator()
- + profil->imageDirs[it.key()] );
- if (!lst.contains(imgDir))
- lst << imgDir;
- }
- return lst;
-}
-
-QStringList Config::profiles() const
-{
- return profileNames;
-}
-
-QString Config::title() const
-{
- QString s = profil->props[QLatin1String("title")];
- if (s.isEmpty())
- s = QObject::tr("Qt Assistant by Nokia");
- return s;
-}
-
-QString Config::aboutApplicationMenuText() const
-{
- return profil->props[QLatin1String("aboutmenutext")];
-}
-
-QString Config::aboutURL() const
-{
- return profil->props[QLatin1String("abouturl")];
-}
-
-QString Config::homePage() const
-{
- return home.isEmpty() ? profil->props[QLatin1String("startpage")] : home;
-}
-
-QStringList Config::source() const
-{
- return src.size() == 0 ? QStringList(profil->props[QLatin1String("startpage")]) : src;
-}
-
-QStringList Config::docFiles() const
-{
- return profil->docs;
-}
-
-QPixmap Config::docIcon( const QString &title ) const
-{
- // ### To allow qdoc generated dcf files to reference the doc icons from qmake_image_col
- QString name = profil->icons[title];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QPixmap Config::applicationIcon() const
-{
- QString name = profil->props[QLatin1String("applicationicon")];
- QString resName = QLatin1String(":/trolltech/assistant/images/") + name;
-
- if (QFile::exists(resName))
- return QPixmap(resName);
-
- if (name.startsWith(QLatin1String("file:")))
- name = name.mid(5);
- return QPixmap(name);
-}
-
-QStringList Config::docTitles() const
-{
- return QStringList(profil->indexPages.keys());
-}
-
-QString Config::docImageDir( const QString &docfile ) const
-{
- return profil->imageDirs[docfile];
-}
-
-QString Config::indexPage( const QString &title ) const
-{
- return profil->indexPages[title];
-}
-
-void Config::hideSideBar( bool b )
-{
- hideSidebar = b;
-}
-
-bool Config::sideBarHidden() const
-{
- return hideSidebar;
-}
-
-QString Config::assistantDocPath() const
-{
- return profil->props[QLatin1String("assistantdocs")].isEmpty()
- ? QLibraryInfo::location(QLibraryInfo::DocumentationPath) + QLatin1String("/html")
- : profil->props[QLatin1String("assistantdocs")];
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/config.h b/tools/assistant/compat/config.h
deleted file mode 100644
index 3901214..0000000
--- a/tools/assistant/compat/config.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "profile.h"
-
-#include <QString>
-#include <QStringList>
-#include <QPixmap>
-#include <QMap>
-
-#include <QtGui/QFont>
-#include <QtGui/QFontDatabase>
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct FontSettings
-{
- FontSettings() : useWindowFont(false), useBrowserFont(false),
- windowWritingSystem(QFontDatabase::Latin), browserWritingSystem(QFontDatabase::Latin)
- { }
-
- QFont windowFont;
- QFont browserFont;
-
- bool useWindowFont;
- bool useBrowserFont;
-
- QFontDatabase::WritingSystem windowWritingSystem;
- QFontDatabase::WritingSystem browserWritingSystem;
-};
-
-class Config
-{
-public:
-
- Config();
-
- void load();
- void save();
- Profile *profile() const { return profil; }
- QString profileName() const { return profil->props[QLatin1String("name")]; }
- bool validProfileName() const;
- void hideSideBar( bool b );
- bool sideBarHidden() const;
- QStringList mimePaths();
-
- // From profile, read only
- QStringList docFiles() const;
- QStringList docTitles() const;
- QString indexPage( const QString &title ) const;
- QString docImageDir( const QString &title ) const;
- QPixmap docIcon( const QString &title ) const;
-
- QStringList profiles() const;
- QString title() const;
- QString aboutApplicationMenuText() const;
- QString aboutURL() const;
- QPixmap applicationIcon() const;
-
- // From QSettings, read / write
- QString homePage() const;
- void setHomePage( const QString &hom ) { home = hom; }
-
- QStringList source() const;
- void setSource( const QStringList &s ) { src = s; }
-
- int sideBarPage() const { return sideBar; }
- void setSideBarPage( int sbp ) { sideBar = sbp; }
-
- QByteArray windowGeometry() const { return winGeometry; }
- void setWindowGeometry( const QByteArray &geometry ) { winGeometry = geometry; }
-
- QByteArray mainWindowState() const { return mainWinState; }
- void setMainWindowState( const QByteArray &state ) { mainWinState = state; }
-
- qreal fontPointSize() const { return pointFntSize; }
- void setFontPointSize(qreal size)
- {
- pointFntSize = size;
- m_fontSettings.useBrowserFont = true;
- m_fontSettings.browserFont.setPointSizeF(size);
- }
-
- FontSettings fontSettings() { return m_fontSettings; }
- void setFontSettings(const FontSettings &settings) { m_fontSettings = settings; }
-
- QString assistantDocPath() const;
-
- bool docRebuild() const { return rebuildDocs; }
- void setDocRebuild( bool rb ) { rebuildDocs = rb; }
-
- void saveProfile( Profile *profile );
- void loadDefaultProfile();
- bool defaultProfileExists();
-
- static Config *configuration();
- static Config *loadConfig(const QString &profileFileName);
-
-private:
- Config( const Config &c );
- Config& operator=( const Config &c );
-
- void saveSettings();
-
-private:
- Profile *profil;
-
- QStringList profileNames;
- QString home;
- QStringList src;
- QByteArray mainWinState;
- QByteArray winGeometry;
- qreal pointFntSize;
- int sideBar;
- bool hideSidebar;
- bool rebuildDocs;
- FontSettings m_fontSettings;
-};
-
-QT_END_NAMESPACE
-
-#endif // CONFIG_H
diff --git a/tools/assistant/compat/docuparser.cpp b/tools/assistant/compat/docuparser.cpp
deleted file mode 100644
index 80fe50c..0000000
--- a/tools/assistant/compat/docuparser.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "docuparser.h"
-#include "profile.h"
-
-#include <QDir>
-#include <QFile>
-#include <QFileInfo>
-#include <QRegExp>
-#include <QString>
-#include <QDataStream>
-
-QT_BEGIN_NAMESPACE
-
-QDataStream &operator>>(QDataStream &s, ContentItem &ci)
-{
- s >> ci.title;
- s >> ci.reference;
- s >> ci.depth;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const ContentItem &ci)
-{
- s << ci.title;
- s << ci.reference;
- s << ci.depth;
- return s;
-}
-
-const QString DocuParser::DocumentKey = QLatin1String("/Qt Assistant/") + QLatin1String(QT_VERSION_STR) + QLatin1String("/");
-
-DocuParser *DocuParser::createParser(const QString &fileName)
-{
- QFile file(fileName);
- if(!file.open(QFile::ReadOnly)) {
- return 0;
- }
-
- QString str;
- int maxlen = 1024;
- int majVer = 0, minVer = 0, serVer = 0;
- static QRegExp re(QLatin1String("assistantconfig +version=\"(\\d)\\.(\\d)\\.(\\d)\""), Qt::CaseInsensitive);
- Q_ASSERT(re.isValid());
- while(!(str = QLatin1String(file.readLine(maxlen))).isEmpty()) {
- if(re.indexIn(str) >= 0) {
- majVer = re.cap(1).toInt();
- minVer = re.cap(2).toInt();
- serVer = re.cap(3).toInt();
- break;
- }
- }
-
- if (majVer < 3 || (majVer == 3 && minVer < 2)) {
- return new DocuParser310;
- }
-
- return new DocuParser320;
-}
-
-
-bool DocuParser::parse(QFile *file)
-{
- QXmlInputSource source(file);
- QXmlSimpleReader reader;
- reader.setContentHandler(this);
- reader.setErrorHandler(this);
- setFileName(QFileInfo(*file).absoluteFilePath());
- return reader.parse(source);
-}
-
-
-QString DocuParser::errorProtocol() const
-{
- return errorProt;
-}
-
-
-QList<ContentItem> DocuParser::getContentItems()
-{
- return contentList;
-}
-
-
-QList<IndexItem*> DocuParser::getIndexItems()
-{
- return indexList;
-}
-
-QString DocuParser::absolutify(const QString &name, bool makeUrl) const
-{
- if (!name.isEmpty()) {
- QString s = name;
- s.replace(QLatin1String("\\"), QLatin1String("/"));
- QFileInfo orgPath(name);
- if(orgPath.isRelative())
- s = QFileInfo(fname).path() + QLatin1Char('/') + name;
- if (makeUrl)
- s.prepend(QLatin1String("file:"));
- return s;
- }
- return name;
-}
-
-
-void DocuParser310::addTo(Profile *p)
-{
- p->addDCFTitle(fname, docTitle);
- p->addDCFIcon(docTitle, iconName);
- p->addDCFIndexPage(docTitle, conURL);
-}
-
-
-bool DocuParser310::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
-
- contentList.clear();
- qDeleteAll(indexList);
- indexList.clear();
-
- return true;
-}
-
-
-bool DocuParser310::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- if (qname == QLatin1String("DCF") && state == StateInit) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")), false);
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")), false);
- contentList.append(ContentItem(docTitle, absolutify(contentRef), depth));
- } else if (qname == QLatin1String("section") && (state == StateContent || state == StateSect)) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- } else if (qname == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- } else
- return false;
- return true;
-}
-
-bool DocuParser310::endElement(const QString &nameSpace, const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateContent:
- state = StateInit;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- default:
- break;
- }
- return true;
-}
-
-
-bool DocuParser310::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- default:
- return false;
- }
- return true;
-}
-
-
-bool DocuParser310::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
-
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-
-DocuParser320::DocuParser320()
- : prof(new Profile)
-{
-}
-
-
-void DocuParser320::addTo(Profile *p)
-{
- QMap<QString,QString>::ConstIterator it;
-
- for (it = prof->dcfTitles.constBegin(); it != prof->dcfTitles.constEnd(); ++it)
- p->dcfTitles[it.key()] = *it;
-
- for (it = prof->icons.constBegin(); it != prof->icons.constEnd(); ++it)
- p->icons[it.key()] = *it;
-
- for (it = prof->indexPages.constBegin(); it != prof->indexPages.constEnd(); ++it)
- p->indexPages[it.key()] = *it;
-}
-
-
-bool DocuParser320::startDocument()
-{
- state = StateInit;
- errorProt = QLatin1String("");
-
- contentRef = QLatin1String("");
- indexRef = QLatin1String("");
- depth = 0;
- contentList.clear();
- indexList.clear();
-
- prof->addDCF(fname);
-
- return true;
-}
-
-bool DocuParser320::startElement(const QString &, const QString &,
- const QString &qname,
- const QXmlAttributes &attr)
-{
- QString lower = qname.toLower();
-
- switch(state) {
-
- case StateInit:
- if(lower == QLatin1String("assistantconfig"))
- state = StateDocRoot;
- break;
-
- case StateDocRoot:
- if(lower == QLatin1String("dcf")) {
- state = StateContent;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- conURL = contentRef;
- docTitle = attr.value(QLatin1String("title"));
- iconName = absolutify(attr.value(QLatin1String("icon")));
- contentList.append(ContentItem(docTitle, contentRef, depth));
- } else if(lower == QLatin1String("profile")) {
- state = StateProfile;
- }
- break;
-
- case StateSect:
- if (lower == QLatin1String("keyword") && state == StateSect) {
- state = StateKeyword;
- indexRef = absolutify(attr.value(QLatin1String("ref")));
- break;
- } // else if (lower == "section")
- case StateContent:
- if(lower == QLatin1String("section")) {
- state = StateSect;
- contentRef = absolutify(attr.value(QLatin1String("ref")));
- title = attr.value(QLatin1String("title"));
- depth++;
- contentList.append(ContentItem(title, contentRef, depth));
- }
- break;
-
- case StateProfile:
- if(lower == QLatin1String("property")) {
- state = StateProperty;
- propertyName = attr.value(QLatin1String("name"));
- }
- break;
-
- case StateProperty:
- break;
-
- default:
- break;
- }
-
- return true;
-}
-
-bool DocuParser320::endElement(const QString &nameSpace,
- const QString &localName,
- const QString &qName)
-{
- Q_UNUSED(nameSpace);
- Q_UNUSED(localName);
- Q_UNUSED(qName);
-
- switch(state) {
- case StateInit:
- break;
- case StateDocRoot:
- state = StateInit;
- break;
- case StateProfile:
- state = StateDocRoot;
- break;
- case StateProperty:
- state = StateProfile;
- if(propertyName.isEmpty() || propertyValue.isEmpty())
- return false;
- {
- static const QStringList lst = QStringList()
- << QLatin1String("startpage") << QLatin1String("abouturl")
- << QLatin1String("applicationicon") << QLatin1String("assistantdocs");
-
- if (lst.contains(propertyName))
- propertyValue = absolutify(propertyValue);
- }
- prof->addProperty(propertyName, propertyValue);
- break;
- case StateContent:
- if(!iconName.isEmpty())
- prof->addDCFIcon(docTitle, iconName);
- if(contentRef.isEmpty())
- return false;
- prof->addDCFIndexPage(docTitle, conURL);
- prof->addDCFTitle(fname, docTitle);
- state = StateDocRoot;
- break;
- case StateSect:
- state = --depth ? StateSect : StateContent;
- break;
- case StateKeyword:
- state = StateSect;
- break;
- }
- return true;
-}
-
-bool DocuParser320::characters(const QString& ch)
-{
- QString str = ch.simplified();
- if (str.isEmpty())
- return true;
-
- switch (state) {
- case StateInit:
- case StateContent:
- case StateSect:
- return false;
- break;
- case StateKeyword:
- indexList.append(new IndexItem(str, indexRef));
- break;
- case StateProperty:
- propertyValue = ch;
- break;
- default:
- return false;
- }
- return true;
-}
-
-bool DocuParser320::fatalError(const QXmlParseException& exception)
-{
- errorProt += QString::fromLatin1("fatal parsing error: %1 in line %2, column %3\n")
- .arg(exception.message())
- .arg(exception.lineNumber())
- .arg(exception.columnNumber());
- return QXmlDefaultHandler::fatalError(exception);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/docuparser.h b/tools/assistant/compat/docuparser.h
deleted file mode 100644
index 290222f..0000000
--- a/tools/assistant/compat/docuparser.h
+++ /dev/null
@@ -1,166 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DOCUPARSER_H
-#define DOCUPARSER_H
-
-#include <QList>
-#include <QMap>
-#include <QXmlDefaultHandler>
-#include <QXmlAttributes>
-#include <QXmlParseException>
-
-QT_BEGIN_NAMESPACE
-
-class Profile;
-
-struct ContentItem {
- ContentItem()
- : title( QString() ), reference( QString() ), depth( 0 ) {}
- ContentItem( const QString &t, const QString &r, int d )
- : title( t ), reference( r ), depth( d ) {}
- QString title;
- QString reference;
- int depth;
- Q_DUMMY_COMPARISON_OPERATOR(ContentItem)
-};
-
-QDataStream &operator>>( QDataStream &s, ContentItem &ci );
-QDataStream &operator<<( QDataStream &s, const ContentItem &ci );
-
-struct IndexItem {
- IndexItem( const QString &k, const QString &r )
- : keyword( k ), reference( r ) {}
- QString keyword;
- QString reference;
-};
-
-
-
-class DocuParser : public QXmlDefaultHandler
-{
-public:
- enum ParserVersion { Qt310, Qt320 };
- // Since We don't want problems with documentation
- // from version to version, this string stores the correct
- // version string to save documents.
- static const QString DocumentKey;
-
- static DocuParser *createParser( const QString &fileName );
-
- virtual bool parse( QFile *file );
-
- QList<ContentItem> getContentItems();
- QList<IndexItem*> getIndexItems();
-
- QString errorProtocol() const;
- QString contentsURL() const { return conURL; }
-
- virtual ParserVersion parserVersion() const = 0;
- virtual void addTo( Profile *p ) = 0;
-
- QString fileName() const { return fname; }
- void setFileName( const QString &file ) { fname = file; }
-
-protected:
- QString absolutify( const QString &input, bool makeUrl = true ) const;
-
- QString contentRef, indexRef, errorProt, conURL;
- QString docTitle, title, iconName;
- QList<ContentItem> contentList;
- QList<IndexItem*> indexList;
- QString fname;
-};
-
-
-class DocuParser310 : public DocuParser
-{
-public:
- enum States{ StateInit, StateContent, StateSect, StateKeyword };
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt310; }
- virtual void addTo( Profile *p );
-
-private:
- States state;
- int depth;
-};
-
-
-class DocuParser320 : public DocuParser
-{
-public:
- enum States { StateInit, StateDocRoot, StateProfile, StateProperty,
- StateContent, StateSect, StateKeyword };
-
- DocuParser320();
-
- bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
- bool fatalError( const QXmlParseException& exception );
-
- virtual ParserVersion parserVersion() const { return Qt320; }
- virtual void addTo( Profile *p );
- Profile *profile() const { return prof; }
-
-private:
-
- States state;
- int depth;
- int docfileCounter;
- QString propertyValue;
- QString propertyName;
- Profile *prof;
-};
-
-QT_END_NAMESPACE
-
-#endif // DOCUPARSER_H
diff --git a/tools/assistant/compat/fontsettingsdialog.cpp b/tools/assistant/compat/fontsettingsdialog.cpp
deleted file mode 100644
index ab338db..0000000
--- a/tools/assistant/compat/fontsettingsdialog.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "fontsettingsdialog.h"
-#include "fontpanel.h"
-#include "config.h"
-
-#include <QtGui/QLabel>
-#include <QtGui/QComboBox>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QApplication>
-#include <QtGui/QStackedWidget>
-#include <QtGui/QDialogButtonBox>
-
-QT_BEGIN_NAMESPACE
-
-FontSettingsDialog::FontSettingsDialog(QWidget *parent)
- : QDialog(parent)
- , m_windowFontPanel(new FontPanel(this))
- , m_browserFontPanel(new FontPanel(this))
- , m_dialogButtonBox(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
-{
- setModal(true);
- setWindowTitle(tr("Font Settings"));
- setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
-
- QVBoxLayout *mainVLayout = new QVBoxLayout(this);
- QHBoxLayout *hboxLayout = new QHBoxLayout;
- mainVLayout->addLayout(hboxLayout);
-
- QLabel *label = new QLabel(tr("Font settings for:"), this);
- label->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
- hboxLayout->addWidget(label);
- QComboBox *comboBox = new QComboBox(this);
- comboBox->addItem(tr("Browser"));
- comboBox->addItem(tr("Application"));
- hboxLayout->addWidget(comboBox);
-
- m_windowFontPanel->setCheckable(true);
- m_browserFontPanel->setCheckable(true);
-
- const QString customSettings(tr("Use custom settings"));
- m_windowFontPanel->setTitle(customSettings);
- m_browserFontPanel->setTitle(customSettings);
-
- QStackedWidget *stackWidget = new QStackedWidget(this);
- stackWidget->addWidget(m_browserFontPanel);
- stackWidget->addWidget(m_windowFontPanel);
-
- mainVLayout->addWidget(stackWidget);
- mainVLayout->addWidget(m_dialogButtonBox);
-
- connect(m_dialogButtonBox , SIGNAL(rejected()), this, SLOT(reject()));
- connect(m_dialogButtonBox , SIGNAL(accepted()), this, SLOT(accept()));
- connect(comboBox, SIGNAL(activated(int)), stackWidget, SLOT(setCurrentIndex(int)));
-}
-
-FontSettingsDialog::~FontSettingsDialog()
-{
- // nothing todo
-}
-
-bool FontSettingsDialog::showDialog(FontSettings *settings)
-{
- setupFontSettingsDialog(settings);
-
- if (exec() != Accepted)
- return false;
-
- updateFontSettings(settings);
- return true;
-}
-
-void FontSettingsDialog::updateFontSettings(FontSettings *settings)
-{
- settings->useWindowFont = m_windowFontPanel->isChecked();
- settings->useBrowserFont = m_browserFontPanel->isChecked();
-
- settings->windowFont = settings->useWindowFont ? m_windowFontPanel->selectedFont() : qApp->font();
- settings->browserFont = settings->useBrowserFont ? m_browserFontPanel->selectedFont() : qApp->font();
-
- settings->windowWritingSystem = settings->useWindowFont ? m_windowFontPanel->writingSystem() : QFontDatabase::Latin;
- settings->browserWritingSystem = settings->useBrowserFont ? m_browserFontPanel->writingSystem() : QFontDatabase::Latin;
-}
-
-void FontSettingsDialog::setupFontSettingsDialog(const FontSettings *settings)
-{
- m_windowFontPanel->setSelectedFont(settings->windowFont);
- m_browserFontPanel->setSelectedFont(settings->browserFont);
-
- m_windowFontPanel->setWritingSystem(settings->windowWritingSystem);
- m_browserFontPanel->setWritingSystem(settings->browserWritingSystem);
-
- m_windowFontPanel->setChecked(settings->useWindowFont);
- m_browserFontPanel->setChecked(settings->useBrowserFont);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.cpp b/tools/assistant/compat/helpdialog.cpp
deleted file mode 100644
index 97bd54b..0000000
--- a/tools/assistant/compat/helpdialog.cpp
+++ /dev/null
@@ -1,1331 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpdialog.h"
-#include "helpwindow.h"
-#include "topicchooser.h"
-#include "docuparser.h"
-#include "mainwindow.h"
-#include "config.h"
-#include "tabbedbrowser.h"
-
-#include <QtGui>
-#include <QtDebug>
-#include <QtCore/QVarLengthArray>
-
-#include <stdlib.h>
-#include <limits.h>
-
-QT_BEGIN_NAMESPACE
-
-enum
-{
- LinkRole = Qt::UserRole + 1000
-};
-
-static bool verifyDirectory(const QString &str)
-{
- QFileInfo dirInfo(str);
- if (!dirInfo.exists())
- return QDir().mkdir(str);
- if (!dirInfo.isDir()) {
- qWarning("'%s' exists but is not a directory", str.toLatin1().constData());
- return false;
- }
- return true;
-}
-
-struct IndexKeyword {
- IndexKeyword(const QString &kw, const QString &l)
- : keyword(kw), link(l) {}
- IndexKeyword() : keyword(QString()), link(QString()) {}
- bool operator<(const IndexKeyword &ik) const {
- return keyword.toLower() < ik.keyword.toLower();
- }
- bool operator<=(const IndexKeyword &ik) const {
- return keyword.toLower() <= ik.keyword.toLower();
- }
- bool operator>(const IndexKeyword &ik) const {
- return keyword.toLower() > ik.keyword.toLower();
- }
- Q_DUMMY_COMPARISON_OPERATOR(IndexKeyword)
- QString keyword;
- QString link;
-};
-
-QDataStream &operator>>(QDataStream &s, IndexKeyword &ik)
-{
- s >> ik.keyword;
- s >> ik.link;
- return s;
-}
-
-QDataStream &operator<<(QDataStream &s, const IndexKeyword &ik)
-{
- s << ik.keyword;
- s << ik.link;
- return s;
-}
-
-QValidator::State SearchValidator::validate(QString &str, int &) const
-{
- for (int i = 0; i < (int) str.length(); ++i) {
- QChar c = str[i];
- if (!c.isLetterOrNumber() && c != QLatin1Char('\'') && c != QLatin1Char('`')
- && c != QLatin1Char('\"') && c != QLatin1Char(' ') && c != QLatin1Char('-') && c != QLatin1Char('_')
- && c!= QLatin1Char('*'))
- return QValidator::Invalid;
- }
- return QValidator::Acceptable;
-}
-
-class IndexListModel: public QStringListModel
-{
-public:
- IndexListModel(QObject *parent = 0)
- : QStringListModel(parent) {}
-
- void clear() { contents.clear(); setStringList(QStringList()); }
-
- QString description(int index) const { return stringList().at(index); }
- QStringList links(int index) const { return contents.values(stringList().at(index)); }
- void addLink(const QString &description, const QString &link) { contents.insert(description, link); }
-
- void publish() { filter(QString(), QString()); }
-
- QModelIndex filter(const QString &s, const QString &real);
-
- virtual Qt::ItemFlags flags(const QModelIndex &index) const
- { return QStringListModel::flags(index) & ~Qt::ItemIsEditable; }
-
-private:
- QMultiMap<QString, QString> contents;
-};
-
-bool caseInsensitiveLessThan(const QString &as, const QString &bs)
-{
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
- if (a == 0)
- return true;
- if (b == 0)
- return false;
- if (a == b)
- return false;
- int l=qMin(as.length(),bs.length());
- while (l-- && QChar::toLower(a->unicode()) == QChar::toLower(b->unicode()))
- a++,b++;
- if (l==-1)
- return (as.length() < bs.length());
- return QChar::toLower(a->unicode()) < QChar::toLower(b->unicode());
-}
-
-/**
- * \a real is kinda a hack for the smart search, need a way to match a regexp to an item
- * How would you say the best match for Q.*Wiget is QWidget?
- */
-QModelIndex IndexListModel::filter(const QString &s, const QString &real)
-{
- QStringList list;
-
- int goodMatch = -1;
- int perfectMatch = -1;
- if (s.isEmpty())
- perfectMatch = 0;
-
- const QRegExp regExp(s, Qt::CaseInsensitive);
- QMultiMap<QString, QString>::iterator it = contents.begin();
- QString lastKey;
- for (; it != contents.end(); ++it) {
- if (it.key() == lastKey)
- continue;
- lastKey = it.key();
- const QString key = it.key();
- if (key.contains(regExp) || key.contains(s, Qt::CaseInsensitive)) {
- list.append(key);
- if (perfectMatch == -1 && (key.startsWith(real, Qt::CaseInsensitive))) {
- if (goodMatch == -1)
- goodMatch = list.count() - 1;
- if (real.length() == key.length()){
- perfectMatch = list.count() - 1;
- }
- } else if (perfectMatch > -1 && s == key) {
- perfectMatch = list.count() - 1;
- }
- }
- }
-
- int bestMatch = perfectMatch;
- if (bestMatch == -1)
- bestMatch = goodMatch;
- bestMatch = qMax(0, bestMatch);
-
- // sort the new list
- QString match;
- if (bestMatch >= 0 && list.count() > bestMatch)
- match = list[bestMatch];
- qSort(list.begin(), list.end(), caseInsensitiveLessThan);
- setStringList(list);
- for (int i = 0; i < list.size(); ++i) {
- if (list.at(i) == match){
- bestMatch = i;
- break;
- }
- }
- return index(bestMatch, 0, QModelIndex());
-}
-
-HelpNavigationListItem::HelpNavigationListItem(QListWidget *ls, const QString &txt)
- : QListWidgetItem(txt, ls)
-{
-}
-
-void HelpNavigationListItem::addLink(const QString &link)
-{
- QString lnk = HelpDialog::removeAnchorFromLink(link);
- if (linkList.filter(lnk, Qt::CaseInsensitive).count() > 0)
- return;
- linkList << link;
-}
-
-HelpDialog::HelpDialog(QWidget *parent, MainWindow *h)
- : QWidget(parent), lwClosed(false), help(h)
-{
- ui.setupUi(this);
- ui.listContents->setUniformRowHeights(true);
- ui.listContents->header()->setStretchLastSection(false);
- ui.listContents->header()->setResizeMode(QHeaderView::ResizeToContents);
- ui.listBookmarks->setUniformRowHeights(true);
- ui.listBookmarks->header()->setStretchLastSection(false);
- ui.listBookmarks->header()->setResizeMode(QHeaderView::ResizeToContents);
-
- indexModel = new IndexListModel(this);
- ui.listIndex->setModel(indexModel);
- ui.listIndex->setLayoutMode(QListView::Batched);
- ui.listBookmarks->setItemHidden(ui.listBookmarks->headerItem(), true);
- ui.listContents->setItemHidden(ui.listContents->headerItem(), true);
- ui.searchButton->setShortcut(QKeySequence(Qt::ALT|Qt::SHIFT|Qt::Key_S));
-}
-
-void HelpDialog::initialize()
-{
- connect(ui.tabWidget, SIGNAL(currentChanged(int)), this, SLOT(currentTabChanged(int)));
-
- connect(ui.listContents, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listContents, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
- ui.listContents->viewport()->installEventFilter(this);
-
- connect(ui.editIndex, SIGNAL(returnPressed()), this, SLOT(showTopic()));
- connect(ui.editIndex, SIGNAL(textEdited(QString)), this, SLOT(searchInIndex(QString)));
-
- connect(ui.listIndex, SIGNAL(activated(QModelIndex)), this, SLOT(showTopic()));
- connect(ui.listIndex, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showIndexItemMenu(QPoint)));
-
- connect(ui.listBookmarks, SIGNAL(itemActivated(QTreeWidgetItem*,int)), this, SLOT(showTopic(QTreeWidgetItem*)));
- connect(ui.listBookmarks, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showTreeItemMenu(QPoint)));
-
- connect(ui.termsEdit, SIGNAL(textChanged(const QString&)), this, SLOT(updateSearchButton(const QString&)));
-
- connect(ui.resultBox, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showListItemMenu(QPoint)));
-
- cacheFilesPath = QDir::homePath() + QLatin1String("/.assistant"); //### Find a better location for the dbs
-
- ui.editIndex->installEventFilter(this);
-
- ui.framePrepare->hide();
- connect(qApp, SIGNAL(lastWindowClosed()), SLOT(lastWinClosed()));
-
- ui.termsEdit->setValidator(new SearchValidator(ui.termsEdit));
-
- actionOpenCurrentTab = new QAction(this);
- actionOpenCurrentTab->setText(tr("Open Link in Current Tab"));
-
- actionOpenLinkInNewWindow = new QAction(this);
- actionOpenLinkInNewWindow->setText(tr("Open Link in New Window"));
-
- actionOpenLinkInNewTab = new QAction(this);
- actionOpenLinkInNewTab->setText(tr("Open Link in New Tab"));
-
- itemPopup = new QMenu(this);
- itemPopup->addAction(actionOpenCurrentTab);
- itemPopup->addAction(actionOpenLinkInNewWindow);
- itemPopup->addAction(actionOpenLinkInNewTab);
-
- ui.tabWidget->setElideMode(Qt::ElideNone);
-
- contentList.clear();
-
- initDoneMsgShown = false;
- fullTextIndex = 0;
- indexDone = false;
- titleMapDone = false;
- contentsInserted = false;
- bookmarksInserted = false;
- setupTitleMap();
-
-}
-
-void HelpDialog::processEvents()
-{
- qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
-}
-
-
-void HelpDialog::lastWinClosed()
-{
- lwClosed = true;
-}
-
-void HelpDialog::removeOldCacheFiles(bool onlyFulltextSearchIndex)
-{
- if (!verifyDirectory(cacheFilesPath)) {
- qWarning("Failed to created assistant directory");
- return;
- }
- QString pname = QLatin1String(".") + Config::configuration()->profileName();
-
- QStringList fileList;
- fileList << QLatin1String("indexdb40.dict")
- << QLatin1String("indexdb40.doc");
-
- if (!onlyFulltextSearchIndex)
- fileList << QLatin1String("indexdb40") << QLatin1String("contentdb40");
-
- QStringList::iterator it = fileList.begin();
- for (; it != fileList.end(); ++it) {
- if (QFile::exists(cacheFilesPath + QDir::separator() + *it + pname)) {
- QFile f(cacheFilesPath + QDir::separator() + *it + pname);
- f.remove();
- }
- }
-}
-
-void HelpDialog::timerEvent(QTimerEvent *e)
-{
- Q_UNUSED(e);
- static int opacity = 255;
- help->setWindowOpacity((opacity-=4)/255.0);
- if (opacity<=0)
- qApp->quit();
-}
-
-
-void HelpDialog::loadIndexFile()
-{
- if (indexDone)
- return;
-
- setCursor(Qt::WaitCursor);
- indexDone = true;
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.framePrepare->show();
- processEvents();
-
- QProgressBar *bar = ui.progressPrepare;
- bar->setMaximum(100);
- bar->setValue(0);
-
- keywordDocuments.clear();
- QList<IndexKeyword> lst;
- QFile indexFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.") +
- Config::configuration()->profileName());
- if (!indexFile.open(QFile::ReadOnly)) {
- buildKeywordDB();
- processEvents();
- if (lwClosed)
- return;
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"), tr("Failed to load keyword index file\n"
- "Assistant will not work!"));
-#if defined Q_WS_WIN || defined Q_WS_MACX
- startTimer(50);
-#endif
- return;
- }
- }
-
- QDataStream ds(&indexFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- indexFile.close();
- buildKeywordDB();
- if (!indexFile.open(QFile::ReadOnly)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Cannot open the index file %1").arg(QFileInfo(indexFile).absoluteFilePath()));
- return;
- }
- ds.setDevice(&indexFile);
- ds >> fileAges;
- }
- ds >> lst;
- indexFile.close();
-
- bar->setValue(bar->maximum());
- processEvents();
-
- for (int i=0; i<lst.count(); ++i) {
- const IndexKeyword &idx = lst.at(i);
- indexModel->addLink(idx.keyword, idx.link);
-
- keywordDocuments << HelpDialog::removeAnchorFromLink(idx.link);
- }
-
- indexModel->publish();
-
- ui.framePrepare->hide();
- showInitDoneMessage();
- setCursor(Qt::ArrowCursor);
-}
-
-quint32 HelpDialog::getFileAges()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::const_iterator i = addDocuFiles.constBegin();
-
- quint32 fileAges = 0;
- for (; i != addDocuFiles.constEnd(); ++i) {
- QFileInfo fi(*i);
- if (fi.exists())
- fileAges += fi.lastModified().toTime_t();
- }
-
- return fileAges;
-}
-
-void HelpDialog::buildKeywordDB()
-{
- QStringList addDocuFiles = Config::configuration()->docFiles();
- QStringList::iterator i = addDocuFiles.begin();
-
- // Set up an indeterminate progress bar.
- ui.labelPrepare->setText(tr("Prepare..."));
- ui.progressPrepare->setMaximum(0);
- ui.progressPrepare->setMinimum(0);
- ui.progressPrepare->setValue(0);
- processEvents();
-
- QList<IndexKeyword> lst;
- quint32 fileAges = 0;
- for (i = addDocuFiles.begin(); i != addDocuFiles.end(); ++i) {
- QFile file(*i);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*i);
- bool ok = handler->parse(&file);
- file.close();
- if (!ok){
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- delete handler;
- continue;
- }
-
- QList<IndexItem*> indLst = handler->getIndexItems();
- int counter = 0;
- foreach (IndexItem *indItem, indLst) {
- QFileInfo fi(indItem->reference);
- lst.append(IndexKeyword(indItem->keyword, indItem->reference));
-
- if (++counter%100 == 0) {
- if (ui.progressPrepare)
- ui.progressPrepare->setValue(counter);
- processEvents();
- if (lwClosed) {
- return;
- }
- }
- }
- delete handler;
- }
- if (!lst.isEmpty())
- qSort(lst);
-
- QFile indexout(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.")
- + Config::configuration()->profileName());
- if (verifyDirectory(cacheFilesPath) && indexout.open(QFile::WriteOnly)) {
- QDataStream s(&indexout);
- s << fileAges;
- s << lst;
- indexout.close();
- }
-}
-
-void HelpDialog::setupTitleMap()
-{
- if (titleMapDone)
- return;
-
- bool needRebuild = false;
- if (Config::configuration()->profileName() == QLatin1String("default")) {
- const QStringList docuFiles = Config::configuration()->docFiles();
- for (QStringList::ConstIterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- if (!QFile::exists(*it)) {
- Config::configuration()->saveProfile(Profile::createDefaultProfile());
- Config::configuration()->loadDefaultProfile();
- needRebuild = true;
- break;
- }
- }
- }
-
- if (Config::configuration()->docRebuild() || needRebuild) {
- removeOldCacheFiles();
- Config::configuration()->setDocRebuild(false);
- Config::configuration()->saveProfile(Config::configuration()->profile());
- }
- if (contentList.isEmpty())
- getAllContents();
-
- titleMapDone = true;
- titleMap.clear();
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- ContentList lst = (*it).second;
- foreach (ContentItem item, lst) {
- titleMap[item.reference] = item.title.trimmed();
- }
- }
- processEvents();
-}
-
-void HelpDialog::getAllContents()
-{
- QFile contentFile(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- contentList.clear();
- if (!contentFile.open(QFile::ReadOnly)) {
- buildContentDict();
- return;
- }
-
- QDataStream ds(&contentFile);
- quint32 fileAges;
- ds >> fileAges;
- if (fileAges != getFileAges()) {
- contentFile.close();
- removeOldCacheFiles(true);
- buildContentDict();
- return;
- }
- QString key;
- QList<ContentItem> lst;
- while (!ds.atEnd()) {
- ds >> key;
- ds >> lst;
- contentList += qMakePair(key, QList<ContentItem>(lst));
- }
- contentFile.close();
- processEvents();
-
-}
-
-void HelpDialog::buildContentDict()
-{
- QStringList docuFiles = Config::configuration()->docFiles();
-
- quint32 fileAges = 0;
- for (QStringList::iterator it = docuFiles.begin(); it != docuFiles.end(); ++it) {
- QFile file(*it);
- if (!file.exists()) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 does not exist!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- fileAges += QFileInfo(file).lastModified().toTime_t();
- DocuParser *handler = DocuParser::createParser(*it);
- if (!handler) {
- QMessageBox::warning(this, tr("Warning"),
- tr("Documentation file %1 is not compatible!\n"
- "Skipping file.").arg(QFileInfo(file).absoluteFilePath()));
- continue;
- }
- bool ok = handler->parse(&file);
- file.close();
- if (ok) {
- contentList += qMakePair(*it, QList<ContentItem>(handler->getContentItems()));
- delete handler;
- } else {
- QString msg = QString::fromLatin1("In file %1:\n%2")
- .arg(QFileInfo(file).absoluteFilePath())
- .arg(handler->errorProtocol());
- QMessageBox::critical(this, tr("Parse Error"), tr(msg.toUtf8()));
- continue;
- }
- }
-
- QFile contentOut(cacheFilesPath + QDir::separator() + QLatin1String("contentdb40.")
- + Config::configuration()->profileName());
- if (contentOut.open(QFile::WriteOnly)) {
- QDataStream s(&contentOut);
- s << fileAges;
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- s << *it;
- }
- contentOut.close();
- }
-}
-
-void HelpDialog::currentTabChanged(int index)
-{
- QString s = ui.tabWidget->widget(index)->objectName();
- if (s == QLatin1String("indexPage"))
- QTimer::singleShot(0, this, SLOT(loadIndexFile()));
- else if (s == QLatin1String("bookmarkPage"))
- insertBookmarks();
- else if (s == QLatin1String("contentPage"))
- QTimer::singleShot(0, this, SLOT(insertContents()));
- else if (s == QLatin1String("searchPage"))
- QTimer::singleShot(0, this, SLOT(setupFullTextIndex()));
-}
-
-void HelpDialog::showInitDoneMessage()
-{
- if (initDoneMsgShown)
- return;
- initDoneMsgShown = true;
- help->statusBar()->showMessage(tr("Done"), 3000);
-}
-
-void HelpDialog::showTopic(QTreeWidgetItem *item)
-{
- if (item)
- showTopic();
-}
-
-void HelpDialog::showTopic()
-{
- QString tabName = ui.tabWidget->currentWidget()->objectName();
-
- if (tabName == QLatin1String("indexPage"))
- showIndexTopic();
- else if (tabName == QLatin1String("bookmarkPage"))
- showBookmarkTopic();
- else if (tabName == QLatin1String("contentPage"))
- showContentsTopic();
-}
-
-void HelpDialog::showIndexTopic()
-{
- int row = ui.listIndex->currentIndex().row();
- if (row == -1 || row >= indexModel->rowCount())
- return;
-
- QString description = indexModel->description(row);
- QStringList links = indexModel->links(row);
-
- bool blocked = ui.editIndex->blockSignals(true);
- ui.editIndex->setText(description);
- ui.editIndex->blockSignals(blocked);
-
- if (links.count() == 1) {
- emit showLink(links.first());
- } else {
- qSort(links);
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, description);
- if (!link.isEmpty())
- emit showLink(link);
- }
-
- ui.listIndex->setCurrentIndex(indexModel->index(indexModel->stringList().indexOf(description)));
- ui.listIndex->scrollTo(ui.listIndex->currentIndex(), QAbstractItemView::PositionAtTop);
-}
-
-void HelpDialog::searchInIndex(const QString &searchString)
-{
- QRegExp atoz(QLatin1String("[A-Z]"));
- int matches = searchString.count(atoz);
- if (matches > 0 && !searchString.contains(QLatin1String(".*")))
- {
- int start = 0;
- QString newSearch;
- for (; matches > 0; --matches) {
- int match = searchString.indexOf(atoz, start+1);
- if (match <= start)
- continue;
- newSearch += searchString.mid(start, match-start);
- newSearch += QLatin1String(".*");
- start = match;
- }
- newSearch += searchString.mid(start);
- ui.listIndex->setCurrentIndex(indexModel->filter(newSearch, searchString));
- }
- else
- ui.listIndex->setCurrentIndex(indexModel->filter(searchString, searchString));
-}
-
-QString HelpDialog::titleOfLink(const QString &link)
-{
- QString s = HelpDialog::removeAnchorFromLink(link);
- s = titleMap[s];
- if (s.isEmpty())
- return link;
- return s;
-}
-
-bool HelpDialog::eventFilter(QObject * o, QEvent * e)
-{
- if (o == ui.editIndex && e->type() == QEvent::KeyPress) {
- switch (static_cast<QKeyEvent*>(e)->key()) {
- case Qt::Key_Up:
- case Qt::Key_Down:
- case Qt::Key_PageDown:
- case Qt::Key_PageUp:
- QApplication::sendEvent(ui.listIndex, e);
- break;
-
- default:
- break;
- }
- } else if (o == ui.listContents->viewport()) {
- if (e->type() == QEvent::MouseButtonRelease) {
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
- if (me->button() == Qt::LeftButton) {
- QTreeWidgetItem *item = ui.listContents->itemAt(me->pos());
- QRect vRect = ui.listContents->visualItemRect(item);
-
- // only show topic if we clicked an item
- if (item && vRect.contains(me->pos()))
- showTopic(item);
- }
- }
- }
-
- return QWidget::eventFilter(o, e);
-}
-
-void HelpDialog::addBookmark()
-{
- if (!bookmarksInserted)
- insertBookmarks();
- QString link = help->browsers()->currentBrowser()->source().toString();
- QString title = help->browsers()->currentBrowser()->documentTitle();
- if (title.isEmpty())
- title = titleOfLink(link);
-
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, title);
- i->setData(0, LinkRole, link);
- ui.buttonRemove->setEnabled(true);
- saveBookmarks();
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::on_buttonAdd_clicked()
-{
- addBookmark();
-}
-
-void HelpDialog::on_buttonRemove_clicked()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- delete ui.listBookmarks->currentItem();
- saveBookmarks();
- if (ui.listBookmarks->topLevelItemCount() != 0) {
- ui.listBookmarks->setCurrentItem(ui.listBookmarks->topLevelItem(0));
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
-}
-
-void HelpDialog::insertBookmarks()
-{
- if (bookmarksInserted)
- return;
- bookmarksInserted = true;
- ui.listBookmarks->clear();
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- while (!ts.atEnd()) {
- QTreeWidgetItem *i = new QTreeWidgetItem(ui.listBookmarks, 0);
- i->setText(0, ts.readLine());
- i->setData(0, LinkRole, ts.readLine());
- }
- ui.buttonRemove->setEnabled(ui.listBookmarks->topLevelItemCount() > 0);
- help->updateBookmarkMenu();
- showInitDoneMessage();
-}
-
-void HelpDialog::showBookmarkTopic()
-{
- if (!ui.listBookmarks->currentItem())
- return;
-
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listBookmarks->currentItem();
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-static void store(QTreeWidgetItem *i, QTextStream &ts)
-{
- ts << i->text(0) << endl;
- ts << i->data(0, LinkRole).toString() << endl;
-
- for (int index = 0; index < i->childCount(); ++index)
- store(i->child(index), ts);
-}
-
-static void store(QTreeWidget *tw, QTextStream &ts)
-{
- for (int index = 0; index < tw->topLevelItemCount(); ++index)
- store(tw->topLevelItem(index), ts);
-}
-
-void HelpDialog::saveBookmarks()
-{
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("bookmarks.")
- + Config::configuration()->profileName());
- if (!f.open(QFile::WriteOnly))
- return;
-
- QTextStream ts(&f);
- store(ui.listBookmarks, ts);
- f.close();
-}
-
-void HelpDialog::insertContents()
-{
-#ifdef Q_WS_MAC
- static const QLatin1String IconPath(":/trolltech/assistant/images/mac/book.png");
-#else
- static const QLatin1String IconPath(":/trolltech/assistant/images/win/book.png");
-#endif
- if (contentsInserted)
- return;
-
- if (contentList.isEmpty())
- getAllContents();
-
- contentsInserted = true;
- ui.listContents->clear();
- setCursor(Qt::WaitCursor);
- if (!titleMapDone)
- setupTitleMap();
-
-#if 0 // ### port me
- ui.listContents->setSorting(-1);
-#endif
-
- for (QList<QPair<QString, ContentList> >::Iterator it = contentList.begin(); it != contentList.end(); ++it) {
- QTreeWidgetItem *newEntry = 0;
-
- QTreeWidgetItem *contentEntry = 0;
- QStack<QTreeWidgetItem*> stack;
- stack.clear();
- int depth = 0;
- bool root = false;
-
- const int depthSize = 32;
- QVarLengthArray<QTreeWidgetItem*, depthSize> lastItem(depthSize);
-
- ContentList lst = (*it).second;
- for (ContentList::ConstIterator it = lst.constBegin(); it != lst.constEnd(); ++it) {
- ContentItem item = *it;
- if (item.depth == 0) {
- lastItem[0] = 0;
- newEntry = new QTreeWidgetItem(ui.listContents, 0);
- newEntry->setIcon(0, QIcon(IconPath));
- newEntry->setText(0, item.title);
- newEntry->setData(0, LinkRole, item.reference);
- stack.push(newEntry);
- depth = 1;
- root = true;
- }
- else{
- if ((item.depth > depth) && root) {
- depth = item.depth;
- stack.push(contentEntry);
- }
- if (item.depth == depth) {
- if (lastItem.capacity() == depth)
- lastItem.resize(depth + depthSize);
- contentEntry = new QTreeWidgetItem(stack.top(), lastItem[ depth ]);
- lastItem[ depth ] = contentEntry;
- contentEntry->setText(0, item.title);
- contentEntry->setData(0, LinkRole, item.reference);
- }
- else if (item.depth < depth) {
- stack.pop();
- depth--;
- item = *(--it);
- }
- }
- }
- processEvents();
- }
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
-}
-
-void HelpDialog::showContentsTopic()
-{
- QTreeWidgetItem *i = (QTreeWidgetItem*)ui.listContents->currentItem();
- if (!i)
- return;
- emit showLink(i->data(0, LinkRole).toString());
-}
-
-QTreeWidgetItem * HelpDialog::locateLink(QTreeWidgetItem *item, const QString &link)
-{
- QTreeWidgetItem *child = 0;
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- for (int i = 0, childCount = item->childCount(); i<childCount; i++) {
- child = item->child(i);
- ///check whether it is this item
- if (link.startsWith(child->data(0, LinkRole).toString(), checkCase))
- break;
- //check if the link is a child of this item
- else if (child->childCount()) {
- child = locateLink(child, link);
- if (child)
- break;
- }
- child = 0;
- }
- return child;
-}
-
-void HelpDialog::locateContents(const QString &link)
-{
- //ensure the TOC is filled
- if (!contentsInserted)
- insertContents();
-#ifdef Q_OS_WIN
- Qt::CaseSensitivity checkCase = Qt::CaseInsensitive;
-#else
- Qt::CaseSensitivity checkCase = Qt::CaseSensitive;
-#endif
- QString findLink(link);
- //Installations on a windows local drive will give the 'link' as <file:///C:/xxx>
- //and the contents in the TOC will be <file:C:/xxx>.
- //But on others the 'link' of format <file:///root/xxx>
- //and the contents in the TOC will be <file:/root/xxx>.
- if (findLink.contains(QLatin1String("file:///"))) {
- if (findLink[9] == QLatin1Char(':')) //on windows drives
- findLink.replace(0, 8, QLatin1String("file:"));
- else
- findLink.replace(0, 8, QLatin1String("file:/"));
- }
-
- bool topLevel = false;
- QTreeWidgetItem *item = 0;
- int totalItems = ui.listContents->topLevelItemCount();
-
- for (int i = 0; i < totalItems; i++ ) {
- // first see if we are one of the top level items
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(i);
- if (findLink.startsWith(item->data(0, LinkRole).toString(), checkCase)) {
- topLevel = true;
- break;
- }
- }
-
- if (!topLevel) {
- // now try to find it in the sublevel items
- for (int n = 0; n < totalItems; ++n) {
- item = (QTreeWidgetItem*)ui.listContents->topLevelItem(n);
- item = locateLink(item, findLink);
- if (item)
- break;
- }
- }
-
- //remove the old selection
- QList<QTreeWidgetItem *> selected = ui.listContents->selectedItems();
- foreach(QTreeWidgetItem *sel, selected)
- ui.listContents->setItemSelected(sel, false);
-
- //set the TOC item and show
- ui.listContents->setCurrentItem(item);
- ui.listContents->setItemSelected(item, true);
- ui.listContents->scrollToItem(item);
-}
-
-void HelpDialog::toggleContents()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 0) {
- ui.tabWidget->setCurrentIndex(0);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleIndex()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 1 || !ui.editIndex->hasFocus()) {
- ui.tabWidget->setCurrentIndex(1);
- parentWidget()->show();
- ui.editIndex->setFocus();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleBookmarks()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 2) {
- ui.tabWidget->setCurrentIndex(2);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::toggleSearch()
-{
- if (!isVisible() || ui.tabWidget->currentIndex() != 3) {
- ui.tabWidget->setCurrentIndex(3);
- parentWidget()->show();
- }
- else
- parentWidget()->hide();
-}
-
-void HelpDialog::setupFullTextIndex()
-{
- if (fullTextIndex)
- return;
-
- QString pname = Config::configuration()->profileName();
- fullTextIndex = new Index(QStringList(), QDir::homePath()); // ### Is this correct ?
- if (!verifyDirectory(cacheFilesPath)) {
- QMessageBox::warning(help, tr("Qt Assistant"),
- tr("Failed to save fulltext search index\n"
- "Assistant will not work!"));
- return;
- }
- fullTextIndex->setDictionaryFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- fullTextIndex->setDocListFile(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.doc.") + pname);
- processEvents();
-
- connect(fullTextIndex, SIGNAL(indexingProgress(int)),
- this, SLOT(setIndexingProgress(int)));
- QFile f(cacheFilesPath + QDir::separator() + QLatin1String("indexdb40.dict.") + pname);
- if (!f.exists()) {
- QString doc;
- QSet<QString> documentSet;
- QMap<QString, QString>::ConstIterator it = titleMap.constBegin();
- for (; it != titleMap.constEnd(); ++it) {
- doc = HelpDialog::removeAnchorFromLink(it.key());
- if (!doc.isEmpty())
- documentSet.insert(doc);
- }
- loadIndexFile();
- for ( QStringList::Iterator it = keywordDocuments.begin(); it != keywordDocuments.end(); ++it ) {
- if (!(*it).isEmpty())
- documentSet.insert(*it);
- }
- fullTextIndex->setDocList( documentSet.toList() );
-
- help->statusBar()->clearMessage();
- setCursor(Qt::WaitCursor);
- ui.labelPrepare->setText(tr("Indexing files..."));
- ui.progressPrepare->setMaximum(100);
- ui.progressPrepare->reset();
- ui.progressPrepare->show();
- ui.framePrepare->show();
- processEvents();
- if (fullTextIndex->makeIndex() == -1)
- return;
- fullTextIndex->writeDict();
- ui.progressPrepare->setValue(100);
- ui.framePrepare->hide();
- setCursor(Qt::ArrowCursor);
- showInitDoneMessage();
- } else {
- setCursor(Qt::WaitCursor);
- help->statusBar()->showMessage(tr("Reading dictionary..."));
- processEvents();
- fullTextIndex->readDict();
- help->statusBar()->showMessage(tr("Done"), 3000);
- setCursor(Qt::ArrowCursor);
- }
- keywordDocuments.clear();
-}
-
-void HelpDialog::setIndexingProgress(int prog)
-{
- ui.progressPrepare->setValue(prog);
- processEvents();
-}
-
-void HelpDialog::startSearch()
-{
- QString str = ui.termsEdit->text();
- str = str.simplified();
- str = str.replace(QLatin1String("\'"), QLatin1String("\""));
- str = str.replace(QLatin1String("`"), QLatin1String("\""));
- QString buf = str;
- str = str.replace(QLatin1String("-"), QLatin1String(" "));
- str = str.replace(QRegExp(QLatin1String("\\s[\\S]?\\s")), QLatin1String(" "));
- terms = str.split(QLatin1Char(' '));
- QStringList termSeq;
- QStringList seqWords;
- QStringList::iterator it = terms.begin();
- for (; it != terms.end(); ++it) {
- (*it) = (*it).simplified();
- (*it) = (*it).toLower();
- (*it) = (*it).replace(QLatin1String("\""), QLatin1String(""));
- }
- if (str.contains(QLatin1Char('\"'))) {
- if ((str.count(QLatin1Char('\"')))%2 == 0) {
- int beg = 0;
- int end = 0;
- QString s;
- beg = str.indexOf(QLatin1Char('\"'), beg);
- while (beg != -1) {
- beg++;
- end = str.indexOf(QLatin1Char('\"'), beg);
- s = str.mid(beg, end - beg);
- s = s.toLower();
- s = s.simplified();
- if (s.contains(QLatin1Char('*'))) {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("Using a wildcard within phrases is not allowed."));
- return;
- }
- seqWords += s.split(QLatin1Char(' '));
- termSeq << s;
- beg = str.indexOf(QLatin1Char('\"'), end + 1);
- }
- } else {
- QMessageBox::warning(this, tr("Full Text Search"),
- tr("The closing quotation mark is missing."));
- return;
- }
- }
- setCursor(Qt::WaitCursor);
- foundDocs.clear();
- foundDocs = fullTextIndex->query(terms, termSeq, seqWords);
- QString msg = tr("%n document(s) found.", "", foundDocs.count());
- help->statusBar()->showMessage(tr(msg.toUtf8()), 3000);
- ui.resultBox->clear();
- for (it = foundDocs.begin(); it != foundDocs.end(); ++it)
- ui.resultBox->addItem(fullTextIndex->getDocumentTitle(*it));
-
- terms.clear();
- bool isPhrase = false;
- QString s;
- for (int i = 0; i < (int)buf.length(); ++i) {
- if (buf[i] == QLatin1Char('\"')) {
- isPhrase = !isPhrase;
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else if (buf[i] == QLatin1Char(' ') && !isPhrase) {
- s = s.simplified();
- if (!s.isEmpty())
- terms << s;
- s = QLatin1String("");
- } else
- s += buf[i];
- }
- if (!s.isEmpty())
- terms << s;
-
- setCursor(Qt::ArrowCursor);
-}
-
-void HelpDialog::on_helpButton_clicked()
-{
- emit showLink(MainWindow::urlifyFileName(
- Config::configuration()->assistantDocPath() +
- QLatin1String("/assistant-manual.html#full-text-searching")));
-}
-
-void HelpDialog::on_resultBox_itemActivated(QListWidgetItem *item)
-{
- showResultPage(item);
-}
-
-void HelpDialog::showResultPage(QListWidgetItem *item)
-{
- if (item)
- emit showSearchLink(foundDocs[ui.resultBox->row(item)], terms);
-}
-
-void HelpDialog::showIndexItemMenu(const QPoint &pos)
-{
- QListView *listView = qobject_cast<QListView*>(sender());
- if (!listView)
- return;
-
- QModelIndex idx = listView->indexAt(pos);
- if (!idx.isValid())
- return;
-
- QAction *action = itemPopup->exec(listView->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showTopic();
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString itemName = idx.data().toString();
- ui.editIndex->setText(itemName);
- QStringList links = indexModel->links(idx.row());
- if (links.count() == 1) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(links.first());
- else
- hw->openLinkInNewPage(links.first());
- } else {
- QStringList::Iterator it = links.begin();
- QStringList linkList;
- QStringList linkNames;
- for (; it != links.end(); ++it) {
- linkList << *it;
- linkNames << titleOfLink(*it);
- }
- QString link = TopicChooser::getLink(this, linkNames, linkList, itemName);
- if (!link.isEmpty()) {
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
- }
- }
-}
-
-void HelpDialog::showListItemMenu(const QPoint &pos)
-{
- QListWidget *listWidget = qobject_cast<QListWidget*>(sender());
- if (!listWidget)
- return;
- QListWidgetItem *item = listWidget->itemAt(pos);
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(listWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- showResultPage(item);
- } else if (action) {
- HelpWindow *hw = help->browsers()->currentBrowser();
- QString link = foundDocs[ui.resultBox->row(item)];
- if (action == actionOpenLinkInNewWindow)
- hw->openLinkInNewWindow(link);
- else
- hw->openLinkInNewPage(link);
- }
-}
-
-void HelpDialog::showTreeItemMenu(const QPoint &pos)
-{
- QTreeWidget *treeWidget = qobject_cast<QTreeWidget*>(sender());
-
- if (!treeWidget)
- return;
-
- QTreeWidgetItem *item = treeWidget->itemAt(pos);
-
- if (!item)
- return;
-
- QAction *action = itemPopup->exec(treeWidget->viewport()->mapToGlobal(pos));
- if (action == actionOpenCurrentTab) {
- if (ui.tabWidget->currentWidget()->objectName() == QLatin1String("contentPage"))
- showContentsTopic();
- else
- showBookmarkTopic();
- } else if (action) {
- QTreeWidgetItem *i = (QTreeWidgetItem*)item;
- if (action == actionOpenLinkInNewWindow)
- help->browsers()->currentBrowser()->openLinkInNewWindow(i->data(0, LinkRole).toString());
- else
- help->browsers()->currentBrowser()->openLinkInNewPage(i->data(0, LinkRole).toString());
- }
-}
-
-void HelpDialog::on_termsEdit_returnPressed()
-{
- startSearch();
-}
-
-void HelpDialog::updateSearchButton(const QString &txt)
-{
- ui.searchButton->setDisabled(txt.isEmpty());
-}
-
-void HelpDialog::on_searchButton_clicked()
-{
- startSearch();
-}
-
-QString HelpDialog::removeAnchorFromLink(const QString &link)
-{
- int i = link.length();
- int j = link.lastIndexOf(QLatin1Char('/'));
- int l = link.lastIndexOf(QDir::separator());
- if (l > j)
- j = l;
- if (j > -1) {
- QString fileName = link.mid(j+1);
- int k = fileName.lastIndexOf(QLatin1Char('#'));
- if (k > -1)
- i = j + k + 1;
- }
- return link.left(i);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpdialog.h b/tools/assistant/compat/helpdialog.h
deleted file mode 100644
index 00919c7..0000000
--- a/tools/assistant/compat/helpdialog.h
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPDIALOG_H
-#define HELPDIALOG_H
-
-#include "ui_helpdialog.h"
-#include "index.h"
-#include "helpwindow.h"
-#include "docuparser.h"
-
-#include <QList>
-#include <QPair>
-#include <QListWidget>
-#include <QTreeWidget>
-#include <QMap>
-#include <QStringList>
-#include <QValidator>
-#include <qmenu.h>
-#include <QHash>
-
-QT_BEGIN_NAMESPACE
-
-class QProgressBar;
-class MainWindow;
-class QTextBrowser;
-class IndexListModel;
-
-class HelpNavigationListItem : public QListWidgetItem
-{
-public:
- HelpNavigationListItem(QListWidget *ls, const QString &txt);
-
- void addLink(const QString &link);
- QStringList links() const { return linkList; }
-private:
- QStringList linkList;
-
-};
-
-class SearchValidator : public QValidator
-{
- Q_OBJECT
-public:
- SearchValidator(QObject *parent)
- : QValidator(parent) {}
- ~SearchValidator() {}
- QValidator::State validate(QString &str, int &) const;
-};
-
-class HelpDialog : public QWidget
-{
- Q_OBJECT
-public:
- HelpDialog(QWidget *parent, MainWindow *h);
-
- inline QTabWidget *tabWidget() const
- { return ui.tabWidget; }
-
- QString titleOfLink(const QString &link);
- bool eventFilter(QObject *, QEvent *);
- bool lastWindowClosed() { return lwClosed; }
-
- void timerEvent(QTimerEvent *e);
- static QString removeAnchorFromLink(const QString &link);
-
-signals:
- void showLink(const QString &s);
- void showSearchLink(const QString &s, const QStringList &terms);
-
-public slots:
- void initialize();
- void startSearch();
- void addBookmark();
- void currentTabChanged(int index);
- void locateContents(const QString &link);
-
-private slots:
- void on_buttonAdd_clicked();
- void on_buttonRemove_clicked();
- void on_termsEdit_returnPressed();
- void on_helpButton_clicked();
- void on_searchButton_clicked();
- void on_resultBox_itemActivated(QListWidgetItem*);
- void updateSearchButton(const QString &txt);
-
- void showResultPage(QListWidgetItem *);
-
- void showTopic(QTreeWidgetItem *);
- void loadIndexFile();
- void insertContents();
- void setupFullTextIndex();
- void showTopic();
- void searchInIndex(const QString &s);
- void toggleContents();
- void toggleIndex();
- void toggleBookmarks();
- void toggleSearch();
- void lastWinClosed();
- void setIndexingProgress(int prog);
- void showListItemMenu(const QPoint &pos);
- void showIndexItemMenu(const QPoint &pos);
- void showTreeItemMenu(const QPoint &pos);
- void insertBookmarks();
- void processEvents();
-
-private:
- typedef QList<ContentItem> ContentList;
- void removeOldCacheFiles(bool onlyFulltextSearchIndex = false);
- void buildKeywordDB();
- quint32 getFileAges();
- void showIndexTopic();
- void showBookmarkTopic();
- void setupTitleMap();
- void saveBookmarks();
- void showContentsTopic();
- void showInitDoneMessage();
- void buildContentDict();
- QTreeWidgetItem * locateLink(QTreeWidgetItem *item, const QString &link);
-
-private:
- Ui::HelpDialog ui;
-
- IndexListModel *indexModel;
- QMap<QString, QString> titleMap;
- bool indexDone, bookmarksInserted, titleMapDone, contentsInserted;
- bool lwClosed;
- MainWindow *help;
- QString documentationPath;
- Index *fullTextIndex;
- QStringList terms, foundDocs;
- bool initDoneMsgShown;
- void getAllContents();
- QList<QPair<QString, ContentList> > contentList;
- QMenu *itemPopup;
- QString cacheFilesPath;
- QStringList keywordDocuments;
-
- QAction *actionOpenCurrentTab;
- QAction *actionOpenLinkInNewWindow;
- QAction *actionOpenLinkInNewTab;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPDIALOG_H
diff --git a/tools/assistant/compat/helpdialog.ui b/tools/assistant/compat/helpdialog.ui
deleted file mode 100644
index b4af4fd..0000000
--- a/tools/assistant/compat/helpdialog.ui
+++ /dev/null
@@ -1,404 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment>*********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <exportmacro></exportmacro>
- <class>HelpDialog</class>
- <widget class="QWidget" name="HelpDialog" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>274</width>
- <height>417</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Help</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Help&lt;/b>&lt;p>Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p></string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="whatsThis" >
- <string>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</string>
- </property>
- <widget class="QWidget" name="contentPage" >
- <attribute name="title" >
- <string>Con&amp;tents</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTreeWidget" name="listContents" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Help topics organized by category.&lt;/b>&lt;p>Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p></string>
- </property>
- <property name="rootIsDecorated" >
- <bool>true</bool>
- </property>
- <property name="uniformRowHeights" >
- <bool>true</bool>
- </property>
- <column>
- <property name="text" >
- <string>column 1</string>
- </property>
- </column>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="indexPage" >
- <attribute name="title" >
- <string>&amp;Index</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="TextLabel1" >
- <property name="text" >
- <string>&amp;Look For:</string>
- </property>
- <property name="buddy" >
- <cstring>editIndex</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="editIndex" >
- <property name="toolTip" >
- <string>Enter keyword</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Enter a keyword.&lt;/b>&lt;p>The list will select an item that matches the entered string best.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListView" name="listIndex" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>List of available help topics.&lt;/b>&lt;p>Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p></string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="bookmarkPage" >
- <attribute name="title" >
- <string>&amp;Bookmarks</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QTreeWidget" name="listBookmarks" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>Displays the list of bookmarks.</string>
- </property>
- <property name="uniformRowHeights" >
- <bool>true</bool>
- </property>
- <column>
- <property name="text" >
- <string>column 1</string>
- </property>
- </column>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="buttonAdd" >
- <property name="toolTip" >
- <string>Add new bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Add the currently displayed page as a new bookmark.</string>
- </property>
- <property name="text" >
- <string>&amp;New</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonRemove" >
- <property name="toolTip" >
- <string>Delete bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Delete the selected bookmark.</string>
- </property>
- <property name="text" >
- <string>&amp;Delete</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="searchPage" >
- <attribute name="title" >
- <string>&amp;Search</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>5</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="3" column="0" >
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="TextLabel1_2" >
- <property name="text" >
- <string>Searching f&amp;or:</string>
- </property>
- <property name="buddy" >
- <cstring>termsEdit</cstring>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLineEdit" name="termsEdit" >
- <property name="toolTip" >
- <string>Enter searchword(s)</string>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Enter search word(s).&lt;/b>&lt;p>Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" >
- <widget class="QListWidget" name="resultBox" >
- <property name="contextMenuPolicy" >
- <enum>Qt::CustomContextMenu</enum>
- </property>
- <property name="whatsThis" >
- <string>&lt;b>Found documents&lt;/b>&lt;p>This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p></string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="TextLabel2" >
- <property name="text" >
- <string>Found &amp;Documents:</string>
- </property>
- <property name="buddy" >
- <cstring>resultBox</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>1</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QPushButton" name="helpButton" >
- <property name="toolTip" >
- <string>Display the help page</string>
- </property>
- <property name="whatsThis" >
- <string>Display the help page for the full text search.</string>
- </property>
- <property name="text" >
- <string>He&amp;lp</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>61</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="searchButton" >
- <property name="toolTip" >
- <string>Start searching</string>
- </property>
- <property name="whatsThis" >
- <string>Pressing this button starts the search.</string>
- </property>
- <property name="text" >
- <string>&amp;Search</string>
- </property>
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="framePrepare" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>3</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="labelPrepare" >
- <property name="text" >
- <string>Preparing...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="progressPrepare" />
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <tabstops>
- <tabstop>tabWidget</tabstop>
- <tabstop>listContents</tabstop>
- <tabstop>editIndex</tabstop>
- <tabstop>listIndex</tabstop>
- <tabstop>listBookmarks</tabstop>
- <tabstop>buttonAdd</tabstop>
- <tabstop>buttonRemove</tabstop>
- <tabstop>termsEdit</tabstop>
- <tabstop>searchButton</tabstop>
- <tabstop>helpButton</tabstop>
- <tabstop>resultBox</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/helpwindow.cpp b/tools/assistant/compat/helpwindow.cpp
deleted file mode 100644
index cfe676e..0000000
--- a/tools/assistant/compat/helpwindow.cpp
+++ /dev/null
@@ -1,247 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "helpwindow.h"
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include <QApplication>
-#include <QClipboard>
-#include <QUrl>
-#include <QMessageBox>
-#include <QDir>
-#include <QFile>
-#include <QProcess>
-#include <QAction>
-#include <QFileInfo>
-#include <QFont>
-#include <QtEvents>
-#include <QTextStream>
-#include <QTextCodec>
-#include <QStatusBar>
-#include <QTextCursor>
-#include <QTextObject>
-#include <QTextLayout>
-#include <QtDebug>
-#include <qdesktopservices.h>
-
-#include <QtGui/QClipboard>
-#include <QtGui/QApplication>
-
-#if defined(Q_OS_WIN32)
-# include <windows.h>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-HelpWindow::HelpWindow(MainWindow *w, QWidget *parent)
- : QTextBrowser(parent)
- , mw(w)
- , blockScroll(false)
- , shiftPressed(false)
- , newWindow(false)
-{
- FontSettings settings = Config::configuration()->fontSettings();
- setFont(settings.browserFont);
-
- connect(this, SIGNAL(copyAvailable(bool)), w, SLOT(copyAvailable(bool)));
-}
-
-void HelpWindow::setSource(const QUrl &name)
-{
- if (name.isValid()) {
- if (name.scheme() == QLatin1String("http") || name.scheme() == QLatin1String("ftp")
- || name.scheme() == QLatin1String("mailto") || name.path().endsWith(QLatin1String("pdf"))) {
- bool launched = QDesktopServices::openUrl(name);
- if (!launched) {
- QMessageBox::information(mw, tr("Help"),
- tr("Unable to launch web browser.\n"),
- tr("OK"));
- }
- return;
- }
-
- QFileInfo fi(name.toLocalFile());
- if (name.scheme() == QLatin1String("file") && fi.exists()) {
- if (newWindow || (shiftPressed && hasFocus())) {
- shiftPressed = false;
- mw->saveSettings();
- MainWindow *nmw = new MainWindow;
- nmw->move(mw->geometry().topLeft());
- nmw->show();
-
- if (mw->isMaximized())
- nmw->showMaximized();
-
- nmw->setup();
- nmw->showLink(name.toString());
- } else {
- QTextBrowser::setSource(name);
- QTextBrowser::scrollToAnchor(name.fragment());
- }
- return;
- }
- }
-
- mw->statusBar()->showMessage(tr("Failed to open link: '%1'").arg(name.toString()), 5000);
- setHtml(tr("<div align=\"center\"><h1>The page could not be found</h1><br>"
- "<h3>'%1'</h3></div>").arg(name.toString()));
- mw->browsers()->updateTitle(tr("Error..."));
-}
-
-void HelpWindow::openLinkInNewWindow()
-{
- if (lastAnchor.isEmpty())
- return;
- newWindow = true;
- setSource(lastAnchor);
- newWindow = false;
-}
-
-void HelpWindow::openLinkInNewWindow(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewWindow();
-}
-
-void HelpWindow::openLinkInNewPage()
-{
- if(lastAnchor.isEmpty())
- return;
- mw->browsers()->newTab(lastAnchor);
- lastAnchor.clear();
-}
-
-void HelpWindow::openLinkInNewPage(const QString &link)
-{
- lastAnchor = link;
- openLinkInNewPage();
-}
-
-bool HelpWindow::hasAnchorAt(const QPoint& pos)
-{
- lastAnchor = anchorAt(pos);
- if (lastAnchor.isEmpty())
- return false;
- lastAnchor = source().resolved(lastAnchor).toString();
- if (lastAnchor.at(0) == QLatin1Char('#')) {
- QString src = source().toString();
- int hsh = src.indexOf(QLatin1Char('#'));
- lastAnchor = (hsh>=0 ? src.left(hsh) : src) + lastAnchor;
- }
- return true;
-}
-
-void HelpWindow::contextMenuEvent(QContextMenuEvent *e)
-{
- QMenu menu(QLatin1String(""), 0);
-
- QUrl link;
- QAction *copyAnchorAction = 0;
- if (hasAnchorAt(e->pos())) {
- link = anchorAt(e->pos());
- if (link.isRelative())
- link = source().resolved(link);
- copyAnchorAction = menu.addAction(tr("Copy &Link Location"));
- copyAnchorAction->setEnabled(!link.isEmpty() && link.isValid());
-
- menu.addAction(tr("Open Link in New Tab"),
- this, SLOT(openLinkInNewPage()));
- menu.addAction(tr("Open Link in New Window\tShift+LMB"),
- this, SLOT(openLinkInNewWindow()));
- }
- mw->setupPopupMenu(&menu);
- QAction *action = menu.exec(e->globalPos());
- if (action == copyAnchorAction)
- QApplication::clipboard()->setText(link.toString());
-}
-
-void HelpWindow::mouseReleaseEvent(QMouseEvent *e)
-{
- if (e->button() == Qt::XButton1) {
- QTextBrowser::backward();
- return;
- }
-
- if (e->button() == Qt::XButton2) {
- QTextBrowser::forward();
- return;
- }
-
- if (e->button() == Qt::MidButton && hasAnchorAt(e->pos())) {
- openLinkInNewPage();
- return;
- }
- QTextBrowser::mouseReleaseEvent(e);
-}
-
-void HelpWindow::blockScrolling(bool b)
-{
- blockScroll = b;
-}
-
-void HelpWindow::ensureCursorVisible()
-{
- if (!blockScroll)
- QTextBrowser::ensureCursorVisible();
-}
-
-void HelpWindow::mousePressEvent(QMouseEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- if (!(shiftPressed && hasAnchorAt(e->pos())))
- QTextBrowser::mousePressEvent(e);
-}
-
-void HelpWindow::keyPressEvent(QKeyEvent *e)
-{
- shiftPressed = e->modifiers() & Qt::ShiftModifier;
- QTextBrowser::keyPressEvent(e);
-}
-
-bool HelpWindow::isKDERunning() const
-{
- return !qgetenv("KDE_FULL_SESSION").isEmpty();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/helpwindow.h b/tools/assistant/compat/helpwindow.h
deleted file mode 100644
index c1660e1..0000000
--- a/tools/assistant/compat/helpwindow.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef HELPWINDOW_H
-#define HELPWINDOW_H
-
-#include <QTextBrowser>
-
-QT_BEGIN_NAMESPACE
-
-class MainWindow;
-class QKeyEvent;
-class QMime;
-class QMouseEvent;
-class QMenu;
-
-class HelpWindow : public QTextBrowser
-{
- Q_OBJECT
-public:
- HelpWindow( MainWindow *m, QWidget *parent = 0);
- void setSource( const QUrl &name );
- void blockScrolling( bool b );
- void openLinkInNewWindow( const QString &link );
- void openLinkInNewPage( const QString &link );
- void addMimePath( const QString &path );
-
- void mousePressEvent(QMouseEvent *e);
- void keyPressEvent(QKeyEvent *);
-
-signals:
- void chooseWebBrowser();
- void choosePDFReader();
-
-protected:
- virtual void contextMenuEvent(QContextMenuEvent *e);
- virtual void mouseReleaseEvent(QMouseEvent *e);
-
-protected slots:
- void ensureCursorVisible();
-
-private slots:
- void openLinkInNewWindow();
- void openLinkInNewPage();
-
- bool isKDERunning() const;
-
-private:
- bool hasAnchorAt(const QPoint& pos);
-
- MainWindow *mw;
- QString lastAnchor;
- bool blockScroll;
- bool shiftPressed;
- bool newWindow;
- bool fwdAvail;
- bool backAvail;
-};
-
-QT_END_NAMESPACE
-
-#endif // HELPWINDOW_H
diff --git a/tools/assistant/compat/images/assistant-128.png b/tools/assistant/compat/images/assistant-128.png
deleted file mode 100644
index f05949f..0000000
--- a/tools/assistant/compat/images/assistant-128.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/assistant.png b/tools/assistant/compat/images/assistant.png
deleted file mode 100644
index ea4d1e7..0000000
--- a/tools/assistant/compat/images/assistant.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/close.png b/tools/assistant/compat/images/close.png
deleted file mode 100644
index 540694e..0000000
--- a/tools/assistant/compat/images/close.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/designer.png b/tools/assistant/compat/images/designer.png
deleted file mode 100644
index 72c42e7..0000000
--- a/tools/assistant/compat/images/designer.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/linguist.png b/tools/assistant/compat/images/linguist.png
deleted file mode 100644
index d388cbd..0000000
--- a/tools/assistant/compat/images/linguist.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/addtab.png b/tools/assistant/compat/images/mac/addtab.png
deleted file mode 100644
index 20928fb..0000000
--- a/tools/assistant/compat/images/mac/addtab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/book.png b/tools/assistant/compat/images/mac/book.png
deleted file mode 100644
index 7a3204c..0000000
--- a/tools/assistant/compat/images/mac/book.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/closetab.png b/tools/assistant/compat/images/mac/closetab.png
deleted file mode 100644
index ab9d669..0000000
--- a/tools/assistant/compat/images/mac/closetab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/editcopy.png b/tools/assistant/compat/images/mac/editcopy.png
deleted file mode 100644
index f551364..0000000
--- a/tools/assistant/compat/images/mac/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/find.png b/tools/assistant/compat/images/mac/find.png
deleted file mode 100644
index 3561745..0000000
--- a/tools/assistant/compat/images/mac/find.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/home.png b/tools/assistant/compat/images/mac/home.png
deleted file mode 100644
index 78d94da..0000000
--- a/tools/assistant/compat/images/mac/home.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/next.png b/tools/assistant/compat/images/mac/next.png
deleted file mode 100644
index a585cab..0000000
--- a/tools/assistant/compat/images/mac/next.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/prev.png b/tools/assistant/compat/images/mac/prev.png
deleted file mode 100644
index 612fb34..0000000
--- a/tools/assistant/compat/images/mac/prev.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/print.png b/tools/assistant/compat/images/mac/print.png
deleted file mode 100644
index 10ca56c..0000000
--- a/tools/assistant/compat/images/mac/print.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/synctoc.png b/tools/assistant/compat/images/mac/synctoc.png
deleted file mode 100644
index 067fa94..0000000
--- a/tools/assistant/compat/images/mac/synctoc.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/whatsthis.png b/tools/assistant/compat/images/mac/whatsthis.png
deleted file mode 100644
index 5b7078f..0000000
--- a/tools/assistant/compat/images/mac/whatsthis.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/zoomin.png b/tools/assistant/compat/images/mac/zoomin.png
deleted file mode 100644
index d46f5af..0000000
--- a/tools/assistant/compat/images/mac/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/mac/zoomout.png b/tools/assistant/compat/images/mac/zoomout.png
deleted file mode 100644
index 4632656..0000000
--- a/tools/assistant/compat/images/mac/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/qt.png b/tools/assistant/compat/images/qt.png
deleted file mode 100644
index 2dc6716..0000000
--- a/tools/assistant/compat/images/qt.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/addtab.png b/tools/assistant/compat/images/win/addtab.png
deleted file mode 100644
index 4bb0feb..0000000
--- a/tools/assistant/compat/images/win/addtab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/book.png b/tools/assistant/compat/images/win/book.png
deleted file mode 100644
index 09ec4d3..0000000
--- a/tools/assistant/compat/images/win/book.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/closetab.png b/tools/assistant/compat/images/win/closetab.png
deleted file mode 100644
index ef9e020..0000000
--- a/tools/assistant/compat/images/win/closetab.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/editcopy.png b/tools/assistant/compat/images/win/editcopy.png
deleted file mode 100644
index 1121b47..0000000
--- a/tools/assistant/compat/images/win/editcopy.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/find.png b/tools/assistant/compat/images/win/find.png
deleted file mode 100644
index 6ea35e9..0000000
--- a/tools/assistant/compat/images/win/find.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/home.png b/tools/assistant/compat/images/win/home.png
deleted file mode 100644
index b1c6ae1..0000000
--- a/tools/assistant/compat/images/win/home.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/next.png b/tools/assistant/compat/images/win/next.png
deleted file mode 100644
index 8df4127..0000000
--- a/tools/assistant/compat/images/win/next.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/previous.png b/tools/assistant/compat/images/win/previous.png
deleted file mode 100644
index 0780bc2..0000000
--- a/tools/assistant/compat/images/win/previous.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/print.png b/tools/assistant/compat/images/win/print.png
deleted file mode 100644
index ba7c02d..0000000
--- a/tools/assistant/compat/images/win/print.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/synctoc.png b/tools/assistant/compat/images/win/synctoc.png
deleted file mode 100644
index da301bc..0000000
--- a/tools/assistant/compat/images/win/synctoc.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/whatsthis.png b/tools/assistant/compat/images/win/whatsthis.png
deleted file mode 100644
index 623cad6..0000000
--- a/tools/assistant/compat/images/win/whatsthis.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/zoomin.png b/tools/assistant/compat/images/win/zoomin.png
deleted file mode 100644
index 2e586fc..0000000
--- a/tools/assistant/compat/images/win/zoomin.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/win/zoomout.png b/tools/assistant/compat/images/win/zoomout.png
deleted file mode 100644
index a736d39..0000000
--- a/tools/assistant/compat/images/win/zoomout.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/images/wrap.png b/tools/assistant/compat/images/wrap.png
deleted file mode 100644
index 90f18d9..0000000
--- a/tools/assistant/compat/images/wrap.png
+++ /dev/null
Binary files differ
diff --git a/tools/assistant/compat/index.cpp b/tools/assistant/compat/index.cpp
deleted file mode 100644
index ef8df84..0000000
--- a/tools/assistant/compat/index.cpp
+++ /dev/null
@@ -1,581 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "index.h"
-
-#include <QFile>
-#include <QDir>
-#include <QStringList>
-#include <QApplication>
-#include <QByteArray>
-#include <QTextStream>
-#include <QtAlgorithms>
-#include <QUrl>
-#include <QTextCodec>
-#include <ctype.h>
-#include <QTextDocument>
-
-QT_BEGIN_NAMESPACE
-
-struct Term {
- Term() : frequency(-1) {}
- Term( const QString &t, int f, QVector<Document> l ) : term( t ), frequency( f ), documents( l ) {}
- QString term;
- int frequency;
- QVector<Document>documents;
- bool operator<( const Term &i2 ) const { return frequency < i2.frequency; }
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l )
-{
- s >> l.docNumber;
- s >> l.frequency;
- return s;
-}
-
-QDataStream &operator<<( QDataStream &s, const Document &l )
-{
- s << (qint16)l.docNumber;
- s << (qint16)l.frequency;
- return s;
-}
-
-Index::Index( const QString &dp, const QString &hp )
- : QObject( 0 ), docPath( dp )
-{
- Q_UNUSED(hp);
-
- alreadyHaveDocList = false;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-Index::Index( const QStringList &dl, const QString &hp )
- : QObject( 0 )
-{
- Q_UNUSED(hp);
- docList = dl;
- alreadyHaveDocList = true;
- lastWindowClosed = false;
- connect( qApp, SIGNAL(lastWindowClosed()),
- this, SLOT(setLastWinClosed()) );
-}
-
-void Index::setLastWinClosed()
-{
- lastWindowClosed = true;
-}
-
-void Index::setDictionaryFile( const QString &f )
-{
- dictFile = f;
-}
-
-void Index::setDocListFile( const QString &f )
-{
- docListFile = f;
-}
-
-void Index::setDocList( const QStringList &lst )
-{
- docList = lst;
-}
-
-int Index::makeIndex()
-{
- if ( !alreadyHaveDocList )
- setupDocumentList();
- if ( docList.isEmpty() )
- return 1;
- QStringList::Iterator it = docList.begin();
- int steps = docList.count() / 100;
- if ( !steps )
- steps++;
- int prog = 0;
- for ( int i = 0; it != docList.end(); ++it, ++i ) {
- if ( lastWindowClosed ) {
- return -1;
- }
- QUrl url(*it);
- parseDocument( url.toLocalFile(), i );
- if ( i%steps == 0 ) {
- prog++;
- emit indexingProgress( prog );
- }
- }
- return 0;
-}
-
-void Index::setupDocumentList()
-{
- QDir d( docPath );
- QStringList filters;
- filters.append(QLatin1String("*.html"));
- QStringList lst = d.entryList(filters);
- QStringList::ConstIterator it = lst.constBegin();
- for ( ; it != lst.constEnd(); ++it )
- docList.append( QLatin1String("file:") + docPath + QLatin1String("/") + *it );
-}
-
-void Index::insertInDict( const QString &str, int docNum )
-{
- if ( str == QLatin1String("amp") || str == QLatin1String("nbsp"))
- return;
- Entry *e = 0;
- if ( dict.count() )
- e = dict[ str ];
-
- if ( e ) {
- if ( e->documents.last().docNumber != docNum )
- e->documents.append( Document(docNum, 1 ) );
- else
- e->documents.last().frequency++;
- } else {
- dict.insert( str, new Entry( docNum ) );
- }
-}
-
-QString Index::getCharsetForDocument(QFile *file)
-{
- QTextStream s(file);
- QString contents = s.readAll();
-
- QString encoding;
- int start = contents.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
- if (start > 0) {
- int end = contents.indexOf(QLatin1String(">"), start);
- QString meta = contents.mid(start+5, end-start);
- meta = meta.toLower();
- QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
- if (r.indexIn(meta) != -1) {
- encoding = r.cap(1);
- }
- }
-
- file->seek(0);
- if (encoding.isEmpty())
- return QLatin1String("utf-8");
- return encoding;
-}
-
-void Index::parseDocument( const QString &filename, int docNum )
-{
- QFile file( filename );
- if ( !file.open(QFile::ReadOnly) ) {
- qWarning( "can not open file %s", qPrintable(filename) );
- return;
- }
-
- QTextStream s(&file);
- QString en = getCharsetForDocument(&file);
- s.setCodec(QTextCodec::codecForName(en.toLatin1().constData()));
-
- QString text = s.readAll();
- if (text.isNull())
- return;
-
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- insertInDict( QString(str,i), docNum );
- file.close();
-}
-
-void Index::writeDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- for(QHash<QString, Entry *>::Iterator it = dict.begin(); it != dict.end(); ++it) {
- s << it.key();
- s << it.value()->documents.count();
- s << it.value()->documents;
- }
- f.close();
- writeDocumentList();
-}
-
-void Index::writeDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::WriteOnly ) )
- return;
- QDataStream s( &f );
- s << docList;
-}
-
-void Index::readDict()
-{
- QFile f( dictFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
-
- dict.clear();
- QDataStream s( &f );
- QString key;
- int numOfDocs;
- QVector<Document> docs;
- while ( !s.atEnd() ) {
- s >> key;
- s >> numOfDocs;
- docs.resize(numOfDocs);
- s >> docs;
- dict.insert( key, new Entry( docs ) );
- }
- f.close();
- readDocumentList();
-}
-
-void Index::readDocumentList()
-{
- QFile f( docListFile );
- if ( !f.open(QFile::ReadOnly ) )
- return;
- QDataStream s( &f );
- s >> docList;
-}
-
-QStringList Index::query( const QStringList &terms, const QStringList &termSeq, const QStringList &seqWords )
-{
- QList<Term> termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it ) {
- Entry *e = 0;
- if ( (*it).contains(QLatin1Char('*')) ) {
- QVector<Document> wcts = setupDummyTerm( getWildcardTerms( *it ) );
- termList.append( Term(QLatin1String("dummy"), wcts.count(), wcts ) );
- } else if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- } else {
- return QStringList();
- }
- }
- if ( !termList.count() )
- return QStringList();
- qSort(termList);
-
- QVector<Document> minDocs = termList.takeFirst().documents;
- for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector<Document> docs = t->documents;
- for(QVector<Document>::Iterator minDoc_it = minDocs.begin(); minDoc_it != minDocs.end(); ) {
- bool found = false;
- for (QVector<Document>::ConstIterator doc_it = docs.constBegin(); doc_it != docs.constEnd(); ++doc_it ) {
- if ( (*minDoc_it).docNumber == (*doc_it).docNumber ) {
- (*minDoc_it).frequency += (*doc_it).frequency;
- found = true;
- break;
- }
- }
- if ( !found )
- minDoc_it = minDocs.erase( minDoc_it );
- else
- ++minDoc_it;
- }
- }
-
- QStringList results;
- qSort( minDocs );
- if ( termSeq.isEmpty() ) {
- for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it)
- results << docList.at((int)(*it).docNumber);
- return results;
- }
-
- QString fileName;
- for(QVector<Document>::Iterator it = minDocs.begin(); it != minDocs.end(); ++it) {
- fileName = docList[ (int)(*it).docNumber ];
- if ( searchForPattern( termSeq, seqWords, fileName ) )
- results << fileName;
- }
- return results;
-}
-
-QString Index::getDocumentTitle( const QString &fullFileName )
-{
- QUrl url(fullFileName);
- QString fileName = url.toLocalFile();
-
- if (documentTitleCache.contains(fileName))
- return documentTitleCache.value(fileName);
-
- QFile file( fileName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fileName) );
- return fileName;
- }
- QTextStream s( &file );
- QString text = s.readAll();
-
- int start = text.indexOf(QLatin1String("<title>"), 0, Qt::CaseInsensitive) + 7;
- int end = text.indexOf(QLatin1String("</title>"), 0, Qt::CaseInsensitive);
-
- QString title = tr("Untitled");
- if (end - start > 0) {
- title = text.mid(start, end - start);
- if (Qt::mightBeRichText(title)) {
- QTextDocument doc;
- doc.setHtml(title);
- title = doc.toPlainText();
- }
- }
- documentTitleCache.insert(fileName, title);
- return title;
-}
-
-QStringList Index::getWildcardTerms( const QString &term )
-{
- QStringList lst;
- QStringList terms = split( term );
- QStringList::Iterator iter;
-
- for(QHash<QString, Entry*>::Iterator it = dict.begin(); it != dict.end(); ++it) {
- int index = 0;
- bool found = false;
- QString text( it.key() );
- for ( iter = terms.begin(); iter != terms.end(); ++iter ) {
- if ( *iter == QLatin1String("*") ) {
- found = true;
- continue;
- }
- if ( iter == terms.begin() && (*iter)[0] != text[0] ) {
- found = false;
- break;
- }
- index = text.indexOf( *iter, index );
- if ( *iter == terms.last() && index != (int)text.length()-1 ) {
- index = text.lastIndexOf( *iter );
- if ( index != (int)text.length() - (int)(*iter).length() ) {
- found = false;
- break;
- }
- }
- if ( index != -1 ) {
- found = true;
- index += (*iter).length();
- continue;
- } else {
- found = false;
- break;
- }
- }
- if ( found )
- lst << text;
- }
-
- return lst;
-}
-
-QStringList Index::split( const QString &str )
-{
- QStringList lst;
- int j = 0;
- int i = str.indexOf(QLatin1Char('*'), j );
-
- if (str.startsWith(QLatin1String("*")))
- lst << QLatin1String("*");
-
- while ( i != -1 ) {
- if ( i > j && i <= (int)str.length() ) {
- lst << str.mid( j, i - j );
- lst << QLatin1String("*");
- }
- j = i + 1;
- i = str.indexOf(QLatin1Char('*'), j );
- }
-
- int l = str.length() - 1;
- if ( str.mid( j, l - j + 1 ).length() > 0 )
- lst << str.mid( j, l - j + 1 );
-
- return lst;
-}
-
-QVector<Document> Index::setupDummyTerm( const QStringList &terms )
-{
- QList<Term> termList;
- for (QStringList::ConstIterator it = terms.begin(); it != terms.end(); ++it) {
- Entry *e = 0;
- if ( dict[ *it ] ) {
- e = dict[ *it ];
- termList.append( Term( *it, e->documents.count(), e->documents ) );
- }
- }
- QVector<Document> maxList(0);
- if ( !termList.count() )
- return maxList;
- qSort(termList);
-
- maxList = termList.takeLast().documents;
- for(QList<Term>::Iterator it = termList.begin(); it != termList.end(); ++it) {
- Term *t = &(*it);
- QVector<Document> docs = t->documents;
- for (QVector<Document>::iterator docIt = docs.begin(); docIt != docs.end(); ++docIt ) {
- if ( maxList.indexOf( *docIt ) == -1 )
- maxList.append( *docIt );
- }
- }
- return maxList;
-}
-
-void Index::buildMiniDict( const QString &str )
-{
- if ( miniDict[ str ] )
- miniDict[ str ]->positions.append( wordNum );
- ++wordNum;
-}
-
-bool Index::searchForPattern( const QStringList &patterns, const QStringList &words, const QString &fileName )
-{
- QUrl url(fileName);
- QString fName = url.toLocalFile();
- QFile file( fName );
- if ( !file.open( QFile::ReadOnly ) ) {
- qWarning( "cannot open file %s", qPrintable(fName) );
- return false;
- }
-
- wordNum = 3;
- miniDict.clear();
- QStringList::ConstIterator cIt = words.begin();
- for ( ; cIt != words.end(); ++cIt )
- miniDict.insert( *cIt, new PosEntry( 0 ) );
-
- QTextStream s( &file );
- QString text = s.readAll();
- bool valid = true;
- const QChar *buf = text.unicode();
- QChar str[64];
- QChar c = buf[0];
- int j = 0;
- int i = 0;
- while ( j < text.length() ) {
- if ( c == QLatin1Char('<') || c == QLatin1Char('&') ) {
- valid = false;
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- c = buf[++j];
- continue;
- }
- if ( ( c == QLatin1Char('>') || c == QLatin1Char(';') ) && !valid ) {
- valid = true;
- c = buf[++j];
- continue;
- }
- if ( !valid ) {
- c = buf[++j];
- continue;
- }
- if ( ( c.isLetterOrNumber() || c == QLatin1Char('_') ) && i < 63 ) {
- str[i] = c.toLower();
- ++i;
- } else {
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- i = 0;
- }
- c = buf[++j];
- }
- if ( i > 1 )
- buildMiniDict( QString(str,i) );
- file.close();
-
- QStringList::ConstIterator patIt = patterns.begin();
- QStringList wordLst;
- QList<uint> a, b;
- QList<uint>::iterator aIt;
- for ( ; patIt != patterns.end(); ++patIt ) {
- wordLst = (*patIt).split(QLatin1Char(' '));
- a = miniDict[ wordLst[0] ]->positions;
- for ( int j = 1; j < (int)wordLst.count(); ++j ) {
- b = miniDict[ wordLst[j] ]->positions;
- aIt = a.begin();
- while ( aIt != a.end() ) {
- if ( b.contains( *aIt + 1 )) {
- (*aIt)++;
- ++aIt;
- } else {
- aIt = a.erase( aIt );
- }
- }
- }
- }
- if ( a.count() )
- return true;
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/index.h b/tools/assistant/compat/index.h
deleted file mode 100644
index 7cf07df..0000000
--- a/tools/assistant/compat/index.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef INDEX_H
-#define INDEX_H
-
-#include <QStringList>
-#include <QHash>
-#include <QDataStream>
-#include <QObject>
-#include <QList>
-#include <QFile>
-#include <QVector>
-
-QT_BEGIN_NAMESPACE
-
-struct Document {
- Document( int d, int f ) : docNumber( d ), frequency( f ) {}
- Document() : docNumber( -1 ), frequency( 0 ) {}
- bool operator==( const Document &doc ) const {
- return docNumber == doc.docNumber;
- }
- bool operator<( const Document &doc ) const {
- return frequency > doc.frequency;
- }
- bool operator<=( const Document &doc ) const {
- return frequency >= doc.frequency;
- }
- bool operator>( const Document &doc ) const {
- return frequency < doc.frequency;
- }
- qint16 docNumber;
- qint16 frequency;
-};
-
-QDataStream &operator>>( QDataStream &s, Document &l );
-QDataStream &operator<<( QDataStream &s, const Document &l );
-
-class Index : public QObject
-{
- Q_OBJECT
-public:
- struct Entry {
- Entry( int d ) { documents.append( Document( d, 1 ) ); }
- Entry( QVector<Document> l ) : documents( l ) {}
- QVector<Document> documents;
- };
- struct PosEntry {
- PosEntry( int p ) { positions.append( p ); }
- QList<uint> positions;
- };
-
- Index( const QString &dp, const QString &hp );
- Index( const QStringList &dl, const QString &hp );
- void writeDict();
- void readDict();
- int makeIndex();
- QStringList query( const QStringList&, const QStringList&, const QStringList& );
- QString getDocumentTitle( const QString& );
- void setDictionaryFile( const QString& );
- void setDocListFile( const QString& );
- void setDocList( const QStringList & );
-
-signals:
- void indexingProgress( int );
-
-private slots:
- void setLastWinClosed();
-
-private:
- void setupDocumentList();
- void parseDocument( const QString&, int );
- void insertInDict( const QString&, int );
- void writeDocumentList();
- void readDocumentList();
- QStringList getWildcardTerms( const QString& );
- QStringList split( const QString& );
- QVector<Document> setupDummyTerm( const QStringList& );
- bool searchForPattern( const QStringList&, const QStringList&, const QString& );
- void buildMiniDict( const QString& );
- QString getCharsetForDocument(QFile *);
- QStringList docList;
- QHash<QString, Entry*> dict;
- QHash<QString, PosEntry*> miniDict;
- uint wordNum;
- QString docPath;
- QString dictFile, docListFile;
- bool alreadyHaveDocList;
- bool lastWindowClosed;
- QHash<QString, QString> documentTitleCache;
-};
-
-#endif
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/lib.pro b/tools/assistant/compat/lib/lib.pro
deleted file mode 100644
index e50d470..0000000
--- a/tools/assistant/compat/lib/lib.pro
+++ /dev/null
@@ -1,78 +0,0 @@
-TEMPLATE = lib
-QT += network
-TARGET = QtAssistantClient
-isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.3.0
-} else {
- VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
-}
-
-CONFIG += qt warn_on
-mac|win32:CONFIG += debug_and_release
-mac:unix:CONFIG += explicitlib
-CONFIG -= dll
-
-HEADERS = qassistantclient.h \
- qassistantclient_global.h
-SOURCES = qassistantclient.cpp
-
-DESTDIR = ../../../../lib
-DLLDESTDIR = ../../../../bin
-
-unix {
- QMAKE_CFLAGS += $$QMAKE_CFLAGS_SHLIB
- QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_SHLIB
-}
-
-DEFINES += QT_ASSISTANT_CLIENT_LIBRARY
-contains(CONFIG, static) {
- DEFINES += QT_ASSISTANT_CLIENT_STATIC
-}
-
-#load up the headers info
-CONFIG += qt_install_headers
-HEADERS_PRI = $$QT_BUILD_TREE/include/QtAssistant/headers.pri
-include($$HEADERS_PRI, "", true)|clear(HEADERS_PRI)
-
-#mac frameworks
-mac:!static:contains(QT_CONFIG, qt_framework) {
- TARGET = QtAssistant # Change the name to match the headers
- QMAKE_FRAMEWORK_BUNDLE_NAME = $$TARGET
- CONFIG += lib_bundle qt_no_framework_direct_includes qt_framework
- CONFIG(debug, debug|release) {
- !build_pass:CONFIG += build_all
- } else { #release
- !debug_and_release|build_pass {
- CONFIG -= qt_install_headers #no need to install these as well
- FRAMEWORK_HEADERS.version = Versions
- FRAMEWORK_HEADERS.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- FRAMEWORK_HEADERS.path = Headers
- }
- QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
- }
-}
-
-TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #done towards the end
-
-target.path=$$[QT_INSTALL_LIBS]
-INSTALLS += target
-win32 {
- dlltarget.path=$$[QT_INSTALL_BINS]
- INSTALLS += dlltarget
-}
-
-qt_install_headers {
- assistant_headers.files = $$SYNCQT.HEADER_FILES $$SYNCQT.HEADER_CLASSES
- assistant_headers.path = $$[QT_INSTALL_HEADERS]/QtAssistant
- INSTALLS += assistant_headers
-}
-
-unix {
- CONFIG += create_pc
- QMAKE_PKGCONFIG_LIBDIR = $$[QT_INSTALL_LIBS]
- QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS]/QtAssistant
- QMAKE_PKGCONFIG_CFLAGS = -I$$[QT_INSTALL_HEADERS]
- QMAKE_PKGCONFIG_DESTDIR = pkgconfig
- QMAKE_PKGCONFIG_REQUIRES += QtNetwork
-}
-
diff --git a/tools/assistant/compat/lib/qassistantclient.cpp b/tools/assistant/compat/lib/qassistantclient.cpp
deleted file mode 100644
index 29f63c6..0000000
--- a/tools/assistant/compat/lib/qassistantclient.cpp
+++ /dev/null
@@ -1,446 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qassistantclient.h"
-
-#include <qtcpsocket.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qfileinfo.h>
-#include <qmap.h>
-
-QT_BEGIN_NAMESPACE
-
-class QAssistantClientPrivate
-{
- friend class QAssistantClient;
- QStringList arguments;
-};
-
-static QMap<const QAssistantClient*,QAssistantClientPrivate*> *dpointers = 0;
-
-static QAssistantClientPrivate *data( const QAssistantClient *client, bool create=false )
-{
- if( !dpointers )
- dpointers = new QMap<const QAssistantClient*,QAssistantClientPrivate*>;
- QAssistantClientPrivate *d = (*dpointers)[client];
- if( !d && create ) {
- d = new QAssistantClientPrivate;
- dpointers->insert( client, d );
- }
- return d;
-}
-
-/*!
- \class QAssistantClient
- \obsolete
- \brief The QAssistantClient class provides a means of using Qt
- Assistant as an application's help tool.
-
- \ingroup helpsystem
-
- \bold{Note:} \e{This class is obsolete and only required when using
- the old Qt Assistant, now called assistant_adp. If you want to use
- the new Qt Assistant as a remote help viewer, simple create a
- QProcess instance and specify \tt{assistant} as its executable.
- The following code shows how to start Qt Assistant and request a
- certain page to be shown:}
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 0
-
- \e{For a complete example using the Qt Assistant remotely, see the \l
- {help/remotecontrol}{Remote Control} example.}
-
- In order to make Qt Assistant act as a customized help tool for
- your application, you must provide your application with a
- QAssistantClient object in addition to a \l
- {assistant-manual.html} {Qt Assistant Document Profile} (\c .adp
- file) and the associated documentation.
-
- Note that the QAssistantClient class is not included in the Qt
- library. To use it you must add the following line to your pro
- file:
-
- \snippet doc/src/snippets/code/tools_assistant_compat_lib_qassistantclient.cpp 1
-
- A QAssistantClient instance can open or close Qt Assistant
- whenever it is required.
-
- Once you have created a QAssistantClient instance, specifying the
- path to the Qt Assistant executable, using Qt Assistant is
- simple: You can either call the openAssistant() slot to show the
- defined start page of the documentation, or you can call the
- showPage() slot to show a particular help page. When you call
- openAssistant() and showPage(), Qt Assistant will be launched if
- it isn't already running. When Qt Assistant is running, the
- isOpen() function returns true.
-
- When calling showPage() the Qt Assistant instance will also be
- brought to the foreground if its hidden. The showPage() slot can
- be called multiple times, while calling openAssistant() several
- times without closing the application in between, will have no
- effect.
-
- You can close Qt Assistant at any time using the closeAssistant()
- slot. When you call openAssistant(), or you call showPage()
- without a previous call to openAssistant(), the assistantOpened()
- signal is emitted. Similarly when closeAssistant() is called,
- assistantClosed() is emitted. In either case, if an error occurs,
- error() is emitted.
-
- One QAssistantClient instance interacts with one Qt Assistant
- instance, so every time you call openAssistant(), showPage() or
- closeAssistant() they are applied to the particular Qt Assistant
- instance associated with the QAssistantClient.
-
- Qt Assistant's documentation set can be altered using the command
- line arguments that are passed to the application when it is
- launched. When started without any options, Qt Assistant displays
- a default set of documentation. When Qt is installed, the default
- documentation set in Qt Assistant contains the Qt reference
- documentation as well as the tools that come with Qt, such as \QD
- and \c qmake.
-
- Use the setArguments() function to specify the command line
- arguments. You can add or remove documentation from Qt Assistant
- by adding and removing the relevant content files: The command
- line arguments are \c {-addContentFile file.dcf} and \c
- {-removeContentFile file.dcf} respectively. You can make Qt
- Assistant run customized documentation sets that are separate from
- the Qt documentation, by specifying a profile: \c {-profile
- myapplication.adp}. The profile format can also be used to alter
- several of Qt Assistant's properties such as its title and
- startpage.
-
- The Documentation Content File (\c .dcf) and Qt Assistant
- Documentation Profile (\c .adp) formats are documented in the \l
- {assistant-manual.html}{Qt Assistant Manual}.
-
- For a complete example using the QAssistantClient class, see the
- \e{Simple Text Viewer} example. The example shows how you can make
- Qt Assistant act as a customized help tool for your application
- using the QAssistantClient class combined with a Qt Assistant
- Document Profile.
-
- \sa {Qt Assistant Manual}, {Simple Text Viewer Example}
-*/
-
-/*!
- \fn void QAssistantClient::assistantOpened()
-
- This signal is emitted when Qt Assistant is opened and the
- client-server communication is set up.
-
- \sa openAssistant(), showPage()
-*/
-
-/*!
- \fn void QAssistantClient::assistantClosed()
-
- This signal is emitted when the connection to Qt Assistant is
- closed. This happens when the user exits Qt Assistant, if an
- error in the server or client occurs, or if closeAssistant() is
- called.
-
- \sa closeAssistant()
-*/
-
-/*!
- \fn void QAssistantClient::error( const QString &message )
-
- This signal is emitted if Qt Assistant cannot be started, or if an
- error occurs during the initialization of the connection between
- Qt Assistant and the calling application. The \a message provides an
- explanation of the error.
-*/
-
-/*!
- Constructs an assistant client with the specified \a parent. For
- systems other than Mac OS, \a path specifies the path to the Qt
- Assistant executable. For Mac OS, \a path specifies a directory
- containing a valid assistant.app bundle. If \a path is the empty
- string, the system path (\c{%PATH%} or \c $PATH) is used.
-*/
-QAssistantClient::QAssistantClient( const QString &path, QObject *parent )
- : QObject( parent ), host ( QLatin1String("localhost") )
-{
-#if defined(Q_OS_MAC)
- const QString assistant = QLatin1String("Assistant_adp");
-#else
- const QString assistant = QLatin1String("assistant_adp");
-#endif
-
- if ( path.isEmpty() )
- assistantCommand = assistant;
- else {
- QFileInfo fi( path );
- if ( fi.isDir() )
- assistantCommand = path + QLatin1String("/") + assistant;
- else
- assistantCommand = path;
- }
-
-#if defined(Q_OS_MAC)
- assistantCommand += QLatin1String(".app/Contents/MacOS/Assistant_adp");
-#endif
-
- socket = new QTcpSocket( this );
- connect( socket, SIGNAL(connected()),
- SLOT(socketConnected()) );
- connect( socket, SIGNAL(disconnected()),
- SLOT(socketConnectionClosed()) );
- connect( socket, SIGNAL(error(QAbstractSocket::SocketError)),
- SLOT(socketError()) );
- opened = false;
- proc = new QProcess( this );
- port = 0;
- pageBuffer = QLatin1String("");
- connect( proc, SIGNAL(readyReadStandardError()),
- this, SLOT(readStdError()) );
- connect( proc, SIGNAL(error(QProcess::ProcessError)),
- this, SLOT(procError(QProcess::ProcessError)) );
-}
-
-/*!
- Destroys the assistant client object.
-*/
-QAssistantClient::~QAssistantClient()
-{
- if ( proc->state() == QProcess::Running )
- proc->terminate();
-
- if( dpointers ) {
- QAssistantClientPrivate *d = (*dpointers)[ this ];
- if ( d ) {
- dpointers->remove(this);
- delete d;
- if( dpointers->isEmpty() ) {
- delete dpointers;
- dpointers = 0;
- }
- }
- }
-}
-
-/*!
- Opens Qt Assistant, i.e. sets up the client-server communication
- between the application and Qt Assistant, and shows the start page
- specified by the current \l {assistant-manual.html}
- {Qt Assistant Document Profile}. If there is no specfied profile,
- and Qt is installed, the default start page is the Qt Reference
- Documentation's index page.
-
- If the connection is already established, this function does
- nothing. Use the showPage() function to show another page. If an
- error occurs, the error() signal is emitted.
-
- \sa showPage(), assistantOpened()
-*/
-void QAssistantClient::openAssistant()
-{
- if ( proc->state() == QProcess::Running )
- return;
-
- QStringList args;
- args.append(QLatin1String("-server"));
- if( !pageBuffer.isEmpty() ) {
- args.append( QLatin1String("-file") );
- args.append( pageBuffer );
- }
-
- QAssistantClientPrivate *d = data( this );
- if( d ) {
- QStringList::ConstIterator it = d->arguments.constBegin();
- while( it!=d->arguments.constEnd() ) {
- args.append( *it );
- ++it;
- }
- }
-
- connect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-
- proc->start(assistantCommand, args);
-}
-
-void QAssistantClient::procError(QProcess::ProcessError err)
-{
- switch (err)
- {
- case QProcess::FailedToStart:
- emit error( tr( "Failed to start Qt Assistant." ) );
- break;
- case QProcess::Crashed:
- emit error( tr( "Qt Assistant crashed." ) );
- break;
- default:
- emit error( tr( "Error while running Qt Assistant." ) );
- }
-}
-
-void QAssistantClient::readPort()
-{
- QString p(QString::fromLatin1(proc->readAllStandardOutput()));
- quint16 port = p.toUShort();
- if ( port == 0 ) {
- emit error( tr( "Cannot connect to Qt Assistant." ) );
- return;
- }
- socket->connectToHost( host, port );
- disconnect( proc, SIGNAL(readyReadStandardOutput()),
- this, SLOT(readPort()) );
-}
-
-/*!
- Closes the Qt Assistant instance.
-
- \sa openAssistant(), assistantClosed()
-*/
-void QAssistantClient::closeAssistant()
-{
- if ( !opened )
- return;
-
- bool blocked = proc->blockSignals(true);
- proc->terminate();
- if (!proc->waitForFinished(2000)) {
- // If the process hasn't died after 2 seconds,
- // we kill it, causing it to exit immediately.
- proc->kill();
- }
- proc->blockSignals(blocked);
-}
-
-/*!
- Brings Qt Assistant to the foreground showing the given \a page.
- The \a page parameter is a path to an HTML file
- (e.g., QLatin1String("/home/pasquale/superproduct/docs/html/intro.html")).
-
- If Qt Assistant hasn't been opened yet, this function will call
- the openAssistant() slot with the specified page as the start
- page.
-
- \note The first time Qt Assistant is started, its window will open
- in front of the application's windows. Subsequent calls to this function
- will only load the specified pages in Qt Assistant and will not display
- its window in front of the application's windows.
-
- \sa openAssistant()
-*/
-void QAssistantClient::showPage( const QString &page )
-{
- if (opened) {
- QTextStream os( socket );
- os << page << QLatin1String("\n");
- } else {
- pageBuffer = page;
-
- if (proc->state() == QProcess::NotRunning) {
- openAssistant();
- pageBuffer.clear();
- return;
- }
- }
-}
-
-/*!
- \property QAssistantClient::open
- \brief whether Qt Assistant is open
-
-*/
-bool QAssistantClient::isOpen() const
-{
- return opened;
-}
-
-void QAssistantClient::socketConnected()
-{
- opened = true;
- if ( !pageBuffer.isEmpty() )
- showPage( pageBuffer );
- emit assistantOpened();
-}
-
-void QAssistantClient::socketConnectionClosed()
-{
- opened = false;
- emit assistantClosed();
-}
-
-void QAssistantClient::socketError()
-{
- QAbstractSocket::SocketError err = socket->error();
- if (err == QTcpSocket::ConnectionRefusedError)
- emit error( tr( "Could not connect to Assistant: Connection refused" ) );
- else if (err == QTcpSocket::HostNotFoundError)
- emit error( tr( "Could not connect to Assistant: Host not found" ) );
- else if (err != QTcpSocket::RemoteHostClosedError)
- emit error( tr( "Communication error" ) );
-}
-
-void QAssistantClient::readStdError()
-{
- QString errmsg = QString::fromLatin1(proc->readAllStandardError());
-
- if (!errmsg.isEmpty())
- emit error( errmsg.simplified() );
-}
-
-/*!
- \fn void QAssistantClient::setArguments(const QStringList &arguments)
-
- Sets the command line \a arguments that are passed to Qt Assistant
- when it is launched.
-
- The command line arguments can be used to alter Qt Assistant's
- documentation set. When started without any options, Qt Assistant
- displays a default set of documentation. When Qt is installed, the
- default documentation set in Qt Assistant contains the Qt
- reference documentation as well as the tools that come with Qt,
- such as Qt Designer and qmake.
-*/
-void QAssistantClient::setArguments( const QStringList &args )
-{
- QAssistantClientPrivate *d = data( this, true );
- d->arguments = args;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/lib/qassistantclient.h b/tools/assistant/compat/lib/qassistantclient.h
deleted file mode 100644
index 1b1b1e9..0000000
--- a/tools/assistant/compat/lib/qassistantclient.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QASSISTANTCLIENT_H
-#define QASSISTANTCLIENT_H
-
-#include <QtCore/QObject>
-#include <QtCore/QStringList>
-#include <QtCore/QProcess>
-#include <QtCore/qglobal.h>
-#include <QtAssistant/qassistantclient_global.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-class QTcpSocket;
-
-class QT_ASSISTANT_CLIENT_EXPORT QAssistantClient : public QObject
-{
- Q_OBJECT
- Q_PROPERTY( bool open READ isOpen )
-
-public:
- QAssistantClient( const QString &path, QObject *parent = 0);
- ~QAssistantClient();
-
- bool isOpen() const;
-
- void setArguments( const QStringList &args );
-
-public Q_SLOTS:
- virtual void openAssistant();
- virtual void closeAssistant();
- virtual void showPage( const QString &page );
-
-Q_SIGNALS:
- void assistantOpened();
- void assistantClosed();
- void error( const QString &msg );
-
-private Q_SLOTS:
- void socketConnected();
- void socketConnectionClosed();
- void readPort();
- void procError(QProcess::ProcessError err);
- void socketError();
- void readStdError();
-
-private:
- QTcpSocket *socket;
- QProcess *proc;
- quint16 port;
- QString host, assistantCommand, pageBuffer;
- bool opened;
-};
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/tools/assistant/compat/main.cpp b/tools/assistant/compat/main.cpp
deleted file mode 100644
index 3cd2894..0000000
--- a/tools/assistant/compat/main.cpp
+++ /dev/null
@@ -1,465 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "helpdialog.h"
-#include "config.h"
-
-#include <QTcpServer>
-#include <QTcpSocket>
-#include <QApplication>
-#include <QPixmap>
-#include <QStringList>
-#include <QDir>
-#include <QMessageBox>
-#include <QPointer>
-#include <QTranslator>
-#include <QLibraryInfo>
-#include <QLocale>
-#include <stdlib.h>
-#include <stdio.h>
-
-#if defined(USE_STATIC_JPEG_PLUGIN)
- #include <QtPlugin>
- Q_IMPORT_PLUGIN(qjpeg)
-#endif
-
-#define INDEX_CHECK( text ) if( i+1 >= argc ) { fprintf(stderr, "%s\n", text); return 1; }
-
-QT_BEGIN_NAMESPACE
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
-QT_BEGIN_INCLUDE_NAMESPACE
-#include <QtDBus/QDBusConnection>
-#include <QtDBus/QDBusAbstractAdaptor>
-#include <QtDBus/QDBusObjectPath>
-#include "tabbedbrowser.h"
-QT_END_INCLUDE_NAMESPACE
-
-class HelpWindowAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpWindow")
-
- Q_PROPERTY(QString source READ source WRITE setSource)
-
-public:
- HelpWindowAdaptor(HelpWindow *w) : QDBusAbstractAdaptor(w), helpWindow(w)
- {
- setAutoRelaySignals(true);
- }
-
-public Q_SLOTS:
- inline QString source() const { return helpWindow->source().toString(); }
- inline void setSource(const QString &src) { helpWindow->setSource(src); }
-
- inline void clearHistory() { helpWindow->clearHistory(); }
- inline void backward() { helpWindow->backward(); }
- inline void forward() { helpWindow->forward(); }
- inline void reload() { helpWindow->reload(); }
- inline void home() { helpWindow->home(); }
-
-private:
- HelpWindow *helpWindow;
-};
-
-class AssistantAdaptor : public QDBusAbstractAdaptor
-{
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "com.trolltech.Assistant.HelpViewer")
-
-public:
- AssistantAdaptor(MainWindow *mw) : QDBusAbstractAdaptor(mw), mw(mw)
- {
- QDBusConnection connection = QDBusConnection::sessionBus();
- connection.registerService(QLatin1String("com.trolltech.Assistant"));
- connection.registerObject(QLatin1String("/Assistant"), mw);
- }
-
-public slots:
- void showLink(const QString &link) { mw->showLink(link); }
- QDBusObjectPath createNewTab();
- QDBusObjectPath currentTab();
-
-private:
- QDBusObjectPath pathForBrowser(HelpWindow *window);
- MainWindow *mw;
-};
-
-QDBusObjectPath AssistantAdaptor::createNewTab()
-{
- HelpWindow *window = mw->browsers()->newBackgroundTab();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::currentTab()
-{
- HelpWindow *window = mw->browsers()->currentBrowser();
- return pathForBrowser(window);
-}
-
-QDBusObjectPath AssistantAdaptor::pathForBrowser(HelpWindow *window)
-{
- int index = mw->browsers()->browsers().indexOf(window);
- if (index == -1)
- return QDBusObjectPath();
-
- QString name(QLatin1String("/Assistant/Tabs/"));
- name += QString::number(index);
- QDBusObjectPath path(name);
-
- if (!window->findChild<HelpWindowAdaptor *>()) {
- (void)new HelpWindowAdaptor(window);
- QDBusConnection::sessionBus().registerObject(name, window);
- }
-
- return path;
-}
-
-#endif // QT_NO_DBUS
-
-class AssistantSocket : public QTcpSocket
-{
- Q_OBJECT
-public:
- AssistantSocket( int sock, QObject *parent = 0 );
- ~AssistantSocket() {}
-
-signals:
- void showLinkRequest( const QString& );
-
-private slots:
- void readClient();
- void connectionClosed();
-};
-
-
-class AssistantServer : public QTcpServer
-{
- Q_OBJECT
-public:
- AssistantServer( QObject* parent = 0 );
- quint16 getPort() const;
-
-signals:
- void showLinkRequest( const QString& );
- void newConnect();
-
-public slots:
- virtual void incomingConnection( int socket );
-
-private:
- quint16 p;
-};
-
-AssistantSocket::AssistantSocket( int sock, QObject *parent )
- : QTcpSocket( parent )
-{
- connect( this, SIGNAL(readyRead()), SLOT(readClient()) );
- connect( this, SIGNAL(disconnected()), SLOT(connectionClosed()) );
- setSocketDescriptor( sock );
-}
-
-void AssistantSocket::readClient()
-{
- QString link = QString();
- while ( canReadLine() )
- link = QLatin1String(readLine());
- if ( !link.isNull() ) {
- link = link.replace(QLatin1String("\n"), QLatin1String(""));
- link = link.replace(QLatin1String("\r"), QLatin1String(""));
- QFileInfo fi(link);
- link = fi.absoluteFilePath();
- emit showLinkRequest( link );
- }
-}
-
-void AssistantSocket::connectionClosed()
-{
- deleteLater();
-}
-
-AssistantServer::AssistantServer( QObject *parent )
- : QTcpServer( parent )
-{
- listen(QHostAddress::LocalHost, 0);
- if ( !isListening() ) {
- QMessageBox::critical( 0, tr( "Qt Assistant" ),
- tr( "Failed to bind to port %1" ).arg( serverPort() ) );
- exit( 1 );
- }
- p = serverPort();
-}
-
-quint16 AssistantServer::getPort() const
-{
- return p;
-}
-
-void AssistantServer::incomingConnection( int socket )
-{
- AssistantSocket *as = new AssistantSocket( socket, this );
- connect( as, SIGNAL(showLinkRequest(QString)),
- this, SIGNAL(showLinkRequest(QString)) );
- emit newConnect();
-}
-
-int runAssistant( int argc, char ** argv )
-{
- bool withGUI = true;
-#ifndef Q_WS_WIN
- if ( argc > 1 ) {
- QString arg = QString::fromLocal8Bit(argv[1]);
- arg = arg.toLower();
- if ( arg == QLatin1String("-addcontentfile")
- || arg == QLatin1String("-removecontentfile")
- || arg == QLatin1String("-help")
- || arg == QLatin1String("/?")
- )
- withGUI = false;
- }
-#endif
- QApplication a(argc, argv, withGUI);
- a.setOrganizationName(QLatin1String("Trolltech"));
- a.setApplicationName(QLatin1String("Assistant"));
-
- QString resourceDir;
- AssistantServer *as = 0;
- QStringList catlist;
- QString file, profileName, aDocPath;
- bool server = false;
- bool hideSidebar = false;
- bool configLoaded = false;
- if ( argc == 2 ) {
- file = QString::fromLocal8Bit(argv[1]);
- if (file.startsWith(QLatin1String("-")) || file == QLatin1String("/?")) {
- file.clear();
- } else {
- QFileInfo fi(file);
- file = fi.absoluteFilePath();
- file = MainWindow::urlifyFileName(file);
- }
- }
- if ( file.isEmpty() ) {
- for ( int i = 1; i < argc; i++ ) {
- QString opt = QString::fromLocal8Bit(argv[i]).toLower();
- if ( opt == QLatin1String("-file") ) {
- INDEX_CHECK( "Missing file argument!" );
- i++;
- file = QFile::decodeName(argv[i]);
- } else if ( opt == QLatin1String("-server") ) {
- server = true;
- } else if ( opt == QLatin1String("-profile") ) {
- INDEX_CHECK( "Missing profile argument!" );
- profileName = QFile::decodeName(argv[++i]);
- } else if ( opt == QLatin1String("-addcontentfile") ) {
- INDEX_CHECK( "Missing content file!" );
- Config *c = Config::loadConfig(QString());
- QFileInfo file( QFile::decodeName(argv[i+1]) );
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- DocuParser *parser = DocuParser::createParser( file.absoluteFilePath() );
- if( parser ) {
- QFile f( QFile::decodeName(argv[i+1]) );
- if( !parser->parse( &f ) ) {
- fprintf(stderr, "Failed to parse file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- parser->addTo( c->profile() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( opt == QLatin1String("-removecontentfile") ) {
- INDEX_CHECK("Missing content file!");
- Config *c = Config::loadConfig(QString());
- Profile *profile = c->profile();
- QString contentFile = QString::fromLocal8Bit(argv[i+i]);
- QStringList entries;
-#ifdef Q_WS_WIN
- contentFile.replace(QLatin1Char('\\'), QLatin1Char('/'));
- entries = profile->docs.filter(contentFile, Qt::CaseInsensitive);
-#else
- entries = profile->docs.filter(contentFile);
-#endif
- if (entries.count() == 0) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(contentFile));
- return 1;
- } else if (entries.count() > 1) {
- fprintf(stderr, "More than one entry matching file name found, "
- "please specify full path to file");
- return 1;
- } else {
- QFileInfo file(entries[0]);
- if( !file.exists() ) {
- fprintf(stderr, "Could not locate content file: %s\n", qPrintable(file.absoluteFilePath()));
- return 1;
- }
- profile->removeDocFileEntry( file.absoluteFilePath() );
- c->setDocRebuild( true );
- c->save();
- }
- return 0;
- } else if ( QString( QLatin1String(argv[i]) ).toLower() == QLatin1String("-docpath") ) {
- INDEX_CHECK( "Missing path!" );
- QDir dir(QString::fromLocal8Bit(argv[i+1]));
- if ( dir.exists() ) {
- Config *c = Config::loadConfig(QString());
- c->saveProfile(Profile::createDefaultProfile(dir.absolutePath()));
- c->loadDefaultProfile();
- c->setDocRebuild(true);
- c->save();
- configLoaded = true;
- ++i;
- } else {
- fprintf(stderr, "The specified path does not exist!\n");
- return 1;
- }
- } else if ( opt == QLatin1String("-hidesidebar") ) {
- hideSidebar = true;
- } else if ( opt == QLatin1String("-help") || opt == QLatin1String("/?") ) {
- QString helpText = QLatin1String( "Usage: assistant [option]\n"
- "Options:\n"
- " -file Filename assistant opens the specified file\n"
- " -server reads commands from a socket after\n"
- " assistant has started\n"
- " -profile fileName starts assistant and displays the\n"
- " profile specified in the file fileName.\n"
- " -addContentFile file adds the content file 'file' to the set of\n"
- " documentation available by default\n"
- " -removeContentFile file removes the content file 'file' from the\n"
- " documentation available by default\n"
- " -docPath path sets the Qt documentation root path to\n"
- " 'path' and starts assistant\n"
- " -hideSidebar assistant will hide the sidebar.\n"
- " -resourceDir assistant will load translations from\n"
- " this directory.\n"
- " -help shows this help.");
-#ifdef Q_WS_WIN
- QMessageBox::information( 0, QLatin1String("Qt Assistant"),
- QLatin1String("<pre>") + helpText + QLatin1String("</pre>") );
-#else
- fprintf(stdout, "%s\n", qPrintable(helpText));
-#endif
- exit( 0 );
- } else if ( opt == QLatin1String("-resourcedir") ) {
- INDEX_CHECK( "Missing resource directory argument!" );
- resourceDir = QFile::decodeName( argv[++i] );
- } else {
- fprintf(stderr, "Unrecognized option %s. Try -help to get help.\n", qPrintable(opt));
- return 1;
- }
- }
- }
-
- if( resourceDir.isNull() )
- resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
-
- QTranslator translator( 0 );
- translator.load( QLatin1String("assistant_adp_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &translator );
-
- QTranslator qtTranslator( 0 );
- qtTranslator.load( QLatin1String("qt_") + QLocale::system().name(), resourceDir );
- a.installTranslator( &qtTranslator );
-
- Config *conf = 0;
- if (configLoaded)
- conf = Config::configuration();
- else
- conf = Config::loadConfig( profileName );
- if (!conf) {
- fprintf( stderr, "Profile '%s' does not exist!\n", profileName.toLatin1().constData() );
- fflush( stderr );
- return -1;
- }
-
- QStringList links = conf->source();
- conf->hideSideBar( hideSidebar );
-
- QPointer<MainWindow> mw = new MainWindow();
- mw->setObjectName(QLatin1String("Assistant"));
-
- if ( server ) {
- as = new AssistantServer();
- printf("%d\n", as->serverPort() );
- fflush( stdout );
- as->connect( as, SIGNAL(showLinkRequest(QString)),
- mw, SLOT(showLinkFromClient(QString)) );
- }
-
-#if !defined(QT_NO_DBUS) && defined(Q_OS_UNIX)
- new AssistantAdaptor(mw);
-#endif // QT_NO_DBUS
-
- FontSettings settings = conf->fontSettings();
- if (mw->font() != settings.windowFont)
- a.setFont(settings.windowFont, "QWidget");
-
-#ifdef Q_WS_MAC
- // Make sure AssitantClient shows the window in front.
- mw->raise();
-#endif
- mw->show();
-
- if (!file.isEmpty())
- mw->showLink( MainWindow::urlifyFileName(file) );
- else if (file.isEmpty())
- mw->showLinks( links );
-
- a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
-
- int appExec = a.exec();
- delete (MainWindow*)mw;
- return appExec;
-}
-
-QT_END_NAMESPACE
-
-int main( int argc, char ** argv )
-{
- Q_INIT_RESOURCE(assistant);
- return QT_PREPEND_NAMESPACE(runAssistant)(argc, argv);
-}
-
-#include "main.moc"
diff --git a/tools/assistant/compat/mainwindow.cpp b/tools/assistant/compat/mainwindow.cpp
deleted file mode 100644
index 12f260b..0000000
--- a/tools/assistant/compat/mainwindow.cpp
+++ /dev/null
@@ -1,885 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "mainwindow.h"
-#include "tabbedbrowser.h"
-#include "helpdialog.h"
-#include "config.h"
-#include "fontsettingsdialog.h"
-
-#include <QDockWidget>
-#include <QDir>
-#include <QTimer>
-#include <QStatusBar>
-#include <QShortcut>
-#include <QMessageBox>
-#include <QPainter>
-#include <QEventLoop>
-#include <QtEvents>
-#include <QFontDatabase>
-#include <QWhatsThis>
-#include <QTextDocumentFragment>
-#include <QLibraryInfo>
-#include <QPrinter>
-#include <QPrintDialog>
-#include <QAbstractTextDocumentLayout>
-#include <QTextDocument>
-#include <QTextObject>
-#include <QFileDialog>
-#include <QThread>
-
-QT_BEGIN_NAMESPACE
-
-QList<MainWindow*> MainWindow::windows;
-
-#if defined(Q_WS_WIN)
-extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
-#endif
-
-MainWindow::MainWindow()
-{
- setUnifiedTitleAndToolBarOnMac(true);
- ui.setupUi(this);
-
-#if defined(Q_WS_WIN)
- // Workaround for QMimeSourceFactory failing in QFileInfo::isReadable() for
- // certain user configs. See task: 34372
- qt_ntfs_permission_lookup = 0;
-#endif
- setupCompleted = false;
-
- goActions = QList<QAction*>();
- goActionDocFiles = new QMap<QAction*,QString>;
-
- windows.append(this);
- tabs = new TabbedBrowser(this);
- connect(tabs, SIGNAL(tabCountChanged(int)), this, SLOT(updateTabActions(int)));
- setCentralWidget(tabs);
-
- Config *config = Config::configuration();
-
- updateProfileSettings();
-
- dw = new QDockWidget(this);
- dw->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
- dw->setWindowTitle(tr("Sidebar"));
- dw->setObjectName(QLatin1String("sidebar"));
- helpDock = new HelpDialog(dw, this);
- dw->setWidget(helpDock);
-
- addDockWidget(Qt::LeftDockWidgetArea, dw);
-
- // read geometry configuration
- setupGoActions();
-
- restoreGeometry(config->windowGeometry());
- restoreState(config->mainWindowState());
- if (config->sideBarHidden())
- dw->hide();
-
- tabs->setup();
- QTimer::singleShot(0, this, SLOT(setup()));
-#if defined(Q_WS_MAC)
- QMenu *windowMenu = new QMenu(tr("&Window"), this);
- menuBar()->insertMenu(ui.helpMenu->menuAction(), windowMenu);
- windowMenu->addAction(tr("Minimize"), this,
- SLOT(showMinimized()), QKeySequence(tr("Ctrl+M")));
- // Use the same forward and backward browser shortcuts as Safari and Internet Explorer do
- // on the Mac. This means that if you have access to one of those cool Intellimice, the thing
- // works just fine, since that's how Microsoft hacked it.
- ui.actionGoPrevious->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Left));
- ui.actionGoNext->setShortcut(QKeySequence(Qt::CTRL|Qt::Key_Right));
-
- static const QLatin1String MacIconPath(":/trolltech/assistant/images/mac");
- ui.actionGoNext->setIcon(QIcon(MacIconPath + QLatin1String("/next.png")));
- ui.actionGoPrevious->setIcon(QIcon(MacIconPath + QLatin1String("/prev.png")));
- ui.actionGoHome->setIcon(QIcon(MacIconPath + QLatin1String("/home.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditCopy->setIcon(QIcon(MacIconPath + QLatin1String("/editcopy.png")));
- ui.actionEditFind->setIcon(QIcon(MacIconPath + QLatin1String("/find.png")));
- ui.actionFilePrint->setIcon(QIcon(MacIconPath + QLatin1String("/print.png")));
- ui.actionZoomOut->setIcon(QIcon(MacIconPath + QLatin1String("/zoomout.png")));
- ui.actionZoomIn->setIcon(QIcon(MacIconPath + QLatin1String("/zoomin.png")));
- ui.actionSyncToc->setIcon(QIcon(MacIconPath + QLatin1String("/synctoc.png")));
- ui.actionHelpWhatsThis->setIcon(QIcon(MacIconPath + QLatin1String("/whatsthis.png")));
-#elif defined(Q_WS_X11)
- ui.actionGoNext->setIcon(QIcon::fromTheme("go-next" , ui.actionGoNext->icon()));
- ui.actionGoPrevious->setIcon(QIcon::fromTheme("go-previous" , ui.actionGoPrevious->icon()));
- ui.actionGoHome->setIcon(QIcon::fromTheme("user-home" , ui.actionGoHome->icon()));
- ui.actionEditCopy->setIcon(QIcon::fromTheme("edit-copy" , ui.actionEditCopy->icon()));
- ui.actionEditFind->setIcon(QIcon::fromTheme("edit-find" , ui.actionEditFind->icon()));
- ui.actionFilePrint->setIcon(QIcon::fromTheme("document-print" , ui.actionFilePrint->icon()));
- ui.actionZoomOut->setIcon(QIcon::fromTheme("zoom-out" , ui.actionZoomOut->icon()));
- ui.actionZoomIn->setIcon(QIcon::fromTheme("zoom-in" , ui.actionZoomIn->icon()));
- ui.actionSyncToc->setIcon(QIcon::fromTheme("view-refresh" , ui.actionSyncToc->icon()));
-#endif
-}
-
-MainWindow::~MainWindow()
-{
- windows.removeAll(this);
- delete goActionDocFiles;
-}
-
-void MainWindow::setup()
-{
- if(setupCompleted)
- return;
-
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- statusBar()->showMessage(tr("Initializing Qt Assistant..."));
- setupCompleted = true;
- helpDock->initialize();
- connect(ui.actionGoPrevious, SIGNAL(triggered()), tabs, SLOT(backward()));
- connect(ui.actionGoNext, SIGNAL(triggered()), tabs, SLOT(forward()));
- connect(ui.actionEditCopy, SIGNAL(triggered()), tabs, SLOT(copy()));
- connect(ui.actionFileExit, SIGNAL(triggered()), qApp, SLOT(closeAllWindows()));
- connect(ui.actionAddBookmark, SIGNAL(triggered()),
- helpDock, SLOT(addBookmark()));
- connect(helpDock, SIGNAL(showLink(QString)),
- this, SLOT(showLink(QString)));
- connect(helpDock, SIGNAL(showSearchLink(QString,QStringList)),
- this, SLOT(showSearchLink(QString,QStringList)));
-
- connect(ui.bookmarkMenu, SIGNAL(triggered(QAction*)),
- this, SLOT(showBookmark(QAction*)));
- connect(ui.actionZoomIn, SIGNAL(triggered()), tabs, SLOT(zoomIn()));
- connect(ui.actionZoomOut, SIGNAL(triggered()), tabs, SLOT(zoomOut()));
-
- connect(ui.actionOpenPage, SIGNAL(triggered()), tabs, SLOT(newTab()));
- connect(ui.actionClosePage, SIGNAL(triggered()), tabs, SLOT(closeTab()));
- connect(ui.actionNextPage, SIGNAL(triggered()), tabs, SLOT(nextTab()));
- connect(ui.actionPrevPage, SIGNAL(triggered()), tabs, SLOT(previousTab()));
-
-
-#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
- QShortcut *acc = new QShortcut(tr("SHIFT+CTRL+="), this);
- connect(acc, SIGNAL(activated()), ui.actionZoomIn, SIGNAL(triggered()));
-#endif
-
- connect(new QShortcut(tr("Ctrl+T"), this), SIGNAL(activated()), helpDock, SLOT(toggleContents()));
- connect(new QShortcut(tr("Ctrl+I"), this), SIGNAL(activated()), helpDock, SLOT(toggleIndex()));
- connect(new QShortcut(tr("Ctrl+B"), this), SIGNAL(activated()), helpDock, SLOT(toggleBookmarks()));
- connect(new QShortcut(tr("Ctrl+S"), this), SIGNAL(activated()), helpDock, SLOT(toggleSearch()));
- connect(new QShortcut(tr("Ctrl+]"), this), SIGNAL(activated()), tabs, SLOT(nextTab()));
- connect(new QShortcut(tr("Ctrl+["), this), SIGNAL(activated()), tabs, SLOT(previousTab()));
-
- Config *config = Config::configuration();
-
- setupBookmarkMenu();
-
- QAction *viewsAction = createPopupMenu()->menuAction();
- viewsAction->setText(tr("Views"));
- ui.viewMenu->addAction(viewsAction);
-
- const int tabIndex = config->sideBarPage();
- helpDock->tabWidget()->setCurrentIndex(tabIndex);
- // The tab index is 0 by default, so we need to force an upate
- // to poulate the contents in this case.
- if (tabIndex == 0)
- helpDock->currentTabChanged(tabIndex);
-
- ui.actionEditFind->setShortcut(QKeySequence::Find);
- ui.actionEditFindNext->setShortcut(QKeySequence::FindNext);
- ui.actionEditFindPrev->setShortcut(QKeySequence::FindPrevious);
-
- QObject::connect(ui.actionEditFind, SIGNAL(triggered()), tabs, SLOT(find()));
- QObject::connect(ui.actionEditFindNext, SIGNAL(triggered()), tabs, SLOT(findNext()));
- QObject::connect(ui.actionEditFindPrev, SIGNAL(triggered()), tabs, SLOT(findPrevious()));
- connect(ui.actionEditFont_Settings, SIGNAL(triggered()), this, SLOT(showFontSettingsDialog()));
-
- qApp->restoreOverrideCursor();
- ui.actionGoPrevious->setEnabled(false);
- ui.actionGoNext->setEnabled(false);
- ui.actionEditCopy->setEnabled(false);
-
- // set the current selected item in the treeview
- helpDialog()->locateContents(tabs->currentBrowser()->source().toString());
- connect(tabs, SIGNAL(browserUrlChanged(QString)), helpDock, SLOT(locateContents(QString)));
-}
-
-void MainWindow::browserTabChanged()
-{
- HelpWindow *win = tabs->currentBrowser();
- if (win) {
- QTextCursor cursor(win->textCursor());
- ui.actionEditCopy->setEnabled(cursor.hasSelection());
- ui.actionGoPrevious->setEnabled(win->isBackwardAvailable());
- ui.actionGoNext->setEnabled(win->isForwardAvailable());
- }
-}
-
-void MainWindow::copyAvailable(bool yes)
-{
- ui.actionEditCopy->setEnabled(yes);
-}
-
-void MainWindow::updateTabActions(int index)
-{
- bool enabled = (index > 1) ? true : false;
- ui.actionPrevPage->setEnabled(enabled);
- ui.actionNextPage->setEnabled(enabled);
- ui.actionClosePage->setEnabled(enabled);
-}
-
-void MainWindow::setupGoActions()
-{
- Config *config = Config::configuration();
- QStringList titles = config->docTitles();
- QAction *action = 0;
-
- static bool separatorInserted = false;
-
- foreach (QAction *a, goActions) {
- ui.goMenu->removeAction(a);
- ui.goActionToolbar->removeAction(a);
- }
- qDeleteAll(goActions);
- goActions.clear();
- goActionDocFiles->clear();
-
- int addCount = 0;
-
- foreach (QString title, titles) {
- QPixmap pix = config->docIcon(title);
- if(!pix.isNull()) {
- if(!separatorInserted) {
- ui.goMenu->addSeparator();
- separatorInserted = true;
- }
- action = new QAction(this);
- action->setText(title);
- action->setWhatsThis(tr("Displays the main page of a specific documentation set."));
- action->setIcon(QIcon(pix));
- ui.goMenu->addAction(action);
- ui.goActionToolbar->addAction(action);
- goActions.append(action);
- goActionDocFiles->insert(action, config->indexPage(title));
- connect(action, SIGNAL(triggered()),
- this, SLOT(showGoActionLink()));
- ++addCount;
- }
- }
- if(!addCount)
- ui.goActionToolbar->hide();
- else
- ui.goActionToolbar->show();
-
-}
-
-bool MainWindow::insertActionSeparator()
-{
- ui.goMenu->addSeparator();
- ui.Toolbar->addSeparator();
- return true;
-}
-
-void MainWindow::closeEvent(QCloseEvent *e)
-{
- saveSettings();
- e->accept();
-}
-
-void MainWindow::about()
-{
- QMessageBox box(this);
-
- box.setText(QString::fromLatin1("<center><img src=\":/trolltech/assistant/images/assistant-128.png\">"
- "<h3>%1</h3>"
- "<p>Version %2</p></center>"
- "<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p>")
- .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)));
- box.setWindowTitle(tr("Qt Assistant"));
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutApplication_triggered()
-{
- QString url = Config::configuration()->aboutURL();
- if (url == QLatin1String("about_qt")) {
- QMessageBox::aboutQt(this, QLatin1String("Qt Assistant"));
- return;
- }
- QString text;
- if (url.startsWith(QLatin1String("file:")))
- url = url.mid(5);
- QFile file(url);
- if(file.exists() && file.open(QFile::ReadOnly))
- text = QString::fromUtf8(file.readAll());
- if(text.isNull())
- text = tr("Failed to open about application contents in file: '%1'").arg(url);
-
- QFileInfo fi(file);
- QString path = QDir::cleanPath(fi.absolutePath());
- if (!QDir::searchPaths(QLatin1String("aboutImages")).contains(path))
- QDir::addSearchPath(QLatin1String("aboutImages"), path);
-
- QMessageBox box(this);
- box.setText(text);
- box.setWindowTitle(Config::configuration()->aboutApplicationMenuText());
- box.setIcon(QMessageBox::NoIcon);
- box.exec();
-}
-
-void MainWindow::on_actionAboutAssistant_triggered()
-{
- about();
-}
-
-void MainWindow::on_actionGoHome_triggered()
-{
- QString home = MainWindow::urlifyFileName(Config::configuration()->homePage());
- showLink(home);
-}
-
-QString MainWindow::urlifyFileName(const QString &fileName)
-{
- QString name = fileName;
- QUrl url(name);
-
-#if defined(Q_OS_WIN32)
- if (!url.isValid() || url.scheme().isEmpty() || url.scheme().toLower() != QLatin1String("file:")) {
- int i = name.indexOf(QLatin1Char('#'));
- QString anchor = name.mid(i);
- name = name.toLower();
- if (i > -1)
- name.replace(i, anchor.length(), anchor);
- name.replace(QLatin1Char('\\'), QLatin1Char('/'));
- foreach (QFileInfo drive, QDir::drives()) {
- if (name.startsWith(drive.absolutePath().toLower())) {
- name = QLatin1String("file:") + name;
- break;
- }
- }
- }
-#else
- if (!url.isValid() || url.scheme().isEmpty())
- name.prepend(QLatin1String("file:"));
-#endif
- return name;
-}
-
-#ifndef QT_NO_PRINTER
-class PrintThread : public QThread
-{
- QPrinter _printer;
- QTextDocument *_document;
-
-public:
- PrintThread(QObject *parent)
- : QThread(parent), _printer(QPrinter::HighResolution), _document(0)
- {
- }
- ~PrintThread()
- {
- wait();
- }
-
- QPrinter *printer()
- {
- return &_printer;
- }
-
- void start(QTextDocument *document)
- {
- _document = document->clone();
- _document->moveToThread(this);
- QThread::start();
- }
-
-protected:
- void run()
- {
- _document->print(printer());
- delete _document;
- _document = 0;
- }
-};
-#endif //QT_NO_PRINTER
-
-void MainWindow::on_actionFilePrint_triggered()
-{
-#ifndef QT_NO_PRINTER
- if (!QFontDatabase::supportsThreadedFontRendering()) {
- QPrinter printer(QPrinter::HighResolution);
-
- QPrintDialog dlg(&printer, this);
- if (dlg.exec() == QDialog::Accepted) {
- qApp->setOverrideCursor(Qt::WaitCursor);
- tabs->currentBrowser()->document()->print(&printer);
- qApp->restoreOverrideCursor();
- }
- return;
- }
-
- PrintThread *thread = new PrintThread(this);
-
- QPrintDialog dlg(thread->printer(), this);
- if (dlg.exec() == QDialog::Accepted) {
- connect(thread, SIGNAL(finished()), SLOT(printingFinished()));
- connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
-
- qApp->setOverrideCursor(Qt::BusyCursor);
- thread->start(tabs->currentBrowser()->document());
- } else {
- delete thread;
- }
-#else
- Q_ASSERT("No printing support");
-#endif
-}
-
-void MainWindow::printingFinished()
-{
- qApp->restoreOverrideCursor();
-}
-
-void MainWindow::updateBookmarkMenu()
-{
- for(QList<MainWindow*>::Iterator it = windows.begin(); it != windows.end(); ++it)
- (*it)->setupBookmarkMenu();
-}
-
-void MainWindow::setupBookmarkMenu()
-{
- ui.bookmarkMenu->clear();
- bookmarks.clear();
- ui.bookmarkMenu->addAction(ui.actionAddBookmark);
-
- QFile f(QDir::homePath() + QLatin1String("/.assistant/bookmarks.") +
- Config::configuration()->profileName());
- if (!f.open(QFile::ReadOnly))
- return;
- QTextStream ts(&f);
- ui.bookmarkMenu->addSeparator();
- while (!ts.atEnd()) {
- QString title = ts.readLine();
- QString link = ts.readLine();
- bookmarks.insert(ui.bookmarkMenu->addAction(title), link);
- }
-}
-
-void MainWindow::showBookmark(QAction *action)
-{
- if (bookmarks.contains(action))
- showLink(bookmarks.value(action));
-}
-
-void MainWindow::showLinkFromClient(const QString &link)
-{
- setWindowState(windowState() & ~Qt::WindowMinimized);
- raise();
- activateWindow();
- QString l = MainWindow::urlifyFileName(link);
- showLink(l);
- if (isMinimized())
- showNormal();
-}
-
-void MainWindow::showLink(const QString &link)
-{
- if(link.isEmpty())
- qWarning("The link is empty!");
-
- // don't fill the history with the same url more then once
- if (link == tabs->currentBrowser()->source().toString())
- return;
-
- QUrl url(link);
- QFileInfo fi(url.toLocalFile());
- tabs->setSource(url.toString());
- tabs->currentBrowser()->setFocus();
-}
-
-void MainWindow::showLinks(const QStringList &links)
-{
- if (links.size() == 0) {
- qWarning("MainWindow::showLinks() - Empty link");
- return;
- }
-
- if (links.size() == 1) {
- showLink(MainWindow::urlifyFileName(links.first()));
- return;
- }
-
- QStringList::ConstIterator it = links.begin();
- // Initial showing, The tab is empty so update that without creating it first
- if (!tabs->currentBrowser()->source().isValid()) {
- QPair<HelpWindow*, QString> browser;
- browser.first = tabs->currentBrowser();
- browser.second = links.first();
- pendingBrowsers.append(browser);
- tabs->setTitle(tabs->currentBrowser(), tr("..."));
- }
- ++it;
-
- while(it != links.end()) {
- QPair<HelpWindow*, QString> browser;
- browser.first = tabs->newBackgroundTab();
- browser.second = *it;
- pendingBrowsers.append(browser);
- ++it;
- }
-
- startTimer(50);
- return;
-}
-
-void MainWindow::removePendingBrowser(HelpWindow *win)
-{
- if (!pendingBrowsers.count())
- return;
-
- QMutableListIterator<QPair<HelpWindow*, QString> > it(pendingBrowsers);
- while (it.hasNext()) {
- QPair<HelpWindow*, QString> browser = it.next();
- if (browser.first == win) {
- it.remove();
- break;
- }
- }
-}
-
-void MainWindow::timerEvent(QTimerEvent *e)
-{
- QPair<HelpWindow*, QString> browser = pendingBrowsers.first();
- pendingBrowsers.pop_front();
-
- if (pendingBrowsers.size() == 0)
- killTimer(e->timerId());
-
- browser.first->setSource(MainWindow::urlifyFileName(browser.second));
-}
-
-void MainWindow::showQtHelp()
-{
- showLink(QLibraryInfo::location(QLibraryInfo::DocumentationPath) +
- QLatin1String("/html/index.html"));
-}
-
-MainWindow* MainWindow::newWindow()
-{
- saveSettings();
- MainWindow *mw = new MainWindow;
- mw->move(geometry().topLeft());
- if (isMaximized())
- mw->showMaximized();
- else
- mw->show();
- mw->on_actionGoHome_triggered();
- return mw;
-}
-
-void MainWindow::saveSettings()
-{
- Config *config = Config::configuration();
-
- config->setSideBarPage(helpDock->tabWidget()->currentIndex());
- config->setWindowGeometry(saveGeometry());
- config->setMainWindowState(saveState());
-
- // Create list of the tab urls
- QStringList lst;
- QList<HelpWindow*> browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers)
- lst << browser->source().toString();
- config->setSource(lst);
- config->save();
-}
-
-TabbedBrowser* MainWindow::browsers() const
-{
- return tabs;
-}
-
-void MainWindow::showSearchLink(const QString &link, const QStringList &terms)
-{
- HelpWindow * hw = tabs->currentBrowser();
- hw->blockScrolling(true);
- hw->setCursor(Qt::WaitCursor);
- if (hw->source() == link)
- hw->reload();
- else
- showLink(link);
- hw->setCursor(Qt::ArrowCursor);
-
- hw->viewport()->setUpdatesEnabled(false);
-
- QTextCharFormat marker;
- marker.setForeground(Qt::red);
-
- QTextCursor firstHit;
-
- QTextCursor c = hw->textCursor();
- c.beginEditBlock();
- foreach (QString term, terms) {
- c.movePosition(QTextCursor::Start);
- hw->setTextCursor(c);
-
- bool found = hw->find(term, QTextDocument::FindWholeWords);
- while (found) {
- QTextCursor hit = hw->textCursor();
- if (firstHit.isNull() || hit.position() < firstHit.position())
- firstHit = hit;
-
- hit.mergeCharFormat(marker);
- found = hw->find(term, QTextDocument::FindWholeWords);
- }
- }
-
- if (firstHit.isNull()) {
- firstHit = hw->textCursor();
- firstHit.movePosition(QTextCursor::Start);
- }
- firstHit.clearSelection();
- c.endEditBlock();
- hw->setTextCursor(firstHit);
-
- hw->blockScrolling(false);
- hw->viewport()->setUpdatesEnabled(true);
-}
-
-
-void MainWindow::showGoActionLink()
-{
- const QObject *origin = sender();
- if(!origin ||
- QString::fromLatin1(origin->metaObject()->className()) != QString::fromLatin1("QAction"))
- return;
-
- QAction *action = (QAction*) origin;
- QString docfile = *(goActionDocFiles->find(action));
- showLink(MainWindow::urlifyFileName(docfile));
-}
-
-void MainWindow::on_actionHelpAssistant_triggered()
-{
- showLink(Config::configuration()->assistantDocPath() + QLatin1String("/assistant-manual.html"));
-}
-
-HelpDialog* MainWindow::helpDialog() const
-{
- return helpDock;
-}
-
-void MainWindow::backwardAvailable(bool enable)
-{
- ui.actionGoPrevious->setEnabled(enable);
-}
-
-void MainWindow::forwardAvailable(bool enable)
-{
- ui.actionGoNext->setEnabled(enable);
-}
-
-void MainWindow::updateProfileSettings()
-{
- Config *config = Config::configuration();
-#ifndef Q_WS_MAC
- setWindowIcon(config->applicationIcon());
-#endif
- ui.helpMenu->clear();
- //ui.helpMenu->addAction(ui.actionHelpAssistant);
- //ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionAboutAssistant);
- if (!config->aboutApplicationMenuText().isEmpty())
- ui.helpMenu->addAction(ui.actionAboutApplication);
- ui.helpMenu->addSeparator();
- ui.helpMenu->addAction(ui.actionHelpWhatsThis);
-
- ui.actionAboutApplication->setText(config->aboutApplicationMenuText());
-
- if(!config->title().isNull())
- setWindowTitle(config->title());
-}
-
-void MainWindow::setupPopupMenu(QMenu *m)
-{
- m->addAction(ui.actionNewWindow);
- m->addAction(ui.actionOpenPage);
- m->addAction(ui.actionClosePage);
- m->addSeparator();
- m->addAction(ui.actionSaveAs);
- m->addSeparator();
- m->addAction(ui.actionGoPrevious);
- m->addAction(ui.actionGoNext);
- m->addAction(ui.actionGoHome);
- m->addSeparator();
- m->addAction(ui.actionZoomIn);
- m->addAction(ui.actionZoomOut);
- m->addSeparator();
- m->addAction(ui.actionEditCopy);
- m->addAction(ui.actionEditFind);
-}
-
-void MainWindow::on_actionSyncToc_triggered()
-{
- HelpWindow *w = tabs->currentBrowser();
- if(w) {
- qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
- QString link = w->source().toString();
- helpDock->locateContents(link);
- helpDock->tabWidget()->setCurrentIndex(0);
- qApp->restoreOverrideCursor();
- }
-}
-
-void MainWindow::on_actionNewWindow_triggered()
-{
- newWindow()->show();
-}
-
-void MainWindow::on_actionClose_triggered()
-{
- close();
-}
-
-void MainWindow::on_actionHelpWhatsThis_triggered()
-{
- QWhatsThis::enterWhatsThisMode();
-}
-
-void MainWindow::on_actionSaveAs_triggered()
-{
- QString fileName;
- QUrl url = tabs->currentBrowser()->source();
- if (url.isValid()) {
- QFileInfo fi(url.toLocalFile());
- fileName = fi.fileName();
- }
- fileName = QFileDialog::getSaveFileName(this, tr("Save Page"), fileName);
- if (fileName.isEmpty())
- return;
-
- QFile file(fileName);
- if (!file.open(QIODevice::WriteOnly)) {
- QMessageBox::critical(this, tr("Save Page"), tr("Cannot open file for writing!"));
- return;
- }
-
- QFileInfo fi(fileName);
- QString fn = fi.fileName();
- int i = fn.lastIndexOf(QLatin1Char('.'));
- if (i > -1)
- fn = fn.left(i);
- QString relativeDestPath = fn + QLatin1String("_images");
- QDir destDir(fi.absolutePath() + QDir::separator() + relativeDestPath);
- bool imgDirAvailable = destDir.exists();
- if (!imgDirAvailable)
- imgDirAvailable = destDir.mkdir(destDir.absolutePath());
-
- // save images
- QTextDocument *doc = tabs->currentBrowser()->document()->clone();
- if (url.isValid() && imgDirAvailable) {
- QTextBlock::iterator it;
- for (QTextBlock block = doc->begin(); block != doc->end(); block = block.next()) {
- for (it = block.begin(); !(it.atEnd()); ++it) {
- QTextFragment fragment = it.fragment();
- if (fragment.isValid()) {
- QTextImageFormat fm = fragment.charFormat().toImageFormat();
- if (fm.isValid() && !fm.name().isEmpty()) {
- QUrl imagePath = tabs->currentBrowser()->source().resolved(fm.name());
- if (!imagePath.isValid())
- continue;
- QString from = imagePath.toLocalFile();
- QString destName = fm.name();
- int j = destName.lastIndexOf(QLatin1Char('/'));
- if (j > -1)
- destName = destName.mid(j+1);
- QFileInfo info(from);
- if (info.exists()) {
- if (!QFile::copy(from, destDir.absolutePath()
- + QDir::separator() + destName))
- continue;
- fm.setName(QLatin1String("./") + relativeDestPath + QLatin1String("/") + destName);
- QTextCursor cursor(doc);
- cursor.setPosition(fragment.position());
- cursor.setPosition(fragment.position() + fragment.length(),
- QTextCursor::KeepAnchor);
- cursor.setCharFormat(fm);
- }
- }
- }
- }
- }
- }
- QString src = doc->toHtml(QByteArray("utf-8"));
- QTextStream s(&file);
- s.setCodec("utf-8");
- s << src;
- s.flush();
- file.close();
-}
-
-void MainWindow::showFontSettingsDialog()
-{
- Config *config = Config::configuration();
- FontSettings settings = config->fontSettings();
-
- { // It is important that the dialog be deleted before UI mode changes.
- FontSettingsDialog dialog;
- if (!dialog.showDialog(&settings))
- return;
- }
-
- config->setFontPointSize(settings.browserFont.pointSizeF());
- config->setFontSettings(settings);
-
- updateApplicationFontSettings(settings);
-}
-
-void MainWindow::updateApplicationFontSettings(FontSettings &settings)
-{
- QFont font = settings.windowFont;
- if (this->font() != font)
- qApp->setFont(font, "QWidget");
-
- font = settings.browserFont;
- QList<HelpWindow*> browsers = tabs->browsers();
- foreach (HelpWindow *browser, browsers) {
- if (browser->font() != font)
- browser->setFont(font);
- }
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.h b/tools/assistant/compat/mainwindow.h
deleted file mode 100644
index d1e21f7..0000000
--- a/tools/assistant/compat/mainwindow.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MAINWINDOW_H
-#define MAINWINDOW_H
-
-#include "ui_mainwindow.h"
-#include "config.h"
-
-#include <QPointer>
-#include <QMap>
-
-QT_BEGIN_NAMESPACE
-
-class TabbedBrowser;
-class HelpDialog;
-class HelpWindow;
-class QMenu;
-class QDockWidget;
-
-class MainWindow : public QMainWindow
-{
- Q_OBJECT
-public:
- MainWindow();
- virtual ~MainWindow();
-
- TabbedBrowser *browsers() const;
- HelpDialog *helpDialog() const;
-
- void setupPopupMenu(QMenu *menu);
- static QString urlifyFileName(const QString &fileName);
-
- void removePendingBrowser(HelpWindow *win);
-
-public slots:
- MainWindow *newWindow();
-
- void setup();
- void showLink(const QString &link);
- void showLinks(const QStringList &links);
- void saveSettings();
- void updateBookmarkMenu();
- void printingFinished();
-
-private slots:
- void on_actionNewWindow_triggered();
- void on_actionGoHome_triggered();
- void on_actionFilePrint_triggered();
- void on_actionClose_triggered();
- void on_actionHelpWhatsThis_triggered();
- void on_actionHelpAssistant_triggered();
- void on_actionAboutApplication_triggered();
- void on_actionAboutAssistant_triggered();
- void on_actionSaveAs_triggered();
- void on_actionSyncToc_triggered();
-
- void about();
- void setupBookmarkMenu();
- void showBookmark(QAction *action);
- void showLinkFromClient(const QString &link);
- void showQtHelp();
- void showSearchLink(const QString &link, const QStringList &terms);
- void showGoActionLink();
- void updateProfileSettings();
- void backwardAvailable(bool);
- void forwardAvailable(bool);
-
- void browserTabChanged();
- void copyAvailable(bool yes);
- void updateTabActions(int index);
- void showFontSettingsDialog();
-
-protected:
- void closeEvent(QCloseEvent *);
- void timerEvent(QTimerEvent *);
-
-private:
- void setupGoActions();
- bool insertActionSeparator();
- void updateApplicationFontSettings(FontSettings &settings);
-
-private:
- Ui::MainWindow ui;
-
- QList<QAction*> goActions;
- uint setupCompleted:1;
- TabbedBrowser *tabs;
- QMap<QAction*, QString> bookmarks;
- HelpDialog *helpDock;
- QDockWidget *dw;
- static QList<MainWindow*> windows;
- QMap<QAction*,QString> *goActionDocFiles;
- QList<QPair<HelpWindow*,QString> > pendingBrowsers;
-};
-
-#endif // MAINWINDOW_H
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/mainwindow.ui b/tools/assistant/compat/mainwindow.ui
deleted file mode 100644
index cda9eda..0000000
--- a/tools/assistant/compat/mainwindow.ui
+++ /dev/null
@@ -1,457 +0,0 @@
-<ui version="4.0" >
- <comment>*********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>949</width>
- <height>670</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Qt Assistant by Nokia</string>
- </property>
- <widget class="QWidget" name="__qt_central_widget" />
- <widget class="QToolBar" name="Toolbar" >
- <property name="windowTitle" >
- <string>Toolbar</string>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <attribute name="toolBarArea" >
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak" >
- <bool>false</bool>
- </attribute>
- <addaction name="actionGoPrevious" />
- <addaction name="actionGoNext" />
- <addaction name="actionGoHome" />
- <addaction name="actionSyncToc" />
- <addaction name="separator" />
- <addaction name="actionEditCopy" />
- <addaction name="actionEditFind" />
- <addaction name="actionFilePrint" />
- <addaction name="separator" />
- <addaction name="actionZoomIn" />
- <addaction name="actionZoomOut" />
- <addaction name="separator" />
- <addaction name="actionHelpWhatsThis" />
- </widget>
- <widget class="QToolBar" name="goActionToolbar" >
- <property name="windowTitle" >
- <string>Go</string>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <attribute name="toolBarArea" >
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak" >
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>949</width>
- <height>29</height>
- </rect>
- </property>
- <widget class="QMenu" name="helpMenu" >
- <property name="title" >
- <string>&amp;Help</string>
- </property>
- <addaction name="actionHelpAssistant" />
- <addaction name="separator" />
- <addaction name="actionAboutAssistant" />
- <addaction name="actionAboutApplication" />
- <addaction name="separator" />
- <addaction name="actionHelpWhatsThis" />
- </widget>
- <widget class="QMenu" name="fileMenu" >
- <property name="title" >
- <string>&amp;File</string>
- </property>
- <addaction name="actionNewWindow" />
- <addaction name="actionOpenPage" />
- <addaction name="actionClosePage" />
- <addaction name="separator" />
- <addaction name="actionSaveAs" />
- <addaction name="separator" />
- <addaction name="actionFilePrint" />
- <addaction name="separator" />
- <addaction name="actionClose" />
- <addaction name="actionFileExit" />
- </widget>
- <widget class="QMenu" name="bookmarkMenu" >
- <property name="title" >
- <string>Boo&amp;kmarks</string>
- </property>
- </widget>
- <widget class="QMenu" name="goMenu" >
- <property name="title" >
- <string>&amp;Go</string>
- </property>
- <addaction name="actionGoPrevious" />
- <addaction name="actionGoNext" />
- <addaction name="actionGoHome" />
- <addaction name="actionSyncToc" />
- <addaction name="separator" />
- <addaction name="actionNextPage" />
- <addaction name="actionPrevPage" />
- </widget>
- <widget class="QMenu" name="viewMenu" >
- <property name="title" >
- <string>&amp;View</string>
- </property>
- <addaction name="actionZoomIn" />
- <addaction name="actionZoomOut" />
- </widget>
- <widget class="QMenu" name="editMenu" >
- <property name="title" >
- <string>&amp;Edit</string>
- </property>
- <addaction name="actionEditCopy" />
- <addaction name="actionEditFind" />
- <addaction name="actionEditFindNext" />
- <addaction name="actionEditFindPrev" />
- <addaction name="separator" />
- <addaction name="actionEditFont_Settings" />
- </widget>
- <addaction name="fileMenu" />
- <addaction name="editMenu" />
- <addaction name="viewMenu" />
- <addaction name="goMenu" />
- <addaction name="bookmarkMenu" />
- <addaction name="helpMenu" />
- </widget>
- <action name="actionFilePrint" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/print.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Print...</string>
- </property>
- <property name="whatsThis" >
- <string>Print the currently displayed page.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+P</string>
- </property>
- </action>
- <action name="actionFileExit" >
- <property name="text" >
- <string>E&amp;xit</string>
- </property>
- <property name="whatsThis" >
- <string>Quit Qt Assistant.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Q</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::QuitRole</enum>
- </property>
- </action>
- <action name="actionEditCopy" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/editcopy.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Copy</string>
- </property>
- <property name="whatsThis" >
- <string>Copy the selected text to the clipboard.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+C</string>
- </property>
- </action>
- <action name="actionEditFind" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/find.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Find in Text...</string>
- </property>
- <property name="whatsThis" >
- <string>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+F</string>
- </property>
- </action>
- <action name="actionEditFindNext" >
- <property name="text" >
- <string>Find &amp;Next</string>
- </property>
- <property name="shortcut" >
- <string>F3</string>
- </property>
- </action>
- <action name="actionEditFindPrev" >
- <property name="text" >
- <string>Find &amp;Previous</string>
- </property>
- <property name="shortcut" >
- <string>Shift+F3</string>
- </property>
- </action>
- <action name="actionGoHome" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/home.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Home</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the home page. Qt Assistant's home page is the Qt Reference Documentation.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Home</string>
- </property>
- </action>
- <action name="actionGoPrevious" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/previous.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Previous</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the previous page.</string>
- </property>
- <property name="shortcut" >
- <string>Alt+Left</string>
- </property>
- </action>
- <action name="actionGoNext" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/next.png</iconset>
- </property>
- <property name="text" >
- <string>&amp;Next</string>
- </property>
- <property name="whatsThis" >
- <string>Go to the next page.</string>
- </property>
- <property name="shortcut" >
- <string>Alt+Right</string>
- </property>
- </action>
- <action name="actionAboutAssistant" >
- <property name="text" >
- <string>About Qt Assistant</string>
- </property>
- <property name="whatsThis" >
- <string>Display further information about Qt Assistant.</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::AboutRole</enum>
- </property>
- </action>
- <action name="actionAboutApplication" >
- <property name="text" >
- <string>About Qt</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::AboutQtRole</enum>
- </property>
- </action>
- <action name="actionZoomIn" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/zoomin.png</iconset>
- </property>
- <property name="text" >
- <string>Zoom &amp;in</string>
- </property>
- <property name="whatsThis" >
- <string>Zoom in on the document, i.e. increase the font size.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl++</string>
- </property>
- </action>
- <action name="actionZoomOut" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/zoomout.png</iconset>
- </property>
- <property name="text" >
- <string>Zoom &amp;out</string>
- </property>
- <property name="whatsThis" >
- <string>Zoom out on the document, i.e. decrease the font size.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+-</string>
- </property>
- </action>
- <action name="actionNewWindow" >
- <property name="text" >
- <string>New Window</string>
- </property>
- <property name="whatsThis" >
- <string>Open a new window.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+N</string>
- </property>
- </action>
- <action name="actionClose" >
- <property name="text" >
- <string>&amp;Close</string>
- </property>
- <property name="whatsThis" >
- <string>Close the current window.</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+W</string>
- </property>
- </action>
- <action name="actionAddBookmark" >
- <property name="text" >
- <string>&amp;Add Bookmark</string>
- </property>
- <property name="whatsThis" >
- <string>Add the currently displayed page as a new bookmark.</string>
- </property>
- </action>
- <action name="actionHelpWhatsThis" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/whatsthis.png</iconset>
- </property>
- <property name="text" >
- <string>What's This?</string>
- </property>
- <property name="statusTip" >
- <string>"What's This?" context sensitive help.</string>
- </property>
- <property name="whatsThis" >
- <string>"What's This?" context sensitive help.</string>
- </property>
- <property name="shortcut" >
- <string>Shift+F1</string>
- </property>
- </action>
- <action name="actionOpenPage" >
- <property name="text" >
- <string>Add Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+N</string>
- </property>
- </action>
- <action name="actionNextPage" >
- <property name="text" >
- <string>Next Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Right</string>
- </property>
- </action>
- <action name="actionPrevPage" >
- <property name="text" >
- <string>Previous Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Left</string>
- </property>
- </action>
- <action name="actionClosePage" >
- <property name="text" >
- <string>Close Tab</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+Q</string>
- </property>
- </action>
- <action name="actionHelpAssistant" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/assistant.png</iconset>
- </property>
- <property name="text" >
- <string>Qt Assistant Manual</string>
- </property>
- <property name="shortcut" >
- <string>F1</string>
- </property>
- </action>
- <action name="actionSaveAs" >
- <property name="text" >
- <string>Save Page As...</string>
- </property>
- <property name="shortcut" >
- <string>Ctrl+Alt+S</string>
- </property>
- </action>
- <action name="actionSyncToc" >
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/synctoc.png</iconset>
- </property>
- <property name="text" >
- <string>Sync with Table of Contents</string>
- </property>
- <property name="whatsThis" >
- <string>Select the page in contents tab.</string>
- </property>
- </action>
- <action name="actionEditFont_Settings" >
- <property name="text" >
- <string>Font Settings...</string>
- </property>
- <property name="menuRole" >
- <enum>QAction::PreferencesRole</enum>
- </property>
- </action>
- </widget>
- <resources>
- <include location="assistant.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/profile.cpp b/tools/assistant/compat/profile.cpp
deleted file mode 100644
index c3cac13..0000000
--- a/tools/assistant/compat/profile.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "profile.h"
-#include <QTextCodec>
-#include <QFileInfo>
-#include <QRegExp>
-#include <QDir>
-#include <QList>
-#include <QLibraryInfo>
-
-QT_BEGIN_NAMESPACE
-
-#define QT_TITLE QLatin1String("Qt Reference Documentation")
-#define DESIGNER_TITLE QLatin1String("Qt Designer Manual")
-#define ASSISTANT_TITLE QLatin1String("Qt Assistant Manual")
-#define LINGUIST_TITLE QLatin1String("Qt Linguist Manual")
-#define QMAKE_TITLE QLatin1String("qmake Manual")
-
-Profile *Profile::createDefaultProfile(const QString &docPath)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath);
- if (!docPath.isEmpty())
- path = docPath;
- path = QDir::cleanPath(path) + QLatin1String("/html/");
-
- Profile *profile = new Profile;
- profile->valid = true;
- profile->type = DefaultProfile;
- profile->props[QLatin1String("name")] = QLatin1String("default");
- profile->props[QLatin1String("applicationicon")] = QLatin1String("assistant.png");
- profile->props[QLatin1String("aboutmenutext")] = QLatin1String("About Qt");
- profile->props[QLatin1String("abouturl")] = QLatin1String("about_qt");
- profile->props[QLatin1String("basepath")] = path;
- profile->props[QLatin1String("startpage")] = path + QLatin1String("index.html");
-
- profile->addDCFTitle( path + QLatin1String("qt.dcf"), QT_TITLE );
- profile->addDCFTitle( path + QLatin1String("designer.dcf"), DESIGNER_TITLE );
- profile->addDCFTitle( path + QLatin1String("assistant.dcf"), ASSISTANT_TITLE );
- profile->addDCFTitle( path + QLatin1String("linguist.dcf"), LINGUIST_TITLE );
- profile->addDCFTitle( path + QLatin1String("qmake.dcf"), QMAKE_TITLE );
-
- profile->addDCFIcon( QT_TITLE, QLatin1String("qt.png") );
- profile->addDCFIcon( DESIGNER_TITLE, QLatin1String("designer.png") );
- profile->addDCFIcon( ASSISTANT_TITLE, QLatin1String("assistant.png") );
- profile->addDCFIcon( LINGUIST_TITLE, QLatin1String("linguist.png") );
-
- profile->addDCFIndexPage( QT_TITLE, path + QLatin1String("index.html") );
- profile->addDCFIndexPage( DESIGNER_TITLE, path + QLatin1String("designer-manual.html") );
- profile->addDCFIndexPage( ASSISTANT_TITLE, path + QLatin1String("assistant-manual.html") );
- profile->addDCFIndexPage( LINGUIST_TITLE, path + QLatin1String("linguist-manual.html") );
- profile->addDCFIndexPage( QMAKE_TITLE, path + QLatin1String("qmake-manual.html") );
-
- profile->addDCFImageDir( QT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( DESIGNER_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( ASSISTANT_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( LINGUIST_TITLE, QLatin1String("../../gif/") );
- profile->addDCFImageDir( QMAKE_TITLE, QLatin1String("../../gif/") );
-
- return profile;
-}
-
-Profile::Profile()
- : valid( true ), dparser( 0 )
-{
- type = DefaultProfile;
-}
-
-bool Profile::isValid() const
-{
- return valid;
-}
-
-void Profile::addDCFTitle(const QString &dcf, const QString &title)
-{
- QString absdcf = QFileInfo(dcf).absoluteFilePath();
- dcfTitles[title] = absdcf;
- if (!docs.contains(absdcf))
- docs << absdcf;
-}
-
-void Profile::addDCF(const QString &docfile)
-{
- if( !docs.contains( docfile ) == 0 )
- docs << docfile;
-}
-
-void Profile::addDCFIcon(const QString docfile, const QString &icon)
-{
- icons[docfile] = icon;
-}
-
-void Profile::addDCFIndexPage(const QString title, const QString &indexPage)
-{
- indexPages[title] = indexPage;
-}
-
-void Profile::addDCFImageDir(const QString docfile, const QString &imgDir)
-{
- imageDirs[docfile] = imgDir;
-}
-
-void Profile::addProperty(const QString &name, const QString &value)
-{
- props[name] = value;
-}
-
-bool Profile::hasDocFile(const QString &name)
-{
- return docs.contains( name );
-}
-
-void Profile::removeDocFileEntry(const QString &docfile)
-{
- docs.removeAll(docfile);
- QStringList titles;
-
- for( QMap<QString,QString>::Iterator it = dcfTitles.begin();
- it != dcfTitles.end(); ++it ) {
- if( (*it) == docfile ) {
- indexPages.remove( *it );
- icons.remove( *it );
- imageDirs.remove( *it );
- titles << it.key();
- }
- }
-
- for( QStringList::ConstIterator title = titles.constBegin();
- title != titles.constEnd(); ++title )
- dcfTitles.remove( *title );
-
-#ifdef ASSISTANT_DEBUG
- qDebug() << "docs:\n - " << docs.join("\n - ");
- qDebug() << "titles:\n - " << titles.join("\n - ");
- qDebug() << "keys:\n - " << ((QStringList*)&(dcfTitles.keys()))->join("\n - ");
- qDebug() << "values:\n - " << ((QStringList*)&(dcfTitles.values()))->join("\n - ");
-#endif
-}
-
-QString Profile::storableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(path))
- fName.replace(0, path.length(), QLatin1String("$DOCPATH$"));
- return fName;
-}
-
-QString Profile::loadableFilePath(const QString &fileName)
-{
- QString path = QLibraryInfo::location(QLibraryInfo::DocumentationPath).replace(QLatin1String("\\"), QLatin1String("/"));
- QString fName = fileName;
- if (fName.startsWith(QLatin1String("$DOCPATH$")))
- fName.replace(0, 9, path);
- return fName;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/profile.h b/tools/assistant/compat/profile.h
deleted file mode 100644
index 758929e..0000000
--- a/tools/assistant/compat/profile.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef PROFILE_H
-#define PROFILE_H
-
-#include <QFileInfo>
-#include <QString>
-#include <QStringList>
-#include <QMap>
-
-QT_BEGIN_NAMESPACE
-
-class DocuParser;
-
-class Profile
-{
-public:
- enum ProfileType { DefaultProfile, UserProfile };
- Profile();
-
- bool isValid() const;
-
- void addDCF( const QString &docfile );
- void addDCFIcon( const QString title, const QString &icon );
- void addDCFIndexPage( const QString title, const QString &indexPage );
- void addDCFImageDir( const QString title, const QString &imgDir );
- void addDCFTitle( const QString &dcf, const QString &title );
- void addProperty( const QString &name, const QString &value );
- bool hasDocFile( const QString &docFile );
- void removeDocFileEntry( const QString &title );
-
- ProfileType profileType() const { return type; }
- void setProfileType( ProfileType t ) { type = t; }
-
- DocuParser *docuParser() const { return dparser; }
- void setDocuParser( DocuParser *dp ) { dparser = dp; }
-
- static Profile* createDefaultProfile(const QString &docPath = QString());
- static QString makeRelativePath(const QString &base, const QString &path);
- static QString storableFilePath(const QString &fileName);
- static QString loadableFilePath(const QString &fileName);
-
- uint valid:1;
- ProfileType type;
- DocuParser *dparser;
- QMap<QString,QString> props;
- QMap<QString,QString> icons;
- QMap<QString,QString> indexPages;
- QMap<QString,QString> imageDirs;
- QMap<QString,QString> dcfTitles;
- QStringList docs;
-};
-
-QT_END_NAMESPACE
-
-#endif // PROFILE_H
diff --git a/tools/assistant/compat/tabbedbrowser.cpp b/tools/assistant/compat/tabbedbrowser.cpp
deleted file mode 100644
index 9c1a1fe..0000000
--- a/tools/assistant/compat/tabbedbrowser.cpp
+++ /dev/null
@@ -1,530 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "tabbedbrowser.h"
-#include "mainwindow.h"
-#include "helpwindow.h"
-#include "config.h"
-
-#include <QStyleOptionTab>
-#include <QToolTip>
-#include <QFileInfo>
-#include <QToolButton>
-#include <QPixmap>
-#include <QIcon>
-#include <QStyle>
-#include <QTimer>
-#include <QStackedWidget>
-#include <QTimer>
-#include <QTextBlock>
-#include <QKeyEvent>
-
-QT_BEGIN_NAMESPACE
-
-#ifdef Q_WS_MAC
-const QLatin1String ImageLocation(":trolltech/assistant/images/mac/");
-#else
-const QLatin1String ImageLocation(":trolltech/assistant/images/win/");
-#endif
-
-TabbedBrowser::TabbedBrowser(MainWindow *parent)
- : QWidget(parent)
-{
- ui.setupUi(this);
- init();
-
- QStackedWidget *stack = qFindChild<QStackedWidget*>(ui.tab);
- Q_ASSERT(stack);
- stack->setContentsMargins(0, 0, 0, 0);
- connect(stack, SIGNAL(currentChanged(int)), parent, SLOT(browserTabChanged()));
-
- QPalette p = palette();
- p.setColor(QPalette::Inactive, QPalette::Highlight,
- p.color(QPalette::Active, QPalette::Highlight));
- p.setColor(QPalette::Inactive, QPalette::HighlightedText,
- p.color(QPalette::Active, QPalette::HighlightedText));
- setPalette(p);
-}
-
-TabbedBrowser::~TabbedBrowser()
-{
-}
-
-MainWindow *TabbedBrowser::mainWindow() const
-{
- return static_cast<MainWindow*>(parentWidget());
-}
-
-void TabbedBrowser::forward()
-{
- currentBrowser()->forward();
- emit browserUrlChanged(currentBrowser()->source().toString());
-}
-
-void TabbedBrowser::backward()
-{
- currentBrowser()->backward();
- emit browserUrlChanged(currentBrowser()->source().toString());
-}
-
-void TabbedBrowser::setSource( const QString &ref )
-{
- HelpWindow * win = currentBrowser();
- win->setSource(ref);
-}
-
-void TabbedBrowser::reload()
-{
- currentBrowser()->reload();
-}
-
-void TabbedBrowser::home()
-{
- currentBrowser()->home();
-}
-
-HelpWindow *TabbedBrowser::currentBrowser() const
-{
- return static_cast<HelpWindow*>(ui.tab->currentWidget());
-}
-
-void TabbedBrowser::nextTab()
-{
- if(ui.tab->currentIndex()<=ui.tab->count()-1)
- ui.tab->setCurrentIndex(ui.tab->currentIndex()+1);
-}
-
-void TabbedBrowser::previousTab()
-{
- int idx = ui.tab->currentIndex()-1;
- if(idx>=0)
- ui.tab->setCurrentIndex(idx);
-}
-
-HelpWindow *TabbedBrowser::createHelpWindow()
-{
- MainWindow *mainWin = mainWindow();
- HelpWindow *win = new HelpWindow(mainWin, 0);
- win->setFrameStyle(QFrame::NoFrame);
- win->setPalette(palette());
- win->setSearchPaths(Config::configuration()->mimePaths());
- ui.tab->addTab(win, tr("..."));
- connect(win, SIGNAL(highlighted(QString)),
- (const QObject*) (mainWin->statusBar()), SLOT(showMessage(QString)));
- connect(win, SIGNAL(backwardAvailable(bool)),
- mainWin, SLOT(backwardAvailable(bool)));
- connect(win, SIGNAL(forwardAvailable(bool)),
- mainWin, SLOT(forwardAvailable(bool)));
- connect(win, SIGNAL(sourceChanged(QUrl)), this, SLOT(sourceChanged()));
-
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(ui.tab->count() > 1);
- win->installEventFilter(this);
- win->viewport()->installEventFilter(this);
- ui.editFind->installEventFilter(this);
- return win;
-}
-
-HelpWindow *TabbedBrowser::newBackgroundTab()
-{
- HelpWindow *win = createHelpWindow();
- emit tabCountChanged(ui.tab->count());
- return win;
-}
-
-void TabbedBrowser::newTab(const QString &lnk)
-{
- QString link(lnk);
- if(link.isNull()) {
- HelpWindow *w = currentBrowser();
- if(w)
- link = w->source().toString();
- }
- HelpWindow *win = createHelpWindow();
- ui.tab->setCurrentIndex(ui.tab->indexOf(win));
- if(!link.isNull()) {
- win->setSource(link);
- }
-
- emit tabCountChanged(ui.tab->count());
-}
-
-void TabbedBrowser::zoomIn()
-{
- currentBrowser()->zoomIn();
- Config::configuration()->setFontPointSize(currentBrowser()->font().pointSizeF());
-}
-
-void TabbedBrowser::zoomOut()
-{
- currentBrowser()->zoomOut();
- Config::configuration()->setFontPointSize(currentBrowser()->font().pointSizeF());
-}
-
-void TabbedBrowser::init()
-{
-
- lastCurrentTab = 0;
- while(ui.tab->count()) {
- QWidget *page = ui.tab->widget(0);
- ui.tab->removeTab(0);
- delete page;
- }
-
- connect(ui.tab, SIGNAL(currentChanged(int)),
- this, SLOT(transferFocus()));
-
- QTabBar *tabBar = qFindChild<QTabBar*>(ui.tab);
- QStyleOptionTab opt;
- if (tabBar) {
- opt.init(tabBar);
- opt.shape = tabBar->shape();
- tabBar->setContextMenuPolicy(Qt::CustomContextMenu);
- connect(tabBar, SIGNAL(customContextMenuRequested(const QPoint&)), SLOT(openTabMenu(const QPoint&)));
- }
-
- // workaround for sgi style
- QPalette pal = palette();
- pal.setColor(QPalette::Active, QPalette::Button, pal.color(QPalette::Active, QPalette::Window));
- pal.setColor(QPalette::Disabled, QPalette::Button, pal.color(QPalette::Disabled, QPalette::Window));
- pal.setColor(QPalette::Inactive, QPalette::Button, pal.color(QPalette::Inactive, QPalette::Window));
-
- QToolButton *newTabButton = new QToolButton(this);
- ui.tab->setCornerWidget(newTabButton, Qt::TopLeftCorner);
- newTabButton->setCursor(Qt::ArrowCursor);
- newTabButton->setAutoRaise(true);
- newTabButton->setIcon(QIcon(ImageLocation + QLatin1String("addtab.png")));
- QObject::connect(newTabButton, SIGNAL(clicked()), this, SLOT(newTab()));
- newTabButton->setToolTip(tr("Add page"));
-
- QToolButton *closeTabButton = new QToolButton(this);
- closeTabButton->setPalette(pal);
- ui.tab->setCornerWidget(closeTabButton, Qt::TopRightCorner);
- closeTabButton->setCursor(Qt::ArrowCursor);
- closeTabButton->setAutoRaise(true);
- closeTabButton->setIcon(QIcon(ImageLocation + QLatin1String("closetab.png")));
- QObject::connect(closeTabButton, SIGNAL(clicked()), this, SLOT(closeTab()));
- closeTabButton->setToolTip(tr("Close page"));
- closeTabButton->setEnabled(false);
-
- QObject::connect(ui.toolClose, SIGNAL(clicked()), ui.frameFind, SLOT(hide()));
- QObject::connect(ui.toolPrevious, SIGNAL(clicked()), this, SLOT(findPrevious()));
- QObject::connect(ui.toolNext, SIGNAL(clicked()), this, SLOT(findNext()));
- QObject::connect(ui.editFind, SIGNAL(returnPressed()), this, SLOT(findNext()));
- QObject::connect(ui.editFind, SIGNAL(textEdited(const QString&)),
- this, SLOT(find(QString)));
- ui.frameFind->setVisible(false);
- ui.labelWrapped->setVisible(false);
- autoHideTimer = new QTimer(this);
- autoHideTimer->setInterval(5000);
- autoHideTimer->setSingleShot(true);
- QObject::connect(autoHideTimer, SIGNAL(timeout()), ui.frameFind, SLOT(hide()));
-}
-
-void TabbedBrowser::updateTitle(const QString &title)
-{
- ui.tab->setTabText(ui.tab->indexOf(currentBrowser()), title.trimmed());
-}
-
-void TabbedBrowser::newTab()
-{
- newTab(QString());
-}
-
-void TabbedBrowser::transferFocus()
-{
- if(currentBrowser()) {
- currentBrowser()->setFocus();
- }
- mainWindow()->setWindowTitle(Config::configuration()->title()
- + QLatin1String(" - ")
- + currentBrowser()->documentTitle());
-}
-
-void TabbedBrowser::initHelpWindow(HelpWindow * /*win*/)
-{
-}
-
-void TabbedBrowser::setup()
-{
- newTab(QString());
-}
-
-void TabbedBrowser::copy()
-{
- currentBrowser()->copy();
-}
-
-void TabbedBrowser::closeTab()
-{
- if(ui.tab->count()==1)
- return;
- HelpWindow *win = currentBrowser();
- mainWindow()->removePendingBrowser(win);
- ui.tab->removeTab(ui.tab->indexOf(win));
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(ui.tab->count() > 1);
- emit tabCountChanged(ui.tab->count());
-}
-
-QStringList TabbedBrowser::sources() const
-{
- QStringList lst;
- int cnt = ui.tab->count();
- for(int i=0; i<cnt; i++) {
- lst.append(((QTextBrowser*) ui.tab->widget(i))->source().toString());
- }
- return lst;
-}
-
-QList<HelpWindow*> TabbedBrowser::browsers() const
-{
- QList<HelpWindow*> list;
- for (int i=0; i<ui.tab->count(); ++i) {
- Q_ASSERT(qobject_cast<HelpWindow*>(ui.tab->widget(i)));
- list.append(static_cast<HelpWindow*>(ui.tab->widget(i)));
- }
- return list;
-}
-
-void TabbedBrowser::sourceChanged()
-{
- HelpWindow *win = qobject_cast<HelpWindow *>(QObject::sender());
- Q_ASSERT(win);
- QString docTitle(win->documentTitle());
- if (docTitle.isEmpty())
- docTitle = QLatin1String("...");
- // Make the classname in the title a bit more visible (otherwise
- // we just see the "Qt 4.0 : Q..." which isn't really helpful ;-)
- QString qtTitle = QLatin1String("Qt ") + QString::number( (QT_VERSION >> 16) & 0xff )
- + QLatin1String(".") + QString::number( (QT_VERSION >> 8) & 0xff )
- + QLatin1String(": ");
- if (docTitle.startsWith(qtTitle))
- docTitle = docTitle.mid(qtTitle.length());
- setTitle(win, docTitle);
- ui.frameFind->hide();
- ui.labelWrapped->hide();
- win->setTextCursor(win->cursorForPosition(QPoint(0, 0)));
-}
-
-void TabbedBrowser::setTitle(HelpWindow *win, const QString &title)
-{
- const QString tt = title.trimmed();
- ui.tab->setTabText(ui.tab->indexOf(win), tt);
- if (win == currentBrowser())
- mainWindow()->setWindowTitle(Config::configuration()->title() + QLatin1String(" - ") + tt);
-}
-
-void TabbedBrowser::keyPressEvent(QKeyEvent *e)
-{
- int key = e->key();
- QString ttf = ui.editFind->text();
- QString text = e->text();
-
- if (ui.frameFind->isVisible()) {
- switch (key) {
- case Qt::Key_Escape:
- ui.frameFind->hide();
- ui.labelWrapped->hide();
- return;
- case Qt::Key_Backspace:
- ttf.chop(1);
- break;
- case Qt::Key_Return:
- case Qt::Key_Enter:
- // Return/Enter key events are not accepted by QLineEdit
- return;
- default:
- if (text.isEmpty()) {
- QWidget::keyPressEvent(e);
- return;
- }
- ttf += text;
- }
- } else {
- if (text.isEmpty() || text[0].isSpace() || !text[0].isPrint()) {
- QWidget::keyPressEvent(e);
- return;
- }
- if (text.startsWith(QLatin1Char('/'))) {
- ui.editFind->clear();
- find();
- return;
- }
- ttf = text;
- ui.frameFind->show();
- }
-
- ui.editFind->setText(ttf);
- find(ttf, false, false);
-}
-
-void TabbedBrowser::findNext()
-{
- find(ui.editFind->text(), true, false);
-}
-
-void TabbedBrowser::findPrevious()
-{
- find(ui.editFind->text(), false, true);
-}
-
-void TabbedBrowser::find()
-{
- ui.frameFind->show();
- ui.editFind->setFocus(Qt::ShortcutFocusReason);
- ui.editFind->selectAll();
- autoHideTimer->stop();
-}
-
-void TabbedBrowser::find(QString ttf, bool forward, bool backward)
-{
- HelpWindow *browser = currentBrowser();
- QTextDocument *doc = browser->document();
- QString oldText = ui.editFind->text();
- QTextCursor c = browser->textCursor();
- QTextDocument::FindFlags options;
- QPalette p = ui.editFind->palette();
- p.setColor(QPalette::Active, QPalette::Base, Qt::white);
-
- if (c.hasSelection())
- c.setPosition(forward ? c.position() : c.anchor(), QTextCursor::MoveAnchor);
-
- QTextCursor newCursor = c;
-
- if (!ttf.isEmpty()) {
- if (backward)
- options |= QTextDocument::FindBackward;
-
- if (ui.checkCase->isChecked())
- options |= QTextDocument::FindCaseSensitively;
-
- if (ui.checkWholeWords->isChecked())
- options |= QTextDocument::FindWholeWords;
-
- newCursor = doc->find(ttf, c, options);
- ui.labelWrapped->hide();
-
- if (newCursor.isNull()) {
- QTextCursor ac(doc);
- ac.movePosition(options & QTextDocument::FindBackward
- ? QTextCursor::End : QTextCursor::Start);
- newCursor = doc->find(ttf, ac, options);
- if (newCursor.isNull()) {
- p.setColor(QPalette::Active, QPalette::Base, QColor(255, 102, 102));
- newCursor = c;
- } else
- ui.labelWrapped->show();
- }
- }
-
- if (!ui.frameFind->isVisible())
- ui.frameFind->show();
- browser->setTextCursor(newCursor);
- ui.editFind->setPalette(p);
- if (!ui.editFind->hasFocus())
- autoHideTimer->start();
-}
-
-bool TabbedBrowser::eventFilter(QObject *o, QEvent *e)
-{
- if (o == ui.editFind) {
- if (e->type() == QEvent::FocusIn && autoHideTimer->isActive())
- autoHideTimer->stop();
- } else if (e->type() == QEvent::KeyPress && ui.frameFind->isVisible()) { // assume textbrowser
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
- if (ke->key() == Qt::Key_Space) {
- keyPressEvent(ke);
- return true;
- }
- }
-
- return QWidget::eventFilter(o, e);
-}
-
-void TabbedBrowser::openTabMenu(const QPoint& pos)
-{
- QTabBar *tabBar = qFindChild<QTabBar*>(ui.tab);
-
- QMenu m(QLatin1String(""), tabBar);
- QAction *new_action = m.addAction(tr("New Tab"));
- QAction *close_action = m.addAction(tr("Close Tab"));
- QAction *close_others_action = m.addAction(tr("Close Other Tabs"));
-
- if (tabBar->count() == 1) {
- close_action->setEnabled(false);
- close_others_action->setEnabled(false);
- }
-
- QAction *action_picked = m.exec(tabBar->mapToGlobal(pos));
- if (!action_picked)
- return;
-
- if (action_picked == new_action) {
- newTab();
- return;
- }
-
- QList<HelpWindow*> windowList = browsers();
- for (int i = 0; i < tabBar->count(); ++i) {
- if (tabBar->tabRect(i).contains(pos)) {
- HelpWindow *win = static_cast<HelpWindow*>(ui.tab->widget(i));
- if (action_picked == close_action) {
- mainWindow()->removePendingBrowser(win);
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- }
- windowList.removeOne(win);
- break;
- }
- }
-
- if (action_picked == close_others_action) {
- foreach (HelpWindow* win, windowList) {
- mainWindow()->removePendingBrowser(win);
- QTimer::singleShot(0, win, SLOT(deleteLater()));
- windowList.removeOne(win);
- }
- }
-
- ui.tab->cornerWidget(Qt::TopRightCorner)->setEnabled(windowList.count() > 1);
- emit tabCountChanged(windowList.count());
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/tabbedbrowser.h b/tools/assistant/compat/tabbedbrowser.h
deleted file mode 100644
index 67c9f4d..0000000
--- a/tools/assistant/compat/tabbedbrowser.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TABBEDBROWSER_H
-#define TABBEDBROWSER_H
-
-#include "ui_tabbedbrowser.h"
-
-QT_BEGIN_NAMESPACE
-
-class MainWindow;
-class HelpWindow;
-class QStyleSheet;
-class QMimeSourceFactory;
-class QTimer;
-
-class TabbedBrowser : public QWidget
-{
- Q_OBJECT
-public:
- TabbedBrowser(MainWindow *parent);
- virtual ~TabbedBrowser();
-
- MainWindow *mainWindow() const;
- HelpWindow *currentBrowser() const;
- QStringList sources() const;
- QList<HelpWindow*> browsers() const;
-
- HelpWindow* newBackgroundTab();
- HelpWindow* createHelpWindow();
-
- void setTitle(HelpWindow*, const QString &);
-
-signals:
- void tabCountChanged(int count);
- void browserUrlChanged(const QString &link);
-
-protected:
- void keyPressEvent(QKeyEvent *);
- bool eventFilter(QObject *o, QEvent *e);
-
-public slots:
- void init();
- void forward();
- void backward();
- void setSource(const QString &ref);
- void reload();
- void home();
- void nextTab();
- void previousTab();
- void newTab(const QString &lnk);
- void zoomIn();
- void zoomOut();
- void updateTitle(const QString &title);
- void newTab();
- void transferFocus();
- void initHelpWindow(HelpWindow *win);
- void setup();
- void copy();
- void closeTab();
- void sourceChanged();
-
- void find();
- void findNext();
- void findPrevious();
-
-private slots:
- void find(QString, bool forward = false, bool backward = false);
- void openTabMenu(const QPoint& pos);
-
-private:
- Ui::TabbedBrowser ui;
- QWidget *lastCurrentTab;
- QFont tabFont;
-
- QString fixedFontFam;
- QColor lnkColor;
- bool underlineLnk;
- QTimer *autoHideTimer;
-};
-
-QT_END_NAMESPACE
-
-#endif // TABBEDBROWSER_H
diff --git a/tools/assistant/compat/tabbedbrowser.ui b/tools/assistant/compat/tabbedbrowser.ui
deleted file mode 100644
index eb4f5c5..0000000
--- a/tools/assistant/compat/tabbedbrowser.ui
+++ /dev/null
@@ -1,233 +0,0 @@
-<ui version="4.0" >
- <author></author>
- <comment>*********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <exportmacro></exportmacro>
- <class>TabbedBrowser</class>
- <widget class="QWidget" name="TabbedBrowser" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>710</width>
- <height>664</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>TabbedBrowser</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>0</number>
- </property>
- <item>
- <widget class="QTabWidget" name="tab" >
- <widget class="QWidget" name="frontpage" >
- <attribute name="title" >
- <string>Untitled</string>
- </attribute>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>8</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frameFind" >
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QToolButton" name="toolClose" >
- <property name="text" >
- <string/>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/close.png</iconset>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="editFind" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toolPrevious" >
- <property name="text" >
- <string>Previous</string>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/previous.png</iconset>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="toolNext" >
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text" >
- <string>Next</string>
- </property>
- <property name="icon" >
- <iconset resource="assistant.qrc" >:/trolltech/assistant/images/win/next.png</iconset>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise" >
- <bool>true</bool>
- </property>
- <property name="arrowType" >
- <enum>Qt::NoArrow</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkCase" >
- <property name="text" >
- <string>Case Sensitive</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="checkWholeWords" >
- <property name="text" >
- <string>Whole words</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="labelWrapped" >
- <property name="minimumSize" >
- <size>
- <width>0</width>
- <height>20</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>105</width>
- <height>20</height>
- </size>
- </property>
- <property name="text" >
- <string>&lt;img src=":/trolltech/assistant/images/wrap.png">&amp;nbsp;Search wrapped</string>
- </property>
- <property name="textFormat" >
- <enum>Qt::RichText</enum>
- </property>
- <property name="scaledContents" >
- <bool>true</bool>
- </property>
- <property name="alignment" >
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>81</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <pixmapfunction></pixmapfunction>
- <resources>
- <include location="assistant.qrc" />
- </resources>
- <connections/>
-</ui>
diff --git a/tools/assistant/compat/topicchooser.cpp b/tools/assistant/compat/topicchooser.cpp
deleted file mode 100644
index c047ee1..0000000
--- a/tools/assistant/compat/topicchooser.cpp
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "topicchooser.h"
-
-#include <QLabel>
-#include <QListWidget>
-#include <QPushButton>
-
-QT_BEGIN_NAMESPACE
-
-TopicChooser::TopicChooser(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title)
- : QDialog(parent), links(lnks), linkNames(lnkNames)
-{
- ui.setupUi(this);
-
- ui.label->setText(tr("Choose a topic for <b>%1</b>").arg(title));
- ui.listbox->addItems(linkNames);
- if (ui.listbox->count() != 0)
- ui.listbox->setCurrentRow(0);
- ui.listbox->setFocus();
-}
-
-QString TopicChooser::link() const
-{
- if (ui.listbox->currentRow() == -1)
- return QString();
- QString s = ui.listbox->item(ui.listbox->currentRow())->text();
- if (s.isEmpty())
- return s;
- int i = linkNames.indexOf(s);
- return links[i];
-}
-
-QString TopicChooser::getLink(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title)
-{
- TopicChooser *dlg = new TopicChooser(parent, lnkNames, lnks, title);
- QString lnk;
- if (dlg->exec() == QDialog::Accepted)
- lnk = dlg->link();
- delete dlg;
- return lnk;
-}
-
-void TopicChooser::on_buttonDisplay_clicked()
-{
- accept();
-}
-
-void TopicChooser::on_buttonCancel_clicked()
-{
- reject();
-}
-
-void TopicChooser::on_listbox_itemActivated(QListWidgetItem *item)
-{
- Q_UNUSED(item);
- accept();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/topicchooser.h b/tools/assistant/compat/topicchooser.h
deleted file mode 100644
index ec5b922..0000000
--- a/tools/assistant/compat/topicchooser.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef TOPICCHOOSER_H
-#define TOPICCHOOSER_H
-
-#include "ui_topicchooser.h"
-
-#include <QDialog>
-#include <QStringList>
-
-QT_BEGIN_NAMESPACE
-
-class TopicChooser : public QDialog
-{
- Q_OBJECT
-public:
- TopicChooser(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title);
-
- QString link() const;
-
- static QString getLink(QWidget *parent, const QStringList &lnkNames,
- const QStringList &lnks, const QString &title);
-
-private slots:
- void on_buttonDisplay_clicked();
- void on_buttonCancel_clicked();
- void on_listbox_itemActivated(QListWidgetItem *item);
-
-private:
- Ui::TopicChooser ui;
- QString theLink;
- QStringList links, linkNames;
-};
-
-#endif // TOPICCHOOSER_H
-
-QT_END_NAMESPACE
diff --git a/tools/assistant/compat/topicchooser.ui b/tools/assistant/compat/topicchooser.ui
deleted file mode 100644
index 3bc5ff2..0000000
--- a/tools/assistant/compat/topicchooser.ui
+++ /dev/null
@@ -1,162 +0,0 @@
-<ui version="4.0" >
- <comment>*********************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Assistant of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-*********************************************************************</comment>
- <class>TopicChooser</class>
- <widget class="QDialog" name="TopicChooser" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>391</width>
- <height>223</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Choose Topic</string>
- </property>
- <property name="whatsThis" >
- <string>Select a topic from the list and click the &lt;b>Display&lt;/b>-button to open the online help.</string>
- </property>
- <property name="sizeGripEnabled" >
- <bool>true</bool>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>11</number>
- </property>
- <property name="topMargin" >
- <number>11</number>
- </property>
- <property name="rightMargin" >
- <number>11</number>
- </property>
- <property name="bottomMargin" >
- <number>11</number>
- </property>
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>&amp;Topics</string>
- </property>
- <property name="buddy" >
- <cstring>listbox</cstring>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QListWidget" name="listbox" >
- <property name="whatsThis" >
- <string>Displays a list of available help topics for the keyword.</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Expanding</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="buttonDisplay" >
- <property name="whatsThis" >
- <string>Open the topic selected in the list.</string>
- </property>
- <property name="text" >
- <string>&amp;Display</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- <property name="default" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="buttonCancel" >
- <property name="whatsThis" >
- <string>Close the Dialog.</string>
- </property>
- <property name="text" >
- <string>&amp;Close</string>
- </property>
- <property name="autoDefault" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/tools/assistant/lib/lib.pro b/tools/assistant/lib/lib.pro
index 51933de..26d3456 100644
--- a/tools/assistant/lib/lib.pro
+++ b/tools/assistant/lib/lib.pro
@@ -23,7 +23,6 @@ unix:QMAKE_PKGCONFIG_REQUIRES += QtNetwork \
QtSql \
QtXml
LIBS_PRIVATE += -l$$qclucene
-
RESOURCES += helpsystem.qrc
SOURCES += qhelpenginecore.cpp \
qhelpengine.cpp \
@@ -41,6 +40,7 @@ SOURCES += qhelpenginecore.cpp \
qhelpsearchindexwriter_default.cpp \
qhelpsearchindexreader_default.cpp \
qhelpsearchindexreader.cpp \
+ qclucenefieldnames.cpp \
qhelp_global.cpp
# access to clucene
@@ -63,7 +63,8 @@ HEADERS += qhelpenginecore.h \
qhelpsearchindex_default_p.h \
qhelpsearchindexwriter_default_p.h \
qhelpsearchindexreader_default_p.h \
- qhelpsearchindexreader_p.h
+ qhelpsearchindexreader_p.h \
+ qclucenefieldnames_p.h
# access to clucene
HEADERS += qhelpsearchindexwriter_clucene_p.h \
diff --git a/tools/assistant/compat/lib/qassistantclient_global.h b/tools/assistant/lib/qclucenefieldnames.cpp
index ee5e6cc..df01d1a 100644
--- a/tools/assistant/compat/lib/qassistantclient_global.h
+++ b/tools/assistant/lib/qclucenefieldnames.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the Qt Assistant of the Qt Toolkit.
+** This file is part of the Qt Assistant.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,25 +39,21 @@
**
****************************************************************************/
-#ifndef QASSISTANTCLIENT_GLOBAL_H
-#define QASSISTANTCLIENT_GLOBAL_H
-
-#include <QtCore/qglobal.h>
-
-QT_BEGIN_HEADER
+#include "qclucenefieldnames_p.h"
QT_BEGIN_NAMESPACE
-#if defined(QT_ASSISTANT_CLIENT_STATIC) || (!defined(QT_SHARED) && !defined(QT_DLL))
-# define QT_ASSISTANT_CLIENT_EXPORT
-#elif defined(QT_ASSISTANT_CLIENT_LIBRARY)
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_EXPORT
-#else
-# define QT_ASSISTANT_CLIENT_EXPORT Q_DECL_IMPORT
-#endif
+namespace qt {
+namespace fulltextsearch {
+namespace clucene {
+const QString AttributeField(QLatin1String("attribute"));
+const QString ContentField(QLatin1String("content"));
+const QString NamespaceField(QLatin1String("namespace"));
+const QString PathField(QLatin1String("path"));
+const QString TitleField(QLatin1String("title"));
+const QString TitleTokenizedField(QLatin1String("titleTokenized"));
+} // namespace clucene
+} // namespace fulltextsearch
+} // namespace qt
QT_END_NAMESPACE
-
-QT_END_HEADER
-
-#endif
diff --git a/examples/assistant/simpletextviewer/main.cpp b/tools/assistant/lib/qclucenefieldnames_p.h
index 82c7104..57b85f8 100644
--- a/examples/assistant/simpletextviewer/main.cpp
+++ b/tools/assistant/lib/qclucenefieldnames_p.h
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the examples of the Qt Toolkit.
+** This file is part of the Qt Assistant.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,14 +39,27 @@
**
****************************************************************************/
-#include <QApplication>
+#ifndef QCLUCENEFIELDNAMES_P_H
+#define QCLUCENEFIELDNAMES_P_H
-#include "mainwindow.h"
+#include <QtCore/QtGlobal>
+#include <QtCore/QString>
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- MainWindow window;
- window.show();
- return app.exec();
-}
+QT_BEGIN_NAMESPACE
+
+namespace qt {
+namespace fulltextsearch {
+namespace clucene {
+ extern const QString AttributeField;
+ extern const QString ContentField;
+ extern const QString NamespaceField;
+ extern const QString PathField;
+ extern const QString TitleField;
+ extern const QString TitleTokenizedField;
+} // namespace clucene
+} // namespace fulltextsearch
+} // namespace qt
+
+QT_END_NAMESPACE
+
+#endif // QCLUCENEFIELDNAMES_P_H
diff --git a/tools/assistant/lib/qhelp_global.cpp b/tools/assistant/lib/qhelp_global.cpp
index 980de27..aa9f0dd 100644
--- a/tools/assistant/lib/qhelp_global.cpp
+++ b/tools/assistant/lib/qhelp_global.cpp
@@ -86,17 +86,17 @@ QString QHelpGlobal::codecFromData(const QByteArray &data)
QString QHelpGlobal::codecFromHtmlData(const QByteArray &data)
{
- QString content = QString::fromUtf8(data.constData(), data.size());
- int start = content.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
+ QString head = QString::fromUtf8(data.constData(), qMin(1000, data.size()));
+ int start = head.indexOf(QLatin1String("<meta"), 0, Qt::CaseInsensitive);
if (start > 0) {
int end;
QRegExp r(QLatin1String("charset=([^\"\\s]+)"));
while (start != -1) {
- end = content.indexOf(QLatin1Char('>'), start) + 1;
- const QString &meta = content.mid(start, end - start).toLower();
+ end = head.indexOf(QLatin1Char('>'), start) + 1;
+ const QString &meta = head.mid(start, end - start).toLower();
if (r.indexIn(meta) != -1)
return r.cap(1);
- start = content.indexOf(QLatin1String("<meta"), end,
+ start = head.indexOf(QLatin1String("<meta"), end,
Qt::CaseInsensitive);
}
}
@@ -105,8 +105,8 @@ QString QHelpGlobal::codecFromHtmlData(const QByteArray &data)
QString QHelpGlobal::codecFromXmlData(const QByteArray &data)
{
- QString content = QString::fromUtf8(data.constData(), data.size());
+ QString head = QString::fromUtf8(data.constData(), qMin(1000, data.size()));
const QRegExp encodingExp(QLatin1String("^\\s*<\\?xml version="
"\"\\d\\.\\d\" encoding=\"([^\"]+)\"\\?>.*"));
- return encodingExp.exactMatch(content) ? encodingExp.cap(1) : QString();
+ return encodingExp.exactMatch(head) ? encodingExp.cap(1) : QString();
}
diff --git a/tools/assistant/lib/qhelpcollectionhandler.cpp b/tools/assistant/lib/qhelpcollectionhandler.cpp
index 4aa7ab6..9092259 100644
--- a/tools/assistant/lib/qhelpcollectionhandler.cpp
+++ b/tools/assistant/lib/qhelpcollectionhandler.cpp
@@ -308,10 +308,8 @@ bool QHelpCollectionHandler::addCustomFilter(const QString &filterName,
m_query.prepare(QLatin1String("SELECT Id FROM FilterNameTable WHERE Name=?"));
m_query.bindValue(0, filterName);
m_query.exec();
- while (m_query.next()) {
+ if (m_query.next())
nameId = m_query.value(0).toInt();
- break;
- }
m_query.exec(QLatin1String("SELECT Id, Name FROM FilterAttributeTable"));
QStringList idsToInsert = attributes;
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 8c6c2fe..80b92fd 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -405,8 +405,9 @@ QStringList QHelpEngineCore::customFilters() const
/*!
Adds the new custom filter \a filterName. The filter attributes
- are specified by \a attributes. The function returns false if
- the filter can not be added, e.g. when the filter already exists.
+ are specified by \a attributes. If the filter already exists,
+ its attribute set is replaced. The function returns true if
+ the operation succeeded, otherwise it returns false.
\sa customFilters(), removeCustomFilter()
*/
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index 954f41f..e180375 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -39,16 +39,19 @@
**
****************************************************************************/
-#include "qhelpenginecore.h"
-#include "fulltextsearch/qsearchable_p.h"
-#include "fulltextsearch/qqueryparser_p.h"
#include "fulltextsearch/qindexreader_p.h"
+#include "fulltextsearch/qqueryparser_p.h"
+#include "fulltextsearch/qsearchable_p.h"
+#include "qclucenefieldnames_p.h"
+#include "qhelpenginecore.h"
+
#include "qhelpsearchindexreader_clucene_p.h"
#include <QtCore/QDir>
#include <QtCore/QSet>
#include <QtCore/QString>
#include <QtCore/QFileInfo>
+#include <QtCore/QSharedPointer>
#include <QtCore/QStringList>
#include <QtCore/QTextStream>
#include <QtCore/QMutexLocker>
@@ -108,64 +111,88 @@ void QHelpSearchIndexReaderClucene::run()
#if !defined(QT_NO_EXCEPTIONS)
try {
#endif
- QCLuceneBooleanQuery booleanQuery;
+ QCLuceneBooleanQuery booleanQueryTitle;
+ QCLuceneBooleanQuery booleanQueryContent;
QCLuceneStandardAnalyzer analyzer;
- if (!buildQuery(booleanQuery, queryList, analyzer)) {
+ const QStringList& attribList =
+ engine.filterAttributes(engine.currentFilter());
+ bool titleQueryIsValid = buildQuery(queryList, TitleTokenizedField,
+ attribList, booleanQueryTitle, analyzer);
+ bool contentQueryIsValid = buildQuery(queryList, ContentField,
+ attribList, booleanQueryContent, analyzer);
+ if (!titleQueryIsValid && !contentQueryIsValid) {
emit searchingFinished(0);
return;
}
- const QStringList attribList = engine.filterAttributes(engine.currentFilter());
- if (!attribList.isEmpty()) {
- QCLuceneQuery* query = QCLuceneQueryParser::parse(QLatin1String("+")
- + attribList.join(QLatin1String(" +")), QLatin1String("attribute"), analyzer);
+ QCLuceneIndexSearcher indexSearcher(indexPath);
- if (!query) {
+ // QCLuceneHits object must be allocated on the heap, because
+ // there is no default constructor.
+ QSharedPointer<QCLuceneHits> titleHits;
+ QSharedPointer<QCLuceneHits> contentHits;
+ if (titleQueryIsValid) {
+ titleHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryTitle)));
+ }
+ if (contentQueryIsValid) {
+ contentHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryContent)));
+ }
+ bool boost = true;
+ if ((titleHits.isNull() || titleHits->length() == 0)
+ && (contentHits.isNull() || contentHits->length() == 0)) {
+ booleanQueryTitle = QCLuceneBooleanQuery();
+ booleanQueryContent = QCLuceneBooleanQuery();
+ titleQueryIsValid =
+ buildTryHarderQuery(queryList, TitleTokenizedField,
+ attribList, booleanQueryTitle, analyzer);
+ contentQueryIsValid =
+ buildTryHarderQuery(queryList, ContentField, attribList,
+ booleanQueryContent, analyzer);
+ if (!titleQueryIsValid && !contentQueryIsValid) {
emit searchingFinished(0);
return;
}
- booleanQuery.add(query, true, true, false);
- }
-
- QCLuceneIndexSearcher indexSearcher(indexPath);
- QCLuceneHits hits = indexSearcher.search(booleanQuery);
-
- bool boost = true;
- QCLuceneBooleanQuery tryHarderQuery;
- if (hits.length() == 0) {
- if (buildTryHarderQuery(tryHarderQuery, queryList, analyzer)) {
- if (!attribList.isEmpty()) {
- QCLuceneQuery* query = QCLuceneQueryParser::parse(QLatin1String("+")
- + attribList.join(QLatin1String(" +")), QLatin1String("attribute"),
- analyzer);
- tryHarderQuery.add(query, true, true, false);
- }
- hits = indexSearcher.search(tryHarderQuery);
- boost = (hits.length() == 0);
+ if (titleQueryIsValid) {
+ titleHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryTitle)));
+ }
+ if (contentQueryIsValid) {
+ contentHits = QSharedPointer<QCLuceneHits>(new QCLuceneHits(
+ indexSearcher.search(booleanQueryContent)));
}
+ boost = false;
}
+ QList<QSharedPointer<QCLuceneHits> > cluceneHitsList;
+ if (!titleHits.isNull())
+ cluceneHitsList.append(titleHits);
+ if (!contentHits.isNull())
+ cluceneHitsList.append(contentHits);
QSet<QString> pathSet;
QCLuceneDocument document;
const QStringList namespaceList = engine.registeredDocumentations();
- for (qint32 i = 0; i < hits.length(); i++) {
- document = hits.document(i);
- const QString path = document.get(QLatin1String("path"));
- if (!pathSet.contains(path) && namespaceList.contains(
- document.get(QLatin1String("namespace")), Qt::CaseInsensitive)) {
- pathSet.insert(path);
- hitList.append(qMakePair(path, document.get(QLatin1String("title"))));
- }
- document.clear();
+ foreach (QSharedPointer<QCLuceneHits> hits, cluceneHitsList) {
+ for (qint32 i = 0; i < hits->length(); i++) {
+ document = hits->document(i);
+ const QString path = document.get(PathField);
+ if (!pathSet.contains(path) && namespaceList.contains(
+ document.get(NamespaceField), Qt::CaseInsensitive)) {
+ pathSet.insert(path);
+ hitList.append(qMakePair(path, document.get(TitleField)));
+ }
+ document.clear();
- mutex.lock();
- if (m_cancel) {
+ mutex.lock();
+ if (m_cancel) {
+ mutex.unlock();
+ emit searchingFinished(0);
+ return;
+ }
mutex.unlock();
- emit searchingFinished(0);
- return;
}
- mutex.unlock();
}
indexSearcher.close();
@@ -185,144 +212,205 @@ void QHelpSearchIndexReaderClucene::run()
}
}
-bool QHelpSearchIndexReaderClucene::defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
- QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::buildQuery(
+ const QList<QHelpSearchQuery> &queries, const QString &fieldName,
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
{
- const QLatin1String c("content");
- const QLatin1String t("titleTokenized");
-
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term, c, analyzer);
- QCLuceneQuery *query2 = QCLuceneQueryParser::parse(term, t, analyzer);
- if (query && query2) {
- booleanQuery.add(query, true, false, false);
- booleanQuery.add(query2, true, false, false);
- return true;
+ bool queryIsValid = false;
+ foreach (const QHelpSearchQuery &query, queries) {
+ if (fieldName != ContentField && isNegativeQuery(query)) {
+ queryIsValid = false;
+ break;
+ }
+ switch (query.fieldName) {
+ case QHelpSearchQuery::FUZZY:
+ if (addFuzzyQuery(query, fieldName, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::WITHOUT:
+ if (fieldName != ContentField)
+ return false;
+ if (addWithoutQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::PHRASE:
+ if (addPhraseQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::ALL:
+ if (addAllQuery(query, fieldName, booleanQuery))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::DEFAULT:
+ if (addDefaultQuery(query, fieldName, true, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ case QHelpSearchQuery::ATLEAST:
+ if (addAtLeastQuery(query, fieldName, booleanQuery, analyzer))
+ queryIsValid = true;
+ break;
+ default:
+ Q_ASSERT(!"Invalid field name");
+ }
}
- return false;
+ if (queryIsValid && !filterAttributes.isEmpty()) {
+ queryIsValid =
+ addAttributesQuery(filterAttributes, booleanQuery, analyzer);
+ }
+
+ return queryIsValid;
}
-bool QHelpSearchIndexReaderClucene::buildQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(
+ const QList<QHelpSearchQuery> &queries, const QString &fieldName,
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
{
- foreach (const QHelpSearchQuery query, queryList) {
- switch (query.fieldName) {
- case QHelpSearchQuery::FUZZY: {
- const QLatin1String fuzzy("~");
- foreach (const QString &term, query.wordList) {
- if (term.isEmpty()
- || !defaultQuery(term.toLower() + fuzzy, booleanQuery, analyzer)) {
- return false;
- }
- }
- } break;
-
- case QHelpSearchQuery::WITHOUT: {
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, query.wordList) {
- if (stopWords.contains(term, Qt::CaseInsensitive))
- continue;
-
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
- QCLuceneQuery *query2 = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("titleTokenized"), term.toLower()));
-
- if (query && query2) {
- booleanQuery.add(query, true, false, true);
- booleanQuery.add(query2, true, false, true);
- } else {
- return false;
- }
- }
- } break;
-
- case QHelpSearchQuery::PHRASE: {
- const QString &term = query.wordList.at(0).toLower();
- if (term.contains(QLatin1Char(' '))) {
- QStringList termList = term.split(QLatin1String(" "));
- QCLucenePhraseQuery *q = new QCLucenePhraseQuery();
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, termList) {
- if (!stopWords.contains(term, Qt::CaseInsensitive))
- q->addTerm(QCLuceneTerm(QLatin1String("content"), term.toLower()));
- }
- booleanQuery.add(q, true, true, false);
- } else {
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
- QCLuceneQuery *query2 = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("titleTokenized"), term.toLower()));
-
- if (query && query2) {
- booleanQuery.add(query, true, true, false);
- booleanQuery.add(query2, true, false, false);
- } else {
- return false;
- }
- }
- } break;
+ if (queries.isEmpty())
+ return false;
+ const QHelpSearchQuery &query = queries.front();
+ if (query.fieldName != QHelpSearchQuery::DEFAULT)
+ return false;
+ if (isNegativeQuery(query))
+ return false;
+ if (!addDefaultQuery(query, fieldName, false, booleanQuery, analyzer))
+ return false;
+ if (filterAttributes.isEmpty())
+ return true;
+ return addAttributesQuery(filterAttributes, booleanQuery, analyzer);
+}
- case QHelpSearchQuery::ALL: {
- QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
- foreach (const QString &term, query.wordList) {
- if (stopWords.contains(term, Qt::CaseInsensitive))
- continue;
+bool QHelpSearchIndexReaderClucene::isNegativeQuery(const QHelpSearchQuery &query) const
+{
+ const QString &search = query.wordList.join(" ");
+ return search.contains('!') || search.contains('-')
+ || search.contains(QLatin1String(" NOT "));
+}
- QCLuceneQuery *query = new QCLuceneTermQuery(QCLuceneTerm(
- QLatin1String("content"), term.toLower()));
+bool QHelpSearchIndexReaderClucene::addFuzzyQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ bool queryIsValid = false;
+ const QLatin1String fuzzy("~");
+ foreach (const QString &term, query.wordList) {
+ if (!term.isEmpty()) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term + fuzzy, fieldName, analyzer);
+ if (lQuery != 0) {
+ booleanQuery.add(lQuery, true, false, false);
+ queryIsValid = true;
+ }
+ }
+ }
+ return queryIsValid;
+}
- if (query) {
- booleanQuery.add(query, true, true, false);
- } else {
- return false;
- }
- }
- } break;
+bool QHelpSearchIndexReaderClucene::addWithoutQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QStringList &stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, query.wordList) {
+ if (stopWords.contains(term, Qt::CaseInsensitive))
+ continue;
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, false, true);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- case QHelpSearchQuery::DEFAULT: {
- foreach (const QString &term, query.wordList) {
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term.toLower(),
- QLatin1String("content"), analyzer);
+bool QHelpSearchIndexReaderClucene::addPhraseQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QString &term = query.wordList.at(0).toLower();
+ if (term.contains(QLatin1Char(' '))) {
+ const QStringList termList = term.split(QLatin1String(" "));
+ QCLucenePhraseQuery *q = new QCLucenePhraseQuery();
+ const QStringList stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, termList) {
+ if (!stopWords.contains(term, Qt::CaseInsensitive))
+ q->addTerm(QCLuceneTerm(fieldName, term.toLower()));
+ }
+ if (!q->getTerms().isEmpty()) {
+ booleanQuery.add(q, true, true, false);
+ queryIsValid = true;
+ }
+ } else {
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, true, false);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- if (query)
- booleanQuery.add(query, true, true, false);
- }
- } break;
+bool QHelpSearchIndexReaderClucene::addAllQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, QCLuceneBooleanQuery &booleanQuery)
+{
+ bool queryIsValid = false;
+ const QStringList &stopWords = QCLuceneStopAnalyzer().englishStopWords();
+ foreach (const QString &term, query.wordList) {
+ if (stopWords.contains(term, Qt::CaseInsensitive))
+ continue;
+ QCLuceneQuery *lQuery = new QCLuceneTermQuery(QCLuceneTerm(
+ fieldName, term.toLower()));
+ booleanQuery.add(lQuery, true, true, false);
+ queryIsValid = true;
+ }
+ return queryIsValid;
+}
- case QHelpSearchQuery::ATLEAST: {
- foreach (const QString &term, query.wordList) {
- if (term.isEmpty() || !defaultQuery(term.toLower(), booleanQuery, analyzer))
- return false;
- }
- }
+bool QHelpSearchIndexReaderClucene::addDefaultQuery(const QHelpSearchQuery &query,
+ const QString &fieldName, bool allTermsRequired,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ bool queryIsValid = false;
+ foreach (const QString &term, query.wordList) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term.toLower(), fieldName, analyzer);
+ if (lQuery) {
+ booleanQuery.add(lQuery, true, allTermsRequired, false);
+ queryIsValid = true;
}
}
-
- return true;
+ return queryIsValid;
}
-bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer)
+bool QHelpSearchIndexReaderClucene::addAtLeastQuery(
+ const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer)
{
- bool retVal = false;
- foreach (const QHelpSearchQuery query, queryList) {
- switch (query.fieldName) {
- default: break;
- case QHelpSearchQuery::DEFAULT: {
- foreach (const QString &term, query.wordList) {
- QCLuceneQuery *query = QCLuceneQueryParser::parse(term.toLower(),
- QLatin1String("content"), analyzer);
-
- if (query) {
- retVal = true;
- booleanQuery.add(query, true, false, false);
- }
- }
- } break;
+ bool queryIsValid = false;
+ foreach (const QString &term, query.wordList) {
+ if (!term.isEmpty()) {
+ QCLuceneQuery *lQuery =
+ QCLuceneQueryParser::parse(term, fieldName, analyzer);
+ if (lQuery) {
+ booleanQuery.add(lQuery, true, false, false);
+ queryIsValid = true;
+ }
}
}
- return retVal;
+ return queryIsValid;
+}
+
+bool QHelpSearchIndexReaderClucene::addAttributesQuery(
+ const QStringList &filterAttributes, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer)
+{
+ QCLuceneQuery* lQuery = QCLuceneQueryParser::parse(QLatin1String("+")
+ + filterAttributes.join(QLatin1String(" +")), AttributeField, analyzer);
+ if (!lQuery)
+ return false;
+ booleanQuery.add(lQuery, true, true, false);
+ return true;
}
void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine,
@@ -336,21 +424,22 @@ void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engin
QCLuceneStandardAnalyzer analyzer;
QCLuceneQuery *parsedQuery = QCLuceneQueryParser::parse(
- joinedQuery, QLatin1String("content"), analyzer);
+ joinedQuery, ContentField, analyzer);
if (parsedQuery) {
joinedQuery = parsedQuery->toString();
delete parsedQuery;
}
- int length = QString(QLatin1String("content:")).length();
- int index = joinedQuery.indexOf(QLatin1String("content:"));
+ const QString contentString(ContentField + QLatin1String(":"));
+ int length = contentString.length();
+ int index = joinedQuery.indexOf(contentString);
QString term;
int nextIndex = 0;
QStringList searchTerms;
while (index != -1) {
- nextIndex = joinedQuery.indexOf(QLatin1String("content:"), index + 1);
+ nextIndex = joinedQuery.indexOf(contentString, index + 1);
term = joinedQuery.mid(index + length, nextIndex - (length + index)).simplified();
if (term.startsWith(QLatin1String("\""))
&& term.endsWith(QLatin1String("\""))) {
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
index d7b539a..608668f 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene_p.h
@@ -53,16 +53,19 @@
// We mean it.
//
-#include "qhelpsearchindexreader_p.h"
+#include <QtCore/QList>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
#include "fulltextsearch/qanalyzer_p.h"
#include "fulltextsearch/qquery_p.h"
+#include "qhelpsearchindexreader_p.h"
QT_BEGIN_NAMESPACE
namespace qt {
- namespace fulltextsearch {
- namespace clucene {
+namespace fulltextsearch {
+namespace clucene {
class QHelpSearchIndexReaderClucene : public QHelpSearchIndexReader
{
@@ -74,18 +77,38 @@ public:
private:
void run();
- bool defaultQuery(const QString &term, QCLuceneBooleanQuery &booleanQuery,
- QCLuceneStandardAnalyzer &analyzer);
- bool buildQuery(QCLuceneBooleanQuery &booleanQuery, const QList<QHelpSearchQuery> &queryList,
- QCLuceneStandardAnalyzer &analyzer);
- bool buildTryHarderQuery(QCLuceneBooleanQuery &booleanQuery,
- const QList<QHelpSearchQuery> &queryList, QCLuceneStandardAnalyzer &analyzer);
void boostSearchHits(const QHelpEngineCore &engine, QList<QHelpSearchEngine::SearchHit> &hitList,
const QList<QHelpSearchQuery> &queryList);
+ bool buildQuery(const QList<QHelpSearchQuery> &queries,
+ const QString &fieldName,
+ const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool buildTryHarderQuery(const QList<QHelpSearchQuery> &queries,
+ const QString &fieldName,
+ const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool addFuzzyQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool addWithoutQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addPhraseQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addAllQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery);
+ bool addDefaultQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ bool allTermsRequired, QCLuceneBooleanQuery &booleanQuery,
+ QCLuceneAnalyzer &analyzer);
+ bool addAtLeastQuery(const QHelpSearchQuery &query, const QString &fieldName,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool addAttributesQuery(const QStringList &filterAttributes,
+ QCLuceneBooleanQuery &booleanQuery, QCLuceneAnalyzer &analyzer);
+ bool isNegativeQuery(const QHelpSearchQuery &query) const;
};
- } // namespace clucene
- } // namespace fulltextsearch
+} // namespace clucene
+} // namespace fulltextsearch
} // namespace qt
QT_END_NAMESPACE
diff --git a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
index ab32537..f23efa5 100644
--- a/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexwriter_clucene.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include "qclucenefieldnames_p.h"
#include "qhelpenginecore.h"
#include "qhelp_global.h"
#include "fulltextsearch/qhits_p.h"
@@ -407,17 +408,17 @@ public:
QString parsedTitle = QHelpGlobal::documentTitle(data);
if(!parsedData.isEmpty()) {
- document->add(new QCLuceneField(QLatin1String("content"),
+ document->add(new QCLuceneField(ContentField,
parsedData,QCLuceneField::INDEX_TOKENIZED));
- document->add(new QCLuceneField(QLatin1String("path"), fileName,
+ document->add(new QCLuceneField(PathField, fileName,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("title"), parsedTitle,
+ document->add(new QCLuceneField(TitleField, parsedTitle,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("titleTokenized"), parsedTitle,
+ document->add(new QCLuceneField(TitleTokenizedField, parsedTitle,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_TOKENIZED));
- document->add(new QCLuceneField(QLatin1String("namespace"), namespaceName,
+ document->add(new QCLuceneField(NamespaceField, namespaceName,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_UNTOKENIZED));
- document->add(new QCLuceneField(QLatin1String("attribute"), attributes,
+ document->add(new QCLuceneField(AttributeField, attributes,
QCLuceneField::STORE_YES | QCLuceneField::INDEX_TOKENIZED));
return true;
}
@@ -712,9 +713,7 @@ void QHelpSearchIndexWriter::run()
if (indexMap.contains(namespaceName)) {
// make sure we really have content indexed for namespace
- // NOTE: Extra variable just for GCC 3.3.5
- QLatin1String key("namespace");
- QCLuceneTermQuery query(QCLuceneTerm(key, namespaceName));
+ QCLuceneTermQuery query(QCLuceneTerm(NamespaceField, namespaceName));
QCLuceneIndexSearcher indexSearcher(indexPath);
QCLuceneHits hits = indexSearcher.search(query);
if (hits.length() <= 0)
@@ -857,8 +856,7 @@ void QHelpSearchIndexWriter::removeDocuments(const QString &indexPath,
return;
QCLuceneIndexReader reader = QCLuceneIndexReader::open(indexPath);
- reader.deleteDocuments(QCLuceneTerm(QLatin1String("namespace"),
- namespaceName));
+ reader.deleteDocuments(QCLuceneTerm(NamespaceField, namespaceName));
reader.close();
}
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index f2f40ec..10d5470 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -120,33 +120,6 @@ private:
// nothing todo
}
- QString escapeString(const QString &text)
- {
- QString retValue = text;
- const QString escape(QLatin1String("\\"));
- QStringList escapableCharsList;
- escapableCharsList << QLatin1String("\\") << QLatin1String("+")
- << QLatin1String("-") << QLatin1String("!") << QLatin1String("(")
- << QLatin1String(")") << QLatin1String(":") << QLatin1String("^")
- << QLatin1String("[") << QLatin1String("]") << QLatin1String("{")
- << QLatin1String("}") << QLatin1String("~");
-
- // make sure we won't end up with an empty string
- foreach (const QString escapeChar, escapableCharsList) {
- if (retValue.contains(escapeChar))
- retValue.replace(escapeChar, QLatin1String(""));
- }
- if (retValue.trimmed().isEmpty())
- return retValue;
-
- retValue = text; // now realy escape the string...
- foreach (const QString escapeChar, escapableCharsList) {
- if (retValue.contains(escapeChar))
- retValue.replace(escapeChar, escape + escapeChar);
- }
- return retValue;
- }
-
QStringList buildTermList(const QString query)
{
bool s = false;
@@ -295,14 +268,14 @@ private slots:
#else
if (defaultQuery->isEnabled()) {
queryList.append(QHelpSearchQuery(QHelpSearchQuery::DEFAULT,
- buildTermList(escapeString(defaultQuery->text()))));
+ buildTermList(defaultQuery->text())));
} else {
const QRegExp exp(QLatin1String("\\s+"));
QStringList lst = similarQuery->text().split(exp, QString::SkipEmptyParts);
if (!lst.isEmpty()) {
QStringList fuzzy;
foreach (const QString term, lst)
- fuzzy += buildTermList(escapeString(term));
+ fuzzy += buildTermList(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::FUZZY, fuzzy));
}
@@ -310,13 +283,13 @@ private slots:
if (!lst.isEmpty()) {
QStringList without;
foreach (const QString term, lst)
- without.append(escapeString(term));
+ without.append(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::WITHOUT, without));
}
if (!exactQuery->text().isEmpty()) {
QString phrase = exactQuery->text().remove(QLatin1Char('\"'));
- phrase = escapeString(phrase.simplified());
+ phrase = phrase.simplified();
queryList.append(QHelpSearchQuery(QHelpSearchQuery::PHRASE, QStringList(phrase)));
}
@@ -324,7 +297,7 @@ private slots:
if (!lst.isEmpty()) {
QStringList all;
foreach (const QString term, lst)
- all.append(escapeString(term));
+ all.append(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ALL, all));
}
@@ -332,7 +305,7 @@ private slots:
if (!lst.isEmpty()) {
QStringList atLeast;
foreach (const QString term, lst)
- atLeast += buildTermList(escapeString(term));
+ atLeast += buildTermList(term);
queryList.append(QHelpSearchQuery(QHelpSearchQuery::ATLEAST, atLeast));
}
}
diff --git a/tools/assistant/tools/assistant/assistant.pro b/tools/assistant/tools/assistant/assistant.pro
index 1a7e874..4b69060 100644
--- a/tools/assistant/tools/assistant/assistant.pro
+++ b/tools/assistant/tools/assistant/assistant.pro
@@ -36,7 +36,8 @@ HEADERS += helpviewer.h \
remotecontrol.h \
cmdlineparser.h \
aboutdialog.h \
- qtdocinstaller.h
+ qtdocinstaller.h \
+ xbelsupport.h
win32 {
HEADERS += remotecontrol_win.h
@@ -57,7 +58,8 @@ SOURCES += helpviewer.cpp \
remotecontrol.cpp \
cmdlineparser.cpp \
aboutdialog.cpp \
- qtdocinstaller.cpp
+ qtdocinstaller.cpp \
+ xbelsupport.cpp
FORMS += topicchooser.ui \
preferencesdialog.ui \
diff --git a/tools/assistant/tools/assistant/assistant.qch b/tools/assistant/tools/assistant/assistant.qch
index 78fe9f3..e6d5299 100644
--- a/tools/assistant/tools/assistant/assistant.qch
+++ b/tools/assistant/tools/assistant/assistant.qch
Binary files differ
diff --git a/tools/assistant/tools/assistant/assistant_images.qrc b/tools/assistant/tools/assistant/assistant_images.qrc
index 58e03b5..34918c0 100644
--- a/tools/assistant/tools/assistant/assistant_images.qrc
+++ b/tools/assistant/tools/assistant/assistant_images.qrc
@@ -4,6 +4,7 @@
<file>images/assistant-128.png</file>
<file>images/assistant.png</file>
<file>images/wrap.png</file>
+ <file>images/bookmark.png</file>
#mac
<file>images/mac/addtab.png</file>
<file>images/mac/book.png</file>
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index 511a56e..7c7029a 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -150,8 +150,8 @@ void BookmarkDialog::addNewFolder()
const QString &name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
+ renameFolder(index, newFolder);
}
- ui.treeView->setFocus();
}
void BookmarkDialog::toolButtonClicked()
@@ -243,14 +243,19 @@ void BookmarkDialog::customContextMenuRequested(const QPoint &point)
if (index.isValid())
name = index.data().toString();
ui.bookmarkFolders->setCurrentIndex(ui.bookmarkFolders->findText(name));
+ } else if (picked == renameItem) {
+ renameFolder(index, proxyIndex);
}
- else if (picked == renameItem) {
- BookmarkModel *model = bookmarkManager->treeBookmarkModel();
- if (QStandardItem *item = model->itemFromIndex(proxyIndex)) {
- item->setEditable(true);
- ui.treeView->edit(index);
- item->setEditable(false);
- }
+}
+
+void BookmarkDialog::renameFolder(const QModelIndex &index,
+ const QModelIndex &proxyIndex)
+{
+ const BookmarkModel * const model = bookmarkManager->treeBookmarkModel();
+ if (QStandardItem *item = model->itemFromIndex(proxyIndex)) {
+ item->setEditable(true);
+ ui.treeView->edit(index);
+ item->setEditable(false);
}
}
@@ -301,7 +306,7 @@ bool BookmarkDialog::eventFilter(QObject *object, QEvent *e)
}
-// #pragma mark -- BookmarkWidget
+// BookmarkWidget
BookmarkWidget::BookmarkWidget(BookmarkManager *manager, QWidget *parent,
@@ -587,7 +592,7 @@ bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
}
-// #pragma mark -- BookmarkModel
+// BookmarkModel
BookmarkModel::BookmarkModel(int rows, int columns, QObject *parent)
@@ -615,7 +620,7 @@ Qt::ItemFlags BookmarkModel::flags(const QModelIndex &index) const
}
-// #pragma mark -- BookmarkManager
+// BookmarkManager
BookmarkManager::BookmarkManager(QHelpEngineCore *_helpEngine)
@@ -625,6 +630,7 @@ BookmarkManager::BookmarkManager(QHelpEngineCore *_helpEngine)
, helpEngine(_helpEngine)
{
folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
+ bookmarkIcon = QIcon(QLatin1String(":/trolltech/assistant/images/bookmark.png"));
connect(treeModel, SIGNAL(itemChanged(QStandardItem*)), this,
SLOT(itemChanged(QStandardItem*)));
@@ -734,6 +740,7 @@ void BookmarkManager::addNewBookmark(const QModelIndex &index,
{
QStandardItem *item = new QStandardItem(name);
item->setEditable(false);
+ item->setIcon(bookmarkIcon);
item->setData(false, Qt::UserRole + 11);
item->setData(url, Qt::UserRole + 10);
@@ -833,10 +840,12 @@ void BookmarkManager::setupBookmarkModels()
}
}
- if (type == QLatin1String("Folder"))
- item->setIcon(folderIcon);
- else
+ if (type != QLatin1String("Folder")) {
+ item->setIcon(bookmarkIcon);
listModel->appendRow(item->clone());
+ } else {
+ item->setIcon(folderIcon);
+ }
}
}
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.h b/tools/assistant/tools/assistant/bookmarkmanager.h
index aba7da0..c6be134 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.h
+++ b/tools/assistant/tools/assistant/bookmarkmanager.h
@@ -90,6 +90,7 @@ private slots:
private:
bool eventFilter(QObject *object, QEvent *e);
+ void renameFolder(const QModelIndex &index, const QModelIndex &proxyIndex);
private:
QString m_url;
@@ -202,6 +203,7 @@ private:
private:
QString oldText;
QIcon folderIcon;
+ QIcon bookmarkIcon;
BookmarkModel *treeModel;
BookmarkModel *listModel;
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index 67d803d..b708343 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -550,18 +550,17 @@ void CentralWidget::print()
initPrinter();
- QPrintDialog *dlg = new QPrintDialog(printer, this);
+ QPrintDialog dlg(printer, this);
#if defined(QT_NO_WEBKIT)
if (viewer->textCursor().hasSelection())
- dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintSelection);
#endif
- dlg->addEnabledOption(QAbstractPrintDialog::PrintPageRange);
- dlg->addEnabledOption(QAbstractPrintDialog::PrintCollateCopies);
- dlg->setWindowTitle(tr("Print Document"));
- if (dlg->exec() == QDialog::Accepted) {
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintPageRange);
+ dlg.addEnabledOption(QAbstractPrintDialog::PrintCollateCopies);
+ dlg.setWindowTitle(tr("Print Document"));
+ if (dlg.exec() == QDialog::Accepted) {
viewer->print(printer);
}
- delete dlg;
#endif
}
diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf
index 161d34f..08f8e28 100644
--- a/tools/assistant/tools/assistant/doc/assistant.qdocconf
+++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf
@@ -12,5 +12,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\">Trademarks</td>\n" \
- "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.6.0</div></td>\n" \
+ "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.0</div></td>\n" \
"</tr></table></div></address>"
diff --git a/tools/assistant/tools/assistant/images/bookmark.png b/tools/assistant/tools/assistant/images/bookmark.png
new file mode 100644
index 0000000..57e57e3
--- /dev/null
+++ b/tools/assistant/tools/assistant/images/bookmark.png
Binary files differ
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 12bc5b1..2df7a6b 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -66,6 +66,8 @@ QT_USE_NAMESPACE
Q_IMPORT_PLUGIN(qsqlite)
#endif
+namespace {
+
void
updateLastPagesOnUnregister(QHelpEngineCore& helpEngine, const QString& nsName)
{
@@ -187,6 +189,8 @@ QString indexFilesFolder(const QString &collectionFile)
return indexFilesFolder;
}
+} // Anonymous namespace.
+
int main(int argc, char *argv[])
{
// First do a quick search for arguments that imply command-line mode.
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index c56e7e4..4b75387 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -52,6 +52,7 @@
#include "aboutdialog.h"
#include "searchwidget.h"
#include "qtdocinstaller.h"
+#include "xbelsupport.h"
#include <QtCore/QDir>
#include <QtCore/QTimer>
@@ -76,6 +77,7 @@
#include <QtGui/QProgressBar>
#include <QtGui/QDesktopServices>
#include <QtGui/QToolButton>
+#include <QtGui/QFileDialog>
#include <QtHelp/QHelpEngine>
#include <QtHelp/QHelpSearchEngine>
@@ -374,13 +376,17 @@ void MainWindow::checkInitState()
void MainWindow::updateBookmarkMenu()
{
if (m_bookmarkManager) {
+ m_bookmarkMenu->removeAction(m_importBookmarkAction);
+ m_bookmarkMenu->removeAction(m_exportBookmarkAction);
m_bookmarkMenu->removeAction(m_bookmarkMenuAction);
-
+
m_bookmarkMenu->clear();
-
+
+ m_bookmarkMenu->addAction(m_importBookmarkAction);
+ m_bookmarkMenu->addAction(m_exportBookmarkAction);
m_bookmarkMenu->addAction(m_bookmarkMenuAction);
m_bookmarkMenu->addSeparator();
-
+
m_bookmarkManager->fillBookmarkMenu(m_bookmarkMenu);
}
}
@@ -437,8 +443,12 @@ void MainWindow::setupActions()
m_closeTabAction->setShortcuts(QKeySequence::Close);
QAction *tmp = menu->addAction(tr("&Quit"), this, SLOT(close()));
- tmp->setShortcut(QKeySequence::Quit);
tmp->setMenuRole(QAction::QuitRole);
+#ifdef Q_OS_WIN
+ tmp->setShortcut(QKeySequence(tr("CTRL+Q")));
+#else
+ tmp->setShortcut(QKeySequence::Quit);
+#endif
menu = menuBar()->addMenu(tr("&Edit"));
m_copyAction = menu->addAction(tr("&Copy selected Text"), m_centralWidget,
@@ -529,6 +539,10 @@ void MainWindow::setupActions()
<< QKeySequence(Qt::CTRL + Qt::Key_PageUp));
m_bookmarkMenu = menuBar()->addMenu(tr("&Bookmarks"));
+ m_importBookmarkAction = m_bookmarkMenu->addAction(tr("Import..."),
+ this, SLOT(importBookmarks()));
+ m_exportBookmarkAction = m_bookmarkMenu->addAction(tr("Export..."),
+ this, SLOT(exportBookmarks()));
m_bookmarkMenuAction = m_bookmarkMenu->addAction(tr("Add Bookmark..."),
this, SLOT(addBookmark()));
m_bookmarkMenuAction->setShortcut(tr("CTRL+D"));
@@ -1035,6 +1049,41 @@ QString MainWindow::defaultHelpCollectionFileName()
arg(QLatin1String(QT_VERSION_STR));
}
+void MainWindow::importBookmarks()
+{
+ const QString &fileName = QFileDialog::getOpenFileName(0, tr("Open File"),
+ QDir::currentPath(), tr("Files (*.xbel)"));
+
+ if (fileName.isEmpty())
+ return;
+
+ QFile file(fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ XbelReader reader(m_bookmarkManager->treeBookmarkModel(),
+ m_bookmarkManager->listBookmarkModel());
+ reader.readFromFile(&file);
+ }
+}
+
+void MainWindow::exportBookmarks()
+{
+ QString fileName = QFileDialog::getSaveFileName(0, tr("Save File"),
+ "untitled.xbel", tr("Files (*.xbel)"));
+
+ QLatin1String suffix(".xbel");
+ if (!fileName.endsWith(suffix))
+ fileName.append(suffix);
+
+ QFile file(fileName);
+ if (file.open(QIODevice::WriteOnly)) {
+ XbelWriter writer(m_bookmarkManager->treeBookmarkModel());
+ writer.writeToFile(&file);
+ } else {
+ QMessageBox::information(this, tr("Qt Assistant"),
+ tr("Unable to save bookmarks."), tr("OK"));
+ }
+}
+
void MainWindow::currentFilterChanged(const QString &filter)
{
const int index = m_filterCombo->findText(filter);
diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h
index 7559fe4..3ab9403 100644
--- a/tools/assistant/tools/assistant/mainwindow.h
+++ b/tools/assistant/tools/assistant/mainwindow.h
@@ -123,6 +123,9 @@ private slots:
void updateBookmarkMenu();
void showBookmark(QAction *action);
+ void importBookmarks();
+ void exportBookmarks();
+
private:
bool initHelpDB();
void setupActions();
@@ -163,6 +166,8 @@ private:
QMenu *m_toolBarMenu;
QMenu *m_bookmarkMenu;
QAction *m_bookmarkMenuAction;
+ QAction *m_importBookmarkAction;
+ QAction *m_exportBookmarkAction;
CmdLineParser *m_cmdLine;
diff --git a/tools/assistant/tools/assistant/xbelsupport.cpp b/tools/assistant/tools/assistant/xbelsupport.cpp
new file mode 100644
index 0000000..545be6c
--- /dev/null
+++ b/tools/assistant/tools/assistant/xbelsupport.cpp
@@ -0,0 +1,234 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Assistant of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "xbelsupport.h"
+#include "bookmarkmanager.h"
+
+#include <QtCore/QCoreApplication>
+
+struct Bookmark {
+ QString title;
+ QString url;
+ bool folded;
+};
+
+XbelWriter::XbelWriter(BookmarkModel *model)
+ : QXmlStreamWriter()
+ , treeModel(model)
+{
+ setAutoFormatting(true);
+}
+
+void XbelWriter::writeToFile(QIODevice *device)
+{
+ setDevice(device);
+
+ writeStartDocument();
+ writeDTD(QLatin1String("<!DOCTYPE xbel>"));
+ writeStartElement(QLatin1String("xbel"));
+ writeAttribute(QLatin1String("version"), QLatin1String("1.0"));
+
+ QStandardItem *root = treeModel->invisibleRootItem();
+ for (int i = 0; i < root->rowCount(); ++i)
+ writeData(root->child(i));
+
+ writeEndDocument();
+}
+
+void XbelWriter::writeData(QStandardItem *child)
+{
+ Bookmark entry;
+ entry.title = child->data(Qt::DisplayRole).toString();
+ entry.url = child->data(Qt::UserRole + 10).toString();
+
+ if (entry.url == QLatin1String("Folder")) {
+ writeStartElement(QLatin1String("folder"));
+
+ entry.folded = !child->data(Qt::UserRole + 11).toBool();
+ writeAttribute(QLatin1String("folded"),
+ entry.folded ? QLatin1String("yes") : QLatin1String("no"));
+
+ writeTextElement(QLatin1String("title"), entry.title);
+
+ for (int i = 0; i < child->rowCount(); ++i)
+ writeData(child->child(i));
+
+ writeEndElement();
+ } else {
+ writeStartElement(QLatin1String("bookmark"));
+ writeAttribute(QLatin1String("href"), entry.url);
+ writeTextElement(QLatin1String("title"), entry.title);
+ writeEndElement();
+ }
+}
+
+
+// XbelReader
+
+
+XbelReader::XbelReader(BookmarkModel *tree, BookmarkModel *list)
+ : QXmlStreamReader()
+ , treeModel(tree)
+ , listModel(list)
+{
+ folderIcon = QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon);
+ bookmarkIcon = QIcon(QLatin1String(":/trolltech/assistant/images/bookmark.png"));
+}
+
+bool XbelReader::readFromFile(QIODevice *device)
+{
+ setDevice(device);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("xbel")
+ && attributes().value(QLatin1String("version"))
+ == QLatin1String("1.0")) {
+ readXBEL();
+ } else {
+ raiseError(QLatin1String("The file is not an XBEL version 1.0 file."));
+ }
+ }
+ }
+
+ return !error();
+}
+
+void XbelReader::readXBEL()
+{
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("folder"))
+ readFolder(0);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmark(0);
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readUnknownElement()
+{
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement())
+ readUnknownElement();
+ }
+}
+
+void XbelReader::readFolder(QStandardItem *item)
+{
+ QStandardItem *folder = createChildItem(item);
+ folder->setIcon(folderIcon);
+ folder->setData(QLatin1String("Folder"), Qt::UserRole + 10);
+
+ bool expanded =
+ (attributes().value(QLatin1String("folded")) != QLatin1String("no"));
+ folder->setData(expanded, Qt::UserRole + 11);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title"))
+ folder->setText(readElementText());
+ else if (name() == QLatin1String("folder"))
+ readFolder(folder);
+ else if (name() == QLatin1String("bookmark"))
+ readBookmark(folder);
+ else
+ readUnknownElement();
+ }
+ }
+}
+
+void XbelReader::readBookmark(QStandardItem *item)
+{
+ QStandardItem *bookmark = createChildItem(item);
+ bookmark->setIcon(bookmarkIcon);
+ bookmark->setText(QCoreApplication::tr("Unknown title"));
+ bookmark->setData(attributes().value(QLatin1String("href")).toString(),
+ Qt::UserRole + 10);
+
+ while (!atEnd()) {
+ readNext();
+
+ if (isEndElement())
+ break;
+
+ if (isStartElement()) {
+ if (name() == QLatin1String("title"))
+ bookmark->setText(readElementText());
+ else
+ readUnknownElement();
+ }
+ }
+
+ listModel->appendRow(bookmark->clone());
+}
+
+QStandardItem *XbelReader::createChildItem(QStandardItem *item)
+{
+ QStandardItem *childItem = new QStandardItem();
+ childItem->setEditable(false);
+
+ if (item)
+ item->appendRow(childItem);
+ else
+ treeModel->appendRow(childItem);
+
+ return childItem;
+}
diff --git a/tools/assistant/compat/fontsettingsdialog.h b/tools/assistant/tools/assistant/xbelsupport.h
index dcde057..177b04b 100644
--- a/tools/assistant/compat/fontsettingsdialog.h
+++ b/tools/assistant/tools/assistant/xbelsupport.h
@@ -39,39 +39,49 @@
**
****************************************************************************/
-#ifndef _FONT_SETTINGS_DIALOG_H_
-#define _FONT_SETTINGS_DIALOG_H_
+#ifndef XBELSUPPORT_H
+#define XBELSUPPORT_H
-#include <QtCore/QObject>
-#include <QtGui/QDialog>
+#include <QtGui/QIcon>
+#include <QtXml/QXmlStreamReader>
-QT_BEGIN_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QIODevice)
+QT_FORWARD_DECLARE_CLASS(QStandardItem)
-class FontPanel;
-struct FontSettings;
-class QDialogButtonBox;
+class BookmarkModel;
-class FontSettingsDialog : public QDialog
+class XbelWriter : public QXmlStreamWriter
{
- Q_OBJECT
-
public:
- FontSettingsDialog(QWidget *parent = 0);
- ~FontSettingsDialog();
-
- bool showDialog(FontSettings *settings);
+ XbelWriter(BookmarkModel *model);
+ void writeToFile(QIODevice *device);
private:
- void updateFontSettings(FontSettings *settings);
- void setupFontSettingsDialog(const FontSettings *settings);
-
+ void writeData(QStandardItem *item);
+
private:
- FontPanel *m_windowFontPanel;
- FontPanel *m_browserFontPanel;
- QDialogButtonBox *m_dialogButtonBox;
+ BookmarkModel *treeModel;
};
-#endif // _FONT_SETTINGS_DIALOG_H_
+class XbelReader : public QXmlStreamReader
+{
+public:
+ XbelReader(BookmarkModel *tree, BookmarkModel *list);
+ bool readFromFile(QIODevice *device);
+
+private:
+ void readXBEL();
+ void readUnknownElement();
+ void readFolder(QStandardItem *item);
+ void readBookmark(QStandardItem *item);
+ QStandardItem* createChildItem(QStandardItem *item);
+private:
+ QIcon folderIcon;
+ QIcon bookmarkIcon;
+
+ BookmarkModel *treeModel;
+ BookmarkModel *listModel;
+};
-QT_END_NAMESPACE
+#endif // XBELSUPPORT_H
diff --git a/tools/assistant/tools/qcollectiongenerator/main.cpp b/tools/assistant/tools/qcollectiongenerator/main.cpp
index 18a59d1..a2df6ab 100644
--- a/tools/assistant/tools/qcollectiongenerator/main.cpp
+++ b/tools/assistant/tools/qcollectiongenerator/main.cpp
@@ -322,6 +322,14 @@ void CollectionConfigReader::readRegister()
}
}
+namespace {
+ QString absoluteFileName(const QString &basePath, const QString &fileName)
+ {
+ return QFileInfo(fileName).isAbsolute() ?
+ fileName : basePath + QDir::separator() + fileName;
+ }
+}
+
int main(int argc, char *argv[])
{
QString error;
@@ -403,13 +411,13 @@ int main(int argc, char *argv[])
while (it != config.filesToGenerate().constEnd()) {
fprintf(stdout, "Generating help for %s...\n", qPrintable(it.key()));
QHelpProjectData helpData;
- if (!helpData.readData(basePath + QDir::separator() + it.key())) {
+ if (!helpData.readData(absoluteFileName(basePath, it.key()))) {
fprintf(stderr, "%s\n", qPrintable(helpData.errorMessage()));
return -1;
}
HelpGenerator helpGenerator;
- if (!helpGenerator.generate(&helpData, basePath + QDir::separator() + it.value())) {
+ if (!helpGenerator.generate(&helpData, absoluteFileName(basePath, it.value()))) {
fprintf(stderr, "%s\n", qPrintable(helpGenerator.error()));
return -1;
}
@@ -433,7 +441,7 @@ int main(int argc, char *argv[])
}
foreach (const QString &file, config.filesToRegister()) {
- if (!helpEngine.registerDocumentation(basePath + QDir::separator() + file)) {
+ if (!helpEngine.registerDocumentation(absoluteFileName(basePath, file))) {
fprintf(stderr, "%s\n", qPrintable(helpEngine.error()));
return -1;
}
@@ -470,7 +478,7 @@ int main(int argc, char *argv[])
QDateTime::currentDateTime().toTime_t());
if (!config.applicationIcon().isEmpty()) {
- QFile icon(basePath + QDir::separator() + config.applicationIcon());
+ QFile icon(absoluteFileName(basePath, config.applicationIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
return -1;
@@ -491,7 +499,7 @@ int main(int argc, char *argv[])
}
if (!config.aboutIcon().isEmpty()) {
- QFile icon(basePath + QDir::separator() + config.aboutIcon());
+ QFile icon(absoluteFileName(basePath, config.aboutIcon()));
if (!icon.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(icon.fileName()));
return -1;
@@ -512,7 +520,7 @@ int main(int argc, char *argv[])
while (it != config.aboutTextFiles().constEnd()) {
s << it.key();
- QFileInfo fi(basePath + QDir::separator() + it.value());
+ QFileInfo fi(absoluteFileName(basePath, it.value()));
QFile f(fi.absoluteFilePath());
if (!f.open(QIODevice::ReadOnly)) {
fprintf(stderr, "Cannot open %s!\n", qPrintable(f.fileName()));
diff --git a/tools/assistant/translations/translations_adp.pro b/tools/assistant/translations/translations_adp.pro
deleted file mode 100644
index f8da2e3..0000000
--- a/tools/assistant/translations/translations_adp.pro
+++ /dev/null
@@ -1,41 +0,0 @@
-# Include those manually as they do not contain any directory specification
-
-FORMS += ../compat/helpdialog.ui \
- ../compat/mainwindow.ui \
- ../compat/tabbedbrowser.ui \
- ../compat/topicchooser.ui
-
-SOURCES += ../compat/main.cpp \
- ../compat/helpwindow.cpp \
- ../compat/topicchooser.cpp \
- ../compat/docuparser.cpp \
- ../compat/index.cpp \
- ../compat/profile.cpp \
- ../compat/config.cpp \
- ../compat/helpdialog.cpp \
- ../compat/mainwindow.cpp \
- ../compat/tabbedbrowser.cpp \
- ../compat/fontsettingsdialog.cpp
-
-SOURCES += ../../shared/fontpanel/fontpanel.cpp
-
-HEADERS += ../compat/helpwindow.h \
- ../compat/topicchooser.h \
- ../compat/docuparser.h \
- ../compat/index.h \
- ../compat/profile.h \
- ../compat/helpdialog.h \
- ../compat/mainwindow.h \
- ../compat/tabbedbrowser.h \
- ../compat/config.h \
- ../compat/fontsettingsdialog.h
-
-
-TR_DIR = $$PWD/../../../translations
-TRANSLATIONS = \
- $$TR_DIR/assistant_adp_de.ts \
- $$TR_DIR/assistant_adp_ja.ts \
- $$TR_DIR/assistant_adp_pl.ts \
- $$TR_DIR/assistant_adp_ru.ts \
- $$TR_DIR/assistant_adp_zh_CN.ts \
- $$TR_DIR/assistant_adp_zh_TW.ts
diff --git a/tools/porting/src/q3porting.xml b/tools/porting/src/q3porting.xml
index 3a2701c..1eb5f34 100644
--- a/tools/porting/src/q3porting.xml
+++ b/tools/porting/src/q3porting.xml
@@ -1626,10 +1626,6 @@
<Name>Q3Wizard</Name>
</item>
<item Type="Qt4Class" >
- <Library>QtAssistant</Library>
- <Name>QAssistantClient</Name>
- </item>
- <item Type="Qt4Class" >
<Library>QtCore</Library>
<Name>QAbstractEventDispatcher</Name>
</item>
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index c07be8b..53a2a99 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -879,6 +879,7 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
static QRegExp globalX("[\n{()=] *([a-zA-Z_][a-zA-Z_0-9]*)[ \n]*\\(");
static QRegExp multiLineComment("/(?:( )?\\*(?:[^*]+|\\*(?! /))*\\*\\1/)");
multiLineComment.setMinimal(true);
+ static QRegExp singleLineCommentLine("(?:^|\n)(?:[^&]|&(?!quot;)|&quot;(?:[^&\\\\]|&(?!quot;)|\\\\&quot;|\\\\(?!&quot;))*&quot;)*//(?!!)[^!\n]*");
static QRegExp singleLineComment("//(?!!)[^!\n]*");
static QRegExp preprocessor("(?:^|\n)(#[ \t]*(?:include|if|elif|endif|error|pragma|define"
"|warning)(?:(?:\\\\\n|\\n#)[^\n]*)*)");
@@ -1054,7 +1055,8 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
int mlpos;
int slpos;
int len;
- slpos = singleLineComment.indexIn(result, pos);
+ int sllpos = singleLineCommentLine.indexIn(result, pos);
+ slpos = sllpos == -1 ? -1 : singleLineComment.indexIn(result, sllpos);
mlpos = multiLineComment.indexIn(result, pos);
if (slpos == -1 && mlpos == -1)
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 4ddc94a..63455f1 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Assistant
description = Qt Assistant Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Assistant
qhp.Assistant.file = assistant.qhp
-qhp.Assistant.namespace = com.trolltech.assistant.460
+qhp.Assistant.namespace = com.trolltech.assistant.470
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
qhp.Assistant.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Assistant.filterAttributes = qt 4.6.0 tools assistant
+qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant
qhp.Assistant.subprojects = manual examples
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index 9d8bd23..b0c88f1 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Designer
description = Qt Designer Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Designer
qhp.Designer.file = designer.qhp
-qhp.Designer.namespace = com.trolltech.designer.460
+qhp.Designer.namespace = com.trolltech.designer.470
qhp.Designer.virtualFolder = qdoc
qhp.Designer.indexTitle = Qt Designer Manual
qhp.Designer.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Designer.filterAttributes = qt 4.6.0 tools designer
+qhp.Designer.filterAttributes = qt 4.7.0 tools designer
qhp.Designer.customFilters.Designer.name = Qt Designer Manual
qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer
qhp.Designer.subprojects = manual examples
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index f433529..6acd2c6 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = Qt Linguist
description = Qt Linguist Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Linguist
qhp.Linguist.file = linguist.qhp
-qhp.Linguist.namespace = com.trolltech.linguist.460
+qhp.Linguist.namespace = com.trolltech.linguist.470
qhp.Linguist.virtualFolder = qdoc
qhp.Linguist.indexTitle = Qt Linguist Manual
qhp.Linguist.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.Linguist.filterAttributes = qt 4.6.0 tools linguist
+qhp.Linguist.filterAttributes = qt 4.7.0 tools linguist
qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual
qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist
qhp.Linguist.subprojects = manual examples
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index dcb3c9a..76e7012 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -6,18 +6,18 @@ include(qt-defines.qdocconf)
project = QMake
description = QMake Manual
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = qmake
qhp.qmake.file = qmake.qhp
-qhp.qmake.namespace = com.trolltech.qmake.460
+qhp.qmake.namespace = com.trolltech.qmake.470
qhp.qmake.virtualFolder = qdoc
qhp.qmake.indexTitle = QMake Manual
qhp.qmake.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png
-qhp.qmake.filterAttributes = qt 4.6.0 tools qmake
+qhp.qmake.filterAttributes = qt 4.7.0 tools qmake
qhp.qmake.customFilters.qmake.name = qmake Manual
qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake
qhp.qmake.subprojects = manual
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index d1733e5..0251462 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -6,19 +6,19 @@ include(qt-defines.qdocconf)
project = Qt
description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
- QAxServer QtUiTools QtTest QtDBus
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql \
+ QtSvg QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
+ QtDesigner QAxContainer Phonon QAxServer QtUiTools \
+ QtTest QtDBus
edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.460
+qhp.Qt.namespace = com.trolltech.qt.470
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -32,9 +32,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.6.0 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.6.0
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.0
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
index d70ef58..a1c6b6b 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -8,11 +8,11 @@ project = Qt
versionsym =
version = %VERSION%
description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.6
+url = http://qt.nokia.com/doc/4.7
-edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg \
- QtWebKit QtXml QtXmlPatterns Qt3Support QtHelp \
- QtDesigner QtAssistant QAxContainer Phonon \
+edition.Desktop.modules = QtCore QtDBus QtGui QtNetwork QtOpenGL QtScript \
+ QtScriptTools QtSql QtSvg QtWebKit QtXml QtXmlPatterns \
+ Qt3Support QtHelp QtDesigner QAxContainer Phonon \
QAxServer QtUiTools QtTest QtDBus
edition.DesktopLight.modules = QtCore QtDBus QtGui Qt3SupportLight QtTest
edition.DesktopLight.groups = -graphicsview-api
@@ -20,7 +20,7 @@ edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.460
+qhp.Qt.namespace = com.trolltech.qt.470
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -34,9 +34,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.6.0 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.6.0
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.6.0
+qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.0
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
diff --git a/translations/assistant_adp_de.ts b/translations/assistant_adp_de.ts
deleted file mode 100644
index 79c9c76..0000000
--- a/translations/assistant_adp_de.ts
+++ /dev/null
@@ -1,973 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="de">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>Kann Port %1 nicht binden</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>Schrift</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>S&amp;kript</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>&amp;Schriftart</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>S&amp;chriftschnitt</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>Schriftg&amp;rad</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>Schriftart</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>Schriftart für:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>Hilfeseiten</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>Anwendung</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>Erweitere Einstellungen nutzen</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Con&amp;tents</source>
- <translation>Inhal&amp;t</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+376"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-771"/>
- <source>Open Link in New Window</source>
- <translation>Öffne Link in neuem Fenster</translation>
- </message>
- <message>
- <location line="+76"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Initialisiere...</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Cannot open the index file %1</source>
- <translation>Kann Indexdatei %1 nicht öffnen</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Warnung</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Dokumentation %1 existiert nicht!
-Überspringe Datei.</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>Syntaxfehler</translation>
- </message>
- <message>
- <location line="+35"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Fertig</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Indexing files...</source>
- <translation>Indiziere Dokumentation...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>Lese Suchindex...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>Volltextsuche</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>Wildcards innerhalb von Phrasen sind nicht zugelassen.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Das schließende Anführungszeichen fehlt.</translation>
- </message>
- <message numerus="yes">
- <location line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>%n Dokumente gefunden.</numerusform>
- <numerusform></numerusform>
- </translation>
- </message>
- <message>
- <location line="-882"/>
- <source>Open Link in Current Tab</source>
- <translation>Link im Aktuellen Tab öffnen</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Open Link in New Tab</source>
- <translation>Link in einem neuen Tab öffnen</translation>
- </message>
- <message>
- <location line="+91"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Die Indexdatei konnte nicht geladen werden.
-Der Assistent ist nicht einsatzbereit!</translation>
- </message>
- <message>
- <location line="+208"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>Dokumentation %1 ist nicht kompatibel! Datei wird übersprungen.</translation>
- </message>
- <message>
- <location line="+470"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Der Index für die Volltextsuche konnte nicht gespeichert werden.
-Assistent ist nicht einsatzbereit!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>Hilfe</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Hilfe&lt;/b&gt;&lt;p&gt;Wählen Sie ein Hilfethema aus dem Inhalt oder suchen Sie im Index nach Schlüsselwörtern.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Zeigt Hilfethemen geordnet nach Kategorie, Index oder Lesezeichen an. Ein weiterer Abschnitt enthält die Volltextsuche.</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Hilfethemen geordnet nach Kategorie.&lt;/b&gt;&lt;p&gt;Doppelklicken Sie einen Eintrag, um die Themen dieser Kategorie zu sehen. Doppelklicken Sie ein Thema, um es angezeigt zu bekommen.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>Spalte 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>&amp;Index</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>Suchen &amp;nach:</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>Geben Sie ein Schlüsselwort ein</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Geben Sie ein Schlüsselwort ein.&lt;/b&gt;&lt;p&gt;Es wird dann der Eintrag aus der Liste ausgewählt, der am besten mit dem eingegebenen Begriff übereinstimmt.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Liste aller verfügbaren Hilfethemen.&lt;/b&gt;&lt;p&gt;Doppelklicken Sie auf einen Eintrag, um die Hilfe zu öffnen. Wenn mehr als eine Seite gefunden wurde, wählen Sie die gewünschte Seite aus.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>L&amp;esezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>Zeigt alle Lesezeichen an.</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>Füge neues Lesezeichen hinzu</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Füge aktuelle Seite zu den Lesezeichen hinzu.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>&amp;Neu</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>Lösche Lesezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>Lösche markiertes Lesezeichen.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>&amp;Löschen</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>&amp;Suche</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>Suche &amp;nach:</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Geben Sie Suchbegriffe ein.&lt;/b&gt;&lt;p&gt;Geben Sie hier die gesuchten Begriffe ein. Die Begriffe können Wildcards (*) enthalten. Eine Phrase muß in Anführungszeichen stehen.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Gefundene Dokumente&lt;/b&gt;&lt;p&gt;Diese Liste beinhaltet alle gefundenen Dokumente der letzten Suche. Die Dokumente sind nach der Häufigkeit der Treffer geordnet.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>Gefundene &amp;Dokumente:</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>Zeigt die Hilfeseite für die Volltextsuche an.</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>Hi&amp;lfe</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>Startet die Suche.</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>Initialisiere...</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s)</source>
- <translation>Geben Sie Suchbegriffe ein</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page</source>
- <translation>Hilfeseite anzeigen</translation>
- </message>
- <message>
- <location/>
- <source>Start searching</source>
- <translation>Suche beginnen</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>Hilfe</translation>
- </message>
- <message>
- <location line="+93"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Öffne Link in neuem Fenster</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>Link in einem neuen Tab öffnen</translation>
- </message>
- <message>
- <location line="-90"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Der Webbrowser konnte nicht gestartet werden.
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>OK</source>
- <translation>OK</translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Der Link &apos;%1&apos; konnte nicht geöffnet werden</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Die Seite wurde nicht gefunden&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>Fehler ...</translation>
- </message>
- <message>
- <location line="+56"/>
- <source>Copy &amp;Link Location</source>
- <translation>Link-Adresse kopieren</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Unbenannt</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>Werkzeugleiste</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>&amp;Drucken...</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>&amp;Beenden</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>&amp;Kopieren</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>Text&amp;suche...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>St&amp;artseite</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>&amp;Vorherige</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>&amp;Nächste</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Über Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>Vergrößern</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>Ver&amp;kleinern</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>Neues Fenster...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+198"/>
- <source>Ctrl+T</source>
- <translation>Strg+T
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Strg+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Strg+E</translation>
- </message>
- <message>
- <location line="+129"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Füge Lesezeichen hinzu</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>&amp;Datei</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>&amp;Bearbeiten</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>&amp;Ansicht</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>&amp;Gehe zu</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Lesezeichen</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant von Nokia</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>&amp;Hilfe</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>Drucke aktuelle Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Strg+P</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Qt Assistant beenden.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Strg+Q</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Den markierten Text in die Zwischenablage kopieren.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Strg+C</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Den Suchdialog öffnen. Qt Assistant sucht in der aktuellen Seite nach dem eingegebenen Text.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Strg+F</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Zur Startseite gehen. Startseite im Qt Assistant ist die Qt-Referenzdokumentation.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Strg+Pos1</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>Gehe zur vorherigen Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Links</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>Gehe zur nächsten Seite.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Rechts</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Zeigt das Handbuch zum Qt Designer an.</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Vergrößert die Schrift.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Strg++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Verkleinert die Schrift.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Strg+-</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>Öffnet ein neues Fenster.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Strg+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>&amp;Schließen</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>Schließt das aktuelle Fenster.</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Handbuch zu Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Aktuelle Seite zu den Lesezeichen hinzufügen.</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>Direkthilfe</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>Kontextbezogene Direkthilfe.</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Umschalt+F1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-129"/>
- <source>Ctrl+S</source>
- <translation>Strg+S</translation>
- </message>
- <message>
- <location line="-33"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Qt Assistant wird initialisiert...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Go</source>
- <translation>Gehe zu</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>Weitersuchen</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>Vorheriges suchen</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Umschalt+F3</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Über Qt Assistent</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>Tab einfügen</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>Nächster Tab</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>Voriger Tab</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>Tab schließen</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+181"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Fehler beim Öffnen des Inhalts in Datei: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="-246"/>
- <source>Sidebar</source>
- <translation>Sidebar</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>&amp;Fenster</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>Minimieren</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Strg+M</translation>
- </message>
- <message>
- <location line="+70"/>
- <source>SHIFT+CTRL+=</source>
- <translation>Umschalt+Strg+=</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Strg+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+8"/>
- <source>Ctrl+]</source>
- <translation>Strg+AltGr+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Strg+AltGr+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>Menüleisten/Sidebar</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Zeigt die Hauptseite eines Dokumentensets an.</translation>
- </message>
- <message>
- <location line="+262"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Seite speichern</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>Die Datei konnte nicht zum Schreiben geöffnet werden.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Save Page As...</source>
- <translation>Seite speichern als...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Strg+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>Seite mit Inhalt-Tab syncronisieren</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>Wählt die Seite im Inhalt-Tab aus.</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>Schriftart...</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant von Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation></translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>Unbenannt</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+235"/>
- <source>Add page</source>
- <translation>Seite einfügen</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>Seite schließen</translation>
- </message>
- <message>
- <location line="-95"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+338"/>
- <source>New Tab</source>
- <translation>Neuer Tab</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>Tab schließen</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>Andere Tabs schließen</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>Previous</source>
- <translation>Vorheriger</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>Nächster</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>Groß-/Kleinschreibung beachten</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>Ganze Wörter</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Seitenende</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Wählen Sie ein Thema für &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>Thema wählen</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Wählen Sie ein Thema aus der Liste aus und klicken Sie &lt;b&gt;Anzeigen&lt;/b&gt; um die Hilfe zu öffnen.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>&amp;Themen</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Zeigt eine Liste der verfügbaren Hilfethemen für diesen Begriff an.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>&amp;Anzeigen</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>Öffne das gewählte Thema aus der Liste.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>&amp;Schließen</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>Schließt den Dialog.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_ja.ts b/translations/assistant_adp_ja.ts
deleted file mode 100644
index f87beab..0000000
--- a/translations/assistant_adp_ja.ts
+++ /dev/null
@@ -1,1047 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ja">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>ポート %1 のバインドに失敗しました</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>リンクを現在のタブに開く</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>リンクを新しいウィンドウで開く</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>リンクを新しいタブで開く</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>準備中...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>キーワードインデックスファイルのロードに失敗しました
-Assistant は動きません!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>インデックスファイル %1 をオープンできません</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>ドキュメンテーションファイル %1 は存在しません!
-スキップします。</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>パースエラー</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>ドキュメンテーションファイル %1 は互換性がありません!
-スキップします。</translation>
- </message>
- <message numerus="yes">
- <location line="+577"/>
- <source>%n document(s) found.</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- </translation>
- </message>
- <message>
- <source>Index</source>
- <translation type="obsolete">インデックス</translation>
- </message>
- <message>
- <source>Bookmarks</source>
- <translation type="obsolete">ブックマーク</translation>
- </message>
- <message>
- <source>Contents</source>
- <translation type="obsolete">目次</translation>
- </message>
- <message>
- <source>Search</source>
- <translation type="obsolete">検索</translation>
- </message>
- <message>
- <location line="-529"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完了</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>全文検索インデックスのセーブに失敗しました
-Assistant は動きません!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>インデックス作成中...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>ディレクトリを読み込んでいます...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文検索</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>フレーズ中のワイルドカードの使用は認められていません。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>閉じ引用符がありません。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>ヘルプ</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;ヘルプ&lt;/b&gt;&lt;p&gt;目次のリストからヘルプを希望するトピックを選択します、あるいはキーワードをインデックスから検索します。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>カテゴリ、インデックス、ブックマークで編成したヘルプトピックを表示します。もう一つのタブは全文検索を引き継いでいます。</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>目次(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;カテゴリで編成したヘルプトピックです。&lt;/b&gt;&lt;p&gt;カテゴリ内のトピックを見るには、項目をダブルクリックしてください。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>コラム 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>インデックス(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>以下を検索(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>キーワードを入力してください</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;キーワードを入力してください。&lt;/b&gt;&lt;p&gt;入力された文字列に一番近いものを選択します。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;ヘルプトピック一覧&lt;/b&gt;&lt;p&gt;ヘルプページをオープンするには、項目をダブルクリックしてください。複数見つかった場合は、その中から選んでください。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>ブックマーク(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>ブックマーク一覧を表示します。</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>新しいブックマークを追加</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>現在表示されているページを新しいブックマークとして追加します。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>新規(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>ブックマークを削除</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>選択されたブックマークを削除します。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>削除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>検索(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>以下を検索(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>検索する語(フレーズ)を入力してください。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;検索する語(フレーズ)を入力してください。&lt;/b&gt;&lt;p&gt;検索する語(フレーズ)を入力してください。ワイルドカード(*)を含めることもできます。連続する語を入力する場合は引用符で囲んでください。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;見つかったドキュメント&lt;/b&gt;&lt;p&gt;この一覧は最新の検索で見つかったドキュメントを全て含んでいます。該当項目が多い順に並んでいます。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>見つかったドキュメント(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>ヘルプページを表示します。</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>全文検索用にヘルプページを表示します。</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>ヘルプ(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>検索を開始します。</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>このボタンを押すと検索が始まります。</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>準備中...</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>ヘルプ</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>OK</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>リンク開けませんでした: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;ページが見つかりませんでした&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>エラー...</translation>
- </message>
- <message>
- <location line="+56"/>
- <source>Copy &amp;Link Location</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>リンクを新しいウィンドウで開く Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>リンクを新しいタブで開く</translation>
- </message>
- <message>
- <location line="-90"/>
- <source>Unable to launch web browser.
-</source>
- <translation>ブラウザを起動できません。
-</translation>
- </message>
- <message>
- <source>Ok</source>
- <translation type="obsolete">Ok</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>タイトルなし</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>サイドバー</translation>
- </message>
- <message>
- <location line="+55"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Qt Assistant を初期化中...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>表示</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>指定されたドキュメントセットのメインページを表示します。</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>&apos;%1&apos; というファイル内の、アプリケーションについての説明内容を開けませんでした</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>ページを保存</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>書き込みのためにファイルが開けません!</translation>
- </message>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech の Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>ツールバー</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>移動</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>ファイル(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>編集(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>表示(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>移動(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>ブックマーク(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant by Nokia</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>ヘルプ(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>現在表示されているページを印刷します。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>印刷(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Qt Assistant を終了します。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>終了(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>選択されているテキストをクリップボードにコピーします。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>コピー(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>検索ダイアログを開きます。Qt Assistant は入力されたテキストを現在表示されているページから検索します。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>テキスト内を検索(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>次を検索(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>前を検索(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>ホームページへ移動します。Qt Assistant のホームページは Qt Reference Documentation です。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>ホーム(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>一つ前のページへ戻ります。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+左矢印</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>戻る(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>一つ先のページへ進みます。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+右矢印</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>進む(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Qt Assistant について、さらに詳しい情報を表示します。</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Qt Assistant について</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Qt について</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>文書をズームイン(フォントサイズを拡大)します。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>拡大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>文書をズームアウト(フォントサイズを縮小)します。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>縮小(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>新規ウィンドウを開きます。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>新しいウィンドウ</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>現在のウィンドウを閉じます。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>閉じる(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>現在表示されているページを新規ブックマークとして追加します。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>ブックマークに追加(&amp;A)</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>文脈依存のヘルプ、ヒントです。</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>ヒント</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>タブを追加</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+右矢印</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>次のタブ</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+左矢印</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>前のタブ</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>タブを閉じる</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt Assistant マニュアル</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>名前をつけてページを保存...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-673"/>
- <source>&amp;Window</source>
- <translation>ウィンドウ(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最小化</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">オープンソース版</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">この Qt Assistant は Qt オープンソース版の一部であり、オープンソースのアプリケーションの開発を目的としたものです。Qt は、複数のプラットフォームに対応するアプリケーションを開発するための C++ のわかりやすいフレームワークです。</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model.html&quot;&gt;qt.nokia.com/company/model.html&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">著作権のある(ソースを公開しない)アプリケーションを開発するには、Qt の商用ライセンスが必要です。Qt のライセンスの概要については &lt;a href=&quot;http://qt.nokia.com/company/model.html&quot;&gt;qt.nokia.com/company/model.html&lt;/a&gt; をご覧ください。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">このプログラムは Qt 商用版ライセンス規約の定める条件の下で、あなたにライセンスされています。詳細はこのソフトウェアとともに配布される LICENSE ファイルをご覧ください。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Sync with Table of Contents</source>
- <translation>目次の該当箇所を表示</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>「目次」タブからそのページを選択します。</translation>
- </message>
-</context>
-<context>
- <name>QAssistantClient</name>
- <message>
- <source>Failed to start Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant の起動に失敗しました。</translation>
- </message>
- <message>
- <source>Qt Assistant crashed.</source>
- <translation type="obsolete">Qt Assistant がクラッシュしました。</translation>
- </message>
- <message>
- <source>Error while running Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant 実行中にエラーが発生しました。</translation>
- </message>
- <message>
- <source>Cannot connect to Qt Assistant.</source>
- <translation type="obsolete">Qt Assistant に接続できません。</translation>
- </message>
- <message>
- <source>Could not connect to Assistant: Connection refused</source>
- <translation type="obsolete">Assistant に接続できませんでした: 接続を拒否されました</translation>
- </message>
- <message>
- <source>Could not connect to Assistant: Host not found</source>
- <translation type="obsolete">Assistant に接続できませんでした: ホストが見つかりませんでした</translation>
- </message>
- <message>
- <source>Communication error</source>
- <translation type="obsolete">通信エラー</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech の Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>ページを追加</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>ページを閉じる</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation type="unfinished">タブを閉じる</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>タブブラウザ</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>タイトルなし</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>前</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>次</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>大文字と小文字を区別する</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>完全に一致する単語だけを検索する</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;検索が一通り終わりました</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>&lt;b&gt;%1&lt;/b&gt; のトピックを選択</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>トピックを選択</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>一覧からトピックを選択し、&lt;b&gt;表示&lt;/b&gt;ボタンをクリックしてオンラインヘルプを開いてください。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>トピック(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>指定されたキーワードの使用できるヘルプトピックの一覧を表示します。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>表示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>一覧から選択されたトピックを開きます。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>閉じる(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>ダイアログを閉じます。</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_pl.ts b/translations/assistant_adp_pl.ts
deleted file mode 100644
index 17c2c5c..0000000
--- a/translations/assistant_adp_pl.ts
+++ /dev/null
@@ -1,974 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="pl">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>Błąd podłączenia do portu %1</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>Czcionka</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>Sys&amp;tem pisania</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>&amp;Rodzina</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>&amp;Styl</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>&amp;Wielkość punktu</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>Ustawienia czcionki</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>Ustawienia czcionki</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>przeglądarki</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>aplikacji</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>Użyj własnych ustawień</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>Otwórz odsyłacz w bieżącej karcie</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>Otwórz odsyłacz w nowym oknie</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>Otwórz odsyłacz w nowej karcie</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Przygotuj...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Nie można wczytać indeksu słów kluczowych
-Assistant nie będzie działał!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>Nie można otworzyć indeksu %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Ostrzeżenie</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Plik dokumentacji %1 nie istnieje!
-Plik zostaje pominięty.</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>Błąd parsowania</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>Plik dokumentacji %1 jest nieodpowiedni!
-Plik zostaje pominięty.</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Zrobione</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Nie można zapisać indeksu dla pełnego wyszukiwania
-Assistant nie będzie działał!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>Indeksowanie plików...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>Czytanie katalogu...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>Pełne wyszukiwanie</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>Używanie znacznika w wyrażeniu nie jest dozwolone.</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Brakuje kończącego znaku cudzysłowu.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Pomoc&lt;/b&gt;&lt;p&gt;Wybierz temat pomocy z listy dostępnych tematów bądź poszukaj słowa kluczowego w indeksie.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Pokazuje listę tematów pomocy zorganizowaną w kategorie, indeks lub zakładki. Kolejna karta pozwala na pełne wyszukiwanie.</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>&amp;Spis treści</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Tematy pomocy zorganizowane w kategorie.&lt;/b&gt;&lt;p&gt;Kliknij dwukrotnie na wybraną kategorię aby otworzyć listę jej tematów. Aby obejrzeć temat dwukrotnie kliknij go.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>kolumna 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>&amp;Indeks</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>&amp;Szukaj wyrażenia:</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>Wprowadź słowo kluczowe</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Wprowadź słowo kluczowe.&lt;/b&gt;&lt;p&gt;Lista wybierze temat który najbardziej odpowiada szukanemu wyrażeniu.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Lista dostępnych tematów pomocy&lt;/b&gt;&lt;p&gt;Kliknij dwukrotnie na wybranym temacie aby otworzyć jego treść. Jeśli temat występuje w kilku kontekstach, dodatkowo należy wybrać kontekst z listy.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>&amp;Zakładki</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>Pokazuje listę zakładek.</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>Dodaj nową zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Dodaj bieżącą stronę jako nową zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>&amp;Nowa</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>Usuń zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>Usuń zaznaczoną zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>&amp;Usuń</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>&amp;Szukaj</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>&amp;Szukanie:</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Wprowadź wyrażenie(a) do szukania.&lt;b&gt;&lt;p&gt;Wprowadź w tym okienku wyrażenia, których szukasz. Wyrażenia mogą zawierać znaczniki (*). Dla wyszukania ciągu wyrażeń umieść całość w cudzysłowie.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;Znalezione dokumenty&lt;/b&gt;&lt;p&gt;Lista zawiera wszystkie znalezione dokumenty związane z ostatnim wyszukiwaniem. Dokumenty są poukładane w kolejności pod względem ilości trafień szukanego wyrażenia.&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>Znalezione &amp;dokumenty:</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>Pokaż stronę pomocy dla pełnego wyszukiwania.</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>&amp;Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>Naciśnięcie tego przycisku powoduje rozpoczęcie wyszukiwania.</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>Przygotowywanie...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>Znaleziono %n dokument.</numerusform>
- <numerusform>Znaleziono %n dokumenty.</numerusform>
- <numerusform>Znaleziono %n dokumentów.</numerusform>
- </translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Enter searchword(s)</source>
- <translation>Wprowadź wyrażenie(a) do szukania</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page</source>
- <translation>Pokaż stronę pomocy</translation>
- </message>
- <message>
- <location/>
- <source>Start searching</source>
- <translation>Rozpocznij wyszukiwanie</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>Pomoc</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Nie można uruchomić przeglądarki internetowej.
-</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Nie można otworzyć odsyłacza: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Strona nie została znaleziona&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>Błąd...</translation>
- </message>
- <message>
- <location line="+61"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Otwórz odsyłacz w nowym oknie Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>Otwórz odsyłacz w nowej karcie</translation>
- </message>
- <message>
- <location line="-89"/>
- <source>OK</source>
- <translation>OK</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Copy &amp;Link Location</source>
- <translation>Skopiuj &amp;odsyłacz</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Nienazwany</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>Panel</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>&amp;Okno</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>Minimalizuj</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+44"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Inicjalizowanie Qt Assistant...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>Widoki</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Pokazuje główną stronę wybranego zestawu dokumentacji.</translation>
- </message>
- <message>
- <location line="+39"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Nie można otworzyć pliku: &apos;%1&apos; z informacjami o aplikacji</translation>
- </message>
- <message>
- <location line="+203"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Zapisz stronę</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>Nie można otworzyć pliku do zapisu!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant Nokii</translation>
- </message>
- <message>
- <location/>
- <source>Toolbar</source>
- <translation>Pasek główny</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>Pasek z odsyłaczami</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>&amp;Pomoc</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>&amp;Plik</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Zakładki</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>&amp;Nawigacja</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>&amp;Widok</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>&amp;Edycja</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>Wy&amp;drukuj...</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>Wydrukuj bieżącą stronę.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>&amp;Zakończ</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>Zakończ Qt Assistant.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>S&amp;kopiuj</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Skopiuj wybrany tekst do schowka.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>&amp;Znajdź w tekście...</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Otwórz okno szukania. Qt Assistant będzie przeszukiwał bieżącą stronę dla podanego tekstu.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>Znajdź &amp;następne</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>Znajdź &amp;poprzednie</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>Strona &amp;startowa</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Przejdź do strony startowej. Strona startowa Qt Assistant jest główną stroną dokumentacji Qt.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>&amp;Poprzednia strona</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>Przejdź do poprzedniej strony.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>&amp;Następna strona</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>Przejdź do następnej strony.</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>Informacje o Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Pokaż dalsze informacje o Qt Assistant.</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>Informacje o Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>Po&amp;większ</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Powiększ rozmiar czcionek w dokumencie.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>Po&amp;mniejsz</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Pomniejsz rozmiar czcionek w dokumencie.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>Nowe okno</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>Otwórz nowe okno.</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>Za&amp;mknij</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>Zamknij bieżące okno.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Dodaj zakładkę</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Dodaj bieżącą stronę jako nową zakładkę.</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>Co to jest?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>&quot;Co to jest?&quot; jest pomocą kontekstową.</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>Dodaj kartę</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>Następna karta</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>Poprzednia karta</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>Zamknij kartę</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Podręcznik Qt Assistant</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>Zapisz stronę jako...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>Znajdź bieżącą stronę w spisie treści</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>Wybierz stronę w karcie ze spisem treści.</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>Ustawienia czcionki...</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant Nokii</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>Dodaj kartę</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>Zamknij kartę</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>Przeglądarka z kartami</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>Nienazwany</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>Poprzedni</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>Następny</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>Uwzględniaj wielkość liter</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>Wszystkie wyrazy</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Szukanie od początku</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+243"/>
- <source>New Tab</source>
- <translation>Nowa karta</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>Zamknij kartę</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>Zamknij pozostałe karty</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Wybierz temat dla &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>Wybierz temat</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Wybierz temat z listy i kliknij przycisk &lt;b&gt;Pokaż&lt;/b&gt; aby otworzyć pomoc (online).</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>&amp;Tematy</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Pokazuje listę dostępnych tematów pomocy dla szukanego wyrażenia.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>Pok&amp;aż</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>Otwórz wybrany na liście temat.</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>Za&amp;mknij</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>Zamknij okno.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_ru.ts b/translations/assistant_adp_ru.ts
deleted file mode 100644
index db0c9df..0000000
--- a/translations/assistant_adp_ru.ts
+++ /dev/null
@@ -1,977 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="ru">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+226"/>
- <source>Failed to bind to port %1</source>
- <translation>Не удалось открыть порт %1</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+77"/>
- <source>&amp;Family</source>
- <translation>&amp;Шрифт</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>&amp;Начертание</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Font</source>
- <translation>Шрифт</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>Система &amp;письма</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Point size</source>
- <translation>&amp;Размер</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+75"/>
- <source>Application</source>
- <translation>Приложение</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Browser</source>
- <translation>Обозреватель</translation>
- </message>
- <message>
- <location line="-4"/>
- <source>Font settings for:</source>
- <translation>Настройки шрифта для:</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Use custom settings</source>
- <translation>Использование индивидуальных настроек</translation>
- </message>
- <message>
- <location line="-18"/>
- <source>Font Settings</source>
- <translation>Настройки шрифта</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="+108"/>
- <source>&amp;Index</source>
- <translation>&amp;Указатель</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>&amp;Look For:</source>
- <translation>&amp;Искать:</translation>
- </message>
- <message>
- <location line="+91"/>
- <source>&amp;New</source>
- <translation>&amp;Новая</translation>
- </message>
- <message>
- <location line="+23"/>
- <location line="+111"/>
- <source>&amp;Search</source>
- <translation>&amp;Поиск</translation>
- </message>
- <message>
- <location line="-212"/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Указание ключевого слова.&lt;/b&gt;&lt;p&gt;Список заполняется элементами, лучше соответствующими указанному ключевому слову.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="+142"/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Указание слов для поиска.&lt;/b&gt;&lt;p&gt;Введите одно или несколько слов, по которым требуется осуществить поиск. Слова могут содержкать символы-заменители (*). Если требуется найти сочетание слов, заключите искомую фразу в кавычки.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="+10"/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Найденные документы&lt;/b&gt;&lt;p&gt;В данном списке представлены все найденные при последнем поиске документы. Документы упорядочены по релевантности, т.е. чем выше в списке, тем чаще в нём встречаются искомые слова.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="-196"/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Разделы справки, распределённые по категориям.&lt;/b&gt;&lt;p&gt;Дважды щёлкните по одному из пунктов для отображения разделов в данной категории. Для открытия раздела дважды щёлкните по нему.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="-31"/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Справка&lt;/b&gt;&lt;p&gt;Выберите раздел справки из оглавления или воспользуйтесь поиском по предметному указателю.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="+85"/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;b&gt;Список доступных разделов справки.&lt;/b&gt;&lt;p&gt;Дважды щёлкните по одному из пунктов для открытия страницы справки. Если найдено более одной страницы, выберите желаемую.&lt;/p&gt;</translation>
- </message>
- <message>
- <location line="+62"/>
- <source>Add new bookmark</source>
- <translation>Добавить закладку</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Добавить отображаемую страницу в закладки.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+393"/>
- <source>Cannot open the index file %1</source>
- <translation>Не удаётся открыть файл индекса %1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="-134"/>
- <source>Con&amp;tents</source>
- <translation>&amp;Оглавление</translation>
- </message>
- <message>
- <location line="+144"/>
- <source>Delete bookmark</source>
- <translation>Удалить закладку</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Delete the selected bookmark.</source>
- <translation>Удалить выбранную закладку.</translation>
- </message>
- <message>
- <location line="+51"/>
- <source>Enter searchword(s)</source>
- <translation>Введите одно или несколько слов для поиска</translation>
- </message>
- <message>
- <location line="+38"/>
- <source>Display the help page</source>
- <translation>Показать страницу справки</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Display the help page for the full text search.</source>
- <translation>Показать справку по полнотекстовому поиску.</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>Start searching</source>
- <translation>Начать поиск</translation>
- </message>
- <message>
- <location line="-269"/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>Отображает список разделов, распредёленных по категориям, указатель или закладки. Последняя вкладка содержит панель полнотекстового поиска.</translation>
- </message>
- <message>
- <location line="+96"/>
- <source>Displays the list of bookmarks.</source>
- <translation>Отображает список закладок.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+59"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>Файл документации %1 не существует!
-Пропущен.</translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>Несовместимый файл документации %1!
-Пропущен.</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>Готово</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="-36"/>
- <source>Enter keyword</source>
- <translation>Введите ключевое слово</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-725"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>Не удалось загрузить файл индекса ключевых слов
-Qt Assistant не будет работать!</translation>
- </message>
- <message>
- <location line="+678"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>Не удалось сохранить индекс полнотекстового поиска
-Qt Assistant не будет работать!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="+162"/>
- <source>Found &amp;Documents:</source>
- <translation>Найденные &amp;документы:</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+90"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>Полнотекстовый поиск</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="+24"/>
- <source>He&amp;lp</source>
- <translation>&amp;Справка</translation>
- </message>
- <message>
- <location line="-261"/>
- <source>Help</source>
- <translation>Справка</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-70"/>
- <source>Indexing files...</source>
- <translation>Индексирование файлов...</translation>
- </message>
- <message>
- <location line="-798"/>
- <source>Open Link in New Tab</source>
- <translation>Открыть ссылку в новой вкладке</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Open Link in New Window</source>
- <translation>Открыть ссылку в новом окне</translation>
- </message>
- <message>
- <location line="+182"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>Ошибка обработки</translation>
- </message>
- <message>
- <location line="-239"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>Подготовка...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="+321"/>
- <source>Preparing...</source>
- <translation>Подготовка...</translation>
- </message>
- <message>
- <location line="-34"/>
- <source>Pressing this button starts the search.</source>
- <translation>Нажатие на эту кнопку запустит процесс поиска.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location line="+45"/>
- <source>Reading dictionary...</source>
- <translation>Чтение каталога...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="-80"/>
- <source>Searching f&amp;or:</source>
- <translation>&amp;Искать:</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+56"/>
- <source>The closing quotation mark is missing.</source>
- <translation>Пропущена закрывающая кавычка.</translation>
- </message>
- <message>
- <location line="-9"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>Использование символов-заменителей внутри фраз недопустимо.</translation>
- </message>
- <message>
- <location line="-694"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>Предупреждение</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="-163"/>
- <location line="+74"/>
- <source>column 1</source>
- <translation>столбец 1</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="-304"/>
- <source>Open Link in Current Tab</source>
- <translation>Открыть ссылку в текущей вкладке</translation>
- </message>
- <message numerus="yes">
- <location line="+882"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>Найден %n документ.</numerusform>
- <numerusform>Найдено %n документа.</numerusform>
- <numerusform>Найдено %n документов.</numerusform>
- </translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui" line="-22"/>
- <source>&amp;Bookmarks</source>
- <translation>&amp;Закладки</translation>
- </message>
- <message>
- <location line="+73"/>
- <source>&amp;Delete</source>
- <translation>&amp;Удалить</translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+127"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;Страница не найдена&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+58"/>
- <source>Copy &amp;Link Location</source>
- <translation>Копировать &amp;адрес ссылки</translation>
- </message>
- <message>
- <location line="-56"/>
- <source>Error...</source>
- <translation>Ошибка...</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>Не удалось открыть ссылку: &apos;%1&apos;</translation>
- </message>
- <message>
- <location line="-29"/>
- <source>Help</source>
- <translation>Справка</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>OK</source>
- <translation>Закрыть</translation>
- </message>
- <message>
- <location line="+89"/>
- <source>Open Link in New Tab</source>
- <translation>Открыть ссылку в новой вкладке</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>Открыть ссылку в новом окне Shift+LMB</translation>
- </message>
- <message>
- <location line="-92"/>
- <source>Unable to launch web browser.
-</source>
- <translation>Невозможно запустить вэб-браузер.
-</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>Неозаглавлено</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+373"/>
- <location line="+3"/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>Контекстная справка &quot;Что это?&quot;.</translation>
- </message>
- <message>
- <location line="-17"/>
- <source>&amp;Add Bookmark</source>
- <translation>&amp;Добавить закладку</translation>
- </message>
- <message>
- <location line="-11"/>
- <source>&amp;Close</source>
- <translation>&amp;Закрыть</translation>
- </message>
- <message>
- <location line="-141"/>
- <source>&amp;Copy</source>
- <translation>&amp;Копировать</translation>
- </message>
- <message>
- <location line="-49"/>
- <source>&amp;Edit</source>
- <translation>&amp;Правка</translation>
- </message>
- <message>
- <location line="-39"/>
- <source>&amp;File</source>
- <translation>&amp;Файл</translation>
- </message>
- <message>
- <location line="+102"/>
- <source>&amp;Find in Text...</source>
- <translation>П&amp;оиск по тексту...</translation>
- </message>
- <message>
- <location line="-82"/>
- <source>&amp;Go</source>
- <translation>&amp;Перейти</translation>
- </message>
- <message>
- <location line="-31"/>
- <source>&amp;Help</source>
- <translation>&amp;Справка</translation>
- </message>
- <message>
- <location line="+143"/>
- <source>&amp;Home</source>
- <translation>&amp;Домой</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>&amp;Next</source>
- <translation>Сл&amp;едующий</translation>
- </message>
- <message>
- <location line="-14"/>
- <source>&amp;Previous</source>
- <translation>&amp;Предыдущий</translation>
- </message>
- <message>
- <location line="-86"/>
- <source>&amp;Print...</source>
- <translation>&amp;Печать...</translation>
- </message>
- <message>
- <location line="-28"/>
- <source>&amp;View</source>
- <translation>&amp;Вид</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+121"/>
- <source>&amp;Window</source>
- <translation>&amp;Окно</translation>
- </message>
- <message>
- <location line="+431"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+150"/>
- <source>About Qt</source>
- <translation>О Qt</translation>
- </message>
- <message>
- <location line="-11"/>
- <source>About Qt Assistant</source>
- <translation>О Qt Assistant</translation>
- </message>
- <message>
- <location line="+94"/>
- <source>Add Tab</source>
- <translation>Добавить вкладку</translation>
- </message>
- <message>
- <location line="-22"/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>Добавить отображаемую страницу в закладки.</translation>
- </message>
- <message>
- <location line="-228"/>
- <source>Boo&amp;kmarks</source>
- <translation>&amp;Закладки</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+244"/>
- <source>Cannot open file for writing!</source>
- <translation>Не удалось открыть файл для записи!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+274"/>
- <source>Close Tab</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location line="-57"/>
- <source>Close the current window.</source>
- <translation>Закрыть текущее окно.</translation>
- </message>
- <message>
- <location line="-58"/>
- <source>Display further information about Qt Assistant.</source>
- <translation>Показать дополнительную информацию о Qt Assistant.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-506"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>Открывает стартовую страницу выбранного набора документации.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="-103"/>
- <source>E&amp;xit</source>
- <translation>В&amp;ыход</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+59"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>Не удалось получить информацию о приложении из файла: &apos;%1&apos;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+42"/>
- <source>Find &amp;Next</source>
- <translation>Найти &amp;следующее</translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Find &amp;Previous</source>
- <translation>Найти &amp;предыдущее</translation>
- </message>
- <message>
- <location line="+206"/>
- <source>Font Settings...</source>
- <translation>Настройки шрифта...</translation>
- </message>
- <message>
- <location line="-361"/>
- <source>Go</source>
- <translation>Перейти</translation>
- </message>
- <message>
- <location line="+169"/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>Перейти на домашнюю страницу. Домашная страница Qt Assistant - Справочная документация по Qt.</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>Go to the next page.</source>
- <translation>Переход на следующую страницу.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-181"/>
- <source>Initializing Qt Assistant...</source>
- <translation>Инициализация Qt Assistant...</translation>
- </message>
- <message>
- <location line="-45"/>
- <source>Minimize</source>
- <translation>Свернуть</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+55"/>
- <source>New Window</source>
- <translation>Новое окно</translation>
- </message>
- <message>
- <location line="+55"/>
- <source>Next Tab</source>
- <translation>Следующая вкладка</translation>
- </message>
- <message>
- <location line="-52"/>
- <source>Open a new window.</source>
- <translation>Открыть новое окно.</translation>
- </message>
- <message>
- <location line="-116"/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>Открыть окно поиска. Qt Assistant произведёт поиск введённого текста на отображаемой странице.</translation>
- </message>
- <message>
- <location line="+176"/>
- <source>Previous Tab</source>
- <translation>Предыдущая вкладка</translation>
- </message>
- <message>
- <location line="-218"/>
- <source>Print the currently displayed page.</source>
- <translation>Печатать отображаемую страницу.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+206"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt Assistant</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+237"/>
- <source>Qt Assistant Manual</source>
- <translation>Руководство по Qt Assistant</translation>
- </message>
- <message>
- <location line="-366"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant от Nokia</translation>
- </message>
- <message>
- <location line="+140"/>
- <source>Quit Qt Assistant.</source>
- <translation>Выйти из Qt Assistant.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+460"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>Сохранить страницу</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+234"/>
- <source>Save Page As...</source>
- <translation>Сохранить страницу как...</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Select the page in contents tab.</source>
- <translation>Выбрать страницу во вкладке оглавления.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-693"/>
- <source>Sidebar</source>
- <translation>Боковая панель</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="-3"/>
- <source>Sync with Table of Contents</source>
- <translation>Синхронизировать с оглавлением</translation>
- </message>
- <message>
- <location line="-380"/>
- <source>Toolbar</source>
- <translation>Панель инструментов</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+107"/>
- <source>Views</source>
- <translation>Виды</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="+312"/>
- <source>What&apos;s This?</source>
- <translation>Что это?</translation>
- </message>
- <message>
- <location line="-58"/>
- <source>Zoom &amp;in</source>
- <translation>У&amp;величить</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Zoom &amp;out</source>
- <translation>У&amp;меньшить</translation>
- </message>
- <message>
- <location line="-11"/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>Увеличить размер шрифта.</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>Уменьшить размер шрифта.</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-86"/>
- <source>Ctrl+M</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+70"/>
- <source>SHIFT+CTRL+=</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+]</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui" line="-144"/>
- <source>Ctrl+P</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Ctrl+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>Скопировать выделенный текст в буфер обмена.</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Ctrl+C</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Ctrl+F</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>F3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Shift+F3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Ctrl+Home</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Go to the previous page.</source>
- <translation>Переход на предыдущую страницу.</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Alt+Left</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Alt+Right</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+33"/>
- <source>Ctrl++</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Ctrl+-</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Ctrl+N</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Ctrl+W</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+25"/>
- <source>Shift+F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Ctrl+Alt+N</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Ctrl+Alt+Right</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Ctrl+Alt+Left</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Ctrl+Alt+Q</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>F1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Ctrl+Alt+S</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt Assistant от Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui" line="+197"/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Поиск с начала</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+86"/>
- <source>Add page</source>
- <translation>Добавить вкладку</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui" line="-26"/>
- <source>Case Sensitive</source>
- <translation>Учитывать регистр</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+254"/>
- <source>Close Other Tabs</source>
- <translation>Закрыть остальные вкладки</translation>
- </message>
- <message>
- <location line="-1"/>
- <source>Close Tab</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location line="-244"/>
- <source>Close page</source>
- <translation>Закрыть вкладку</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation>Новая вкладка</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui" line="-19"/>
- <source>Next</source>
- <translation>Следующее</translation>
- </message>
- <message>
- <location line="-22"/>
- <source>Previous</source>
- <translation>Предыдущее</translation>
- </message>
- <message>
- <location line="-62"/>
- <source>Untitled</source>
- <translation>Безымянный</translation>
- </message>
- <message>
- <location line="+110"/>
- <source>Whole words</source>
- <translation>Слова целиком</translation>
- </message>
- <message>
- <location line="-123"/>
- <source>TabbedBrowser</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui" line="+149"/>
- <source>&amp;Close</source>
- <translation>&amp;Закрыть</translation>
- </message>
- <message>
- <location line="-16"/>
- <source>&amp;Display</source>
- <translation>&amp;Показать</translation>
- </message>
- <message>
- <location line="-53"/>
- <source>&amp;Topics</source>
- <translation>&amp;Разделы</translation>
- </message>
- <message>
- <location line="-27"/>
- <source>Choose Topic</source>
- <translation>Выбор раздела</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>Выберите раздел для &lt;b&gt;%1&lt;/b&gt;</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui" line="+93"/>
- <source>Close the Dialog.</source>
- <translation>Закрыть диалог.</translation>
- </message>
- <message>
- <location line="-56"/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>Показывает список доступных разделов справки, найденных по ключевому слову.</translation>
- </message>
- <message>
- <location line="+40"/>
- <source>Open the topic selected in the list.</source>
- <translation>Открыть выбранный раздел.</translation>
- </message>
- <message>
- <location line="-74"/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>Выберите раздел из списка и нажмите на кнопку &lt;b&gt;Показать&lt;/b&gt; для открытия онлайн справки.</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_zh_CN.ts b/translations/assistant_adp_zh_CN.ts
deleted file mode 100644
index 2d8d85c9..0000000
--- a/translations/assistant_adp_zh_CN.ts
+++ /dev/null
@@ -1,999 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="zh_CN">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>绑定到端口%1失败</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>字体</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>书写系统(&amp;W)</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>字体族(&amp;F)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>风格(&amp;S)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>点大小(&amp;P)</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>字体设置</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>字体设置用于:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>浏览器</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>应用程序</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>使用自定义设置</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+279"/>
- <source>Open Link in Current Tab</source>
- <translation>在当前标签页打开链接</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>在新窗口中打开链接</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>在新标签页中打开链接</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>准备...</translation>
- </message>
- <message>
- <location line="-64"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="-677"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>加载关键词索引文件失败
-Qt 助手将不能工作!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>无法打开索引文件 %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>文档文件 %1 不存在!
-跳过文件。</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>解析错误</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>%1 文档文件不兼容!
-跳过文件!</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完成</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>保存全文搜索索引失败 Qt 助手将不能工作!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>正在索引文件...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>正在读取词典...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文搜索</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>不允许在短语中使用通配符。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>缺少关闭标点。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>帮助</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;帮助&lt;/b&gt;&lt;p&gt;在内容列表中选择您需要帮助的主题,或者在索引中搜索这个关键词。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>按种类、索引和标签显示帮助主题。另一个标签页中可以执行全文搜索。</translation>
- </message>
- <message>
- <location/>
- <source>Con&amp;tents</source>
- <translation>内容(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;按种类组织帮助主题。&lt;/b&gt;&lt;p&gt;双击一项可以查看那个种类中的主题。要查看一个主题,只要双击它就可以了。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>列 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>索引(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>查找(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>输入关键词</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;输入一个关键词。&lt;/b&gt;&lt;p&gt;这个列表将会选择一个和已输入字符串最匹配的一项。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;可用的帮助主题列表。&lt;/b&gt;&lt;p&gt;双击一项打开它的帮助页面。如果找到一个以上的结果,你必须指定你想要打开哪一个。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>书签(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>显示书签列表。</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>添加新书签</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>把当前显示的页面添加为一个新书签。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>新建(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>删除书签</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>删除被选中的书签。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>删除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>搜索(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>正在搜索(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>输入搜索词。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;输入搜索词。&lt;b&gt;&lt;p&gt;在这里输入您要查找的词。这个词可以包含通配符(*)。如果是一个词的序列,请把它们放在英文引号内。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;发现文档&lt;/b&gt;&lt;p&gt;这个列表包含上此搜索发现的所有文档。这些文档已经排序,例如,第一个文档最为匹配。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>找到的文档(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>显示帮助页面。</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>显示全文文本搜索的帮助页面。</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>帮助(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>开始搜索。</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>点击这个按钮开始搜索。</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>正在准备...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>%n 个文档已经找到。</numerusform>
- </translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>帮助</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Unable to launch web browser.
-</source>
- <translation>不能启动网页浏览器。
-</translation>
- </message>
- <message>
- <location line="+28"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>打开链接失败:“%1”</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;没有找到这个页面&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;“%1”&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>错误...</translation>
- </message>
- <message>
- <location line="+61"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>在新窗口中打开链接 Shift+LMB</translation>
- </message>
- <message>
- <location line="-2"/>
- <source>Open Link in New Tab</source>
- <translation>在新标签页中打开链接</translation>
- </message>
- <message>
- <location line="-89"/>
- <source>OK</source>
- <translation>确定</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Copy &amp;Link Location</source>
- <translation>复制链接地址(&amp;L)</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>未命名的</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+103"/>
- <source>Sidebar</source>
- <translation>侧栏</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>窗口(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最小化</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Initializing Qt Assistant...</source>
- <translation>正在初始化 Qt 助手...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>视图</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>显示一个指定文档集的主页面。</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">开源版本</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">这个版本的 Qt 助手是 Qt 开源版本的一部分,用于开发开源应用程序。Qt 是一个用于跨平台应用程序开发的综合 C++ 框架。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">我们已经允许您在 Qt 商业许可协议下使用本程序。有关细节,请阅读本软件发行中所带的 LICENSE 文件。</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt 助手</translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>在“%1”文件中打开应用程序内容失败</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>保存页面</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>不能写打开文件!</translation>
- </message>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech 的 Qt 助手</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt助手 - Nokia</translation>
- </message>
- <message>
- <location/>
- <source>Toolbar</source>
- <translation>工具栏</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>前往</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>帮助(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>文件(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>书签(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>前往(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>查看(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>编辑(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>打印(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>打印当前显示页面。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>退出(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>退出 Qt 助手。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>复制(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>复制选中的文本到剪贴板。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>在文本中查找(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>打开查找对话框。Qt 助手将会在当前显示页面中搜索您输入的文本。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>查找下一个(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>查找上一个(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>主页(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>前往主页。Qt 助手的主页就是 Qt 参考文档。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>上一页(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>前往上一页。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>下一页(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>前往下一页。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>关于 Qt 助手</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>显示有关 Qt 助手的更多信息。</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>关于 Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>放大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>放大文档,也就是增大字体大小。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>缩小(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>缩小文档,也就是减小字体大小。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>新建窗口</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>打开一个新窗口。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>关闭(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>关闭当前窗口。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Add Bookmark</source>
- <translation>添加书签(&amp;A)</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>把当前显示页面添加为一个新书签。</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>这是什么?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>“这是什么?”上下文敏感帮助。</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>添加标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>下一个标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>前一个标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>关闭标签页</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt 助手手册</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>页面另存为...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>同步目录</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>选择内容标签页中的页面。</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>字体设置...</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">开发商业(闭源)应用程序,你需要商业 Qt 许可。对于 Qt 许可的概览,请参考&lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt;。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt %1 License Agreement. For details, see the license file that came with this software distribution.</source>
- <translation type="obsolete">我们已经允许您在 Qt %1 许可协议下使用本程序。有关细节,请阅读本软件发行中所带的许可协议文件。</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Trolltech 的 Qt 助手</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Qt助手 - Nokia</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>添加页面</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>关闭页面</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>标签页浏览器</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>未命名的</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>上一个</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>下一个</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>区分大小写</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>整词</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;搜索已经回环</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+243"/>
- <source>New Tab</source>
- <translation>新标签页</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>关闭标签页</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>关闭其它标签页</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>为&lt;b&gt;%1&lt;/b&gt;选择一个主题</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>选择主题</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>从列表中选择一个主题并且点击&lt;b&gt;显示&lt;/b&gt;按钮打开在线帮助。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>主题(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>为这个关键词显示一个可用帮助主题的列表。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>显示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>打开列表中选中的主题。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>关闭(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>关闭对话框。</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/assistant_adp_zh_TW.ts b/translations/assistant_adp_zh_TW.ts
deleted file mode 100644
index d622d11..0000000
--- a/translations/assistant_adp_zh_TW.ts
+++ /dev/null
@@ -1,1000 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.0" language="zh_TW">
-<context>
- <name>AssistantServer</name>
- <message>
- <location filename="../tools/assistant/compat/main.cpp" line="+225"/>
- <source>Qt Assistant</source>
- <translation>Qt 小幫手</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Failed to bind to port %1</source>
- <translation>無法結合連接埠 %1</translation>
- </message>
-</context>
-<context>
- <name>FontPanel</name>
- <message>
- <location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
- <source>Font</source>
- <translation>字型</translation>
- </message>
- <message>
- <location line="+11"/>
- <source>&amp;Writing system</source>
- <translation>寫入系統(&amp;W)</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Family</source>
- <translation>家族(&amp;F)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Style</source>
- <translation>風格(&amp;S)</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>&amp;Point size</source>
- <translation>點大小(&amp;P)</translation>
- </message>
-</context>
-<context>
- <name>FontSettingsDialog</name>
- <message>
- <location filename="../tools/assistant/compat/fontsettingsdialog.cpp" line="+63"/>
- <source>Font Settings</source>
- <translation>字型設定</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Font settings for:</source>
- <translation>字型設定用於:</translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Browser</source>
- <translation>瀏覽器</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Application</source>
- <translation>應用程式</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Use custom settings</source>
- <translation>使用者自訂設定</translation>
- </message>
-</context>
-<context>
- <name>HelpDialog</name>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Con&amp;tents</source>
- <translation>內容(&amp;T)</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+376"/>
- <location line="+16"/>
- <location line="+661"/>
- <source>Qt Assistant</source>
- <translation>Qt 小幫手</translation>
- </message>
- <message>
- <location line="-774"/>
- <source>Open Link in Current Tab</source>
- <translation>在目前的分頁開啟連結</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Window</source>
- <translation>在新視窗開啟連結</translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Open Link in New Tab</source>
- <translation>在新分頁開啟連結</translation>
- </message>
- <message>
- <location line="+73"/>
- <location line="+82"/>
- <source>Prepare...</source>
- <translation>準備中...</translation>
- </message>
- <message>
- <location line="-64"/>
- <source>Failed to load keyword index file
-Assistant will not work!</source>
- <translation>無法載入關鍵字索引檔
-小幫手將無法運作!</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Cannot open the index file %1</source>
- <translation>無法開啟索引檔 %1</translation>
- </message>
- <message>
- <location line="+58"/>
- <location line="+124"/>
- <location line="+8"/>
- <source>Warning</source>
- <translation>警告</translation>
- </message>
- <message>
- <location line="-131"/>
- <location line="+124"/>
- <source>Documentation file %1 does not exist!
-Skipping file.</source>
- <translation>文件檔 %1 不存在
-將跳過此檔案。</translation>
- </message>
- <message>
- <location line="-112"/>
- <location line="+133"/>
- <source>Parse Error</source>
- <translation>剖析錯誤</translation>
- </message>
- <message>
- <location line="-13"/>
- <source>Documentation file %1 is not compatible!
-Skipping file.</source>
- <translation>文件檔 %1 不相容
-將跳過此檔案。</translation>
- </message>
- <message>
- <location line="+48"/>
- <location line="+469"/>
- <source>Done</source>
- <translation>完成</translation>
- </message>
- <message>
- <location line="-47"/>
- <source>Failed to save fulltext search index
-Assistant will not work!</source>
- <translation>無法儲存全文檢索搜尋索引。
-小幫手將無法運作!</translation>
- </message>
- <message>
- <location line="+29"/>
- <source>Indexing files...</source>
- <translation>建立檔案索引中...</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Reading dictionary...</source>
- <translation>讀取字典中...</translation>
- </message>
- <message>
- <location line="+46"/>
- <location line="+9"/>
- <source>Full Text Search</source>
- <translation>全文檢索</translation>
- </message>
- <message>
- <location line="-8"/>
- <source>Using a wildcard within phrases is not allowed.</source>
- <translation>在片語中不能使用萬用字元。</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The closing quotation mark is missing.</source>
- <translation>沒有關閉引號。</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/helpdialog.ui"/>
- <source>Help</source>
- <translation>說明</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help&lt;/b&gt;&lt;p&gt;Choose the topic you want help on from the contents list, or search the index for keywords.&lt;/p&gt;</source>
- <translation>&lt;b&gt;說明&lt;/b&gt;&lt;p&gt;請從內容清單中選擇您需要說明的主題,或是在索引中搜尋關鍵字。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Displays help topics organized by category, index or bookmarks. Another tab inherits the full text search.</source>
- <translation>依分類、索引或書籤來顯示說明主題。另一個分頁會繼承此全文檢索。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Help topics organized by category.&lt;/b&gt;&lt;p&gt;Double-click an item to see the topics in that category. To view a topic, just double-click it.&lt;/p&gt;</source>
- <translation>&lt;b&gt;依類別組織說明主題。&lt;/b&gt;&lt;p&gt;雙擊可以查看該類別中有哪些主題。雙擊該主題可以查看內容。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>column 1</source>
- <translation>欄 1</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Index</source>
- <translation>索引(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Look For:</source>
- <translation>搜尋(&amp;L):</translation>
- </message>
- <message>
- <location/>
- <source>Enter keyword</source>
- <translation>輸入關鍵字</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter a keyword.&lt;/b&gt;&lt;p&gt;The list will select an item that matches the entered string best.&lt;/p&gt;</source>
- <translation>&lt;b&gt;輸入關鍵字。&lt;/b&gt;&lt;p&gt;此清單可以選擇最能符合輸入字串的項目。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;List of available help topics.&lt;/b&gt;&lt;p&gt;Double-click on an item to open its help page. If more than one is found, you must specify which page you want.&lt;/p&gt;</source>
- <translation>&lt;b&gt;可用說明主題清單。&lt;/b&gt;&lt;p&gt;雙擊可以開啟該說明頁面。如果找到一個以上,您必須指定您要看哪一個頁面。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Bookmarks</source>
- <translation>書籤(&amp;B)</translation>
- </message>
- <message>
- <location/>
- <source>Displays the list of bookmarks.</source>
- <translation>顯示書籤的清單。</translation>
- </message>
- <message>
- <location/>
- <source>Add new bookmark</source>
- <translation>新增書籤</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>將目前顯示的頁面新增到書籤中。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;New</source>
- <translation>新增(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>Delete bookmark</source>
- <translation>刪除書籤</translation>
- </message>
- <message>
- <location/>
- <source>Delete the selected bookmark.</source>
- <translation>刪除選取的書籤。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Delete</source>
- <translation>刪除(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Search</source>
- <translation>搜尋(&amp;S)</translation>
- </message>
- <message>
- <location/>
- <source>Searching f&amp;or:</source>
- <translation>搜尋內容(&amp;O):</translation>
- </message>
- <message>
- <location/>
- <source>Enter searchword(s).</source>
- <translation>請輸入搜尋關鍵字詞。</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Enter search word(s).&lt;/b&gt;&lt;p&gt;Enter here the word(s) you are looking for. The words may contain wildcards (*). For a sequence of words quote them.&lt;/p&gt;</source>
- <translation>&lt;b&gt;輸入搜尋關鍵字詞。&lt;/b&gt;&lt;p&gt;在此輸入您要搜尋的關鍵字詞。可以使用萬用字元 (*)。如果是一個片語,請用引號括起來。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>&lt;b&gt;Found documents&lt;/b&gt;&lt;p&gt;This list contains all found documents from the last search. The documents are ordered, i.e. the first document has the most matches.&lt;/p&gt;</source>
- <translation>&lt;b&gt;找到的文件&lt;/b&gt;&lt;p&gt;這放清單包含了所有上次搜尋找到的文件。文件會依符合程度排序。&lt;/p&gt;</translation>
- </message>
- <message>
- <location/>
- <source>Found &amp;Documents:</source>
- <translation>找到的文件(&amp;D):</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page.</source>
- <translation>顯示說明頁面。</translation>
- </message>
- <message>
- <location/>
- <source>Display the help page for the full text search.</source>
- <translation>顯示全文檢索的說明頁面。</translation>
- </message>
- <message>
- <location/>
- <source>He&amp;lp</source>
- <translation>說明(&amp;L)</translation>
- </message>
- <message>
- <location/>
- <source>Start searching.</source>
- <translation>開始搜尋。</translation>
- </message>
- <message>
- <location/>
- <source>Pressing this button starts the search.</source>
- <translation>按下此按鍵開始搜尋。</translation>
- </message>
- <message>
- <location/>
- <source>Preparing...</source>
- <translation>準備中...</translation>
- </message>
- <message numerus="yes">
- <location filename="../tools/assistant/compat/helpdialog.cpp" line="+7"/>
- <source>%n document(s) found.</source>
- <translation>
- <numerusform>找到 %n 個文件。</numerusform>
- </translation>
- </message>
-</context>
-<context>
- <name>HelpWindow</name>
- <message>
- <location filename="../tools/assistant/compat/helpwindow.cpp" line="+97"/>
- <source>Help</source>
- <translation>說明</translation>
- </message>
- <message>
- <location line="+93"/>
- <source>Open Link in New Window Shift+LMB</source>
- <translation>在新視窗開啟連結 Shift+滑鼠左鍵</translation>
- </message>
- <message>
- <location line="-92"/>
- <source>Unable to launch web browser.
-</source>
- <translation>無法啟動瀏覽器。
-</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>OK</source>
- <translation>確定</translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Failed to open link: &apos;%1&apos;</source>
- <translation>無法開啟連結:%1</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation>&lt;div align=&quot;center&quot;&gt;&lt;h1&gt;找不到該頁面&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;%1&lt;/h3&gt;&lt;/div&gt;</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Error...</source>
- <translation>錯誤...</translation>
- </message>
- <message>
- <location line="+59"/>
- <source>Open Link in New Tab</source>
- <translation>在新分頁開啟連結</translation>
- </message>
- <message>
- <location line="-3"/>
- <source>Copy &amp;Link Location</source>
- <translation>複製連結位置(&amp;L)</translation>
- </message>
-</context>
-<context>
- <name>Index</name>
- <message>
- <location filename="../tools/assistant/compat/index.cpp" line="+385"/>
- <source>Untitled</source>
- <translation>未命名</translation>
- </message>
-</context>
-<context>
- <name>MainWindow</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Qt 小幫手,Trolltech 公司提供</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Toolbar</source>
- <translation>工具列</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Print...</source>
- <translation>列印(&amp;P)...</translation>
- </message>
- <message>
- <location/>
- <source>E&amp;xit</source>
- <translation>離開(&amp;X)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Copy</source>
- <translation>複製(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Find in Text...</source>
- <translation>在文字中尋找(&amp;F)...</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Home</source>
- <translation>首頁(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Previous</source>
- <translation>前一個(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Next</source>
- <translation>下一個(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>About Qt</source>
- <translation>關於 Qt</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;in</source>
- <translation>放大(&amp;I)</translation>
- </message>
- <message>
- <location/>
- <source>Zoom &amp;out</source>
- <translation>縮小(&amp;O)</translation>
- </message>
- <message>
- <location/>
- <source>New Window</source>
- <translation>新視窗</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+188"/>
- <source>Ctrl+T</source>
- <translation>Ctrl+T</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+I</source>
- <translation>Ctrl+I</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+B</source>
- <translation>Ctrl+B</translation>
- </message>
- <message>
- <location line="+139"/>
- <location line="+1"/>
- <source>Qt Assistant</source>
- <translation>Qt 小幫手</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>&amp;Add Bookmark</source>
- <translation>新增書籤(&amp;A)</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="-227"/>
- <source>Sidebar</source>
- <translation>邊列</translation>
- </message>
- <message>
- <location line="+18"/>
- <source>&amp;Window</source>
- <translation>視窗(&amp;W)</translation>
- </message>
- <message>
- <location line="+2"/>
- <source>Minimize</source>
- <translation>最小化</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+M</source>
- <translation>Ctrl+M</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Initializing Qt Assistant...</source>
- <translation>初始化 Qt 小幫手中...</translation>
- </message>
- <message>
- <location line="+26"/>
- <source>SHIFT+CTRL+=</source>
- <translation>SHIFT+CTRL+=</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Ctrl+S</source>
- <translation>Ctrl+S</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Ctrl+W</source>
- <translation>Ctrl+W</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.cpp" line="+1"/>
- <source>Ctrl+]</source>
- <translation>Ctrl+]</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Ctrl+[</source>
- <translation>Ctrl+[</translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Views</source>
- <translation>檢視</translation>
- </message>
- <message>
- <location line="+80"/>
- <source>Displays the main page of a specific documentation set.</source>
- <translation>顯示指定文件集的主頁面。</translation>
- </message>
- <message>
- <source>Open Source Edition</source>
- <translation type="obsolete">開放源碼版本</translation>
- </message>
- <message>
- <source>This version of Qt Assistant is part of the Qt Open Source Edition, for use in the development of Open Source applications. Qt is a comprehensive C++ framework for cross-platform application development.</source>
- <translation type="obsolete">此版本的 Qt 小幫手是 Qt 開放源碼版本的一部份,只能用於開發開放源碼的應用程式。Qt 為一個跨平台的,強大的 C++ 應用程式開發框架。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt Commercial License Agreement. For details, see the file LICENSE that came with this software distribution.</source>
- <translation type="obsolete">此程式以 Qt 商業授權同意書(Qt Commerical License Agreement)授權給您。詳情請參照 LICENSE 檔。</translation>
- </message>
- <message>
- <location line="+69"/>
- <source>Failed to open about application contents in file: &apos;%1&apos;</source>
- <translation>無法開啟檔案中應用程式的「關於」內容:%1</translation>
- </message>
- <message>
- <location line="+201"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+238"/>
- <location line="+6"/>
- <source>Save Page</source>
- <translation>儲存頁面</translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Cannot open file for writing!</source>
- <translation>無法開啟檔案以寫入!</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/mainwindow.ui"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Nokia 提供的 Qt 小幫手</translation>
- </message>
- <message>
- <location/>
- <source>Go</source>
- <translation>走</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Help</source>
- <translation>說明(&amp;H)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;File</source>
- <translation>檔案(&amp;F)</translation>
- </message>
- <message>
- <location/>
- <source>Boo&amp;kmarks</source>
- <translation>書籤(&amp;K)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Go</source>
- <translation>走(&amp;G)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;View</source>
- <translation>檢視(&amp;V)</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Edit</source>
- <translation>編輯(&amp;E)</translation>
- </message>
- <message>
- <location/>
- <source>Print the currently displayed page.</source>
- <translation>列印目前顯示的頁面。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+P</source>
- <translation>Ctrl+P</translation>
- </message>
- <message>
- <location/>
- <source>Quit Qt Assistant.</source>
- <translation>離開 Qt 小幫手。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Q</source>
- <translation>Ctrl+Q</translation>
- </message>
- <message>
- <location/>
- <source>Copy the selected text to the clipboard.</source>
- <translation>複製選取的文字到剪貼簿中。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+C</source>
- <translation>Ctrl+C</translation>
- </message>
- <message>
- <location/>
- <source>Open the Find dialog. Qt Assistant will search the currently displayed page for the text you enter.</source>
- <translation>開啟「尋找」對話框。Qt 小幫手會在目前顯示的頁面中搜尋您所輸入的文字。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+F</source>
- <translation>Ctrl+F</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Next</source>
- <translation>尋找下一筆(&amp;N)</translation>
- </message>
- <message>
- <location/>
- <source>F3</source>
- <translation>F3</translation>
- </message>
- <message>
- <location/>
- <source>Find &amp;Previous</source>
- <translation>尋找上一筆(&amp;P)</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F3</source>
- <translation>Shift+F3</translation>
- </message>
- <message>
- <location/>
- <source>Go to the home page. Qt Assistant&apos;s home page is the Qt Reference Documentation.</source>
- <translation>回到首頁。Qt 小幫手的首頁為 Qt 參考文件。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Home</source>
- <translation>Ctrl+Home</translation>
- </message>
- <message>
- <location/>
- <source>Go to the previous page.</source>
- <translation>跳到上一頁。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Left</source>
- <translation>Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Go to the next page.</source>
- <translation>跳到下一頁。</translation>
- </message>
- <message>
- <location/>
- <source>Alt+Right</source>
- <translation>Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>About Qt Assistant</source>
- <translation>關於 Qt 小幫手</translation>
- </message>
- <message>
- <location/>
- <source>Display further information about Qt Assistant.</source>
- <translation>顯示關於 Qt 小幫手的詳情。</translation>
- </message>
- <message>
- <location/>
- <source>Zoom in on the document, i.e. increase the font size.</source>
- <translation>放大文件,也就是加大字型。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl++</source>
- <translation>Ctrl++</translation>
- </message>
- <message>
- <location/>
- <source>Zoom out on the document, i.e. decrease the font size.</source>
- <translation>縮小文件,也就是縮小字型。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+-</source>
- <translation>Ctrl+-</translation>
- </message>
- <message>
- <location/>
- <source>Open a new window.</source>
- <translation>開啟新視窗。</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+N</source>
- <translation>Ctrl+N</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>關閉(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the current window.</source>
- <translation>關閉目前的視窗。</translation>
- </message>
- <message>
- <location/>
- <source>Add the currently displayed page as a new bookmark.</source>
- <translation>將目前顯示的頁面新增到書籤中。</translation>
- </message>
- <message>
- <location/>
- <source>What&apos;s This?</source>
- <translation>這是什麼?</translation>
- </message>
- <message>
- <location/>
- <source>&quot;What&apos;s This?&quot; context sensitive help.</source>
- <translation>「這是什麼?」內文說明。</translation>
- </message>
- <message>
- <location/>
- <source>Shift+F1</source>
- <translation>Shift+F1</translation>
- </message>
- <message>
- <location/>
- <source>Add Tab</source>
- <translation>新增分頁</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+N</source>
- <translation>Ctrl+Alt+N</translation>
- </message>
- <message>
- <location/>
- <source>Next Tab</source>
- <translation>下一個分頁</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Right</source>
- <translation>Ctrl+Alt+Right</translation>
- </message>
- <message>
- <location/>
- <source>Previous Tab</source>
- <translation>前一個分頁</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Left</source>
- <translation>Ctrl+Alt+Left</translation>
- </message>
- <message>
- <location/>
- <source>Close Tab</source>
- <translation>關閉分頁</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+Q</source>
- <translation>Ctrl+Alt+Q</translation>
- </message>
- <message>
- <location/>
- <source>Qt Assistant Manual</source>
- <translation>Qt 小幫手手冊</translation>
- </message>
- <message>
- <location/>
- <source>F1</source>
- <translation>F1</translation>
- </message>
- <message>
- <location/>
- <source>Save Page As...</source>
- <translation>另存頁面為...</translation>
- </message>
- <message>
- <location/>
- <source>Ctrl+Alt+S</source>
- <translation>Ctrl+Alt+S</translation>
- </message>
- <message>
- <location/>
- <source>Sync with Table of Contents</source>
- <translation>與目錄同步</translation>
- </message>
- <message>
- <location/>
- <source>Select the page in contents tab.</source>
- <translation>選擇在內容分頁中的頁面。</translation>
- </message>
- <message>
- <location/>
- <source>Font Settings...</source>
- <translation>字型設定...</translation>
- </message>
- <message>
- <source>You need a commercial Qt license for development of proprietary (closed source) applications. Please see &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt; for an overview of Qt licensing.</source>
- <translation type="obsolete">您需要商業版的 Qt 授權才能發展私有(封閉)應用程式軟體。關於 Qt 授權的概要,請參考 &lt;a href=&quot;http://qt.nokia.com/company/model&quot;&gt;qt.nokia.com/company/model&lt;/a&gt;。</translation>
- </message>
- <message>
- <source>This program is licensed to you under the terms of the Qt %1 License Agreement. For details, see the license file that came with this software distribution.</source>
- <translation type="obsolete">此程式以 Qt %1 授權同意書授權給您。詳情請參照套件中的授權檔。</translation>
- </message>
-</context>
-<context>
- <name>QObject</name>
- <message>
- <source>Qt Assistant by Trolltech</source>
- <translation type="obsolete">Qt 小幫手,Trolltech 公司提供</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/config.cpp" line="+350"/>
- <source>Qt Assistant by Nokia</source>
- <translation>Nokia 提供的 Qt 小幫手</translation>
- </message>
-</context>
-<context>
- <name>TabbedBrowser</name>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.cpp" line="+149"/>
- <source>...</source>
- <translation>...</translation>
- </message>
- <message>
- <location line="+86"/>
- <source>Add page</source>
- <translation>新增頁面</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Close page</source>
- <translation>關閉頁面</translation>
- </message>
- <message>
- <location line="+243"/>
- <source>New Tab</source>
- <translation>新增分頁</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Tab</source>
- <translation>關閉分頁</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Close Other Tabs</source>
- <translation>關閉其他分頁</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/tabbedbrowser.ui"/>
- <source>TabbedBrowser</source>
- <translation>分頁式瀏覽器</translation>
- </message>
- <message>
- <location/>
- <source>Untitled</source>
- <translation>未命名</translation>
- </message>
- <message>
- <location/>
- <source>Previous</source>
- <translation>前一個</translation>
- </message>
- <message>
- <location/>
- <source>Next</source>
- <translation>下一個</translation>
- </message>
- <message>
- <location/>
- <source>Case Sensitive</source>
- <translation>區分大小寫</translation>
- </message>
- <message>
- <location/>
- <source>Whole words</source>
- <translation>整個字詞</translation>
- </message>
- <message>
- <location/>
- <source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;搜尋已折回</translation>
- </message>
-</context>
-<context>
- <name>TopicChooser</name>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.cpp" line="+56"/>
- <source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;</source>
- <translation>請為 &lt;b&gt;%1&lt;/b&gt; 選擇一個主題</translation>
- </message>
- <message>
- <location filename="../tools/assistant/compat/topicchooser.ui"/>
- <source>Choose Topic</source>
- <translation>選擇主題</translation>
- </message>
- <message>
- <location/>
- <source>Select a topic from the list and click the &lt;b&gt;Display&lt;/b&gt;-button to open the online help.</source>
- <translation>請從清單中選取一個主題,並按下「顯示」鍵開啟線上說明。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Topics</source>
- <translation>主題(&amp;T)</translation>
- </message>
- <message>
- <location/>
- <source>Displays a list of available help topics for the keyword.</source>
- <translation>顯示此關鍵字可用的說明主題。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Display</source>
- <translation>顯示(&amp;D)</translation>
- </message>
- <message>
- <location/>
- <source>Open the topic selected in the list.</source>
- <translation>開啟在清單中選取的主題。</translation>
- </message>
- <message>
- <location/>
- <source>&amp;Close</source>
- <translation>關閉(&amp;C)</translation>
- </message>
- <message>
- <location/>
- <source>Close the Dialog.</source>
- <translation>關閉對話框。</translation>
- </message>
-</context>
-</TS>
diff --git a/translations/translations.pri b/translations/translations.pri
index c77876a..aa5430f 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -67,16 +67,11 @@ qm-linguist.depends = sub-tools
ts-assistant.commands = (cd $$QT_SOURCE_TREE/src && $$LUPDATE \
../tools/assistant/translations/translations.pro \
&& $$LUPDATE \
- ../tools/assistant/translations/qt_help.pro \
- && $$LUPDATE \
- ../tools/assistant/translations/translations_adp.pro)
+ ../tools/assistant/translations/qt_help.pro))
ts-assistant.depends = sub-tools
qm-assistant.commands = ($$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/translations.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro \
- && $$LRELEASE \
- $$QT_SOURCE_TREE/tools/assistant/translations/translations_adp.pro)
+ && $$LRELEASE $$QT_SOURCE_TREE/tools/assistant/translations/qt_help.pro)
qm-assistant.depends = sub-tools
###### Qtconfig