summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:09:53 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-13 08:33:13 (GMT)
commit5114fcb45d584ea50da7397088f084dfd74922b9 (patch)
tree18cb40f048186ebf0eac568e2ae53ec092044c55 /tools
parent55e47566dd1ac83ff674401dfd6284f07490cd8b (diff)
parentee62807198a2525577c14f718b98d07ae0ec7bec (diff)
downloadQt-5114fcb45d584ea50da7397088f084dfd74922b9.zip
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.gz
Qt-5114fcb45d584ea50da7397088f084dfd74922b9.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qpainter.cpp src/gui/text/qtextengine.cpp tests/auto/qimage/tst_qimage.cpp tests/auto/qpainter/tst_qpainter.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf tools/qdoc3/test/qmake.qdocconf tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/qhelpsearchengine.cpp10
-rw-r--r--tools/configure/configureapp.cpp34
-rw-r--r--tools/configure/configureapp.h2
-rw-r--r--tools/designer/src/designer/assistantclient.cpp2
-rw-r--r--tools/designer/src/lib/shared/stylesheeteditor.cpp1
-rw-r--r--tools/linguist/linguist/mainwindow.cpp2
-rw-r--r--tools/linguist/phrasebooks/french.qph62
-rw-r--r--tools/linguist/phrasebooks/russian.qph16
-rw-r--r--tools/porting/src/semantic.cpp6
-rw-r--r--tools/qdoc3/codemarker.cpp4
-rw-r--r--tools/qdoc3/codemarker.h3
-rw-r--r--tools/qdoc3/config.h5
-rw-r--r--tools/qdoc3/cppcodemarker.cpp45
-rw-r--r--tools/qdoc3/cppcodemarker.h3
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp5
-rw-r--r--tools/qdoc3/generator.cpp7
-rw-r--r--tools/qdoc3/htmlgenerator.cpp243
-rw-r--r--tools/qdoc3/htmlgenerator.h13
-rw-r--r--tools/qdoc3/main.cpp29
-rw-r--r--tools/qdoc3/test/assistant.qdocconf55
-rw-r--r--tools/qdoc3/test/designer.qdocconf3
-rw-r--r--tools/qdoc3/test/linguist.qdocconf3
-rw-r--r--tools/qdoc3/test/qdeclarative.qdocconf55
-rw-r--r--tools/qdoc3/test/qmake.qdocconf3
-rw-r--r--tools/qdoc3/test/qt-api-only.qdocconf8
-rw-r--r--tools/qdoc3/test/qt-build-docs.qdocconf4
-rw-r--r--tools/qdoc3/test/qt-cpp-ignore.qdocconf1
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf21
-rw-r--r--tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf14
-rw-r--r--tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf191
-rw-r--r--tools/qdoc3/test/qt.qdocconf3
-rw-r--r--tools/qml/Info_mac.plist31
-rw-r--r--tools/qml/browser/Browser.qml (renamed from tools/qml/content/Browser.qml)0
-rw-r--r--tools/qml/browser/browser.qrc9
-rw-r--r--tools/qml/browser/images/folder.png (renamed from tools/qml/content/images/folder.png)bin1841 -> 1841 bytes
-rw-r--r--tools/qml/browser/images/titlebar.png (renamed from tools/qml/content/images/titlebar.png)bin1436 -> 1436 bytes
-rw-r--r--tools/qml/browser/images/titlebar.sci (renamed from tools/qml/content/images/titlebar.sci)0
-rw-r--r--tools/qml/browser/images/up.png (renamed from tools/qml/content/images/up.png)bin662 -> 662 bytes
-rw-r--r--tools/qml/deviceorientation_symbian.cpp15
-rw-r--r--tools/qml/main.cpp476
-rw-r--r--tools/qml/qml.pri4
-rw-r--r--tools/qml/qml.pro5
-rw-r--r--tools/qml/qmlruntime.cpp136
-rw-r--r--tools/qml/qmlruntime.h4
-rw-r--r--tools/qml/qmlruntime.qrc9
-rw-r--r--tools/qml/startup/Logo.qml179
-rw-r--r--tools/qml/startup/qt-back.pngbin0 -> 3549 bytes
-rw-r--r--tools/qml/startup/qt-blue.jpgbin0 -> 20900 bytes
-rw-r--r--tools/qml/startup/qt-front.pngbin0 -> 3318 bytes
-rw-r--r--tools/qml/startup/qt-sketch.jpgbin0 -> 17048 bytes
-rw-r--r--tools/qml/startup/qt-text.pngbin0 -> 14565 bytes
-rw-r--r--tools/qml/startup/quick-blur.pngbin0 -> 2826 bytes
-rw-r--r--tools/qml/startup/quick-regular.pngbin0 -> 1399 bytes
-rw-r--r--tools/qml/startup/shadow.pngbin0 -> 1592 bytes
-rw-r--r--tools/qml/startup/startup.qml167
-rw-r--r--tools/qml/startup/startup.qrc16
-rw-r--r--tools/qml/startup/white-star.pngbin0 -> 2651 bytes
-rw-r--r--tools/runonphone/main.cpp3
-rw-r--r--tools/runonphone/ossignalconverter.cpp120
-rw-r--r--tools/runonphone/ossignalconverter.h61
-rw-r--r--tools/runonphone/ossignalconverter_p.h71
-rw-r--r--tools/runonphone/runonphone.pro7
62 files changed, 1696 insertions, 470 deletions
diff --git a/tools/assistant/lib/qhelpsearchengine.cpp b/tools/assistant/lib/qhelpsearchengine.cpp
index 9914efa..164163a 100644
--- a/tools/assistant/lib/qhelpsearchengine.cpp
+++ b/tools/assistant/lib/qhelpsearchengine.cpp
@@ -263,17 +263,17 @@ private:
engines setupFinished() signal to know when it can start to index documentation.
After starting the indexing process the signal indexingStarted() is emitted and
- on the end of the indexing process the indexingFinished() is emited. To stop
+ on the end of the indexing process the indexingFinished() is emitted. To stop
the indexing one can call cancelIndexing().
While the indexing process has finished, the search engine can now be used to search
thru its index for a given term. To do this one may use the possibility of creating the
QHelpSearchQuery list by self or reuse the QHelpSearchQueryWidget which has the inbuild
- functionality to set up a proper search querys list that get's passed to the search engines
+ functionality to set up a proper search queries list that get's passed to the search engines
search() function.
After the list of querys has been passed to the search engine, the signal searchingStarted()
- is emited and after the search has finished the searchingFinished() signal is emited. The
+ is emitted and after the search has finished the searchingFinished() signal is emitted. The
search process can be stopped by calling cancelSearching().
If the search succeeds, the searchingFinished() will be called with the search hits count,
@@ -318,7 +318,7 @@ private:
uses the given \a helpEngine to access the documentation that needs to be indexed.
The QHelpEngine's setupFinished() signal is automatically connected to the
QHelpSearchEngine's indexing function, so that new documentation will be indexed
- after the signal is emited.
+ after the signal is emitted.
*/
QHelpSearchEngine::QHelpSearchEngine(QHelpEngineCore *helpEngine, QObject *parent)
: QObject(parent)
@@ -434,7 +434,7 @@ void QHelpSearchEngine::cancelSearching()
}
/*!
- Starts the search process using the given list of querys \a queryList
+ Starts the search process using the given list of queries \a queryList
build by the search field name and the values to search for.
*/
void QHelpSearchEngine::search(const QList<QHelpSearchQuery> &queryList)
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3f0fe87..0ed16ed 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -988,7 +988,6 @@ void Configure::parseCmdLine()
++i;
if (i == argCount)
break;
- qmakeDefines += "QT_NAMESPACE="+configCmdLine.at(i);
dictionary[ "QT_NAMESPACE" ] = configCmdLine.at(i);
} else if (configCmdLine.at(i) == "-qtlibinfix") {
++i;
@@ -1029,6 +1028,10 @@ void Configure::parseCmdLine()
opensslLibs = configCmdLine.at(i);
} else if (configCmdLine.at(i).startsWith("PSQL_LIBS=")) {
psqlLibs = configCmdLine.at(i);
+ } else if (configCmdLine.at(i).startsWith("SYBASE=")) {
+ sybase = configCmdLine.at(i);
+ } else if (configCmdLine.at(i).startsWith("SYBASE_LIBS=")) {
+ sybaseLibs = configCmdLine.at(i);
}
else if ((configCmdLine.at(i) == "-override-version") || (configCmdLine.at(i) == "-version-override")){
@@ -1159,6 +1162,13 @@ void Configure::parseCmdLine()
dictionary["GRAPHICS_SYSTEM"] = configCmdLine.at(i);
}
+ else if (configCmdLine.at(i) == "-runtimegraphicssystem") {
+ ++i;
+ if (i == argCount)
+ break;
+ dictionary["RUNTIME_SYSTEM"] = configCmdLine.at(i);
+ }
+
else if (configCmdLine.at(i).indexOf(QRegExp("^-(en|dis)able-")) != -1) {
// Scan to see if any specific modules and drivers are enabled or disabled
for (QStringList::Iterator module = modules.begin(); module != modules.end(); ++module) {
@@ -1624,7 +1634,7 @@ bool Configure::displayHelp()
"[-phonon] [-no-phonon-backend] [-phonon-backend]\n"
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
- "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg|runtime]\n\n", 0, 7);
+ "[-no-webkit] [-webkit] [-graphicssystem raster|opengl|openvg]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1729,9 +1739,7 @@ bool Configure::displayHelp()
"Available values for <sys>:");
desc("GRAPHICS_SYSTEM", "raster", "", " raster - Software rasterizer", ' ');
desc("GRAPHICS_SYSTEM", "opengl", "", " opengl - Using OpenGL acceleration, experimental!", ' ');
- desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!", ' ');
- desc("GRAPHICS_SYSTEM", "runtime", "", " runtime - Runtime switching of graphics sytems", ' ');
-
+ desc("GRAPHICS_SYSTEM", "openvg", "", " openvg - Using OpenVG acceleration, experimental!\n", ' ');
desc( "-help, -h, -?", "Display this information.\n");
@@ -2762,6 +2770,17 @@ void Configure::generateOutputVars()
}
if (!psqlLibs.isEmpty())
qmakeVars += QString("QT_LFLAGS_PSQL=") + psqlLibs.section("=", 1);
+
+ {
+ QStringList lflagsTDS;
+ if (!sybase.isEmpty())
+ lflagsTDS += QString("-L") + fixSeparators(sybase.section("=", 1) + "/lib");
+ if (!sybaseLibs.isEmpty())
+ lflagsTDS += sybaseLibs.section("=", 1);
+ if (!lflagsTDS.isEmpty())
+ qmakeVars += QString("QT_LFLAGS_TDS=") + lflagsTDS.join(" ");
+ }
+
if (!qmakeSql.isEmpty())
qmakeVars += QString("sql-drivers += ") + qmakeSql.join(" ");
if (!qmakeSqlPlugins.isEmpty())
@@ -2940,8 +2959,6 @@ void Configure::generateCachefile()
configStream << "#namespaces" << endl << "QT_NAMESPACE = " << dictionary["QT_NAMESPACE"] << endl;
}
- configStream << "#modules" << endl << "for(mod,$$list($$files($$[QMAKE_MKSPECS]/modules/qt_*.pri))):include($$mod)" << endl;
-
configStream.flush();
configFile.close();
}
@@ -3040,6 +3057,9 @@ void Configure::generateConfigfiles()
tmpStream << endl << "// Compile time features" << endl;
tmpStream << "#define QT_ARCH_" << dictionary["ARCHITECTURE"].toUpper() << endl;
+ if (dictionary["GRAPHICS_SYSTEM"] == "runtime" && dictionary["RUNTIME_SYSTEM"] != "runtime")
+ tmpStream << "#define QT_DEFAULT_RUNTIME_SYSTEM \"" << dictionary["RUNTIME_SYSTEM"] << "\"" << endl;
+
QStringList qconfigList;
if (dictionary["STL"] == "no") qconfigList += "QT_NO_STL";
if (dictionary["STYLE_WINDOWS"] != "yes") qconfigList += "QT_NO_STYLE_WINDOWS";
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index ff2ee8b..b3c07f7 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -134,6 +134,8 @@ private:
QStringList qmakeLibs;
QString opensslLibs;
QString psqlLibs;
+ QString sybase;
+ QString sybaseLibs;
QMap<QString,QString> licenseInfo;
QString outputLine;
diff --git a/tools/designer/src/designer/assistantclient.cpp b/tools/designer/src/designer/assistantclient.cpp
index e47817f..bddaf63 100644
--- a/tools/designer/src/designer/assistantclient.cpp
+++ b/tools/designer/src/designer/assistantclient.cpp
@@ -101,7 +101,7 @@ bool AssistantClient::sendCommand(const QString &cmd, QString *errorMessage)
return false;
}
QTextStream str(m_process);
- str << cmd << QLatin1Char('\0') << endl;
+ str << cmd << QLatin1Char('\n') << endl;
return true;
}
diff --git a/tools/designer/src/lib/shared/stylesheeteditor.cpp b/tools/designer/src/lib/shared/stylesheeteditor.cpp
index 955f8e4..bee5210 100644
--- a/tools/designer/src/lib/shared/stylesheeteditor.cpp
+++ b/tools/designer/src/lib/shared/stylesheeteditor.cpp
@@ -79,6 +79,7 @@ StyleSheetEditor::StyleSheetEditor(QWidget *parent)
: QTextEdit(parent)
{
setTabStopWidth(fontMetrics().width(QLatin1Char(' '))*4);
+ setAcceptRichText(false);
new CssHighlighter(document());
}
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 9072bab..e5c8461 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -1347,7 +1347,7 @@ void MainWindow::manual()
<< (QT_VERSION >> 16) << ((QT_VERSION >> 8) & 0xFF)
<< (QT_VERSION & 0xFF)
<< QLatin1String("/qdoc/linguist-manual.html")
- << QLatin1Char('\0') << endl;
+ << QLatin1Char('\n') << endl;
}
void MainWindow::about()
diff --git a/tools/linguist/phrasebooks/french.qph b/tools/linguist/phrasebooks/french.qph
index 9e1a580..1884ed3 100644
--- a/tools/linguist/phrasebooks/french.qph
+++ b/tools/linguist/phrasebooks/french.qph
@@ -801,7 +801,7 @@
</phrase>
<phrase>
<source>Redo</source>
- <target>Annuler Annuler</target>
+ <target>Rétablir</target>
</phrase>
<phrase>
<source>region selection</source>
@@ -1111,10 +1111,6 @@
<target>&amp;Édition</target>
</phrase>
<phrase>
- <source>&amp;Redo</source>
- <target>Re&amp;faire</target>
-</phrase>
-<phrase>
<source>debugger</source>
<target>débogueur</target>
</phrase>
@@ -1438,4 +1434,60 @@
<source>&amp;Debug</source>
<target>&amp;Déboguer</target>
</phrase>
+<phrase>
+ <source>Slider</source>
+ <target>Barre de défilement</target>
+</phrase>
+<phrase>
+ <source>&amp;Restore</source>
+ <target>&amp;Restaurer</target>
+</phrase>
+<phrase>
+ <source>&amp;Move</source>
+ <target>&amp;Déplacer</target>
+</phrase>
+<phrase>
+ <source>New</source>
+ <target>Créer</target>
+</phrase>
+<phrase>
+ <source>Play</source>
+ <target>Lecture</target>
+</phrase>
+<phrase>
+ <source>Slider</source>
+ <target>Barre de défilement</target>
+</phrase>
+<phrase>
+ <source>&amp;Restore</source>
+ <target>&amp;Restaurer</target>
+</phrase>
+<phrase>
+ <source>&amp;Move</source>
+ <target>&amp;Déplacer</target>
+</phrase>
+<phrase>
+ <source>New</source>
+ <target>Créer</target>
+</phrase>
+<phrase>
+ <source>Play</source>
+ <target>Lecture</target>
+</phrase>
+<phrase>
+ <source>&amp;Redo</source>
+ <target>&amp;Refaire</target>
+</phrase>
+<phrase>
+ <source>Raised</source>
+ <target>Bombé</target>
+</phrase>
+<phrase>
+ <source>Sunken</source>
+ <target>Enfoncé</target>
+</phrase>
+<phrase>
+ <source>Run:</source>
+ <target>Exécution :</target>
+</phrase>
</QPH>
diff --git a/tools/linguist/phrasebooks/russian.qph b/tools/linguist/phrasebooks/russian.qph
index 750fda0..5876ee9 100644
--- a/tools/linguist/phrasebooks/russian.qph
+++ b/tools/linguist/phrasebooks/russian.qph
@@ -498,7 +498,7 @@
</phrase>
<phrase>
<source>Next</source>
- <target>Следующий</target>
+ <target>Далее</target>
</phrase>
<phrase>
<source>object</source>
@@ -1070,7 +1070,7 @@
</phrase>
<phrase>
<source>Next</source>
- <target>Далее</target>
+ <target>Следующий</target>
</phrase>
<phrase>
<source>tree view</source>
@@ -1204,4 +1204,16 @@
<source>Permission denied</source>
<target>Доступ запрещён</target>
</phrase>
+<phrase>
+ <source>Previous</source>
+ <target>Предыдущий</target>
+</phrase>
+<phrase>
+ <source>Next</source>
+ <target>Следующее</target>
+</phrase>
+<phrase>
+ <source>Previous</source>
+ <target>Предыдущее</target>
+</phrase>
</QPH>
diff --git a/tools/porting/src/semantic.cpp b/tools/porting/src/semantic.cpp
index 268e037..cf0b141 100644
--- a/tools/porting/src/semantic.cpp
+++ b/tools/porting/src/semantic.cpp
@@ -768,7 +768,7 @@ void Semantic::parseTypedef(TypedefAST *ast)
void Semantic::parseTypeSpecifier(TypeSpecifierAST *ast)
{
// If this is a classSpecifier or a EnumSpecifier we skip the name lookup,
- // becuase looking up the name "E" in a class definition like
+ // because looking up the name "E" in a class definition like
// "class E { ..." makes no sense. (There might be a variable named E
// already declared, but that variable is now shadowed by the class type.)
if( ast->nodeType() != NodeType_EnumSpecifier
@@ -807,7 +807,7 @@ void Semantic::parseNameUse(NameAST* name)
/*
looks up name used in basescope. If name->isGlobal() is true or if classOrNamespaceList()
- returns a non-emty list, the C++ qualified name lookup rules are used. Otherwise the
+ returns a non-empty list, the C++ qualified name lookup rules are used. Otherwise the
unquialified name lookup rules are used. Returns the a list of members that was found,
In most cases this list will contain zero or one element, exept in the case of overloaded functions.
TODO: Argument-dependent name lookup
@@ -975,7 +975,7 @@ FunctionMember *Semantic::functionLookup(CodeModel::Scope *baseScope,
*/
FunctionMember *Semantic::selectFunction(QList<CodeModel::Member*> candidatateList, const DeclaratorAST *functionDeclarator)
{
- // get arguments for funciton we are looking for
+ // get arguments for function we are looking for
FunctionMember testFunction;
parseFunctionArguments(functionDeclarator, &testFunction);
const ArgumentCollection testArgumentCollection = testFunction.arguments();
diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp
index 7130d61..ec86ae3 100644
--- a/tools/qdoc3/codemarker.cpp
+++ b/tools/qdoc3/codemarker.cpp
@@ -624,7 +624,9 @@ QString CodeMarker::macName(const Node *node, const QString &name)
Get the list of documentation sections for the children of
the specified QmlClassNode.
*/
-QList<Section> CodeMarker::qmlSections(const QmlClassNode* , SynopsisStyle )
+QList<Section> CodeMarker::qmlSections(const QmlClassNode* ,
+ SynopsisStyle ,
+ const Tree* )
{
return QList<Section>();
}
diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h
index 53ad4a8..f17b28e 100644
--- a/tools/qdoc3/codemarker.h
+++ b/tools/qdoc3/codemarker.h
@@ -153,7 +153,8 @@ class CodeMarker
Status status) = 0;
#ifdef QDOC_QML
virtual QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style);
+ SynopsisStyle style,
+ const Tree* tree);
#endif
virtual const Node* resolveTarget(const QString& target,
const Tree* tree,
diff --git a/tools/qdoc3/config.h b/tools/qdoc3/config.h
index b087b1c..335a0d6 100644
--- a/tools/qdoc3/config.h
+++ b/tools/qdoc3/config.h
@@ -119,6 +119,7 @@ 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"
@@ -142,9 +143,7 @@ class Config
#define CONFIG_MACRO "macro"
#define CONFIG_NATURALLANGUAGE "naturallanguage"
#define CONFIG_OBSOLETELINKS "obsoletelinks"
-#define CONFIG_ONLINE "online"
-#define CONFIG_OFFLINE "offline"
-#define CONFIG_CREATOR "creator"
+#define CONFIG_APPLICATION "application"
#define CONFIG_OUTPUTDIR "outputdir"
#define CONFIG_OUTPUTENCODING "outputencoding"
#define CONFIG_OUTPUTLANGUAGE "outputlanguage"
diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp
index 562e92b..3615a84 100644
--- a/tools/qdoc3/cppcodemarker.cpp
+++ b/tools/qdoc3/cppcodemarker.cpp
@@ -1127,7 +1127,8 @@ QString CppCodeMarker::addMarkUp(const QString& protectedCode,
Currently, it only handles QML property groups.
*/
QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style)
+ SynopsisStyle style,
+ const Tree* tree)
{
QList<Section> sections;
if (qmlClassNode) {
@@ -1244,6 +1245,48 @@ QList<Section> CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode,
append(sections,qmlmethods);
append(sections,qmlattachedmethods);
}
+ else {
+ FastSection all(qmlClassNode,"","","member","members");
+
+ QStack<const QmlClassNode*> stack;
+ stack.push(qmlClassNode);
+
+ while (!stack.isEmpty()) {
+ const QmlClassNode* ancestorClass = stack.pop();
+
+ NodeList::ConstIterator c = ancestorClass->childNodes().begin();
+ while (c != ancestorClass->childNodes().end()) {
+ // if ((*c)->access() != Node::Private)
+ if ((*c)->subType() == Node::QmlPropertyGroup) {
+ const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(*c);
+ NodeList::ConstIterator p = qpgn->childNodes().begin();
+ while (p != qpgn->childNodes().end()) {
+ if ((*p)->type() == Node::QmlProperty) {
+ insert(all,*p,style,Okay);
+ }
+ ++p;
+ }
+ }
+ else
+ insert(all,*c,style,Okay);
+ ++c;
+ }
+
+ if (!ancestorClass->links().empty()) {
+ if (ancestorClass->links().contains(Node::InheritsLink)) {
+ QPair<QString,QString> linkPair;
+ linkPair = ancestorClass->links()[Node::InheritsLink];
+ QStringList strList(linkPair.first);
+ const Node* n = tree->findNode(strList,Node::Fake);
+ if (n && n->subType() == Node::QmlClass) {
+ const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
+ stack.prepend(qcn);
+ }
+ }
+ }
+ }
+ append(sections, all);
+ }
}
return sections;
diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h
index eca3936..804a302 100644
--- a/tools/qdoc3/cppcodemarker.h
+++ b/tools/qdoc3/cppcodemarker.h
@@ -80,7 +80,8 @@ class CppCodeMarker : public CodeMarker
SynopsisStyle style,
Status status);
QList<Section> qmlSections(const QmlClassNode* qmlClassNode,
- SynopsisStyle style);
+ SynopsisStyle style,
+ const Tree* tree);
const Node* resolveTarget(const QString& target,
const Tree* tree,
const Node* relative,
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 4789c67..7892025 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -440,7 +440,6 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
DITAXMLGENERATOR_GENERATEMACREFS);
project = config.getString(CONFIG_PROJECT);
- offlineDocs = !config.getBool(CONFIG_ONLINE);
projectDescription = config.getString(CONFIG_DESCRIPTION);
if (projectDescription.isEmpty() && !project.isEmpty())
projectDescription = project + " Reference Documentation";
@@ -1765,7 +1764,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
generateQmlInstantiates(qml_cn, marker);
generateBrief(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name) << "\"></a>\n";
@@ -1782,7 +1781,7 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker
generateAlsoList(fake, marker);
out() << "<hr />\n";
- sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
diff --git a/tools/qdoc3/generator.cpp b/tools/qdoc3/generator.cpp
index 24219a1..7f39be2 100644
--- a/tools/qdoc3/generator.cpp
+++ b/tools/qdoc3/generator.cpp
@@ -1068,8 +1068,11 @@ void Generator::generateSince(const Node *node, CodeMarker *marker)
Text text;
text << Atom::ParaLeft
<< "This "
- << typeString(node)
- << " was introduced in ";
+ << typeString(node);
+ if (node->type() == Node::Enum)
+ text << " was introduced or modified in ";
+ else
+ text << " was introduced in ";
if (project.isEmpty())
text << "version";
else
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 76d8c0d..4603a40 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -219,9 +219,7 @@ HtmlGenerator::HtmlGenerator()
inTableHeader(false),
numTableRows(0),
threeColumnEnumValueTable(true),
- offlineDocs(false),
- onlineDocs(false),
- creatorDocs(true),
+ application(Online),
funcLeftParen("\\S(\\()"),
myTree(0),
slow(false),
@@ -290,11 +288,13 @@ void HtmlGenerator::initializeGenerator(const Config &config)
project = config.getString(CONFIG_PROJECT);
- onlineDocs = config.getBool(CONFIG_ONLINE);
-
- offlineDocs = config.getBool(CONFIG_OFFLINE);
-
- creatorDocs = config.getBool(CONFIG_CREATOR);
+ 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())
@@ -1489,7 +1489,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
const QmlClassNode* qml_cn = 0;
if (fake->subType() == Node::QmlClass) {
qml_cn = static_cast<const QmlClassNode*>(fake);
- sections = marker->qmlSections(qml_cn,CodeMarker::Summary);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Summary,0);
generateTableOfContents(fake,marker,&sections);
}
else if (fake->name() != QString("index.html"))
@@ -1571,6 +1571,13 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateQmlInherits(qml_cn, marker);
generateQmlInheritedBy(qml_cn, marker);
generateQmlInstantiates(qml_cn, marker);
+
+ QString allQmlMembersLink = generateAllQmlMembersFile(qml_cn, marker);
+ if (!allQmlMembersLink.isEmpty()) {
+ out() << "<li><a href=\"" << allQmlMembersLink << "\">"
+ << "List of all members, including inherited members</a></li>\n";
+ }
+
s = sections.begin();
while (s != sections.end()) {
out() << "<a name=\"" << registerRef((*s).name.toLower())
@@ -1590,7 +1597,7 @@ void HtmlGenerator::generateFakeNode(const FakeNode *fake, CodeMarker *marker)
generateExtractionMark(fake, EndMark);
//out() << "<hr />\n";
- sections = marker->qmlSections(qml_cn,CodeMarker::Detailed);
+ sections = marker->qmlSections(qml_cn,CodeMarker::Detailed,0);
s = sections.begin();
while (s != sections.end()) {
out() << "<h2>" << protectEnc((*s).name) << "</h2>\n";
@@ -1713,7 +1720,7 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << "</li>\n";
}
if (!cn->name().isEmpty())
- out() << " <li>" << cn->name() << "</li>\n";
+ out() << " <li>" << protectEnc(cn->name()) << "</li>\n";
}
else if (node->type() == Node::Fake) {
const FakeNode* fn = static_cast<const FakeNode*>(node);
@@ -1721,52 +1728,50 @@ void HtmlGenerator::generateBreadCrumbs(const QString& title,
out() << " <li><a href=\"modules.html\">Modules</a></li>";
QString name = node->name();
if (!name.isEmpty())
- out() << " <li>" << name << "</li>\n";
+ out() << " <li>" << protectEnc(name) << "</li>\n";
}
else if (node->subType() == Node::Group) {
if (fn->name() == QString("modules"))
out() << " <li>Modules</li>";
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->subType() == Node::Page) {
if (fn->name() == QString("qdeclarativeexamples.html")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>QML Examples & Demos</li>";
+ out() << " <li>QML Examples &amp; Demos</li>";
}
else if (fn->name().startsWith("examples-")) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
else if (fn->name() == QString("namespaces.html")) {
out() << " <li>Namespaces</li>";
}
else {
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->subType() == Node::QmlClass) {
out() << " <li><a href=\"qdeclarativeelements.html\">QML Elements</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
else if (node->subType() == Node::Example) {
out() << " <li><a href=\"all-examples.html\">Examples</a></li>";
QStringList sl = fn->name().split('/');
if (sl.contains("declarative"))
- out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples & Demos</a></li>";
+ out() << " <li><a href=\"qdeclarativeexamples.html\">QML Examples &amp; Demos</a></li>";
else {
- QString name = "examples-" + sl.at(0) + ".html";
+ QString name = protectEnc("examples-" + sl.at(0) + ".html"); // this generates an empty link
QString t = CodeParser::titleFromName(name);
- out() << " <li><a href=\"" << name << "\">"
- << t << "</a></li>";
}
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
else if (node->type() == Node::Namespace) {
out() << " <li><a href=\"namespaces.html\">Namespaces</a></li>";
- out() << " <li>" << title << "</li>";
+ out() << " <li>" << protectEnc(title) << "</li>";
}
}
@@ -1811,9 +1816,8 @@ void HtmlGenerator::generateHeader(const QString& title,
// Setting some additional style sheet related details depending on configuration (e.g. online/offline)
-
- if(onlineDocs==true) // onlineDocs is for the web
- {
+ switch (application) {
+ case Online:
// Browser spec styles
out() << " <!--[if IE]>\n";
out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
@@ -1832,22 +1836,15 @@ void HtmlGenerator::generateHeader(const QString& title,
out() << "</head>\n";
// CheckEmptyAndLoadList activating search
out() << "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n";
- }
- else if (offlineDocs == true) // offlineDocs is for ???
- {
- out() << "</head>\n";
- out() << "<body class=\"offline \">\n"; // offline
- }
- else if (creatorDocs == true) // creatorDocs is for Assistant/Creator
- {
+ break;
+ case Creator:
out() << "</head>\n";
out() << "<body class=\"offline narrow creator\">\n"; // offline narrow
- }
- // default -- not used except if one forgets to set any of the above settings to true
- else
- {
+ break;
+ default:
out() << "</head>\n";
- out() << "<body>\n";
+ out() << "<body>\n";
+ break;
}
#ifdef GENERATE_MAC_REFS
@@ -1855,31 +1852,77 @@ void HtmlGenerator::generateHeader(const QString& title,
generateMacRef(node, marker);
#endif
-
- if(onlineDocs==true) // onlineDocs is for the web
- {
+ switch (application) {
+ case Online:
out() << QString(postHeader).replace("\\" + COMMAND_VERSION, myTree->version());
generateBreadCrumbs(title,node,marker);
out() << QString(postPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- }
- else if (offlineDocs == true) // offlineDocs is for ???
- {
- out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- generateBreadCrumbs(title,node,marker);
- out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- }
- else if (creatorDocs == true) // creatorDocs is for Assistant/Creator
- {
+ break;
+ case Creator:
out() << QString(creatorPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
generateBreadCrumbs(title,node,marker);
out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
- }
- // default -- not used except if one forgets to set any of the above settings to true
- else
- {
+ 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());
+ out() << QString(creatorPostPostHeader).replace("\\" + COMMAND_VERSION, myTree->version());
+ break;
+ }
+
+ navigationLinks.clear();
+
+ if (node && !node->links().empty()) {
+ QPair<QString,QString> linkPair;
+ QPair<QString,QString> anchorPair;
+ const Node *linkNode;
+
+ if (node->links().contains(Node::PreviousLink)) {
+ linkPair = node->links()[Node::PreviousLink];
+ linkNode = findNodeForTarget(linkPair.first, node, marker);
+ if (!linkNode || linkNode == node)
+ anchorPair = linkPair;
+ else
+ anchorPair = anchorForNode(linkNode);
+
+ out() << " <link rel=\"prev\" href=\""
+ << anchorPair.first << "\" />\n";
+
+ navigationLinks += "[Previous: <a href=\"" + anchorPair.first + "\">";
+ if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
+ navigationLinks += protect(anchorPair.second);
+ else
+ navigationLinks += protect(linkPair.second);
+ navigationLinks += "</a>]\n";
+ }
+ if (node->links().contains(Node::NextLink)) {
+ linkPair = node->links()[Node::NextLink];
+ linkNode = findNodeForTarget(linkPair.first, node, marker);
+ if (!linkNode || linkNode == node)
+ anchorPair = linkPair;
+ else
+ anchorPair = anchorForNode(linkNode);
+
+ out() << " <link rel=\"next\" href=\""
+ << anchorPair.first << "\" />\n";
+
+ navigationLinks += "[Next: <a href=\"" + anchorPair.first + "\">";
+ if (linkPair.first == linkPair.second && !anchorPair.second.isEmpty())
+ navigationLinks += protect(anchorPair.second);
+ else
+ navigationLinks += protect(linkPair.second);
+ navigationLinks += "</a>]\n";
+ }
+ if (node->links().contains(Node::StartLink)) {
+ linkPair = node->links()[Node::StartLink];
+ linkNode = findNodeForTarget(linkPair.first, node, marker);
+ if (!linkNode || linkNode == node)
+ anchorPair = linkPair;
+ else
+ anchorPair = anchorForNode(linkNode);
+ out() << " <link rel=\"start\" href=\""
+ << anchorPair.first << "\" />\n";
+ }
}
#if 0 // Removed for new doc format. MWS
@@ -1914,34 +1957,30 @@ void HtmlGenerator::generateFooter(const Node *node)
out() << QString(footer).replace("\\" + COMMAND_VERSION, myTree->version())
<< QString(address).replace("\\" + COMMAND_VERSION, myTree->version());
-
- if (onlineDocs == true)
- {
- 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'); ga.type = 'text/javascript'; ga.async = true;\n";
- out() << " ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.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";
- }
- else if (offlineDocs == true)
- {
- out() << "</body>\n";
- }
- else if (creatorDocs == true)
- {
- out() << "</body>\n";
- }
- else
- {
- out() << "</body>\n";
- }
+
+ 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";
}
@@ -1977,7 +2016,7 @@ void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker)
}
/*!
- Generates a table of contents begining at \a node.
+ Generates a table of contents beginning at \a node.
*/
void HtmlGenerator::generateTableOfContents(const Node *node,
CodeMarker *marker,
@@ -2063,7 +2102,7 @@ void HtmlGenerator::generateTableOfContents(const Node *node,
/*!
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 HtmlGenerator::generateTableOfContents(const Node *node,
CodeMarker *marker,
@@ -2241,6 +2280,38 @@ QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner,
return fileName;
}
+/*!
+ This function creates an html page on which are listed all
+ the members of QML class \a qml_cn, including the inherited
+ members. The \a marker is used for formatting stuff.
+ */
+QString HtmlGenerator::generateAllQmlMembersFile(const QmlClassNode* qml_cn,
+ CodeMarker* marker)
+{
+ QList<Section> sections;
+ QList<Section>::ConstIterator s;
+
+ sections = marker->qmlSections(qml_cn,CodeMarker::SeparateList,myTree);
+ if (sections.isEmpty())
+ return QString();
+
+ QString fileName = fileBase(qml_cn) + "-members." + fileExtension(qml_cn);
+ beginSubPage(qml_cn->location(), fileName);
+ QString title = "List of All Members for " + qml_cn->name();
+ generateHeader(title, qml_cn, marker);
+ generateTitle(title, Text(), SmallSubTitle, qml_cn, marker);
+ out() << "<p>This is the complete list of members for ";
+ generateFullName(qml_cn, 0, marker);
+ out() << ", including inherited members.</p>\n";
+
+ Section section = sections.first();
+ generateSectionList(section, 0, marker, CodeMarker::SeparateList);
+
+ generateFooter();
+ endSubPage();
+ return fileName;
+}
+
QString HtmlGenerator::generateLowStatusMemberFile(const InnerNode *inner,
CodeMarker *marker,
CodeMarker::Status status)
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index d92c349..eab10c6 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -95,6 +95,10 @@ class HtmlGenerator : public PageGenerator
LastSinceType
};
+ enum Application {
+ Online,
+ Creator};
+
public:
HtmlGenerator();
~HtmlGenerator();
@@ -164,7 +168,10 @@ class HtmlGenerator : public PageGenerator
void generateTableOfContents(const Node *node,
CodeMarker *marker,
QList<Section>* sections = 0);
- QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker);
+ QString generateListOfAllMemberFile(const InnerNode *inner,
+ CodeMarker *marker);
+ QString generateAllQmlMembersFile(const QmlClassNode* qml_cn,
+ CodeMarker* marker);
QString generateLowStatusMemberFile(const InnerNode *inner,
CodeMarker *marker,
CodeMarker::Status status);
@@ -294,9 +301,7 @@ class HtmlGenerator : public PageGenerator
bool inTableHeader;
int numTableRows;
bool threeColumnEnumValueTable;
- bool onlineDocs;
- bool offlineDocs;
- bool creatorDocs;
+ Application application;
QString link;
QStringList sectionNumber;
QRegExp funcLeftParen;
diff --git a/tools/qdoc3/main.cpp b/tools/qdoc3/main.cpp
index 616ae2f..fa7efee 100644
--- a/tools/qdoc3/main.cpp
+++ b/tools/qdoc3/main.cpp
@@ -105,6 +105,7 @@ 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.
@@ -192,6 +193,24 @@ 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);
@@ -462,12 +481,16 @@ 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);
}
}
- if (qdocFiles.isEmpty()) {
+ if (qdocFiles.isEmpty()) {
printHelp();
return EXIT_FAILURE;
}
@@ -475,8 +498,10 @@ int main(int argc, char **argv)
/*
Main loop.
*/
- foreach (QString qf, qdocFiles)
+ foreach (QString qf, qdocFiles) {
+ //qDebug() << "PROCESSING:" << qf;
processQdocconfFile(qf);
+ }
qDeleteAll(trees);
return EXIT_SUCCESS;
diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf
index 6b7044a..ab2b69a 100644
--- a/tools/qdoc3/test/assistant.qdocconf
+++ b/tools/qdoc3/test/assistant.qdocconf
@@ -7,9 +7,6 @@ include(qt-defines.qdocconf)
project = Qt Assistant
description = Qt Assistant Manual
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
@@ -19,39 +16,39 @@ qhp.Assistant.file = assistant.qhp
qhp.Assistant.namespace = com.trolltech.assistant.480
qhp.Assistant.virtualFolder = qdoc
qhp.Assistant.indexTitle = Qt Assistant Manual
-qhp.Assistant.extraFiles = images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ul_blank.png \
- images/header_bg.png \
+qhp.Assistant.extraFiles = 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/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
images/bullet_dn.png \
- images/bullet_sq.png \
+ images/bullet_sq.png \
images/bullet_up.png \
- images/arrow_down.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/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
+ 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.Assistant.filterAttributes = qt 4.8.0 tools assistant
qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual
diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf
index d479151..1bb366d 100644
--- a/tools/qdoc3/test/designer.qdocconf
+++ b/tools/qdoc3/test/designer.qdocconf
@@ -7,9 +7,6 @@ include(qt-defines.qdocconf)
project = Qt Designer
description = Qt Designer Manual
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf
index f3578bc..4cb4cc7 100644
--- a/tools/qdoc3/test/linguist.qdocconf
+++ b/tools/qdoc3/test/linguist.qdocconf
@@ -7,9 +7,6 @@ include(qt-defines.qdocconf)
project = Qt Linguist
description = Qt Linguist Manual
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/qdeclarative.qdocconf b/tools/qdoc3/test/qdeclarative.qdocconf
index 0cff98e..80bca29 100644
--- a/tools/qdoc3/test/qdeclarative.qdocconf
+++ b/tools/qdoc3/test/qdeclarative.qdocconf
@@ -8,9 +8,6 @@ project = Qml
description = Qml Reference Documentation
url = http://qt.nokia.com/doc/4.7/
qmlonly = true
-online = false
-offline = false
-creator = true
edition.Console.modules = QtCore QtDBus QtNetwork QtScript QtSql QtXml \
QtXmlPatterns QtTest
@@ -31,32 +28,32 @@ qhp.Qml.indexTitle = Qml Reference
# Files not referenced in any qdoc file
# See also extraimages.HTML
qhp.Qml.extraFiles = images/bg_l.png \
- images/bg_l_blank.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/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/arrow-down.png \
- images/spinner.png \
- images/stylesheet-coffee-plastique.png \
- images/taskmenuextension-example.png \
- images/coloreditorfactoryimage.png \
- images/dynamiclayouts-example.png \
- scripts/functions.js \
- scripts/jquery.js \
- style/OfflineStyle.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
+ images/bg_l_blank.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/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/arrow-down.png \
+ images/spinner.png \
+ images/stylesheet-coffee-plastique.png \
+ images/taskmenuextension-example.png \
+ images/coloreditorfactoryimage.png \
+ images/dynamiclayouts-example.png \
+ scripts/functions.js \
+ scripts/jquery.js \
+ style/OfflineStyle.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
qhp.Qml.filterAttributes = qt 4.7.0 qtrefdoc
qhp.Qml.customFilters.Qt.name = Qt 4.7.0
diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf
index 4efd19a..04fe6f8 100644
--- a/tools/qdoc3/test/qmake.qdocconf
+++ b/tools/qdoc3/test/qmake.qdocconf
@@ -7,9 +7,6 @@ include(qt-defines.qdocconf)
project = QMake
description = QMake Manual
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index
diff --git a/tools/qdoc3/test/qt-api-only.qdocconf b/tools/qdoc3/test/qt-api-only.qdocconf
index 1ec0c6b..cdd7a7c 100644
--- a/tools/qdoc3/test/qt-api-only.qdocconf
+++ b/tools/qdoc3/test/qt-api-only.qdocconf
@@ -5,9 +5,6 @@ include(qt-build-docs.qdocconf)
# qmake.qdocconf).
url = ./
-online = false
-offline = false
-creator = true
# Ensures that the documentation for the tools is not included in the generated
# .qhp file.
@@ -30,10 +27,7 @@ qhp.Qt.excluded += $QT_SOURCE_TREE/doc/src/development/assistant-manual.qdoc \
# Remove the QML documentation from the Qt-only documentation.
-excludedirs += $QT_SOURCE_TREE/src/declarative \
- $QT_SOURCE_TREE/src/imports \
- $QT_SOURCE_TREE/src/3rdparty/webkit/WebKit/qt/declarative \
- $QT_SOURCE_TREE/doc/src/declarative
+excludedirs += $QT_SOURCE_TREE/src/imports
outputdir = $QT_BUILD_TREE/doc-build/html-qt
tagfile = $QT_BUILD_TREE/doc-build/html-qt/qt.tags
diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf
index 5ed97eb..a674c72 100644
--- a/tools/qdoc3/test/qt-build-docs.qdocconf
+++ b/tools/qdoc3/test/qt-build-docs.qdocconf
@@ -7,9 +7,6 @@ include(qt-defines.qdocconf)
project = Qt
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
sourceencoding = UTF-8
outputencoding = UTF-8
@@ -21,6 +18,7 @@ qhp.Qt.file = qt.qhp
qhp.Qt.namespace = com.trolltech.qt.480
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
diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
index 4963b96..b78b512 100644
--- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf
+++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf
@@ -64,6 +64,7 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \
Q_XMLSTREAM_EXPORT \
Q_XMLPATTERNS_EXPORT \
QDBUS_EXPORT \
+ Q_DBUS_EXPORT \
QT_BEGIN_NAMESPACE \
QT_BEGIN_INCLUDE_NAMESPACE \
QT_END_NAMESPACE \
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index e31a5ea..03dd008 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -4,15 +4,12 @@ HTML.stylesheets = style/style.css \
style/style_ie8.css \
style/style_ie6.css
-HTML.creatorpostheader = "**\n"
-HTML.creatorpostpostheader = "***\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" \
+ " <div id=\"narrowsearch\"><form onsubmit=\"return false;\" action=\"\" id=\"qtdocsearchTop\">\n" \
" <fieldset>\n" \
" <input type=\"text\" value=\"\" id=\"pageType2\" name=\"searchstring\"/>\n" \
" </fieldset>\n" \
@@ -30,7 +27,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <div id=\"shortCut\">\n" \
" <ul>\n" \
" <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.8</a></span></li>\n" \
- " <li class=\"shortCut-topleft-active\"><a href=\"http://qt.nokia.com/doc/\">ALL VERSIONS" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
" </a></li>\n" \
" </ul>\n" \
" </div>\n" \
@@ -41,14 +38,14 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\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=\"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 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=\"qtquick.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" \
" <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
@@ -100,7 +97,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\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=\"qtquick.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" \
@@ -149,6 +146,7 @@ HTML.footer = " <!-- /div -->\n" \
" <span></span>\n" \
" </div>\n" \
" </div> \n" \
+ " </div> \n" \
" <div class=\"footer\">\n" \
" <p>\n" \
" <acronym title=\"Copyright\">&copy;</acronym> 2008-2010 Nokia Corporation and/or its\n" \
@@ -161,11 +159,12 @@ HTML.footer = " <!-- /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. <div 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>.</div></p>\n" \
+ " <p id=\"noteHead\">Thank you for giving your feedback.</p> <div class=\"note\"><p>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></div>\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"
+ " </div>\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 027548e..e2abd2a 100644
--- a/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates_ja_JP.qdocconf
@@ -160,19 +160,9 @@ HTML.footer = " <!-- /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 you feedback...</textarea></p>\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" \
- "<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"
+ " </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 94ac431..2c5c9d9 100644
--- a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf
@@ -1,25 +1,168 @@
-HTML.stylesheets = classic.css
-HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" 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 width=\"1\">&nbsp;&nbsp;</td>" \
- "<td class=\"postheader\" valign=\"center\">" \
- "<a href=\"http://qt.nokia.com/doc/4.8/index.html\">" \
- "<font color=\"#004faf\">主页</font></a>&nbsp;&middot;" \
- " <a href=\"http://qt.nokia.com/doc/4.8/classes.html\">" \
- "<font color=\"#004faf\">所有类</font></a>&nbsp;&middot;" \
- " <a href=\"http://qt.nokia.com/doc/4.8/functions.html\">" \
- "<font color=\"#004faf\">所有函数</font></a>&nbsp;&middot;" \
- " <a href=\"http://qt.nokia.com/doc/4.8/overviews.html\">" \
- "<font color=\"#004faf\">简介</font></a>" \
- "</td>" \
- "</tr></table>"
+HTML.stylesheets = style/style.css \
+ style/OfflineStyle.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style_ie6.css
-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\">版权所有 &copy; 2010 诺基亚公司和/或其子公司</td>\n" \
- "<td width=\"20%\" align=\"center\"><a href=\"trademarks.html\">商标</a></td>\n" \
- "<td width=\"40%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
- "</tr></table></div></address>"
+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.8</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" \
+ " </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.qdocconf b/tools/qdoc3/test/qt.qdocconf
index 0e1f5f8..7095d1a 100644
--- a/tools/qdoc3/test/qt.qdocconf
+++ b/tools/qdoc3/test/qt.qdocconf
@@ -9,9 +9,6 @@ versionsym =
version = %VERSION%
description = Qt Reference Documentation
url = http://qt.nokia.com/doc/4.8
-online = false
-offline = false
-creator = true
sourceencoding = UTF-8
outputencoding = UTF-8
diff --git a/tools/qml/Info_mac.plist b/tools/qml/Info_mac.plist
index 80ca6a3..0877547 100644
--- a/tools/qml/Info_mac.plist
+++ b/tools/qml/Info_mac.plist
@@ -14,5 +14,36 @@
<string>@TYPEINFO@</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
+ <key>UTExportedTypeDeclarations</key>
+ <array>
+ <dict>
+ <key>UTTypeIdentifier</key>
+ <string>com.nokia.qt.qml</string>
+ <key>UTTypeDescription</key>
+ <string>Qt Markup Language</string>
+ <key>UTTypeConformsTo</key>
+ <array>
+ <string>public.plain-text</string>
+ </array>
+ <key>UTTypeTagSpecification</key>
+ <dict>
+ <key>public.filename-extension</key>
+ <array>
+ <string>qml</string>
+ </array>
+ </dict>
+ </dict>
+ </array>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>LSItemContentTypes</key>
+ <array>
+ <string>com.nokia.qt.qml</string>
+ </array>
+ <key>CFBundleTypeRole</key>
+ <string>Viewer</string>
+ </dict>
+ </array>
</dict>
</plist>
diff --git a/tools/qml/content/Browser.qml b/tools/qml/browser/Browser.qml
index ff2bb47..ff2bb47 100644
--- a/tools/qml/content/Browser.qml
+++ b/tools/qml/browser/Browser.qml
diff --git a/tools/qml/browser/browser.qrc b/tools/qml/browser/browser.qrc
new file mode 100644
index 0000000..9c688e7
--- /dev/null
+++ b/tools/qml/browser/browser.qrc
@@ -0,0 +1,9 @@
+<RCC>
+ <qresource prefix="/browser">
+ <file>Browser.qml</file>
+ <file>images/up.png</file>
+ <file>images/folder.png</file>
+ <file>images/titlebar.sci</file>
+ <file>images/titlebar.png</file>
+ </qresource>
+</RCC>
diff --git a/tools/qml/content/images/folder.png b/tools/qml/browser/images/folder.png
index e53e2ad..e53e2ad 100644
--- a/tools/qml/content/images/folder.png
+++ b/tools/qml/browser/images/folder.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.png b/tools/qml/browser/images/titlebar.png
index 51c9008..51c9008 100644
--- a/tools/qml/content/images/titlebar.png
+++ b/tools/qml/browser/images/titlebar.png
Binary files differ
diff --git a/tools/qml/content/images/titlebar.sci b/tools/qml/browser/images/titlebar.sci
index 0418d94..0418d94 100644
--- a/tools/qml/content/images/titlebar.sci
+++ b/tools/qml/browser/images/titlebar.sci
diff --git a/tools/qml/content/images/up.png b/tools/qml/browser/images/up.png
index b05f802..b05f802 100644
--- a/tools/qml/content/images/up.png
+++ b/tools/qml/browser/images/up.png
Binary files differ
diff --git a/tools/qml/deviceorientation_symbian.cpp b/tools/qml/deviceorientation_symbian.cpp
index c305f94..307c417 100644
--- a/tools/qml/deviceorientation_symbian.cpp
+++ b/tools/qml/deviceorientation_symbian.cpp
@@ -110,22 +110,27 @@ private:
void DataReceived(CSensrvChannel &channel, TInt count, TInt dataLost)
{
+ Q_UNUSED(dataLost)
if (channel.GetChannelInfo().iChannelType == KSensrvChannelTypeIdOrientationData) {
TSensrvOrientationData data;
for (int i = 0; i < count; ++i) {
TPckgBuf<TSensrvOrientationData> dataBuf;
channel.GetData(dataBuf);
data = dataBuf();
- Orientation o = UnknownOrientation;
+ Orientation orientation = UnknownOrientation;
switch (data.iDeviceOrientation) {
case TSensrvOrientationData::EOrientationDisplayUp:
- o = Portrait;
+ orientation = Portrait;
break;
case TSensrvOrientationData::EOrientationDisplayRightUp:
- o = Landscape;
+ orientation = Landscape;
break;
case TSensrvOrientationData::EOrientationDisplayLeftUp:
+ orientation = LandscapeInverted;
+ break;
case TSensrvOrientationData::EOrientationDisplayDown:
+ orientation = PortraitInverted;
+ break;
case TSensrvOrientationData::EOrientationUndefined:
case TSensrvOrientationData::EOrientationDisplayUpwards:
case TSensrvOrientationData::EOrientationDisplayDownwards:
@@ -133,8 +138,8 @@ private:
break;
}
- if (m_current != o && o != UnknownOrientation) {
- m_current = o;
+ if (m_current != orientation && orientation != UnknownOrientation) {
+ m_current = orientation;
emit orientationChanged();
}
}
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 4b1162e..7421b5e 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -56,7 +56,8 @@ QT_USE_NAMESPACE
QtMsgHandler systemMsgOutput = 0;
-
+static QDeclarativeViewer *openFile(const QString &fileName);
+static void showViewer(QDeclarativeViewer *viewer);
#if defined (Q_OS_SYMBIAN)
#include <unistd.h>
@@ -117,6 +118,11 @@ void myMessageOutput(QtMsgType type, const char *msg)
#endif
+static QDeclarativeViewer* globalViewer = 0;
+
+// The qml file that is shown if the user didn't specify a QML file
+QString initialFile = "qrc:/startup/startup.qml";
+
void usage()
{
qWarning("Usage: qmlviewer [options] <filename>");
@@ -175,135 +181,200 @@ void scriptOptsUsage()
enum WarningsConfig { ShowWarnings, HideWarnings, DefaultWarnings };
-int main(int argc, char ** argv)
+struct ViewerOptions
{
-#if defined (Q_OS_SYMBIAN)
- qInstallMsgHandler(myMessageOutput);
-#else
- systemMsgOutput = qInstallMsgHandler(myMessageOutput);
+ ViewerOptions()
+ : frameless(false),
+ fps(0.0),
+ autorecord_from(0),
+ autorecord_to(0),
+ dither("none"),
+ runScript(false),
+ devkeys(false),
+ cache(0),
+ useGL(false),
+ fullScreen(false),
+ stayOnTop(false),
+ maximized(false),
+ useNativeFileBrowser(true),
+ experimentalGestures(false),
+ warningsConfig(DefaultWarnings),
+ sizeToView(true)
+ {
+#if defined(Q_OS_SYMBIAN)
+ maximized = true;
+ useNativeFileBrowser = false;
#endif
-#if defined (Q_OS_WIN)
- // Debugging output is not visible by default on Windows -
- // therefore show modal dialog with errors instad.
- atexit(showWarnings);
+#if defined(Q_WS_MAC)
+ useGL = true;
#endif
-
-#if defined (Q_WS_X11) || defined (Q_WS_MAC)
- //### default to using raster graphics backend for now
- bool gsSpecified = false;
- for (int i = 0; i < argc; ++i) {
- QString arg = argv[i];
- if (arg == "-graphicssystem") {
- gsSpecified = true;
- break;
- }
}
- if (!gsSpecified)
- QApplication::setGraphicsSystem("raster");
-#endif
-
- QApplication app(argc, argv);
- app.setApplicationName("QtQmlViewer");
- app.setOrganizationName("Nokia");
- app.setOrganizationDomain("nokia.com");
-
-
-
- QDeclarativeViewer::registerTypes();
- QDeclarativeTester::registerTypes();
-
- bool frameless = false;
- QString fileName;
- double fps = 0;
- int autorecord_from = 0;
- int autorecord_to = 0;
- QString dither = "none";
+ bool frameless;
+ double fps;
+ int autorecord_from;
+ int autorecord_to;
+ QString dither;
QString recordfile;
QStringList recordargs;
QStringList imports;
QStringList plugins;
QString script;
QString scriptopts;
- bool runScript = false;
- bool devkeys = false;
- int cache = 0;
+ bool runScript;
+ bool devkeys;
+ int cache;
QString translationFile;
- bool useGL = false;
- bool fullScreen = false;
- bool stayOnTop = false;
- bool maximized = false;
- bool useNativeFileBrowser = true;
- bool experimentalGestures = false;
+ bool useGL;
+ bool fullScreen;
+ bool stayOnTop;
+ bool maximized;
+ bool useNativeFileBrowser;
+ bool experimentalGestures;
- WarningsConfig warningsConfig = DefaultWarnings;
- bool sizeToView = true;
+ WarningsConfig warningsConfig;
+ bool sizeToView;
-#if defined(Q_OS_SYMBIAN)
- maximized = true;
- useNativeFileBrowser = false;
-#endif
+ QDeclarativeViewer::ScriptOptions scriptOptions;
+};
-#if defined(Q_WS_MAC)
- useGL = true;
-#endif
+static ViewerOptions opts;
+static QStringList fileNames;
- for (int i = 1; i < argc; ++i) {
- bool lastArg = (i == argc - 1);
- QString arg = argv[i];
+class Application : public QApplication
+{
+ Q_OBJECT
+public:
+ Application(int &argc, char **&argv)
+ : QApplication(argc, argv)
+ {}
+
+protected:
+ bool event(QEvent *ev)
+ {
+ if (ev->type() != QEvent::FileOpen)
+ return QApplication::event(ev);
+
+ QFileOpenEvent *fev = static_cast<QFileOpenEvent *>(ev);
+
+ globalViewer->open(fev->file());
+ if (!globalViewer->isVisible())
+ showViewer(globalViewer);
+
+ return true;
+ }
+
+private Q_SLOTS:
+ void showInitialViewer()
+ {
+ QApplication::processEvents();
+
+ QDeclarativeViewer *viewer = globalViewer;
+ if (!viewer)
+ return;
+ if (viewer->currentFile().isEmpty()) {
+ if(opts.useNativeFileBrowser)
+ viewer->open(initialFile);
+ else
+ viewer->openFile();
+ }
+ if (!viewer->isVisible())
+ showViewer(viewer);
+ }
+};
+
+static void parseScriptOptions()
+{
+ QStringList options =
+ opts.scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
+
+ QDeclarativeViewer::ScriptOptions scriptOptions = 0;
+ for (int i = 0; i < options.count(); ++i) {
+ const QString &option = options.at(i);
+ if (option == QLatin1String("help")) {
+ scriptOptsUsage();
+ } else if (option == QLatin1String("play")) {
+ scriptOptions |= QDeclarativeViewer::Play;
+ } else if (option == QLatin1String("record")) {
+ scriptOptions |= QDeclarativeViewer::Record;
+ } else if (option == QLatin1String("testimages")) {
+ scriptOptions |= QDeclarativeViewer::TestImages;
+ } else if (option == QLatin1String("testerror")) {
+ scriptOptions |= QDeclarativeViewer::TestErrorProperty;
+ } else if (option == QLatin1String("exitoncomplete")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnComplete;
+ } else if (option == QLatin1String("exitonfailure")) {
+ scriptOptions |= QDeclarativeViewer::ExitOnFailure;
+ } else if (option == QLatin1String("saveonexit")) {
+ scriptOptions |= QDeclarativeViewer::SaveOnExit;
+ } else if (option == QLatin1String("snapshot")) {
+ scriptOptions |= QDeclarativeViewer::Snapshot;
+ } else {
+ scriptOptsUsage();
+ }
+ }
+
+ opts.scriptOptions = scriptOptions;
+}
+
+static void parseCommandLineOptions(const QStringList &arguments)
+{
+ for (int i = 1; i < arguments.count(); ++i) {
+ bool lastArg = (i == arguments.count() - 1);
+ QString arg = arguments.at(i);
if (arg == "-frameless") {
- frameless = true;
+ opts.frameless = true;
} else if (arg == "-maximized") {
- maximized = true;
+ opts.maximized = true;
} else if (arg == "-fullscreen") {
- fullScreen = true;
+ opts.fullScreen = true;
} else if (arg == "-stayontop") {
- stayOnTop = true;
+ opts.stayOnTop = true;
} else if (arg == "-netcache") {
if (lastArg) usage();
- cache = QString(argv[++i]).toInt();
+ opts.cache = arguments.at(++i).toInt();
} else if (arg == "-recordrate") {
if (lastArg) usage();
- fps = QString(argv[++i]).toDouble();
+ opts.fps = arguments.at(++i).toDouble();
} else if (arg == "-recordfile") {
if (lastArg) usage();
- recordfile = QString(argv[++i]);
+ opts.recordfile = arguments.at(++i);
} else if (arg == "-record") {
if (lastArg) usage();
- recordargs << QString(argv[++i]);
+ opts.recordargs << arguments.at(++i);
} else if (arg == "-recorddither") {
if (lastArg) usage();
- dither = QString(argv[++i]);
+ opts.dither = arguments.at(++i);
} else if (arg == "-autorecord") {
if (lastArg) usage();
- QString range = QString(argv[++i]);
+ QString range = arguments.at(++i);
int dash = range.indexOf('-');
if (dash > 0)
- autorecord_from = range.left(dash).toInt();
- autorecord_to = range.mid(dash+1).toInt();
+ opts.autorecord_from = range.left(dash).toInt();
+ opts.autorecord_to = range.mid(dash+1).toInt();
} else if (arg == "-devicekeys") {
- devkeys = true;
+ opts.devkeys = true;
} else if (arg == "-dragthreshold") {
if (lastArg) usage();
- app.setStartDragDistance(QString(argv[++i]).toInt());
+ qApp->setStartDragDistance(arguments.at(++i).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
qWarning("Qt QML Viewer version %s", QT_VERSION_STR);
exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();
- translationFile = argv[++i];
+ opts.translationFile = arguments.at(++i);
} else if (arg == "-opengl") {
- useGL = true;
+ opts.useGL = true;
} else if (arg == "-qmlbrowser") {
- useNativeFileBrowser = false;
+ opts.useNativeFileBrowser = false;
} else if (arg == "-warnings") {
if (lastArg) usage();
- QString warningsStr = QString(argv[++i]);
+ QString warningsStr = arguments.at(++i);
if (warningsStr == QLatin1String("show")) {
- warningsConfig = ShowWarnings;
+ opts.warningsConfig = ShowWarnings;
} else if (warningsStr == QLatin1String("hide")) {
- warningsConfig = HideWarnings;
+ opts.warningsConfig = HideWarnings;
} else {
usage();
}
@@ -316,152 +387,203 @@ int main(int argc, char ** argv)
qWarning("Current search path: %s", paths.toLocal8Bit().constData());
exit(0);
}
- imports << QString(argv[++i]);
+ opts.imports << arguments.at(++i);
} else if (arg == "-P") {
if (lastArg) usage();
- plugins << QString(argv[++i]);
+ opts.plugins << arguments.at(++i);
} else if (arg == "-script") {
if (lastArg) usage();
- script = QString(argv[++i]);
+ opts.script = arguments.at(++i);
} else if (arg == "-scriptopts") {
if (lastArg) usage();
- scriptopts = QString(argv[++i]);
+ opts.scriptopts = arguments.at(++i);
} else if (arg == "-savescript") {
if (lastArg) usage();
- script = QString(argv[++i]);
- runScript = false;
+ opts.script = arguments.at(++i);
+ opts.runScript = false;
} else if (arg == "-playscript") {
if (lastArg) usage();
- script = QString(argv[++i]);
- runScript = true;
+ opts.script = arguments.at(++i);
+ opts.runScript = true;
} else if (arg == "-sizeviewtorootobject") {
- sizeToView = false;
+ opts.sizeToView = false;
} else if (arg == "-sizerootobjecttoview") {
- sizeToView = true;
+ opts.sizeToView = true;
} else if (arg == "-experimentalgestures") {
- experimentalGestures = true;
- } else if (arg[0] != '-') {
- fileName = arg;
- } else if (1 || arg == "-help") {
+ opts.experimentalGestures = true;
+ } else if (!arg.startsWith('-')) {
+ fileNames.append(arg);
+ } else if (true || arg == "-help") {
usage();
}
}
- QTranslator qmlTranslator;
- if (!translationFile.isEmpty()) {
- qmlTranslator.load(translationFile);
- app.installTranslator(&qmlTranslator);
+ if (!opts.scriptopts.isEmpty()) {
+
+ parseScriptOptions();
+
+ if (opts.script.isEmpty())
+ usage();
+
+ if (!(opts.scriptOptions & QDeclarativeViewer::Record) && !(opts.scriptOptions & QDeclarativeViewer::Play))
+ scriptOptsUsage();
+ } else if (!opts.script.isEmpty()) {
+ usage();
}
- Qt::WFlags wflags = (frameless ? Qt::FramelessWindowHint : Qt::Widget);
- if (stayOnTop)
+}
+
+static QDeclarativeViewer *createViewer()
+{
+ Qt::WFlags wflags = (opts.frameless ? Qt::FramelessWindowHint : Qt::Widget);
+ if (opts.stayOnTop)
wflags |= Qt::WindowStaysOnTopHint;
QDeclarativeViewer *viewer = new QDeclarativeViewer(0, wflags);
viewer->setAttribute(Qt::WA_DeleteOnClose, true);
- if (!scriptopts.isEmpty()) {
- QStringList options =
- scriptopts.split(QLatin1Char(','), QString::SkipEmptyParts);
-
- QDeclarativeViewer::ScriptOptions scriptOptions = 0;
- for (int i = 0; i < options.count(); ++i) {
- const QString &option = options.at(i);
- if (option == QLatin1String("help")) {
- scriptOptsUsage();
- } else if (option == QLatin1String("play")) {
- scriptOptions |= QDeclarativeViewer::Play;
- } else if (option == QLatin1String("record")) {
- scriptOptions |= QDeclarativeViewer::Record;
- } else if (option == QLatin1String("testimages")) {
- scriptOptions |= QDeclarativeViewer::TestImages;
- } else if (option == QLatin1String("testerror")) {
- scriptOptions |= QDeclarativeViewer::TestErrorProperty;
- } else if (option == QLatin1String("exitoncomplete")) {
- scriptOptions |= QDeclarativeViewer::ExitOnComplete;
- } else if (option == QLatin1String("exitonfailure")) {
- scriptOptions |= QDeclarativeViewer::ExitOnFailure;
- } else if (option == QLatin1String("saveonexit")) {
- scriptOptions |= QDeclarativeViewer::SaveOnExit;
- } else if (option == QLatin1String("snapshot")) {
- scriptOptions |= QDeclarativeViewer::Snapshot;
- } else {
- scriptOptsUsage();
- }
- }
-
- if (script.isEmpty())
- usage();
- if (!(scriptOptions & QDeclarativeViewer::Record) && !(scriptOptions & QDeclarativeViewer::Play))
- scriptOptsUsage();
- viewer->setScriptOptions(scriptOptions);
- viewer->setScript(script);
- } else if (!script.isEmpty()) {
- usage();
+ if (!opts.scriptopts.isEmpty()) {
+ viewer->setScriptOptions(opts.scriptOptions);
+ viewer->setScript(opts.script);
}
#if !defined(Q_OS_SYMBIAN)
logger = viewer->warningsWidget();
- if (warningsConfig == ShowWarnings) {
+ if (opts.warningsConfig == ShowWarnings) {
logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings);
logger.data()->show();
- } else if (warningsConfig == HideWarnings){
+ } else if (opts.warningsConfig == HideWarnings){
logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings);
}
#endif
- if (experimentalGestures)
+ if (opts.experimentalGestures)
viewer->enableExperimentalGestures();
- foreach (QString lib, imports)
+ foreach (QString lib, opts.imports)
viewer->addLibraryPath(lib);
- foreach (QString plugin, plugins)
+ foreach (QString plugin, opts.plugins)
viewer->addPluginPath(plugin);
- viewer->setNetworkCacheSize(cache);
- viewer->setRecordFile(recordfile);
- viewer->setSizeToView(sizeToView);
- if (fps>0)
- viewer->setRecordRate(fps);
- if (autorecord_to)
- viewer->setAutoRecord(autorecord_from,autorecord_to);
- if (devkeys)
+ viewer->setNetworkCacheSize(opts.cache);
+ viewer->setRecordFile(opts.recordfile);
+ viewer->setSizeToView(opts.sizeToView);
+ if (opts.fps > 0)
+ viewer->setRecordRate(opts.fps);
+ if (opts.autorecord_to)
+ viewer->setAutoRecord(opts.autorecord_from, opts.autorecord_to);
+ if (opts.devkeys)
viewer->setDeviceKeys(true);
- viewer->setRecordDither(dither);
- if (recordargs.count())
- viewer->setRecordArgs(recordargs);
+ viewer->setRecordDither(opts.dither);
+ if (opts.recordargs.count())
+ viewer->setRecordArgs(opts.recordargs);
+
+ viewer->setUseNativeFileBrowser(opts.useNativeFileBrowser);
- viewer->setUseNativeFileBrowser(useNativeFileBrowser);
- if (fullScreen && maximized)
+ return viewer;
+}
+
+void showViewer(QDeclarativeViewer *viewer)
+{
+ if (opts.fullScreen)
+ viewer->showFullScreen();
+ else if (opts.maximized)
+ viewer->showMaximized();
+ else
+ viewer->show();
+
+ viewer->setUseGL(opts.useGL);
+ viewer->raise();
+}
+
+QDeclarativeViewer *openFile(const QString &fileName)
+{
+ QDeclarativeViewer *viewer = globalViewer;
+
+ viewer->open(fileName);
+ showViewer(viewer);
+
+ return viewer;
+}
+
+int main(int argc, char ** argv)
+{
+#if defined (Q_OS_SYMBIAN)
+ qInstallMsgHandler(myMessageOutput);
+#else
+ systemMsgOutput = qInstallMsgHandler(myMessageOutput);
+#endif
+
+#if defined (Q_OS_WIN)
+ // Debugging output is not visible by default on Windows -
+ // therefore show modal dialog with errors instad.
+ atexit(showWarnings);
+#endif
+
+#if defined (Q_WS_X11) || defined (Q_WS_MAC)
+ //### default to using raster graphics backend for now
+ bool gsSpecified = false;
+ for (int i = 0; i < argc; ++i) {
+ QString arg = argv[i];
+ if (arg == "-graphicssystem") {
+ gsSpecified = true;
+ break;
+ }
+ }
+
+ if (!gsSpecified)
+ QApplication::setGraphicsSystem("raster");
+#endif
+
+ Application app(argc, argv);
+ app.setApplicationName("QtQmlViewer");
+ app.setOrganizationName("Nokia");
+ app.setOrganizationDomain("nokia.com");
+
+ QDeclarativeViewer::registerTypes();
+ QDeclarativeTester::registerTypes();
+
+ parseCommandLineOptions(app.arguments());
+
+ QTranslator qmlTranslator;
+ if (!opts.translationFile.isEmpty()) {
+ qmlTranslator.load(opts.translationFile);
+ app.installTranslator(&qmlTranslator);
+ }
+
+ if (opts.fullScreen && opts.maximized)
qWarning() << "Both -fullscreen and -maximized specified. Using -fullscreen.";
- if (fileName.isEmpty()) {
+ if (fileNames.isEmpty()) {
QFile qmlapp(QLatin1String("qmlapp"));
if (qmlapp.exists() && qmlapp.open(QFile::ReadOnly)) {
- QString content = QString::fromUtf8(qmlapp.readAll());
- qmlapp.close();
-
- int newline = content.indexOf(QLatin1Char('\n'));
- if (newline >= 0)
- fileName = content.left(newline);
- else
- fileName = content;
- }
+ QString content = QString::fromUtf8(qmlapp.readAll());
+ qmlapp.close();
+
+ int newline = content.indexOf(QLatin1Char('\n'));
+ if (newline >= 0)
+ fileNames += content.left(newline);
+ else
+ fileNames += content;
+ }
}
- if (!fileName.isEmpty()) {
- viewer->open(fileName);
- fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
+ globalViewer = createViewer();
+
+ if (fileNames.isEmpty()) {
+ // show the initial viewer delayed.
+ // This prevents an initial viewer popping up while there
+ // are FileOpen events coming through the event queue
+ QTimer::singleShot(1, &app, SLOT(showInitialViewer()));
} else {
- if (!useNativeFileBrowser)
- viewer->openFile();
- fullScreen ? viewer->showFullScreen() : maximized ? viewer->showMaximized() : viewer->show();
- if (useNativeFileBrowser)
- viewer->openFile();
+ foreach (const QString &fileName, fileNames)
+ openFile(fileName);
}
- viewer->setUseGL(useGL);
- viewer->raise();
+
+ QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
return app.exec();
}
+
+#include "main.moc"
diff --git a/tools/qml/qml.pri b/tools/qml/qml.pri
index 80afb45..e5b2c7f 100644
--- a/tools/qml/qml.pri
+++ b/tools/qml/qml.pri
@@ -16,7 +16,9 @@ SOURCES += $$PWD/qmlruntime.cpp \
$$PWD/qdeclarativetester.cpp \
$$PWD/loggerwidget.cpp
-RESOURCES = $$PWD/qmlruntime.qrc
+RESOURCES = $$PWD/browser/browser.qrc \
+ $$PWD/startup/startup.qrc
+
symbian:!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
SOURCES += $$PWD/deviceorientation_symbian.cpp
FORMS = $$PWD/recopts.ui \
diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro
index bb69e8a..d794005 100644
--- a/tools/qml/qml.pro
+++ b/tools/qml/qml.pro
@@ -35,11 +35,14 @@ maemo5 {
symbian {
TARGET.UID3 = 0x20021317
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
- TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+ TARGET.EPOCHEAPSIZE = 0x20000 0x4000000
TARGET.CAPABILITY = NetworkServices ReadUserData
!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) {
LIBS += -lsensrvclient -lsensrvutil
}
+ contains(QT_CONFIG, s60): {
+ LIBS += -lavkon -lcone
+ }
}
mac {
QMAKE_INFO_PLIST=Info_mac.plist
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 951b187..b9fd570 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -98,10 +98,57 @@
#include <QGLWidget>
#endif
+#if defined(Q_WS_S60)
+#include <aknappui.h> // For locking app orientation
+#endif
+
#include <qdeclarativetester.h>
QT_BEGIN_NAMESPACE
+class DragAndDropView : public QDeclarativeView
+{
+ Q_OBJECT
+public:
+ DragAndDropView(QDeclarativeViewer *parent = 0)
+ : QDeclarativeView(parent)
+ {
+ setAcceptDrops(true);
+ }
+
+ void dragEnterEvent(QDragEnterEvent *event)
+ {
+ const QMimeData *mimeData = event->mimeData();
+ if (mimeData->hasUrls())
+ event->acceptProposedAction();
+ }
+
+ void dragMoveEvent(QDragMoveEvent *event)
+ {
+ event->acceptProposedAction();
+ }
+
+ void dragLeaveEvent(QDragLeaveEvent *event)
+ {
+ event->accept();
+ }
+
+ void dropEvent(QDropEvent *event)
+ {
+ const QMimeData *mimeData = event->mimeData();
+ if (!mimeData->hasUrls())
+ return;
+ const QList<QUrl> urlList = mimeData->urls();
+ foreach (const QUrl &url, urlList) {
+ if (url.scheme() == QLatin1String("file")) {
+ static_cast<QDeclarativeViewer *>(parent())->open(url.toLocalFile());
+ event->accept();
+ return;
+ }
+ }
+ }
+};
+
class Runtime : public QObject
{
Q_OBJECT
@@ -557,6 +604,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
: QMainWindow(parent, flags)
, loggerWindow(new LoggerWidget(this))
, frame_stream(0)
+ , rotateAction(0)
, orientation(0)
, showWarningsWindow(0)
, m_scriptOptions(0)
@@ -596,7 +644,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
recdlg->warning->hide();
}
- canvas = new QDeclarativeView(this);
+ canvas = new DragAndDropView(this);
canvas->setAttribute(Qt::WA_OpaquePaintEvent);
canvas->setAttribute(Qt::WA_NoSystemBackground);
@@ -605,7 +653,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags)
QObject::connect(canvas, SIGNAL(sceneResized(QSize)), this, SLOT(sceneResized(QSize)));
QObject::connect(canvas, SIGNAL(statusChanged(QDeclarativeView::Status)), this, SLOT(statusChanged()));
- QObject::connect(canvas->engine(), SIGNAL(quit()), QCoreApplication::instance (), SLOT(quit()));
+ QObject::connect(canvas->engine(), SIGNAL(quit()), this, SLOT(close()));
QObject::connect(warningsWidget(), SIGNAL(opened()), this, SLOT(warningsWidgetOpened()));
QObject::connect(warningsWidget(), SIGNAL(closed()), this, SLOT(warningsWidgetClosed()));
@@ -664,11 +712,11 @@ LoggerWidget *QDeclarativeViewer::warningsWidget() const
void QDeclarativeViewer::createMenu()
{
QAction *openAction = new QAction(tr("&Open..."), this);
- openAction->setShortcut(QKeySequence("Ctrl+O"));
+ openAction->setShortcuts(QKeySequence::Open);
connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
QAction *reloadAction = new QAction(tr("&Reload"), this);
- reloadAction->setShortcut(QKeySequence("Ctrl+R"));
+ reloadAction->setShortcuts(QKeySequence::Refresh);
connect(reloadAction, SIGNAL(triggered()), this, SLOT(reload()));
QAction *snapshotAction = new QAction(tr("&Take Snapshot"), this);
@@ -699,28 +747,40 @@ void QDeclarativeViewer::createMenu()
fullscreenAction->setCheckable(true);
connect(fullscreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen()));
- QAction *rotateOrientation = new QAction(tr("Rotate orientation"), this);
- rotateOrientation->setShortcut(QKeySequence("Ctrl+T"));
- connect(rotateOrientation, SIGNAL(triggered()), this, SLOT(rotateOrientation()));
+ rotateAction = new QAction(tr("Rotate orientation"), this);
+ rotateAction->setShortcut(QKeySequence("Ctrl+T"));
+ connect(rotateAction, SIGNAL(triggered()), this, SLOT(rotateOrientation()));
orientation = new QActionGroup(this);
orientation->setExclusive(true);
connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*)));
+#if defined(Q_OS_SYMBIAN)
+ QAction *autoOrientationAction = new QAction(tr("Auto-orientation"), this);
+ autoOrientationAction->setCheckable(true);
+#endif
QAction *portraitAction = new QAction(tr("Portrait"), this);
portraitAction->setCheckable(true);
QAction *landscapeAction = new QAction(tr("Landscape"), this);
landscapeAction->setCheckable(true);
+#if !defined(Q_OS_SYMBIAN)
QAction *portraitInvAction = new QAction(tr("Portrait (inverted)"), this);
portraitInvAction->setCheckable(true);
QAction *landscapeInvAction = new QAction(tr("Landscape (inverted)"), this);
landscapeInvAction->setCheckable(true);
+#endif
QAction *aboutAction = new QAction(tr("&About Qt..."), this);
+ aboutAction->setMenuRole(QAction::AboutQtRole);
connect(aboutAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ QAction *closeAction = new QAction(tr("&Close"), this);
+ closeAction->setShortcuts(QKeySequence::Close);
+ connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
+
QAction *quitAction = new QAction(tr("&Quit"), this);
- quitAction->setShortcut(QKeySequence("Ctrl+Q"));
+ quitAction->setMenuRole(QAction::QuitRole);
+ quitAction->setShortcuts(QKeySequence::Quit);
connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
QMenuBar *menu = menuBar();
@@ -751,9 +811,10 @@ void QDeclarativeViewer::createMenu()
fileMenu->addAction(openAction);
fileMenu->addAction(reloadAction);
fileMenu->addSeparator();
+ fileMenu->addAction(closeAction);
+#if !defined(Q_OS_SYMBIAN)
fileMenu->addAction(quitAction);
-#if !defined(Q_OS_SYMBIAN)
QMenu *recordMenu = menu->addMenu(tr("&Recording"));
recordMenu->addAction(snapshotAction);
recordMenu->addAction(recordAction);
@@ -763,22 +824,27 @@ void QDeclarativeViewer::createMenu()
debugMenu->addAction(showWarningsWindow);
#endif // ! Q_OS_SYMBIAN
- QMenu *settingsMenu = menu->addMenu(tr("S&ettings"));
+ QMenu *settingsMenu = menu->addMenu(tr("&Settings"));
settingsMenu->addAction(proxyAction);
-#if !defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN)
+ settingsMenu->addAction(fullscreenAction);
+#else
settingsMenu->addAction(recordOptions);
settingsMenu->addMenu(loggerWindow->preferencesMenu());
-#else // ! Q_OS_SYMBIAN
- settingsMenu->addAction(fullscreenAction);
-#endif // Q_OS_SYMBIAN
- settingsMenu->addAction(rotateOrientation);
+#endif // !Q_OS_SYMBIAN
+ settingsMenu->addAction(rotateAction);
QMenu *propertiesMenu = settingsMenu->addMenu(tr("Properties"));
+#if defined(Q_OS_SYMBIAN)
+ orientation->addAction(autoOrientationAction);
+#endif
orientation->addAction(portraitAction);
orientation->addAction(landscapeAction);
+#if !defined(Q_OS_SYMBIAN)
orientation->addAction(portraitInvAction);
orientation->addAction(landscapeInvAction);
+#endif
propertiesMenu->addActions(orientation->actions());
QMenu *helpMenu = menu->addMenu(tr("&Help"));
@@ -802,6 +868,23 @@ void QDeclarativeViewer::proxySettingsChanged()
void QDeclarativeViewer::rotateOrientation()
{
+#if defined(Q_WS_S60)
+ CAknAppUi *appUi = static_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
+ if (appUi) {
+ CAknAppUi::TAppUiOrientation oldOrientation = appUi->Orientation();
+ QString newOrientation;
+ if (oldOrientation == CAknAppUi::EAppUiOrientationPortrait) {
+ newOrientation = QLatin1String("Landscape");
+ } else {
+ newOrientation = QLatin1String("Portrait");
+ }
+ foreach (QAction *action, orientation->actions()) {
+ if (action->text() == newOrientation) {
+ changeOrientation(action);
+ }
+ }
+ }
+#else
QAction *current = orientation->checkedAction();
QList<QAction *> actions = orientation->actions();
int index = actions.indexOf(current);
@@ -810,6 +893,7 @@ void QDeclarativeViewer::rotateOrientation()
QAction *newOrientation = actions[(index + 1) % actions.count()];
changeOrientation(newOrientation);
+#endif
}
void QDeclarativeViewer::toggleFullScreen()
@@ -927,7 +1011,7 @@ void QDeclarativeViewer::openFile()
{
QString cur = canvas->source().toLocalFile();
if (useQmlFileBrowser) {
- open("qrc:/content/Browser.qml");
+ open("qrc:/browser/Browser.qml");
} else {
QString fileName = QFileDialog::getOpenFileName(this, tr("Open QML file"), cur, tr("QML Files (*.qml)"));
if (!fileName.isEmpty()) {
@@ -1319,9 +1403,24 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
{
if (!action)
return;
- action->setChecked(true);
-
QString o = action->text();
+ action->setChecked(true);
+#if defined(Q_WS_S60)
+ CAknAppUi *appUi = static_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
+ if (appUi) {
+ CAknAppUi::TAppUiOrientation orientation = appUi->Orientation();
+ if (o == QLatin1String("Auto-orientation")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationAutomatic);
+ rotateAction->setVisible(false);
+ } else if (o == QLatin1String("Portrait")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
+ rotateAction->setVisible(true);
+ } else if (o == QLatin1String("Landscape")) {
+ appUi->SetOrientationL(CAknAppUi::EAppUiOrientationLandscape);
+ rotateAction->setVisible(true);
+ }
+ }
+#else
if (o == QLatin1String("Portrait"))
DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait);
else if (o == QLatin1String("Landscape"))
@@ -1330,6 +1429,7 @@ void QDeclarativeViewer::changeOrientation(QAction *action)
DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted);
else if (o == QLatin1String("Landscape (inverted)"))
DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted);
+#endif
}
void QDeclarativeViewer::orientationChanged()
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 68d3452..6fa7d81 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -105,6 +105,7 @@ public:
QDeclarativeView *view() const;
LoggerWidget *warningsWidget() const;
+ QString currentFile() const { return currentFileOrUrl; }
void enableExperimentalGestures();
@@ -169,8 +170,6 @@ private:
int record_autotime;
bool devicemode;
QAction *recordAction;
- QString currentSkin;
- bool scaleSkin;
RecordingDialog *recdlg;
void senseImageMagick();
@@ -179,6 +178,7 @@ private:
bool ffmpegAvailable;
bool convertAvailable;
+ QAction *rotateAction;
QActionGroup *orientation;
QAction *showWarningsWindow;
diff --git a/tools/qml/qmlruntime.qrc b/tools/qml/qmlruntime.qrc
deleted file mode 100644
index 3a9e608..0000000
--- a/tools/qml/qmlruntime.qrc
+++ /dev/null
@@ -1,9 +0,0 @@
-<RCC>
- <qresource prefix="/" >
- <file>content/Browser.qml</file>
- <file>content/images/up.png</file>
- <file>content/images/folder.png</file>
- <file>content/images/titlebar.sci</file>
- <file>content/images/titlebar.png</file>
- </qresource>
-</RCC>
diff --git a/tools/qml/startup/Logo.qml b/tools/qml/startup/Logo.qml
new file mode 100644
index 0000000..8d9708d
--- /dev/null
+++ b/tools/qml/startup/Logo.qml
@@ -0,0 +1,179 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import Qt 4.7
+
+Rectangle {
+ id: myApp
+ width: 411
+ height: 411
+ color: "transparent"
+ property alias logoState : myApp.state
+ signal animationFinished
+
+ Item {
+ id: sketchBlueHolder
+ width: sketchLogo.width
+ height: sketchLogo.height
+ Image {
+ id: image1
+ x: -44
+ y: -45
+ smooth: true
+ source: "shadow.png"
+ }
+ Item {
+ clip: true
+ width: sketchLogo.width
+ height: sketchLogo.height
+ Image {
+ id: sketchLogo
+ smooth: true
+ source: "qt-sketch.jpg"
+ }
+ Image {
+ id: blueLogo
+ y: -420
+ smooth: true
+ source: "qt-blue.jpg"
+ }
+ }
+ }
+
+ states: [
+ State {
+ name: "showBlueprint"
+ PropertyChanges {
+ target: blueLogo
+ y: 0
+ }
+ PropertyChanges {
+ target: sketchLogo
+ opacity: 0
+ }
+ },
+ State {
+ extend: "showBlueprint"
+ name: "finale"
+ PropertyChanges {
+ target: fullLogo
+ opacity: 1
+ }
+ PropertyChanges {
+ target: backLogo
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: frontLogo
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: qtText
+ opacity: 1
+ scale: 1
+ }
+ PropertyChanges {
+ target: sketchBlueHolder
+ opacity: 0
+ scale: 1.4
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "showBlueprint"
+ SequentialAnimation {
+ NumberAnimation { property: "y"; duration: 600; easing.type: "OutBounce" }
+ PropertyAction { target: sketchLogo; property: "opacity" }
+ }
+ },
+ Transition {
+ to: "finale"
+ PropertyAction { target: fullLogo; property: "opacity" }
+ SequentialAnimation {
+ NumberAnimation { target: backLogo; properties: "scale, opacity"; duration: 300 }
+ NumberAnimation { target: frontLogo; properties: "scale, opacity"; duration: 300 }
+ ParallelAnimation {
+ NumberAnimation { target: qtText; properties: "opacity, scale"; duration: 400; easing.type: "OutQuad" }
+ NumberAnimation { target: sketchBlueHolder; property: "opacity"; duration: 300; easing.type: "OutQuad" }
+ NumberAnimation { target: sketchBlueHolder; property: "scale"; duration: 320; easing.type: "OutQuad" }
+ }
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: myApp.animationFinished() }
+ }
+ }
+ ]
+
+ Item {
+ id: fullLogo
+ opacity: 0
+ Image {
+ id: backLogo
+ x: -16
+ y: -41
+ opacity: 0
+ scale: 0.7
+ smooth: true
+ source: "qt-back.png"
+ }
+ Image {
+ id: frontLogo
+ x: -17
+ y: -41
+ opacity: 0
+ scale: 1.2
+ smooth: true
+ source: "qt-front.png"
+ }
+ Image {
+ id: qtText
+ x: -10
+ y: -41
+ opacity: 0
+ scale: 1.2
+ smooth: true
+ source: "qt-text.png"
+ }
+ }
+}
diff --git a/tools/qml/startup/qt-back.png b/tools/qml/startup/qt-back.png
new file mode 100644
index 0000000..077215f
--- /dev/null
+++ b/tools/qml/startup/qt-back.png
Binary files differ
diff --git a/tools/qml/startup/qt-blue.jpg b/tools/qml/startup/qt-blue.jpg
new file mode 100644
index 0000000..b204896
--- /dev/null
+++ b/tools/qml/startup/qt-blue.jpg
Binary files differ
diff --git a/tools/qml/startup/qt-front.png b/tools/qml/startup/qt-front.png
new file mode 100644
index 0000000..dbfb43e
--- /dev/null
+++ b/tools/qml/startup/qt-front.png
Binary files differ
diff --git a/tools/qml/startup/qt-sketch.jpg b/tools/qml/startup/qt-sketch.jpg
new file mode 100644
index 0000000..1ede6f0
--- /dev/null
+++ b/tools/qml/startup/qt-sketch.jpg
Binary files differ
diff --git a/tools/qml/startup/qt-text.png b/tools/qml/startup/qt-text.png
new file mode 100644
index 0000000..d44995c
--- /dev/null
+++ b/tools/qml/startup/qt-text.png
Binary files differ
diff --git a/tools/qml/startup/quick-blur.png b/tools/qml/startup/quick-blur.png
new file mode 100644
index 0000000..29ec243
--- /dev/null
+++ b/tools/qml/startup/quick-blur.png
Binary files differ
diff --git a/tools/qml/startup/quick-regular.png b/tools/qml/startup/quick-regular.png
new file mode 100644
index 0000000..38321cb
--- /dev/null
+++ b/tools/qml/startup/quick-regular.png
Binary files differ
diff --git a/tools/qml/startup/shadow.png b/tools/qml/startup/shadow.png
new file mode 100644
index 0000000..44f92fe
--- /dev/null
+++ b/tools/qml/startup/shadow.png
Binary files differ
diff --git a/tools/qml/startup/startup.qml b/tools/qml/startup/startup.qml
new file mode 100644
index 0000000..be67598
--- /dev/null
+++ b/tools/qml/startup/startup.qml
@@ -0,0 +1,167 @@
+/****************************************************************************
+**
+** 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 QtDeclarative module 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$
+**
+****************************************************************************/
+
+import Qt 4.7
+
+Rectangle {
+ id: treatsApp
+ width: 800
+ height: 480
+ color: "darkgrey"
+ Component.onCompleted: treatsApp.state = "part1"
+ signal animationFinished
+
+ Logo {
+ id: logo
+ x: 165
+ y: 35
+ rotation: -15
+ scale: 0.6
+ opacity: 0
+ onAnimationFinished: treatsApp.animationFinished();
+ }
+
+ states: [
+ State {
+ name: "part1"
+ PropertyChanges {
+ target: logo
+ scale: 0.8
+ opacity: 1
+ rotation: 0
+ }
+ PropertyChanges {
+ target: treatsApp
+ color: "black"
+ }
+ PropertyChanges {
+ target: logo
+ y: 10
+ }
+ PropertyChanges {
+ target: quickblur
+ x: logo.x + 145
+ }
+ PropertyChanges {
+ target: blurText
+ opacity: 0
+ }
+ PropertyChanges {
+ target: quickregular
+ opacity: 1
+ }
+ PropertyChanges {
+ target: star
+ x: -7
+ y: -37
+ }
+ }
+ ]
+
+
+ Item {
+ id: quickblur
+ x: 800//325
+ y: 344
+ Image {
+ id: blurText
+ source: "quick-blur.png"
+ }
+ Image {
+ id: quickregular
+ x: -1
+ y: 0
+ opacity: 0
+ source: "quick-regular.png"
+ }
+ Image {
+ id: star
+ x: -1
+ y: 0
+ opacity: 0
+ source: "white-star.png"
+ smooth: true
+ NumberAnimation on rotation {
+ from: 0
+ to: 360
+ loops: NumberAnimation.Infinite
+ running: true
+ duration: 2000
+ }
+ }
+ }
+
+ transitions: [
+ Transition {
+ ParallelAnimation {
+ NumberAnimation { target: logo; property: "opacity"; duration: 500 }
+ NumberAnimation { target: logo; property: "scale"; duration: 4000; }
+ NumberAnimation { target: logo; property: "rotation"; duration: 2000; easing.type: "OutBack"}
+ ColorAnimation { duration: 3000}
+ SequentialAnimation {
+ PauseAnimation { duration: 1000 }
+ ScriptAction { script: logo.logoState = "showBlueprint" }
+ PauseAnimation { duration: 800 }
+ ScriptAction { script: logo.logoState = "finale" }
+ PauseAnimation { duration: 800 }
+ ParallelAnimation {
+ NumberAnimation { target: quickblur; property: "x"; duration: 200;}
+ SequentialAnimation {
+ PauseAnimation { duration: 200}
+ ParallelAnimation {
+ NumberAnimation { target: blurText; property: "opacity"; duration: 300;}
+ NumberAnimation { target: quickregular; property: "opacity"; duration: 300;}
+ }
+ NumberAnimation { target: star; property: "opacity"; from: 0; to: 1; duration: 500 }
+ PauseAnimation { duration: 200 }
+ NumberAnimation { target: star; property: "opacity"; from: 1; to: 0; duration: 500 }
+ }
+ SequentialAnimation {
+ PauseAnimation { duration: 150}
+ NumberAnimation { target: logo; property: "y"; duration: 300; easing.type: "OutBounce" }
+ }
+ }
+ }
+ }
+ }
+ ]
+
+} // treatsApp
diff --git a/tools/qml/startup/startup.qrc b/tools/qml/startup/startup.qrc
new file mode 100644
index 0000000..52e6705
--- /dev/null
+++ b/tools/qml/startup/startup.qrc
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/startup">
+ <file>Logo.qml</file>
+ <file>qt-back.png</file>
+ <file>qt-blue.jpg</file>
+ <file>qt-front.png</file>
+ <file>qt-sketch.jpg</file>
+ <file>qt-text.png</file>
+ <file>quick-blur.png</file>
+ <file>quick-regular.png</file>
+ <file>shadow.png</file>
+ <file>startup.qml</file>
+ <file>startup.qrc</file>
+ <file>white-star.png</file>
+ </qresource>
+</RCC>
diff --git a/tools/qml/startup/white-star.png b/tools/qml/startup/white-star.png
new file mode 100644
index 0000000..f467c94
--- /dev/null
+++ b/tools/qml/startup/white-star.png
Binary files differ
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index 7767e4b..93b087b 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -51,6 +51,7 @@
#include "trksignalhandler.h"
#include "serenum.h"
+#include "ossignalconverter.h"
void printUsage(QTextStream& outstream, QString exeName)
{
@@ -235,6 +236,8 @@ int main(int argc, char *argv[])
QObject::connect(&handler, SIGNAL(getRegistersAndCallStack(uint,uint)), launcher.data(), SLOT(getRegistersAndCallStack(uint,uint)));
QObject::connect(launcher.data(), SIGNAL(finished()), &handler, SLOT(finished()));
+ QObject::connect(OsSignalConverter::instance(), SIGNAL(terminate()), launcher.data(), SLOT(terminate()), Qt::QueuedConnection);
+
QTimer timer;
timer.setSingleShot(true);
QObject::connect(&timer, SIGNAL(timeout()), &handler, SLOT(timeout()));
diff --git a/tools/runonphone/ossignalconverter.cpp b/tools/runonphone/ossignalconverter.cpp
new file mode 100644
index 0000000..6554e9f
--- /dev/null
+++ b/tools/runonphone/ossignalconverter.cpp
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** 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 "ossignalconverter_p.h"
+#include <signal.h>
+#include <QTimer>
+
+Q_GLOBAL_STATIC(OsSignalConverter, osSignalConverter);
+
+OsSignalConverter* OsSignalConverter::instance()
+{
+ return osSignalConverter();
+}
+
+OsSignalConverter::OsSignalConverter()
+: d(new OsSignalConverterPrivate(this))
+{
+};
+
+OsSignalConverter::~OsSignalConverter()
+{
+}
+
+OsSignalConverterPrivate::OsSignalConverterPrivate(OsSignalConverter* owner)
+: QObject(owner), q(owner), poller(new QTimer(this))
+{
+ trap();
+ connect(poller, SIGNAL(timeout()), this, SLOT(poll()));
+ poller->start(1000);
+}
+
+OsSignalConverterPrivate::~OsSignalConverterPrivate()
+{
+ untrap();
+}
+
+void OsSignalConverterPrivate::trap()
+{
+ signal(SIGINT, handler);
+ signal(SIGTERM, handler);
+#ifdef SIGBREAK
+ signal(SIGBREAK, handler);
+#endif
+#ifdef SIGHUP
+ signal(SIGHUP, handler);
+#endif
+#ifdef SIGQUIT
+ signal(SIGQUIT, handler);
+#endif
+}
+
+void OsSignalConverterPrivate::untrap()
+{
+ signal(SIGINT, SIG_DFL);
+ signal(SIGTERM, SIG_DFL);
+#ifdef SIGBREAK
+ signal(SIGBREAK, SIG_DFL);
+#endif
+#ifdef SIGHUP
+ signal(SIGHUP, SIG_DFL);
+#endif
+#ifdef SIGQUIT
+ signal(SIGQUIT, SIG_DFL);
+#endif
+}
+
+void OsSignalConverterPrivate::handler(int sig)
+{
+ untrap(); //allow 2nd ctrl-c to really kill us
+ terminateRequest = sig;
+}
+
+void OsSignalConverterPrivate::poll()
+{
+ if (terminateRequest) {
+ fprintf(stderr, "\n*** caught signal %d, terminating ***\n", terminateRequest);
+ poller->stop();
+ emit q->terminate();
+ }
+}
+
+sig_atomic_t OsSignalConverterPrivate::terminateRequest;
diff --git a/tools/runonphone/ossignalconverter.h b/tools/runonphone/ossignalconverter.h
new file mode 100644
index 0000000..f53f3c1
--- /dev/null
+++ b/tools/runonphone/ossignalconverter.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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 OSSIGNALCONVERTER_H
+#define OSSIGNALCONVERTER_H
+#include <QObject>
+
+class OsSignalConverter : public QObject
+{
+ friend class OsSignalConverterPrivate;
+ Q_OBJECT
+public:
+ static OsSignalConverter* instance();
+ OsSignalConverter();
+ ~OsSignalConverter();
+signals:
+ //emitted when this process is asked to quit, e.g. by SIGINT
+ void terminate();
+private:
+ OsSignalConverterPrivate *d;
+};
+
+#endif // OSSIGNALCONVERTER_H
diff --git a/tools/runonphone/ossignalconverter_p.h b/tools/runonphone/ossignalconverter_p.h
new file mode 100644
index 0000000..dddc9ca
--- /dev/null
+++ b/tools/runonphone/ossignalconverter_p.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** 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 OSSIGNALCONVERTER_P_H
+#define OSSIGNALCONVERTER_P_H
+#include "ossignalconverter.h"
+#include <signal.h>
+
+class QTimer;
+class OsSignalConverterPrivate : public QObject
+{
+ Q_OBJECT
+public:
+ OsSignalConverterPrivate(OsSignalConverter* owner);
+ ~OsSignalConverterPrivate();
+private:
+
+ static void trap();
+ static void untrap();
+ static void handler(int signal);
+
+private slots:
+
+ void poll();
+
+private:
+
+ OsSignalConverter* q;
+ static sig_atomic_t terminateRequest;
+ QTimer *poller;
+};
+
+#endif // OSSIGNALCONVERTER_P_H
diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro
index 0c63723..15dff51 100644
--- a/tools/runonphone/runonphone.pro
+++ b/tools/runonphone/runonphone.pro
@@ -7,10 +7,13 @@ CONFIG -= app_bundle
include(symbianutils/symbianutils.pri)
SOURCES += main.cpp \
- trksignalhandler.cpp
+ trksignalhandler.cpp \
+ ossignalconverter.cpp
HEADERS += trksignalhandler.h \
- serenum.h
+ serenum.h \
+ ossignalconverter.h \
+ ossignalconverter_p.h
DEFINES += SYMBIANUTILS_INCLUDE_PRI