summaryrefslogtreecommitdiffstats
path: root/src/tools/qdoc
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@digia.com>2012-11-07 13:17:30 +0100
committerMartin Smith <martin.smith@digia.com>2012-11-07 14:08:14 +0100
commit3b78aa72c736b856f739123b125fdb36e9160fee (patch)
tree6c9782268fed3d8a57b38dfb3bcd2f0a047415ec /src/tools/qdoc
parent3c9312453680b600a0404b324be63f81ecc6bc33 (diff)
qdoc: Removed setting of codeindent variable
All the qdocconf files in use for Qt 5.0 set the codeindent variable to 1, which prefixes each line of a snippet with one ' '. But this messes up the cutting and pasting of snippets into editors for actual use. qdoc now lets the codeindent variable be initialized to 0, and then it never changes it. This looks ok in the default formatted html output. If the html output formatted with the template CSS files also looks ok, then the codeindent variable can be removed from all the qdocconf files, since it will no longer be used by qdoc. Task number: QTBUG-27798 Change-Id: I398c57bdfc99e747ec086fbd8ddf5994cf3ee6d5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/tools/qdoc')
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp3
-rw-r--r--src/tools/qdoc/htmlgenerator.cpp6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 563df612ab..1ffbcf986c 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -573,7 +573,8 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
customHeadElements = config.getStringList(DitaXmlGenerator::format() +
Config::dot +
DITAXMLGENERATOR_CUSTOMHEADELEMENTS);
- codeIndent = config.getInt(CONFIG_CODEINDENT);
+ // The following line was changed to fix QTBUG-27798
+ //codeIndent = config.getInt(CONFIG_CODEINDENT);
version = config.getString(CONFIG_VERSION);
vrm = version.split(QLatin1Char('.'));
}
diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp
index 17dc40f08a..d48c706707 100644
--- a/src/tools/qdoc/htmlgenerator.cpp
+++ b/src/tools/qdoc/htmlgenerator.cpp
@@ -94,7 +94,8 @@ static void addLink(const QString &linkTarget,
Constructs the HTML output generator.
*/
HtmlGenerator::HtmlGenerator()
- : helpProjectWriter(0),
+ : codeIndent(0),
+ helpProjectWriter(0),
inObsoleteLink(false),
funcLeftParen("\\S(\\()"),
obsoleteLinks(false)
@@ -210,7 +211,8 @@ void HtmlGenerator::initializeGenerator(const Config &config)
++edition;
}
- codeIndent = config.getInt(CONFIG_CODEINDENT);
+ // The following line was changed to fix QTBUG-27798
+ //codeIndent = config.getInt(CONFIG_CODEINDENT);
helpProjectWriter = new HelpProjectWriter(config, project.toLower() + ".qhp", this);