Source

Target

Commits (5)
Showing with 87 additions and 67 deletions
...@@ -56,7 +56,10 @@ for(_, $$list(_)) { # just a way to break easily ...@@ -56,7 +56,10 @@ for(_, $$list(_)) { # just a way to break easily
} }
} }
isEmpty(LLVM_INSTALL_DIR): LLVM_INSTALL_DIR = $$(LLVM_INSTALL_DIR) isEmpty(LLVM_INSTALL_DIR): LLVM_INSTALL_DIR = $$(LLVM_INSTALL_DIR)
# Assume libclang is installed on the target system
isEmpty(LLVM_INSTALL_DIR): LLVM_INSTALL_DIR = $$system("llvm-config --prefix")
LLVM_INSTALL_DIR = $$clean_path($$LLVM_INSTALL_DIR) LLVM_INSTALL_DIR = $$clean_path($$LLVM_INSTALL_DIR)
contains(QMAKE_HOST.arch, x86_64): \ contains(QMAKE_HOST.arch, x86_64): \
clangInstallDir = $$replace(LLVM_INSTALL_DIR, _ARCH_, 64) clangInstallDir = $$replace(LLVM_INSTALL_DIR, _ARCH_, 64)
else: \ else: \
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
\keyword help system \keyword help system
These classes provide for all forms of online-help in your application, These classes provide online-help for your application,
with three levels of detail: with three levels of detail:
\list 1 \list 1
...@@ -226,13 +226,13 @@ ...@@ -226,13 +226,13 @@
compressed help file. Along with the actual help data, like compressed help file. Along with the actual help data, like
the table of contents, index keywords and help documents, it the table of contents, index keywords and help documents, it
contains some extra information like a namespace to identify contains some extra information like a namespace to identify
the help file. One help project stands for one documentation, the help file. One help project stands for one documentation set,
for example the \l{Qt Assistant Manual}. for example the \l{Qt Assistant Manual}.
\section1 Qt Help Project File Format \section1 Qt Help Project File Format
The file format is XML-based. For a better understanding of The file format is XML-based. For a better understanding of
the format we'll discuss the following example: the format we will discuss the following example:
\snippet doc_src_qthelp.qdoc 7 \snippet doc_src_qthelp.qdoc 7
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
To enable the QHelpEngine to retrieve the proper documentation to To enable the QHelpEngine to retrieve the proper documentation to
a given link, every documentation set has to have a unique a given link, every documentation set has to have a unique
identifier. A unique identifier makes is also possible for the identifier. A unique identifier also makes it possible for the
help collection to keep track of a documentation set without relying help collection to keep track of a documentation set without relying
on its file name. The Qt help system uses a namespace as identifier on its file name. The Qt help system uses a namespace as identifier
which is defined by the mandatory namespace tags. In the example which is defined by the mandatory namespace tags. In the example
...@@ -249,50 +249,49 @@ ...@@ -249,50 +249,49 @@
\target Virtual Folders \target Virtual Folders
\section2 Virtual Folders \section2 Virtual Folders
Having a namespace for every documentation naturally means that Having a namespace for every documentation set naturally means that
the documentation sets are quite separated. From the help engines the documentation sets are quite separated. From the help engine's
point of view this is beneficial, but from the documentors view point of view, this is beneficial. However, from the writer's view
it is often desirable to cross reference certain topic from one it is often desirable to cross reference certain topics from one
manual to another without having to specify absolute links. To manual to another without having to specify absolute links. To
solve this problem, the help system introduced the concept of solve this problem, the help system introduced the concept of
virtual folders. virtual folders.
A virtual folder will become the root directory of all files A virtual folder will become the root directory of all files
referenced in a compressed help file. When two documentations referenced in a compressed help file. When two documentation sets
share the same virtual folder, they can use relative paths when share the same virtual folder, they can use relative paths when
defining hyperlinks pointing to the other documentation. If a defining hyperlinks pointing to each other. If a file is contained
file is contained in both documentations or manuals, the one in both documentation sets, the one from the current set has
from the current manual has precedence over the other. precedence over the other.
\snippet doc_src_qthelp.qdoc 8 \snippet doc_src_qthelp.qdoc 8
The above example specifies 'doc' as virtual folder. If another The above example specifies \e doc as virtual folder. If another
manual, e.g. for a small helper tool for 'My Application' manual specifies the same folder, for example for a small helper
specifies the same folder, it is sufficient to write tool \e {My Application}, it is sufficient to write
'doc.html#section1' to reference the first section in the \e {doc.html#section1} to reference the first section in the
'My Application' manual. \e {My Application} manual.
The virtual folder tag is mandatory and the folder must not The virtual folder tag is mandatory and the folder name must not
contain any '/'. contain any slashes (/).
\target Custom Filters \target Custom Filters
\section2 Custom Filters \section2 Custom Filters
Next in the Qt help project file are the optional definitions of The Qt help project file contains optional definitions of
custom filters. A custom filter contains a list of filter custom filters. A custom filter contains a list of filter
attributes which will be used later to display only the documentation attributes which will be used later to display only the documentation
which has all those attributes assigned to. So, when setting the set that has all those attributes assigned. So, when setting the
current filter in the QHelpEngine to "My Application 1.0" only current filter in the QHelpEngine to \e {My Application 1.0} only
the documentation which has "myapp" and "1.0" set as filter the documentation which has \e myapp and \e {1.0} set as filter
attributes will be shown. attributes will be shown.
\snippet doc_src_qthelp.qdoc 9 \snippet doc_src_qthelp.qdoc 9
It is possible to define any number of custom filters in a help You can define any number of custom filters in a help project file.
project file. Important to know is, that the filter attributes have It is important to know that you do not have to specify the filter
not to be specified in the same project file; they can be defined attributes in the same project file. These attributes can be defined
in any other help file. The definition of a filter attributes in any help file, in a filter section.
takes place by specifying them in a filter section.
\target Filter Section \target Filter Section
\section2 Filter Section \section2 Filter Section
...@@ -302,7 +301,7 @@ ...@@ -302,7 +301,7 @@
consists of four parts, the filter attributes section, the table of consists of four parts, the filter attributes section, the table of
contents, the keywords and the files list. In theory all parts are contents, the keywords and the files list. In theory all parts are
optional but not specifying anything there will result in an empty optional but not specifying anything there will result in an empty
documentation. documentation set.
\section3 Filter Attributes \section3 Filter Attributes
...@@ -314,22 +313,22 @@ ...@@ -314,22 +313,22 @@
\snippet doc_src_qthelp.qdoc 10 \snippet doc_src_qthelp.qdoc 10
In this case, the filter attributes 'myapp' and '1.0' are assigned In this case, the filter attributes \e myapp and \e {1.0} are assigned to
to the filter section, i.e. all contents specified in this section the filter section. This means that all contents specified in this section
will only be shown if the current custom filter has 'myapp' or '1.0' will only be shown if the current custom filter has \e myapp or \e {1.0},
or both as filter attributes. or both, as filter attributes.
\section3 Table of contents \section3 Table of Contents
\snippet doc_src_qthelp.qdoc 11 \snippet doc_src_qthelp.qdoc 11
One section tag represents one item in the table of contents. The One section tag represents one item in the table of contents. The
sections can be nested to any degree, but from a users perspective sections can be nested to any degree, but from a user's perspective
it should not be more than four or five levels. A section is defined it should not be more than four or five levels. A section is defined
by its title and reference. The reference, like all file references in a Qt by its title and reference. The reference, like all file references in a Qt
help project, are relative to the help project file itself. help project, are relative to the help project file itself.
\note The referenced files must be inside the same directory (or within a \note The referenced files must be in the same directory as the help
subdirectory) as the help project file. An absolute file path is not supported project file (or in a subdirectory). An absolute file path is not supported
either. either.
\section3 Keywords \section3 Keywords
...@@ -338,25 +337,25 @@ ...@@ -338,25 +337,25 @@
The keyword section lists all keywords of this filter section. A The keyword section lists all keywords of this filter section. A
keyword consists basically of a name and a file reference. If the keyword consists basically of a name and a file reference. If the
attribute 'name' is used then the keyword specified there will appear in attribute \e name is used, the keyword specified there will appear in the
the visible index, i.e. it will be accessible through the QHelpIndexModel. visible index. That is, it will be accessible through the QHelpIndexModel
If 'id' is used, the keyword does not appear in the index and is class. If \e id is used, the keyword does not appear in the index and is
only accessible via the linksForIdentifier() function of the only accessible via \l QHelpEngineCore::linksForIdentifier(). \e name and
QHelpEngineCore. 'name' and 'id' can be specified at the same time. \e id can be specified at the same time.
\section3 Files \section3 Files
\snippet doc_src_qthelp.qdoc 13 \snippet doc_src_qthelp.qdoc 13
Finally, the actual documentation files have to be listed. Make sure Finally, the actual documentation files have to be listed. Make sure
that all files necessary to display the help are mentioned, i.e. that all files necessary to display the help are mentioned. That is,
stylesheets or similar files need to be there as well. The files, like all stylesheets or similar files need to be listed as well. The files, like all
file references in a Qt help project, are relative to the help project file file references in a Qt help project, are relative to the help project file
itself. As the example shows, files (but not directories) can also be itself. As the example shows, files (but not directories) can also be
specified as patterns using wildcards. All listed files will be compressed specified as patterns using wildcards. All listed files will be compressed
and written to the Qt compressed help file. So, in the end, one single Qt and written to the Qt compressed help file. So, in the end, one single Qt
help file contains all documentation files along with the contents and help file contains all documentation files along with the contents and
indices. \note The referenced files must be inside the same directory indices. \note The referenced files must be inside the same directory
(or within a subdirectory) as the help project file. An absolute file path as the help project file (or in a subdirectory). An absolute file path
is not supported either. is not supported either.
*/ */
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include <QtWidgets/qpushbutton.h> #include <QtWidgets/qpushbutton.h>
#include <QtWidgets/qstylefactory.h> #include <QtWidgets/qstylefactory.h>
#include <QtGui/qfontdatabase.h> #include <QtGui/qfontdatabase.h>
#include <QtGui/qvalidator.h>
#include <QtCore/qfileinfo.h> #include <QtCore/qfileinfo.h>
#include <QtCore/qfile.h> #include <QtCore/qfile.h>
...@@ -55,7 +56,6 @@ template <class IntIterator> ...@@ -55,7 +56,6 @@ template <class IntIterator>
static void populateNumericCombo(IntIterator i1, IntIterator i2, QComboBox *cb) static void populateNumericCombo(IntIterator i1, IntIterator i2, QComboBox *cb)
{ {
QString s; QString s;
cb->setEditable(false);
for ( ; i1 != i2 ; ++i1) { for ( ; i1 != i2 ; ++i1) {
const int n = *i1; const int n = *i1;
s.setNum(n); s.setNum(n);
...@@ -76,6 +76,11 @@ DeviceProfileDialog::DeviceProfileDialog(QDesignerDialogGuiInterface *dlgGui, QW ...@@ -76,6 +76,11 @@ DeviceProfileDialog::DeviceProfileDialog(QDesignerDialogGuiInterface *dlgGui, QW
const QList<int> standardFontSizes = QFontDatabase::standardSizes(); const QList<int> standardFontSizes = QFontDatabase::standardSizes();
populateNumericCombo(standardFontSizes.constBegin(), standardFontSizes.constEnd(), m_ui->m_systemFontSizeCombo); populateNumericCombo(standardFontSizes.constBegin(), standardFontSizes.constEnd(), m_ui->m_systemFontSizeCombo);
// 288pt observed on macOS.
const int maxPointSize = qMax(288, standardFontSizes.constLast());
m_ui->m_systemFontSizeCombo->setValidator(new QIntValidator(1, maxPointSize,
m_ui->m_systemFontSizeCombo));
// Styles // Styles
const QStringList styles = QStyleFactory::keys(); const QStringList styles = QStyleFactory::keys();
m_ui->m_styleCombo->addItem(tr("Default"), QVariant(QString())); m_ui->m_styleCombo->addItem(tr("Default"), QVariant(QString()));
......
...@@ -38,7 +38,11 @@ ...@@ -38,7 +38,11 @@
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="m_systemFontSizeCombo"/> <widget class="QComboBox" name="m_systemFontSizeCombo">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item> </item>
<item row="3" column="0"> <item row="3" column="0">
<widget class="QLabel" name="m_styleLabel"> <widget class="QLabel" name="m_styleLabel">
......
...@@ -632,25 +632,34 @@ ...@@ -632,25 +632,34 @@
\previouspage Getting Started with QDoc \previouspage Getting Started with QDoc
\nextpage Creating QDoc Configuration Files \nextpage Creating QDoc Configuration Files
If you are going to build QDoc from source, the following prerequisites QDoc uses libclang when parsing C++ files as well as function signatures in
apply: \l {fn-command} {\\fn} commands. libclang is part of
\l {https://llvm.org/}{the LLVM Compiler Infrastructure Project}.
If you are going to build QDoc from source, you need to install
\l{http://clang.llvm.org}{LLVM 6.0} or greater first. You can find the
required pre-built binaries
\l {http://releases.llvm.org/download.html}{here}.
The build system uses the tool \c llvm-config to discover the location of
Clang on your system, and relies on it being in the c\ PATH environment
variable. \c llvm-config is commonly installed with Clang and libclang on
Linux systems, and also on macOS if LLVM is installed with Brew. The
installation binaries provided for Windows do not include \c llvm-config,
but requires that you build the debug version of LLVM from source.
If \c llvm-config is not in your \c PATH environment variable, or not
installed on your system, you can still build QDoc, by manually setting the
environment variable \c LLVM_INSTALL_DIR to point to the directory where
LLVM is installed. This directory should be the top level directory. For
example, on a Linux or macOS system with LLVM installed to \c /usr/llvm:
\list 1 \badcode
\li Install \l{http://clang.llvm.org}{LLVM 6.0} or greater. $ export LLVM_INSTALL_DIR=/usr/llvm
The pre-built binaries needed can be found \endcode
\l {http://releases.llvm.org/download.html}{here}.
\li Set the environment variable \c LLVM_INSTALL_DIR to point to the On a Windows system with LLVM installed to \c {C:\Program Files\LLVM}:
directory where LLVM is installed. This should be the top level
directory. For example, on a Linux or macOS system with LLVM \badcode
installed to \c /usr/llvm: C:\> setx LLVM_INSTALL_DIR "C:\Program Files\LLVM"
\badcode \endcode
$ export LLVM_INSTALL_DIR=/usr/llvm
\endcode
On a Windows system with LLVM installed to \c
{C:\Program Files\LLVM}:
\badcode
C:\> setx LLVM_INSTALL_DIR "C:\Program Files\LLVM"
\endcode
\endlist
*/ */