summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-12-07 13:57:38 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-12-07 13:57:38 (GMT)
commitd8fb8ca3a378743eebb8464f7910a5e6d1870c01 (patch)
tree9c31a017163a532946f10107b8d9f4405ed1c9db /tools
parentb5915ef3a6d0417440ad82e9369d6679505b953e (diff)
parent076bba6c901e292b61fffb7a91020075dcd84919 (diff)
downloadQt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.zip
Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.gz
Qt-d8fb8ca3a378743eebb8464f7910a5e6d1870c01.tar.bz2
Merge branch 'qdoc-simplified' into mimir-simplified
Conflicts: doc/src/platforms/compiler-notes.qdoc tools/qdoc3/ditaxmlgenerator.cpp tools/qdoc3/ditaxmlgenerator.h tools/qdoc3/htmlgenerator.cpp tools/qdoc3/htmlgenerator.h tools/qdoc3/node.cpp tools/qdoc3/pagegenerator.h
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpgenerator.cpp13
-rw-r--r--tools/assistant/tools/assistant/doc/assistant.qdocconf2
-rw-r--r--tools/assistant/tools/assistant/helpenginewrapper.cpp2
-rw-r--r--tools/configure/configure.pro4
-rw-r--r--tools/configure/configureapp.cpp22
-rw-r--r--tools/configure/environment.cpp10
-rw-r--r--tools/designer/src/lib/shared/qtresourcemodel.cpp6
-rw-r--r--tools/linguist/linguist/mainwindow.cpp4
-rw-r--r--tools/linguist/linguist/printout.cpp2
-rw-r--r--tools/linguist/lrelease/lrelease.pro1
-rw-r--r--tools/linguist/lupdate/main.cpp4
-rw-r--r--tools/linguist/shared/ts.dtd23
-rw-r--r--tools/macdeployqt/shared/shared.cpp2
-rw-r--r--tools/porting/src/preprocessorcontrol.cpp2
-rw-r--r--tools/porting/src/textreplacement.h4
-rw-r--r--tools/qconfig/qconfig.pro1
-rw-r--r--tools/qdoc3/JAVATODO.txt28
-rw-r--r--tools/qdoc3/TODO.txt9
-rw-r--r--tools/qdoc3/apigenerator.cpp150
-rw-r--r--tools/qdoc3/apigenerator.h65
-rw-r--r--tools/qdoc3/archiveextractor.cpp108
-rw-r--r--tools/qdoc3/bookgenerator.h64
-rw-r--r--tools/qdoc3/codemarker.cpp1
-rw-r--r--tools/qdoc3/codemarker.h7
-rw-r--r--tools/qdoc3/codeparser.cpp41
-rw-r--r--tools/qdoc3/codeparser.h6
-rw-r--r--tools/qdoc3/command.cpp103
-rw-r--r--tools/qdoc3/command.h60
-rw-r--r--tools/qdoc3/config.cpp78
-rw-r--r--tools/qdoc3/config.h8
-rw-r--r--tools/qdoc3/cppcodemarker.cpp16
-rw-r--r--tools/qdoc3/cppcodemarker.h56
-rw-r--r--tools/qdoc3/cppcodeparser.cpp19
-rw-r--r--tools/qdoc3/cppcodeparser.h4
-rw-r--r--tools/qdoc3/cpptoqsconverter.cpp415
-rw-r--r--tools/qdoc3/dcfsection.cpp111
-rw-r--r--tools/qdoc3/dcfsection.h94
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp4
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h28
-rw-r--r--tools/qdoc3/doc.cpp965
-rw-r--r--tools/qdoc3/doc/files/qt.qdocconf8
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdocconf253
-rw-r--r--tools/qdoc3/generator.cpp114
-rw-r--r--tools/qdoc3/generator.h2
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp16
-rw-r--r--tools/qdoc3/htmlgenerator.cpp550
-rw-r--r--tools/qdoc3/htmlgenerator.h54
-rw-r--r--tools/qdoc3/jambiapiparser.cpp546
-rw-r--r--tools/qdoc3/jambiapiparser.h99
-rw-r--r--tools/qdoc3/javacodemarker.cpp203
-rw-r--r--tools/qdoc3/javacodemarker.h83
-rw-r--r--tools/qdoc3/javadocgenerator.cpp454
-rw-r--r--tools/qdoc3/javadocgenerator.h95
-rw-r--r--tools/qdoc3/jscodemarker.cpp137
-rw-r--r--tools/qdoc3/jscodemarker.h (renamed from tools/qdoc3/archiveextractor.h)34
-rw-r--r--tools/qdoc3/linguistgenerator.cpp245
-rw-r--r--tools/qdoc3/location.cpp4
-rw-r--r--tools/qdoc3/loutgenerator.h67
-rw-r--r--tools/qdoc3/main.cpp176
-rw-r--r--tools/qdoc3/mangenerator.cpp228
-rw-r--r--tools/qdoc3/node.cpp8
-rw-r--r--tools/qdoc3/node.h6
-rw-r--r--tools/qdoc3/pagegenerator.cpp16
-rw-r--r--tools/qdoc3/pagegenerator.h4
-rw-r--r--tools/qdoc3/polyarchiveextractor.cpp94
-rw-r--r--tools/qdoc3/polyarchiveextractor.h70
-rw-r--r--tools/qdoc3/polyuncompressor.cpp109
-rw-r--r--tools/qdoc3/polyuncompressor.h71
-rw-r--r--tools/qdoc3/puredocparser.cpp (renamed from tools/qdoc3/loutgenerator.cpp)12
-rw-r--r--tools/qdoc3/puredocparser.h (renamed from tools/qdoc3/ccodeparser.h)24
-rw-r--r--tools/qdoc3/qdoc3.pro68
-rw-r--r--tools/qdoc3/qmlcodemarker.cpp287
-rw-r--r--tools/qdoc3/qmlcodemarker.h (renamed from tools/qdoc3/mangenerator.h)46
-rw-r--r--tools/qdoc3/qmlcodeparser.cpp235
-rw-r--r--tools/qdoc3/qmlcodeparser.h (renamed from tools/qdoc3/qsakernelparser.h)48
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.cpp863
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.h180
-rw-r--r--tools/qdoc3/qmlvisitor.cpp221
-rw-r--r--tools/qdoc3/qmlvisitor.h (renamed from tools/qdoc3/cpptoqsconverter.h)58
-rw-r--r--tools/qdoc3/qsakernelparser.cpp186
-rw-r--r--tools/qdoc3/qscodemarker.cpp378
-rw-r--r--tools/qdoc3/qscodemarker.h79
-rw-r--r--tools/qdoc3/qscodeparser.cpp944
-rw-r--r--tools/qdoc3/qscodeparser.h128
-rw-r--r--tools/qdoc3/quoter.cpp5
-rw-r--r--tools/qdoc3/sgmlgenerator.cpp63
-rw-r--r--tools/qdoc3/test/assistant.qdocconf4
-rw-r--r--tools/qdoc3/test/designer.qdocconf4
-rw-r--r--tools/qdoc3/test/linguist.qdocconf4
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf8
-rw-r--r--tools/qdoc3/test/qmake.qdocconf4
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf34
-rw-r--r--tools/qdoc3/test/qt-build-docs-online.qdocconf2
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf147
-rw-r--r--tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-defines.qdocconf45
-rw-r--r--tools/qdoc3/test/qt-html-default-styles.qdocconf50
-rw-r--r--tools/qdoc3/test/qt-html-online-styles.qdocconf77
-rw-r--r--tools/qdoc3/test/qt-html-templates-online.qdocconf236
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf225
-rw-r--r--tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf176
-rw-r--r--tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf236
-rw-r--r--tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf176
-rw-r--r--tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf347
-rw-r--r--tools/qdoc3/test/qt-project-api-only.qdocconf32
-rw-r--r--tools/qdoc3/test/qt-project.qdocconf110
-rw-r--r--tools/qdoc3/test/qt.qdocconf147
-rw-r--r--tools/qdoc3/test/qt_ja_JP.qdocconf118
-rw-r--r--tools/qdoc3/test/qt_zh_CN.qdocconf116
-rw-r--r--tools/qdoc3/test/scripts/functions.js60
-rw-r--r--tools/qdoc3/test/scripts/jquery.js152
-rw-r--r--tools/qdoc3/test/style/style.css1051
-rw-r--r--tools/qdoc3/test/style/style_ie6.css54
-rw-r--r--tools/qdoc3/test/style/style_ie7.css19
-rw-r--r--tools/qdoc3/test/style/style_ie8.css0
-rw-r--r--tools/qdoc3/tokenizer.cpp1
-rw-r--r--tools/qdoc3/tokenizer.h2
-rw-r--r--tools/qdoc3/tr.h14
-rw-r--r--tools/qdoc3/tree.cpp23
-rw-r--r--tools/qdoc3/uncompressor.cpp108
-rw-r--r--tools/qdoc3/uncompressor.h79
-rw-r--r--tools/qdoc3/webxmlgenerator.cpp1195
-rw-r--r--tools/qdoc3/webxmlgenerator.h127
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync.cpp (renamed from tools/qdoc3/bookgenerator.cpp)39
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync.h101
-rw-r--r--tools/qmeegographicssystemhelper/qmeegofencesync_p.h (renamed from tools/qdoc3/sgmlgenerator.h)29
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp17
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h8
-rw-r--r--tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro4
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp66
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap.h11
-rw-r--r--tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h6
-rw-r--r--tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp9
-rw-r--r--tools/qmeegographicssystemhelper/qmeegooverlaywidget.h2
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.cpp98
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoruntime.h14
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp (renamed from tools/qdoc3/ccodeparser.cpp)35
-rw-r--r--tools/qmeegographicssystemhelper/qmeegoswitchevent.h (renamed from tools/qdoc3/linguistgenerator.h)74
-rw-r--r--tools/qml/main.cpp12
-rw-r--r--tools/qml/qdeclarativetester.cpp55
-rw-r--r--tools/qml/qdeclarativetester.h1
-rw-r--r--tools/qml/qmlruntime.cpp5
-rw-r--r--tools/qml/qmlruntime.h3
-rw-r--r--tools/qtconfig/mainwindow.cpp20
-rw-r--r--tools/qtestlib/wince/cetest/activesyncconnection.cpp2
-rw-r--r--tools/qtestlib/wince/cetest/main.cpp2
-rw-r--r--tools/qvfb/qvfb.cpp2
-rw-r--r--tools/runonphone/symbianutils/tcftrkdevice.h2
-rw-r--r--tools/runonphone/symbianutils/tcftrkmessage.h2
-rw-r--r--tools/shared/symbian/epocroot.cpp115
-rw-r--r--tools/shared/symbian/epocroot.pri11
-rw-r--r--tools/shared/symbian/epocroot_p.h (renamed from tools/shared/symbian/epocroot.h)24
-rw-r--r--tools/shared/windows/registry.cpp18
-rw-r--r--tools/shared/windows/registry_p.h (renamed from tools/shared/windows/registry.h)24
155 files changed, 4841 insertions, 11282 deletions
diff --git a/tools/assistant/lib/qhelpgenerator.cpp b/tools/assistant/lib/qhelpgenerator.cpp
index 85bdd75..f94031b 100644
--- a/tools/assistant/lib/qhelpgenerator.cpp
+++ b/tools/assistant/lib/qhelpgenerator.cpp
@@ -712,14 +712,15 @@ bool QHelpGenerator::insertKeywords(const QList<QHelpDataIndexItem> &keywords,
d->query->exec(QLatin1String("BEGIN"));
QSet<QString> indices;
foreach (const QHelpDataIndexItem &itm, keywords) {
-
- /*
- * Identical ids make no sense and just confuse the Assistant user,
- * so we ignore all repetitions.
- */
+ // Identical ids make no sense and just confuse the Assistant user,
+ // so we ignore all repetitions.
if (indices.contains(itm.identifier))
continue;
- indices.insert(itm.identifier);
+
+ // Still empty ids should be ignored, as otherwise we will include only
+ // the first keyword with an empty id.
+ if (!itm.identifier.isEmpty())
+ indices.insert(itm.identifier);
pos = itm.reference.indexOf(QLatin1Char('#'));
fileName = itm.reference.left(pos);
diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf
index 26cdafb..57abeae 100644
--- a/tools/assistant/tools/assistant/doc/assistant.qdocconf
+++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf
@@ -12,5 +12,5 @@ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
"<td width=\"30%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\">Trademarks</td>\n" \
- "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.1</div></td>\n" \
+ "<td width=\"30%\" align=\"right\"><div align=\"right\">Qt 4.7.2</div></td>\n" \
"</tr></table></div></address>"
diff --git a/tools/assistant/tools/assistant/helpenginewrapper.cpp b/tools/assistant/tools/assistant/helpenginewrapper.cpp
index a53a9ee..748ad2c 100644
--- a/tools/assistant/tools/assistant/helpenginewrapper.cpp
+++ b/tools/assistant/tools/assistant/helpenginewrapper.cpp
@@ -144,7 +144,7 @@ HelpEngineWrapper::HelpEngineWrapper(const QString &collectionFile)
/*
* Otherwise we will waste time if several new docs are found,
- * because we will start to index them, only to be interupted
+ * because we will start to index them, only to be interrupted
* by the next request. Also, there is a nasty SQLITE bug that will
* cause the application to hang for minutes in that case.
* This call is reverted by initalDocSetupDone(), which must be
diff --git a/tools/configure/configure.pro b/tools/configure/configure.pro
index 810f006..0a49fbe 100644
--- a/tools/configure/configure.pro
+++ b/tools/configure/configure.pro
@@ -63,8 +63,8 @@ HEADERS = configureapp.h environment.h tools.h\
$$QT_SOURCE_TREE/src/corelib/tools/qunicodetables_p.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlstream.h \
$$QT_SOURCE_TREE/src/corelib/xml/qxmlutils_p.h \
- $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.h \
- $$QT_SOURCE_TREE/tools/shared/windows/registry.h
+ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \
+ $$QT_SOURCE_TREE/tools/shared/windows/registry_p.h
SOURCES = main.cpp configureapp.cpp environment.cpp tools.cpp \
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3808c4e..f4fd7c6 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -3227,7 +3227,8 @@ void Configure::generateConfigfiles()
}
// Copy configured mkspec to default directory, but remove the old one first, if there is any
- QString defSpec = buildPath + "/mkspecs/default";
+ QString mkspecsPath = buildPath + "/mkspecs";
+ QString defSpec = mkspecsPath + "/default";
QFileInfo defSpecInfo(defSpec);
if (defSpecInfo.exists()) {
if (!Environment::rmdir(defSpec)) {
@@ -3237,21 +3238,22 @@ void Configure::generateConfigfiles()
}
}
- QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
- QString pltSpec = sourcePath + "/mkspecs/" + spec;
- if (!Environment::cpdir(pltSpec, defSpec)) {
- cout << "Couldn't update default mkspec! Does " << qPrintable(pltSpec) << " exist?" << endl;
+ QDir mkspecsDir(mkspecsPath);
+ if (!mkspecsDir.mkdir("default")) {
+ cout << "Couldn't create default mkspec dir!" << endl;
dictionary["DONE"] = "error";
return;
}
+ QString spec = dictionary.contains("XQMAKESPEC") ? dictionary["XQMAKESPEC"] : dictionary["QMAKESPEC"];
+ QString pltSpec = sourcePath + "/mkspecs/" + spec;
outName = defSpec + "/qmake.conf";
- ::SetFileAttributes((wchar_t*)outName.utf16(), FILE_ATTRIBUTE_NORMAL);
QFile qmakeConfFile(outName);
- if (qmakeConfFile.open(QFile::Append | QFile::WriteOnly | QFile::Text)) {
+ if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) {
QTextStream qmakeConfStream;
qmakeConfStream.setDevice(&qmakeConfFile);
- qmakeConfStream << endl << "QMAKESPEC_ORIGINAL=" << pltSpec << endl;
+ qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl;
+ qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl;
qmakeConfStream.flush();
qmakeConfFile.close();
}
@@ -3331,7 +3333,7 @@ void Configure::generateConfigfiles()
if (tmpFile3.open()) {
tmpStream.setDevice(&tmpFile3);
tmpStream << "/* Evaluation license key */" << endl
- << "static const char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl;
+ << "static const volatile char qt_eval_key_data [512 + 12] = \"qt_qevalkey=" << licenseInfo["LICENSEKEYEXT"] << "\";" << endl;
tmpStream.flush();
tmpFile3.flush();
@@ -3415,7 +3417,7 @@ void Configure::displayConfig()
QString webkit = dictionary[ "WEBKIT" ];
if (webkit == "debug")
webkit = "yes (debug)";
- cout << "WebKit support.............." << webkit;
+ cout << "WebKit support.............." << webkit << endl;
}
cout << "Declarative support........." << dictionary[ "DECLARATIVE" ] << endl;
cout << "Declarative debugging......." << dictionary[ "DECLARATIVE_DEBUG" ] << endl;
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 03fd0cc..1866ef4 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -60,8 +60,8 @@ using namespace std;
#include <qt_windows.h>
#endif
-#include <symbian/epocroot.h> // from tools/shared
-#include <windows/registry.h> // from tools/shared
+#include <symbian/epocroot_p.h> // from tools/shared
+#include <windows/registry_p.h> // from tools/shared
QT_BEGIN_NAMESPACE
@@ -163,7 +163,7 @@ Compiler Environment::detectCompiler()
QString paths = qgetenv("PATH");
QStringList pathlist = paths.toLower().split(";");
for(int i = 0; compiler_info[i].compiler; ++i) {
- QString productPath = readRegistryKey(HKEY_LOCAL_MACHINE, compiler_info[i].regKey).toLower();
+ QString productPath = qt_readRegistryKey(HKEY_LOCAL_MACHINE, compiler_info[i].regKey).toLower();
if (productPath.length()) {
QStringList::iterator it;
for(it = pathlist.begin(); it != pathlist.end(); ++it) {
@@ -466,8 +466,8 @@ bool Environment::rmdir(const QString &name)
QString Environment::symbianEpocRoot()
{
- // Call function defined in tools/shared/symbian/epocroot.h
- return ::epocRoot();
+ // Call function defined in tools/shared/symbian/epocroot_p.h
+ return ::qt_epocRoot();
}
QT_END_NAMESPACE
diff --git a/tools/designer/src/lib/shared/qtresourcemodel.cpp b/tools/designer/src/lib/shared/qtresourcemodel.cpp
index 709f389..e3fc805 100644
--- a/tools/designer/src/lib/shared/qtresourcemodel.cpp
+++ b/tools/designer/src/lib/shared/qtresourcemodel.cpp
@@ -428,10 +428,10 @@ void QtResourceModelPrivate::removeOldPaths(QtResourceSet *resourceSet, const QS
void QtResourceModelPrivate::setWatcherEnabled(const QString &path, bool enable)
{
- m_fileWatcher->removePath(path);
-
- if (!enable)
+ if (!enable) {
+ m_fileWatcher->removePath(path);
return;
+ }
QFileInfo fi(path);
if (fi.exists())
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 18baa24..1189b99 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -2498,8 +2498,8 @@ void MainWindow::updateDanger(const MultiDataIndex &index, bool verbose)
}
if (m_ui.actionPlaceMarkerMatches->isChecked()) {
- // Stores the occurence count of the place markers in the map placeMarkerIndexes.
- // i.e. the occurence count of %1 is stored at placeMarkerIndexes[1],
+ // Stores the occurrence count of the place markers in the map placeMarkerIndexes.
+ // i.e. the occurrence count of %1 is stored at placeMarkerIndexes[1],
// count of %2 is stored at placeMarkerIndexes[2] etc.
// In the first pass, it counts all place markers in the sourcetext.
// In the second pass it (de)counts all place markers in the translation.
diff --git a/tools/linguist/linguist/printout.cpp b/tools/linguist/linguist/printout.cpp
index 581dc00..7ec6875 100644
--- a/tools/linguist/linguist/printout.cpp
+++ b/tools/linguist/linguist/printout.cpp
@@ -130,7 +130,7 @@ void PrintOut::addBox(int percent, const QString &text, Style style, Qt::Alignme
cp.rect.setSize(QSize(cp.rect.width() + wd, qMax(cp.rect.height(), ht)));
}
-// use init if inital vsize should be calculated (first breakPage call)
+// use init if initial vsize should be calculated (first breakPage call)
void PrintOut::breakPage(bool init)
{
static const int LeftAlign = Qt::AlignLeft | Qt::AlignTop;
diff --git a/tools/linguist/lrelease/lrelease.pro b/tools/linguist/lrelease/lrelease.pro
index 6beafa3..89694be 100644
--- a/tools/linguist/lrelease/lrelease.pro
+++ b/tools/linguist/lrelease/lrelease.pro
@@ -15,6 +15,7 @@ macx:SOURCES += $$QT_SOURCE_TREE/src/corelib/io/qsettings_mac.cpp
include(../../../src/tools/bootstrap/bootstrap.pri)
include(../shared/formats.pri)
include(../shared/proparser.pri)
+include(../../shared/symbian/epocroot.pri)
win32:LIBS += -ladvapi32 # for qsettings_win.cpp
diff --git a/tools/linguist/lupdate/main.cpp b/tools/linguist/lupdate/main.cpp
index 49906e0..76a8756 100644
--- a/tools/linguist/lupdate/main.cpp
+++ b/tools/linguist/lupdate/main.cpp
@@ -350,6 +350,10 @@ static void processProjects(
ProFileEvaluator visitor;
visitor.setVerbose(options & Verbose);
+ QHash<QString, QStringList> lupdateConfig;
+ lupdateConfig.insert(QLatin1String("CONFIG"), QStringList(QLatin1String("lupdate_run")));
+ visitor.addVariables(lupdateConfig);
+
QFileInfo pfi(proFile);
ProFile pro(pfi.absoluteFilePath());
if (!visitor.queryProFile(&pro) || !visitor.accept(&pro)) {
diff --git a/tools/linguist/shared/ts.dtd b/tools/linguist/shared/ts.dtd
index 4d2cdeb..12d3562 100644
--- a/tools/linguist/shared/ts.dtd
+++ b/tools/linguist/shared/ts.dtd
@@ -4,8 +4,6 @@
!
! The location element is set as optional since it was introduced first in Qt 4.2.
! The userdata element is set as optional since it was introduced first in Qt 4.4.
- ! The source and translation elements are optional starting with version 3.0
- ! (Qt 4.6) to support S60 blank messages.
!
-->
<!--
@@ -36,13 +34,10 @@
language CDATA #IMPLIED>
<!-- The encoding to use in the QM file by default. Default is ISO-8859-1. -->
<!ELEMENT defaultcodec (#PCDATA) >
-<!ELEMENT context (name?, comment?, (context|message)+) >
+<!ELEMENT context (name, comment?, (context|message)+) >
<!ATTLIST context
encoding CDATA #IMPLIED>
<!ELEMENT name %evilstring; >
-<!-- If "no", then the context nesting is for informational puposes only -->
-<!ATTLIST name
- nest (yes|no) "yes">
<!-- This is "disambiguation" in the (new) API, or "msgctxt" in gettext speak -->
<!ELEMENT comment %evilstring; >
<!-- Previous content of comment (result of merge) -->
@@ -53,12 +48,13 @@
<!ELEMENT translatorcomment %evilstring; >
<!ELEMENT message (location*, source?, oldsource?, comment?, oldcomment?, extracomment?, translatorcomment?, translation?, userdata?, extra-**) >
<!--
- ! If utf8 is true, the defaultcodec is overridden and the message is encoded
- ! in UTF-8 in the QM file.
+ ! If utf8 is "true", the defaultcodec is overridden and the message is encoded
+ ! in UTF-8 in the QM file. If it is "both", both source encodings are stored
+ ! in the QM file.
-->
<!ATTLIST message
id CDATA #IMPLIED
- utf8 (true|false) "false"
+ utf8 (true|false|both) "false"
numerus (yes|no) "no">
<!ELEMENT location EMPTY>
<!--
@@ -100,14 +96,5 @@
-->
<!ELEMENT numerusform (#PCDATA|byte|lengthvariant)* >
<!ATTLIST numerusform
- plurality (nullar|singular|dual|trial|paucal|greaterpaucal|plural|greaterplural) #IMPLIED>
variants (yes|no) "no">
<!ELEMENT lengthvariant %evilstring; >
-<!--
- ! The translation variants have a priority between 1 ("highest") and 9 ("lowest")
- ! Typically longer translations get a higher priority.
- ! If omitted, the order of appearance of the variants in the TS files is used.
- -->
-<!ATTLIST lengthvariant
- priority (1|2|3|4|5|6|7|8|9) #IMPLIED>
-
diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp
index 52cf04b..c7d23c0 100644
--- a/tools/macdeployqt/shared/shared.cpp
+++ b/tools/macdeployqt/shared/shared.cpp
@@ -388,7 +388,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks,
foreach (FrameworkInfo dependency, dependencies) {
changeInstallName(dependency.installName, dependency.deployedInstallName, deployedBinaryPath);
- // Deploy framework if neccesary.
+ // Deploy framework if necessary.
if (copiedFrameworks.contains(dependency.frameworkName) == false && frameworks.contains(dependency) == false) {
frameworks.append(dependency);
}
diff --git a/tools/porting/src/preprocessorcontrol.cpp b/tools/porting/src/preprocessorcontrol.cpp
index 673ed08..31adc32 100644
--- a/tools/porting/src/preprocessorcontrol.cpp
+++ b/tools/porting/src/preprocessorcontrol.cpp
@@ -154,7 +154,7 @@ QByteArray PreprocessorCache::readFile(const QString &filename) const
// read the file for us.
if (receivers(SIGNAL(readFile(QByteArray&,QString))) > 0) {
QByteArray array;
- // Workaround for "not beeing able to emit from const function"
+ // Workaround for "not being able to emit from const function"
PreprocessorCache *cache = const_cast<PreprocessorCache *>(this);
emit cache->readFile(array, filename);
return array;
diff --git a/tools/porting/src/textreplacement.h b/tools/porting/src/textreplacement.h
index f90fb82..f351552 100644
--- a/tools/porting/src/textreplacement.h
+++ b/tools/porting/src/textreplacement.h
@@ -53,7 +53,7 @@ class TextReplacement
public:
QByteArray newText;
int insertPosition;
- int currentLenght; //lenght of the text that is going to be replaced.
+ int currentLenght; //length of the text that is going to be replaced.
bool operator<(const TextReplacement &other) const
{
return (insertPosition < other.insertPosition);
@@ -70,7 +70,7 @@ public:
insert maintains the TextReplacement list in sorted order.
- Returns true if the insert was successfull, false otherwise;
+ Returns true if the insert was successful, false otherwise;
*/
bool insert(QByteArray newText, int insertPosition, int currentLenght);
void clear();
diff --git a/tools/qconfig/qconfig.pro b/tools/qconfig/qconfig.pro
index efbfcf2..171924f 100644
--- a/tools/qconfig/qconfig.pro
+++ b/tools/qconfig/qconfig.pro
@@ -6,5 +6,4 @@ build_all:!build_pass {
}
HEADERS = feature.h featuretreemodel.h graphics.h
SOURCES = main.cpp feature.cpp featuretreemodel.cpp
-INTERFACES =
TARGET = qconfig
diff --git a/tools/qdoc3/JAVATODO.txt b/tools/qdoc3/JAVATODO.txt
deleted file mode 100644
index 911b7a5..0000000
--- a/tools/qdoc3/JAVATODO.txt
+++ /dev/null
@@ -1,28 +0,0 @@
- * index page on "O" and downwards?
- * flag types, e.g. QTextStream::NumberFlags
- * example references qt.nokia.com/doc etc.
-
- * fix enum value table (e.g. QCoreApplication.Encoding.html)
- * check reimplementation of interface functions (e.g. QWidget::widthMM())
- * handle '::' in doc, e.g. in QAbstractEventDispatcher's detailed desc
- * make sure default constructor logic doesn't interfere with default params (e.g. QAbstractEventDispatcher ctors)
- * document default constructor provided for Java (e.g.?)
- * document "protected QAbstractEventDispatcher(QtObject.QPrivateConstructor p)" and the like
- * memory-managed, type
-
- * replace QString with String, etc.
- * nested classes
- * enum_1
-
- * fix stylesheet
- * no link to class itself
- * support \ifjava
- * add // C++
- * support Java-only /*! ... */ comments
-
- * links to property names have to be fixed
- * example: version 1 in QStyleOptionFrame
- * example: foo -> isFoo()
-
- * lowercase, and remove final stop, in \brief texts for variables and properties
- * omit "see alsos" that don't work instead of showing them as broken links
diff --git a/tools/qdoc3/TODO.txt b/tools/qdoc3/TODO.txt
index 6deeb06..9bf4a28 100644
--- a/tools/qdoc3/TODO.txt
+++ b/tools/qdoc3/TODO.txt
@@ -10,8 +10,6 @@
* Don't turn X11 and similar names into links.
* Added automatic links from getters to setters and vice versa.
* Support \module and show which module each class is from.
- * Use bullet list for the list of all functions, now that
- Assistant handles these gracefully.
* Fix occasional crash caused by misuse of const_cast().
* Provide clearer error messages when resolves fail.
@@ -55,12 +53,9 @@ MUST HAVES:
* Provide a "List of all properties" page.
* expand QObjectList -> QList<QObject *>
- * make \macro work (?)
* warning for unnamed parameters in property access functions
* \center...\endcenter
- * warning for undocumented enum values
-
LINKS:
* explanation following nonstandard wording warning
@@ -74,8 +69,6 @@ LINKS:
* implement \sidebar
- * implement qbook
-
* implement \legalesefile
* show in which module each class is
@@ -92,5 +85,3 @@ NICE FEATURES:
OTHER:
* make qdoc run faster
* make sure \headerfile works even if specified after \relates
-
- * use qtstyle.css instead of inline style for each page
diff --git a/tools/qdoc3/apigenerator.cpp b/tools/qdoc3/apigenerator.cpp
deleted file mode 100644
index 41c89c7..0000000
--- a/tools/qdoc3/apigenerator.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QFile>
-
-#include "apigenerator.h"
-#include "codemarker.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-static QString indentStr(int indent)
-{
- QString str;
- str.fill(QLatin1Char(' '), indent * 4);
- return str;
-}
-
-static bool lessThanName(Node *node1, Node *node2)
-{
- return node1->name() < node2->name();
-}
-
-QString ApiGenerator::format()
-{
- return QLatin1String("API");
-}
-
-void ApiGenerator::generateTree(const Tree *tree, CodeMarker *marker)
-{
- QFile outFile(QLatin1String("api"));
- outFile.open(QIODevice::WriteOnly);
-
- out.setDevice(&outFile);
- generateNode(tree->root(), marker);
- out.flush();
-}
-
-void ApiGenerator::generateNode(const Node *node, CodeMarker *marker, int indent)
-{
- if (node->access() == Node::Private)
- return;
-
- switch (node->type()) {
- case Node::Namespace:
- if (!node->name().isEmpty()) {
- out << indentStr(indent) << "Namespace: " << node->name() << "\n";
- ++indent;
- }
- break;
- case Node::Class:
- {
- const ClassNode *classe = static_cast<const ClassNode *>(node);
- out << indentStr(indent) << "Class: " << node->name();
- foreach (const RelatedClass &baseClass, classe->baseClasses()) {
- if (baseClass.access == Node::Public)
- out << " inherits " << baseClass.dataTypeWithTemplateArgs;
- }
- out << "\n";
- ++indent;
- }
- break;
- case Node::Enum:
- {
- const EnumNode *enume = static_cast<const EnumNode *>(node);
- out << indentStr(indent) << "Enum: " << node->name() << "\n";
- ++indent;
-
- QStringList enumNames;
- foreach (const EnumItem &item, enume->items())
- enumNames << item.name();
- qSort(enumNames);
-
- foreach (const QString &name, enumNames)
- out << indentStr(indent) << "Enum value: " << name << "\n";
- }
- break;
- case Node::Typedef:
- out << indentStr(indent) << "Typedef: " << node->name() << "\n";
- ++indent;
- break;
- case Node::Function:
- {
- out << indentStr(indent) << "Function: "
- << plainCode(marker->markedUpSynopsis(node, 0, CodeMarker::Detailed)) << "\n";
- ++indent;
- }
- break;
- case Node::Property:
- {
- const PropertyNode *property = static_cast<const PropertyNode *>(node);
- out << indentStr(indent) << "Property: " << property->name()
- << " type " << property->dataType() << "\n";
- ++indent;
- }
- break;
- default:
- ;
- }
-
- if (node->isInnerNode()) {
- const InnerNode *inner = static_cast<const InnerNode *>(node);
- NodeList nodes = inner->childNodes();
- qSort(nodes.begin(), nodes.end(), lessThanName);
- foreach (const Node *child, nodes)
- generateNode(child, marker, indent);
- }
-
- out.flush();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/apigenerator.h b/tools/qdoc3/apigenerator.h
deleted file mode 100644
index fefef5d..0000000
--- a/tools/qdoc3/apigenerator.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef APIGENERATOR_H
-#define APIGENERATOR_H
-
-#include <QTextStream>
-
-#include "generator.h"
-
-QT_BEGIN_NAMESPACE
-
-class ApiGenerator : public Generator
-{
-public:
- QString format();
- void generateTree(const Tree *tree, CodeMarker *marker);
-
-private:
- void generateNode(const Node *node, CodeMarker *marker, int indent = 0);
-
- QTextStream out;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/archiveextractor.cpp b/tools/qdoc3/archiveextractor.cpp
deleted file mode 100644
index 6d3d736..0000000
--- a/tools/qdoc3/archiveextractor.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- archiveextractor.cpp
-*/
-
-#include "archiveextractor.h"
-
-QT_BEGIN_NAMESPACE
-
-QList<ArchiveExtractor *> ArchiveExtractor::extractors;
-
-/*!
- \class ArchiveExtractor
-
- \brief The ArchiveExtractor class is a base class for classes that
- know how to unpack a certain kind of archive file.
-
- The archive extractor contains a list of the filename extensions
- of the files that the archive extractor knows how to unpack.
-
- It maintains a static list of all the instances of ArchiveExtractor
- that have been created. It also has a static function for searching
- that list to find the archive extracter for a file with a certain
- extension.
- */
-
-/*!
- The constructor takes a list of filename extensions, which it
- copies and saves internally. This archive extractor is prepended
- to the static list.
- */
-ArchiveExtractor::ArchiveExtractor( const QStringList& extensions )
- : fileExts( extensions )
-{
- extractors.prepend( this );
-}
-
-/*!
- The destructor deletes all the filename extensions.
- */
-ArchiveExtractor::~ArchiveExtractor()
-{
- extractors.removeAll( this );
-}
-
-/*!
- This function searches the static list of archive extractors
- to find the first one that can handle \a fileName. If it finds
- an acceptable extractor, it returns a pointer to it. Otherwise
- it returns null.
- */
-ArchiveExtractor*
-ArchiveExtractor::extractorForFileName( const QString& fileName )
-{
- int dot = -1;
- while ( (dot = fileName.indexOf(QLatin1Char('.'), dot + 1)) != -1 ) {
- QString ext = fileName.mid( dot + 1 );
- QList<ArchiveExtractor *>::ConstIterator e = extractors.begin();
- while ( e != extractors.end() ) {
- if ( (*e)->fileExtensions().contains(ext) )
- return *e;
- ++e;
- }
- }
- return 0;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/bookgenerator.h b/tools/qdoc3/bookgenerator.h
deleted file mode 100644
index 69b65fc..0000000
--- a/tools/qdoc3/bookgenerator.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- bookgenerator.h
-*/
-
-#ifndef BOOKGENERATOR_H
-#define BOOKGENERATOR_H
-
-#include "generator.h"
-
-QT_BEGIN_NAMESPACE
-
-class BookGenerator : public Generator
-{
-public:
- BookGenerator();
- ~BookGenerator();
-
- virtual void generateTree( const Tree *tree, CodeMarker *marker );
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index ec86ae3..f1b6346 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include <QMetaObject>
-#include <QDebug>
#include "codemarker.h"
#include "config.h"
#include "node.h"
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index f17b28e..029ddb9 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -107,13 +107,6 @@ struct FastSection
};
-#if 0
- const QString& name0 = "",
- const QString& divClass0 = "",
- const QString& singularMember0 = "member",
- const QString& pluralMember0 = "members")
-#endif
-
class CodeMarker
{
public:
diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp
index 65d9572..3652758 100644
--- a/tools/qdoc3/codeparser.cpp
+++ b/tools/qdoc3/codeparser.cpp
@@ -47,7 +47,6 @@
#include "node.h"
#include "tree.h"
#include "config.h"
-#include <QDebug>
QT_BEGIN_NAMESPACE
@@ -99,14 +98,14 @@ void CodeParser::initializeParser(const Config& config)
}
/*!
- Teerminating a code parser is trivial.
+ Terminating a code parser is trivial.
*/
void CodeParser::terminateParser()
{
// nothing.
}
-QString CodeParser::headerFileNameFilter()
+QStringList CodeParser::headerFileNameFilter()
{
return sourceFileNameFilter();
}
@@ -159,6 +158,42 @@ CodeParser *CodeParser::parserForLanguage(const QString& language)
return 0;
}
+CodeParser *CodeParser::parserForHeaderFile(const QString &filePath)
+{
+ QString fileName = QFileInfo(filePath).fileName();
+
+ QList<CodeParser *>::ConstIterator p = parsers.begin();
+ while (p != parsers.end()) {
+
+ QStringList headerPatterns = (*p)->headerFileNameFilter();
+ foreach (QString pattern, headerPatterns) {
+ QRegExp re(pattern, Qt::CaseInsensitive, QRegExp::Wildcard);
+ if (re.exactMatch(fileName))
+ return *p;
+ }
+ ++p;
+ }
+ return 0;
+}
+
+CodeParser *CodeParser::parserForSourceFile(const QString &filePath)
+{
+ QString fileName = QFileInfo(filePath).fileName();
+
+ QList<CodeParser *>::ConstIterator p = parsers.begin();
+ while (p != parsers.end()) {
+
+ QStringList sourcePatterns = (*p)->sourceFileNameFilter();
+ foreach (QString pattern, sourcePatterns) {
+ QRegExp re(pattern, Qt::CaseInsensitive, QRegExp::Wildcard);
+ if (re.exactMatch(fileName))
+ return *p;
+ }
+ ++p;
+ }
+ return 0;
+}
+
/*!
Returns the set of strings representing the common metacommands.
*/
diff --git a/tools/qdoc3/codeparser.h b/tools/qdoc3/codeparser.h
index ebba601..2d11ee0 100644
--- a/tools/qdoc3/codeparser.h
+++ b/tools/qdoc3/codeparser.h
@@ -66,8 +66,8 @@ class CodeParser
virtual void initializeParser(const Config& config);
virtual void terminateParser();
virtual QString language() = 0;
- virtual QString headerFileNameFilter();
- virtual QString sourceFileNameFilter() = 0;
+ virtual QStringList headerFileNameFilter();
+ virtual QStringList sourceFileNameFilter() = 0;
virtual void parseHeaderFile(const Location& location,
const QString& filePath, Tree *tree);
virtual void parseSourceFile(const Location& location,
@@ -78,6 +78,8 @@ class CodeParser
static void initialize(const Config& config);
static void terminate();
static CodeParser *parserForLanguage(const QString& language);
+ static CodeParser *parserForHeaderFile(const QString &filePath);
+ static CodeParser *parserForSourceFile(const QString &filePath);
static const QString titleFromName(const QString& name);
protected:
diff --git a/tools/qdoc3/command.cpp b/tools/qdoc3/command.cpp
deleted file mode 100644
index b78ad07..0000000
--- a/tools/qdoc3/command.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- command.cpp
-*/
-
-#include <QProcess>
-
-#include "command.h"
-
-#include <stdlib.h>
-
-QT_BEGIN_NAMESPACE
-
-void executeCommand(const Location& location,
- const QString& format,
- const QStringList& args)
-{
- QString actualCommand;
- for (int i = 0; i < (int) format.length(); i++) {
- int ch = format[i].unicode();
- if (ch > 0 && ch < 8) {
- actualCommand += args[ch - 1];
- }
- else {
- actualCommand += format[i];
- }
- }
-
- QString toolName = actualCommand;
- int space = toolName.indexOf(QLatin1Char(' '));
- if (space != -1)
- toolName.truncate(space);
-
-#ifdef QT_BOOTSTRAPPED
- int status = system(qPrintable(actualCommand));
- int exitCode = WEXITSTATUS(status);
- if (status == -1 || exitCode != EXIT_SUCCESS)
- location.fatal(QString("Error executing '$1': $2").arg(toolName).arg(exitCode));
-#else
- QProcess process;
- process.start(QLatin1String("sh"),
- QStringList() << QLatin1String("-c") << actualCommand);
- process.waitForFinished();
-
- if (process.exitCode() == 127)
- location.fatal(tr("Couldn't launch the '%1' tool")
- .arg(toolName),
- tr("Make sure the tool is installed and in the"
- " path."));
-
- QString errors = QString::fromLocal8Bit(process.readAllStandardError());
- while (errors.endsWith(QLatin1Char('\n')))
- errors.truncate(errors.length() - 1);
- if (!errors.isEmpty())
- location.fatal(tr("The '%1' tool encountered some problems")
- .arg(toolName),
- tr("The tool was invoked like this:\n%1\n"
- "It emitted these errors:\n%2")
- .arg(actualCommand).arg(errors));
-#endif
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/command.h b/tools/qdoc3/command.h
deleted file mode 100644
index 2346aff..0000000
--- a/tools/qdoc3/command.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- command.h
-*/
-
-#ifndef COMMAND_H
-#define COMMAND_H
-
-#include <qstringlist.h>
-
-#include "location.h"
-
-QT_BEGIN_NAMESPACE
-
-void executeCommand( const Location& location, const QString& commandFormat,
- const QStringList& args );
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/config.cpp b/tools/qdoc3/config.cpp
index 4d1c378..c2ab559 100644
--- a/tools/qdoc3/config.cpp
+++ b/tools/qdoc3/config.cpp
@@ -49,9 +49,7 @@
#include <QTemporaryFile>
#include <QTextStream>
-#include "archiveextractor.h"
#include "config.h"
-#include "uncompressor.h"
#include <stdlib.h>
QT_BEGIN_NAMESPACE
@@ -150,7 +148,6 @@ QStringList MetaStack::getExpanded(const Location& location)
}
QT_STATIC_CONST_IMPL QString Config::dot = QLatin1String(".");
-QMap<QString, QString> Config::uncompressedFiles;
QMap<QString, QString> Config::extractedDirs;
int Config::numInstances;
@@ -178,30 +175,9 @@ Config::Config(const QString& programName)
}
/*!
- The destructor deletes all the temporary files and
- directories it built.
*/
Config::~Config()
{
- if (--numInstances == 0) {
- QMap<QString, QString>::ConstIterator f = uncompressedFiles.begin();
- while (f != uncompressedFiles.end()) {
- QDir().remove(*f);
- ++f;
- }
- uncompressedFiles.clear();
-
- QMap<QString, QString>::ConstIterator d = extractedDirs.begin();
- while (d != extractedDirs.end()) {
- removeDirContents(*d);
- QDir dir(*d);
- QString name = dir.dirName();
- dir.cdUp();
- dir.rmdir(name);
- ++d;
- }
- extractedDirs.clear();
- }
}
/*!
@@ -383,16 +359,12 @@ QSet<QString> Config::subVars(const QString& var) const
*/
QStringList Config::getAllFiles(const QString &filesVar,
const QString &dirsVar,
- const QString &defaultNameFilter,
const QSet<QString> &excludedDirs)
{
QStringList result = getStringList(filesVar);
QStringList dirs = getStringList(dirsVar);
- QString nameFilter = getString(filesVar + dot +
- QLatin1String(CONFIG_FILEEXTENSIONS));
- if (nameFilter.isEmpty())
- nameFilter = defaultNameFilter;
+ QString nameFilter = getString(filesVar + dot + QLatin1String(CONFIG_FILEEXTENSIONS));
QStringList::ConstIterator d = dirs.begin();
while (d != dirs.end()) {
@@ -456,62 +428,18 @@ QString Config::findFile(const Location& location,
QStringList::ConstIterator c = components.begin();
for (;;) {
bool isArchive = (c != components.end() - 1);
- ArchiveExtractor *extractor = 0;
QString userFriendly = *c;
- if (isArchive) {
- extractor = ArchiveExtractor::extractorForFileName(userFriendly);
- }
-
- if (extractor == 0) {
- Uncompressor *uncompressor =
- Uncompressor::uncompressorForFileName(userFriendly);
- if (uncompressor != 0) {
- QString fileNameWithCorrectExtension =
- uncompressor->uncompressedFilePath(
- fileInfo.filePath());
- QString uncompressed = uncompressedFiles[fileInfo.filePath()];
- if (uncompressed.isEmpty()) {
- uncompressed =
- QTemporaryFile(fileInfo.filePath()).fileName();
- uncompressor->uncompressFile(location,
- fileInfo.filePath(),
- uncompressed);
- uncompressedFiles[fileInfo.filePath()] = uncompressed;
- }
- fileInfo.setFile(uncompressed);
-
- if (isArchive) {
- extractor = ArchiveExtractor::extractorForFileName(
- fileNameWithCorrectExtension);
- }
- else {
- userFriendly = fileNameWithCorrectExtension;
- }
- }
- }
userFriendlyFilePath += userFriendly;
if (isArchive) {
- if (extractor == 0)
- location.fatal(tr("Unknown archive type '%1'")
- .arg(userFriendlyFilePath));
QString extracted = extractedDirs[fileInfo.filePath()];
- if (extracted.isEmpty()) {
- extracted = QTemporaryFile(fileInfo.filePath()).fileName();
- if (!QDir().mkdir(extracted))
- location.fatal(tr("Cannot create temporary directory '%1'")
- .arg(extracted));
- extractor->extractArchive(location, fileInfo.filePath(),
- extracted);
- extractedDirs[fileInfo.filePath()] = extracted;
- }
++c;
fileInfo.setFile(QDir(extracted), *c);
}
- else {
+ else
break;
- }
+
userFriendlyFilePath += "?";
}
return fileInfo.filePath();
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index 335a0d6..bc36f3d 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -76,7 +76,6 @@ class Config
QSet<QString> subVars(const QString& var) const;
QStringList getAllFiles(const QString& filesVar,
const QString& dirsVar,
- const QString& defaultNameFilter,
const QSet<QString> &excludedDirs = QSet<QString>());
static QStringList getFilesHere(const QString& dir,
@@ -119,12 +118,12 @@ class Config
};
#define CONFIG_ALIAS "alias"
-#define CONFIG_APPLICATION "application"
#define CONFIG_BASE "base" // ### don't document for now
#define CONFIG_CODEINDENT "codeindent"
#define CONFIG_DEFINES "defines"
#define CONFIG_DESCRIPTION "description"
#define CONFIG_EDITION "edition"
+#define CONFIG_ENDHEADER "endheader"
#define CONFIG_EXAMPLEDIRS "exampledirs"
#define CONFIG_EXAMPLES "examples"
#define CONFIG_EXCLUDEDIRS "excludedirs"
@@ -134,6 +133,8 @@ class Config
#define CONFIG_GENERATEINDEX "generateindex"
#define CONFIG_HEADERDIRS "headerdirs"
#define CONFIG_HEADERS "headers"
+#define CONFIG_HEADERSCRIPTS "headerscripts"
+#define CONFIG_HEADERSTYLES "headerstyles"
#define CONFIG_IGNOREDIRECTIVES "ignoredirectives"
#define CONFIG_IGNORETOKENS "ignoretokens"
#define CONFIG_IMAGEDIRS "imagedirs"
@@ -143,7 +144,6 @@ class Config
#define CONFIG_MACRO "macro"
#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
-#define CONFIG_APPLICATION "application"
#define CONFIG_OUTPUTDIR "outputdir"
#define CONFIG_OUTPUTENCODING "outputencoding"
#define CONFIG_OUTPUTLANGUAGE "outputlanguage"
@@ -160,8 +160,10 @@ class Config
#define CONFIG_SOURCES "sources"
#define CONFIG_SPURIOUS "spurious"
#define CONFIG_STYLEDIRS "styledirs"
+#define CONFIG_STYLE "style"
#define CONFIG_STYLES "styles"
#define CONFIG_STYLESHEETS "stylesheets"
+#define CONFIG_TEMPLATEDIR "templatedir"
#define CONFIG_TABSIZE "tabsize"
#define CONFIG_TAGFILE "tagfile"
#define CONFIG_TRANSLATORS "translators" // ### don't document for now
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 3615a84..55a455f 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -43,7 +43,6 @@
cppcodemarker.cpp
*/
-#include <qdebug.h>
#include "atom.h"
#include "cppcodemarker.h"
#include "node.h"
@@ -455,21 +454,6 @@ QString CppCodeMarker::functionEndRegExp(const QString& /* funcName */)
return "^\\}$";
}
-#if 0
- FastSection privateReimpFuncs(classe,
- "Private Reimplemented Functions",
- "private reimplemented function",
- "private reimplemented functions");
- FastSection protectedReimpFuncs(classe,
- "Protected Reimplemented Functions",
- "protected reimplemented function",
- "protected reimplemented functions");
- FastSection publicReimpFuncs(classe,
- "Public Reimplemented Functions",
- "public reimplemented function",
- "public reimplemented functions");
-#endif
-
QList<Section> CppCodeMarker::sections(const InnerNode *inner,
SynopsisStyle style,
Status status)
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index 804a302..40695c5 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -56,36 +56,36 @@ class CppCodeMarker : public CodeMarker
CppCodeMarker();
~CppCodeMarker();
- bool recognizeCode(const QString& code);
- bool recognizeExtension(const QString& ext);
- bool recognizeLanguage(const QString& lang);
- QString plainName(const Node *node);
- QString plainFullName(const Node *node, const Node *relative);
- QString markedUpCode(const QString& code,
- const Node *relative,
- const QString& dirPath);
- QString markedUpSynopsis(const Node *node,
- const Node *relative,
- SynopsisStyle style);
+ virtual bool recognizeCode(const QString& code);
+ virtual bool recognizeExtension(const QString& ext);
+ virtual bool recognizeLanguage(const QString& lang);
+ virtual QString plainName(const Node *node);
+ virtual QString plainFullName(const Node *node, const Node *relative);
+ virtual QString markedUpCode(const QString& code,
+ const Node *relative,
+ const QString& dirPath);
+ virtual QString markedUpSynopsis(const Node *node,
+ const Node *relative,
+ SynopsisStyle style);
#ifdef QDOC_QML
- QString markedUpQmlItem(const Node *node, bool summary);
+ virtual QString markedUpQmlItem(const Node *node, bool summary);
#endif
- QString markedUpName(const Node *node);
- QString markedUpFullName(const Node *node, const Node *relative);
- QString markedUpEnumValue(const QString &enumValue, const Node *relative);
- QString markedUpIncludes(const QStringList& includes);
- QString functionBeginRegExp(const QString& funcName);
- QString functionEndRegExp(const QString& funcName);
- QList<Section> sections(const InnerNode *innerNode,
- SynopsisStyle style,
- Status status);
- QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style,
- const Tree* tree);
- const Node* resolveTarget(const QString& target,
- const Tree* tree,
- const Node* relative,
- const Node* self = 0);
+ virtual QString markedUpName(const Node *node);
+ virtual QString markedUpFullName(const Node *node, const Node *relative);
+ virtual QString markedUpEnumValue(const QString &enumValue, const Node *relative);
+ virtual QString markedUpIncludes(const QStringList& includes);
+ virtual QString functionBeginRegExp(const QString& funcName);
+ virtual QString functionEndRegExp(const QString& funcName);
+ virtual QList<Section> sections(const InnerNode *innerNode,
+ SynopsisStyle style,
+ Status status);
+ virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
+ SynopsisStyle style,
+ const Tree* tree);
+ virtual const Node* resolveTarget(const QString& target,
+ const Tree* tree,
+ const Node* relative,
+ const Node* self = 0);
private:
QString addMarkUp(const QString& protectedCode,
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index a120e45..fce2553 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -47,7 +47,6 @@
#include <stdio.h>
#include <errno.h>
-#include <qdebug.h>
#include "codechunk.h"
#include "config.h"
@@ -258,18 +257,18 @@ QString CppCodeParser::language()
/*!
Returns a list of extensions for header files.
*/
-QString CppCodeParser::headerFileNameFilter()
+QStringList CppCodeParser::headerFileNameFilter()
{
- return "*.ch *.h *.h++ *.hh *.hpp *.hxx";
+ return QStringList() << "*.ch" << "*.h" << "*.h++" << "*.hh" << "*.hpp" << "*.hxx";
}
/*!
Returns a list of extensions for source files, i.e. not
header files.
*/
-QString CppCodeParser::sourceFileNameFilter()
+QStringList CppCodeParser::sourceFileNameFilter()
{
- return "*.c++ *.cc *.cpp *.cxx";
+ return QStringList() << "*.c++" << "*.cc" << "*.cpp" << "*.cxx" << "*.mm";
}
/*!
@@ -966,16 +965,6 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
.arg(COMMAND_REIMP).arg(node->name()));
}
-#if 0
- // Reimplemented functions now reported in separate sections.
- /*
- Note: Setting the access to Private hides the documentation,
- but setting the status to Internal makes the node available
- in the XML output when the WebXMLGenerator is used.
- */
- func->setAccess(Node::Private);
- func->setStatus(Node::Internal);
-#endif
func->setReimp(true);
}
else {
diff --git a/tools/qdoc3/cppcodeparser.h b/tools/qdoc3/cppcodeparser.h
index 55d9ddf..64e9119 100644
--- a/tools/qdoc3/cppcodeparser.h
+++ b/tools/qdoc3/cppcodeparser.h
@@ -69,8 +69,8 @@ class CppCodeParser : public CodeParser
virtual void initializeParser(const Config& config);
virtual void terminateParser();
virtual QString language();
- virtual QString headerFileNameFilter();
- virtual QString sourceFileNameFilter();
+ virtual QStringList headerFileNameFilter();
+ virtual QStringList sourceFileNameFilter();
virtual void parseHeaderFile(const Location& location,
const QString& filePath,
Tree *tree);
diff --git a/tools/qdoc3/cpptoqsconverter.cpp b/tools/qdoc3/cpptoqsconverter.cpp
deleted file mode 100644
index 1a44c16..0000000
--- a/tools/qdoc3/cpptoqsconverter.cpp
+++ /dev/null
@@ -1,415 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- cpptoqsconverter.cpp
-*/
-
-#include "config.h"
-#include "cpptoqsconverter.h"
-
-QT_BEGIN_NAMESPACE
-
-#define CONFIG_QUICK "quick"
-#define CONFIG_INDENTSIZE "indentsize"
-
-void setTabSize( int size );
-void setIndentSize( int size );
-int columnForIndex( const QString& t, int index );
-int indentForBottomLine( const QStringList& program, QChar typedIn );
-
-static QString balancedParens = "(?:[^()]+|\\([^()]*\\))*";
-
-QRegExp CppToQsConverter::qClassRegExp;
-QRegExp CppToQsConverter::addressOperatorRegExp;
-QRegExp CppToQsConverter::gulbrandsenRegExp;
-int CppToQsConverter::tabSize;
-
-ClassNode *CppToQsConverter::findClassNode( Tree *qsTree,
- const QString& qtName )
-{
- ClassNode *classe = (ClassNode *) qsTree->findNode( QStringList(qtName), Node::Class );
- if ( classe == 0 )
- classe = (ClassNode *) qsTree->findNode( QStringList(qtName.mid(1)), Node::Class );
- return classe;
-}
-
-QString CppToQsConverter::convertedDataType( Tree *qsTree,
- const QString& leftType,
- const QString& /* rightType */ )
-{
- QString s = leftType;
-
- if ( s.startsWith("const ") )
- s = s.mid( 6 );
- while ( s.endsWith("*") || s.endsWith("&") || s.endsWith(" ") )
- s.truncate( s.length() - 1 );
-
- switch ( s[0].unicode() ) {
- case 'Q':
- if ( s == "QCString" ) {
- return "String";
- } else {
- Node *node = findClassNode( qsTree, s );
- if ( node == 0 ) {
- return "";
- } else {
- return node->name();
- }
- }
- break;
- case 'b':
- if ( s == "bool" )
- return "Boolean";
- break;
- case 'c':
- if ( s == "char" ) {
- if ( leftType == "const char *" ) {
- return "String";
- } else {
- return "Number";
- }
- }
- break;
- case 'd':
- if ( s == "double" )
- return "Number";
- break;
- case 'f':
- if ( s == "float" )
- return "Number";
- case 'i':
- if ( s == "int" )
- return "Number";
- break;
- case 'l':
- if ( s == "long" || s == "long int" || s == "long long" ||
- s == "long long int" || s == "long double" )
- return "Number";
- break;
- case 's':
- if ( s == "short" || s == "short int" || s == "signed char" ||
- s == "signed short" || s == "signed short int" || s == "signed" ||
- s == "signed int" || s == "signed long" || s == "signed long int" )
- return "Number";
- break;
- case 'u':
- if ( s == "uchar" || s == "unsigned" || s == "unsigned char" ||
- s == "ushort" || s == "unsigned short" ||
- s == "unsigned short int" || s == "uint" || s == "unsigned int" ||
- s == "ulong" || s == "unsigned long" || s == "unsigned long int" )
- return "Number";
- break;
- case 'v':
- if ( s == "void" )
- return "";
- }
- return s;
-}
-
-QString CppToQsConverter::convertedCode( Tree *qsTree, const QString& code,
- const QSet<QString>& classesWithNoQ )
-{
- QString result;
- QStringList program;
- QStringList comments;
- int programWidth = 0;
-
- QStringList originalLines = code.split("\n");
- QStringList::ConstIterator ol = originalLines.begin();
- while ( ol != originalLines.end() ) {
- QString code = (*ol).trimmed();
- QString comment;
-
- int slashSlash = code.indexOf( "//" );
- if ( slashSlash != -1 ) {
- comment = code.mid( slashSlash );
- code.truncate( slashSlash );
- code = code.trimmed();
- }
-
- code = convertCodeLine( qsTree, program, code, classesWithNoQ );
- program.append( code );
-
- comment = convertComment( qsTree, comment, classesWithNoQ );
- comments.append( comment );
-
- int n = indentForBottomLine( program, QChar::Null );
- for ( int i = 0; i < n; i++ )
- program.last().prepend( " " );
-
- int width = columnForIndex( program.last(), program.last().length() );
- if ( !comment.isEmpty() && width > programWidth )
- programWidth = width;
- ++ol;
- }
-
- programWidth = ( (programWidth + (tabSize - 1) + 2) / tabSize ) * tabSize;
-
- QStringList::ConstIterator p = program.begin();
- QStringList::ConstIterator c = comments.begin();
- while ( c != comments.end() ) {
- if ( c != comments.begin() )
- result += "\n";
-
- if ( (*p).trimmed().isEmpty() ) {
- if ( !(*c).isEmpty() )
- result += *p;
- } else {
- result += *p;
- if ( !(*c).isEmpty() ) {
- int i = columnForIndex( *p, (*p).length() );
- while ( i++ < programWidth )
- result += " ";
- }
- }
- result += *c;
- ++p;
- ++c;
- }
- return result;
-}
-
-void CppToQsConverter::initialize( const Config& config )
-{
- qClassRegExp.setPattern( "\\bQ([A-Z][A-Za-z]+)\\b" );
- addressOperatorRegExp.setPattern( "([(\\s])[*&]([a-zA-Z])" );
- gulbrandsenRegExp.setPattern( "\\b::\\b|->" );
-
- tabSize = config.getInt( CONFIG_TABSIZE );
- setTabSize( tabSize );
-
- int size = config.getInt( CONFIG_QUICK + Config::dot + CONFIG_INDENTSIZE );
- if ( size > 0 )
- setIndentSize( size );
-}
-
-void CppToQsConverter::terminate()
-{
-}
-
-QString CppToQsConverter::convertCodeLine( Tree *qsTree,
- const QStringList& program,
- const QString& code,
- const QSet<QString>& classesWithNoQ )
-{
- static QString dataTypeFmt =
- "(?!return)(?:const\\b\\s*)?[A-Za-z_]+(?:\\s*[*&])?";
- static QRegExp funcPrototypeRegExp(
- "(" + dataTypeFmt + ")\\s*\\b([A-Z][a-zA-Z_0-9]*::)?"
- "([a-z][a-zA-Z_0-9]*)\\(([^);]*)(\\)?)(?:\\s*const)?" );
- static QRegExp paramRegExp(
- "^\\s*(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*)\\s*(,)?\\s*" );
- static QRegExp uninitVarRegExp(
- "(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*);" );
- static QRegExp eqVarRegExp(
- dataTypeFmt + "\\s*\\b([a-z][a-zA-Z_0-9]*)\\s*=(\\s*)(.*)" );
- static QRegExp ctorVarRegExp(
- "(" + dataTypeFmt + ")\\s*\\b([a-z][a-zA-Z_0-9]*)\\((.*)\\);" );
- static QRegExp qdebugRegExp(
- "q(?:Debug|Warning|Fatal)\\(\\s*(\"(?:\\\\.|[^\"])*\")\\s*"
- "(?:,\\s*(\\S(?:[^,]*\\S)?))?\\s*\\);" );
- static QRegExp coutRegExp( "c(?:out|err)\\b(.*);" );
- static QRegExp lshiftRegExp( "\\s*<<\\s*" );
- static QRegExp endlRegExp( "^endl$" );
-
- if ( code.isEmpty() || code == "{" || code == "}" )
- return code;
-
- QString result;
-
- if ( funcPrototypeRegExp.exactMatch(code) ) {
- QString returnType = funcPrototypeRegExp.cap( 1 );
- QString className = funcPrototypeRegExp.cap( 2 );
- QString funcName = funcPrototypeRegExp.cap( 3 );
- QString params = funcPrototypeRegExp.cap( 4 ).trimmed();
- bool toBeContinued = funcPrototypeRegExp.cap( 5 ).isEmpty();
- // ### unused
- Q_UNUSED(toBeContinued);
-
- className.replace( "::", "." );
-
- result = "function " + className + funcName + "(";
-
- if ( !params.isEmpty() && params != "void" ) {
- result += " ";
- int i = funcPrototypeRegExp.pos( 4 );
- while ( (i = paramRegExp.indexIn(code, i,
- QRegExp::CaretAtOffset)) != -1 ) {
- QString dataType = paramRegExp.cap( 1 );
- QString paramName = paramRegExp.cap( 2 );
- QString comma = paramRegExp.cap( 3 );
-
- result += paramName + " : " +
- convertedDataType( qsTree, dataType );
- if ( comma.isEmpty() )
- break;
- result += ", ";
- i += paramRegExp.matchedLength();
- }
- result += " ";
- }
-
- result += ")";
- returnType = convertedDataType( qsTree, returnType );
- if ( !returnType.isEmpty() )
- result += " : " + returnType;
- } else if ( uninitVarRegExp.exactMatch(code) ) {
- QString dataType = uninitVarRegExp.cap( 1 );
- QString varName = uninitVarRegExp.cap( 2 );
-
- result = "var " + varName;
- dataType = convertedDataType( qsTree, dataType );
- if ( !dataType.isEmpty() )
- result += " : " + dataType;
- result += ";";
- } else if ( eqVarRegExp.exactMatch(code) ) {
- QString varName = eqVarRegExp.cap( 1 );
- QString value = eqVarRegExp.cap( 3 );
-
- value = convertExpr( qsTree, value, classesWithNoQ );
- result += "var " + varName + " = " + value;
- } else if ( ctorVarRegExp.exactMatch(code) ) {
- QString dataType = ctorVarRegExp.cap( 1 );
- QString varName = ctorVarRegExp.cap( 2 );
- QString value = ctorVarRegExp.cap( 3 ).trimmed();
-
- result += "var " + varName + " = ";
-
- dataType = convertedDataType( qsTree, dataType );
- value = convertExpr( qsTree, value, classesWithNoQ );
-
- if ( dataType.isEmpty() || dataType == "String" ) {
- if ( value.contains(",") ) {
- result += "...";
- } else {
- result += value;
- }
- } else {
- result += "new " + dataType;
- if ( !value.isEmpty() )
- result += "( " + value + " )";
- }
- result += ";";
- } else if ( qdebugRegExp.exactMatch(code) ) {
- QString fmt = qdebugRegExp.cap( 1 );
- QString arg1 = qdebugRegExp.cap( 2 );
-
- result += "println ";
- int i = 0;
- while ( i < (int) fmt.length() ) {
- if ( fmt[i] == '%' ) {
- int percent = i;
- i++;
- while ( i < (int) fmt.length() &&
- QString("diouxXeEfFgGaAcsCSpn%\"").indexOf(fmt[i]) == -1 )
- i++;
- if ( fmt[i] == '%' ) {
- result += fmt[i++];
- } else if ( fmt[i] != '"' ) {
- if ( percent == 1 ) {
- result.truncate( result.length() - 1 );
- } else {
- result += "\" + ";
- }
- i++;
- if ( arg1.endsWith(".latin1()") )
- arg1.truncate( arg1.length() - 9 );
- result += arg1;
- if ( i == (int) fmt.length() - 1 ) {
- i++;
- } else {
- result += " + \"";
- }
- }
- } else {
- result += fmt[i++];
- }
- }
- result += ";";
- } else if ( coutRegExp.exactMatch(code) &&
- program.filter("var cout").isEmpty() ) {
- QStringList args = coutRegExp.cap(1).split(lshiftRegExp);
- args.replaceInStrings( endlRegExp, "\"\\n\"" );
- if ( args.last() == "\"\\n\"" ) {
- args.erase( args.end() - 1 );
- if ( args.isEmpty() )
- args << "\"\"";
- result += "println ";
- } else {
- result += "print ";
- }
- result += args.join( " + " ) + ";";
- } else {
- result = convertExpr( qsTree, code, classesWithNoQ );
- }
- return result;
-}
-
-QString CppToQsConverter::convertComment( Tree * /* qsTree */,
- const QString& comment,
- const QSet<QString>& classesWithNoQ )
-
-{
- QString result = comment;
-
- result.replace( "TRUE", "true" );
- result.replace( "FALSE", "false" );
- result.replace( addressOperatorRegExp, "\\1\\2" );
- result.replace( gulbrandsenRegExp, "." );
-
- int i = 0;
- while ( (i = result.indexOf(qClassRegExp, i)) != -1 ) {
- if ( classesWithNoQ.contains(qClassRegExp.cap(1)) )
- result.remove( i, 1 );
- i++;
- }
- return result;
-}
-
-QString CppToQsConverter::convertExpr( Tree *qsTree, const QString& expr,
- const QSet<QString>& classesWithNoQ )
-{
- // suboptimal
- return convertComment( qsTree, expr, classesWithNoQ );
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/dcfsection.cpp b/tools/qdoc3/dcfsection.cpp
deleted file mode 100644
index ea10dbf..0000000
--- a/tools/qdoc3/dcfsection.cpp
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-
-#include "dcfsection.h"
-#include "htmlgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-void appendDcfSubSection( DcfSection *dcfSect, const DcfSection& sub )
-{
- dcfSect->subsections.append( sub );
-}
-
-void appendDcfSubSections( DcfSection *dcfSect, const QList<DcfSection>& subs )
-{
- dcfSect->subsections += subs;
-}
-
-void generateDcfSubSections( QString indent, QTextStream& out, const DcfSection& sect )
-{
- QList<DcfSection>::const_iterator ss = sect.subsections.constBegin();
- while ( ss != sect.subsections.constEnd() ) {
- out << indent << "<section ref=\"" << HtmlGenerator::cleanRef(HtmlGenerator::protect((*ss).ref))
- << "\" title=\"" << HtmlGenerator::protect((*ss).title) << "\"";
- if ((*ss).keywords.isEmpty() && (*ss).subsections.isEmpty()) {
- out << "/>\n";
- } else {
- out << ">\n";
- QString indentIndent = indent + " ";
- QList<QPair<QString, QString> >::const_iterator k = (*ss).keywords.constBegin();
- while ( k != (*ss).keywords.constEnd() ) {
- out << indentIndent << "<keyword ref=\"" << HtmlGenerator::cleanRef((*k).second) << "\">"
- << HtmlGenerator::protect((*k).first) << "</keyword>\n";
- ++k;
- }
-
- generateDcfSubSections( indentIndent, out, *ss );
- out << indent << "</section>\n";
- }
- ++ss;
- }
- out.flush();
-}
-
-void generateDcfSections( const DcfSection& rootSect, const QString& fileName,
- const QString& /* category */ )
-{
- QFile file(fileName);
- if (!file.open(QFile::WriteOnly | QFile::Text))
- return ;
-
- QTextStream out(&file);
-
- QString icon = QFileInfo(fileName).baseName() + ".png";
-
- out << "<!DOCTYPE DCF>\n";
- out << "<DCF ref=\"" << HtmlGenerator::cleanRef(HtmlGenerator::protect(rootSect.ref));
- if (icon != "qmake.png")
- out << "\" icon=\"" << HtmlGenerator::protect(icon);
- out << "\" imagedir=\"../../gif\" title=\"" << HtmlGenerator::protect(rootSect.title) +
- "\">\n";
-
- generateDcfSubSections( "", out, rootSect );
-
- out << "</DCF>\n";
- out.flush();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/dcfsection.h b/tools/qdoc3/dcfsection.h
deleted file mode 100644
index 0318511..0000000
--- a/tools/qdoc3/dcfsection.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef DCFSECTION_H
-#define DCFSECTION_H
-
-#include <qlist.h>
-#include <qpair.h>
-#include <qstring.h>
-
-QT_BEGIN_NAMESPACE
-
-class QTextStream;
-
-struct DcfSection
-{
- QString title;
- QString ref;
- QList<QPair<QString, QString> > keywords;
- QList<DcfSection> subsections;
-};
-
-inline bool operator<( const DcfSection& s1, const DcfSection& s2 ) {
- QString title1 = s1.title;
- QString title2 = s2.title;
-
- // cheat with Q3 classes
- if (title1.startsWith("Q3"))
- title1.insert(1, '~');
- if (title2.startsWith("Q3"))
- title2.insert(1, '~');
-
- int delta = title1.toLower().compare( title2.toLower() );
- if ( delta == 0 ) {
- delta = title1.compare( title2 );
- if ( delta == 0 )
- delta = s1.ref.localeAwareCompare( s2.ref );
- }
- return delta < 0;
-}
-
-inline bool operator>( const DcfSection& s1, const DcfSection& s2 ) { return s2 < s1; }
-inline bool operator<=( const DcfSection& s1, const DcfSection& s2 ) { return !( s2 < s1 ); }
-inline bool operator>=( const DcfSection& s1, const DcfSection& s2 ) { return !( s1 < s2 ); }
-inline bool operator==( const DcfSection& s1, const DcfSection& s2 ) { return &s1 == &s2; }
-inline bool operator!=( const DcfSection& s1, const DcfSection& s2 ) { return !( s1 == s2 ); }
-
-void appendDcfSubSection(DcfSection *dcfSect, const DcfSection &sub);
-void appendDcfSubSections(DcfSection *dcfSect, const QList<DcfSection> &subs);
-void generateDcfSubSections(QString indent, QTextStream &out, const DcfSection &sect);
-void generateDcfSections(const DcfSection &rootSect, const QString& fileName,
- const QString& category );
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index b4a42ab..c7fc2a9 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -554,7 +554,7 @@ GuidMap* DitaXmlGenerator::lookupGuidMap(const QString& fileName)
\note The file generation is done in the base class,
PageGenerator::generateTree().
*/
-void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
+void DitaXmlGenerator::generateTree(const Tree *tree)
{
myTree = tree;
nonCompatClasses.clear();
@@ -2355,7 +2355,7 @@ void DitaXmlGenerator::generateTableOfContents(const Node* node,
/*!
zzz
Revised for the new doc format.
- Generates a table of contents begining at \a node.
+ Generates a table of contents beginning at \a node.
*/
void DitaXmlGenerator::generateTableOfContents(const Node* node,
CodeMarker* marker,
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index b13fa49..322f792 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -89,7 +89,7 @@ class DitaXmlGenerator : public PageGenerator
virtual void terminateGenerator();
virtual QString format();
virtual bool canHandleFormat(const QString& format);
- virtual void generateTree(const Tree* tree, CodeMarker* marker);
+ virtual void generateTree(const Tree *tree);
QString protectEnc(const QString& string);
static QString protect(const QString& string, const QString& encoding = "ISO-8859-1");
@@ -223,19 +223,19 @@ class DitaXmlGenerator : public PageGenerator
void generateStatus(const Node* node, CodeMarker* marker);
QString registerRef(const QString& ref);
- QString fileBase(const Node* node) const;
- QString fileName(const Node* node);
- void findAllClasses(const InnerNode* node);
- void findAllFunctions(const InnerNode* node);
- void findAllLegaleseTexts(const InnerNode* node);
- void findAllNamespaces(const InnerNode* node);
- void findAllSince(const InnerNode* node);
- static int hOffset(const Node* node);
- static bool isThreeColumnEnumValueTable(const Atom* atom);
- virtual QString getLink(const Atom* atom,
- const Node* relative,
- CodeMarker* marker,
- const Node** node);
+ QString fileBase(const Node *node) const;
+ QString fileName(const Node *node);
+ void findAllClasses(const InnerNode *node);
+ void findAllFunctions(const InnerNode *node);
+ void findAllLegaleseTexts(const InnerNode *node);
+ void findAllNamespaces(const InnerNode *node);
+ void findAllSince(const InnerNode *node);
+ static int hOffset(const Node *node);
+ static bool isThreeColumnEnumValueTable(const Atom *atom);
+ virtual QString getLink(const Atom *atom,
+ const Node *relative,
+ CodeMarker *marker,
+ const Node **node);
virtual void generateIndex(const QString& fileBase,
const QString& url,
const QString& title);
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 4b1bec8..9a154f8 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -48,7 +48,6 @@
#include "text.h"
#include "tokenizer.h"
#include <qdatetime.h>
-#include <qdebug.h>
#include <qfile.h>
#include <qfileinfo.h>
#include <qhash.h>
@@ -225,13 +224,13 @@ class DocPrivateExtra
QStringMap metaMap;
DocPrivateExtra()
- : granularity(Doc::Part) { }
+ : granularity(Doc::Part) { }
};
struct Shared // ### get rid of
{
Shared()
- : count(1) { }
+ : count(1) { }
void ref() { ++count; }
bool deref() { return (--count == 0); }
@@ -301,7 +300,7 @@ void DocPrivate::addAlso(const Text& also)
void DocPrivate::constructExtra()
{
if (extra == 0)
- extra = new DocPrivateExtra;
+ extra = new DocPrivateExtra;
}
bool DocPrivate::isEnumDocSimplifiable() const
@@ -350,7 +349,7 @@ class DocParser
private:
Location& location();
QString detailsUnknownCommand(const QSet<QString>& metaCommandSet,
- const QString& str);
+ const QString& str);
void checkExpiry(const QString& date);
void insertBaseName(const QString &baseName);
void insertTarget(const QString& target, bool keyword);
@@ -367,8 +366,8 @@ class DocParser
void appendToCode(const QString &code);
void startNewPara();
void enterPara(Atom::Type leftType = Atom::ParaLeft,
- Atom::Type rightType = Atom::ParaRight,
- const QString& string = "");
+ Atom::Type rightType = Atom::ParaRight,
+ const QString& string = "");
void leavePara();
void leaveValue();
void leaveValueList();
@@ -547,15 +546,15 @@ void DocParser::parse(const QString& source,
leavePara();
append(Atom::Code, getCode(CMD_CODE, marker));
break;
-#ifdef QDOC_QML
+#ifdef QDOC_QML
case CMD_QML:
leavePara();
- append(Atom::Qml, getCode(CMD_QML, marker));
+ append(Atom::Qml, getCode(CMD_QML, CodeMarker::markerForLanguage(QLatin1String("QML"))));
break;
case CMD_QMLTEXT:
append(Atom::QmlText);
break;
-#endif
+#endif
case CMD_CODELINE:
{
if (!quoting) {
@@ -1465,35 +1464,35 @@ void DocParser::checkExpiry(const QString& date)
QRegExp ymd("(\\d{4})(?:-(\\d{2})(?:-(\\d{2})))");
if (ymd.exactMatch(date)) {
- int y = ymd.cap(1).toInt();
- int m = ymd.cap(2).toInt();
- int d = ymd.cap(3).toInt();
-
- if (m == 0)
- m = 1;
- if (d == 0)
- d = 1;
- QDate expiryDate(y, m, d);
- if (expiryDate.isValid()) {
- int days = expiryDate.daysTo(QDate::currentDate());
- if (days == 0) {
- location().warning(tr("Documentation expires today"));
- }
+ int y = ymd.cap(1).toInt();
+ int m = ymd.cap(2).toInt();
+ int d = ymd.cap(3).toInt();
+
+ if (m == 0)
+ m = 1;
+ if (d == 0)
+ d = 1;
+ QDate expiryDate(y, m, d);
+ if (expiryDate.isValid()) {
+ int days = expiryDate.daysTo(QDate::currentDate());
+ if (days == 0) {
+ location().warning(tr("Documentation expires today"));
+ }
else if (days == 1) {
- location().warning(tr("Documentation expired yesterday"));
- }
+ location().warning(tr("Documentation expired yesterday"));
+ }
else if (days >= 2) {
- location().warning(tr("Documentation expired %1 days ago")
- .arg(days));
- }
- }
+ location().warning(tr("Documentation expired %1 days ago")
+ .arg(days));
+ }
+ }
else {
- location().warning(tr("Date '%1' invalid").arg(date));
- }
+ location().warning(tr("Date '%1' invalid").arg(date));
+ }
}
else {
- location().warning(tr("Date '%1' not in YYYY-MM-DD format")
- .arg(date));
+ location().warning(tr("Date '%1' not in YYYY-MM-DD format")
+ .arg(date));
}
}
@@ -1501,34 +1500,34 @@ void DocParser::insertBaseName(const QString &baseName)
{
priv->constructExtra();
if (currentSectioningUnit == priv->extra->sectioningUnit) {
- priv->extra->baseName = baseName;
+ priv->extra->baseName = baseName;
}
else {
- Atom *atom = priv->text.firstAtom();
- Atom *sectionLeft = 0;
+ Atom *atom = priv->text.firstAtom();
+ Atom *sectionLeft = 0;
- int delta = currentSectioningUnit - priv->extra->sectioningUnit;
+ int delta = currentSectioningUnit - priv->extra->sectioningUnit;
- while (atom != 0) {
- if (atom->type() == Atom::SectionLeft &&
- atom->string().toInt() == delta)
- sectionLeft = atom;
- atom = atom->next();
- }
- if (sectionLeft != 0)
- (void) new Atom(sectionLeft, Atom::BaseName, baseName);
+ while (atom != 0) {
+ if (atom->type() == Atom::SectionLeft &&
+ atom->string().toInt() == delta)
+ sectionLeft = atom;
+ atom = atom->next();
+ }
+ if (sectionLeft != 0)
+ (void) new Atom(sectionLeft, Atom::BaseName, baseName);
}
}
void DocParser::insertTarget(const QString &target, bool keyword)
{
if (targetMap.contains(target)) {
- location().warning(tr("Duplicate target name '%1'").arg(target));
- targetMap[target].warning(tr("(The previous occurrence is here)"));
+ location().warning(tr("Duplicate target name '%1'").arg(target));
+ targetMap[target].warning(tr("(The previous occurrence is here)"));
}
else {
- targetMap.insert(target, location());
- append(Atom::Target, target);
+ targetMap.insert(target, location());
+ append(Atom::Target, target);
priv->constructExtra();
if (keyword)
priv->extra->keywords.append(priv->text.lastAtom());
@@ -1540,8 +1539,8 @@ void DocParser::insertTarget(const QString &target, bool keyword)
void DocParser::include(const QString& fileName)
{
if (location().depth() > 16)
- location().fatal(tr("Too many nested '\\%1's")
- .arg(cmdName(CMD_INCLUDE)));
+ location().fatal(tr("Too many nested '\\%1's")
+ .arg(cmdName(CMD_INCLUDE)));
QString userFriendlyFilePath;
// ### use current directory?
@@ -1551,25 +1550,25 @@ void DocParser::include(const QString& fileName)
fileName,
userFriendlyFilePath);
if (filePath.isEmpty()) {
- location().warning(tr("Cannot find leaf file '%1'").arg(fileName));
+ location().warning(tr("Cannot find leaf file '%1'").arg(fileName));
}
else {
- QFile inFile(filePath);
- if (!inFile.open(QFile::ReadOnly)) {
- location().warning(tr("Cannot open leaf file '%1'")
- .arg(userFriendlyFilePath));
- }
+ QFile inFile(filePath);
+ if (!inFile.open(QFile::ReadOnly)) {
+ location().warning(tr("Cannot open leaf file '%1'")
+ .arg(userFriendlyFilePath));
+ }
else {
- location().push(userFriendlyFilePath);
+ location().push(userFriendlyFilePath);
- QTextStream inStream(&inFile);
- QString includedStuff = inStream.readAll();
- inFile.close();
+ QTextStream inStream(&inFile);
+ QString includedStuff = inStream.readAll();
+ inFile.close();
- in.insert(pos, includedStuff);
- len = in.length();
- openedInputs.push(pos + includedStuff.length());
- }
+ in.insert(pos, includedStuff);
+ len = in.length();
+ openedInputs.push(pos + includedStuff.length());
+ }
}
}
@@ -1579,29 +1578,29 @@ void DocParser::startFormat(const QString& format, int cmd)
QMap<int, QString>::ConstIterator f = pendingFormats.begin();
while (f != pendingFormats.end()) {
- if (*f == format) {
- location().warning(tr("Cannot nest '\\%1' commands")
- .arg(cmdName(cmd)));
- return;
- }
- ++f;
+ if (*f == format) {
+ location().warning(tr("Cannot nest '\\%1' commands")
+ .arg(cmdName(cmd)));
+ return;
+ }
+ ++f;
}
append(Atom::FormattingLeft, format);
if (isLeftBraceAhead()) {
- skipSpacesOrOneEndl();
- pendingFormats.insert(braceDepth, format);
- ++braceDepth;
- ++pos;
+ skipSpacesOrOneEndl();
+ pendingFormats.insert(braceDepth, format);
+ ++braceDepth;
+ ++pos;
}
else {
- append(Atom::String, getArgument());
- append(Atom::FormattingRight, format);
- if (format == ATOM_FORMATTING_INDEX && indexStartedPara) {
- skipAllSpaces();
- indexStartedPara = false;
- }
+ append(Atom::String, getArgument());
+ append(Atom::FormattingRight, format);
+ if (format == ATOM_FORMATTING_INDEX && indexStartedPara) {
+ skipAllSpaces();
+ indexStartedPara = false;
+ }
}
}
@@ -1612,37 +1611,37 @@ bool DocParser::openCommand(int cmd)
if (cmd != CMD_LINK) {
if (outer == CMD_LIST) {
- ok = (cmd == CMD_FOOTNOTE || cmd == CMD_LIST);
+ ok = (cmd == CMD_FOOTNOTE || cmd == CMD_LIST);
}
else if (outer == CMD_ABSTRACT) {
- ok = (cmd == CMD_LIST ||
+ ok = (cmd == CMD_LIST ||
cmd == CMD_QUOTATION ||
cmd == CMD_TABLE);
}
else if (outer == CMD_SIDEBAR) {
- ok = (cmd == CMD_LIST ||
+ ok = (cmd == CMD_LIST ||
cmd == CMD_QUOTATION ||
cmd == CMD_SIDEBAR);
}
else if (outer == CMD_QUOTATION) {
- ok = (cmd == CMD_LIST);
+ ok = (cmd == CMD_LIST);
}
else if (outer == CMD_TABLE) {
- ok = (cmd == CMD_LIST ||
+ ok = (cmd == CMD_LIST ||
cmd == CMD_FOOTNOTE ||
cmd == CMD_QUOTATION);
}
else if (outer == CMD_FOOTNOTE || outer == CMD_LINK) {
- ok = false;
+ ok = false;
}
}
if (ok) {
- openedCommands.push(cmd);
+ openedCommands.push(cmd);
}
else {
- location().warning(tr("Cannot use '\\%1' within '\\%2'")
- .arg(cmdName(cmd)).arg(cmdName(outer)));
+ location().warning(tr("Cannot use '\\%1' within '\\%2'")
+ .arg(cmdName(cmd)).arg(cmdName(outer)));
}
return ok;
}
@@ -1650,33 +1649,33 @@ bool DocParser::openCommand(int cmd)
bool DocParser::closeCommand(int endCmd)
{
if (endCmdFor(openedCommands.top()) == endCmd && openedCommands.size() > 1) {
- openedCommands.pop();
- return true;
+ openedCommands.pop();
+ return true;
}
else {
- bool contains = false;
- QStack<int> opened2 = openedCommands;
- while (opened2.size() > 1) {
- if (endCmdFor(opened2.top()) == endCmd) {
- contains = true;
- break;
- }
- opened2.pop();
- }
-
- if (contains) {
- while (endCmdFor(openedCommands.top()) != endCmd && openedCommands.size() > 1) {
- location().warning(tr("Missing '\\%1' before '\\%2'")
- .arg(endCmdName(openedCommands.top()))
- .arg(cmdName(endCmd)));
- openedCommands.pop();
- }
- }
+ bool contains = false;
+ QStack<int> opened2 = openedCommands;
+ while (opened2.size() > 1) {
+ if (endCmdFor(opened2.top()) == endCmd) {
+ contains = true;
+ break;
+ }
+ opened2.pop();
+ }
+
+ if (contains) {
+ while (endCmdFor(openedCommands.top()) != endCmd && openedCommands.size() > 1) {
+ location().warning(tr("Missing '\\%1' before '\\%2'")
+ .arg(endCmdName(openedCommands.top()))
+ .arg(cmdName(endCmd)));
+ openedCommands.pop();
+ }
+ }
else {
- location().warning(tr("Unexpected '\\%1'")
- .arg(cmdName(endCmd)));
- }
- return false;
+ location().warning(tr("Unexpected '\\%1'")
+ .arg(cmdName(endCmd)));
+ }
+ return false;
}
}
@@ -1685,39 +1684,32 @@ void DocParser::startSection(Doc::SectioningUnit unit, int cmd)
leaveValueList();
if (currentSectioningUnit == Doc::Book) {
-#if 0
- // mws didn't think this was necessary.
- if (unit > Doc::Section1)
- location().warning(tr("Unexpected '\\%1' without '\\%2'")
- .arg(cmdName(cmd))
- .arg(cmdName(CMD_SECTION1)));
-#endif
- currentSectioningUnit = (Doc::SectioningUnit) (unit - 1);
- priv->constructExtra();
- priv->extra->sectioningUnit = currentSectioningUnit;
+ currentSectioningUnit = (Doc::SectioningUnit) (unit - 1);
+ priv->constructExtra();
+ priv->extra->sectioningUnit = currentSectioningUnit;
}
if (unit <= priv->extra->sectioningUnit) {
- location().warning(tr("Unexpected '\\%1' in this documentation")
- .arg(cmdName(cmd)));
+ location().warning(tr("Unexpected '\\%1' in this documentation")
+ .arg(cmdName(cmd)));
}
else if (unit - currentSectioningUnit > 1) {
- location().warning(tr("Unexpected '\\%1' at this point")
- .arg(cmdName(cmd)));
+ location().warning(tr("Unexpected '\\%1' at this point")
+ .arg(cmdName(cmd)));
}
else {
- if (currentSectioningUnit >= unit)
- endSection(unit, cmd);
+ if (currentSectioningUnit >= unit)
+ endSection(unit, cmd);
- int delta = unit - priv->extra->sectioningUnit;
- append(Atom::SectionLeft, QString::number(delta));
+ int delta = unit - priv->extra->sectioningUnit;
+ append(Atom::SectionLeft, QString::number(delta));
priv->constructExtra();
priv->extra->tableOfContents.append(priv->text.lastAtom());
priv->extra->tableOfContentsLevels.append(unit);
- enterPara(Atom::SectionHeadingLeft,
+ enterPara(Atom::SectionHeadingLeft,
Atom::SectionHeadingRight,
QString::number(delta));
- currentSectioningUnit = unit;
+ currentSectioningUnit = unit;
}
}
@@ -1726,20 +1718,20 @@ void DocParser::endSection(int unit, int endCmd)
leavePara();
if (unit < priv->extra->sectioningUnit) {
- location().warning(tr("Unexpected '\\%1' in this documentation")
- .arg(cmdName(endCmd)));
+ location().warning(tr("Unexpected '\\%1' in this documentation")
+ .arg(cmdName(endCmd)));
}
else if (unit > currentSectioningUnit) {
- location().warning(tr("Unexpected '\\%1' at this point")
- .arg(cmdName(endCmd)));
+ location().warning(tr("Unexpected '\\%1' at this point")
+ .arg(cmdName(endCmd)));
}
else {
- while (currentSectioningUnit >= unit) {
- int delta = currentSectioningUnit - priv->extra->sectioningUnit;
- append(Atom::SectionRight, QString::number(delta));
- currentSectioningUnit =
- (Doc::SectioningUnit) (currentSectioningUnit - 1);
- }
+ while (currentSectioningUnit >= unit) {
+ int delta = currentSectioningUnit - priv->extra->sectioningUnit;
+ append(Atom::SectionRight, QString::number(delta));
+ currentSectioningUnit =
+ (Doc::SectioningUnit) (currentSectioningUnit - 1);
+ }
}
}
@@ -1828,10 +1820,10 @@ void DocParser::appendChar(QChar ch)
void DocParser::appendWord(const QString &word)
{
if (priv->text.lastAtom()->type() != Atom::String) {
- append(Atom::String, word);
+ append(Atom::String, word);
}
else
- priv->text.lastAtom()->appendString(word);
+ priv->text.lastAtom()->appendString(word);
}
void DocParser::appendToCode(const QString& markedCode)
@@ -1839,10 +1831,10 @@ void DocParser::appendToCode(const QString& markedCode)
Atom::Type lastType = priv->text.lastAtom()->type();
#ifdef QDOC_QML
if (lastType != Atom::Qml)
- append(Atom::Qml);
+ append(Atom::Qml);
#else
if (lastType != Atom::Code)
- append(Atom::Code);
+ append(Atom::Code);
#endif
priv->text.lastAtom()->appendString(markedCode);
}
@@ -1860,47 +1852,44 @@ void DocParser::enterPara(Atom::Type leftType,
if (paraState == OutsidePara) {
if (priv->text.lastAtom()->type() != Atom::ListItemLeft)
leaveValueList();
- append(leftType, string);
- indexStartedPara = false;
- pendingParaLeftType = leftType;
- pendingParaRightType = rightType;
- pendingParaString = string;
- if (
-#if 0
- leftType == Atom::BriefLeft ||
-#endif
- leftType == Atom::SectionHeadingLeft) {
- paraState = InsideSingleLinePara;
- }
+ append(leftType, string);
+ indexStartedPara = false;
+ pendingParaLeftType = leftType;
+ pendingParaRightType = rightType;
+ pendingParaString = string;
+ if (
+ leftType == Atom::SectionHeadingLeft) {
+ paraState = InsideSingleLinePara;
+ }
else {
- paraState = InsideMultiLinePara;
- }
- skipSpacesOrOneEndl();
+ paraState = InsideMultiLinePara;
+ }
+ skipSpacesOrOneEndl();
}
}
void DocParser::leavePara()
{
if (paraState != OutsidePara) {
- if (!pendingFormats.isEmpty()) {
- location().warning(tr("Missing '}'"));
- pendingFormats.clear();
- }
-
- if (priv->text.lastAtom()->type() == pendingParaLeftType) {
- priv->text.stripLastAtom();
- }
+ if (!pendingFormats.isEmpty()) {
+ location().warning(tr("Missing '}'"));
+ pendingFormats.clear();
+ }
+
+ if (priv->text.lastAtom()->type() == pendingParaLeftType) {
+ priv->text.stripLastAtom();
+ }
else {
- if (priv->text.lastAtom()->type() == Atom::String &&
- priv->text.lastAtom()->string().endsWith(" ")) {
- priv->text.lastAtom()->chopString();
- }
- append(pendingParaRightType, pendingParaString);
- }
- paraState = OutsidePara;
- indexStartedPara = false;
- pendingParaRightType = Atom::Nop;
- pendingParaString = "";
+ if (priv->text.lastAtom()->type() == Atom::String &&
+ priv->text.lastAtom()->string().endsWith(" ")) {
+ priv->text.lastAtom()->chopString();
+ }
+ append(pendingParaRightType, pendingParaString);
+ }
+ paraState = OutsidePara;
+ indexStartedPara = false;
+ pendingParaRightType = Atom::Nop;
+ pendingParaString = "";
}
}
@@ -1908,13 +1897,13 @@ void DocParser::leaveValue()
{
leavePara();
if (openedLists.isEmpty()) {
- openedLists.push(OpenedList(OpenedList::Value));
- append(Atom::ListLeft, ATOM_LIST_VALUE);
+ openedLists.push(OpenedList(OpenedList::Value));
+ append(Atom::ListLeft, ATOM_LIST_VALUE);
}
else {
if (priv->text.lastAtom()->type() == Atom::Nop)
priv->text.stripLastAtom();
- append(Atom::ListItemRight, ATOM_LIST_VALUE);
+ append(Atom::ListItemRight, ATOM_LIST_VALUE);
}
}
@@ -1925,9 +1914,9 @@ void DocParser::leaveValueList()
(openedLists.top().style() == OpenedList::Value)) {
if (priv->text.lastAtom()->type() == Atom::Nop)
priv->text.stripLastAtom();
- append(Atom::ListItemRight, ATOM_LIST_VALUE);
- append(Atom::ListRight, ATOM_LIST_VALUE);
- openedLists.pop();
+ append(Atom::ListItemRight, ATOM_LIST_VALUE);
+ append(Atom::ListRight, ATOM_LIST_VALUE);
+ openedLists.pop();
}
}
@@ -1958,43 +1947,43 @@ void DocParser::expandMacro(const QString &name,
int numParams)
{
if (numParams == 0) {
- append(Atom::RawString, def);
+ append(Atom::RawString, def);
}
else {
- QStringList args;
- QString rawString;
+ QStringList args;
+ QString rawString;
- for (int i = 0; i < numParams; i++) {
- if (numParams == 1 || isLeftBraceAhead()) {
- args << getArgument(true);
- }
+ for (int i = 0; i < numParams; i++) {
+ if (numParams == 1 || isLeftBraceAhead()) {
+ args << getArgument(true);
+ }
else {
- location().warning(tr("Macro '\\%1' invoked with too few"
- " arguments (expected %2, got %3)")
- .arg(name).arg(numParams).arg(i));
- break;
- }
- }
-
- int j = 0;
- while (j < def.size()) {
- int paramNo;
- if ((def[j] == '\\') && (j < def.size() - 1) &&
+ location().warning(tr("Macro '\\%1' invoked with too few"
+ " arguments (expected %2, got %3)")
+ .arg(name).arg(numParams).arg(i));
+ break;
+ }
+ }
+
+ int j = 0;
+ while (j < def.size()) {
+ int paramNo;
+ if ((def[j] == '\\') && (j < def.size() - 1) &&
((paramNo = def[j + 1].digitValue()) >= 1) &&
(paramNo <= numParams)) {
- if (!rawString.isEmpty()) {
- append(Atom::RawString, rawString);
- rawString = "";
- }
- append(Atom::String, args[paramNo - 1]);
- j += 2;
- }
+ if (!rawString.isEmpty()) {
+ append(Atom::RawString, rawString);
+ rawString = "";
+ }
+ append(Atom::String, args[paramNo - 1]);
+ j += 2;
+ }
else {
- rawString += def[j++];
- }
- }
- if (!rawString.isEmpty())
- append(Atom::RawString, rawString);
+ rawString += def[j++];
+ }
+ }
+ if (!rawString.isEmpty())
+ append(Atom::RawString, rawString);
}
}
@@ -2003,29 +1992,29 @@ Doc::SectioningUnit DocParser::getSectioningUnit()
QString name = getOptionalArgument();
if (name == "part") {
- return Doc::Part;
+ return Doc::Part;
}
else if (name == "chapter") {
- return Doc::Chapter;
+ return Doc::Chapter;
}
else if (name == "section1") {
- return Doc::Section1;
+ return Doc::Section1;
}
else if (name == "section2") {
- return Doc::Section2;
+ return Doc::Section2;
}
else if (name == "section3") {
- return Doc::Section3;
+ return Doc::Section3;
}
else if (name == "section4") {
- return Doc::Section4;
+ return Doc::Section4;
}
else if (name.isEmpty()) {
- return Doc::Section4;
+ return Doc::Section4;
}
else {
- location().warning(tr("Invalid sectioning unit '%1'").arg(name));
- return Doc::Book;
+ location().warning(tr("Invalid sectioning unit '%1'").arg(name));
+ return Doc::Book;
}
}
@@ -2042,115 +2031,115 @@ QString DocParser::getArgument(bool verbatim)
Typically, an argument ends at the next white-space. However,
braces can be used to group words:
- {a few words}
+ {a few words}
Also, opening and closing parentheses have to match. Thus,
- printf("%d\n", x)
+ printf("%d\n", x)
is an argument too, although it contains spaces. Finally,
trailing punctuation is not included in an argument, nor is 's.
*/
if (pos < (int) in.length() && in[pos] == '{') {
- pos++;
- while (pos < (int) in.length() && delimDepth >= 0) {
- switch (in[pos].unicode()) {
- case '{':
- delimDepth++;
- arg += "{";
- pos++;
- break;
- case '}':
- delimDepth--;
- if (delimDepth >= 0)
- arg += "}";
- pos++;
- break;
- case '\\':
- if (verbatim) {
- arg += in[pos];
- pos++;
- }
+ pos++;
+ while (pos < (int) in.length() && delimDepth >= 0) {
+ switch (in[pos].unicode()) {
+ case '{':
+ delimDepth++;
+ arg += "{";
+ pos++;
+ break;
+ case '}':
+ delimDepth--;
+ if (delimDepth >= 0)
+ arg += "}";
+ pos++;
+ break;
+ case '\\':
+ if (verbatim) {
+ arg += in[pos];
+ pos++;
+ }
else {
- pos++;
- if (pos < (int) in.length()) {
- if (in[pos].isLetterOrNumber())
- break;
- arg += in[pos];
- if (in[pos].isSpace()) {
- skipAllSpaces();
- }
+ pos++;
+ if (pos < (int) in.length()) {
+ if (in[pos].isLetterOrNumber())
+ break;
+ arg += in[pos];
+ if (in[pos].isSpace()) {
+ skipAllSpaces();
+ }
else {
- pos++;
- }
- }
- }
- break;
- default:
- arg += in[pos];
- pos++;
- }
- }
- if (delimDepth > 0)
- location().warning(tr("Missing '}'"));
+ pos++;
+ }
+ }
+ }
+ break;
+ default:
+ arg += in[pos];
+ pos++;
+ }
+ }
+ if (delimDepth > 0)
+ location().warning(tr("Missing '}'"));
}
else {
- while (pos < in.length() &&
+ while (pos < in.length() &&
((delimDepth > 0) ||
((delimDepth == 0) &&
!in[pos].isSpace()))) {
- switch (in[pos].unicode()) {
- case '(':
- case '[':
- case '{':
- delimDepth++;
- arg += in[pos];
- pos++;
- break;
- case ')':
- case ']':
- case '}':
- delimDepth--;
- if (pos == startPos || delimDepth >= 0) {
- arg += in[pos];
- pos++;
- }
- break;
- case '\\':
- if (verbatim) {
- arg += in[pos];
- pos++;
- }
+ switch (in[pos].unicode()) {
+ case '(':
+ case '[':
+ case '{':
+ delimDepth++;
+ arg += in[pos];
+ pos++;
+ break;
+ case ')':
+ case ']':
+ case '}':
+ delimDepth--;
+ if (pos == startPos || delimDepth >= 0) {
+ arg += in[pos];
+ pos++;
+ }
+ break;
+ case '\\':
+ if (verbatim) {
+ arg += in[pos];
+ pos++;
+ }
else {
- pos++;
- if (pos < (int) in.length()) {
- if (in[pos].isLetterOrNumber())
- break;
- arg += in[pos];
- if (in[pos].isSpace()) {
- skipAllSpaces();
- }
+ pos++;
+ if (pos < (int) in.length()) {
+ if (in[pos].isLetterOrNumber())
+ break;
+ arg += in[pos];
+ if (in[pos].isSpace()) {
+ skipAllSpaces();
+ }
else {
- pos++;
- }
- }
- }
- break;
- default:
- arg += in[pos];
- pos++;
- }
- }
- if ((arg.length() > 1) &&
+ pos++;
+ }
+ }
+ }
+ break;
+ default:
+ arg += in[pos];
+ pos++;
+ }
+ }
+ if ((arg.length() > 1) &&
(QString(".,:;!?").indexOf(in[pos - 1]) != -1) &&
!arg.endsWith("...")) {
- arg.truncate(arg.length() - 1);
- pos--;
- }
- if (arg.length() > 2 && in.mid(pos - 2, 2) == "'s") {
- arg.truncate(arg.length() - 2);
- pos -= 2;
- }
+ arg.truncate(arg.length() - 1);
+ pos--;
+ }
+ if (arg.length() > 2 && in.mid(pos - 2, 2) == "'s") {
+ arg.truncate(arg.length() - 2);
+ pos -= 2;
+ }
}
return arg.simplified();
}
@@ -2159,11 +2148,11 @@ QString DocParser::getOptionalArgument()
{
skipSpacesOrOneEndl();
if (pos + 1 < (int) in.length() && in[pos] == '\\' &&
- in[pos + 1].isLetterOrNumber()) {
- return "";
+ in[pos + 1].isLetterOrNumber()) {
+ return "";
}
else {
- return getArgument();
+ return getArgument();
}
}
@@ -2226,7 +2215,7 @@ QString DocParser::getMetaCommandArgument(const QString &cmdStr)
else if (in.at(pos) == ')')
--parenDepth;
- ++pos;
+ ++pos;
}
if (pos == in.size() && parenDepth > 0) {
pos = begin;
@@ -2246,12 +2235,12 @@ QString DocParser::getUntilEnd(int cmd)
int end = rx.indexIn(in, pos);
if (end == -1) {
- location().warning(tr("Missing '\\%1'").arg(cmdName(endCmd)));
- pos = in.length();
+ location().warning(tr("Missing '\\%1'").arg(cmdName(endCmd)));
+ pos = in.length();
}
else {
- t = in.mid(pos, end - pos);
- pos = end + rx.matchedLength();
+ t = in.mid(pos, end - pos);
+ pos = end + rx.matchedLength();
}
return t;
}
@@ -2263,7 +2252,8 @@ QString DocParser::getCode(int cmd, CodeMarker *marker)
if (indent < minIndent)
minIndent = indent;
code = unindent(minIndent, code);
- marker = CodeMarker::markerForCode(code);
+ if (!marker)
+ marker = CodeMarker::markerForCode(code);
return marker->markedUpCode(code, 0, "");
}
@@ -2273,12 +2263,6 @@ QString DocParser::getCode(int cmd, CodeMarker *marker)
QString DocParser::getUnmarkedCode(int cmd)
{
QString code = getUntilEnd(cmd);
-#if 0
- int indent = indentLevel(code);
- if (indent < minIndent)
- minIndent = indent;
- code = unindent(minIndent, code);
-#endif
return code;
}
@@ -2287,9 +2271,9 @@ bool DocParser::isBlankLine()
int i = pos;
while (i < len && in[i].isSpace()) {
- if (in[i] == '\n')
- return true;
- i++;
+ if (in[i] == '\n')
+ return true;
+ i++;
}
return false;
}
@@ -2300,10 +2284,10 @@ bool DocParser::isLeftBraceAhead()
int i = pos;
while (i < len && in[i].isSpace() && numEndl < 2) {
- // ### bug with '\\'
- if (in[i] == '\n')
- numEndl++;
- i++;
+ // ### bug with '\\'
+ if (in[i] == '\n')
+ numEndl++;
+ i++;
}
return numEndl < 2 && i < len && in[i] == '{';
}
@@ -2313,31 +2297,31 @@ void DocParser::skipSpacesOnLine()
while ((pos < in.length()) &&
in[pos].isSpace() &&
(in[pos].unicode() != '\n'))
- ++pos;
+ ++pos;
}
void DocParser::skipSpacesOrOneEndl()
{
int firstEndl = -1;
while (pos < (int) in.length() && in[pos].isSpace()) {
- QChar ch = in[pos];
- if (ch == '\n') {
- if (firstEndl == -1) {
- firstEndl = pos;
- }
+ QChar ch = in[pos];
+ if (ch == '\n') {
+ if (firstEndl == -1) {
+ firstEndl = pos;
+ }
else {
- pos = firstEndl;
- break;
- }
- }
- pos++;
+ pos = firstEndl;
+ break;
+ }
+ }
+ pos++;
}
}
void DocParser::skipAllSpaces()
{
while (pos < len && in[pos].isSpace())
- pos++;
+ pos++;
}
void DocParser::skipToNextPreprocessorCommand()
@@ -2348,62 +2332,62 @@ void DocParser::skipToNextPreprocessorCommand()
int end = rx.indexIn(in, pos + 1); // ### + 1 necessary?
if (end == -1)
- pos = in.length();
+ pos = in.length();
else
- pos = end;
+ pos = end;
}
int DocParser::endCmdFor(int cmd)
{
switch (cmd) {
case CMD_ABSTRACT:
- return CMD_ENDABSTRACT;
+ return CMD_ENDABSTRACT;
case CMD_BADCODE:
- return CMD_ENDCODE;
+ return CMD_ENDCODE;
case CMD_CHAPTER:
- return CMD_ENDCHAPTER;
+ return CMD_ENDCHAPTER;
case CMD_CODE:
- return CMD_ENDCODE;
+ return CMD_ENDCODE;
#ifdef QDOC_QML
case CMD_QML:
- return CMD_ENDQML;
+ return CMD_ENDQML;
case CMD_QMLTEXT:
- return CMD_ENDQMLTEXT;
+ return CMD_ENDQMLTEXT;
#endif
case CMD_FOOTNOTE:
- return CMD_ENDFOOTNOTE;
+ return CMD_ENDFOOTNOTE;
case CMD_LEGALESE:
return CMD_ENDLEGALESE;
case CMD_LINK:
return CMD_ENDLINK;
case CMD_LIST:
- return CMD_ENDLIST;
+ return CMD_ENDLIST;
case CMD_NEWCODE:
return CMD_ENDCODE;
case CMD_OLDCODE:
return CMD_NEWCODE;
case CMD_OMIT:
- return CMD_ENDOMIT;
+ return CMD_ENDOMIT;
case CMD_PART:
- return CMD_ENDPART;
+ return CMD_ENDPART;
case CMD_QUOTATION:
- return CMD_ENDQUOTATION;
+ return CMD_ENDQUOTATION;
case CMD_RAW:
return CMD_ENDRAW;
case CMD_SECTION1:
- return CMD_ENDSECTION1;
+ return CMD_ENDSECTION1;
case CMD_SECTION2:
- return CMD_ENDSECTION2;
+ return CMD_ENDSECTION2;
case CMD_SECTION3:
- return CMD_ENDSECTION3;
+ return CMD_ENDSECTION3;
case CMD_SECTION4:
- return CMD_ENDSECTION4;
+ return CMD_ENDSECTION4;
case CMD_SIDEBAR:
- return CMD_ENDSIDEBAR;
+ return CMD_ENDSIDEBAR;
case CMD_TABLE:
- return CMD_ENDTABLE;
+ return CMD_ENDTABLE;
default:
- return cmd;
+ return cmd;
}
}
@@ -2457,14 +2441,14 @@ int DocParser::indentLevel(const QString& str)
int column = 0;
for (int i = 0; i < (int) str.length(); i++) {
- if (str[i] == '\n') {
- column = 0;
- }
+ if (str[i] == '\n') {
+ column = 0;
+ }
else {
- if (str[i] != ' ' && column < minIndent)
- minIndent = column;
- column++;
- }
+ if (str[i] != ' ' && column < minIndent)
+ minIndent = column;
+ column++;
+ }
}
return minIndent;
}
@@ -2472,21 +2456,21 @@ int DocParser::indentLevel(const QString& str)
QString DocParser::unindent(int level, const QString& str)
{
if (level == 0)
- return str;
+ return str;
QString t;
int column = 0;
for (int i = 0; i < (int) str.length(); i++) {
if (str[i] == QLatin1Char('\n')) {
- t += '\n';
- column = 0;
- }
+ t += '\n';
+ column = 0;
+ }
else {
- if (column >= level)
- t += str[i];
- column++;
- }
+ if (column >= level)
+ t += str[i];
+ column++;
+ }
}
return t;
}
@@ -2524,15 +2508,15 @@ Doc::Doc(const Doc& doc)
Doc::~Doc()
{
if (priv && priv->deref())
- delete priv;
+ delete priv;
}
Doc &Doc::operator=(const Doc& doc)
{
if (doc.priv)
- doc.priv->ref();
+ doc.priv->ref();
if (priv && priv->deref())
- delete priv;
+ delete priv;
priv = doc.priv;
return *this;
}
@@ -2699,18 +2683,18 @@ Text Doc::trimmedBriefText(const QString &className) const
whats = w.join(" ");
if (whats.endsWith("."))
- whats.truncate(whats.length() - 1);
+ whats.truncate(whats.length() - 1);
if (whats.isEmpty()) {
- location().warning(
+ location().warning(
tr("Nonstandard wording in '\\%1' text for '%2' (expected more text)")
.arg(COMMAND_BRIEF).arg(className));
- standardWording = false;
+ standardWording = false;
}
else
- whats[0] = whats[0].toUpper();
+ whats[0] = whats[0].toUpper();
- // ### move this once \brief is abolished for properties
+ // ### move this once \brief is abolished for properties
if (standardWording)
resultText << whats;
}
@@ -2720,29 +2704,29 @@ Text Doc::trimmedBriefText(const QString &className) const
Text Doc::legaleseText() const
{
if (priv == 0 || !priv->hasLegalese)
- return Text();
+ return Text();
else
- return body().subText(Atom::LegaleseLeft, Atom::LegaleseRight);
+ return body().subText(Atom::LegaleseLeft, Atom::LegaleseRight);
}
const QString& Doc::baseName() const
{
static QString null;
if (priv == 0 || priv->extra == 0) {
- return null;
+ return null;
}
else {
- return priv->extra->baseName;
+ return priv->extra->baseName;
}
}
Doc::SectioningUnit Doc::granularity() const
{
if (priv == 0 || priv->extra == 0) {
- return DocPrivateExtra().granularity;
+ return DocPrivateExtra().granularity;
}
else {
- return priv->extra->granularity;
+ return priv->extra->granularity;
}
}
@@ -2838,80 +2822,80 @@ void Doc::initialize(const Config& config)
QSet<QString> commands = config.subVars(CONFIG_ALIAS);
QSet<QString>::ConstIterator c = commands.begin();
while (c != commands.end()) {
- QString alias = config.getString(CONFIG_ALIAS + Config::dot + *c);
- if (reverseAliasMap.contains(alias)) {
- config.lastLocation().warning(tr("Command name '\\%1' cannot stand"
- " for both '\\%2' and '\\%3'")
- .arg(alias)
- .arg(reverseAliasMap[alias])
- .arg(*c));
- }
+ QString alias = config.getString(CONFIG_ALIAS + Config::dot + *c);
+ if (reverseAliasMap.contains(alias)) {
+ config.lastLocation().warning(tr("Command name '\\%1' cannot stand"
+ " for both '\\%2' and '\\%3'")
+ .arg(alias)
+ .arg(reverseAliasMap[alias])
+ .arg(*c));
+ }
else {
- reverseAliasMap.insert(alias, *c);
- }
- aliasMap()->insert(*c, alias);
- ++c;
+ reverseAliasMap.insert(alias, *c);
+ }
+ aliasMap()->insert(*c, alias);
+ ++c;
}
int i = 0;
while (cmds[i].english) {
- cmds[i].alias = new QString(alias(cmds[i].english));
- cmdHash()->insert(*cmds[i].alias, cmds[i].no);
+ cmds[i].alias = new QString(alias(cmds[i].english));
+ cmdHash()->insert(*cmds[i].alias, cmds[i].no);
- if (cmds[i].no != i)
- Location::internalError(tr("command %1 missing").arg(i));
- i++;
+ if (cmds[i].no != i)
+ Location::internalError(tr("command %1 missing").arg(i));
+ i++;
}
QSet<QString> macroNames = config.subVars(CONFIG_MACRO);
QSet<QString>::ConstIterator n = macroNames.begin();
while (n != macroNames.end()) {
- QString macroDotName = CONFIG_MACRO + Config::dot + *n;
- Macro macro;
- macro.numParams = -1;
- macro.defaultDef = config.getString(macroDotName);
- if (!macro.defaultDef.isEmpty()) {
- macro.defaultDefLocation = config.lastLocation();
- macro.numParams = Config::numParams(macro.defaultDef);
- }
- bool silent = false;
-
- QSet<QString> formats = config.subVars(macroDotName);
- QSet<QString>::ConstIterator f = formats.begin();
- while (f != formats.end()) {
- QString def = config.getString(macroDotName + Config::dot + *f);
- if (!def.isEmpty()) {
- macro.otherDefs.insert(*f, def);
- int m = Config::numParams(macro.defaultDef);
- if (macro.numParams == -1) {
- macro.numParams = m;
- }
+ QString macroDotName = CONFIG_MACRO + Config::dot + *n;
+ Macro macro;
+ macro.numParams = -1;
+ macro.defaultDef = config.getString(macroDotName);
+ if (!macro.defaultDef.isEmpty()) {
+ macro.defaultDefLocation = config.lastLocation();
+ macro.numParams = Config::numParams(macro.defaultDef);
+ }
+ bool silent = false;
+
+ QSet<QString> formats = config.subVars(macroDotName);
+ QSet<QString>::ConstIterator f = formats.begin();
+ while (f != formats.end()) {
+ QString def = config.getString(macroDotName + Config::dot + *f);
+ if (!def.isEmpty()) {
+ macro.otherDefs.insert(*f, def);
+ int m = Config::numParams(macro.defaultDef);
+ if (macro.numParams == -1) {
+ macro.numParams = m;
+ }
else if (macro.numParams != m) {
- if (!silent) {
- QString other = tr("default");
- if (macro.defaultDef.isEmpty())
- other = macro.otherDefs.begin().key();
- config.lastLocation().warning(tr("Macro '\\%1' takes"
- " inconsistent number"
- " of arguments (%2"
- " %3, %4 %5)")
- .arg(*n)
- .arg(*f)
- .arg(m)
- .arg(other)
- .arg(macro.numParams));
- silent = true;
- }
- if (macro.numParams < m)
- macro.numParams = m;
- }
- }
- ++f;
- }
-
- if (macro.numParams != -1)
- macroHash()->insert(*n, macro);
- ++n;
+ if (!silent) {
+ QString other = tr("default");
+ if (macro.defaultDef.isEmpty())
+ other = macro.otherDefs.begin().key();
+ config.lastLocation().warning(tr("Macro '\\%1' takes"
+ " inconsistent number"
+ " of arguments (%2"
+ " %3, %4 %5)")
+ .arg(*n)
+ .arg(*f)
+ .arg(m)
+ .arg(other)
+ .arg(macro.numParams));
+ silent = true;
+ }
+ if (macro.numParams < m)
+ macro.numParams = m;
+ }
+ }
+ ++f;
+ }
+
+ if (macro.numParams != -1)
+ macroHash()->insert(*n, macro);
+ ++n;
}
}
@@ -2951,27 +2935,27 @@ void Doc::trimCStyleComment(Location& location, QString& str)
int i;
for (i = 0; i < (int) str.length(); i++) {
- if (m.columnNo() == asterColumn) {
- if (str[i] != '*')
- break;
- cleaned += ' ';
- metAsterColumn = true;
- }
+ if (m.columnNo() == asterColumn) {
+ if (str[i] != '*')
+ break;
+ cleaned += ' ';
+ metAsterColumn = true;
+ }
else {
- if (str[i] == '\n') {
- if (!metAsterColumn)
- break;
- metAsterColumn = false;
- }
- cleaned += str[i];
- }
- m.advance(str[i]);
+ if (str[i] == '\n') {
+ if (!metAsterColumn)
+ break;
+ metAsterColumn = false;
+ }
+ cleaned += str[i];
+ }
+ m.advance(str[i]);
}
if (cleaned.length() == str.length())
- str = cleaned;
+ str = cleaned;
for (int i = 0; i < 3; i++)
- location.advance(str[i]);
+ location.advance(str[i]);
str = str.mid(3, str.length() - 5);
}
@@ -2987,19 +2971,19 @@ CodeMarker *Doc::quoteFromFile(const Location &location,
QString filePath = Config::findFile(location,
DocParser::exampleFiles,
DocParser::exampleDirs,
- fileName, userFriendlyFilePath);
+ fileName, userFriendlyFilePath);
if (filePath.isEmpty()) {
- location.warning(tr("Cannot find example file '%1'").arg(fileName));
+ location.warning(tr("Cannot find example file '%1'").arg(fileName));
}
else {
- QFile inFile(filePath);
- if (!inFile.open(QFile::ReadOnly)) {
- location.warning(tr("Cannot open example file '%1'").arg(userFriendlyFilePath));
- }
+ QFile inFile(filePath);
+ if (!inFile.open(QFile::ReadOnly)) {
+ location.warning(tr("Cannot open example file '%1'").arg(userFriendlyFilePath));
+ }
else {
- QTextStream inStream(&inFile);
- code = DocParser::untabifyEtc(inStream.readAll());
- }
+ QTextStream inStream(&inFile);
+ code = DocParser::untabifyEtc(inStream.readAll());
+ }
}
QString dirPath = QFileInfo(filePath).path();
@@ -3043,13 +3027,6 @@ QString Doc::canonicalTitle(const QString &title)
result += QLatin1Char('-');
dashAppended = true;
}
-#if 0
- // This was screwing things up.
- else {
- result += title[i];
- lastAlnum = result.size();
- }
-#endif
}
result.truncate(lastAlnum);
return result;
diff --git a/tools/qdoc3/doc/files/qt.qdocconf b/tools/qdoc3/doc/files/qt.qdocconf
index 4546c7a..44cfbc1 100644
--- a/tools/qdoc3/doc/files/qt.qdocconf
+++ b/tools/qdoc3/doc/files/qt.qdocconf
@@ -22,7 +22,7 @@ edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
+qhp.Qt.namespace = com.trolltech.qt.472
qhp.Qt.virtualFolder = qdoc
qhp.Qt.indexTitle = Qt Reference Documentation
qhp.Qt.indexRoot =
@@ -36,9 +36,9 @@ qhp.Qt.extraFiles = classic.css \
images/dynamiclayouts-example.png \
images/stylesheet-coffee-plastique.png
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
+qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.2
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
qhp.Qt.subprojects = classes overviews examples
qhp.Qt.subprojects.classes.title = Classes
qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
diff --git a/tools/qdoc3/doc/qdoc-manual.qdocconf b/tools/qdoc3/doc/qdoc-manual.qdocconf
index 26fd09c..1e7ff01 100644
--- a/tools/qdoc3/doc/qdoc-manual.qdocconf
+++ b/tools/qdoc3/doc/qdoc-manual.qdocconf
@@ -1,7 +1,7 @@
project = QDoc
description = QDoc3 Manual
-indexes = $QTDIR/doc/html/qt.index
+indexes = ../../../doc/html/qt.index
outputdir = html
@@ -9,41 +9,226 @@ sources = qdoc-manual.qdoc
sourcedirs = $PWD
exampledirs += $PWD \
- $QTDIR/examples
+ ../../../examples
imagedirs += images
extraimages.HTML = qt-logo
-HTML.stylesheets = classic.css
-
-HTML.style = "h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }\n" \
- "a:link { color: #004faf; text-decoration: none }\n" \
- "a:visited { color: #672967; text-decoration: none }\n" \
- "td.postheader { font-family: sans-serif }\n" \
- "tr.address { font-family: sans-serif }\n" \
- "body { background: #ffffff; color: black; }"
-
-HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"5\" width=\"100%\">\n" \
- "<tr>\n" \
- "<td align=\"left\" valign=\"top\" width=\"32\">" \
- "<a href=\"http://qt.nokia.com/\"><img src=\"images/qt-logo.png\" align=\"left\" border=\"0\" /></a>" \
- "</td>\n" \
- "<td class=\"postheader\" valign=\"center\">" \
- "<a href=\"01-qdoc-manual.html\">" \
- "<font color=\"#004faf\">Home: QDoc Manual</font></a>&nbsp;&middot;" \
- "<a href=\"http://qt.nokia.com/doc/4.7\">" \
- "<font color=\"#004faf\"> Qt Reference Documentation</font></a>" \
- "</td>\n" \
- "</tr></table>"
-
-HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
- "<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
- "<td width=\"40%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
- "<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
- "<td width=\"40%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
- "</tr></table></div></address>"
-
-spurious += "Missing '\\}'"
-spurious += "Cannot use .*"
-spurious += "Unexpected .*"
+HTML.stylesheets = style/style.css \
+ style/OfflineStyle.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style_ie6.css
+
+HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt 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=\"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" \
+ " <ul class=\"sf-menu\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"classes.html\">Class index</a></li> \n" \
+ " <li><a href=\"functions.html\">Function index</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
+ " <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
+ " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
+ " <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \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=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\" id=\"sidebarsearch\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " <div id=\"resultdialog\"> \n" \
+ " <a href=\"#\" id=\"resultclose\">Close</a> \n" \
+ " <p id=\"resultlinks\" class=\"all\"><a href=\"#\" id=\"showallresults\">All</a> | <a href=\"#\" id=\"showapiresults\">API</a> | <a href=\"#\" id=\"showarticleresults\">Articles</a> | <a href=\"#\" id=\"showexampleresults\">Examples</a></p> \n" \
+ " <p id=\"searchcount\" class=\"all\"><span id=\"resultcount\"></span><span id=\"apicount\"></span><span id=\"articlecount\"></span><span id=\"examplecount\"></span>&nbsp;results:</p> \n" \
+ " <ul id=\"resultlist\" class=\"all\"> \n" \
+ " </ul> \n" \
+ " </div> \n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes 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 class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</div>\n" \
+ " </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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p id=\"noteHead\">Thank you for giving your feedback.</p> <p class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
+ " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</p>\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n"
+
+# This stuff is used by the Qt 4.7 doc format.
+scriptdirs = ../../../doc/src/template/scripts
+styledirs = ../../../doc/src/template/style
+
+scripts.HTML = functions.js \
+ narrow.js \
+ superfish.js \
+ jquery.js
+
+styles.HTML = style.css \
+ narrow.css \
+ superfish.css \
+ superfish_skin.css \
+ style_ie6.css \
+ style_ie7.css \
+ style_ie8.css
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = 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/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 165bd5e..65b9a09 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -181,45 +181,52 @@ void Generator::initialize(const Config &config)
++e;
}
- QStringList noExts;
- QStringList scripts =
- config.getStringList(CONFIG_SCRIPTS+Config::dot+(*g)->format());
- e = scripts.begin();
- while (e != scripts.end()) {
- QString userFriendlyFilePath;
- QString filePath = Config::findFile(config.lastLocation(),
- scriptFiles,
- scriptDirs,
- *e,
- noExts,
- userFriendlyFilePath);
- if (!filePath.isEmpty())
- Config::copyFile(config.lastLocation(),
- filePath,
- userFriendlyFilePath,
- (*g)->outputDir() +
- "/scripts");
- ++e;
- }
+ // Documentation template handling
+ QString templateDir = config.getString(
+ (*g)->format() + Config::dot + CONFIG_TEMPLATEDIR);
+
+ if (!templateDir.isEmpty()) {
+ QStringList noExts;
+ QStringList searchDirs = QStringList() << templateDir;
+ QStringList scripts =
+ config.getStringList((*g)->format()+Config::dot+CONFIG_SCRIPTS);
+ e = scripts.begin();
+ while (e != scripts.end()) {
+ QString userFriendlyFilePath;
+ QString filePath = Config::findFile(config.lastLocation(),
+ scriptFiles,
+ searchDirs,
+ *e,
+ noExts,
+ userFriendlyFilePath);
+ if (!filePath.isEmpty())
+ Config::copyFile(config.lastLocation(),
+ filePath,
+ userFriendlyFilePath,
+ (*g)->outputDir() +
+ "/scripts");
+ ++e;
+ }
- QStringList styles =
- config.getStringList(CONFIG_STYLES+Config::dot+(*g)->format());
- e = styles.begin();
- while (e != styles.end()) {
- QString userFriendlyFilePath;
- QString filePath = Config::findFile(config.lastLocation(),
- styleFiles,
- styleDirs,
- *e,
- noExts,
- userFriendlyFilePath);
- if (!filePath.isEmpty())
- Config::copyFile(config.lastLocation(),
- filePath,
- userFriendlyFilePath,
- (*g)->outputDir() +
- "/style");
- ++e;
+ QStringList styles =
+ config.getStringList((*g)->format()+Config::dot+CONFIG_STYLESHEETS);
+ e = styles.begin();
+ while (e != styles.end()) {
+ QString userFriendlyFilePath;
+ QString filePath = Config::findFile(config.lastLocation(),
+ styleFiles,
+ searchDirs,
+ *e,
+ noExts,
+ userFriendlyFilePath);
+ if (!filePath.isEmpty())
+ Config::copyFile(config.lastLocation(),
+ filePath,
+ userFriendlyFilePath,
+ (*g)->outputDir() +
+ "/style");
+ ++e;
+ }
}
}
++g;
@@ -518,7 +525,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
Doc::quoteFromFile(fake->doc().location(), quoter, fake->name());
QString code = quoter.quoteTo(fake->location(), "", "");
text << Atom(Atom::Code, code);
- generateText(text, fake, marker);
+ generateText(text, fake, CodeMarker::markerForFileName(fake->name()));
}
}
}
@@ -666,35 +673,6 @@ void Generator::generateExampleFiles(const FakeNode *fake, CodeMarker *marker)
generateFileList(fake, marker, Node::Image, QString("Images:"));
}
-#if 0
- QList<Generator *>::ConstIterator g = generators.begin();
- while (g != generators.end()) {
- if (outputFormats.contains((*g)->format())) {
- (*g)->initializeGenerator(config);
- QStringList extraImages =
- config.getStringList(CONFIG_EXTRAIMAGES+Config::dot+(*g)->format());
- QStringList::ConstIterator e = extraImages.begin();
- while (e != extraImages.end()) {
- QString userFriendlyFilePath;
- QString filePath = Config::findFile(config.lastLocation(),
- imageFiles,
- imageDirs,
- *e,
- imgFileExts[(*g)->format()],
- userFriendlyFilePath);
- if (!filePath.isEmpty())
- Config::copyFile(config.lastLocation(),
- filePath,
- userFriendlyFilePath,
- (*g)->outputDir() +
- "/images");
- ++e;
- }
- }
- ++g;
- }
-#endif
-
QString Generator::indent(int level, const QString& markedCode)
{
if (level == 0)
diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h
index 26d5269..1abec3f 100644
--- a/tools/qdoc3/generator.h
+++ b/tools/qdoc3/generator.h
@@ -78,7 +78,7 @@ class Generator
virtual void terminateGenerator();
virtual QString format() = 0;
virtual bool canHandleFormat(const QString &format) { return format == this->format(); }
- virtual void generateTree(const Tree *tree, CodeMarker *marker) = 0;
+ virtual void generateTree(const Tree *tree) = 0;
static void initialize(const Config& config);
static void terminate();
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index 98246c4..6253c58 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -41,7 +41,6 @@
#include <QHash>
#include <QMap>
-//#include <qdebug.h>
#include "atom.h"
#include "helpprojectwriter.h"
@@ -250,8 +249,9 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
foreach (const QString &name, project.subprojects.keys()) {
SubProject subproject = project.subprojects[name];
// No selectors: accept all nodes.
- if (subproject.selectors.isEmpty())
+ if (subproject.selectors.isEmpty()) {
project.subprojects[name].nodes[objName] = node;
+ }
else if (subproject.selectors.contains(node->type())) {
// Accept only the node types in the selectors hash.
if (node->type() != Node::Fake)
@@ -262,9 +262,10 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
const FakeNode *fakeNode = static_cast<const FakeNode *>(node);
if (subproject.selectors[node->type()].contains(fakeNode->subType()) &&
fakeNode->subType() != Node::ExternalPage &&
- !fakeNode->fullTitle().isEmpty())
+ !fakeNode->fullTitle().isEmpty()) {
project.subprojects[name].nodes[objName] = node;
+ }
}
}
}
@@ -527,13 +528,11 @@ void HelpProjectWriter::writeNode(HelpProject &project, QXmlStreamWriter &writer
writer.writeStartElement("section");
writer.writeAttribute("ref", href);
writer.writeAttribute("title", fakeNode->fullTitle());
- // qDebug() << "Title:" << fakeNode->fullTitle();
- if (fakeNode->subType() == Node::HeaderFile) {
-
+ if ((fakeNode->subType() == Node::HeaderFile) || (fakeNode->subType() == Node::QmlClass)) {
// Write subsections for all members, obsolete members and Qt 3
// members.
- if (!project.memberStatus[node].isEmpty()) {
+ if (!project.memberStatus[node].isEmpty() || (fakeNode->subType() == Node::QmlClass)) {
QString membersPath = href.left(href.size()-5) + "-members.html";
writer.writeStartElement("section");
writer.writeAttribute("ref", membersPath);
@@ -690,8 +689,9 @@ void HelpProjectWriter::generateProject(HelpProject &project)
if (subproject.sortPages) {
QStringList titles = subproject.nodes.keys();
titles.sort();
- foreach (const QString &title, titles)
+ foreach (const QString &title, titles) {
writeNode(project, writer, subproject.nodes[title]);
+ }
} else {
// Find a contents node and navigate from there, using the NextLink values.
foreach (const Node *node, subproject.nodes) {
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index c247be8..b5295c8 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -64,10 +64,6 @@ QT_BEGIN_NAMESPACE
int HtmlGenerator::id = 0;
bool HtmlGenerator::debugging_on = false;
-#if 0
-QString HtmlGenerator::divNavTop = "<div class=\"navTop\"><a href=\"#toc\"><img src=\"./images/bullet_up.png\"></a></div>";
-#endif
-
QString HtmlGenerator::divNavTop = "";
QString HtmlGenerator::sinceTitles[] =
@@ -94,7 +90,7 @@ static bool showBrokenLinks = false;
static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
static QRegExp funcTag("(<@func target=\"([^\"]*)\">)(.*)(</@func>)");
static QRegExp typeTag("(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)");
-static QRegExp spanTag("</@(?:comment|preprocessor|string|char)>");
+static QRegExp spanTag("</@(?:comment|preprocessor|string|char|number|op|type|name|keyword)>");
static QRegExp unknownTag("</?@[^>]*>");
bool parseArg(const QString &src,
@@ -220,8 +216,8 @@ HtmlGenerator::HtmlGenerator()
inTableHeader(false),
numTableRows(0),
threeColumnEnumValueTable(true),
- application(Online),
funcLeftParen("\\S(\\()"),
+ inObsoleteLink(false),
myTree(0),
slow(false),
obsoleteLinks(false)
@@ -264,7 +260,10 @@ void HtmlGenerator::initializeGenerator(const Config &config)
style = config.getString(HtmlGenerator::format() +
Config::dot +
- HTMLGENERATOR_STYLE);
+ CONFIG_STYLE);
+ endHeader = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ CONFIG_ENDHEADER);
postHeader = config.getString(HtmlGenerator::format() +
Config::dot +
HTMLGENERATOR_POSTHEADER);
@@ -289,14 +288,6 @@ void HtmlGenerator::initializeGenerator(const Config &config)
project = config.getString(CONFIG_PROJECT);
- QString app = config.getString(CONFIG_APPLICATION);
- if (app == "online")
- application = Online;
- else if (app == "creator")
- application = Creator;
- else
- application = Creator;
-
projectDescription = config.getString(CONFIG_DESCRIPTION);
if (projectDescription.isEmpty() && !project.isEmpty())
projectDescription = project + " Reference Documentation";
@@ -337,17 +328,18 @@ void HtmlGenerator::initializeGenerator(const Config &config)
slow = config.getBool(CONFIG_SLOW);
- stylesheets = config.getStringList(HtmlGenerator::format() +
- Config::dot +
- HTMLGENERATOR_STYLESHEETS);
- customHeadElements = config.getStringList(HtmlGenerator::format() +
- Config::dot +
- HTMLGENERATOR_CUSTOMHEADELEMENTS);
codeIndent = config.getInt(CONFIG_CODEINDENT);
helpProjectWriter = new HelpProjectWriter(config,
project.toLower() +
".qhp");
+
+ // Documentation template handling
+ headerScripts = config.getString(HtmlGenerator::format() + Config::dot +
+ CONFIG_HEADERSCRIPTS);
+ headerStyles = config.getString(HtmlGenerator::format() +
+ Config::dot +
+ CONFIG_HEADERSTYLES);
}
void HtmlGenerator::terminateGenerator()
@@ -361,11 +353,11 @@ QString HtmlGenerator::format()
}
/*!
- This is where the html files and dcf files are written.
- \note The html file generation is done in the base class,
+ This is where the HTML files are written.
+ \note The HTML file generation is done in the base class,
PageGenerator::generateTree().
*/
-void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
+void HtmlGenerator::generateTree(const Tree *tree)
{
myTree = tree;
nonCompatClasses.clear();
@@ -384,48 +376,11 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
findAllNamespaces(tree->root());
findAllSince(tree->root());
- PageGenerator::generateTree(tree, marker);
-
- dcfClassesRoot.ref = "classes.html";
- dcfClassesRoot.title = "Classes";
- qSort(dcfClassesRoot.subsections);
-
- dcfOverviewsRoot.ref = "overviews.html";
- dcfOverviewsRoot.title = "Overviews";
- qSort(dcfOverviewsRoot.subsections);
-
- dcfExamplesRoot.ref = "examples.html";
- dcfExamplesRoot.title = "Tutorial & Examples";
- qSort(dcfExamplesRoot.subsections);
-
- DcfSection qtRoot;
- appendDcfSubSection(&qtRoot, dcfClassesRoot);
- appendDcfSubSection(&qtRoot, dcfOverviewsRoot);
- appendDcfSubSection(&qtRoot, dcfExamplesRoot);
-
- generateDcf(project.toLower().simplified().replace(" ", "-"),
- "index.html",
- projectDescription, qtRoot);
- generateDcf("designer",
- "designer-manual.html",
- "Qt Designer Manual",
- dcfDesignerRoot);
- generateDcf("linguist",
- "linguist-manual.html",
- "Qt Linguist Manual",
- dcfLinguistRoot);
- generateDcf("assistant",
- "assistant-manual.html",
- "Qt Assistant Manual",
- dcfAssistantRoot);
- generateDcf("qmake",
- "qmake-manual.html",
- "qmake Manual",
- dcfQmakeRoot);
+ PageGenerator::generateTree(tree);
QString fileBase = project.toLower().simplified().replace(" ", "-");
generateIndex(fileBase, projectUrl, projectDescription);
- generatePageIndex(outputDir() + "/" + fileBase + ".pageindex", marker);
+ generatePageIndex(outputDir() + "/" + fileBase + ".pageindex");
helpProjectWriter->generate(myTree);
}
@@ -1063,26 +1018,8 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << atom->string();
break;
case Atom::SectionLeft:
-#if 0
- {
- int nextLevel = atom->string().toInt();
- if (sectionNumber.size() < nextLevel) {
- do {
- sectionNumber.append("1");
- } while (sectionNumber.size() < nextLevel);
- }
- else {
- while (sectionNumber.size() > nextLevel) {
- sectionNumber.removeLast();
- }
- sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1);
- }
- out() << "<a name=\"sec-" << sectionNumber.join("-") << "\"></a>" << divNavTop << "\n";
- }
-#else
out() << "<a name=\"" << Doc::canonicalTitle(Text::sectionHeading(atom).toString())
<< "\"></a>" << divNavTop << "\n";
-#endif
break;
case Atom::SectionRight:
break;
@@ -1181,33 +1118,6 @@ int HtmlGenerator::generateAtom(const Atom *atom,
skipAhead = 1;
break;
case Atom::TableOfContents:
- {
- int numColumns = 1;
- const Node *node = relative;
-
- Doc::SectioningUnit sectioningUnit = Doc::Section4;
- QStringList params = atom->string().split(",");
- QString columnText = params.at(0);
- QStringList pieces = columnText.split(" ", QString::SkipEmptyParts);
- if (pieces.size() >= 2) {
- columnText = pieces.at(0);
- pieces.pop_front();
- QString path = pieces.join(" ").trimmed();
- node = findNodeForTarget(path, relative, marker, atom);
- }
-
- if (params.size() == 2) {
- numColumns = qMax(columnText.toInt(), numColumns);
- sectioningUnit = (Doc::SectioningUnit)params.at(1).toInt();
- }
-
- if (node)
- generateTableOfContents(node,
- marker,
- sectioningUnit,
- numColumns,
- relative);
- }
break;
case Atom::Target:
out() << "<a name=\"" << Doc::canonicalTitle(atom->string()) << "\"></a>";
@@ -1259,11 +1169,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
title = rawTitle + " Class Reference";
}
- DcfSection classSection;
- classSection.title = title;
- classSection.ref = linkForNode(inner, 0);
- classSection.keywords += qMakePair(inner->name(), classSection.ref);
-
Text subtitleText;
if (rawTitle != fullTitle)
subtitleText << "(" << Atom(Atom::AutoLink, fullTitle) << ")"
@@ -1426,8 +1331,6 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
names << plainCode(marker->markedUpEnumValue(enumName,
enume));
}
- foreach (const QString &name, names)
- classSection.keywords += qMakePair(name,linkForNode(*m,0));
}
++m;
}
@@ -1436,39 +1339,15 @@ void HtmlGenerator::generateClassLikeNode(const InnerNode *inner,
++s;
}
generateFooter(inner);
-
- if (!membersLink.isEmpty()) {
- DcfSection membersSection;
- membersSection.title = "List of all members";
- membersSection.ref = membersLink;
- appendDcfSubSection(&classSection, membersSection);
- }
- if (!obsoleteLink.isEmpty()) {
- DcfSection obsoleteSection;
- obsoleteSection.title = "Obsolete members";
- obsoleteSection.ref = obsoleteLink;
- appendDcfSubSection(&classSection, obsoleteSection);
- }
- if (!compatLink.isEmpty()) {
- DcfSection compatSection;
- compatSection.title = "Qt 3 support members";
- compatSection.ref = compatLink;
- appendDcfSubSection(&classSection, compatSection);
- }
-
- appendDcfSubSection(&dcfClassesRoot, classSection);
}
/*!
- Generate the html page for a qdoc file that doesn't map
- to an underlying c++ file.
+ Generate the HTML page for a qdoc file that doesn't map
+ to an underlying C++ file.
*/
void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
{
SubTitleSize subTitleSize = LargeSubTitle;
- DcfSection fakeSection;
- fakeSection.title = fake->fullTitle();
- fakeSection.ref = linkForNode(fake, 0);
QList<Section> sections;
QList<Section>::const_iterator s;
@@ -1482,6 +1361,9 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
else if (fake->subType() == Node::QmlBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
htmlTitle = fullTitle;
+
+ // Replace the marker with a QML code marker.
+ marker = CodeMarker::markerForLanguage(QLatin1String("QML"));
}
generateHeader(htmlTitle, fake, marker);
@@ -1495,6 +1377,9 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
qml_cn = static_cast<const QmlClassNode*>(fake);
sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0);
generateTableOfContents(fake,marker,&sections);
+
+ // Replace the marker with a QML code marker.
+ marker = CodeMarker::markerForLanguage(QLatin1String("QML"));
}
else if (fake->name() != QString("index.html"))
generateTableOfContents(fake,marker,0);
@@ -1548,25 +1433,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
<< "Qt 3 support members</a></li>\n";
out() << "</ul>\n";
-
- if (!membersLink.isEmpty()) {
- DcfSection membersSection;
- membersSection.title = "List of all members";
- membersSection.ref = membersLink;
- appendDcfSubSection(&fakeSection, membersSection);
- }
- if (!obsoleteLink.isEmpty()) {
- DcfSection obsoleteSection;
- obsoleteSection.title = "Obsolete members";
- obsoleteSection.ref = obsoleteLink;
- appendDcfSubSection(&fakeSection, obsoleteSection);
- }
- if (!compatLink.isEmpty()) {
- DcfSection compatSection;
- compatSection.title = "Qt 3 support members";
- compatSection.ref = compatLink;
- appendDcfSubSection(&fakeSection, compatSection);
- }
}
#ifdef QDOC_QML
else if (fake->subType() == Node::QmlClass) {
@@ -1609,8 +1475,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
while (m != (*s).members.end()) {
generateDetailedQmlMember(*m, fake, marker);
out() << "<br/>\n";
- fakeSection.keywords += qMakePair((*m)->name(),
- linkForNode(*m,0));
++m;
}
++s;
@@ -1619,7 +1483,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
return;
}
#endif
-
+
sections = marker->sections(fake, CodeMarker::Summary, CodeMarker::Okay);
s = sections.begin();
while (s != sections.end()) {
@@ -1655,8 +1519,6 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateAnnotatedList(fake, marker, groupMembersMap);
}
- fakeSection.keywords += qMakePair(fakeSection.title, fakeSection.ref);
-
sections = marker->sections(fake, CodeMarker::Detailed, CodeMarker::Okay);
s = sections.begin();
while (s != sections.end()) {
@@ -1666,35 +1528,11 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
NodeList::ConstIterator m = (*s).members.begin();
while (m != (*s).members.end()) {
generateDetailedMember(*m, fake, marker);
- fakeSection.keywords += qMakePair((*m)->name(), linkForNode(*m, 0));
++m;
}
++s;
}
generateFooter(fake);
-
- if (fake->subType() == Node::Example) {
- appendDcfSubSection(&dcfExamplesRoot, fakeSection);
- }
- else if (fake->subType() != Node::File) {
- QString contentsPage = fake->links().value(Node::ContentsLink).first;
-
- if (contentsPage == "Qt Designer Manual") {
- appendDcfSubSection(&dcfDesignerRoot, fakeSection);
- }
- else if (contentsPage == "Qt Linguist Manual") {
- appendDcfSubSection(&dcfLinguistRoot, fakeSection);
- }
- else if (contentsPage == "Qt Assistant Manual") {
- appendDcfSubSection(&dcfAssistantRoot, fakeSection);
- }
- else if (contentsPage == "qmake Manual") {
- appendDcfSubSection(&dcfQmakeRoot, fakeSection);
- }
- else {
- appendDcfSubSection(&dcfOverviewsRoot, fakeSection);
- }
- }
}
/*!
@@ -1788,12 +1626,10 @@ void HtmlGenerator::generateHeader(const QString& title,
out() << QString("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"%1\" lang=\"%1\">\n").arg(naturalLanguage);
out() << "<head>\n";
out() << " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
- QString shortVersion;
- shortVersion = project + " " + shortVersion + ": ";
if (node && !node->doc().location().isEmpty())
out() << "<!-- " << node->doc().location().fileName() << " -->\n";
- shortVersion = myTree->version();
+ QString shortVersion = myTree->version();
if (shortVersion.count(QChar('.')) == 2)
shortVersion.truncate(shortVersion.lastIndexOf(QChar('.')));
if (!shortVersion.isEmpty()) {
@@ -1805,77 +1641,22 @@ void HtmlGenerator::generateHeader(const QString& title,
// Generating page title
out() << " <title>" << shortVersion << protectEnc(title) << "</title>\n";
- // Adding style sheet
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n";
- // Adding jquery and functions - providing online tools and search features
- out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
-
-
- // Adding syntax highlighter // future release
-
- // Setting some additional style sheet related details depending on configuration (e.g. Online/Creator)
-
- switch (application) {
- case Online:
- // Adding style and js for small windows
- out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
- out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
- // Browser spec styles
- out() << " <!--[if IE]>\n";
- out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
- out() << "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if lt IE 7]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if IE 7]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n";
- out() << "<![endif]-->\n";
- out() << "<!--[if IE 8]>\n";
- out() << "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n";
- out() << "<![endif]-->\n";
-
- out() << "</head>\n";
- // CheckEmptyAndLoadList activating search
- out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
- break;
- case Creator:
- out() << "</head>\n";
- out() << "<body class=\"offline narrow creator\">\n"; // offline narrow
- break;
- default:
- out() << "</head>\n";
- out() << "<body>\n";
- break;
- }
+
+ // Include style sheet and script links.
+ out() << headerStyles;
+ out() << headerScripts;
+ out() << endHeader;
#ifdef GENERATE_MAC_REFS
if (mainPage)
generateMacRef(node, marker);
#endif
- switch (application) {
- case Online:
- out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- generateBreadCrumbs(title,node,marker);
- out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- break;
- case Creator:
- out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- generateBreadCrumbs(title,node,marker);
- out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- break;
- default: // default -- not used except if one forgets to set any of the above settings to true
- out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- generateBreadCrumbs(title,node,marker);
- out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- break;
- }
+ out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ generateBreadCrumbs(title,node,marker);
+ out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- navigationLinks.clear();
+ navigationLinks.clear();
if (node && !node->links().empty()) {
QPair<QString,QString> linkPair;
@@ -1930,10 +1711,8 @@ void HtmlGenerator::generateHeader(const QString& title,
}
}
-#if 0 // Removed for new doc format. MWS
if (node && !node->links().empty())
- out() << "<p>\n" << navigationLinks << "</p>\n";
-#endif
+ out() << "<p class=\"naviNextPrevious headerNavi\">\n" << navigationLinks << "</p><p/>\n";
}
void HtmlGenerator::generateTitle(const QString& title,
@@ -1958,35 +1737,13 @@ void HtmlGenerator::generateTitle(const QString& title,
void HtmlGenerator::generateFooter(const Node *node)
{
if (node && !node->links().empty())
- out() << "<p>\n" << navigationLinks << "</p>\n";
+ out() << "<p class=\"naviNextPrevious footerNavi\">\n" << navigationLinks << "</p>\n";
out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
<< QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
- switch (application) {
- case Online:
- out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- out() << " <script type=\"text/javascript\">\n";
- out() << " var _gaq = _gaq || [];\n";
- out() << " _gaq.push(['_setAccount', 'UA-4457116-5']);\n";
- out() << " _gaq.push(['_trackPageview']);\n";
- out() << " (function() {\n";
- out() << " var ga = document.createElement('script'); ";
- out() << "ga.type = 'text/javascript'; ga.async = true;\n";
- out() << " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + ";
- out() << "'.google-analytics.com/ga.js';\n";
- out() << " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n";
- out() << " })();\n";
- out() << " </script>\n";
- out() << "</body>\n";
- break;
- case Creator:
- out() << "</body>\n";
- break;
- default:
- out() << "</body>\n";
- }
- out() << "</html>\n";
+ out() << "</body>\n";
+ out() << "</html>\n";
}
void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
@@ -2021,91 +1778,6 @@ void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker)
}
/*!
- Generates a table of contents beginning at \a node.
- */
-void HtmlGenerator::generateTableOfContents(const Node *node,
- CodeMarker *marker,
- Doc::SectioningUnit sectioningUnit,
- int numColumns,
- const Node *relative)
-
-{
- return;
- if (!node->doc().hasTableOfContents())
- return;
- QList<Atom *> toc = node->doc().tableOfContents();
- if (toc.isEmpty())
- return;
-
- QString nodeName = "";
- if (node != relative)
- nodeName = node->name();
-
- QStringList sectionNumber;
- int columnSize = 0;
-
- QString tdTag;
- if (numColumns > 1) {
- tdTag = "<td>"; /* width=\"" + QString::number((100 + numColumns - 1) / numColumns) + "%\">";*/
- out() << "<table class=\"toc\">\n<tr class=\"topAlign\">"
- << tdTag << "\n";
- }
-
- // disable nested links in table of contents
- inContents = true;
- inLink = true;
-
- for (int i = 0; i < toc.size(); ++i) {
- Atom *atom = toc.at(i);
-
- int nextLevel = atom->string().toInt();
- if (nextLevel > (int)sectioningUnit)
- continue;
-
- if (sectionNumber.size() < nextLevel) {
- do {
- out() << "<ul>";
- sectionNumber.append("1");
- } while (sectionNumber.size() < nextLevel);
- }
- else {
- while (sectionNumber.size() > nextLevel) {
- out() << "</ul>\n";
- sectionNumber.removeLast();
- }
- sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1);
- }
- int numAtoms;
- Text headingText = Text::sectionHeading(atom);
-
- if (sectionNumber.size() == 1 && columnSize > toc.size() / numColumns) {
- out() << "</ul></td>" << tdTag << "<ul>\n";
- columnSize = 0;
- }
- out() << "<li>";
- out() << "<a href=\""
- << nodeName
- << "#"
- << Doc::canonicalTitle(headingText.toString())
- << "\">";
- generateAtomList(headingText.firstAtom(), node, marker, true, numAtoms);
- out() << "</a></li>\n";
-
- ++columnSize;
- }
- while (!sectionNumber.isEmpty()) {
- out() << "</ul>\n";
- sectionNumber.removeLast();
- }
-
- if (numColumns > 1)
- out() << "</td></tr></table>\n";
-
- inContents = false;
- inLink = false;
-}
-
-/*!
Revised for the new doc format.
Generates a table of contents beginning at \a node.
*/
@@ -2222,39 +1894,6 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
inLink = false;
}
-#if 0
-void HtmlGenerator::generateNavigationBar(const NavigationBar& bar,
- const Node *node,
- CodeMarker *marker)
-{
- if (bar.prev.begin() != 0 || bar.current.begin() != 0 ||
- bar.next.begin() != 0) {
- out() << "<p class=\"rightAlign\">";
- if (bar.prev.begin() != 0) {
-#if 0
- out() << "[<a href=\"" << section.previousBaseName()
- << ".html\">Prev: ";
- generateText(section.previousHeading(), node, marker);
- out() << "</a>]\n";
-#endif
- }
- if (fake->name() != QString("index.html")) {
- if (bar.current.begin() != 0) {
- out() << "[<a href=\"" << "home"
- << ".html\">Home</a>]\n";
- }
- if (bar.next.begin() != 0) {
- out() << "[<a href=\"" << fileBase(node, bar.next)
- << ".html\">Next: ";
- generateText(Text::sectionHeading(bar.next.begin()), node, marker);
- out() << "</a>]\n";
- }
- out() << "</p>\n";
- }
- }
-}
-#endif
-
QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
CodeMarker *marker)
{
@@ -3214,23 +2853,40 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
// "<@preprocessor>" -> "<span class=\"preprocessor\">";
// "<@string>" -> "<span class=\"string\">";
// "<@char>" -> "<span class=\"char\">";
- // "</@(?:comment|preprocessor|string|char)>" -> "</span>"
+ // "<@number>" -> "<span class=\"number\">";
+ // "<@op>" -> "<span class=\"operator\">";
+ // "<@type>" -> "<span class=\"type\">";
+ // "<@name>" -> "<span class=\"name\">";
+ // "<@keyword>" -> "<span class=\"keyword\">";
+ // "</@(?:comment|preprocessor|string|char|number|op|type|name|keyword)>" -> "</span>"
src = html;
html = QString();
static const QString spanTags[] = {
- "<@comment>", "<span class=\"comment\">",
- "<@preprocessor>", "<span class=\"preprocessor\">",
- "<@string>", "<span class=\"string\">",
- "<@char>", "<span class=\"char\">",
- "</@comment>", "</span>",
- "</@preprocessor>","</span>",
- "</@string>", "</span>",
- "</@char>", "</span>"
+ "<@comment>", "<span class=\"comment\">",
+ "<@preprocessor>", "<span class=\"preprocessor\">",
+ "<@string>", "<span class=\"string\">",
+ "<@char>", "<span class=\"char\">",
+ "<@number>", "<span class=\"number\">",
+ "<@op>", "<span class=\"operator\">",
+ "<@type>", "<span class=\"type\">",
+ "<@name>", "<span class=\"name\">",
+ "<@keyword>", "<span class=\"keyword\">",
+ "</@comment>", "</span>",
+ "</@preprocessor>", "</span>",
+ "</@string>", "</span>",
+ "</@char>", "</span>",
+ "</@number>", "</span>",
+ "</@op>", "</span>",
+ "</@type>", "</span>",
+ "</@name>", "</span>",
+ "</@keyword>", "</span>",
};
+ // Update the upper bound of k in the following code to match the length
+ // of the above array.
for (int i = 0, n = src.size(); i < n;) {
if (src.at(i) == charLangle) {
bool handled = false;
- for (int k = 0; k != 8; ++k) {
+ for (int k = 0; k != 18; ++k) {
const QString & tag = spanTags[2 * k];
if (tag == QStringRef(&src, i, tag.length())) {
html += spanTags[2 * k + 1];
@@ -3281,18 +2937,6 @@ void HtmlGenerator::generateLink(const Atom* atom,
}
inLink = false;
out() << protectEnc(atom->string().mid(k));
- } else if (marker->recognizeLanguage("Java")) {
- // hack for Java: remove () and use <tt> when appropriate
- bool func = atom->string().endsWith("()");
- bool tt = (func || atom->string().contains(camelCase));
- if (tt)
- out() << "<tt>";
- if (func) {
- out() << protectEnc(atom->string().left(atom->string().length() - 2));
- } else {
- out() << protectEnc(atom->string());
- }
- out() << "</tt>";
} else {
out() << protectEnc(atom->string());
}
@@ -3437,29 +3081,6 @@ QString HtmlGenerator::fileBase(const Node *node) const
return result;
}
-#if 0
-QString HtmlGenerator::fileBase(const Node *node,
- const SectionIterator& section) const
-{
- QStringList::ConstIterator s = section.sectionNumber().end();
- QStringList::ConstIterator b = section.baseNameStack().end();
-
- QString suffix;
- QString base = fileBase(node);
-
- while (s != section.sectionNumber().begin()) {
- --s;
- --b;
- if (!(*b).isEmpty()) {
- base = *b;
- break;
- }
- suffix.prepend("-" + *s);
- }
- return base + suffix;
-}
-#endif
-
QString HtmlGenerator::fileName(const Node *node)
{
if (node->type() == Node::Fake) {
@@ -3549,10 +3170,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative)
fn = fileName(node);
/* if (!node->url().isEmpty())
return fn;*/
-#if 0
- // ### reintroduce this test, without breaking .dcf files
- if (fn != outFileName())
-#endif
+
link += fn;
if (!node->isInnerNode() || node->subType() == Node::QmlPropertyGroup) {
@@ -3722,7 +3340,11 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
(*c)->subType() == Node::QmlClass &&
!(*c)->doc().isEmpty()) {
QString qmlClassName = (*c)->name();
- qmlClasses.insert(qmlClassName,*c);
+ // Remove the "QML:" prefix if present.
+ if (qmlClassName.startsWith(QLatin1String("QML:")))
+ qmlClasses.insert(qmlClassName.mid(4),*c);
+ else
+ qmlClasses.insert(qmlClassName,*c);
}
else if ((*c)->isInnerNode()) {
findAllClasses(static_cast<InnerNode *>(*c));
@@ -4013,14 +3635,6 @@ QString HtmlGenerator::getLink(const Atom *atom,
<< (*node)->name() << "no relative";
}
}
-#if 0
- else if ((*node)->status() == Node::Deprecated) {
- qDebug() << "Link to Deprecated entity";
- }
- else if ((*node)->status() == Node::Internal) {
- qDebug() << "Link to Internal entity";
- }
-#endif
}
while (!path.isEmpty()) {
@@ -4041,16 +3655,6 @@ QString HtmlGenerator::getLink(const Atom *atom,
return link;
}
-void HtmlGenerator::generateDcf(const QString &fileBase,
- const QString &startPage,
- const QString &title,
- DcfSection &dcfRoot)
-{
- dcfRoot.ref = startPage;
- dcfRoot.title = title;
- generateDcfSections(dcfRoot, outputDir() + "/" + fileBase + ".dcf", fileBase + "/reference");
-}
-
void HtmlGenerator::generateIndex(const QString &fileBase,
const QString &url,
const QString &title)
@@ -4236,7 +3840,7 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
if (qpgn->isDefault())
out() << "<span class=\"qmldefault\">default</span>";
generateQmlItem(qpn, relative, marker, false);
- out() << "</td></tr>";
+ out() << "</p></td></tr>";
}
++p;
}
@@ -4577,12 +4181,14 @@ void HtmlGenerator::generatePageElements(QXmlStreamWriter& writer, const Node* n
/*!
Outputs the file containing the index used for searching the html docs.
*/
-void HtmlGenerator::generatePageIndex(const QString& fileName, CodeMarker* marker) const
+void HtmlGenerator::generatePageIndex(const QString& fileName) const
{
QFile file(fileName);
if (!file.open(QFile::WriteOnly | QFile::Text))
return ;
+ CodeMarker *marker = CodeMarker::markerForFileName(fileName);
+
QXmlStreamWriter writer(&file);
writer.setAutoFormatting(true);
writer.writeStartDocument();
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index 430aca2..8b5c50b 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -52,20 +52,10 @@
#include "codemarker.h"
#include "config.h"
-#include "dcfsection.h"
#include "pagegenerator.h"
QT_BEGIN_NAMESPACE
-#if 0
-struct NavigationBar
-{
- SectionIterator prev;
- SectionIterator current;
- SectionIterator next;
-};
-#endif
-
typedef QMultiMap<QString, Node*> NodeMultiMap;
typedef QMap<QString, NodeMultiMap> NewSinceMaps;
typedef QMap<Node*, NodeMultiMap> ParentMaps;
@@ -95,10 +85,6 @@ class HtmlGenerator : public PageGenerator
LastSinceType
};
- enum Application {
- Online,
- Creator};
-
public:
HtmlGenerator();
~HtmlGenerator();
@@ -106,7 +92,7 @@ class HtmlGenerator : public PageGenerator
virtual void initializeGenerator(const Config& config);
virtual void terminateGenerator();
virtual QString format();
- virtual void generateTree(const Tree *tree, CodeMarker *marker);
+ virtual void generateTree(const Tree *tree);
QString protectEnc(const QString &string);
static QString protect(const QString &string, const QString &encoding = "ISO-8859-1");
@@ -155,16 +141,6 @@ class HtmlGenerator : public PageGenerator
CodeMarker *marker,
const Node *relative = 0);
void generateIncludes(const InnerNode *inner, CodeMarker *marker);
-#if 0
- void generateNavigationBar(const NavigationBar& bar,
- const Node *node,
- CodeMarker *marker);
-#endif
- void generateTableOfContents(const Node *node,
- CodeMarker *marker,
- Doc::SectioningUnit sectioningUnit,
- int numColumns,
- const Node *relative = 0);
void generateTableOfContents(const Node *node,
CodeMarker *marker,
QList<Section>* sections = 0);
@@ -241,10 +217,7 @@ class HtmlGenerator : public PageGenerator
void generateStatus(const Node *node, CodeMarker *marker);
QString registerRef(const QString& ref);
- QString fileBase(const Node *node) const;
-#if 0
- QString fileBase(const Node *node, const SectionIterator& section) const;
-#endif
+ virtual QString fileBase(const Node *node) const;
QString fileName(const Node *node);
void findAllClasses(const InnerNode *node);
void findAllFunctions(const InnerNode *node);
@@ -257,9 +230,6 @@ class HtmlGenerator : public PageGenerator
const Node *relative,
CodeMarker *marker,
const Node** node);
- virtual void generateDcf(const QString &fileBase,
- const QString &startPage,
- const QString &title, DcfSection &dcfRoot);
virtual void generateIndex(const QString &fileBase,
const QString &url,
const QString &title);
@@ -277,22 +247,11 @@ class HtmlGenerator : public PageGenerator
void generatePageElements(QXmlStreamWriter& writer,
const Node* node,
CodeMarker* marker) const;
- void generatePageIndex(const QString& fileName,
- CodeMarker* marker) const;
+ void generatePageIndex(const QString& fileName) const;
void generateExtractionMark(const Node *node, ExtractionMarkType markType);
-#if 0
- NavigationBar currentNavigationBar;
-#endif
QMap<QString, QString> refMap;
int codeIndent;
- DcfSection dcfClassesRoot;
- DcfSection dcfOverviewsRoot;
- DcfSection dcfExamplesRoot;
- DcfSection dcfDesignerRoot;
- DcfSection dcfLinguistRoot;
- DcfSection dcfAssistantRoot;
- DcfSection dcfQmakeRoot;
HelpProjectWriter *helpProjectWriter;
bool inLink;
bool inObsoleteLink;
@@ -301,11 +260,13 @@ class HtmlGenerator : public PageGenerator
bool inTableHeader;
int numTableRows;
bool threeColumnEnumValueTable;
- Application application;
QString link;
QStringList sectionNumber;
QRegExp funcLeftParen;
QString style;
+ QString headerScripts;
+ QString headerStyles;
+ QString endHeader;
QString postHeader;
QString postPostHeader;
QString creatorPostHeader;
@@ -350,9 +311,6 @@ class HtmlGenerator : public PageGenerator
#define HTMLGENERATOR_POSTPOSTHEADER "postpostheader"
#define HTMLGENERATOR_CREATORPOSTHEADER "postheader"
#define HTMLGENERATOR_CREATORPOSTPOSTHEADER "postpostheader"
-#define HTMLGENERATOR_STYLE "style"
-#define HTMLGENERATOR_STYLESHEETS "stylesheets"
-#define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements"
QT_END_NAMESPACE
diff --git a/tools/qdoc3/jambiapiparser.cpp b/tools/qdoc3/jambiapiparser.cpp
deleted file mode 100644
index 23f2716..0000000
--- a/tools/qdoc3/jambiapiparser.cpp
+++ /dev/null
@@ -1,546 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- jambiapiparser.cpp
-*/
-
-#include "cppcodeparser.h"
-#include "jambiapiparser.h"
-#include "node.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-static const char USED_INTERNALLY[] = "";
-
-static Text textWithFixedBrief(const Text &text, const Text &beforeBrief,
- const Text &afterBrief)
-{
- Text result;
-
- const Atom *atom = text.firstAtom();
- while (atom) {
- if (atom->type() == Atom::BriefLeft) {
- result << Atom::ParaLeft << beforeBrief;
- } else if (atom->type() == Atom::BriefRight) {
- result << afterBrief << Atom::ParaRight;
- } else {
- result << *atom;
- }
- atom = atom->next();
- }
-
- return result;
-}
-
-static void setPass1JambifiedDoc(Node *javaNode, const Node *cppNode, const QString &qName = "")
-{
- Doc newDoc(cppNode->doc());
-
- if (javaNode->type() == Node::Function) {
- const FunctionNode *javaFunc = static_cast<const FunctionNode *>(javaNode);
- if (cppNode->type() == Node::Function) {
- const FunctionNode *cppFunc = static_cast<const FunctionNode *>(cppNode);
- if (const PropertyNode *property = cppFunc->associatedProperty()) {
- newDoc = property->doc();
- Text text(newDoc.body());
-
- Node *mutableCppNode = const_cast<Node *>(cppNode);
- if (property->getters().contains(mutableCppNode)) {
- text = textWithFixedBrief(text, Text("Returns "), Text("."));
- } else if (property->setters().contains(mutableCppNode)) {
- Text afterBrief;
- if (javaFunc->parameterNames().count() == 1
- && !javaFunc->parameterNames().first().isEmpty()) {
- afterBrief << " to "
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER)
- << javaFunc->parameterNames().first()
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER);
- }
- afterBrief << ".";
- text = textWithFixedBrief(text, Text("Sets "), afterBrief);
- } else if (property->resetters().contains(mutableCppNode)) {
- text = textWithFixedBrief(text, Text("Resets "), Text("."));
- }
-
- newDoc.setBody(text);
- } else {
- QStringList javaParams = javaFunc->parameterNames();
- QStringList cppParams = cppFunc->parameterNames();
- newDoc.renameParameters(cppParams, javaParams);
-
- if (cppNode->access() == Node::Private) {
- Text text;
- text << Atom::ParaLeft;
- if (cppFunc->reimplementedFrom()) {
- text << "This function is reimplemented for internal reasons.";
- } else {
- text << USED_INTERNALLY;
- }
- text << Atom::ParaRight;
- newDoc.setBody(text);
- }
- }
- } else if (cppNode->type() == Node::Variable) {
- Text text(newDoc.body());
-
- if (qName == "variablegetter") {
- text = textWithFixedBrief(text, Text("Returns "), Text("."));
- } else if (qName == "variablesetter") {
- Text afterBrief;
- if (javaFunc->parameterNames().count() == 1
- && !javaFunc->parameterNames().first().isEmpty()) {
- afterBrief << " to "
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER)
- << javaFunc->parameterNames().first()
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER);
- }
- afterBrief << ".";
- text = textWithFixedBrief(text, Text("Sets "), afterBrief);
- }
-
- newDoc.setBody(text);
- }
- } else { // ### enum value names?
-
- }
-
- javaNode->setDoc(newDoc, true);
-}
-
-static void setStatus(Node *javaNode, const Node *cppNode)
-{
- if (cppNode->status() == Node::Compat) {
- javaNode->setStatus(Node::Obsolete);
- } else {
- javaNode->setStatus(cppNode->status());
- }
-}
-
-static Text findEnumText(Node *javaEnum, const QString &enumItemName)
-{
- const Text &body = javaEnum->doc().body();
- const Atom *atom = body.firstAtom();
- while (atom) {
- if (atom->type() == Atom::ListTagLeft && atom->string() == ATOM_LIST_VALUE) {
- atom = atom->next();
- if (atom) {
- // ### paras?
- if (atom->string() == enumItemName)
- return body.subText(Atom::ListItemLeft, Atom::ListItemRight, atom);
- }
- } else {
- atom = atom->next();
- }
- }
- return Text();
-}
-
-JambiApiParser::JambiApiParser(Tree *cppTree)
- : cppTre(cppTree), javaTre(0), metJapiTag(false)
-{
-}
-
-JambiApiParser::~JambiApiParser()
-{
-}
-
-void JambiApiParser::initializeParser(const Config &config)
-{
- CodeParser::initializeParser(config);
-}
-
-void JambiApiParser::terminateParser()
-{
- CodeParser::terminateParser();
-}
-
-QString JambiApiParser::language()
-{
- return "Java";
-}
-
-QString JambiApiParser::sourceFileNameFilter()
-{
- return "*.japi";
-}
-
-void JambiApiParser::parseSourceFile(const Location &location, const QString &filePath, Tree *tree)
-{
- javaTre = tree;
- metJapiTag = false;
-
- QXmlSimpleReader reader;
- reader.setContentHandler(this);
- reader.setErrorHandler(this);
-
- QFile file(filePath);
- if (!file.open(QFile::ReadOnly)) {
- location.warning(tr("Cannot open JAPI file '%1'").arg(filePath));
- return;
- }
-
- japiLocation = Location(filePath);
- QXmlInputSource xmlSource(&file);
- reader.parse(xmlSource);
-}
-
-void JambiApiParser::doneParsingSourceFiles(Tree * /* tree */)
-{
- /*
- Also import the overview documents.
- */
- foreach (Node *cppNode, cppTre->root()->childNodes()) {
- if (cppNode->type() == Node::Fake) {
- FakeNode *cppFake = static_cast<FakeNode *>(cppNode);
- if (cppFake->subType() == Node::Page) {
- FakeNode *javaFake = new FakeNode(javaTre->root(),
- cppFake->name(),
- cppFake->subType());
- javaFake->setModuleName("com.trolltech.qt"); // ### hard-coded
- javaFake->setTitle(cppFake->title());
- javaFake->setSubTitle(cppFake->subTitle());
- setStatus(javaFake, cppFake);
- setPass1JambifiedDoc(javaFake, cppFake);
- }
- }
- }
-
- /*
- Fix the docs.
- */
- if (javaTre) {
- javaTre->resolveInheritance();
- jambifyDocsPass2(javaTre->root());
- javaTre = 0;
- }
-}
-
-bool JambiApiParser::startElement(const QString & /* namespaceURI */,
- const QString & /* localName */,
- const QString &qName,
- const QXmlAttributes &attributes)
-{
- if (!metJapiTag && qName != "japi") {
- // ### The file is not a JAPI file.
- return true;
- }
- metJapiTag = true;
-
- EnumNode *javaEnum = 0;
- EnumNode *cppEnum = 0;
- InnerNode *javaParent = javaTre->root();
- InnerNode *cppParent = cppTre->root();
-
- for (int i = 0; i < classAndEnumStack.count(); ++i) {
- const ClassOrEnumInfo &info = classAndEnumStack.at(i);
- if (info.cppNode) {
- if (info.cppNode->type() == Node::Enum) {
- Q_ASSERT(info.javaNode->type() == Node::Enum);
- javaEnum = static_cast<EnumNode *>(info.javaNode);
- cppEnum = static_cast<EnumNode *>(info.cppNode);
- } else {
- Q_ASSERT(info.javaNode->type() == Node::Class
- || info.javaNode->type() == Node::Namespace);
- javaParent = static_cast<InnerNode *>(info.javaNode);
- cppParent = static_cast<InnerNode *>(info.cppNode);
- }
- }
- }
-
- if (qName == "class" || qName == "enum") {
- Node::Type type = (qName == "class") ? Node::Class : Node::Enum;
-
- QString javaExtends = attributes.value("java-extends");
- QString javaImplements = attributes.value("javaimplements");
-
- ClassOrEnumInfo info;
- info.tag = qName;
- info.javaName = attributes.value("java");
- info.cppName = attributes.value("cpp");
- info.cppNode = cppTre->findNode(info.cppName.split("::"), type, cppParent);
- if (!info.cppNode && type == Node::Class) {
- type = Node::Namespace;
- info.cppNode = cppTre->findNode(info.cppName.split("::"), type, cppParent);
- }
-
- if (!info.cppNode) {
- japiLocation.warning(tr("Cannot find C++ class or enum '%1'").arg(info.cppName));
- } else {
- if (qName == "class") {
- ClassNode *javaClass = new ClassNode(javaParent, info.javaName);
- javaClass->setModuleName(attributes.value("package"));
- if (!javaExtends.isEmpty())
- javaTre->addBaseClass(javaClass, Node::Public, javaExtends.split('.'),
- javaExtends);
- if (!javaImplements.isEmpty())
- javaTre->addBaseClass(javaClass, Node::Public, javaImplements.split('.'),
- javaExtends);
-
- info.javaNode = javaClass;
- } else {
- info.javaNode = new EnumNode(javaParent, info.javaName);
- }
- info.javaNode->setLocation(japiLocation);
- setStatus(info.javaNode, info.cppNode);
-
- setPass1JambifiedDoc(info.javaNode, info.cppNode);
- }
- classAndEnumStack.push(info);
- } else if (qName == "method" || qName == "signal") {
- QString javaSignature = attributes.value("java");
- if (javaSignature.startsWith("private"))
- return true;
-
- QString cppSignature = attributes.value("cpp");
-
- CppCodeParser cppParser;
- const FunctionNode *cppNode = cppParser.findFunctionNode(cppSignature, cppTre,
- cppParent,
- true /* fuzzy */);
- if (!cppNode) {
- bool quiet = false;
-
- /*
- Default constructors sometimes don't exist in C++.
- */
- if (!quiet && javaSignature == "public " + javaParent->name() + "()")
- quiet = true;
-
- if (!quiet)
- japiLocation.warning(tr("Cannot find C++ function '%1' ('%2')")
- .arg(cppSignature).arg(cppParent->name()));
- }
-
- FunctionNode *javaNode;
- if (makeFunctionNode(javaParent, javaSignature, &javaNode)) {
- javaNode->setLocation(japiLocation);
- if (qName == "signal")
- javaNode->setMetaness(FunctionNode::Signal);
-
- if (cppNode) {
- setStatus(javaNode, cppNode);
-
- int overloadNo = cppNode->parameters().count() - javaNode->parameters().count() + 1;
- if (overloadNo == 1) {
- setPass1JambifiedDoc(javaNode, cppNode);
- } else {
- Text text;
-
- text << Atom::ParaLeft << "Equivalent to "
- << Atom(Atom::Link, javaNode->name() + "()")
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK)
- << javaNode->name()
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK)
- << "(";
-
- for (int i = 0; i < cppNode->parameters().count(); ++i) {
- if (i > 0)
- text << ", ";
- if (i < javaNode->parameters().count()) {
- text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_PARAMETER)
- << javaNode->parameters().at(i).name()
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_PARAMETER);
- } else {
- // ### convert to Java
- text << cppNode->parameters().at(i).defaultValue();
- }
- }
-
- text << ").";
-
- Doc doc;
- doc.setBody(text);
- javaNode->setDoc(doc, true);
- }
- javaNode->setOverload(overloadNo > 1);
- }
- }
- } else if (qName == "variablesetter" || qName == "variablegetter") {
- QString javaSignature = attributes.value("java");
- if (javaSignature.startsWith("private"))
- return true;
-
- QString cppVariable = attributes.value("cpp");
-
- VariableNode *cppNode = static_cast<VariableNode *>(cppParent->findNode(cppVariable,
- Node::Variable));
- FunctionNode *javaNode;
- if (makeFunctionNode(javaParent, javaSignature, &javaNode)) {
- javaNode->setLocation(japiLocation);
-
- if (!cppNode) {
-#if 0
- japiLocation.warning(tr("Cannot find C++ variable '%1' ('%2')")
- .arg(cppVariable).arg(cppParent->name()));
-#endif
- javaNode->setDoc(Doc(japiLocation, japiLocation,
- USED_INTERNALLY,
- QSet<QString>()), true);
- } else {
- setPass1JambifiedDoc(javaNode, cppNode, qName);
- setStatus(javaNode, cppNode);
- }
- }
- } else if (qName == "enum-value") {
- QString javaName = attributes.value("java");
- QString cppName = attributes.value("cpp");
- QString value = attributes.value("value");
-
- if (javaEnum) {
- EnumItem item(javaName, value, findEnumText(javaEnum, javaName));
- javaEnum->addItem(item);
- }
- }
-
- return true;
-}
-
-bool JambiApiParser::endElement(const QString & /* namespaceURI */,
- const QString & /* localName */,
- const QString &qName)
-{
- if (qName == "class" || qName == "enum")
- classAndEnumStack.pop();
- return true;
-}
-
-bool JambiApiParser::fatalError(const QXmlParseException &exception)
-{
- japiLocation.setLineNo(exception.lineNumber());
- japiLocation.setColumnNo(exception.columnNumber());
- japiLocation.warning(tr("Syntax error in JAPI file (%1)").arg(exception.message()));
- return true;
-}
-
-void JambiApiParser::jambifyDocsPass2(Node *node)
-{
- const Doc &doc = node->doc();
- if (!doc.isEmpty()) {
- if (node->type() == Node::Enum) {
- Doc newDoc(doc);
- newDoc.simplifyEnumDoc();
- node->setDoc(newDoc, true);
- }
- }
-
- if (node->isInnerNode()) {
- InnerNode *innerNode = static_cast<InnerNode *>(node);
- foreach (Node *child, innerNode->childNodes())
- jambifyDocsPass2(child);
- }
-}
-
-bool JambiApiParser::makeFunctionNode(InnerNode *parent, const QString &synopsis,
- FunctionNode **funcPtr)
-{
- Node::Access access = Node::Public;
- FunctionNode::Metaness metaness = FunctionNode::Plain;
- bool final = false;
- bool statique = false;
-
- QString mySynopsis = synopsis.simplified();
- int oldLen;
- do {
- oldLen = mySynopsis.length();
-
- if (mySynopsis.startsWith("public ")) {
- mySynopsis.remove(0, 7);
- access = Node::Public;
- }
- if (mySynopsis.startsWith("protected ")) {
- mySynopsis.remove(0, 10);
- access = Node::Protected;
- }
- if (mySynopsis.startsWith("private ")) {
- mySynopsis.remove(0, 8);
- access = Node::Private;
- }
- if (mySynopsis.startsWith("native ")) {
- mySynopsis.remove(0, 7);
- metaness = FunctionNode::Native;
- }
- if (mySynopsis.startsWith("final ")) {
- mySynopsis.remove(0, 6);
- final = true;
- }
- if (mySynopsis.startsWith("static ")) {
- mySynopsis.remove(0, 7);
- statique = true;
- }
- } while (oldLen != mySynopsis.length());
-
- // method or constructor
- QRegExp funcRegExp("(?:(.*) )?([A-Za-z_0-9]+)\\((.*)\\)");
- if (!funcRegExp.exactMatch(mySynopsis))
- return false;
-
- QString retType = funcRegExp.cap(1);
- QString funcName = funcRegExp.cap(2);
- QStringList params = funcRegExp.cap(3).split(",");
-
- FunctionNode *func = new FunctionNode(parent, funcName);
- func->setReturnType(retType);
- func->setAccess(access);
- func->setStatic(statique);
- func->setConst(final);
- func->setMetaness(metaness);
-
- QRegExp paramRegExp(" ?([^ ].*) ([A-Za-z_0-9]+) ?");
-
- foreach (const QString &param, params) {
- if (paramRegExp.exactMatch(param)) {
- func->addParameter(Parameter(paramRegExp.cap(1), "", paramRegExp.cap(2)));
- } else {
- // problem
- }
- }
-
- if (funcPtr) {
- *funcPtr = func;
- } else if (!parent) {
- delete func;
- }
- return true;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/jambiapiparser.h b/tools/qdoc3/jambiapiparser.h
deleted file mode 100644
index ecfaab5..0000000
--- a/tools/qdoc3/jambiapiparser.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- jambiapiparser.h
-*/
-
-#ifndef JAMBIAPIPARSER_H
-#define JAMBIAPIPARSER_H
-
-#include <QStack>
-#include <QXmlDefaultHandler>
-
-#include "codeparser.h"
-
-QT_BEGIN_NAMESPACE
-
-struct ClassOrEnumInfo
-{
- QString tag;
- QString javaName;
- QString cppName;
- Node *javaNode;
- Node *cppNode;
-
- ClassOrEnumInfo() : javaNode(0), cppNode(0) {}
-};
-
-class JambiApiParser : public CodeParser, private QXmlDefaultHandler
-{
-public:
- JambiApiParser(Tree *cppTree);
- ~JambiApiParser();
-
- void initializeParser(const Config &config);
- void terminateParser();
- QString language();
- QString sourceFileNameFilter();
- void parseSourceFile(const Location &location, const QString &filePath, Tree *tree);
- virtual void doneParsingSourceFiles(Tree *tree);
-
-private:
- bool startElement(const QString &namespaceURI, const QString &localName,
- const QString &qName, const QXmlAttributes &attributes);
- bool endElement(const QString &namespaceURI, const QString &localName,
- const QString &qName);
- bool fatalError(const QXmlParseException &exception);
- void jambifyDocsPass2(Node *node);
- bool makeFunctionNode(InnerNode *parent, const QString &synopsis, FunctionNode **funcPtr);
-
- Tree *cppTre;
- Tree *javaTre;
-
- bool metJapiTag;
- Location japiLocation;
- QStack<ClassOrEnumInfo> classAndEnumStack;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/javacodemarker.cpp b/tools/qdoc3/javacodemarker.cpp
deleted file mode 100644
index c9a8f60..0000000
--- a/tools/qdoc3/javacodemarker.cpp
+++ /dev/null
@@ -1,203 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- javacodemarker.cpp
-*/
-
-#include "javacodemarker.h"
-#include "node.h"
-#include "text.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-JavaCodeMarker::JavaCodeMarker()
-{
-}
-
-JavaCodeMarker::~JavaCodeMarker()
-{
-}
-
-bool JavaCodeMarker::recognizeCode( const QString& /* code */ )
-{
- return true;
-}
-
-bool JavaCodeMarker::recognizeExtension( const QString& ext )
-{
- return ext == "java";
-}
-
-bool JavaCodeMarker::recognizeLanguage( const QString& lang )
-{
- return lang == "Java";
-}
-
-QString JavaCodeMarker::plainName( const Node *node )
-{
- return node->name();
-}
-
-QString JavaCodeMarker::plainFullName( const Node *node, const Node * /* relative */ )
-{
- if (!node)
- return QString();
-
- QString fullName;
- for ( ;; ) {
- fullName.prepend( plainName(node) );
- if ( node->parent() && node->parent()->name().isEmpty() )
- break;
- node = node->parent();
- if (!node)
- break;
- fullName.prepend(".");
- }
- return fullName;
-}
-
-QString JavaCodeMarker::markedUpCode( const QString& code,
- const Node * /* relative */,
- const QString& /* dirPath */ )
-{
- return protect( code );
-}
-
-QString JavaCodeMarker::markedUpSynopsis(const Node * /* node */,
- const Node * /* relative */,
- SynopsisStyle /* style */)
-{
- return QString();
-}
-
-QString JavaCodeMarker::markedUpName( const Node *node )
-{
- return linkTag(node, taggedNode(node));
-}
-
-QString JavaCodeMarker::markedUpFullName(const Node *node, const Node * /* relative */ )
-{
- QString fullName;
- for ( ;; ) {
- fullName.prepend( markedUpName(node) );
- if ( node->parent()->name().isEmpty() )
- break;
- node = node->parent();
- fullName.prepend( "." );
- }
- return fullName;
-}
-
-QString JavaCodeMarker::markedUpEnumValue(const QString &enumValue,
- const Node * /* relative */)
-{
- return protect(enumValue);
-}
-
-QString JavaCodeMarker::markedUpIncludes( const QStringList& /* includes */ )
-{
- return QString();
-}
-
-QString JavaCodeMarker::functionBeginRegExp( const QString& /* funcName */)
-{
- return "^x$"; // ### invalid regexp
-}
-
-QString JavaCodeMarker::functionEndRegExp( const QString& /* funcName */ )
-{
- return "^}";
-}
-
-QList<Section> JavaCodeMarker::sections(const InnerNode * /* inner */, SynopsisStyle /* style */,
- Status /* status */)
-{
- return QList<Section>();
-}
-
-const Node *JavaCodeMarker::resolveTarget(const QString &target,
- const Tree *tree,
- const Node *relative,
- const Node* /* self */)
-{
- if (target.endsWith("()")) {
- const FunctionNode *func;
- QString funcName = target;
- funcName.chop(2);
-
- QStringList path = funcName.split('.');
- if ((func = tree->findFunctionNode(path, relative, Tree::SearchBaseClasses)))
- return func;
- } else if (target.contains("#")) {
- int hashAt = target.indexOf("#");
- QString link = target.left(hashAt);
- QString ref = target.mid(hashAt + 1);
- const Node *node;
- if (link.isEmpty()) {
- node = relative;
- } else {
- QStringList path(link);
- node = tree->findNode(path, tree->root(), Tree::SearchBaseClasses);
- }
- if (node && node->isInnerNode()) {
- const Atom *atom = node->doc().body().firstAtom();
- while (atom) {
- if (atom->type() == Atom::Target && atom->string() == ref) {
- Node *parentNode = const_cast<Node *>(node);
- return new TargetNode(static_cast<InnerNode*>(parentNode),
- ref);
- }
- atom = atom->next();
- }
- }
- } else {
- QStringList path = target.split('.');
- const Node *node;
- if ((node = tree->findNode(path, relative,
- Tree::SearchBaseClasses | Tree::SearchEnumValues)))
- return node;
- }
- return 0;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/javacodemarker.h b/tools/qdoc3/javacodemarker.h
deleted file mode 100644
index c2aabc0..0000000
--- a/tools/qdoc3/javacodemarker.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- javacodemarker.h
-*/
-
-#ifndef JAVACODEMARKER_H
-#define JAVACODEMARKER_H
-
-#include "codemarker.h"
-
-QT_BEGIN_NAMESPACE
-
-class JavaCodeMarker : public CodeMarker
-{
-public:
- JavaCodeMarker();
- ~JavaCodeMarker();
-
- bool recognizeCode( const QString& code );
- bool recognizeExtension( const QString& ext );
- bool recognizeLanguage( const QString& lang );
- QString plainName(const Node *node);
- QString plainFullName(const Node *node, const Node *relative);
- QString markedUpCode( const QString& code, const Node *relative,
- const QString& dirPath );
- QString markedUpSynopsis( const Node *node, const Node *relative,
- SynopsisStyle style );
- QString markedUpName( const Node *node );
- QString markedUpFullName( const Node *node, const Node *relative );
- QString markedUpEnumValue(const QString &enumValue, const Node *relative);
- QString markedUpIncludes( const QStringList& includes );
- QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status);
- QString functionBeginRegExp( const QString& funcName );
- QString functionEndRegExp( const QString& funcName );
- const Node* resolveTarget( const QString& target,
- const Tree* tree,
- const Node* relative,
- const Node* self = 0 );
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/javadocgenerator.cpp b/tools/qdoc3/javadocgenerator.cpp
deleted file mode 100644
index eb9c1c9..0000000
--- a/tools/qdoc3/javadocgenerator.cpp
+++ /dev/null
@@ -1,454 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "javadocgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-enum JavaSignatureSyntax {
- GeneratedJdocFile,
- JavadocRef,
- SlotSignature
-};
-
-static QString javaSignature(const FunctionNode *func, JavaSignatureSyntax syntax,
- int maxParams = 65535)
-{
- maxParams = qMin(maxParams, func->parameters().count());
-
- QString result;
-
- if (syntax == GeneratedJdocFile) {
- if (func->access() == Node::Public) {
- result += "public ";
- } else if (func->access() == Node::Protected) {
- result += "protected ";
- } else {
- result += "private ";
- }
-
- if (func->metaness() == FunctionNode::Native)
- result += "native ";
-
- if (func->isConst())
- result += "final ";
-
- // ### func->metaness() == FunctionNode::Abstract
-
- if (func->isStatic())
- result += "static ";
-
- if (!func->returnType().isEmpty()) {
- result += func->returnType();
- result += ' ';
- }
- }
-
- if (syntax == SlotSignature) {
- result += "void mySlot";
- } else {
- result += func->name();
- }
- result += '(';
- for (int i = 0; i < maxParams; ++i) {
- if (i != 0)
- result += ", ";
- result += func->parameters().at(i).leftType();
- if (syntax != JavadocRef) {
- result += ' ';
- result += func->parameters().at(i).name();
- }
- }
- result += ')';
-
- return result;
-}
-
-static QString packageName(const Node *node)
-{
- while (node && node->type() != Node::Class && node->type() != Node::Fake)
- node = node->parent();
- if (!node)
- return QString();
- return node->moduleName();
-}
-
-JavadocGenerator::JavadocGenerator()
- : oldDevice(0), currentDepth(0)
-{
-}
-
-JavadocGenerator::~JavadocGenerator()
-{
-}
-
-void JavadocGenerator::initializeGenerator(const Config &config)
-{
- HtmlGenerator::initializeGenerator(config);
-
- formattingLeftMap().insert(ATOM_FORMATTING_PARAMETER,
- formattingLeftMap().value(ATOM_FORMATTING_TELETYPE));
- formattingRightMap().insert(ATOM_FORMATTING_PARAMETER,
- formattingRightMap().value(ATOM_FORMATTING_TELETYPE));
-}
-
-void JavadocGenerator::terminateGenerator()
-{
- HtmlGenerator::terminateGenerator();
-}
-
-QString JavadocGenerator::format()
-{
- return "javadoc";
-}
-
-void JavadocGenerator::generateTree(const Tree *tree, CodeMarker *marker)
-{
- HtmlGenerator::generateTree(tree, marker);
-}
-
-QString JavadocGenerator::fileExtension(const Node *node) const
-{
- if (node->type() == Node::Fake) {
- return "html";
- } else {
- return "jdoc";
- }
-}
-
-QString JavadocGenerator::typeString(const Node *node)
-{
- if (node->type() == Node::Function) {
- const FunctionNode *func = static_cast<const FunctionNode *>(node);
- return func->metaness() == FunctionNode::Signal ? "signal" : "method";
- } else {
- return HtmlGenerator::typeString(node);
- }
-}
-
-QString JavadocGenerator::imageFileName(const Node *relative, const QString& fileBase)
-{
- QString result = HtmlGenerator::imageFileName(relative, fileBase);
- if (!result.isEmpty()) {
- QString package = packageName(relative);
- int numSubPackages = package.count('.') - 2;
- while (numSubPackages > 0) {
- result.prepend("%2E%2E/"); // javadoc 1.5.0_06 chokes on '../'
- --numSubPackages;
- }
- }
- return result;
-}
-
-static int textDepth = 0;
-
-void JavadocGenerator::startText(const Node *relative, CodeMarker *marker)
-{
- if (textDepth++ == 0 && relative->type() != Node::Fake) {
- Q_ASSERT(!oldDevice);
- oldDevice = out().device();
- Q_ASSERT(oldDevice);
- out().setString(&buffer);
- }
- HtmlGenerator::startText(relative, marker);
-}
-
-void JavadocGenerator::endText(const Node *relative, CodeMarker *marker)
-{
- HtmlGenerator::endText(relative, marker);
- if (--textDepth == 0 && relative->type() != Node::Fake) {
- Q_ASSERT(oldDevice);
- out().setDevice(oldDevice);
- oldDevice = 0;
-
- /*
- Need to escape XML metacharacters in .jdoc files.
- */
- buffer.replace("*/", "*&lt;!-- noop --&gt;/");
- buffer.replace("&", "&amp;");
- buffer.replace("\"", "&quot;");
- buffer.replace("<", "&lt;");
- buffer.replace(">", "&gt;");
- out() << buffer;
- buffer.clear();
- }
-}
-
-int JavadocGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker)
-{
- return HtmlGenerator::generateAtom(atom, relative, marker);
-}
-
-void JavadocGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker)
-{
- generateIndent();
- out() << "<class name=\"" << protect(inner->name()) << "\"";
- generateDoc(inner, marker);
- out() << ">\n";
-
- ++currentDepth;
- foreach (Node *node, inner->childNodes()) {
- if (node->isInnerNode()) {
- generateClassLikeNode(static_cast<InnerNode *>(node), marker);
- } else {
- if (node->type() == Node::Enum) {
- EnumNode *enume = static_cast<EnumNode *>(node);
-
- generateIndent();
- out() << "<enum name=\"" << protect(node->name()) << "\"";
- generateDoc(node, marker);
- out() << ">\n";
-
- ++currentDepth;
- const QList<EnumItem> &items = enume->items();
- for (int i = 0; i < items.count(); ++i) {
- const EnumItem &item = items.at(i);
- generateIndent();
- out() << "<enum-value name=\"" << protect(item.name()) << "\"";
- generateEnumItemDoc(item.text(), enume, marker);
- out() << "/>\n";
- }
- --currentDepth;
-
- out() << "</enum>\n";
- } else if (node->type() == Node::Function) {
- FunctionNode *func = static_cast<FunctionNode *>(node);
- generateIndent();
- out() << (func->metaness() == FunctionNode::Signal ? "<signal" : "<method")
- << " name=\""
- << protect(javaSignature(func, GeneratedJdocFile))
- << "\"";
- generateDoc(node, marker);
- out() << "/>\n";
- }
- }
- }
- --currentDepth;
-
- generateIndent();
- out() << "</class>\n";
-}
-
-void JavadocGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
-{
- HtmlGenerator::generateFakeNode(fake, marker);
-}
-
-bool JavadocGenerator::generateText(const Text& text, const Node *relative, CodeMarker *marker)
-{
- HtmlGenerator::generateText(text, relative, marker);
- return true;
-}
-
-void JavadocGenerator::generateBody(const Node *node, CodeMarker *marker)
-{
- generateText(node->doc().body(), node, marker);
-}
-
-void JavadocGenerator::generateAlsoList( const Node *node, CodeMarker *marker )
-{
- QList<Text> alsoList = node->doc().alsoList();
- supplementAlsoList(node, alsoList);
-
- if (node->type() == Node::Fake
- || (node->type() == Node::Function
- && static_cast<const FunctionNode *>(node)->metaness() == FunctionNode::Signal)) {
- Text text;
-
- if (!alsoList.isEmpty()) {
- text << Atom(Atom::ListLeft, ATOM_LIST_TAG)
- << Atom(Atom::ListTagLeft, ATOM_LIST_TAG)
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
- << "See Also:"
- << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << Atom(Atom::ListTagRight, ATOM_LIST_TAG)
- << Atom(Atom::ListItemLeft, ATOM_LIST_TAG);
-
- for (int i = 0; i < alsoList.count(); ++i) {
- if (i != 0)
- text << ", ";
- text << alsoList.at(i);
- }
- text << Atom(Atom::ListItemRight, ATOM_LIST_TAG)
- << Atom(Atom::ListRight, ATOM_LIST_TAG);
- }
-
- generateText(text, node, marker);
- } else {
- foreach (const Text &text, alsoList) {
- out() << "\n@see ";
- generateText(text, node, marker);
- }
- }
-}
-
-QString JavadocGenerator::refForNode( const Node *node )
-{
- if (node->type() == Node::Function)
- return javaSignature(static_cast<const FunctionNode *>(node), JavadocRef);
-
- return HtmlGenerator::refForNode(node);
-}
-
-QString JavadocGenerator::linkForNode( const Node *node, const Node *relative )
-{
- // ### EVIL, relative should never be null
- if (!relative)
- relative = node;
-
- if (packageName(node).isEmpty()) {
- // ### jasmin: Fixme
- return QString();
- }
-
- QString result;
- if (node->type() == Node::Fake) {
- result = node->name();
- } else {
- if (!node->isInnerNode()) {
- result = linkForNode(node->parent(), relative) + "#" + refForNode(node);
- } else {
- result = node->name() + ".html";
- }
- }
-
- QStringList nodePackage = packageName(node).split(".");
- QStringList relativePackage = packageName(relative).split(".");
- if (nodePackage == QStringList(QString()) || relativePackage == QStringList(QString())) {
- qWarning("I'm in trouble [%s][%s]", qPrintable(node->name()), qPrintable(relative->name()));
- return QString();
- }
-
- int i = nodePackage.count() - 1;
- while (nodePackage.value(i) != relativePackage.value(i)) {
- result.prepend(nodePackage.at(i) + "/");
- --i;
- }
-
- ++i;
- while (i < relativePackage.count()) {
- result.prepend("%2E%2E/"); // javadoc 1.5.0_06 chokes on '../'
- ++i;
- }
-
- return result;
-}
-
-QString JavadocGenerator::refForAtom(Atom *atom, const Node *node)
-{
- return HtmlGenerator::refForAtom(atom, node);
-}
-
-/*
- Neutralize dumb functions called from HtmlGenerator.
-*/
-void JavadocGenerator::generateDcf(const QString & /* fileBase */, const QString & /* startPage */,
- const QString & /* title */, DcfSection & /* dcfRoot */)
-{
-}
-
-void JavadocGenerator::generateIndex(const QString & /* fileBase */, const QString & /* url */,
- const QString & /* title */)
-{
-}
-
-void JavadocGenerator::generateIndent()
-{
- for (int i = 0; i < currentDepth; ++i)
- out() << " ";
-}
-
-void JavadocGenerator::generateDoc(const Node *node, CodeMarker *marker)
-{
- const Text &text = node->doc().body();
- if (!text.isEmpty()) {
- out() << " doc=\"/**\n";
- Generator::generateStatus(node, marker);
- generateText(text, node, marker);
- if (node && node->type() == Node::Function) {
- const FunctionNode *func = static_cast<const FunctionNode *>(node);
- if (func->metaness() == FunctionNode::Signal) {
- QStringList slotSignatures;
- for (int i = func->parameters().count(); i >= 0; --i)
- slotSignatures += javaSignature(func, SlotSignature, i);
-
- Text text;
-
- text << Atom(Atom::ListLeft, ATOM_LIST_TAG)
- << Atom(Atom::ListTagLeft, ATOM_LIST_TAG)
- << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD);
-
- if (slotSignatures.count() == 1) {
- text << "Compatible Slot Signature:";
- } else {
- text << "Compatible Slot Signatures:";
- }
-
- text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD)
- << Atom(Atom::ListTagRight, ATOM_LIST_TAG);
-
- for (int i = 0; i < slotSignatures.count(); ++i) {
- text << Atom(Atom::ListItemLeft, ATOM_LIST_TAG)
- << Atom(Atom::C, marker->markedUpCode(slotSignatures.at(i), 0, ""))
- << Atom(Atom::ListItemRight, ATOM_LIST_TAG);
- }
- text << Atom(Atom::ListRight, ATOM_LIST_TAG);
- generateText(text, node, marker);
- }
- }
- if (node)
- generateAlsoList(node, marker);
- out() << " */\"";
- }
-}
-
-void JavadocGenerator::generateEnumItemDoc(const Text &text, const Node *node, CodeMarker *marker)
-{
- out() << " doc=\"/**\n";
- if (text.isEmpty()) {
- out() << "Internal.";
- } else {
- generateText(text, node, marker);
- }
- out() << " */\"";
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/javadocgenerator.h b/tools/qdoc3/javadocgenerator.h
deleted file mode 100644
index b485502..0000000
--- a/tools/qdoc3/javadocgenerator.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef JAVADOCGENERATOR_H
-#define JAVADOCGENERATOR_H
-
-#include "htmlgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-class JavadocGenerator : public HtmlGenerator
-{
-public:
- JavadocGenerator();
- ~JavadocGenerator();
-
- void initializeGenerator(const Config &config);
- void terminateGenerator();
- QString format();
- bool canHandleFormat(const QString &format) { return format == "HTML" || format == "javadoc"; }
- void generateTree(const Tree *tree, CodeMarker *marker);
- QString typeString(const Node *node);
- QString imageFileName(const Node *relative, const QString &fileBase);
-
-protected:
- QString fileExtension(const Node *node) const;
- void startText( const Node *relative, CodeMarker *marker );
- void endText( const Node *relative, CodeMarker *marker );
- int generateAtom( const Atom *atom, const Node *relative, CodeMarker *marker );
- void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker);
- void generateFakeNode( const FakeNode *fake, CodeMarker *marker );
-
- bool generateText( const Text& text, const Node *relative, CodeMarker *marker );
- void generateBody( const Node *node, CodeMarker *marker );
- void generateAlsoList( const Node *node, CodeMarker *marker );
-
- QString refForNode( const Node *node );
- QString linkForNode( const Node *node, const Node *relative );
- QString refForAtom(Atom *atom, const Node *node);
-
-private:
- void generateDcf(const QString &fileBase, const QString &startPage,
- const QString &title, DcfSection &dcfRoot);
- void generateIndex(const QString &fileBase, const QString &url,
- const QString &title);
- void generateIndent();
- void generateDoc(const Node *node, CodeMarker *marker);
- void generateEnumItemDoc(const Text &text, const Node *node, CodeMarker *marker);
-
- QString buffer;
- QIODevice *oldDevice;
- int currentDepth;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp
new file mode 100644
index 0000000..84a28c6
--- /dev/null
+++ b/tools/qdoc3/jscodemarker.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ jscodemarker.cpp
+*/
+
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsengine_p.h"
+#include "private/qdeclarativejslexer_p.h"
+#include "private/qdeclarativejsnodepool_p.h"
+#include "private/qdeclarativejsparser_p.h"
+
+#include "atom.h"
+#include "node.h"
+#include "jscodemarker.h"
+#include "qmlmarkupvisitor.h"
+#include "text.h"
+#include "tree.h"
+
+QT_BEGIN_NAMESPACE
+
+JsCodeMarker::JsCodeMarker()
+{
+}
+
+JsCodeMarker::~JsCodeMarker()
+{
+}
+
+/*!
+ Returns true if the \a code is recognized by the parser.
+ */
+bool JsCodeMarker::recognizeCode(const QString &code)
+{
+ QDeclarativeJS::Engine engine;
+ QDeclarativeJS::Lexer lexer(&engine);
+ QDeclarativeJS::Parser parser(&engine);
+ QDeclarativeJS::NodePool m_nodePool("<JsCodeMarker::recognizeCode>", &engine);
+
+ QString newCode = code;
+ QList<QDeclarativeJS::AST::SourceLocation> pragmas = extractPragmas(newCode);
+ lexer.setCode(newCode, 1);
+
+ return parser.parseProgram();
+}
+
+/*!
+ Returns true if \a ext is any of a list of file extensions
+ for the QML language.
+ */
+bool JsCodeMarker::recognizeExtension(const QString &ext)
+{
+ return ext == "js";
+}
+
+/*!
+ Returns true if the \a language is recognized. Only "QML" is
+ recognized by this marker.
+ */
+bool JsCodeMarker::recognizeLanguage(const QString &language)
+{
+ return language == "JavaScript" || language == "ECMAScript";
+}
+
+QString JsCodeMarker::markedUpCode(const QString &code,
+ const Node *relative,
+ const QString &dirPath)
+{
+ return addMarkUp(code, relative, dirPath);
+}
+
+QString JsCodeMarker::addMarkUp(const QString &code,
+ const Node * /* relative */,
+ const QString & /* dirPath */)
+{
+ QDeclarativeJS::Engine engine;
+ QDeclarativeJS::Lexer lexer(&engine);
+
+ QString newCode = code;
+ QList<QDeclarativeJS::AST::SourceLocation> pragmas = extractPragmas(newCode);
+ lexer.setCode(newCode, 1);
+
+ QDeclarativeJS::Parser parser(&engine);
+ QDeclarativeJS::NodePool m_nodePool("<JsCodeMarker::addMarkUp>", &engine);
+ QString output;
+
+ if (parser.parseProgram()) {
+ QDeclarativeJS::AST::Node *ast = parser.rootNode();
+ // Pass the unmodified code to the visitor so that pragmas and other
+ // unhandled source text can be output.
+ QmlMarkupVisitor visitor(code, pragmas, &engine);
+ QDeclarativeJS::AST::Node::accept(ast, &visitor);
+ output = visitor.markedUpCode();
+ }
+ return output;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/archiveextractor.h b/tools/qdoc3/jscodemarker.h
index 678945a..f7cb025 100644
--- a/tools/qdoc3/archiveextractor.h
+++ b/tools/qdoc3/jscodemarker.h
@@ -40,37 +40,33 @@
****************************************************************************/
/*
- archiveextractor.h
+ jscodemarker.h
*/
-#ifndef ARCHIVEEXTRACTOR_H
-#define ARCHIVEEXTRACTOR_H
+#ifndef JSCODEMARKER_H
+#define JSCODEMARKER_H
-#include <qstringlist.h>
-
-#include "location.h"
+#include "qmlcodemarker.h"
QT_BEGIN_NAMESPACE
-class ArchiveExtractor
+class JsCodeMarker : public QmlCodeMarker
{
public:
- ArchiveExtractor( const QStringList& extensions );
- virtual ~ArchiveExtractor();
-
- virtual void extractArchive( const Location& location,
- const QString& filePath,
- const QString& outputDir ) = 0;
+ JsCodeMarker();
+ ~JsCodeMarker();
- static ArchiveExtractor *extractorForFileName( const QString& fileName );
+ virtual bool recognizeCode(const QString &code);
+ virtual bool recognizeExtension(const QString &ext);
+ virtual bool recognizeLanguage(const QString &language);
-protected:
- const QStringList& fileExtensions() { return fileExts; }
+ virtual QString markedUpCode(const QString &code,
+ const Node *relative,
+ const QString &dirPath);
private:
- QStringList fileExts;
-
- static QList<ArchiveExtractor *> extractors;
+ QString addMarkUp(const QString &code, const Node * /* relative */,
+ const QString & /* dirPath */);
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/linguistgenerator.cpp b/tools/qdoc3/linguistgenerator.cpp
deleted file mode 100644
index 702f0fb..0000000
--- a/tools/qdoc3/linguistgenerator.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- linguistgenerator.cpp
-*/
-
-#include "codemarker.h"
-#include "pagegenerator.h"
-#include "linguistgenerator.h"
-#include "node.h"
-#include "separator.h"
-#include "tree.h"
-#include <ctype.h>
-
-#include <qlist.h>
-#include <qiterator.h>
-
-QT_BEGIN_NAMESPACE
-
-#define COMMAND_VERSION Doc::alias("version")
-
-LinguistGenerator::LinguistGenerator()
- : PageGenerator()
-{
-}
-
-LinguistGenerator::~LinguistGenerator()
-{
-}
-
-void LinguistGenerator::initializeGenerator(const Config &config)
-{
- Generator::initializeGenerator(config);
-}
-
-void LinguistGenerator::terminateGenerator()
-{
- PageGenerator::terminateGenerator();
-}
-
-QString LinguistGenerator::format()
-{
- return "Linguist";
-}
-
-QString LinguistGenerator::fileExtension(const Node * /* node */) const
-{
- return "ts";
-}
-
-void LinguistGenerator::generateClassLikeNode(const InnerNode *inner, CodeMarker *marker)
-{
- out().setCodec("UTF-8");
-
- QDomDocument document("TS");
- QDomElement documentElement = document.createElement("TS");
- documentElement.setAttribute("version", "1.1");
-
- QList<QDomElement> contextElements = generateIndexSections(document, inner, marker);
- foreach (const QDomElement &element, contextElements)
- documentElement.appendChild(element);
-
- QDomProcessingInstruction process = document.createProcessingInstruction(
- "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("UTF-8"));
- document.appendChild(process);
- document.appendChild(documentElement);
-
- out() << document;
- out().flush();
-}
-
-void LinguistGenerator::generateFakeNode( const FakeNode *fake, CodeMarker *marker )
-{
- out().setCodec("utf-8");
-
- QDomDocument document("TS");
- QDomElement documentElement = document.createElement("TS");
- documentElement.setAttribute("version", "1.1");
-
- QList<QDomElement> contextElements = generateIndexSections(document, fake, marker);
- foreach (const QDomElement &element, contextElements)
- documentElement.appendChild(element);
-
- QDomProcessingInstruction process = document.createProcessingInstruction(
- "xml", QString("version=\"1.0\" encoding=\"%1\"").arg("utf-8"));
- document.appendChild(process);
- document.appendChild(documentElement);
-
- out() << document;
- out().flush();
-}
-
-QList<QDomElement> LinguistGenerator::generateIndexSections(
- QDomDocument &document, const Node *node, CodeMarker *marker)
-{
- QList<QDomElement> contexts;
-
- if (node->isInnerNode()) {
- const InnerNode *inner = static_cast<const InnerNode *>(node);
-
- foreach (const Node *child, inner->childNodes()) {
- // Recurse to generate a DOM element for this child node and all
- // its children.
- contexts += generateIndexSections(document, child, marker);
- }
-/*
- foreach (const Node *child, inner->relatedNodes()) {
- QDomElement childElement = generateIndexSections(document, child, marker);
- element.appendChild(childElement);
- }
-*/
- }
-
- // Add documentation to this node if it exists.
- if (!node->doc().isEmpty()) {
-
- QString nodeName = fullName(node);
- QString signature;
-
- if (node->type() == Node::Function) {
- QStringList pieces;
- const FunctionNode *functionNode = static_cast<const FunctionNode*>(node);
- foreach (const Parameter &parameter, functionNode->parameters()) {
- QString typeString = parameter.leftType() + parameter.rightType();
- if (typeString.split(" ").size() > 1)
- pieces.append(typeString + parameter.name());
- else
- pieces.append(typeString + " " + parameter.name());
- }
- signature = "(" + pieces.join(", ") + ")";
- }
-
- QDomElement contextElement = document.createElement("context");
- QDomElement nameElement = document.createElement("name");
- nameElement.appendChild(document.createTextNode(nodeName + signature));
- contextElement.appendChild(nameElement);
-
- QDomElement messageElement = document.createElement("message");
- contextElement.appendChild(messageElement);
-
- QDomElement sourceElement = document.createElement("source");
- QString sourceText = simplified(node->doc().source());
- if (!signature.isEmpty() && signature != "()" && !sourceText.contains("\\fn"))
- sourceText.prepend(QString("\\fn %1%2\n").arg(nodeName).arg(signature));
- sourceElement.appendChild(document.createTextNode(sourceText));
- messageElement.appendChild(sourceElement);
-
- QDomElement translationElement = document.createElement("translation");
- translationElement.setAttribute("type", "unfinished");
- messageElement.appendChild(translationElement);
-
- QDomElement locationElement = document.createElement("location");
- locationElement.setAttribute("filename", node->doc().location().filePath());
- locationElement.setAttribute("line", node->doc().location().lineNo());
- messageElement.appendChild(locationElement);
-
- contexts.append(contextElement);
- }
-
- return contexts;
-}
-
-QString LinguistGenerator::fullName(const Node *node) const
-{
- if (!node)
- return "";
- else if (node->parent() && !node->parent()->name().isEmpty())
- return fullName(node->parent()) + "::" + node->name();
- else
- return node->name();
-}
-
-QString LinguistGenerator::simplified(const QString &text) const
-{
- QStringList lines = text.split("\n");
-
- while (lines.size() > 0 && lines.first().trimmed().isEmpty())
- lines.pop_front();
-
- while (lines.size() > 0 && lines.last().trimmed().isEmpty())
- lines.pop_back();
-
- int min = 0;
- bool set = false;
- foreach (const QString &line, lines) {
- int j = 0;
- while (j < line.length()) {
- if (line[j] != ' ')
- break;
- ++j;
- }
- if (j < line.length()) {
- if (!set) {
- min = j;
- set = true;
- } else
- min = qMin(min, j);
- }
- }
- for (int i = 0; i < lines.size(); ++i)
- lines[i] = lines[i].mid(min);
-
- return lines.join("\n");
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/location.cpp b/tools/qdoc3/location.cpp
index dee87d1..1257a45 100644
--- a/tools/qdoc3/location.cpp
+++ b/tools/qdoc3/location.cpp
@@ -390,10 +390,6 @@ QString Location::top() const
if (lineNo() >= 1) {
str += QLatin1Char(':');
str += QString::number(lineNo());
-#if 0
- if (columnNo() >= 1)
- str += ":" + QString::number(columnNo());
-#endif
}
if (etc())
str += QLatin1String(" (etc.)");
diff --git a/tools/qdoc3/loutgenerator.h b/tools/qdoc3/loutgenerator.h
deleted file mode 100644
index 484d38f..0000000
--- a/tools/qdoc3/loutgenerator.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- loutgenerator.h
-*/
-
-#ifndef LOUTGENERATOR_H
-#define LOUTGENERATOR_H
-
-#include "bookgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-class LoutGenerator : public BookGenerator
-{
-public:
- LoutGenerator();
- ~LoutGenerator();
-
- virtual QString format();
-
-protected:
- // ###
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 2bfe38e..782df39 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -45,30 +45,19 @@
#include <qglobal.h>
#include <stdlib.h>
-#include "apigenerator.h"
#include "codemarker.h"
#include "codeparser.h"
#include "config.h"
#include "cppcodemarker.h"
#include "cppcodeparser.h"
-#include "cpptoqsconverter.h"
+#include "ditaxmlgenerator.h"
#include "doc.h"
#include "htmlgenerator.h"
-#include "jambiapiparser.h"
-#include "javacodemarker.h"
-#include "javadocgenerator.h"
-#include "linguistgenerator.h"
-#include "loutgenerator.h"
-#include "mangenerator.h"
+#include "jscodemarker.h"
#include "plaincodemarker.h"
-#include "polyarchiveextractor.h"
-#include "polyuncompressor.h"
-#include "qsakernelparser.h"
-#include "qscodemarker.h"
-#include "qscodeparser.h"
-#include "sgmlgenerator.h"
-#include "webxmlgenerator.h"
-#include "ditaxmlgenerator.h"
+#include "puredocparser.h"
+#include "qmlcodemarker.h"
+#include "qmlcodeparser.h"
#include "tokenizer.h"
#include "tree.h"
#include <qdebug.h>
@@ -105,22 +94,6 @@ static bool showInternal = false;
static bool obsoleteLinks = false;
static QStringList defines;
static QHash<QString, Tree *> trees;
-static QString appArg; // application
-
-/*!
- Find the Tree for language \a lang and return a pointer to it.
- If there is no Tree for language \a lang in the Tree table, add
- a new one. The Tree table is indexed by \a lang strings.
- */
-static Tree* treeForLanguage(const QString &lang)
-{
- Tree* tree = trees.value(lang);
- if (tree == 0) {
- tree = new Tree;
- trees.insert( lang, tree );
- }
- return tree;
-}
/*!
Print the help message to \c stdout.
@@ -193,24 +166,6 @@ static void processQdocconfFile(const QString &fileName)
config.load(fileName);
/*
- Set the application to which qdoc will create the output.
- The two applications are:
-
- creator: additional formatting for viewing in
- the Creator application.
-
- online: full-featured online version with search and
- links to Qt topics
- */
- if (appArg.isEmpty()) {
- qDebug() << "Warning: Application flag not specified on"
- << "command line. Options are -creator (default)"
- << "and -online.";
- appArg = "creator";
- }
- config.setStringList(CONFIG_APPLICATION, QStringList(appArg));
-
- /*
Add the defines to the configuration variables.
*/
QStringList defs = defines + config.getStringList(CONFIG_DEFINES);
@@ -229,7 +184,6 @@ static void processQdocconfFile(const QString &fileName)
Location::initialize(config);
Tokenizer::initialize(config);
Doc::initialize(config);
- CppToQsConverter::initialize(config);
CodeMarker::initialize(config);
CodeParser::initialize(config);
Generator::initialize(config);
@@ -270,74 +224,75 @@ static void processQdocconfFile(const QString &fileName)
tree->setVersion(config.getString(CONFIG_VERSION));
/*
- There must be a code parser for the source code language, e.g. C++.
- If there isn't one, give up.
- */
- CodeParser *codeParser = CodeParser::parserForLanguage(lang);
- if (codeParser == 0)
- config.lastLocation().fatal(tr("Cannot parse programming language '%1'").arg(lang));
-
- /*
By default, the only output format is HTML.
*/
QSet<QString> outputFormats = config.getStringSet(CONFIG_OUTPUTFORMATS);
Location outputFormatsLocation = config.lastLocation();
/*
- There must be a code marker for the source code language, e.g. C++.
- If there isn't one, give up.
- */
- CodeMarker *marker = CodeMarker::markerForLanguage(lang);
- if (!marker && !outputFormats.isEmpty())
- langLocation.fatal(tr("Cannot output documentation for programming language '%1'").arg(lang));
-
- /*
- Read some XML indexes. What are they???
+ Read some XML indexes containing definitions from other documentation sets.
*/
QStringList indexFiles = config.getStringList(CONFIG_INDEXES);
tree->readIndexes(indexFiles);
-
+
/*
- Get all the header files: "*.ch *.h *.h++ *.hh *.hpp *.hxx"
- Put them in a set.
+ Read the list of excluded directories.
*/
QSet<QString> excludedDirs;
QStringList excludedDirsList = config.getStringList(CONFIG_EXCLUDEDIRS);
foreach (const QString &excludeDir, excludedDirsList)
excludedDirs.insert(QDir::fromNativeSeparators(excludeDir));
- QSet<QString> headers = QSet<QString>::fromList(
- config.getAllFiles(CONFIG_HEADERS, CONFIG_HEADERDIRS,
- codeParser->headerFileNameFilter(),
- excludedDirs));
/*
- Parse each header file in the set and add it to the big tree.
+ Get all the header files: "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+ Put them in a set.
*/
- QSet<QString>::ConstIterator h = headers.begin();
- while (h != headers.end()) {
- codeParser->parseHeaderFile(config.location(), *h, tree);
- ++h;
- }
- codeParser->doneParsingHeaderFiles(tree);
+ QSet<QString> headers = QSet<QString>::fromList(
+ config.getAllFiles(CONFIG_HEADERS, CONFIG_HEADERDIRS, excludedDirs));
/*
Get all the source text files: "*.cpp *.qdoc *.mm"
Put them in a set.
*/
QSet<QString> sources = QSet<QString>::fromList(
- config.getAllFiles(CONFIG_SOURCES, CONFIG_SOURCEDIRS,
- codeParser->sourceFileNameFilter(),
- excludedDirs));
+ config.getAllFiles(CONFIG_SOURCES, CONFIG_SOURCEDIRS, excludedDirs));
+
+ /*
+ Parse each header file in the set using the appropriate parser and add it
+ to the big tree.
+ */
+ QSet<CodeParser *> usedParsers;
+ QSet<QString>::ConstIterator h = headers.begin();
+ while (h != headers.end()) {
+ CodeParser *codeParser = CodeParser::parserForHeaderFile(*h);
+ if (codeParser) {
+ codeParser->parseHeaderFile(config.location(), *h, tree);
+ usedParsers.insert(codeParser);
+ }
+ ++h;
+ }
+
+ foreach (CodeParser *codeParser, usedParsers)
+ codeParser->doneParsingHeaderFiles(tree);
+
+ usedParsers.clear();
/*
- Parse each source text file in the set and add it to the big tree.
+ Parse each source text file in the set using the appropriate parser and
+ add it to the big tree.
*/
QSet<QString>::ConstIterator s = sources.begin();
while (s != sources.end()) {
- codeParser->parseSourceFile(config.location(), *s, tree);
+ CodeParser *codeParser = CodeParser::parserForSourceFile(*s);
+ if (codeParser) {
+ codeParser->parseSourceFile(config.location(), *s, tree);
+ usedParsers.insert(codeParser);
+ }
++s;
}
- codeParser->doneParsingSourceFiles(tree);
+
+ foreach (CodeParser *codeParser, usedParsers)
+ codeParser->doneParsingSourceFiles(tree);
/*
Now the big tree has been built from all the header and
@@ -358,7 +313,7 @@ static void processQdocconfFile(const QString &fileName)
if (generator == 0)
outputFormatsLocation.fatal(tr("Unknown output format '%1'")
.arg(*of));
- generator->generateTree(tree, marker);
+ generator->generateTree(tree);
++of;
}
@@ -374,7 +329,6 @@ static void processQdocconfFile(const QString &fileName)
Generator::terminate();
CodeParser::terminate();
CodeMarker::terminate();
- CppToQsConverter::terminate();
Doc::terminate();
Tokenizer::terminate();
Location::terminate();
@@ -401,52 +355,24 @@ int main(int argc, char **argv)
#ifndef QT_BOOTSTRAPPED
QCoreApplication app(argc, argv);
#endif
- QString cf = "qsauncompress \1 \2";
- PolyArchiveExtractor qsaExtractor(QStringList() << "qsa",cf);
- cf = "tar -C \2 -xf \1";
- PolyArchiveExtractor tarExtractor(QStringList() << "tar",cf);
- cf = "tar -C \2 -Zxf \1";
- PolyArchiveExtractor tazExtractor(QStringList() << "taz",cf);
- cf = "tar -C \2 -jxf \1";
- PolyArchiveExtractor tbz2Extractor(QStringList() << "tbz" << "tbz2",cf);
- cf = "tar -C \2 -zxf \1";
- PolyArchiveExtractor tgzExtractor(QStringList() << "tgz",cf);
- cf = "unzip \1 -d \2";
- PolyArchiveExtractor zipExtractor(QStringList() << "zip",cf);
- cf = "bunzip2 -c \1 > \2";
- PolyUncompressor bz2Uncompressor(QStringList() << "bz" << "bz2",cf);
- cf = "gunzip -c \1 > \2";
- PolyUncompressor gzAndZUncompressor(QStringList() << "gz" << "z" << "Z",cf);
- cf = "unzip -c \1 > \2";
- PolyUncompressor zipUncompressor(QStringList() << "zip",cf);
/*
Create code parsers for the languages to be parsed,
and create a tree for C++.
*/
CppCodeParser cppParser;
- Tree *cppTree = treeForLanguage(cppParser.language());
-
- QsCodeParser qsParser(cppTree);
- QsaKernelParser qsaKernelParser(cppTree);
- JambiApiParser jambiParser(cppTree);
+ QmlCodeParser qmlParser;
+ PureDocParser docParser;
/*
- Create code markers for plain text, C++, Java, and qs.
+ Create code markers for plain text and C++.
*/
PlainCodeMarker plainMarker;
CppCodeMarker cppMarker;
- JavaCodeMarker javaMarker;
- QsCodeMarker qsMarker;
+ JsCodeMarker jsMarker;
+ QmlCodeMarker qmlMarker;
- ApiGenerator apiGenerator;
HtmlGenerator htmlGenerator;
- JavadocGenerator javadocGenerator;
- LinguistGenerator linguistGenerator;
- LoutGenerator loutGenerator;
- ManGenerator manGenerator;
- SgmlGenerator smglGenerator;
- WebXMLGenerator webxmlGenerator;
DitaXmlGenerator ditaxmlGenerator;
QStringList qdocFiles;
@@ -481,10 +407,6 @@ int main(int argc, char **argv)
else if (opt == "-obsoletelinks") {
obsoleteLinks = true;
}
- else if (opt == "-creator")
- appArg = "creator";
- else if (opt == "-online")
- appArg = "online";
else {
qdocFiles.append(opt);
}
diff --git a/tools/qdoc3/mangenerator.cpp b/tools/qdoc3/mangenerator.cpp
deleted file mode 100644
index 1e85b73..0000000
--- a/tools/qdoc3/mangenerator.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- mangenerator.cpp
-*/
-
-#include <qdatetime.h>
-#include <qregexp.h>
-
-#include "mangenerator.h"
-#include "node.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-ManGenerator::ManGenerator()
-{
- date = QDate::currentDate().toString( "d MMMM yyyy" );
-}
-
-ManGenerator::~ManGenerator()
-{
-}
-
-QString ManGenerator::format()
-{
- return "man";
-}
-
-int ManGenerator::generateAtom( const Atom *atom, const Node * /* relative */,
- CodeMarker * /* marker */ )
-{
-#if 0
- switch ( atom->type() ) {
- case Atom::AbstractBegin:
- break;
- case Atom::AbstractEnd:
- break;
- case Atom::Alias:
- break;
- case Atom::AliasArg:
- break;
- case Atom::BaseName:
- break;
- case Atom::BriefBegin:
- break;
- case Atom::BriefEnd:
- break;
- case Atom::C:
- break;
- case Atom::CaptionBegin:
- break;
- case Atom::CaptionEnd:
- break;
- case Atom::CitationBegin:
- break;
- case Atom::CitationEnd:
- break;
- case Atom::Code:
- break;
- case Atom::FootnoteBegin:
- break;
- case Atom::FootnoteEnd:
- break;
- case Atom::FormatBegin:
- break;
- case Atom::FormatEnd:
- break;
- case Atom::GeneratedList:
- break;
- case Atom::Image:
- break;
- case Atom::ImageText:
- break;
- case Atom::Link:
- break;
- case Atom::LinkNode:
- break;
- case Atom::ListBegin:
- break;
- case Atom::ListItemNumber:
- break;
- case Atom::ListItemBegin:
- out() << ".IP " << atom->string() << ".\n";
- break;
- case Atom::ListItemEnd:
- break;
- case Atom::ListEnd:
- break;
- case Atom::Nop:
- break;
- case Atom::ParaBegin:
- out() << ".PP\n";
- break;
- case Atom::ParaEnd:
- out() << "\n";
- break;
- case Atom::RawFormat:
- break;
- case Atom::RawString:
- break;
- case Atom::SectionBegin:
- break;
- case Atom::SectionEnd:
- break;
- case Atom::SectionHeadingBegin:
- break;
- case Atom::SectionHeadingEnd:
- break;
- case Atom::SidebarBegin:
- break;
- case Atom::SidebarEnd:
- break;
- case Atom::String:
- out() << protectTextLine( atom->string() );
- break;
- case Atom::TableBegin:
- break;
- case Atom::TableEnd:
- break;
- case Atom::TableOfContents:
- break;
- case Atom::Target:
- break;
- case Atom::UnknownCommand:
- ;
- }
-#endif
- unknownAtom( atom );
- return 0;
-}
-
-void ManGenerator::generateClassLikeNode( const InnerNode *classe,
- CodeMarker *marker )
-{
- generateHeader( classe->name() );
- out() << ".SH NAME\n"
- << classe->name() << "\n"
- << ".SH SYNOPSYS\n";
- generateBody( classe, marker );
- generateFooter();
-}
-
-void ManGenerator::generateFakeNode( const FakeNode *fake, CodeMarker *marker )
-{
- generateHeader( "foo" );
- generateBody( fake, marker );
- generateFooter();
-}
-
-QString ManGenerator::fileExtension(const Node * /* node */) const
-{
- return "3qt";
-}
-
-void ManGenerator::generateHeader( const QString& name )
-{
- out() << ".TH " << protectArg( name )
- << " " << protectArg( "3qt" )
- << " " << protectArg( date )
- << " " << protectArg( "Nokia Corporation and/or its subsidiary(-ies)" )
- << " " << protectArg( "Qt Toolkit" ) << "\n";
-}
-
-void ManGenerator::generateFooter()
-{
-}
-
-QString ManGenerator::protectArg( const QString& str )
-{
- for ( int i = 0; i < (int) str.length(); i++ ) {
- if ( str[i] == ' ' || str[i].isSpace() ) {
- QString quoted = str;
- quoted.replace( "\"", "\"\"" );
- return "\"" + quoted + "\"";
- }
- }
- return str;
-}
-
-QString ManGenerator::protectTextLine( const QString& str )
-{
- QString t = str;
- if ( t.startsWith(".") || t.startsWith("'") )
- t.prepend( "\\&" );
- return t;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index d787bc9..cca5e37 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -1562,11 +1562,6 @@ void QmlClassNode::clear()
*/
QString QmlClassNode::fileBase() const
{
-#if 0
- if (Node::fileBase() == "item")
- qDebug() << "FILEBASE: qmlitem" << name();
- return "qml_" + Node::fileBase();
-#endif
return Node::fileBase();
}
@@ -1702,6 +1697,9 @@ static QString valueType(const QString& n)
*/
bool QmlPropertyNode::isWritable(const Tree* tree) const
{
+ if (wri != Trool_Default)
+ return fromTrool(wri, false);
+
Node* n = parent();
while (n && n->subType() != Node::QmlClass)
n = n->parent();
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index 69f3ba5..096ff40 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -86,8 +86,8 @@ class Node
enum SubType {
NoSubType,
- Example,
- HeaderFile,
+ Example,
+ HeaderFile,
File,
Image,
Group,
@@ -113,7 +113,7 @@ class Node
Commendable,
Main,
Internal
- }; // don't reorder thisw enum
+ }; // don't reorder this enum
enum ThreadSafeness {
UnspecifiedSafeness,
diff --git a/tools/qdoc3/pagegenerator.cpp b/tools/qdoc3/pagegenerator.cpp
index ca98faa..4f2a2ee 100644
--- a/tools/qdoc3/pagegenerator.cpp
+++ b/tools/qdoc3/pagegenerator.cpp
@@ -46,6 +46,7 @@
#include <qfile.h>
#include <qfileinfo.h>
#include <qdebug.h>
+#include "codemarker.h"
#include "pagegenerator.h"
#include "tree.h"
@@ -175,9 +176,9 @@ bool PageGenerator::parseArg(const QString& src,
/*!
This function is recursive.
*/
-void PageGenerator::generateTree(const Tree *tree, CodeMarker *marker)
+void PageGenerator::generateTree(const Tree *tree)
{
- generateInnerNode(tree->root(), marker);
+ generateInnerNode(tree->root());
}
QString PageGenerator::fileBase(const Node *node) const
@@ -320,10 +321,10 @@ QTextStream &PageGenerator::out()
}
/*!
- Recursive writing of html files from the root \a node.
+ Recursive writing of HTML files from the root \a node.
*/
void
-PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker)
+PageGenerator::generateInnerNode(const InnerNode* node)
{
if (!node->url().isNull())
return;
@@ -342,6 +343,11 @@ PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker)
}
}
+ /*
+ Obtain a code marker for the source file.
+ */
+ CodeMarker *marker = CodeMarker::markerForFileName(node->location().filePath());
+
if (node->parent() != 0) {
beginSubPage(node->location(), fileName(node));
if (node->type() == Node::Namespace || node->type() == Node::Class) {
@@ -356,7 +362,7 @@ PageGenerator::generateInnerNode(const InnerNode* node, CodeMarker* marker)
NodeList::ConstIterator c = node->childNodes().begin();
while (c != node->childNodes().end()) {
if ((*c)->isInnerNode() && (*c)->access() != Node::Private)
- generateInnerNode((const InnerNode *) *c, marker);
+ generateInnerNode((const InnerNode *) *c);
++c;
}
}
diff --git a/tools/qdoc3/pagegenerator.h b/tools/qdoc3/pagegenerator.h
index 0fea67a..30ce9a5 100644
--- a/tools/qdoc3/pagegenerator.h
+++ b/tools/qdoc3/pagegenerator.h
@@ -64,7 +64,7 @@ class PageGenerator : public Generator
PageGenerator();
~PageGenerator();
- virtual void generateTree(const Tree* tree, CodeMarker* marker);
+ virtual void generateTree(const Tree *tree);
protected:
virtual QString fileBase(const Node* node) const;
@@ -73,7 +73,7 @@ class PageGenerator : public Generator
QString outFileName();
virtual void beginSubPage(const Location& location, const QString& fileName);
virtual void endSubPage();
- virtual void generateInnerNode(const InnerNode* node, CodeMarker* marker);
+ virtual void generateInnerNode(const InnerNode *node);
QTextStream& out();
QString naturalLanguage;
diff --git a/tools/qdoc3/polyarchiveextractor.cpp b/tools/qdoc3/polyarchiveextractor.cpp
deleted file mode 100644
index b2574ab..0000000
--- a/tools/qdoc3/polyarchiveextractor.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- polyarchiveextractor.cpp
-*/
-
-#include "command.h"
-#include "polyarchiveextractor.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class PolyArchiveExtractor
-
- \brief The PolyArchiveExtractor class is a class for unpacking
- archive files.
-
- This subclass of ArchiveExtractor contains a parameterized
- command for doing the archive extraction.
-
- It has an extractArchive() function you call to do the
- actual archive extraction.
- */
-
-/*!
- The constructor takes the list of filename \a extensions,
- which it passes to the base class, and the \a commandFormat,
- which it stores locally. The \a commandFormat is a command
- template string.
- */
-PolyArchiveExtractor::PolyArchiveExtractor( const QStringList& extensions,
- const QString& commandFormat )
- : ArchiveExtractor( extensions ), cmd( commandFormat )
-{
-}
-
-/*!
- The destructor doesn't have to do anything.
- */
-PolyArchiveExtractor::~PolyArchiveExtractor()
-{
-}
-
-/*!
- Call this function to do the actual archive extraction. It calls
- the executeCommand() function to do the work. That's all it does.
- */
-void PolyArchiveExtractor::extractArchive( const Location& location,
- const QString& filePath,
- const QString& outputDir )
-{
- executeCommand( location, cmd, QStringList() << filePath << outputDir );
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/polyarchiveextractor.h b/tools/qdoc3/polyarchiveextractor.h
deleted file mode 100644
index 7ed0f62..0000000
--- a/tools/qdoc3/polyarchiveextractor.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- polyarchiveextractor.h
-*/
-
-#ifndef POLYARCHIVEEXTRACTOR_H
-#define POLYARCHIVEEXTRACTOR_H
-
-#include "archiveextractor.h"
-
-QT_BEGIN_NAMESPACE
-
-class PolyArchiveExtractor : public ArchiveExtractor
-{
- public:
- PolyArchiveExtractor(const QStringList& extensions,
- const QString& commandFormat);
- ~PolyArchiveExtractor();
-
- virtual void extractArchive(const Location& location,
- const QString& filePath,
- const QString& outputDir);
-
- private:
- QString cmd;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/polyuncompressor.cpp b/tools/qdoc3/polyuncompressor.cpp
deleted file mode 100644
index 97b5e0d..0000000
--- a/tools/qdoc3/polyuncompressor.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "command.h"
-#include "polyuncompressor.h"
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class PolyUncompressor
-
- \brief The PolyUncompressor class is a class for uncompressing
- compressed files.
-
- This subclass of Uncompressor contains a parameterized
- command for doing the uncompression
-
- It has an uncompressFile() function you call to do the
- actual uncompression.
- */
-
-/*!
- The constructor takes the list of filename \a extensions,
- which it passes to the base class, and the \a commandFormat,
- which it stores locally. The \a commandFormat is a command
- template string.
- */
-PolyUncompressor::PolyUncompressor( const QStringList& extensions,
- const QString& commandFormat )
- : Uncompressor( extensions ), cmd( commandFormat )
-{
-}
-
-/*!
- The destructor doesn't have to do anything.
- */
-PolyUncompressor::~PolyUncompressor()
-{
-}
-
-/*!
- From \a filePath, derive a file path for the uncompressed
- file and return it. If it can't figure out what the file
- path should be, it just concatenates ".out" to the
- \a filePath and returns that.
- */
-QString PolyUncompressor::uncompressedFilePath( const QString& filePath )
-{
- QStringList::ConstIterator e = fileExtensions().begin();
- while ( e != fileExtensions().end() ) {
- QString dotExt = "." + *e;
- if ( filePath.endsWith(dotExt) )
- return filePath.left( filePath.length() - dotExt.length() );
- ++e;
- }
- return filePath + ".out"; // doesn't really matter
-}
-
-/*!
- Call this function to do the actual uncompressing. It calls
- the executeCommand() function to do the work. That's all it does.
- */
-void PolyUncompressor::uncompressFile( const Location& location,
- const QString& filePath,
- const QString& outputFilePath )
-{
- executeCommand( location, cmd,
- QStringList() << filePath << outputFilePath );
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/polyuncompressor.h b/tools/qdoc3/polyuncompressor.h
deleted file mode 100644
index e12f475..0000000
--- a/tools/qdoc3/polyuncompressor.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- polyuncompressor.h
-*/
-
-#ifndef POLYUNCOMPRESSOR_H
-#define POLYUNCOMPRESSOR_H
-
-#include "uncompressor.h"
-
-QT_BEGIN_NAMESPACE
-
-class PolyUncompressor : public Uncompressor
-{
- public:
- PolyUncompressor(const QStringList& extensions,
- const QString& commandFormat);
- ~PolyUncompressor();
-
- virtual QString uncompressedFilePath(const QString& filePath);
- virtual void uncompressFile(const Location& location,
- const QString& filePath,
- const QString& outputFilePath);
-
- private:
- QString cmd;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/loutgenerator.cpp b/tools/qdoc3/puredocparser.cpp
index caf98e8..de7d668 100644
--- a/tools/qdoc3/loutgenerator.cpp
+++ b/tools/qdoc3/puredocparser.cpp
@@ -40,24 +40,24 @@
****************************************************************************/
/*
- loutgenerator.cpp
+ puredocparser.cpp
*/
-#include "loutgenerator.h"
+#include "puredocparser.h"
QT_BEGIN_NAMESPACE
-LoutGenerator::LoutGenerator()
+PureDocParser::PureDocParser()
{
}
-LoutGenerator::~LoutGenerator()
+PureDocParser::~PureDocParser()
{
}
-QString LoutGenerator::format()
+QStringList PureDocParser::sourceFileNameFilter()
{
- return "lout";
+ return QStringList("*.qdoc");
}
QT_END_NAMESPACE
diff --git a/tools/qdoc3/ccodeparser.h b/tools/qdoc3/puredocparser.h
index 1771fc9..6e37dbd 100644
--- a/tools/qdoc3/ccodeparser.h
+++ b/tools/qdoc3/puredocparser.h
@@ -40,25 +40,31 @@
****************************************************************************/
/*
- ccodeparser.h
+ puredocparser.h
*/
-#ifndef CCODEPARSER_H
-#define CCODEPARSER_H
+#ifndef PUREDOCPARSER_H
+#define PUREDOCPARSER_H
+
+#include <QSet>
#include "cppcodeparser.h"
+#include "location.h"
QT_BEGIN_NAMESPACE
-class CCodeParser : public CppCodeParser
+class Config;
+class Node;
+class QString;
+class Tree;
+
+class PureDocParser : public CppCodeParser
{
public:
- CCodeParser();
- ~CCodeParser();
+ PureDocParser();
+ virtual ~PureDocParser();
- virtual QString language();
- virtual QString headerFileNameFilter();
- virtual QString sourceFileNameFilter();
+ virtual QStringList sourceFileNameFilter();
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index ae0bf25..4bc6bca 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -24,105 +24,79 @@ build_all:!build_pass {
}
CONFIG -= app_bundle
-HEADERS += apigenerator.h \
- archiveextractor.h \
- atom.h \
- bookgenerator.h \
- ccodeparser.h \
+HEADERS += atom.h \
codechunk.h \
codemarker.h \
codeparser.h \
- command.h \
config.h \
cppcodemarker.h \
cppcodeparser.h \
- cpptoqsconverter.h \
- dcfsection.h \
ditaxmlgenerator.h \
doc.h \
editdistance.h \
generator.h \
helpprojectwriter.h \
htmlgenerator.h \
- jambiapiparser.h \
- javacodemarker.h \
- javadocgenerator.h \
- linguistgenerator.h \
+ jscodemarker.h \
location.h \
- loutgenerator.h \
- mangenerator.h \
node.h \
openedlist.h \
pagegenerator.h \
plaincodemarker.h \
- polyarchiveextractor.h \
- polyuncompressor.h \
- qsakernelparser.h \
- qscodemarker.h \
- qscodeparser.h \
+ puredocparser.h \
+ qmlcodemarker.h \
+ qmlcodeparser.h \
+ qmlmarkupvisitor.h \
+ qmlvisitor.h \
quoter.h \
separator.h \
- sgmlgenerator.h \
text.h \
tokenizer.h \
tr.h \
- tree.h \
- uncompressor.h \
- webxmlgenerator.h
-SOURCES += apigenerator.cpp \
- archiveextractor.cpp \
- atom.cpp \
- bookgenerator.cpp \
- ccodeparser.cpp \
+ tree.h
+SOURCES += atom.cpp \
codechunk.cpp \
codemarker.cpp \
codeparser.cpp \
- command.cpp \
config.cpp \
cppcodemarker.cpp \
cppcodeparser.cpp \
- cpptoqsconverter.cpp \
- dcfsection.cpp \
ditaxmlgenerator.cpp \
doc.cpp \
editdistance.cpp \
generator.cpp \
helpprojectwriter.cpp \
htmlgenerator.cpp \
- jambiapiparser.cpp \
- javacodemarker.cpp \
- javadocgenerator.cpp \
- linguistgenerator.cpp \
+ jscodemarker.cpp \
location.cpp \
- loutgenerator.cpp \
- mangenerator.cpp \
main.cpp \
node.cpp \
openedlist.cpp \
pagegenerator.cpp \
plaincodemarker.cpp \
- polyarchiveextractor.cpp \
- polyuncompressor.cpp \
- qsakernelparser.cpp \
- qscodemarker.cpp \
- qscodeparser.cpp \
+ puredocparser.cpp \
+ qmlcodemarker.cpp \
+ qmlcodeparser.cpp \
+ qmlmarkupvisitor.cpp \
+ qmlvisitor.cpp \
quoter.cpp \
separator.cpp \
- sgmlgenerator.cpp \
text.cpp \
tokenizer.cpp \
tree.cpp \
- uncompressor.cpp \
- webxmlgenerator.cpp \
yyindent.cpp
+INCLUDEPATH += $$(QT_BUILD_TREE)/include/QtDeclarative
+
+include($$(QT_SOURCE_TREE)/src/declarative/qml/parser/parser.pri)
+
### Documentation for qdoc3 ###
qtPrepareTool(QDOC, qdoc3)
-docs.commands = $$QDOC qdoc-manual.qdocconf
+html-docs.commands = cd \"$$PWD/doc\" && $$QDOC qdoc-manual.qdocconf
-QMAKE_EXTRA_TARGETS += docs
+QMAKE_EXTRA_TARGETS += html-docs
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp
new file mode 100644
index 0000000..1e4ad1e
--- /dev/null
+++ b/tools/qdoc3/qmlcodemarker.cpp
@@ -0,0 +1,287 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ qmlcodemarker.cpp
+*/
+
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsastfwd_p.h"
+#include "private/qdeclarativejsengine_p.h"
+#include "private/qdeclarativejslexer_p.h"
+#include "private/qdeclarativejsnodepool_p.h"
+#include "private/qdeclarativejsparser_p.h"
+
+#include "atom.h"
+#include "node.h"
+#include "qmlcodemarker.h"
+#include "qmlmarkupvisitor.h"
+#include "text.h"
+#include "tree.h"
+
+QT_BEGIN_NAMESPACE
+
+QmlCodeMarker::QmlCodeMarker()
+{
+}
+
+QmlCodeMarker::~QmlCodeMarker()
+{
+}
+
+/*!
+ Returns true if the \a code is recognized by the parser.
+ */
+bool QmlCodeMarker::recognizeCode(const QString &code)
+{
+ QDeclarativeJS::Engine engine;
+ QDeclarativeJS::Lexer lexer(&engine);
+ QDeclarativeJS::Parser parser(&engine);
+ QDeclarativeJS::NodePool m_nodePool("<QmlCodeMarker::recognizeCode>", &engine);
+
+ QString newCode = code;
+ extractPragmas(newCode);
+ lexer.setCode(newCode, 1);
+
+ return parser.parse();
+}
+
+/*!
+ Returns true if \a ext is any of a list of file extensions
+ for the QML language.
+ */
+bool QmlCodeMarker::recognizeExtension(const QString &ext)
+{
+ return ext == "qml";
+}
+
+/*!
+ Returns true if the \a language is recognized. Only "QML" is
+ recognized by this marker.
+ */
+bool QmlCodeMarker::recognizeLanguage(const QString &language)
+{
+ return language == "QML";
+}
+
+/*!
+ Returns the name of the \a node. Method names include are returned with a
+ trailing set of parentheses.
+ */
+QString QmlCodeMarker::plainName(const Node *node)
+{
+ QString name = node->name();
+ if (node->type() == Node::QmlMethod)
+ name += "()";
+ return name;
+}
+
+QString QmlCodeMarker::plainFullName(const Node *node, const Node *relative)
+{
+ if (node->name().isEmpty()) {
+ return "global";
+ }
+ else {
+ QString fullName;
+ while (node) {
+ fullName.prepend(plainName(node));
+ if (node->parent() == relative || node->parent()->name().isEmpty())
+ break;
+ fullName.prepend("::");
+ node = node->parent();
+ }
+ return fullName;
+ }
+}
+
+QString QmlCodeMarker::markedUpCode(const QString &code,
+ const Node *relative,
+ const QString &dirPath)
+{
+ return addMarkUp(code, relative, dirPath);
+}
+
+QString QmlCodeMarker::markedUpName(const Node *node)
+{
+ QString name = linkTag(node, taggedNode(node));
+ if (node->type() == Node::QmlMethod)
+ name += "()";
+ return name;
+}
+
+QString QmlCodeMarker::markedUpFullName(const Node *node, const Node *relative)
+{
+ if (node->name().isEmpty()) {
+ return "global";
+ }
+ else {
+ QString fullName;
+ for (;;) {
+ fullName.prepend(markedUpName(node));
+ if (node->parent() == relative || node->parent()->name().isEmpty())
+ break;
+ fullName.prepend("<@op>::</@op>");
+ node = node->parent();
+ }
+ return fullName;
+ }
+}
+
+QString QmlCodeMarker::markedUpIncludes(const QStringList& includes)
+{
+ QString code;
+
+ QStringList::ConstIterator inc = includes.begin();
+ while (inc != includes.end()) {
+ code += "import " + *inc + "\n";
+ ++inc;
+ }
+ return protect(addMarkUp(code, 0, ""));
+}
+
+QString QmlCodeMarker::functionBeginRegExp(const QString& funcName)
+{
+ return "^" + QRegExp::escape("function " + funcName) + "$";
+
+}
+
+QString QmlCodeMarker::functionEndRegExp(const QString& /* funcName */)
+{
+ return "^\\}$";
+}
+
+QString QmlCodeMarker::addMarkUp(const QString &code,
+ const Node * /* relative */,
+ const QString & /* dirPath */)
+{
+ QDeclarativeJS::Engine engine;
+ QDeclarativeJS::Lexer lexer(&engine);
+
+ QString newCode = code;
+ QList<QDeclarativeJS::AST::SourceLocation> pragmas = extractPragmas(newCode);
+ lexer.setCode(newCode, 1);
+
+ QDeclarativeJS::Parser parser(&engine);
+ QDeclarativeJS::NodePool m_nodePool("<QmlCodeMarker::addMarkUp>", &engine);
+ QString output;
+
+ if (parser.parse()) {
+ QDeclarativeJS::AST::UiProgram *ast = parser.ast();
+ // Pass the unmodified code to the visitor so that pragmas and other
+ // unhandled source text can be output.
+ QmlMarkupVisitor visitor(code, pragmas, &engine);
+ QDeclarativeJS::AST::Node::accept(ast, &visitor);
+ output = visitor.markedUpCode();
+ }
+ return output;
+}
+
+/*
+Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp.
+*/
+static void replaceWithSpace(QString &str, int idx, int n)
+{
+ QChar *data = str.data() + idx;
+ const QChar space(QLatin1Char(' '));
+ for (int ii = 0; ii < n; ++ii)
+ *data++ = space;
+}
+
+/*
+Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp then
+modified to return a list of removed pragmas.
+
+Searches for ".pragma <value>" declarations within \a script. Currently supported pragmas
+are:
+ library
+*/
+QList<QDeclarativeJS::AST::SourceLocation> QmlCodeMarker::extractPragmas(QString &script)
+{
+ const QString pragma(QLatin1String("pragma"));
+ const QString library(QLatin1String("library"));
+ QList<QDeclarativeJS::AST::SourceLocation> removed;
+
+ QDeclarativeJS::Lexer l(0);
+ l.setCode(script, 0);
+
+ int token = l.lex();
+
+ while (true) {
+ if (token != QDeclarativeJSGrammar::T_DOT)
+ return removed;
+
+ int startOffset = l.tokenOffset();
+ int startLine = l.currentLineNo();
+ int startColumn = l.currentColumnNo();
+
+ token = l.lex();
+
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine ||
+ script.mid(l.tokenOffset(), l.tokenLength()) != pragma)
+ return removed;
+
+ token = l.lex();
+
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine)
+ return removed;
+
+ QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength());
+ int endOffset = l.tokenLength() + l.tokenOffset();
+
+ token = l.lex();
+ if (l.currentLineNo() == startLine)
+ return removed;
+
+ if (pragmaValue == QLatin1String("library")) {
+ replaceWithSpace(script, startOffset, endOffset - startOffset);
+ removed.append(
+ QDeclarativeJS::AST::SourceLocation(
+ startOffset, endOffset - startOffset,
+ startLine, startColumn));
+ } else
+ return removed;
+ }
+ return removed;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/mangenerator.h b/tools/qdoc3/qmlcodemarker.h
index 0fca342..68e6753 100644
--- a/tools/qdoc3/mangenerator.h
+++ b/tools/qdoc3/qmlcodemarker.h
@@ -40,38 +40,44 @@
****************************************************************************/
/*
- mangenerator.h
+ qmlcodemarker.h
*/
-#ifndef MANGENERATOR_H
-#define MANGENERATOR_H
+#ifndef QMLCODEMARKER_H
+#define QMLCODEMARKER_H
-#include "pagegenerator.h"
+#include "private/qdeclarativejsastfwd_p.h"
+#include "cppcodemarker.h"
QT_BEGIN_NAMESPACE
-class ManGenerator : public PageGenerator
+class QmlCodeMarker : public CppCodeMarker
{
public:
- ManGenerator();
- ~ManGenerator();
+ QmlCodeMarker();
+ ~QmlCodeMarker();
- virtual QString format();
+ virtual bool recognizeCode(const QString &code);
+ virtual bool recognizeExtension(const QString &ext);
+ virtual bool recognizeLanguage(const QString &language);
+ virtual QString plainName(const Node *node);
+ virtual QString plainFullName(const Node *node, const Node *relative);
+ virtual QString markedUpCode(const QString &code,
+ const Node *relative,
+ const QString &dirPath);
-protected:
- virtual int generateAtom( const Atom *atom, const Node *relative,
- CodeMarker *marker );
- virtual void generateClassLikeNode(const InnerNode *node, CodeMarker *marker);
- virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker );
- virtual QString fileExtension(const Node *node) const;
+ virtual QString markedUpName(const Node *node);
+ virtual QString markedUpFullName(const Node *node, const Node *relative);
+ virtual QString markedUpIncludes(const QStringList &includes);
+ virtual QString functionBeginRegExp(const QString &funcName);
+ virtual QString functionEndRegExp(const QString &funcName);
-private:
- void generateHeader( const QString& name );
- void generateFooter();
- QString protectArg( const QString& str );
- QString protectTextLine( const QString& str );
+ /* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */
+ QList<QDeclarativeJS::AST::SourceLocation> extractPragmas(QString &script);
- QString date;
+private:
+ QString addMarkUp(const QString &code, const Node * /* relative */,
+ const QString & /* dirPath */);
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp
new file mode 100644
index 0000000..9c1d4ee
--- /dev/null
+++ b/tools/qdoc3/qmlcodeparser.cpp
@@ -0,0 +1,235 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*
+ qmlcodeparser.cpp
+*/
+
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsastvisitor_p.h"
+#include "private/qdeclarativejsnodepool_p.h"
+
+#include "qmlcodeparser.h"
+#include "node.h"
+#include "tree.h"
+#include "config.h"
+#include "qmlvisitor.h"
+
+QT_BEGIN_NAMESPACE
+
+#define COMMAND_STARTPAGE Doc::alias("startpage")
+#define COMMAND_VARIABLE Doc::alias("variable")
+
+#define COMMAND_QMLCLASS Doc::alias("qmlclass")
+#define COMMAND_QMLPROPERTY Doc::alias("qmlproperty")
+#define COMMAND_QMLATTACHEDPROPERTY Doc::alias("qmlattachedproperty")
+#define COMMAND_QMLINHERITS Doc::alias("inherits")
+#define COMMAND_QMLSIGNAL Doc::alias("qmlsignal")
+#define COMMAND_QMLATTACHEDSIGNAL Doc::alias("qmlattachedsignal")
+#define COMMAND_QMLMETHOD Doc::alias("qmlmethod")
+#define COMMAND_QMLATTACHEDMETHOD Doc::alias("qmlattachedmethod")
+#define COMMAND_QMLDEFAULT Doc::alias("default")
+#define COMMAND_QMLBASICTYPE Doc::alias("qmlbasictype")
+
+QmlCodeParser::QmlCodeParser()
+{
+}
+
+QmlCodeParser::~QmlCodeParser()
+{
+}
+
+/*!
+ Initialize the code parser base class.
+ */
+void QmlCodeParser::initializeParser(const Config &config)
+{
+ CodeParser::initializeParser(config);
+
+ lexer = new QDeclarativeJS::Lexer(&engine);
+ parser = new QDeclarativeJS::Parser(&engine);
+}
+
+void QmlCodeParser::terminateParser()
+{
+ delete lexer;
+ delete parser;
+}
+
+QString QmlCodeParser::language()
+{
+ return "QML";
+}
+
+QStringList QmlCodeParser::sourceFileNameFilter()
+{
+ return QStringList("*.qml");
+}
+
+void QmlCodeParser::parseSourceFile(const Location& location,
+ const QString& filePath,
+ Tree *tree)
+{
+ QFile in(filePath);
+ if (!in.open(QIODevice::ReadOnly)) {
+ location.error(tr("Cannot open QML file '%1'").arg(filePath));
+ return;
+ }
+
+ QString document = in.readAll();
+ in.close();
+
+ Location fileLocation(filePath);
+
+ QString newCode = document;
+ extractPragmas(newCode);
+ lexer->setCode(newCode, 1);
+
+ QSet<QString> topicCommandsAllowed = topicCommands();
+ QSet<QString> otherMetacommandsAllowed = otherMetaCommands();
+ QSet<QString> metacommandsAllowed = topicCommandsAllowed +
+ otherMetacommandsAllowed;
+
+ QDeclarativeJS::NodePool m_nodePool(filePath, &engine);
+
+ if (parser->parse()) {
+ QDeclarativeJS::AST::UiProgram *ast = parser->ast();
+ QmlDocVisitor visitor(filePath, newCode, &engine, tree, metacommandsAllowed);
+ QDeclarativeJS::AST::Node::accept(ast, &visitor);
+ }
+}
+
+void QmlCodeParser::doneParsingSourceFiles(Tree *tree)
+{
+}
+
+/*!
+ Returns the set of strings reopresenting the topic commands.
+ */
+QSet<QString> QmlCodeParser::topicCommands()
+{
+ return QSet<QString>() << COMMAND_VARIABLE
+ << COMMAND_QMLCLASS
+ << COMMAND_QMLPROPERTY
+ << COMMAND_QMLATTACHEDPROPERTY
+ << COMMAND_QMLSIGNAL
+ << COMMAND_QMLATTACHEDSIGNAL
+ << COMMAND_QMLMETHOD
+ << COMMAND_QMLATTACHEDMETHOD
+ << COMMAND_QMLBASICTYPE;
+}
+
+/*!
+ Returns the set of strings representing the common metacommands
+ plus some other metacommands.
+ */
+QSet<QString> QmlCodeParser::otherMetaCommands()
+{
+ return commonMetaCommands() << COMMAND_STARTPAGE
+ << COMMAND_QMLINHERITS
+ << COMMAND_QMLDEFAULT;
+}
+
+/*
+Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp.
+*/
+static void replaceWithSpace(QString &str, int idx, int n)
+{
+ QChar *data = str.data() + idx;
+ const QChar space(QLatin1Char(' '));
+ for (int ii = 0; ii < n; ++ii)
+ *data++ = space;
+}
+
+/*
+Copied and pasted from src/declarative/qml/qdeclarativescriptparser.cpp then
+modified to return no values.
+
+Searches for ".pragma <value>" declarations within \a script. Currently supported pragmas
+are:
+ library
+*/
+void QmlCodeParser::extractPragmas(QString &script)
+{
+ const QString pragma(QLatin1String("pragma"));
+ const QString library(QLatin1String("library"));
+
+ QDeclarativeJS::Lexer l(0);
+ l.setCode(script, 0);
+
+ int token = l.lex();
+
+ while (true) {
+ if (token != QDeclarativeJSGrammar::T_DOT)
+ return;
+
+ int startOffset = l.tokenOffset();
+ int startLine = l.currentLineNo();
+
+ token = l.lex();
+
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine ||
+ script.mid(l.tokenOffset(), l.tokenLength()) != pragma)
+ return;
+
+ token = l.lex();
+
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine)
+ return;
+
+ QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength());
+ int endOffset = l.tokenLength() + l.tokenOffset();
+
+ token = l.lex();
+ if (l.currentLineNo() == startLine)
+ return;
+
+ if (pragmaValue == QLatin1String("library"))
+ replaceWithSpace(script, startOffset, endOffset - startOffset);
+ else
+ return;
+ }
+ return;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/qsakernelparser.h b/tools/qdoc3/qmlcodeparser.h
index 9ac84fb..bbacd72 100644
--- a/tools/qdoc3/qsakernelparser.h
+++ b/tools/qdoc3/qmlcodeparser.h
@@ -40,36 +40,52 @@
****************************************************************************/
/*
- qsakernelparser.h
+ qmlcodeparser.h
*/
-#ifndef QSAKERNELPARSER_H
-#define QSAKERNELPARSER_H
+#ifndef QMLCODEPARSER_H
+#define QMLCODEPARSER_H
+
+#include <QSet>
+#include "private/qdeclarativejsengine_p.h"
+#include "private/qdeclarativejslexer_p.h"
+#include "private/qdeclarativejsparser_p.h"
#include "codeparser.h"
+#include "location.h"
QT_BEGIN_NAMESPACE
-class Tokenizer;
+class Config;
+class Node;
+class QString;
+class Tree;
-class QsaKernelParser : public CodeParser
+class QmlCodeParser : public CodeParser
{
public:
- QsaKernelParser( Tree *cppTree );
- ~QsaKernelParser();
+ QmlCodeParser();
+ virtual ~QmlCodeParser();
+ virtual void initializeParser(const Config& config);
+ virtual void terminateParser();
virtual QString language();
- virtual QString sourceFileNameFilter();
- virtual void parseSourceFile( const Location& location,
- const QString& filePath, Tree *tree );
- virtual void doneParsingSourceFiles( Tree *tree );
+ virtual QStringList sourceFileNameFilter();
+ virtual void parseSourceFile(const Location& location,
+ const QString& filePath, Tree *tree);
+ virtual void doneParsingSourceFiles(Tree *tree);
-private:
- void readToken();
+ /* Copied from src/declarative/qml/qdeclarativescriptparser.cpp */
+ void extractPragmas(QString &script);
- Tree *cppTre;
- Tokenizer *tokenizer;
- int tok;
+protected:
+ virtual QSet<QString> topicCommands();
+ virtual QSet<QString> otherMetaCommands();
+
+private:
+ QDeclarativeJS::Engine engine;
+ QDeclarativeJS::Lexer *lexer;
+ QDeclarativeJS::Parser *parser;
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp
new file mode 100644
index 0000000..6bede96
--- /dev/null
+++ b/tools/qdoc3/qmlmarkupvisitor.cpp
@@ -0,0 +1,863 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QStringList>
+#include <QtGlobal>
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsastfwd_p.h"
+#include "private/qdeclarativejsengine_p.h"
+
+#include "qmlmarkupvisitor.h"
+
+QT_BEGIN_NAMESPACE
+
+QmlMarkupVisitor::QmlMarkupVisitor(const QString &source,
+ const QList<QDeclarativeJS::AST::SourceLocation> &pragmas,
+ QDeclarativeJS::Engine *engine)
+{
+ this->source = source;
+ this->engine = engine;
+
+ cursor = 0;
+ extraIndex = 0;
+
+ // Merge the lists of locations of pragmas and comments in the source code.
+ int i = 0;
+ int j = 0;
+ while (i < engine->comments().length() && j < pragmas.length()) {
+ if (engine->comments()[i].offset < pragmas[j].offset) {
+ extraTypes.append(Comment);
+ extraLocations.append(engine->comments()[i]);
+ ++i;
+ } else {
+ extraTypes.append(Pragma);
+ extraLocations.append(engine->comments()[j]);
+ ++j;
+ }
+ }
+
+ while (i < engine->comments().length()) {
+ extraTypes.append(Comment);
+ extraLocations.append(engine->comments()[i]);
+ ++i;
+ }
+
+ while (j < pragmas.length()) {
+ extraTypes.append(Pragma);
+ extraLocations.append(pragmas[j]);
+ ++j;
+ }
+}
+
+QmlMarkupVisitor::~QmlMarkupVisitor()
+{
+}
+
+// The protect() function is a copy of the one from CppCodeMarker.
+
+static const QString samp = QLatin1String("&amp;");
+static const QString slt = QLatin1String("&lt;");
+static const QString sgt = QLatin1String("&gt;");
+static const QString squot = QLatin1String("&quot;");
+
+QString QmlMarkupVisitor::protect(const QString& str)
+{
+ int n = str.length();
+ QString marked;
+ marked.reserve(n * 2 + 30);
+ const QChar *data = str.constData();
+ for (int i = 0; i != n; ++i) {
+ switch (data[i].unicode()) {
+ case '&': marked += samp; break;
+ case '<': marked += slt; break;
+ case '>': marked += sgt; break;
+ case '"': marked += squot; break;
+ default : marked += data[i];
+ }
+ }
+ return marked;
+}
+
+QString QmlMarkupVisitor::markedUpCode()
+{
+ if (int(cursor) < source.length())
+ addExtra(cursor, source.length());
+
+ return output;
+}
+
+void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish)
+{
+ if (extraIndex >= extraLocations.length()) {
+ QString extra = source.mid(start, finish - start);
+ if (extra.trimmed().isEmpty())
+ output += extra;
+ else
+ output += protect(extra); // text that should probably have been caught by the parser
+
+ cursor = finish;
+ return;
+ }
+
+ while (extraIndex < extraLocations.length()) {
+ if (extraTypes[extraIndex] == Comment) {
+ if (extraLocations[extraIndex].offset - 2 >= start)
+ break;
+ } else {
+ if (extraLocations[extraIndex].offset >= start)
+ break;
+ }
+ extraIndex++;
+ }
+
+ quint32 i = start;
+ while (i < finish && extraIndex < extraLocations.length()) {
+ quint32 j = extraLocations[extraIndex].offset - 2;
+ if (i <= j && j < finish) {
+ if (i < j)
+ output += protect(source.mid(i, j - i));
+
+ quint32 l = extraLocations[extraIndex].length;
+ if (extraTypes[extraIndex] == Comment) {
+ if (source.mid(j, 2) == QLatin1String("/*"))
+ l += 4;
+ else
+ l += 2;
+ output += QLatin1String("<@comment>");
+ output += protect(source.mid(j, l));
+ output += QLatin1String("</@comment>");
+ } else
+ output += protect(source.mid(j, l));
+
+ extraIndex++;
+ i = j + l;
+ } else
+ break;
+ }
+
+ QString extra = source.mid(i, finish - i);
+ if (extra.trimmed().isEmpty())
+ output += extra;
+ else
+ output += protect(extra); // text that should probably have been caught by the parser
+
+ cursor = finish;
+}
+
+void QmlMarkupVisitor::addMarkedUpToken(
+ QDeclarativeJS::AST::SourceLocation &location, const QString &tagName)
+{
+ if (!location.isValid())
+ return;
+
+ if (cursor < location.offset)
+ addExtra(cursor, location.offset);
+ else if (cursor > location.offset)
+ return;
+
+ output += QString(QLatin1String("<@%1>%2</@%3>")).arg(tagName, protect(sourceText(location)), tagName);
+ cursor += location.length;
+}
+
+QString QmlMarkupVisitor::sourceText(QDeclarativeJS::AST::SourceLocation &location)
+{
+ return source.mid(location.offset, location.length);
+}
+
+void QmlMarkupVisitor::addVerbatim(QDeclarativeJS::AST::SourceLocation first,
+ QDeclarativeJS::AST::SourceLocation last)
+{
+ if (!first.isValid())
+ return;
+
+ quint32 start = first.begin();
+ quint32 finish;
+ if (last.isValid())
+ finish = last.end();
+ else
+ finish = first.end();
+
+ if (cursor < start)
+ addExtra(cursor, start);
+ else if (cursor > start)
+ return;
+
+ QString text = source.mid(start, finish - start);
+ output += protect(text);
+ cursor = finish;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiImport *uiimport)
+{
+ addVerbatim(uiimport->importToken);
+ if (!uiimport->importUri)
+ addMarkedUpToken(uiimport->fileNameToken, QLatin1String("headerfile"));
+ return false;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiImport *uiimport)
+{
+ addVerbatim(uiimport->versionToken);
+ addVerbatim(uiimport->asToken);
+ addMarkedUpToken(uiimport->importIdToken, QLatin1String("headerfile"));
+ addVerbatim(uiimport->semicolonToken);
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member)
+{
+ if (member->type == QDeclarativeJS::AST::UiPublicMember::Property) {
+ addVerbatim(member->defaultToken);
+ addVerbatim(member->readonlyToken);
+ addVerbatim(member->propertyToken);
+ addVerbatim(member->typeModifierToken);
+ addMarkedUpToken(member->typeToken, QLatin1String("type"));
+ addMarkedUpToken(member->identifierToken, QLatin1String("name"));
+ addVerbatim(member->colonToken);
+ if (member->binding)
+ QDeclarativeJS::AST::Node::accept(member->binding, this);
+ else if (member->expression)
+ QDeclarativeJS::AST::Node::accept(member->expression, this);
+ } else {
+ addVerbatim(member->propertyToken);
+ addVerbatim(member->typeModifierToken);
+ addMarkedUpToken(member->typeToken, QLatin1String("type"));
+ //addVerbatim(member->identifierToken);
+ QDeclarativeJS::AST::Node::accept(member->parameters, this);
+ }
+ addVerbatim(member->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectInitializer *initializer)
+{
+ addVerbatim(initializer->lbraceToken, initializer->lbraceToken);
+ return true;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiObjectInitializer *initializer)
+{
+ addVerbatim(initializer->rbraceToken, initializer->rbraceToken);
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectBinding *binding)
+{
+ QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this);
+ addVerbatim(binding->colonToken);
+ QDeclarativeJS::AST::Node::accept(binding->qualifiedTypeNameId, this);
+ QDeclarativeJS::AST::Node::accept(binding->initializer, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiScriptBinding *binding)
+{
+ QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this);
+ addVerbatim(binding->colonToken);
+ QDeclarativeJS::AST::Node::accept(binding->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayBinding *binding)
+{
+ QDeclarativeJS::AST::Node::accept(binding->qualifiedId, this);
+ addVerbatim(binding->colonToken);
+ addVerbatim(binding->lbracketToken);
+ QDeclarativeJS::AST::Node::accept(binding->members, this);
+ addVerbatim(binding->rbracketToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiArrayMemberList *list)
+{
+ for (QDeclarativeJS::AST::UiArrayMemberList *it = list; it; it = it->next) {
+ QDeclarativeJS::AST::Node::accept(it->member, this);
+ //addVerbatim(it->commaToken);
+ }
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiQualifiedId *id)
+{
+ addMarkedUpToken(id->identifierToken, QLatin1String("name"));
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiSignature *signature)
+{
+ addVerbatim(signature->lparenToken);
+ return true;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::UiSignature *signature)
+{
+ addVerbatim(signature->rparenToken);
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiFormal *formal)
+{
+ addMarkedUpToken(formal->identifierToken, QLatin1String("name"));
+ addVerbatim(formal->asToken);
+ addVerbatim(formal->aliasToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThisExpression *expression)
+{
+ addVerbatim(expression->thisToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IdentifierExpression *identifier)
+{
+ addMarkedUpToken(identifier->identifierToken, QLatin1String("name"));
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NullExpression *null)
+{
+ addMarkedUpToken(null->nullToken, QLatin1String("number"));
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TrueLiteral *literal)
+{
+ addMarkedUpToken(literal->trueToken, QLatin1String("number"));
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FalseLiteral *literal)
+{
+ addMarkedUpToken(literal->falseToken, QLatin1String("number"));
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NumericLiteral *literal)
+{
+ addMarkedUpToken(literal->literalToken, QLatin1String("number"));
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::StringLiteral *literal)
+{
+ addMarkedUpToken(literal->literalToken, QLatin1String("string"));
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::RegExpLiteral *literal)
+{
+ addVerbatim(literal->literalToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayLiteral *literal)
+{
+ addVerbatim(literal->lbracketToken);
+ QDeclarativeJS::AST::Node::accept(literal->elements, this);
+ addVerbatim(literal->rbracketToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ObjectLiteral *literal)
+{
+ addVerbatim(literal->lbraceToken);
+ return true;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::ObjectLiteral *literal)
+{
+ addVerbatim(literal->rbraceToken);
+}
+
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ElementList *list)
+{
+ for (QDeclarativeJS::AST::ElementList *it = list; it; it = it->next) {
+ QDeclarativeJS::AST::Node::accept(it->expression, this);
+ //addVerbatim(it->commaToken);
+ }
+ QDeclarativeJS::AST::Node::accept(list->elision, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Elision *elision)
+{
+ addVerbatim(elision->commaToken, elision->commaToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PropertyNameAndValueList *list)
+{
+ QDeclarativeJS::AST::Node::accept(list->name, this);
+ addVerbatim(list->colonToken, list->colonToken);
+ QDeclarativeJS::AST::Node::accept(list->value, this);
+ addVerbatim(list->commaToken, list->commaToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArrayMemberExpression *expression)
+{
+ QDeclarativeJS::AST::Node::accept(expression->base, this);
+ addVerbatim(expression->lbracketToken);
+ QDeclarativeJS::AST::Node::accept(expression->expression, this);
+ addVerbatim(expression->rbracketToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FieldMemberExpression *expression)
+{
+ QDeclarativeJS::AST::Node::accept(expression->base, this);
+ addVerbatim(expression->dotToken);
+ addMarkedUpToken(expression->identifierToken, QLatin1String("name"));
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewMemberExpression *expression)
+{
+ addVerbatim(expression->newToken);
+ QDeclarativeJS::AST::Node::accept(expression->base, this);
+ addVerbatim(expression->lparenToken);
+ QDeclarativeJS::AST::Node::accept(expression->arguments, this);
+ addVerbatim(expression->rparenToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NewExpression *expression)
+{
+ addVerbatim(expression->newToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ArgumentList *list)
+{
+ addVerbatim(list->commaToken, list->commaToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostIncrementExpression *expression)
+{
+ addVerbatim(expression->incrementToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PostDecrementExpression *expression)
+{
+ addVerbatim(expression->decrementToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DeleteExpression *expression)
+{
+ addVerbatim(expression->deleteToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VoidExpression *expression)
+{
+ addVerbatim(expression->voidToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TypeOfExpression *expression)
+{
+ addVerbatim(expression->typeofToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreIncrementExpression *expression)
+{
+ addVerbatim(expression->incrementToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::PreDecrementExpression *expression)
+{
+ addVerbatim(expression->decrementToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryPlusExpression *expression)
+{
+ addVerbatim(expression->plusToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UnaryMinusExpression *expression)
+{
+ addVerbatim(expression->minusToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TildeExpression *expression)
+{
+ addVerbatim(expression->tildeToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::NotExpression *expression)
+{
+ addVerbatim(expression->notToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BinaryExpression *expression)
+{
+ QDeclarativeJS::AST::Node::accept(expression->left, this);
+ addMarkedUpToken(expression->operatorToken, QLatin1String("op"));
+ QDeclarativeJS::AST::Node::accept(expression->right, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ConditionalExpression *expression)
+{
+ QDeclarativeJS::AST::Node::accept(expression->expression, this);
+ addVerbatim(expression->questionToken);
+ QDeclarativeJS::AST::Node::accept(expression->ok, this);
+ addVerbatim(expression->colonToken);
+ QDeclarativeJS::AST::Node::accept(expression->ko, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Expression *expression)
+{
+ QDeclarativeJS::AST::Node::accept(expression->left, this);
+ addVerbatim(expression->commaToken);
+ QDeclarativeJS::AST::Node::accept(expression->right, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Block *block)
+{
+ addVerbatim(block->lbraceToken);
+ return true;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::Block *block)
+{
+ addVerbatim(block->rbraceToken);
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableStatement *statement)
+{
+ addVerbatim(statement->declarationKindToken);
+ QDeclarativeJS::AST::Node::accept(statement->declarations, this);
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclarationList *list)
+{
+ for (QDeclarativeJS::AST::VariableDeclarationList *it = list; it; it = it->next) {
+ QDeclarativeJS::AST::Node::accept(it->declaration, this);
+ addVerbatim(it->commaToken);
+ }
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::VariableDeclaration *declaration)
+{
+ addMarkedUpToken(declaration->identifierToken, QLatin1String("name"));
+ QDeclarativeJS::AST::Node::accept(declaration->expression, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::EmptyStatement *statement)
+{
+ addVerbatim(statement->semicolonToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ExpressionStatement *statement)
+{
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::IfStatement *statement)
+{
+ addMarkedUpToken(statement->ifToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->ok, this);
+ if (statement->ko) {
+ addMarkedUpToken(statement->elseToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->ko, this);
+ }
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DoWhileStatement *statement)
+{
+ addMarkedUpToken(statement->doToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ addMarkedUpToken(statement->whileToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WhileStatement *statement)
+{
+ addMarkedUpToken(statement->whileToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForStatement *statement)
+{
+ addMarkedUpToken(statement->forToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->initialiser, this);
+ addVerbatim(statement->firstSemicolonToken);
+ QDeclarativeJS::AST::Node::accept(statement->condition, this);
+ addVerbatim(statement->secondSemicolonToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForStatement *statement)
+{
+ addMarkedUpToken(statement->forToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ addMarkedUpToken(statement->varToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->declarations, this);
+ addVerbatim(statement->firstSemicolonToken);
+ QDeclarativeJS::AST::Node::accept(statement->condition, this);
+ addVerbatim(statement->secondSemicolonToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ForEachStatement *statement)
+{
+ addMarkedUpToken(statement->forToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->initialiser, this);
+ addVerbatim(statement->inToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LocalForEachStatement *statement)
+{
+ addMarkedUpToken(statement->forToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ addMarkedUpToken(statement->varToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->declaration, this);
+ addVerbatim(statement->inToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ContinueStatement *statement)
+{
+ addMarkedUpToken(statement->continueToken, QLatin1String("keyword"));
+ addMarkedUpToken(statement->identifierToken, QLatin1String("name"));
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::BreakStatement *statement)
+{
+ addMarkedUpToken(statement->breakToken, QLatin1String("keyword"));
+ addMarkedUpToken(statement->identifierToken, QLatin1String("name"));
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ReturnStatement *statement)
+{
+ addMarkedUpToken(statement->returnToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::WithStatement *statement)
+{
+ addMarkedUpToken(statement->withToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseBlock *block)
+{
+ addVerbatim(block->lbraceToken);
+ return true;
+}
+
+void QmlMarkupVisitor::endVisit(QDeclarativeJS::AST::CaseBlock *block)
+{
+ addVerbatim(block->rbraceToken, block->rbraceToken);
+}
+
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::SwitchStatement *statement)
+{
+ addMarkedUpToken(statement->switchToken, QLatin1String("keyword"));
+ addVerbatim(statement->lparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->rparenToken);
+ QDeclarativeJS::AST::Node::accept(statement->block, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::CaseClause *clause)
+{
+ addMarkedUpToken(clause->caseToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(clause->expression, this);
+ addVerbatim(clause->colonToken);
+ QDeclarativeJS::AST::Node::accept(clause->statements, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DefaultClause *clause)
+{
+ addMarkedUpToken(clause->defaultToken, QLatin1String("keyword"));
+ addVerbatim(clause->colonToken, clause->colonToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::LabelledStatement *statement)
+{
+ addMarkedUpToken(statement->identifierToken, QLatin1String("name"));
+ addVerbatim(statement->colonToken);
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::ThrowStatement *statement)
+{
+ addMarkedUpToken(statement->throwToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->expression, this);
+ addVerbatim(statement->semicolonToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Catch *c)
+{
+ addMarkedUpToken(c->catchToken, QLatin1String("keyword"));
+ addVerbatim(c->lparenToken);
+ addMarkedUpToken(c->identifierToken, QLatin1String("name"));
+ addVerbatim(c->rparenToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::Finally *f)
+{
+ addMarkedUpToken(f->finallyToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(f->statement, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::TryStatement *statement)
+{
+ addMarkedUpToken(statement->tryToken, QLatin1String("keyword"));
+ QDeclarativeJS::AST::Node::accept(statement->statement, this);
+ QDeclarativeJS::AST::Node::accept(statement->catchExpression, this);
+ QDeclarativeJS::AST::Node::accept(statement->finallyExpression, this);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionExpression *expression)
+{
+ addMarkedUpToken(expression->functionToken, QLatin1String("keyword"));
+ addMarkedUpToken(expression->identifierToken, QLatin1String("name"));
+ addVerbatim(expression->lparenToken);
+ QDeclarativeJS::AST::Node::accept(expression->formals, this);
+ addVerbatim(expression->rparenToken);
+ addVerbatim(expression->lbraceToken);
+ QDeclarativeJS::AST::Node::accept(expression->body, this);
+ addVerbatim(expression->rbraceToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FunctionDeclaration *declaration)
+{
+ addMarkedUpToken(declaration->functionToken, QLatin1String("keyword"));
+ addMarkedUpToken(declaration->identifierToken, QLatin1String("name"));
+ addVerbatim(declaration->lparenToken);
+ QDeclarativeJS::AST::Node::accept(declaration->formals, this);
+ addVerbatim(declaration->rparenToken);
+ addVerbatim(declaration->lbraceToken);
+ QDeclarativeJS::AST::Node::accept(declaration->body, this);
+ addVerbatim(declaration->rbraceToken);
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::FormalParameterList *list)
+{
+ addVerbatim(list->commaToken);
+ addMarkedUpToken(list->identifierToken, QLatin1String("name"));
+ return false;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement)
+{
+ addVerbatim(statement->debuggerToken);
+ addVerbatim(statement->semicolonToken);
+ return true;
+}
+
+bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition)
+{
+ QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this);
+ QDeclarativeJS::AST::Node::accept(definition->initializer, this);
+ return false;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h
new file mode 100644
index 0000000..7a9ff22
--- /dev/null
+++ b/tools/qdoc3/qmlmarkupvisitor.h
@@ -0,0 +1,180 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMLVISITOR_H
+#define QMLVISITOR_H
+
+#include <QString>
+#include "private/qdeclarativejsastvisitor_p.h"
+#include "node.h"
+#include "tree.h"
+
+QT_BEGIN_NAMESPACE
+
+class QmlMarkupVisitor : public QDeclarativeJS::AST::Visitor
+{
+public:
+ enum ExtraType{
+ Comment,
+ Pragma
+ };
+
+ QmlMarkupVisitor(const QString &code,
+ const QList<QDeclarativeJS::AST::SourceLocation> &pragmas,
+ QDeclarativeJS::Engine *engine);
+ virtual ~QmlMarkupVisitor();
+
+ QString markedUpCode();
+
+ virtual bool visit(QDeclarativeJS::AST::UiImport *);
+ virtual void endVisit(QDeclarativeJS::AST::UiImport *);
+
+ virtual bool visit(QDeclarativeJS::AST::UiPublicMember *);
+ virtual bool visit(QDeclarativeJS::AST::UiObjectDefinition *);
+
+ virtual bool visit(QDeclarativeJS::AST::UiObjectInitializer *);
+ virtual void endVisit(QDeclarativeJS::AST::UiObjectInitializer *);
+
+ virtual bool visit(QDeclarativeJS::AST::UiObjectBinding *);
+ virtual bool visit(QDeclarativeJS::AST::UiScriptBinding *);
+ virtual bool visit(QDeclarativeJS::AST::UiArrayBinding *);
+ virtual bool visit(QDeclarativeJS::AST::UiArrayMemberList *);
+ virtual bool visit(QDeclarativeJS::AST::UiQualifiedId *);
+
+ virtual bool visit(QDeclarativeJS::AST::UiSignature *);
+ virtual void endVisit(QDeclarativeJS::AST::UiSignature *);
+
+ virtual bool visit(QDeclarativeJS::AST::UiFormal *);
+ virtual bool visit(QDeclarativeJS::AST::ThisExpression *);
+ virtual bool visit(QDeclarativeJS::AST::IdentifierExpression *);
+ virtual bool visit(QDeclarativeJS::AST::NullExpression *);
+ virtual bool visit(QDeclarativeJS::AST::TrueLiteral *);
+ virtual bool visit(QDeclarativeJS::AST::FalseLiteral *);
+ virtual bool visit(QDeclarativeJS::AST::NumericLiteral *);
+ virtual bool visit(QDeclarativeJS::AST::StringLiteral *);
+ virtual bool visit(QDeclarativeJS::AST::RegExpLiteral *);
+ virtual bool visit(QDeclarativeJS::AST::ArrayLiteral *);
+
+ virtual bool visit(QDeclarativeJS::AST::ObjectLiteral *);
+ virtual void endVisit(QDeclarativeJS::AST::ObjectLiteral *);
+
+ virtual bool visit(QDeclarativeJS::AST::ElementList *);
+ virtual bool visit(QDeclarativeJS::AST::Elision *);
+ virtual bool visit(QDeclarativeJS::AST::PropertyNameAndValueList *);
+ virtual bool visit(QDeclarativeJS::AST::ArrayMemberExpression *);
+ virtual bool visit(QDeclarativeJS::AST::FieldMemberExpression *);
+ virtual bool visit(QDeclarativeJS::AST::NewMemberExpression *);
+ virtual bool visit(QDeclarativeJS::AST::NewExpression *);
+ virtual bool visit(QDeclarativeJS::AST::ArgumentList *);
+ virtual bool visit(QDeclarativeJS::AST::PostIncrementExpression *);
+ virtual bool visit(QDeclarativeJS::AST::PostDecrementExpression *);
+ virtual bool visit(QDeclarativeJS::AST::DeleteExpression *);
+ virtual bool visit(QDeclarativeJS::AST::VoidExpression *);
+ virtual bool visit(QDeclarativeJS::AST::TypeOfExpression *);
+ virtual bool visit(QDeclarativeJS::AST::PreIncrementExpression *);
+ virtual bool visit(QDeclarativeJS::AST::PreDecrementExpression *);
+ virtual bool visit(QDeclarativeJS::AST::UnaryPlusExpression *);
+ virtual bool visit(QDeclarativeJS::AST::UnaryMinusExpression *);
+ virtual bool visit(QDeclarativeJS::AST::TildeExpression *);
+ virtual bool visit(QDeclarativeJS::AST::NotExpression *);
+ virtual bool visit(QDeclarativeJS::AST::BinaryExpression *);
+ virtual bool visit(QDeclarativeJS::AST::ConditionalExpression *);
+ virtual bool visit(QDeclarativeJS::AST::Expression *);
+
+ virtual bool visit(QDeclarativeJS::AST::Block *);
+ virtual void endVisit(QDeclarativeJS::AST::Block *);
+
+ virtual bool visit(QDeclarativeJS::AST::VariableStatement *);
+ virtual bool visit(QDeclarativeJS::AST::VariableDeclarationList *);
+ virtual bool visit(QDeclarativeJS::AST::VariableDeclaration *);
+ virtual bool visit(QDeclarativeJS::AST::EmptyStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ExpressionStatement *);
+ virtual bool visit(QDeclarativeJS::AST::IfStatement *);
+ virtual bool visit(QDeclarativeJS::AST::DoWhileStatement *);
+ virtual bool visit(QDeclarativeJS::AST::WhileStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ForStatement *);
+ virtual bool visit(QDeclarativeJS::AST::LocalForStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ForEachStatement *);
+ virtual bool visit(QDeclarativeJS::AST::LocalForEachStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ContinueStatement *);
+ virtual bool visit(QDeclarativeJS::AST::BreakStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ReturnStatement *);
+ virtual bool visit(QDeclarativeJS::AST::WithStatement *);
+
+ virtual bool visit(QDeclarativeJS::AST::CaseBlock *);
+ virtual void endVisit(QDeclarativeJS::AST::CaseBlock *);
+
+ virtual bool visit(QDeclarativeJS::AST::SwitchStatement *);
+ virtual bool visit(QDeclarativeJS::AST::CaseClause *);
+ virtual bool visit(QDeclarativeJS::AST::DefaultClause *);
+ virtual bool visit(QDeclarativeJS::AST::LabelledStatement *);
+ virtual bool visit(QDeclarativeJS::AST::ThrowStatement *);
+ virtual bool visit(QDeclarativeJS::AST::TryStatement *);
+ virtual bool visit(QDeclarativeJS::AST::Catch *);
+ virtual bool visit(QDeclarativeJS::AST::Finally *);
+ virtual bool visit(QDeclarativeJS::AST::FunctionDeclaration *);
+ virtual bool visit(QDeclarativeJS::AST::FunctionExpression *);
+ virtual bool visit(QDeclarativeJS::AST::FormalParameterList *);
+ virtual bool visit(QDeclarativeJS::AST::DebuggerStatement *);
+
+protected:
+ QString protect(const QString &string);
+
+private:
+ void addExtra(quint32 start, quint32 finish);
+ void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location,
+ const QString &text);
+ void addVerbatim(QDeclarativeJS::AST::SourceLocation first,
+ QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation());
+ QString sourceText(QDeclarativeJS::AST::SourceLocation &location);
+
+ QDeclarativeJS::Engine *engine;
+ QList<ExtraType> extraTypes;
+ QList<QDeclarativeJS::AST::SourceLocation> extraLocations;
+ QString source;
+ QString output;
+ quint32 cursor;
+ int extraIndex;
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/tools/qdoc3/qmlvisitor.cpp b/tools/qdoc3/qmlvisitor.cpp
new file mode 100644
index 0000000..9295624
--- /dev/null
+++ b/tools/qdoc3/qmlvisitor.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QFileInfo>
+#include <QStringList>
+#include <QtGlobal>
+#include "private/qdeclarativejsast_p.h"
+#include "private/qdeclarativejsastfwd_p.h"
+#include "private/qdeclarativejsengine_p.h"
+
+#include "node.h"
+#include "qmlvisitor.h"
+
+QT_BEGIN_NAMESPACE
+
+QmlDocVisitor::QmlDocVisitor(const QString &filePath, const QString &code,
+ QDeclarativeJS::Engine *engine, Tree *tree, QSet<QString> &commands)
+{
+ this->filePath = filePath;
+ this->name = QFileInfo(filePath).baseName();
+ document = code;
+ this->engine = engine;
+ this->tree = tree;
+ this->commands = commands;
+ current = tree->root();
+}
+
+QmlDocVisitor::~QmlDocVisitor()
+{
+}
+
+QDeclarativeJS::AST::SourceLocation QmlDocVisitor::precedingComment(unsigned offset) const
+{
+ QDeclarativeJS::AST::SourceLocation currentLoc;
+
+ foreach (const QDeclarativeJS::AST::SourceLocation &loc, engine->comments()) {
+ if (loc.begin() > lastEndOffset && loc.end() < offset)
+ currentLoc = loc;
+ else
+ break;
+ }
+ if (currentLoc.isValid()) {
+ QString comment = document.mid(currentLoc.offset, currentLoc.length);
+ if (comment.startsWith("!") || comment.startsWith("*"))
+ return currentLoc;
+ }
+
+ return QDeclarativeJS::AST::SourceLocation();
+}
+
+void QmlDocVisitor::applyDocumentation(QDeclarativeJS::AST::SourceLocation location,
+ Node *node)
+{
+ QDeclarativeJS::AST::SourceLocation loc = precedingComment(location.begin());
+
+ if (loc.isValid()) {
+ QString source = document.mid(loc.offset, loc.length);
+ if (source.startsWith(QLatin1String("!")) ||
+ (source.startsWith(QLatin1String("*")) &&
+ source[1] != QLatin1Char('*'))) {
+
+ Location start(filePath);
+ start.setLineNo(loc.startLine);
+ start.setColumnNo(loc.startColumn);
+ Location finish(filePath);
+ finish.setLineNo(loc.startLine);
+ finish.setColumnNo(loc.startColumn);
+
+ Doc doc(start, finish, source.mid(1), commands);
+ node->setDoc(doc);
+ }
+ }
+}
+
+/*!
+ Visits element definitions, recording them in a tree structure.
+*/
+bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition)
+{
+ QString type = definition->qualifiedTypeNameId->name->asString();
+
+ if (current->type() == Node::Namespace) {
+ QmlClassNode *component = new QmlClassNode(current, name, 0);
+ component->setTitle(QLatin1String("QML ") + name + QLatin1String(" Component"));
+
+ QmlClassNode::addInheritedBy(type, component);
+ component->setLink(Node::InheritsLink, type, type);
+
+ applyDocumentation(definition->firstSourceLocation(), component);
+
+ current = component;
+ }
+
+ return true;
+}
+
+void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition)
+{
+ lastEndOffset = definition->lastSourceLocation().end();
+}
+
+bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiImportList *imports)
+{
+ // Note that the imports list can be traversed by iteration to obtain
+ // all the imports in the document at once, having found just one:
+ // *it = imports; it; it = it->next
+
+ QString module = document.mid(imports->import->fileNameToken.offset,
+ imports->import->fileNameToken.length);
+ QString version = document.mid(imports->import->versionToken.offset,
+ imports->import->versionToken.length);
+ importList.append(QPair<QString, QString>(module, version));
+
+ return true;
+}
+
+/*!
+ Visits public member declarations, such as signals and properties.
+ These only include custom signals and properties.
+*/
+bool QmlDocVisitor::visit(QDeclarativeJS::AST::UiPublicMember *member)
+{
+ switch (member->type) {
+ case QDeclarativeJS::AST::UiPublicMember::Signal:
+ {
+ if (current->type() == Node::Fake) {
+ QmlClassNode *qmlClass = static_cast<QmlClassNode *>(current);
+ if (qmlClass) {
+
+ QString name = member->name->asString();
+ FunctionNode *qmlSignal = new FunctionNode(Node::QmlSignal, current, name, false);
+
+ QList<Parameter> parameters;
+ for (QDeclarativeJS::AST::UiParameterList *it = member->parameters; it; it = it->next) {
+ if (it->type && it->name)
+ parameters.append(Parameter(it->type->asString(), "", it->name->asString()));
+ }
+
+ qmlSignal->setParameters(parameters);
+ applyDocumentation(member->firstSourceLocation(), qmlSignal);
+ }
+ }
+ break;
+ }
+ case QDeclarativeJS::AST::UiPublicMember::Property:
+ {
+ QString type = member->memberType->asString();
+ QString name = member->name->asString();
+
+ if (current->type() == Node::Fake) {
+ QmlClassNode *qmlClass = static_cast<QmlClassNode *>(current);
+ if (qmlClass) {
+
+ QString name = member->name->asString();
+ QmlPropGroupNode *qmlPropGroup = new QmlPropGroupNode(qmlClass, name, false);
+ if (member->isDefaultMember)
+ qmlPropGroup->setDefault();
+ QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup, name, type, false);
+ qmlPropNode->setWritable(!member->isReadonlyMember);
+ applyDocumentation(member->firstSourceLocation(), qmlPropNode);
+ }
+ }
+ break;
+ }
+ default:
+ return false;
+ }
+
+ //current->doc = precedingComment(member->firstSourceLocation().begin());
+ return true;
+}
+
+void QmlDocVisitor::endVisit(QDeclarativeJS::AST::UiPublicMember *definition)
+{
+ lastEndOffset = definition->lastSourceLocation().end();
+}
+
+bool QmlDocVisitor::visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty)
+{
+ return true;
+}
+
+QT_END_NAMESPACE
diff --git a/tools/qdoc3/cpptoqsconverter.h b/tools/qdoc3/qmlvisitor.h
index 001091b..c7b4bda 100644
--- a/tools/qdoc3/cpptoqsconverter.h
+++ b/tools/qdoc3/qmlvisitor.h
@@ -39,48 +39,46 @@
**
****************************************************************************/
-/*
- cpptoqsconverter.h
-*/
-
-#ifndef CPPTOQSCONVERTER_H
-#define CPPTOQSCONVERTER_H
-
-#include <qregexp.h>
+#ifndef QMLVISITOR_H
+#define QMLVISITOR_H
+#include <QString>
+#include "private/qdeclarativejsastvisitor_p.h"
+#include "node.h"
#include "tree.h"
QT_BEGIN_NAMESPACE
-class CppToQsConverter
+class QmlDocVisitor : public QDeclarativeJS::AST::Visitor
{
public:
- CppToQsConverter() { }
+ QmlDocVisitor(const QString &filePath, const QString &code,
+ QDeclarativeJS::Engine *engine, Tree *tree, QSet<QString> &commands);
+ virtual ~QmlDocVisitor();
+
+ bool visit(QDeclarativeJS::AST::UiImportList *imports);
+
+ bool visit(QDeclarativeJS::AST::UiObjectDefinition *definition);
+ void endVisit(QDeclarativeJS::AST::UiObjectDefinition *definition);
- ClassNode *findClassNode( Tree *qsTree, const QString& qtName );
- QString convertedDataType( Tree *qsTree, const QString& leftType,
- const QString& rightType = "" );
- QString convertedCode( Tree *qsTree, const QString& code,
- const QSet<QString>& classesWithNoQ );
+ bool visit(QDeclarativeJS::AST::UiPublicMember *member);
+ void endVisit(QDeclarativeJS::AST::UiPublicMember *definition);
- static void initialize( const Config& config );
- static void terminate();
+ bool visit(QDeclarativeJS::AST::IdentifierPropertyName *idproperty);
private:
- void clearState();
- QString convertCodeLine( Tree *qsTree, const QStringList& program,
- const QString& code,
- const QSet<QString>& classesWithNoQ );
- QString convertComment( Tree *qsTree, const QString& comment,
- const QSet<QString>& classesWithNoQ );
- QString convertExpr( Tree *qsTree, const QString& expr,
- const QSet<QString>& classesWithNoQ );
- void updateDelimDepths( const QString& code );
+ QDeclarativeJS::AST::SourceLocation precedingComment(unsigned offset) const;
+ void applyDocumentation(QDeclarativeJS::AST::SourceLocation location, Node *node);
- static QRegExp qClassRegExp;
- static QRegExp addressOperatorRegExp;
- static QRegExp gulbrandsenRegExp;
- static int tabSize;
+ QDeclarativeJS::Engine *engine;
+ quint32 lastEndOffset;
+ QString filePath;
+ QString name;
+ QString document;
+ QList<QPair<QString, QString> > importList;
+ QSet<QString> commands;
+ Tree *tree;
+ InnerNode *current;
};
QT_END_NAMESPACE
diff --git a/tools/qdoc3/qsakernelparser.cpp b/tools/qdoc3/qsakernelparser.cpp
deleted file mode 100644
index 8f12eda..0000000
--- a/tools/qdoc3/qsakernelparser.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qfile.h>
-
-#include "qsakernelparser.h"
-#include "tokenizer.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-QsaKernelParser::QsaKernelParser( Tree *cppTree )
- : cppTre( cppTree )
-{
-}
-
-QsaKernelParser::~QsaKernelParser()
-{
-}
-
-QString QsaKernelParser::language()
-{
- return "QSA Kernel C++";
-}
-
-QString QsaKernelParser::sourceFileNameFilter()
-{
- return "*.cpp";
-}
-
-void QsaKernelParser::parseSourceFile( const Location& location,
- const QString& filePath,
- Tree * /* tree */ )
-{
- QFile in(filePath);
- if (!in.open(QIODevice::ReadOnly)) {
- location.error( tr("Cannot open QSA kernel file '%1'").arg(filePath) );
- return;
- }
-
- Location fileLocation( filePath );
- Tokenizer fileTokenizer( fileLocation, in );
- tokenizer = &fileTokenizer;
- readToken();
-
- QString ident;
- QString className;
- int delimDepth = 0;
-
- while ( tok != Tok_Eoi ) {
- if ( tok == Tok_Ident ) {
- ident = tokenizer->lexeme();
- readToken();
- if ( tok == Tok_Gulbrandsen && tokenizer->braceDepth() == 0 &&
- tokenizer->parenDepth() == 0 ) {
- className = ident;
- } else if ( ident.startsWith("add") && ident.endsWith("Member") &&
- tok == Tok_LeftParen ) {
- bool isProperty = ident.endsWith( "VariableMember" );
- bool isStatic = ident.startsWith( "addStatic" );
- bool isWritable = !isStatic;
-
- readToken();
- if ( tok == Tok_String ) {
- QString member = tokenizer->lexeme();
- member = member.mid( 1, member.length() - 2 );
-
- readToken();
- if ( tok == Tok_Comma )
- readToken();
- if ( tok == Tok_Ident && tokenizer->lexeme() == "QSMember" )
- readToken();
- if ( tok == Tok_LeftParen ) {
- delimDepth++;
- readToken();
- }
-
- while ( tok != Tok_Eoi && tok != Tok_RightParen &&
- tok != Tok_Semicolon ) {
- if ( tok == Tok_Ident ) {
- ident = tokenizer->lexeme();
- if ( ident == "Custom" ) {
- isProperty = true;
- } else if ( ident == "AttributeNonWritable" ) {
- isWritable = false;
- } else if ( ident == "AttributeStatic" ) {
- isStatic = true;
- }
- }
- readToken();
- }
-
- ClassNode *classe =
- (ClassNode *) cppTre->findNode( QStringList(className),
- Node::Class );
- if ( classe == 0 ) {
- classe = new ClassNode( cppTre->root(), className );
- classe->setLocation( tokenizer->location() );
- }
-
- if ( isProperty ) {
- PropertyNode *property = new PropertyNode(classe, member);
- property->setLocation( tokenizer->location() );
- property->setDataType( "Object" );
-#if 0
- property->setGetter( member );
- if ( isWritable ) {
- QString setter = member;
- setter[0] = setter[0].toUpper();
- setter.prepend( "set" );
- property->setSetter( setter );
- }
-#endif
- } else {
- FunctionNode *func = new FunctionNode( classe, member );
- func->setLocation( tokenizer->location() );
- func->setAccess( FunctionNode::Public );
- func->setMetaness( FunctionNode::Slot );
- if ( member == "toLocaleString" ||
- member == "toString" ) {
- func->setReturnType( "QString" );
- } else if ( member == "valueOf" ) {
- func->setReturnType( "Object" );
- } else {
- func->setReturnType( "Object" );
- func->addParameter( Parameter("...") );
- }
- func->setStatic( false ); // ###
- }
- }
- }
- } else {
- readToken();
- }
- }
- in.close();
-}
-
-void QsaKernelParser::doneParsingSourceFiles( Tree * /* tree */ )
-{
-}
-
-void QsaKernelParser::readToken()
-{
- tok = tokenizer->getToken();
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/qscodemarker.cpp b/tools/qdoc3/qscodemarker.cpp
deleted file mode 100644
index 2ee5d99..0000000
--- a/tools/qdoc3/qscodemarker.cpp
+++ /dev/null
@@ -1,378 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- qscodemarker.cpp
-*/
-
-#include "node.h"
-#include "qscodemarker.h"
-
-QT_BEGIN_NAMESPACE
-
-QsCodeMarker::QsCodeMarker()
-{
-}
-
-QsCodeMarker::~QsCodeMarker()
-{
-}
-
-bool QsCodeMarker::recognizeCode( const QString& /* code */ )
-{
- return true;
-}
-
-bool QsCodeMarker::recognizeExtension( const QString& ext )
-{
- return ext == "js" || ext == "qs";
-}
-
-bool QsCodeMarker::recognizeLanguage( const QString& lang )
-{
- return lang == "JavaScript" || lang == "Qt Script";
-}
-
-QString QsCodeMarker::plainName( const Node *node )
-{
- QString name = node->name();
- if ( node->type() == Node::Function )
- name += "()";
- return name;
-}
-
-QString QsCodeMarker::plainFullName( const Node *node, const Node * /* relative */ )
-{
- QString fullName;
- for ( ;; ) {
- fullName.prepend( plainName(node) );
- if ( node->parent()->name().isEmpty() )
- break;
- node = node->parent();
- fullName.prepend(".");
- }
- return fullName;
-}
-
-QString QsCodeMarker::markedUpCode( const QString& code,
- const Node * /* relative */,
- const QString& /* dirPath */ )
-{
- return protect( code );
-}
-
-QString QsCodeMarker::markedUpSynopsis( const Node *node,
- const Node * /* relative */,
- SynopsisStyle style )
-{
- QString synopsis;
- QStringList extras;
- QString name;
-
- name = taggedNode( node );
- if ( style != Detailed )
- name = linkTag( node, name );
- name = "<@name>" + name + "</@name>";
-
- if ( style == Detailed && !node->parent()->name().isEmpty() &&
- node->type() != Node::Enum )
- name.prepend( taggedNode(node->parent()) + "." );
-
- switch ( node->type() ) {
- case Node::Class:
- synopsis = "class " + name;
- break;
- case Node::Function:
- {
- const FunctionNode *func = (const FunctionNode *) node;
-
- synopsis = name;
-
- if ( style == SeparateList ) {
- synopsis += "()";
- } else {
- synopsis += " (";
- if ( !func->parameters().isEmpty() ) {
- synopsis += " ";
- int numOptional = 0;
- QList<Parameter>::ConstIterator p = func->parameters().begin();
- while ( p != func->parameters().end() ) {
- if ( !(*p).defaultValue().isEmpty() ) {
- if ( p == func->parameters().begin() ) {
- synopsis += "[ ";
- } else {
- synopsis += " [ , ";
- }
- numOptional++;
- } else {
- if ( p != func->parameters().begin() )
- synopsis += ", ";
- }
- if ( !(*p).name().isEmpty() )
- synopsis += "<@param>" + protect( (*p).name() ) +
- "</@param> : ";
- synopsis += protect( (*p).leftType() );
- ++p;
- }
- for ( int i = 0; i < numOptional; i++ )
- synopsis += " ]";
- synopsis += " ";
- }
- synopsis += ")";
- }
-
- if ( style != SeparateList && !func->returnType().isEmpty() )
- synopsis += " : " + protect( func->returnType() );
-
- if ( style == Detailed && func->metaness() == FunctionNode::Signal )
- extras << "[signal]";
- }
- break;
- case Node::Property:
- {
- const PropertyNode *property = (const PropertyNode *) node;
-
- synopsis = name;
- if ( style != SeparateList )
- synopsis += " : " + property->dataType();
- if ( style == Detailed && property->setters().isEmpty() )
- extras << "[read only]";
- }
- break;
- case Node::Enum:
- {
- /*
- The letters A to F and X (upper- and lower-case) can
- appear in a hexadecimal constant (e.g. 0x3F).
- */
- QRegExp letterRegExp( "[G-WYZg-wyz_]" );
- const EnumNode *enume = (const EnumNode *) node;
-
- synopsis = name;
- if ( style == Summary && !enume->items().isEmpty() ) {
- synopsis += " : ";
- QString comma;
- QList<EnumItem>::ConstIterator it = enume->items().begin();
- while ( it != enume->items().end() ) {
- if ( enume->itemAccess((*it).name()) == Node::Public ) {
- synopsis += comma;
- synopsis += (*it).name();
- if ( (*it).value().indexOf(letterRegExp) != -1 )
- synopsis += " = " + (*it).value();
- comma = ", ";
- }
- ++it;
- }
- }
- }
- break;
- case Node::Namespace:
- case Node::Typedef:
- default:
- synopsis = name;
- }
-
- if ( style == Summary ) {
- if ( node->status() == Node::Preliminary ) {
- extras << "(preliminary)";
- } else if ( node->status() == Node::Deprecated ) {
- extras << "(deprecated)";
- } else if ( node->status() == Node::Obsolete ) {
- extras << "(obsolete)";
- }
- }
-
- QString extra;
- if ( !extras.isEmpty() )
- extra = "<@extra>" + extras.join(" ") + "</@extra>";
- return synopsis + extra;
-}
-
-QString QsCodeMarker::markedUpName( const Node *node )
-{
- QString name = linkTag( node, taggedNode(node) );
- if ( node->type() == Node::Function )
- name += "()";
- return name;
-}
-
-QString QsCodeMarker::markedUpFullName( const Node *node,
- const Node * /* relative */ )
-{
- QString fullName;
- for ( ;; ) {
- fullName.prepend( markedUpName(node) );
- if ( node->parent()->name().isEmpty() )
- break;
- node = node->parent();
- fullName.prepend( "<@op>.</@op>" );
- }
- return fullName;
-}
-
-QString QsCodeMarker::markedUpEnumValue(const QString & /* enumValue */,
- const Node * /* relative */)
-{
- return QString();
-}
-
-QString QsCodeMarker::markedUpIncludes( const QStringList& /* includes */ )
-{
- return QString();
-}
-
-QString QsCodeMarker::functionBeginRegExp( const QString& funcName )
-{
- return "^function[ \t].*\\b" + QRegExp::escape( funcName );
-}
-
-QString QsCodeMarker::functionEndRegExp( const QString& /* funcName */ )
-{
- return "^}";
-}
-
-QList<Section> QsCodeMarker::sections( const InnerNode *inner, SynopsisStyle style, Status status )
-{
- QList<Section> sections;
-
- if (inner->type() != Node::Class)
- return sections;
-
- const ClassNode *classe = static_cast<const ClassNode *>(inner);
-
- if ( style == Summary ) {
- FastSection enums(classe, "Enums", "", "enum", "enums");
- FastSection functions(classe, "Functions", "", "function", "functions");
- FastSection readOnlyProperties(classe, "", "Read-Only Properties", "property", "properties");
- FastSection signalz(classe, "Signals", "", "signal", "signals");
- FastSection writableProperties(classe, "", "Writable Properties", "property", "properties");
-
- QStack<const ClassNode *> stack;
- stack.push( classe );
-
- while ( !stack.isEmpty() ) {
- const ClassNode *ancestorClass = stack.pop();
-
- NodeList::ConstIterator c = ancestorClass->childNodes().begin();
- while ( c != ancestorClass->childNodes().end() ) {
- if ( (*c)->access() == Node::Public ) {
- if ( (*c)->type() == Node::Enum ) {
- insert( enums, *c, style, status );
- } else if ( (*c)->type() == Node::Function ) {
- const FunctionNode *func = (const FunctionNode *) *c;
- if ( func->metaness() == FunctionNode::Signal ) {
- insert( signalz, *c, style, status );
- } else {
- insert( functions, *c, style, status );
- }
- } else if ( (*c)->type() == Node::Property ) {
- const PropertyNode *property =
- (const PropertyNode *) *c;
- if ( property->setters().isEmpty() ) {
- insert( readOnlyProperties, *c, style, status );
- } else {
- insert( writableProperties, *c, style, status );
- }
- }
- }
- ++c;
- }
-
- QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().begin();
- while ( r != ancestorClass->baseClasses().end() ) {
- stack.prepend( (*r).node );
- ++r;
- }
- }
- append( sections, enums );
- append( sections, writableProperties );
- append( sections, readOnlyProperties );
- append( sections, functions );
- append( sections, signalz );
- } else if ( style == Detailed ) {
- FastSection enums( classe, "Enum Documentation", "", "member", "members");
- FastSection functionsAndSignals( classe, "Function and Signal Documentation", "", "member", "members");
- FastSection properties( classe, "Property Documentation", "", "member", "members");
-
- NodeList::ConstIterator c = classe->childNodes().begin();
- while ( c != classe->childNodes().end() ) {
- if ( (*c)->access() == Node::Public ) {
- if ( (*c)->type() == Node::Enum ) {
- insert( enums, *c, style, status );
- } else if ( (*c)->type() == Node::Function ) {
- insert( functionsAndSignals, *c, style, status );
- } else if ( (*c)->type() == Node::Property ) {
- insert( properties, *c, style, status );
- }
- }
- ++c;
- }
- append( sections, enums );
- append( sections, properties );
- append( sections, functionsAndSignals );
- } else { // ( style == SeparateList )
- FastSection all(classe, "", "", "member", "members");
-
- QStack<const ClassNode *> stack;
- stack.push( classe );
-
- while ( !stack.isEmpty() ) {
- const ClassNode *ancestorClass = stack.pop();
-
- NodeList::ConstIterator c = ancestorClass->childNodes().begin();
- while ( c != ancestorClass->childNodes().end() ) {
- if ( (*c)->access() == Node::Public )
- insert( all, *c, style, status );
- ++c;
- }
-
- QList<RelatedClass>::ConstIterator r = ancestorClass->baseClasses().begin();
- while ( r != ancestorClass->baseClasses().end() ) {
- stack.prepend( (*r).node );
- ++r;
- }
- }
- append( sections, all );
- }
- return sections;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/qscodemarker.h b/tools/qdoc3/qscodemarker.h
deleted file mode 100644
index c6a177f..0000000
--- a/tools/qdoc3/qscodemarker.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- qscodemarker.h
-*/
-
-#ifndef QSCODEMARKER_H
-#define QSCODEMARKER_H
-
-#include "codemarker.h"
-
-QT_BEGIN_NAMESPACE
-
-class QsCodeMarker : public CodeMarker
-{
-public:
- QsCodeMarker();
- ~QsCodeMarker();
-
- bool recognizeCode( const QString& code );
- bool recognizeExtension( const QString& ext );
- bool recognizeLanguage( const QString& lang );
- QString plainName(const Node *node);
- QString plainFullName(const Node *node, const Node *relative);
- QString markedUpCode( const QString& code, const Node *relative,
- const QString& dirPath );
- QString markedUpSynopsis( const Node *node, const Node *relative,
- SynopsisStyle style );
- QString markedUpName( const Node *node );
- QString markedUpFullName( const Node *node, const Node *relative );
- QString markedUpEnumValue(const QString &enumValue, const Node *relative);
- QString markedUpIncludes( const QStringList& includes );
- QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status);
- QString functionBeginRegExp( const QString& funcName );
- QString functionEndRegExp( const QString& funcName );
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/qscodeparser.cpp b/tools/qdoc3/qscodeparser.cpp
deleted file mode 100644
index 3b8bc1a..0000000
--- a/tools/qdoc3/qscodeparser.cpp
+++ /dev/null
@@ -1,944 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- qscodeparser.cpp
-*/
-
-#include <qfile.h>
-#include <qregexp.h>
-
-#include "config.h"
-#include "qscodeparser.h"
-#include "text.h"
-#include "tokenizer.h"
-#include "tree.h"
-
-QT_BEGIN_NAMESPACE
-
-#define CONFIG_QUICK "quick"
-#define CONFIG_REPLACES "replaces"
-
-#define COMMAND_BRIEF Doc::alias( "brief")
-#define COMMAND_CODE Doc::alias( "code")
-#define COMMAND_ENDCODE Doc::alias( "endcode")
-#define COMMAND_ENDQUICKCODE Doc::alias( "endquickcode")
-#define COMMAND_FILE Doc::alias( "file")
-#define COMMAND_GROUP Doc::alias( "group")
-#define COMMAND_MODULE Doc::alias( "module")
-#define COMMAND_PAGE Doc::alias( "page")
-#define COMMAND_QUICKCLASS Doc::alias( "quickclass")
-#define COMMAND_QUICKCODE Doc::alias( "quickcode")
-#define COMMAND_QUICKENUM Doc::alias( "quickenum")
-#define COMMAND_QUICKFN Doc::alias( "quickfn")
-#define COMMAND_QUICKIFY Doc::alias( "quickify")
-#define COMMAND_QUICKPROPERTY Doc::alias( "quickproperty")
-#define COMMAND_PROTECTED Doc::alias( "protected")
-#define COMMAND_REPLACE Doc::alias( "replace")
-
-static QString balancedParens = "(?:[^()]+|\\([^()]*\\))*";
-
-QsCodeParser::QsCodeParser(Tree *cppTree)
- : cppTre(cppTree), qsTre(0), replaceRegExp("/(.+)/([^/]*)/")
-{
-}
-
-QsCodeParser::~QsCodeParser()
-{
-}
-
-void QsCodeParser::initializeParser(const Config& config)
-{
- CppCodeParser::initializeParser(config);
-
- nodeTypeMap.insert(COMMAND_QUICKCLASS, Node::Class);
- nodeTypeMap.insert(COMMAND_QUICKENUM, Node::Enum);
- nodeTypeMap.insert(COMMAND_QUICKPROPERTY, Node::Property);
- nodeTypeMap.insert(COMMAND_QUICKFN, Node::Function);
-
- QString quickDotReplaces = CONFIG_QUICK + Config::dot + CONFIG_REPLACES;
- QStringList replaces = config.getStringList(quickDotReplaces);
- QStringList::ConstIterator r = replaces.begin();
- while (r != replaces.end()) {
- if (replaceRegExp.exactMatch(*r)) {
- QRegExp before(replaceRegExp.cap(1));
- before.setMinimal(true);
- QString after = replaceRegExp.cap(2);
-
- if (before.isValid()) {
- replaceBefores << before;
- replaceAfters << after;
- }
- else {
- config.lastLocation().warning(
- tr("Invalid regular expression '%1'")
- .arg(before.pattern()));
- }
- }
- else {
- config.lastLocation().warning(tr("Bad syntax in '%1'")
- .arg(quickDotReplaces));
- }
- ++r;
- }
-}
-
-void QsCodeParser::terminateParser()
-{
- nodeTypeMap.clear();
- classesWithNoQuickDoc.clear();
- replaceBefores.clear();
- replaceAfters.clear();
- CppCodeParser::terminateParser();
-}
-
-QString QsCodeParser::language()
-{
- return "Qt Script";
-}
-
-QString QsCodeParser::headerFileNameFilter()
-{
- return "*";
-}
-
-QString QsCodeParser::sourceFileNameFilter()
-{
- return "*.qs *.qsd";
-}
-
-void QsCodeParser::parseHeaderFile(const Location& location,
- const QString& filePath,
- Tree *tree)
-{
- qsTre = tree;
-
- QFile in(filePath);
- if (!in.open(QIODevice::ReadOnly)) {
- location.error(tr("Cannot open Qt Script class list '%1'")
- .arg(filePath));
- return;
- }
-
- Location fileLocation(filePath);
- Tokenizer fileTokenizer(fileLocation, in);
- int tok = fileTokenizer.getToken();
- while (tok != Tok_Eoi) {
- if (tok == Tok_Ident) {
- ClassNode *quickClass = new ClassNode(qsTre->root(),
- fileTokenizer.lexeme());
- quickClass->setLocation(fileTokenizer.location());
- }
- else {
- fileTokenizer.location().error(tr("Unexpected token '%1' in Qt"
- " Script class list")
- .arg(fileTokenizer.lexeme()));
- break;
- }
- tok = fileTokenizer.getToken();
- }
- in.close();
-}
-
-void QsCodeParser::parseSourceFile(const Location& location,
- const QString& filePath,
- Tree *tree)
-{
- qsTre = tree;
- CppCodeParser::parseSourceFile(location, filePath, tree);
-}
-
-void QsCodeParser::doneParsingHeaderFiles(Tree *tree)
-{
- NodeList::ConstIterator c = tree->root()->childNodes().begin();
- while (c != tree->root()->childNodes().end()) {
- if ((*c)->type() == Node::Class)
- quickifyClass((ClassNode *) *c);
- ++c;
- }
- cppTre->root()->deleteChildren(); // save memory
- tree->resolveInheritance();
- tree->resolveProperties();
-}
-
-void QsCodeParser::doneParsingSourceFiles(Tree *tree)
-{
- tree->root()->normalizeOverloads();
-
- NodeList::ConstIterator c = tree->root()->childNodes().begin();
- while (c != tree->root()->childNodes().end()) {
- if ((*c)->type() == Node::Class) {
- QMap<QString, Node *>::ConstIterator cwnqd =
- classesWithNoQuickDoc.find((*c)->name());
- if (cwnqd != classesWithNoQuickDoc.end()) {
- (*cwnqd)->location().warning(tr("No '\\%1' documentation for"
- " class '%2'")
- .arg(COMMAND_QUICKCLASS)
- .arg(cwnqd.key()));
- (*cwnqd)->setDoc(Doc(), true);
- }
- }
- ++c;
- }
-
- // ### check which enum types are used
-}
-
-FunctionNode *QsCodeParser::findFunctionNode(const QString& synopsis,
- Tree *tree)
-{
- QStringList parentPath;
- FunctionNode *clone;
- FunctionNode *func = 0;
-
- if (makeFunctionNode(synopsis, &parentPath, &clone)) {
- func = tree->findFunctionNode(parentPath, clone);
- delete clone;
- }
- return func;
-}
-
-QSet<QString> QsCodeParser::topicCommands()
-{
- return QSet<QString>() << COMMAND_FILE << COMMAND_GROUP << COMMAND_MODULE
- << COMMAND_PAGE << COMMAND_QUICKCLASS
- << COMMAND_QUICKENUM << COMMAND_QUICKFN
- << COMMAND_QUICKPROPERTY;
-}
-
-Node *QsCodeParser::processTopicCommand(const Doc& doc,
- const QString& command,
- const QString& arg)
-{
- if (command == COMMAND_QUICKFN) {
- QStringList parentPath;
- FunctionNode *quickFunc = 0;
- FunctionNode *clone;
-
- if (makeFunctionNode(arg, &parentPath, &clone)) {
- FunctionNode *kernelFunc = findKernelFunction(parentPath,
- clone->name());
- if (kernelFunc != 0)
- kernelFunc->setAccess(Node::Private);
-
- quickFunc = qsTre->findFunctionNode(parentPath, clone);
- if (quickFunc == 0 && kernelFunc != 0) {
- quickFunc = new FunctionNode(kernelFunc->parent(),
- kernelFunc->name());
- quickFunc->setLocation(kernelFunc->location());
- quickFunc->setReturnType(clone->returnType());
- quickFunc->setParameters(clone->parameters());
- }
-
- if (quickFunc == 0) {
- doc.location().warning(tr("Cannot find '%1' specified with '\\%2'")
- .arg(arg).arg(command));
- }
- else {
- quickFunc->setAccess(Node::Public);
- QStringList qtParams = quickFunc->parameterNames();
- quickFunc->borrowParameterNames(clone);
- QStringList quickParams = quickFunc->parameterNames();
- setQuickDoc(quickFunc, doc, qtParams, quickParams);
- }
- delete clone;
- }
- else {
- doc.location().warning(tr("Cannot find '%1' specified with '\\%2'")
- .arg(arg).arg(command));
- }
- return 0;
- }
- else if (nodeTypeMap.contains(command)) {
- QStringList subArgs = arg.split(" ");
- QString dataType;
-
- if (subArgs.count() == 3 && subArgs[1] == ":") {
- dataType = subArgs[2];
- }
- else if (subArgs.count() != 1) {
- doc.location().warning(tr("Invalid syntax in '\\%1'")
- .arg(command));
- }
-
- QStringList path = subArgs[0].split(".");
- Node *quickNode = qsTre->findNode(path, nodeTypeMap[command]);
- if (quickNode == 0) {
- doc.location().warning(tr("Cannot find '%1' specified with '\\%2'")
- .arg(arg).arg(command));
- }
- else {
- setQuickDoc(quickNode, doc);
- if (quickNode->type() == Node::Class) {
- classesWithNoQuickDoc.remove(quickNode->name());
- if (doc.briefText().isEmpty())
- doc.location().warning(tr("Missing '\\%1' for class '%2'")
- .arg(COMMAND_BRIEF)
- .arg(quickNode->name()));
- }
- else if (quickNode->type() == Node::Property) {
- PropertyNode *quickProperty = (PropertyNode *) quickNode;
- if (quickProperty->dataType() == "Object") {
- if (dataType.isEmpty()) {
- doc.location().warning(tr("Missing data type in '\\%1'"
- " (assuming 'Object')")
- .arg(command));
- }
- else {
- quickProperty->setDataType(dataType);
- }
- }
- else if (dataType != quickProperty->dataType()) {
- doc.location().warning(tr("Ignored contradictory data type"
- " in '\\%1'")
- .arg(command));
- }
- }
- }
- return 0;
- }
- else {
- return CppCodeParser::processTopicCommand(doc, command, arg);
- }
-}
-
-QSet<QString> QsCodeParser::otherMetaCommands()
-{
- return commonMetaCommands() << COMMAND_ENDQUICKCODE << COMMAND_QUICKCODE
- << COMMAND_QUICKIFY << COMMAND_REPLACE;
-}
-
-void QsCodeParser::processOtherMetaCommand(const Doc& doc,
- const QString& command,
- const QString& arg,
- Node *node)
-{
- if (command == COMMAND_PROTECTED) {
- doc.location().warning(tr("Cannot use '\\%1' in %2")
- .arg(COMMAND_PROTECTED).arg(language()));
- }
- else {
- CppCodeParser::processOtherMetaCommand(doc,command,arg,node);
- }
-}
-
-ClassNode *QsCodeParser::tryClass(const QString& className)
-{
- return (ClassNode*) cppTre->findNode(QStringList(className),Node::Class);
-}
-
-FunctionNode *QsCodeParser::findKernelFunction(const QStringList& parentPath,
- const QString& name)
-{
- FunctionNode clone(0, name);
- clone.setReturnType("Object");
- clone.addParameter(Parameter("..."));
- return qsTre->findFunctionNode(parentPath, &clone);
-}
-
-void QsCodeParser::extractRegExp(const QRegExp& regExp,
- QString& source,
- const Doc& doc)
-{
- QRegExp blankLineRegExp(
- "[ \t]*(?:\n(?:[ \t]*\n)+[ \t]*|[ \n\t]*\\\\code|"
- "\\\\endcode[ \n\t]*)");
- QStringList paras = source.trimmed().split(blankLineRegExp);
- paras = paras.filter(regExp);
- if (paras.count() == 0) {
- doc.location().warning(tr("Cannot find regular expression '%1'")
- .arg(regExp.pattern()));
- }
- else if (paras.count() > 1) {
- doc.location().warning(tr("Regular rexpression '%1' matches multiple"
- "times").arg(regExp.pattern()));
- }
- else {
- source = paras.first() + "\n\n";
- }
-}
-
-void QsCodeParser::extractTarget(const QString& target,
- QString& source,
- const Doc& doc)
-{
- QRegExp targetRegExp(
- "(\\\\target\\s+(\\S+)[^\n]*\n"
- "(?:(?!\\s*\\\\code)[^\n]+\n|\\s*\\\\code.*\\\\endcode\\s*\n)*)"
- "(?:\\s*\n|[^\n]*$)");
- targetRegExp.setMinimal(true);
-
- int pos = 0;
- while ((pos = source.indexOf(targetRegExp, pos)) != -1) {
- if (targetRegExp.cap(2) == target) {
- source = targetRegExp.cap(1) + "\n\n";
- return;
- }
- pos += targetRegExp.matchedLength();
- }
- doc.location().warning(tr("Cannot find target '%1'").arg(target));
-}
-
-void QsCodeParser::renameParameters(QString& source,
- const Doc& /* doc */,
- const QStringList& qtParams,
- const QStringList& quickParams)
-{
- QRegExp paramRegExp("(\\\\a\\s*\\{?\\s*)([A-Za-z0-9_]+)");
-
- int pos = 0;
- while ((pos = paramRegExp.indexIn(source, pos)) != -1) {
- pos += paramRegExp.cap(1).length();
- QString before = paramRegExp.cap(2);
- int index = qtParams.indexOf(before);
- if (index != -1) {
- QString after = quickParams[index];
- source.replace(pos, before.size(), after);
- }
- }
-}
-
-void QsCodeParser::applyReplacementList(QString& source, const Doc& doc)
-{
- QStringList args = doc.metaCommandArgs(COMMAND_REPLACE);
- QStringList::ConstIterator a = args.begin();
- while (a != args.end()) {
- if (replaceRegExp.exactMatch(*a)) {
- QRegExp before(replaceRegExp.cap(1));
- before.setMinimal(true);
- QString after = replaceRegExp.cap(2);
-
- if (before.isValid()) {
- int oldLen = source.size();
- source.replace(before, after);
-
- // this condition is sufficient but not necessary
- if (oldLen == source.size() && !source.contains(after))
- doc.location().warning(
- tr("Regular expression '%1' did not match anything")
- .arg(before.pattern()));
- }
- else {
- doc.location().warning(
- tr("Invalid regular expression '%1'")
- .arg(before.pattern()));
- }
- }
- else {
- doc.location().warning(tr("Bad syntax in '\\%1'")
- .arg(COMMAND_REPLACE));
- }
- ++a;
- }
-
- QRegExp codeRegExp("\\\\" + COMMAND_CODE + "(.*)\\\\" + COMMAND_ENDCODE);
- codeRegExp.setMinimal(true);
-
- QRegExp quickcodeRegExp(
- "\\\\" + COMMAND_QUICKCODE + "(.*)\\\\" + COMMAND_ENDQUICKCODE);
- quickcodeRegExp.setMinimal(true);
-
- int quickcodePos = doc.source().indexOf(quickcodeRegExp);
- if (quickcodePos != -1) {
- int codePos = source.indexOf(codeRegExp);
- if (codePos == -1) {
- doc.location().warning(
- tr("Cannot find any '\\%1' snippet corresponding to '\\%2'")
- .arg(COMMAND_CODE).arg(COMMAND_QUICKCODE));
- }
- else {
- source.replace(codeRegExp.pos(1), codeRegExp.cap(1).length(),
- quickcodeRegExp.cap(1));
- codePos = codeRegExp.pos(1) + quickcodeRegExp.cap(1).length();
-
- if (doc.source().indexOf(quickcodeRegExp, quickcodePos + 1) != -1) {
- doc.location().warning(
- tr("Cannot use '\\%1' twice in a row")
- .arg(COMMAND_QUICKCODE));
- }
- else if (source.indexOf(codeRegExp, codePos + 1) != -1) {
- doc.location().warning(tr("Ambiguous '\\%1'")
- .arg(COMMAND_QUICKCODE));
- }
- }
- }
-}
-
-void QsCodeParser::quickifyClass(ClassNode *quickClass)
-{
- QString qtClassName = quickClass->name();
- QString bare = quickClass->name();
- if (bare != "Qt" && bare != "Object") {
- if (bare.startsWith("Q")) {
- bare = bare.mid(1);
- }
- else {
- qtClassName.prepend("Q");
- classesWithNoQ.insert(bare);
- }
- }
-
- ClassNode *qtClass = 0;
- ClassNode *wrapperClass = 0;
-
- if ((wrapperClass = tryClass("Quick" + bare)) != 0 ||
- (wrapperClass = tryClass("QS" + bare + "Class")) != 0) {
- qtClass = tryClass(qtClassName);
- if (qtClass == 0) {
- qtClass = wrapperClass;
- wrapperClass = 0;
- }
- }
- else if ((wrapperClass = tryClass("Quick" + bare + "Ptr")) != 0) {
- QRegExp ptrToQtType("(Q[A-Za-z0-9_]+)\\s*\\*");
- FunctionNode *ctor =
- wrapperClass->findFunctionNode(wrapperClass->name());
- if (ctor != 0 && !ctor->parameters().isEmpty() &&
- ptrToQtType.exactMatch(ctor->parameters().first().leftType()))
- qtClassName = ptrToQtType.cap(1);
- qtClass = tryClass(qtClassName);
- }
- else {
- wrapperClass = tryClass("Q" + bare + "Ptr");
- if (wrapperClass == 0)
- wrapperClass = tryClass("Quick" + bare + "Interface");
- qtClass = tryClass(qtClassName);
- }
-
- if (qtClass == 0) {
- if (wrapperClass == 0) {
- quickClass->location().warning(tr("Cannot find Qt class '%1'")
- .arg(qtClassName));
- }
- else {
- quickClass->location().warning(tr("Cannot find Qt class '%1'"
- " wrapped by '%2'")
- .arg(qtClassName)
- .arg(wrapperClass->name()));
- }
- return;
- }
-
- QList<RelatedClass>::ConstIterator r = qtClass->baseClasses().begin();
- while (r != qtClass->baseClasses().end()) {
- ClassNode *quickBaseClass = cpp2qs.findClassNode(qsTre,
- (*r).node->name());
- if (quickBaseClass)
- quickClass->addBaseClass((*r).access, quickBaseClass);
- ++r;
- }
- if (quickClass->baseClasses().isEmpty() && quickClass->name() != "Object")
- quickClass->addBaseClass(Node::Public,
- cpp2qs.findClassNode(qsTre,"Object"));
-
- QSet<QString> funcBlackList;
- QSet<QString> propertyBlackList;
-
- NodeList children;
- if (wrapperClass != 0) {
- children = wrapperClass->childNodes();
-
- funcBlackList.insert(wrapperClass->name());
- funcBlackList.insert("~" + wrapperClass->name());
- }
- children += qtClass->childNodes();
-
- for (int pass = 0; pass < 2; pass++) {
- NodeList::ConstIterator c = children.begin();
- while (c != children.end()) {
- if ((*c)->access() != Node::Private &&
- (*c)->status() == Node::Commendable) {
- if (pass == 0) {
- if ((*c)->type() == Node::Enum) {
- EnumNode *enume = (EnumNode *) *c;
- quickifyEnum(quickClass, enume);
- }
- else if ((*c)->type() == Node::Property) {
- if (!propertyBlackList.contains((*c)->name())) {
- PropertyNode *property = (PropertyNode *) *c;
- quickifyProperty(quickClass, qtClass, property);
- if (!property->getters().isEmpty())
- funcBlackList.insert(property->getters().first()->name());
- if (!property->setters().isEmpty())
- funcBlackList.insert(property->setters().first()->name());
- if (!property->resetters().isEmpty())
- funcBlackList.insert(property->resetters().first()->name());
- propertyBlackList.insert(property->name());
- }
- }
- }
- else if ((*c)->type() == Node::Function) {
- FunctionNode *func = (FunctionNode *) *c;
- quickifyFunction(quickClass, qtClass, func,
- funcBlackList.contains((*c)->name()) &&
- func->parameters().count() < 2);
- }
- }
- ++c;
- }
- }
- setQtDoc(quickClass, qtClass->doc());
- classesWithNoQuickDoc.insert(quickClass->name(), quickClass);
-}
-
-void QsCodeParser::quickifyEnum(ClassNode *quickClass, EnumNode *enume)
-{
- EnumNode *quickEnum = new EnumNode(quickClass, enume->name());
- quickEnum->setLocation(enume->location());
-#if 0 // ### not yet
- quickEnum->setAccess(Node::Protected);
-#endif
-
- QList<EnumItem>::ConstIterator it = enume->items().begin();
- while (it != enume->items().end()) {
- QString name = (*it).name();
- QString value = (*it).value();
- quickEnum->addItem(EnumItem(name, value));
- ++it;
- }
- setQtDoc(quickEnum, enume->doc());
-}
-
-void QsCodeParser::quickifyFunction(ClassNode *quickClass, ClassNode *qtClass,
- FunctionNode *func, bool onBlackList)
-{
- if (func->metaness() == FunctionNode::Dtor)
- return;
-
- FunctionNode *kernelFunc = findKernelFunction(
- QStringList() << quickClass->name(), func->name());
-
- QString quickName = func->name();
- if (func->metaness() == FunctionNode::Ctor)
- quickName = quickClass->name();
- FunctionNode *quickFunc = new FunctionNode(quickClass, quickName);
- quickFunc->setLocation(func->location());
-
- if (onBlackList) {
- quickFunc->setAccess(Node::Protected);
- }
- else {
- if (kernelFunc != 0 && func->numOverloads() == 1 &&
- (func->parameters().count() == 0 ||
- func->parameters().last().defaultValue().isEmpty())) {
- kernelFunc->setAccess(Node::Private);
- }
- else {
- if (func->metaness() == FunctionNode::Plain)
- quickFunc->setAccess(Node::Protected);
- }
- }
-
- quickFunc->setReturnType(cpp2qs.convertedDataType(qsTre,
- func->returnType()));
- if (func->metaness() != FunctionNode::Slot)
- quickFunc->setMetaness(func->metaness());
- quickFunc->setVirtualness(FunctionNode::ImpureVirtual);
- quickFunc->setOverload(func->isOverload());
-
- QList<Parameter>::ConstIterator q = func->parameters().begin();
- while (q != func->parameters().end()) {
- QString dataType = cpp2qs.convertedDataType(qsTre, (*q).leftType(),
- (*q).rightType());
- if (dataType.isEmpty()) {
- dataType = "UNKNOWN";
- quickFunc->setAccess(Node::Private);
- }
- Parameter param(dataType, "", (*q).name(),
- (*q).defaultValue().isEmpty() ? "" : "undefined");
- quickFunc->addParameter(param);
- ++q;
- }
-
- if (func->doc().isEmpty()) {
- if (func->parent() != (InnerNode *) qtClass) {
- func = qtClass->findFunctionNode(func);
- if (func != 0)
- setQtDoc(quickFunc, func->doc());
- }
- }
- else {
- setQtDoc(quickFunc, func->doc());
- }
-}
-
-void QsCodeParser::quickifyProperty(ClassNode *quickClass,
- ClassNode * /* qtClass */,
- PropertyNode *property)
-{
- PropertyNode *quickProperty = new PropertyNode(quickClass,
- property->name());
- quickProperty->setLocation(property->location());
- quickProperty->setDataType(cpp2qs.convertedDataType(qsTre,
- property->dataType()));
-#if 0
- quickProperty->setGetter(property->getter());
- quickProperty->setSetter(property->setter());
- quickProperty->setResetter(property->resetter());
-#endif
- quickProperty->setStored(property->isStored());
- quickProperty->setDesignable(property->isDesignable());
-
- setQtDoc(quickProperty, property->doc());
-}
-
-QString QsCodeParser::quickifiedDoc(const QString& source)
-{
- QString result;
- int i = 0;
-
- while (i < (int) source.length()) {
- if (leftWordBoundary(source, i)) {
- if (source[i] == 'Q') {
- if (source[i + 1] == 'C' && source.mid(i, 8) == "QCString") {
- i += 2;
- }
- else {
- int end = i + 1;
- while (isWord(source[end]))
- ++end;
- if (!classesWithNoQ.contains(
- source.mid(i + 1, end - (i + 1))))
- result += "Q";
- i++;
- }
- }
- else if (source[i] == 'T' && source.mid(i, 4) == "TRUE" &&
- rightWordBoundary(source, i + 4)) {
- result += "\\c{true}";
- i += 4;
- }
- else if (source[i] == 'F' && source.mid(i, 5) == "FALSE" &&
- rightWordBoundary(source, i + 5)) {
- result += "\\c{false}";
- i += 5;
- }
- else if (source[i] == 'c' && source.mid(i, 6) == "const ") {
- i += 6;
- }
- else {
- result += source[i++];
- }
- }
- else if ((source[i] == ':' && source[i + 1] == ':') ||
- (source[i] == '-' && source[i + 1] == '>')) {
- result += '.';
- i += 2;
- }
- else if (source[i] == '\\') {
- // ### make independent of the command name
- if (source.mid(i, 5) == "\\code") {
- do {
- result += source[i++];
- } while (source[i - 1] != '\n');
-
- int begin = i;
- int end = source.indexOf("\\endcode", i);
- if (end != -1) {
- QString code = source.mid(begin, end - begin);
- result += cpp2qs.convertedCode(qsTre, code,
- classesWithNoQ);
- i = end;
- }
- }
- else {
- result += source[i++];
- }
- }
- else {
- result += source[i++];
- }
- }
-
- QList<QRegExp>::ConstIterator b = replaceBefores.begin();
- QStringList::ConstIterator a = replaceAfters.begin();
- while (a != replaceAfters.end()) {
- result.replace(*b, *a);
- ++b;
- ++a;
- }
- return result;
-}
-
-void QsCodeParser::setQtDoc(Node *quickNode, const Doc& doc)
-{
- if (!doc.isEmpty()) {
- Doc quickDoc(doc.location(), doc.location(),
- quickifiedDoc(doc.source()),
- CppCodeParser::topicCommands() +
- CppCodeParser::otherMetaCommands());
- quickNode->setDoc(quickDoc, true);
- }
-}
-
-void QsCodeParser::setQuickDoc(Node *quickNode,
- const Doc& doc,
- const QStringList& qtParams,
- const QStringList& quickParams)
-{
- QRegExp quickifyCommand("\\\\" + COMMAND_QUICKIFY + "([^\n]*)(?:\n|$)");
-
- if (quickNode->type() == Node::Function) {
- FunctionNode *quickFunc = (FunctionNode *) quickNode;
- quickFunc->setOverload(false);
- }
-
- if (doc.metaCommandsUsed().contains(COMMAND_QUICKIFY)) {
- QString source = doc.source();
- int pos = source.indexOf(quickifyCommand);
- if (pos != -1) {
- QString quickifiedSource = quickNode->doc().source();
- if (!qtParams.isEmpty() && qtParams != quickParams)
- renameParameters(quickifiedSource, doc, qtParams,
- quickParams);
- applyReplacementList(quickifiedSource, doc);
-
- do {
- QString extract = quickifiedSource;
- QString arg = quickifyCommand.cap(1).simplified();
- if (!arg.isEmpty()) {
- if (arg.startsWith("/") && arg.endsWith("/") &&
- arg.length() > 2) {
- QString pattern = arg.mid(1, arg.length() - 2);
- extractRegExp(QRegExp(pattern), extract, doc);
- }
- else {
- extractTarget(arg, extract, doc);
- }
- }
- source.replace(pos, quickifyCommand.matchedLength(), extract);
- pos += extract.length();
- } while ((pos = source.indexOf(quickifyCommand, pos)) != -1);
-
- QRegExp quickcodeRegExp(
- "\\\\" + COMMAND_QUICKCODE + "(.*)\\\\" +
- COMMAND_ENDQUICKCODE);
- quickcodeRegExp.setMinimal(true);
- source.replace(quickcodeRegExp, "");
- }
-
- Doc quickDoc(doc.location(),
- doc.location(),
- source,
- (CppCodeParser::topicCommands() + topicCommands() +
- CppCodeParser::otherMetaCommands()) << COMMAND_REPLACE);
- quickNode->setDoc(quickDoc, true);
- processOtherMetaCommands(quickDoc, quickNode);
- }
- else {
- quickNode->setDoc(doc, true);
- processOtherMetaCommands(doc, quickNode);
- }
-}
-
-bool QsCodeParser::makeFunctionNode(const QString& synopsis,
- QStringList *parentPathPtr,
- FunctionNode **funcPtr)
-{
- QRegExp funcRegExp(
- "\\s*([A-Za-z0-9_]+)\\.([A-Za-z0-9_]+)\\s*\\((" +
- balancedParens +
- ")\\)(?:\\s*:\\s*([A-Za-z0-9_]+))?\\s*");
- QRegExp paramRegExp(
- "\\s*(\\[)?\\s*(?:([A-Za-z0-9_]+)\\s*:\\s*)?"
- "([A-Za-z0-9_]+|\\.\\.\\.)\\s*(\\[)?[\\s\\]]*");
-
- if (!funcRegExp.exactMatch(synopsis))
- return false;
-
- ClassNode *classe = (ClassNode*)
- qsTre->findNode(QStringList(funcRegExp.cap(1)),Node::Class);
- if (classe == 0)
- return false;
-
- FunctionNode *clone = new FunctionNode(0, funcRegExp.cap(2));
- bool optional = false;
-
- QString paramStr = funcRegExp.cap(3);
- QStringList params = paramStr.split(",");
- QStringList::ConstIterator p = params.begin();
- while (p != params.end()) {
- if (paramRegExp.exactMatch(*p)) {
- if (!paramRegExp.cap(1).isEmpty())
- optional = true;
- clone->addParameter(Parameter(paramRegExp.cap(3),
- "",
- paramRegExp.cap(2),
- optional ? "undefined" : ""));
- if (!paramRegExp.cap(4).isEmpty())
- optional = true;
- }
- else {
- delete clone;
- return false;
- }
- ++p;
- }
- QString returnType = funcRegExp.cap(4);
- if (!returnType.isEmpty())
- clone->setReturnType(returnType);
- if (parentPathPtr != 0)
- *parentPathPtr = QStringList() << classe->name();
- if (funcPtr != 0) {
- *funcPtr = clone;
- }
- else {
- delete clone;
- }
- return true;
-}
-
-bool QsCodeParser::isWord(QChar ch)
-{
- return ch.isLetterOrNumber() || ch == QChar('_');
-}
-
-bool QsCodeParser::leftWordBoundary(const QString& str, int pos)
-{
- return !isWord(str[pos - 1]) && isWord(str[pos]);
-}
-
-bool QsCodeParser::rightWordBoundary(const QString& str, int pos)
-{
- return isWord(str[pos - 1]) && !isWord(str[pos]);
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/qscodeparser.h b/tools/qdoc3/qscodeparser.h
deleted file mode 100644
index 28924d7..0000000
--- a/tools/qdoc3/qscodeparser.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- qscodeparser.h
-*/
-
-#ifndef QSCODEPARSER_H
-#define QSCODEPARSER_H
-
-#include "cppcodeparser.h"
-#include "cpptoqsconverter.h"
-
-QT_BEGIN_NAMESPACE
-
-class QsCodeParser : public CppCodeParser
-{
- public:
- QsCodeParser(Tree *cppTree);
- ~QsCodeParser();
-
- virtual void initializeParser(const Config& config);
- virtual void terminateParser();
- virtual QString language();
- virtual QString headerFileNameFilter();
- virtual QString sourceFileNameFilter();
- virtual void parseHeaderFile(const Location& location,
- const QString& filePath, Tree *tree);
- virtual void parseSourceFile(const Location& location,
- const QString& filePath, Tree *tree);
- virtual void doneParsingHeaderFiles(Tree *tree);
- virtual void doneParsingSourceFiles(Tree *tree);
-
- FunctionNode *findFunctionNode(const QString& synopsis, Tree *tree);
-
- protected:
- virtual QSet<QString> topicCommands();
- virtual Node *processTopicCommand(const Doc& doc, const QString& command,
- const QString& arg);
- virtual QSet<QString> otherMetaCommands();
- virtual void processOtherMetaCommand(const Doc& doc,
- const QString& command,
- const QString& arg, Node *node);
-
- private:
- ClassNode *tryClass(const QString& className);
- FunctionNode *findKernelFunction(const QStringList& parentPath,
- const QString& name);
- void extractRegExp(const QRegExp& regExp, QString& source,
- const Doc& doc);
- void extractTarget(const QString& target, QString& source,
- const Doc& doc);
- void renameParameters(QString& source, const Doc& doc,
- const QStringList& qtNames,
- const QStringList& quickNames);
- void applyReplacementList(QString& source, const Doc& doc);
- void quickifyClass(ClassNode *quickClass);
- void quickifyEnum(ClassNode *quickClass, EnumNode *enume);
- void quickifyFunction(ClassNode *quickClass, ClassNode *qtClass,
- FunctionNode *func, bool onBlackList);
- void quickifyProperty(ClassNode *quickClass, ClassNode *qtClass,
- PropertyNode *property);
- QString quickifiedDoc(const QString& source);
- void setQtDoc(Node *quickNode, const Doc& doc);
- void setQuickDoc(Node *quickNode, const Doc& doc,
- const QStringList& qtParams = QStringList(),
- const QStringList& quickParams = QStringList());
- bool makeFunctionNode(const QString& synopsis, QStringList *parentPathPtr,
- FunctionNode **funcPtr);
-
- static bool isWord(QChar ch);
- static bool leftWordBoundary(const QString& str, int pos);
- static bool rightWordBoundary(const QString& str, int pos);
-
- QMap<QString,Node::Type> nodeTypeMap;
- QMap<QString,Node*> classesWithNoQuickDoc;
- QList<QRegExp> replaceBefores;
- QStringList replaceAfters;
- QSet<QString> classesWithNoQ;
- Tree* cppTre;
- Tree* qsTre;
- QRegExp replaceRegExp;
- CppToQsConverter cpp2qs;
-
- static int tabSize;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp
index b8055a7..6dc7894 100644
--- a/tools/qdoc3/quoter.cpp
+++ b/tools/qdoc3/quoter.cpp
@@ -41,7 +41,6 @@
#include <qfileinfo.h>
#include <qregexp.h>
-#include <qdebug.h>
#include "quoter.h"
@@ -123,9 +122,9 @@ Quoter::Quoter()
/* We're going to hard code these delimiters:
* C++, Qt, Qt Script, Java:
//! [<id>]
- * .pro files:
+ * .pro, .py files:
#! [<id>]
- * .xq, .xml, .html files:
+ * .html, .qrc, .ui, .xq, .xml files:
<!-- [<id>] -->
*/
commentHash["pro"] = "#!";
diff --git a/tools/qdoc3/sgmlgenerator.cpp b/tools/qdoc3/sgmlgenerator.cpp
deleted file mode 100644
index 1858028..0000000
--- a/tools/qdoc3/sgmlgenerator.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- sgmlgenerator.cpp
-*/
-
-#include "sgmlgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-SgmlGenerator::SgmlGenerator()
-{
-}
-
-SgmlGenerator::~SgmlGenerator()
-{
-}
-
-QString SgmlGenerator::format()
-{
- return "SGML";
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 74b68df..0e9a2a8 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Assistant
qhp.Assistant.file = assistant.qhp
-qhp.Assistant.namespace = com.trolltech.assistant.471
+qhp.Assistant.namespace = com.trolltech.assistant.472
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
qhp.Assistant.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Assistant.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Assistant.filterAttributes = qt 4.7.1 tools assistant
+qhp.Assistant.filterAttributes = qt 4.7.2 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant
qhp.Assistant.subprojects = manual examples
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index ab66792..637399b 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Designer
qhp.Designer.file = designer.qhp
-qhp.Designer.namespace = com.trolltech.designer.471
+qhp.Designer.namespace = com.trolltech.designer.472
qhp.Designer.virtualFolder = qdoc
qhp.Designer.indexTitle = Qt Designer Manual
qhp.Designer.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Designer.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Designer.filterAttributes = qt 4.7.1 tools designer
+qhp.Designer.filterAttributes = qt 4.7.2 tools designer
qhp.Designer.customFilters.Designer.name = Qt Designer Manual
qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer
qhp.Designer.subprojects = manual examples
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index 0d920e2..8ee298e 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Linguist
qhp.Linguist.file = linguist.qhp
-qhp.Linguist.namespace = com.trolltech.linguist.471
+qhp.Linguist.namespace = com.trolltech.linguist.472
qhp.Linguist.virtualFolder = qdoc
qhp.Linguist.indexTitle = Qt Linguist Manual
qhp.Linguist.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.Linguist.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Linguist.filterAttributes = qt 4.7.1 tools linguist
+qhp.Linguist.filterAttributes = qt 4.7.2 tools linguist
qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual
qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist
qhp.Linguist.subprojects = manual examples
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 9aaebcb..e68a935 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -21,7 +21,7 @@ edition.DesktopLight.groups = -graphicsview-api
qhp.projects = Qml
qhp.Qml.file = qml.qhp
-qhp.Qml.namespace = com.trolltech.qml.471
+qhp.Qml.namespace = com.trolltech.qml.472
qhp.Qml.virtualFolder = qdoc
qhp.Qml.indexTitle = Qml Reference
@@ -61,9 +61,9 @@ qhp.Qml.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.Qml.filterAttributes = qt 4.7.1 qtrefdoc
-qhp.Qml.customFilters.Qt.name = Qt 4.7.1
-qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.1
+qhp.Qml.filterAttributes = qt 4.7.2 qtrefdoc
+qhp.Qml.customFilters.Qt.name = Qt 4.7.2
+qhp.Qml.customFilters.Qt.filterAttributes = qt 4.7.2
qhp.Qml.subprojects = classes
qhp.Qml.subprojects.classes.title = Elements
qhp.Qml.subprojects.classes.indexTitle = Qml Elements
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index be2e9d3..b5bc96c 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -13,7 +13,7 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = qmake
qhp.qmake.file = qmake.qhp
-qhp.qmake.namespace = com.trolltech.qmake.471
+qhp.qmake.namespace = com.trolltech.qmake.472
qhp.qmake.virtualFolder = qdoc
qhp.qmake.indexTitle = QMake Manual
qhp.qmake.extraFiles = images/bg_l.png \
@@ -50,7 +50,7 @@ qhp.qmake.extraFiles = images/bg_l.png \
style/style_ie8.css \
style/style.css
-qhp.qmake.filterAttributes = qt 4.7.1 tools qmake
+qhp.qmake.filterAttributes = qt 4.7.2 tools qmake
qhp.qmake.customFilters.qmake.name = qmake Manual
qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake
qhp.qmake.subprojects = manual
diff --git a/tools/qdoc3/test/qt-api-only.qdocconf b/tools/qdoc3/test/qt-api-only.qdocconf
index cdd7a7c..36637d2 100644
--- a/tools/qdoc3/test/qt-api-only.qdocconf
+++ b/tools/qdoc3/test/qt-api-only.qdocconf
@@ -1,34 +1,2 @@
include(qt-build-docs.qdocconf)
-
-# Ensures that the generated index contains a URL that can be used by the
-# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf,
-# qmake.qdocconf).
-
-url = ./
-
-# Ensures that the documentation for the tools is not included in the generated
-# .qhp file.
-
-qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
- $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
- $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
- $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
- $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
-
-# Remove the QML documentation from the Qt-only documentation.
-
-excludedirs += $QT_SOURCE_TREE/src/imports
-
-outputdir = $QT_BUILD_TREE/doc-build/html-qt
-tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags
-base = file:$QT_BUILD_TREE/doc-build/html-qt
+include(qt-project-api-only.qdocconf)
diff --git a/tools/qdoc3/test/qt-build-docs-online.qdocconf b/tools/qdoc3/test/qt-build-docs-online.qdocconf
new file mode 100644
index 0000000..2962845
--- /dev/null
+++ b/tools/qdoc3/test/qt-build-docs-online.qdocconf
@@ -0,0 +1,2 @@
+include(qt-project.qdocconf)
+include(qt-html-templates-online.qdocconf)
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index dcabeb4..4dbe1cd 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -1,147 +1,2 @@
-include(compat.qdocconf)
-include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
+include(qt-project.qdocconf)
include(qt-html-templates.qdocconf)
-include(qt-defines.qdocconf)
-
-project = Qt
-description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.7
-
-sourceencoding = UTF-8
-outputencoding = UTF-8
-naturallanguage = en_US
-
-qhp.projects = Qt
-
-qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
-qhp.Qt.virtualFolder = qdoc
-qhp.Qt.indexTitle = Qt Reference Documentation
-qhp.Qt.indexRoot =
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = 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 \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- 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
-
-
-
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
-qhp.Qt.subprojects = classes overviews examples
-qhp.Qt.subprojects.classes.title = Classes
-qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
-qhp.Qt.subprojects.classes.selectors = class fake:headerfile
-qhp.Qt.subprojects.classes.sortPages = true
-qhp.Qt.subprojects.overviews.title = Overviews
-qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs
-qhp.Qt.subprojects.overviews.selectors = fake:page,group,module
-qhp.Qt.subprojects.examples.title = Tutorials and Examples
-qhp.Qt.subprojects.examples.indexTitle = Qt Examples
-qhp.Qt.subprojects.examples.selectors = fake:example
-
-language = Cpp
-
-headerdirs = $QT_SOURCE_TREE/src \
- $QT_SOURCE_TREE/extensions/activeqt \
- $QT_SOURCE_TREE/tools/assistant/lib \
- $QT_SOURCE_TREE/tools/assistant/compat/lib \
- $QT_SOURCE_TREE/tools/designer/src/uitools \
- $QT_SOURCE_TREE/tools/designer/src/lib/extension \
- $QT_SOURCE_TREE/tools/designer/src/lib/sdk \
- $QT_SOURCE_TREE/tools/designer/src/lib/uilib \
- $QT_SOURCE_TREE/tools/qtestlib/src \
- $QT_SOURCE_TREE/tools/qdbus/src
-sourcedirs = $QT_SOURCE_TREE/src \
- $QT_SOURCE_TREE/doc/src \
- $QT_SOURCE_TREE/extensions/activeqt \
- $QT_SOURCE_TREE/tools/assistant/lib \
- $QT_SOURCE_TREE/tools/assistant/compat/lib \
- $QT_SOURCE_TREE/tools/designer/src/uitools \
- $QT_SOURCE_TREE/tools/designer/src/lib/extension \
- $QT_SOURCE_TREE/tools/designer/src/lib/sdk \
- $QT_SOURCE_TREE/tools/designer/src/lib/uilib \
- $QT_SOURCE_TREE/tools/qtestlib/src \
- $QT_SOURCE_TREE/tools/qdbus
-
-excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
- $QT_SOURCE_TREE/src/3rdparty/des \
- $QT_SOURCE_TREE/src/3rdparty/freetype \
- $QT_SOURCE_TREE/src/3rdparty/harfbuzz \
- $QT_SOURCE_TREE/src/3rdparty/kdebase \
- $QT_SOURCE_TREE/src/3rdparty/libconninet \
- $QT_SOURCE_TREE/src/3rdparty/libjpeg \
- $QT_SOURCE_TREE/src/3rdparty/libmng \
- $QT_SOURCE_TREE/src/3rdparty/libpng \
- $QT_SOURCE_TREE/src/3rdparty/libtiff \
- $QT_SOURCE_TREE/src/3rdparty/md4 \
- $QT_SOURCE_TREE/src/3rdparty/md5 \
- $QT_SOURCE_TREE/src/3rdparty/patches \
- $QT_SOURCE_TREE/src/3rdparty/sha1 \
- $QT_SOURCE_TREE/src/3rdparty/sqlite \
- $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \
- $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \
- $QT_SOURCE_TREE/src/3rdparty/wintab \
- $QT_SOURCE_TREE/src/3rdparty/zlib \
- $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
- $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
- $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
- $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
- $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \
- $QT_SOURCE_TREE/doc/src/snippets \
- $QT_SOURCE_TREE/doc/src/ja_JP \
- $QT_SOURCE_TREE/doc/src/zh_CN
-
-sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
-examples.imageextensions = "*.png"
-
-exampledirs = $QT_SOURCE_TREE/doc/src \
- $QT_SOURCE_TREE/examples \
- $QT_SOURCE_TREE/examples/tutorials \
- $QT_SOURCE_TREE \
- $QT_SOURCE_TREE/qmake/examples \
- $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
-imagedirs = $QT_SOURCE_TREE/doc/src/images \
- $QT_SOURCE_TREE/examples \
- $QT_SOURCE_TREE/doc/src/declarative/pics \
- $QT_SOURCE_TREE/doc/src/template/images
-outputdir = $QT_BUILD_TREE/doc/html
-tagfile = $QT_BUILD_TREE/doc/html/qt.tags
-base = file:$QT_BUILD_TREE/doc/html
-
-HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
index 7e28fa2..24696d5 100644
--- a/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_ja_JP.qdocconf
@@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
+qhp.Qt.namespace = com.trolltech.qt.472
qhp.Qt.virtualFolder = qdoc
qhp.Qt.title = Qt
qhp.Qt.indexTitle = Qt
qhp.Qt.selectors = fake:example
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc ja_JP
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
+qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc ja_JP
+qhp.Qt.customFilters.Qt.name = Qt 4.7.2
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
index cfcc76d..7789bf7 100644
--- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf
@@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
qhp.projects = Qt
qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
+qhp.Qt.namespace = com.trolltech.qt.472
qhp.Qt.virtualFolder = qdoc
qhp.Qt.title = 教程
qhp.Qt.indexTitle = 教程
qhp.Qt.selectors = fake:example
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc zh_CN
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
+qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc zh_CN
+qhp.Qt.customFilters.Qt.name = Qt 4.7.2
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2
# Files not referenced in any qdoc file (last four are needed by qtdemo)
# See also extraimages.HTML
diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf
index 51ee0d3..bf7fd08 100644
--- a/tools/qdoc3/test/qt-defines.qdocconf
+++ b/tools/qdoc3/test/qt-defines.qdocconf
@@ -15,48 +15,3 @@ defines = Q_QDOC \
versionsym = QT_VERSION_STR
codeindent = 1
-
-# Files not referenced in any qdoc file (last four needed by qtdemo)
-# See also qhp.Qt.extraFiles
-extraimages.HTML = qt-logo \
- trolltech-logo \
- 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 \
- stylesheet-coffee-plastique.png \
- taskmenuextension-example.png \
- coloreditorfactoryimage.png \
- dynamiclayouts-example.png
-
-# This stuff is used by the new doc format.
-scriptdirs = $QT_SOURCE_TREE/doc/src/template/scripts
-styledirs = $QT_SOURCE_TREE/doc/src/template/style
-
-scripts.HTML = functions.js \
- narrow.js \
- superfish.js \
- jquery.js
-
-styles.HTML = style.css \
- narrow.css \
- superfish.css \
- superfish_skin.css \
- style_ie6.css \
- style_ie7.css \
- style_ie8.css
diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf
new file mode 100644
index 0000000..30c28cb
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf
@@ -0,0 +1,50 @@
+# 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 = $QT_SOURCE_TREE/doc/src/template
+
+HTML.stylesheets = style/style.css \
+ style/narrow.css
+
+HTML.scripts =
+
+# Files not referenced in any qdoc file (last four needed by qtdemo)
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo \
+ trolltech-logo \
+ 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 \
+ stylesheet-coffee-plastique.png \
+ taskmenuextension-example.png \
+ coloreditorfactoryimage.png \
+ dynamiclayouts-example.png
+
+# Include the style sheets and scripts used.
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n" \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n"
+
+HTML.headerscripts =
+
+HTML.endheader = \
+ "</head>\n" \
+ "<body class=\"offline creator\">\n"
diff --git a/tools/qdoc3/test/qt-html-online-styles.qdocconf b/tools/qdoc3/test/qt-html-online-styles.qdocconf
new file mode 100644
index 0000000..06f8964
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-online-styles.qdocconf
@@ -0,0 +1,77 @@
+# 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 = $QT_SOURCE_TREE/doc/src/template
+
+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 (last four needed by qtdemo)
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo \
+ trolltech-logo \
+ 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 \
+ stylesheet-coffee-plastique.png \
+ taskmenuextension-example.png \
+ coloreditorfactoryimage.png \
+ dynamiclayouts-example.png
+
+# 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/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
new file mode 100644
index 0000000..1d55cee
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
@@ -0,0 +1,236 @@
+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=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt 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=\"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" \
+ " <ul class=\"sf-menu\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"classes.html\">Class index</a></li> \n" \
+ " <li><a href=\"functions.html\">Function index</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
+ " <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
+ " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
+ " <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \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=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\" id=\"sidebarsearch\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " <div id=\"resultdialog\"> \n" \
+ " <a href=\"#\" id=\"resultclose\">Close</a> \n" \
+ " <p id=\"resultlinks\" class=\"all\"><a href=\"#\" id=\"showallresults\">All</a> | <a href=\"#\" id=\"showapiresults\">API</a> | <a href=\"#\" id=\"showarticleresults\">Articles</a> | <a href=\"#\" id=\"showexampleresults\">Examples</a></p> \n" \
+ " <p id=\"searchcount\" class=\"all\"><span id=\"resultcount\"></span><span id=\"apicount\"></span><span id=\"articlecount\"></span><span id=\"examplecount\"></span>&nbsp;results:</p> \n" \
+ " <ul id=\"resultlist\" class=\"all\"> \n" \
+ " </ul> \n" \
+ " </div> \n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"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 class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</div>\n" \
+ " </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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p id=\"noteHead\">Thank you for giving your feedback.</p> <p class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
+ " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</p>\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n" \
+ "\n" \
+ " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \
+ " <script type=\"text/javascript\">\n" \
+ " var _gaq = _gaq || [];\n" \
+ " _gaq.push(['_setAccount', 'UA-4457116-5']);\n" \
+ " _gaq.push(['_trackPageview']);\n" \
+ " (function() {\n" \
+ " var ga = document.createElement('script'); " \
+ "ga.type = 'text/javascript'; ga.async = true;\n" \
+ " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + " \
+ "'.google-analytics.com/ga.js';\n" \
+ " var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \
+ " })();\n" \
+ " </script>\n"
+
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = 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 \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ 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/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 47b1e5f..67ce95a 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -1,154 +1,77 @@
-HTML.stylesheets = style/style.css \
- style/OfflineStyle.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style_ie6.css
+include(qt-html-default-styles.qdocconf)
-HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
- " <div class=\"content\"> \n" \
- " <div id=\"nav-logo\">\n" \
- " <a href=\"index.html\">Home</a></div>\n" \
- " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\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=\"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=\"sidebar\">\n" \
- " <div class=\"searchlabel\">\n" \
- " Search index:</div>\n" \
- " <div class=\"search\">\n" \
- " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
- " <div id=\"resultdialog\"> \n" \
- " <a href=\"#\" id=\"resultclose\">Close</a> \n" \
- " <p id=\"resultlinks\" class=\"all\"><a href=\"#\" id=\"showallresults\">All</a> | <a href=\"#\" id=\"showapiresults\">API</a> | <a href=\"#\" id=\"showarticleresults\">Articles</a> | <a href=\"#\" id=\"showexampleresults\">Examples</a></p> \n" \
- " <p id=\"searchcount\" class=\"all\"><span id=\"resultcount\"></span><span id=\"apicount\"></span><span id=\"articlecount\"></span><span id=\"examplecount\"></span>&nbsp;results:</p> \n" \
- " <ul id=\"resultlist\" class=\"all\"> \n" \
- " </ul> \n" \
- " </div> \n" \
- " </fieldset>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2 title=\"API Lookup\"><span></span>\n" \
- " API Lookup</h2>\n" \
- " <div id=\"list001\" class=\"list\">\n" \
- " <ul id=\"ul001\" >\n" \
- " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2 title=\"Qt Topics\"><span></span>\n" \
- " Qt Topics</h2>\n" \
- " <div id=\"list002\" class=\"list\">\n" \
- " <ul id=\"ul002\" >\n" \
- " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box\" id=\"examples\">\n" \
- " <h2 title=\"Examples\"><span></span>\n" \
- " Examples</h2>\n" \
- " <div id=\"list003\" class=\"list\">\n" \
- " <ul id=\"ul003\">\n" \
- " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrap\">\n" \
- " <div class=\"toolbar\">\n" \
- " <div class=\"breadcrumb toolblock\">\n" \
- " <ul>\n" \
- " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n"
+HTML.postheader = \
+ " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a>\n" \
+ " </div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"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.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ "<div class=\"content mainContent\">\n"
-HTML.footer = "" \
- " <div class=\"feedback t_button\">\n" \
- " [+] Documentation Feedback</div>\n" \
- " </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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
- " in Finland and/or other countries worldwide.</p>\n" \
- " <p>\n" \
- " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
- " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
- " with the terms contained in a written agreement between you and Nokia.</p>\n" \
- " <p>\n" \
- " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
- " Free Documentation License version 1.3</a>\n" \
- " as published by the Free Software Foundation.</p>\n" \
- " </div>\n" \
- " <div id=\"feedbackBox\">\n" \
- " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
- " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p id=\"noteHead\">Thank you for giving your feedback.</p> <p class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
- " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</p>\n" \
- " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
- " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div id=\"blurpage\">\n" \
- " </div>\n" \ No newline at end of file
+HTML.footer = \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ "</div> \n" \
+ "<div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ "</div>\n" \
+
+# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# See also extraimages.HTML
+qhp.Qt.extraFiles = 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 \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ style/narrow.css \
+ style/style.css
diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf
new file mode 100644
index 0000000..fa15d90
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-templates_ja_JP-online.qdocconf
@@ -0,0 +1,176 @@
+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=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
+ " </fieldset>\n" \
+ " </form></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://qt.nokia.com/developer\">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" \
+ " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul id=\"topmenuLook\"> \n" \
+ " <li><a href=\"classes.html\">Class index</a></li> \n" \
+ " <li><a href=\"functions.html\">Function index</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul id=\"topmenuTopic\"> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
+ " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul id=\"topmenuexample\"> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">チュートリアル</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \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=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">チュートリアル</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes 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\">\n"
+
+HTML.footer = \
+ " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n"
diff --git a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
index da20766..18ed5c1 100644
--- a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
@@ -1,177 +1,63 @@
-HTML.stylesheets = style/style.css \
- style/OfflineStyle.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style_ie6.css
-
-HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
- " <div class=\"content\"> \n" \
- " <div id=\"nav-logo\">\n" \
- " <a href=\"index.html\">Home</a></div>\n" \
- " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
- " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
- " </fieldset>\n" \
- " </form></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://qt.nokia.com/developer\">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" \
- " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <div id=\"shortCut\">\n" \
- " <ul>\n" \
- " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
- " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
- " </a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
- " <li><a href=\"#\">API Lookup</a> \n" \
- " <ul id=\"topmenuLook\"> \n" \
- " <li><a href=\"classes.html\">Class index</a></li> \n" \
- " <li><a href=\"functions.html\">Function index</a></li> \n" \
- " <li><a href=\"modules.html\">Modules</a></li> \n" \
- " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
- " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Qt Topics</a> \n" \
- " <ul id=\"topmenuTopic\"> \n" \
- " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
- " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
- " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Examples</a> \n" \
- " <ul id=\"topmenuexample\"> \n" \
- " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
- " <li><a href=\"tutorials.html\">チュートリアル</a></li> \n" \
- " <li><a href=\"demos.html\">Demos</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " </ul> \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=\"sidebar\">\n" \
- " <div class=\"searchlabel\">\n" \
- " Search index:</div>\n" \
- " <div class=\"search\">\n" \
- " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
- " </fieldset>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2 title=\"API Lookup\"><span></span>\n" \
- " API Lookup</h2>\n" \
- " <div id=\"list001\" class=\"list\">\n" \
- " <ul id=\"ul001\" >\n" \
- " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2 title=\"Qt Topics\"><span></span>\n" \
- " Qt Topics</h2>\n" \
- " <div id=\"list002\" class=\"list\">\n" \
- " <ul id=\"ul002\" >\n" \
- " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box\" id=\"examples\">\n" \
- " <h2 title=\"Examples\"><span></span>\n" \
- " Examples</h2>\n" \
- " <div id=\"list003\" class=\"list\">\n" \
- " <ul id=\"ul003\">\n" \
- " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"tutorials.html\">チュートリアル</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrap\">\n" \
- " <div class=\"toolbar\">\n" \
- " <div class=\"breadcrumb toolblock\">\n" \
- " <ul>\n" \
- " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n"
+include(qt-html-default-styles.qdocconf)
-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\">\n"
+HTML.postheader = \
+ " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes here -->\n"
-HTML.footer = " <!-- /div -->\n" \
- " <div class=\"feedback t_button\">\n" \
- " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
- " in Finland and/or other countries worldwide.</p>\n" \
- " <p>\n" \
- " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
- " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
- " with the terms contained in a written agreement between you and Nokia.</p>\n" \
- " <p>\n" \
- " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
- " Free Documentation License version 1.3</a>\n" \
- " as published by the Free Software Foundation.</p>\n" \
- " </div>\n" \
- " <div id=\"feedbackBox\">\n" \
- " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
- " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
- " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div id=\"blurpage\">\n" \
- " </div>\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\">\n"
+
+HTML.footer = \
+ " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n"
diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf
new file mode 100644
index 0000000..285ec27
--- /dev/null
+++ b/tools/qdoc3/test/qt-html-templates_zh_CN-online.qdocconf
@@ -0,0 +1,176 @@
+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=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
+ " </fieldset>\n" \
+ " </form></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://qt.nokia.com/developer\">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" \
+ " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul id=\"topmenuLook\"> \n" \
+ " <li><a href=\"classes.html\">所有类</a></li> \n" \
+ " <li><a href=\"functions.html\">所有函数</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul id=\"topmenuTopic\"> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
+ " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul id=\"topmenuexample\"> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \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=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">所有类</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">所有函数</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes 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\">\n"
+
+HTML.footer = \
+ " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n"
diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
index 5c4bfa9..7773aa6 100644
--- a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
@@ -1,177 +1,176 @@
-HTML.stylesheets = style/style.css \
- style/OfflineStyle.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style_ie6.css
+include(qt-html-default-styles.qdocconf)
-HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
- " <div class=\"content\"> \n" \
- " <div id=\"nav-logo\">\n" \
- " <a href=\"index.html\">Home</a></div>\n" \
- " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
- " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
- " </fieldset>\n" \
- " </form></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://qt.nokia.com/developer\">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" \
- " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <div id=\"shortCut\">\n" \
- " <ul>\n" \
- " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
- " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
- " </a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
- " <li><a href=\"#\">API Lookup</a> \n" \
- " <ul id=\"topmenuLook\"> \n" \
- " <li><a href=\"classes.html\">所有类</a></li> \n" \
- " <li><a href=\"functions.html\">所有函数</a></li> \n" \
- " <li><a href=\"modules.html\">Modules</a></li> \n" \
- " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
- " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Qt Topics</a> \n" \
- " <ul id=\"topmenuTopic\"> \n" \
- " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
- " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
- " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Examples</a> \n" \
- " <ul id=\"topmenuexample\"> \n" \
- " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
- " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
- " <li><a href=\"demos.html\">Demos</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " </ul> \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=\"sidebar\">\n" \
- " <div class=\"searchlabel\">\n" \
- " Search index:</div>\n" \
- " <div class=\"search\">\n" \
- " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
- " </fieldset>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2 title=\"API Lookup\"><span></span>\n" \
- " API Lookup</h2>\n" \
- " <div id=\"list001\" class=\"list\">\n" \
- " <ul id=\"ul001\" >\n" \
- " <li class=\"defaultLink\"><a href=\"classes.html\">所有类</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"functions.html\">所有函数</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2 title=\"Qt Topics\"><span></span>\n" \
- " Qt Topics</h2>\n" \
- " <div id=\"list002\" class=\"list\">\n" \
- " <ul id=\"ul002\" >\n" \
- " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box\" id=\"examples\">\n" \
- " <h2 title=\"Examples\"><span></span>\n" \
- " Examples</h2>\n" \
- " <div id=\"list003\" class=\"list\">\n" \
- " <ul id=\"ul003\">\n" \
- " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrap\">\n" \
- " <div class=\"toolbar\">\n" \
- " <div class=\"breadcrumb toolblock\">\n" \
- " <ul>\n" \
- " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n"
+HTML.postheader = \
+ " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearch\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" value=\"\" id=\"pageType\" name=\"searchstring\">\n" \
+ " </fieldset>\n" \
+ " </form></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://qt.nokia.com/developer\">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" \
+ " <li class=\"nav-topright-shop\"><a title=\"SHOP\" href=\"http://shop.qt.nokia.com\">SHOP</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <ul class=\"sf-menu sf-js-enabled sf-shadow\" id=\"narrowmenu\"> \n" \
+ " <li><a href=\"#\">API Lookup</a> \n" \
+ " <ul id=\"topmenuLook\"> \n" \
+ " <li><a href=\"classes.html\">所有类</a></li> \n" \
+ " <li><a href=\"functions.html\">所有函数</a></li> \n" \
+ " <li><a href=\"modules.html\">Modules</a></li> \n" \
+ " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
+ " <li><a href=\"qtglobal.html\">Global stuff</a></li> \n" \
+ " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Qt Topics</a> \n" \
+ " <ul id=\"topmenuTopic\"> \n" \
+ " <li><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li> \n" \
+ " <li><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li> \n" \
+ " <li><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li> \n" \
+ " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " <li><a href=\"#\">Examples</a> \n" \
+ " <ul id=\"topmenuexample\"> \n" \
+ " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
+ " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
+ " <li><a href=\"demos.html\">Demos</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
+ " <li><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li> \n" \
+ " </ul> \n" \
+ " </li> \n" \
+ " </ul> \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=\"sidebar\">\n" \
+ " <div class=\"searchlabel\">\n" \
+ " Search index:</div>\n" \
+ " <div class=\"search\">\n" \
+ " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
+ " <fieldset>\n" \
+ " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
+ " </fieldset>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div class=\"box first bottombar\" id=\"lookup\">\n" \
+ " <h2 title=\"API Lookup\"><span></span>\n" \
+ " API Lookup</h2>\n" \
+ " <div id=\"list001\" class=\"list\">\n" \
+ " <ul id=\"ul001\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"classes.html\">所有类</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"functions.html\">所有函数</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box bottombar\" id=\"topics\">\n" \
+ " <h2 title=\"Qt Topics\"><span></span>\n" \
+ " Qt Topics</h2>\n" \
+ " <div id=\"list002\" class=\"list\">\n" \
+ " <ul id=\"ul002\" >\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Basic Qt architecture</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"declarativeui.html\">Device UI's &amp; Qt Quick</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">Desktop UI components</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"box\" id=\"examples\">\n" \
+ " <h2 title=\"Examples\"><span></span>\n" \
+ " Examples</h2>\n" \
+ " <div id=\"list003\" class=\"list\">\n" \
+ " <ul id=\"ul003\">\n" \
+ " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html#Demos\">QML Demos</a></li>\n" \
+ " </ul> \n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Bread crumbs goes 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\">\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\">\n"
-HTML.footer = " <!-- /div -->\n" \
- " <div class=\"feedback t_button\">\n" \
- " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
- " in Finland and/or other countries worldwide.</p>\n" \
- " <p>\n" \
- " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
- " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
- " with the terms contained in a written agreement between you and Nokia.</p>\n" \
- " <p>\n" \
- " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
- " Free Documentation License version 1.3</a>\n" \
- " as published by the Free Software Foundation.</p>\n" \
- " </div>\n" \
- " <div id=\"feedbackBox\">\n" \
- " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
- " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
- " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div id=\"blurpage\">\n" \
- " </div>\n"
+HTML.footer = \
+ " <!-- /div -->\n" \
+ " <div class=\"feedback t_button\">\n" \
+ " [+] Documentation Feedback</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\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n" \
+ " <div id=\"feedbackBox\">\n" \
+ " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
+ " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
+ " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\">Please submit your feedback...</textarea></p>\n" \
+ " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
+ " </form>\n" \
+ " </div>\n" \
+ " <div id=\"blurpage\">\n" \
+ " </div>\n"
diff --git a/tools/qdoc3/test/qt-project-api-only.qdocconf b/tools/qdoc3/test/qt-project-api-only.qdocconf
new file mode 100644
index 0000000..4a91601
--- /dev/null
+++ b/tools/qdoc3/test/qt-project-api-only.qdocconf
@@ -0,0 +1,32 @@
+# Ensures that the generated index contains a URL that can be used by the
+# tools documentation (assistant.qdocconf, designer.qdocconf, linguist.qdocconf,
+# qmake.qdocconf).
+
+url = ./
+
+# Ensures that the documentation for the tools is not included in the generated
+# .qhp file.
+
+qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/simpletextviewer.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/designer-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/calculatorform.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/customwidgetplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/taskmenuextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/containerextension.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockbuilder.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/worldtimeclockplugin.qdoc \
+ $QT_SOURCE_TREE/doc/src/internationalization/linguist-manual.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/hellotr.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/arrowpad.qdoc \
+ $QT_SOURCE_TREE/doc/src/examples/trollprint.qdoc \
+ $QT_SOURCE_TREE/doc/src/development/qmake-manual.qdoc
+
+# Remove the QML documentation from the Qt-only documentation.
+
+excludedirs += $QT_SOURCE_TREE/src/imports
+
+outputdir = $QT_BUILD_TREE/doc-build/html-qt
+tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags
+base = file:$QT_BUILD_TREE/doc-build/html-qt
diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf
new file mode 100644
index 0000000..135fbbb
--- /dev/null
+++ b/tools/qdoc3/test/qt-project.qdocconf
@@ -0,0 +1,110 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-defines.qdocconf)
+
+project = Qt
+description = Qt Reference Documentation
+url = http://qt.nokia.com/doc/4.7
+version = 4.7.1
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+
+qhp.projects = Qt
+
+qhp.Qt.file = qt.qhp
+qhp.Qt.namespace = com.trolltech.qt.471
+qhp.Qt.virtualFolder = qdoc
+qhp.Qt.indexTitle = Qt Reference Documentation
+qhp.Qt.indexRoot =
+
+qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc
+qhp.Qt.customFilters.Qt.name = Qt 4.7.1
+qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
+qhp.Qt.subprojects = classes overviews examples
+qhp.Qt.subprojects.classes.title = Classes
+qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
+qhp.Qt.subprojects.classes.selectors = class fake:headerfile
+qhp.Qt.subprojects.classes.sortPages = true
+qhp.Qt.subprojects.overviews.title = Overviews
+qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.Qt.subprojects.overviews.selectors = fake:page,group,module
+qhp.Qt.subprojects.examples.title = Tutorials and Examples
+qhp.Qt.subprojects.examples.indexTitle = Qt Examples
+qhp.Qt.subprojects.examples.selectors = fake:example
+
+language = Cpp
+
+headerdirs = $QT_SOURCE_TREE/src \
+ $QT_SOURCE_TREE/extensions/activeqt \
+ $QT_SOURCE_TREE/tools/assistant/lib \
+ $QT_SOURCE_TREE/tools/assistant/compat/lib \
+ $QT_SOURCE_TREE/tools/designer/src/uitools \
+ $QT_SOURCE_TREE/tools/designer/src/lib/extension \
+ $QT_SOURCE_TREE/tools/designer/src/lib/sdk \
+ $QT_SOURCE_TREE/tools/designer/src/lib/uilib \
+ $QT_SOURCE_TREE/tools/qtestlib/src \
+ $QT_SOURCE_TREE/tools/qdbus/src
+sourcedirs = $QT_SOURCE_TREE/src \
+ $QT_SOURCE_TREE/doc/src \
+ $QT_SOURCE_TREE/extensions/activeqt \
+ $QT_SOURCE_TREE/tools/assistant/lib \
+ $QT_SOURCE_TREE/tools/assistant/compat/lib \
+ $QT_SOURCE_TREE/tools/designer/src/uitools \
+ $QT_SOURCE_TREE/tools/designer/src/lib/extension \
+ $QT_SOURCE_TREE/tools/designer/src/lib/sdk \
+ $QT_SOURCE_TREE/tools/designer/src/lib/uilib \
+ $QT_SOURCE_TREE/tools/qtestlib/src \
+ $QT_SOURCE_TREE/tools/qdbus
+
+excludedirs = $QT_SOURCE_TREE/src/3rdparty/clucene \
+ $QT_SOURCE_TREE/src/3rdparty/des \
+ $QT_SOURCE_TREE/src/3rdparty/freetype \
+ $QT_SOURCE_TREE/src/3rdparty/harfbuzz \
+ $QT_SOURCE_TREE/src/3rdparty/kdebase \
+ $QT_SOURCE_TREE/src/3rdparty/libconninet \
+ $QT_SOURCE_TREE/src/3rdparty/libjpeg \
+ $QT_SOURCE_TREE/src/3rdparty/libmng \
+ $QT_SOURCE_TREE/src/3rdparty/libpng \
+ $QT_SOURCE_TREE/src/3rdparty/libtiff \
+ $QT_SOURCE_TREE/src/3rdparty/md4 \
+ $QT_SOURCE_TREE/src/3rdparty/md5 \
+ $QT_SOURCE_TREE/src/3rdparty/patches \
+ $QT_SOURCE_TREE/src/3rdparty/sha1 \
+ $QT_SOURCE_TREE/src/3rdparty/sqlite \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebCore \
+ $QT_SOURCE_TREE/src/3rdparty/wintab \
+ $QT_SOURCE_TREE/src/3rdparty/zlib \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/gstreamer \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/ds9 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/qt7 \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/mmf \
+ $QT_SOURCE_TREE/src/3rdparty/phonon/waveout \
+ $QT_SOURCE_TREE/doc/src/snippets \
+ $QT_SOURCE_TREE/doc/src/ja_JP \
+ $QT_SOURCE_TREE/doc/src/zh_CN
+
+sources.fileextensions = "*.c++ *.cc *.cpp *.cxx *.mm *.qml *.qdoc"
+headers.fileextensions = "*.ch *.h *.h++ *.hh *.hpp *.hxx"
+
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
+examples.imageextensions = "*.png"
+
+exampledirs = $QT_SOURCE_TREE/doc/src \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/examples/tutorials \
+ $QT_SOURCE_TREE \
+ $QT_SOURCE_TREE/qmake/examples \
+ $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/docs
+imagedirs = $QT_SOURCE_TREE/doc/src/images \
+ $QT_SOURCE_TREE/examples \
+ $QT_SOURCE_TREE/doc/src/declarative/pics \
+ $QT_SOURCE_TREE/doc/src/template/images
+outputdir = $QT_BUILD_TREE/doc/html
+tagfile = $QT_BUILD_TREE/doc/html/qt.tags
+base = file:$QT_BUILD_TREE/doc/html
+
+HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf
deleted file mode 100644
index ea97205..0000000
--- a/tools/qdoc3/test/qt.qdocconf
+++ /dev/null
@@ -1,147 +0,0 @@
-include(compat.qdocconf)
-include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
-include(qt-html-templates.qdocconf)
-include(qt-defines.qdocconf)
-
-project = Qt
-versionsym =
-version = %VERSION%
-description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/4.7
-
-sourceencoding = UTF-8
-outputencoding = UTF-8
-naturallanguage = en_US
-
-qhp.projects = Qt
-
-qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
-qhp.Qt.virtualFolder = qdoc
-qhp.Qt.indexTitle = Qt Reference Documentation
-qhp.Qt.indexRoot =
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = 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 \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- 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
-
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
-qhp.Qt.subprojects = classes overviews examples
-qhp.Qt.subprojects.classes.title = Classes
-qhp.Qt.subprojects.classes.indexTitle = Qt's Classes
-qhp.Qt.subprojects.classes.selectors = class fake:headerfile
-qhp.Qt.subprojects.classes.sortPages = true
-qhp.Qt.subprojects.overviews.title = Overviews
-qhp.Qt.subprojects.overviews.indexTitle = All Overviews and HOWTOs
-qhp.Qt.subprojects.overviews.selectors = fake:page,group,module
-qhp.Qt.subprojects.examples.title = Tutorials and Examples
-qhp.Qt.subprojects.examples.indexTitle = Qt Examples
-qhp.Qt.subprojects.examples.selectors = fake:example
-
-language = Cpp
-
-headerdirs = $QTDIR/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/tools/assistant/lib \
- $QTDIR/tools/assistant/compat/lib \
- $QTDIR/tools/designer/src/uitools \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib \
- $QTDIR/tools/qtestlib/src \
- $QTDIR/tools/qdbus/src
-sourcedirs = $QTDIR/src \
- $QTDIR/doc/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/tools/assistant/lib \
- $QTDIR/tools/assistant/compat/lib \
- $QTDIR/tools/designer/src/uitools \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib \
- $QTDIR/tools/qtestlib/src \
- $QTDIR/tools/qdbus
-
-excludedirs = $QTDIR/src/3rdparty/clucene \
- $QTDIR/src/3rdparty/des \
- $QTDIR/src/3rdparty/freetype \
- $QTDIR/src/3rdparty/harfbuzz \
- $QTDIR/src/3rdparty/kdebase \
- $QTDIR/src/3rdparty/libconninet \
- $QTDIR/src/3rdparty/libjpeg \
- $QTDIR/src/3rdparty/libmng \
- $QTDIR/src/3rdparty/libpng \
- $QTDIR/src/3rdparty/libtiff \
- $QTDIR/src/3rdparty/md4 \
- $QTDIR/src/3rdparty/md5 \
- $QTDIR/src/3rdparty/patches \
- $QTDIR/src/3rdparty/sha1 \
- $QTDIR/src/3rdparty/sqlite \
- $QTDIR/src/3rdparty/webkit/JavaScriptCore \
- $QTDIR/src/3rdparty/webkit/WebCore \
- $QTDIR/src/3rdparty/wintab \
- $QTDIR/src/3rdparty/zlib \
- $QTDIR/src/3rdparty/phonon/gstreamer \
- $QTDIR/src/3rdparty/phonon/ds9 \
- $QTDIR/src/3rdparty/phonon/qt7 \
- $QTDIR/src/3rdparty/phonon/mmf \
- $QTDIR/src/3rdparty/phonon/waveout \
- $QTDIR/doc/src/snippets \
- $QTDIR/doc/src/ja_JP \
- $QTDIR/doc/src/zh_CN
-
-sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
-examples.imageextensions = "*.png"
-
-exampledirs = $QTDIR/doc/src \
- $QTDIR/examples \
- $QTDIR/examples/tutorials \
- $QTDIR \
- $QTDIR/qmake/examples \
- $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
-imagedirs = $QTDIR/doc/src/images \
- $QTDIR/examples \
- $QTDIR/doc/src/declarative/pics \
- $QTDIR/doc/src/template/images
-outputdir = $QTDIR/doc/html
-tagfile = $QTDIR/doc/html/qt.tags
-base = file:$QTDIR/doc/html
-
-HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt_ja_JP.qdocconf b/tools/qdoc3/test/qt_ja_JP.qdocconf
deleted file mode 100644
index 32bba06..0000000
--- a/tools/qdoc3/test/qt_ja_JP.qdocconf
+++ /dev/null
@@ -1,118 +0,0 @@
-include(compat.qdocconf)
-include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
-include(qt-html-templates_ja_JP.qdocconf)
-include(qt-defines.qdocconf)
-
-project = Qt
-versionsym =
-version = %VERSION%
-description = Qt リファレンスドキュメント
-url = http://qt.nokia.com/doc/ja_JP/4.7
-
-sourceencoding = UTF-8
-outputencoding = UTF-8
-naturallanguage = ja
-
-indexes = $QTDIR/doc/html/qt.index
-
-qhp.projects = Qt
-
-qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
-qhp.Qt.virtualFolder = qdoc
-qhp.Qt.title = Qt
-qhp.Qt.indexTitle = Qt
-qhp.Qt.selectors = fake:example
-
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc ja_JP
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = 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 \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- 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
-
-language = Cpp
-
-sourcedirs = $QTDIR/doc/src/ja_JP
-
-excludedirs = $QTDIR/src/3rdparty/clucene \
- $QTDIR/src/3rdparty/des \
- $QTDIR/src/3rdparty/freetype \
- $QTDIR/src/3rdparty/harfbuzz \
- $QTDIR/src/3rdparty/kdebase \
- $QTDIR/src/3rdparty/libjpeg \
- $QTDIR/src/3rdparty/libmng \
- $QTDIR/src/3rdparty/libpng \
- $QTDIR/src/3rdparty/libtiff \
- $QTDIR/src/3rdparty/md4 \
- $QTDIR/src/3rdparty/md5 \
- $QTDIR/src/3rdparty/patches \
- $QTDIR/src/3rdparty/sha1 \
- $QTDIR/src/3rdparty/sqlite \
- $QTDIR/src/3rdparty/webkit/JavaScriptCore \
- $QTDIR/src/3rdparty/webkit/WebCore \
- $QTDIR/src/3rdparty/wintab \
- $QTDIR/src/3rdparty/zlib \
- $QTDIR/doc/src/snippets \
- $QTDIR/doc/src/zh_CN \
- $QTDIR/src/3rdparty/phonon/gstreamer \
- $QTDIR/src/3rdparty/phonon/ds9 \
- $QTDIR/src/3rdparty/phonon/qt7 \
- $QTDIR/src/3rdparty/phonon/mmf \
- $QTDIR/src/3rdparty/phonon/waveout
-
-sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
-examples.imageextensions = "*.png"
-
-exampledirs = $QTDIR/doc/src \
- $QTDIR/examples/ja_JP \
- $QTDIR/examples \
- $QTDIR/examples/tutorials \
- $QTDIR \
- $QTDIR/qmake/examples \
- $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
-imagedirs = $QTDIR/doc/src/ja_JP/images \
- $QTDIR/doc/src/images \
- $QTDIR/examples \
- $QTDIR/doc/src/template/images
-outputdir = $QTDIR/doc/html_ja_JP
-tagfile = $QTDIR/doc/html_ja_JP/qt.tags
-base = file:$QTDIR/doc/html_ja_JP
-
-HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf
deleted file mode 100644
index 40d3d5a..0000000
--- a/tools/qdoc3/test/qt_zh_CN.qdocconf
+++ /dev/null
@@ -1,116 +0,0 @@
-include(compat.qdocconf)
-include(macros.qdocconf)
-include(qt-cpp-ignore.qdocconf)
-include(qt-html-templates_zh_CN.qdocconf)
-include(qt-defines.qdocconf)
-
-project = Qt
-versionsym =
-version = %VERSION%
-description = Qt Reference Documentation
-url = http://qt.nokia.com/doc/zh_CN/4.7
-
-sourceencoding = UTF-8
-outputencoding = UTF-8
-naturallanguage = zh-Hans
-
-indexes = $QTDIR/doc/html/qt.index
-
-qhp.projects = Qt
-
-qhp.Qt.file = qt.qhp
-qhp.Qt.namespace = com.trolltech.qt.471
-qhp.Qt.virtualFolder = qdoc
-qhp.Qt.title = 教程
-qhp.Qt.indexTitle = 教程
-qhp.Qt.selectors = fake:example
-
-qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc zh_CN
-qhp.Qt.customFilters.Qt.name = Qt 4.7.1
-qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = 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 \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- 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
-
-language = Cpp
-
-sourcedirs = $QTDIR/doc/src/zh_CN
-
-excludedirs = $QTDIR/src/3rdparty/clucene \
- $QTDIR/src/3rdparty/des \
- $QTDIR/src/3rdparty/freetype \
- $QTDIR/src/3rdparty/harfbuzz \
- $QTDIR/src/3rdparty/kdebase \
- $QTDIR/src/3rdparty/libjpeg \
- $QTDIR/src/3rdparty/libmng \
- $QTDIR/src/3rdparty/libpng \
- $QTDIR/src/3rdparty/libtiff \
- $QTDIR/src/3rdparty/md4 \
- $QTDIR/src/3rdparty/md5 \
- $QTDIR/src/3rdparty/patches \
- $QTDIR/src/3rdparty/sha1 \
- $QTDIR/src/3rdparty/sqlite \
- $QTDIR/src/3rdparty/webkit/JavaScriptCore \
- $QTDIR/src/3rdparty/webkit/WebCore \
- $QTDIR/src/3rdparty/wintab \
- $QTDIR/src/3rdparty/zlib \
- $QTDIR/doc/src/snippets \
- $QTDIR/doc/src/ja_JP \
- $QTDIR/src/3rdparty/phonon/gstreamer \
- $QTDIR/src/3rdparty/phonon/ds9 \
- $QTDIR/src/3rdparty/phonon/qt7 \
- $QTDIR/src/3rdparty/phonon/mmf \
- $QTDIR/src/3rdparty/phonon/waveout
-
-sources.fileextensions = "*.cpp *.qdoc *.mm"
-examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp"
-examples.imageextensions = "*.png"
-
-exampledirs = $QTDIR/doc/src \
- $QTDIR/examples \
- $QTDIR/examples/tutorials \
- $QTDIR \
- $QTDIR/qmake/examples \
- $QTDIR/src/3rdparty/webkit/WebKit/qt/docs
-imagedirs = $QTDIR/doc/src/images \
- $QTDIR/examples \
- $QTDIR/doc/src/template/images
-outputdir = $QTDIR/doc/html_zh_CN
-tagfile = $QTDIR/doc/html_zh_CN/qt.tags
-base = file:$QTDIR/doc/html_zh_CN
-
-HTML.generatemacrefs = "true"
diff --git a/tools/qdoc3/test/scripts/functions.js b/tools/qdoc3/test/scripts/functions.js
deleted file mode 100644
index 0135427..0000000
--- a/tools/qdoc3/test/scripts/functions.js
+++ /dev/null
@@ -1,60 +0,0 @@
-
-/* START non link areas where cursor should change to pointing hand */
-$('.t_button').mouseover(function() {
- $('.t_button').css('cursor','pointer');
- /*document.getElementById(this.id).style.cursor='pointer';*/
-});
-
-/* END non link areas */
-$('#smallA').click(function() {
- $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','smaller');
- $('.t_button').removeClass('active')
- $(this).addClass('active')
-});
-
-$('#medA').click(function() {
- $('.content .heading').css('font','600 16px/1 Arial');
- $('.content h1').css('font','600 18px/1.2 Arial');
- $('.content h2').css('font','600 16px/1.2 Arial');
- $('.content h3').css('font','600 14px/1.2 Arial');
- $('.content p').css('font','13px/20px Verdana');
- $('.content li').css('font','400 13px/1 Verdana');
- $('.content li').css('line-height','14px');
- $('.content table').css('font','13px/1.2 Verdana');
- $('.content .heading').css('font','600 16px/1 Arial');
- $('.content .indexboxcont li').css('font','600 13px/1 Verdana');
- $('.t_button').removeClass('active')
- $(this).addClass('active')
-});
-
-$('#bigA').click(function() {
- $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('font-size','large');
- $('.content .heading,.content h1, .content h2, .content h3, .content p, .content li, .content table').css('line-height','25px');
- $('.t_button').removeClass('active')
- $(this).addClass('active')
-});
-
-function doSearch(str){
-
-if (str.length>3)
- {
- alert('start search');
- // document.getElementById("refWrapper").innerHTML="";
- return;
- }
- else
- return;
-
-// var url="indexSearch.php";
-// url=url+"?q="+str;
- // url=url+"&sid="+Math.random();
- // var url="http://localhost:8983/solr/select?";
- // url=url+"&q="+str;
- // url=url+"&fq=&start=0&rows=10&fl=&qt=&wt=&explainOther=&hl.fl=";
-
- // $.get(url, function(data){
- // alert(data);
- // document.getElementById("refWrapper").innerHTML=data;
- //});
-
-} \ No newline at end of file
diff --git a/tools/qdoc3/test/scripts/jquery.js b/tools/qdoc3/test/scripts/jquery.js
deleted file mode 100644
index 0c7294c..0000000
--- a/tools/qdoc3/test/scripts/jquery.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.1
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Mon Jan 25 19:43:33 2010 -0500
- */
-(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++)e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);return a}return j?
-e(a[0],b):null}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f,
-a.currentTarget);m=0;for(s=i.length;m<s;m++)for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==n)d.push({elem:n,fn:j})}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function pa(a){return!a||!a.parentNode||a.parentNode.nodeType===
-11}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment();
-c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a});return d}function ua(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,
-va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]],
-[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,
-this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this,
-a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};
-c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];n=e[i];if(a!==n)if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n)}else if(n!==v)a[i]=n}return a};c.extend({noConflict:function(a){z.$=
-Oa;if(a)z.jQuery=Na;return c},isReady:false,ready:function(){if(!c.isReady){if(!r.body)return setTimeout(c.ready,13);c.isReady=true;if(P){for(var a,b=0;a=P[b++];)a.call(r,c);P=null}c.fn.triggerHandler&&c(r).triggerHandler("ready")}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete")return c.ready();if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false)}else if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload",
-c.ready);var a=false;try{a=z.frameElement==null}catch(b){}r.documentElement.doScroll&&a&&la()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===v||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;
-return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]||
-r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(r.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=
-a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Sa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==
-v;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=v}else if(b&&!c.isFunction(b)){d=b;b=v}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
-uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version}if(c.browser.webkit)c.browser.safari=true;if(wa)c.inArray=function(a,b){return wa.call(b,a)};S=c(r);if(r.addEventListener)L=function(){r.removeEventListener("DOMContentLoaded",
-L,false);c.ready()};else if(r.attachEvent)L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support=
-{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
-b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild);
-c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props=
-{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true,
-{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,
-a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);
-return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||
-a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=
-c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(ca),
-d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),n=b,o=
-a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||
-{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());
-if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d);
-f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=
-""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=
-function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a,
-d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+
-s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a,
-"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,
-b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b,
-d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b=
-0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};
-c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b=
-a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!==
-"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,
-"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"||
-d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a=
-a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,
-f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,
-b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+
-a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector,
-live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null)}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
-(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}l[q]=y}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===
-k){y=l[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(o.filter(h,[t]).length>0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||
-typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u=
-l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&
-y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q,
-h,k);if(l!=null){g=g.replace(m.match[t],"");break}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g}};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter)if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p)p=[];if(m.preFilter[H])if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=u[U])!=null;U++)if(D){I=M(D,t,U,u);var Da=
-l^!!I;if(k&&I!=null)if(Da)y=true;else u[U]=false;else if(Da){p.push(D);y=true}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)o.error(g);else break;q=g}return u};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
-TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l)h=h.toLowerCase();l=0;for(var q=g.length,
-p;l<q;l++)if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h}k&&o.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false}}}else{l=0;for(q=g.length;l<q;l++)if(p=g[l])g[l]=k?p.parentNode:p.parentNode===h;k&&o.filter(h,g,true)}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=
-h=h.toLowerCase();q=b}q("parentNode",h,l,g,p,k)},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,l,g,p,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++)h[l].getAttribute("name")===g[1]&&k.push(h[l]);return k.length===0?null:k}},
-TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
-"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
-return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
-g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
-0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++)if(h[k]===g)return false;return true}else o.error("Syntax error, unrecognized expression: "+
-q)},CHILD:function(g,h){var k=h[1],l=g;switch(k){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(k==="first")return true;l=g;case "last":for(;l=l.nextSibling;)if(l.nodeType===1)return false;return true;case "nth":k=h[2];var q=h[3];if(k===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++u;p.sizcache=h}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>=
-0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="?
-k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};
-try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k<l;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var C;if(r.documentElement.compareDocumentPosition)C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===
-h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in r.documentElement)C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(r.createRange)C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,
-l);if(g===0)j=true;return g};(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");
-return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href",
-2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
-0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[],
-l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)o(g,h[q],k);return o.filter(l,k)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,
-function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Qa.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=
-0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ea(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>
--1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),
-a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},
-nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):
-e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==
-b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
-col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)},
-wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?
-d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
-false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&
-!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)||
-["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,
-b,f))});else a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j===
-"string"&&sa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++)d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment)}n&&c.each(n,
-Ma)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this])}this.parentNode&&
-this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j===
-"string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;)i=i.lastChild;if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o)c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o])}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild);
-j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d)}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i,
-Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v)return c.curCSS(d,f);if(typeof e==="number"&&!hb.test(f))e+="px";c.style(d,f,e)})};
-c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(d)<0)d=v;var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":""}if(ga.test(b))b=La;b=b.replace(ha,ia);if(e)f[b]=d;return f[b]},css:function(a,
-b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&
-a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ga.test(b))b=La;if(!d&&e&&e[b])f=e[b];else if(ob){if(ga.test(b))b="float";b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=
-a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var pb=
-J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=
-c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified")i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);d&&i.each(d,[j.responseText,n,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&
-(this.checked||rb.test(this.nodeName)||sb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,
-b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest}:
-function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e])}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}
-function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(m==="GET")N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||
-N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data)e.data=(e.data+"").replace(N,"="+i+"$1");e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i]}catch(p){}A&&A.removeChild(B)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"")}if(e.data&&m==="GET")e.url+=(ja.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&
-c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset)B.charset=e.scriptCharset;if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&&
-A.removeChild(B)}}}A.insertBefore(B,A.firstChild);return v}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType)w.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url])}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",
-e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w)w.onreadystatechange=c.noop}else if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)?
-"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success")try{n=c.httpData(w,e.dataType,e)}catch(u){j="parsererror";p=u}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,w,j,p);d();q==="timeout"&&w.abort();if(e.async)w=null}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort")}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout")},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null)}catch(l){c.handleError(e,
-w,null,l);d()}e.async||g();return w}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=
-f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(j,n){if(c.isArray(n))c.each(n,
-function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m)});else!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m)}):f(j,n)}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n)}var e=[];if(b===v)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var i in a)d(i,a[i]);return e.join("&").replace(vb,"+")}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/,
-W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d])f=ka[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
-ka[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
-c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"),
-o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x))A[x==="toggle"?n?"show":"hide":x](a);
-else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E}if(B[1])x=(B[1]==="-="?-1:1)*x+C;A.custom(C,x,E)}else A.custom(C,x,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",
-1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
-b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
-null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
-"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
-this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
-c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
-null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
-f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
-b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||
-0;m+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft)}return{top:o,left:m}};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"),
-d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
-d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
-bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
-e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
-this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==v)return this.each(function(){if(i=ua(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ua(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
-c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||
-e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});z.jQuery=z.$=c})(window);
diff --git a/tools/qdoc3/test/style/style.css b/tools/qdoc3/test/style/style.css
deleted file mode 100644
index dff0772..0000000
--- a/tools/qdoc3/test/style/style.css
+++ /dev/null
@@ -1,1051 +0,0 @@
-@media screen
-{
- html
- {
- color: #000000;
- background: #FFFFFF;
- }
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
- {
- margin: 0;
- padding: 0;
- }
- table
- {
- border-collapse: collapse;
- border-spacing: 0;
- }
- fieldset, img
- {
- border: 0;
- }
- 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;
- }
- caption, th
- {
- text-align: left;
- }
- h1, h2, h3, h4, h5, h6
- {
- font-size: 100%;
- font-weight: normal;
- }
- q:before, q:after
- {
- content: '';
- }
- abbr, acronym
- {
- border: 0;
- font-variant: normal;
- }
- sup
- {
- vertical-align: baseline;
- }
- sub
- {
- vertical-align: baseline;
- }
- .heading
- {
- font: normal 600 16px/1.0 Arial;
- padding-bottom: 15px;
- }
- .subtitle
- {
- font-size: 13px;
- }
- .small-subtitle
- {
- font-size: 13px;
- }
- legend
- {
- color: #000000;
- }
- input, button, textarea, select, optgroup, option
- {
- font-family: inherit;
- font-size: inherit;
- font-style: inherit;
- font-weight: inherit;
- }
- input, button, textarea, select
- {
- font-size: 100%;
- }
- html
- {
- background-color: #e5e5e5;
- }
- body
- {
- background: #e6e7e8 url(../images/page_bg.png) repeat-x 0 0;
- font: normal 13px/1.2 Verdana;
- color: #363534;
- }
- strong
- {
- font-weight: bold;
- }
- em
- {
- font-style: italic;
- }
- a
- {
- color: #00732f;
- text-decoration: none;
- }
- .header, .footer, .wrapper
- {
- min-width: 600px;
- max-width: 1500px;
- margin: 0 30px;
- }
- .wrapper
- {
- background: url(../images/bg_r.png) repeat-y 100% 0;
- }
- .wrapper .hd
- {
- padding-left: 216px;
- height: 15px;
- background: url(../images/page.png) no-repeat 0 0;
- overflow: hidden;
- }
- .offline .wrapper .hd
- {
- background: url(../images/page.png) no-repeat 0 -15px;
- }
- .wrapper .hd span
- {
- height: 15px;
- display: block;
- overflow: hidden;
- background: url(../images/page.png) no-repeat 100% -30px;
- }
- .wrapper .bd
- {
- background: url(../images/bg_l.png) repeat-y 0 0;
- position: relative;
- }
- .offline .wrapper .bd
- {
- background: url(../images/bg_l_blank.png) repeat-y 0 0;
- }
- .wrapper .ft
- {
- padding-left: 216px;
- height: 15px;
- background: url(../images/page.png) no-repeat 0 -75px;
- overflow: hidden;
- }
- .offline .wrapper .ft
- {
- background: url(../images/page.png) no-repeat 0 -90px;
- }
- .wrapper .ft span
- {
- height: 15px;
- display: block;
- background: url(../images/page.png) no-repeat 100% -60px;
- overflow: hidden;
- }
- .header, .footer
- {
- display: block;
- clear: both;
- overflow: hidden;
- }
- .header
- {
- height: 115px;
- position: relative;
- }
- .header .icon
- {
- position: absolute;
- top: 13px;
- left: 0;
- }
- .header .qtref
- {
- position: absolute;
- top: 28px;
- left: 88px;
- width: 302px;
- height: 22px;
- }
- .header .qtref span
- {
- display: block;
- width: 302px;
- height: 22px;
- text-indent: -999em;
- background: url(../images/sprites-combined.png) no-repeat -78px -235px;
- }
-
- .sidebar
- {
- float: left;
- margin-left: 5px;
- width: 200px;
- font-size: 11px;
- }
-
- .offline .sidebar, .offline .feedback, .offline .t_button
- {
- display: none;
- }
-
- .sidebar .searchlabel
- {
- padding: 0 0 2px 17px;
- font: normal bold 11px/1.2 Verdana;
- }
-
- .sidebar .search
- {
- padding: 0 15px 0 16px;
- }
-
- .sidebar .search form
- {
- background: url(../images/sprites-combined.png) no-repeat -6px -348px;
- height:21px;
- padding:2px 0 0 5px;
- width:167px;
- }
-
- .sidebar .search form input#pageType
- {
- width: 158px;
- height: 19px;
- padding: 0;
- border: none;
- outline: none;
- font: 13px/1.2 Verdana;
- }
-
- .sidebar .box
- {
- padding: 17px 15px 5px 16px;
- }
-
- .sidebar .box .first
- {
- background-image: none;
- }
-
- .sidebar .box h2
- {
- font: normal 18px/1.2 Arial;
- padding: 0;
- min-height: 32px;
- }
- .sidebar .box h2 span
- {
- overflow: hidden;
- display: inline-block;
- }
- .sidebar .box#lookup h2
- {
- background-image: none;
- }
- .sidebar #lookup.box h2 span
- {
- background: url(../images/sprites-combined.png) no-repeat -6px -311px;
- width: 27px;
- height: 35px;
- margin-right: 13px;
- }
- .sidebar .box#topics h2
- {
- background-image: none;
- }
- .sidebar #topics.box h2 span
- {
- background: url(../images/sprites-combined.png) no-repeat -94px -311px;
- width: 27px;
- height: 32px;
- margin-right: 13px;
- }
- .sidebar .box#examples h2
- {
- background-image: none;
- }
- .sidebar #examples.box h2 span
- {
- background: url(../images/sprites-combined.png) no-repeat -48px -311px;
- width: 30px;
- height: 31px;
- margin-right: 9px;
- }
-
- .sidebar .box .list
- {
- display: block;
- }
- .sidebar .box .live
- {
- display: none;
- height: 100px;
- overflow: auto;
- }
- .list li a:hover, .live li a:hover
- {
- text-decoration: underline;
- }
- .sidebar .box ul
- {
- }
- .sidebar .box ul li
- {
- padding-left: 12px;
- background: url(../images/bullet_gt.png) no-repeat 0 5px;
- margin-bottom: 15px;
- }
- .sidebar .bottombar
- {
- background: url(../images/box_bg.png) repeat-x 0 bottom;
- }
- .wrap
- {
- margin: 0 5px 0 208px;
- overflow: visible;
- }
- .offline .wrap
- {
- margin: 0 5px 0 5px;
- }
- .wrap .toolbar
- {
- background-color: #fafafa;
- border-bottom: 1px solid #d1d1d1;
- height: 20px;
- position: relative;
- }
- .wrap .toolbar .toolblock
- {
- position: absolute;
- }
- .wrap .toolbar .breadcrumb
- {
- font-size: 11px;
- line-height: 1;
- padding: 0 0 10px 21px;
- height: 10px;
- }
- .wrap .toolbar .toolbuttons
- {
- padding: 0 0 10px 21px;
- right: 5px;
- vertical-align: middle;
- overflow: hidden;
- }
- .wrap .toolbar .toolbuttons .active
- {
- color: #00732F;
- }
- .wrap .toolbar .toolbuttons ul
- {
- float: right;
- }
- .wrap .toolbar .toolbuttons li
- {
- float: left;
- text-indent: -10px;
- margin-top: -5px;
- margin-right: 15px;
- font-weight: bold;
- color: #B0ADAB;
- }
-
- .toolbuttons #print
- {
- border-left: 1px solid #c5c4c4;
- margin-top: 0;
- padding-left: 7px;
- text-indent: 0;
- }
- .toolbuttons #print a
- {
- width: 16px;
- height: 16px;
- }
-
- .toolbuttons #print a span
- {
- width: 16px;
- height: 16px;
- text-indent: -999em;
- display: block;
- overflow: hidden;
- background: url(../images/sprites-combined.png) no-repeat -137px -311px;
- }
-
- .toolbuttons #smallA
- {
- font-size: 10pt;
- }
- .toolbuttons #medA
- {
- font-size: 12pt;
- }
- .toolbuttons #bigA
- {
- font-size: 14pt;
- margin-right: 7px;
- }
-
- #smallA:hover, #medA:hover, #bigA:hover
- {
- color: #00732F;
- }
-
- .offline .wrap .breadcrumb
- {
- }
-
- .wrap .breadcrumb ul
- {
- }
- .wrap .breadcrumb ul li
- {
- float: left;
- background: url(../images/breadcrumb.png) no-repeat 0 3px;
- padding-left: 15px;
- margin-left: 15px;
- font-weight: bold;
- }
- .wrap .breadcrumb ul li.last
- {
- font-weight: normal;
- }
- .wrap .breadcrumb ul li a
- {
- color: #363534;
- }
- .wrap .breadcrumb ul li.first
- {
- background-image: none;
- padding-left: 0;
- margin-left: 0;
- }
- .wrap .content
- {
- padding: 30px;
- }
-
- .wrap .content li
- {
- padding-left: 12px;
- background: url(../images/bullet_sq.png) no-repeat 0 5px;
- font: normal 400 10pt/1 Verdana;
- color: #44a51c;
- margin-bottom: 10px;
- }
- .content li:hover
- {
- text-decoration: underline;
- }
-
- .offline .wrap .content
- {
- padding-top: 15px;
- }
-
- .wrap .content h1
- {
- font: 600 18px/1.2 Arial;
- }
- .wrap .content h2
- {
- font: 600 16px/1.2 Arial;
- }
- .wrap .content h3
- {
- font: 600 14px/1.2 Arial;
- }
- .wrap .content p
- {
- line-height: 20px;
- padding: 10px 5px 10px 5px;
- }
- .wrap .content ul
- {
- padding-left: 25px;
- }
- a:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
- .content a:visited
- {
- color: #4c0033;
- text-decoration: none;
- }
- .footer
- {
- min-height: 100px;
- color: #797775;
- font: normal 9px/1 Verdana;
- text-align: center;
- padding-top: 40px;
- background-color: #E6E7E8;
- margin: 0;
- }
- .feedback
- {
- float: none;
- position: absolute;
- right: 15px;
- bottom: 10px;
- font: normal 8px/1 Verdana;
- color: #B0ADAB;
- }
- .feedback:hover
- {
- float: right;
- font: normal 8px/1 Verdana;
- color: #00732F;
- text-decoration: underline;
- }
- .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
- #nav-topright
- {
- height: 70px;
- }
-
- #nav-topright ul
- {
- list-style-type: none;
- float: right;
- width: 370px;
- margin-top: 11px;
- }
-
- #nav-topright li
- {
- display: inline-block;
- margin-right: 20px;
- float: left;
- }
-
- #nav-topright li.nav-topright-last
- {
- margin-right: 0;
- }
-
- #nav-topright li a
- {
- background: transparent url(../images/sprites-combined.png) no-repeat;
- height: 18px;
- display: block;
- overflow: hidden;
- text-indent: -9999px;
- }
-
- #nav-topright li.nav-topright-home a
- {
- width: 65px;
- background-position: -2px -91px;
- }
-
- #nav-topright li.nav-topright-home a:hover
- {
- background-position: -2px -117px;
- }
-
-
- #nav-topright li.nav-topright-dev a
- {
- width: 30px;
- background-position: -76px -91px;
- }
-
- #nav-topright li.nav-topright-dev a:hover
- {
- background-position: -76px -117px;
- }
-
-
- #nav-topright li.nav-topright-labs a
- {
- width: 40px;
- background-position: -114px -91px;
- }
-
- #nav-topright li.nav-topright-labs a:hover
- {
- background-position: -114px -117px;
- }
-
- #nav-topright li.nav-topright-doc a
- {
- width: 32px;
- background-position: -162px -91px;
- }
-
- #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
- {
- background-position: -162px -117px;
- }
-
- #nav-topright li.nav-topright-blog a
- {
- width: 40px;
- background-position: -203px -91px;
- }
-
- #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
- {
- background-position: -203px -117px;
- }
-
- #nav-topright li.nav-topright-shop a
- {
- width: 40px;
- background-position: -252px -91px;
- }
-
- #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
- {
- background-position: -252px -117px;
- }
-
- #nav-logo
- {
- background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
- left: -3px;
- position: absolute;
- width: 75px;
- height: 75px;
- top: 13px;
- }
- #nav-logo a
- {
- width: 75px;
- height: 75px;
- display: block;
- text-indent: -9999px;
- overflow: hidden;
- }
-
-
- .shortCut-topleft-inactive
- {
- padding-left: 3px;
- background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
- height: 20px;
- width: 47px;
- }
- .shortCut-topleft-inactive span
- {
- font-variant: normal;
- }
- #shortCut
- {
- padding-top: 10px;
- font-weight: bolder;
- color: #b0adab;
- }
- #shortCut ul
- {
- list-style-type: none;
- float: left;
- width: 347px;
- margin-left: 100px;
- }
- #shortCut li
- {
- display: inline-block;
- margin-right: 25px;
- float: left;
- white-space: nowrap;
- }
- #shortCut li a
- {
- color: #b0adab;
- }
- #shortCut li a:hover
- {
- color: #44a51c;
- }
-
- hr
- {
- background-color: #E6E6E6;
- border: 1px solid #E6E6E6;
- height: 1px;
- width: 100%;
- text-align: left;
- margin: 15px 0px 15px 0px;
- }
-
- .content .alignedsummary
- {
- margin: 15px;
- }
- pre
- {
- border: 1px solid #DDDDDD;
- margin: 0 20px 10px 10px;
- padding: 20px 15px 20px 20px;
- overflow-x: auto;
- }
- table, pre
- {
- -moz-border-radius: 7px 7px 7px 7px;
- background-color: #F6F6F6;
- border: 1px solid #E6E6E6;
- border-collapse: separate;
- font-size: 11px;
- /*min-width: 395px;*/
- margin-bottom: 25px;
- display: inline-block;
- }
- thead
- {
- margin-top: 5px;
- }
- th
- {
- padding: 3px 15px 3px 15px;
- }
- td
- {
- padding: 3px 15px 3px 20px;
- }
- 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;
- }
- table tr.odd:hover
- {
- background-color: #E6E6E6;
- }
- table tr.even:hover
- {
- background-color: #E6E6E6;
- }
-
- span.comment
- {
- color: #8B0000;
- font-style: italic;
- }
- span.string, span.char
- {
- color: #254117;
- }
-
- .qmltype
- {
- text-align: center;
- font-size: 160%;
- }
- .qmlreadonly
- {
- padding-left: 3px;
- float: right;
- color: #254117;
- }
-
- .qmldefault
- {
- padding-left: 3px;
- float: right;
- color: red;
- }
-
- .qmldoc
- {
- }
-
- *.qmlitem p
- {
- }
-
- #feedbackBox
- {
- display: none;
- -moz-border-radius: 7px 7px 7px 7px;
- border: 1px solid #DDDDDD;
- position: fixed;
- top: 100px;
- left: 33%;
- height: 190px;
- width: 400px;
- padding: 5px;
- background-color: #e6e7e8;
- z-index: 4;
- }
- #feedcloseX a
- {
- display: inline;
- padding: 5px 5px 0 0;
- margin-bottom: 3px;
- color: #363534;
- font-weight: 600;
- float: right;
- text-decoration: none;
- }
-
- #feedbox
- {
- display: inline;
- width: 370px;
- height: 120px;
- margin: 0px 25px 10px 15px;
- }
- #feedsubmit
- {
- display: inline;
- float: right;
- margin: 4px 32px 0 0;
- }
- #blurpage
- {
- display: none;
- position: fixed;
- float: none;
- top: 0px;
- left: 0px;
- right: 0px;
- bottom: 0px;
- background: transparent url(../images/feedbackground.png) 0 0;
- z-index: 3;
- }
- .toc
- {
- float: right;
- -moz-border-radius: 7px 7px 7px 7px;
- background-color: #F6F6F6;
- border: 1px solid #DDDDDD;
- margin: 0 20px 10px 10px;
- padding: 20px 15px 20px 20px;
- height: auto;
- width: 200px;
- }
-
- .toc h3
- {
- font: 600 12px/1.2 Arial;
- }
-
- .wrap .content .toc ul
- {
- padding-left: 0px;
- }
-
-
- .wrap .content .toc .level2
- {
- margin-left: 15px;
- }
-
- .content .toc li
- {
- font: normal 10px/1.2 Verdana;
- background: url(../images/bullet_dn.png) no-repeat 0 5px;
- }
-
- .relpage
- {
- -moz-border-radius: 7px 7px 7px 7px;
- border: 1px solid #DDDDDD;
- padding: 25px 25px;
- clear: both;
- }
- .relpage ul
- {
- float: none;
- padding: 15px;
- }
- .content .relpage li
- {
- font: normal 11px/1.2 Verdana;
- }
- h3.fn, span.fn
- {
- background-color: #F6F6F6;
- border-width: 1px;
- border-style: solid;
- border-color: #E6E6E6;
- font-weight: bold;
- }
-
-
- /* start index box */
- .indexbox
- {
- width: 100%;
- display:inline-block;
- }
-
- .indexboxcont
- {
- display: block;
- /* overflow: hidden;*/
- }
-
- .indexboxbar
- {
- background: transparent url(../images/horBar.png ) repeat-x left bottom;
- margin-bottom: 25px;
- /* background-image: none;
- border-bottom: 1px solid #e2e2e2;*/
- }
-
- .indexboxcont .section
- {
- display: inline-block;
- width: 49%;
- *width:42%;
- _width:42%;
- padding:0 2% 0 1%;
- vertical-align:top;
-
-}
-
- .indexboxcont .indexIcon
- {
- width: 11%;
- *width:18%;
- _width:18%;
- overflow:hidden;
-
-}
- .indexboxcont .section p
- {
- padding-top: 20px;
- padding-bottom: 20px;
- }
- .indexboxcont .sectionlist
- {
- display: inline-block;
- width: 33%;
- padding: 0;
- }
- .indexboxcont .sectionlist ul
- {
- margin-bottom: 20px;
- }
-
- .indexboxcont .sectionlist ul li
- {
- line-height: 12px;
- }
-
- .content .indexboxcont li
- {
- font: normal 600 13px/1 Verdana;
- }
-
- .indexbox a:hover, .indexbox a:visited:hover
- {
- color: #4c0033;
- text-decoration: underline;
- }
-
- .indexbox a:visited
- {
- color: #00732f;
- text-decoration: none;
- }
-
- .indexboxcont:after
- {
- content: ".";
- display: block;
- height: 0;
- clear: both;
- visibility: hidden;
- }
-
- .indexbox .indexIcon span
- {
- display: block;
- }
-
- .indexbox.guide .indexIcon span
- {
- width: 96px;
- height: 137px;
- background: url(../images/sprites-combined.png) no-repeat -5px -376px;
- padding: 0;
- }
-
- .indexbox.tools .indexIcon span
- {
- width: 115px;
- height: 137px;
- background: url(../images/sprites-combined.png) no-repeat -111px -376px;
- padding: 0;
- }
-
- .lastcol
- {
- display: inline-block;
- vertical-align: top;
- padding: 0;
- max-width: 25%;
- }
-
- .tricol .lastcol
- {
- margin-left: -6px;
- }
- /* end indexbox */
-}
-/* end of screen media */
-
-/* start of print media */
-
-@media print
-{
- input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft
- {
- display: none;
- background: none;
- }
- .content
- {
- position: absolute;
- top: 0px;
- left: 0px;
- background: none;
- display: block;
- }
-}
-/* end of print media */
diff --git a/tools/qdoc3/test/style/style_ie6.css b/tools/qdoc3/test/style/style_ie6.css
deleted file mode 100644
index 16fb850..0000000
--- a/tools/qdoc3/test/style/style_ie6.css
+++ /dev/null
@@ -1,54 +0,0 @@
-.indexbox, .indexboxcont, .group {
- zoom: 1;
- height: 1%;
-}
-
-.sidebar {
- margin-left: 3px;
- width: 199px;
- overflow: hidden;
-}
-
-.sidebar .search form {
- position: relative;
-}
-
-.sidebar .search form fieldset {
- position: absolute;
- margin-top: -1px;
-}
-
-.sidebar .search form input#searchstring {
- border: 1px solid #fff;
- height: 18px;
-}
-
-.wrap {
- zoom: 1;
-}
-
-.content,
-.toolbar {
- zoom: 1;
- margin-left: -3px;
- position: relative;
-}
-
-.indexbox {
- clear: both;
-}
-
-.indexboxcont .section {
- zoom: 1;
- float: left;
-}
-
-.indexboxcont .sectionlist {
- zoom: 1;
- float: left;
-}
-
-.wrap .toolbar .toolbuttons li {
- text-indent: 0;
- margin-right: 8px;
-} \ No newline at end of file
diff --git a/tools/qdoc3/test/style/style_ie7.css b/tools/qdoc3/test/style/style_ie7.css
deleted file mode 100644
index afbff5f..0000000
--- a/tools/qdoc3/test/style/style_ie7.css
+++ /dev/null
@@ -1,19 +0,0 @@
-.indexbox, .indexboxcont, .group {
- min-height: 1px;
-}
-
-.sidebar .search form input#searchstring {
- border: 1px solid #fff;
- height: 17px;
-}
-
-
-.indexboxcont .section {
- zoom: 1;
- float: left;
-}
-
-.indexboxcont .sectionlist {
- zoom: 1;
- float: left;
-}
diff --git a/tools/qdoc3/test/style/style_ie8.css b/tools/qdoc3/test/style/style_ie8.css
deleted file mode 100644
index e69de29..0000000
--- a/tools/qdoc3/test/style/style_ie8.css
+++ /dev/null
diff --git a/tools/qdoc3/tokenizer.cpp b/tools/qdoc3/tokenizer.cpp
index 05ad5ee..6e7da20 100644
--- a/tools/qdoc3/tokenizer.cpp
+++ b/tools/qdoc3/tokenizer.cpp
@@ -42,7 +42,6 @@
#include "config.h"
#include "tokenizer.h"
-#include <qdebug.h>
#include <qfile.h>
#include <qhash.h>
#include <qregexp.h>
diff --git a/tools/qdoc3/tokenizer.h b/tools/qdoc3/tokenizer.h
index bd35965..1b33f6f 100644
--- a/tools/qdoc3/tokenizer.h
+++ b/tools/qdoc3/tokenizer.h
@@ -145,7 +145,7 @@ class Tokenizer
int ch = getch();
if (ch == EOF)
return EOF;
- // cast explicitely to make sure the value of ch
+ // cast explicitly to make sure the value of ch
// is in range [0..255] to avoid assert messages
// when using debug CRT that checks its input.
return int(uint(uchar(ch)));
diff --git a/tools/qdoc3/tr.h b/tools/qdoc3/tr.h
index 4d601e9..4ba7aa4 100644
--- a/tools/qdoc3/tr.h
+++ b/tools/qdoc3/tr.h
@@ -46,14 +46,26 @@
#ifndef TR_H
#define TR_H
+#ifndef QT_BOOTSTRAPPED
+# include "qcoreapplication.h"
+#endif
+
#include <qstring.h>
QT_BEGIN_NAMESPACE
-inline QString tr( const char *sourceText, const char * /* comment */ = 0 )
+#if defined(QT_BOOTSTRAPPED) || defined(QT_NO_TRANSLATION)
+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)
+{
+ return QCoreApplication::instance()->translate("", sourceText, comment);
+}
+#endif
QT_END_NAMESPACE
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 540ffa9..ceb1f0f 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -54,7 +54,6 @@
#include "tree.h"
#include <limits.h>
-#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -591,12 +590,6 @@ void Tree::resolveGroups()
if (fake && fake->subType() == Node::Group) {
fake->addGroupMember(i.value());
}
-#if 0
- else {
- if (prevGroup != i.key())
- i.value()->doc().location().warning(tr("No such group '%1'").arg(i.key()));
- }
-#endif
prevGroup = i.key();
}
@@ -812,6 +805,12 @@ void Tree::readIndexSection(const QDomElement &element,
subtype = Node::Page;
else if (element.attribute("subtype") == "externalpage")
subtype = Node::ExternalPage;
+ else if (element.attribute("subtype") == "qmlclass")
+ subtype = Node::QmlClass;
+ else if (element.attribute("subtype") == "qmlpropertygroup")
+ subtype = Node::QmlPropertyGroup;
+ else if (element.attribute("subtype") == "qmlbasictype")
+ subtype = Node::QmlBasicType;
else
return;
@@ -1986,15 +1985,7 @@ QString Tree::fullDocumentLocation(const Node *node) const
else
parentName = fullDocumentLocation(node->parent());
}
-#if 0
- if (node->type() == Node::QmlProperty) {
- qDebug() << "Node::QmlProperty:" << node->name()
- << "parentName:" << parentName;
- if (parentNode)
- qDebug() << "PARENT NODE" << parentNode->type()
- << parentNode->subType() << parentNode->name();
- }
-#endif
+
switch (node->type()) {
case Node::Class:
case Node::Namespace:
diff --git a/tools/qdoc3/uncompressor.cpp b/tools/qdoc3/uncompressor.cpp
deleted file mode 100644
index afb88e6..0000000
--- a/tools/qdoc3/uncompressor.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- uncompressor.cpp
-*/
-
-#include "uncompressor.h"
-
-QT_BEGIN_NAMESPACE
-
-QList<Uncompressor *> Uncompressor::uncompressors;
-
-
-/*!
- \class Uncompressor
-
- \brief The Uncompressor class is a base class for classes that
- know how to uncompress a certain kind of compressed file.
-
- The uncompressor contains a list of the filename extensions
- of the file types that the uncompressor knows how to uncompress.
-
- It maintains a static list of all the instances of Uncompressor
- that have been created. It also has a static function for searching
- that list to find the uncompressor to use for uncompressing a file
- with a certain extension.
- */
-
-/*!
- The constructor takes a list of filename extensions, which it
- copies and saves internally. This uncompressor is prepended
- to the stack list.
- */
-Uncompressor::Uncompressor( const QStringList& extensions )
- : fileExts( extensions )
-{
- uncompressors.prepend( this );
-}
-
-/*!
- The destructor deletes all the filename extensions.
- */
-Uncompressor::~Uncompressor()
-{
- uncompressors.removeAll( this );
-}
-
-/*!
- This function searches the static list of uncompressors to find the
- first one that can handle \a fileName. If it finds an acceptable
- uncompressor, it returns a pointer to it. Otherwise it returns null.
-*/
-Uncompressor*
-Uncompressor::uncompressorForFileName( const QString& fileName )
-{
- int dot = -1;
- while ( (dot = fileName.indexOf(".", dot + 1)) != -1 ) {
- QString ext = fileName.mid( dot + 1 );
- QList<Uncompressor *>::ConstIterator u = uncompressors.begin();
- while ( u != uncompressors.end() ) {
- if ( (*u)->fileExtensions().contains(ext) )
- return *u;
- ++u;
- }
- }
- return 0;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/uncompressor.h b/tools/qdoc3/uncompressor.h
deleted file mode 100644
index cae675f..0000000
--- a/tools/qdoc3/uncompressor.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- uncompressor.h
-*/
-
-#ifndef UNCOMPRESSOR_H
-#define UNCOMPRESSOR_H
-
-#include <qstringlist.h>
-
-#include "location.h"
-
-QT_BEGIN_NAMESPACE
-
-class Uncompressor
-{
-public:
- Uncompressor( const QStringList& extensions );
- virtual ~Uncompressor();
-
- virtual QString uncompressedFilePath( const QString& filePath ) = 0;
- virtual void uncompressFile( const Location& location,
- const QString& filePath,
- const QString& outputFilePath ) = 0;
-
- static Uncompressor *uncompressorForFileName( const QString& fileName );
-
-protected:
- const QStringList& fileExtensions() const { return fileExts; }
-
-private:
- QStringList fileExts;
-
- static QList<Uncompressor *> uncompressors;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/webxmlgenerator.cpp b/tools/qdoc3/webxmlgenerator.cpp
deleted file mode 100644
index 6020b1b..0000000
--- a/tools/qdoc3/webxmlgenerator.cpp
+++ /dev/null
@@ -1,1195 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- webxmlgenerator.cpp
-*/
-
-#include "codemarker.h"
-#include "pagegenerator.h"
-#include "webxmlgenerator.h"
-#include "node.h"
-#include "separator.h"
-#include "tree.h"
-
-#include <QtCore/qxmlstream.h>
-
-QT_BEGIN_NAMESPACE
-
-#define COMMAND_VERSION Doc::alias("version")
-
-WebXMLGenerator::WebXMLGenerator()
- : PageGenerator()
-{
-}
-
-WebXMLGenerator::~WebXMLGenerator()
-{
-}
-
-void WebXMLGenerator::initializeGenerator(const Config &config)
-{
- Generator::initializeGenerator(config);
-
- project = config.getString(CONFIG_PROJECT);
-
- projectDescription = config.getString(CONFIG_DESCRIPTION);
- if (projectDescription.isEmpty() && !project.isEmpty())
- projectDescription = project + " Reference Documentation";
-
- projectUrl = config.getString(CONFIG_URL);
-
- generateIndex = config.getBool(CONFIG_GENERATEINDEX);
-}
-
-void WebXMLGenerator::terminateGenerator()
-{
- PageGenerator::terminateGenerator();
-}
-
-QString WebXMLGenerator::format()
-{
- return "WebXML";
-}
-
-QString WebXMLGenerator::fileExtension(const Node * /* node */) const
-{
- return "xml";
-}
-
-void WebXMLGenerator::generateTree(const Tree *tree, CodeMarker *marker)
-{
- tre = tree;
- moduleClassMap.clear();
- moduleNamespaceMap.clear();
- serviceClasses.clear();
- findAllClasses(tree->root());
- findAllNamespaces(tree->root());
-
- PageGenerator::generateTree(tree, marker);
-
- if (generateIndex)
- tre->generateIndex(outputDir() + "/" + project.toLower() + ".index",
- projectUrl, projectDescription, false);
-}
-
-void WebXMLGenerator::startText(const Node *relative, CodeMarker *marker)
-{
- inLink = false;
- inContents = false;
- inSectionHeading = false;
- numTableRows = 0;
- sectionNumber.clear();
- PageGenerator::startText(relative, marker);
-}
-
-int WebXMLGenerator::generateAtom(QXmlStreamWriter &writer, const Atom *atom,
- const Node *relative, CodeMarker *marker)
-{
- Q_UNUSED(writer);
-
- int skipAhead = 0;
-
- switch (atom->type()) {
- default:
- PageGenerator::generateAtom(atom, relative, marker);
- }
- return skipAhead;
-}
-
-void WebXMLGenerator::generateClassLikeNode(const InnerNode *inner,
- CodeMarker *marker)
-{
- QByteArray data;
- QXmlStreamWriter writer(&data);
- writer.setAutoFormatting(true);
- writer.writeStartDocument();
- writer.writeStartElement("WebXML");
- writer.writeStartElement("document");
-
- generateIndexSections(writer, inner, marker);
-
- writer.writeEndElement(); // document
- writer.writeEndElement(); // WebXML
- writer.writeEndDocument();
-
- out() << data;
- out().flush();
-}
-
-void WebXMLGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
-{
- QByteArray data;
- QXmlStreamWriter writer(&data);
- writer.setAutoFormatting(true);
- writer.writeStartDocument();
- writer.writeStartElement("WebXML");
- writer.writeStartElement("document");
-
- generateIndexSections(writer, fake, marker);
-
- writer.writeEndElement(); // document
- writer.writeEndElement(); // WebXML
- writer.writeEndDocument();
-
- out() << data;
- out().flush();
-}
-
-void WebXMLGenerator::generateIndexSections(QXmlStreamWriter &writer,
- const Node *node, CodeMarker *marker)
-{
- if (tre->generateIndexSection(writer, node, true)) {
-
- // Add documentation to this node if it exists.
- writer.writeStartElement("description");
- writer.writeAttribute("path", node->doc().location().filePath());
- writer.writeAttribute("line", QString::number(node->doc().location().lineNo()));
- writer.writeAttribute("column", QString::number(node->doc().location().columnNo()));
-
- if (node->type() == Node::Fake) {
-
- const FakeNode *fake = static_cast<const FakeNode *>(node);
-
- generateRelations(writer, node, marker);
-
- if (fake->subType() == Node::Module) {
- writer.writeStartElement("generatedlist");
- writer.writeAttribute("contents", "classesbymodule");
-
- if (moduleNamespaceMap.contains(fake->name())) {
- writer.writeStartElement("section");
- writer.writeStartElement("heading");
- writer.writeAttribute("level", "1");
- writer.writeCharacters("Namespaces");
- writer.writeEndElement(); // heading
- generateAnnotatedList(writer, fake, marker, moduleNamespaceMap[fake->name()]);
- writer.writeEndElement(); // section
- }
- if (moduleClassMap.contains(fake->name())) {
- writer.writeStartElement("section");
- writer.writeStartElement("heading");
- writer.writeAttribute("level", "1");
- writer.writeCharacters("Classes");
- writer.writeEndElement(); // heading
- generateAnnotatedList(writer, fake, marker, moduleClassMap[fake->name()]);
- writer.writeEndElement(); // section
- }
-
- writer.writeEndElement(); // generatedlist
- }
- }
-
- startText(node, marker);
-
- const Atom *atom = node->doc().body().firstAtom();
- while (atom)
- atom = addAtomElements(writer, atom, node, marker);
-
- QList<Text> alsoList = node->doc().alsoList();
- supplementAlsoList(node, alsoList);
-
- if (!alsoList.isEmpty()) {
- writer.writeStartElement("see-also");
- for (int i = 0; i < alsoList.size(); ++i) {
- const Atom *atom = alsoList.at(i).firstAtom();
- while (atom)
- atom = addAtomElements(writer, atom, node, marker);
- }
- writer.writeEndElement(); // see-also
- }
-
- writer.writeEndElement(); // description
-
- if (node->isInnerNode()) {
- const InnerNode *inner = static_cast<const InnerNode *>(node);
-
- // Recurse to generate an element for this child node and all its children.
- foreach (const Node *child, inner->childNodes())
- generateIndexSections(writer, child, marker);
-
- writer.writeStartElement("related");
- if (inner->relatedNodes().size() > 0) {
- foreach (const Node *child, inner->relatedNodes())
- generateIndexSections(writer, child, marker);
- }
- writer.writeEndElement(); // related
- }
- writer.writeEndElement();
- }
-}
-
-void WebXMLGenerator::generateInnerNode(const InnerNode *node, CodeMarker *marker)
-{
- if (!node->url().isNull())
- return;
-
- if (node->type() == Node::Fake) {
- const FakeNode *fakeNode = static_cast<const FakeNode *>(node);
- if (fakeNode->subType() == Node::ExternalPage)
- return;
- }
-
- if ( node->parent() != 0 ) {
- beginSubPage( node->location(), fileName(node) );
- if ( node->type() == Node::Namespace || node->type() == Node::Class) {
- generateClassLikeNode(node, marker);
- } else if ( node->type() == Node::Fake ) {
- generateFakeNode(static_cast<const FakeNode *>(node), marker);
- }
- endSubPage();
- }
-
- NodeList::ConstIterator c = node->childNodes().begin();
- while ( c != node->childNodes().end() ) {
- if ((*c)->isInnerNode() && (
- (*c)->access() != Node::Private || (*c)->status() == Node::Internal))
- generateInnerNode( (const InnerNode *) *c, marker );
- ++c;
- }
-}
-
-const Atom *WebXMLGenerator::addAtomElements(QXmlStreamWriter &writer,
- const Atom *atom, const Node *relative, CodeMarker *marker)
-{
- switch (atom->type()) {
- case Atom::AbstractLeft:
- case Atom::AbstractRight:
- break;
- case Atom::AutoLink:
- if (!inLink && !inSectionHeading) {
- const Node *node = findNode(atom, relative, marker);
- if (node) {
- startLink(writer, atom, node, relative);
- if (inLink) {
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // link
- inLink = false;
- }
- } else
- writer.writeCharacters(atom->string());
- } else
- writer.writeCharacters(atom->string());
- break;
- case Atom::BaseName:
- break;
- case Atom::BriefLeft:
-
- writer.writeStartElement("brief");
- switch (relative->type()) {
- case Node::Property:
- writer.writeCharacters("This property");
- break;
- case Node::Variable:
- writer.writeCharacters("This variable");
- break;
- default:
- break;
- }
- if (relative->type() == Node::Property || relative->type() == Node::Variable) {
- QString str;
- const Atom *a = atom->next();
- while (a != 0 && a->type() != Atom::BriefRight) {
- if (a->type() == Atom::String || a->type() == Atom::AutoLink)
- str += a->string();
- a = a->next();
- }
- str[0] = str[0].toLower();
- if (str.right(1) == ".")
- str.chop(1);
-
- QStringList words = str.split(" ");
- if (!(words.first() == "contains" || words.first() == "specifies"
- || words.first() == "describes" || words.first() == "defines"
- || words.first() == "holds" || words.first() == "determines"))
- writer.writeCharacters(" holds ");
- else
- writer.writeCharacters(" ");
- }
- break;
-
- case Atom::BriefRight:
- if (relative->type() == Node::Property || relative->type() == Node::Variable)
- writer.writeCharacters(".");
-
- writer.writeEndElement(); // brief
- break;
-
- case Atom::C:
- writer.writeStartElement("teletype");
- if (inLink)
- writer.writeAttribute("type", "normal");
- else
- writer.writeAttribute("type", "highlighted");
-
- writer.writeCharacters(plainCode(atom->string()));
- writer.writeEndElement(); // teletype
- break;
-
- case Atom::Code:
- writer.writeTextElement("code", trimmedTrailing(plainCode(atom->string())));
- break;
-
-#ifdef QDOC_QML
- case Atom::Qml:
- writer.writeTextElement("qml", trimmedTrailing(plainCode(atom->string())));
-#endif
-
- case Atom::CodeBad:
- writer.writeTextElement("badcode", trimmedTrailing(plainCode(atom->string())));
- break;
-
- case Atom::CodeNew:
- writer.writeTextElement("para", "you can rewrite it as");
- writer.writeTextElement("newcode", trimmedTrailing(plainCode(atom->string())));
- break;
-
- case Atom::CodeOld:
- writer.writeTextElement("para", "For example, if you have code like");
- writer.writeTextElement("oldcode", trimmedTrailing(plainCode(atom->string())));
- break;
-
- case Atom::CodeQuoteArgument:
- if (quoteCommand == "dots") {
- writer.writeAttribute("indent", atom->string());
- writer.writeCharacters("...");
- } else
- writer.writeCharacters(atom->string());
- writer.writeEndElement(); // code
- break;
-
- case Atom::CodeQuoteCommand:
- quoteCommand = atom->string();
- writer.writeStartElement(quoteCommand);
- break;
-
- case Atom::FootnoteLeft:
- writer.writeStartElement("footnote");
- break;
-
- case Atom::FootnoteRight:
- writer.writeEndElement(); // footnote
- break;
-/*
- case Atom::FormatElse:
- writer.writeStartElement("else");
- writer.writeEndElement(); // else
- break;
-*/
- case Atom::FormatEndif:
- writer.writeEndElement(); // raw
- break;
- case Atom::FormatIf:
- writer.writeStartElement("raw");
- writer.writeAttribute("format", atom->string());
- break;
- case Atom::FormattingLeft:
- {
- if (atom->string() == ATOM_FORMATTING_BOLD)
- writer.writeStartElement("bold");
- else if (atom->string() == ATOM_FORMATTING_ITALIC)
- writer.writeStartElement("italic");
- else if (atom->string() == ATOM_FORMATTING_UNDERLINE)
- writer.writeStartElement("underline");
- else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT)
- writer.writeStartElement("subscript");
- else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT)
- writer.writeStartElement("superscript");
- else if (atom->string() == ATOM_FORMATTING_TELETYPE)
- writer.writeStartElement("teletype");
- else if (atom->string() == ATOM_FORMATTING_PARAMETER)
- writer.writeStartElement("argument");
- else if (atom->string() == ATOM_FORMATTING_INDEX)
- writer.writeStartElement("index");
- }
- break;
-/* out() << formattingLeftMap()[atom->string()];
- if ( atom->string() == ATOM_FORMATTING_PARAMETER ) {
- if ( atom->next() != 0 && atom->next()->type() == Atom::String ) {
- QRegExp subscriptRegExp( "([a-z]+)_([0-9n])" );
- if ( subscriptRegExp.exactMatch(atom->next()->string()) ) {
- out() << subscriptRegExp.cap( 1 ) << "<sub>"
- << subscriptRegExp.cap( 2 ) << "</sub>";
- skipAhead = 1;
- }
- }
- }*/
- case Atom::FormattingRight:
- {
- if (atom->string() == ATOM_FORMATTING_BOLD)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_ITALIC)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_UNDERLINE)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_TELETYPE)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_PARAMETER)
- writer.writeEndElement();
- else if (atom->string() == ATOM_FORMATTING_INDEX)
- writer.writeEndElement();
- }
- if (inLink) {
- writer.writeEndElement(); // link
- inLink = false;
- }
- break;
-/* if ( atom->string() == ATOM_FORMATTING_LINK ) {
- if (inLink) {
- if ( link.isEmpty() ) {
- if (showBrokenLinks)
- out() << "</i>";
- } else {
- out() << "</a>";
- }
- }
- inLink = false;
- } else {
- out() << formattingRightMap()[atom->string()];
- }*/
- case Atom::GeneratedList:
- writer.writeStartElement("generatedlist");
- writer.writeAttribute("contents", atom->string());
- writer.writeEndElement(); // generatedlist
-/*
- if (atom->string() == "annotatedclasses") {
- generateAnnotatedList(relative, marker, nonCompatClasses);
- } else if (atom->string() == "classes") {
- generateCompactList(relative, marker, nonCompatClasses);
- } else if (atom->string().contains("classesbymodule")) {
- QString arg = atom->string().trimmed();
- QString moduleName = atom->string().mid(atom->string().indexOf(
- "classesbymodule") + 15).trimmed();
- if (moduleClassMap.contains(moduleName))
- generateAnnotatedList(relative, marker, moduleClassMap[moduleName]);
- } else if (atom->string().contains("classesbyedition")) {
- QString arg = atom->string().trimmed();
- QString editionName = atom->string().mid(atom->string().indexOf(
- "classesbyedition") + 16).trimmed();
- if (editionModuleMap.contains(editionName)) {
- QMap<QString, const Node *> editionClasses;
- foreach (const QString &moduleName, editionModuleMap[editionName]) {
- if (moduleClassMap.contains(moduleName))
- editionClasses.unite(moduleClassMap[moduleName]);
- }
- generateAnnotatedList(relative, marker, editionClasses);
- }
- } else if (atom->string() == "classhierarchy") {
- generateClassHierarchy(relative, marker, nonCompatClasses);
- } else if (atom->string() == "compatclasses") {
- generateCompactList(relative, marker, compatClasses);
- } else if (atom->string() == "functionindex") {
- generateFunctionIndex(relative, marker);
- } else if (atom->string() == "legalese") {
- generateLegaleseList(relative, marker);
- } else if (atom->string() == "mainclasses") {
- generateCompactList(relative, marker, mainClasses);
- } else if (atom->string() == "services") {
- generateCompactList(relative, marker, serviceClasses);
- } else if (atom->string() == "overviews") {
- generateOverviewList(relative, marker);
- } else if (atom->string() == "namespaces") {
- generateAnnotatedList(relative, marker, namespaceIndex);
- } else if (atom->string() == "related") {
- const FakeNode *fake = static_cast<const FakeNode *>(relative);
- if (fake && !fake->groupMembers().isEmpty()) {
- QMap<QString, const Node *> groupMembersMap;
- foreach (Node *node, fake->groupMembers()) {
- if (node->type() == Node::Fake)
- groupMembersMap[fullName(node, relative, marker)] = node;
- }
- generateAnnotatedList(fake, marker, groupMembersMap);
- }
- } else if (atom->string() == "relatedinline") {
- const FakeNode *fake = static_cast<const FakeNode *>(relative);
- if (fake && !fake->groupMembers().isEmpty()) {
- // Reverse the list into the original scan order.
- // Should be sorted. But on what? It may not be a
- // regular class or page definition.
- QList<const Node *> list;
- foreach (const Node *node, fake->groupMembers())
- list.prepend(node);
- foreach (const Node *node, list)
- generateBody(node, marker );
- }
- }
- break;
-*/
- break;
- case Atom::Image:
- writer.writeStartElement("image");
- writer.writeAttribute("href", imageFileName(relative, atom->string()));
- writer.writeEndElement(); // image
- break;
-
- case Atom::InlineImage:
- writer.writeStartElement("inlineimage");
- writer.writeAttribute("href", imageFileName(relative, atom->string()));
- writer.writeEndElement(); // inlineimage
- break;
-
- case Atom::ImageText:
- break;
-
- case Atom::LegaleseLeft:
- writer.writeStartElement("legalese");
- break;
-
- case Atom::LegaleseRight:
- writer.writeEndElement(); // legalese
- break;
-
- case Atom::Link:
- case Atom::LinkNode:
- if (!inLink) {
- const Node *node = findNode(atom, relative, marker);
- if (node)
- startLink(writer, atom, node, relative);
- }
- break;
-
- case Atom::ListLeft:
- writer.writeStartElement("list");
-
- if (atom->string() == ATOM_LIST_BULLET)
- writer.writeAttribute("type", "bullet");
- else if (atom->string() == ATOM_LIST_TAG)
- writer.writeAttribute("type", "definition");
- else if (atom->string() == ATOM_LIST_VALUE)
- writer.writeAttribute("type", "enum");
- else {
- writer.writeAttribute("type", "ordered");
- if (atom->string() == ATOM_LIST_UPPERALPHA)
- writer.writeAttribute("start", "A");
- else if (atom->string() == ATOM_LIST_LOWERALPHA)
- writer.writeAttribute("start", "a");
- else if (atom->string() == ATOM_LIST_UPPERROMAN)
- writer.writeAttribute("start", "I");
- else if (atom->string() == ATOM_LIST_LOWERROMAN)
- writer.writeAttribute("start", "i");
- else // (atom->string() == ATOM_LIST_NUMERIC)
- writer.writeAttribute("start", "1");
- }
- break;
-
- case Atom::ListItemNumber:
- break;
-
- case Atom::ListTagLeft:
- {
- writer.writeStartElement("definition");
-
- writer.writeTextElement("term", plainCode(
- marker->markedUpEnumValue(atom->next()->string(), relative)));
- }
- break;
-
- case Atom::ListTagRight:
- writer.writeEndElement(); // definition
- break;
-
- case Atom::ListItemLeft:
- writer.writeStartElement("item");
- break;
-
- case Atom::ListItemRight:
- writer.writeEndElement(); // item
- break;
-
- case Atom::ListRight:
- writer.writeEndElement(); // list
- break;
-
- case Atom::Nop:
- break;
-
- case Atom::ParaLeft:
- writer.writeStartElement("para");
- break;
-
- case Atom::ParaRight:
- writer.writeEndElement(); // para
- break;
-
- case Atom::QuotationLeft:
- writer.writeStartElement("quote");
- break;
-
- case Atom::QuotationRight:
- writer.writeEndElement(); // quote
- break;
-
- case Atom::RawString:
- writer.writeCharacters(atom->string());
- break;
-
- case Atom::SectionLeft:
- writer.writeStartElement("section");
- writer.writeAttribute("id", Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
- break;
-
- case Atom::SectionRight:
- writer.writeEndElement(); // section
- break;
-
- case Atom::SectionHeadingLeft:
- writer.writeStartElement("heading");
- writer.writeAttribute("level", atom->string()); // + hOffset(relative)
- inSectionHeading = true;
- break;
-
- case Atom::SectionHeadingRight:
- writer.writeEndElement(); // heading
- inSectionHeading = false;
- break;
-
- case Atom::SidebarLeft:
- case Atom::SidebarRight:
- break;
-
- case Atom::SnippetCommand:
- writer.writeStartElement(atom->string());
- break;
-
- case Atom::SnippetIdentifier:
- writer.writeAttribute("identifier", atom->string());
- writer.writeEndElement(); // snippet
- break;
-
- case Atom::SnippetLocation:
- writer.writeAttribute("location", atom->string());
- break;
-
- case Atom::String:
- writer.writeCharacters(atom->string());
- break;
-
- case Atom::TableLeft:
- writer.writeStartElement("table");
- if (atom->string().contains("%"))
- writer.writeAttribute("width", atom->string());
- break;
-
- case Atom::TableRight:
- writer.writeEndElement(); // table
- break;
-
- case Atom::TableHeaderLeft:
- writer.writeStartElement("header");
- break;
-
- case Atom::TableHeaderRight:
- writer.writeEndElement(); // header
- break;
-
- case Atom::TableRowLeft:
- writer.writeStartElement("row");
- break;
-
- case Atom::TableRowRight:
- writer.writeEndElement(); // row
- break;
-
- case Atom::TableItemLeft:
- {
- writer.writeStartElement("item");
- QStringList spans = atom->string().split(",");
- if (spans.size() == 2) {
- if (spans.at(0) != "1")
- writer.writeAttribute("colspan", spans.at(0).trimmed());
- if (spans.at(1) != "1")
- writer.writeAttribute("rowspan", spans.at(1).trimmed());
- }
- }
- break;
-
- case Atom::TableItemRight:
- writer.writeEndElement(); // item
- break;
-
- case Atom::TableOfContents:
- writer.writeStartElement("tableofcontents");
- writer.writeAttribute("details", atom->string());
- {
- int numColumns = 1;
- const Node *node = relative;
-
- Doc::SectioningUnit sectioningUnit = Doc::Section4;
- QStringList params = atom->string().split(",");
- QString columnText = params.at(0);
- QStringList pieces = columnText.split(" ", QString::SkipEmptyParts);
- if (pieces.size() >= 2) {
- columnText = pieces.at(0);
- pieces.pop_front();
- QString path = pieces.join(" ").trimmed();
- node = findNode(path, relative, marker);
- if (node)
- writer.writeAttribute("href", fileName(node));
- }
-
- if (params.size() == 2) {
- numColumns = qMax(columnText.toInt(), numColumns);
- sectioningUnit = (Doc::SectioningUnit)params.at(1).toInt();
- writer.writeAttribute("columns", QString::number(numColumns));
- writer.writeAttribute("unit", QString::number(sectioningUnit));
- }
-
- if (node)
- generateTableOfContents(writer, node, sectioningUnit, numColumns,
- relative);
- }
- writer.writeEndElement(); // tableofcontents
- break;
-
- case Atom::Target:
- writer.writeStartElement("target");
- writer.writeAttribute("name", Doc::canonicalTitle(atom->string()));
- writer.writeEndElement(); // target
- break;
-
- case Atom::UnhandledFormat:
- case Atom::UnknownCommand:
- writer.writeCharacters(atom->typeString());
- break;
- default:
- break;
- }
-
- if (atom)
- return atom->next();
-
- return 0;
-}
-/*
- QDomElement atomElement = document.createElement(atom->typeString().toLower());
- QDomText atomValue = document.createTextNode(atom->string());
- atomElement.appendChild(atomValue);
- descriptionElement.appendChild(atomElement);
-*/
-
-/*
- ### Warning: findNode() is a modified version of HtmlGenerator::getLink().
-*/
-const Node *WebXMLGenerator::findNode(const Atom *atom, const Node *relative, CodeMarker *marker)
-{
- return findNode(atom->string(), relative, marker);
-}
-
-const Node *WebXMLGenerator::findNode(const QString &title, const Node *relative, CodeMarker *marker)
-{
- QString link;
- if (title.contains(":") &&
- (title.startsWith("file:")
- || title.startsWith("http:")
- || title.startsWith("https:")
- || title.startsWith("ftp:")
- || title.startsWith("mailto:"))) {
-
- return 0;
- } else if (title.count('@') == 1) {
- return 0;
- } else {
- QStringList path;
- if (title.contains('#')) {
- path = title.split('#');
- } else {
- path.append(title);
- }
-
- const Node *node = 0;
- Atom *targetAtom = 0;
-
- QString first = path.first().trimmed();
- if (first.isEmpty()) {
- node = relative;
- } else if (first.endsWith(".html")) {
- node = tre->root()->findNode(first, Node::Fake);
- } else {
- node = marker->resolveTarget(first, tre, relative);
- if (!node)
- node = tre->findFakeNodeByTitle(first);
- if (!node)
- node = tre->findUnambiguousTarget(first, targetAtom);
- }
-
- if (node) {
- if (!node->url().isEmpty())
- return node;
- else
- path.removeFirst();
- } else {
- return 0;
- }
-
- while (!path.isEmpty()) {
- targetAtom = tre->findTarget(path.first(), node);
- if (targetAtom == 0)
- break;
- path.removeFirst();
- }
-/* We would ideally treat targets as nodes to be consistent.
- if (targetAtom && node && node->isInnerNode()) {
- Node *parentNode = const_cast<Node *>(node);
- node = new TargetNode(static_cast<InnerNode*>(parentNode), first);
- }
-*/
- return node;
- }
- return 0;
-}
-
-void WebXMLGenerator::startLink(QXmlStreamWriter &writer, const Atom *atom,
- const Node *node, const Node *relative)
-{
- QString location = tre->fullDocumentLocation(node);
- if (!location.isEmpty()) {
- writer.writeStartElement("link");
- writer.writeAttribute("raw", atom->string());
- if (atom->string().contains("#") || node == relative) {
- QString target = atom->string().split("#").last();
- Atom *targetAtom = tre->findTarget(target, node);
- if (targetAtom)
- location += "#" + Doc::canonicalTitle(target);
- }
- writer.writeAttribute("href", location);
- QString type = targetType(node);
- writer.writeAttribute("type", type);
- switch (node->type()) {
- case Node::Enum:
- writer.writeAttribute("enum", tre->fullDocumentName(node));
- break;
- case Node::Fake:
- writer.writeAttribute("page", tre->fullDocumentName(node));
- break;
- case Node::Property:
- {
- const PropertyNode *propertyNode = static_cast<const PropertyNode *>(node);
- if (propertyNode->getters().size() > 0)
- writer.writeAttribute("getter", tre->fullDocumentName(propertyNode->getters()[0]));
- }
- default:
- ;
- }
- inLink = true;
- }
-}
-
-QString WebXMLGenerator::targetType(const Node *node)
-{
- switch (node->type()) {
- case Node::Namespace:
- return "namespace";
- break;
- case Node::Class:
- return "class";
- break;
- case Node::Fake:
- return "page";
- break;
- case Node::Enum:
- return "enum";
- break;
- case Node::Typedef:
- return "typedef";
- break;
- case Node::Property:
- return "property";
- break;
- case Node::Function:
- return "function";
- break;
- case Node::Variable:
- return "variable";
- break;
- case Node::Target:
- return "target";
- break;
- default:
- return "";
- }
- return "";
-}
-
-void WebXMLGenerator::generateRelations(QXmlStreamWriter &writer, const Node *node, CodeMarker *marker)
-{
- if (node && !node->links().empty()) {
- QPair<QString,QString> linkPair;
- QPair<QString,QString> anchorPair;
- const Node *linkNode;
-
- foreach (Node::LinkType relation, node->links().keys()) {
-
- linkPair = node->links()[relation];
- linkNode = findNode(linkPair.first, node, marker);
-
- if (!linkNode)
- linkNode = node;
-
- if (linkNode == node)
- anchorPair = linkPair;
- else
- anchorPair = anchorForNode(linkNode);
-
- writer.writeStartElement("relation");
- writer.writeAttribute("href", anchorPair.first);
- writer.writeAttribute("type", targetType(linkNode));
-
- switch (relation) {
- case Node::StartLink:
- writer.writeAttribute("meta", "start");
- break;
- case Node::NextLink:
- writer.writeAttribute("meta", "next");
- break;
- case Node::PreviousLink:
- writer.writeAttribute("meta", "previous");
- break;
- case Node::ContentsLink:
- writer.writeAttribute("meta", "contents");
- break;
- case Node::IndexLink:
- writer.writeAttribute("meta", "index");
- break;
- default:
- writer.writeAttribute("meta", "");
- }
- writer.writeAttribute("description", anchorPair.second);
- writer.writeEndElement(); // link
- }
- }
-}
-
-// Classes adapted from HtmlGenerator.
-
-void WebXMLGenerator::generateTableOfContents(QXmlStreamWriter &writer, const Node *node,
- Doc::SectioningUnit sectioningUnit,
- int numColumns, const Node *relative)
-
-{
- if (!node->doc().hasTableOfContents())
- return;
- QList<Atom *> toc = node->doc().tableOfContents();
- if (toc.isEmpty())
- return;
-
- QString nodeName = "";
- if (node != relative)
- nodeName = node->name();
-
- QStringList sectionNumber;
- int columnSize = 0;
-
- if (numColumns > 1) {
- writer.writeStartElement("table");
- writer.writeAttribute("width", "100%");
- writer.writeStartElement("row");
- writer.writeStartElement("item");
- writer.writeAttribute("width", QString::number((100 + numColumns - 1) / numColumns) + "%");
- }
-
- // disable nested links in table of contents
- inContents = true;
- inLink = true;
-
- for (int i = 0; i < toc.size(); ++i) {
- Atom *atom = toc.at(i);
-
- int nextLevel = atom->string().toInt();
- if (nextLevel > (int)sectioningUnit)
- continue;
-
- if (sectionNumber.size() < nextLevel) {
- do {
- writer.writeStartElement("list");
- sectionNumber.append("1");
- } while (sectionNumber.size() < nextLevel);
- } else {
- while (sectionNumber.size() > nextLevel) {
- writer.writeEndElement();
- sectionNumber.removeLast();
- }
- sectionNumber.last() = QString::number(sectionNumber.last().toInt() + 1);
- }
- Text headingText = Text::sectionHeading(atom);
-
- if (sectionNumber.size() == 1 && columnSize > toc.size() / numColumns) {
- writer.writeEndElement(); // list
- writer.writeEndElement(); // item
- writer.writeStartElement("item");
- writer.writeAttribute("width", QString::number((100 + numColumns - 1) / numColumns) + "%");
- writer.writeStartElement("list");
- columnSize = 0;
- }
-
- writer.writeStartElement("item");
- writer.writeStartElement("para");
- writer.writeStartElement("link");
- writer.writeAttribute("href", nodeName + "#" + Doc::canonicalTitle(headingText.toString()));
- writer.writeAttribute("type", "page");
- writer.writeCharacters(headingText.toString());
- writer.writeEndElement(); // link
- writer.writeEndElement(); // para
- writer.writeEndElement(); // item
-
- ++columnSize;
- }
- while (!sectionNumber.isEmpty()) {
- writer.writeEndElement(); // list
- sectionNumber.removeLast();
- }
-
- if (numColumns > 1) {
- writer.writeEndElement(); // item
- writer.writeEndElement(); // row
- writer.writeEndElement(); // table
- }
-
- inContents = false;
- inLink = false;
-}
-
-void WebXMLGenerator::generateAnnotatedList(QXmlStreamWriter &writer,
- const Node *relative, CodeMarker *marker, const QMap<QString, const Node *> &nodeMap)
-{
- writer.writeStartElement("table");
- writer.writeAttribute("width", "100%");
-
- foreach (QString name, nodeMap.keys()) {
- const Node *node = nodeMap[name];
-
- writer.writeStartElement("row");
- writer.writeStartElement("heading");
- generateFullName(writer, node, relative, marker);
- writer.writeEndElement(); // heading
-
- writer.writeStartElement("item");
- writer.writeCharacters(node->doc().briefText().toString());
- writer.writeEndElement(); // item
- writer.writeEndElement(); // row
- }
- writer.writeEndElement(); // table
-}
-
-void WebXMLGenerator::generateFullName(QXmlStreamWriter &writer,
- const Node *apparentNode, const Node *relative, CodeMarker *marker,
- const Node *actualNode)
-{
- if ( actualNode == 0 )
- actualNode = apparentNode;
- writer.writeStartElement("link");
- writer.writeAttribute("href", tre->fullDocumentLocation(actualNode));
- writer.writeAttribute("type", targetType(actualNode));
- writer.writeCharacters(fullName(apparentNode, relative, marker));
- writer.writeEndElement(); // link
-}
-
-// Classes copied (and slightly adapted) from the HtmlGenerator. These need
-// refactoring into a common ancestor class.
-
-void WebXMLGenerator::findAllClasses(const InnerNode *node)
-{
- NodeList::const_iterator c = node->childNodes().constBegin();
- while (c != node->childNodes().constEnd()) {
- if ((*c)->access() != Node::Private && (*c)->url().isEmpty()) {
- if ((*c)->type() == Node::Class && !(*c)->doc().isEmpty()) {
- QString className = (*c)->name();
- if ((*c)->parent() && (*c)->parent()->type() == Node::Namespace &&
- !(*c)->parent()->name().isEmpty())
- className = (*c)->parent()->name()+"::"+className;
-
- QString moduleName = (*c)->moduleName();
- if (!moduleName.isEmpty())
- moduleClassMap[moduleName].insert((*c)->name(), *c);
-
- QString serviceName =
- (static_cast<const ClassNode *>(*c))->serviceName();
- if (!serviceName.isEmpty())
- serviceClasses.insert(serviceName, *c);
- } else if ((*c)->isInnerNode()) {
- findAllClasses(static_cast<InnerNode *>(*c));
- }
- }
- ++c;
- }
-}
-
-void WebXMLGenerator::findAllNamespaces(const InnerNode *node)
-{
- NodeList::ConstIterator c = node->childNodes().begin();
- while (c != node->childNodes().end()) {
- if ((*c)->access() != Node::Private) {
- if ((*c)->isInnerNode() && (*c)->url().isEmpty()) {
- findAllNamespaces(static_cast<const InnerNode *>(*c));
- if ((*c)->type() == Node::Namespace) {
- const NamespaceNode *nspace = static_cast<const NamespaceNode *>(*c);
- // Ensure that the namespace's name is not empty (the root
- // namespace has no name).
- if (!nspace->name().isEmpty()) {
- namespaceIndex.insert(nspace->name(), *c);
- QString moduleName = (*c)->moduleName();
- if (!moduleName.isEmpty())
- moduleNamespaceMap[moduleName].insert((*c)->name(), *c);
- }
- }
- }
- }
- ++c;
- }
-}
-
-const QPair<QString,QString> WebXMLGenerator::anchorForNode(const Node *node)
-{
- QPair<QString,QString> anchorPair;
-
- anchorPair.first = PageGenerator::fileName(node);
- if (node->type() == Node::Fake) {
- const FakeNode *fakeNode = static_cast<const FakeNode*>(node);
- anchorPair.second = fakeNode->title();
- }
-
- return anchorPair;
-}
-
-QT_END_NAMESPACE
diff --git a/tools/qdoc3/webxmlgenerator.h b/tools/qdoc3/webxmlgenerator.h
deleted file mode 100644
index 071896a..0000000
--- a/tools/qdoc3/webxmlgenerator.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the tools applications 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 Technology Preview License Agreement accompanying
-** this package.
-**
-** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*
- WebXMLGenerator.h
-*/
-
-#ifndef WEBXMLGENERATOR_H
-#define WEBXMLGENERATOR_H
-
-#include <QtCore/qxmlstream.h>
-
-#include "codemarker.h"
-#include "config.h"
-#include "pagegenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-class QXmlStreamReader;
-class QXmlStreamWriter;
-
-class WebXMLGenerator : public PageGenerator
-{
-public:
- WebXMLGenerator();
- ~WebXMLGenerator();
-
- virtual void initializeGenerator(const Config &config);
- virtual void terminateGenerator();
- virtual QString format();
- virtual void generateTree(const Tree *tree, CodeMarker *marker);
-
-protected:
- virtual void startText( const Node *relative, CodeMarker *marker );
- virtual int generateAtom(QXmlStreamWriter &writer, const Atom *atom,
- const Node *relative, CodeMarker *marker );
- virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker);
- virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker);
- virtual QString fileExtension(const Node *node) const;
-
- virtual const Atom *addAtomElements(QXmlStreamWriter &writer, const Atom *atom,
- const Node *relative, CodeMarker *marker);
- virtual void generateIndexSections(QXmlStreamWriter &writer, const Node *node,
- CodeMarker *marker);
- virtual void generateInnerNode( const InnerNode *node, CodeMarker *marker );
-
-private:
- const QPair<QString,QString> anchorForNode(const Node *node);
- void findAllClasses(const InnerNode *node);
- void findAllNamespaces(const InnerNode *node);
- const Node *findNode(const Atom *atom, const Node *relative, CodeMarker *marker);
- const Node *findNode(const QString &title, const Node *relative, CodeMarker *marker);
- void generateAnnotatedList(QXmlStreamWriter &writer, const Node *relative,
- CodeMarker *marker, const QMap<QString,
- const Node *> &nodeMap);
- void generateFullName(QXmlStreamWriter &writer, const Node *apparentNode,
- const Node *relative, CodeMarker *marker,
- const Node *actualNode = 0);
- void generateRelations(QXmlStreamWriter &writer, const Node *node, CodeMarker *marker);
- void generateTableOfContents(QXmlStreamWriter &writer, const Node *node,
- Doc::SectioningUnit sectioningUnit,
- int numColumns, const Node *relative);
- void startLink(QXmlStreamWriter &writer, const Atom *atom, const Node *node,
- const Node *relative);
- QString targetType(const Node *node);
-
- const Tree *tre;
- bool generateIndex;
- bool inLink;
- bool inContents;
- bool inSectionHeading;
- bool inTableHeader;
- int numTableRows;
- bool threeColumnEnumValueTable;
- QMap<QString, QMap<QString, const Node *> > moduleClassMap;
- QMap<QString, QMap<QString, const Node *> > moduleNamespaceMap;
- QMap<QString, const Node *> namespaceIndex;
- QMap<QString, const Node *> serviceClasses;
- QString link;
- QString project;
- QString projectDescription;
- QString projectUrl;
- QString quoteCommand;
- QStringList sectionNumber;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/tools/qdoc3/bookgenerator.cpp b/tools/qmeegographicssystemhelper/qmeegofencesync.cpp
index bbcdd11..499e102 100644
--- a/tools/qdoc3/bookgenerator.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegofencesync.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,26 +39,41 @@
**
****************************************************************************/
-/*
- bookgenerator.cpp
-*/
+#include "qmeegofencesync.h"
+#include "qmeegofencesync_p.h"
+#include "qmeegoruntime.h"
-#include "bookgenerator.h"
+/* QMeeGoFenceSyncPrivate */
-QT_BEGIN_NAMESPACE
+QMeeGoFenceSyncPrivate::QMeeGoFenceSyncPrivate() : syncObject(NULL)
+{
+}
-BookGenerator::BookGenerator()
+QMeeGoFenceSyncPrivate::~QMeeGoFenceSyncPrivate()
{
+ if (syncObject) {
+ QMeeGoRuntime::destroyFenceSync(syncObject);
+ syncObject = NULL;
+ }
}
-BookGenerator::~BookGenerator()
+/* QMeeGoFenceSync */
+
+QMeeGoFenceSync::QMeeGoFenceSync(QWidget *parent) : QObject(parent), d_ptr(new QMeeGoFenceSyncPrivate())
{
+ Q_D(QMeeGoFenceSync);
+ d->q_ptr = this;
}
-void BookGenerator::generateTree( const Tree *tree, CodeMarker *marker )
+QMeeGoFenceSync::~QMeeGoFenceSync()
{
- Q_UNUSED( tree )
- Q_UNUSED( marker )
}
-QT_END_NAMESPACE
+void QMeeGoFenceSync::setSyncPoint()
+{
+ Q_D(QMeeGoFenceSync);
+ if (d->syncObject)
+ QMeeGoRuntime::destroyFenceSync(d->syncObject);
+
+ d->syncObject = QMeeGoRuntime::createFenceSync();
+}
diff --git a/tools/qmeegographicssystemhelper/qmeegofencesync.h b/tools/qmeegographicssystemhelper/qmeegofencesync.h
new file mode 100644
index 0000000..2d3f5c5
--- /dev/null
+++ b/tools/qmeegographicssystemhelper/qmeegofencesync.h
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the plugins 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 Technology Preview License Agreement accompanying
+** this package.
+**
+** 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.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEEGOFENCESYNC_H
+#define QMEEGOFENCESYNC_H
+
+#include <QWidget>
+
+class QMeeGoFenceSyncPrivate;
+
+//! A synchronization helper for GL pipeline.
+/*!
+ Fence syncs provide a mechanism for synchronizing access to certain GL primitives
+ and make it possible for the application developer to be sure that a certain point
+ in the GL processing pipeline has been already executed before continuing operation.
+
+ Currently fence syncs are only useful in conjunction with QMeeGoLivePixmaps.
+ \code
+ ...
+ // In your paint/expose event:
+ QImage *image = livePixmap->lock(&someGlobalFenceSync);
+ // Modify the image...
+ livePixmap->release(image);
+
+ painter->drawPixmap(0, 0, *livePixmap);
+ someGlobalFenceSync.setSyncPoint();
+ ...
+ \endcode
+
+ Assuming the paint/expose events come repeatedly, the lock operation
+ will block till the previous event completed painting the livePixmap.
+*/
+
+class Q_DECL_EXPORT QMeeGoFenceSync : public QObject
+{
+public:
+ //! Constructs a new fence sync.
+ /*!
+ The fence sync is created without a sync point. You need to set the sync point manually.
+ */
+ QMeeGoFenceSync(QWidget *parent = 0);
+
+ //! Destructor for the fence sync.
+ virtual ~QMeeGoFenceSync();
+
+ //! Sets the fence sync.
+ /*!
+ The fence sync synchronization point should be set after all drawing has been scheduled.
+ Setting a synchronization point always overrides the previous point -- whetver is was
+ used (waited upon) or not.
+ */
+ void setSyncPoint();
+
+private:
+ Q_DISABLE_COPY(QMeeGoFenceSync)
+ Q_DECLARE_PRIVATE(QMeeGoFenceSync)
+
+protected:
+ QScopedPointer<QMeeGoFenceSyncPrivate> d_ptr; //! Private bits.
+ friend class QMeeGoLivePixmap;
+};
+
+#endif
diff --git a/tools/qdoc3/sgmlgenerator.h b/tools/qmeegographicssystemhelper/qmeegofencesync_p.h
index ef1f07f..8a5d26e 100644
--- a/tools/qdoc3/sgmlgenerator.h
+++ b/tools/qmeegographicssystemhelper/qmeegofencesync_p.h
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,29 +39,22 @@
**
****************************************************************************/
-/*
- sgmlgenerator.h
-*/
+#include "qmeegofencesync.h"
-#ifndef SGMLGENERATOR_H
-#define SGMLGENERATOR_H
+#ifndef QMEEGOFENCESYNC_P_H
+#define QMEEGOFENCESYNC_P_H
-#include "bookgenerator.h"
-
-QT_BEGIN_NAMESPACE
-
-class SgmlGenerator : public BookGenerator
+class QMeeGoFenceSyncPrivate
{
public:
- SgmlGenerator();
- ~SgmlGenerator();
+ Q_DECLARE_PUBLIC(QMeeGoFenceSync);
+ QMeeGoFenceSyncPrivate();
- virtual QString format();
+ virtual ~QMeeGoFenceSyncPrivate();
-protected:
- // ###
-};
+ void* syncObject;
-QT_END_NAMESPACE
+ QMeeGoFenceSync *q_ptr;
+};
#endif
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
index d348e70..b660eb3 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp
@@ -46,6 +46,7 @@
#include <private/qgraphicssystem_runtime_p.h>
#include <private/qpixmap_raster_p.h>
#include "qmeegoruntime.h"
+#include "qmeegoswitchevent.h"
QString QMeeGoGraphicsSystemHelper::runningGraphicsSystemName()
{
@@ -81,8 +82,16 @@ void QMeeGoGraphicsSystemHelper::switchToMeeGo()
if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
qWarning("Can't switch to meego - switching only supported with 'runtime' graphics system.");
else {
+ QMeeGoSwitchEvent willSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::WillSwitch);
+ foreach (QWidget *widget, QApplication::topLevelWidgets())
+ QCoreApplication::sendEvent(widget, &willSwitchEvent);
+
QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
app->setGraphicsSystem(QLatin1String("meego"));
+
+ QMeeGoSwitchEvent didSwitchEvent(QLatin1String("meego"), QMeeGoSwitchEvent::DidSwitch);
+ foreach (QWidget *widget, QApplication::topLevelWidgets())
+ QCoreApplication::sendEvent(widget, &didSwitchEvent);
}
}
@@ -94,8 +103,16 @@ void QMeeGoGraphicsSystemHelper::switchToRaster()
if (QApplicationPrivate::instance()->graphics_system_name != QLatin1String("runtime"))
qWarning("Can't switch to raster - switching only supported with 'runtime' graphics system.");
else {
+ QMeeGoSwitchEvent willSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::WillSwitch);
+ foreach (QWidget *widget, QApplication::topLevelWidgets())
+ QCoreApplication::sendEvent(widget, &willSwitchEvent);
+
QApplication *app = static_cast<QApplication *>(QCoreApplication::instance());
app->setGraphicsSystem(QLatin1String("raster"));
+
+ QMeeGoSwitchEvent didSwitchEvent(QLatin1String("raster"), QMeeGoSwitchEvent::DidSwitch);
+ foreach (QWidget *widget, QApplication::topLevelWidgets())
+ QCoreApplication::sendEvent(widget, &didSwitchEvent);
}
}
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
index 2bb75eb..d47c829 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h
@@ -102,6 +102,9 @@ public:
When running with the 'runtime' graphics system, sets the currently active
system to 'meego'. The window surface and all the resources are automatically
migrated to OpenGL. Will fail if the active graphics system is not 'runtime'.
+ Calling this function will emit QMeeGoSwitchEvent to the top level widgets.
+ Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch)
+ and one after the switch (QMeeGoSwitchEvent::DidSwitch).
*/
static void switchToMeeGo();
@@ -111,6 +114,9 @@ public:
system to 'raster'. The window surface and the graphics resources (including the
EGL shared image resources) are automatically migrated back to the CPU. All OpenGL
resources (surface, context, cache, font cache) are automaticall anihilated.
+ Calling this function will emit QMeeGoSwitchEvent to the top level widgets.
+ Two events will be emitted for each switch -- one before the switch (QMeeGoSwitchEvent::WillSwitch)
+ and one after the switch (QMeeGoSwitchEvent::DidSwitch).
*/
static void switchToRaster();
@@ -147,7 +153,7 @@ public:
//! Destroys an EGL shared image.
/*!
Destroys an EGLSharedImage previously created with an ::imageToEGLSharedImage call.
- Returns true if the image was found and the destruction was successfull. Notice that
+ Returns true if the image was found and the destruction was successful. Notice that
this destroys the image for all processes using it.
*/
static bool destroyEGLSharedImage(Qt::HANDLE handle);
diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro
index 4d69fac..360847e 100644
--- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro
+++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro
@@ -6,5 +6,5 @@ include(../../src/qbase.pri)
QT += gui
INCLUDEPATH += '../../src/plugins/graphicssystems/meego'
-HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h
-SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp
+HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegoswitchevent.h
+SOURCES = qmeegographicssystemhelper.cpp qmeegooverlaywidget.cpp qmeegoruntime.cpp qmeegolivepixmap.cpp qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegofencesync.cpp qmeegoswitchevent.cpp qmeegoswitchevent.h
diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
index b9dbb2b..9700581f 100644
--- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.cpp
@@ -40,15 +40,13 @@
****************************************************************************/
#include "qmeegolivepixmap.h"
-#include <private/qimage_p.h>
-#include <private/qpixmap_raster_p.h>
#include "qmeegolivepixmap_p.h"
+#include "qmeegofencesync_p.h"
#include "qmeegoruntime.h"
-#include <QSharedMemory>
/* QMeeGoLivePixmapPrivate */
-QMeeGoLivePixmapPrivate::QMeeGoLivePixmapPrivate(Qt::HANDLE h) : handle(h)
+QMeeGoLivePixmapPrivate::QMeeGoLivePixmapPrivate()
{
}
@@ -60,7 +58,7 @@ QMeeGoLivePixmapPrivate::~QMeeGoLivePixmapPrivate()
QMeeGoLivePixmap* QMeeGoLivePixmap::livePixmapWithSize(int w, int h, Format format)
{
- QImage::Format qtFormat;
+ QImage::Format qtFormat;
if (format == Format_RGB16)
qtFormat = QImage::Format_RGB16;
else if (format == Format_ARGB32_Premultiplied)
@@ -69,17 +67,17 @@ QMeeGoLivePixmap* QMeeGoLivePixmap::livePixmapWithSize(int w, int h, Format form
qWarning("Unsupported live pixmap format!");
return 0;
}
-
- Qt::HANDLE liveTextureHandle = QMeeGoRuntime::createLiveTexture(w, h, qtFormat);
- if (! liveTextureHandle) {
+
+ QPixmapData *pmd = QMeeGoRuntime::pixmapDataWithNewLiveTexture(w, h, qtFormat);
+ if (! pmd) {
qWarning("Failed to create a live texture with given size!");
return NULL;
}
- return QMeeGoLivePixmap::fromHandle(liveTextureHandle);
+ return new QMeeGoLivePixmap(pmd);
}
-QMeeGoLivePixmap::QMeeGoLivePixmap(QPixmapData *p, Qt::HANDLE h) : QPixmap(p), d_ptr(new QMeeGoLivePixmapPrivate(h))
+QMeeGoLivePixmap::QMeeGoLivePixmap(QPixmapData *p) : QPixmap(p), d_ptr(new QMeeGoLivePixmapPrivate())
{
Q_D(QMeeGoLivePixmap);
d->q_ptr = this;
@@ -87,57 +85,33 @@ QMeeGoLivePixmap::QMeeGoLivePixmap(QPixmapData *p, Qt::HANDLE h) : QPixmap(p), d
QMeeGoLivePixmap* QMeeGoLivePixmap::fromHandle(Qt::HANDLE liveTextureHandle)
{
- Qt::HANDLE eglImage = QMeeGoRuntime::liveTextureToEGLImage(liveTextureHandle);
- if (! eglImage) {
- qWarning("Failed to bind the live texture as an egl image!");
- return NULL;
- }
-
- QPixmapData *pmd = QMeeGoRuntime::pixmapDataFromEGLImage(eglImage);
+ QPixmapData *pmd = QMeeGoRuntime::pixmapDataFromLiveTextureHandle(liveTextureHandle);
if (! pmd) {
- qWarning("Failed to allocate a pixmap data from a given live texture egl image!");
+ qWarning("Failed to create a live texture from given handle!");
return NULL;
}
-
- return new QMeeGoLivePixmap(pmd, liveTextureHandle);
+
+ return new QMeeGoLivePixmap(pmd);
}
Qt::HANDLE QMeeGoLivePixmap::handle()
{
- Q_D(QMeeGoLivePixmap);
- return d->handle;
+ return QMeeGoRuntime::getLiveTextureHandle(this);
}
QMeeGoLivePixmap::~QMeeGoLivePixmap()
{
}
-QImage* QMeeGoLivePixmap::lock()
+QImage* QMeeGoLivePixmap::lock(QMeeGoFenceSync *fenceSync)
{
- Q_D(QMeeGoLivePixmap);
-
- void *data = NULL;
- int pitch = 0;
-
- if (! QMeeGoRuntime::lockLiveTexture(d->handle)) {
- qWarning("Failed to lock a live texture!");
- return new QImage();
- }
-
- QMeeGoRuntime::queryLiveTexture(d->handle, &data, &pitch);
- if (data == NULL || pitch == 0) {
- qWarning("Failed to query the live texture!");
- return new QImage();
- }
-
- // FIXME Bug here! FIX FIX FIX FIX FIX FIX
- return new QImage((uchar *) data, width(), height(), QImage::Format_RGB16);
+ if (fenceSync)
+ return QMeeGoRuntime::lockLiveTexture(this, fenceSync->d_func()->syncObject);
+ else
+ return QMeeGoRuntime::lockLiveTexture(this, NULL);
}
-
+
void QMeeGoLivePixmap::release(QImage *img)
{
- Q_D(QMeeGoLivePixmap);
- // FIXME Make sure we're locked!
- QMeeGoRuntime::unlockLiveTexture(d->handle);
- delete img;
+ QMeeGoRuntime::releaseLiveTexture(this, img);
}
diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap.h b/tools/qmeegographicssystemhelper/qmeegolivepixmap.h
index 12fe994..51b5976 100644
--- a/tools/qmeegographicssystemhelper/qmeegolivepixmap.h
+++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap.h
@@ -43,6 +43,7 @@
#define QMEEGOLIVEPIXMAP_H
#include <QPixmap>
+#include "qmeegofencesync.h"
class QMeeGoLivePixmapPrivate;
class QSharedMemory;
@@ -52,7 +53,7 @@ class QImage;
/*!
*/
-class QMeeGoLivePixmap : public QPixmap
+class Q_DECL_EXPORT QMeeGoLivePixmap : public QPixmap
{
public:
enum Format {
@@ -82,8 +83,12 @@ public:
//! Locks the access to the pixmap.
/*!
The returned image can be used for direct access.
+ You can optionally specify a fence sync to wait upon before unlocking. When
+ you specify a fence sync, you can be sure that this function will return only
+ when the previsouly set QMeeGoFenceSync synchronization point has been executed/passed
+ by the GL processing pipeline.
*/
- QImage* lock();
+ QImage* lock(QMeeGoFenceSync *fenceSync = NULL);
//! Unlocks the access to the pixmap.
/*!
@@ -96,7 +101,7 @@ public:
virtual ~QMeeGoLivePixmap();
private:
- QMeeGoLivePixmap(QPixmapData *p, Qt::HANDLE h);
+ QMeeGoLivePixmap(QPixmapData *p);
Q_DISABLE_COPY(QMeeGoLivePixmap)
Q_DECLARE_PRIVATE(QMeeGoLivePixmap)
diff --git a/tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h b/tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h
index 22347d6..78d9553 100644
--- a/tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h
+++ b/tools/qmeegographicssystemhelper/qmeegolivepixmap_p.h
@@ -48,11 +48,9 @@ class QMeeGoLivePixmapPrivate
{
public:
Q_DECLARE_PUBLIC(QMeeGoLivePixmap);
- QMeeGoLivePixmapPrivate(Qt::HANDLE handle);
+ QMeeGoLivePixmapPrivate();
virtual ~QMeeGoLivePixmapPrivate();
-
- Qt::HANDLE handle;
-
+
QMeeGoLivePixmap *q_ptr;
};
diff --git a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp
index f9f14ae..b42a7ea 100644
--- a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.cpp
@@ -42,7 +42,8 @@
#include <QDebug>
#include <QEvent>
#include <QMouseEvent>
-#include <QCoreApplication>
+#include <QApplication>
+#include <QDesktopWidget>
#include "qmeegooverlaywidget.h"
#include "qmeegographicssystemhelper.h"
#include "qmeegoruntime.h"
@@ -54,10 +55,12 @@ QMeeGoOverlayWidget::QMeeGoOverlayWidget(int surfaceWidth, int surfaceHeight, QW
if (! QMeeGoGraphicsSystemHelper::isRunningMeeGo())
qFatal("QMeeGoOverlayWidget can only be used when running with 'meego' graphics system!");
+ const QRect desktop = QApplication::desktop()->screenGeometry(parent);
+
QMeeGoRuntime::setSurfaceFixedSize(surfaceWidth, surfaceHeight);
- scaleW = sw / 864.0;
- scaleH = sh / 480.0;
+ scaleW = sw / desktop.width();
+ scaleH = sh / desktop.height();
installEventFilter(this);
}
diff --git a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.h b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.h
index c2c08b4..e67f59b 100644
--- a/tools/qmeegographicssystemhelper/qmeegooverlaywidget.h
+++ b/tools/qmeegographicssystemhelper/qmeegooverlaywidget.h
@@ -48,7 +48,7 @@
/*!
*/
-class QMeeGoOverlayWidget : public QWidget
+class Q_DECL_EXPORT QMeeGoOverlayWidget : public QWidget
{
public:
//! Constructs a new scaling widget.
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
index 44f9f58..2d3ee3c 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.cpp
@@ -44,6 +44,7 @@
#include <private/qlibrary_p.h>
#include <private/qfactoryloader_p.h>
#include <private/qgraphicssystemplugin_p.h>
+#include <stdio.h>
#define ENSURE_INITIALIZED {if (!initialized) initialize();}
@@ -51,36 +52,35 @@ bool QMeeGoRuntime::initialized = false;
typedef int (*QMeeGoImageToEglSharedImageFunc) (const QImage&);
typedef QPixmapData* (*QMeeGoPixmapDataFromEglSharedImageFunc) (Qt::HANDLE handle, const QImage&);
-typedef QPixmapData* (*QMeeGoPixmapDataFromEglImageFunc) (Qt::HANDLE handle);
typedef QPixmapData* (*QMeeGoPixmapDataWithGLTextureFunc) (int w, int h);
typedef bool (*QMeeGoDestroyEGLSharedImageFunc) (Qt::HANDLE handle);
typedef void (*QMeeGoUpdateEglSharedImagePixmapFunc) (QPixmap*);
typedef void (*QMeeGoSetSurfaceFixedSizeFunc) (int w, int h);
typedef void (*QMeeGoSetSurfaceScalingFunc) (int x, int y, int w, int h);
typedef void (*QMeeGoSetTranslucentFunc) (bool translucent);
-typedef Qt::HANDLE (*QMeeGoLiveTextureCreateFunc) (int w, int h, QImage::Format format);
-typedef bool (*QMeeGoLiveTextureLockFunc) (Qt::HANDLE h);
-typedef bool (*QMeeGoLiveTextureUnlockFunc) (Qt::HANDLE h);
-typedef void (*QMeeGoLiveTextureDestroyFunc) (Qt::HANDLE h);
-typedef void (*QMeeGoLiveTextureQueryFunc) (Qt::HANDLE h, void **data, int *pitch);
-typedef Qt::HANDLE (*QMeeGoLiveTextureToEglImageFunc) (Qt::HANDLE h);
+typedef QPixmapData* (*QMeeGoPixmapDataWithNewLiveTextureFunc) (int w, int h, QImage::Format format);
+typedef QPixmapData* (*QMeeGoPixmapDataFromLiveTextureHandleFunc) (Qt::HANDLE h);
+typedef QImage* (*QMeeGoLiveTextureLockFunc) (QPixmap*, void* fenceSync);
+typedef bool (*QMeeGoLiveTextureReleaseFunc) (QPixmap*, QImage *i);
+typedef Qt::HANDLE (*QMeeGoLiveTextureGetHandleFunc) (QPixmap*);
+typedef void* (*QMeeGoCreateFenceSyncFunc) (void);
+typedef void (*QMeeGoDestroyFenceSyncFunc) (void *fs);
static QMeeGoImageToEglSharedImageFunc qt_meego_image_to_egl_shared_image = NULL;
static QMeeGoPixmapDataFromEglSharedImageFunc qt_meego_pixmapdata_from_egl_shared_image = NULL;
-static QMeeGoPixmapDataFromEglImageFunc qt_meego_pixmapdata_from_egl_image = NULL;
static QMeeGoPixmapDataWithGLTextureFunc qt_meego_pixmapdata_with_gl_texture = NULL;
static QMeeGoDestroyEGLSharedImageFunc qt_meego_destroy_egl_shared_image = NULL;
static QMeeGoUpdateEglSharedImagePixmapFunc qt_meego_update_egl_shared_image_pixmap = NULL;
static QMeeGoSetSurfaceFixedSizeFunc qt_meego_set_surface_fixed_size = NULL;
static QMeeGoSetSurfaceScalingFunc qt_meego_set_surface_scaling = NULL;
static QMeeGoSetTranslucentFunc qt_meego_set_translucent = NULL;
-static QMeeGoLiveTextureCreateFunc qt_meego_live_texture_create = NULL;
+static QMeeGoPixmapDataWithNewLiveTextureFunc qt_meego_pixmapdata_with_new_live_texture = NULL;
+static QMeeGoPixmapDataFromLiveTextureHandleFunc qt_meego_pixmapdata_from_live_texture_handle = NULL;
static QMeeGoLiveTextureLockFunc qt_meego_live_texture_lock = NULL;
-static QMeeGoLiveTextureUnlockFunc qt_meego_live_texture_unlock = NULL;
-static QMeeGoLiveTextureDestroyFunc qt_meego_live_texture_destroy = NULL;
-static QMeeGoLiveTextureQueryFunc qt_meego_live_texture_query = NULL;
-static QMeeGoLiveTextureToEglImageFunc qt_meego_live_texture_to_egl_image = NULL;
-
+static QMeeGoLiveTextureReleaseFunc qt_meego_live_texture_release = NULL;
+static QMeeGoLiveTextureGetHandleFunc qt_meego_live_texture_get_handle = NULL;
+static QMeeGoCreateFenceSyncFunc qt_meego_create_fence_sync = NULL;
+static QMeeGoDestroyFenceSyncFunc qt_meego_destroy_fence_sync = NULL;
void QMeeGoRuntime::initialize()
{
@@ -96,27 +96,30 @@ void QMeeGoRuntime::initialize()
if (success) {
qt_meego_image_to_egl_shared_image = (QMeeGoImageToEglSharedImageFunc) library.resolve("qt_meego_image_to_egl_shared_image");
qt_meego_pixmapdata_from_egl_shared_image = (QMeeGoPixmapDataFromEglSharedImageFunc) library.resolve("qt_meego_pixmapdata_from_egl_shared_image");
- qt_meego_pixmapdata_from_egl_image = (QMeeGoPixmapDataFromEglImageFunc) library.resolve("qt_meego_pixmapdata_from_egl_image");
qt_meego_pixmapdata_with_gl_texture = (QMeeGoPixmapDataWithGLTextureFunc) library.resolve("qt_meego_pixmapdata_with_gl_texture");
qt_meego_destroy_egl_shared_image = (QMeeGoDestroyEGLSharedImageFunc) library.resolve("qt_meego_destroy_egl_shared_image");
qt_meego_update_egl_shared_image_pixmap = (QMeeGoUpdateEglSharedImagePixmapFunc) library.resolve("qt_meego_update_egl_shared_image_pixmap");
qt_meego_set_surface_fixed_size = (QMeeGoSetSurfaceFixedSizeFunc) library.resolve("qt_meego_set_surface_fixed_size");
qt_meego_set_surface_scaling = (QMeeGoSetSurfaceScalingFunc) library.resolve("qt_meego_set_surface_scaling");
qt_meego_set_translucent = (QMeeGoSetTranslucentFunc) library.resolve("qt_meego_set_translucent");
- qt_meego_live_texture_create = (QMeeGoLiveTextureCreateFunc) library.resolve("qt_meego_live_texture_create");
+ qt_meego_pixmapdata_with_new_live_texture = (QMeeGoPixmapDataWithNewLiveTextureFunc) library.resolve("qt_meego_pixmapdata_with_new_live_texture");
+ qt_meego_pixmapdata_from_live_texture_handle = (QMeeGoPixmapDataFromLiveTextureHandleFunc) library.resolve("qt_meego_pixmapdata_from_live_texture_handle");
qt_meego_live_texture_lock = (QMeeGoLiveTextureLockFunc) library.resolve("qt_meego_live_texture_lock");
- qt_meego_live_texture_unlock = (QMeeGoLiveTextureUnlockFunc) library.resolve("qt_meego_live_texture_unlock");
- qt_meego_live_texture_destroy = (QMeeGoLiveTextureDestroyFunc) library.resolve("qt_meego_live_texture_destroy");
- qt_meego_live_texture_query = (QMeeGoLiveTextureQueryFunc) library.resolve("qt_meego_live_texture_query");
- qt_meego_live_texture_to_egl_image = (QMeeGoLiveTextureToEglImageFunc) library.resolve("qt_meego_live_texture_to_egl_image");
+ qt_meego_live_texture_release = (QMeeGoLiveTextureReleaseFunc) library.resolve("qt_meego_live_texture_release");
+ qt_meego_live_texture_get_handle = (QMeeGoLiveTextureGetHandleFunc) library.resolve("qt_meego_live_texture_get_handle");
+ qt_meego_create_fence_sync = (QMeeGoCreateFenceSyncFunc) library.resolve("qt_meego_create_fence_sync");
+ qt_meego_destroy_fence_sync = (QMeeGoDestroyFenceSyncFunc) library.resolve("qt_meego_destroy_fence_sync");
- if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image && qt_meego_pixmapdata_from_egl_image &&
+ if (qt_meego_image_to_egl_shared_image && qt_meego_pixmapdata_from_egl_shared_image &&
qt_meego_pixmapdata_with_gl_texture && qt_meego_destroy_egl_shared_image && qt_meego_update_egl_shared_image_pixmap &&
qt_meego_set_surface_fixed_size && qt_meego_set_surface_scaling && qt_meego_set_translucent &&
- qt_meego_live_texture_create && qt_meego_live_texture_lock && qt_meego_live_texture_unlock &&
- qt_meego_live_texture_destroy && qt_meego_live_texture_query && qt_meego_live_texture_to_egl_image)
+ qt_meego_pixmapdata_with_new_live_texture && qt_meego_pixmapdata_from_live_texture_handle &&
+ qt_meego_live_texture_lock && qt_meego_live_texture_release && qt_meego_live_texture_get_handle &&
+ qt_meego_create_fence_sync && qt_meego_destroy_fence_sync)
{
qDebug("Successfully resolved MeeGo graphics system: %s %s\n", qPrintable(libraryPrivate->fileName), qPrintable(libraryPrivate->fullVersion));
+ } else {
+ Q_ASSERT(false);
}
} else {
Q_ASSERT(false);
@@ -139,13 +142,6 @@ QPixmapData* QMeeGoRuntime::pixmapDataFromEGLSharedImage(Qt::HANDLE handle, cons
return qt_meego_pixmapdata_from_egl_shared_image(handle, softImage);
}
-QPixmapData* QMeeGoRuntime::pixmapDataFromEGLImage(Qt::HANDLE handle)
-{
- ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_pixmapdata_from_egl_image);
- return qt_meego_pixmapdata_from_egl_image(handle);
-}
-
QPixmapData* QMeeGoRuntime::pixmapDataWithGLTexture(int w, int h)
{
ENSURE_INITIALIZED;
@@ -188,45 +184,51 @@ void QMeeGoRuntime::setTranslucent(bool translucent)
qt_meego_set_translucent(translucent);
}
-Qt::HANDLE QMeeGoRuntime::createLiveTexture(int w, int h, QImage::Format format)
+QPixmapData* QMeeGoRuntime::pixmapDataWithNewLiveTexture(int w, int h, QImage::Format format)
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_create);
- return qt_meego_live_texture_create(w, h, format);
+ Q_ASSERT(qt_meego_pixmapdata_with_new_live_texture);
+ return qt_meego_pixmapdata_with_new_live_texture(w, h, format);
}
-bool QMeeGoRuntime::lockLiveTexture(Qt::HANDLE h)
+QPixmapData* QMeeGoRuntime::pixmapDataFromLiveTextureHandle(Qt::HANDLE h)
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_lock);
- return qt_meego_live_texture_lock(h);
+ Q_ASSERT(qt_meego_pixmapdata_from_live_texture_handle);
+ return qt_meego_pixmapdata_from_live_texture_handle(h);
}
-bool QMeeGoRuntime::unlockLiveTexture(Qt::HANDLE h)
+QImage* QMeeGoRuntime::lockLiveTexture(QPixmap *p, void* fenceSync)
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_unlock);
- return qt_meego_live_texture_unlock(h);
+ Q_ASSERT(qt_meego_live_texture_lock);
+ return qt_meego_live_texture_lock(p, fenceSync);
}
-void QMeeGoRuntime::destroyLiveTexture(Qt::HANDLE h)
+bool QMeeGoRuntime::releaseLiveTexture(QPixmap *p, QImage *i)
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_destroy);
- qt_meego_live_texture_destroy(h);
+ Q_ASSERT(qt_meego_live_texture_release);
+ return qt_meego_live_texture_release(p, i);
}
-void QMeeGoRuntime::queryLiveTexture(Qt::HANDLE h, void **data, int *pitch)
+Qt::HANDLE QMeeGoRuntime::getLiveTextureHandle(QPixmap *pixmap)
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_query);
- qt_meego_live_texture_query(h, data, pitch);
+ Q_ASSERT(qt_meego_live_texture_get_handle);
+ return qt_meego_live_texture_get_handle(pixmap);
}
-Qt::HANDLE QMeeGoRuntime::liveTextureToEGLImage(Qt::HANDLE handle)
+void* QMeeGoRuntime::createFenceSync()
{
ENSURE_INITIALIZED;
- Q_ASSERT(qt_meego_live_texture_to_egl_image);
- return qt_meego_live_texture_to_egl_image(handle);
+ Q_ASSERT(qt_meego_create_fence_sync);
+ return qt_meego_create_fence_sync();
}
+void QMeeGoRuntime::destroyFenceSync(void *fs)
+{
+ ENSURE_INITIALIZED;
+ Q_ASSERT(qt_meego_destroy_fence_sync);
+ qt_meego_destroy_fence_sync(fs);
+}
diff --git a/tools/qmeegographicssystemhelper/qmeegoruntime.h b/tools/qmeegographicssystemhelper/qmeegoruntime.h
index 048b9be..be6ff6b 100644
--- a/tools/qmeegographicssystemhelper/qmeegoruntime.h
+++ b/tools/qmeegographicssystemhelper/qmeegoruntime.h
@@ -49,19 +49,19 @@ public:
static Qt::HANDLE imageToEGLSharedImage(const QImage &image);
static QPixmapData* pixmapDataFromEGLSharedImage(Qt::HANDLE handle, const QImage &softImage);
- static QPixmapData* pixmapDataFromEGLImage(Qt::HANDLE handle);
static QPixmapData* pixmapDataWithGLTexture(int w, int h);
static bool destroyEGLSharedImage(Qt::HANDLE handle);
static void updateEGLSharedImagePixmap(QPixmap *p);
static void setSurfaceFixedSize(int w, int h);
static void setSurfaceScaling(int x, int y, int w, int h);
static void setTranslucent(bool translucent);
- static Qt::HANDLE createLiveTexture(int w, int h, QImage::Format format);
- static bool lockLiveTexture(Qt::HANDLE h);
- static bool unlockLiveTexture(Qt::HANDLE h);
- static void destroyLiveTexture(Qt::HANDLE h);
- static void queryLiveTexture(Qt::HANDLE h, void **data, int *pitch);
- static Qt::HANDLE liveTextureToEGLImage(Qt::HANDLE);
+ static QPixmapData* pixmapDataWithNewLiveTexture(int w, int h, QImage::Format format);
+ static QPixmapData* pixmapDataFromLiveTextureHandle(Qt::HANDLE h);
+ static QImage* lockLiveTexture(QPixmap *pixmap, void *fenceSync);
+ static bool releaseLiveTexture(QPixmap *pixmap, QImage *image);
+ static Qt::HANDLE getLiveTextureHandle(QPixmap *pixmap);
+ static void* createFenceSync();
+ static void destroyFenceSync(void *fs);
private:
static bool initialized;
diff --git a/tools/qdoc3/ccodeparser.cpp b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp
index 48aa539..22ea0fe 100644
--- a/tools/qdoc3/ccodeparser.cpp
+++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.cpp
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,35 +39,30 @@
**
****************************************************************************/
-/*
- ccodeparser.cpp
-*/
+#include "qmeegoswitchevent.h"
-#include "ccodeparser.h"
+static int switchEventNumber = -1;
-QT_BEGIN_NAMESPACE
-
-CCodeParser::CCodeParser()
+QMeeGoSwitchEvent::QMeeGoSwitchEvent(const QString &graphicsSystemName, QMeeGoSwitchEvent::State s) : QEvent(QMeeGoSwitchEvent::eventNumber())
{
+ name = graphicsSystemName;
+ switchState = s;
}
-CCodeParser::~CCodeParser()
+QString QMeeGoSwitchEvent::graphicsSystemName() const
{
+ return name;
}
-QString CCodeParser::language()
+QMeeGoSwitchEvent::State QMeeGoSwitchEvent::state() const
{
- return QLatin1String("C");
+ return switchState;
}
-QString CCodeParser::headerFileNameFilter()
+QEvent::Type QMeeGoSwitchEvent::eventNumber()
{
- return QLatin1String("*.ch *.h");
-}
-
-QString CCodeParser::sourceFileNameFilter()
-{
- return QLatin1String("*.c");
-}
+ if (switchEventNumber < 0)
+ switchEventNumber = QEvent::registerEventType();
-QT_END_NAMESPACE
+ return (QEvent::Type) switchEventNumber;
+} \ No newline at end of file
diff --git a/tools/qdoc3/linguistgenerator.h b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h
index 979db02..0ddbd3d 100644
--- a/tools/qdoc3/linguistgenerator.h
+++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the tools applications of the Qt Toolkit.
+** This file is part of the plugins of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** No Commercial Usage
@@ -39,47 +39,53 @@
**
****************************************************************************/
-/*
- LinguistGenerator.h
-*/
-
-#ifndef LINGUISTGENERATOR_H
-#define LINGUISTGENERATOR_H
+#include <QEvent>
+#include <QString>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qdom.h>
+//! A custom event representing a graphics system switch.
+/*!
+ This event is sent two times -- before the actual switch and after the switch.
+ The current mode of the event can be detected by looking at the State of the
+ event.
-#include "codemarker.h"
-#include "config.h"
-#include "pagegenerator.h"
-
-QT_BEGIN_NAMESPACE
+ The end-user application can use the event to drop it's own allocated GL resources
+ when going to software mode.
+*/
-class LinguistGenerator : public PageGenerator
+class QMeeGoSwitchEvent : public QEvent
{
public:
- LinguistGenerator();
- ~LinguistGenerator();
- virtual void initializeGenerator( const Config& config );
- virtual void terminateGenerator();
- virtual QString format();
+ //! The state represented by this event.
+ enum State {
+ WillSwitch,
+ DidSwitch
+ };
-protected:
- virtual void generateClassLikeNode(const InnerNode *inner,
- CodeMarker *marker);
- virtual void generateFakeNode( const FakeNode *fake, CodeMarker *marker );
- virtual QString fileExtension(const Node *node) const;
+ //! Constructor for the event.
+ /*!
+ Creates a new event with the given name and the given state.
+ */
+ QMeeGoSwitchEvent(const QString &graphicsSystemName, State s);
- QList<QDomElement> generateIndexSections(QDomDocument &document,
- const Node *node, CodeMarker *marker);
- virtual QString fullName(const Node *node) const;
+ //! Returns the name of the target graphics system.
+ /*!
+ Depending on the state, the name represents the system we're about to swtich to,
+ or the system we just switched to.
+ */
+ QString graphicsSystemName() const;
-private:
- QString simplified(const QString &text) const;
-};
+ //! Returns the state represented by this event.
+ State state() const;
-QT_END_NAMESPACE
+ //! Returns the event type/number for QMeeGoSwitchEvent.
+ /*!
+ The type is registered on first access. Use this to detect incoming
+ QMeeGoSwitchEvents.
+ */
+ QEvent::Type eventNumber();
-#endif
+private:
+ QString name;
+ State switchState;
+};
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 00d43c1..209c72f 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -155,7 +155,11 @@ void usage()
qWarning(" -I <directory> ........................... prepend to the module import search path,");
qWarning(" display path if <directory> is empty");
qWarning(" -P <directory> ........................... prepend to the plugin search path");
+#if defined(Q_WS_MAC)
+ qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport");
+#else
qWarning(" -opengl .................................. use a QGLWidget for the viewport");
+#endif
qWarning(" -script <path> ........................... set the script to use");
qWarning(" -scriptopts <options>|help ............... set the script options to use");
@@ -172,6 +176,7 @@ void scriptOptsUsage()
qWarning(" play ..................................... playback an existing script");
qWarning(" testimages ............................... record images or compare images on playback");
qWarning(" testerror ................................ test 'error' property of root item on playback");
+ qWarning(" testskip ................................ test 'skip' property of root item on playback");
qWarning(" snapshot ................................. file being recorded is static,");
qWarning(" only one frame will be recorded or tested");
qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion");
@@ -305,6 +310,8 @@ static void parseScriptOptions()
scriptOptions |= QDeclarativeViewer::TestImages;
} else if (option == QLatin1String("testerror")) {
scriptOptions |= QDeclarativeViewer::TestErrorProperty;
+ } else if (option == QLatin1String("testskip")) {
+ scriptOptions |= QDeclarativeViewer::TestSkipProperty;
} else if (option == QLatin1String("exitoncomplete")) {
scriptOptions |= QDeclarativeViewer::ExitOnComplete;
} else if (option == QLatin1String("exitonfailure")) {
@@ -367,8 +374,13 @@ static void parseCommandLineOptions(const QStringList &arguments)
} else if (arg == "-translation") {
if (lastArg) usage();
opts.translationFile = arguments.at(++i);
+#if defined(Q_WS_MAC)
+ } else if (arg == "-no-opengl") {
+ opts.useGL = false;
+#else
} else if (arg == "-opengl") {
opts.useGL = true;
+#endif
} else if (arg == "-qmlbrowser") {
opts.useNativeFileBrowser = false;
} else if (arg == "-warnings") {
diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp
index 9864df6..e3a1f59 100644
--- a/tools/qml/qdeclarativetester.cpp
+++ b/tools/qml/qdeclarativetester.cpp
@@ -52,6 +52,7 @@
QT_BEGIN_NAMESPACE
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts,
QDeclarativeView *parent)
@@ -61,6 +62,12 @@ QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer
parent->viewport()->installEventFilter(this);
parent->installEventFilter(this);
QUnifiedTimer::instance()->setConsistentTiming(true);
+
+ //Font antialiasing makes tests system-specific, so disable it
+ QFont noAA = QApplication::font();
+ noAA.setStyleStrategy(QFont::NoAntialias);
+ QApplication::setFont(noAA);
+
if (options & QDeclarativeViewer::Play)
this->run();
start();
@@ -136,8 +143,25 @@ void QDeclarativeTester::imagefailure()
{
hasFailed = true;
- if (options & QDeclarativeViewer::ExitOnFailure)
- exit(-1);
+ if (options & QDeclarativeViewer::ExitOnFailure){
+ testSkip();
+ exit(hasFailed?-1:0);
+ }
+}
+
+void QDeclarativeTester::testSkip()
+{
+ if (options & QDeclarativeViewer::TestSkipProperty){
+ QString e = m_view->rootObject()->property("skip").toString();
+ if (!e.isEmpty()) {
+ if(hasFailed){
+ qWarning() << "Test failed, but skipping it: " << e;
+ }else{
+ qWarning() << "Test skipped: " << e;
+ }
+ hasFailed = 0;
+ }
+ }
}
void QDeclarativeTester::complete()
@@ -149,7 +173,10 @@ void QDeclarativeTester::complete()
hasFailed = true;
}
}
- if (options & QDeclarativeViewer::ExitOnComplete)
+
+
+ testSkip();
+ if (options & QDeclarativeViewer::ExitOnComplete)
QApplication::exit(hasFailed?-1:0);
if (hasCompleted)
@@ -247,7 +274,16 @@ void QDeclarativeTester::updateCurrentTime(int msec)
if (options & QDeclarativeViewer::TestImages) {
img.fill(qRgb(255,255,255));
+
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
+
m_view->render(&p);
}
@@ -258,7 +294,7 @@ void QDeclarativeTester::updateCurrentTime(int msec)
fe.msec = msec;
if (msec == 0 || !(options & QDeclarativeViewer::TestImages)) {
// Skip first frame, skip if not doing images
- } else if (0 == (m_savedFrameEvents.count() % 60) || snapshot) {
+ } else if (0 == ((m_savedFrameEvents.count()-1) % 60) || snapshot) {
fe.image = img;
} else {
QCryptographicHash hash(QCryptographicHash::Md5);
@@ -309,14 +345,14 @@ void QDeclarativeTester::updateCurrentTime(int msec)
if (QDeclarativeVisualTestFrame *frame = qobject_cast<QDeclarativeVisualTestFrame *>(event)) {
if (frame->msec() < msec) {
if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
- qWarning() << "QDeclarativeTester: Extra frame. Seen:"
+ qWarning() << "QDeclarativeTester(" << m_script << "): Extra frame. Seen:"
<< msec << "Expected:" << frame->msec();
imagefailure();
}
} else if (frame->msec() == msec) {
if (!frame->hash().isEmpty() && frame->hash().toUtf8() != fe.hash.toHex()) {
if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record)) {
- qWarning() << "QDeclarativeTester: Mismatched frame hash at" << msec
+ qWarning() << "QDeclarativeTester(" << m_script << "): Mismatched frame hash at" << msec
<< ". Seen:" << fe.hash.toHex()
<< "Expected:" << frame->hash().toUtf8();
imagefailure();
@@ -328,9 +364,14 @@ void QDeclarativeTester::updateCurrentTime(int msec)
if (options & QDeclarativeViewer::TestImages && !(options & QDeclarativeViewer::Record) && !frame->image().isEmpty()) {
QImage goodImage(frame->image().toLocalFile());
+ if (frame->msec() == 16 && goodImage.size() != img.size()){
+ //Also an image mismatch, but this warning is more informative. Only checked at start though.
+ qWarning() << "QDeclarativeTester(" << m_script << "): Size mismatch. This test must be run at " << goodImage.size();
+ imagefailure();
+ }
if (goodImage != img) {
QString reject(frame->image().toLocalFile() + ".reject.png");
- qWarning() << "QDeclarativeTester: Image mismatch. Reject saved to:"
+ qWarning() << "QDeclarativeTester(" << m_script << "): Image mismatch. Reject saved to:"
<< reject;
img.save(reject);
bool doDiff = (goodImage.size() == img.size());
diff --git a/tools/qml/qdeclarativetester.h b/tools/qml/qdeclarativetester.h
index 021869d..0cf508a 100644
--- a/tools/qml/qdeclarativetester.h
+++ b/tools/qml/qdeclarativetester.h
@@ -228,6 +228,7 @@ private:
void imagefailure();
void complete();
+ void testSkip();
enum Destination { View, ViewPort };
void addKeyEvent(Destination, QKeyEvent *);
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 5e169d8..7ea77d1 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1012,7 +1012,7 @@ void QDeclarativeViewer::addPluginPath(const QString& plugin)
void QDeclarativeViewer::reload()
{
- open(currentFileOrUrl);
+ launch(currentFileOrUrl);
}
void QDeclarativeViewer::openFile()
@@ -1383,6 +1383,8 @@ void QDeclarativeViewer::appAboutToQuit()
// avoid crashes if messages are received after app has closed
delete loggerWindow;
loggerWindow = 0;
+ delete tester;
+ tester = 0;
}
void QDeclarativeViewer::autoStartRecording()
@@ -1518,6 +1520,7 @@ void QDeclarativeViewer::updateSizeHints(bool initial)
//qWarning() << "USH: R2V: setting free size ";
layout()->setSizeConstraint(QLayout::SetNoConstraint);
layout()->activate();
+ setMinimumSize(QSize(1,1));
setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
canvas->setMinimumSize(QSize(0,0));
canvas->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index d1ec26d..b43aa54 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -83,7 +83,8 @@ public:
SaveOnExit = 0x00000010,
ExitOnComplete = 0x00000020,
ExitOnFailure = 0x00000040,
- Snapshot = 0x00000080
+ Snapshot = 0x00000080,
+ TestSkipProperty = 0x00000100
};
Q_DECLARE_FLAGS(ScriptOptions, ScriptOption)
void setScript(const QString &s) { m_script = s; }
diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp
index 9675f99..4fe2868 100644
--- a/tools/qtconfig/mainwindow.cpp
+++ b/tools/qtconfig/mainwindow.cpp
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
// external use ignore them
// extern bool Q_CORE_EXPORT qt_resolve_symlinks;
-static const char *appearance_text =
+static const char *appearance_text = QT_TRANSLATE_NOOP("MainWindow",
"<p><b><font size+=2>Appearance</font></b></p>"
"<hr>"
"<p>Use this tab to customize the appearance of your Qt applications.</p>"
@@ -95,9 +95,9 @@ static const char *appearance_text =
"To customize colors further, press the Tune Palette button to open "
"the advanced palette editor."
"<p>The Preview Window shows what the selected Style and colors look "
-"like.";
+"like.");
-static const char *font_text =
+static const char *font_text = QT_TRANSLATE_NOOP("MainWindow",
"<p><b><font size+=2>Fonts</font></b></p>"
"<hr>"
"<p>Use this tab to select the default font for your Qt applications. "
@@ -114,9 +114,9 @@ static const char *font_text =
"Korean characters that are not found in the Lucida font will be taken "
"from the Mincho font. Because the font substitutions are "
"lists, you can also select multiple families, such as Song Ti (for "
-"use with Chinese text).";
+"use with Chinese text).");
-static const char *interface_text =
+static const char *interface_text = QT_TRANSLATE_NOOP("MainWindow",
"<p><b><font size+=2>Interface</font></b></p>"
"<hr>"
"<p>Use this tab to customize the feel of your Qt applications.</p>"
@@ -131,10 +131,10 @@ static const char *interface_text =
"at 0 will disable the Global Strut feature</p>"
"<p>XIM (Extended Input Methods) are used for entering characters in "
"languages that have large character sets, for example, Chinese and "
-"Japanese.";
+"Japanese.");
// ### What does the 'Enhanced support for languages written R2L do?
-static const char *printer_text =
+static const char *printer_text = QT_TRANSLATE_NOOP("MainWindow",
"<p><b><font size+=2>Printer</font></b></p>"
"<hr>"
"<p>Use this tab to configure the way Qt generates output for the printer."
@@ -145,14 +145,14 @@ static const char *printer_text =
"size will be bigger."
"<p>When using font embedding you can select additional directories where "
"Qt should search for embeddable font files. By default, the X "
-"server font path is used.";
+"server font path is used.");
-static const char *phonon_text =
+static const char *phonon_text = QT_TRANSLATE_NOOP("MainWindow",
"<p><b><font size+=2>Phonon</font></b></p>"
"<hr>"
"<p>Use this tab to configure the Phonon GStreamer multimedia backend. "
"<p>It is reccommended to leave all settings on \"Auto\" to let "
-"Phonon determine your settings automatically.";
+"Phonon determine your settings automatically.");
static QColorGroup::ColorRole centralFromItem( int item )
{
diff --git a/tools/qtestlib/wince/cetest/activesyncconnection.cpp b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
index 98062ed..812ed47 100644
--- a/tools/qtestlib/wince/cetest/activesyncconnection.cpp
+++ b/tools/qtestlib/wince/cetest/activesyncconnection.cpp
@@ -247,7 +247,7 @@ bool ActiveSyncConnection::copyFileFromDevice(const QString &deviceSource, const
wprintf(L"\n");
if (!readUntilEnd) {
- debugOutput(QString::fromLatin1(" an error occured during copy"), 2);
+ debugOutput(QString::fromLatin1(" an error occurred during copy"), 2);
return false;
}
diff --git a/tools/qtestlib/wince/cetest/main.cpp b/tools/qtestlib/wince/cetest/main.cpp
index 4272a83..ec62af1 100644
--- a/tools/qtestlib/wince/cetest/main.cpp
+++ b/tools/qtestlib/wince/cetest/main.cpp
@@ -283,7 +283,7 @@ int main(int argc, char **argv)
cout << "Error: Can only test executables!" << endl;
return -1;
}
- // Check wether the project is still in debug/release mode after reading
+ // Check whether the project is still in debug/release mode after reading
// If .pro specifies to be one mode only, we need to accept this
if (project.isActiveConfig("debug") && !project.isActiveConfig("release")) {
TestConfiguration::testDebug = true;
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp
index b4ccebc..a3b1964 100644
--- a/tools/qvfb/qvfb.cpp
+++ b/tools/qvfb/qvfb.cpp
@@ -1038,7 +1038,7 @@ void AnimationSaveWidget::convertToMpeg(QString filename)
// ### can't use QProcess, not in Qt 2.3
// ### but it's certainly in Qt 4! use it?
- // Execute the ppmtompeg command as a seperate process to do the encoding
+ // Execute the ppmtompeg command as a separate process to do the encoding
pid_t pid = ::fork();
if ( !pid ) {
// Child process
diff --git a/tools/runonphone/symbianutils/tcftrkdevice.h b/tools/runonphone/symbianutils/tcftrkdevice.h
index 67955e5..f56a86e 100644
--- a/tools/runonphone/symbianutils/tcftrkdevice.h
+++ b/tools/runonphone/symbianutils/tcftrkdevice.h
@@ -65,7 +65,7 @@ struct Breakpoint;
/* Command error handling in TCF:
* 1) 'Severe' errors (JSON format, parameter format): Trk emits a
- * nonstandard message (\3\2 error paramaters) and closes the connection.
+ * nonstandard message (\3\2 error parameters) and closes the connection.
* 2) Protocol errors: 'N' without error message is returned.
* 3) Errors in command execution: 'R' with a TCF error hash is returned
* (see TcfTrkCommandError). */
diff --git a/tools/runonphone/symbianutils/tcftrkmessage.h b/tools/runonphone/symbianutils/tcftrkmessage.h
index 510b485..929a9e6 100644
--- a/tools/runonphone/symbianutils/tcftrkmessage.h
+++ b/tools/runonphone/symbianutils/tcftrkmessage.h
@@ -123,7 +123,7 @@ struct SYMBIANUTILS_EXPORT RunControlContext {
QByteArray parentId; // Parent process id of a thread.
};
-// Module load information occuring with 'RunControl contextSuspended' events
+// Module load information occurring with 'RunControl contextSuspended' events
struct SYMBIANUTILS_EXPORT ModuleLoadEventInfo {
ModuleLoadEventInfo();
void clear();
diff --git a/tools/shared/symbian/epocroot.cpp b/tools/shared/symbian/epocroot.cpp
index ae1dcb1..eabae98 100644
--- a/tools/shared/symbian/epocroot.cpp
+++ b/tools/shared/symbian/epocroot.cpp
@@ -39,13 +39,13 @@
**
****************************************************************************/
-#include <iostream>
-
#include <QtCore/qdir.h>
#include <QtCore/qxmlstream.h>
-#include "epocroot.h"
-#include "../windows/registry.h"
+#include "epocroot_p.h"
+#include "../windows/registry_p.h"
+
+QT_BEGIN_NAMESPACE
// Registry key under which the location of the Symbian devices.xml file is
// stored.
@@ -64,35 +64,26 @@
// Stored as a static value in order to avoid unnecessary re-evaluation.
static QString epocRootValue;
-#ifdef QT_BUILD_QMAKE
-std::ostream &operator<<(std::ostream &s, const QString &val) {
- s << val.toLocal8Bit().data();
- return s;
-}
-#else
-// Operator implemented in configureapp.cpp
-std::ostream &operator<<(std::ostream &s, const QString &val);
-#endif
-
-QString getDevicesXmlPath()
+static QString getDevicesXmlPath()
{
// Note that the following call will return a null string on platforms other
// than Windows. If support is required on other platforms for devices.xml,
// an alternative mechanism for retrieving the location of this file will
// be required.
- return readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, SYMBIAN_SDKS_REG_SUBKEY);
+ return qt_readRegistryKey(SYMBIAN_SDKS_REG_HANDLE, QLatin1String(SYMBIAN_SDKS_REG_SUBKEY));
}
/**
* Checks whether epocRootValue points to an existent directory.
* If not, epocRootValue is set to an empty string and an error message is printed.
*/
-void checkEpocRootExists(const QString &source)
+static void checkEpocRootExists(const QString &source)
{
if (!epocRootValue.isEmpty()) {
QDir dir(epocRootValue);
if (!dir.exists()) {
- std::cerr << "Warning: " << source << " is set to an invalid path: " << epocRootValue << std::endl;
+ qWarning("Warning: %s is set to an invalid path: '%s'", qPrintable(source),
+ qPrintable(epocRootValue));
epocRootValue = QString();
}
}
@@ -103,32 +94,30 @@ void checkEpocRootExists(const QString &source)
*/
static void fixEpocRoot(QString &path)
{
- path.replace("\\", "/");
+ path.replace(QLatin1Char('\\'), QLatin1Char('/'));
- if (!path.size() || path[path.size()-1] != QChar('/')) {
- path += QChar('/');
+ if (!path.size() || path[path.size()-1] != QLatin1Char('/')) {
+ path += QLatin1Char('/');
}
}
/**
* Determine the epoc root for the currently active SDK.
*/
-QString epocRoot()
+QString qt_epocRoot()
{
if (epocRootValue.isEmpty()) {
// 1. If environment variable EPOCROOT is set and points to an existent
// directory, this is returned.
- epocRootValue = qgetenv("EPOCROOT");
- checkEpocRootExists("EPOCROOT");
+ epocRootValue = QString::fromLocal8Bit(qgetenv("EPOCROOT").constData());
+ checkEpocRootExists(QLatin1String("EPOCROOT environment variable"));
if (epocRootValue.isEmpty()) {
// 2. The location of devices.xml is specified by a registry key. If this
// file exists, it is parsed.
QString devicesXmlPath = getDevicesXmlPath();
- if (devicesXmlPath.isEmpty()) {
- std::cerr << "Error: Symbian SDK registry key not found" << std::endl;
- } else {
- devicesXmlPath += "/devices.xml";
+ if (!devicesXmlPath.isEmpty()) {
+ devicesXmlPath += QLatin1String("/devices.xml");
QFile devicesFile(devicesXmlPath);
if (devicesFile.open(QIODevice::ReadOnly)) {
@@ -138,87 +127,90 @@ QString epocRoot()
// 4. If a device element marked as default is found in devices.xml and its
// epocroot value points to an existent directory, this is returned.
- const QString epocDeviceValue = qgetenv("EPOCDEVICE");
+ const QString epocDeviceValue = QString::fromLocal8Bit(qgetenv("EPOCDEVICE").constData());
bool epocDeviceFound = false;
QXmlStreamReader xml(&devicesFile);
while (!xml.atEnd()) {
xml.readNext();
- if (xml.isStartElement() && xml.name() == "devices") {
- if (xml.attributes().value("version") == "1.0") {
- while (!(xml.isEndElement() && xml.name() == "devices") && !xml.atEnd()) {
+ if (xml.isStartElement() && xml.name() == QLatin1String("devices")) {
+ if (xml.attributes().value(QLatin1String("version")) == QLatin1String("1.0")) {
+ while (!(xml.isEndElement() && xml.name() == QLatin1String("devices")) && !xml.atEnd()) {
xml.readNext();
- if (xml.isStartElement() && xml.name() == "device") {
- const bool isDefault = xml.attributes().value("default") == "yes";
- const QString id = xml.attributes().value("id").toString();
- const QString name = xml.attributes().value("name").toString();
- const QString alias = xml.attributes().value("alias").toString();
- bool epocDeviceMatch = (id + ":" + name) == epocDeviceValue;
+ if (xml.isStartElement() && xml.name() == QLatin1String("device")) {
+ const bool isDefault = xml.attributes().value(QLatin1String("default")) == QLatin1String("yes");
+ const QString id = xml.attributes().value(QLatin1String("id")).toString();
+ const QString name = xml.attributes().value(QLatin1String("name")).toString();
+ const QString alias = xml.attributes().value(QLatin1String("alias")).toString();
+ bool epocDeviceMatch = QString(id + QLatin1String(":") + name) == epocDeviceValue;
if (!alias.isEmpty())
epocDeviceMatch |= alias == epocDeviceValue;
epocDeviceFound |= epocDeviceMatch;
if((epocDeviceValue.isEmpty() && isDefault) || epocDeviceMatch) {
// Found a matching device
- while (!(xml.isEndElement() && xml.name() == "device") && !xml.atEnd()) {
+ while (!(xml.isEndElement() && xml.name() == QLatin1String("device")) && !xml.atEnd()) {
xml.readNext();
- if (xml.isStartElement() && xml.name() == "epocroot") {
+ if (xml.isStartElement() && xml.name() == QLatin1String("epocroot")) {
epocRootValue = xml.readElementText();
const QString deviceSource = epocDeviceValue.isEmpty()
- ? "default device"
- : "EPOCDEVICE (" + epocDeviceValue + ")";
+ ? QLatin1String("default device")
+ : QString(QLatin1String("EPOCDEVICE (") + epocDeviceValue + QLatin1String(")"));
checkEpocRootExists(deviceSource);
}
}
if (epocRootValue.isEmpty())
- xml.raiseError("No epocroot element found");
+ xml.raiseError(QLatin1String("No epocroot element found"));
}
}
}
} else {
- xml.raiseError("Invalid 'devices' element version");
+ xml.raiseError(QLatin1String("Invalid 'devices' element version"));
}
}
}
if (xml.hasError()) {
- std::cerr << "Error: \"" << xml.errorString() << "\" when parsing devices.xml" << std::endl;
+ qWarning("Warning: Error \"%s\" when parsing devices.xml",
+ qPrintable(xml.errorString()));
} else {
if (epocRootValue.isEmpty()) {
if (!epocDeviceValue.isEmpty()) {
if (epocDeviceFound) {
- std::cerr << "Error: missing or invalid epocroot attribute "
- << "in device '" << epocDeviceValue << "'";
+ qWarning("Warning: Missing or invalid epocroot attribute in device '%s' in devices.xml.",
+ qPrintable(epocDeviceValue));
} else {
- std::cerr << "Error: no device matching EPOCDEVICE ("
- << epocDeviceValue << ")";
+ qWarning("Warning: No device matching EPOCDEVICE (%s) in devices.xml.",
+ qPrintable(epocDeviceValue));
}
} else {
if (epocDeviceFound) {
- std::cerr << "Error: missing or invalid epocroot attribute "
- << "in default device";
+ qWarning("Warning: Missing or invalid epocroot attribute in default device in devices.xml.");
} else {
- std::cerr << "Error: no default device";
+ qWarning("Warning: No default device set in devices.xml.");
}
}
- std::cerr << " found in devices.xml file." << std::endl;
}
}
} else {
- std::cerr << "Error: could not open file " << devicesXmlPath << std::endl;
+ qWarning("Warning: Could not open file: '%s'.", qPrintable(devicesXmlPath));
}
}
}
if (epocRootValue.isEmpty()) {
// 5. An empty string is returned.
- std::cerr << "Error: failed to find epoc root" << std::endl
- << "Either" << std::endl
- << " 1. Set EPOCROOT environment variable to a valid value" << std::endl
- << " or 2. Ensure that the HKEY_LOCAL_MACHINE\\" SYMBIAN_SDKS_REG_SUBKEY
- " registry key is set, and then" << std::endl
- << " a. Set EPOCDEVICE environment variable to a valid device" << std::endl
- << " or b. Specify a default device in the devices.xml file." << std::endl;
+ qWarning("Warning: failed to resolve epocroot."
+#ifdef Q_OS_WIN32
+ "\nEither\n"
+ " 1. Set EPOCROOT environment variable to a valid value.\n"
+ " or 2. Ensure that the HKEY_LOCAL_MACHINE\\" SYMBIAN_SDKS_REG_SUBKEY
+ " registry key is set, and then\n"
+ " a. Set EPOCDEVICE environment variable to a valid device\n"
+ " or b. Specify a default device in the devices.xml file.");
+#else
+ " Set EPOCROOT environment variable to a valid value.");
+#endif
} else {
fixEpocRoot(epocRootValue);
}
@@ -227,3 +219,4 @@ QString epocRoot()
return epocRootValue;
}
+QT_END_NAMESPACE
diff --git a/tools/shared/symbian/epocroot.pri b/tools/shared/symbian/epocroot.pri
new file mode 100644
index 0000000..f0f0dab
--- /dev/null
+++ b/tools/shared/symbian/epocroot.pri
@@ -0,0 +1,11 @@
+# Epocroot resolving is only required for tools, so omit it from all mobile/embedded builds
+!symbian:!wince*:!embedded {
+HEADERS += \
+ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot_p.h \
+ $$QT_SOURCE_TREE/tools/shared/windows/registry_p.h
+SOURCES += \
+ $$QT_SOURCE_TREE/tools/shared/symbian/epocroot.cpp \
+ $$QT_SOURCE_TREE/tools/shared/windows/registry.cpp
+INCLUDEPATH += $$QT_SOURCE_TREE/tools/shared
+DEFINES += QLIBRARYINFO_EPOCROOT
+}
diff --git a/tools/shared/symbian/epocroot.h b/tools/shared/symbian/epocroot_p.h
index 9846485..c97b593 100644
--- a/tools/shared/symbian/epocroot.h
+++ b/tools/shared/symbian/epocroot_p.h
@@ -39,11 +39,24 @@
**
****************************************************************************/
-#ifndef SYMBIAN_EPOCROOT_H
-#define SYMBIAN_EPOCROOT_H
+#ifndef QT_SYMBIAN_EPOCROOT_H
+#define QT_SYMBIAN_EPOCROOT_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
#include <QtCore/qstring.h>
+QT_BEGIN_NAMESPACE
+
/**
* Determine the epoc root for the currently active SDK.
*
@@ -62,6 +75,9 @@
* Any return value other than the empty string therefore is guaranteed to
* point to an existent directory.
*/
-QString epocRoot();
+QString qt_epocRoot();
+
+QT_END_NAMESPACE
+
+#endif // QT_SYMBIAN_EPOCROOT_H
-#endif // EPOCROOT_H
diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp
index 67d9b56..f520910 100644
--- a/tools/shared/windows/registry.cpp
+++ b/tools/shared/windows/registry.cpp
@@ -40,8 +40,11 @@
****************************************************************************/
#include <QtCore/qstringlist.h>
-#include "registry.h"
+#include "registry_p.h"
+QT_BEGIN_NAMESPACE
+
+#ifdef Q_OS_WIN32
/*!
Returns the path part of a registry key.
e.g.
@@ -73,12 +76,13 @@ static QString keyName(const QString &rKey)
return rKey;
QString res(rKey.mid(idx + 1));
- if (res == "Default" || res == ".")
- res = "";
+ if (res == QLatin1String("Default") || res == QLatin1String("."))
+ res = QString();
return res;
}
+#endif
-QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
+QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey)
{
QString result;
@@ -128,7 +132,7 @@ QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
break;
l.append(s);
}
- result = l.join(", ");
+ result = l.join(QLatin1String(", "));
break;
}
@@ -153,9 +157,13 @@ QString readRegistryKey(HKEY parentHandle, const QString &rSubkey)
}
RegCloseKey(handle);
+#else
+ Q_UNUSED(parentHandle);
+ Q_UNUSED(rSubkey)
#endif
return result;
}
+QT_END_NAMESPACE
diff --git a/tools/shared/windows/registry.h b/tools/shared/windows/registry_p.h
index 3896527..4aae5f9 100644
--- a/tools/shared/windows/registry.h
+++ b/tools/shared/windows/registry_p.h
@@ -39,8 +39,21 @@
**
****************************************************************************/
-#ifndef WINDOWS_REGISTRY_H
-#define WINDOWS_REGISTRY_H
+#ifndef QT_WINDOWS_REGISTRY_H
+#define QT_WINDOWS_REGISTRY_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+QT_BEGIN_NAMESPACE
#include <QtCore/qglobal.h>
@@ -59,6 +72,9 @@
* if this code is compiled for a platform other than Windows), a null
* string is returned.
*/
-QString readRegistryKey(HKEY parentHandle, const QString &rSubkey);
+QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey);
+
+QT_END_NAMESPACE
+
+#endif // QT_WINDOWS_REGISTRY_H
-#endif // WINDOWS_REGISTRY_H