summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-01-18 19:30:57 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-01-18 19:30:57 (GMT)
commitfc66f45827b723eb207f9bad113523f0c26c0d44 (patch)
tree1c13eecb482ae1f4ad63264491c476d2591d5454 /tools
parentf9d18bcf4d966c74c364dd569d5fddd262a2862c (diff)
downloadQt-fc66f45827b723eb207f9bad113523f0c26c0d44.zip
Qt-fc66f45827b723eb207f9bad113523f0c26c0d44.tar.gz
Qt-fc66f45827b723eb207f9bad113523f0c26c0d44.tar.bz2
Define what the -slow command line option does.
Added configuration options for syntax highlighting and linking. These are also enabled if the -slow command line option is used.
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/codemarker.cpp12
-rw-r--r--tools/qdoc3/codemarker.h4
-rw-r--r--tools/qdoc3/config.h2
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp3
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h1
-rw-r--r--tools/qdoc3/htmlgenerator.cpp8
-rw-r--r--tools/qdoc3/htmlgenerator.h2
-rw-r--r--tools/qdoc3/main.cpp3
8 files changed, 16 insertions, 19 deletions
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index f1b6346..89933d3 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -59,7 +59,7 @@ QList<CodeMarker *> CodeMarker::markers;
been read.
*/
CodeMarker::CodeMarker()
- : slow(false)
+ : linksInMarkup(false)
{
markers.prepend(this);
}
@@ -74,14 +74,14 @@ CodeMarker::~CodeMarker()
}
/*!
- The only thing a code market initializes is its \e{slow}
- flag. The \e{slow} flag indicates whether the operations
- that slow down qdoc are to be performed or not. It is
- turned off by default.
+ The only thing a code market initializes is its \e{linksInMarkup}
+ flag. The \e{linksInMarkup} flag indicates whether links are created for
+ names that have corresponding entries in the API documentation.
+ It is turned off by default.
*/
void CodeMarker::initializeMarker(const Config &config)
{
- slow = config.getBool(QLatin1String(CONFIG_SLOW));
+ linksInMarkup = config.getBool(QLatin1String(CONFIG_LINKSINMARKUP));
}
/*!
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 3cf3984..e643082 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -164,8 +164,6 @@ class CodeMarker
static QString stringForNode(const Node *node);
protected:
- bool hurryUp() const { return !slow; }
-
virtual QString sortName(const Node *node);
QString protect(const QString &string);
QString typified(const QString &string);
@@ -184,7 +182,7 @@ class CodeMarker
private:
QString macName(const Node *parent, const QString &name = QString());
- bool slow;
+ bool linksInMarkup;
static QString defaultLang;
static QList<CodeMarker *> markers;
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index bc36f3d..2dd7d50 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -141,6 +141,7 @@ class Config
#define CONFIG_IMAGES "images"
#define CONFIG_INDEXES "indexes"
#define CONFIG_LANGUAGE "language"
+#define CONFIG_LINKSINMARKUP "linksinmarkup"
#define CONFIG_MACRO "macro"
#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
@@ -163,6 +164,7 @@ class Config
#define CONFIG_STYLE "style"
#define CONFIG_STYLES "styles"
#define CONFIG_STYLESHEETS "stylesheets"
+#define CONFIG_SYNTAXHIGHLIGHTING "syntaxhighlighting"
#define CONFIG_TEMPLATEDIR "templatedir"
#define CONFIG_TABSIZE "tabsize"
#define CONFIG_TAGFILE "tagfile"
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 7b40886..6f9d537 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -354,7 +354,6 @@ DitaXmlGenerator::DitaXmlGenerator()
offlineDocs(true),
funcLeftParen("\\S(\\()"),
myTree(0),
- slow(false),
obsoleteLinks(false),
noLinks(false),
tableColumnCount(0)
@@ -461,8 +460,6 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
++edition;
}
- slow = config.getBool(CONFIG_SLOW);
-
stylesheets = config.getStringList(DitaXmlGenerator::format() +
Config::dot +
DITAXMLGENERATOR_STYLESHEETS);
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 1a42e5f..640d7db 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -291,7 +291,6 @@ class DitaXmlGenerator : public PageGenerator
QStringList stylesheets;
QStringList customHeadElements;
const Tree* myTree;
- bool slow;
bool obsoleteLinks;
bool noLinks;
int tableColumnCount;
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index ebc2713..a3156c3 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -219,7 +219,7 @@ HtmlGenerator::HtmlGenerator()
threeColumnEnumValueTable(true),
funcLeftParen("\\S(\\()"),
myTree(0),
- slow(false),
+ syntaxHighlighting(false),
obsoleteLinks(false)
{
}
@@ -320,7 +320,7 @@ void HtmlGenerator::initializeGenerator(const Config &config)
++edition;
}
- slow = config.getBool(CONFIG_SLOW);
+ syntaxHighlighting = config.getBool(CONFIG_SYNTAXHIGHLIGHTING);
codeIndent = config.getInt(CONFIG_CODEINDENT);
@@ -472,7 +472,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << protectEnc(plainCode(atom->string()));
}
else {
- out() << highlightedCode(atom->string(), marker, relative);
+ out() << protectEnc(plainCode(atom->string()));
}
out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE];
break;
@@ -2781,7 +2781,7 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
}
- if (slow) {
+ if (syntaxHighlighting) {
// is this block ever used at all?
// replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)(</@func>)"
src = html;
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index f5d2427..6701184 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -279,7 +279,7 @@ class HtmlGenerator : public PageGenerator
QStringList stylesheets;
QStringList customHeadElements;
const Tree *myTree;
- bool slow;
+ bool syntaxHighlighting;
bool obsoleteLinks;
QMap<QString, NodeMap > moduleClassMap;
QMap<QString, NodeMap > moduleNamespaceMap;
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 782df39..8193d2d 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -147,7 +147,8 @@ static void processQdocconfFile(const QString &fileName)
QStringList() << defaults[i].value);
++i;
}
- config.setStringList(CONFIG_SLOW, QStringList(slow ? "true" : "false"));
+ config.setStringList(CONFIG_SYNTAXHIGHLIGHTING, QStringList(slow ? "true" : "false"));
+ config.setStringList(CONFIG_LINKSINMARKUP, QStringList(slow ? "true" : "false"));
config.setStringList(CONFIG_SHOWINTERNAL,
QStringList(showInternal ? "true" : "false"));
config.setStringList(CONFIG_OBSOLETELINKS,