Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"

This commit is contained in:
Qt Forward Merge Bot 2019-09-28 03:02:43 +02:00
commit ae7ae29711
5 changed files with 167 additions and 12 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 998 B

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@ -193,10 +193,152 @@
translation is loaded according to the current locale at runtime, and
finally, the translator object is installed into the application.
Note the use of QLibraryInfo::location() to locate the Qt translations.
Developers should request the path to the translations at run-time by
passing QLibraryInfo::TranslationsPath to this function instead of
using the \c QTDIR environment variable in their applications.
\section1 Locating Qt Translations
You can also use QLibraryInfo::location() to locate the translations for the
Qt modules used. You can request the path to the translations at run-time by
passing QLibraryInfo::TranslationsPath to this function.
\section2 Available Catalogs
The Qt translation catalogs are located in the \c qttranslations repository.
\warning Qt translations are contributed by the Qt community, and provided
without any guarantees. Translations migh be missing, outdated, or entirely
incorrect, up to the point of being malicious. It is recommended that you
audit any translations you ship.
The \c qt_ meta catalog contains the still-existing Qt translations that
were included in the \c qt_ catalog in Qt 4. It was created to make porting
applications from Qt 4 to Qt 5 easier. The meta catalog depends on
translations that might be absent, because they belong to unnecessary or
deprecated modules, which might cause the loading of the translations to
fail. If you use modules that are new in Qt 5 in your application, you must
specify the names of the catalogs for those modules even if you use the
meta catalog.
The following table lists the translation catalogs available for the Qt
modules and tools in Qt.
\table
\header
\li Qt Module or Tool
\li Catalog
\row
\li \l {Qt Assistant Manual}{Qt Assistant}
\li \c assistant_
\row
\li \l [QtBluetooth]{Qt Bluetooth}
\li \c qtconnectivity_
\row
\li \l [QtConcurrent]{Qt Concurrent}
\li \c qtbase_
\row
\li \l [QtCore]{Qt Core}
\li \c qtbase_
\row
\li \l [QtDBus]{Qt D-Bus}
\li \c qtbase_
\row
\li \l {Qt Designer}
\li \c designer_
\row
\li \l [QtGui]{Qt GUI}
\li \c qtbase_
\row
\li \l {Qt Help}
\li \c qt_help_
\row
\li \l {Qt Linguist Manual}{Qt Linguist}
\li \c linguist_
\row
\li \l [QtLocation]{Qt Location}
\li \c qtlocation_
\row
\li \l [QtMultimedia]{Qt Multimedia}
\li \c qtmultimedia_
\row
\li \l [QtMultimediaWidgets]{Qt Multimedia Widgets}
\li \c qtmultimedia_
\row
\li \l[QtNfc]{Qt NFC}
\li \c qtconnectivity_
\row
\li \l[Qt Network]{Qt Network}
\li \c qtbase_
\row
\li \l [QtPositioning]{Qt Positioning}
\li \c qtlocation_
\row
\li \l [QtPrintSupport]{Qt Print Support}
\li \c qtbase_
\row
\li \l {Qt QML}
\li \c qtdeclarative_
\row
\li \l {Qt Quick}
\li \c qtdeclarative_
\row
\li \l {Qt Quick Controls}
\li \c qtquickcontrols2_
\row
\li \l {Qt Quick Widgets C++ Classes}{Qt Quick Widgets}
\li \c qtdeclarative_
\row
\li \l [QtSerialPort]{Qt Serial Port}
\li \c qtserialport_
\row
\li \l [QtSql]{Qt SQL}
\li \c qtbase_
\row
\li \l [QtWebEngine]{Qt WebEngine}
\li \c qtwebengine_
\row
\li \l [QtWebSockets]{Qt WebSockets}
\li \c qtwebsockets_
\row
\li \l [QtWidgets]{Qt Widgets}
\li \c qtbase_
\endtable
\omit
The following modules are not listed above because they are deprecated,
documented as a part of another module, QPA modules, or not translated
for some reason.
\list
\row \li QtEglFSDeviceIntegration \li \c qtbase_ \li QPA
\row \li QtMultimediaGstTools \li \c qtmultimedia_ \li Qt Multimedia
\row \li QtMultimediaQuick \li \c qtmultimedia_ \li Qt Multimedia
\row \li QtOpenGL \li \c qtbase_ \li Deprecated
\row \li QtOpenGLExtensions \li \c qtbase_ \li Deprecated
\row \li QtPacketProtocol \li \c qtdeclarative_ \li Qt Quick
\row \li QtPositioningQuick \li \c qtlocation_ \li Qt Positioning
\row \li QtQmlDebug \li \c qtdeclarative_ \li Qt Quick
\row \li QtQmlModels \li \c qtdeclarative_ \li Qt Quick
\row \li QtQmlWorkerScript \li \c qtdeclarative_ \li Qt Quick
\row \li QtQuickParticles \li \c qtdeclarative_ \li Qt Quick
\row \li QtQuickShapes \li \c qtdeclarative_ \li Qt Quick
\row \li QtQuickTemplates2 \li \c qtquickcontrols2_ \li Qt Quick Controls 2
\row \li QtQuickTest \li \c qtdeclarative_ \li Not translated
\row \li QtQuickWidgets \li \c qtdeclarative_ \li Qt Quick
\row \li QtScript \li \c qtscript_ \li Deprecated
\row \li QtScriptTools \li \c qtscript_ \li Deprecated
\row \li QtTest \li \c qtbase_ \li Not translated
\row \li QtWebEngineCore \li \c qtwebengine_ \li Qt WebEngine
\row \li QtWebEngineWidgets \li \c qtwebengine_ \li Qt WebEngine
\row \li QtXml \li \c qtbase_ \li Deprecated
\row \li QtXmlPatterns \li \c qtxmlpatterns_ \li Deprecated
\endlist
\endomit
\section2 Example: Basic Qt Modules
For example, to locate translations for basic Qt modules, such as Qt Core,
Qt GUI, Qt Network, and Qt Widgets, add the following code to the \c main()
function:
\snippet snippets/code/doc_src_i18n.cpp 14
\section1 Support for Encodings

View File

@ -34,6 +34,12 @@
Changes in Qt and \l{Licenses Used in Qt}{Third Party Modules}
released with Qt that are relevant to licensing.
\section1 Qt 5.13.2
\section2 Qt SQL Module
\l{SQLite} got updated to upstream version 3.29.0.
\section1 Qt 5.13.1
\section2 Qt Core Module
@ -84,6 +90,12 @@
License.
\endlist
\section1 Qt 5.12.6
\section2 Qt SQL Module
\l{SQLite} got updated to upstream version 3.29.0.
\section1 Qt 5.12.5
\section2 Qt GUI Module

View File

@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@ -129,16 +129,10 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QTranslator qtTranslator;
qtTranslator.load("qt_" + QLocale::system().name(),
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
app.installTranslator(&qtTranslator);
QTranslator myappTranslator;
myappTranslator.load("myapp_" + QLocale::system().name());
app.installTranslator(&myappTranslator);
...
return app.exec();
}
//! [8]
@ -199,3 +193,10 @@ void same_global_function(LoginWidget *logwid)
logwid);
}
//! [13]
//! [14]
QTranslator qtTranslator;
qtTranslator.load(QLocale::system(), QStringLiteral("qtbase_"));
app.installTranslator(&qtTranslator);
//! [14]