summaryrefslogtreecommitdiffstats
path: root/doc/tkerror.n
Commit message (Expand)AuthorAgeFilesLines
* Replaced SCCS strings, fixed binary filesstanton1998-09-141-1/+1
* Initial revisionrjohnson1998-04-011-0/+38
1 + QAbstractPlatformMenuBar *platformMenuBar; +#endif #ifdef Q_WS_MAC //mac menubar binding struct QMacMenuBarPrivate { @@ -273,6 +290,12 @@ public: #ifdef QT_SOFTKEYS_ENABLED QAction *menuBarAction; #endif + +#ifdef Q_WS_X11 + void updateCornerWidgetToolBar(); + QToolBar *cornerWidgetToolBar; + QWidget *cornerWidgetContainer; +#endif }; #endif diff --git a/src/gui/widgets/qmenubar_x11.cpp b/src/gui/widgets/qmenubar_x11.cpp new file mode 100644 index 0000000..ca227a6 --- /dev/null +++ b/src/gui/widgets/qmenubar_x11.cpp @@ -0,0 +1,114 @@ +/**************************************************************************** +** +** 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 QtGui 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$ +** +****************************************************************************/ +#include "qmenubar_x11_p.h" + +#ifndef QT_NO_MENUBAR + +#include "qapplication.h" +#include "qdebug.h" +#include "qevent.h" +#include "qmenu.h" +#include "qmenubar.h" + +QT_BEGIN_NAMESPACE + +QX11MenuBar::~QX11MenuBar() +{ +} + +void QX11MenuBar::init(QMenuBar *_menuBar) +{ + nativeMenuBar = -1; + menuBar = _menuBar; +} + +void QX11MenuBar::setVisible(bool visible) +{ + menuBar->QWidget::setVisible(visible); +} + +void QX11MenuBar::actionEvent(QActionEvent *e) +{ + Q_UNUSED(e); +} + +void QX11MenuBar::handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow) +{ + Q_UNUSED(oldParent) + Q_UNUSED(newParent) + Q_UNUSED(oldWindow) + Q_UNUSED(newWindow) +} + +bool QX11MenuBar::allowCornerWidgets() const +{ + return true; +} + +void QX11MenuBar::popupAction(QAction *) +{ +} + +void QX11MenuBar::setNativeMenuBar(bool value) +{ + if (nativeMenuBar == -1 || (value != bool(nativeMenuBar))) { + nativeMenuBar = value; + } +} + +bool QX11MenuBar::isNativeMenuBar() const +{ + return false; +} + +bool QX11MenuBar::shortcutsHandledByNativeMenuBar() const +{ + return false; +} + +bool QX11MenuBar::menuBarEventFilter(QObject *, QEvent *) +{ + return false; +} + +QT_END_NAMESPACE + +#endif // QT_NO_MENUBAR diff --git a/src/gui/widgets/qmenubar_x11_p.h b/src/gui/widgets/qmenubar_x11_p.h new file mode 100644 index 0000000..dbe0223 --- /dev/null +++ b/src/gui/widgets/qmenubar_x11_p.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** 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 QtGui 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$ +** +****************************************************************************/ +#ifndef QX11MENUBAR_P_H +#define QX11MENUBAR_P_H + +#ifndef QT_NO_MENUBAR + +#include "qabstractplatformmenubar_p.h" + +QT_BEGIN_NAMESPACE + +class QMenuBar; + +class QX11MenuBar : public QAbstractPlatformMenuBar +{ +public: + ~QX11MenuBar(); + + virtual void init(QMenuBar *); + + virtual void setVisible(bool visible); + + virtual void actionEvent(QActionEvent *e); + + virtual void handleReparent(QWidget *oldParent, QWidget *newParent, QWidget *oldWindow, QWidget *newWindow); + + virtual bool allowCornerWidgets() const; + + virtual void popupAction(QAction*); + + virtual void setNativeMenuBar(bool); + virtual bool isNativeMenuBar() const; + + virtual bool shortcutsHandledByNativeMenuBar() const; + virtual bool menuBarEventFilter(QObject *, QEvent *event); + +private: + QMenuBar *menuBar; + int nativeMenuBar : 3; // Only has values -1, 0, and 1 +}; + +QT_END_NAMESPACE + +#endif // QT_NO_MENUBAR + +#endif /* QX11MENUBAR_P_H */ diff --git a/src/gui/widgets/widgets.pri b/src/gui/widgets/widgets.pri index 669b838..6b3d6a9 100644 --- a/src/gui/widgets/widgets.pri +++ b/src/gui/widgets/widgets.pri @@ -144,6 +144,14 @@ SOURCES += \ widgets/qplaintextedit.cpp \ widgets/qprintpreviewwidget.cpp +x11: { + HEADERS += \ + widgets/qabstractplatformmenubar_p.h + + SOURCES += \ + widgets/qmenubar_x11.cpp +} + !embedded:!qpa:mac { HEADERS += widgets/qmacnativewidget_mac.h \ widgets/qmaccocoaviewcontainer_mac.h -- cgit v0.12 From 31ff55bbeb84f10e75e997c75a63deda83e62507 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Tue, 14 Jun 2011 18:04:26 +0200 Subject: Introduce menubar plugin system Merge-request: 1254 Reviewed-by: Gabriel de Dietrich --- src/gui/widgets/qabstractplatformmenubar_p.h | 12 ++++++++++++ src/gui/widgets/qmenubar.cpp | 5 ++++- src/gui/widgets/qmenubar_x11.cpp | 24 ++++++++++++++++++++++++ src/gui/widgets/qmenubar_x11_p.h | 2 ++ 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qabstractplatformmenubar_p.h b/src/gui/widgets/qabstractplatformmenubar_p.h index 86e212b..cb4e5cb 100644 --- a/src/gui/widgets/qabstractplatformmenubar_p.h +++ b/src/gui/widgets/qabstractplatformmenubar_p.h @@ -41,7 +41,9 @@ #ifndef QABSTRACTPLATFORMMENUBAR_P_H #define QABSTRACTPLATFORMMENUBAR_P_H +#include #include +#include #ifndef QT_NO_MENUBAR @@ -54,6 +56,16 @@ class QMenuBar; class QObject; class QWidget; +class QAbstractPlatformMenuBar; + +struct QPlatformMenuBarFactoryInterface : public QFactoryInterface +{ + virtual QAbstractPlatformMenuBar *create() = 0; +}; + +#define QPlatformMenuBarFactoryInterface_iid "com.nokia.qt.QPlatformMenuBarFactoryInterface" +Q_DECLARE_INTERFACE(QPlatformMenuBarFactoryInterface, QPlatformMenuBarFactoryInterface_iid) + /*! The platform-specific implementation of a menubar */ diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp index ce95c84..3e5365c 100644 --- a/src/gui/widgets/qmenubar.cpp +++ b/src/gui/widgets/qmenubar.cpp @@ -55,6 +55,9 @@ #include #include #include +#ifdef Q_WS_X11 +#include +#endif #ifndef QT_NO_MENUBAR @@ -761,7 +764,7 @@ void QMenuBarPrivate::init() } #endif #ifdef Q_WS_X11 - platformMenuBar = new QX11MenuBar; + platformMenuBar = qt_guiPlatformMenuBarFactory()->create(); platformMenuBar->init(q); #endif diff --git a/src/gui/widgets/qmenubar_x11.cpp b/src/gui/widgets/qmenubar_x11.cpp index ca227a6..37c085f 100644 --- a/src/gui/widgets/qmenubar_x11.cpp +++ b/src/gui/widgets/qmenubar_x11.cpp @@ -48,6 +48,8 @@ #include "qmenu.h" #include "qmenubar.h" +#include + QT_BEGIN_NAMESPACE QX11MenuBar::~QX11MenuBar() @@ -109,6 +111,28 @@ bool QX11MenuBar::menuBarEventFilter(QObject *, QEvent *) return false; } +struct QX11MenuBarFactory : public QPlatformMenuBarFactoryInterface +{ + QAbstractPlatformMenuBar *create() { return new QX11MenuBar; } + virtual QStringList keys() const { return QStringList(); } +}; + +QPlatformMenuBarFactoryInterface *qt_guiPlatformMenuBarFactory() +{ + static QPlatformMenuBarFactoryInterface *factory = 0; + if (!factory) { +#ifndef QT_NO_LIBRARY + QFactoryLoader loader(QPlatformMenuBarFactoryInterface_iid, QLatin1String("/menubar")); + factory = qobject_cast(loader.instance(QLatin1String("default"))); +#endif // QT_NO_LIBRARY + if(!factory) { + static QX11MenuBarFactory def; + factory = &def; + } + } + return factory; +} + QT_END_NAMESPACE #endif // QT_NO_MENUBAR diff --git a/src/gui/widgets/qmenubar_x11_p.h b/src/gui/widgets/qmenubar_x11_p.h index dbe0223..1c43b04 100644 --- a/src/gui/widgets/qmenubar_x11_p.h +++ b/src/gui/widgets/qmenubar_x11_p.h @@ -77,6 +77,8 @@ private: int nativeMenuBar : 3; // Only has values -1, 0, and 1 }; +QPlatformMenuBarFactoryInterface *qt_guiPlatformMenuBarFactory(); + QT_END_NAMESPACE #endif // QT_NO_MENUBAR -- cgit v0.12 From c70a0e817aa771f8a6cf5d6e60ab40161382bdb3 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 15 Jul 2011 13:29:46 +0200 Subject: Phase 1 of QTBUG-20412, the XML manifest file --- doc/src/examples/addressbook.qdoc | 2 +- tools/qdoc3/codemarker.cpp | 2 +- tools/qdoc3/codeparser.cpp | 3 ++ tools/qdoc3/cppcodemarker.cpp | 2 + tools/qdoc3/cppcodeparser.cpp | 8 ++-- tools/qdoc3/doc.cpp | 4 +- tools/qdoc3/generator.h | 4 ++ tools/qdoc3/htmlgenerator.cpp | 96 +++++++++++++++++++++++++++++++++++---- tools/qdoc3/htmlgenerator.h | 1 + tools/qdoc3/node.cpp | 18 ++++++-- tools/qdoc3/node.h | 25 +++++++++- 11 files changed, 141 insertions(+), 24 deletions(-) diff --git a/doc/src/examples/addressbook.qdoc b/doc/src/examples/addressbook.qdoc index 114c22b..f19582d 100644 --- a/doc/src/examples/addressbook.qdoc +++ b/doc/src/examples/addressbook.qdoc @@ -29,7 +29,7 @@ \example itemviews/addressbook \title Address Book Example - The address book example shows how to use proxy models to display + \brief The address book example shows how to use proxy models to display different views onto data from a single model. \image addressbook-example.png Screenshot of the Address Book example diff --git a/tools/qdoc3/codemarker.cpp b/tools/qdoc3/codemarker.cpp index 614419e..705ef6c 100644 --- a/tools/qdoc3/codemarker.cpp +++ b/tools/qdoc3/codemarker.cpp @@ -76,7 +76,7 @@ CodeMarker::~CodeMarker() A code market performs no initialization by default. Marker-specific initialization is performed in subclasses. */ -void CodeMarker::initializeMarker(const Config &config) +void CodeMarker::initializeMarker(const Config& ) // config { } diff --git a/tools/qdoc3/codeparser.cpp b/tools/qdoc3/codeparser.cpp index c7a8912..9ab5f82 100644 --- a/tools/qdoc3/codeparser.cpp +++ b/tools/qdoc3/codeparser.cpp @@ -287,6 +287,9 @@ void CodeParser::processCommonMetaCommand(const Location &location, FakeNode *fake = static_cast(node); fake->setTitle(arg); nameToTitle.insert(fake->name(),arg); + if (fake->subType() == Node::Example) { + + } } else location.warning(tr("Ignored '\\%1'").arg(COMMAND_TITLE)); diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 585d6ce..e439fff 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -878,6 +878,7 @@ static const char * const keywordTable[] = { "signals", "slots", "emit", 0 }; +#if 0 static QString untabified(const QString &in) { QString res; @@ -897,6 +898,7 @@ static QString untabified(const QString &in) return res; } +#endif /* @char diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 6f5baa0..1536867 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -704,7 +704,7 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, if (command == COMMAND_CLASS) { if (paths.size() > 1) { if (!paths[1].endsWith(".h")) { - ClassNode*cnode = static_cast(node); + ClassNode* cnode = static_cast(node); cnode->setQmlElement(paths[1]); } } @@ -712,9 +712,9 @@ Node *CppCodeParser::processTopicCommand(const Doc& doc, return node; } else if (command == COMMAND_EXAMPLE) { - FakeNode *fake = new FakeNode(tre->root(), arg, Node::Example); - createExampleFileNodes(fake); - return fake; + ExampleNode* en = new ExampleNode(tre->root(), arg); + createExampleFileNodes(en); + return en; } else if (command == COMMAND_EXTERNALPAGE) { return new FakeNode(tre->root(), arg, Node::ExternalPage); diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index 479931d..f0c4264 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE Q_GLOBAL_STATIC(QSet, null_Set_QString) Q_GLOBAL_STATIC(QStringList, null_QStringList) Q_GLOBAL_STATIC(QList, null_QList_Text) -Q_GLOBAL_STATIC(QStringMap, null_QStringMap) +//Q_GLOBAL_STATIC(QStringMap, null_QStringMap) Q_GLOBAL_STATIC(QStringMultiMap, null_QStringMultiMap) struct Macro @@ -1861,7 +1861,7 @@ void DocParser::startSection(Doc::Sections unit, int cmd) } -void DocParser::endSection(int unit, int endCmd) +void DocParser::endSection(int , int) // (int unit, int endCmd) { leavePara(); append(Atom::SectionRight, QString::number(currentSection)); diff --git a/tools/qdoc3/generator.h b/tools/qdoc3/generator.h index e5e9747..d4fe76f 100644 --- a/tools/qdoc3/generator.h +++ b/tools/qdoc3/generator.h @@ -57,6 +57,10 @@ QT_BEGIN_NAMESPACE +typedef QMap NewSinceMaps; +typedef QMap ParentMaps; +typedef QMap NewClassMaps; + class ClassNode; class Config; class CodeMarker; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 52da178..a64518d 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -276,6 +276,7 @@ void HtmlGenerator::generateTree(const Tree *tree) generatePageIndex(outputDir() + "/" + fileBase + ".pageindex"); helpProjectWriter->generate(myTree); + generateManifestFile(); } void HtmlGenerator::startText(const Node * /* relative */, @@ -331,8 +332,10 @@ int HtmlGenerator::generateAtom(const Atom *atom, break; case Atom::BriefLeft: if (relative->type() == Node::Fake) { - skipAhead = skipAtoms(atom, Atom::BriefRight); - break; + if (relative->subType() != Node::Example) { + skipAhead = skipAtoms(atom, Atom::BriefRight); + break; + } } out() << "

"; @@ -765,6 +768,15 @@ int HtmlGenerator::generateAtom(const Atom *atom, out() << " alt=\"" << protectEnc(text) << "\""; out() << " />"; helpProjectWriter->addExtraFile(fileName); + if ((relative->type() == Node::Fake) && + (relative->subType() == Node::Example)) { + const ExampleNode* cen = static_cast(relative); + if (cen->imageFileName().isEmpty()) { + ExampleNode* en = const_cast(cen); + en->setImageFileName(fileName); + ExampleNode::exampleNodeMap.insert(en->title(),en); + } + } } if (atom->type() == Atom::Image) out() << "

"; @@ -1792,7 +1804,6 @@ void HtmlGenerator::generateTableOfContents(const Node *node, toc = node->doc().tableOfContents(); if (toc.isEmpty() && !sections && (node->subType() != Node::Module)) return; - bool debug = false; QStringList sectionNumber; int detailsBase = 0; @@ -3779,8 +3790,6 @@ void HtmlGenerator::endLink() inObsoleteLink = false; } -#ifdef QDOC_QML - /*! Generates the summary for the \a section. Only used for sections of QML element documentation. @@ -4266,7 +4275,6 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node) return ""; } else if (node->type() == Node::Fake) { -#ifdef QDOC_QML if ((node->subType() == Node::QmlClass) || (node->subType() == Node::QmlBasicType)) { QString fb = node->fileBase(); @@ -4274,9 +4282,9 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node) return fb + ".html"; else return Generator::outputPrefix(QLatin1String("QML")) + node->fileBase() + QLatin1String(".html"); - } else -#endif - parentName = node->fileBase() + ".html"; + } + else + parentName = node->fileBase() + ".html"; } else if (node->fileBase().isEmpty()) return ""; @@ -4387,6 +4395,74 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node) return parentName.toLower() + anchorRef; } -#endif +void HtmlGenerator::generateManifestFile() +{ + if (ExampleNode::exampleNodeMap.isEmpty()) + return; + QString fileName = "examples-manifest.xml"; + QFile file(outputDir() + "/" + fileName); + if (!file.open(QFile::WriteOnly | QFile::Text)) + return ; + + QXmlStreamWriter writer(&file); + writer.setAutoFormatting(true); + writer.writeStartDocument(); + writer.writeStartElement("instructionals"); + writer.writeAttribute("module", project); + writer.writeStartElement("examples"); + + ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); + while (i != ExampleNode::exampleNodeMap.end()) { + const ExampleNode* en = i.value(); + writer.writeStartElement("example"); + writer.writeAttribute("name", en->title()); + QString docUrl = projectUrl + "/" + en->fileBase() + ".html"; + writer.writeAttribute("docUrl", docUrl); + foreach (const Node* child, en->childNodes()) { + if (child->subType() == Node::File) { + QString file = child->name(); + if (file.endsWith(".pro")) + writer.writeAttribute("projectPath", "./" + file); + } + } + writer.writeAttribute("imageUrl", projectUrl + "/" + en->imageFileName()); + Text brief = en->doc().briefText(); + if (!brief.isEmpty()) { + writer.writeStartElement("description"); + writer.writeCharacters(brief.toString()); + writer.writeEndElement(); // description + } + QStringList tags = en->title().toLower().split(" "); + if (!tags.isEmpty()) { + writer.writeStartElement("tags"); + bool wrote_one = false; + for (int n=0; n0 && wrote_one) + writer.writeCharacters(","); + writer.writeCharacters(tag); + wrote_one = true; + } + writer.writeEndElement(); // tags + } + writer.writeEndElement(); // example + ++i; + } + + writer.writeEndElement(); // examples + writer.writeEndElement(); // instructionals + writer.writeEndDocument(); + file.close(); +} QT_END_NAMESPACE diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 70ec0b7..153a9cf 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -93,6 +93,7 @@ class HtmlGenerator : public PageGenerator virtual void terminateGenerator(); virtual QString format(); virtual void generateTree(const Tree *tree); + void generateManifestFile(); QString protectEnc(const QString &string); static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 683c210..e14b08d 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -39,10 +39,6 @@ ** ****************************************************************************/ -/* - node.cpp -*/ - #include "node.h" #include "tree.h" #include "codemarker.h" @@ -51,6 +47,8 @@ QT_BEGIN_NAMESPACE +ExampleNodeMap ExampleNode::exampleNodeMap; + /*! \class Node \brief The Node class is a node in the Tree. @@ -1062,6 +1060,16 @@ QString FakeNode::subTitle() const } /*! + The constructor calls the FakeNode constructor with + \a parent, \a name, and Node::Example. + */ +ExampleNode::ExampleNode(InnerNode* parent, const QString& name) + : FakeNode(parent, name, Node::Example) +{ + // nothing +} + +/*! \class EnumNode */ @@ -1683,6 +1691,7 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue) } } +#if 0 static QString valueType(const QString &n) { if (n == "QPoint") @@ -1713,6 +1722,7 @@ static QString valueType(const QString &n) return "QDeclarativeFontValueType"; return QString(); } +#endif /*! Returns true if a QML property or attached property is diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index e1e9440..2887923 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -58,7 +58,13 @@ QT_BEGIN_NAMESPACE +class Node; class InnerNode; +class ExampleNode; + +typedef QMap NodeMap; +typedef QMultiMap NodeMultiMap; +typedef QMap ExampleNodeMap; class Node { @@ -380,8 +386,10 @@ class FakeNode : public InnerNode virtual QString title() const; virtual QString fullTitle() const; virtual QString subTitle() const; + virtual QString imageFileName() const { return QString(); } const NodeList &groupMembers() const { return gr; } virtual QString nameForLists() const { return title(); } + virtual void setImageFileName(const QString& ) { } private: SubType sub; @@ -390,7 +398,21 @@ class FakeNode : public InnerNode NodeList gr; }; -#ifdef QDOC_QML +class ExampleNode : public FakeNode +{ + public: + ExampleNode(InnerNode* parent, const QString& name); + virtual ~ExampleNode() { } + virtual QString imageFileName() const { return imageFileName_; } + virtual void setImageFileName(const QString& ifn) { imageFileName_ = ifn; } + + public: + static ExampleNodeMap exampleNodeMap; + + private: + QString imageFileName_; +}; + class QmlClassNode : public FakeNode { public: @@ -482,7 +504,6 @@ class QmlPropertyNode : public LeafNode Trool wri; bool att; }; -#endif class EnumItem { -- cgit v0.12 From 54b7ff1f5aea6ea33dad98d7daf1a7bdc9da7eb7 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 21 Jul 2011 11:50:08 +0200 Subject: qdoc: Added HTML.nobreadcrumbs as a config variable. Task-numberr: QTBUG-20475 --- tools/qdoc3/htmlgenerator.cpp | 7 ++++++- tools/qdoc3/htmlgenerator.h | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index a64518d..3263e9c 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -180,6 +180,9 @@ void HtmlGenerator::initializeGenerator(const Config &config) pleaseGenerateMacRef = config.getBool(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_GENERATEMACREFS); + noBreadCrumbs = config.getBool(HtmlGenerator::format() + + Config::dot + + HTMLGENERATOR_NOBREADCRUMBS); project = config.getString(CONFIG_PROJECT); @@ -1516,8 +1519,10 @@ void HtmlGenerator::generateBreadCrumbs(const QString &title, const Node *node, CodeMarker *marker) { + if (noBreadCrumbs) + return; + Text breadcrumbs; - if (node->type() == Node::Class) { const ClassNode *cn = static_cast(node); QString name = node->moduleName(); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 153a9cf..d97d387 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -274,6 +274,7 @@ class HtmlGenerator : public PageGenerator QString footer; QString address; bool pleaseGenerateMacRef; + bool noBreadCrumbs; QString project; QString projectDescription; QString projectUrl; @@ -308,6 +309,7 @@ class HtmlGenerator : public PageGenerator #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_POSTHEADER "postheader" #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" +#define HTMLGENERATOR_NOBREADCRUMBS "nobreadcrumbs" QT_END_NAMESPACE -- cgit v0.12 From b17ae5f8b26838288d7841b4b0651e435198396f Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Fri, 22 Jul 2011 13:33:48 +0200 Subject: qdoc: Fixed to remove extranious markup tags. Task-numberr: QTBUG-20474 --- tools/qdoc3/ditaxmlgenerator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index b801e1e..6d74762 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -770,7 +770,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom, { writeStartTag(DT_codeblock); xmlWriter().writeAttribute("outputclass","cpp"); - QString chars = trimmedTrailing(atom->string()); + QString chars = trimmedTrailing(atom->string()); writeText(chars, marker, relative); writeEndTag(); // } @@ -3407,6 +3407,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, "<@type>", "<@type>", "<@headerfile>", "<@headerfile>", "<@func>", "<@func>", + "<@func ", "<@func ", "<@param>", "<@param>", "<@extra>", "<@extra>", "", "", @@ -3419,7 +3420,7 @@ void DitaXmlGenerator::writeText(const QString& markedCode, for (int i = 0, n = src.size(); i < n;) { if (src.at(i) == charLangle) { bool handled = false; - for (int k = 0; k != 12; ++k) { + for (int k = 0; k != 13; ++k) { const QString & tag = spanTags[2 * k]; if (tag == QStringRef(&src, i, tag.length())) { html += spanTags[2 * k + 1]; -- cgit v0.12 From 14a46c4e79dc07faf21f2c657cbdcf8f88607a92 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 2 Aug 2011 10:14:57 +0200 Subject: qdoc3: Write "Signal Handlers" instead of "Signals" as header Task-number: QTBUG-17072 --- tools/qdoc3/cppcodemarker.cpp | 20 ++++++++++---------- tools/qdoc3/ditaxmlgenerator.cpp | 2 +- tools/qdoc3/htmlgenerator.cpp | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index e439fff..3e31cee 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -483,7 +483,7 @@ QList
CppCodeMarker::sections(const InnerNode *inner, "", "public function", "public functions"); - FastSection publicSignals(classe, "Signals", "", "signal", "signals"); + FastSection publicSignals(classe, "Signal Handlers", "", "signal handler", "signal handlers"); FastSection publicSlots(classe, "Public Slots", "", "public slot", "public slots"); FastSection publicTypes(classe, "Public Types", "", "public type", "public types"); FastSection publicVariables(classe, @@ -1159,15 +1159,15 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, "property", "properties"); FastSection qmlsignals(qmlClassNode, - "Signals", + "Signal Handlers", "", - "signal", - "signals"); + "signal handler", + "signal handlers"); FastSection qmlattachedsignals(qmlClassNode, - "Attached Signals", + "Attached Signal Handlers", "", - "signal", - "signals"); + "signal handler", + "signal handlers"); FastSection qmlmethods(qmlClassNode, "Methods", "", @@ -1222,9 +1222,9 @@ QList
CppCodeMarker::qmlSections(const QmlClassNode* qmlClassNode, FastSection qmlproperties(qmlClassNode, "Property Documentation","qmlprop","member","members"); FastSection qmlattachedproperties(qmlClassNode,"Attached Property Documentation","qmlattprop", "member","members"); - FastSection qmlsignals(qmlClassNode,"Signal Documentation","qmlsig","member","members"); - FastSection qmlattachedsignals(qmlClassNode,"Attached Signal Documentation","qmlattsig", - "member","members"); + FastSection qmlsignals(qmlClassNode,"Signal Handler Documentation","qmlsig","handler","handlers"); + FastSection qmlattachedsignals(qmlClassNode,"Attached Signal Handler Documentation","qmlattsig", + "handler","handlers"); FastSection qmlmethods(qmlClassNode,"Method Documentation","qmlmeth","member","members"); FastSection qmlattachedmethods(qmlClassNode,"Attached Method Documentation","qmlattmeth", "member","members"); diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 6d74762..c05880f 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -76,7 +76,7 @@ QString DitaXmlGenerator::sinceTitles[] = " New Variables", " New QML Elements", " New Qml Properties", - " New Qml Signals", + " New Qml Signal Handlers", " New Qml Methods", "" }; diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 3263e9c..bdb2e44 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -80,7 +80,7 @@ QString HtmlGenerator::sinceTitles[] = " New Variables", " New QML Elements", " New QML Properties", - " New QML Signals", + " New QML Signal Handlers", " New QML Methods", "" }; -- cgit v0.12 From eed8a63d17a7d324892f920b034db9e268f27685 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 2 Aug 2011 11:06:44 +0200 Subject: qdoc3: Reverting part of the change for QTBUG-17072 Task-number: QTBUG-17072 --- tools/qdoc3/cppcodemarker.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 3e31cee..f3ec6fd 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -483,10 +483,10 @@ QList
CppCodeMarker::sections(const InnerNode *inner, "", "public function", "public functions"); - FastSection publicSignals(classe, "Signal Handlers", "", "signal handler", "signal handlers"); - FastSection publicSlots(classe, "Public Slots", "", "public slot", "public slots"); - FastSection publicTypes(classe, "Public Types", "", "public type", "public types"); - FastSection publicVariables(classe, + FastSection publicSignals(classe, "Signals", "", "signal", "signal"); + FastSection publicSlots(classe, "Public Slots", "", "public slot", "public slots"); + FastSection publicTypes(classe, "Public Types", "", "public type", "public types"); + FastSection publicVariables(classe, "Public Variables", "", "public variable", -- cgit v0.12 From 99048b2664bd5271810ed7cae1dc0fd44a14fdac Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 3 Aug 2011 13:21:07 +0200 Subject: qdoc: Check pointer for null before dereferencing. Task-number: QTBUG-20725 --- tools/qdoc3/ditaxmlgenerator.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index c05880f..43d92df 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -2117,9 +2117,10 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark generateSince(qcn, marker); enterSection("h2","Detailed Description"); generateBody(qcn, marker); - if (cn) + if (cn) { generateQmlText(cn->doc().body(), cn, marker, qcn->name()); - generateAlsoList(cn, marker); + generateAlsoList(cn, marker); + } leaveSection(); leaveSection(); // -- cgit v0.12 From cc997e664ab6cd9e6551ec8228d1585d2a46a3d2 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Wed, 10 Aug 2011 12:28:04 +0200 Subject: qdoc3: Updates for QTBUG-20776 and QTBUG-20777 Task-number: QTBUG-20776, QTBUG-20777 --- tools/qdoc3/cppcodeparser.cpp | 5 +-- tools/qdoc3/htmlgenerator.cpp | 95 ++++++++++++++++++++++++++++++++++++------- tools/qdoc3/htmlgenerator.h | 4 +- 3 files changed, 86 insertions(+), 18 deletions(-) diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp index 1536867..5efbcfd 100644 --- a/tools/qdoc3/cppcodeparser.cpp +++ b/tools/qdoc3/cppcodeparser.cpp @@ -47,7 +47,7 @@ #include #include - +#include #include "codechunk.h" #include "config.h" #include "cppcodeparser.h" @@ -2362,7 +2362,6 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) QStringList exampleFiles = Config::getFilesHere(fullPath,exampleNameFilter); QString imagesPath = fullPath + "/images"; QStringList imageFiles = Config::getFilesHere(imagesPath,exampleImageFilter); - if (!exampleFiles.isEmpty()) { // move main.cpp and to the end, if it exists QString mainCpp; @@ -2382,7 +2381,7 @@ void CppCodeParser::createExampleFileNodes(FakeNode *fake) exampleFiles.append(mainCpp); // add any qmake Qt resource files and qmake project files - exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro qmldir"); + exampleFiles += Config::getFilesHere(fullPath, "*.qrc *.pro *.qmlproject qmldir"); } foreach (const QString &exampleFile, exampleFiles) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index bdb2e44..c7b6490 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -279,7 +279,7 @@ void HtmlGenerator::generateTree(const Tree *tree) generatePageIndex(outputDir() + "/" + fileBase + ".pageindex"); helpProjectWriter->generate(myTree); - generateManifestFile(); + generateManifestFiles(); } void HtmlGenerator::startText(const Node * /* relative */, @@ -4400,43 +4400,78 @@ QString HtmlGenerator::fullDocumentLocation(const Node *node) return parentName.toLower() + anchorRef; } -void HtmlGenerator::generateManifestFile() +/*! + This function outputs one or more manifest files in XML. + They are used by Creator. + */ +void HtmlGenerator::generateManifestFiles() +{ + generateManifestFile("examples", "example"); + generateManifestFile("demos", "demo"); +} + +/*! + This function is called by generaqteManiferstFile(), once + for each manifest file to be generated. \a manifest is the + type of manifest file. + */ +void HtmlGenerator::generateManifestFile(QString manifest, QString element) { if (ExampleNode::exampleNodeMap.isEmpty()) return; - QString fileName = "examples-manifest.xml"; + QString fileName = manifest +"-manifest.xml"; QFile file(outputDir() + "/" + fileName); if (!file.open(QFile::WriteOnly | QFile::Text)) return ; + bool demos = false; + if (manifest == "demos") + demos = true; QXmlStreamWriter writer(&file); writer.setAutoFormatting(true); writer.writeStartDocument(); writer.writeStartElement("instructionals"); writer.writeAttribute("module", project); - writer.writeStartElement("examples"); + writer.writeStartElement(manifest); ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); while (i != ExampleNode::exampleNodeMap.end()) { const ExampleNode* en = i.value(); - writer.writeStartElement("example"); + if (demos) { + if (!en->name().startsWith("demos")) { + ++i; + continue; + } + } + else if (en->name().startsWith("demos")) { + ++i; + continue; + } + writer.writeStartElement(element); writer.writeAttribute("name", en->title()); - QString docUrl = projectUrl + "/" + en->fileBase() + ".html"; + //QString docUrl = projectUrl + "/" + en->fileBase() + ".html"; + QString docUrl = "%REPLACEME%/" + en->fileBase() + ".html"; writer.writeAttribute("docUrl", docUrl); foreach (const Node* child, en->childNodes()) { if (child->subType() == Node::File) { QString file = child->name(); - if (file.endsWith(".pro")) - writer.writeAttribute("projectPath", "./" + file); + if (file.endsWith(".pro") || file.endsWith(".qmlproject")) { + if (file.startsWith("demos/")) + file = file.mid(6); + writer.writeAttribute("projectPath", file); + break; + } } } - writer.writeAttribute("imageUrl", projectUrl + "/" + en->imageFileName()); + //writer.writeAttribute("imageUrl", projectUrl + "/" + en->imageFileName()); + writer.writeAttribute("imageUrl", "%REPLACEME%/" + en->imageFileName()); + writer.writeStartElement("description"); Text brief = en->doc().briefText(); - if (!brief.isEmpty()) { - writer.writeStartElement("description"); - writer.writeCharacters(brief.toString()); - writer.writeEndElement(); // description - } + if (!brief.isEmpty()) + writer.writeCDATA(brief.toString()); + else + writer.writeCDATA(QString("No description available")); + writer.writeEndElement(); // description QStringList tags = en->title().toLower().split(" "); if (!tags.isEmpty()) { writer.writeStartElement("tags"); @@ -4460,6 +4495,38 @@ void HtmlGenerator::generateManifestFile() } writer.writeEndElement(); // tags } + + QString ename = en->name().mid(en->name().lastIndexOf('/')+1); + QSet usedNames; + foreach (const Node* child, en->childNodes()) { + if (child->subType() == Node::File) { + QString file = child->name(); + QString fileName = file.mid(file.lastIndexOf('/')+1); + QString baseName = fileName; + if ((fileName.count(QChar('.')) > 0) && + (fileName.endsWith(".cpp") || + fileName.endsWith(".h") || + fileName.endsWith(".qml"))) + baseName.truncate(baseName.lastIndexOf(QChar('.'))); + if (baseName.toLower() == ename) { + if (!usedNames.contains(fileName)) { + writer.writeStartElement("fileToOpen"); + writer.writeCharacters(fileName); + writer.writeEndElement(); // fileToOpen + usedNames.insert(fileName); + } + } + else if (fileName.toLower().endsWith("main.cpp") || + fileName.toLower().endsWith("main.qml")) { + if (!usedNames.contains(fileName)) { + writer.writeStartElement("fileToOpen"); + writer.writeCharacters(fileName); + writer.writeEndElement(); // fileToOpen + usedNames.insert(fileName); + } + } + } + } writer.writeEndElement(); // example ++i; } diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index d97d387..70508a0 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -93,7 +93,7 @@ class HtmlGenerator : public PageGenerator virtual void terminateGenerator(); virtual QString format(); virtual void generateTree(const Tree *tree); - void generateManifestFile(); + void generateManifestFiles(); QString protectEnc(const QString &string); static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); @@ -113,6 +113,8 @@ class HtmlGenerator : public PageGenerator virtual QString linkForNode(const Node *node, const Node *relative); virtual QString refForAtom(Atom *atom, const Node *node); + void generateManifestFile(QString manifest, QString element); + private: enum SubTitleSize { SmallSubTitle, LargeSubTitle }; enum ExtractionMarkType { -- cgit v0.12 From a9b6b923ab870ece76891c5330fdba26ce1bf613 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 11 Aug 2011 11:42:27 +0200 Subject: qdoc3: Updates for QTBUG-20739 (no read-only for QML components) Task-number: QTBUG-20739 --- tools/qdoc3/ditaxmlgenerator.cpp | 3 ++- tools/qdoc3/htmlgenerator.cpp | 3 ++- tools/qdoc3/node.cpp | 32 ++++++++++++++++++++++++++++++++ tools/qdoc3/node.h | 4 ++++ 4 files changed, 40 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp index 43d92df..4393e8d 100644 --- a/tools/qdoc3/ditaxmlgenerator.cpp +++ b/tools/qdoc3/ditaxmlgenerator.cpp @@ -4398,7 +4398,8 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node, writeStartTag(DT_li); writeGuidAttribute((Node*)qpn); QString attr; - if (!qpn->isWritable(myTree)) + const ClassNode* cn = qpn->declarativeCppNode(); + if (cn && !qpn->isWritable(myTree)) attr = "read-only"; if (qpgn->isDefault()) { if (!attr.isEmpty()) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c7b6490..c0a32d8 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3851,7 +3851,8 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node, out() << ""; - if (!qpn->isWritable(myTree)) { + const ClassNode* cn = qpn->declarativeCppNode(); + if (cn && !qpn->isWritable(myTree)) { out() << "read-only"; } if (qpgn->isDefault()) diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index e14b08d..f6893fb 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -305,6 +305,38 @@ QString Node::ditaXmlHref() } /*! + If this node is a QML class node, return a pointer to it. + If it is a child of a QML class node, return a pointer to + the QML class node. Otherwise, return 0; + */ +const QmlClassNode* Node::qmlClassNode() const +{ + if (isQmlNode()) { + const Node* n = this; + while (n && n->subType() != Node::QmlClass) + n = n->parent(); + if (n && n->subType() == Node::QmlClass) + return static_cast(n); + } + return 0; +} + +/*! + If this node is a QML node, find its QML class node, + and return a pointer to the C++ class node from the + QML class node. That pointer will be null if the QML + class node is a component. It will be non-null if + the QML class node is a QML element. + */ +const ClassNode* Node::declarativeCppNode() const +{ + const QmlClassNode* qcn = qmlClassNode(); + if (qcn) + return qcn->classNode(); + return 0; +} + +/*! \class InnerNode */ diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h index 2887923..3b031b6 100644 --- a/tools/qdoc3/node.h +++ b/tools/qdoc3/node.h @@ -59,8 +59,10 @@ QT_BEGIN_NAMESPACE class Node; +class ClassNode; class InnerNode; class ExampleNode; +class QmlClassNode; typedef QMap NodeMap; typedef QMultiMap NodeMultiMap; @@ -200,6 +202,8 @@ class Node QString guid() const; QString ditaXmlHref(); QString extractClassName(const QString &string) const; + const QmlClassNode* qmlClassNode() const; + const ClassNode* declarativeCppNode() const; protected: Node(Type type, InnerNode* parent, const QString& name); -- cgit v0.12 From b209fe3b1a51f64541067917e96de99f14ad65f3 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Wed, 13 Jul 2011 18:14:38 +0200 Subject: optimize QList::removeAll() a) don't detach until an occurrence found b) don't memmove every time an occurrence found c) truncate quickly ) well, numbers are better than words: before: RESULT : tst_QList::removeAll_primitive(): 2,617,902 CPU ticks per iteration (total: 261,790,171, iterations: 100) RESULT : tst_QList::removeAll_movable(): 2,547,540 CPU ticks per iteration (total: 254,753,960, iterations: 100) RESULT : tst_QList::removeAll_complex(): 16,852,099 CPU ticks per iteration (total: 1,685,209,906, iterations: 100) after: RESULT : tst_QList::removeAll_primitive(): 73,520 CPU ticks per iteration (total: 73,520,442, iterations: 1000) RESULT : tst_QList::removeAll_movable(): 90,422 CPU ticks per iteration (total: 90,422,464, iterations: 1000) RESULT : tst_QList::removeAll_complex(): 9,667,073 CPU ticks per iteration (total: 9,667,072,670, iterations: 1000) Merge-request: 1285 Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qlist.h | 30 +-- tests/benchmarks/corelib/tools/qlist/main.cpp | 250 +++++++++++++++++++++++++ tests/benchmarks/corelib/tools/qlist/qlist.pro | 5 + tests/benchmarks/corelib/tools/tools.pro | 1 + 4 files changed, 275 insertions(+), 11 deletions(-) create mode 100644 tests/benchmarks/corelib/tools/qlist/main.cpp create mode 100644 tests/benchmarks/corelib/tools/qlist/qlist.pro diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 4eb05d6..e104f65 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -769,18 +769,26 @@ Q_OUTOFLINE_TEMPLATE void QList::clear() template Q_OUTOFLINE_TEMPLATE int QList::removeAll(const T &_t) { - detachShared(); + int index = indexOf(_t); + if (index == -1) + return 0; + const T t = _t; - int removedCount=0, i=0; - Node *n; - while (i < p.size()) - if ((n = reinterpret_cast(p.at(i)))->t() == t) { - node_destruct(n); - p.remove(i); - ++removedCount; - } else { - ++i; - } + detach(); + + Node *i = reinterpret_cast(p.at(index)); + Node *e = reinterpret_cast(p.end()); + Node *n = i; + node_destruct(i); + while (++i != e) { + if (i->t() == t) + node_destruct(i); + else + *n++ = *i; + } + + int removedCount = e - n; + d->end -= removedCount; return removedCount; } diff --git a/tests/benchmarks/corelib/tools/qlist/main.cpp b/tests/benchmarks/corelib/tools/qlist/main.cpp new file mode 100644 index 0000000..22aaf49 --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlist/main.cpp @@ -0,0 +1,250 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +static const int N = 1000; + +struct MyBase +{ + MyBase(int i_) + : isCopy(false) + { + ++liveCount; + + i = i_; + } + + MyBase(const MyBase &other) + : isCopy(true) + { + if (isCopy) + ++copyCount; + ++liveCount; + + i = other.i; + } + + MyBase &operator=(const MyBase &other) + { + if (!isCopy) { + isCopy = true; + ++copyCount; + } else { + ++errorCount; + } + + i = other.i; + return *this; + } + + ~MyBase() + { + if (isCopy) { + if (!copyCount) + ++errorCount; + else + --copyCount; + } + if (!liveCount) + ++errorCount; + else + --liveCount; + } + + bool operator==(const MyBase &other) const + { return i == other.i; } + +protected: + ushort i; + bool isCopy; + +public: + static int errorCount; + static int liveCount; + static int copyCount; +}; + +int MyBase::errorCount = 0; +int MyBase::liveCount = 0; +int MyBase::copyCount = 0; + +struct MyPrimitive : public MyBase +{ + MyPrimitive(int i = -1) : MyBase(i) + { ++errorCount; } + MyPrimitive(const MyPrimitive &other) : MyBase(other) + { ++errorCount; } + ~MyPrimitive() + { ++errorCount; } +}; + +struct MyMovable : public MyBase +{ + MyMovable(int i = -1) : MyBase(i) {} +}; + +struct MyComplex : public MyBase +{ + MyComplex(int i = -1) : MyBase(i) {} +}; + +QT_BEGIN_NAMESPACE + +Q_DECLARE_TYPEINFO(MyPrimitive, Q_PRIMITIVE_TYPE); +Q_DECLARE_TYPEINFO(MyMovable, Q_MOVABLE_TYPE); +Q_DECLARE_TYPEINFO(MyComplex, Q_COMPLEX_TYPE); + +QT_END_NAMESPACE + + +class tst_QList: public QObject +{ + Q_OBJECT + +private Q_SLOTS: + void removeAll_primitive_data(); + void removeAll_primitive(); + void removeAll_movable_data(); + void removeAll_movable(); + void removeAll_complex_data(); + void removeAll_complex(); +}; + +template +void removeAll_test(const QList &i10, ushort valueToRemove, int itemsToRemove) +{ + bool isComplex = QTypeInfo::isComplex; + + MyBase::errorCount = 0; + MyBase::liveCount = 0; + MyBase::copyCount = 0; + { + QList list; + QCOMPARE(MyBase::liveCount, 0); + QCOMPARE(MyBase::copyCount, 0); + + for (int i = 0; i < 10 * N; ++i) { + T t(i10.at(i % 10)); + list.append(t); + } + QCOMPARE(MyBase::liveCount, isComplex ? list.size() : 0); + QCOMPARE(MyBase::copyCount, isComplex ? list.size() : 0); + + T t(valueToRemove); + QCOMPARE(MyBase::liveCount, isComplex ? list.size() + 1 : 1); + QCOMPARE(MyBase::copyCount, isComplex ? list.size() : 0); + + int removedCount; + QList l; + + QBENCHMARK { + l = list; + removedCount = l.removeAll(t); + } + QCOMPARE(removedCount, itemsToRemove * N); + QCOMPARE(l.size() + removedCount, list.size()); + QVERIFY(!l.contains(valueToRemove)); + + QCOMPARE(MyBase::liveCount, isComplex ? l.isDetached() ? list.size() + l.size() + 1 : list.size() + 1 : 1); + QCOMPARE(MyBase::copyCount, isComplex ? l.isDetached() ? list.size() + l.size() : list.size() : 0); + } + if (isComplex) + QCOMPARE(MyBase::errorCount, 0); +} + +Q_DECLARE_METATYPE(QList); + +void tst_QList::removeAll_primitive_data() +{ + qRegisterMetaType >(); + + QTest::addColumn >("i10"); + QTest::addColumn("valueToRemove"); + QTest::addColumn("itemsToRemove"); + + QTest::newRow("0%") << (QList() << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0) << 5 << 0; + QTest::newRow("10%") << (QList() << 0 << 0 << 0 << 0 << 5 << 0 << 0 << 0 << 0 << 0) << 5 << 1; + QTest::newRow("90%") << (QList() << 5 << 5 << 5 << 5 << 0 << 5 << 5 << 5 << 5 << 5) << 5 << 9; + QTest::newRow("100%") << (QList() << 5 << 5 << 5 << 5 << 5 << 5 << 5 << 5 << 5 << 5) << 5 << 10; +} + +void tst_QList::removeAll_primitive() +{ + QFETCH(QList, i10); + QFETCH(int, valueToRemove); + QFETCH(int, itemsToRemove); + + removeAll_test(i10, valueToRemove, itemsToRemove); +} + +void tst_QList::removeAll_movable_data() +{ + removeAll_primitive_data(); +} + +void tst_QList::removeAll_movable() +{ + QFETCH(QList, i10); + QFETCH(int, valueToRemove); + QFETCH(int, itemsToRemove); + + removeAll_test(i10, valueToRemove, itemsToRemove); +} + +void tst_QList::removeAll_complex_data() +{ + removeAll_primitive_data(); +} + +void tst_QList::removeAll_complex() +{ + QFETCH(QList, i10); + QFETCH(int, valueToRemove); + QFETCH(int, itemsToRemove); + + removeAll_test(i10, valueToRemove, itemsToRemove); +} + +QTEST_APPLESS_MAIN(tst_QList) + +#include "main.moc" diff --git a/tests/benchmarks/corelib/tools/qlist/qlist.pro b/tests/benchmarks/corelib/tools/qlist/qlist.pro new file mode 100644 index 0000000..902e72e --- /dev/null +++ b/tests/benchmarks/corelib/tools/qlist/qlist.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +TARGET = tst_qlist +QT = core + +SOURCES += main.cpp diff --git a/tests/benchmarks/corelib/tools/tools.pro b/tests/benchmarks/corelib/tools/tools.pro index 681a6c6..44e8973 100644 --- a/tests/benchmarks/corelib/tools/tools.pro +++ b/tests/benchmarks/corelib/tools/tools.pro @@ -3,6 +3,7 @@ SUBDIRS = \ containers-associative \ containers-sequential \ qbytearray \ + qlist \ qrect \ qregexp \ qstring \ -- cgit v0.12 From 52223d80ec8ba6d579c091efe0e40589a5d2bd67 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Wed, 13 Jul 2011 18:14:39 +0200 Subject: don't detach until the list is going to be modified removeAt() does detach()'ing for us Merge-request: 1285 Reviewed-by: Oswald Buddenhagen --- src/corelib/tools/qlist.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index e104f65..9f7b23f 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -795,7 +795,6 @@ Q_OUTOFLINE_TEMPLATE int QList::removeAll(const T &_t) template Q_OUTOFLINE_TEMPLATE bool QList::removeOne(const T &_t) { - detachShared(); int index = indexOf(_t); if (index != -1) { removeAt(index); -- cgit v0.12 From fa2e888d6c5e148fec99c21011f68dcade7cb4ba Mon Sep 17 00:00:00 2001 From: Corentin Chary Date: Fri, 12 Aug 2011 19:05:06 +0200 Subject: tests: fix QNetworkProxyFactory test QNetworkProxy takes an hostname, not an url. Signed-off-by: Corentin Chary Merge-request: 1319 Reviewed-by: Oswald Buddenhagen --- tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp b/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp index 839612e..4ffb00b 100644 --- a/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp +++ b/tests/auto/qnetworkproxyfactory/tst_qnetworkproxyfactory.cpp @@ -116,7 +116,7 @@ void tst_QNetworkProxyFactory::systemProxyForQuery() const QNetworkProxy proxy; QList nativeProxyList; - nativeProxyList << QNetworkProxy(QNetworkProxy::HttpProxy, QString("http://test.proxy.com"), 8080) << QNetworkProxy::NoProxy; + nativeProxyList << QNetworkProxy(QNetworkProxy::HttpProxy, QString("test.proxy.com"), 8080) << QNetworkProxy::NoProxy; foreach (proxy, systemProxyList) { if (!nativeProxyList.contains(proxy)) { -- cgit v0.12 From 647ffa677f9bf6da50fcdb7a6948501e7e6719ce Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 12 Aug 2011 19:05:47 +0200 Subject: directfb: Include directfbgl.h directly directfb.h is included directly in all other files, include directfbgl.h without the directfb/ prefix as well. $ pkg-config --cflags directfb -D_REENTRANT -I/home/foo/install/directfb/include/directfb Merge-request: 2643 Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/directfb/qdirectfbglcontext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp index 8a40b24..aca28f1 100644 --- a/src/plugins/platforms/directfb/qdirectfbglcontext.cpp +++ b/src/plugins/platforms/directfb/qdirectfbglcontext.cpp @@ -41,7 +41,7 @@ #include "qdirectfbglcontext.h" -#include +#include #include -- cgit v0.12 From 98d4b36403bb042a44e3aec39492f77ce70f38b7 Mon Sep 17 00:00:00 2001 From: Takumi ASAKI Date: Fri, 12 Aug 2011 19:24:14 +0200 Subject: Update Japanese translations for Qt 4.8. Merge-request: 1315 Reviewed-by: Oswald Buddenhagen --- translations/assistant_ja.ts | 358 ++++++++++++----------------------- translations/designer_ja.ts | 121 +++++++++--- translations/qt_ja.ts | 437 +++++++++++++++++++++++++++++++++++-------- translations/qtconfig_ja.ts | 192 +++++++------------ 4 files changed, 640 insertions(+), 468 deletions(-) diff --git a/translations/assistant_ja.ts b/translations/assistant_ja.ts index 5c990de..0ebfec8 100644 --- a/translations/assistant_ja.ts +++ b/translations/assistant_ja.ts @@ -76,10 +76,6 @@ Reason: コレクションファイル '%1' の作成中にエラーが発生しました: %2。 - Error reading collection file '%1': %2 - コレクションファイル '%1' の読み込み中にエラーが発生しました: %2 - - Cannot load sqlite database driver! SQLite データベース ドライバーをロードできません! @@ -87,10 +83,6 @@ Reason: BookmarkDialog - Bookmarks - ブックマーク - - Add Bookmark ブックマークの追加 @@ -111,10 +103,6 @@ Reason: 新しいフォルダ - Delete Folder - フォルダを削除 - - Rename Folder フォルダの名前変更 @@ -133,10 +121,6 @@ Reason: BookmarkManager - Bookmarks - ブックマーク - - Untitled タイトルなし @@ -184,10 +168,6 @@ Reason: Rename Bookmark ブックマークの名前変更 - - New Folder - 新しいフォルダ - BookmarkManagerWidget @@ -279,6 +259,10 @@ Reason: アドレス + Toolbar Menu + ツールバーメニュー + + Bookmarks Menu ブックマークメニュー @@ -294,30 +278,6 @@ Reason: 削除 - Delete Folder - フォルダを削除 - - - Rename Folder - フォルダの名前変更 - - - Show Bookmark - ブックマークを開く - - - Show Bookmark in New Tab - ブックマークを新しいタブで開く - - - Delete Bookmark - ブックマークを削除 - - - Rename Bookmark - ブックマークの名前変更 - - Add 追加 @@ -329,41 +289,9 @@ Reason: CentralWidget - Add new page - 新しいページの追加 - - - Close current page - 現在のページを閉じる - - Print Document ドキュメントを印刷 - - unknown - 不明 - - - Add New Page - 新しいページの追加 - - - Close This Page - このページを閉じる - - - Close Other Pages - 他のページを閉じる - - - Add Bookmark for this Page... - このページをブックマークに追加... - - - Search - 検索 - CmdLineParser @@ -617,10 +545,6 @@ Reason: 大文字/小文字を区別する - Whole words - 単語単位で検索する - - <img src=":/trolltech/assistant/images/wrap.png">&nbsp;Search wrapped <img src=":/trolltech/assistant/images/wrap.png">&nbsp;見つからなければ先頭から検索する @@ -699,6 +623,49 @@ Reason: + GlobalActions + + &Back + 戻る(&B) + + + &Forward + 進む(&F) + + + &Home + ホーム(&H) + + + ALT+Home + ALT+Home + + + Zoom &in + 拡大(&I) + + + Zoom &out + 縮小(&O) + + + &Copy selected Text + 選択中の文字をコピー(&C) + + + &Print... + 印刷(&P)... + + + &Find in Text... + 検索(&F)... + + + &Find + 検索(&F) + + + HelpEngineWrapper Unfiltered @@ -715,14 +682,6 @@ Reason: HelpViewer - Help - ヘルプ - - - OK - OK - - <title>about:blank</title> <title>about:blank</title> @@ -731,22 +690,28 @@ Reason: <title>Error 404...</title><div align="center"><br><br><h1>ページが見つかりませんでした</h1><br><h3>'%1'</h3></div> + Open Link + リンクを開く + + Copy &Link Location リンクのURLをコピー(&L) - Open Link in New Tab Ctrl+LMB - リンクを新しいタブで開く Ctrl+LMB + Copy + コピー - Open Link in New Tab - リンクを新しいタブで開く + Reload + リロード - Unable to launch external application. - - 外部アプリケーションを起動できません。 - + Open Link in New Tab Ctrl+LMB + リンクを新しいタブで開く Ctrl+LMB + + + Open Link in New Page + リンクを新しいページで開く @@ -945,10 +910,6 @@ Reason: Qt Assistant - Unfiltered - フィルタなし - - Page Set&up... ページ設定(&U)... @@ -957,10 +918,6 @@ Reason: 印刷プレビュー... - &Print... - 印刷(&P)... - - New &Tab 新しいタブ(&T) @@ -977,18 +934,6 @@ Reason: CTRL+Q - &Copy selected Text - 選択中の文字をコピー(&C) - - - &Find in Text... - 検索(&F)... - - - &Find - 検索(&F) - - Find &Next 次を検索(&N) @@ -1001,14 +946,6 @@ Reason: 設定... - Zoom &in - 拡大(&I) - - - Zoom &out - 縮小(&O) - - Normal &Size 普通の大きさ(&S) @@ -1029,10 +966,6 @@ Reason: ALT+S - &Home - ホーム(&H) - - <center><h3>%1</h3><p>Version %2</p></center><p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p> <center><h3>%1</h3><p>バージョン %2</p></center><p>Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).</p> @@ -1041,18 +974,6 @@ Reason: ファイル '%1' を登録できませんでした: %2 - Ctrl+Home - Ctrl+Home - - - &Back - 戻る(&B) - - - &Forward - 進む(&F) - - Sync with Table of Contents 内容と目次を同期する @@ -1073,10 +994,6 @@ Reason: Ctrl+Alt+Left - Add Bookmark... - ブックマークの追加... - - About... Qt Assistant について... @@ -1137,10 +1054,22 @@ Reason: ズーム + Open Pages + ページを開く + + + Bookmark Toolbar + ブックマークツールバー + + &File ファイル(&F) + E&xit + 終了(&X) + + &Edit 編集(&E) @@ -1149,12 +1078,12 @@ Reason: 表示(&V) - &Go - ジャンプ(&G) + ALT+P + ALT+P - ALT+Home - ALT+Home + &Go + ジャンプ(&G) Sync @@ -1172,9 +1101,16 @@ Reason: ALT+O ALT+O + + + OpenPagesWidget + + Close %1 + "%1" を閉じる + - CTRL+D - CTRL+D + Close All Except %1 + "%1" 以外をすべて閉じる @@ -1396,6 +1332,14 @@ Do you want to remove it? Blank Page 空白ページ + + Appearance + 外観 + + + Show tabs for each individual page + 各ページにタブを表示する + QCollectionGenerator @@ -1567,97 +1511,6 @@ qhelpgenerator <ヘルププロジェクトファイル> [オプション] - QObject - - The specified collection file does not exist! - 指定されたコレクションファイルは存在しません! - - - Missing collection file! - コレクションファイルが見つかりません! - - - Invalid URL! - 不正なURLです! - - - Missing URL! - URLが見つかりません! - - - Unknown widget: %1 - 不明なウィジェット: %1 - - - Missing widget! - ウィジェットが見つかりません! - - - The specified Qt help file does not exist! - 指定された Qt ヘルプ ファイルが存在しません! - - - Missing help file! - ヘルプファイルが見つかりません! - - - Missing filter argument! - フィルタ引数が不足しています! - - - Unknown option: %1 - 不明なオプション: %1 - - - Qt Assistant - Qt Assistant - - - Could not register documentation file -%1 - -Reason: -%2 - ドキュメントファイルを登録できませんでした。 -%1 - -原因: -%2 - - - Documentation successfully registered. - ドキュメントの登録に成功しました。 - - - Could not unregister documentation file -%1 - -Reason: -%2 - ドキュメントファイルを解除できませんでした。 -%1 - -原因: -%2 - - - Documentation successfully unregistered. - ドキュメントの解放に成功しました。 - - - Cannot load sqlite database driver! - SQLite データベース ドライバーをロードできません! - - - The specified collection file could not be read! - 指定されたコレクションファイルは読み込めません! - - - Bookmark - ブックマーク - - - RemoteControl Debugging Remote Control @@ -1686,9 +1539,28 @@ Reason: Select All すべてを選択 + + + TabBar + + (Untitled) + (タイトルなし) + - Open Link - リンクを開く + New &Tab + 新しいタブ(&T) + + + &Close Tab + タブを閉じる(&C) + + + Close Other Tabs + 他のタブを閉じる + + + Add Bookmark for this Page... + このページをブックマークに追加... diff --git a/translations/designer_ja.ts b/translations/designer_ja.ts index 7fcc66d..2be8cd4 100644 --- a/translations/designer_ja.ts +++ b/translations/designer_ja.ts @@ -371,10 +371,6 @@ ページ - page - ページ - - Insert Page ページを挿入 @@ -483,10 +479,6 @@ サブウィンドウを挿入 - subwindow - サブウィンドウ - - Subwindow サブウィンドウ @@ -530,6 +522,10 @@ '%1' のレイアウトを %2 から %3 に変更 + Change layout alignment + レイアウトの配置を変更 + + Change script スクリプトを変更 @@ -868,8 +864,6 @@ Invalid stretch value for '%1': '%2' Parsing layout stretch values ---------- -Parsing layout stretch values ----------- Parsing layout stretch values '%1' のストレッチ値が無効です: '%2' @@ -877,8 +871,6 @@ Parsing layout stretch values Invalid minimum size for '%1': '%2' Parsing grid layout minimum size values ---------- -Parsing grid layout minimum size values ----------- Parsing grid layout minimum size values '%1' の最小サイズが無効です: '%2' @@ -1827,10 +1819,6 @@ Container pages should only be added by specifying them in XML returned by the d ヘルプ(&H) - Edit - 編集 - - Toolbars ツールバー @@ -1847,6 +1835,10 @@ Container pages should only be added by specifying them in XML returned by the d 表示(&V) + &Edit + 編集(&E) + + &Settings 設定(&S) @@ -1891,8 +1883,6 @@ Container pages should only be added by specifying them in XML returned by the d An empty class name was passed on to %1 (object name: '%2'). Empty class name passed to widget factory method ---------- -Empty class name passed to widget factory method ----------- Empty class name passed to widget factory method %1 (オブジェクト名: %2)に空のクラス名が渡されました。 @@ -3725,6 +3715,10 @@ Do you want overwrite the template? 親から継承 + [Theme] %1 + [テーマ] %1 + + Horizontal 横方向 @@ -3733,6 +3727,10 @@ Do you want overwrite the template? 縦方向 + Theme + テーマ + + Normal Off 通常 オフ @@ -4317,6 +4315,17 @@ Do you want overwrite the template? + qdesigner_internal::IconThemeDialog + + Set Icon From Theme + テーマからアイコンを設定する + + + Input icon name from the current theme: + 現在のテーマからアイコンの名前を入力: + + + qdesigner_internal::ItemListEditor Properties &<< @@ -4458,18 +4467,6 @@ Do you want overwrite the template? テキスト(&T): - Shortcut: - ショートカット: - - - Checkable: - チェック可: - - - ToolTip: - ツールチップ: - - ... ... @@ -4481,6 +4478,22 @@ Do you want overwrite the template? Object &name: オブジェクト名(&N): + + T&oolTip: + ツールチップ(&O): + + + Icon th&eme: + アイコンテーマ(&E): + + + &Checkable: + チェック可(&C): + + + &Shortcut: + ショートカット(&S): + qdesigner_internal::NewDynamicPropertyDialog @@ -4738,9 +4751,17 @@ Please select another name. ファイルを選択... + Set Icon From Theme... + テーマからアイコンを設定... + + ... ... + + [Theme] %1 + [テーマ] %1 + qdesigner_internal::PlainTextEditorDialog @@ -5126,6 +5147,42 @@ Class: %2 シグナル/スロットを変更... + Layout Alignment + レイアウトの配置 + + + No Horizontal Alignment + 横方向の調整なし + + + Left + 左端揃え + + + Center Horizontally + 中央揃え(横方向) + + + Right + 右端揃え + + + No Vertical Alignment + 横方向の調整なし + + + Top + 上端揃え + + + Center Vertically + 中央揃え(縦方向) + + + Bottom + 下端揃え + + Size Constraints 限界サイズ @@ -5329,6 +5386,10 @@ Class: %2 Insert &Link リンクを挿入(&L) + + Simplify Rich Text + リッチテキストを単純化する + qdesigner_internal::ScriptDialog diff --git a/translations/qt_ja.ts b/translations/qt_ja.ts index 094e34d..05ed9d4 100644 --- a/translations/qt_ja.ts +++ b/translations/qt_ja.ts @@ -10,9 +10,20 @@ + Debugger::JSAgentWatchData + + [Array of length %1] + [配列長 %1] + + + <undefined> + <未定義> + + + FakeReply - Fake error ! + Fake error! 疑似エラー! @@ -171,7 +182,7 @@ libgstreamer-plugins-base はインストールされていますか。 Not found - 見つかりませんでした + 見つかりません Out of memory @@ -762,7 +773,7 @@ libgstreamer-plugins-base はインストールされていますか。 %1 -ファイルが見つかりませんでした。 +ファイルが見つかりません。 パスおよびファイル名を確認してください。 @@ -1017,7 +1028,7 @@ to QAbstractSocket Host not found - ホストが見つかりませんでした + ホストが見つかりません Connection refused @@ -1063,6 +1074,14 @@ to QAccessibleButton + Uncheck + 選択解除 + + + Check + 選択 + + Press 押す @@ -1722,10 +1741,6 @@ to エイリアスプロパティがエイリアスの境界を越えています - Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> - 無効なエイリアスの参照です。エイリアスの参照先は <ID> もしくは <ID>.<プロパティ> でなくてはいけません - - Invalid alias reference. Unable to find id "%1" 無効なエイリアスの参照です。ID "%1" が見つかりません @@ -1742,25 +1757,6 @@ to - QDeclarativeCompositeTypeManager - - Resource %1 unavailable - リソース %1 が利用できません - - - Namespace %1 cannot be used as a type - 名前空間 %1 を型として使用することはできません - - - %1 %2 - %1 %2 - - - Type %1 unavailable - 型 %1 が利用できません - - - QDeclarativeConnections Cannot assign to non-existent property "%1" @@ -2160,25 +2156,6 @@ to - QDeclarativeTypeData - - Script %1 unavailable - スクリプト %1 が利用できません - - - Type %1 unavailable - 型 %1 が利用できません - - - Namespace %1 cannot be used as a type - 名前空間 %1 を型として使用することはできません - - - %1 %2 - %1 %2 - - - QDeclarativeTypeLoader Script %1 unavailable @@ -2493,6 +2470,10 @@ to Cannot create %1 for output コピー先として %1 を作成できません + + No file engine available or engine does not support UnMapExtension + ファイルエンジンが見つからないか、UnMapExtension をサポートしていません + QFileDialog @@ -2985,7 +2966,7 @@ Do you want to delete it anyway? Host %1 not found - ホスト %1 が見つかりませんでした + ホスト %1 が見つかりません Connection refused to host %1 @@ -3156,7 +3137,7 @@ Do you want to delete it anyway? Host %1 not found - ホスト %1 が見つかりませんでした + ホスト %1 が見つかりません HTTP request failed @@ -3416,18 +3397,10 @@ Do you want to delete it anyway? QLibrary - Could not mmap '%1': %2 - '%1' をメモリにマッピングできませんでした: %2 - - Plugin verification data mismatch in '%1' '%1' でプラグイン検証データが一致しません - Could not unmap '%1': %2 - '%1' のマッピングを解除できませんでした: %2 - - The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5] プラグイン '%1' は、互換性のない Qt ライブラリを使用しています。(%2.%3.%4) [%5] @@ -3463,6 +3436,18 @@ Do you want to delete it anyway? Cannot resolve symbol "%1" in %2: %3 '%2'に含まれる識別子 "%1" を解決できません: %3 + + '%1' is not an ELF object (%2) + '%1' は ELF オブジェクトではありません(%2) + + + '%1' is not an ELF object + '%1' は ELF オブジェクトではありません + + + '%1' is an invalid ELF object (%2) + '%1' は無効な ELF オブジェクトです(%2) + QLineEdit @@ -3560,6 +3545,10 @@ Do you want to delete it anyway? %1: Unknown error %2 %1: 未知のエラー %2 + + %1: Access denied + %1: アクセスできません + QMYSQLDriver @@ -3902,10 +3891,6 @@ Do you want to delete it anyway? QNetworkAccessDataBackend - Operation not supported on %1 - %1 ではこの操作はサポートされていません - - Invalid URI: %1 無効なURIです: %1 @@ -4000,6 +3985,10 @@ Do you want to delete it anyway? ネットワークセッションエラー。 + backend start error. + バックエンド開始時のエラー。 + + Temporary network failure. 一時的なネットワークの失敗。 @@ -4192,6 +4181,10 @@ Do you want to delete it anyway? invalid query: "%1" 無効なクエリー: "%1" + + Host not found + ホストが見つかりません + QPPDOptionsModel @@ -5500,6 +5493,10 @@ Please choose a different file name. %1: 指定されたサイズはシステムにより拒否されました + %1: bad name + %1: 無効な名前です + + %1: not attached %1: アタッチしていません @@ -5508,11 +5505,6 @@ Please choose a different file name. %1: 無効なサイズです - %1: key error - safekey.isEmpty()==true - %1: キーかありません - - %1: size query failed %1: サイズのクエリーに失敗しました @@ -6733,6 +6725,121 @@ Please choose a different file name. + QSymbianSocketEngine + + Unable to initialize non-blocking socket + 非ブロック型ソケットを初期化できません + + + Unable to initialize broadcast socket + ブロードキャストソケットを初期化できません + + + Attempt to use IPv6 socket on a platform with no IPv6 support + IPv6 がサポートされていないプラットフォームで IPv6 ソケットを使用しようとしています + + + The remote host closed the connection + リモートホストは接続を閉じました + + + Network operation timed out + ネットワーク操作がタイムアウトしました + + + Out of resources + リソースが足りません + + + Unsupported socket operation + サポートされていないソケット操作です + + + Protocol type not supported + プロトコル型がサポートされていません + + + Invalid socket descriptor + 無効なソケット記述子です + + + Host unreachable + ホストへ到達できません + + + Network unreachable + ネットワークへ到達できません + + + Permission denied + 許可されていません + + + Connection timed out + 接続がタイムアウトしました + + + Connection refused + 接続が拒否されました + + + The bound address is already in use + バインドアドレスは既に使われています + + + The address is not available + そのアドレスは使用できません + + + The address is protected + そのアドレスへのアクセス権がありません + + + Datagram was too large to send + データグラムが大き過ぎて送信できませんでした + + + Unable to send a message + メッセージを送信できません + + + Unable to receive a message + メッセージを受信できません + + + Unable to write + 書き込みができません + + + Network error + ネットワークエラー + + + Another socket is already listening on the same port + 別のソケットが同じポートで既に待ち受けています + + + Operation on non-socket + 非ソケットに対する操作です + + + The proxy type is invalid for this operation + このプロキシーは、この操作に対応していません + + + The address is invalid for this operation + この操作には無効なアドレスです + + + The specified network session is not opened + 指定されたネットワークセッションは開いていません + + + Unknown error + 未知のエラー + + + QSystemSemaphore %1: out of resources @@ -6751,6 +6858,10 @@ Please choose a different file name. %1: 存在しません + %1: name error + %1: 名前の解決に失敗 + + %1: unknown error %2 %1: 未知のエラーです %2 @@ -6759,7 +6870,7 @@ Please choose a different file name. QTDSDriver Unable to open connection - 接続をオープンできません + 接続を開けません Unable to use database @@ -6840,11 +6951,21 @@ Please choose a different file name. QUndoGroup + Undo %1 + %1 を元に戻す + + Undo + Default text for undo action 元に戻す + Redo %1 + %1 をやり直す + + Redo + Default text for redo action やり直す @@ -6858,11 +6979,21 @@ Please choose a different file name. QUndoStack + Undo %1 + %1 を元に戻す + + Undo + Default text for undo action 元に戻す + Redo %1 + %1 をやり直す + + Redo + Default text for redo action やり直す @@ -6939,6 +7070,10 @@ Please choose a different file name. File does not exist ファイルが存在しません + + Loading is handled by the media engine + メディアエンジンで読み込みを行います + QWebPage @@ -6947,10 +7082,6 @@ Please choose a different file name. リダイレクトの上限に達しました - Bad HTTP request - 誤った HTTP のリクエストです - - Submit default label for Submit buttons in forms on web pages 送信 @@ -6981,6 +7112,11 @@ Please choose a different file name. ファイルが選択されていません + Details + text to display in <details> tag when it has no <summary> child + 詳細 + + Open in New Window Open in New Window context menu item 新しいウィンドウで開く @@ -7011,6 +7147,61 @@ Please choose a different file name. 画像をコピー + Copy Image Address + Copy Image Address menu item + 画像のアドレスをコピー + + + Open Video + Open Video in New Window + ビデオを開く + + + Open Audio + Open Audio in New Window + オーディオを開く + + + Copy Video + Copy Video Link Location + ビデオをコピー + + + Copy Audio + Copy Audio Link Location + オーディオをコピー + + + Toggle Controls + Toggle Media Controls + コントロールの表示の切替 + + + Toggle Loop + Toggle Media Loop Playback + ループのオン/オフの切替 + + + Enter Fullscreen + Switch Video to Fullscreen + フルスクリーン表示 + + + Play + Play + 再生 + + + Pause + Pause + 一時停止 + + + Mute + Mute + ミュート + + Open Frame Open Frame in New Window context menu item フレームを新しいウィンドウで開く @@ -7051,6 +7242,11 @@ Please choose a different file name. 貼り付け + Select All + Select All context menu item + すべてを選択 + + No Guesses Found No Guesses Found context menu item 推測候補はありません @@ -7529,10 +7725,6 @@ Please choose a different file name. 文章の末尾にカーソルを移動 - Select all - すべてを選択 - - Select to the next character 次の文字を選択 @@ -8030,6 +8222,101 @@ Please choose a different file name. + QmlJSDebugger::LiveSelectionTool + + Items + アイテム + + + + QmlJSDebugger::QmlToolBar + + Inspector Mode + インスペクタモード + + + Play/Pause Animations + アニメーションの再生/一時停止 + + + Select + 選択 + + + Select (Marquee) + セレクト (Marquee) + + + Zoom + ズーム + + + Color Picker + カラーピッカー + + + Apply Changes to QML Viewer + 変更を QML Viewer へ適用する + + + Apply Changes to Document + 変更をドキュメントへ適用する + + + Tools + ツール + + + 1x + 1倍 + + + 0.5x + 0.5倍 + + + 0.25x + 0.25倍 + + + 0.125x + 0.125倍 + + + 0.1x + 0.1倍 + + + + QmlJSDebugger::ToolBarColorBox + + Copy Color + 色をコピー + + + + QmlJSDebugger::ToolBox + + Qt Quick Toolbox + Qt Quick ツールボックス + + + + QmlJSDebugger::ZoomTool + + Zoom to &100% + &100% 表示 + + + Zoom In + 拡大 + + + Zoom Out + 縮小 + + + QtXmlPatterns %1 is an unsupported encoding. @@ -8913,7 +9200,7 @@ Please choose a different file name. Complex type %1 cannot be derived from base type %2%3. - 複合型 %1 は基底型 %2 から派生する事はできません %3。 + 複合型 %1 は基底型 %2%3 から派生する事はできません。 Attributes of complex type %1 are not a valid restriction from the attributes of base type %2: %3. diff --git a/translations/qtconfig_ja.ts b/translations/qtconfig_ja.ts index 8440389..332eb8b 100644 --- a/translations/qtconfig_ja.ts +++ b/translations/qtconfig_ja.ts @@ -5,23 +5,23 @@ MainWindow <p><b><font size+=2>Appearance</font></b></p><hr><p>Use this tab to customize the appearance of your Qt applications.</p><p>You can select the default GUI Style from the drop down list and customize the colors.</p><p>Any GUI Style plugins in your plugin path will automatically be added to the list of built-in Qt styles. (See the Library Paths tab for information on adding new plugin paths.)</p><p>When you choose 3-D Effects and Window Background colors, the Qt Configuration program will automatically generate a palette for you. To customize colors further, press the Tune Palette button to open the advanced palette editor.<p>The Preview Window shows what the selected Style and colors look like. - + <p><b><font size+=2>外観</font></b></p><hr><p>このタブでは Qt アプリケーションの外観をカスタマイズします。</p><p>ドロップダウンリストからデフォルトの GUI スタイルを選択して、その色をカスタマイズできます。</p><p>プラグインパスにある全てのプラグインが自動的にQt のビルトインスタイルのリストに追加されます。 (See the Library Paths tab for information on adding new plugin paths.)</p><p>3D 効果とウィンドウの背景色を選択した場合、Qt 設定ツールは自動的にパレットを生成します。さらに色をカスタマイズするには、パレットの調整ボタンを押して拡張パレットエディタを開いてください。<p>プレビューウィンドウでは選択したスタイルと色がどのように見えるかを確認できます。 <p><b><font size+=2>Fonts</font></b></p><hr><p>Use this tab to select the default font for your Qt applications. The selected font is shown (initially as 'Sample Text') in the line edit below the Family, Style and Point Size drop down lists.</p><p>Qt has a powerful font substitution feature that allows you to specify a list of substitute fonts. Substitute fonts are used when a font cannot be loaded, or if the specified font doesn't have a particular character.<p>For example, if you select the font Lucida, which doesn't have Korean characters, but need to show some Korean text using the Mincho font family you can do so by adding Mincho to the list. Once Mincho is added, any Korean characters that are not found in the Lucida font will be taken from the Mincho font. Because the font substitutions are lists, you can also select multiple families, such as Song Ti (for use with Chinese text). - + <p><b><font size+=2>フォント</font></b></p><hr><p>このタブでは Qt アプリケーションのデフォルトフォントの設定を行います。選択したフォントはファミリー、スタイル、ポイントサイズのドロップダウンリストの下にあるラインエディタに(初期値は「テキストのサンプル」で)表示されます。</p><p>Qt には強力なフォント置換機能があり、置換するフォントのリストを指定することができます。置換するフォントはフォントが読み込めない場合や指定したフォントが特定の文字を持たない場合に使用されます。</p><p>例えば、漢字を持たない Lucida フォントを選択した場合に、リストに明朝体のフォントを追加すれば漢字からなる文字列を明朝体で表示することができます。明朝体のフォントが追加してある場合、Lucida フォントに含まれない全ての漢字が明朝体のフォントから用いられます。フォントの置換機能では、ハングル等の複数のファミリーを指定することができます。 <p><b><font size+=2>Interface</font></b></p><hr><p>Use this tab to customize the feel of your Qt applications.</p><p>If the Resolve Symlinks checkbox is checked Qt will follow symlinks when handling URLs. For example, in the file dialog, if this setting is turned on and /usr/tmp is a symlink to /var/tmp, entering the /usr/tmp directory will cause the file dialog to change to /var/tmp. With this setting turned off, symlinks are not resolved or followed.</p><p>The Global Strut setting is useful for people who require a minimum size for all widgets (e.g. when using a touch panel or for users who are visually impaired). Leaving the Global Strut width and height at 0 will disable the Global Strut feature</p><p>XIM (Extended Input Methods) are used for entering characters in languages that have large character sets, for example, Chinese and Japanese. - + <p><b><font size+=2>インターフェース</font></b></p><hr><p>このタブでは Qt アプリケーションの操作感をカスタマイズします。</p><p>「URL でのシンボリックリンクを解決」チェックボックスがチェックされている場合、Qt が URL を処理する際にシンボリックリンクを追跡します。例えば、この設定がオンで /usr/tmp が /var/tmp へのシンボリックリンクの場合、ファイルダイアログで /usr/tmp を表示しようとすると /var/tmp へ移動します。この設定がオフの場合、シンボリックリンクの解決や追跡は行われません。</p><p>「グローバルな設定」は全てのウィジェットに最小サイズが必要な場合(例えば、タッチパネルを使用していたり、目の不自由な方々など)に有用です。幅の最小値と高さの最小値を0にするとこの機能が無効になります。</p><p>XIM (インプットメソッド) は中国語や日本語のような、多数の文字を持つ言語で文字の入力に用いられています。 <p><b><font size+=2>Printer</font></b></p><hr><p>Use this tab to configure the way Qt generates output for the printer.You can specify if Qt should try to embed fonts into its generated output.If you enable font embedding, the resulting postscript will be more portable and will more accurately reflect the visual output on the screen; however the resulting postscript file size will be bigger.<p>When using font embedding you can select additional directories where Qt should search for embeddable font files. By default, the X server font path is used. - + <p><b><font size+=2>プリンタ</font></b></p><hr><p>このタブでは Qt が印刷する際に生成する出力の設定を行います。Qt が生成された印刷物にフォントを埋め込もうとするかどうかを指定できます。フォントを埋め込む場合、生成された PostScript の可搬性が増し、その見た目は画面上の表示をより正確に反映したものとなります。その反面、生成された PostScript ファイルのサイズが大きくなります。<p>フォントを埋め込む場合、Qt が埋め込むフォントファイルを検索するディレクトリを追加で選択することができます。デフォルトでは X サーバーのフォントパスが使われます。 <p><b><font size+=2>Phonon</font></b></p><hr><p>Use this tab to configure the Phonon GStreamer multimedia backend. <p>It is reccommended to leave all settings on "Auto" to let Phonon determine your settings automatically. - + <p><b><font size+=2>Phonon</font></b></p><hr><p>このタブでは Phonon の GStreamer マルチメディアバックエンドの設定を行います。<p>全ての設定を "自動" にして Phonon に自動的に設定させることを推奨します。 Desktop Settings (Default) @@ -36,6 +36,10 @@ On The Spot + Unknown + 不明 + + Auto (default) 自動(デフォルト) @@ -92,6 +96,10 @@ 保存中… + Saved changes. + 変更を保存しました。 + + Over The Spot Over The Spot @@ -124,25 +132,6 @@ 変更内容を設定に保存しますか? - &Yes - はい(&Y) - - - &No - いいえ(&N) - - - &Cancel - キャンセル(&C) - - - - MainWindowBase - - Qt Configuration - Qt 設定ツール - - Appearance 外観 @@ -179,8 +168,8 @@ パレットの設定 - &3-D Effects: - &3D エフェクト: + &Button Background: + ボタンのバックグラウンド(&B): Window Back&ground: @@ -188,11 +177,11 @@ &Tune Palette... - パレットを調整(&T)... + パレットの調整(&T)... Please use the KDE Control Center to set the palette. - KDE のコントロールセンターでパレットの設定をしてください。 + KDE のシステム設定でパレットの設定をしてください。 Fonts @@ -284,7 +273,7 @@ Resolve symlinks in URLs - URL のシンボリックリンクの解決 + URL でのシンボリックリンクを解決 GUI Effects @@ -328,7 +317,7 @@ Global Strut - Global Strut + グローバルな設定 Minimum &Width: @@ -351,22 +340,6 @@ XIM のインプットスタイル: - On The Spot - On The Spot - - - Over The Spot - Over The Spot - - - Off The Spot - Off The Spot - - - Root - Root - - Default Input Method: デフォルトのインプットメソッド: @@ -411,32 +384,16 @@ ウェブサイト: - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://phonon.kde.org"><span style=" text-decoration: underline; color:#0000ff;">http://phonon.kde.org</span></a></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://phonon.kde.org"><span style=" text-decoration: underline; color:#0000ff;">http://phonon.kde.org</span></a></p></body></html> + <a href="http://phonon.kde.org">http://phonon.kde.org/</a> + <a href="http://phonon.kde.org">http://phonon.kde.org/</a> About GStreamer GStreamer について - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://gstreamer.freedesktop.org/"><span style=" text-decoration: underline; color:#0000ff;">http://gstreamer.freedesktop.org/</span></a></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://gstreamer.freedesktop.org/"><span style=" text-decoration: underline; color:#0000ff;">http://gstreamer.freedesktop.org/</span></a></p></body></html> + <a href="http://gstreamer.freedesktop.org/">http://gstreamer.freedesktop.org/</a> + <a href="http://gstreamer.freedesktop.org/">http://gstreamer.freedesktop.org/</a> GStreamer backend settings @@ -491,6 +448,10 @@ p, li { white-space: pre-wrap; } 終了 + Ctrl+Q + Ctrl+Q + + &About Qt 設定ツールについて(&A) @@ -508,16 +469,12 @@ p, li { white-space: pre-wrap; } - PaletteEditorAdvancedBase + PaletteEditorAdvanced Tune Palette パレットの調整 - <b>Edit Palette</b><p>Change the palette of the current widget or form.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p> - <b>パレットの編集</b><p>現在のウィジェットやフォームのパレットを変更してください。</p><p>自動生成されたパレットを使用するか、それぞれのグループ/役割に対して色を選択してください。</p><p>パレットの内容のプレビューセクションにある様々なウィジェットのレイアウトで確認できます。</p> - - Select &Palette: パレットの選択(&P): @@ -566,24 +523,36 @@ p, li { white-space: pre-wrap; } ウィンドウテキスト - Button - ボタン - - Base ベース + AlternateBase + その他のベース + + + ToolTipBase + ツールチップのベース + + + ToolTipText + ツールチップのテキスト + + Text テキスト - BrightText - 明るいテキスト + Button + ボタン ButtonText - ボタンテキスト + ボタンのテキスト + + + BrightText + 明るいテキスト Highlight @@ -591,29 +560,25 @@ p, li { white-space: pre-wrap; } HighlightedText - ハイライトのテキスト + ハイライトされたテキスト - &Select Color: - 色の選択(&S): + Link + リンク - Choose a color - 色を選択してください + LinkVisited + 訪問済みのリンク - Choose a color for the selected central color role. - 選択された中央部の色の役割に使用する色を選択してください。 + &Select Color: + 色の選択(&S): 3-D shadow &effects 3Dの影の効果(&E) - Build &from button color - ボタンの色から構築する(&F) - - Generate shadings 影を生成する @@ -622,6 +587,10 @@ p, li { white-space: pre-wrap; } 3D効果の色をボタンの色から計算するにはチェックしてください。 + Build &from button color + ボタンの色から構築する(&F) + + Choose 3D-effect color role 3D効果の色の役割の選択 @@ -654,24 +623,16 @@ p, li { white-space: pre-wrap; } 色の選択(&L): - Choose a color for the selected effect color role. - 選択の効果の色の役割に使用する色を選択してください。 - - - OK - OK - - - Close dialog and apply all changes. - 全ての変更を適用してダイアログを閉じる。 + Choose a color + 色を選択してください - Cancel - キャンセル + Choose a color for the selected central color role. + 選択された中央部の色の役割に使用する色を選択してください。 - Close dialog and discard all changes. - 全ての変更を破棄してダイアログを閉じる。 + Choose a color for the selected effect color role. + 選択の効果の色の役割に使用する色を選択してください。 @@ -682,14 +643,14 @@ p, li { white-space: pre-wrap; } - PreviewWidgetBase + PreviewWidget Preview Window プレビューウィンドウ - ButtonGroup - ボタングループ + GroupBox + グループボックス RadioButton1 @@ -704,8 +665,8 @@ p, li { white-space: pre-wrap; } ラジオボタン3 - ButtonGroup2 - ボタングループ2 + GroupBox2 + グループボックス2 CheckBox1 @@ -728,18 +689,9 @@ p, li { white-space: pre-wrap; } プッシュボタン - <p> -<a href="http://qt.nokia.com">http://qt.nokia.com</a> -</p> -<p> -<a href="http://www.kde.org">http://www.kde.org</a> -</p> - <p> -<a href="http://qt.nokia.com">http://qt.nokia.com</a> -</p> -<p> -<a href="http://www.kde.org">http://www.kde.org</a> -</p> + <p><a href="http://qt.nokia.com">http://qt.nokia.com</a></p> +<p><a href="http://www.kde.org">http://www.kde.org</a></p> + -- cgit v0.12 From a1c224f151f1fd0003198e4783bef50fa9338a49 Mon Sep 17 00:00:00 2001 From: Sergey Belyashov Date: Fri, 12 Aug 2011 19:50:16 +0200 Subject: Russian translation update Merge-request: 1303 Reviewed-by: Oswald Buddenhagen --- translations/assistant_ru.ts | 193 +++++++++++++-------- translations/designer_ru.ts | 137 +++++++++++---- translations/qt_ru.ts | 402 +++++++++++++++++++++++++++++++++++++++---- translations/qtconfig_ru.ts | 243 +++++++++++--------------- 4 files changed, 687 insertions(+), 288 deletions(-) diff --git a/translations/assistant_ru.ts b/translations/assistant_ru.ts index b16f940..02eddc0 100644 --- a/translations/assistant_ru.ts +++ b/translations/assistant_ru.ts @@ -259,6 +259,10 @@ Reason: Адрес + Toolbar Menu + Меню панели инструментов + + Bookmarks Menu Меню закладок @@ -285,41 +289,9 @@ Reason: CentralWidget - Add new page - Открыть новую страницу - - - Close current page - Закрыть текущую страницу - - Print Document Печать документа - - unknown - безымянная вкладка - - - Add New Page - Открыть новую страницу - - - Close This Page - Закрыть данную страницу - - - Close Other Pages - Закрыть остальные страницы - - - Add Bookmark for this Page... - Добавить закладку для этой страницы... - - - Search - Поиск - CmdLineParser @@ -655,6 +627,49 @@ Reason: + GlobalActions + + &Back + &Назад + + + &Forward + &Вперёд + + + &Home + &Домой + + + ALT+Home + + + + Zoom &in + У&величить + + + Zoom &out + У&меньшить + + + &Copy selected Text + &Копировать выделенный текст + + + &Print... + &Печать... + + + &Find in Text... + П&оиск в тексте... + + + &Find + &Поиск + + + HelpEngineWrapper Unfiltered @@ -679,16 +694,28 @@ Reason: <title>Ошибка 404...</title><div align="center"><br><br><h1>Страница не найдена</h1><br><h3>'%1'</h3></div> + Open Link + Открыть ссылку + + Copy &Link Location Копировать &адрес ссылки + Copy + Копировать + + + Reload + Перезагрузить + + Open Link in New Tab Ctrl+LMB Открыть ссылку в новой вкладке Ctrl+LMB - Open Link in New Tab - Открыть ссылку в новой вкладке + Open Link in New Page + Открыть ссылку в новой странице @@ -899,10 +926,6 @@ Reason: Предпросмотр печати... - &Print... - &Печать... - - New &Tab Новая &вкладка @@ -923,18 +946,6 @@ Reason: &Правка - &Copy selected Text - &Копировать выделенный текст - - - &Find in Text... - П&оиск в тексте... - - - &Find - &Поиск - - Find &Next Найти &следующее @@ -951,14 +962,6 @@ Reason: &Вид - Zoom &in - У&величить - - - Zoom &out - У&меньшить - - Normal &Size Нормальный р&азмер @@ -991,22 +994,6 @@ Reason: &Перейти - &Home - &Домой - - - ALT+Home - - - - &Back - &Назад - - - &Forward - &Вперёд - - Sync with Table of Contents Синхронизировать с оглавлением @@ -1047,6 +1034,22 @@ Reason: &Справка + Open Pages + Открытые страницы + + + Bookmark Toolbar + Панель закладок + + + E&xit + В&ыход + + + ALT+P + + + About... О программе... @@ -1104,6 +1107,17 @@ Reason: + OpenPagesWidget + + Close %1 + Закрыть %1 + + + Close All Except %1 + Закрыть всё, кроме %1 + + + OutputPage Form @@ -1322,6 +1336,14 @@ Do you want to remove it? Blank Page Пустая страница + + Appearance + Внешний вид + + + Show tabs for each individual page + Показывать вкладки для каждой страницы + QCollectionGenerator @@ -1513,6 +1535,29 @@ qhelpgenerator <файл-проекта-справки> [ОПЦИИ] + TabBar + + (Untitled) + (Без названия) + + + New &Tab + Новая &вкладка + + + &Close Tab + &Закрыть вкладку + + + Close Other Tabs + Закрыть остальные вкладки + + + Add Bookmark for this Page... + Добавить закладку для этой страницы... + + + TopicChooser Choose a topic for <b>%1</b>: diff --git a/translations/designer_ru.ts b/translations/designer_ru.ts index fec098c..471a366 100644 --- a/translations/designer_ru.ts +++ b/translations/designer_ru.ts @@ -406,10 +406,6 @@ Страница - page - страница - - Insert Page Вставить страницу @@ -462,10 +458,6 @@ Вставить дочернее окно - subwindow - дочернее окно - - Subwindow Дочернее окно @@ -506,6 +498,10 @@ Изменить компоновку '%1' с %2 на %3 + Change layout alignment + Изменить выравнивание компоновщика + + Set action text Установить текст действия @@ -1822,7 +1818,7 @@ Container pages should only be added by specifying them in XML returned by the d F&orm - Ф&орма + Фор&ма Preview in @@ -1837,10 +1833,6 @@ Container pages should only be added by specifying them in XML returned by the d &Справка - Edit - Правка - - Toolbars Панель инструментов @@ -1861,6 +1853,10 @@ Container pages should only be added by specifying them in XML returned by the d &Вид + &Edit + &Правка + + &Settings &Настройки @@ -1870,7 +1866,7 @@ Container pages should only be added by specifying them in XML returned by the d If you do not review your documents, all your changes will be lost. - Если не просматривать изменения, все изменения будут потеряны. + Если не просматривать изменения, все они будут потеряны. Discard Changes @@ -3743,6 +3739,10 @@ Do you want overwrite the template? Унаследованная + [Theme] %1 + [Тема] %1 + + Horizontal Горизонтальное @@ -3751,6 +3751,10 @@ Do you want overwrite the template? Вертикальное + Theme + Тема + + Normal Off Нормальный, выкл @@ -3973,15 +3977,15 @@ Do you want overwrite the template? Key Move - Перемещение клавишей + Перемещение клавишей Key Resize - Изменение размера клавишей + Изменение размера клавишей Paste %n action(s) - + Вставлено %n действие Вставлено %n действия Вставлено %n действий @@ -3989,7 +3993,7 @@ Do you want overwrite the template? Paste %n widget(s) - + Вставлен %n виджет Вставлено %n виджета Вставлено %n виджета @@ -3997,7 +4001,7 @@ Do you want overwrite the template? Paste (%1 widgets, %2 actions) - Вставлено (%1 виджетов, %2 действий) + Вставлено (%1 виджетов, %2 действий) Cannot paste widgets. Designer could not find a container without a layout to paste into. @@ -4029,7 +4033,7 @@ Do you want overwrite the template? Drop widget - Вставка виджета + Вставка виджета A QMainWindow-based form does not contain a central widget. @@ -4339,6 +4343,17 @@ Do you want overwrite the template? + qdesigner_internal::IconThemeDialog + + Set Icon From Theme + Установить значок из темы + + + Input icon name from the current theme: + Имя исходного значка из текущей темы: + + + qdesigner_internal::ItemListEditor Properties &<< @@ -4488,20 +4503,24 @@ Do you want overwrite the template? &Значок: - Shortcut: - Горячая клавиша: + ... + ... - Checkable: - Триггерное: + T&oolTip: + Подска&зка: - ToolTip: - Подсказка: + Icon th&eme: + Тема зна&чков: - ... - ... + &Checkable: + Т&риггерное: + + + &Shortcut: + &Горячая клавиша: @@ -4631,7 +4650,7 @@ Please select another name. Global include - Глобальное включение + Глобальное включение Reset @@ -4688,15 +4707,15 @@ Please select another name. Show Details - Показывать детали + Показывать детали Compute Details - Рассчитывать детали + Рассчитывать детали Quick - Быстрый + Быстрый Preview @@ -4752,6 +4771,10 @@ Please select another name. Выбрать файл... + Set Icon From Theme... + Установить значок из темы... + + Copy Path Скопировать путь @@ -4763,6 +4786,10 @@ Please select another name. ... ... + + [Theme] %1 + [Тема] %1 + qdesigner_internal::PlainTextEditorDialog @@ -4954,7 +4981,7 @@ ate the goose who was loose. Global include - Глобальное включение + Глобальное включение Usage @@ -5000,7 +5027,7 @@ ate the goose who was loose. Color Groups - Цветовые группы + Цветовые группы Tree View @@ -5008,7 +5035,7 @@ ate the goose who was loose. Drop Down Button View - Вид выпадающего списка + Вид выпадающего списка String... @@ -5085,6 +5112,42 @@ Class: %2 qdesigner_internal::QDesignerTaskMenu + Layout Alignment + Выравнивание компоновщика + + + No Horizontal Alignment + Без горизонтального выравнивания + + + Left + По левому краю + + + Center Horizontally + По горизонтальному центру + + + Right + По правому краю + + + No Vertical Alignment + Без вертикального выравнивания + + + Top + По верхнему краю + + + Center Vertically + По вертикальному центру + + + Bottom + По нижнему краю + + Change objectName... Изменить objectName... @@ -5352,6 +5415,10 @@ Class: %2 Insert &Image Вставить &изображение + + Simplify Rich Text + Упростить форматирование + qdesigner_internal::ScriptDialog diff --git a/translations/qt_ru.ts b/translations/qt_ru.ts index d399b6d..19c0544 100644 --- a/translations/qt_ru.ts +++ b/translations/qt_ru.ts @@ -9,10 +9,21 @@ + Debugger::JSAgentWatchData + + [Array of length %1] + [Массив размером %1] + + + <undefined> + <неопределено> + + + FakeReply - Fake error ! - Фиктивная ошибка ! + Fake error! + Фиктивная ошибка! Invalid URL @@ -1062,6 +1073,14 @@ to QAccessibleButton + Uncheck + Выключить + + + Check + Включить + + Press Нажать @@ -1722,10 +1741,6 @@ to Свойство псевдонима выходит за границы - Invalid alias reference. An alias reference must be specified as <id> or <id>.<property> - Некорректная ссылка на псевдоним. Ссылка на псевдоним должна быть указана, как <id> или <id>.<property> - - Invalid alias reference. Unable to find id "%1" Некорректная ссылка на псевдоним. Не удалось найти id «%1» @@ -2455,6 +2470,10 @@ to Cannot create %1 for output Невозможно создать %1 для вывода + + No file engine available or engine does not support UnMapExtension + Нет файлового движка или он не поддерживает UnMapExtension + QFileDialog @@ -3416,6 +3435,18 @@ Please verify the correct directory name was given. Cannot resolve symbol "%1" in %2: %3 Невозможно разрешить символ «%1» в %2: %3 + + '%1' is not an ELF object (%2) + «%1» не является объектом ELF (%2) + + + '%1' is not an ELF object + «%1» не является объектом ELF + + + '%1' is an invalid ELF object (%2) + «%1» является неверным объектом ELF (%2) + QLineEdit @@ -3513,6 +3544,10 @@ Please verify the correct directory name was given. %1: Unknown error %2 %1: Неизвестная ошибка %2 + + %1: Access denied + %1: Доступ запрещён + QMYSQLDriver @@ -3854,10 +3889,6 @@ Please verify the correct directory name was given. QNetworkAccessDataBackend - Operation not supported on %1 - Операция не поддерживается для %1 - - Invalid URI: %1 Некорректный URI: %1 @@ -3952,6 +3983,10 @@ Please verify the correct directory name was given. Ошибка сетевой сессии. + backend start error. + ошибка запуска драйвера. + + Temporary network failure. Временная ошибка сети. @@ -4145,6 +4180,10 @@ Please verify the correct directory name was given. PulseAudio Sound Server Звуковой сервер PulseAudio + + Host not found + Узел не найден + QPPDOptionsModel @@ -5446,16 +5485,16 @@ Please choose a different file name. %1: системой наложены ограничения на размер + %1: bad name + %1: неверное имя + + %1: not attached %1: не приложенный %1: invalid size - %1: некорректный размер - - - %1: key error - %1: некорректный ключ + %1: неверный размер %1: size query failed @@ -6320,7 +6359,7 @@ Please choose a different file name. Flip - + Крышка Ctrl @@ -6681,6 +6720,121 @@ Please choose a different file name. + QSymbianSocketEngine + + Unable to initialize non-blocking socket + Невозможно инициализировать не-блочный сокет + + + Unable to initialize broadcast socket + Невозможно инициализировать широковещательный сокет + + + Attempt to use IPv6 socket on a platform with no IPv6 support + Попытка использовать IPv6 на платформе, не поддерживающей IPv6 + + + The remote host closed the connection + Удалённый узел закрыл соединение + + + Network operation timed out + Время на сетевую операцию истекло + + + Out of resources + Недостаточно ресурсов + + + Unsupported socket operation + Операция с сокетом не поддерживается + + + Protocol type not supported + Протокол не поддерживается + + + Invalid socket descriptor + Некорректный дескриптор сокета + + + Host unreachable + Узел недоступен + + + Network unreachable + Сеть недоступна + + + Permission denied + Доступ запрещён + + + Connection timed out + Время на соединение истекло + + + Connection refused + Отказано в соединении + + + The bound address is already in use + Адрес уже используется + + + The address is not available + Адрес недоступен + + + The address is protected + Адрес защищён + + + Datagram was too large to send + Датаграмма слишком большая для отправки + + + Unable to send a message + Невозможно отправить сообщение + + + Unable to receive a message + Невозможно получить сообщение + + + Unable to write + Невозможно записать + + + Network error + Ошибка сети + + + Another socket is already listening on the same port + Другой сокет уже прослушивает этот порт + + + Operation on non-socket + Операция с не-сокетом + + + The proxy type is invalid for this operation + Некорректный тип прокси-сервера для данной операции + + + The address is invalid for this operation + Данный адрес не допустим для этой операции + + + The specified network session is not opened + Указанная сетевая сессия не открыта + + + Unknown error + Неизвестная ошибка + + + QSystemSemaphore %1: does not exist @@ -6699,6 +6853,10 @@ Please choose a different file name. %1: уже существует + %1: name error + %1: ошибка в имени + + %1: unknown error %2 %1: неизвестная ошибка %2 @@ -6788,11 +6946,21 @@ Please choose a different file name. QUndoGroup + Undo %1 + Отменить %1 + + Undo + Default text for undo action Отменить действие + Redo %1 + Повторить %1 + + Redo + Default text for redo action Повторить действие @@ -6806,11 +6974,21 @@ Please choose a different file name. QUndoStack + Undo %1 + Отменить %1 + + Undo + Default text for undo action Отменить действие + Redo %1 + Повторить %1 + + Redo + Default text for redo action Повторить действие @@ -6887,6 +7065,10 @@ Please choose a different file name. File does not exist Файл не существует + + Loading is handled by the media engine + Загрузка выполняется мультимедиа-подсистемой + QWebPage @@ -6899,10 +7081,6 @@ Please choose a different file name. Достигнут предел переадресации - Bad HTTP request - Некорректный HTTP-запрос - - Scroll here Прокрутить сюда @@ -7023,10 +7201,6 @@ Please choose a different file name. Переместить указатель в конец документа - Select all - Выделить всё - - Select to the next character Выделить до следующего символа @@ -7173,6 +7347,11 @@ Please choose a different file name. Файл не указан + Details + text to display in <details> tag when it has no <summary> child + Подробности + + Open in New Window Open in New Window context menu item Открыть в новом окне @@ -7203,6 +7382,61 @@ Please choose a different file name. Копировать изображение + Copy Image Address + Copy Image Address menu item + Скопировать адрес изображения + + + Open Video + Open Video in New Window + Открыть видео + + + Open Audio + Open Audio in New Window + Открыть аудио + + + Copy Video + Copy Video Link Location + Скопировать видео + + + Copy Audio + Copy Audio Link Location + Скопировать аудио + + + Toggle Controls + Toggle Media Controls + Вкл/выкл управление + + + Toggle Loop + Toggle Media Loop Playback + Вкл/выкл зацикленность + + + Enter Fullscreen + Switch Video to Fullscreen + Полноэкранный режим + + + Play + Play + Воспроизвести + + + Pause + Pause + Приостановить + + + Mute + Mute + Приглушить + + Open Frame Open Frame in New Window context menu item Открыть фрейм @@ -7243,6 +7477,11 @@ Please choose a different file name. Вставить + Select All + Select All context menu item + Выделить всё + + No Guesses Found No Guesses Found context menu item Совпадений не найдено @@ -7977,6 +8216,101 @@ Please choose a different file name. + QmlJSDebugger::LiveSelectionTool + + Items + Элементы + + + + QmlJSDebugger::QmlToolBar + + Inspector Mode + Режим инспектирования + + + Play/Pause Animations + Запустить/приостановить анимации + + + Select + Выбрать + + + Select (Marquee) + Выбрать (Маркет) + + + Zoom + Масштаб + + + Color Picker + Пипетка + + + Apply Changes to QML Viewer + Использовать изменения в просмотрщике QML + + + Apply Changes to Document + Применить изменения к документу + + + Tools + Инструменты + + + 1x + + + + 0.5x + + + + 0.25x + + + + 0.125x + + + + 0.1x + + + + + QmlJSDebugger::ToolBarColorBox + + Copy Color + Скопировать цвет + + + + QmlJSDebugger::ToolBox + + Qt Quick Toolbox + Инструментарий Qt Quick + + + + QmlJSDebugger::ZoomTool + + Zoom to &100% + Масштаб &100% + + + Zoom In + Увеличить + + + Zoom Out + Уменьшить + + + QtXmlPatterns At least one component must be present. @@ -8732,7 +9066,7 @@ Please choose a different file name. %1 has inheritance loop in its base type %2. - У %1 зациклено наследование в его базовом типе %2. + У %1 зациклено наследование в его базовом типе %2. Circular inheritance of base type %1. @@ -8740,15 +9074,15 @@ Please choose a different file name. Circular inheritance of union %1. - Цикличное наследование базового объединения %1. + Цикличное наследование объединения %1. %1 is not allowed to derive from %2 by restriction as the latter defines it as final. - + %1 не может наследовать %2 через ограничение, так как ранее определено, что он конечный. %1 is not allowed to derive from %2 by extension as the latter defines it as final. - + %1 не может наследовать %2 через расширение, так как ранее определено, что он конечный. Base type of simple type %1 cannot be complex type %2. @@ -8768,7 +9102,7 @@ Please choose a different file name. Simple type %1 cannot derive from %2 as the latter defines restriction as final. - + Простой тип %1 не может наследовать %2, так как есть ограничение, определяющее его конечным. Variety of item type of %1 must be either atomic or union. @@ -8780,7 +9114,7 @@ Please choose a different file name. %1 is not allowed to derive from %2 by list as the latter defines it as final. - + %1 не может наследовать %2 через список, так как ранее определено, что он конечный. Simple type %1 is only allowed to have %2 facet. @@ -8792,7 +9126,7 @@ Please choose a different file name. Base type of simple type %1 has defined derivation by restriction as final. - + Базовый тип простого типа %1 определён конечным исходя из ограничения. Item type of base type does not match item type of %1. @@ -8804,7 +9138,7 @@ Please choose a different file name. %1 is not allowed to derive from %2 by union as the latter defines it as final. - + %1 не может наследовать %2 через объединение, так как ранее определено, что он конечный. %1 is not allowed to have any facets. @@ -8812,11 +9146,11 @@ Please choose a different file name. Base type %1 of simple type %2 must have variety of union. - Базовый тип %1 простого типа %2 должен содержать какое-то объединение. + Базовый тип %1 простого типа %2 должен содержать какое-то объединение. Base type %1 of simple type %2 is not allowed to have restriction in %3 attribute. - + Базовый тип %1 простого типа %2 не может иметь ограничение для атрибута %3. Member type %1 cannot be derived from member type %2 of %3's base type %4. diff --git a/translations/qtconfig_ru.ts b/translations/qtconfig_ru.ts index 07b7fd3..a200ac1 100644 --- a/translations/qtconfig_ru.ts +++ b/translations/qtconfig_ru.ts @@ -5,23 +5,23 @@ MainWindow <p><b><font size+=2>Appearance</font></b></p><hr><p>Use this tab to customize the appearance of your Qt applications.</p><p>You can select the default GUI Style from the drop down list and customize the colors.</p><p>Any GUI Style plugins in your plugin path will automatically be added to the list of built-in Qt styles. (See the Library Paths tab for information on adding new plugin paths.)</p><p>When you choose 3-D Effects and Window Background colors, the Qt Configuration program will automatically generate a palette for you. To customize colors further, press the Tune Palette button to open the advanced palette editor.<p>The Preview Window shows what the selected Style and colors look like. - <p><b><font size+=2>Внешний вид</font></b></p><hr><p>На этой вкладке можно настроить внешний вид приложений Qt.</p><p>Позволяет выбрать стиль интерфейса по умолчанию из выпадающего списка и настроить используемые стилем цвета.</p><p>Каждый стиль интерфейса, содержащийся в модулях, найденных в путях к модулям, автоматически добавляется в список встроенных стилей Qt (на вкладке Пути к библиотекам имеется более подробная информация о добавлении путей к модулям).</p><p>При выборе эффектов 3D и фоновых цветов окна программа настройки Qt автоматически создаст подходящую палитру. Для дальнейшей настройки цветов следует зайти в расширенный редактор палитры, нажав кнопку Настроить палитру.<p>В окне предпросмотра можно увидеть как будет выглядеть интерфейс с выбранными стилем и цветами. + <p><b><font size+=2>Внешний вид</font></b></p><hr><p>На этой вкладке можно настроить внешний вид приложений Qt.</p><p>Позволяет выбрать стиль интерфейса по умолчанию из выпадающего списка и настроить используемые стилем цвета.</p><p>Каждый стиль интерфейса, содержащийся в модулях, найденных в путях к модулям, автоматически добавляется в список встроенных стилей Qt (на вкладке Пути к библиотекам имеется более подробная информация о добавлении путей к модулям).</p><p>При выборе эффектов 3D и фоновых цветов окна программа настройки Qt автоматически создаст подходящую палитру. Для дальнейшей настройки цветов следует зайти в расширенный редактор палитры, нажав кнопку Настроить палитру.<p>В окне предпросмотра можно увидеть как будет выглядеть интерфейс с выбранными стилем и цветами. <p><b><font size+=2>Fonts</font></b></p><hr><p>Use this tab to select the default font for your Qt applications. The selected font is shown (initially as 'Sample Text') in the line edit below the Family, Style and Point Size drop down lists.</p><p>Qt has a powerful font substitution feature that allows you to specify a list of substitute fonts. Substitute fonts are used when a font cannot be loaded, or if the specified font doesn't have a particular character.<p>For example, if you select the font Lucida, which doesn't have Korean characters, but need to show some Korean text using the Mincho font family you can do so by adding Mincho to the list. Once Mincho is added, any Korean characters that are not found in the Lucida font will be taken from the Mincho font. Because the font substitutions are lists, you can also select multiple families, such as Song Ti (for use with Chinese text). - <p><b><font size+=2>Шрифты</font></b></p><hr><p>На этой вкладке можно выбрать шрифт по умолчанию для приложений Qt. Выбранный шрифт отображается в строке редактирования ниже выпадающих списков "Шрифт", "Начертание" и "Размер" (по умолчанию это текст "Текст для примера (Sample Text)").</p><p>Qt обладает мощным механизмом подмены шрифтов, который позволяет задавать список подставляемых шрифтов. Подставляемые шрифты используются, когда шрифт не удаётся загрузить или в нём отсутствуют необходимые символы.<p>Например, если требуется, чтобы при выборе шрифта Lucida, в котором отсутствуют корейские иероглифы, для отображения корейского текста использовался шрифт Mincho,то можно добавить его в список. После этого все корейские символы, отсутствующие в шрифте Lucida, будут браться из шрифта Mincho. Так как для замены используется список, то можно добавлять несколько шрифтов, например, можно также добавить шрифт Song Ti для отображения китайского текста. + <p><b><font size+=2>Шрифты</font></b></p><hr><p>На этой вкладке можно выбрать шрифт по умолчанию для приложений Qt. Выбранный шрифт отображается в строке редактирования ниже выпадающих списков "Шрифт", "Начертание" и "Размер" (по умолчанию это текст "Текст для примера (Sample Text)").</p><p>Qt обладает мощным механизмом подмены шрифтов, который позволяет задавать список подставляемых шрифтов. Подставляемые шрифты используются, когда шрифт не удаётся загрузить или в нём отсутствуют необходимые символы.<p>Например, если требуется, чтобы при выборе шрифта Lucida, в котором отсутствуют корейские иероглифы, для отображения корейского текста использовался шрифт Mincho,то можно добавить его в список. После этого все корейские символы, отсутствующие в шрифте Lucida, будут браться из шрифта Mincho. Так как для замены используется список, то можно добавлять несколько шрифтов, например, можно также добавить шрифт Song Ti для отображения китайского текста. <p><b><font size+=2>Interface</font></b></p><hr><p>Use this tab to customize the feel of your Qt applications.</p><p>If the Resolve Symlinks checkbox is checked Qt will follow symlinks when handling URLs. For example, in the file dialog, if this setting is turned on and /usr/tmp is a symlink to /var/tmp, entering the /usr/tmp directory will cause the file dialog to change to /var/tmp. With this setting turned off, symlinks are not resolved or followed.</p><p>The Global Strut setting is useful for people who require a minimum size for all widgets (e.g. when using a touch panel or for users who are visually impaired). Leaving the Global Strut width and height at 0 will disable the Global Strut feature</p><p>XIM (Extended Input Methods) are used for entering characters in languages that have large character sets, for example, Chinese and Japanese. - <p><b><font size+=2>Интерфейс</font></b></p><hr><p>На этой вкладке можно настроить поведение приложений Qt.</p><p>Если включено "Разрешать символьные ссылки", Qt будет следовать по символьным ссылкам при обработке путей URL. Например, если эта функция включена и /usr/tmp является символьной ссылкой на /var/tmp, то в диалоге выбора файла при вводе пути к каталогу /usr/tmp он будет изменён на /var/tmp.</p><p>Функция "Минимальные размеры" предназначены для тех, кому необходимо чтобы элементы интерфейса были не менее заданного размера (например, при использовании сенсорной панели или для людей с проблемами зрения). Если задать 0 в полях "минимальная ширина" и "минимальная высота", то данная функция будет отключена.</p><p>Метод ввода XIM (расширенные методы ввода) используется для ввода символов на языках с большим набором символов (например, китайском или японском). + <p><b><font size+=2>Интерфейс</font></b></p><hr><p>На этой вкладке можно настроить поведение приложений Qt.</p><p>Если включено "Разрешать символьные ссылки", Qt будет следовать по символьным ссылкам при обработке путей URL. Например, если эта функция включена и /usr/tmp является символьной ссылкой на /var/tmp, то в диалоге выбора файла при вводе пути к каталогу /usr/tmp он будет изменён на /var/tmp.</p><p>Функция "Минимальные размеры" предназначены для тех, кому необходимо чтобы элементы интерфейса были не менее заданного размера (например, при использовании сенсорной панели или для людей с проблемами зрения). Если задать 0 в полях "минимальная ширина" и "минимальная высота", то данная функция будет отключена.</p><p>Метод ввода XIM (расширенные методы ввода) используется для ввода символов на языках с большим набором символов (например, китайском или японском). <p><b><font size+=2>Printer</font></b></p><hr><p>Use this tab to configure the way Qt generates output for the printer.You can specify if Qt should try to embed fonts into its generated output.If you enable font embedding, the resulting postscript will be more portable and will more accurately reflect the visual output on the screen; however the resulting postscript file size will be bigger.<p>When using font embedding you can select additional directories where Qt should search for embeddable font files. By default, the X server font path is used. - <p><b><font size+=2>Принтер</font></b></p><hr><p>На этой вкладке можно настроить способ, которым Qt будет подготавливать данные для печати. Можно указать следует ли встраивать шрифты - в этом случае напечатанные документы будут более похожи на те, что на экране, но при этом увеличится объём данных, передаваемых на печатающее устройство.<p>При использовании встраивания шрифтов можно указать дополнительные каталоги, в которых Qt будет искать файлы шрифтов для встраивания. По умолчанию используется путь к шрифтам X сервера. + <p><b><font size+=2>Принтер</font></b></p><hr><p>На этой вкладке можно настроить способ, которым Qt будет подготавливать данные для печати. Можно указать следует ли встраивать шрифты - в этом случае напечатанные документы будут более похожи на те, что на экране, но при этом увеличится объём данных, передаваемых на печатающее устройство.<p>При использовании встраивания шрифтов можно указать дополнительные каталоги, в которых Qt будет искать файлы шрифтов для встраивания. По умолчанию используется путь к шрифтам X сервера. <p><b><font size+=2>Phonon</font></b></p><hr><p>Use this tab to configure the Phonon GStreamer multimedia backend. <p>It is reccommended to leave all settings on "Auto" to let Phonon determine your settings automatically. - <p><b><font size+=2>Phonon</font></b></p><hr><p>На этой вкладке можно настроить мультимедийную подсистему Phonon GStreamer.<p>Рекомендуется оставить значение "Автоматически" для всех настроек, чтобы Phonon определил параметры самостоятельно. + <p><b><font size+=2>Phonon</font></b></p><hr><p>На этой вкладке можно настроить мультимедийную подсистему Phonon GStreamer.<p>Рекомендуется оставить значение "Автоматически" для всех настроек, чтобы Phonon определил параметры самостоятельно. Desktop Settings (Default) @@ -36,6 +36,10 @@ + Unknown + Неизвестный + + Auto (default) Автоматически (по умолчанию) @@ -92,6 +96,10 @@ Сохранение изменений... + Saved changes. + Сохранённые изменения. + + Over The Spot @@ -124,25 +132,6 @@ Сохранить изменения настроек? - &Yes - &Да - - - &No - &Нет - - - &Cancel - От&мена - - - - MainWindowBase - - Qt Configuration - Конфигурация Qt - - Appearance Внешний вид @@ -155,26 +144,6 @@ &Стиль интерфейса: - Build Palette - Палитра - - - &3-D Effects: - Эффекты &3D: - - - Window Back&ground: - &Фон окна: - - - &Tune Palette... - &Настроить палитру... - - - Please use the KDE Control Center to set the palette. - Используйте Центр управления KDE для настройки цветов. - - Preview Предпросмотр @@ -195,6 +164,26 @@ Палитра выключенных элементов + Build Palette + Палитра + + + &Button Background: + Фон &кнопки: + + + Window Back&ground: + &Фон окна: + + + &Tune Palette... + &Настроить палитру... + + + Please use the KDE Control Center to set the palette. + Используйте Центр управления KDE для настройки цветов. + + Fonts Шрифты @@ -256,7 +245,7 @@ Feel Settings - Настройки поведения + Настройки поведения ms @@ -296,7 +285,7 @@ Alt+E - Alt+D + &Menu Effect: @@ -351,22 +340,6 @@ Стиль ввода XIM: - On The Spot - - - - Over The Spot - - - - Off The Spot - - - - Root - - - Default Input Method: Метод ввода по умолчанию: @@ -411,32 +384,16 @@ Вэб-сайт: - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://phonon.kde.org"><span style=" text-decoration: underline; color:#0000ff;">http://phonon.kde.org</span></a></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://phonon.kde.org"><span style=" text-decoration: underline; color:#0000ff;">http://phonon.kde.org</span></a></p></body></html> + <a href="http://phonon.kde.org">http://phonon.kde.org/</a> + About GStreamer О GStreamer - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://gstreamer.freedesktop.org/"><span style=" text-decoration: underline; color:#0000ff;">http://gstreamer.freedesktop.org/</span></a></p></body></html> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> -<html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://gstreamer.freedesktop.org/"><span style=" text-decoration: underline; color:#0000ff;">http://gstreamer.freedesktop.org/</span></a></p></body></html> + <a href="http://gstreamer.freedesktop.org/">http://gstreamer.freedesktop.org/</a> + GStreamer backend settings @@ -480,7 +437,7 @@ p, li { white-space: pre-wrap; } Ctrl+S - Ctrl+S + E&xit @@ -491,6 +448,10 @@ p, li { white-space: pre-wrap; } Выход + Ctrl+Q + + + &About &О программе @@ -508,16 +469,12 @@ p, li { white-space: pre-wrap; } - PaletteEditorAdvancedBase + PaletteEditorAdvanced Tune Palette Настройка палитры - <b>Edit Palette</b><p>Change the palette of the current widget or form.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p> - <b>Изменение палитры</b><p>Изменение палитры текущего виджета или формы.</p><p>Используйте сформированную палитру или выберите цвета для каждой группы цветов и каждой их роли.</p><p>Палитру можно проверить на виджетах в разных режимах отображения в разделе предпросмотра.</p> - - Select &Palette: Выбор &палитры: @@ -566,26 +523,39 @@ p, li { white-space: pre-wrap; } Текст окна - Button - Кнопка - - Base Фон + AlternateBase + Альтернативный Фон + + + + ToolTipBase + Фон подсказки + + + ToolTipText + Текст подсказки + + Text Текст - BrightText - Светлый текст + Button + Кнопка ButtonText Текст на кнопке + BrightText + Светлый текст + + Highlight Выделение @@ -594,26 +564,22 @@ p, li { white-space: pre-wrap; } Выделенный текст - &Select Color: - &Выбор цвета: + Link + Ссылка - Choose a color - Выберите цвет + LinkVisited + Посещённая ссылка - Choose a color for the selected central color role. - Выберите цвет для указанной роли. + &Select Color: + &Выбор цвета: 3-D shadow &effects Эффекты т&рехмерной тени - Build &from button color - Получ&ить из цвета кнопки - - Generate shadings Создание полутонов @@ -622,6 +588,10 @@ p, li { white-space: pre-wrap; } Создать цвета эффекта трёхмерности из цвета кнопки. + Build &from button color + Получ&ить из цвета кнопки + + Choose 3D-effect color role Выбор роли цвета дял эффекта трёхмерности @@ -654,24 +624,16 @@ p, li { white-space: pre-wrap; } Выбор &цвета: - Choose a color for the selected effect color role. - Выбор цвета для указанной роли. - - - OK - Принять - - - Close dialog and apply all changes. - Закрыть окно с применением изменений. + Choose a color + Выберите цвет - Cancel - Отмена + Choose a color for the selected central color role. + Выберите цвет для указанной роли. - Close dialog and discard all changes. - Закрыть окно с отменой изменений. + Choose a color for the selected effect color role. + Выбор цвета для указанной роли. @@ -682,64 +644,55 @@ p, li { white-space: pre-wrap; } - PreviewWidgetBase + PreviewWidget Preview Window Окно предпросмотра - ButtonGroup - ButtonGroup + GroupBox + Объединение RadioButton1 - RadioButton1 + Переключатель1 RadioButton2 - RadioButton2 + Переключатель2 RadioButton3 - RadioButton3 + Переключатель3 - ButtonGroup2 - ButtonGroup2 + GroupBox2 + Объединение2 CheckBox1 - CheckBox1 + Выключатель1 CheckBox2 - CheckBox2 + Выключатель2 LineEdit - LineEdit + Строка редактирования ComboBox - ComboBox + Выпадающий список PushButton - PushButton - - - <p> -<a href="http://qt.nokia.com">http://qt.nokia.com</a> -</p> -<p> -<a href="http://www.kde.org">http://www.kde.org</a> -</p> - <p> -<a href="http://qt.nokia.com">http://qt.nokia.com</a> -</p> -<p> -<a href="http://www.kde.org">http://www.kde.org</a> -</p> + Простая кнопка + + + <p><a href="http://qt.nokia.com">http://qt.nokia.com</a></p> +<p><a href="http://www.kde.org">http://www.kde.org</a></p> + -- cgit v0.12 From b90a0139a4f63c730bb4668e04ab3f8c81ead04f Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 15 Aug 2011 15:26:28 +0200 Subject: examples: fix compilation with namespaced Qt. --- examples/webkit/simplewebplugin/csvfactory.h | 2 ++ examples/webkit/simplewebplugin/csvview.h | 2 ++ examples/webkit/webftpclient/downloader.h | 2 ++ examples/webkit/webftpclient/ftpreply.h | 3 +-- examples/webkit/webftpclient/ftpview.h | 1 - examples/webkit/webplugin/csvfactory.h | 2 ++ examples/webkit/webplugin/csvview.h | 2 ++ examples/widgets/orientation/mainwindow.h | 4 +--- 8 files changed, 12 insertions(+), 6 deletions(-) diff --git a/examples/webkit/simplewebplugin/csvfactory.h b/examples/webkit/simplewebplugin/csvfactory.h index 0b046c5..e3013b1 100644 --- a/examples/webkit/simplewebplugin/csvfactory.h +++ b/examples/webkit/simplewebplugin/csvfactory.h @@ -44,8 +44,10 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE //! [plugin factory] class CSVFactory : public QWebPluginFactory diff --git a/examples/webkit/simplewebplugin/csvview.h b/examples/webkit/simplewebplugin/csvview.h index 0a136f3..f457d0a 100644 --- a/examples/webkit/simplewebplugin/csvview.h +++ b/examples/webkit/simplewebplugin/csvview.h @@ -46,8 +46,10 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE //! [definition] class CSVView : public QTableView diff --git a/examples/webkit/webftpclient/downloader.h b/examples/webkit/webftpclient/downloader.h index 8201cea..dd2f8ec 100644 --- a/examples/webkit/webftpclient/downloader.h +++ b/examples/webkit/webftpclient/downloader.h @@ -46,10 +46,12 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkRequest; class QNetworkReply; class QWidget; +QT_END_NAMESPACE class Downloader : public QObject { diff --git a/examples/webkit/webftpclient/ftpreply.h b/examples/webkit/webftpclient/ftpreply.h index becd4e4..ca0a271 100644 --- a/examples/webkit/webftpclient/ftpreply.h +++ b/examples/webkit/webftpclient/ftpreply.h @@ -44,8 +44,7 @@ #include #include #include - -class QFtp; +#include //! [class definition] class FtpReply : public QNetworkReply diff --git a/examples/webkit/webftpclient/ftpview.h b/examples/webkit/webftpclient/ftpview.h index 2538812..544c0a9 100644 --- a/examples/webkit/webftpclient/ftpview.h +++ b/examples/webkit/webftpclient/ftpview.h @@ -41,7 +41,6 @@ #include class Downloader; -class QNetworkAccessManager; class FtpView : public QWebView { diff --git a/examples/webkit/webplugin/csvfactory.h b/examples/webkit/webplugin/csvfactory.h index 5a44c50..d1d6b9c 100644 --- a/examples/webkit/webplugin/csvfactory.h +++ b/examples/webkit/webplugin/csvfactory.h @@ -44,8 +44,10 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE class QWebView; class CSVFactory : public QWebPluginFactory diff --git a/examples/webkit/webplugin/csvview.h b/examples/webkit/webplugin/csvview.h index bf8918b..4cbb069 100644 --- a/examples/webkit/webplugin/csvview.h +++ b/examples/webkit/webplugin/csvview.h @@ -46,8 +46,10 @@ #include #include +QT_BEGIN_NAMESPACE class QNetworkAccessManager; class QNetworkReply; +QT_END_NAMESPACE class QWebFrame; //! [definition] diff --git a/examples/widgets/orientation/mainwindow.h b/examples/widgets/orientation/mainwindow.h index 400a6a5..745497c 100644 --- a/examples/widgets/orientation/mainwindow.h +++ b/examples/widgets/orientation/mainwindow.h @@ -41,13 +41,11 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include +#include #include "ui_landscape.h" #include "ui_portrait.h" -class QAbstractButton; - //! [0] class MainWindow : public QWidget { -- cgit v0.12 From 1bea92a96e3007667d23058be03b75cef315608b Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Tue, 19 Jul 2011 18:36:05 +0200 Subject: Add support for rawFonts loaded from data in FaceId The problem was that with an empty filename and index of 0, all raw fonts loaded from data had the same FaceId, and we wouldn't bother to load another one after doing this once. This commit introduces a uuid in FaceId to help distinguish them in that case. Change-Id: I93655ff07a7d8856af1f854024e207c519f8ed1a Reviewed-on: http://codereview.qt.nokia.com/1882 Reviewed-by: Qt Sanity Bot Reviewed-by: Jiang Jiang --- src/gui/text/qfontengine_p.h | 3 ++- src/gui/text/qrawfont_ft.cpp | 2 ++ tests/auto/qrawfont/tst_qrawfont.cpp | 25 ++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index a70aec1..8d81acb 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -155,6 +155,7 @@ public: struct FaceId { FaceId() : index(0), encoding(0) {} QByteArray filename; + QByteArray uuid; int index; int encoding; }; @@ -295,7 +296,7 @@ inline bool operator ==(const QFontEngine::FaceId &f1, const QFontEngine::FaceId inline uint qHash(const QFontEngine::FaceId &f) { - return qHash((f.index << 16) + f.encoding) + qHash(f.filename); + return qHash((f.index << 16) + f.encoding) + qHash(f.filename + f.uuid); } diff --git a/src/gui/text/qrawfont_ft.cpp b/src/gui/text/qrawfont_ft.cpp index 5bba221..1666df3 100644 --- a/src/gui/text/qrawfont_ft.cpp +++ b/src/gui/text/qrawfont_ft.cpp @@ -45,6 +45,7 @@ #include "qrawfont_p.h" #include "qfontengine_ft_p.h" +#include "quuid.h" #if defined(Q_WS_X11) && !defined(QT_NO_FONTCONFIG) # include "qfontengine_x11_p.h" @@ -87,6 +88,7 @@ public: FaceId faceId; faceId.filename = ""; faceId.index = 0; + faceId.uuid = QUuid::createUuid().toByteArray(); return init(faceId, true, Format_None, fontData); } diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp index e0680c4..eb78057 100644 --- a/tests/auto/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/qrawfont/tst_qrawfont.cpp @@ -47,7 +47,6 @@ class tst_QRawFont: public QObject { Q_OBJECT - #if !defined(QT_NO_RAWFONT) private slots: void invalidRawFont(); @@ -94,6 +93,11 @@ private slots: void rawFontSetPixelSize_data(); void rawFontSetPixelSize(); + +#if defined(Q_WS_X11) || defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) + void multipleRawFontsFromData(); +#endif + #endif // QT_NO_RAWFONT }; @@ -843,6 +847,25 @@ void tst_QRawFont::rawFontSetPixelSize() QCOMPARE(rawFont.pixelSize(), 24.0); } +#if defined(Q_WS_X11) || defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) +void tst_QRawFont::multipleRawFontsFromData() +{ + QFile file(QString::fromLatin1(SRCDIR "testfont.ttf")); + QRawFont testFont; + if (file.open(QIODevice::ReadOnly)) { + testFont.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting); + file.close(); + } + file.setFileName(QLatin1String(SRCDIR "testfont_bold_italic.ttf")); + QRawFont testFontBoldItalic; + if (file.open(QIODevice::ReadOnly)) + testFontBoldItalic.loadFromData(file.readAll(), 11, QFont::PreferDefaultHinting); + + QVERIFY(testFont.familyName() != (testFontBoldItalic.familyName()) + || testFont.styleName() != (testFontBoldItalic.styleName())); +} +#endif + #endif // QT_NO_RAWFONT QTEST_MAIN(tst_QRawFont) -- cgit v0.12 From fef1ae94b31762cd97ad76f2c5a45e9259ef1c6c Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Tue, 16 Aug 2011 13:46:44 +0200 Subject: Change spacing of title in offline style. Reviewed-by: Daniel Molkentin --- doc/src/template/style/offline.css | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css index 44abb3c..d33d8e7 100644 --- a/doc/src/template/style/offline.css +++ b/doc/src/template/style/offline.css @@ -74,8 +74,7 @@ body { - margin-left: 0.5em; - margin-right: 0.5em; + margin: 0px; font-family: sans-serif; line-height: normal } @@ -238,7 +237,9 @@ .header .content { - margin-bottom: 0.5em + margin-left: 5px; + margin-top: 5px; + margin-bottom: 0.5em; } .header .breadcrumb @@ -413,6 +414,11 @@ .flowList dd a{ } + .mainContent + { + padding-left:5px; + } + .content .flowList p{ padding:0px; } -- cgit v0.12 From 182b10dbad23e9da310c0d600095f17c41dd0d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 15 Aug 2011 18:26:08 +0200 Subject: Fix build with the Clang compiler http://llvm.org/bugs/show_bug.cgi?id=10338 Reviewed-by: Marius Storm-Olsen --- src/gui/image/qpnghandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index f7d07a5..812c450 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -420,7 +420,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader() return false; } - if (setjmp(png_jmpbuf(png_ptr))) { + if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); png_ptr = 0; return false; @@ -449,7 +449,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage) } row_pointers = 0; - if (setjmp(png_jmpbuf(png_ptr))) { + if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); delete [] row_pointers; png_ptr = 0; @@ -723,7 +723,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, in return false; } - if (setjmp(png_jmpbuf(png_ptr))) { + if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { png_destroy_write_struct(&png_ptr, &info_ptr); return false; } -- cgit v0.12 From 81f0c44f6a4fd4cfa41af5d5b292008185bf3981 Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Fri, 12 Aug 2011 20:22:30 +0200 Subject: Replace 'i < len-1 && func(i+1)' by 'i+1 < len && func(i+1)' Merge-request: 1299 Reviewed-by: Oswald Buddenhagen --- demos/gradients/gradients.cpp | 2 +- qmake/generators/makefiledeps.cpp | 2 +- src/corelib/io/qdir.cpp | 6 +++--- src/gui/painting/qpaintengine_raster.cpp | 4 ++-- src/gui/painting/qpaintengine_x11.cpp | 2 +- src/gui/painting/qtessellator.cpp | 2 +- src/gui/widgets/qtabbar.cpp | 2 +- src/qt3support/itemviews/q3listbox.cpp | 6 +++--- src/qt3support/sql/q3datatable.cpp | 2 +- src/qt3support/text/q3richtext.cpp | 2 +- src/scripttools/debugging/qscriptcompletiontask.cpp | 2 +- src/scripttools/debugging/qscriptdebuggercodeview.cpp | 2 +- src/sql/kernel/qsqlresult.cpp | 4 ++-- src/tools/moc/moc.cpp | 4 ++-- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/demos/gradients/gradients.cpp b/demos/gradients/gradients.cpp index d8b739b..338d8eb 100644 --- a/demos/gradients/gradients.cpp +++ b/demos/gradients/gradients.cpp @@ -219,7 +219,7 @@ void GradientEditor::pointsUpdated() for (int i=0; icolorAt(int(x))) >> 16, (0x0000ff00 & m_green_shade->colorAt(int(x))) >> 8, diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index d6dab0b..f9cbed1 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -499,7 +499,7 @@ bool QMakeSourceFileInfo::findDeps(SourceFile *file) } else if(*(buffer+x) == '*') { //c style comment for(++x; x < buffer_len; ++x) { if(*(buffer+x) == '*') { - if(x < buffer_len-1 && *(buffer + (x+1)) == '/') { + if(x+1 < buffer_len && *(buffer + (x+1)) == '/') { ++x; break; } diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index f9196e0..3db3dfc 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -2004,7 +2004,7 @@ QString QDir::cleanPath(const QString &path) const QChar *p = name.unicode(); for (int i = 0, last = -1, iwrite = 0; i < len; ++i) { if (p[i] == QLatin1Char('/')) { - while (i < len-1 && p[i+1] == QLatin1Char('/')) { + while (i+1 < len && p[i+1] == QLatin1Char('/')) { #if defined(Q_OS_WIN) && !defined(Q_OS_WINCE) //allow unc paths if (!i) break; @@ -2012,9 +2012,9 @@ QString QDir::cleanPath(const QString &path) i++; } bool eaten = false; - if (i < len - 1 && p[i+1] == QLatin1Char('.')) { + if (i+1 < len && p[i+1] == QLatin1Char('.')) { int dotcount = 1; - if (i < len - 2 && p[i+2] == QLatin1Char('.')) + if (i+2 < len && p[i+2] == QLatin1Char('.')) dotcount++; if (i == len - dotcount - 1) { if (dotcount == 1) { diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 76d7316..b4b55de 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3552,7 +3552,7 @@ void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSp spans[n].y = y; spans[n].coverage = 255; int len = 1; - while (src_x < w-1 && src[(src_x+1) >> 3] & (0x1 << ((src_x+1) & 7))) { + while (src_x+1 < w && src[(src_x+1) >> 3] & (0x1 << ((src_x+1) & 7))) { ++src_x; ++len; } @@ -3578,7 +3578,7 @@ void QRasterPaintEngine::drawBitmap(const QPointF &pos, const QImage &image, QSp spans[n].y = y; spans[n].coverage = 255; int len = 1; - while (src_x < w-1 && src[(src_x+1) >> 3] & (0x80 >> ((src_x+1) & 7))) { + while (src_x+1 < w && src[(src_x+1) >> 3] & (0x80 >> ((src_x+1) & 7))) { ++src_x; ++len; } diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp index 147d2ec..17d141c 100644 --- a/src/gui/painting/qpaintengine_x11.cpp +++ b/src/gui/painting/qpaintengine_x11.cpp @@ -2333,7 +2333,7 @@ static QPainterPath path_for_glyphs(const QVarLengthArray &glyphs, bool set = src[x >> 3] & (0x80 >> (x & 7)); if (set) { QRect r(xp + x, yp - h, 1, 1); - while (x < glyph->width-1 && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) { + while (x+1 < glyph->width && src[(x+1) >> 3] & (0x80 >> ((x+1) & 7))) { ++x; r.setRight(r.right()+1); } diff --git a/src/gui/painting/qtessellator.cpp b/src/gui/painting/qtessellator.cpp index c469438..94a5128 100644 --- a/src/gui/painting/qtessellator.cpp +++ b/src/gui/painting/qtessellator.cpp @@ -893,7 +893,7 @@ void QTessellatorPrivate::processIntersections() QDEBUG() << " adding edge on left"; --min; } - while (max < scanline.size - 1 && scanline.edges[max + 1]->positionAt(y) <= xmax) { + while (max + 1 < scanline.size && scanline.edges[max + 1]->positionAt(y) <= xmax) { QDEBUG() << " adding edge on right"; ++max; } diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp index 16e4aad..8faf156 100644 --- a/src/gui/widgets/qtabbar.cpp +++ b/src/gui/widgets/qtabbar.cpp @@ -171,7 +171,7 @@ void QTabBar::initStyleOption(QStyleOptionTab *option, int tabIndex) const if (tabIndex > 0 && tabIndex - 1 == d->currentIndex) option->selectedPosition = QStyleOptionTab::PreviousIsSelected; - else if (tabIndex < totalTabs - 1 && tabIndex + 1 == d->currentIndex) + else if (tabIndex + 1 < totalTabs && tabIndex + 1 == d->currentIndex) option->selectedPosition = QStyleOptionTab::NextIsSelected; else option->selectedPosition = QStyleOptionTab::NotAdjacent; diff --git a/src/qt3support/itemviews/q3listbox.cpp b/src/qt3support/itemviews/q3listbox.cpp index 796a3b8..f1574df 100644 --- a/src/qt3support/itemviews/q3listbox.cpp +++ b/src/qt3support/itemviews/q3listbox.cpp @@ -3531,9 +3531,9 @@ void Q3ListBox::refreshSlot() int col = columnAt(x); int row = rowAt(y); int top = row; - while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x) + while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x) col++; - while(top < (int)d->rowPos.size()-1 && d->rowPos[top+1] < y) + while(top+1 < (int)d->rowPos.size() && d->rowPos[top+1] < y) top++; Q3ListBoxItem * i = item(col * numRows() + row); @@ -3684,7 +3684,7 @@ int Q3ListBox::columnAt(int x) const return numColumns() - 1; int col = 0; - while(col < (int)d->columnPos.size()-1 && d->columnPos[col+1] < x) + while(col+1 < (int)d->columnPos.size() && d->columnPos[col+1] < x) col++; return col; } diff --git a/src/qt3support/sql/q3datatable.cpp b/src/qt3support/sql/q3datatable.cpp index 39ef1d9..35e9fda 100644 --- a/src/qt3support/sql/q3datatable.cpp +++ b/src/qt3support/sql/q3datatable.cpp @@ -710,7 +710,7 @@ bool Q3DataTable::eventFilter( QObject *o, QEvent *e ) return true; } if ( d->dat.mode() != QSql::None ) { - if ( (ke->key() == Qt::Key_Tab) && (c < numCols() - 1) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) ) + if ( (ke->key() == Qt::Key_Tab) && (c+1 < numCols()) && (!isColumnReadOnly( c+1 ) || d->dat.mode() == QSql::Insert) ) d->continuousEdit = true; else if ( (ke->key() == Qt::Key_BackTab) && (c > 0) && (!isColumnReadOnly( c-1 ) || d->dat.mode() == QSql::Insert) ) d->continuousEdit = true; diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index dc1476c..c367c0c 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -121,7 +121,7 @@ static inline bool isBreakable(Q3TextString *string, int pos) { if (string->at(pos).nobreak) return false; - return (pos < string->length()-1 && string->at(pos+1).softBreak); + return (pos+1 < string->length() && string->at(pos+1).softBreak); } // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/src/scripttools/debugging/qscriptcompletiontask.cpp b/src/scripttools/debugging/qscriptcompletiontask.cpp index fb250b7..3c94a21 100644 --- a/src/scripttools/debugging/qscriptcompletiontask.cpp +++ b/src/scripttools/debugging/qscriptcompletiontask.cpp @@ -172,7 +172,7 @@ void QScriptCompletionTaskPrivate::completeScriptExpression() while ((pos > 0) && isIdentChar(contents.at(pos-1))) --pos; int pos2 = cursorPosition - 1; - while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) + while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) ++pos2; QString ident = contents.mid(pos, pos2 - pos + 1); position = pos; diff --git a/src/scripttools/debugging/qscriptdebuggercodeview.cpp b/src/scripttools/debugging/qscriptdebuggercodeview.cpp index 7c99723..65fd366 100644 --- a/src/scripttools/debugging/qscriptdebuggercodeview.cpp +++ b/src/scripttools/debugging/qscriptdebuggercodeview.cpp @@ -233,7 +233,7 @@ bool QScriptDebuggerCodeView::event(QEvent *e) return false; } int pos2 = linePosition - 1; - while ((pos2 < contents.size()-1) && isIdentChar(contents.at(pos2+1))) + while ((pos2+1 < contents.size()) && isIdentChar(contents.at(pos2+1))) ++pos2; QString ident = contents.mid(pos, pos2 - pos + 1); diff --git a/src/sql/kernel/qsqlresult.cpp b/src/sql/kernel/qsqlresult.cpp index f2b2ccf..71a81c0 100644 --- a/src/sql/kernel/qsqlresult.cpp +++ b/src/sql/kernel/qsqlresult.cpp @@ -183,7 +183,7 @@ QString QSqlResultPrivate::namedToPositionalBinding() QChar ch = sql.at(i); if (ch == QLatin1Char(':') && !inQuote && (i == 0 || sql.at(i - 1) != QLatin1Char(':')) - && (i < n - 1 && qIsAlnum(sql.at(i + 1)))) { + && (i + 1 < n && qIsAlnum(sql.at(i + 1)))) { int pos = i + 2; while (pos < n && qIsAlnum(sql.at(pos))) ++pos; @@ -618,7 +618,7 @@ bool QSqlResult::prepare(const QString& query) QChar ch = query.at(i); if (ch == QLatin1Char(':') && !inQuote && (i == 0 || query.at(i - 1) != QLatin1Char(':')) - && (i < n - 1 && qIsAlnum(query.at(i + 1)))) { + && (i + 1 < n && qIsAlnum(query.at(i + 1)))) { int pos = i + 2; while (pos < n && qIsAlnum(query.at(pos))) ++pos; diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 13f57f5..9309db1 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -216,8 +216,8 @@ Type Moc::parseType() QByteArray templ = lexemUntil(RANGLE); for (int i = 0; i < templ.size(); ++i) { type.name += templ.at(i); - if ((templ.at(i) == '<' && i < templ.size()-1 && templ.at(i+1) == ':') - || (templ.at(i) == '>' && i < templ.size()-1 && templ.at(i+1) == '>')) { + if ((templ.at(i) == '<' && i+1 < templ.size() && templ.at(i+1) == ':') + || (templ.at(i) == '>' && i+1 < templ.size() && templ.at(i+1) == '>')) { type.name += ' '; } } -- cgit v0.12 From 9db6959f8893a64146124db0cfafbcb154a9e105 Mon Sep 17 00:00:00 2001 From: Styopa Semenukha Date: Fri, 12 Aug 2011 21:19:26 +0200 Subject: Added missing no_include_pwd check Merge-request: 2619 Reviewed-by: ossi --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 00f6b4a..eda489f 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -784,7 +784,7 @@ MakefileGenerator::init() (*it) = Option::fixPathToLocalOS((*it)); } - { //get the output_dir into the pwd + if(!project->isActiveConfig("no_include_pwd")) { //get the output_dir into the pwd if(Option::output_dir != qmake_getpwd()) project->values("INCLUDEPATH").append("."); } -- cgit v0.12 From 7ca3a7e431e53250446c1b3f95db344e6b183f89 Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 18 Aug 2011 13:33:03 +0200 Subject: qdoc3: Updates for QTBUG-20776; clear map between runs. Task-number: QTBUG-20776 --- tools/qdoc3/htmlgenerator.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index c0a32d8..9846eb9 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4409,6 +4409,7 @@ void HtmlGenerator::generateManifestFiles() { generateManifestFile("examples", "example"); generateManifestFile("demos", "demo"); + ExampleNode::exampleNodeMap.clear(); } /*! @@ -4428,6 +4429,25 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) if (manifest == "demos") demos = true; + bool proceed = false; + ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); + while (i != ExampleNode::exampleNodeMap.end()) { + const ExampleNode* en = i.value(); + if (demos) { + if (en->name().startsWith("demos")) { + proceed = true; + break; + } + } + else if (!en->name().startsWith("demos")) { + proceed = true; + break; + } + ++i; + } + if (!proceed) + return; + QXmlStreamWriter writer(&file); writer.setAutoFormatting(true); writer.writeStartDocument(); @@ -4435,7 +4455,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) writer.writeAttribute("module", project); writer.writeStartElement(manifest); - ExampleNodeMap::Iterator i = ExampleNode::exampleNodeMap.begin(); + i = ExampleNode::exampleNodeMap.begin(); while (i != ExampleNode::exampleNodeMap.end()) { const ExampleNode* en = i.value(); if (demos) { -- cgit v0.12 From bb4eea4f9d7dc66c87374dea3cdd5fcfd1b68bad Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Thu, 18 Aug 2011 15:18:38 +0200 Subject: qdoc3: Updates for QTBUG-20776; include fileToOpen path. Task-number: QTBUG-20776 --- tools/qdoc3/htmlgenerator.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 9846eb9..e79e180 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -4532,7 +4532,9 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) if (baseName.toLower() == ename) { if (!usedNames.contains(fileName)) { writer.writeStartElement("fileToOpen"); - writer.writeCharacters(fileName); + if (file.startsWith("demos/")) + file = file.mid(6); + writer.writeCharacters(file); writer.writeEndElement(); // fileToOpen usedNames.insert(fileName); } @@ -4541,7 +4543,9 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) fileName.toLower().endsWith("main.qml")) { if (!usedNames.contains(fileName)) { writer.writeStartElement("fileToOpen"); - writer.writeCharacters(fileName); + if (file.startsWith("demos/")) + file = file.mid(6); + writer.writeCharacters(file); writer.writeEndElement(); // fileToOpen usedNames.insert(fileName); } -- cgit v0.12 From 5ce63a6ba3f5605967b17adcf64f17ecdc875e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 18 Aug 2011 15:55:58 +0200 Subject: Revert "Fix build with the Clang compiler" This reverts commit 182b10dbad23e9da310c0d600095f17c41dd0d3c. --- src/gui/image/qpnghandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 812c450..f7d07a5 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -420,7 +420,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader() return false; } - if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); png_ptr = 0; return false; @@ -449,7 +449,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage) } row_pointers = 0; - if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); delete [] row_pointers; png_ptr = 0; @@ -723,7 +723,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPNGImageWriter::writeImage(const QImage& image, in return false; } - if (setjmp((*png_set_longjmp_fn((png_ptr), (png_longjmp_ptr)longjmp, sizeof(jmp_buf))))) { + if (setjmp(png_jmpbuf(png_ptr))) { png_destroy_write_struct(&png_ptr, &info_ptr); return false; } -- cgit v0.12 From 867f3a9860382380adca117a1f0e83f3d319f9f4 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Fri, 19 Aug 2011 10:02:17 +0200 Subject: Fix a typo in qt-conf docs. Fixes: QTWEBSITE-272 Reviewed-By: Trust Me --- doc/src/deployment/qt-conf.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/deployment/qt-conf.qdoc b/doc/src/deployment/qt-conf.qdoc index 2f68f3d..5204cc6 100644 --- a/doc/src/deployment/qt-conf.qdoc +++ b/doc/src/deployment/qt-conf.qdoc @@ -48,7 +48,7 @@ \o \c :/qt/etc/qt.conf using the resource system - \o on Mac OS X, in the Resource directory inside the appliction + \o on Mac OS X, in the Resource directory inside the application bundle, for example \c assistant.app/Contents/Resources/qt.conf \o in the directory containing the application executable, i.e. -- cgit v0.12 From ccf3b9e48b2d773999a9a88e249f79380618cde6 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 19 Aug 2011 15:52:10 +0200 Subject: Make the DBus timeout configurable in QDBusAbstractInterface. Merge-request: 1253 Reviewed-by: thiago --- src/dbus/qdbusabstractinterface.cpp | 31 +++++++- src/dbus/qdbusabstractinterface.h | 3 + src/dbus/qdbusabstractinterface_p.h | 1 + .../com.trolltech.QtDBus.Pinger.xml | 4 + tests/auto/qdbusabstractinterface/interface.cpp | 14 ++++ tests/auto/qdbusabstractinterface/interface.h | 1 + tests/auto/qdbusabstractinterface/pinger.h | 7 ++ .../tst_qdbusabstractinterface.cpp | 92 ++++++++++++++++++++++ 8 files changed, 149 insertions(+), 4 deletions(-) diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp index 187ad67..9f68313 100644 --- a/src/dbus/qdbusabstractinterface.cpp +++ b/src/dbus/qdbusabstractinterface.cpp @@ -88,6 +88,7 @@ QDBusAbstractInterfacePrivate::QDBusAbstractInterfacePrivate(const QString &serv : connection(con), service(serv), path(p), interface(iface), lastError(checkIfValid(serv, p, iface, isDynamic, (connectionPrivate() && connectionPrivate()->mode == QDBusConnectionPrivate::PeerMode))), + timeout(-1), isValid(!lastError.isValid()) { if (!isValid) @@ -144,7 +145,7 @@ void QDBusAbstractInterfacePrivate::property(const QMetaProperty &mp, QVariant & QLatin1String("Get")); QDBusMessagePrivate::setParametersValidated(msg, true); msg << interface << QString::fromUtf8(mp.name()); - QDBusMessage reply = connection.call(msg, QDBus::Block); + QDBusMessage reply = connection.call(msg, QDBus::Block, timeout); if (reply.type() != QDBusMessage::ReplyMessage) { lastError = reply; @@ -210,7 +211,7 @@ bool QDBusAbstractInterfacePrivate::setProperty(const QMetaProperty &mp, const Q QLatin1String("Set")); QDBusMessagePrivate::setParametersValidated(msg, true); msg << interface << QString::fromUtf8(mp.name()) << QVariant::fromValue(QDBusVariant(value)); - QDBusMessage reply = connection.call(msg, QDBus::Block); + QDBusMessage reply = connection.call(msg, QDBus::Block, timeout); if (reply.type() != QDBusMessage::ReplyMessage) { lastError = reply; @@ -384,6 +385,28 @@ QDBusError QDBusAbstractInterface::lastError() const } /*! + Sets the timeout in seconds for all future DBus calls to \a timeout. + -1 means the default DBus timeout (usually 25 seconds). + + \since 4.8 +*/ +void QDBusAbstractInterface::setTimeout(int timeout) +{ + d_func()->timeout = timeout; +} + +/*! + Returns the current value of the timeout in seconds. + -1 means the default DBus timeout (usually 25 seconds). + + \since 4.8 +*/ +int QDBusAbstractInterface::timeout() const +{ + return d_func()->timeout; +} + +/*! Places a call to the remote method specified by \a method on this interface, using \a args as arguments. This function returns the message that was received as a reply, which can be a normal QDBusMessage::ReplyMessage (indicating success) or QDBusMessage::ErrorMessage (if the call @@ -442,7 +465,7 @@ QDBusMessage QDBusAbstractInterface::callWithArgumentList(QDBus::CallMode mode, QDBusMessagePrivate::setParametersValidated(msg, true); msg.setArguments(args); - QDBusMessage reply = d->connection.call(msg, mode); + QDBusMessage reply = d->connection.call(msg, mode, d->timeout); if (thread() == QThread::currentThread()) d->lastError = reply; // will clear if reply isn't an error @@ -475,7 +498,7 @@ QDBusPendingCall QDBusAbstractInterface::asyncCallWithArgumentList(const QString QDBusMessage msg = QDBusMessage::createMethodCall(service(), path(), interface(), method); QDBusMessagePrivate::setParametersValidated(msg, true); msg.setArguments(args); - return d->connection.asyncCall(msg); + return d->connection.asyncCall(msg, d->timeout); } /*! diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h index 72b922e..34ff410 100644 --- a/src/dbus/qdbusabstractinterface.h +++ b/src/dbus/qdbusabstractinterface.h @@ -95,6 +95,9 @@ public: QDBusError lastError() const; + void setTimeout(int timeout); + int timeout() const; + QDBusMessage call(const QString &method, const QVariant &arg1 = QVariant(), const QVariant &arg2 = QVariant(), diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h index a000daf..4f96165 100644 --- a/src/dbus/qdbusabstractinterface_p.h +++ b/src/dbus/qdbusabstractinterface_p.h @@ -77,6 +77,7 @@ public: QString path; QString interface; mutable QDBusError lastError; + int timeout; // this is set during creation and never changed // it can't be const because QDBusInterfacePrivate has one more check diff --git a/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml b/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml index 1667591..d945ec9 100644 --- a/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml +++ b/tests/auto/qdbusabstractinterface/com.trolltech.QtDBus.Pinger.xml @@ -15,6 +15,10 @@ + + + + diff --git a/tests/auto/qdbusabstractinterface/interface.cpp b/tests/auto/qdbusabstractinterface/interface.cpp index 0326177..849db93 100644 --- a/tests/auto/qdbusabstractinterface/interface.cpp +++ b/tests/auto/qdbusabstractinterface/interface.cpp @@ -40,9 +40,23 @@ ****************************************************************************/ #include "interface.h" +#include Interface::Interface() { } +// Export the sleep function +// TODO QT5: remove this class, QThread::msleep is now public +class FriendlySleepyThread : public QThread { +public: + using QThread::msleep; +}; + +int Interface::sleepMethod(int msec) +{ + FriendlySleepyThread::msleep(msec); + return 42; +} + #include "moc_interface.cpp" diff --git a/tests/auto/qdbusabstractinterface/interface.h b/tests/auto/qdbusabstractinterface/interface.h index b840a38..0fb15fe 100644 --- a/tests/auto/qdbusabstractinterface/interface.h +++ b/tests/auto/qdbusabstractinterface/interface.h @@ -101,6 +101,7 @@ public: public slots: Q_SCRIPTABLE void voidMethod() {} + Q_SCRIPTABLE int sleepMethod(int); Q_SCRIPTABLE QString stringMethod() { return "Hello, world"; } Q_SCRIPTABLE RegisteredType complexMethod() { return RegisteredType("Hello, world"); } Q_SCRIPTABLE QString multiOutMethod(int &value) { value = 42; return "Hello, world"; } diff --git a/tests/auto/qdbusabstractinterface/pinger.h b/tests/auto/qdbusabstractinterface/pinger.h index 6245a5a..739a142 100644 --- a/tests/auto/qdbusabstractinterface/pinger.h +++ b/tests/auto/qdbusabstractinterface/pinger.h @@ -117,6 +117,13 @@ public Q_SLOTS: // METHODS return reply; } + inline QDBusPendingReply sleepMethod(int in0) + { + QList argumentList; + argumentList << qVariantFromValue(in0); + return asyncCallWithArgumentList(QLatin1String("sleepMethod"), argumentList); + } + inline QDBusPendingReply stringMethod() { QList argumentList; diff --git a/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp b/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp index 00e3a76..994df05 100644 --- a/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp +++ b/tests/auto/qdbusabstractinterface/tst_qdbusabstractinterface.cpp @@ -111,6 +111,8 @@ private slots: void makeAsyncComplexCallPeer(); void makeAsyncMultiOutCallPeer(); + void callWithTimeout(); + void stringPropRead(); void stringPropWrite(); void variantPropRead(); @@ -458,6 +460,96 @@ void tst_QDBusAbstractInterface::makeAsyncMultiOutCallPeer() QCoreApplication::instance()->processEvents(); } +static const char server_serviceName[] = "com.trolltech.autotests.dbusserver"; +static const char server_objectPath[] = "/com/trolltech/server"; +static const char server_interfaceName[] = "com.trolltech.QtDBus.Pinger"; + +class DBusServerThread : public QThread +{ +public: + DBusServerThread() { + start(); + m_ready.acquire(); + } + ~DBusServerThread() { + quit(); + wait(); + } + + void run() + { + QDBusConnection con = QDBusConnection::connectToBus(QDBusConnection::SessionBus, "ThreadConnection"); + if (!con.isConnected()) + qWarning("Error registering to DBus"); + if (!con.registerService(server_serviceName)) + qWarning("Error registering service name"); + Interface targetObj; + con.registerObject(server_objectPath, &targetObj, QDBusConnection::ExportScriptableContents); + m_ready.release(); + exec(); + + QDBusConnection::disconnectFromBus( con.name() ); + } +private: + QSemaphore m_ready; +}; + +void tst_QDBusAbstractInterface::callWithTimeout() +{ + QDBusConnection con = QDBusConnection::sessionBus(); + QVERIFY2(con.isConnected(), "Not connected to D-Bus"); + + DBusServerThread serverThread; + + QDBusMessage msg = QDBusMessage::createMethodCall(server_serviceName, + server_objectPath, server_interfaceName, "sleepMethod"); + msg << 100; + + { + // Call with no timeout -> works + QDBusMessage reply = con.call(msg); + QCOMPARE((int)reply.type(), (int)QDBusMessage::ReplyMessage); + QCOMPARE(reply.arguments().at(0).toInt(), 42); + } + + { + // Call with 1 sec timeout -> fails + QDBusMessage reply = con.call(msg, QDBus::Block, 1); + QCOMPARE(reply.type(), QDBusMessage::ErrorMessage); + } + + // Now using QDBusInterface + + QDBusInterface iface(server_serviceName, server_objectPath, server_interfaceName, con); + { + // Call with no timeout + QDBusMessage reply = iface.call("sleepMethod", 100); + QCOMPARE(reply.type(), QDBusMessage::ReplyMessage); + QCOMPARE(reply.arguments().at(0).toInt(), 42); + } + { + // Call with 1 sec timeout -> fails + iface.setTimeout(1); + QDBusMessage reply = iface.call("sleepMethod", 100); + QCOMPARE(reply.type(), QDBusMessage::ErrorMessage); + } + + // Now using generated code + com::trolltech::QtDBus::Pinger p(server_serviceName, server_objectPath, QDBusConnection::sessionBus()); + { + // Call with no timeout + QDBusReply reply = p.sleepMethod(100); + QVERIFY(reply.isValid()); + QCOMPARE(int(reply), 42); + } + { + // Call with 1 sec timeout -> fails + p.setTimeout(1); + QDBusReply reply = p.sleepMethod(100); + QVERIFY(!reply.isValid()); + } +} + void tst_QDBusAbstractInterface::stringPropRead() { Pinger p = getPinger(); -- cgit v0.12 From 341c19c7e6f05c60ef98dc62fe61cfe657878d5e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 22 Aug 2011 12:13:37 +0200 Subject: remove unused functions --- tools/qdoc3/cppcodemarker.cpp | 20 -------------------- tools/qdoc3/node.cpp | 31 ------------------------------- 2 files changed, 51 deletions(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 585d6ce..3617be6 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -878,26 +878,6 @@ static const char * const keywordTable[] = { "signals", "slots", "emit", 0 }; -static QString untabified(const QString &in) -{ - QString res; - int col = 0; - int i = 0; - - for (; i < (int) in.length(); i++) { - if (in[i] == QChar('\t')) { - res += QString(" " + (col & 0x7)); - col = (col + 8) & ~0x7; - } else { - res += in[i]; - if (in[i] == QChar('\n')) - col = 0; - } - } - - return res; -} - /* @char @class diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp index 87bbd93..ae823ac 100644 --- a/tools/qdoc3/node.cpp +++ b/tools/qdoc3/node.cpp @@ -1693,37 +1693,6 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue) } } -static QString valueType(const QString &n) -{ - if (n == "QPoint") - return "QDeclarativePointValueType"; - if (n == "QPointF") - return "QDeclarativePointFValueType"; - if (n == "QSize") - return "QDeclarativeSizeValueType"; - if (n == "QSizeF") - return "QDeclarativeSizeFValueType"; - if (n == "QRect") - return "QDeclarativeRectValueType"; - if (n == "QRectF") - return "QDeclarativeRectFValueType"; - if (n == "QVector2D") - return "QDeclarativeVector2DValueType"; - if (n == "QVector3D") - return "QDeclarativeVector3DValueType"; - if (n == "QVector4D") - return "QDeclarativeVector4DValueType"; - if (n == "QQuaternion") - return "QDeclarativeQuaternionValueType"; - if (n == "QMatrix4x4") - return "QDeclarativeMatrix4x4ValueType"; - if (n == "QEasingCurve") - return "QDeclarativeEasingValueType"; - if (n == "QFont") - return "QDeclarativeFontValueType"; - return QString(); -} - /*! Returns true if a QML property or attached property is read-only. The algorithm for figuring this out is long -- cgit v0.12 From db86c9f57bb6b26d92b0281ac3ca39e1fcbea715 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Sun, 21 Aug 2011 02:00:11 +0400 Subject: fix warning --- tools/qdoc3/cppcodemarker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 3617be6..17a05a5 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -935,7 +935,7 @@ QString CppCodeMarker::addMarkUp(const QString &in, ident += ch; finish = i; readChar(); - } while (ch >= 0 && isalnum(ch) || ch == '_'); + } while (ch >= 0 && (isalnum(ch) || ch == '_')); if (classRegExp.exactMatch(ident)) { tag = QLatin1String("type"); -- cgit v0.12 From 5235f88290e456854d3ebb45d4a1d503c62d1585 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 22 Aug 2011 14:38:25 +0200 Subject: Doc: Removed internal Phonon classes from doce Task-number: QTBUG-20673 --- doc/src/classes/phonon-api.qdoc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc index 95e20dd..d1b26f6 100644 --- a/doc/src/classes/phonon-api.qdoc +++ b/doc/src/classes/phonon-api.qdoc @@ -5131,6 +5131,30 @@ */ /*! + \class Phonon::GlobalConfigPrivate + \inmodule Phonon + \internal +*/ + +/*! + \class Phonon::AudioDataOutputPrivate + \inmodule Phonon + \internal +*/ + +/*! + \class Phonon::AudioDataOutputInterface + \inmodule Phonon + \internal +*/ + +/*! + \class Phonon::SwiftSlider + \inmodule Phonon + \internal +*/ + +/*! \fn Phonon::GlobalConfigPrivate::GlobalConfigPrivate() \internal */ -- cgit v0.12 From 670f460fab6a386407c07281cf6417ccf6430970 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 22 Aug 2011 15:22:31 +0200 Subject: Doc: Fixed date format doc bug in QDateTime/Qt namespace Task-number: QTBUG-12236 Reviewed-by: David Boddie --- src/corelib/global/qnamespace.qdoc | 2 +- src/corelib/tools/qdatetime.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index dc92866..4974aef 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -539,7 +539,7 @@ string, "ddd MMM d yyyy". See QDate::toString() for more information. \value ISODate \l{ISO 8601} extended format: either \c{YYYY-MM-DD} for dates or - \c{YYYY-MM-DDTHH:MM:SS}, \c{YYYY-MM-DDTHH:MM:SSTZD} (e.g., 1997-07-16T19:20:30+01:00) + \c{YYYY-MM-DDTHH:mm:ss}, \c{YYYY-MM-DDTHH:mm:ssTZD} (e.g., 1997-07-16T19:20:30+01:00) for combined dates and times. \value SystemLocaleShortDate The \l{QLocale::ShortFormat}{short format} used diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index a6fee43..085103c 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -1538,7 +1538,7 @@ int QTime::msec() const If \a format is Qt::ISODate, the string format corresponds to the ISO 8601 extended specification for representations of dates, - which is also HH:MM:SS. (However, contrary to ISO 8601, dates + which is also HH:mm:ss. (However, contrary to ISO 8601, dates before 15 October 1582 are handled as Julian dates, not Gregorian dates. See \l{QDate G and J} {Use of Gregorian and Julian Calendars}. This might change in a future version of Qt.) @@ -2461,7 +2461,7 @@ void QDateTime::setTime_t(uint secsSince1Jan1970UTC) If the \a format is Qt::ISODate, the string format corresponds to the ISO 8601 extended specification for representations of - dates and times, taking the form YYYY-MM-DDTHH:MM:SS[Z|[+|-]HH:MM], + dates and times, taking the form YYYY-MM-DDTHH:mm:ss[Z|[+|-]HH:mm], depending on the timeSpec() of the QDateTime. If the timeSpec() is Qt::UTC, Z will be appended to the string; if the timeSpec() is Qt::OffsetFromUTC the offset in hours and minutes from UTC will -- cgit v0.12 From bf24e842393c73c6745311c37130117d871f1958 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 22 Aug 2011 16:04:39 +0200 Subject: Doc: Fixed doc bug in QMetaObject Task-number: QTBUG-14067 Reviewed-by: David Boddie --- src/corelib/kernel/qmetaobject.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index b4c37f4..8597fa3 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -432,9 +432,10 @@ int QMetaObject::constructorCount() const } /*! - Returns the number of methods in this class, including the number of - properties provided by each base class. These include signals and slots - as well as normal member functions. + Returns the number of methods known to the meta-object system in this class, + including the number of properties provided by each base class. These + include signals and slots as well as member functions declared with the + Q_INVOKABLE macro. Use code like the following to obtain a QStringList containing the methods specific to a given class: @@ -1245,6 +1246,10 @@ bool QMetaObject::invokeMethod(QObject *obj, tag(), and an access() specifier. You can use invoke() to invoke the method on an arbitrary QObject. + A method will only be registered with the meta-object system if it + is a slot, a signal, or declared with the Q_INVOKABLE macro. + Constructors can also be registered with Q_INVOKABLE. + \sa QMetaObject, QMetaEnum, QMetaProperty, {Qt's Property System} */ -- cgit v0.12 From 7160226481f4d3bb3b269f62fb8b903b8f48a026 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 22 Aug 2011 16:12:09 +0200 Subject: Doc: Fix doc bug in QMouseEvent Task-number: QTBUG-18359 --- src/gui/kernel/qevent.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index de2d87e..e1df267 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -142,8 +142,7 @@ QInputEvent::~QInputEvent() and QWidget::mouseMoveEvent() to receive mouse events in your own widgets. - \sa QWidget::setMouseTracking() QWidget::grabMouse() - QCursor::pos() + \sa QWidget::setMouseTracking() QWidget::grabMouse() QCursor::pos() */ /*! -- cgit v0.12 From bd3c6cca161d776f547c6cdc40c5ac577fc837ae Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 22 Aug 2011 17:21:47 +0200 Subject: Doc: Added links to the plugin deployment guide. --- doc/src/deployment/deployment.qdoc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc index a13e2b8..ecb9ec6 100644 --- a/doc/src/deployment/deployment.qdoc +++ b/doc/src/deployment/deployment.qdoc @@ -102,15 +102,16 @@ of the libraries used by the application. Using static linking, however, the Qt run-time is compiled into the executable. - In general, you should deploy all plugins that your build of Qt uses, - excluding only those that you have identified as being unnecessary - for your application and its users. + In general, you should \l{Deploying Plugins}{deploy all plugins} + that your build of Qt uses, excluding only those that you have + identified as being unnecessary for your application and its users. For instance, you may need to deploy plugins for JPEG support and SQL drivers, but you should also deploy plugins that your users may require, including those for accessibility. - For more information about plugins, see the - \l{plugins-howto.html}{How to Create Qt Plugins} documentation. + For more information about plugins, see + \l{plugins-howto.html}{How to Create Qt Plugins} and + \l{Deploying Plugins}. When deploying an application using the shared library approach you must ensure that the Qt libraries will use the correct path to @@ -501,7 +502,8 @@ The \l{How to Create Qt Plugins} document outlines the issues you need to pay attention to when building and deploying plugins for - Qt applications. + Qt applications. More information about deployment can be found in + \l{Deploying Plugins}. */ /*! -- cgit v0.12 From 78c8b5f1cfe11fd1a65b91bc6b0f9be7e9e8c1c5 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Mon, 22 Aug 2011 18:35:11 +0200 Subject: Doc: Updated platform notes for MultiMedia and Phonon Task-number: QTBUG-19744 Reviewed-by: David Boddie --- doc/src/platforms/platform-notes.qdoc | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 175cf1c..477f125 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -774,7 +774,7 @@ \row \o QtCore \o \c PowerMgmt if QProcess::kill(...) or QProcess::terminate(...) is called. \row \o QtCore - \o \c AllFiles when \l{http://developer.symbian.org/wiki/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.} + \o \c AllFiles when \l{http://wiki.forum.nokia.com/index.php/Capabilities_%28Symbian_Signed%29/AllFiles_Capability}{accessing specific areas.} \row \o QtDeclarative \o \c NetworkServices is automatically added for this module if no capabilities are explicitly specified. \row \o QtNetwork @@ -798,22 +798,27 @@ \section1 Multimedia and Phonon Support - Qt provides a backend for Qt's Phonon module, which supports - video and sound playback through Symbian's Multimedia Framework, MMF. + Qt provides a high-level API for multimedia functionality with + (\l{http://doc.qt.nokia.com/qtmobility/multimedia.html}). - In this release the support is experimental. Video playback may have - flickering issues, and support for effects and playback queueing is - incomplete. + Qt also provides a backend for Qt's Phonon module, which supports video and + sound playback through Symbian's Multimedia Framework, MMF. Note that Phonon + support is not being extended, and that Qt's multimedia module will + take over for Phonon at a later stage. + + In this release the support is experimental. Video playback may show + artifacts when the video is moved or resized (for instance during + orientation flips). This problem is present on Symbian^1 and earlier + versions, and on Symbian^3 systems. The audio and video formats that Phonon supports depends on what support the platform provides for MMF. The emulator is known to have limited codec support. - In addition, there exists a backend for the Helix framework. However, due - to it not shipping with Qt, its availability depends on the Symbian - platform in use. If available, it is loaded in preference over the MMF - plugin. If the Helix plugin fails to load, the MMF plugin, if present on - the device, will be loaded instead. + In addition, there exists a backend for the Helix framework. However, since + it is not shipped with Qt, its availability depends on the Symbian platform + in use. If the MFF plugin fails to load, the Helix plugin, if present on the + device, will be loaded instead. \section1 Hardware Accelerated Rendering -- cgit v0.12 From 0c70be512bfc40e8a2a09f60a66b7ecb114e748e Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Mon, 22 Aug 2011 18:21:36 +0200 Subject: Disable activeqt on win32-g++ (it doesn't build). Merge-request: 1336 Reviewed-by: Oswald Buddenhagen --- configure | 4 ++++ src/src.pro | 2 +- tools/designer/src/plugins/plugins.pro | 2 +- tools/tools.pro | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index ec04414..76e32cb 100755 --- a/configure +++ b/configure @@ -9013,6 +9013,10 @@ for file in .projects .projects.3; do if [ "$CFG_NOPROCESS" = "yes" ] || [ "$XPLATFORM_SYMBIAN" != "yes" ]; then continue fi;; + *activeqt/*) + if [ "$PLATFORM" = "win32-g++" ] || [ "$XPLATFORM" = "win32-g++" ]; then + continue + fi;; *examples/activeqt/*) continue ;; */qmake/qmake.pro) continue ;; *tools/bootstrap*|*tools/moc*|*tools/rcc*|*tools/uic*|*linguist/lrelease*) SPEC=$QMAKESPEC ;; diff --git a/src/src.pro b/src/src.pro index 9e29b89..9314fbd 100644 --- a/src/src.pro +++ b/src/src.pro @@ -11,7 +11,7 @@ nacl: SRC_SUBDIRS -= src_network src_testlib !wince*:!symbian:!vxworks:contains(QT_CONFIG, qt3support): SRC_SUBDIRS += src_qt3support !wince*:!symbian-abld:!symbian-sbsv2:include(tools/tools.pro) -win32:SRC_SUBDIRS += src_activeqt +win32:!win32-g++*:SRC_SUBDIRS += src_activeqt contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl contains(QT_CONFIG, openvg): SRC_SUBDIRS += src_openvg diff --git a/tools/designer/src/plugins/plugins.pro b/tools/designer/src/plugins/plugins.pro index bcebb82..64763a9 100644 --- a/tools/designer/src/plugins/plugins.pro +++ b/tools/designer/src/plugins/plugins.pro @@ -3,7 +3,7 @@ CONFIG += ordered REQUIRES = !CONFIG(static,shared|static) contains(QT_CONFIG, qt3support): SUBDIRS += widgets -win32: SUBDIRS += activeqt +win32:!win32-g++*: SUBDIRS += activeqt # contains(QT_CONFIG, opengl): SUBDIRS += tools/view3d contains(QT_CONFIG, webkit): SUBDIRS += qwebview contains(QT_CONFIG, phonon): SUBDIRS += phononwidgets diff --git a/tools/tools.pro b/tools/tools.pro index 7eecebd..b23df4b 100644 --- a/tools/tools.pro +++ b/tools/tools.pro @@ -21,7 +21,7 @@ TEMPLATE = subdirs } } unix:!symbian:!mac:!embedded:!qpa:SUBDIRS += qtconfig - win32:!wince*:SUBDIRS += activeqt + win32:!wince*:!win32-g++*:SUBDIRS += activeqt } contains(QT_CONFIG, declarative) { SUBDIRS += qml -- cgit v0.12 From 04addd57742141f3f937722c1477ec7152bb888b Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Tue, 23 Aug 2011 11:52:16 +0200 Subject: Doc: Said that QList::clear deallocates memory Task-number: QTBUG-18271 Reviewed-by: David Boddie --- src/corelib/tools/qlist.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp index e68ddd5..18bfe24 100644 --- a/src/corelib/tools/qlist.cpp +++ b/src/corelib/tools/qlist.cpp @@ -460,8 +460,8 @@ void **QListData::erase(void **xi) Note that the internal array only ever gets bigger over the life of the list. It never shrinks. The internal array is deallocated - by the destructor and by the assignment operator, when one list - is assigned to another. + by the destructor, by clear(), and by the assignment operator, + when one list is assigned to another. Here's an example of a QList that stores integers and a QList that stores QDate values: -- cgit v0.12 From 1508c8d581e04a7bcb6773308e4528cb93c2c18c Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Tue, 23 Aug 2011 11:58:59 +0200 Subject: Doc: Said that QIODevice::isSequential returns false by default Task-number: QTBUG-18174 --- src/corelib/io/qiodevice.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index ea00cb4..dae4e82 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -423,6 +423,8 @@ QIODevice::~QIODevice() seeking backwards and forwards in the data stream. Regular files are non-sequential. + The QIODevice implementation returns false. + \sa bytesAvailable() */ bool QIODevice::isSequential() const -- cgit v0.12 From e8b49d0e33ea6c8a2814fcad70015dbcc28e9a5d Mon Sep 17 00:00:00 2001 From: Honglei Zhang Date: Fri, 19 Aug 2011 11:22:38 +0300 Subject: QXmlSimpleReader handle external entity reference file over 1k This commit fixes the bug that causes the QXmlSimpleReader can only handle external reference file less than 1k. Instead of reading the 1k buffer, the system will try to read all data from file into memory. This is not good for memory management. But there doesn't seem to be better solution without breaking the existing API. Task-number: QTBUG-21025 Reviewed-by: Peter Hartmann --- src/xml/sax/qxml.cpp | 8 +++++++- tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/015.ent | Bin 0 -> 2130 bytes tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/015.xml | 6 ++++++ .../qxmlsimplereader/xmldocs/valid/ext-sa/015.xml.ref | 10 ++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100755 tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/015.ent create mode 100644 tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/015.xml create mode 100644 tests/auto/qxmlsimplereader/xmldocs/valid/ext-sa/015.xml.ref diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index 2f5384b..0c7f2ab 100644 --- a/src/xml/sax/qxml.cpp +++ b/src/xml/sax/qxml.cpp @@ -7748,7 +7748,13 @@ bool QXmlSimpleReaderPrivate::processReference() return false; } if (ret) { - QString xmlRefString = ret->data(); + QString xmlRefString; + QString buffer = ret->data(); + while (buffer.length()>0){ + xmlRefString += buffer; + ret->fetchData();