diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-10-09 17:56:51 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-10-09 17:56:52 +0200 |
commit | 881ceeff428c377d02ae3881beccdbb028385075 (patch) | |
tree | 65bd4335d7f67b81b04e33f2cbb17a41cf966dd8 /src/tools | |
parent | b3d2c867ed14cd6337d5e32b8750f198b5b7d331 (diff) | |
parent | 106487387d493dab934e19b33bfed55b8df62d67 (diff) |
Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I05fcd8dc66d9ad0dc76bb7f5bae05c9876bfba14
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/moc/generator.cpp | 14 | ||||
-rw-r--r-- | src/tools/qdoc/config.cpp | 2 | ||||
-rw-r--r-- | src/tools/qdoc/cppcodeparser.cpp | 2 | ||||
-rw-r--r-- | src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc | 2 | ||||
-rw-r--r-- | src/tools/qdoc/doc/qdoc-manual-DITA.qdoc | 6 | ||||
-rw-r--r-- | src/tools/qdoc/doc/qdoc-manual-intro.qdoc | 2 | ||||
-rw-r--r-- | src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc | 4 | ||||
-rw-r--r-- | src/tools/qdoc/helpprojectwriter.cpp | 8 | ||||
-rw-r--r-- | src/tools/qdoc/htmlgenerator.cpp | 16 | ||||
-rw-r--r-- | src/tools/rcc/main.cpp | 4 | ||||
-rw-r--r-- | src/tools/uic/qclass_lib_map.h | 1 | ||||
-rw-r--r-- | src/tools/uic/ui4.cpp | 14 | ||||
-rw-r--r-- | src/tools/uic/uic.cpp | 2 |
13 files changed, 40 insertions, 37 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index 3592974b34..dd032e46f6 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -639,29 +639,29 @@ void Generator::generateFunctions(const QList<FunctionDef>& list, const char *fu unsigned char flags = type; if (f.access == FunctionDef::Private) { flags |= AccessPrivate; - comment.append(QByteArrayLiteral("Private")); + comment.append("Private"); } else if (f.access == FunctionDef::Public) { flags |= AccessPublic; - comment.append(QByteArrayLiteral("Public")); + comment.append("Public"); } else if (f.access == FunctionDef::Protected) { flags |= AccessProtected; - comment.append(QByteArrayLiteral("Protected")); + comment.append("Protected"); } if (f.isCompat) { flags |= MethodCompatibility; - comment.append(QByteArrayLiteral(" | MethodCompatibility")); + comment.append(" | MethodCompatibility"); } if (f.wasCloned) { flags |= MethodCloned; - comment.append(QByteArrayLiteral(" | MethodCloned")); + comment.append(" | MethodCloned"); } if (f.isScriptable) { flags |= MethodScriptable; - comment.append(QByteArrayLiteral(" | isScriptable")); + comment.append(" | isScriptable"); } if (f.revision > 0) { flags |= MethodRevisioned; - comment.append(QByteArrayLiteral(" | MethodRevisioned")); + comment.append(" | MethodRevisioned"); } int argc = f.arguments.count(); diff --git a/src/tools/qdoc/config.cpp b/src/tools/qdoc/config.cpp index 5c12458cac..51ab341869 100644 --- a/src/tools/qdoc/config.cpp +++ b/src/tools/qdoc/config.cpp @@ -1101,7 +1101,7 @@ void Config::load(Location location, const QString& fileName) ConfigVarMultimap::Iterator i; i = configVars_.insert(*key, ConfigVar(*key, rhsValues, QDir::currentPath(), keyLoc)); - i.value().plus_ = (plus ? true : false); + i.value().plus_ = plus; ++key; } } diff --git a/src/tools/qdoc/cppcodeparser.cpp b/src/tools/qdoc/cppcodeparser.cpp index 66dfa3290f..22aae609ae 100644 --- a/src/tools/qdoc/cppcodeparser.cpp +++ b/src/tools/qdoc/cppcodeparser.cpp @@ -1076,7 +1076,7 @@ bool CppCodeParser::skipTo(int target) { while ((tok != Tok_Eoi) && (tok != target)) readToken(); - return (tok == target ? true : false); + return tok == target; } /*! diff --git a/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc b/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc index 304a736860..291363a22d 100644 --- a/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc +++ b/src/tools/qdoc/doc/qdoc-guide/qtwritingstyle-cpp.qdoc @@ -166,7 +166,7 @@ the notifier. \snippet examples/cpp.qdoc.sample overloaded notifier -\section1 Enums, Namespaces, and other Types +\section1 Enums, Namespaces, and Other Types Enums, namespaces, and macros have a \l{writing-topic-commands}{topic command} for their documentation: \list diff --git a/src/tools/qdoc/doc/qdoc-manual-DITA.qdoc b/src/tools/qdoc/doc/qdoc-manual-DITA.qdoc index 070bad336f..4e4bea7556 100644 --- a/src/tools/qdoc/doc/qdoc-manual-DITA.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual-DITA.qdoc @@ -39,7 +39,7 @@ documentation build process is still under consideration. This section will be updated as the decisions are made. - \section1 What is a DITA map? + \section1 What is a DITA Map? A complete description of DITA can be found at the \l{http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=dita} @@ -107,7 +107,7 @@ \mapref {Creator Manual} {creator-manual.ditamap} \endmapref \endcode - \section1 An example ditamap page + \section1 An Example Ditamap Page The following example uses the three qdoc ditamap commands described above. @@ -131,7 +131,7 @@ \endtopicref \endcode - \section1 The resulting ditamap file + \section1 The Resulting Ditamap File This is the \e{.ditamap} file you get when you input the qdoc ditamap page shown above. Note that you can write ditamap files diff --git a/src/tools/qdoc/doc/qdoc-manual-intro.qdoc b/src/tools/qdoc/doc/qdoc-manual-intro.qdoc index f681c0a574..636cd6980e 100644 --- a/src/tools/qdoc/doc/qdoc-manual-intro.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual-intro.qdoc @@ -107,7 +107,7 @@ See \l{The QDoc Configuration File} for instructions on how to set up a QDoc configuration file. - \section1 How QDoc works + \section1 How QDoc Works QDoc begins by reading the configuration file you specified on the command line. It stores all the variables from the configuration diff --git a/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc b/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc index fee5085821..093f9cc2c6 100644 --- a/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc +++ b/src/tools/qdoc/doc/qdoc-manual-qdocconf.qdoc @@ -1126,7 +1126,7 @@ erroneous documentation due to non-standard C++ constructs. \target Cpp.ignoredirectives-variable - \section1 Cpp.ignoredirectives + \section1 Cpp.ignoredirectives The \c Cpp.ignoredirectives variable makes QDoc ignore the specified non-standard constructs, within C++ source code. @@ -1177,7 +1177,7 @@ See also \l Cpp.ignoretokens. \target Cpp.ignoretokens-variable - \section1 Cpp.ignoretokens + \section1 Cpp.ignoretokens The \c Cpp.ignoretokens variable makes QDoc ignore the specified non-standard constructs, within C++ source code. diff --git a/src/tools/qdoc/helpprojectwriter.cpp b/src/tools/qdoc/helpprojectwriter.cpp index aea05c1ab2..d0960e48bd 100644 --- a/src/tools/qdoc/helpprojectwriter.cpp +++ b/src/tools/qdoc/helpprojectwriter.cpp @@ -773,7 +773,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) } else { // Find a contents node and navigate from there, using the NextLink values. QSet<QString> visited; - + bool contentsFound = false; foreach (const Node *node, subproject.nodes) { QString nextTitle = node->links().value(Node::NextLink).first; if (!nextTitle.isEmpty() && @@ -783,6 +783,7 @@ void HelpProjectWriter::generateProject(HelpProject &project) // Write the contents node. writeNode(project, writer, node); + contentsFound = true; while (nextPage) { writeNode(project, writer, nextPage); @@ -795,6 +796,11 @@ void HelpProjectWriter::generateProject(HelpProject &project) break; } } + // No contents/nextpage links found, write all nodes unsorted + if (!contentsFound) { + foreach (const Node *node, subproject.nodes) + writeNode(project, writer, node); + } } if (!name.isEmpty()) diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index ad9cddbe4f..32399f11c7 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1668,22 +1668,16 @@ void HtmlGenerator::generateNavigationBar(const QString &title, << Atom(Atom::String, cn->name()) << Atom(Atom::ListItemRight); } - else if (node->isQmlType()) { - if (!qmltypespage.isEmpty()) - navigationbar << Atom(Atom::ListItemLeft) - << Atom(Atom::Link, qmltypespage) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << Atom(Atom::String, QLatin1String("QML Types")) - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) - << Atom(Atom::ListItemRight); - } - else if (node->isQmlBasicType()) { + else if (node->isQmlType() || node->isQmlBasicType()) { if (!qmltypespage.isEmpty()) navigationbar << Atom(Atom::ListItemLeft) << Atom(Atom::Link, qmltypespage) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) << Atom(Atom::String, QLatin1String("QML Types")) << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK) + << Atom(Atom::ListItemRight) + << Atom(Atom::ListItemLeft) + << Atom(Atom::String, title) << Atom(Atom::ListItemRight); } else { @@ -4445,7 +4439,7 @@ void HtmlGenerator::generateManifestFile(QString manifest, QString element) continue; if (tag.at(0) == '-') continue; - if (tag == QStringLiteral("qt")) + if (tag == QLatin1String("qt")) continue; if (tag.startsWith("example")) continue; diff --git a/src/tools/rcc/main.cpp b/src/tools/rcc/main.cpp index 9970745b10..3c556d76a8 100644 --- a/src/tools/rcc/main.cpp +++ b/src/tools/rcc/main.cpp @@ -182,9 +182,9 @@ int runRcc(int argc, char *argv[]) if (parser.isSet(binaryOption)) library.setFormat(RCCResourceLibrary::Binary); if (parser.isSet(passOption)) { - if (parser.value(passOption) == QStringLiteral("1")) + if (parser.value(passOption) == QLatin1String("1")) library.setFormat(RCCResourceLibrary::Pass1); - else if (parser.value(passOption) == QStringLiteral("2")) + else if (parser.value(passOption) == QLatin1String("2")) library.setFormat(RCCResourceLibrary::Pass2); else errorMsg = QLatin1String("Pass number must be 1 or 2"); diff --git a/src/tools/uic/qclass_lib_map.h b/src/tools/uic/qclass_lib_map.h index 48793e7f09..940017d063 100644 --- a/src/tools/uic/qclass_lib_map.h +++ b/src/tools/uic/qclass_lib_map.h @@ -322,6 +322,7 @@ QT_CLASS_LIB(QMacCompatGLenum, QtOpenGL, qgl.h) QT_CLASS_LIB(QGLFormat, QtOpenGL, qgl.h) QT_CLASS_LIB(QGLContext, QtOpenGL, qgl.h) QT_CLASS_LIB(QGLWidget, QtOpenGL, qgl.h) +QT_CLASS_LIB(QOpenGLWidget,QtWidgets,qopenglwidget.h) QT_CLASS_LIB(QGLBuffer, QtOpenGL, qglbuffer.h) QT_CLASS_LIB(QGLColormap, QtOpenGL, qglcolormap.h) QT_CLASS_LIB(QGLFramebufferObject, QtOpenGL, qglframebufferobject.h) diff --git a/src/tools/uic/ui4.cpp b/src/tools/uic/ui4.cpp index 352cd34b68..01b4437db7 100644 --- a/src/tools/uic/ui4.cpp +++ b/src/tools/uic/ui4.cpp @@ -3471,7 +3471,7 @@ void DomWidget::read(QXmlStreamReader &reader) continue; } if (name == QStringLiteral("native")) { - setAttributeNative((attribute.value().toString() == QStringLiteral("true") ? true : false)); + setAttributeNative(attribute.value().toString() == QStringLiteral("true")); continue; } reader.raiseError(QStringLiteral("Unexpected attribute ") + name.toString()); @@ -4845,23 +4845,23 @@ void DomFont::read(QXmlStreamReader &reader) continue; } if (tag == QStringLiteral("italic")) { - setElementItalic((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementItalic(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("bold")) { - setElementBold((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementBold(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("underline")) { - setElementUnderline((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementUnderline(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("strikeout")) { - setElementStrikeOut((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementStrikeOut(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("antialiasing")) { - setElementAntialiasing((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementAntialiasing(reader.readElementText() == QStringLiteral("true")); continue; } if (tag == QStringLiteral("stylestrategy")) { @@ -4869,7 +4869,7 @@ void DomFont::read(QXmlStreamReader &reader) continue; } if (tag == QStringLiteral("kerning")) { - setElementKerning((reader.readElementText() == QStringLiteral("true") ? true : false)); + setElementKerning(reader.readElementText() == QStringLiteral("true")); continue; } reader.raiseError(QStringLiteral("Unexpected element ") + tag); diff --git a/src/tools/uic/uic.cpp b/src/tools/uic/uic.cpp index e5f092b558..2bee9de1e8 100644 --- a/src/tools/uic/uic.cpp +++ b/src/tools/uic/uic.cpp @@ -211,6 +211,7 @@ bool Uic::write(QIODevice *in) #ifdef QT_UIC_JAVA_GENERATOR if (language.toLower() != QLatin1String("jambi")) { fprintf(stderr, "uic: File is not a 'jambi' form\n"); + delete ui; return false; } rtn = jwrite (ui); @@ -221,6 +222,7 @@ bool Uic::write(QIODevice *in) #ifdef QT_UIC_CPP_GENERATOR if (!language.isEmpty() && language.toLower() != QLatin1String("c++")) { fprintf(stderr, "uic: File is not a 'c++' ui file, language=%s\n", qPrintable(language)); + delete ui; return false; } |