summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp33
-rw-r--r--tools/configure/configureapp.h2
-rw-r--r--tools/qdoc3/atom.h2
-rw-r--r--tools/qdoc3/doc.cpp47
-rw-r--r--tools/qdoc3/htmlgenerator.cpp2
-rw-r--r--tools/qdoc3/qdoc3.pro4
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.cpp14
-rw-r--r--tools/qdoc3/qmlmarkupvisitor.h3
-rw-r--r--tools/qdoc3/quoter.cpp4
-rw-r--r--tools/qdoc3/test/macros.qdocconf32
-rw-r--r--tools/qdoc3/test/qt-html-default-styles.qdocconf26
-rw-r--r--tools/qdoc3/test/qt-html-online-styles.qdocconf11
-rw-r--r--tools/qdoc3/test/qt-html-templates-online.qdocconf6
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf20
-rw-r--r--tools/qml/browser/Browser.qml4
-rw-r--r--tools/qml/qmlruntime.cpp2
16 files changed, 131 insertions, 81 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index f4fd7c6..050ad62 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -741,6 +741,23 @@ void Configure::parseCmdLine()
} else if (configCmdLine.at(i) == "-opengl-es-2") {
dictionary[ "OPENGL" ] = "yes";
dictionary[ "OPENGL_ES_2" ] = "yes";
+ } else if (configCmdLine.at(i) == "-opengl") {
+ dictionary[ "OPENGL" ] = "yes";
+ i++;
+ if (i == argCount)
+ break;
+
+ if (configCmdLine.at(i) == "es1") {
+ dictionary[ "OPENGL_ES_CM" ] = "yes";
+ } else if ( configCmdLine.at(i) == "es2" ) {
+ dictionary[ "OPENGL_ES_2" ] = "yes";
+ } else if ( configCmdLine.at(i) == "desktop" ) {
+ dictionary[ "OPENGL_ES_2" ] = "yes";
+ } else {
+ cout << "Argument passed to -opengl option is not valid." << endl;
+ dictionary[ "DONE" ] = "error";
+ break;
+ }
}
// OpenVG Support -------------------------------------------
@@ -1735,6 +1752,11 @@ bool Configure::displayHelp()
desc("QT3SUPPORT", "no","-no-qt3support", "Disables the Qt 3 support functionality.\n");
desc("OPENGL", "no","-no-opengl", "Disables OpenGL functionality\n");
+ desc("OPENGL", "no","-opengl <api>", "Enable OpenGL support with specified API version.\n"
+ "Available values for <api>:");
+ desc("", "", "", " desktop - Enable support for Desktop OpenGL", ' ');
+ desc("OPENGL_ES_CM", "no", "", " es1 - Enable support for OpenGL ES Common Profile", ' ');
+ desc("OPENGL_ES_2", "no", "", " es2 - Enable support for OpenGL ES 2.0", ' ');
desc("OPENVG", "no","-no-openvg", "Disables OpenVG functionality\n");
desc("OPENVG", "yes","-openvg", "Enables OpenVG functionality");
@@ -1895,8 +1917,7 @@ bool Configure::displayHelp()
desc("CETEST", "no", "-no-cetest", "Do not compile Windows CE remote test application");
desc("CETEST", "yes", "-cetest", "Compile Windows CE remote test application");
desc( "-signature <file>", "Use file for signing the target project");
- desc("OPENGL_ES_CM", "no", "-opengl-es-cm", "Enable support for OpenGL ES Common");
- desc("OPENGL_ES_2", "no", "-opengl-es-2", "Enable support for OpenGL ES 2.0");
+
desc("DIRECTSHOW", "no", "-phonon-wince-ds9", "Enable Phonon Direct Show 9 backend for Windows CE");
// Qt\Symbian only options go below here -----------------------------------------------------------------------------
@@ -2471,15 +2492,11 @@ void Configure::generateOutputVars()
qtConfig += "no-gif";
else if (dictionary[ "GIF" ] == "yes")
qtConfig += "gif";
- else if (dictionary[ "GIF" ] == "plugin")
- qmakeFormatPlugins += "gif";
if (dictionary[ "TIFF" ] == "no")
qtConfig += "no-tiff";
else if (dictionary[ "TIFF" ] == "yes")
qtConfig += "tiff";
- else if (dictionary[ "TIFF" ] == "plugin")
- qmakeFormatPlugins += "tiff";
if (dictionary[ "LIBTIFF" ] == "system")
qtConfig += "system-tiff";
@@ -2487,8 +2504,6 @@ void Configure::generateOutputVars()
qtConfig += "no-jpeg";
else if (dictionary[ "JPEG" ] == "yes")
qtConfig += "jpeg";
- else if (dictionary[ "JPEG" ] == "plugin")
- qmakeFormatPlugins += "jpeg";
if (dictionary[ "LIBJPEG" ] == "system")
qtConfig += "system-jpeg";
@@ -2807,8 +2822,6 @@ void Configure::generateOutputVars()
qmakeVars += QString("styles += ") + qmakeStyles.join(" ");
if (!qmakeStylePlugins.isEmpty())
qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" ");
- if (!qmakeFormatPlugins.isEmpty())
- qmakeVars += QString("imageformat-plugins += ") + qmakeFormatPlugins.join(" ");
if (dictionary["QMAKESPEC"].endsWith("-g++")) {
QString includepath = qgetenv("INCLUDE");
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index b3c07f7..32d1860 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -122,8 +122,6 @@ private:
QStringList qmakeStyles;
QStringList qmakeStylePlugins;
- QStringList qmakeFormatPlugins;
-
QStringList qmakeVars;
QStringList qmakeDefines;
// makeList[0] for qt and qtmain
diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h
index fe85aec..a20e057 100644
--- a/tools/qdoc3/atom.h
+++ b/tools/qdoc3/atom.h
@@ -134,7 +134,7 @@ class Atom
Target, // 69
UnhandledFormat,
UnknownCommand,
- Last = UnknownCommand
+ Last = UnknownCommand
};
Atom(Type type, const QString &string = "")
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index 1c72f54..8d4d0ee 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -376,6 +376,7 @@ class DocParser
void leaveTableRow();
CodeMarker *quoteFromFile();
void expandMacro(const QString& name, const QString& def, int numParams);
+ QString expandMacroToString(const QString &name, const QString &def, int numParams);
Doc::SectioningUnit getSectioningUnit();
QString getArgument(bool verbatim = false);
QString getOptionalArgument();
@@ -1239,7 +1240,7 @@ void DocParser::parse(const QString& source,
}
else {
location().push(macro.defaultDefLocation.filePath());
- in.insert(pos, macro.defaultDef);
+ in.insert(pos, expandMacroToString(cmdStr, macro.defaultDef, macro.numParams));
len = in.length();
openedInputs.push(pos + macro.defaultDef.length());
}
@@ -1979,15 +1980,14 @@ void DocParser::expandMacro(const QString &name,
int j = 0;
while (j < def.size()) {
int paramNo;
- if ((def[j] == '\\') && (j < def.size() - 1) &&
- ((paramNo = def[j + 1].digitValue()) >= 1) &&
+ if (((paramNo = def[j].unicode()) >= 1) &&
(paramNo <= numParams)) {
if (!rawString.isEmpty()) {
append(Atom::RawString, rawString);
rawString = "";
}
append(Atom::String, args[paramNo - 1]);
- j += 2;
+ j += 1;
}
else {
rawString += def[j++];
@@ -1998,6 +1998,43 @@ void DocParser::expandMacro(const QString &name,
}
}
+QString DocParser::expandMacroToString(const QString &name, const QString &def, int numParams)
+{
+ if (numParams == 0) {
+ return def;
+ }
+ else {
+ QStringList args;
+ QString rawString;
+
+ 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 (((paramNo = def[j].unicode()) >= 1) &&
+ (paramNo <= numParams)) {
+ rawString += args[paramNo - 1];
+ j += 1;
+ }
+ else {
+ rawString += def[j++];
+ }
+ }
+ return rawString;
+ }
+}
+
Doc::SectioningUnit DocParser::getSectioningUnit()
{
QString name = getOptionalArgument();
@@ -2879,7 +2916,7 @@ void Doc::initialize(const Config& config)
QString def = config.getString(macroDotName + Config::dot + *f);
if (!def.isEmpty()) {
macro.otherDefs.insert(*f, def);
- int m = Config::numParams(macro.defaultDef);
+ int m = Config::numParams(def);
if (macro.numParams == -1) {
macro.numParams = m;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 40cfba3..948a7d6 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -490,7 +490,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
break;
#ifdef QDOC_QML
case Atom::Qml:
- out() << "<pre class=\"highlightedCode brush: cpp\">"
+ out() << "<pre class=\"qml\">"
<< trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
marker,relative))
<< "</pre>\n";
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 50c20ec..2fedc0f 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -86,9 +86,9 @@ SOURCES += atom.cpp \
tree.cpp \
yyindent.cpp
-INCLUDEPATH += $$(QT_SOURCE_TREE)/include/QtDeclarative
+INCLUDEPATH += $$QT_BUILD_TREE/include/QtDeclarative
-include($$(QT_SOURCE_TREE)/src/declarative/qml/parser/parser.pri)
+include($$QT_SOURCE_TREE/src/declarative/qml/parser/parser.pri)
### Documentation for qdoc3 ###
diff --git a/tools/qdoc3/qmlmarkupvisitor.cpp b/tools/qdoc3/qmlmarkupvisitor.cpp
index 6bede96..9916be2 100644
--- a/tools/qdoc3/qmlmarkupvisitor.cpp
+++ b/tools/qdoc3/qmlmarkupvisitor.cpp
@@ -183,7 +183,8 @@ void QmlMarkupVisitor::addExtra(quint32 start, quint32 finish)
}
void QmlMarkupVisitor::addMarkedUpToken(
- QDeclarativeJS::AST::SourceLocation &location, const QString &tagName)
+ QDeclarativeJS::AST::SourceLocation &location, const QString &tagName,
+ const QHash<QString, QString> &attributes)
{
if (!location.isValid())
return;
@@ -193,7 +194,10 @@ void QmlMarkupVisitor::addMarkedUpToken(
else if (cursor > location.offset)
return;
- output += QString(QLatin1String("<@%1>%2</@%3>")).arg(tagName, protect(sourceText(location)), tagName);
+ output += QString(QLatin1String("<@%1")).arg(tagName);
+ foreach (const QString &key, attributes)
+ output += QString(QLatin1String(" %1=\"%2\"")).arg(key).arg(attributes[key]);
+ output += QString(QLatin1String(">%2</@%3>")).arg(protect(sourceText(location)), tagName);
cursor += location.length;
}
@@ -853,9 +857,13 @@ bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::DebuggerStatement *statement)
return true;
}
+// Elements and items are represented by UiObjectDefinition nodes.
+
bool QmlMarkupVisitor::visit(QDeclarativeJS::AST::UiObjectDefinition *definition)
{
- QDeclarativeJS::AST::Node::accept(definition->qualifiedTypeNameId, this);
+ QHash<QString, QString> attributes;
+ attributes[QLatin1String("node")] = sourceText(definition->qualifiedTypeNameId->identifierToken);
+ addMarkedUpToken(definition->qualifiedTypeNameId->identifierToken, QLatin1String("link"), attributes);
QDeclarativeJS::AST::Node::accept(definition->initializer, this);
return false;
}
diff --git a/tools/qdoc3/qmlmarkupvisitor.h b/tools/qdoc3/qmlmarkupvisitor.h
index 7a9ff22..60bc336 100644
--- a/tools/qdoc3/qmlmarkupvisitor.h
+++ b/tools/qdoc3/qmlmarkupvisitor.h
@@ -161,7 +161,8 @@ protected:
private:
void addExtra(quint32 start, quint32 finish);
void addMarkedUpToken(QDeclarativeJS::AST::SourceLocation &location,
- const QString &text);
+ const QString &text,
+ const QHash<QString, QString> &attributes = QHash<QString, QString>());
void addVerbatim(QDeclarativeJS::AST::SourceLocation first,
QDeclarativeJS::AST::SourceLocation last = QDeclarativeJS::AST::SourceLocation());
QString sourceText(QDeclarativeJS::AST::SourceLocation &location);
diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp
index 6dc7894..84c6fb1 100644
--- a/tools/qdoc3/quoter.cpp
+++ b/tools/qdoc3/quoter.cpp
@@ -235,10 +235,14 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif
QString lastLine = getLine();
int dIndex = lastLine.indexOf(delimiter);
if (dIndex > 0) {
+ // The delimiter might be preceded on the line by other
+ // delimeters, so look for the first comment on the line.
QString leading = lastLine.left(dIndex);
dIndex = leading.indexOf(comment);
if (dIndex != -1)
leading = leading.left(dIndex);
+ if (leading.endsWith(QLatin1String("<@comment>")))
+ leading.chop(10);
if (!leading.trimmed().isEmpty())
t += leading;
}
diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf
index 2262daa..39986fc 100644
--- a/tools/qdoc3/test/macros.qdocconf
+++ b/tools/qdoc3/test/macros.qdocconf
@@ -30,6 +30,38 @@ macro.endcomment = "\\c{*/}"
macro.uuml.HTML = "&uuml;"
macro.mdash.HTML = "&mdash;"
+# Macros for floating images and floating images with alt text.
+# Ideally, these would be HTML-only macros.
+
+macro.floatleft = "\\raw HTML\n" \
+ "<div style=\"float: left; margin-right: 2em\">" \
+ "\\endraw\n" \
+ "\\inlineimage \1\n" \
+ "\\raw HTML\n" \
+ "</div>\n" \
+ "\\endraw\n"
+macro.figureleft = "\\raw HTML\n" \
+ "<div style=\"float: left; margin-right: 2em\">" \
+ "\\endraw\n" \
+ "\\inlineimage \1 \2\n" \
+ "\\raw HTML\n" \
+ "</div>\n" \
+ "\\endraw\n"
+macro.floatright = "\\raw HTML\n" \
+ "<div style=\"float: right; margin-left: 2em\">\n" \
+ "\\endraw\n" \
+ "\\inlineimage \1\n" \
+ "\\raw HTML\n" \
+ "</div>\n" \
+ "\\endraw\n"
+macro.figureright = "\\raw HTML\n" \
+ "<div style=\"float: right; margin-left: 2em\">" \
+ "\\endraw\n" \
+ "\\inlineimage \1 \2\n" \
+ "\\raw HTML\n" \
+ "</div>\n" \
+ "\\endraw\n"
+
macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">"
macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
macro.endfloat.HTML = "</div>"
diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf
index 30c28cb..c9c02ea 100644
--- a/tools/qdoc3/test/qt-html-default-styles.qdocconf
+++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf
@@ -4,43 +4,25 @@
HTML.templatedir = $QT_SOURCE_TREE/doc/src/template
-HTML.stylesheets = style/style.css \
- style/narrow.css
+HTML.stylesheets = style/style.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 \
+extraimages.HTML = qt-logo.png \
+ arrow_down.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
+ sprites-combined.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 =
diff --git a/tools/qdoc3/test/qt-html-online-styles.qdocconf b/tools/qdoc3/test/qt-html-online-styles.qdocconf
index 06f8964..6db3491 100644
--- a/tools/qdoc3/test/qt-html-online-styles.qdocconf
+++ b/tools/qdoc3/test/qt-html-online-styles.qdocconf
@@ -18,10 +18,9 @@ HTML.scripts = scripts/functions.js \
scripts/jquery.js
-# Files not referenced in any qdoc file (last four needed by qtdemo)
+# Files not referenced in any qdoc file.
# See also qhp.Qt.extraFiles
-extraimages.HTML = qt-logo \
- trolltech-logo \
+extraimages.HTML = qt-logo.png \
bg_l.png \
bg_l_blank.png \
bg_ll_blank.png \
@@ -40,11 +39,7 @@ extraimages.HTML = qt-logo \
page.png \
page_bg.png \
sprites-combined.png \
- spinner.gif \
- stylesheet-coffee-plastique.png \
- taskmenuextension-example.png \
- coloreditorfactoryimage.png \
- dynamiclayouts-example.png
+ spinner.gif
# Include the style sheets and scripts used.
diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
index 1d55cee..bc7dbd2 100644
--- a/tools/qdoc3/test/qt-html-templates-online.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
@@ -198,7 +198,7 @@ HTML.footer = \
" </script>\n"
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# Files not referenced in any qdoc file.
# See also extraimages.HTML
qhp.Qt.extraFiles = index.html \
images/bg_l.png \
@@ -220,10 +220,6 @@ qhp.Qt.extraFiles = index.html \
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 \
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 67ce95a..8241fa0 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -47,31 +47,15 @@ HTML.footer = \
" as published by the Free Software Foundation.</p>\n" \
"</div>\n" \
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
+# Files not referenced in any qdoc file.
# 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/arrow_down.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/qml/browser/Browser.qml b/tools/qml/browser/Browser.qml
index ebed72f..b9573da 100644
--- a/tools/qml/browser/Browser.qml
+++ b/tools/qml/browser/Browser.qml
@@ -180,7 +180,7 @@ Rectangle {
GradientStop { id: t1; position: 0.0; color: palette.highlight }
GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
}
- width: view1.currentItem.width
+ width: view1.currentItem == null ? 0 : view1.currentItem.width
}
highlightMoveSpeed: 1000
pressDelay: 100
@@ -230,7 +230,7 @@ Rectangle {
GradientStop { id: t1; position: 0.0; color: palette.highlight }
GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
}
- width: view1.currentItem.width
+ width: view1.currentItem == null ? 0 : view1.currentItem.width
}
highlightMoveSpeed: 1000
pressDelay: 100
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 7ea77d1..a368bc1 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -1520,7 +1520,7 @@ void QDeclarativeViewer::updateSizeHints(bool initial)
//qWarning() << "USH: R2V: setting free size ";
layout()->setSizeConstraint(QLayout::SetNoConstraint);
layout()->activate();
- setMinimumSize(QSize(1,1));
+ setMinimumSize(minimumSizeHint());
setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
canvas->setMinimumSize(QSize(0,0));
canvas->setMaximumSize(QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));