diff options
Diffstat (limited to 'src/tools/qdoc')
66 files changed, 351 insertions, 1380 deletions
diff --git a/src/tools/qdoc/atom.cpp b/src/tools/qdoc/atom.cpp index 481cfffd75..6f9da3790d 100644 --- a/src/tools/qdoc/atom.cpp +++ b/src/tools/qdoc/atom.cpp @@ -349,7 +349,7 @@ QString Atom::typeString() const int i = 0; while (atms[i].english != 0) { if (atms[i].no != i) - Location::internalError(tr("atom %1 missing").arg(i)); + Location::internalError(QCoreApplication::translate("QDoc::Atom", "atom %1 missing").arg(i)); i++; } deja = true; diff --git a/src/tools/qdoc/codeparser.h b/src/tools/qdoc/codeparser.h index cbb8544d6f..8c398aeb05 100644 --- a/src/tools/qdoc/codeparser.h +++ b/src/tools/qdoc/codeparser.h @@ -54,6 +54,8 @@ class QDocDatabase; class CodeParser { + Q_DECLARE_TR_FUNCTIONS(QDoc::CodeParser) + public: CodeParser(); virtual ~CodeParser(); diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index 9b58df19ee..766697dfc2 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -88,6 +88,8 @@ void MetaStackEntry::close() */ class MetaStack : private QStack<MetaStackEntry> { + Q_DECLARE_TR_FUNCTIONS(QDoc::MetaStack) + public: MetaStack(); diff --git a/src/tools/qdoc/config.h b/src/tools/qdoc/config.h index 419329797b..2c655cdf23 100644 --- a/src/tools/qdoc/config.h +++ b/src/tools/qdoc/config.h @@ -72,6 +72,8 @@ typedef QMap<QString, QStringListPair> QStringListPairMap; class Config { + Q_DECLARE_TR_FUNCTIONS(QDoc::Config) + public: Config(const QString& programName); ~Config(); diff --git a/src/tools/qdoc/cppcodemarker.h b/src/tools/qdoc/cppcodemarker.h index f4bdca0133..91a9c01a28 100644 --- a/src/tools/qdoc/cppcodemarker.h +++ b/src/tools/qdoc/cppcodemarker.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE class CppCodeMarker : public CodeMarker { + Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeMarker) + public: CppCodeMarker(); ~CppCodeMarker(); diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index e83147776f..0af5a841eb 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -57,6 +57,7 @@ QT_BEGIN_NAMESPACE /* qmake ignore Q_OBJECT */ +static bool inMacroCommand_ = false; QStringList CppCodeParser::exampleFiles; QStringList CppCodeParser::exampleDirs; @@ -311,13 +312,14 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, const QString& command, const ArgLocPair& arg) { + ExtraFuncData extra; if (command == COMMAND_FN) { QStringList parentPath; FunctionNode *func = 0; FunctionNode *clone = 0; - if (!makeFunctionNode(arg.first, &parentPath, &clone) && - !makeFunctionNode("void " + arg.first, &parentPath, &clone)) { + if (!makeFunctionNode(arg.first, &parentPath, &clone, extra) && + !makeFunctionNode("void " + arg.first, &parentPath, &clone, extra)) { doc.startLocation().warning(tr("Invalid syntax in '\\%1'").arg(COMMAND_FN)); } else { @@ -368,7 +370,9 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc, QStringList parentPath; FunctionNode *func = 0; - if (makeFunctionNode(arg.first, &parentPath, &func, qdb_->treeRoot())) { + extra.root = qdb_->treeRoot(); + extra.isMacro = true; + if (makeFunctionNode(arg.first, &parentPath, &func, extra)) { if (!parentPath.isEmpty()) { doc.startLocation().warning(tr("Invalid syntax in '\\%1'").arg(COMMAND_MACRO)); delete func; @@ -1152,7 +1156,6 @@ bool CppCodeParser::matchTemplateAngles(CodeChunk *dataType) if (--parenAndBraceDepth < 0) return false; } - if (dataType != 0) dataType->append(lexeme()); readToken(); @@ -1161,6 +1164,9 @@ bool CppCodeParser::matchTemplateAngles(CodeChunk *dataType) return matches; } +/* + This function is no longer used. + */ bool CppCodeParser::matchTemplateHeader() { readToken(); @@ -1204,13 +1210,27 @@ bool CppCodeParser::matchDataType(CodeChunk *dataType, QString *var) } if (virgin) { - if (match(Tok_Ident)) - dataType->append(previousLexeme()); + if (match(Tok_Ident)) { + /* + This is a hack until we replace this "parser" + with the real one used in Qt Creator. + */ + if (!inMacroCommand_ && lexeme() == "(" && + ((previousLexeme() == "QT_PREPEND_NAMESPACE") || (previousLexeme() == "NS"))) { + readToken(); + readToken(); + dataType->append(previousLexeme()); + readToken(); + } + else + dataType->append(previousLexeme()); + } else if (match(Tok_void) || match(Tok_int) || match(Tok_char) || match(Tok_double) || match(Tok_Ellipsis)) dataType->append(previousLexeme()); - else + else { return false; + } } else if (match(Tok_int) || match(Tok_char) || match(Tok_double)) { dataType->append(previousLexeme()); @@ -1242,8 +1262,9 @@ bool CppCodeParser::matchDataType(CodeChunk *dataType, QString *var) dataType->appendHotspot(); if (var != 0 && match(Tok_Ident)) *var = previousLexeme(); - if (!match(Tok_RightParen) || tok != Tok_LeftParen) + if (!match(Tok_RightParen) || tok != Tok_LeftParen) { return false; + } dataType->append(previousLexeme()); int parenDepth0 = tokenizer->parenDepth(); @@ -1298,8 +1319,9 @@ bool CppCodeParser::matchParameter(FunctionNode *func) QString name; CodeChunk defaultValue; - if (!matchDataType(&dataType, &name)) + if (!matchDataType(&dataType, &name)) { return false; + } match(Tok_Comment); if (match(Tok_Equal)) { int parenDepth0 = tokenizer->parenDepth(); @@ -1312,10 +1334,7 @@ bool CppCodeParser::matchParameter(FunctionNode *func) readToken(); } } - func->addParameter(Parameter(dataType.toString(), - "", - name, - defaultValue.toString())); // ### + func->addParameter(Parameter(dataType.toString(), "", name, defaultValue.toString())); // ### return true; } @@ -1323,16 +1342,16 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, QStringList *parentPathPtr, FunctionNode **funcPtr, const QString &templateStuff, - Node::Type type, - bool attached) + ExtraFuncData& extra) { CodeChunk returnType; QStringList parentPath; QString name; - bool compat = false; - if (match(Tok_friend)) + + if (match(Tok_friend)) { return false; + } match(Tok_explicit); if (matchCompat()) compat = true; @@ -1473,7 +1492,7 @@ bool CppCodeParser::matchFunctionDecl(InnerNode *parent, } readToken(); - FunctionNode *func = new FunctionNode(type, parent, name, attached); + FunctionNode *func = new FunctionNode(extra.type, parent, name, extra.isAttached); func->setAccess(access); func->setLocation(location()); func->setReturnType(returnType.toString()); @@ -1899,6 +1918,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent) */ bool CppCodeParser::matchDeclList(InnerNode *parent) { + ExtraFuncData extra; QString templateStuff; int braceDepth0 = tokenizer->braceDepth(); if (tok == Tok_RightBrace) // prevents failure on empty body @@ -1921,7 +1941,12 @@ bool CppCodeParser::matchDeclList(InnerNode *parent) matchUsingDecl(); break; case Tok_template: - templateStuff = matchTemplateHeader(); + { + CodeChunk dataType; + readToken(); + matchTemplateAngles(&dataType); + templateStuff = dataType.toString(); + } continue; case Tok_enum: matchEnumDecl(parent); @@ -2017,13 +2042,14 @@ bool CppCodeParser::matchDeclList(InnerNode *parent) match(Tok_RightParen); break; default: - if (!matchFunctionDecl(parent, 0, 0, templateStuff)) { + if (!matchFunctionDecl(parent, 0, 0, templateStuff, extra)) { while (tok != Tok_Eoi && (tokenizer->braceDepth() > braceDepth0 || (!match(Tok_Semicolon) && tok != Tok_public && tok != Tok_protected && - tok != Tok_private))) + tok != Tok_private))) { readToken(); + } } } templateStuff.clear(); @@ -2037,6 +2063,7 @@ bool CppCodeParser::matchDeclList(InnerNode *parent) */ bool CppCodeParser::matchDocsAndStuff() { + ExtraFuncData extra; QSet<QString> topicCommandsAllowed = topicCommands(); QSet<QString> otherMetacommandsAllowed = otherMetaCommands(); QSet<QString> metacommandsAllowed = topicCommandsAllowed + @@ -2082,7 +2109,7 @@ bool CppCodeParser::matchDocsAndStuff() FunctionNode *clone; FunctionNode *func = 0; - if (matchFunctionDecl(0, &parentPath, &clone)) { + if (matchFunctionDecl(0, &parentPath, &clone, QString(), extra)) { foreach (const QString& usedNamespace_, activeNamespaces_) { QStringList newPath = usedNamespace_.split("::") + parentPath; func = qdb_->findFunctionNode(newPath, clone); @@ -2176,7 +2203,7 @@ bool CppCodeParser::matchDocsAndStuff() FunctionNode *clone; FunctionNode *node = 0; - if (matchFunctionDecl(0, &parentPath, &clone)) { + if (matchFunctionDecl(0, &parentPath, &clone, QString(), extra)) { /* The location of the definition is more interesting than that of the declaration. People equipped with @@ -2209,9 +2236,7 @@ bool CppCodeParser::matchDocsAndStuff() bool CppCodeParser::makeFunctionNode(const QString& signature, QStringList* parentPathPtr, FunctionNode** funcPtr, - InnerNode* root, - Node::Type type, - bool attached) + ExtraFuncData& extra) { Tokenizer* outerTokenizer = tokenizer; int outerTok = tok; @@ -2223,7 +2248,9 @@ bool CppCodeParser::makeFunctionNode(const QString& signature, tokenizer = &stringTokenizer; readToken(); - bool ok = matchFunctionDecl(root, parentPathPtr, funcPtr, QString(), type, attached); + inMacroCommand_ = extra.isMacro; + bool ok = matchFunctionDecl(extra.root, parentPathPtr, funcPtr, QString(), extra); + inMacroCommand_ = false; // potential memory leak with funcPtr tokenizer = outerTokenizer; @@ -2252,15 +2279,14 @@ FunctionNode* CppCodeParser::makeFunctionNode(const Doc& doc, { QStringList pp; FunctionNode* fn = 0; - if (!makeFunctionNode(sig,&pp,&fn,parent,type,attached) && - !makeFunctionNode("void "+sig,&pp,&fn,parent,type,attached)) { + ExtraFuncData extra(parent, type, attached); + if (!makeFunctionNode(sig, &pp, &fn, extra) && !makeFunctionNode("void " + sig, &pp, &fn, extra)) { doc.location().warning(tr("Invalid syntax in '\\%1'").arg(qdoctag)); } return fn; } -void CppCodeParser::parseQiteratorDotH(const Location &location, - const QString &filePath) +void CppCodeParser::parseQiteratorDotH(const Location &location, const QString &filePath) { QFile file(filePath); if (!file.open(QFile::ReadOnly)) diff --git a/src/tools/qdoc/cppcodeparser.h b/src/tools/qdoc/cppcodeparser.h index 72c5907166..eae5d1e97d 100644 --- a/src/tools/qdoc/cppcodeparser.h +++ b/src/tools/qdoc/cppcodeparser.h @@ -57,6 +57,18 @@ class Tokenizer; class CppCodeParser : public CodeParser { + Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser) + + struct ExtraFuncData { + InnerNode* root; // Used as the parent. + Node::Type type; // The node type: Function, etc. + bool isAttached; // If true, the method is attached. + bool isMacro; // If true, we are parsing a macro signature. + ExtraFuncData() : root(0), type(Node::Function), isAttached(false), isMacro(false) { } + ExtraFuncData(InnerNode* r, Node::Type t, bool a) + : root(r), type(t), isAttached(a), isMacro(false) { } + }; + public: CppCodeParser(); ~CppCodeParser(); @@ -112,11 +124,10 @@ protected: bool matchDataType(CodeChunk *type, QString *var = 0); bool matchParameter(FunctionNode *func); bool matchFunctionDecl(InnerNode *parent, - QStringList *parentPathPtr = 0, - FunctionNode **funcPtr = 0, - const QString &templateStuff = QString(), - Node::Type type = Node::Function, - bool attached = false); + QStringList *parentPathPtr, + FunctionNode **funcPtr, + const QString &templateStuff, + ExtraFuncData& extra); bool matchBaseSpecifier(ClassNode *classe, bool isClass); bool matchBaseList(ClassNode *classe, bool isClass); bool matchClassDecl(InnerNode *parent, @@ -132,9 +143,7 @@ protected: bool makeFunctionNode(const QString &synopsis, QStringList *parentPathPtr, FunctionNode **funcPtr, - InnerNode *root = 0, - Node::Type type = Node::Function, - bool attached = false); + ExtraFuncData& params); FunctionNode* makeFunctionNode(const Doc& doc, const QString& sig, InnerNode* parent, diff --git a/src/tools/qdoc/ditaxmlgenerator.h b/src/tools/qdoc/ditaxmlgenerator.h index 95e034bc43..c096829cae 100644 --- a/src/tools/qdoc/ditaxmlgenerator.h +++ b/src/tools/qdoc/ditaxmlgenerator.h @@ -56,6 +56,8 @@ typedef QMap<QString, GuidMap*> GuidMaps; class DitaXmlGenerator : public Generator { + Q_DECLARE_TR_FUNCTIONS(QDoc::DitaXmlGenerator) + public: enum SinceType { Namespace, diff --git a/src/tools/qdoc/doc.cpp b/src/tools/qdoc/doc.cpp index 3154578766..a0a2e51198 100644 --- a/src/tools/qdoc/doc.cpp +++ b/src/tools/qdoc/doc.cpp @@ -439,6 +439,8 @@ bool DocPrivate::isEnumDocSimplifiable() const class DocParser { + Q_DECLARE_TR_FUNCTIONS(QDoc::DocParser) + public: void parse(const QString &source, DocPrivate *docPrivate, diff --git a/src/tools/qdoc/doc.h b/src/tools/qdoc/doc.h index abbe231a46..ca9787595f 100644 --- a/src/tools/qdoc/doc.h +++ b/src/tools/qdoc/doc.h @@ -121,6 +121,8 @@ public: class Doc { + Q_DECLARE_TR_FUNCTIONS(QDoc::Doc) + public: // the order is important enum Sections { diff --git a/src/tools/qdoc/doc/config/compat.qdocconf b/src/tools/qdoc/doc/config/compat.qdocconf deleted file mode 100644 index 3e7ea6c891..0000000000 --- a/src/tools/qdoc/doc/config/compat.qdocconf +++ /dev/null @@ -1,12 +0,0 @@ -alias.include = input - -macro.0 = "\\\\0" -macro.b = "\\\\b" -macro.n = "\\\\n" -macro.r = "\\\\r" -macro.img = "\\image" -macro.endquote = "\\endquotation" -macro.relatesto = "\\relates" - -spurious = "Missing comma in .*" \ - "Missing pattern .*" diff --git a/src/tools/qdoc/doc/config/config.pro b/src/tools/qdoc/doc/config/config.pro deleted file mode 100644 index ee7aea8a04..0000000000 --- a/src/tools/qdoc/doc/config/config.pro +++ /dev/null @@ -1,13 +0,0 @@ -SOURCES = config.pro \ - compat.qdocconf \ - qdoc-online.qdocconf \ - qt-defines.qdocconf \ - qt-html-templates.qdocconf \ - qdoc-project.qdocconf \ - qt-html-default-styles.qdocconf \ - qdoc.qdocconf \ - qt-html-online-styles.qdocconf \ - macros.qdocconf \ - qt-cpp-ignore.qdocconf \ - qt-html-templates-online.qdocconf - diff --git a/src/tools/qdoc/doc/config/images/arrow_down.png b/src/tools/qdoc/doc/config/images/arrow_down.png Binary files differdeleted file mode 100644 index 9d01e97f6a..0000000000 --- a/src/tools/qdoc/doc/config/images/arrow_down.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bg_l.png b/src/tools/qdoc/doc/config/images/bg_l.png Binary files differdeleted file mode 100755 index 90b1da10b9..0000000000 --- a/src/tools/qdoc/doc/config/images/bg_l.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bg_l_blank.png b/src/tools/qdoc/doc/config/images/bg_l_blank.png Binary files differdeleted file mode 100755 index 5a9673d81b..0000000000 --- a/src/tools/qdoc/doc/config/images/bg_l_blank.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bg_ll_blank.png b/src/tools/qdoc/doc/config/images/bg_ll_blank.png Binary files differdeleted file mode 100644 index 95a1c45e04..0000000000 --- a/src/tools/qdoc/doc/config/images/bg_ll_blank.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bg_r.png b/src/tools/qdoc/doc/config/images/bg_r.png Binary files differdeleted file mode 100755 index f0fb121dea..0000000000 --- a/src/tools/qdoc/doc/config/images/bg_r.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bg_ul_blank.png b/src/tools/qdoc/doc/config/images/bg_ul_blank.png Binary files differdeleted file mode 100644 index 70512614cc..0000000000 --- a/src/tools/qdoc/doc/config/images/bg_ul_blank.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/box_bg.png b/src/tools/qdoc/doc/config/images/box_bg.png Binary files differdeleted file mode 100755 index 3322f923f8..0000000000 --- a/src/tools/qdoc/doc/config/images/box_bg.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/breadcrumb.png b/src/tools/qdoc/doc/config/images/breadcrumb.png Binary files differdeleted file mode 100755 index 0ded5514d2..0000000000 --- a/src/tools/qdoc/doc/config/images/breadcrumb.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bullet_dn.png b/src/tools/qdoc/doc/config/images/bullet_dn.png Binary files differdeleted file mode 100644 index f7762472e2..0000000000 --- a/src/tools/qdoc/doc/config/images/bullet_dn.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bullet_gt.png b/src/tools/qdoc/doc/config/images/bullet_gt.png Binary files differdeleted file mode 100755 index 7561b4edc4..0000000000 --- a/src/tools/qdoc/doc/config/images/bullet_gt.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bullet_sq.png b/src/tools/qdoc/doc/config/images/bullet_sq.png Binary files differdeleted file mode 100755 index a84845e3c7..0000000000 --- a/src/tools/qdoc/doc/config/images/bullet_sq.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/bullet_up.png b/src/tools/qdoc/doc/config/images/bullet_up.png Binary files differdeleted file mode 100644 index 7de2f06954..0000000000 --- a/src/tools/qdoc/doc/config/images/bullet_up.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/feedbackground.png b/src/tools/qdoc/doc/config/images/feedbackground.png Binary files differdeleted file mode 100755 index 3a38d995d7..0000000000 --- a/src/tools/qdoc/doc/config/images/feedbackground.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/header_bg.png b/src/tools/qdoc/doc/config/images/header_bg.png Binary files differdeleted file mode 100644 index a436aa61ef..0000000000 --- a/src/tools/qdoc/doc/config/images/header_bg.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/horBar.png b/src/tools/qdoc/doc/config/images/horBar.png Binary files differdeleted file mode 100755 index 100fe91c6c..0000000000 --- a/src/tools/qdoc/doc/config/images/horBar.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/page.png b/src/tools/qdoc/doc/config/images/page.png Binary files differdeleted file mode 100644 index 1db151bd31..0000000000 --- a/src/tools/qdoc/doc/config/images/page.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/page_bg.png b/src/tools/qdoc/doc/config/images/page_bg.png Binary files differdeleted file mode 100755 index 9b3bd999df..0000000000 --- a/src/tools/qdoc/doc/config/images/page_bg.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/spinner.gif b/src/tools/qdoc/doc/config/images/spinner.gif Binary files differdeleted file mode 100644 index 1ed786f2ec..0000000000 --- a/src/tools/qdoc/doc/config/images/spinner.gif +++ /dev/null diff --git a/src/tools/qdoc/doc/config/images/sprites-combined.png b/src/tools/qdoc/doc/config/images/sprites-combined.png Binary files differdeleted file mode 100755 index 3a48b21f6b..0000000000 --- a/src/tools/qdoc/doc/config/images/sprites-combined.png +++ /dev/null diff --git a/src/tools/qdoc/doc/config/macros.qdocconf b/src/tools/qdoc/doc/config/macros.qdocconf deleted file mode 100644 index 2dbc9c1f91..0000000000 --- a/src/tools/qdoc/doc/config/macros.qdocconf +++ /dev/null @@ -1,40 +0,0 @@ -macro.aacute.HTML = "á" -macro.Aring.HTML = "Å" -macro.aring.HTML = "å" -macro.Auml.HTML = "Ä" -macro.author = "\\bold{Author:}" -macro.br.HTML = "<br />" -macro.BR.HTML = "<br />" -macro.copyright.HTML = "©" -macro.eacute.HTML = "é" -macro.gui = "\\bold" -macro.hr.HTML = "<hr />" -macro.iacute.HTML = "í" -macro.key = "\\bold" -macro.menu = "\\bold" -macro.note = "\\bold{Note:}" -macro.oslash.HTML = "ø" -macro.ouml.HTML = "ö" -macro.QA = "\\e{Qt Assistant}" -macro.QD = "\\e{Qt Designer}" -macro.QL = "\\e{Qt Linguist}" -macro.QQV = "\\e{Qt QML Viewer}" -macro.param = "\\e" -macro.raisedaster.HTML = "<sup>*</sup>" -macro.rarrow.HTML = "→" -macro.reg.HTML = "<sup>®</sup>" -macro.return = "Returns" -macro.starslash = "\\c{*/}" -macro.begincomment = "\\c{/*}" -macro.endcomment = "\\c{*/}" -macro.uuml.HTML = "ü" -macro.mdash.HTML = "—" -macro.pi.HTML = "Π" -macro.beginqdoc.HTML = "/*!" -macro.endqdoc.HTML = "*/" - -macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">" -macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">" -macro.endfloat.HTML = "</div>" -macro.clearfloat.HTML = "<br style=\"clear: both\" />" -macro.emptyspan.HTML = "<span></span>" diff --git a/src/tools/qdoc/doc/config/qdoc-online.qdocconf b/src/tools/qdoc/doc/config/qdoc-online.qdocconf deleted file mode 100644 index 7fd8ed59f4..0000000000 --- a/src/tools/qdoc/doc/config/qdoc-online.qdocconf +++ /dev/null @@ -1,2 +0,0 @@ -include(qdoc-project.qdocconf) -include(qt-html-templates-online.qdocconf) diff --git a/src/tools/qdoc/doc/config/qdoc-project.qdocconf b/src/tools/qdoc/doc/config/qdoc-project.qdocconf deleted file mode 100644 index 10cdfa417b..0000000000 --- a/src/tools/qdoc/doc/config/qdoc-project.qdocconf +++ /dev/null @@ -1,45 +0,0 @@ -include(compat.qdocconf) -include(macros.qdocconf) -include(qt-cpp-ignore.qdocconf) -include(qt-defines.qdocconf) - -sourceencoding = UTF-8 -outputencoding = UTF-8 -naturallanguage = en_US - -project = QDoc -description = QDoc Manual -url = http://doc-snapshot.qt-project.org/qdoc - -sources.fileextensions = "*.cpp *.qdoc *.mm *.qml" -headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx" -examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml *.qdoc *.qdocconf *.qdocinc" -examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng" - -sourcedirs = .. - -exampledirs = .. \ - ../examples \ - ../../../../examples \ - config - -imagedirs = ../../../doc/src/templates/images \ - images - -tagfile = ../html/qdoc.tags - -qhp.projects = QDoc - -qhp.QDoc.file = qdoc.qhp -qhp.QDoc.namespace = com.trolltech.qdoc -qhp.QDoc.virtualFolder = qdoc -qhp.QDoc.indexTitle = QDoc Manual - Table of Contents -qhp.QDoc.indexRoot = - -qhp.QDoc.filterAttributes = qdoc qtrefdoc -qhp.QDoc.customFilters.QDoc.name = QDoc -qhp.QDoc.customFilters.QDoc.filterAttributes = qdoc -qhp.QDoc.subprojects = overviews -qhp.QDoc.subprojects.overviews.title = Overviews -qhp.QDoc.subprojects.overviews.indexTitle = All Overviews and HOWTOs -qhp.QDoc.subprojects.overviews.selectors = fake:page,group,module diff --git a/src/tools/qdoc/doc/config/qdoc.qdocconf b/src/tools/qdoc/doc/config/qdoc.qdocconf index c238abef88..6bbe934749 100644 --- a/src/tools/qdoc/doc/config/qdoc.qdocconf +++ b/src/tools/qdoc/doc/config/qdoc.qdocconf @@ -1,2 +1,71 @@ -include(qdoc-project.qdocconf) -include(qt-html-templates.qdocconf) +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QDoc +description = QDoc Manual +url = http://qt-project.org/doc/qt-$QT_VER +version = $QT_VERSION + +sourcedirs = .. + +exampledirs = .. \ + ../examples \ + ../../../../examples \ + config + +imagedirs = ../../../doc/src/templates/images \ + images + +tagfile = ../html/qdoc.tags + +qhp.projects = QDoc + +qhp.QDoc.file = qdoc.qhp +qhp.QDoc.namespace = qdoc.$QT_VERSION_TAG +qhp.QDoc.virtualFolder = qdoc +qhp.QDoc.indexTitle = QDoc Manual +qhp.QDoc.indexRoot = + +qhp.QDoc.filterAttributes = qdoc qtrefdoc +qhp.QDoc.customFilters.QDoc.name = QDoc +qhp.QDoc.customFilters.QDoc.filterAttributes = qdoc +qhp.QDoc.subprojects = overviews +qhp.QDoc.subprojects.overviews.title = Overviews +qhp.QDoc.subprojects.overviews.indexTitle = QDoc Manual +qhp.QDoc.subprojects.overviews.selectors = fake:page,group,module + +depends += \ + activeqt \ + qtassistant \ + qtbluetooth \ + qtconcurrent \ + qtcontacts \ + qtcore \ + qtdbus \ + qtdesigner \ + qtdoc \ + qthelp \ + qtimageformats \ + qtgui \ + qtlocation \ + qtlinguist \ + qtmultimedia \ + qtnetwork \ + qtopengl \ + qtorganizer \ + qtprintsupport \ + qtqml \ + qtquick \ + qtscript \ + qtscripttools \ + qtsensors \ + qtsql \ + qtsvg \ + qttestlib \ + qttools \ + qtuitools \ + qtversit \ + qtwidgets \ + qtwebkit \ + qtwebkitexamples \ + qtxml \ + qtxmlpatterns diff --git a/src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf b/src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf deleted file mode 100644 index 38a421f829..0000000000 --- a/src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf +++ /dev/null @@ -1,96 +0,0 @@ -Cpp.ignoretokens = QAXFACTORY_EXPORT \ - QDESIGNER_COMPONENTS_LIBRARY \ - QDESIGNER_EXTENSION_LIBRARY \ - QDESIGNER_SDK_LIBRARY \ - QDESIGNER_SHARED_LIBRARY \ - QDESIGNER_UILIB_LIBRARY \ - QM_EXPORT_CANVAS \ - QM_EXPORT_DNS \ - QM_EXPORT_DOM \ - QM_EXPORT_FTP \ - QM_EXPORT_HTTP \ - QM_EXPORT_ICONVIEW \ - QM_EXPORT_NETWORK \ - QM_EXPORT_OPENGL \ - QM_EXPORT_OPENVG \ - QM_EXPORT_SQL \ - QM_EXPORT_TABLE \ - QM_EXPORT_WORKSPACE \ - QM_EXPORT_XML \ - QT_ASCII_CAST_WARN \ - QT_ASCII_CAST_WARN_CONSTRUCTOR \ - QT_DESIGNER_STATIC \ - QT_FASTCALL \ - QT_WIDGET_PLUGIN_EXPORT \ - Q_COMPAT_EXPORT \ - Q_CORE_EXPORT \ - Q_CORE_EXPORT_INLINE \ - Q_EXPLICIT \ - Q_EXPORT \ - Q_EXPORT_CODECS_CN \ - Q_EXPORT_CODECS_JP \ - Q_EXPORT_CODECS_KR \ - Q_EXPORT_PLUGIN \ - Q_GFX_INLINE \ - Q_AUTOTEST_EXPORT \ - Q_GUI_EXPORT \ - Q_GUI_EXPORT_INLINE \ - Q_GUI_EXPORT_STYLE_CDE \ - Q_GUI_EXPORT_STYLE_COMPACT \ - Q_GUI_EXPORT_STYLE_MAC \ - Q_GUI_EXPORT_STYLE_MOTIF \ - Q_GUI_EXPORT_STYLE_MOTIFPLUS \ - Q_GUI_EXPORT_STYLE_PLATINUM \ - Q_GUI_EXPORT_STYLE_POCKETPC \ - Q_GUI_EXPORT_STYLE_SGI \ - Q_GUI_EXPORT_STYLE_WINDOWS \ - Q_GUI_EXPORT_STYLE_WINDOWSXP \ - QHELP_EXPORT \ - Q_INLINE_TEMPLATE \ - Q_INTERNAL_WIN_NO_THROW \ - Q_LOCATION_EXPORT \ - Q_NETWORK_EXPORT \ - Q_OPENGL_EXPORT \ - Q_OPENVG_EXPORT \ - Q_OUTOFLINE_TEMPLATE \ - Q_SQL_EXPORT \ - Q_SVG_EXPORT \ - Q_SCRIPT_EXPORT \ - Q_SCRIPTTOOLS_EXPORT \ - Q_TESTLIB_EXPORT \ - Q_XML_EXPORT \ - Q_XMLSTREAM_EXPORT \ - Q_XMLPATTERNS_EXPORT \ - QDBUS_EXPORT \ - Q_DBUS_EXPORT \ - QT_BEGIN_NAMESPACE \ - QT_BEGIN_INCLUDE_NAMESPACE \ - QT_END_NAMESPACE \ - QT_END_INCLUDE_NAMESPACE \ - PHONON_EXPORT \ - Q_DECLARATIVE_EXPORT \ - Q_GADGET \ - QWEBKIT_EXPORT \ - Q_INVOKABLE -Cpp.ignoredirectives = Q_DECLARE_HANDLE \ - Q_DECLARE_INTERFACE \ - Q_DECLARE_METATYPE \ - Q_DECLARE_OPERATORS_FOR_FLAGS \ - Q_DECLARE_PRIVATE \ - Q_DECLARE_PUBLIC \ - Q_DECLARE_SHARED \ - Q_DECLARE_TR_FUNCTIONS \ - Q_DECLARE_TYPEINFO \ - Q_DISABLE_COPY \ - QT_FORWARD_DECLARE_CLASS \ - Q_DUMMY_COMPARISON_OPERATOR \ - Q_ENUMS \ - Q_FLAGS \ - Q_INTERFACES \ - __attribute__ \ - K_DECLARE_PRIVATE \ - PHONON_OBJECT \ - PHONON_HEIR \ - Q_PRIVATE_PROPERTY \ - Q_DECLARE_PRIVATE_D \ - Q_CLASSINFO diff --git a/src/tools/qdoc/doc/config/qt-defines.qdocconf b/src/tools/qdoc/doc/config/qt-defines.qdocconf deleted file mode 100644 index e11b32dc4c..0000000000 --- a/src/tools/qdoc/doc/config/qt-defines.qdocconf +++ /dev/null @@ -1,16 +0,0 @@ -defines = Q_QDOC \ - QT_.*_SUPPORT \ - QT_.*_LIB \ - QT_COMPAT \ - QT_KEYPAD_NAVIGATION \ - QT3_SUPPORT \ - Q_WS_.* \ - Q_OS_.* \ - Q_BYTE_ORDER \ - QT_DEPRECATED \ - Q_NO_USING_KEYWORD \ - __cplusplus - -versionsym = QT_VERSION_STR - -codeindent = 1 diff --git a/src/tools/qdoc/doc/config/qt-html-default-styles.qdocconf b/src/tools/qdoc/doc/config/qt-html-default-styles.qdocconf deleted file mode 100644 index b2e39d02f5..0000000000 --- a/src/tools/qdoc/doc/config/qt-html-default-styles.qdocconf +++ /dev/null @@ -1,32 +0,0 @@ -# Define the location of the templates to use. Style sheets and scripts are -# specified relative to the template directory and will be copied into -# subdirectories of the output directory. - -HTML.templatedir = . - -HTML.stylesheets = style/offline.css - -HTML.scripts = - -# Files not referenced in any qdoc file (last four needed by qtdemo) -# See also qhp.Qt.extraFiles -extraimages.HTML = qt-logo.png \ - arrow_down.png \ - breadcrumb.png \ - bullet_gt.png \ - bullet_dn.png \ - bullet_sq.png \ - bullet_up.png \ - horBar.png \ - sprites-combined.png - -# Include the style sheets and scripts used. - -HTML.headerstyles = \ - " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n" - -HTML.headerscripts = - -HTML.endheader = \ - "</head>\n" \ - "<body>\n" diff --git a/src/tools/qdoc/doc/config/qt-html-online-styles.qdocconf b/src/tools/qdoc/doc/config/qt-html-online-styles.qdocconf deleted file mode 100644 index 4ffd6ca65f..0000000000 --- a/src/tools/qdoc/doc/config/qt-html-online-styles.qdocconf +++ /dev/null @@ -1,72 +0,0 @@ -# Define the location of the templates to use. Style sheets and scripts are -# specified relative to the template directory and will be copied into -# subdirectories of the output directory. - -HTML.templatedir = . - -HTML.stylesheets = style/narrow.css \ - style/style.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/superfish.css - -# Adding jquery and functions - providing online tools and search features -HTML.scripts = scripts/functions.js \ - scripts/narrow.js \ - scripts/superfish.js \ - scripts/jquery.js - - -# Files not referenced in any qdoc file. -# See also qhp.Qt.extraFiles -extraimages.HTML = qt-logo.png \ - bg_l.png \ - bg_l_blank.png \ - bg_ll_blank.png \ - bg_ul_blank.png \ - header_bg.png \ - bg_r.png \ - box_bg.png \ - breadcrumb.png \ - bullet_gt.png \ - bullet_dn.png \ - bullet_sq.png \ - bullet_up.png \ - arrow_down.png \ - feedbackground.png \ - horBar.png \ - page.png \ - page_bg.png \ - sprites-combined.png \ - spinner.gif - -# Include the style sheets and scripts used. - -HTML.headerstyles = \ - " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n" \ - " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n" \ - " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \ - " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />\n" \ - " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n" \ - " <!--[if IE]>\n" \ - "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n" \ - "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n" \ - "<![endif]-->\n" \ - "<!--[if lt IE 7]>\n" \ - "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n" \ - "<![endif]-->\n" \ - "<!--[if IE 7]>\n" \ - "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n" \ - "<![endif]-->\n" \ - "<!--[if IE 8]>\n" \ - "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n" \ - "<![endif]-->\n\n" - -HTML.headerscripts = \ - "<script src=\"scripts/superfish.js\" type=\"text/javascript\"></script>\n" \ - "<script src=\"scripts/narrow.js\" type=\"text/javascript\"></script>\n\n" - -HTML.endheader = \ - "</head>\n" \ - "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n" diff --git a/src/tools/qdoc/doc/config/qt-html-templates-online.qdocconf b/src/tools/qdoc/doc/config/qt-html-templates-online.qdocconf deleted file mode 100644 index 038f3de5a0..0000000000 --- a/src/tools/qdoc/doc/config/qt-html-templates-online.qdocconf +++ /dev/null @@ -1,117 +0,0 @@ -include(qt-html-online-styles.qdocconf) - -HTML.postheader = \ - " <div class=\"header\" id=\"qtdocheader\">\n" \ - " <div class=\"content\"> \n" \ - " <div id=\"nav-logo\">\n" \ - " <a href=\"qdoc-index.html\">Home</a></div>\n" \ - " <a href=\"qdoc-index.html\" class=\"qtref\"><span>QDoc Reference Documentation</span></a>\n" \ - " <div id=\"narrowsearch\"></div>\n" \ - " <div id=\"nav-topright\">\n" \ - " <ul>\n" \ - " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \ - " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \ - " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \ - " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \ - " DOC</a></li>\n" \ - " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \ - " </ul>\n" \ - " </div>\n" \ - " <div id=\"shortCut\">\n" \ - " <ul>\n" \ - " <li class=\"shortCut-topleft-inactive\"><span><a href=\"qdoc-index.html\">Qt 4.7</a></span></li>\n" \ - " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \ - " </a></li>\n" \ - " </ul>\n" \ - " </div>\n" \ - " </div>\n" \ - " </div>\n" \ - " <div class=\"wrapper\">\n" \ - " <div class=\"hd\">\n" \ - " <span></span>\n" \ - " </div>\n" \ - " <div class=\"bd group\">\n" \ - " <div class=\"wrap\">\n" \ - " <div class=\"toolbar\">\n" \ - " <div class=\"breadcrumb toolblock\">\n" \ - " <ul>\n" \ - " <li class=\"first\"><a href=\"qdoc-index.html\">Home</a></li>\n" \ - " <!-- Breadcrumbs go here -->\n" - -HTML.postpostheader = \ - " </ul>\n" \ - " </div>\n" \ - " <div class=\"toolbuttons toolblock\">\n" \ - " <ul>\n" \ - " <li id=\"smallA\" class=\"t_button\">A</li>\n" \ - " <li id=\"medA\" class=\"t_button active\">A</li>\n" \ - " <li id=\"bigA\" class=\"t_button\">A</li>\n" \ - " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \ - " <span>Print</span></a></li>\n" \ - " </ul>\n" \ - " </div>\n" \ - " </div>\n" \ - " <div class=\"content mainContent\">\n" - -HTML.footer = \ - " </div>\n" \ - " </div>\n" \ - " </div> \n" \ - " <div class=\"ft\">\n" \ - " <span></span>\n" \ - " </div>\n" \ - " </div> \n" \ - " <div class=\"footer\">\n" \ - " <p>\n" \ - " <acronym title=\"Copyright\">©</acronym> 2012 Digia Plc and/or its\n" \ - " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ - " their respective owners.</p>\n" \ - " <br />\n" \ - " <p>\n" \ - " The documentation provided herein is licensed under the terms of the\n" \ - " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \ - " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \ - " <p>\n" \ - " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \ - " www.qt-project.org</a>.</p>\n" \ - " <br />\n" \ - " <p>\n" \ - " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \ - " in Finland and/or other countries worldwide. All other trademarks are property\n" \ - " of their respective owners. <a title=\"Privacy Policy\"\n" \ - " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \ - " </div>\n" - - -# Files not referenced in any qdoc file. -# See also extraimages.HTML -qhp.QDoc.extraFiles = qdoc-index.html \ - images/bg_l.png \ - images/bg_l_blank.png \ - images/bg_ll_blank.png \ - images/bg_ul_blank.png \ - images/header_bg.png \ - images/bg_r.png \ - images/box_bg.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/arrow_down.png \ - images/feedbackground.png \ - images/horBar.png \ - images/page.png \ - images/page_bg.png \ - images/sprites-combined.png \ - images/spinner.gif \ - scripts/functions.js \ - scripts/jquery.js \ - scripts/narrow.js \ - scripts/superfish.js \ - style/narrow.css \ - style/superfish.css \ - style/style_ie6.css \ - style/style_ie7.css \ - style/style_ie8.css \ - style/style.css diff --git a/src/tools/qdoc/doc/config/qt-html-templates.qdocconf b/src/tools/qdoc/doc/config/qt-html-templates.qdocconf deleted file mode 100644 index 22bf6e1c23..0000000000 --- a/src/tools/qdoc/doc/config/qt-html-templates.qdocconf +++ /dev/null @@ -1,56 +0,0 @@ -include(qt-html-default-styles.qdocconf) - -HTML.postheader = \ - "<div class=\"header\" id=\"qtdocheader\">\n" \ - " <div class=\"content\"> \n" \ - " <a href=\"qdoc-index.html\" class=\"qtref\"><span>QDoc Reference Documentation</span></a>\n" \ - " </div>\n" \ - " <div class=\"breadcrumb toolblock\">\n" \ - " <ul>\n" \ - " <li class=\"first\"><a href=\"qdoc-index.html\">Home</a></li>\n" \ - " <!-- Breadcrumbs go here -->\n" - -HTML.postpostheader = \ - " </ul>\n" \ - " </div>\n" \ - "</div>\n" \ - "<div class=\"content mainContent\">\n" - -HTML.footer = \ - " <div class=\"ft\">\n" \ - " <span></span>\n" \ - " </div>\n" \ - "</div> \n" \ - "<div class=\"footer\">\n" \ - " <p>\n" \ - " <acronym title=\"Copyright\">©</acronym> 2012 Digia Plc and/or its\n" \ - " subsidiaries. Documentation contributions included herein are the copyrights of\n" \ - " their respective owners.</p>\n" \ - " <br />\n" \ - " <p>\n" \ - " The documentation provided herein is licensed under the terms of the\n" \ - " <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU Free Documentation\n" \ - " License version 1.3</a> as published by the Free Software Foundation.</p>\n" \ - " <p>\n" \ - " Documentation sources may be obtained from <a href=\"http://www.qt-project.org\">\n" \ - " www.qt-project.org</a>.</p>\n" \ - " <br />\n" \ - " <p>\n" \ - " Digia, Qt and their respective logos are trademarks of Digia Plc \n" \ - " in Finland and/or other countries worldwide. All other trademarks are property\n" \ - " of their respective owners. <a title=\"Privacy Policy\"\n" \ - " href=\"http://en.gitorious.org/privacy_policy/\">Privacy Policy</a></p>\n" \ - "</div>\n" \ - -# Files not referenced in any qdoc file. -# See also extraimages.HTML -qhp.QDoc.extraFiles = qdoc-index.html \ - images/arrow_down.png \ - images/breadcrumb.png \ - images/bullet_gt.png \ - images/bullet_dn.png \ - images/bullet_sq.png \ - images/bullet_up.png \ - images/horBar.png \ - images/sprites-combined.png \ - style/offline.css diff --git a/src/tools/qdoc/doc/config/style/offline.css b/src/tools/qdoc/doc/config/style/offline.css deleted file mode 100644 index 3689ee8d40..0000000000 --- a/src/tools/qdoc/doc/config/style/offline.css +++ /dev/null @@ -1,673 +0,0 @@ -@media screen -{ - -/* basic elements */ - html - { - color: #000000; - background: #FFFFFF; - } - table - { - border-collapse: collapse; - border-spacing: 0; - } - fieldset, img - { - border: 0; - max-width:100%; - } - address, caption, cite, code, dfn, em, strong, th, var, optgroup - { - font-style: inherit; - font-weight: inherit; - } - del, ins - { - text-decoration: none; - } - li - { - list-style: none; - } - ol li - { - list-style: decimal; - } - caption, th - { - text-align: left; - } - h1, h2, h3, h4, h5, h6 - { - font-size: 100%; - } - q:before, q:after - { - content: ''; - } - abbr, acronym - { - border: 0; - font-variant: normal; - } - sup, sub - { - vertical-align: baseline; - } - tt, .qmlreadonly span, .qmldefault span - { - word-spacing:0.5em; - } - legend - { - color: #000000; - } - strong - { - font-weight: bold; - } - em - { - font-style: italic; - } - - body - { - margin-left: 0.5em; - margin-right: 0.5em; - } - a - { - color: #00732F; - text-decoration: none; - } - hr - { - background-color: #E6E6E6; - border: 1px solid #E6E6E6; - height: 1px; - width: 100%; - text-align: left; - margin: 1.5em 0 1.5em 0; - } - - pre - { - border: 1px solid #DDDDDD; - -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; - -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; - border-radius: 0.7em 0.7em 0.7em 0.7em; - margin: 0 1.5em 1em 1em; - padding: 1em 1em 1em 1em; - overflow-x: auto; - } - table, pre - { - -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; - -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; - border-radius: 0.7em 0.7em 0.7em 0.7em; - background-color: #F6F6F6; - border: 1px solid #E6E6E6; - border-collapse: separate; - margin-bottom: 2.5em; - } - pre { - font-size: 90%; - display: block; - overflow:hidden; - } - thead - { - margin-top: 0.5em; - font-weight: bold - } - th - { - padding: 0.5em 1.5em 0.5em 1.5em; - background-color: #E1E1E1; - border-left: 1px solid #E6E6E6; - } - td - { - padding: 0.25em 1.5em 0.25em 2em; - } - - td.rightAlign - { - padding: 0.25em 0.5em 0.25em 1em; - } - table tr.odd - { - border-left: 1px solid #E6E6E6; - background-color: #F6F6F6; - color: #66666E; - } - table tr.even - { - border-left: 1px solid #E6E6E6; - background-color: #ffffff; - color: #66666E; - } - - div.float-left - { - float: left; margin-right: 2em - } - div.float-right - { - float: right; margin-left: 2em - } - - span.comment - { - color: #008B00; - font-style: italic - } - span.string, span.char - { - color: #000084; - } - span.number - { - color: #a46200; - } - span.operator - { - color: #202020; - } - span.keyword - { - color: #840000; - } - span.name - { - color: black - } - span.type - { - font-weight: bold - } - span.type a:visited - { - color: #0F5300; - } - span.preprocessor - { - color: #404040 - } -/* end basic elements */ - -/* font style elements */ - .heading - { - font-weight: bold; - font-size: 125%; - } - .subtitle - { - font-size: 110% - } - .small-subtitle - { - font-size: 100% - } - .red - { - color:red; - } -/* end font style elements */ - -/* global settings*/ - .header, .footer - { - display: block; - clear: both; - overflow: hidden; - } -/* end global settings*/ - -/* header elements */ - .header .qtref - { - color: #00732F; - font-weight: bold; - font-size: 130%; - } - - .header .content - { - margin-bottom: 0.5em - } - - .naviNextPrevious - { - display: none - } - .header .breadcrumb - { - font-size: 90%; - padding: 0.5em 0 0.5em 1em; - margin: 0; - background-color: #fafafa; - height: 1.35em; - border-bottom: 1px solid #d1d1d1; - } - - .header .breadcrumb ul - { - margin: 0; - padding: 0; - } - - .header .content - { - word-wrap: break-word; - } - - .header .breadcrumb ul li - { - float: left; - background: url(../images/breadcrumb.png) no-repeat 0 3px; - padding-left: 1.5em; - margin-left: 1.5em; - } - - .header .breadcrumb ul li.last - { - font-weight: normal; - } - - .header .breadcrumb ul li a - { - color: #00732F; - } - - .header .breadcrumb ul li.first - { - background-image: none; - padding-left: 0; - margin-left: 0; - } - - .header .content ol li { - background: none; - margin-bottom: 1.0em; - margin-left: 1.2em; - padding-left: 0 - } - - .header .content li - { - background: url(../images/bullet_sq.png) no-repeat 0 5px; - margin-bottom: 1em; - padding-left: 1.2em; - } - -/* end header elements */ - -/* content elements */ - .content h1 - { - font-weight: bold; - font-size: 150% - } - - .content h2 - { - font-weight: bold; - font-size: 135%; - width: 100%; - } - .content h3 - { - font-weight: bold; - font-size: 120%; - width: 100%; - } - .content table p - { - margin: 0 - } - .content ul - { - padding-left: 2.5em; - } - .content li - { - padding-top: 0.25em; - padding-bottom: 0.25em; - } - .content ul img { - vertical-align: middle; - } - - .content a:visited - { - color: #4c0033; - text-decoration: none; - } - - .content a:visited:hover - { - color: #4c0033; - text-decoration: underline; - } - - a:hover - { - color: #4c0033; - text-decoration: underline; - } - descr p a - { - text-decoration: underline; - } - - .descr p a:visited - { - text-decoration: underline; - } - - .alphaChar{ - width:95%; - background-color:#F6F6F6; - border:1px solid #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - font-size:12pt; - padding-left:10px; - margin-top:10px; - margin-bottom:10px; - } - .flowList{ - /*vertical-align:top;*/ - /*margin:20px auto;*/ - - column-count:3; - -webkit-column-count:3; - -moz-column-count:3; -/* - column-width:100%; - -webkit-column-width:200px; - -col-column-width:200px; -*/ - column-gap:41px; - -webkit-column-gap:41px; - -moz-column-gap:41px; - - column-rule: 1px dashed #ccc; - -webkit-column-rule: 1px dashed #ccc; - -moz-column-rule: 1px dashed #ccc; - } - - .flowList dl{ - } - .flowList dd{ - /*display:inline-block;*/ - margin-left:10px; - min-width:250px; - line-height: 1.5; - min-width:100%; - min-height:15px; - } - - .flowList dd a{ - } - - .content .flowList p{ - padding:0px; - } - - .content .alignedsummary - { - margin: 15px; - } - - - .qmltype - { - text-align: center; - font-size: 120%; - } - .qmlreadonly - { - padding-left: 5px; - float: right; - color: #254117; - } - - .qmldefault - { - padding-left: 5px; - float: right; - color: red; - } - - .qmldoc - { - } - - .generic .alphaChar{ - margin-top:5px; - } - - .generic .odd .alphaChar{ - background-color: #F6F6F6; - } - - .generic .even .alphaChar{ - background-color: #FFFFFF; - } - - .memItemRight{ - padding: 0.25em 1.5em 0.25em 0; - } - .highlightedCode - { - margin: 1.0em; - } - .annotated td { - padding: 0.25em 0.5em 0.25em 0.5em; - } - - .header .content .toc ul - { - padding-left: 0px; - } - - .content .toc h3 { - border-bottom: 0px; - margin-top: 0px; - } - - .content .toc h3 a:hover { - color: #00732F; - text-decoration: none; - } - - .content .toc .level2 - { - margin-left: 1.5em; - } - - .content .toc .level3 - { - margin-left: 3.0em; - } - - .content ul li - { - background: url(../images/bullet_sq.png) no-repeat 0 0.7em; - padding-left: 1em - } - - .content .toc li - { - background: url(../images/bullet_dn.png) no-repeat 0 5px; - padding-left: 1em - } - - .relpage - { - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - border: 1px solid #DDDDDD; - padding: 25px 25px; - clear: both; - } - .relpage ul - { - float: none; - padding: 1.5em; - } - - h3.fn, span.fn - { - -moz-border-radius:7px 7px 7px 7px; - -webkit-border-radius:7px 7px 7px 7px; - border-radius:7px 7px 7px 7px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - font-weight: bold; - word-spacing:3px; - padding:3px 5px; - } - - .functionIndex { - font-size:12pt; - word-spacing:10px; - margin-bottom:10px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - width:100%; - } - - .centerAlign - { - text-align:center; - } - - .rightAlign - { - text-align:right; - } - - .leftAlign - { - text-align:left; - } - - .topAlign{ - vertical-align:top - } - - .functionIndex a{ - display:inline-block; - } - -/* end content elements */ -/* footer elements */ - - .footer - { - color: #393735; - font-size: 0.75em; - text-align: center; - padding-top: 1.5em; - padding-bottom: 1em; - background-color: #E6E7E8; - margin: 0; - } - .footer p - { - margin: 0.25em - } - .small - { - font-size: 0.5em; - } -/* end footer elements */ - - .item { - float: left; - position: relative; - width: 100%; - overflow: hidden; - } - - - .item .primary { - margin-right: 220px; - position: relative; - } - - .item hr { - margin-left: -220px; - } - - .item .secondary { - float: right; - width: 200px; - position: relative; - } - - .item .cols { - clear: both; - display: block; - } - - .item .cols .col { - float: left; - margin-left: 1.5%; - } - - .item .cols .col.first { - margin-left: 0; - } - - .item .cols.two .col { - width: 45%; - } - - .item .box { - margin: 0 0 10px 0; - } - - .item .box h3 { - margin: 0 0 10px 0; - } - - .cols.unclear { - clear:none; - } -} - -/* end of screen media */ - -/* start of print media */ - -@media print -{ - input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult - { - display: none; - background: none; - } - .content - { - background: none; - display: block; - width: 100%; margin: 0; float: none; - } -} -/* end of print media */ diff --git a/src/tools/qdoc/doc/qdoc-manual.qdoc b/src/tools/qdoc/doc/qdoc-manual.qdoc index f157f0a2d9..5254c46eb5 100644 --- a/src/tools/qdoc/doc/qdoc-manual.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual.qdoc @@ -29,7 +29,7 @@ \page qdoc-index.html \nextpage Introduction to QDoc - \title Table of Contents + \title QDoc Manual \list \li \l {Introduction to QDoc} @@ -75,8 +75,8 @@ /*! \page 01-qdoc-manual.html - \contentspage Table of Contents - \previouspage Table of Contents + \contentspage QDoc Manual + \previouspage QDoc Manual \nextpage Command Index \title Introduction to QDoc @@ -229,7 +229,7 @@ /*! \page 03-qdoc-commands-markup.html - \contentspage Table of Contents + \contentspage QDoc Manual \previouspage Naming Things \nextpage Text Markup @@ -310,7 +310,7 @@ /*! \page 04-qdoc-commands-textmarkup.html - \contentspage Table of Contents + \contentspage QDoc Manual \previouspage Markup Commands \nextpage Document Structure @@ -924,7 +924,7 @@ /*! \page 05-qdoc-commands-documentstructure.html \previouspage Text Markup - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Including Code Inline \title Document Structure @@ -1146,7 +1146,7 @@ /*! \page 06-qdoc-commands-includecodeinline.html \previouspage Document Structure - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Including External Code \title Including Code Inline @@ -1392,7 +1392,7 @@ /*! \page 07-0-qdoc-commands-includingexternalcode.html \previouspage Including Code Inline - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Creating Links \title Including External Code @@ -2030,7 +2030,7 @@ /*! \page 07-1-example.html \previouspage Including External Code - \contentspage Table of Contents + \contentspage QDoc Manual \title Example File @@ -2040,7 +2040,7 @@ /*! \page 08-qdoc-commands-creatinglinks.html \previouspage Including External Code - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Including Images \title Creating Links @@ -2243,7 +2243,7 @@ The text up to the line break becomes the target name. Be sure to follow the target name with a line break. Curly brackets are not required around the target name, but they may be required when the - target name is used in a link cammand. See below. + target name is used in a link command. See below. \code / *! @@ -2339,7 +2339,7 @@ /*! \page 09-qdoc-commands-includingimages.html \previouspage Creating Links - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Tables and Lists \title Including Images @@ -2535,7 +2535,7 @@ /*! \page 10-qdoc-commands-tablesandlists.html \previouspage Including Images - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Special Content \title Tables and Lists @@ -3061,7 +3061,7 @@ /*! \page 11-qdoc-commands-specialcontent.html \previouspage Tables and Lists - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Miscellaneous \title Special Content @@ -3496,7 +3496,7 @@ /*! \page 12-0-qdoc-commands-miscellaneous.html \previouspage Special Content - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Creating DITA Maps \title Miscellaneous @@ -4061,10 +4061,10 @@ <shortdesc>the QWidget class is the base class of all user interface objects.</shortdesc> <prolog> <author>Qt Development Frameworks</author> - <publisher>Nokia</publisher> + <publisher>Qt Project</publisher> <copyright> - <copyryear year="2011"/> - <copyrholder>Nokia</copyrholder> + <copyryear year="2013"/> + <copyrholder>Qt Project</copyrholder> </copyright> <permissions view="all"/> <metadata> @@ -4247,7 +4247,7 @@ /*! \page 12-1-signalandslots.html \previouspage Miscellaneous - \contentspage Table of Contents + \contentspage QDoc Manual \title signalandslots.qdocinc @@ -4257,7 +4257,7 @@ /*! \page 12-2-objectmodel.html \previouspage Miscellaneous - \contentspage Table of Contents + \contentspage QDoc Manual \title objectmodel.qdocinc @@ -4267,7 +4267,7 @@ /*! \page 12-3-layoutmanagement.html \previouspage Miscellaneous - \contentspage Table of Contents + \contentspage QDoc Manual \title layoutmanagement.qdocinc @@ -4277,7 +4277,7 @@ /*! \page 13-qdoc-commands-topics.html \previouspage Command Index - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Context Commands \title Topic Commands @@ -5887,7 +5887,7 @@ /*! \page 14-qdoc-commands-contextcommands.html \previouspage Topic Commands - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Document Navigation \title Context Commands @@ -5929,7 +5929,7 @@ /*! \page 15-qdoc-commands-navigation.html \previouspage Context Commands - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Reporting Status \title Document Navigation @@ -6125,7 +6125,7 @@ /*! \page 16-qdoc-commands-status.html \previouspage Document Navigation - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Thread Support \title Reporting Status @@ -6427,7 +6427,7 @@ /*! \page 17-qdoc-commands-thread.html \previouspage Reporting Status - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Relating Things \title Thread Support @@ -6610,7 +6610,7 @@ /*! \page 18-qdoc-commands-relating.html \previouspage Thread Support - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Grouping Things \title Relating Things @@ -6795,7 +6795,7 @@ /*! \page 19-qdoc-commands-grouping.html \previouspage Relating Things - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Naming Things \title Grouping Things @@ -6909,7 +6909,7 @@ /*! \page 20-qdoc-commands-namingthings.html \previouspage Grouping Things - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Markup Commands \title Naming Things @@ -6997,7 +6997,7 @@ /*! \page 21-0-qdoc-creating-dita-maps.html \previouspage Miscellaneous - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage The QDoc Configuration File \title Creating DITA Maps @@ -7134,7 +7134,7 @@ /*! \page 21-0-qdoc-configuration.html \previouspage Creating DITA Maps - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Generic Configuration Variables \title The QDoc Configuration File @@ -7246,7 +7246,7 @@ /*! \page 21-1-minimum-qdocconf.html \previouspage qt.qdocconf - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Generating DITA XML Output \title minimum.qdocconf @@ -7257,7 +7257,7 @@ /*! \page 21-2-qt-qdocconf.html \previouspage Supporting Derived Projects - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage minimum.qdocconf \title qt.qdocconf @@ -7268,8 +7268,8 @@ /*! \page 21-3-qt-dita-xml-output.html \previouspage minimum.qdocconf - \contentspage Table of Contents - \nextpage Table of Contents + \contentspage QDoc Manual + \nextpage QDoc Manual \title Generating DITA XML Output @@ -7313,9 +7313,9 @@ \code dita.metadata.default.author = Qt Development Frameworks dita.metadata.default.permissions = all - dita.metadata.default.publisher = Nokia - dita.metadata.default.copyryear = 2011 - dita.metadata.default.copyrholder = Nokia + dita.metadata.default.publisher = Qt Project + dita.metadata.default.copyryear = 2013 + dita.metadata.default.copyrholder = Qt Project dita.metadata.default.audience = programmer \endcode @@ -7327,7 +7327,7 @@ /*! \page 22-qdoc-configuration-generalvariables.html \previouspage The QDoc Configuration File - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Creating Help Project Files \title Generic Configuration Variables @@ -8235,7 +8235,7 @@ /*! \page 22-creating-help-project-files.html \previouspage Generic Configuration Variables - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage C++ Specific Configuration Variables \title Creating Help Project Files @@ -8304,7 +8304,7 @@ /*! \page 23-qdoc-configuration-cppvariables.html \previouspage Creating Help Project Files - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage HTML Specific Configuration Variables \title C++ Specific Configuration Variables @@ -8418,7 +8418,7 @@ /*! \page 24-qdoc-configuration-htmlvariables.html \previouspage C++ Specific Configuration Variables - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Supporting Derived Projects \title HTML Specific Configuration Variables @@ -8533,7 +8533,7 @@ /*! \page 25-qdoc-configuration-derivedprojects.html \previouspage HTML Specific Configuration Variables - \contentspage Table of Contents + \contentspage QDoc Manual \title Supporting Derived Projects @@ -8674,7 +8674,7 @@ /*! \page 27-qdoc-commands-alphabetical.html \previouspage Introduction to QDoc - \contentspage Table of Contents + \contentspage QDoc Manual \nextpage Topic Commands \title Command Index diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 46d45f7008..95ba6d28bf 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -476,13 +476,7 @@ QString Generator::fullDocumentLocation(const Node *node, bool subdir) switch (node->type()) { case Node::Class: case Node::Namespace: - if (parentNode && !parentNode->name().isEmpty()) { - parentName.remove(QLatin1Char('.') + currentGenerator()->fileExtension()); - parentName += QLatin1Char('-') - + fileBase(node).toLower() + QLatin1Char('.') + currentGenerator()->fileExtension(); - } else { - parentName = fileBase(node) + QLatin1Char('.') + currentGenerator()->fileExtension(); - } + parentName = fileBase(node) + QLatin1Char('.') + currentGenerator()->fileExtension(); break; case Node::Function: { diff --git a/src/tools/qdoc/generator.h b/src/tools/qdoc/generator.h index 551196f2f4..e4bc85b2bc 100644 --- a/src/tools/qdoc/generator.h +++ b/src/tools/qdoc/generator.h @@ -66,6 +66,8 @@ class QDocDatabase; class Generator { + Q_DECLARE_TR_FUNCTIONS(QDoc::Generator) + public: enum Passes { Both, Prepare, Generate }; diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp index 09b3629ade..fdba15700f 100644 --- a/src/tools/qdoc/helpprojectwriter.cpp +++ b/src/tools/qdoc/helpprojectwriter.cpp @@ -429,17 +429,18 @@ void HelpProjectWriter::generateSections(HelpProject &project, // Ensure that we don't visit nodes more than once. QMap<QString, const Node*> childMap; - foreach (const Node *node, inner->childNodes()) { - if (node->access() == Node::Private) + foreach (const Node *childNode, inner->childNodes()) { + if (childNode->access() == Node::Private) continue; - if (node->type() == Node::Document) { + + if (childNode->type() == Node::Document) { /* Don't visit QML property group nodes, but visit their children, which are all QML property nodes. */ - if (node->subType() == Node::QmlPropertyGroup) { - const InnerNode* inner = static_cast<const InnerNode*>(node); + if (childNode->subType() == Node::QmlPropertyGroup) { + const InnerNode* inner = static_cast<const InnerNode*>(childNode); foreach (const Node* n, inner->childNodes()) { if (n->access() == Node::Private) continue; @@ -447,17 +448,24 @@ void HelpProjectWriter::generateSections(HelpProject &project, } } else - childMap[static_cast<const DocNode *>(node)->fullTitle()] = node; + childMap[static_cast<const DocNode *>(childNode)->fullTitle()] = childNode; } else { - if (node->type() == Node::Function) { - const FunctionNode *funcNode = static_cast<const FunctionNode *>(node); + // Store member status of children + project.memberStatus[node].insert(childNode->status()); + + if (childNode->type() == Node::Function) { + const FunctionNode *funcNode = static_cast<const FunctionNode *>(childNode); if (funcNode->isOverload()) continue; } - childMap[node->fullDocumentName()] = node; + childMap[childNode->fullDocumentName()] = childNode; } } + // Insert files for all/compatibility/obsolete members + addMembers(project, writer, node, false); + if (node->relates()) + addMembers(project, writer, node->relates(), false); foreach (const Node *child, childMap) generateSections(project, writer, child); @@ -483,6 +491,57 @@ void HelpProjectWriter::writeHashFile(QFile &file) hashFile.close(); } +void HelpProjectWriter::writeSection(QXmlStreamWriter &writer, const QString &path, + const QString &value) +{ + writer.writeStartElement(QStringLiteral("section")); + writer.writeAttribute(QStringLiteral("ref"), path); + writer.writeAttribute(QStringLiteral("title"), value); + writer.writeEndElement(); // section +} + +/* + Add files for all members, compatibility members and obsolete members + Also write subsections for these depending on 'writeSections' (default=true). +*/ +void HelpProjectWriter::addMembers(HelpProject &project, QXmlStreamWriter &writer, + const Node *node, bool writeSections) +{ + QString href = gen_->fullDocumentLocation(node,true); + href = href.left(href.size()-5); + if (href.isEmpty()) + return; + + Node::SubType subType = static_cast<const DocNode*>(node)->subType(); + + bool derivedClass = false; + if (node->type() == Node::Class) + derivedClass = !(static_cast<const ClassNode *>(node)->baseClasses().isEmpty()); + + // Do not generate a 'List of all members' for namespaces or header files, + // but always generate it for derived classes and QML classes + if (node->type() != Node::Namespace && subType != Node::HeaderFile && + (derivedClass || subType == Node::QmlClass || + !project.memberStatus[node].isEmpty())) { + QString membersPath = href + QStringLiteral("-members.html"); + project.files.insert(membersPath); + if (writeSections) + writeSection(writer, membersPath, tr("List of all members")); + } + if (project.memberStatus[node].contains(Node::Compat)) { + QString compatPath = href + QStringLiteral("-compat.html"); + project.files.insert(compatPath); + if (writeSections) + writeSection(writer, compatPath, tr("Compatibility members")); + } + if (project.memberStatus[node].contains(Node::Obsolete)) { + QString obsoletePath = href + QStringLiteral("-obsolete.html"); + project.files.insert(obsoletePath); + if (writeSections) + writeSection(writer, obsoletePath, tr("Obsolete members")); + } +} + void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer, const Node *node) { @@ -499,41 +558,12 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer else writer.writeAttribute("title", tr("%1 Class Reference").arg(objName)); - // Write subsections for all members, obsolete members and Qt 3 - // members. - if (!project.memberStatus[node].isEmpty()) { - QString membersPath = href.left(href.size()-5) + "-members.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", membersPath); - writer.writeAttribute("title", tr("List of all members")); - writer.writeEndElement(); // section - project.files.insert(membersPath); - } - if (project.memberStatus[node].contains(Node::Compat)) { - QString compatPath = href.left(href.size()-5) + "-compat.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", compatPath); - writer.writeAttribute("title", tr("Compatibility members")); - writer.writeEndElement(); // section - project.files.insert(compatPath); - } - if (project.memberStatus[node].contains(Node::Obsolete)) { - QString obsoletePath = href.left(href.size()-5) + "-obsolete.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", obsoletePath); - writer.writeAttribute("title", tr("Obsolete members")); - writer.writeEndElement(); // section - project.files.insert(obsoletePath); - } - + addMembers(project, writer, node); writer.writeEndElement(); // section break; case Node::Namespace: - writer.writeStartElement("section"); - writer.writeAttribute("ref", href); - writer.writeAttribute("title", objName); - writer.writeEndElement(); // section + writeSection(writer, href, objName); break; case Node::Document: { @@ -548,34 +578,8 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer else writer.writeAttribute("title", docNode->fullTitle()); - if ((docNode->subType() == Node::HeaderFile) || (docNode->subType() == Node::QmlClass)) { - // Write subsections for all members, obsolete members and Qt 3 - // members. - if (!project.memberStatus[node].isEmpty() || (docNode->subType() == Node::QmlClass)) { - QString membersPath = href.left(href.size()-5) + "-members.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", membersPath); - writer.writeAttribute("title", tr("List of all members")); - writer.writeEndElement(); // section - project.files.insert(membersPath); - } - if (project.memberStatus[node].contains(Node::Compat)) { - QString compatPath = href.left(href.size()-5) + "-compat.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", compatPath); - writer.writeAttribute("title", tr("Compatibility members")); - writer.writeEndElement(); // section - project.files.insert(compatPath); - } - if (project.memberStatus[node].contains(Node::Obsolete)) { - QString obsoletePath = href.left(href.size()-5) + "-obsolete.html"; - writer.writeStartElement("section"); - writer.writeAttribute("ref", obsoletePath); - writer.writeAttribute("title", tr("Obsolete members")); - writer.writeEndElement(); // section - project.files.insert(obsoletePath); - } - } + if ((docNode->subType() == Node::HeaderFile) || (docNode->subType() == Node::QmlClass)) + addMembers(project, writer, node); writer.writeEndElement(); // section } diff --git a/src/tools/qdoc/helpprojectwriter.h b/src/tools/qdoc/helpprojectwriter.h index adca31d814..5dfa12cf73 100644 --- a/src/tools/qdoc/helpprojectwriter.h +++ b/src/tools/qdoc/helpprojectwriter.h @@ -85,6 +85,8 @@ struct HelpProject class HelpProjectWriter { + Q_DECLARE_TR_FUNCTIONS(QDoc::HelpProjectWriter) + public: HelpProjectWriter(const Config &config, const QString &defaultFileName, @@ -103,6 +105,10 @@ private: void writeHashFile(QFile &file); void writeNode(HelpProject &project, QXmlStreamWriter &writer, const Node *node); void readSelectors(SubProject &subproject, const QStringList &selectors); + void addMembers(HelpProject &project, QXmlStreamWriter &writer, + const Node *node, bool writeSections = true); + void writeSection(QXmlStreamWriter &writer, const QString &path, + const QString &value); QDocDatabase* qdb_; Generator* gen_; diff --git a/src/tools/qdoc/htmlgenerator.h b/src/tools/qdoc/htmlgenerator.h index 132fb0927a..65d874f619 100644 --- a/src/tools/qdoc/htmlgenerator.h +++ b/src/tools/qdoc/htmlgenerator.h @@ -59,6 +59,8 @@ class HelpProjectWriter; class HtmlGenerator : public Generator { + Q_DECLARE_TR_FUNCTIONS(QDoc::HtmlGenerator) + public: enum SinceType { Namespace, diff --git a/src/tools/qdoc/jscodemarker.h b/src/tools/qdoc/jscodemarker.h index 59b1776728..123e3e2db7 100644 --- a/src/tools/qdoc/jscodemarker.h +++ b/src/tools/qdoc/jscodemarker.h @@ -52,6 +52,8 @@ QT_BEGIN_NAMESPACE class JsCodeMarker : public QmlCodeMarker { + Q_DECLARE_TR_FUNCTIONS(QDoc::JsCodeMarker) + public: JsCodeMarker(); ~JsCodeMarker(); diff --git a/src/tools/qdoc/location.h b/src/tools/qdoc/location.h index 87aa9b5893..20ddfd076e 100644 --- a/src/tools/qdoc/location.h +++ b/src/tools/qdoc/location.h @@ -57,6 +57,8 @@ class QRegExp; class Location { + Q_DECLARE_TR_FUNCTIONS(QDoc::Location) + public: Location(); Location(const QString& filePath); diff --git a/src/tools/qdoc/main.cpp b/src/tools/qdoc/main.cpp index 2625782cfb..50632f1da4 100644 --- a/src/tools/qdoc/main.cpp +++ b/src/tools/qdoc/main.cpp @@ -110,12 +110,12 @@ static QString documentationPath; */ static void printHelp() { - Location::information(tr("Usage: qdoc [options] file1.qdocconf ...\n" + Location::information(QCoreApplication::translate("QDoc", "Usage: qdoc [options] file1.qdocconf ...\n" "Options:\n" " -D<name> " "Define <name> as a macro while parsing sources\n" " -depends " - "Specify dependant modules\n" + "Specify dependent modules\n" " -help " "Display this information and exit\n" " -highlighting " @@ -149,7 +149,7 @@ static void printHelp() */ static void printVersion() { - QString s = tr("qdoc version %1").arg(QT_VERSION_STR); + QString s = QCoreApplication::translate("QDoc", "qdoc version %1").arg(QT_VERSION_STR); Location::information(s); } @@ -250,7 +250,7 @@ static void processQdocconfFile(const QString &fileName) All the other classes are initialized with the config. Here we initialize the configuration with some default values. */ - Config config(tr("qdoc")); + Config config(QCoreApplication::translate("QDoc", "qdoc")); int i = 0; while (defaults[i].key) { config.setStringList(defaults[i].key, QStringList() << defaults[i].value); @@ -325,7 +325,7 @@ static void processQdocconfFile(const QString &fileName) while (fn != fileNames.constEnd()) { QTranslator *translator = new QTranslator(0); if (!translator->load(*fn)) - config.lastLocation().error(tr("Cannot load translator '%1'").arg(*fn)); + config.lastLocation().error(QCoreApplication::translate("QDoc", "Cannot load translator '%1'").arg(*fn)); QCoreApplication::instance()->installTranslator(translator); translators.append(translator); ++fn; @@ -489,7 +489,7 @@ static void processQdocconfFile(const QString &fileName) while (of != outputFormats.constEnd()) { Generator* generator = Generator::generatorForFormat(*of); if (generator == 0) - outputFormatsLocation.fatal(tr("Unknown output format '%1'").arg(*of)); + outputFormatsLocation.fatal(QCoreApplication::translate("QDoc", "Unknown output format '%1'").arg(*of)); generator->generateTree(); ++of; } diff --git a/src/tools/qdoc/node.h b/src/tools/qdoc/node.h index 56da4ca174..11c08fb659 100644 --- a/src/tools/qdoc/node.h +++ b/src/tools/qdoc/node.h @@ -69,6 +69,8 @@ typedef QList<QPair<QString,QString> > ImportList; class Node { + Q_DECLARE_TR_FUNCTIONS(QDoc::Node) + public: enum Type { Namespace, @@ -596,6 +598,8 @@ class QmlPropertyNode; class QmlPropertyNode : public LeafNode { + Q_DECLARE_TR_FUNCTIONS(QDoc::QmlPropertyNode) + public: QmlPropertyNode(QmlClassNode *parent, const QString& name, diff --git a/src/tools/qdoc/openedlist.h b/src/tools/qdoc/openedlist.h index 7d40add8b1..cf7624b8e3 100644 --- a/src/tools/qdoc/openedlist.h +++ b/src/tools/qdoc/openedlist.h @@ -49,11 +49,14 @@ #include <qstring.h> #include "location.h" +#include "tr.h" QT_BEGIN_NAMESPACE class OpenedList { + Q_DECLARE_TR_FUNCTIONS(QDoc::OpenedList) + public: enum Style { Bullet, Tag, Value, Numeric, UpperAlpha, LowerAlpha, UpperRoman, LowerRoman }; diff --git a/src/tools/qdoc/puredocparser.h b/src/tools/qdoc/puredocparser.h index f25f777733..0174af7a4e 100644 --- a/src/tools/qdoc/puredocparser.h +++ b/src/tools/qdoc/puredocparser.h @@ -60,6 +60,8 @@ class Tree; class PureDocParser : public CppCodeParser { + Q_DECLARE_TR_FUNCTIONS(QDoc::PureDocParser) + public: PureDocParser(); virtual ~PureDocParser(); diff --git a/src/tools/qdoc/qdoc.pro b/src/tools/qdoc/qdoc.pro index c0f3cd70d1..9729a758f0 100644 --- a/src/tools/qdoc/qdoc.pro +++ b/src/tools/qdoc/qdoc.pro @@ -88,21 +88,6 @@ SOURCES += jscodemarker.cpp \ qtPrepareTool(QDOC, qdoc) qtPrepareTool(QHELPGENERATOR, qhelpgenerator) -equals(QMAKE_DIR_SEP, /) { - QDOC = QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QDOC -} else { - QDOC = set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QDOC - QDOC = $$replace(QDOC, "/", "\\") -} - -html-docs.commands = $$QDOC $$PWD/doc/config/qdoc.qdocconf -html-docs.files = $$PWD/doc/html - -qch-docs.commands = $$QHELPGENERATOR $$PWD/doc/html/qdoc.qhp -o $$PWD/doc/qch/qdoc.qch -qch-docs.files = $$PWD/doc/qch -qch-docs.path = $$[QT_INSTALL_DOCS] -qch-docs.CONFIG += no_check_exist directory - -QMAKE_EXTRA_TARGETS += html-docs qch-docs +QMAKE_DOCS = $$PWD/doc/config/qdoc.qdocconf load(qt_tool) diff --git a/src/tools/qdoc/qdocdatabase.h b/src/tools/qdoc/qdocdatabase.h index 21f955566f..857fd301bb 100644 --- a/src/tools/qdoc/qdocdatabase.h +++ b/src/tools/qdoc/qdocdatabase.h @@ -82,6 +82,8 @@ typedef QMultiMap<QString, TargetRec> TargetRecMultiMap; class QDocDatabase { + Q_DECLARE_TR_FUNCTIONS(QDoc::QDocDatabase) + public: static QDocDatabase* qdocDB(); static void destroyQdocDB(); diff --git a/src/tools/qdoc/qmlcodemarker.h b/src/tools/qdoc/qmlcodemarker.h index 7e801d083e..bc2321e076 100644 --- a/src/tools/qdoc/qmlcodemarker.h +++ b/src/tools/qdoc/qmlcodemarker.h @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE class QmlCodeMarker : public CppCodeMarker { + Q_DECLARE_TR_FUNCTIONS(QDoc::QmlCodeMarker) + public: QmlCodeMarker(); ~QmlCodeMarker(); diff --git a/src/tools/qdoc/qmlcodeparser.h b/src/tools/qdoc/qmlcodeparser.h index 5a33238584..5bdcfbfbbf 100644 --- a/src/tools/qdoc/qmlcodeparser.h +++ b/src/tools/qdoc/qmlcodeparser.h @@ -62,6 +62,8 @@ class Tree; class QmlCodeParser : public CodeParser { + Q_DECLARE_TR_FUNCTIONS(QDoc::QmlCodeParser) + public: QmlCodeParser(); virtual ~QmlCodeParser(); diff --git a/src/tools/qdoc/qmlparser/qqmljslexer_p.h b/src/tools/qdoc/qmlparser/qqmljslexer_p.h index f22325ebf9..cb6ff6bcdf 100644 --- a/src/tools/qdoc/qmlparser/qqmljslexer_p.h +++ b/src/tools/qdoc/qmlparser/qqmljslexer_p.h @@ -55,6 +55,7 @@ #include "qqmljsglobal_p.h" #include "qqmljsgrammar_p.h" +#include "tr.h" #include <qstring.h> QT_QML_BEGIN_NAMESPACE @@ -87,6 +88,8 @@ public: class QML_PARSER_EXPORT Lexer: public QQmlJSGrammar { + Q_DECLARE_TR_FUNCTIONS(QDoc::QQmlJS::Lexer) + public: enum { T_ABSTRACT = T_RESERVED_WORD, diff --git a/src/tools/qdoc/qmlparser/qqmljsparser.cpp b/src/tools/qdoc/qmlparser/qqmljsparser.cpp index 104aa3d557..b7f571aa62 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser.cpp +++ b/src/tools/qdoc/qmlparser/qqmljsparser.cpp @@ -40,12 +40,6 @@ ****************************************************************************/ #include <qdebug.h> -#ifdef QT_BOOTSTRAPPED -#define tr(x, y) QString(QLatin1String(y)) -#else -#include <qcoreapplication.h> -#define tr(x, y) QCoreApplication::translate(x, y) -#endif #include <string.h> diff --git a/src/tools/qdoc/qmlparser/qqmljsparser_p.h b/src/tools/qdoc/qmlparser/qqmljsparser_p.h index e59ef67ffd..9fe7428bc2 100644 --- a/src/tools/qdoc/qmlparser/qqmljsparser_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsparser_p.h @@ -75,6 +75,8 @@ class Engine; class QML_PARSER_EXPORT Parser: protected QQmlJSGrammar { + Q_DECLARE_TR_FUNCTIONS(QDoc::QQmlJS::Parser) + public: union Value { int ival; diff --git a/src/tools/qdoc/qmlvisitor.h b/src/tools/qdoc/qmlvisitor.h index acf34ab95c..172aca579a 100644 --- a/src/tools/qdoc/qmlvisitor.h +++ b/src/tools/qdoc/qmlvisitor.h @@ -66,6 +66,8 @@ struct QmlPropArgs class QmlDocVisitor : public QQmlJS::AST::Visitor { + Q_DECLARE_TR_FUNCTIONS(QDoc::QmlDocVisitor) + public: QmlDocVisitor(const QString &filePath, const QString &code, diff --git a/src/tools/qdoc/quoter.h b/src/tools/qdoc/quoter.h index 9f2e3f7852..223fdd96b3 100644 --- a/src/tools/qdoc/quoter.h +++ b/src/tools/qdoc/quoter.h @@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE class Quoter { + Q_DECLARE_TR_FUNCTIONS(QDoc::Quoter) + public: Quoter(); diff --git a/src/tools/qdoc/separator.cpp b/src/tools/qdoc/separator.cpp index b9320449c6..2403fb15c8 100644 --- a/src/tools/qdoc/separator.cpp +++ b/src/tools/qdoc/separator.cpp @@ -51,14 +51,14 @@ QT_BEGIN_NAMESPACE QString separator(int index, int count) { if (index == count - 1) - return tr(".", "terminator"); + return QCoreApplication::translate("QDoc", ".", "terminator"); if (count == 2) - return tr(" and ", "separator when N = 2"); + return QCoreApplication::translate("QDoc", " and ", "separator when N = 2"); if (index == 0) - return tr(", ", "first separator when N > 2"); + return QCoreApplication::translate("QDoc", ", ", "first separator when N > 2"); if (index < count - 2) - return tr(", ", "general separator when N > 2"); - return tr(", and ", "last separator when N > 2"); + return QCoreApplication::translate("QDoc", ", ", "general separator when N > 2"); + return QCoreApplication::translate("QDoc", ", and ", "last separator when N > 2"); } QString comma(int index, int count) @@ -66,12 +66,12 @@ QString comma(int index, int count) if (index == count - 1) return QString(); if (count == 2) - return tr(" and ", "separator when N = 2"); + return QCoreApplication::translate("QDoc", " and ", "separator when N = 2"); if (index == 0) - return tr(", ", "first separator when N > 2"); + return QCoreApplication::translate("QDoc", ", ", "first separator when N > 2"); if (index < count - 2) - return tr(", ", "general separator when N > 2"); - return tr(", and ", "last separator when N > 2"); + return QCoreApplication::translate("QDoc", ", ", "general separator when N > 2"); + return QCoreApplication::translate("QDoc", ", and ", "last separator when N > 2"); } QT_END_NAMESPACE diff --git a/src/tools/qdoc/tokenizer.h b/src/tools/qdoc/tokenizer.h index ae67a9b8a9..4e2c622f3c 100644 --- a/src/tools/qdoc/tokenizer.h +++ b/src/tools/qdoc/tokenizer.h @@ -96,6 +96,8 @@ enum { Tok_Eoi, Tok_Ampersand, Tok_Aster, Tok_Caret, Tok_LeftParen, class Tokenizer { + Q_DECLARE_TR_FUNCTIONS(QDoc::Tokenizer) + public: Tokenizer(const Location& loc, const QByteArray &in); Tokenizer(const Location& loc, QFile &file); diff --git a/src/tools/qdoc/tr.h b/src/tools/qdoc/tr.h index 686b9171ab..36b0c47fef 100644 --- a/src/tools/qdoc/tr.h +++ b/src/tools/qdoc/tr.h @@ -46,26 +46,36 @@ #ifndef TR_H #define TR_H -#ifndef QT_BOOTSTRAPPED -# include "qcoreapplication.h" +#include <qglobal.h> + +#if !defined(QT_BOOTSTRAPPED) && !defined(QT_NO_TRANSLATION) +# define TRANSLATE_QDOC #endif #include <qstring.h> +#ifdef TRANSLATE_QDOC +# include <qcoreapplication.h> +#endif QT_BEGIN_NAMESPACE -#if defined(QT_BOOTSTRAPPED) || defined(QT_NO_TRANSLATION) +#ifndef TRANSLATE_QDOC + +#define Q_DECLARE_TR_FUNCTIONS(context) + inline QString tr(const char *sourceText, const char *comment = 0) { Q_UNUSED(comment); return QString( QLatin1String(sourceText) ); } -#else -inline QString tr(const char *sourceText, const char *comment = 0) + +struct QCoreApplication { - return QCoreApplication::instance()->translate("", sourceText, comment); -} -#endif + static inline QString translate(const char * /* context */ , const char *sourceText, const char * /* disambiguation */ = 0) + { return QLatin1String(sourceText); } +}; + +#endif // !TRANSLATE_QDOC QT_END_NAMESPACE |