Commit 6d2875bd authored by dimitri's avatar dimitri

Release-1.6.3-20100603

parent 0fb3f32d
# Doxyfile 1.5.9
# Doxyfile 1.6.3
#---------------------------------------------------------------------------
# Project related configuration options
#---------------------------------------------------------------------------
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = Doxygen
PROJECT_NUMBER =
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxygen_docs
CREATE_SUBDIRS = NO
OUTPUT_LANGUAGE = English
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
STRIP_FROM_PATH =
STRIP_FROM_INC_PATH =
SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = YES
QT_AUTOBRIEF = NO
......@@ -24,12 +24,12 @@ MULTILINE_CPP_IS_BRIEF = NO
INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 8
ALIASES =
ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
EXTENSION_MAPPING =
EXTENSION_MAPPING =
BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
......@@ -55,6 +55,7 @@ INTERNAL_DOCS = NO
CASE_SENSE_NAMES = NO
HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
FORCE_LOCAL_INCLUDES = NO
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
SORT_BRIEF_DOCS = NO
......@@ -65,13 +66,14 @@ GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
SHOW_DIRECTORIES = YES
SHOW_FILES = YES
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
LAYOUT_FILE =
FILE_VERSION_FILTER =
LAYOUT_FILE =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
......@@ -81,7 +83,7 @@ WARN_IF_UNDOCUMENTED = YES
WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_FORMAT = "$file:$line: $text "
WARN_LOGFILE =
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
......@@ -115,14 +117,14 @@ EXCLUDE = src/code.cpp \
src/vhdlscanner.cpp \
src/vhdlcode.cpp
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXCLUDE_PATTERNS =
EXCLUDE_SYMBOLS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
......@@ -140,54 +142,64 @@ VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT =
HTML_OUTPUT =
HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = YES
GENERATE_DOCSET = YES
DOCSET_FEEDNAME = "Doxygen docs"
DOCSET_BUNDLE_ID = org.doxygen.Doxygen
DOCSET_PUBLISHER_ID = org.doxygen.Publisher
DOCSET_PUBLISHER_NAME = Publisher
GENERATE_HTMLHELP = YES
CHM_FILE =
HHC_LOCATION =
CHM_FILE =
HHC_LOCATION =
GENERATE_CHI = NO
CHM_INDEX_ENCODING =
CHM_INDEX_ENCODING =
BINARY_TOC = NO
TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
QHP_CUST_FILTER_NAME =
QHP_CUST_FILTER_ATTRS =
QHP_SECT_FILTER_ATTRS =
QHG_LOCATION =
GENERATE_ECLIPSEHELP = NO
ECLIPSE_DOC_ID = org.doxygen.Project
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
USE_INLINE_TREES = YES
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = YES
FORMULA_FONTSIZE = 10
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = NO
LATEX_OUTPUT =
LATEX_OUTPUT =
LATEX_CMD_NAME = latex
MAKEINDEX_CMD_NAME = makeindex
COMPACT_LATEX = NO
PAPER_TYPE = a4wide
EXTRA_PACKAGES =
LATEX_HEADER =
EXTRA_PACKAGES =
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
......@@ -197,16 +209,16 @@ LATEX_SOURCE_CODE = NO
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT =
RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_OUTPUT =
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
......@@ -214,8 +226,8 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = NO
XML_OUTPUT = xml
XML_SCHEMA =
XML_DTD =
XML_SCHEMA =
XML_DTD =
XML_PROGRAMLISTING = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
......@@ -227,37 +239,37 @@ GENERATE_AUTOGEN_DEF = NO
GENERATE_PERLMOD = NO
PERLMOD_LATEX = NO
PERLMOD_PRETTY = YES
PERLMOD_MAKEVAR_PREFIX =
PERLMOD_MAKEVAR_PREFIX =
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::additions related to external references
# Configuration::additions related to external references
#---------------------------------------------------------------------------
TAGFILES = qtools_docs/qtools.tag=../../qtools_docs/html
GENERATE_TAGFILE =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
MSCGEN_PATH =
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
DOT_FONTPATH =
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
GROUP_GRAPHS = YES
......@@ -270,8 +282,8 @@ CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
DOT_PATH =
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
......
DOXYGEN Version 1.6.3-20100507
DOXYGEN Version 1.6.3-20100603
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (07 May 2010)
Dimitri van Heesch (03 June 2010)
DOXYGEN Version 1.6.3_20100507
DOXYGEN Version 1.6.3_20100603
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (07 May 2010)
Dimitri van Heesch (dimitri@stack.nl) (03 June 2010)
......@@ -10,7 +10,7 @@
# See the GNU General Public License for more details.
#
QMAKE=qmake
QMAKE=qmake $(MKSPECS)
all: Makefile.doxywizard
$(MAKE) -f Makefile.doxywizard
......
......@@ -4,6 +4,10 @@
#include "expert.h"
#include "wizard.h"
#ifdef WIN32
#include <windows.h>
#endif
#define MAX_RECENT_FILES 10
const int messageTimeout = 5000; //!< status bar message timeout in millisec.
......@@ -520,12 +524,13 @@ void MainWindow::showHtmlOutput()
QFileInfo fi(indexFile);
// TODO: the following doesn't seem to work with IE
#ifdef WIN32
QString indexUrl(QString::fromAscii("file:///"));
//QString indexUrl(QString::fromAscii("file:///"));
ShellExecute(NULL, L"open", fi.absoluteFilePath().utf16(), NULL, NULL, SW_SHOWNORMAL);
#else
QString indexUrl(QString::fromAscii("file://"));
#endif
indexUrl+=fi.absoluteFilePath();
QDesktopServices::openUrl(QUrl(indexUrl));
#endif
}
void MainWindow::saveLog()
......
......@@ -25,3 +25,4 @@ SOURCES += doxywizard.cpp ../../src/version.cpp expert.cpp wizard.cpp \
inputbool.cpp inputstring.cpp inputint.cpp inputstrlist.cpp
LEXSOURCES += config.l
RESOURCES += doxywizard.qrc
win32:RC_FILE += doxywizard.rc
IDI_ICON1 ICON DISCARDABLE "doxywizard.ico"
......@@ -20,7 +20,7 @@ doxygen_version_minor=6
doxygen_version_revision=3
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20100507
doxygen_version_mmn=20100603
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......@@ -268,7 +268,7 @@ if test "$f_wizard" = YES; then
if test -z "$QTDIR"; then
echo " QTDIR environment variable not set!"
echo -n " Checking for Qt..."
for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do
for d in /usr /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4}; do
if test -x "$d/bin/qmake"; then
QTDIR=$d
fi
......@@ -499,6 +499,17 @@ TMAKE += -unix
EOF
fi
if test "$f_platform" = "macosx-c++"; then
cat >> .makeconfig <<EOF
MKSPECS = -spec macx-g++
EOF
fi
if test "$f_platform" = "macosx-uni-c++"; then
cat >> .makeconfig <<EOF
MKSPECS = -spec macx-g++
EOF
fi
# Make doxygen.spec...
#
......
......@@ -80,6 +80,8 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_distribute_group_doc DISTRIBUTE_GROUP_DOC
\refitem cfg_docset_bundle_id DOCSET_BUNDLE_ID
\refitem cfg_docset_feedname DOCSET_FEEDNAME
\refitem cfg_docset_publisher_id DOCSET_PUBLISHER_ID
\refitem cfg_docset_publisher_name DOCSET_PUBLISHER_NAME
\refitem cfg_dot_cleanup DOT_CLEANUP
\refitem cfg_dot_fontname DOT_FONTNAME
\refitem cfg_dot_fontpath DOT_FONTPATH
......@@ -87,6 +89,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_dot_graph_max_nodes DOT_GRAPH_MAX_NODES
\refitem cfg_dot_image_format DOT_IMAGE_FORMAT
\refitem cfg_dot_multi_targets DOT_MULTI_TARGETS
\refitem cfg_dot_num_threads DOT_NUM_THREADS
\refitem cfg_dot_path DOT_PATH
\refitem cfg_dot_transparent DOT_TRANSPARENT
\refitem cfg_dotfile_dirs DOTFILE_DIRS
......@@ -103,6 +106,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_exclude_symlinks EXCLUDE_SYMLINKS
\refitem cfg_expand_as_defined EXPAND_AS_DEFINED
\refitem cfg_expand_only_predef EXPAND_ONLY_PREDEF
\refitem cfg_ext_links_in_window EXT_LINKS_IN_WINDOW
\refitem cfg_extension_mapping EXTENSION_MAPPING
\refitem cfg_external_groups EXTERNAL_GROUPS
\refitem cfg_extra_packages EXTRA_PACKAGES
......@@ -1350,6 +1354,15 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
reverse domain-name style string, e.g. <code>com.mycompany.MyDocSet</code>.
Doxygen will append <code>.docset</code> to the name.
\anchor cfg_docset_publisher_id
<dt>\c DOCSET_PUBLISHER_ID <dd>
When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
the documentation publisher. This should be a reverse domain-name style
string, e.g. com.mycompany.MyDocSet.documentation.
\anchor cfg_docset_publisher_name
<dt>\c DOCSET_PUBLISHER_NAME <dd>
The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
\anchor cfg_generate_htmlhelp
<dt>\c GENERATE_HTMLHELP <dd>
......@@ -1561,6 +1574,12 @@ and Class Hierarchy pages using a tree view instead of an ordered list.
used to set the initial width (in pixels) of the frame in which the tree
is shown.
\anchor cfg_ext_links_in_window
<dt>\c EXT_LINKS_IN_WINDOW <dd>
\addindex EXT_LINKS_IN_WINDOW
When the \c EXT_LINKS_IN_WINDOW option is set to \c YES doxygen will open
links to external symbols imported via tag files in a separate window.
\anchor cfg_formula_fontsize
<dt>\c FORMULA_FONTSIZE <dd>
\addindex FORMULA_FONTSIZE
......@@ -2036,6 +2055,15 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
visualization toolkit from AT\&T and Lucent Bell Labs. The other options in
this section have no effect if this option is set to \c NO (the default)
\anchor cfg_dot_num_threads
<dt>\c DOT_NUM_THREADS <dd>
\addindex DOT_NUM_THREADS
The \c DOT_NUM_THREADS specifies the number of dot invocations doxygen is
allowed to run in parallel. When set to 0 (the default) doxygen will
base this on the number of processors available in the system. You can set it
explicitly to a value larger than 0 to get control over the balance
between CPU load and processing speed.
\anchor cfg_dot_fontname
<dt>\c DOT_FONTNAME <dd>
\addindex DOT_FONTNAME
......
......@@ -56,8 +56,8 @@ tools should be installed.
<ul>
<li>Qt Software's GUI toolkit
<A HREF="http://www.trolltech.com/products/qt.html">Qt</A>
\latexonly(see {\tt http://www.trolltech.com/products/qt.html})\endlatexonly
<a href="http://qt.nokia.com/">Qt</A>
\latexonly(see {\tt http://qt.nokia.com/})\endlatexonly
\addindex Qt
version 4.3 or higher.
This is needed to build the GUI front-end doxywizard.
......@@ -410,7 +410,7 @@ You can now build the Release or Debug flavor of Doxygen and Doxytag by right-cl
the project in the solutions explorer, and selecting Build.
Note that compiling Doxywizard currently requires Qt version 4
(see http://www.trolltech.com/products/qt/qt3).
(see http://qt.nokia.com/products/platform/qt-for-windows).
If you do not have a commercial license, you can build Doxywizard with the open
source version (see http://qtwin.sourceforge.net/qt3-win32/compile-msvc-2005.php),
but I have not tried this myself.
......@@ -497,17 +497,11 @@ Here is what is required:
steps.
<li>From Doxygen-1.2.2-20001015 onwards, the distribution includes the part
of Qt-2.x.y that is needed for to compile doxygen and doxytag,
of Qt that is needed for to compile doxygen and doxytag,
The Windows specific part were also created.
As a result doxygen can be compiled on systems without X11 or the
commerical version of Qt.
For doxywizard, a complete Qt library is
still a requirement however. A commercial license to build
doxywizard with the latest Qt library was kindly donated to me
by the nice people at <a href="http://www.trolltech.com">Qt Software</a>.
See doxygen download page for a link.
As a result doxygen (without the wizard) can be compiled on systems
without X11 or the (commerical) version of Qt.
<li>If you used WinZip to extract the tar archive it will (apparently) not
create empty folders, so you have to add the folders
<code>objects</code> and <code>bin</code> manually in the root of the
......
This diff is collapsed.
......@@ -8,135 +8,141 @@
% The following one or more lines contain information about
% the maintainer(s) for the language (one line, one maintainer)
% in the form: <readable name><colon><e-mail>
% If the <e-mail> is prefixed [unreachable] it is not displayed in the table
% of maintainers in the Doxygen documentation, nor it is used when building
% the mailto.txt by translator.py.
TranslatorAfrikaans
Johan Prinsloo: johan@zippysnoek.com
Johan Prinsloo: johan at zippysnoek dot com
TranslatorArabic
Moaz Reyad: moazreyad@yahoo.com
Moaz Reyad: moazreyad at yahoo dot com
TranslatorBrazilian
Fabio "FJTC" Jun Takada Chino: jun-chino@uol.com.br
Fabio "FJTC" Jun Takada Chino: jun-chino at uol dot com dot br
TranslatorCatalan
Maximiliano Pin: max.pin@bitroit.com
Albert Mora: amora@iua.upf.es
Maximiliano Pin: max dot pin at bitroit dot com
Albert Mora: [unreachable] amora at iua dot upf dot es
TranslatorChinese
Li Daobing: lidaobing@gmail.com
Wei Liu: liuwei@asiainfo.com
Li Daobing: lidaobing at gmail dot com
Wei Liu: liuwei at asiainfo dot com
TranslatorChinesetraditional
Daniel YC Lin: dlin.tw@gmail.com
Gary Lee: garywlee@gmail.com
Daniel YC Lin: dlin dot tw at gmail dot com
Gary Lee: garywlee at gmail dot com
TranslatorCroatian
Boris Bralo: boris.bralo@zg.htnet.hr
Boris Bralo: boris dot bralo at gmail dot com
TranslatorCzech
Petr P&rcaron;ikryl: prikrylp@skil.cz
Petr P&rcaron;ikryl: prikrylp at skil dot cz
TranslatorDanish
Erik S&oslash;e S&oslash;rensen: eriksoe+doxygen@daimi.au.dk
Erik S&oslash;e S&oslash;rensen: eriksoe+doxygen at daimi dot au dot dk
TranslatorDutch
Dimitri van Heesch: dimitri@stack.nl
Dimitri van Heesch: dimitri at stack dot nl
TranslatorEnglish
Dimitri van Heesch: dimitri@stack.nl
Dimitri van Heesch: dimitri at stack dot nl
TranslatorEsperanto
Ander Martinez: dwarfnauko@gmail.com
Ander Martinez: dwarfnauko at gmail dot com
TranslatorFinnish
Antti Laine: antti.a.laine@tut.fi
Antti Laine: antti dot a dot laine at tut dot fi
TranslatorFrench
Xavier Outhier: xouthier@yahoo.fr
Xavier Outhier: xouthier at yahoo dot fr
TranslatorGerman
Jens Seidel: jensseidel@users.sf.net
Jens Seidel: jensseidel at users dot sf dot net
TranslatorGreek
Paul Gessos: nickreserved@yahoo.com
Paul Gessos: gessos dot paul at yahoo dot gr
TranslatorHungarian
&Aacute;kos Kiss: akiss@users.sourceforge.net
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari lost@cyberspace
&Aacute;kos Kiss: akiss at users dot sourceforge dot net
F&ouml;ldv&aacute;ri Gy&ouml;rgy: [unreachable] foldvari lost at cyberspace
TranslatorIndonesian
Hendy Irawan: ceefour@gauldong.net
Hendy Irawan: ceefour at gauldong dot net
TranslatorItalian
Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Alessandro Falappa: alessandro at falappa dot net
Ahmed Aldo Faisal: aaf23 at cam dot ac dot uk
TranslatorJapanese
Hiroki Iseri: goyoki@gmail.com
Ryunosuke Satoh: sun594@hotmail.com
Kenji Nagamatsu: naga@joyful.club.ne.jp
Iwasa Kazmi: iwasa@cosmo-system.jp
Hiroki Iseri: goyoki at gmail dot com
Ryunosuke Satoh: sun594 at hotmail dot com
Kenji Nagamatsu: naga at joyful dot club dot ne dot jp
Iwasa Kazmi: [unreachable] iwasa at cosmo-system dot jp
TranslatorKorean
Kim Taedong: fly1004@gmail.com
SooYoung Jung: jung5000@gmail.com
Richard Kim: ryk@dspwiz.com
Kim Taedong: fly1004 at gmail dot com
SooYoung Jung: jung5000 at gmail dot com
Richard Kim: [unreachable] ryk at dspwiz dot com
TranslatorLithuanian
Tomas Simonaitis: haden@homelan.lt
Mindaugas Radzius: mindaugasradzius@takas.lt
Aidas Berukstis: aidasber@takas.lt
Tomas Simonaitis: [unreachable] haden at homelan dot lt
Mindaugas Radzius: [unreachable] mindaugasradzius at takas dot lt
Aidas Berukstis: [unreachable] aidasber at takas dot lt
-- contact lost --:
TranslatorNorwegian
Lars Erik Jordet: lejordet@gmail.com
Lars Erik Jordet: lejordet at gmail dot com
TranslatorMacedonian
Slave Jovanovski: slavejovanovski@yahoo.com
Slave Jovanovski: slavejovanovski at yahoo dot com
TranslatorPersian
Ali Nadalizadeh: nadalizadeh@gmail.com
Ali Nadalizadeh: nadalizadeh at gmail dot com
TranslatorPolish
Piotr Kaminski: Piotr.Kaminski@ctm.gdynia.pl
Grzegorz Kowal: g_kowal@poczta.onet.pl
Krzysztof Kral: krzysztof.kral@gmail.com
Piotr Kaminski: [unreachable] Piotr dot Kaminski at ctm dot gdynia dot pl
Grzegorz Kowal: [unreachable] g_kowal at poczta dot onet dot pl
Krzysztof Kral: krzysztof dot kral at gmail dot com
TranslatorPortuguese
Rui Godinho Lopes: ruiglopes@yahoo.com
Rui Godinho Lopes: [unreachable] ruiglopes at yahoo dot com
TranslatorRomanian
Ionut Dumitrascu: reddumy@yahoo.com
Alexandru Iosup: aiosup@yahoo.com
Ionut Dumitrascu: reddumy at yahoo dot com
Alexandru Iosup: aiosup at yahoo dot com
TranslatorRussian
Alexandr Chelpanov: cav@cryptopro.ru
Alexandr Chelpanov: cav at cryptopro dot ru
TranslatorSerbian
Dejan Milosavljevic: dmilos@email.com
Dejan Milosavljevic: [unreachable] dmilos at email dot com
TranslatorSerbianCyrilic
Nedeljko Stefanovic: stenedjo@yahoo.com
Nedeljko Stefanovic: stenedjo at yahoo dot com
TranslatorSlovak
Stanislav Kudl&aacute;&ccaron;: skudlac@pobox.sk
% Stanislav Kudl&aacute;&ccaron;: [unreachable] skudlac at pobox dot sk
-- searching for the maintainer --:
TranslatorSlovene
Matja&zcaron; Ostrover&scaron;nik: matjaz.ostroversnik@ostri.org
Matja&zcaron; Ostrover&scaron;nik: matjaz dot ostroversnik at ostri dot org
TranslatorSpanish
Bartomeu: bartomeu@loteria3cornella.com
Francisco Oltra Thennet: foltra@puc.cl
David Vaquero: david@grupoikusnet.com
Bartomeu: bartomeu at loteria3cornella dot com
Francisco Oltra Thennet: [unreachable] foltra at puc dot cl
David Vaquero: david at grupoikusnet dot com
TranslatorSwedish
Mikael Hallin: mikaelhallin@yahoo.se
Mikael Hallin: mikaelhallin at yahoo dot se
TranslatorUkrainian
Olexij Tkatchenko: olexij.tkatchenko@parcs.de
% (resigned) Olexij Tkatchenko: olexij at tkatchenko dot com
-- searching for the maintainer --:
TranslatorVietnamese
Dang Minh Tuan: tuanvietkey@gmail.com
Dang Minh Tuan: tuanvietkey at gmail dot com
TranslatorTurkish
Emin Ilker Cetinbas: niw3@yahoo.com
Emin Ilker Cetinbas: niw3 at yahoo dot com
......@@ -52,6 +52,10 @@
2008/06/09 - Warning when the MAX_DOT_GRAPH_HEIGHT is still part of trLegendDocs().
2009/05/09 - Changed HTML output to fit it with XHTML DTD
2009/09/02 - Added percentage info to the report (implemented / to be implemented).
2010/02/09 - Added checking/suggestion 'Reimplementation using UTF-8 suggested.
2010/03/03 - Added [unreachable] prefix used in maintainers.txt.
2010/05/28 - BOM skipped; minor code cleaning.
2010/05/31 - e-mail mangled already in maintainers.txt
"""
from __future__ import generators
......@@ -223,7 +227,7 @@ class Transl:
# Open the file for reading and extracting tokens until the eof.
# Initialize the finite automaton.
f = file(self.fname)
f = open(self.fname)
lineNo = 0
line = '' # init -- see the pos initialization below
linelen = 0 # init
......@@ -242,9 +246,11 @@ class Transl:
else:
lineNo += 1
line = f.readline()
if line.startswith('\xef\xbb\xbf'):
line = line[3:] # skip the BOM
linelen = len(line)
pos = 0
if line == '': # eof
if line == '': # eof
status = 777
else:
c = line[pos]
......@@ -1439,7 +1445,7 @@ class TrManager:
self.numLang -= 1 # the couple will be counted as one
# Extract the version of Doxygen.
f = file(os.path.join(self.doxy_path, 'VERSION'))
f = open(os.path.join(self.doxy_path, 'VERSION'))
self.doxVersion = f.readline().strip()
f.close()
......@@ -1487,7 +1493,7 @@ class TrManager:
# Read content of the file as one string.
assert os.path.isfile(fname)
f = file(fname)
f = open(fname)
cont = f.read()
f.close()
......@@ -1525,11 +1531,19 @@ class TrManager:
return trdic
def __emails(self, classId):
"""Returns the list of maintainer emails.
def __email(self, classId):
"""Returns the first maintainer for the translator class"""
return self.__maintainersDic[classId][0][1]
The method returns the list of e-mail adresses for the translator
class, but only the addresses that were not marked as [unreachable]."""
lst = []
for m in self.__maintainersDic[classId]:
if not m[1].startswith('[unreachable]'):
email = m[1]
email = email.replace(' at ', '@') # Unmangle the mangled e-mail
email = email.replace(' dot ', '.')
lst.append(email)
return lst
def generateTranslatorReport(self):
......@@ -1538,7 +1552,7 @@ class TrManager:
output = os.path.join(self.doc_path, self.translatorReportFileName)
# Open the textual report file for the output.
f = file(output, 'w')
f = open(output, 'w')
# Output the information about the version.
f.write('(' + self.doxVersion + ')\n\n')
......@@ -1566,7 +1580,7 @@ class TrManager:
# The e-mail addresses of the maintainers will be collected to
# the auxiliary file in the order of translator classes listed
# in the translator report.
fmail = file('mailto.txt', 'w')
fmail = open('mailto.txt', 'w')
# Write the list of up-to-date translator classes.
if self.upToDateIdLst:
......@@ -1586,7 +1600,7 @@ class TrManager:
if obj.note:
f.write(' -- ' + obj.note)
f.write('\n')
mailtoLst.append(self.__email(obj.classId))
mailtoLst.extend(self.__emails(obj.classId))
fmail.write('up-to-date\n')
fmail.write('; '.join(mailtoLst))
......@@ -1620,7 +1634,7 @@ class TrManager:
if obj.note:
f.write('\n\tNote: ' + obj.note + '\n')
f.write('\n')
mailtoLst.append(self.__email(obj.classId)) # to maintainer
mailtoLst.extend(self.__emails(obj.classId)) # to maintainer
# Check the level of required adapter classes.
if obj.status != '0.0.00' and obj.status < adaptMinVersion:
......@@ -1723,7 +1737,7 @@ class TrManager:
self.lastModificationTime = tim
# Process the content of the maintainers file.
f = file(fname)
f = open(fname)
inside = False # inside the record for the language
lineReady = True
classId = None
......@@ -1753,7 +1767,8 @@ class TrManager:
self.__maintainersDic[classId] = []
# Split the information about the maintainer and append
# the tuple.
# the tuple. The address may be prefixed '[unreachable]'.
# This will be processed later.
lst = line.split(':', 1)
assert(len(lst) == 2)
t = (lst[0].strip(), lst[1].strip())
......@@ -1786,7 +1801,7 @@ class TrManager:
#
# Read the template of the documentation, and remove the first
# attention lines.
f = file(fTplName)
f = open(fTplName)
line = f.readline()
while line[0] != '/':
line = f.readline()
......@@ -1862,20 +1877,17 @@ class TrManager:
if not mm and self.__maintainersDic.has_key(obj.classId):
lm = [ m[0] for m in self.__maintainersDic[obj.classId] ]
mm = '<br/>'.join(lm)
le = [ m[1] for m in self.__maintainersDic[obj.classId] ]
# Unreachable adresses will not be displayed at all.
le = []
for m in self.__maintainersDic[obj.classId]:
address = m[1]
if address.startswith('[unreachable]'):
address = '[unreachable]'
le.append(address)
ee = '<br/>'.join(le)
# Mangle the e-mail and replace the entity references.
if ee and ee != '&nbsp;':
# More than one maintainer address separated by <br> can be used.
emails = ee.split('<br/>')
mangled_list = []
for email in emails:
name, domain = email.split('@')
domain = domain.replace('.', ' dot ')
mangled_list.append(name + ' at ' + domain)
ee = '<br/>'.join(mangled_list)
# Replace the entity references.
if mm:
mm = mm.replace('&ccaron;', '&#x010d;')
mm = mm.replace('&rcaron;', '&#x0159;')
......@@ -1973,7 +1985,7 @@ class TrManager:
tplDic['informationTable'] = htmlTable + '\n' + latexTable
# Insert the symbols into the document template and write it down.
f = file(fDocName, 'w')
f = open(fDocName, 'w')
f.write(doctpl % tplDic)
f.close()
......
......@@ -10,7 +10,7 @@ Persian, Polish, Portuguese, Romanian, Russian, Serbian,
SerbianCyrilic, Slovak, Slovene, Spanish, Swedish, Turkish, Ukrainian,
and Vietnamese.
Of them, 2 translators are up-to-date, 36 translators are based on
Of them, 6 translators are up-to-date, 32 translators are based on
some adapter class, and 2 are English based.
----------------------------------------------------------------------
......@@ -19,8 +19,12 @@ alphabetically). This means that they derive from the Translator class
and they implement all 225 of the required methods. Anyway, there
still may be some details listed even for them:
TranslatorBrazilian
TranslatorCroatian
TranslatorDutch
TranslatorEnglish
TranslatorGreek
TranslatorSpanish -- The MAX_DOT_GRAPH_HEIGHT found in trLegendDocs()
----------------------------------------------------------------------
The following translator classes need some maintenance (the most
......@@ -28,7 +32,6 @@ obsolete at the end). The other info shows the estimation of Doxygen
version when the class was last updated and number of methods that
must be implemented to become up-to-date:
TranslatorSpanish 1.6.3 4 methods to implement (1 %)
TranslatorPolish 1.6.3 4 methods to implement (1 %)
TranslatorKorean 1.6.3 4 methods to implement (1 %)
Note: Reimplementation using UTF-8 suggested.
......@@ -39,11 +42,7 @@ must be implemented to become up-to-date:
TranslatorEsperanto 1.6.3 4 methods to implement (1 %)
TranslatorCzech 1.6.3 4 methods to implement (1 %)
TranslatorCroatian 1.6.3 4 methods to implement (1 %)
TranslatorCatalan 1.6.3 4 methods to implement (1 %)
TranslatorBrazilian 1.6.3 4 methods to implement (1 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorVietnamese 1.6.0 9 methods to implement (4 %)
TranslatorTurkish 1.6.0 9 methods to implement (4 %)
TranslatorSwedish 1.6.0 9 methods to implement (4 %)
......@@ -77,9 +76,6 @@ must be implemented to become up-to-date:
TranslatorAfrikaans 1.6.0 9 methods to implement (4 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorGreek 1.5.4 31 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
TranslatorDanish 1.5.4 31 methods to implement (13 %)
Note: Reimplementation using UTF-8 suggested.
......@@ -209,19 +205,6 @@ TranslatorArabic (TranslatorAdapter_1_4_6) 32 methods to implement (14 %)
virtual QCString trNoDescriptionAvailable()
TranslatorBrazilian (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
-------------------
Implements 221 of the required methods (98 %).
Missing methods (should be implemented):
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)
virtual QCString trFileIn(const char * name)
virtual QCString trDirDependency(const char * name)
virtual QCString trIncludesFileIn(const char * name)
TranslatorCatalan (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
-----------------
......@@ -271,19 +254,6 @@ TranslatorChinesetraditional (TranslatorAdapter_1_6_0) 9 methods to implement
virtual QCString trIncludesFileIn(const char * name)
TranslatorCroatian (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
------------------
Implements 221 of the required methods (98 %).
Missing methods (should be implemented):
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)
virtual QCString trFileIn(const char * name)
virtual QCString trDirDependency(const char * name)
virtual QCString trIncludesFileIn(const char * name)
TranslatorCzech (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
---------------
......@@ -394,58 +364,6 @@ TranslatorGerman (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
virtual QCString trIncludesFileIn(const char * name)
TranslatorGreek (TranslatorAdapter_1_5_4) 31 methods to implement (13 %)
---------------
Implements 194 of the required methods (86 %).
Missing methods (should be implemented):
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)
virtual QCString trSearching()
virtual QCString trNoMatches()
virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single)
virtual QCString trLoading()
virtual QCString trSubprograms()
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)
virtual QCString trModulesListDescription(bool extractAll)
virtual QCString trModulesList()
virtual QCString trTypeConstraints()
virtual QCString trFileIn(const char * name)
virtual QCString trGlobalNamespace()
virtual QCString trMemberFunctionDocumentationFortran()
virtual QCString trCompoundListDescriptionFortran()
virtual QCString trTypeDocumentation()
virtual QCString trModuleReference(const char * namespaceName)
virtual QCString trModulesMemberDescription(bool extractAll)
virtual QCString trModulesMembers()
virtual QCString trModulesIndex()
virtual QCString trDirRelation(const char * name)
virtual QCString trCompoundListFortran()
virtual QCString trDataTypes()
virtual QCString trDirDependency(const char * name)
virtual QCString trIncludesFileIn(const char * name)
virtual QCString trCompoundIndexFortran()
virtual QCString trSubprogram(bool first_capital, bool singular)
virtual QCString trCompoundReferenceFortran(const char * clName, ClassDef::CompoundType compType, bool isTemplate)
virtual QCString trType(bool first_capital, bool singular)
virtual QCString trModule(bool first_capital, bool singular)
virtual QCString trCompoundMembersFortran()
virtual QCString trSubprogramDocumentation()
Obsolete methods (should be removed, never used):
virtual QCString trHeaderFilesDescription()
virtual QCString trField(bool first_capital, bool singular)
virtual QCString trPackageDocumentation()
virtual QCString trSources()
virtual QCString trReimplementedForInternalReasons()
virtual QCString trInterfaces()
virtual QCString trHeaderFiles()
virtual QCString trBugsAndLimitations()
virtual QCString trNoDescriptionAvailable()
TranslatorHungarian (TranslatorAdapter_1_4_6) 33 methods to implement (14 %)
-------------------
......@@ -1039,17 +957,10 @@ TranslatorSlovene (TranslatorAdapter_1_4_6) 33 methods to implement (14 %)
virtual QCString trSubprogramDocumentation()
TranslatorSpanish (TranslatorAdapter_1_6_3) 4 methods to implement (1 %)
TranslatorSpanish (Translator)
-----------------
Implements 221 of the required methods (98 %).
Missing methods (should be implemented):
virtual QCString trDateTime(int year, int month, int day, int dayOfWeek, int hour, int minutes, int seconds, bool includeTime)
virtual QCString trFileIn(const char * name)
virtual QCString trDirDependency(const char * name)
virtual QCString trIncludesFileIn(const char * name)
Implements 225 of the required methods (100 %).
TranslatorSwedish (TranslatorAdapter_1_6_0) 9 methods to implement (4 %)
......
......@@ -131,8 +131,8 @@ HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_COLORSTYLE_HUE = 220
HTML_COLORSTYLE_SAT = 70
HTML_COLORSTYLE_GAMMA = 60
HTML_COLORSTYLE_SAT = 80
HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = NO
HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = NO
......@@ -163,6 +163,7 @@ ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = YES
USE_INLINE_TREES = NO
TREEVIEW_WIDTH = 250
EXT_LINKS_IN_WINDOW = NO
FORMULA_FONTSIZE = 10
SEARCHENGINE = YES
SERVER_BASED_SEARCH = NO
......@@ -244,7 +245,8 @@ CLASS_DIAGRAMS = YES
MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_NUM_THREADS = 0
DOT_FONTNAME = FreeSans.ttf
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES
......
......@@ -630,7 +630,7 @@ void QGCache::statistics() const
#if defined(DEBUG)
QString line;
line.fill( '*', 80 );
qDebug( line.ascii() );
qDebug( "%s",line.ascii() );
qDebug( "CACHE STATISTICS:" );
qDebug( "cache contains %d item%s, with a total cost of %d",
count(), count() != 1 ? "s" : "", tCost );
......@@ -651,7 +651,7 @@ void QGCache::statistics() const
lruList->dumps != 1 ? "have" : "has", lruList->dumpCosts );
qDebug( "Statistics from internal dictionary class:" );
dict->statistics();
qDebug( line.ascii() );
qDebug( "%s",line.ascii() );
#endif
}
......
......@@ -907,11 +907,11 @@ void QGDict::statistics() const
QString line;
line.fill( '-', 60 );
double real, ideal;
qDebug( line.ascii() );
qDebug( "%s",line.ascii() );
qDebug( "DICTIONARY STATISTICS:" );
if ( count() == 0 ) {
qDebug( "Empty!" );
qDebug( line.ascii() );
qDebug( "%s", line.ascii() );
return;
}
real = 0.0;
......@@ -932,7 +932,7 @@ void QGDict::statistics() const
while ( b-- )
*pbuf++ = '*';
*pbuf = '\0';
qDebug( buf );
qDebug( "%s", buf );
i++;
}
qDebug( "Array size = %d", size() );
......@@ -940,7 +940,7 @@ void QGDict::statistics() const
qDebug( "Real dist = %g", real );
qDebug( "Rand dist = %g", ideal );
qDebug( "Real/Rand = %g", real/ideal );
qDebug( line.ascii() );
qDebug( "%s",line.ascii() );
#endif // DEBUG
}
......
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <stdio.h>
#include "qglobal.h"
#include "qmutex.h"
#include "qmutex_p.h"
QMutex::QMutex() : d(new QMutexPrivate())
{
}
QMutex::~QMutex()
{
delete d;
}
void QMutex::lock()
{
//printf("%p: QMutex::lock(): enter\n",this);
bool isLocked;
isLocked = d->contenders == 0 && d->contenders.testAndSet(0, 1);
if (!isLocked)
{
isLocked = d->contenders.fetchAndAdd(1)==0;
if (!isLocked)
{
// didn't get the lock, wait for it
//printf("%p: QMutex::lock(): wait() %d\n",this,(int)d->contenders);
d->wait();
// release lock
d->contenders.fetchAndAdd(-1);
}
}
//printf("%p: QMutex::lock(): leave\n",this);
}
bool QMutex::tryLock()
{
bool isLocked = d->contenders == 0 &&
d->contenders.testAndSet(0, 1);
return isLocked;
}
void QMutex::unlock()
{
//printf("%p: QMutex::unlock(): enter %d\n",this,(int)d->contenders);
if (!d->contenders.testAndSet(1, 0))
{
//printf("%p: QMutex::unlock(): wakeUp()\n",this);
d->wakeUp();
}
//printf("%p: QMutex::unlock(): leave\n",this);
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMUTEX_H
#define QMUTEX_H
#include "qglobal.h"
class QMutexPrivate;
class QMutex
{
public:
QMutex();
~QMutex();
void lock();
bool tryLock();
void unlock();
private:
QMutex(const QMutex &);
QMutex &operator=(const QMutex &);
QMutexPrivate *d;
};
class QMutexLocker
{
public:
QMutexLocker(QMutex *m) : m_mutex(m)
{
m_mutex->lock();
}
~QMutexLocker()
{
m_mutex->unlock();
}
QMutex *mutex() const { return m_mutex; }
private:
QMutex *m_mutex;
};
#endif // QMUTEX_H
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QMUTEX_P_H
#define QMUTEX_P_H
#include "qglobal.h"
#if defined(_OS_UNIX_) || defined(_OS_MAC_)
#include <pthread.h>
#elif defined(_OS_WIN32_)
#include <windows.h>
#endif
class QAtomicInt
{
public:
QAtomicInt(int v=0) : m_value(v) {}
bool testAndSet(int expectedValue,int newValue);
int fetchAndAdd(int valueToAdd);
operator int () const { return m_value; }
bool operator==(int value) const { return m_value == value; }
bool operator!=(int value) const { return m_value != value; }
bool operator!() const { return m_value == 0; }
private:
volatile int m_value;
};
class QMutexPrivate
{
public:
QMutexPrivate();
~QMutexPrivate();
void wait();
void wakeUp();
QAtomicInt contenders;
#if defined(_OS_UNIX_) || defined(_OS_MAC_)
volatile bool wakeup;
pthread_mutex_t mutex;
pthread_cond_t cond;
#elif defined(_OS_WIN32_)
HANDLE event;
#else
#error "unsupported platform"
#endif
};
#endif // QMUTEX_P_H
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <errno.h>
#include <pthread.h>
#include "qglobal.h"
#include "qmutex.h"
#include "qmutex_p.h"
static pthread_mutex_t qAtomicMutex = PTHREAD_MUTEX_INITIALIZER;
static void report_error(int code, const char *where, const char *what)
{
if (code != 0)
qWarning("%s: %s failure: %d", where, what, code);
}
QMutexPrivate::QMutexPrivate()
: contenders(0), wakeup(FALSE)
{
report_error(pthread_mutex_init(&mutex, NULL), "QMutex", "mutex init");
report_error(pthread_cond_init(&cond, NULL), "QMutex", "cv init");
}
QMutexPrivate::~QMutexPrivate()
{
report_error(pthread_cond_destroy(&cond), "QMutex", "cv destroy");
report_error(pthread_mutex_destroy(&mutex), "QMutex", "mutex destroy");
}
void QMutexPrivate::wait()
{
report_error(pthread_mutex_lock(&mutex), "QMutex::lock", "mutex lock");
int errorCode = 0;
while (!wakeup)
{
errorCode = pthread_cond_wait(&cond, &mutex);
if (errorCode)
{
report_error(errorCode, "QMutex::lock()", "cv wait");
}
}
wakeup = FALSE;
report_error(pthread_mutex_unlock(&mutex), "QMutex::lock", "mutex unlock");
}
void QMutexPrivate::wakeUp()
{
report_error(pthread_mutex_lock(&mutex), "QMutex::unlock", "mutex lock");
wakeup = TRUE;
report_error(pthread_cond_signal(&cond), "QMutex::unlock", "cv signal");
report_error(pthread_mutex_unlock(&mutex), "QMutex::unlock", "mutex unlock");
}
bool QAtomicInt::testAndSet(int expectedValue,int newValue)
{
bool returnValue = false;
pthread_mutex_lock(&qAtomicMutex);
if (m_value == expectedValue)
{
m_value = newValue;
returnValue = true;
}
pthread_mutex_unlock(&qAtomicMutex);
return returnValue;
}
int QAtomicInt::fetchAndAdd(int valueToAdd)
{
int returnValue;
pthread_mutex_lock(&qAtomicMutex);
returnValue = m_value;
m_value += valueToAdd;
pthread_mutex_unlock(&qAtomicMutex);
return returnValue;
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <windows.h>
#include "qmutex.h"
#include "qmutex_p.h"
QMutexPrivate::QMutexPrivate()
: contenders(0)
{
event = CreateEvent(0, FALSE, FALSE, 0);
if (!event)
qWarning("QMutexPrivate::QMutexPrivate: Cannot create event");
}
QMutexPrivate::~QMutexPrivate()
{
CloseHandle(event);
}
void QMutexPrivate::wait()
{
WaitForSingleObject(event, INFINITE);
}
void QMutexPrivate::wakeUp()
{
SetEvent(event);
}
//----------------------------------------------------------------------
class QCriticalSection
{
public:
QCriticalSection() { InitializeCriticalSection(&section); }
~QCriticalSection() { DeleteCriticalSection(&section); }
void lock() { EnterCriticalSection(&section); }
void unlock() { LeaveCriticalSection(&section); }
private:
CRITICAL_SECTION section;
};
static QCriticalSection qAtomicCriticalSection;
bool QAtomicInt::testAndSet(int expectedValue,int newValue)
{
bool returnValue = false;
qAtomicCriticalSection.lock();
if (m_value == expectedValue)
{
m_value = newValue;
returnValue = true;
}
qAtomicCriticalSection.unlock();
return returnValue;
}
int QAtomicInt::fetchAndAdd(int valueToAdd)
{
int returnValue;
qAtomicCriticalSection.lock();
returnValue = m_value;
m_value += valueToAdd;
qAtomicCriticalSection.unlock();
return returnValue;
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qthread.h"
#include "qthread_p.h"
QThread::QThread()
: d(new QThreadPrivate)
{
}
QThread::~QThread()
{
QMutexLocker locker(&d->mutex);
if (d->running && !d->finished)
qWarning("QThread: Destroyed while thread is still running");
}
bool QThread::isFinished() const
{
QMutexLocker locker(&d->mutex);
return d->finished;
}
bool QThread::isRunning() const
{
QMutexLocker locker(&d->mutex);
return d->running;
}
void QThread::setStackSize(unsigned int stackSize)
{
QMutexLocker locker(&d->mutex);
if (d->running)
{
qWarning("QThread: Cannot change stack size while thread is running!");
return;
}
d->stackSize = stackSize;
}
unsigned int QThread::stackSize() const
{
QMutexLocker locker(&d->mutex);
return d->stackSize;
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTHREAD_H
#define QTHREAD_H
class QThreadPrivate;
class QThread
{
public:
explicit QThread();
virtual ~QThread();
bool isFinished() const;
bool isRunning() const;
void start();
void terminate();
void wait();
void setStackSize(unsigned int stackSize);
unsigned int stackSize() const;
static int idealThreadCount();
protected:
// events
virtual void started() {}
virtual void finished() {}
virtual void terminated() {}
// main loop
virtual void run() {}
private:
QThreadPrivate *d;
friend class QThreadPrivate;
};
#endif // QTHREAD_H
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QTHREAD_P_H
#define QTHREAD_P_H
#include "qglobal.h"
#if defined(_OS_UNIX_) || defined(_OS_MAC_)
#include <pthread.h>
#elif defined(_OS_WIN32_)
#include <windows.h>
#endif
#include "qthread.h"
#include "qmutex.h"
#include "qwaitcondition.h"
class QThreadPrivate
{
public:
QThreadPrivate();
~QThreadPrivate();
mutable QMutex mutex;
bool running;
bool finished;
bool terminated;
uint stackSize;
#if defined(_OS_UNIX_) || defined(_OS_MAC_)
pthread_t thread_id;
QWaitCondition thread_done;
static void *start(void *arg);
static void finish(void *arg);
#elif defined(_OS_WIN32_)
HANDLE handle;
static unsigned int __stdcall start(void *);
static void finish(void *,bool lockAnyway=TRUE);
int waiters;
#else
#error "unsupported platform!"
#endif
};
#endif // QTHREAD_P_H
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qglobal.h"
#if defined(_OS_HPUX_)
#include <sys/pstat.h>
#elif defined(_OS_MAC_)
#undef DEBUG
#include <CoreServices/CoreServices.h>
#elif defined(_OS_BSDI_)
#include <mach/mach_types.h>
#include <sys/systm.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#endif
#include <unistd.h>
#include "qthread.h"
#include "qthread_p.h"
/**************************************************************************
** QThreadPrivate
*************************************************************************/
QThreadPrivate::QThreadPrivate() :
running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0)
{
thread_id = 0;
}
QThreadPrivate::~QThreadPrivate()
{
}
void *QThreadPrivate::start(void *arg)
{
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
pthread_cleanup_push(QThreadPrivate::finish, arg);
QThread *thr = reinterpret_cast<QThread *>(arg);
thr->started();
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_testcancel();
thr->run();
pthread_cleanup_pop(1);
return 0;
}
void QThreadPrivate::finish(void *arg)
{
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadPrivate *d = thr->d;
QMutexLocker locker(&d->mutex);
d->running = FALSE;
d->finished = TRUE;
if (d->terminated)
thr->terminated();
d->terminated = FALSE;
thr->finished();
d->thread_id = 0;
d->thread_done.wakeAll();
}
/**************************************************************************
** QThread
*************************************************************************/
void QThread::start()
{
QMutexLocker locker(&d->mutex);
if (d->running) return;
d->running = TRUE;
d->finished = FALSE;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
if (d->stackSize>0)
{
#if defined(_POSIX_THREAD_ATTR_STACKSIZE) && (_POSIX_THREAD_ATTR_STACKSIZE-0>0)
pthread_attr_setstacksize(&attr,d->stackSize);
#endif
}
int code = pthread_create(&d->thread_id, &attr, QThreadPrivate::start, this);
pthread_attr_destroy(&attr);
if (code)
{
qWarning("QThread::start: Thread creation error: %d", code);
d->running = FALSE;
d->finished = FALSE;
d->thread_id = 0;
}
}
void QThread::terminate()
{
QMutexLocker locker(&d->mutex);
if (!d->thread_id) return;
int code = pthread_cancel(d->thread_id);
if (code)
{
qWarning("QThread::start: Thread termination error: %d", code);
}
else
{
d->terminated = TRUE;
}
}
void QThread::wait()
{
QMutexLocker locker(&d->mutex);
if (d->finished || !d->running) return;
while (d->running)
{
d->thread_done.wait(locker.mutex());
}
}
#if defined(QT_LINUXBASE) && !defined(_SC_NPROCESSORS_ONLN)
// LSB doesn't define _SC_NPROCESSORS_ONLN.
# define _SC_NPROCESSORS_ONLN 84
#endif
int QThread::idealThreadCount()
{
int cores = -1;
#if defined(_OS_MAC_)
// Mac OS X
cores = MPProcessorsScheduled();
#elif defined(_OS_HPUX_)
// HP-UX
struct pst_dynamic psd;
if (pstat_getdynamic(&psd, sizeof(psd), 1, 0) == -1)
{
perror("pstat_getdynamic");
cores = -1;
}
else
{
cores = (int)psd.psd_proc_cnt;
}
#elif defined(_OS_BSDI_)
// FreeBSD, OpenBSD, NetBSD, BSD/OS
size_t len = sizeof(cores);
int mib[2];
mib[0] = CTL_HW;
mib[1] = HW_NCPU;
if (sysctl(mib, 2, &cores, &len, NULL, 0) != 0)
{
perror("sysctl");
cores = -1;
}
#elif defined(_OS_IRIX_)
// IRIX
cores = (int)sysconf(_SC_NPROC_ONLN);
#else
// the rest: Linux, Solaris, AIX, Tru64
cores = (int)sysconf(_SC_NPROCESSORS_ONLN);
#endif
return cores;
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qthread.h"
#include "qthread_p.h"
/**************************************************************************
** QThreadPrivate
*************************************************************************/
QThreadPrivate::QThreadPrivate() :
running(FALSE), finished(FALSE), terminated(FALSE), stackSize(0)
{
handle = NULL;
waiters = 0;
}
QThreadPrivate::~QThreadPrivate()
{
}
unsigned int __stdcall QThreadPrivate::start(void *arg)
{
QThread *thr = reinterpret_cast<QThread *>(arg);
thr->started();
thr->run();
finish(arg);
return 0;
}
void QThreadPrivate::finish(void *arg,bool lockAnyway)
{
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadPrivate *d = thr->d;
if (lockAnyway) d->mutex.lock();
d->running = FALSE;
d->finished = TRUE;
if (d->terminated) thr->terminated();
d->terminated = FALSE;
thr->finished();
if (!d->waiters)
{
CloseHandle(d->handle);
d->handle = 0;
}
if (lockAnyway) d->mutex.unlock();
}
/**************************************************************************
** QThread
*************************************************************************/
void QThread::start()
{
QMutexLocker locker(&d->mutex);
if (d->running) return;
d->running = TRUE;
d->finished = FALSE;
d->terminated = FALSE;
d->handle = CreateThread(NULL,d->stackSize,
(LPTHREAD_START_ROUTINE)QThreadPrivate::start,this,0,NULL);
if (!d->handle)
{
qWarning("QThread::start: Failed to create thread: errno=%d",errno);
d->running = FALSE;
d->finished = TRUE;
return;
}
}
void QThread::terminate()
{
QMutexLocker locker(&d->mutex);
if (!d->running) return;
TerminateThread(d->handle, 0);
d->terminated = TRUE;
QThreadPrivate::finish(this);
}
void QThread::wait()
{
QMutexLocker locker(&d->mutex);
if (d->finished || !d->running) return;
++d->waiters;
locker.mutex()->unlock();
WaitForSingleObject(d->handle,INFINITE);
locker.mutex()->lock();
--d->waiters;
if (!d->finished) // thread was terminated by someone else
{
d->terminated = TRUE;
QThreadPrivate::finish(this);
}
if (d->finished && d->waiters)
{
CloseHandle(d->handle);
d->handle = 0;
}
}
int QThread::idealThreadCount()
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return sysinfo.dwNumberOfProcessors;
}
......@@ -44,7 +44,13 @@ HEADERS = qarray.h \
qxml.h \
qvaluestack.h \
qmap.h \
qmodules.h
qmodules.h \
qthread.h \
qthread_p.h \
qmutex.h \
qmutex_p.h \
qwaitcondition.h
SOURCES = qbuffer.cpp \
qcollection.cpp \
scstring.cpp \
......@@ -67,15 +73,23 @@ SOURCES = qbuffer.cpp \
qtextcodec.cpp \
qstringlist.cpp \
qxml.cpp \
qmap.cpp
qmap.cpp \
qthread.cpp \
qmutex.cpp
unix:SOURCES += qfile_unix.cpp \
qdir_unix.cpp \
qfileinfo_unix.cpp
qfileinfo_unix.cpp \
qthread_unix.cpp \
qmutex_unix.cpp \
qwaitcondition_unix.cpp
win32:SOURCES += qfile_win32.cpp \
qdir_win32.cpp \
qfileinfo_win32.cpp
qfileinfo_win32.cpp \
qthread_win32.cpp \
qmutex_win32.cpp \
qwaitcondition_win32.cpp
INCLUDEPATH = .
TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE
......
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QWAITCONDITION_H
#define QWAITCONDITION_H
#include "qglobal.h"
class QWaitConditionPrivate;
class QMutex;
class QWaitCondition
{
public:
QWaitCondition();
~QWaitCondition();
void wait(QMutex *mutex);
void wakeOne();
void wakeAll();
private:
QWaitCondition(const QWaitCondition &);
QWaitCondition &operator=(const QWaitCondition &);
QWaitConditionPrivate * d;
};
#endif // QWAITCONDITION_H
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qwaitcondition.h"
#include "qmutex.h"
#include <pthread.h>
#define MIN(a,b) ((a)<(b)?(a):(b))
static void report_error(int code, const char *where, const char *what)
{
if (code != 0)
qWarning("%s: %s failure: %d", where, what, code);
}
struct QWaitConditionPrivate
{
pthread_mutex_t mutex;
pthread_cond_t cond;
int waiters;
int wakeups;
void wait()
{
int code;
for (;;)
{
code = pthread_cond_wait(&cond, &mutex);
if (code == 0 && wakeups == 0)
{
// many vendors warn of spurios wakeups from
// pthread_cond_wait(), especially after signal delivery,
// even though POSIX doesn't allow for it... sigh
continue;
}
break;
}
--waiters;
if (code == 0)
{
--wakeups;
}
else
{
report_error(code, "QWaitCondition::wait()", "cv wait");
}
report_error(pthread_mutex_unlock(&mutex), "QWaitCondition::wait()", "mutex unlock");
}
};
QWaitCondition::QWaitCondition()
{
d = new QWaitConditionPrivate;
report_error(pthread_mutex_init(&d->mutex, NULL), "QWaitCondition", "mutex init");
report_error(pthread_cond_init(&d->cond, NULL), "QWaitCondition", "cv init");
d->waiters = d->wakeups = 0;
}
QWaitCondition::~QWaitCondition()
{
report_error(pthread_cond_destroy(&d->cond), "QWaitCondition", "cv destroy");
report_error(pthread_mutex_destroy(&d->mutex), "QWaitCondition", "mutex destroy");
delete d;
}
void QWaitCondition::wakeOne()
{
report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeOne()", "mutex lock");
d->wakeups = MIN(d->wakeups + 1, d->waiters);
report_error(pthread_cond_signal(&d->cond), "QWaitCondition::wakeOne()", "cv signal");
report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeOne()", "mutex unlock");
}
void QWaitCondition::wakeAll()
{
report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wakeAll()", "mutex lock");
d->wakeups = d->waiters;
report_error(pthread_cond_broadcast(&d->cond), "QWaitCondition::wakeAll()", "cv broadcast");
report_error(pthread_mutex_unlock(&d->mutex), "QWaitCondition::wakeAll()", "mutex unlock");
}
void QWaitCondition::wait(QMutex *mutex)
{
if (!mutex) return;
report_error(pthread_mutex_lock(&d->mutex), "QWaitCondition::wait()", "mutex lock");
++d->waiters;
mutex->unlock();
d->wait();
mutex->lock();
}
/****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the QtCore module 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 either Technology Preview License Agreement or the
** Beta Release License Agreement.
**
** 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.0, included in the file LGPL_EXCEPTION.txt in this
** package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at http://www.qtsoftware.com/contact.
** $QT_END_LICENSE$
**
****************************************************************************/
#include <windows.h>
#include "qwaitcondition.h"
#include "qmutex.h"
#include "qlist.h"
//***********************************************************************
// QWaitConditionPrivate
// **********************************************************************
class QWaitConditionEvent
{
public:
QWaitConditionEvent() : priority(0), wokenUp(false)
{
event = CreateEvent(NULL, TRUE, FALSE, NULL);
}
~QWaitConditionEvent() { CloseHandle(event); }
int priority;
bool wokenUp;
HANDLE event;
};
class EventQueue : public QList<QWaitConditionEvent>
{
public:
EventQueue() { setAutoDelete(TRUE); }
~EventQueue() {}
};
class QWaitConditionPrivate
{
public:
QMutex mtx;
EventQueue queue;
EventQueue freeQueue;
QWaitConditionEvent *pre();
void wait(QWaitConditionEvent *wce);
void post(QWaitConditionEvent *wce);
};
QWaitConditionEvent *QWaitConditionPrivate::pre()
{
mtx.lock();
QWaitConditionEvent *wce =
freeQueue.isEmpty() ? new QWaitConditionEvent : freeQueue.take(0);
wce->priority = GetThreadPriority(GetCurrentThread());
wce->wokenUp = FALSE;
// insert 'wce' into the queue (sorted by priority)
uint index = 0;
for (; index < queue.count(); ++index)
{
QWaitConditionEvent *current = queue.at(index);
if (current->priority < wce->priority)
break;
}
queue.insert(index, wce);
mtx.unlock();
return wce;
}
void QWaitConditionPrivate::wait(QWaitConditionEvent *wce)
{
WaitForSingleObject(wce->event, INFINITE);
}
void QWaitConditionPrivate::post(QWaitConditionEvent *wce)
{
mtx.lock();
// remove 'wce' from the queue
int idx = queue.find(wce);
ASSERT(idx!=-1);
queue.take(idx);
ResetEvent(wce->event);
freeQueue.append(wce);
// wakeups delivered after the timeout should be forwarded to the next waiter
if (wce->wokenUp && !queue.isEmpty())
{
QWaitConditionEvent *other = queue.getFirst();
SetEvent(other->event);
other->wokenUp = TRUE;
}
mtx.unlock();
}
//***********************************************************************
// QWaitCondition implementation
//***********************************************************************
QWaitCondition::QWaitCondition()
{
d = new QWaitConditionPrivate;
}
QWaitCondition::~QWaitCondition()
{
if (!d->queue.isEmpty())
{
qWarning("QWaitCondition: Destroyed while threads are still waiting");
}
delete d;
}
void QWaitCondition::wait(QMutex *mutex)
{
if (!mutex) return;
QWaitConditionEvent *wce = d->pre();
mutex->unlock();
d->wait(wce);
mutex->lock();
d->post(wce);
}
void QWaitCondition::wakeOne()
{
// wake up the first waiting thread in the queue
QMutexLocker locker(&d->mtx);
for (uint i = 0; i < d->queue.count(); ++i)
{
QWaitConditionEvent *current = d->queue.at(i);
if (current->wokenUp) continue;
SetEvent(current->event);
current->wokenUp = TRUE;
break;
}
}
void QWaitCondition::wakeAll()
{
// wake up the all threads in the queue
QMutexLocker locker(&d->mtx);
for (uint i = 0; i < d->queue.count(); ++i)
{
QWaitConditionEvent *current = d->queue.at(i);
SetEvent(current->event);
current->wokenUp = TRUE;
}
}
......@@ -1944,7 +1944,7 @@ bool QXmlSimpleReader::feature( const QString& name, bool *ok ) const
} else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) {
return d->reportWhitespaceCharData;
} else {
qWarning( "Unknown feature " + name );
qWarning( "Unknown feature %s", name.ascii() );
if ( ok != 0 )
*ok = FALSE;
}
......@@ -1978,7 +1978,7 @@ void QXmlSimpleReader::setFeature( const QString& name, bool value )
} else if ( name == "http://trolltech.com/xml/features/report-whitespace-only-CharData" ) {
d->reportWhitespaceCharData = value;
} else {
qWarning( "Unknown feature " + name );
qWarning( "Unknown feature %s", name.ascii() );
}
}
......
......@@ -833,12 +833,12 @@ reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
will append .docset to the name.
' defval='org.doxygen.Project' depends='GENERATE_DOCSET'/>
<option type='string' id='DOCSET_PUBLISHER_ID' format='string' docs='
When GENERATE_DOCSET tag specifies a string that should uniquely identify
When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
the documentation publisher. This should be a reverse domain-name style
string, e.g. com.mycompany.MyDocSet.documentation.
' defval='org.doxygen.Publisher' depends='GENERATE_DOCSET'/>
<option type='string' id='DOCSET_PUBLISHER_NAME' format='string' docs='
The GENERATE_DOCSET tag identifies the documentation publisher.
The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
' defval='Publisher' depends='GENERATE_DOCSET'/>
<option type='bool' id='GENERATE_HTMLHELP' docs='
If the GENERATE_HTMLHELP tag is set to YES, additional index files
......@@ -964,6 +964,10 @@ If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
used to set the initial width (in pixels) of the frame in which the tree
is shown.
' minval='0' maxval='1500' defval='250' depends='GENERATE_HTML'/>
<option type='bool' id='EXT_LINKS_IN_WINDOW' defval='0' docs='
When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
links to external symbols imported via tag files in a separate window.
' depends='GENERATE_HTML'/>
<option type='int' id='FORMULA_FONTSIZE' docs='
Use this tag to change the font size of Latex formulas included
as images in the HTML documentation. The default is 10. Note that
......@@ -1311,6 +1315,13 @@ available from the path. This tool is part of Graphviz, a graph visualization
toolkit from AT&amp;T and Lucent Bell Labs. The other options in this section
have no effect if this option is set to NO (the default)
' defval='0'/>
<option type='int' id='DOT_NUM_THREADS' docs='
The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
allowed to run in parallel. When set to 0 (the default) doxygen will
base this on the number of processors available in the system. You can set it
explicitly to a value larger than 0 to get control over the balance
between CPU load and processing speed.
' defval='0' minval='0' maxval='32'/>
<option type='string' id='DOT_FONTNAME' format='string' docs='
By default doxygen will write a font called FreeSans.ttf to the output
directory and reference it in all dot files that doxygen generates. This
......@@ -1320,7 +1331,7 @@ using DOT_FONTNAME. You need need to make sure dot is able to find the font,
which can be done by putting it in a standard location or by setting the
DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
containing the font.
' defval='FreeSans' depends='HAVE_DOT'/>
' defval='FreeSans.ttf' depends='HAVE_DOT'/>
<option type='int' id='DOT_FONTSIZE' docs='
The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
The default size is 10pt.
......
......@@ -1207,7 +1207,7 @@ void addConfigOptions(Config *cfg)
//----
cs = cfg->addString(
"DOCSET_PUBLISHER_ID",
"When GENERATE_DOCSET tag specifies a string that should uniquely identify\n"
"When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify\n"
"the documentation publisher. This should be a reverse domain-name style\n"
"string, e.g. com.mycompany.MyDocSet.documentation."
);
......@@ -1216,7 +1216,7 @@ void addConfigOptions(Config *cfg)
//----
cs = cfg->addString(
"DOCSET_PUBLISHER_NAME",
"The GENERATE_DOCSET tag identifies the documentation publisher."
"The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher."
);
cs->setDefaultValue("Publisher");
cs->addDependency("GENERATE_DOCSET");
......@@ -1429,6 +1429,14 @@ void addConfigOptions(Config *cfg)
);
ci->addDependency("GENERATE_HTML");
//----
cb = cfg->addBool(
"EXT_LINKS_IN_WINDOW",
"When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open\n"
"links to external symbols imported via tag files in a separate window.",
FALSE
);
cb->addDependency("GENERATE_HTML");
//----
ci = cfg->addInt(
"FORMULA_FONTSIZE",
"Use this tag to change the font size of Latex formulas included\n"
......@@ -1991,6 +1999,16 @@ void addConfigOptions(Config *cfg)
FALSE
);
//----
ci = cfg->addInt(
"DOT_NUM_THREADS",
"The DOT_NUM_THREADS specifies the number of dot invocations doxygen is\n"
"allowed to run in parallel. When set to 0 (the default) doxygen will\n"
"base this on the number of processors available in the system. You can set it\n"
"explicitly to a value larger than 0 to get control over the balance\n"
"between CPU load and processing speed.",
0,32,0
);
//----
cs = cfg->addString(
"DOT_FONTNAME",
"By default doxygen will write a font called FreeSans.ttf to the output\n"
......@@ -2002,7 +2020,7 @@ void addConfigOptions(Config *cfg)
"DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory\n"
"containing the font."
);
cs->setDefaultValue("FreeSans");
cs->setDefaultValue("FreeSans.ttf");
cs->addDependency("HAVE_DOT");
//----
ci = cfg->addInt(
......
......@@ -161,19 +161,10 @@ static void writeMapArea(FTextStream &t,ClassDef *cd,QCString relPath,
t << "<area ";
if (!ref.isEmpty())
{
t << "target=\"_blank\" doxygen=\"" << ref << ":";
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
t << "\" ";
t << externalLinkTarget() << externalRef(relPath,ref,FALSE);
}
t << "href=\"";
if (!ref.isEmpty())
{
if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
}
else
{
t << relPath;
}
t << externalRef(relPath,ref,TRUE);
t << cd->getOutputFileBase() << Doxygen::htmlFileExtension << "\" ";
t << "alt=\"" << convertToXML(cd->displayName());
t << "\" shape=\"rect\" coords=\"" << x << "," << y << ",";
......@@ -1253,11 +1244,14 @@ void ClassDiagram::writeFigure(FTextStream &output,const char *path,
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
epsBaseName.data(),epsBaseName.data());
//printf("Converting eps using `%s'\n",epstopdfCmd.data());
portable_sysTimerStart();
if (portable_system("epstopdf",epstopdfArgs)!=0)
{
err("Error: Problems running epstopdf. Check your TeX installation!\n");
portable_sysTimerStop();
return;
}
portable_sysTimerStop();
}
}
......
......@@ -287,10 +287,12 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
outputDir.data(), baseName.data(),
outputDir.data(), baseName.data());
portable_sysTimerStart();
if (portable_system("epstopdf",epstopdfArgs)!=0)
{
err("Error: Problems running epstopdf. Check your TeX installation!\n");
}
portable_sysTimerStop();
return baseName;
}
}
......
......@@ -16,6 +16,7 @@
*
*/
%{
#include <qfile.h>
......@@ -181,7 +182,7 @@ static void handleHtmlTag()
// Parse the name portion
int i = startNamePos;
for (i=startNamePos; i < yyleng; i++)
for (i=startNamePos; i < (int)yyleng; i++)
{
// Check for valid HTML/XML name chars (including namespaces)
char c = tagText.at(i);
......@@ -192,11 +193,11 @@ static void handleHtmlTag()
// Parse the attributes. Each attribute is a name, value pair
// The result is stored in g_token->attribs.
int startName,endName,startAttrib,endAttrib;
while (i<yyleng)
while (i<(int)yyleng)
{
char c=tagText.at(i);
// skip spaces
while (i<yyleng && isspace(c)) { c=tagText.at(++i); }
while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
// check for end of the tag
if (c == '>') break;
// Check for XML style "empty" tag.
......@@ -207,43 +208,43 @@ static void handleHtmlTag()
}
startName=i;
// search for end of name
while (i<yyleng && !isspace(c) && c!='=') { c=tagText.at(++i); }
while (i<(int)yyleng && !isspace(c) && c!='=') { c=tagText.at(++i); }
endName=i;
HtmlAttrib opt;
opt.name = tagText.mid(startName,endName-startName).lower();
// skip spaces
while (i<yyleng && isspace(c)) { c=tagText.at(++i); }
while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
if (tagText.at(i)=='=') // option has value
{
c=tagText.at(++i);
// skip spaces
while (i<yyleng && isspace(c)) { c=tagText.at(++i); }
while (i<(int)yyleng && isspace(c)) { c=tagText.at(++i); }
if (tagText.at(i)=='\'') // option '...'
{
c=tagText.at(++i);
startAttrib=i;
// search for matching quote
while (i<yyleng && c!='\'') { c=tagText.at(++i); }
while (i<(int)yyleng && c!='\'') { c=tagText.at(++i); }
endAttrib=i;
if (i<yyleng) c=tagText.at(++i);
if (i<(int)yyleng) c=tagText.at(++i);
}
else if (tagText.at(i)=='"') // option "..."
{
c=tagText.at(++i);
startAttrib=i;
// search for matching quote
while (i<yyleng && c!='"') { c=tagText.at(++i); }
while (i<(int)yyleng && c!='"') { c=tagText.at(++i); }
endAttrib=i;
if (i<yyleng) c=tagText.at(++i);
if (i<(int)yyleng) c=tagText.at(++i);
}
else // value without any quotes
{
startAttrib=i;
// search for separator or end symbol
while (i<yyleng && !isspace(c) && c!='>') { c=tagText.at(++i); }
while (i<(int)yyleng && !isspace(c) && c!='>') { c=tagText.at(++i); }
endAttrib=i;
if (i<yyleng) c=tagText.at(++i);
if (i<(int)yyleng) c=tagText.at(++i);
}
opt.value = tagText.mid(startAttrib,endAttrib-startAttrib);
}
......
This diff is collapsed.
......@@ -22,6 +22,10 @@
#include "qtbc.h"
#include <qlist.h>
#include <qdict.h>
#include <qwaitcondition.h>
#include <qmutex.h>
#include <qqueue.h>
#include <qthread.h>
#include "sortdict.h"
class ClassDef;
......@@ -34,6 +38,7 @@ class Definition;
class DirDef;
class GroupDef;
class DotGroupCollaboration;
class DotRunnerQueue;
enum GraphOutputFormat { BITMAP , EPS };
......@@ -139,7 +144,7 @@ class DotGfxHierarchyTable
public:
DotGfxHierarchyTable();
~DotGfxHierarchyTable();
void writeGraph(FTextStream &t,const char *path) const;
void writeGraph(FTextStream &t,const char *path,const char *fileName) const;
private:
void addHierarchy(DotNode *n,ClassDef *cd,bool hide);
......@@ -160,7 +165,8 @@ class DotClassGraph
bool isTrivial() const;
bool isTooBig() const;
QCString writeGraph(FTextStream &t,GraphOutputFormat f,const char *path,
const char *relPath, bool TBRank=TRUE,bool imageMap=TRUE) const;
const char *fileName, const char *relPath,
bool TBRank=TRUE,bool imageMap=TRUE) const;
void writeXML(FTextStream &t);
void writeDEF(FTextStream &t);
......@@ -188,8 +194,8 @@ class DotInclDepGraph
public:
DotInclDepGraph(FileDef *fd,bool inverse);
~DotInclDepGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f,const char *path,
const char *relPath,
QCString writeGraph(FTextStream &t, GraphOutputFormat f,
const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE) const;
bool isTrivial() const;
bool isTooBig() const;
......@@ -216,7 +222,8 @@ class DotCallGraph
DotCallGraph(MemberDef *md,bool inverse);
~DotCallGraph();
QCString writeGraph(FTextStream &t, GraphOutputFormat f,
const char *path,const char *relPath,bool writeImageMap=TRUE) const;
const char *path,const char *fileName,
const char *relPath,bool writeImageMap=TRUE) const;
void buildGraph(DotNode *n,MemberDef *md,int distance);
bool isTrivial() const;
bool isTooBig() const;
......@@ -244,6 +251,7 @@ class DotDirDeps
QCString writeGraph(FTextStream &out,
GraphOutputFormat format,
const char *path,
const char *fileName,
const char *relPath,
bool writeImageMap=TRUE) const;
private:
......@@ -290,7 +298,7 @@ class DotGroupCollaboration
DotGroupCollaboration(GroupDef* gd);
~DotGroupCollaboration();
QCString writeGraph(FTextStream &t, GraphOutputFormat format,
const char *path,const char *relPath,
const char *path,const char *fileName,const char *relPath,
bool writeImageMap=TRUE) const;
void buildGraph(GroupDef* gd);
bool isTrivial() const;
......@@ -314,7 +322,8 @@ class DotRunner
{
public:
/** Creates a runner for a dot \a file. */
DotRunner(const char *file);
DotRunner(const QCString &file,const QCString &fontPath,bool checkResult,
const QCString &imageName = QCString());
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
......@@ -323,6 +332,8 @@ class DotRunner
void addPostProcessing(const char *cmd,const char *args);
void preventCleanUp() { m_cleanUp = FALSE; }
/** Runs dot for all jobs added. */
bool run();
private:
......@@ -330,6 +341,79 @@ class DotRunner
QCString m_postArgs;
QCString m_postCmd;
QCString m_file;
QCString m_path;
bool m_checkResult;
QCString m_imageName;
bool m_cleanUp;
};
/** @brief Helper class to insert a set of map file into an output file */
class DotMapConverter
{
public:
struct Map
{
QCString mapFile;
QCString relPath;
bool urlOnly;
QCString context;
QCString label;
};
DotMapConverter(const char *patchFile);
int addMap(const QCString &mapFile,const QCString &relPath,
bool urlOnly,const QCString &context,const QCString &label);
int addFigure(const QCString &baseName,
const QCString &figureName,bool heightCheck);
bool run();
private:
QList<Map> m_maps;
QCString m_patchFile;
};
class DotRunnerQueue
{
public:
void enqueue(DotRunner *runner);
DotRunner *dequeue();
uint count() const;
private:
QWaitCondition m_bufferNotEmpty;
QQueue<DotRunner> m_queue;
mutable QMutex m_mutex;
};
class DotWorkerThread : public QThread
{
public:
DotWorkerThread(int id,DotRunnerQueue *queue);
void run();
private:
int m_id;
DotRunnerQueue *m_queue;
};
/** @brief singleton that manages dot relation actions */
class DotManager
{
public:
static DotManager *instance();
void addRun(DotRunner *run);
int addMap(const QCString &file,const QCString &mapFile,
const QCString &relPath,bool urlOnly,
const QCString &context,const QCString &label);
int addFigure(const QCString &file,const QCString &baseName,
const QCString &figureName,bool heightCheck);
bool run();
private:
DotManager();
virtual ~DotManager();
QList<DotRunner> m_dotRuns;
SDict<DotMapConverter> m_dotMaps;
static DotManager *m_theInstance;
DotRunnerQueue *m_queue;
QList<DotWorkerThread> m_workers;
};
......@@ -339,7 +423,7 @@ void generateGraphLegend(const char *path);
void writeDotGraphFromFile(const char *inFile,const char *outDir,
const char *outFile,GraphOutputFormat format);
QCString getDotImageMapFromFile(const QCString& inFile, const QCString& outDir,
const QCString& relPath,const QCString &context);
const QCString& relPath,const QCString& context);
void writeDotDirDepGraph(FTextStream &t,DirDef *dd);
......
This diff is collapsed.
......@@ -138,7 +138,7 @@ dl.el {
pre.fragment {
border: 1px solid ##CC;
background-color: ##f5;
background-color: ##FC;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
......@@ -400,44 +400,44 @@ table.memberdecls {
}
.memproto {
border-top: 1px solid ##80;
border-left: 1px solid ##80;
border-right: 1px solid ##80;
padding: 0;
background-color: ##c8;
border-top: 1px solid ##B4;
border-left: 1px solid ##B4;
border-right: 1px solid ##B4;
padding: 6px 0px 6px 0px;
color: ##2b;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
/* firefox specific markup */
background-image: -moz-linear-gradient(center top, ##F8, ##E8 30%, ##E0 90%, ##D0);
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topleft: 8px;
/* webkit specific markup */
background-image: -webkit-gradient(linear,center top,center bottom,from(##F8),color-stop(0.3,##E0),color-stop(0.9,##E0),to(##D0));
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
background-image:url('nav_f.png');
background-repeat:repeat-x;
background-color: ##E6;
}
.memdoc {
border-bottom: 1px solid ##80;
border-left: 1px solid ##80;
border-right: 1px solid ##80;
border-bottom: 1px solid ##B4;
border-left: 1px solid ##B4;
border-right: 1px solid ##B4;
padding: 2px 5px;
background-color: ##E0;
background-color: ##FC;
border-top-width: 0;
/* firefox specific markup */
-moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
background-image: -moz-linear-gradient(center top, ##FF 0%, ##F8 80%, ##F0);
background-image: -moz-linear-gradient(center top, ##FF 0%, ##FF 60%, #F8 95%, #F0);
/* webkit specific markup */
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.2,##F8), to(##F0));
background-image: -webkit-gradient(linear,center top,center bottom,from(##FF), color-stop(0.6,##FF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0));
}
.paramkey {
......
......@@ -18,15 +18,15 @@ TEMPLATE = app.t
CONFIG = console warn_on $extraopts
HEADERS = doxygen.h
SOURCES = main.cpp
unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5
unix:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5
win32-mingw:LIBS += -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -lpthread
win32-msvc:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\lib
win32-borland:LIBS += qtools.lib md5.lib doxygen.lib doxycfg.lib shell32.lib iconv.lib
win32-borland:TMAKE_LFLAGS += -L..\lib -L$(BCB)\lib\psdk
win32:TMAKE_CXXFLAGS += -DQT_NODLL
win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv
win32-g++:LIBS = -L../lib -ldoxygen -ldoxycfg -lqtools -lmd5 -liconv -lpthread
win32-g++:TMAKE_CXXFLAGS += -fno-exceptions -fno-rtti
INCLUDEPATH += ../qtools ../libmd5 .
DESTDIR = ../bin
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment