summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/assistant/lib/fulltextsearch/qsort_p.h8
-rw-r--r--tools/assistant/lib/qhelpcollectionhandler_p.h3
-rw-r--r--tools/assistant/lib/qhelpengine.h2
-rw-r--r--tools/assistant/lib/qhelpenginecore.cpp2
-rw-r--r--tools/assistant/lib/qhelpenginecore.h2
-rw-r--r--tools/assistant/lib/qhelpsearchengine.h3
-rw-r--r--tools/assistant/lib/qhelpsearchindexreader_clucene.cpp4
-rw-r--r--tools/assistant/tools/assistant/bookmarkfiltermodel.cpp2
-rw-r--r--tools/assistant/tools/assistant/bookmarkitem.h2
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanagerwidget.h5
-rw-r--r--tools/assistant/tools/assistant/centralwidget.cpp2
-rw-r--r--tools/assistant/tools/assistant/installdialog.h2
-rw-r--r--tools/assistant/tools/assistant/main.cpp2
-rw-r--r--tools/assistant/tools/assistant/mainwindow.h2
-rw-r--r--tools/assistant/tools/assistant/searchwidget.h2
-rw-r--r--tools/assistant/tools/qhelpconverter/inputpage.h2
-rw-r--r--tools/linguist/linguist/mainwindow.cpp3
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp10
-rw-r--r--tools/qdoc3/htmlgenerator.cpp166
-rw-r--r--tools/qdoc3/htmlgenerator.h1
-rw-r--r--tools/qdoc3/node.cpp23
-rw-r--r--tools/qdoc3/test/qt-html-templates.qdocconf10
-rw-r--r--tools/qdoc3/tree.cpp6
-rw-r--r--tools/qml/qmlruntime.cpp14
-rw-r--r--tools/qml/qmlruntime.h1
-rw-r--r--tools/qtconfig/main.cpp14
-rw-r--r--tools/qvfb/main.cpp13
-rw-r--r--tools/qvfb/qvfb.cpp54
-rw-r--r--tools/qvfb/qvfbratedlg.cpp10
-rw-r--r--tools/runonphone/ossignalconverter.h2
-rw-r--r--tools/runonphone/runonphone.pro3
31 files changed, 272 insertions, 103 deletions
diff --git a/tools/assistant/lib/fulltextsearch/qsort_p.h b/tools/assistant/lib/fulltextsearch/qsort_p.h
index e6f024b..5c75c58 100644
--- a/tools/assistant/lib/fulltextsearch/qsort_p.h
+++ b/tools/assistant/lib/fulltextsearch/qsort_p.h
@@ -64,15 +64,15 @@ private:
class QHELP_EXPORT QCLuceneSort
{
public:
- QCLuceneSort();
- QCLuceneSort(const QStringList &fieldNames);
- QCLuceneSort(const QString &field, bool reverse = false);
+ QCLuceneSort();
+ explicit QCLuceneSort(const QStringList &fieldNames);
+ explicit QCLuceneSort(const QString &field, bool reverse = false);
virtual ~QCLuceneSort();
QString toString() const;
void setSort(const QStringList &fieldNames);
- void setSort(const QString &field, bool reverse = false);
+ void setSort(const QString &field, bool reverse = false);
protected:
friend class QCLuceneHits;
diff --git a/tools/assistant/lib/qhelpcollectionhandler_p.h b/tools/assistant/lib/qhelpcollectionhandler_p.h
index 8efe507..8901b06 100644
--- a/tools/assistant/lib/qhelpcollectionhandler_p.h
+++ b/tools/assistant/lib/qhelpcollectionhandler_p.h
@@ -76,7 +76,8 @@ public:
};
typedef QList<DocInfo> DocInfoList;
- QHelpCollectionHandler(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpCollectionHandler(const QString &collectionFile,
+ QObject *parent = 0);
~QHelpCollectionHandler();
QString collectionFile() const;
diff --git a/tools/assistant/lib/qhelpengine.h b/tools/assistant/lib/qhelpengine.h
index 2bdb983..3577f4b 100644
--- a/tools/assistant/lib/qhelpengine.h
+++ b/tools/assistant/lib/qhelpengine.h
@@ -62,7 +62,7 @@ class QHELP_EXPORT QHelpEngine : public QHelpEngineCore
Q_OBJECT
public:
- QHelpEngine(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpEngine(const QString &collectionFile, QObject *parent = 0);
~QHelpEngine();
QHelpContentModel *contentModel() const;
diff --git a/tools/assistant/lib/qhelpenginecore.cpp b/tools/assistant/lib/qhelpenginecore.cpp
index 71306af..d72dfe4 100644
--- a/tools/assistant/lib/qhelpenginecore.cpp
+++ b/tools/assistant/lib/qhelpenginecore.cpp
@@ -706,7 +706,7 @@ QVariant QHelpEngineCore::metaData(const QString &documentationFileName,
}
/*!
- Returns a description of the last error that occured.
+ Returns a description of the last error that occurred.
*/
QString QHelpEngineCore::error() const
{
diff --git a/tools/assistant/lib/qhelpenginecore.h b/tools/assistant/lib/qhelpenginecore.h
index 118c310..db25c0b 100644
--- a/tools/assistant/lib/qhelpenginecore.h
+++ b/tools/assistant/lib/qhelpenginecore.h
@@ -65,7 +65,7 @@ class QHELP_EXPORT QHelpEngineCore : public QObject
Q_PROPERTY(QString currentFilter READ currentFilter WRITE setCurrentFilter)
public:
- QHelpEngineCore(const QString &collectionFile, QObject *parent = 0);
+ explicit QHelpEngineCore(const QString &collectionFile, QObject *parent = 0);
virtual ~QHelpEngineCore();
bool setupData();
diff --git a/tools/assistant/lib/qhelpsearchengine.h b/tools/assistant/lib/qhelpsearchengine.h
index 545360c..0b07920 100644
--- a/tools/assistant/lib/qhelpsearchengine.h
+++ b/tools/assistant/lib/qhelpsearchengine.h
@@ -80,7 +80,8 @@ class QHELP_EXPORT QHelpSearchEngine : public QObject
Q_OBJECT
public:
- QHelpSearchEngine(QHelpEngineCore *helpEngine, QObject *parent = 0);
+ explicit QHelpSearchEngine(QHelpEngineCore *helpEngine,
+ QObject *parent = 0);
~QHelpSearchEngine();
QHelpSearchQueryWidget* queryWidget();
diff --git a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
index c2274c4..75cc2b9 100644
--- a/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
+++ b/tools/assistant/lib/qhelpsearchindexreader_clucene.cpp
@@ -173,7 +173,7 @@ void QHelpSearchIndexReaderClucene::run()
QCLuceneDocument document;
const QStringList namespaceList = engine.registeredDocumentations();
- foreach (QSharedPointer<QCLuceneHits> hits, cluceneHitsList) {
+ foreach (const QSharedPointer<QCLuceneHits> &hits, cluceneHitsList) {
for (qint32 i = 0; i < hits->length(); i++) {
document = hits->document(i);
const QString path = document.get(PathField);
@@ -415,7 +415,7 @@ bool QHelpSearchIndexReaderClucene::addAttributesQuery(
void QHelpSearchIndexReaderClucene::boostSearchHits(const QHelpEngineCore &engine,
QList<QHelpSearchEngine::SearchHit> &hitList, const QList<QHelpSearchQuery> &queryList)
{
- foreach (const QHelpSearchQuery query, queryList) {
+ foreach (const QHelpSearchQuery &query, queryList) {
if (query.fieldName != QHelpSearchQuery::DEFAULT)
continue;
diff --git a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
index 5874493..7a7c2e3 100644
--- a/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
+++ b/tools/assistant/tools/assistant/bookmarkfiltermodel.cpp
@@ -319,4 +319,4 @@ BookmarkTreeModel::filterAcceptsRow(int row, const QModelIndex &parent) const
&& model->data(model->index(row, 0, parent), UserRoleFolder).toBool())
return true;
return false;
-} \ No newline at end of file
+}
diff --git a/tools/assistant/tools/assistant/bookmarkitem.h b/tools/assistant/tools/assistant/bookmarkitem.h
index 924a762..7c5b8d0 100644
--- a/tools/assistant/tools/assistant/bookmarkitem.h
+++ b/tools/assistant/tools/assistant/bookmarkitem.h
@@ -58,7 +58,7 @@ typedef QVector<QVariant> DataVector;
class BookmarkItem
{
public:
- BookmarkItem(const DataVector &data, BookmarkItem *parent = 0);
+ explicit BookmarkItem(const DataVector &data, BookmarkItem *parent = 0);
~BookmarkItem();
BookmarkItem *parent() const;
diff --git a/tools/assistant/tools/assistant/bookmarkmanagerwidget.h b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
index 94384a6..56433cb 100644
--- a/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
+++ b/tools/assistant/tools/assistant/bookmarkmanagerwidget.h
@@ -57,7 +57,8 @@ class BookmarkManagerWidget : public QWidget
{
Q_OBJECT
public:
- BookmarkManagerWidget(BookmarkModel *bookmarkModel, QWidget *parent = 0);
+ explicit BookmarkManagerWidget(BookmarkModel *bookmarkModel,
+ QWidget *parent = 0);
~BookmarkManagerWidget();
protected:
@@ -99,4 +100,4 @@ private:
QT_END_NAMESPACE
-#endif // BOOKMARKMANAGERWIDGET_H \ No newline at end of file
+#endif // BOOKMARKMANAGERWIDGET_H
diff --git a/tools/assistant/tools/assistant/centralwidget.cpp b/tools/assistant/tools/assistant/centralwidget.cpp
index b6fa159..028463b 100644
--- a/tools/assistant/tools/assistant/centralwidget.cpp
+++ b/tools/assistant/tools/assistant/centralwidget.cpp
@@ -415,7 +415,7 @@ void CentralWidget::highlightSearchTerms()
case QHelpSearchQuery::DEFAULT:
case QHelpSearchQuery::ATLEAST:
foreach (QString term, query.wordList)
- terms.append(term.remove(QLatin1String("\"")));
+ terms.append(term.remove(QLatin1Char('"')));
}
}
}
diff --git a/tools/assistant/tools/assistant/installdialog.h b/tools/assistant/tools/assistant/installdialog.h
index 2f19519..afafc63 100644
--- a/tools/assistant/tools/assistant/installdialog.h
+++ b/tools/assistant/tools/assistant/installdialog.h
@@ -61,7 +61,7 @@ class InstallDialog : public QDialog
Q_OBJECT
public:
- InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent = 0,
+ explicit InstallDialog(QHelpEngineCore *helpEngine, QWidget *parent = 0,
const QString &host = QString(), int port = -1);
~InstallDialog();
diff --git a/tools/assistant/tools/assistant/main.cpp b/tools/assistant/tools/assistant/main.cpp
index 51ea9f9..02507ae 100644
--- a/tools/assistant/tools/assistant/main.cpp
+++ b/tools/assistant/tools/assistant/main.cpp
@@ -355,7 +355,7 @@ int main(int argc, char *argv[])
QHelpEngineCore cachedCollection(cachedCollectionFile);
if (!cachedCollection.setupData()) {
cmd.showMessage(QCoreApplication::translate("Assistant",
- "Error reading collection file '%1': %2").
+ "Error reading collection file '%1': %2.").
arg(cachedCollectionFile).
arg(cachedCollection.error()), true);
return EXIT_FAILURE;
diff --git a/tools/assistant/tools/assistant/mainwindow.h b/tools/assistant/tools/assistant/mainwindow.h
index 7eb44e9..ea4ebd6 100644
--- a/tools/assistant/tools/assistant/mainwindow.h
+++ b/tools/assistant/tools/assistant/mainwindow.h
@@ -69,7 +69,7 @@ class MainWindow : public QMainWindow
Q_OBJECT
public:
- MainWindow(CmdLineParser *cmdLine, QWidget *parent = 0);
+ explicit MainWindow(CmdLineParser *cmdLine, QWidget *parent = 0);
~MainWindow();
static void activateCurrentBrowser();
diff --git a/tools/assistant/tools/assistant/searchwidget.h b/tools/assistant/tools/assistant/searchwidget.h
index 465e8f6..750497b 100644
--- a/tools/assistant/tools/assistant/searchwidget.h
+++ b/tools/assistant/tools/assistant/searchwidget.h
@@ -58,7 +58,7 @@ class SearchWidget : public QWidget
Q_OBJECT
public:
- SearchWidget(QHelpSearchEngine *engine, QWidget *parent = 0);
+ explicit SearchWidget(QHelpSearchEngine *engine, QWidget *parent = 0);
~SearchWidget();
void zoomIn();
diff --git a/tools/assistant/tools/qhelpconverter/inputpage.h b/tools/assistant/tools/qhelpconverter/inputpage.h
index e9276c6..28a7075 100644
--- a/tools/assistant/tools/qhelpconverter/inputpage.h
+++ b/tools/assistant/tools/qhelpconverter/inputpage.h
@@ -54,7 +54,7 @@ class InputPage : public QWizardPage
Q_OBJECT
public:
- InputPage(AdpReader *reader, QWidget *parent = 0);
+ explicit InputPage(AdpReader *reader, QWidget *parent = 0);
private slots:
void getFileName();
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index e5c8461..5d48942 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -142,10 +142,13 @@ static Ending ending(QString str, QLocale::Language lang)
case 0x2048: // question exclamation mark
case 0x2049: // exclamation question mark
case 0x2762: // heavy exclamation mark ornament
+ case 0xff01: // full width exclamation mark
+ case 0xff1f: // full width question mark
return End_Interrobang;
case 0x003b: // greek 'compatibility' questionmark
return lang == QLocale::Greek ? End_Interrobang : End_None;
case 0x003a: // colon
+ case 0xff1a: // full width colon
return End_Colon;
case 0x2026: // horizontal ellipsis
return End_Ellipsis;
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index 7892025..a83a321 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -544,6 +544,7 @@ void DitaXmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
funcIndex.clear();
legaleseTexts.clear();
serviceClasses.clear();
+ qmlClasses.clear();
findAllClasses(tree->root());
findAllFunctions(tree->root());
findAllLegaleseTexts(tree->root());
@@ -751,6 +752,9 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
else if (atom->string() == "classes") {
generateCompactList(relative, marker, nonCompatClasses, true);
}
+ else if (atom->string() == "qmlclasses") {
+ generateCompactList(relative, marker, qmlClasses, true);
+ }
else if (atom->string().contains("classesbymodule")) {
QString arg = atom->string().trimmed();
QString moduleName = atom->string().mid(atom->string().indexOf(
@@ -3675,6 +3679,12 @@ void DitaXmlGenerator::findAllClasses(const InnerNode *node)
if (!serviceName.isEmpty())
serviceClasses.insert(serviceName, *c);
}
+ else if ((*c)->type() == Node::Fake &&
+ (*c)->subType() == Node::QmlClass &&
+ !(*c)->doc().isEmpty()) {
+ QString qmlClassName = (*c)->name();
+ qmlClasses.insert(qmlClassName,*c);
+ }
else if ((*c)->isInnerNode()) {
findAllClasses(static_cast<InnerNode *>(*c));
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 4603a40..698b516 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -376,6 +376,7 @@ void HtmlGenerator::generateTree(const Tree *tree, CodeMarker *marker)
funcIndex.clear();
legaleseTexts.clear();
serviceClasses.clear();
+ qmlClasses.clear();
findAllClasses(tree->root());
findAllFunctions(tree->root());
findAllLegaleseTexts(tree->root());
@@ -611,6 +612,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else if (atom->string() == "classes") {
generateCompactList(relative, marker, nonCompatClasses, true);
}
+ else if (atom->string() == "qmlclasses") {
+ generateCompactList(relative, marker, qmlClasses, true);
+ }
else if (atom->string().contains("classesbymodule")) {
QString arg = atom->string().trimmed();
QString moduleName = atom->string().mid(atom->string().indexOf(
@@ -1806,18 +1810,19 @@ void HtmlGenerator::generateHeader(const QString& title,
// Adding jquery and functions - providing online tools and search features
out() << " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n";
out() << " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n";
- // Adding style and js for small windows
- out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
- out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
- out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
+
// Adding syntax highlighter // future release
- // Setting some additional style sheet related details depending on configuration (e.g. online/offline)
+ // Setting some additional style sheet related details depending on configuration (e.g. Online/Creator)
switch (application) {
case Online:
+ // Adding style and js for small windows
+ out() << " <script src=\"./scripts/superfish.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />";
+ out() << " <script src=\"./scripts/narrow.js\" type=\"text/javascript\"></script>\n";
+ out() << " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n";
// Browser spec styles
out() << " <!--[if IE]>\n";
out() << "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n";
@@ -3707,6 +3712,12 @@ void HtmlGenerator::findAllClasses(const InnerNode *node)
if (!serviceName.isEmpty())
serviceClasses.insert(serviceName, *c);
}
+ else if ((*c)->type() == Node::Fake &&
+ (*c)->subType() == Node::QmlClass &&
+ !(*c)->doc().isEmpty()) {
+ QString qmlClassName = (*c)->name();
+ qmlClasses.insert(qmlClassName,*c);
+ }
else if ((*c)->isInnerNode()) {
findAllClasses(static_cast<InnerNode *>(*c));
}
@@ -4412,57 +4423,103 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
return true;
if (node->access() == Node::Private)
return false;
- if (!node->isInnerNode())
- return false;
+ QString guid = QUuid::createUuid().toString();
+ QString url = PageGenerator::fileName(node);
QString title;
QString rawTitle;
QString fullTitle;
- const InnerNode* inner = static_cast<const InnerNode*>(node);
-
- writer.writeStartElement("page");
+ QStringList pageWords;
QXmlStreamAttributes attributes;
- QString t;
- t.setNum(id++);
- switch (node->type()) {
- case Node::Fake:
- {
- const FakeNode* fake = static_cast<const FakeNode*>(node);
- title = fake->fullTitle();
+
+ writer.writeStartElement("page");
+
+ if (node->isInnerNode()) {
+ const InnerNode* inner = static_cast<const InnerNode*>(node);
+ if (!inner->pageKeywords().isEmpty())
+ pageWords << inner->pageKeywords();
+
+ switch (node->type()) {
+ case Node::Fake:
+ {
+ const FakeNode* fake = static_cast<const FakeNode*>(node);
+ title = fake->fullTitle();
+ pageWords << title;
+ break;
+ }
+ case Node::Class:
+ {
+ title = node->name() + " Class Reference";
+ pageWords << node->name() << "class" << "reference";
+ break;
+ }
+ case Node::Namespace:
+ {
+ rawTitle = marker->plainName(inner);
+ fullTitle = marker->plainFullName(inner);
+ title = rawTitle + " Namespace Reference";
+ pageWords << rawTitle << "namespace" << "reference";
+ break;
+ }
+ default:
+ title = node->name();
+ pageWords << title;
break;
}
- case Node::Class:
- {
- title = node->name() + " Class Reference";
+ }
+ else {
+ switch (node->type()) {
+ case Node::Enum:
+ {
+ title = node->name() + " Enum Reference";
+ pageWords << node->name() << "enum" << "type";
+ url += "#" + node->name() + "-enum";
+ break;
+ }
+ case Node::Function:
+ {
+ title = node->name() + " Function Reference";
+ pageWords << node->name() << "function";
+ url += "#" + node->name();
+ break;
+ }
+ case Node::Property:
+ {
+ title = node->name() + " Property Reference";
+ pageWords << node->name() << "property";
+ url += "#" + node->name() + "-prop";
+ break;
+ }
+ case Node::Typedef:
+ {
+ title = node->name() + " Type Reference";
+ pageWords << node->name() << "typedef" << "type";
+ url += "#" + node->name();
+ break;
+ }
+ default:
+ title = node->name();
+ pageWords << title;
break;
}
- case Node::Namespace:
- {
- rawTitle = marker->plainName(inner);
- fullTitle = marker->plainFullName(inner);
- title = rawTitle + " Namespace Reference";
- break;
+
+ Node* parent = node->parent();
+ if (parent && ((parent->type() == Node::Class) ||
+ (parent->type() == Node::Namespace))) {
+ pageWords << parent->name();
}
- default:
- title = node->name();
- break;
}
- writer.writeAttribute("id",t);
+
+ writer.writeAttribute("id",guid);
writer.writeStartElement("pageWords");
- writer.writeCharacters(title);
- if (!inner->pageKeywords().isEmpty()) {
- const QStringList& w = inner->pageKeywords();
- for (int i = 0; i < w.size(); ++i) {
- writer.writeCharacters(" ");
- writer.writeCharacters(w.at(i).toLocal8Bit().constData());
- }
- }
+ writer.writeCharacters(pageWords.join(" "));
+
writer.writeEndElement();
writer.writeStartElement("pageTitle");
writer.writeCharacters(title);
writer.writeEndElement();
writer.writeStartElement("pageUrl");
- writer.writeCharacters(PageGenerator::fileName(node));
+ writer.writeCharacters(url);
writer.writeEndElement();
writer.writeStartElement("pageType");
switch (node->pageType()) {
@@ -4480,6 +4537,35 @@ bool HtmlGenerator::generatePageElement(QXmlStreamWriter& writer,
}
writer.writeEndElement();
writer.writeEndElement();
+
+ if (node->type() == Node::Fake && node->doc().hasTableOfContents()) {
+ QList<Atom*> toc = node->doc().tableOfContents();
+ if (!toc.isEmpty()) {
+ for (int i = 0; i < toc.size(); ++i) {
+ Text headingText = Text::sectionHeading(toc.at(i));
+ QString s = headingText.toString();
+ writer.writeStartElement("page");
+ guid = QUuid::createUuid().toString();
+ QString internalUrl = url + "#" + Doc::canonicalTitle(s);
+ writer.writeAttribute("id",guid);
+ writer.writeStartElement("pageWords");
+ writer.writeCharacters(pageWords.join(" "));
+ writer.writeCharacters(" ");
+ writer.writeCharacters(s);
+ writer.writeEndElement();
+ writer.writeStartElement("pageTitle");
+ writer.writeCharacters(s);
+ writer.writeEndElement();
+ writer.writeStartElement("pageUrl");
+ writer.writeCharacters(internalUrl);
+ writer.writeEndElement();
+ writer.writeStartElement("pageType");
+ writer.writeCharacters("Article");
+ writer.writeEndElement();
+ writer.writeEndElement();
+ }
+ }
+ }
return true;
}
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index eab10c6..d885ada 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -330,6 +330,7 @@ class HtmlGenerator : public PageGenerator
NodeMap obsoleteClasses;
NodeMap namespaceIndex;
NodeMap serviceClasses;
+ NodeMap qmlClasses;
QMap<QString, NodeMap > funcIndex;
QMap<Text, const Node *> legaleseTexts;
NewSinceMaps newSinceMaps;
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 259641e..41f90d5 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -652,8 +652,14 @@ NodeList InnerNode::overloads(const QString &funcName) const
InnerNode::InnerNode(Type type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
{
- if (type == Class)
+ switch (type) {
+ case Class:
+ case Namespace:
setPageType(ApiPage);
+ break;
+ default:
+ break;
+ }
}
/*!
@@ -845,6 +851,19 @@ bool LeafNode::isInnerNode() const
LeafNode::LeafNode(Type type, InnerNode *parent, const QString& name)
: Node(type, parent, name)
{
+ switch (type) {
+ case Enum:
+ case Function:
+ case Typedef:
+ case Variable:
+ case QmlProperty:
+ case QmlSignal:
+ case QmlMethod:
+ setPageType(ApiPage);
+ break;
+ default:
+ break;
+ }
}
/*!
@@ -1600,7 +1619,7 @@ QmlPropertyNode::QmlPropertyNode(QmlPropGroupNode *parent,
des(Trool_Default),
att(attached)
{
- // nothing.
+ setPageType(ApiPage);
}
/*!
diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf
index 03dd008..1f50e80 100644
--- a/tools/qdoc3/test/qt-html-templates.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates.qdocconf
@@ -39,15 +39,17 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <li><a href=\"modules.html\">Modules</a></li> \n" \
" <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
" <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
+ " <li><a href=\"licensing.html\">Licenses and Credits</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=\"qt-basic-concepts.html\">Programming with Qt</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=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
+ " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
" <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
" <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
" </ul> \n" \
" </li> \n" \
@@ -86,7 +88,7 @@ HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
" <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global stuff</a></li>\n" \
+ " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
" <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
" </ul> \n" \
" </div>\n" \
diff --git a/tools/qdoc3/tree.cpp b/tools/qdoc3/tree.cpp
index 56e3484..540ffa9 100644
--- a/tools/qdoc3/tree.cpp
+++ b/tools/qdoc3/tree.cpp
@@ -1963,8 +1963,8 @@ QString Tree::fullDocumentLocation(const Node *node) const
if ((node->subType() == Node::QmlClass) ||
(node->subType() == Node::QmlBasicType)) {
QString fb = node->fileBase();
- if (fb.startsWith(QLatin1String("QML:")))
- return node->fileBase() + ".html";
+ if (fb.startsWith(QLatin1String("qml-")))
+ return fb + ".html";
else
return "qml-" + node->fileBase() + ".html";
} else
@@ -1981,7 +1981,7 @@ QString Tree::fullDocumentLocation(const Node *node) const
else if ((parentNode = node->parent())) {
if (parentNode->subType() == Node::QmlPropertyGroup) {
parentNode = parentNode->parent();
- parentName = "qml-" + parentNode->fileBase() + ".html";
+ parentName = fullDocumentLocation(parentNode);
}
else
parentName = fullDocumentLocation(node->parent());
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index b9fd570..321b7fd 100644
--- a/tools/qml/qmlruntime.cpp
+++ b/tools/qml/qmlruntime.cpp
@@ -85,6 +85,7 @@
#include <QMenu>
#include <QAction>
#include <QFileDialog>
+#include <QInputDialog>
#include <QTimer>
#include <QGraphicsObject>
#include <QNetworkProxyFactory>
@@ -715,6 +716,9 @@ void QDeclarativeViewer::createMenu()
openAction->setShortcuts(QKeySequence::Open);
connect(openAction, SIGNAL(triggered()), this, SLOT(openFile()));
+ QAction *openUrlAction = new QAction(tr("Open &URL..."), this);
+ connect(openUrlAction, SIGNAL(triggered()), this, SLOT(openUrl()));
+
QAction *reloadAction = new QAction(tr("&Reload"), this);
reloadAction->setShortcuts(QKeySequence::Refresh);
connect(reloadAction, SIGNAL(triggered()), this, SLOT(reload()));
@@ -789,6 +793,7 @@ void QDeclarativeViewer::createMenu()
#if defined(Q_WS_MAEMO_5)
menu->addAction(openAction);
+ menu->addAction(openUrlAction);
menu->addAction(reloadAction);
menu->addAction(snapshotAction);
@@ -809,6 +814,7 @@ void QDeclarativeViewer::createMenu()
QMenu *fileMenu = menu->addMenu(tr("&File"));
fileMenu->addAction(openAction);
+ fileMenu->addAction(openUrlAction);
fileMenu->addAction(reloadAction);
fileMenu->addSeparator();
fileMenu->addAction(closeAction);
@@ -1021,6 +1027,14 @@ void QDeclarativeViewer::openFile()
}
}
+void QDeclarativeViewer::openUrl()
+{
+ QString cur = canvas->source().toLocalFile();
+ QString url= QInputDialog::getText(this, tr("Open QML file"), tr("URL of main QML file:"), QLineEdit::Normal, cur);
+ if (!url.isEmpty())
+ open(url);
+}
+
void QDeclarativeViewer::statusChanged()
{
if (canvas->status() == QDeclarativeView::Error && tester)
diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h
index 6fa7d81..d1ec26d 100644
--- a/tools/qml/qmlruntime.h
+++ b/tools/qml/qmlruntime.h
@@ -113,6 +113,7 @@ public slots:
void sceneResized(QSize size);
bool open(const QString&);
void openFile();
+ void openUrl();
void reload();
void takeSnapShot();
void toggleRecording();
diff --git a/tools/qtconfig/main.cpp b/tools/qtconfig/main.cpp
index 24d044f..928cf01 100644
--- a/tools/qtconfig/main.cpp
+++ b/tools/qtconfig/main.cpp
@@ -42,6 +42,9 @@
#include "ui_previewwidgetbase.h"
#include "mainwindow.h"
#include <QApplication>
+#include <QLibraryInfo>
+#include <QLocale>
+#include <QTranslator>
QT_USE_NAMESPACE
@@ -50,6 +53,17 @@ int main(int argc, char **argv)
Q_INIT_RESOURCE(qtconfig);
QApplication app(argc, argv);
+
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("qtconfig_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+
MainWindow mw;
mw.show();
return app.exec();
diff --git a/tools/qvfb/main.cpp b/tools/qvfb/main.cpp
index d96b255..28aa7d4 100644
--- a/tools/qvfb/main.cpp
+++ b/tools/qvfb/main.cpp
@@ -43,6 +43,9 @@
#include <QApplication>
#include <QRegExp>
+#include <QLibraryInfo>
+#include <QLocale>
+#include <QTranslator>
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
@@ -73,6 +76,16 @@ int runQVfb( int argc, char *argv[] )
QApplication app( argc, argv );
+ QTranslator translator;
+ QTranslator qtTranslator;
+ QString sysLocale = QLocale::system().name();
+ QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
+ if (translator.load(QLatin1String("qvfb_") + sysLocale, resourceDir)
+ && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
+ app.installTranslator(&translator);
+ app.installTranslator(&qtTranslator);
+ }
+
int width = 0;
int height = 0;
int depth = -32; // default, but overridable by skin
diff --git a/tools/qvfb/qvfb.cpp b/tools/qvfb/qvfb.cpp
index bc9e529..b4ccebc 100644
--- a/tools/qvfb/qvfb.cpp
+++ b/tools/qvfb/qvfb.cpp
@@ -398,47 +398,47 @@ void QVFb::createMenu(T *menu)
QMenu* QVFb::createFileMenu()
{
- QMenu *file = new QMenu( "File", this );
- file->addAction( "Configure...", this, SLOT(configure()), 0 );
+ QMenu *file = new QMenu( tr("&File"), this );
+ file->addAction( tr("&Configure..."), this, SLOT(configure()), QKeySequence::Preferences );
file->addSeparator();
- file->addAction( "&Save image...", this, SLOT(saveImage()), 0 );
- file->addAction( "&Animation...", this, SLOT(toggleAnimation()), 0 );
+ file->addAction( tr("&Save image..."), this, SLOT(saveImage()), QKeySequence::Save );
+ file->addAction( tr("&Animation..."), this, SLOT(toggleAnimation()), 0 );
file->addSeparator();
- file->addAction( "&Quit", qApp, SLOT(quit()) );
+ file->addAction( tr("&Quit"), qApp, SLOT(quit()), QKeySequence::Quit );
return file;
}
QMenu* QVFb::createViewMenu()
{
- viewMenu = new QMenu( "View", this );
- cursorAction = viewMenu->addAction( "Show &Cursor", this,
+ viewMenu = new QMenu( tr("&View"), this );
+ cursorAction = viewMenu->addAction( tr("Show &Cursor"), this,
SLOT(toggleCursor()) );
cursorAction->setCheckable(true);
if ( view )
enableCursor(true);
- viewMenu->addAction( "&Refresh Rate...", this, SLOT(changeRate()) );
+ viewMenu->addAction( tr("&Refresh Rate..."), this, SLOT(changeRate()) );
viewMenu->addSeparator();
- viewMenu->addAction( "No rotation", this, SLOT(setRot0()) );
- viewMenu->addAction( "90\260 rotation", this, SLOT(setRot90()) );
- viewMenu->addAction( "180\260 rotation", this, SLOT(setRot180()) );
- viewMenu->addAction( "270\260 rotation", this, SLOT(setRot270()) );
+ viewMenu->addAction( tr("&No rotation"), this, SLOT(setRot0()) );
+ viewMenu->addAction( tr("&90\260 rotation"), this, SLOT(setRot90()) );
+ viewMenu->addAction( tr("1&80\260 rotation"), this, SLOT(setRot180()) );
+ viewMenu->addAction( tr("2&70\260 rotation"), this, SLOT(setRot270()) );
viewMenu->addSeparator();
- viewMenu->addAction( "Zoom scale &0.5", this, SLOT(setZoomHalf()) );
- viewMenu->addAction( "Zoom scale 0.75", this, SLOT(setZoom075()) );
- viewMenu->addAction( "Zoom scale &1", this, SLOT(setZoom1()) );
- viewMenu->addAction( "Zoom scale &2", this, SLOT(setZoom2()) );
- viewMenu->addAction( "Zoom scale &3", this, SLOT(setZoom3()) );
- viewMenu->addAction( "Zoom scale &4", this, SLOT(setZoom4()) );
+ viewMenu->addAction( tr("Zoom scale &0.5"), this, SLOT(setZoomHalf()) );
+ viewMenu->addAction( tr("Zoom scale 0.7&5"), this, SLOT(setZoom075()) );
+ viewMenu->addAction( tr("Zoom scale &1"), this, SLOT(setZoom1()) );
+ viewMenu->addAction( tr("Zoom scale &2"), this, SLOT(setZoom2()) );
+ viewMenu->addAction( tr("Zoom scale &3"), this, SLOT(setZoom3()) );
+ viewMenu->addAction( tr("Zoom scale &4"), this, SLOT(setZoom4()) );
viewMenu->addSeparator();
- viewMenu->addAction( "Zoom scale...", this, SLOT(setZoom()) );
+ viewMenu->addAction( tr("Zoom &scale..."), this, SLOT(setZoom()) );
return viewMenu;
}
QMenu* QVFb::createHelpMenu()
{
- QMenu *help = new QMenu( "Help", this );
- help->addAction("About...", this, SLOT(about()));
+ QMenu *help = new QMenu( tr("&Help"), this );
+ help->addAction(tr("&About..."), this, SLOT(about()));
return help;
}
@@ -525,17 +525,17 @@ void QVFb::setZoom4()
void QVFb::saveImage()
{
QImage img = view->image();
- QString filename = QFileDialog::getSaveFileName(this, "Save Main Screen image", "snapshot.png", "Portable Network Graphics (*.png)");
+ QString filename = QFileDialog::getSaveFileName(this, tr("Save Main Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)"));
if (!filename.isEmpty()){
if(!img.save(filename,"PNG"))
- QMessageBox::critical(this, "Save Main Screen Image", "Save failed. Check that you have permission to write to the target directory.");
+ QMessageBox::critical(this, tr("Save Main Screen Image"), tr("Save failed. Check that you have permission to write to the target directory."));
}
if (secondaryView) {
QImage img = view->image();
- QString filename = QFileDialog::getSaveFileName(this, "Save Second Screen image", "snapshot.png", "Portable Network Graphics (*.png)");
+ QString filename = QFileDialog::getSaveFileName(this, tr("Save Second Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)"));
if (!filename.isEmpty()) {
if(!img.save(filename,"PNG"))
- QMessageBox::critical(this, "Save Second Screen Image", "Save failed. Check that you have permission to write to the target directory.");
+ QMessageBox::critical(this, tr("Save Second Screen Image"), tr("Save failed. Check that you have permission to write to the target directory."));
}
}
}
@@ -577,7 +577,7 @@ void QVFb::setRate(int i)
void QVFb::about()
{
- QMessageBox::about(this, "About QVFB",
+ QMessageBox::about(this, tr("About QVFB"), tr(
"<h2>The Qt for Embedded Linux Virtual X11 Framebuffer</h2>"
"<p>This application runs under Qt for X11, emulating a simple framebuffer, "
"which the Qt for Embedded Linux server and clients can attach to just as if "
@@ -586,7 +586,7 @@ void QVFb::about()
"Linux applications under X11 without having to switch to a virtual console. "
"This means you can comfortably use your other development tools such "
"as GUI profilers and debuggers."
- );
+ ));
}
void QVFb::findSkins(const QString &currentSkin)
diff --git a/tools/qvfb/qvfbratedlg.cpp b/tools/qvfb/qvfbratedlg.cpp
index e491bdf..a0cbb2f 100644
--- a/tools/qvfb/qvfbratedlg.cpp
+++ b/tools/qvfb/qvfbratedlg.cpp
@@ -55,7 +55,7 @@ QVFbRateDialog::QVFbRateDialog(int rate, QWidget *parent)
QVBoxLayout *tl = new QVBoxLayout(this);
tl->setMargin(5);
- QLabel *label = new QLabel("Target frame rate:", this);
+ QLabel *label = new QLabel(tr("Target frame rate:"), this);
tl->addWidget(label);
QHBoxLayout *hl = new QHBoxLayout();
@@ -67,15 +67,15 @@ QVFbRateDialog::QVFbRateDialog(int rate, QWidget *parent)
rateSlider->setValue(rate);
hl->addWidget(rateSlider);
connect(rateSlider, SIGNAL(valueChanged(int)), this, SLOT(rateChanged(int)));
- rateLabel = new QLabel(QString("%1fps").arg(rate), this);
+ rateLabel = new QLabel(tr("%1fps").arg(rate), this);
hl->addWidget(rateLabel);
hl = new QHBoxLayout();
tl->addItem(hl);
- QPushButton *pb = new QPushButton("OK", this);
+ QPushButton *pb = new QPushButton(tr("OK"), this);
connect(pb, SIGNAL(clicked()), this, SLOT(ok()));
hl->addWidget(pb);
- pb = new QPushButton("Cancel", this);
+ pb = new QPushButton(tr("Cancel"), this);
connect(pb, SIGNAL(clicked()), this, SLOT(cancel()));
hl->addWidget(pb);
}
@@ -84,7 +84,7 @@ void QVFbRateDialog::rateChanged(int r)
{
if (rateSlider->value() != r)
rateSlider->setValue(r);
- rateLabel->setText(QString("%1fps").arg(r));
+ rateLabel->setText(tr("%1fps").arg(r));
emit updateRate(r);
}
diff --git a/tools/runonphone/ossignalconverter.h b/tools/runonphone/ossignalconverter.h
index f53f3c1..398d0f6 100644
--- a/tools/runonphone/ossignalconverter.h
+++ b/tools/runonphone/ossignalconverter.h
@@ -43,6 +43,8 @@
#define OSSIGNALCONVERTER_H
#include <QObject>
+class OsSignalConverterPrivate;
+
class OsSignalConverter : public QObject
{
friend class OsSignalConverterPrivate;
diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro
index 15dff51..7ff361c 100644
--- a/tools/runonphone/runonphone.pro
+++ b/tools/runonphone/runonphone.pro
@@ -31,4 +31,5 @@ else {
SOURCES += serenum_stub.cpp
}
-
+target.path=$$[QT_INSTALL_BINS]
+INSTALLS += target